@syntrologie/adapt-content 2.8.0-canary.62 → 2.8.0-canary.621

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/chunk-PZ5AY32C.js +10 -0
  2. package/dist/chunk-PZ5AY32C.js.map +7 -0
  3. package/dist/runtime.d.ts +8 -1
  4. package/dist/runtime.d.ts.map +1 -1
  5. package/dist/runtime.js +503 -348
  6. package/dist/runtime.js.map +7 -0
  7. package/dist/sanitizer.d.ts.map +1 -1
  8. package/dist/schema.d.ts +62 -22
  9. package/dist/schema.d.ts.map +1 -1
  10. package/dist/schema.js +4777 -62
  11. package/dist/schema.js.map +7 -0
  12. package/dist/types.d.ts +12 -0
  13. package/dist/types.d.ts.map +1 -1
  14. package/package.json +2 -23
  15. package/dist/cdn.d.ts +0 -35
  16. package/dist/cdn.d.ts.map +0 -1
  17. package/dist/cdn.js +0 -39
  18. package/dist/components/AnchorPicker.d.ts +0 -8
  19. package/dist/components/AnchorPicker.d.ts.map +0 -1
  20. package/dist/components/AnchorPicker.js +0 -6
  21. package/dist/content-editor-state.d.ts +0 -45
  22. package/dist/content-editor-state.d.ts.map +0 -1
  23. package/dist/content-editor-state.js +0 -123
  24. package/dist/content-editor-ui.d.ts +0 -26
  25. package/dist/content-editor-ui.d.ts.map +0 -1
  26. package/dist/content-editor-ui.js +0 -291
  27. package/dist/editor.d.ts +0 -9
  28. package/dist/editor.d.ts.map +0 -1
  29. package/dist/editor.js +0 -8
  30. package/dist/reconciliation-guard.js +0 -80
  31. package/dist/sanitizer.js +0 -95
  32. package/dist/summarize.js +0 -88
  33. package/dist/types.js +0 -7
  34. package/dist/utils/selectorGenerator.d.ts +0 -6
  35. package/dist/utils/selectorGenerator.d.ts.map +0 -1
  36. package/dist/utils/selectorGenerator.js +0 -4
  37. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts +0 -2
  38. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts.map +0 -1
  39. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.js +0 -3
  40. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts +0 -34
  41. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts.map +0 -1
  42. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.js +0 -158
  43. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts +0 -7
  44. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts.map +0 -1
  45. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.js +0 -9
  46. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts +0 -23
  47. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts.map +0 -1
  48. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.js +0 -40
  49. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts +0 -7
  50. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts.map +0 -1
  51. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.js +0 -22
  52. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts +0 -8
  53. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts.map +0 -1
  54. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.js +0 -9
  55. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts +0 -7
  56. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts.map +0 -1
  57. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.js +0 -4
  58. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts +0 -7
  59. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts.map +0 -1
  60. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.js +0 -4
  61. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts +0 -13
  62. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts.map +0 -1
  63. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.js +0 -15
  64. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts +0 -7
  65. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts.map +0 -1
  66. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.js +0 -4
  67. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts +0 -9
  68. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts.map +0 -1
  69. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.js +0 -4
  70. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts +0 -8
  71. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts.map +0 -1
  72. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.js +0 -8
  73. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts +0 -7
  74. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts.map +0 -1
  75. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.js +0 -4
  76. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts +0 -25
  77. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts.map +0 -1
  78. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.js +0 -379
  79. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts +0 -8
  80. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts.map +0 -1
  81. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.js +0 -8
  82. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts +0 -8
  83. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts.map +0 -1
  84. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.js +0 -17
  85. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts +0 -32
  86. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts.map +0 -1
  87. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.js +0 -85
  88. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts +0 -6
  89. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts.map +0 -1
  90. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.js +0 -4
  91. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts +0 -8
  92. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts.map +0 -1
  93. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.js +0 -5
  94. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts +0 -12
  95. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts.map +0 -1
  96. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.js +0 -40
  97. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts +0 -26
  98. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts.map +0 -1
  99. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.js +0 -202
  100. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts +0 -8
  101. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts.map +0 -1
  102. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.js +0 -46
  103. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts +0 -24
  104. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts.map +0 -1
  105. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.js +0 -86
  106. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts +0 -34
  107. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts.map +0 -1
  108. package/node_modules/@syntrologie/shared-editor-ui/dist/index.js +0 -25
  109. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts +0 -37
  110. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts.map +0 -1
  111. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.js +0 -52
  112. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts +0 -22
  113. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts.map +0 -1
  114. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.js +0 -143
  115. package/node_modules/@syntrologie/shared-editor-ui/package.json +0 -47
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/reconciliation-guard.ts", "../src/sanitizer.ts", "../src/runtime.ts"],
4
+ "sourcesContent": ["/**\n * Reconciliation Guard - MutationObserver defense against React DOM removal.\n *\n * When the Syntrologie SDK inserts DOM nodes into a React-managed subtree\n * (via content:insertHtml), React's reconciliation will silently remove them\n * on the next render because they don't exist in React's virtual DOM.\n *\n * This guard watches for the removal of our inserted container and re-inserts\n * it using a debounced retry mechanism with a maximum retry count to prevent\n * infinite loops (e.g., in React StrictMode which double-invokes effects).\n */\n\nexport interface ReconciliationGuardOptions {\n /** Maximum re-insertion attempts before giving up. Default: 3 */\n maxRetries?: number;\n /** Debounce interval in ms to coalesce rapid removals. Default: 50 */\n debounceMs?: number;\n}\n\n/**\n * Watch for a container element being removed from the DOM by an external\n * framework (React, Vue, etc.) and call `reinsertFn` to re-insert it.\n *\n * @param container The element we inserted (has data-syntro-action-id)\n * @param anchor The anchor element our container is positioned relative to\n * @param reinsertFn Called when the container is removed \u2014 should re-insert it\n * @param opts Configuration for retry limits and debounce timing\n * @returns Cleanup function that disconnects the observer\n */\nexport function guardAgainstReconciliation(\n container: HTMLElement,\n anchor: HTMLElement,\n reinsertFn: () => void,\n opts?: ReconciliationGuardOptions\n): () => void {\n const maxRetries = opts?.maxRetries ?? 3;\n const debounceMs = opts?.debounceMs ?? 50;\n\n // Find the nearest parent to observe. Prefer container's parent, then anchor's.\n const observeTarget = container.parentElement ?? anchor.parentElement;\n if (!observeTarget) return () => {};\n\n let retries = 0;\n let debounceTimer: ReturnType<typeof setTimeout> | null = null;\n let disconnected = false;\n\n const observer = new MutationObserver((mutations) => {\n if (disconnected) return;\n\n for (const mutation of mutations) {\n for (const removed of mutation.removedNodes) {\n // Check if the removed node is our container\n if (removed !== container) continue;\n\n if (retries >= maxRetries) {\n observer.disconnect();\n disconnected = true;\n return;\n }\n\n // Debounce to coalesce rapid React re-renders\n if (debounceTimer) clearTimeout(debounceTimer);\n debounceTimer = setTimeout(() => {\n if (disconnected) return;\n // If the anchor has been removed from the DOM (SPA navigation),\n // the page has been torn down \u2014 stop fighting React's reconciler.\n // Re-inserting into a dying subtree triggers removeChild crashes.\n if (!anchor.isConnected) {\n observer.disconnect();\n disconnected = true;\n return;\n }\n retries++;\n try {\n reinsertFn();\n } catch {\n // Re-insertion failed \u2014 stop trying\n observer.disconnect();\n disconnected = true;\n }\n }, debounceMs);\n\n return; // Found our container, no need to check further\n }\n }\n });\n\n observer.observe(observeTarget, { childList: true, subtree: true });\n\n return () => {\n disconnected = true;\n observer.disconnect();\n if (debounceTimer) clearTimeout(debounceTimer);\n };\n}\n", "/**\n * HTML Sanitizer\n *\n * Sanitizes HTML to prevent XSS attacks.\n * Uses native Sanitizer API when available, falls back to whitelist approach.\n */\n\nconst ALLOWED_TAGS = new Set([\n 'b',\n 'strong',\n 'i',\n 'em',\n 'u',\n 'span',\n 'div',\n 'p',\n 'br',\n 'ul',\n 'ol',\n 'li',\n 'code',\n 'pre',\n 'small',\n 'sup',\n 'sub',\n 'a',\n 'button',\n // SVG elements (for inline Lucide icons in config HTML)\n 'svg',\n 'path',\n 'circle',\n 'line',\n 'polyline',\n 'polygon',\n 'rect',\n 'g',\n]);\n\n/**\n * Syntro's own registered custom elements (`<syntro-pdp>`, tile widgets\u2026) are\n * placeable from config HTML (WI-1, 2026-07-29 WooCommerce PDP parity plan):\n * config HTML is oracle-verified (FEAT-1784879212) and an unregistered custom\n * tag is inert, so the element family is safe to pass \u2014 with the SAME\n * attribute scrubbing (on* handlers, dangerous URLs) as every allowed tag.\n * Non-syntro custom elements stay banned.\n */\nconst SYNTRO_ELEMENT_RE = /^syntro-[a-z][a-z0-9-]*$/;\nconst CONTAINS_SYNTRO_ELEMENT_RE = /<syntro-[a-z]/i;\n\nfunction isAllowedTag(tag: string): boolean {\n return ALLOWED_TAGS.has(tag) || SYNTRO_ELEMENT_RE.test(tag);\n}\n\nfunction normalizeUrlAttr(value: string): string {\n const withoutControlCharacters = Array.from(value, (character) => {\n const codePoint = character.codePointAt(0) ?? 0;\n return codePoint <= 0x1f || codePoint === 0x7f ? '' : character;\n }).join('');\n return withoutControlCharacters.trim().toLowerCase();\n}\n\nfunction isDangerousUrlAttr(name: string, value: string): boolean {\n if (name !== 'href' && name !== 'src' && name !== 'formaction') return false;\n const normalized = normalizeUrlAttr(value);\n return (\n normalized.startsWith('javascript:') ||\n normalized.startsWith('vbscript:') ||\n normalized.startsWith('data:')\n );\n}\n\nexport function sanitizeHtml(html: string): string {\n // Try native Sanitizer API first \u2014 EXCEPT when the config places a\n // syntro-* element: the native API's default config strips unknown custom\n // elements and takes explicit allow-lists only, so the pattern-based\n // family rule must run through the fallback walker below.\n const hasNative =\n typeof (window as any).Sanitizer === 'function' && !CONTAINS_SYNTRO_ELEMENT_RE.test(html);\n if (hasNative) {\n try {\n const s = new (window as any).Sanitizer({});\n const frag = s.sanitizeToFragment(html);\n const div = document.createElement('div');\n div.append(frag);\n return div.innerHTML;\n } catch {\n // Fall through to manual sanitizer\n }\n }\n\n // Conservative fallback sanitizer\n const tpl = document.createElement('template');\n tpl.innerHTML = html;\n const root = tpl.content;\n const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, null);\n const toRemove: Element[] = [];\n\n while (walker.nextNode()) {\n const el = walker.currentNode as Element;\n const tag = el.tagName.toLowerCase();\n\n if (!isAllowedTag(tag)) {\n toRemove.push(el);\n continue;\n }\n\n // Remove dangerous attributes\n for (const attr of Array.from(el.attributes)) {\n const name = attr.name.toLowerCase();\n const isEvent = name.startsWith('on');\n\n if (isEvent || isDangerousUrlAttr(name, attr.value)) {\n el.removeAttribute(attr.name);\n }\n }\n }\n\n // Strip SVG elements that contained script children (XSS vector)\n const svgs = Array.from(root.querySelectorAll('svg'));\n for (const svg of svgs) {\n if (toRemove.some((el) => svg.contains(el) && el.tagName.toLowerCase() === 'script')) {\n toRemove.push(svg);\n }\n }\n\n // Remove disallowed elements but keep their children\n for (const el of toRemove) {\n while (el.firstChild) {\n el.parentNode?.insertBefore(el.firstChild, el);\n }\n el.remove();\n }\n\n return tpl.innerHTML;\n}\n", "/**\n * Adaptive Content - Runtime Module\n *\n * DOM manipulation actions: insertHtml, setText, setAttr, addClass, removeClass, setStyle.\n * These follow the hostPatcher snapshot pattern for safe reversibility.\n */\n\nimport { guardAgainstReconciliation } from './reconciliation-guard';\nimport { sanitizeHtml } from './sanitizer';\nimport type {\n ActionExecutor,\n AddClassAction,\n ExecutorResult,\n HideBySelectorAction,\n InsertHtmlAction,\n RemoveClassAction,\n SetAttrAction,\n SetStyleAction,\n SetTextAction,\n} from './types';\n\n// ============================================================================\n// Executors\n// ============================================================================\n\n/**\n * Execute an insertHtml action\n */\nexport const executeInsertHtml: ActionExecutor<InsertHtmlAction> = async (\n action,\n context\n): Promise<ExecutorResult> => {\n let anchorEl = context.resolveAnchor(action.anchorId);\n if (!anchorEl && context.waitForAnchor) {\n anchorEl = await context.waitForAnchor(action.anchorId, 3000);\n }\n if (!anchorEl) {\n console.warn(`[adaptive-content] Anchor not found after waiting: ${action.anchorId.selector}`);\n return { cleanup: () => {} };\n }\n\n // Sanitize HTML content using context utility\n const sanitizedHtml = sanitizeHtml(action.html);\n\n // Dedup: if a container for this action already exists, remove it first.\n // Uses the action label as a stable identifier across re-applications.\n // Check both inside the anchor (prepend/append) and in the parent (before/after).\n const dedupAttr = 'data-syntro-insert-label';\n const label = action.label;\n if (label) {\n const searchRoot = anchorEl.parentElement ?? anchorEl;\n const existing = Array.from(searchRoot.querySelectorAll(`[${dedupAttr}]`)).find(\n (candidate) => candidate.getAttribute(dedupAttr) === label\n );\n if (existing) existing.remove();\n }\n\n // Create container for inserted content\n const container = document.createElement('div');\n container.setAttribute('data-syntro-action-id', context.generateId());\n if (label) container.setAttribute(dedupAttr, label);\n container.innerHTML = sanitizedHtml;\n\n // Keep track of original state for replace position\n let originalContent: string | null = null;\n\n switch (action.position) {\n case 'before':\n anchorEl.insertAdjacentElement('beforebegin', container);\n break;\n case 'after':\n anchorEl.insertAdjacentElement('afterend', container);\n break;\n case 'prepend':\n anchorEl.insertBefore(container, anchorEl.firstChild);\n break;\n case 'append':\n anchorEl.appendChild(container);\n break;\n case 'replace':\n originalContent = anchorEl.innerHTML;\n anchorEl.replaceWith(container);\n break;\n }\n\n // Deep-link click handler \u2014 opens canvas + publishes deep-link event\n let deepLinkHandler: (() => void) | null = null;\n if (action.deepLink) {\n const { tileId, itemId } = action.deepLink;\n deepLinkHandler = () => {\n const handle = (window as any).SynOS?.handle;\n if (handle) {\n handle.open();\n handle.runtime?.events?.publish('notification.deep_link', { tileId, itemId });\n }\n };\n container.style.cursor = 'pointer';\n container.addEventListener('click', deepLinkHandler);\n }\n\n context.publishEvent('action.applied', {\n id: context.generateId(),\n kind: 'content:insertHtml',\n anchorId: action.anchorId,\n position: action.position,\n });\n\n // Guard against React reconciliation removing our container.\n // The reinsert function re-applies the same insertion strategy.\n const reinsertFn = () => {\n switch (action.position) {\n case 'before':\n anchorEl.insertAdjacentElement('beforebegin', container);\n break;\n case 'after':\n anchorEl.insertAdjacentElement('afterend', container);\n break;\n case 'prepend':\n anchorEl.insertBefore(container, anchorEl.firstChild);\n break;\n case 'append':\n anchorEl.appendChild(container);\n break;\n case 'replace':\n // Cannot re-insert for replace \u2014 anchor was already replaced\n break;\n }\n };\n\n const guardCleanup = guardAgainstReconciliation(container, anchorEl, reinsertFn);\n\n return {\n cleanup: () => {\n if (deepLinkHandler) {\n container.removeEventListener('click', deepLinkHandler);\n }\n guardCleanup();\n // Skip DOM mutations if nodes are already detached (SPA navigation)\n if (!container.isConnected) return;\n try {\n if (action.position === 'replace' && originalContent !== null) {\n // Restore original element\n const restoredEl = document.createElement(anchorEl.tagName);\n restoredEl.innerHTML = originalContent;\n // Copy attributes\n Array.from(anchorEl.attributes).forEach((attr) => {\n restoredEl.setAttribute(attr.name, attr.value);\n });\n container.replaceWith(restoredEl);\n } else {\n container.remove();\n }\n } catch {\n // DOM nodes already removed by host framework \u2014 safe to ignore\n }\n },\n updateFn: (changes) => {\n if ('html' in changes && typeof changes.html === 'string') {\n container.innerHTML = sanitizeHtml(changes.html);\n }\n },\n };\n};\n\n/**\n * Walk the DOM to find the deepest descendant that uniquely carries\n * text content. Avoids destroying sibling elements (icons, images)\n * when setting text on a container like a button.\n */\nfunction findTextTarget(el: Element): Element {\n if (el.children.length === 0) return el;\n const textChildren = Array.from(el.children).filter((child) => child.textContent?.trim());\n if (textChildren.length === 1) {\n const child = textChildren[0];\n if (child.textContent?.trim() === el.textContent?.trim()) {\n return findTextTarget(child);\n }\n }\n return el;\n}\n\n/**\n * Execute a setText action\n */\nexport const executeSetText: ActionExecutor<SetTextAction> = async (\n action,\n context\n): Promise<ExecutorResult> => {\n let anchorEl = context.resolveAnchor(action.anchorId);\n if (!anchorEl && context.waitForAnchor) {\n anchorEl = await context.waitForAnchor(action.anchorId, 3000);\n }\n if (!anchorEl) {\n console.warn(`[adaptive-content] Anchor not found after waiting: ${action.anchorId.selector}`);\n return { cleanup: () => {} };\n }\n\n const textTarget = findTextTarget(anchorEl);\n\n // Snapshot original text\n const originalText = textTarget.textContent ?? '';\n\n // Set new text\n textTarget.textContent = action.text;\n\n context.publishEvent('action.applied', {\n id: context.generateId(),\n kind: 'content:setText',\n anchorId: action.anchorId,\n });\n\n return {\n cleanup: () => {\n if (!anchorEl.isConnected) return;\n textTarget.textContent = originalText;\n },\n updateFn: (changes) => {\n if ('text' in changes && typeof changes.text === 'string') {\n textTarget.textContent = changes.text;\n }\n },\n };\n};\n\n/**\n * Execute a setAttr action\n */\nexport const executeSetAttr: ActionExecutor<SetAttrAction> = async (\n action,\n context\n): Promise<ExecutorResult> => {\n let anchorEl = context.resolveAnchor(action.anchorId);\n if (!anchorEl && context.waitForAnchor) {\n anchorEl = await context.waitForAnchor(action.anchorId, 3000);\n }\n if (!anchorEl) {\n console.warn(`[adaptive-content] Anchor not found after waiting: ${action.anchorId.selector}`);\n return { cleanup: () => {} };\n }\n\n // Block dangerous attributes (case-insensitive)\n const lowerAttr = action.attr.toLowerCase();\n if (lowerAttr.startsWith('on')) {\n throw new Error(`Dangerous attribute not allowed: ${action.attr}`);\n }\n\n // Block dangerous URIs in URL-bearing attributes\n const isUrlAttr = lowerAttr === 'href' || lowerAttr === 'src' || lowerAttr === 'formaction';\n if (isUrlAttr) {\n const lowerValue = action.value.trim().toLowerCase();\n if (\n lowerValue.startsWith('javascript:') ||\n lowerValue.startsWith('vbscript:') ||\n lowerValue.startsWith('data:text/html')\n ) {\n throw new Error(`Dangerous URL not allowed in ${action.attr}: ${action.value}`);\n }\n }\n\n // Snapshot original attribute value\n const originalValue = anchorEl.getAttribute(action.attr);\n const hadAttribute = anchorEl.hasAttribute(action.attr);\n\n // Set new attribute\n anchorEl.setAttribute(action.attr, action.value);\n\n context.publishEvent('action.applied', {\n id: context.generateId(),\n kind: 'content:setAttr',\n anchorId: action.anchorId,\n attr: action.attr,\n });\n\n return {\n cleanup: () => {\n if (!anchorEl.isConnected) return;\n if (hadAttribute && originalValue !== null) {\n anchorEl.setAttribute(action.attr, originalValue);\n } else {\n anchorEl.removeAttribute(action.attr);\n }\n },\n updateFn: (changes) => {\n if ('value' in changes && typeof changes.value === 'string') {\n anchorEl.setAttribute(action.attr, changes.value);\n }\n },\n };\n};\n\n/**\n * Execute an addClass action\n */\nexport const executeAddClass: ActionExecutor<AddClassAction> = async (\n action,\n context\n): Promise<ExecutorResult> => {\n let anchorEl = context.resolveAnchor(action.anchorId);\n if (!anchorEl && context.waitForAnchor) {\n anchorEl = await context.waitForAnchor(action.anchorId, 3000);\n }\n if (!anchorEl) {\n console.warn(`[adaptive-content] Anchor not found after waiting: ${action.anchorId.selector}`);\n return { cleanup: () => {} };\n }\n\n // Check if class was already present\n const hadClass = anchorEl.classList.contains(action.className);\n\n // Add class\n anchorEl.classList.add(action.className);\n\n context.publishEvent('action.applied', {\n id: context.generateId(),\n kind: 'content:addClass',\n anchorId: action.anchorId,\n className: action.className,\n });\n\n return {\n cleanup: () => {\n if (!anchorEl.isConnected) return;\n // Only remove if we added it\n if (!hadClass) {\n anchorEl.classList.remove(action.className);\n }\n },\n };\n};\n\n/**\n * Execute a removeClass action\n */\nexport const executeRemoveClass: ActionExecutor<RemoveClassAction> = async (\n action,\n context\n): Promise<ExecutorResult> => {\n let anchorEl = context.resolveAnchor(action.anchorId);\n if (!anchorEl && context.waitForAnchor) {\n anchorEl = await context.waitForAnchor(action.anchorId, 3000);\n }\n if (!anchorEl) {\n console.warn(`[adaptive-content] Anchor not found after waiting: ${action.anchorId.selector}`);\n return { cleanup: () => {} };\n }\n\n // Check if class was present\n const hadClass = anchorEl.classList.contains(action.className);\n\n // Remove class\n anchorEl.classList.remove(action.className);\n\n context.publishEvent('action.applied', {\n id: context.generateId(),\n kind: 'content:removeClass',\n anchorId: action.anchorId,\n className: action.className,\n });\n\n return {\n cleanup: () => {\n if (!anchorEl.isConnected) return;\n // Only re-add if we removed it\n if (hadClass) {\n anchorEl.classList.add(action.className);\n }\n },\n };\n};\n\n/**\n * Execute a setStyle action\n */\nexport const executeSetStyle: ActionExecutor<SetStyleAction> = async (\n action,\n context\n): Promise<ExecutorResult> => {\n let anchorEl = context.resolveAnchor(action.anchorId);\n if (!anchorEl && context.waitForAnchor) {\n anchorEl = await context.waitForAnchor(action.anchorId, 3000);\n }\n if (!anchorEl) {\n console.warn(`[adaptive-content] Anchor not found after waiting: ${action.anchorId.selector}`);\n return { cleanup: () => {} };\n }\n\n // Snapshot original styles\n const originalStyles = new Map<string, string>();\n for (const prop of Object.keys(action.styles)) {\n const current = (anchorEl as HTMLElement).style.getPropertyValue(prop);\n originalStyles.set(prop, current);\n }\n\n // Apply new styles\n //\n // setProperty() silently no-ops on invalid CSS property names (camelCase keys\n // like `justifyContent`, typos, etc). Validation rejects these at config-load\n // time, but in case a malformed config slips through we read back the value\n // and warn so the failure isn't invisible. (BUG-1779388834)\n for (const [prop, value] of Object.entries(action.styles)) {\n const el = anchorEl as HTMLElement;\n el.style.setProperty(prop, value);\n if (value !== '' && el.style.getPropertyValue(prop) === '') {\n console.warn(\n `[adaptive-content] setStyle: '${prop}: ${value}' was silently dropped \u2014 ` +\n `'${prop}' is not a recognized CSS property. Use kebab-case (e.g. 'justify-content' not 'justifyContent').`\n );\n }\n }\n\n context.publishEvent('action.applied', {\n id: context.generateId(),\n kind: 'content:setStyle',\n anchorId: action.anchorId,\n styles: Object.keys(action.styles),\n });\n\n return {\n cleanup: () => {\n if (!anchorEl.isConnected) return;\n // Restore original styles\n for (const [prop, originalValue] of originalStyles) {\n if (originalValue) {\n (anchorEl as HTMLElement).style.setProperty(prop, originalValue);\n } else {\n (anchorEl as HTMLElement).style.removeProperty(prop);\n }\n }\n },\n updateFn: (changes) => {\n if ('styles' in changes && typeof changes.styles === 'object' && changes.styles) {\n for (const [prop, value] of Object.entries(changes.styles as Record<string, string>)) {\n (anchorEl as HTMLElement).style.setProperty(prop, value);\n }\n }\n },\n };\n};\n\n// Characters that let a selector/style value break out of the single CSS\n// rule this executor writes as raw text into a live <style> element. The\n// authoring-time Zod schema (HideBySelectorZ in runtime-sdk's\n// actions/schema.ts) already rejects these \u2014 this is a second,\n// independent guard at the actual injection sink, so a config that\n// somehow bypasses schema validation (saved before that fix shipped, a\n// hand-crafted API call, a future authoring path that forgets to\n// validate) still can't splice arbitrary attacker-controlled CSS into the\n// host page's <head> (defacement, CSS-based data exfiltration via\n// attribute selectors, clickjacking overlays).\nconst CSS_BREAKOUT_CHARS = /[{}]|\\/\\*/;\n\nfunction hasCssBreakout(selector: string, styles: Record<string, string>): boolean {\n if (CSS_BREAKOUT_CHARS.test(selector)) return true;\n return Object.values(styles).some((value) => CSS_BREAKOUT_CHARS.test(value));\n}\n\n/**\n * Execute a hideBySelector action.\n *\n * Injects `selector { prop: value !important; ... }` into a dedicated\n * `<style>` element instead of resolving a live anchor and mutating its\n * inline style. This is the stylesheet-rule counterpart to executeSetStyle:\n * use it when the target may not exist in the DOM yet, may never appear in\n * some sessions, or gets torn down and re-inserted by the host page (chat\n * widgets, cookie banners, etc). A CSS rule matches those future insertions\n * for free \u2014 no polling, no MutationObserver, and critically, no\n * anchor-not-found wait blocking anything downstream (BUG-1786758064: a\n * `content:setStyle` suppression action retrying a `.crisp-client` anchor\n * that never appeared held up canvas render for ~20s).\n *\n * `!important` is required (unlike inline styles, which always win via\n * specificity) because a stylesheet rule competes with the host page's own\n * CSS on normal specificity/source-order terms.\n *\n * `!important` alone is not enough (BUG-1789078665): a vendor stylesheet\n * loaded AFTER ours with the same selector and its own `!important` \u2014\n * Crisp's `.crisp-client{display:block!important}`, arriving 8s+ after\n * boot on a WP-Rocket \"delay JavaScript\" host \u2014 ties on specificity and\n * importance, and the later source order wins. The rule is therefore\n * written as `:is(<selector>):not(#syntro-hide-by-selector)`: `:is()`\n * keeps a selector list intact, `:not(#\u2026)` adds id-level specificity, so\n * no class/attribute rule can out-rank it whenever it loads.\n */\nconst HIDE_BY_SELECTOR_RULE_ID = 'syntro-hide-by-selector';\n\nfunction hideBySelectorRule(selector: string, styles: Record<string, string>): string {\n const declarations = Object.entries(styles)\n .map(([prop, value]) => `${prop}: ${value} !important;`)\n .join(' ');\n return `:is(${selector}):not(#${HIDE_BY_SELECTOR_RULE_ID}) { ${declarations} }`;\n}\n\nexport const executeHideBySelector: ActionExecutor<HideBySelectorAction> = async (\n action,\n context\n): Promise<ExecutorResult> => {\n // Same route-scoping every other content action gets via resolveAnchor \u2014\n // just without the DOM resolution/waiting that comes bundled with it.\n // Executors invoked outside the full ActionEngine (tests, custom shells)\n // won't have this on context; default to \"matches\" rather than silently\n // no-op-ing the action.\n if (context.matchesAnchorRoute && !context.matchesAnchorRoute(action.anchorId)) {\n return { cleanup: () => {} };\n }\n\n if (hasCssBreakout(action.anchorId.selector, action.styles)) {\n console.error(\n '[adaptive-content] Refusing to inject content:hideBySelector rule \u2014 selector or ' +\n 'style value contains \"{\", \"}\", or \"/*\" (CSS rule breakout). This should have been ' +\n 'rejected by the authoring-time schema (HideBySelectorZ); refusing at the injection ' +\n 'sink as a second guard.',\n action.anchorId.selector,\n action.styles\n );\n return { cleanup: () => {} };\n }\n\n const styleEl = document.createElement('style');\n styleEl.setAttribute('data-syntro-action-id', context.generateId());\n styleEl.textContent = hideBySelectorRule(action.anchorId.selector, action.styles);\n document.head.appendChild(styleEl);\n\n context.publishEvent('action.applied', {\n id: context.generateId(),\n kind: 'content:hideBySelector',\n anchorId: action.anchorId,\n styles: Object.keys(action.styles),\n });\n\n return {\n cleanup: () => {\n styleEl.remove();\n },\n updateFn: (changes) => {\n if ('styles' in changes && typeof changes.styles === 'object' && changes.styles) {\n const newStyles = changes.styles as Record<string, string>;\n if (hasCssBreakout(action.anchorId.selector, newStyles)) {\n console.error(\n '[adaptive-content] Refusing to update content:hideBySelector rule \u2014 updated ' +\n 'style value contains \"{\", \"}\", or \"/*\" (CSS rule breakout).',\n newStyles\n );\n return;\n }\n styleEl.textContent = hideBySelectorRule(action.anchorId.selector, newStyles);\n }\n },\n };\n};\n\n// ============================================================================\n// Executor Definitions for Registration\n// ============================================================================\n\n/**\n * All executors provided by this app.\n * These are registered with the runtime's ExecutorRegistry.\n */\nexport const executors = [\n { kind: 'content:insertHtml', executor: executeInsertHtml },\n { kind: 'content:setText', executor: executeSetText },\n { kind: 'content:setAttr', executor: executeSetAttr },\n { kind: 'content:addClass', executor: executeAddClass },\n { kind: 'content:removeClass', executor: executeRemoveClass },\n { kind: 'content:setStyle', executor: executeSetStyle },\n { kind: 'content:hideBySelector', executor: executeHideBySelector },\n] as const;\n\n/**\n * App runtime manifest.\n */\nexport const runtime = {\n id: 'adaptive-content',\n version: '1.0.0',\n name: 'Content',\n description: 'DOM manipulation for text, attributes, and styles',\n executors,\n};\n"],
5
+ "mappings": ";;;AA6BO,SAAS,2BACd,WACA,QACA,YACA,MACY;AACZ,QAAM,aAAa,MAAM,cAAc;AACvC,QAAM,aAAa,MAAM,cAAc;AAGvC,QAAM,gBAAgB,UAAU,iBAAiB,OAAO;AACxD,MAAI,CAAC,cAAe,QAAO,MAAM;AAAA,EAAC;AAElC,MAAI,UAAU;AACd,MAAI,gBAAsD;AAC1D,MAAI,eAAe;AAEnB,QAAM,WAAW,IAAI,iBAAiB,CAAC,cAAc;AACnD,QAAI,aAAc;AAElB,eAAW,YAAY,WAAW;AAChC,iBAAW,WAAW,SAAS,cAAc;AAE3C,YAAI,YAAY,UAAW;AAE3B,YAAI,WAAW,YAAY;AACzB,mBAAS,WAAW;AACpB,yBAAe;AACf;AAAA,QACF;AAGA,YAAI,cAAe,cAAa,aAAa;AAC7C,wBAAgB,WAAW,MAAM;AAC/B,cAAI,aAAc;AAIlB,cAAI,CAAC,OAAO,aAAa;AACvB,qBAAS,WAAW;AACpB,2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C5D,EAAE,MAAM,oBAAoB,UAAU,gBAAgB;AAAA,EACtD,EAAE,MAAM,0BAA0B,UAAU,sBAAsB;AACpE;AAKO,IAAM,UAAU;AAAA,EACrB,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AAAA,EACb;AACF;",
6
+ "names": []
7
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../src/sanitizer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiCH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkEjD"}
1
+ {"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../src/sanitizer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkEH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA+DjD"}
package/dist/schema.d.ts CHANGED
@@ -13,7 +13,7 @@ export declare const configSchema: z.ZodObject<{
13
13
  textReplacements: z.ZodOptional<z.ZodArray<z.ZodObject<{
14
14
  anchorId: z.ZodObject<{
15
15
  selector: z.ZodString;
16
- route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
16
+ route: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
17
17
  }, "strict", z.ZodTypeAny, {
18
18
  selector: string;
19
19
  route: string | string[];
@@ -42,7 +42,7 @@ export declare const configSchema: z.ZodObject<{
42
42
  attributeChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
43
43
  anchorId: z.ZodObject<{
44
44
  selector: z.ZodString;
45
- route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
45
+ route: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
46
46
  }, "strict", z.ZodTypeAny, {
47
47
  selector: string;
48
48
  route: string | string[];
@@ -59,22 +59,22 @@ export declare const configSchema: z.ZodObject<{
59
59
  selector: string;
60
60
  route: string | string[];
61
61
  };
62
- value: string;
63
62
  attr: string;
63
+ value: string;
64
64
  }, {
65
65
  summary: string;
66
66
  anchorId: {
67
67
  selector: string;
68
68
  route: string | string[];
69
69
  };
70
- value: string;
71
70
  attr: string;
71
+ value: string;
72
72
  }>, "many">>;
73
73
  /** Style modifications */
74
74
  styleChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
75
75
  anchorId: z.ZodObject<{
76
76
  selector: z.ZodString;
77
- route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
77
+ route: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
78
78
  }, "strict", z.ZodTypeAny, {
79
79
  selector: string;
80
80
  route: string | string[];
@@ -103,7 +103,7 @@ export declare const configSchema: z.ZodObject<{
103
103
  htmlInsertions: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
104
  anchorId: z.ZodObject<{
105
105
  selector: z.ZodString;
106
- route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
106
+ route: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
107
107
  }, "strict", z.ZodTypeAny, {
108
108
  selector: string;
109
109
  route: string | string[];
@@ -114,28 +114,46 @@ export declare const configSchema: z.ZodObject<{
114
114
  summary: z.ZodString;
115
115
  html: z.ZodString;
116
116
  position: z.ZodEnum<["before", "after", "prepend", "append", "replace"]>;
117
+ deepLink: z.ZodOptional<z.ZodObject<{
118
+ tileId: z.ZodString;
119
+ itemId: z.ZodOptional<z.ZodString>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ tileId: string;
122
+ itemId?: string | undefined;
123
+ }, {
124
+ tileId: string;
125
+ itemId?: string | undefined;
126
+ }>>;
117
127
  }, "strip", z.ZodTypeAny, {
118
128
  html: string;
119
129
  summary: string;
120
- position: "replace" | "before" | "after" | "prepend" | "append";
121
130
  anchorId: {
122
131
  selector: string;
123
132
  route: string | string[];
124
133
  };
134
+ position: "before" | "after" | "prepend" | "append" | "replace";
135
+ deepLink?: {
136
+ tileId: string;
137
+ itemId?: string | undefined;
138
+ } | undefined;
125
139
  }, {
126
140
  html: string;
127
141
  summary: string;
128
- position: "replace" | "before" | "after" | "prepend" | "append";
129
142
  anchorId: {
130
143
  selector: string;
131
144
  route: string | string[];
132
145
  };
146
+ position: "before" | "after" | "prepend" | "append" | "replace";
147
+ deepLink?: {
148
+ tileId: string;
149
+ itemId?: string | undefined;
150
+ } | undefined;
133
151
  }>, "many">>;
134
152
  /** Class additions */
135
153
  classAdditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
136
154
  anchorId: z.ZodObject<{
137
155
  selector: z.ZodString;
138
- route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
156
+ route: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
139
157
  }, "strict", z.ZodTypeAny, {
140
158
  selector: string;
141
159
  route: string | string[];
@@ -147,24 +165,24 @@ export declare const configSchema: z.ZodObject<{
147
165
  className: z.ZodString;
148
166
  }, "strip", z.ZodTypeAny, {
149
167
  summary: string;
150
- className: string;
151
168
  anchorId: {
152
169
  selector: string;
153
170
  route: string | string[];
154
171
  };
172
+ className: string;
155
173
  }, {
156
174
  summary: string;
157
- className: string;
158
175
  anchorId: {
159
176
  selector: string;
160
177
  route: string | string[];
161
178
  };
179
+ className: string;
162
180
  }>, "many">>;
163
181
  /** Class removals */
164
182
  classRemovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
165
183
  anchorId: z.ZodObject<{
166
184
  selector: z.ZodString;
167
- route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
185
+ route: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
168
186
  }, "strict", z.ZodTypeAny, {
169
187
  selector: string;
170
188
  route: string | string[];
@@ -176,18 +194,18 @@ export declare const configSchema: z.ZodObject<{
176
194
  className: z.ZodString;
177
195
  }, "strip", z.ZodTypeAny, {
178
196
  summary: string;
179
- className: string;
180
197
  anchorId: {
181
198
  selector: string;
182
199
  route: string | string[];
183
200
  };
201
+ className: string;
184
202
  }, {
185
203
  summary: string;
186
- className: string;
187
204
  anchorId: {
188
205
  selector: string;
189
206
  route: string | string[];
190
207
  };
208
+ className: string;
191
209
  }>, "many">>;
192
210
  }, "strip", z.ZodTypeAny, {
193
211
  textReplacements?: {
@@ -204,8 +222,8 @@ export declare const configSchema: z.ZodObject<{
204
222
  selector: string;
205
223
  route: string | string[];
206
224
  };
207
- value: string;
208
225
  attr: string;
226
+ value: string;
209
227
  }[] | undefined;
210
228
  styleChanges?: {
211
229
  summary: string;
@@ -218,27 +236,31 @@ export declare const configSchema: z.ZodObject<{
218
236
  htmlInsertions?: {
219
237
  html: string;
220
238
  summary: string;
221
- position: "replace" | "before" | "after" | "prepend" | "append";
222
239
  anchorId: {
223
240
  selector: string;
224
241
  route: string | string[];
225
242
  };
243
+ position: "before" | "after" | "prepend" | "append" | "replace";
244
+ deepLink?: {
245
+ tileId: string;
246
+ itemId?: string | undefined;
247
+ } | undefined;
226
248
  }[] | undefined;
227
249
  classAdditions?: {
228
250
  summary: string;
229
- className: string;
230
251
  anchorId: {
231
252
  selector: string;
232
253
  route: string | string[];
233
254
  };
255
+ className: string;
234
256
  }[] | undefined;
235
257
  classRemovals?: {
236
258
  summary: string;
237
- className: string;
238
259
  anchorId: {
239
260
  selector: string;
240
261
  route: string | string[];
241
262
  };
263
+ className: string;
242
264
  }[] | undefined;
243
265
  }, {
244
266
  textReplacements?: {
@@ -255,8 +277,8 @@ export declare const configSchema: z.ZodObject<{
255
277
  selector: string;
256
278
  route: string | string[];
257
279
  };
258
- value: string;
259
280
  attr: string;
281
+ value: string;
260
282
  }[] | undefined;
261
283
  styleChanges?: {
262
284
  summary: string;
@@ -269,28 +291,46 @@ export declare const configSchema: z.ZodObject<{
269
291
  htmlInsertions?: {
270
292
  html: string;
271
293
  summary: string;
272
- position: "replace" | "before" | "after" | "prepend" | "append";
273
294
  anchorId: {
274
295
  selector: string;
275
296
  route: string | string[];
276
297
  };
298
+ position: "before" | "after" | "prepend" | "append" | "replace";
299
+ deepLink?: {
300
+ tileId: string;
301
+ itemId?: string | undefined;
302
+ } | undefined;
277
303
  }[] | undefined;
278
304
  classAdditions?: {
279
305
  summary: string;
280
- className: string;
281
306
  anchorId: {
282
307
  selector: string;
283
308
  route: string | string[];
284
309
  };
310
+ className: string;
285
311
  }[] | undefined;
286
312
  classRemovals?: {
287
313
  summary: string;
288
- className: string;
289
314
  anchorId: {
290
315
  selector: string;
291
316
  route: string | string[];
292
317
  };
318
+ className: string;
293
319
  }[] | undefined;
294
320
  }>;
295
321
  export type ContentConfig = z.infer<typeof configSchema>;
322
+ export declare const CAPABILITIES_DOCUMENTATION: {
323
+ packageId: string;
324
+ plannerSummary: string;
325
+ description: string;
326
+ whenToUse: {
327
+ goal: string;
328
+ action: string;
329
+ }[];
330
+ conventions: {
331
+ name: string;
332
+ description: string;
333
+ }[];
334
+ events: never[];
335
+ };
296
336
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWxB,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAY9B,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAW1B,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYtB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;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