parse(root) {
      Logger.debug("DOMManager: parse from", root);
      const walker = document.createTreeWalker(
        root,
        NodeFilter.SHOW_TEXT,
        null
      );
      let node;
      const regex = /\{\{\s*([^}]+)\s*\}\}/g;
      while (node = walker.nextNode()) {
        let match;
        const text = node.textContent;
        const originalText = text;
        regex.lastIndex = 0;
        while ((match = regex.exec(text)) !== null) {
          Logger.debug(`DOMManager: parse match found for ${text}`, match);
          const propPath = match[1].trim();
          this.registerDomDependency(propPath, node, {
            type: "template",
            template: originalText
          });
          this.elements.push({
            node,
            propName: propPath,
            template: originalText
          });
        }
        Logger.debug(`DOMManager: update virtual DOM set`, { node, text: node.textContent });
        this.virtualDom.set(node, node.textContent);
      }
      Logger.debug("DOMManager: Find inputs with data-model directive...");
      const inputs = root.querySelectorAll("[data-model]");
      Logger.debug("DOMManager: Found inputs with data-model:", inputs.length);
      inputs.forEach((input) => {
        const property = input.getAttribute("data-model");
        Logger.debug("DOMManager: Register handler for:", { input, property });
        const handler = (e2) => {
          const value = input.type === "checkbox" || input.type === "radio" ? e2.target.checked : e2.target.value;
          this.model.store.set(property, value);
        };
        input.__modelInputHandler = handler;
        input.addEventListener("input", handler);
        this.inputs.push({
          element: input,
          property
        });
      });
    }
Parses DOM tree for template placeholders and sets up reactive bindings.
- Uses TreeWalker to efficiently traverse text nodes
- Detects template expressions using regex pattern
- Registers dependencies for each found template expression
- Preserves original template text for future updates
- Handles regex state reset between matches

@param {HTMLElement} root - Starting point for DOM traversal