@spotpatch/runtime 1.11.0 → 1.13.0

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 (45) hide show
  1. package/dist/{chunk-QY5T4DPA.js → chunk-2WA6XVA4.js} +13 -6
  2. package/dist/chunk-2WA6XVA4.js.map +1 -0
  3. package/dist/{chunk-BXRMVHNT.js → chunk-ASRUAKA5.js} +1 -1
  4. package/dist/chunk-ASRUAKA5.js.map +1 -0
  5. package/dist/{chunk-7ES63LA7.js → chunk-P6X75LO5.js} +11 -1
  6. package/dist/chunk-P6X75LO5.js.map +1 -0
  7. package/dist/chunk-P7W3F4UA.js +115 -0
  8. package/dist/chunk-P7W3F4UA.js.map +1 -0
  9. package/dist/chunk-RZDOL5BT.js +1 -0
  10. package/dist/chunk-RZDOL5BT.js.map +1 -0
  11. package/dist/data-flow-panel.cjs +171 -0
  12. package/dist/data-flow-panel.cjs.map +1 -1
  13. package/dist/data-flow-panel.d.cts +4 -2
  14. package/dist/data-flow-panel.d.ts +4 -2
  15. package/dist/data-flow-panel.js +27 -1
  16. package/dist/data-flow-panel.js.map +1 -1
  17. package/dist/{data-flow-runtime-B3itbieT.d.cts → data-flow-runtime-DMmV0d3E.d.cts} +7 -3
  18. package/dist/{data-flow-runtime-B3itbieT.d.ts → data-flow-runtime-DMmV0d3E.d.ts} +7 -3
  19. package/dist/data-flow.cjs +12 -5
  20. package/dist/data-flow.cjs.map +1 -1
  21. package/dist/data-flow.d.cts +1 -1
  22. package/dist/data-flow.d.ts +1 -1
  23. package/dist/data-flow.js +2 -1
  24. package/dist/external-handoff-panel.cjs +29 -9
  25. package/dist/external-handoff-panel.cjs.map +1 -1
  26. package/dist/external-handoff-panel.d.cts +3 -3
  27. package/dist/external-handoff-panel.d.ts +3 -3
  28. package/dist/external-handoff-panel.js +22 -11
  29. package/dist/external-handoff-panel.js.map +1 -1
  30. package/dist/index.cjs +1204 -279
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +1164 -355
  35. package/dist/index.js.map +1 -1
  36. package/dist/motion.cjs +1251 -0
  37. package/dist/motion.cjs.map +1 -0
  38. package/dist/motion.d.cts +79 -0
  39. package/dist/motion.d.ts +79 -0
  40. package/dist/motion.js +1092 -0
  41. package/dist/motion.js.map +1 -0
  42. package/package.json +19 -4
  43. package/dist/chunk-7ES63LA7.js.map +0 -1
  44. package/dist/chunk-BXRMVHNT.js.map +0 -1
  45. package/dist/chunk-QY5T4DPA.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/motion-entry.ts","../src/ui/motion-controller.ts","../src/ui/ui-constants.ts","../src/ui/dom.ts","../src/ui/brand-mark-content.ts","../src/ui/brand-mark.ts","../src/ui/execution-island.ts","../src/ui/motion-extension-contract.ts"],"sourcesContent":["import {\n createFloatingSurfaceMotionController,\n createFloatingSurfaceMotionStyles,\n} from \"./ui/motion-controller.js\";\nimport { createExecutionIsland } from \"./ui/execution-island.js\";\nimport {\n registerFloatingSurfaceMotionExtension,\n type FloatingSurfaceMotionExtension,\n} from \"./ui/motion-extension-contract.js\";\n\nconst FLOATING_SURFACE_MOTION_EXTENSION = Object.freeze({\n createExecutionIsland,\n createController: createFloatingSurfaceMotionController,\n createStyles: createFloatingSurfaceMotionStyles,\n}) satisfies FloatingSurfaceMotionExtension;\n\nexport function installFloatingSurfaceMotionExtension(): void {\n registerFloatingSurfaceMotionExtension(FLOATING_SURFACE_MOTION_EXTENSION);\n}\n\nexport {\n createExecutionIsland,\n createFloatingSurfaceMotionController,\n createFloatingSurfaceMotionStyles,\n};\nexport {\n getFloatingSurfaceMotionExtension,\n registerFloatingSurfaceMotionExtension,\n type FloatingSurfaceMotionController,\n type FloatingSurfaceMotionElements,\n type FloatingSurfaceMotionExtension,\n type FloatingSurfaceProjection,\n type FloatingSurfaceScene,\n type FloatingSurfaceTone,\n type MotionExecutionIsland,\n} from \"./ui/motion-extension-contract.js\";\n","import { gsap } from \"gsap\";\n\nimport type {\n FloatingSurfaceMotionController,\n FloatingSurfaceMotionElements,\n FloatingSurfaceProjection,\n} from \"./motion-extension-contract.js\";\n\nconst MOTION = Object.freeze({\n contentMilliseconds: 220,\n detailRevealDelaySeconds: 0.1,\n detailRevealSeconds: 0.3,\n detailRetireSeconds: 0.15,\n dispatchSeconds: 0.54,\n expandSeconds: 0.54,\n morphSeconds: 0.48,\n pressSeconds: 0.12,\n revealSeconds: 0.26,\n sceneRevealDelaySeconds: 0.06,\n sweepSeconds: 0.68,\n targetFeedbackDelaySeconds: 0.08,\n targetFeedbackSeconds: 0.22,\n});\n\nconst ISLAND_SIZE = Object.freeze({\n checkingWidth: 440,\n compactHeight: 62,\n dispatchingWidth: 448,\n expandedHeight: 164,\n expandedWidth: 520,\n failedWidth: 440,\n receivingWidth: 430,\n runningWidth: 468,\n successWidth: 356,\n});\n\ninterface PendingProjection {\n readonly projection: FloatingSurfaceProjection;\n readonly renderContent: () => void;\n}\n\ninterface SurfaceGeometry {\n readonly borderRadius: string;\n readonly rect: DOMRect;\n}\n\ninterface ElementOffset {\n readonly x: number;\n readonly y: number;\n}\n\ninterface SurfaceLayout {\n readonly geometry: SurfaceGeometry;\n readonly sharedOffsets: ReadonlyMap<HTMLElement, ElementOffset>;\n}\n\ntype DetailTransition = \"collapse\" | \"expand\" | undefined;\n\ntype SurfaceLayer = \"execution\" | \"pill\" | \"planner\";\n\nfunction surfaceLayer(scene: FloatingSurfaceProjection[\"scene\"]): SurfaceLayer {\n if (scene === \"pill\" || scene === \"capturing\") return \"pill\";\n if (scene === \"planner\") return \"planner\";\n return \"execution\";\n}\n\nfunction setSceneVisibility(\n elements: FloatingSurfaceMotionElements,\n projection: FloatingSurfaceProjection,\n): HTMLElement {\n const pillActive = projection.scene === \"pill\" || projection.scene === \"capturing\";\n const plannerActive = projection.scene === \"planner\";\n const executionActive = !pillActive && !plannerActive;\n\n elements.pill.hidden = !pillActive;\n elements.pill.inert = !pillActive;\n elements.planner.hidden = !plannerActive;\n elements.planner.inert = !plannerActive;\n elements.planner.setAttribute(\"aria-hidden\", String(!plannerActive));\n elements.execution.root.hidden = !executionActive;\n elements.execution.root.inert = !executionActive;\n elements.execution.root.setAttribute(\"aria-hidden\", String(!executionActive));\n\n return pillActive\n ? elements.pill\n : plannerActive\n ? elements.planner\n : elements.execution.root;\n}\n\nfunction supportsMotion(document: Document): boolean {\n return (\n document.defaultView?.matchMedia(\"(prefers-reduced-motion: reduce)\").matches !==\n true\n );\n}\n\nfunction finiteRect(rect: DOMRect): boolean {\n return (\n Number.isFinite(rect.left) &&\n Number.isFinite(rect.top) &&\n rect.width > 0 &&\n rect.height > 0\n );\n}\n\nfunction geometryChanged(previous: DOMRect, next: DOMRect): boolean {\n return (\n Math.abs(previous.left - next.left) > 0.5 ||\n Math.abs(previous.top - next.top) > 0.5 ||\n Math.abs(previous.width - next.width) > 0.5 ||\n Math.abs(previous.height - next.height) > 0.5\n );\n}\n\nfunction visibleBorderRadius(value: string | undefined, rect: DOMRect): string {\n if (value === undefined || value.length === 0) return \"0px\";\n const radius = Number.parseFloat(value);\n if (!Number.isFinite(radius) || !finiteRect(rect)) return value;\n return `${String(Math.min(radius, rect.width / 2, rect.height / 2))}px`;\n}\n\nfunction compactIslandWidth(projection: FloatingSurfaceProjection): number {\n if (projection.scene === \"agent-charging\") return ISLAND_SIZE.receivingWidth;\n if (projection.scene === \"handoff\") return ISLAND_SIZE.dispatchingWidth;\n if (projection.scene === \"success\") return ISLAND_SIZE.successWidth;\n if (projection.scene === \"failed\") return ISLAND_SIZE.failedWidth;\n if (projection.scene === \"running\" && projection.activity?.kind === \"check\") {\n return ISLAND_SIZE.checkingWidth;\n }\n return ISLAND_SIZE.runningWidth;\n}\n\nexport function createFloatingSurfaceMotionStyles(\n document: Document,\n): HTMLStyleElement {\n const style = document.createElement(\"style\");\n style.textContent = `\n .spotpatch-floating-surface {\n --spotpatch-island-surface: #050608;\n --spotpatch-island-primary: #f7f7fb;\n --spotpatch-island-subtle: #5f646e;\n --spotpatch-island-line: rgb(255 255 255 / 10%);\n --spotpatch-island-violet: #8b67ff;\n --spotpatch-island-cyan: #4dc8ff;\n --spotpatch-island-mint: #59dcb6;\n --spotpatch-island-error: #ef6f88;\n --spotpatch-island-compact-height: ${String(ISLAND_SIZE.compactHeight)}px;\n --spotpatch-island-compact-width: ${String(ISLAND_SIZE.runningWidth)}px;\n --spotpatch-island-expanded-height: ${String(ISLAND_SIZE.expandedHeight)}px;\n --spotpatch-island-expanded-width: ${String(ISLAND_SIZE.expandedWidth)}px;\n --spotpatch-island-ease: cubic-bezier(.22, 1, .36, 1);\n position: fixed;\n box-sizing: border-box;\n color-scheme: dark;\n -webkit-font-smoothing: antialiased;\n overflow: hidden;\n border: 1px solid var(--spotpatch-island-line);\n background:\n linear-gradient(180deg, rgb(255 255 255 / 2.8%), transparent 24%),\n rgb(5 6 8 / 98.8%);\n box-shadow:\n 0 24px 60px rgb(13 17 28 / 18%),\n 0 3px 10px rgb(13 17 28 / 10%),\n inset 0 1px rgb(255 255 255 / 6.5%),\n inset 0 0 0 1px rgb(255 255 255 / 1.2%);\n transform-origin: 100% 100%;\n }\n .spotpatch-floating-surface::before {\n position: absolute;\n z-index: 0;\n inset: 0;\n background:\n radial-gradient(180px 70px at 0% 50%, rgb(139 103 255 / 7%), transparent 72%),\n radial-gradient(180px 70px at 100% 50%, rgb(77 200 255 / 4.5%), transparent 72%);\n content: \"\";\n opacity: 0;\n pointer-events: none;\n }\n .spotpatch-floating-surface[data-scene=\"pill\"],\n .spotpatch-floating-surface[data-scene=\"capturing\"] {\n width: max-content;\n border-radius: 999px;\n }\n .spotpatch-floating-surface[data-scene=\"planner\"] { border-radius: 18px; }\n .spotpatch-floating-surface[data-scene=\"agent-charging\"],\n .spotpatch-floating-surface[data-scene=\"handoff\"],\n .spotpatch-floating-surface[data-scene=\"running\"],\n .spotpatch-floating-surface[data-scene=\"success\"],\n .spotpatch-floating-surface[data-scene=\"failed\"] {\n width: min(var(--spotpatch-island-compact-width), calc(100vw - 32px));\n height: var(--spotpatch-island-compact-height);\n max-width: calc(100vw - 32px);\n border-radius: 31px;\n }\n .spotpatch-floating-surface[data-scene=\"agent-charging\"]::before,\n .spotpatch-floating-surface[data-scene=\"handoff\"]::before,\n .spotpatch-floating-surface[data-scene=\"running\"]::before,\n .spotpatch-floating-surface[data-scene=\"success\"]::before,\n .spotpatch-floating-surface[data-scene=\"failed\"]::before { opacity: .82; }\n .spotpatch-floating-surface:has(.spotpatch-execution-island[data-expanded=\"true\"]) {\n width: min(var(--spotpatch-island-expanded-width), calc(100vw - 32px));\n height: min(var(--spotpatch-island-expanded-height), calc(100vh - 32px));\n border-radius: 30px;\n }\n .spotpatch-floating-surface > .spotpatch-trigger,\n .spotpatch-floating-surface > .spotpatch-dialog,\n .spotpatch-floating-surface > .spotpatch-execution-island {\n position: relative;\n z-index: 1;\n }\n .spotpatch-floating-surface > .spotpatch-trigger {\n display: inline-flex;\n min-height: 44px;\n align-items: center;\n gap: 10px;\n border: 0;\n border-radius: 999px;\n padding: 10px 17px;\n color: #f8fafc;\n background: transparent;\n box-shadow: none;\n cursor: pointer;\n font-size: 14px;\n font-weight: 650;\n touch-action: none;\n user-select: none;\n }\n .spotpatch-trigger::before {\n width: 9px;\n height: 9px;\n border-radius: 999px;\n background: var(--spotpatch-accent);\n box-shadow: 0 0 0 4px rgb(99 102 241 / 10%);\n content: \"\";\n }\n .spotpatch-trigger:hover { transform: translateY(-1px); }\n .spotpatch-trigger[aria-pressed=\"true\"] { background: rgb(139 123 255 / 14%); }\n .spotpatch-trigger[aria-pressed=\"true\"]::before {\n animation: spotpatch-motion-pill-pulse 1.8s ease-in-out infinite;\n }\n .spotpatch-trigger[data-dragging=\"true\"] {\n cursor: grabbing;\n transform: scale(.98);\n }\n .spotpatch-floating-surface .spotpatch-dialog { filter: none; }\n .spotpatch-floating-surface .spotpatch-shell {\n border: 0;\n border-radius: 0;\n background: transparent;\n box-shadow: none;\n }\n .spotpatch-brand-name {\n color: #fff;\n font-size: 13.5px;\n font-weight: 680;\n letter-spacing: -.01em;\n }\n .spotpatch-brand-context {\n color: #8e98aa;\n font-size: 10.5px;\n font-weight: 560;\n letter-spacing: .02em;\n }\n .spotpatch-title {\n margin: 0;\n color: #fff;\n font-size: 18px;\n font-weight: 680;\n letter-spacing: -.015em;\n }\n .spotpatch-subtitle {\n max-width: 390px;\n margin: 4px 0 0;\n color: var(--spotpatch-text-secondary);\n font-size: 12.5px;\n line-height: 1.5;\n }\n .spotpatch-execution-island {\n position: relative;\n display: grid;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: center;\n gap: 12px;\n overflow: hidden;\n border: 0;\n border-radius: inherit;\n padding: 0 18px;\n color: var(--spotpatch-island-primary);\n background: transparent;\n cursor: pointer;\n text-align: left;\n touch-action: none;\n }\n .spotpatch-execution-island[data-expanded=\"true\"] {\n min-height: var(--spotpatch-island-expanded-height);\n grid-template-columns: auto minmax(0, 1fr) auto;\n grid-template-rows: auto 1fr;\n align-items: start;\n row-gap: 16px;\n border-radius: 30px;\n padding: 18px 20px 16px;\n }\n .spotpatch-execution-mark {\n display: grid;\n width: 23px;\n height: 23px;\n flex: none;\n place-items: center;\n }\n .spotpatch-execution-logo {\n width: 22px;\n height: 22px;\n overflow: visible;\n filter: drop-shadow(0 0 7px rgb(139 103 255 / 16%));\n }\n .spotpatch-execution-content {\n display: flex;\n min-width: 0;\n align-items: baseline;\n gap: 8px;\n }\n [data-expanded=\"true\"] .spotpatch-execution-content {\n display: grid;\n gap: 4px;\n }\n .spotpatch-execution-headline-wrap,\n .spotpatch-execution-action-wrap {\n position: relative;\n display: block;\n min-width: 0;\n }\n .spotpatch-execution-headline,\n .spotpatch-execution-headline-outgoing,\n .spotpatch-execution-action,\n .spotpatch-execution-action-outgoing {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .spotpatch-execution-headline,\n .spotpatch-execution-headline-outgoing {\n color: var(--spotpatch-island-primary);\n font-size: 15px;\n font-weight: 690;\n letter-spacing: -.018em;\n line-height: 1.35;\n }\n .spotpatch-execution-action,\n .spotpatch-execution-action-outgoing {\n color: #696f79;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.35;\n }\n .spotpatch-execution-headline-outgoing,\n .spotpatch-execution-action-outgoing {\n position: absolute;\n inset: 0;\n opacity: 0;\n pointer-events: none;\n }\n .spotpatch-execution-copy-changing .spotpatch-execution-headline,\n .spotpatch-execution-copy-changing .spotpatch-execution-action {\n animation: spotpatch-motion-copy-in ${String(MOTION.contentMilliseconds)}ms var(--spotpatch-island-ease) both;\n }\n .spotpatch-execution-copy-changing .spotpatch-execution-headline-outgoing,\n .spotpatch-execution-copy-changing .spotpatch-execution-action-outgoing {\n animation: spotpatch-motion-copy-out ${String(MOTION.contentMilliseconds)}ms ease-in both;\n }\n .spotpatch-execution-meta {\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n flex: none;\n color: #989da8;\n font-size: 11px;\n font-weight: 620;\n white-space: nowrap;\n }\n .spotpatch-execution-meta-dot {\n width: 6px;\n height: 6px;\n flex: none;\n border-radius: 50%;\n background: var(--spotpatch-island-violet);\n box-shadow: 0 0 8px rgb(139 103 255 / 38%);\n }\n [data-execution-scene=\"agent-charging\"] .spotpatch-execution-meta-dot,\n [data-execution-scene=\"handoff\"] .spotpatch-execution-meta-dot,\n [data-execution-scene=\"running\"] .spotpatch-execution-meta-dot {\n animation: spotpatch-motion-status-breathe 1.8s ease-in-out infinite;\n }\n .spotpatch-execution-meta[data-tone=\"success\"] .spotpatch-execution-meta-dot {\n background: var(--spotpatch-island-mint);\n box-shadow: 0 0 8px rgb(89 220 182 / 24%);\n }\n .spotpatch-execution-meta[data-tone=\"danger\"] .spotpatch-execution-meta-dot {\n background: var(--spotpatch-island-error);\n box-shadow: 0 0 8px rgb(239 111 136 / 22%);\n }\n .spotpatch-execution-timer {\n width: 34px;\n color: #737985;\n font: 400 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;\n text-align: right;\n }\n .spotpatch-execution-more {\n display: grid;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 0;\n background: transparent;\n color: #686e78;\n font-size: 15px;\n line-height: 1;\n place-items: center;\n }\n [data-expanded=\"true\"] .spotpatch-execution-meta-dot,\n [data-expanded=\"true\"] .spotpatch-execution-meta-label,\n [data-expanded=\"true\"] .spotpatch-execution-timer { display: none; }\n [data-expanded=\"true\"] .spotpatch-execution-more {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgb(255 255 255 / 4.5%);\n color: #828894;\n }\n .spotpatch-execution-recent {\n position: absolute;\n top: 62px;\n right: 20px;\n left: 20px;\n display: grid;\n margin-top: 0;\n }\n .spotpatch-execution-recent[hidden] { display: none; }\n .spotpatch-execution-recent-item {\n display: grid;\n min-height: 28px;\n grid-template-columns: 52px minmax(0, 1fr) auto;\n align-items: center;\n border-top: 1px solid rgb(255 255 255 / 5.5%);\n }\n .spotpatch-execution-recent-item:first-child { border-top: 0; }\n .spotpatch-execution-recent-kind {\n color: #666c76;\n font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;\n text-transform: uppercase;\n }\n .spotpatch-execution-recent-detail {\n overflow: hidden;\n color: #b2b6bf;\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .spotpatch-execution-recent-state {\n color: #626974;\n font: 500 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;\n }\n .spotpatch-execution-recent-item[data-state=\"active\"] .spotpatch-execution-recent-kind {\n color: var(--spotpatch-island-violet);\n }\n .spotpatch-execution-recent-item[data-state=\"active\"] .spotpatch-execution-recent-detail {\n color: #f2f3f7;\n }\n .spotpatch-execution-recent-item[data-state=\"failure\"] .spotpatch-execution-recent-kind {\n color: var(--spotpatch-island-error);\n }\n .spotpatch-island-sweep {\n position: absolute;\n z-index: 2;\n bottom: 0;\n left: 44px;\n width: 20%;\n height: 1px;\n border-radius: 999px;\n background: linear-gradient(90deg, transparent, var(--spotpatch-island-violet), var(--spotpatch-island-cyan), transparent);\n box-shadow: 0 0 7px rgb(139 103 255 / 18%);\n opacity: 0;\n pointer-events: none;\n transform: translate3d(-160%, 0, 0);\n }\n @keyframes spotpatch-motion-copy-in {\n from { opacity: 0; filter: blur(2px); transform: translate3d(0, 3px, 0); }\n to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0); }\n }\n @keyframes spotpatch-motion-copy-out {\n from { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0); }\n to { opacity: 0; filter: blur(2px); transform: translate3d(0, -3px, 0); }\n }\n @keyframes spotpatch-motion-status-breathe {\n 50% { opacity: .42; transform: scale(.82); }\n }\n @keyframes spotpatch-motion-pill-pulse {\n 50% { box-shadow: 0 0 0 6px rgb(99 102 241 / 5%); opacity: .72; }\n }\n .spotpatch-floating-surface[data-motion-paused=\"true\"] .spotpatch-execution-meta-dot,\n .spotpatch-floating-surface[data-motion-paused=\"true\"] .spotpatch-trigger::before {\n animation-play-state: paused;\n }\n @media (prefers-reduced-motion: reduce) {\n .spotpatch-trigger::before,\n .spotpatch-execution-meta-dot,\n .spotpatch-execution-headline,\n .spotpatch-execution-headline-outgoing,\n .spotpatch-execution-action,\n .spotpatch-execution-action-outgoing {\n animation: none !important;\n filter: none !important;\n transform: none !important;\n }\n .spotpatch-island-sweep { display: none; }\n }\n @media (max-width: 520px) {\n .spotpatch-execution-island {\n grid-template-columns: auto minmax(0, 1fr) auto;\n gap: 10px;\n padding-right: 14px;\n padding-left: 14px;\n }\n .spotpatch-execution-action-wrap { display: none; }\n .spotpatch-execution-recent-item { grid-template-columns: 48px minmax(0, 1fr); }\n .spotpatch-execution-recent-state { display: none; }\n }\n `;\n return style;\n}\n\nexport function createFloatingSurfaceMotionController(\n document: Document,\n elements: FloatingSurfaceMotionElements,\n reconcile: () => void,\n): FloatingSurfaceMotionController {\n let currentScene: FloatingSurfaceProjection[\"scene\"] | undefined;\n let currentActivityKey: string | undefined;\n let morphTimeline: gsap.core.Timeline | undefined;\n let dispatchTimeline: gsap.core.Timeline | undefined;\n let pendingProjection: PendingProjection | undefined;\n let dispatchSource: HTMLElement | undefined;\n let dispatchTarget: HTMLElement | undefined;\n let disposed = false;\n\n const handleVisibility = (): void => {\n elements.surface.dataset.motionPaused = String(document.hidden);\n };\n document.addEventListener(\"visibilitychange\", handleVisibility);\n handleVisibility();\n\n const morphElements = [\n elements.surface,\n elements.pill,\n elements.planner,\n elements.execution.root,\n elements.execution.mark,\n elements.execution.content,\n elements.execution.meta,\n elements.execution.recent,\n ];\n\n const sharedExecutionElements = [\n elements.execution.mark,\n elements.execution.content,\n elements.execution.meta,\n ];\n\n function captureSurfaceLayout(includeSharedOffsets = false): SurfaceLayout {\n const surfaceRect = elements.surface.getBoundingClientRect();\n const computedRadius = document.defaultView\n ?.getComputedStyle(elements.surface)\n .borderRadius.trim();\n\n const sharedOffsets = new Map<HTMLElement, ElementOffset>();\n if (includeSharedOffsets && finiteRect(surfaceRect)) {\n for (const element of sharedExecutionElements) {\n const elementRect = element.getBoundingClientRect();\n if (!finiteRect(elementRect)) continue;\n sharedOffsets.set(\n element,\n Object.freeze({\n x: elementRect.left - surfaceRect.left,\n y: elementRect.top - surfaceRect.top,\n }),\n );\n }\n }\n\n return Object.freeze({\n geometry: Object.freeze({\n borderRadius: visibleBorderRadius(computedRadius, surfaceRect),\n rect: surfaceRect,\n }),\n sharedOffsets,\n });\n }\n\n function syncRecentVisibility(): void {\n elements.execution.recent.hidden =\n elements.execution.root.dataset.expanded !== \"true\";\n }\n\n function clearMorphProperties(): void {\n gsap.set(morphElements, {\n clearProps:\n \"borderRadius,filter,height,opacity,transform,visibility,width,willChange\",\n });\n delete elements.surface.dataset.motionMorphing;\n syncRecentVisibility();\n }\n\n function clearMorph(): void {\n morphTimeline?.kill();\n morphTimeline = undefined;\n gsap.killTweensOf(morphElements);\n clearMorphProperties();\n }\n\n function interruptMorph(includeSharedOffsets = false): SurfaceLayout {\n morphTimeline?.kill();\n morphTimeline = undefined;\n gsap.killTweensOf(morphElements);\n const layout = captureSurfaceLayout(includeSharedOffsets);\n clearMorphProperties();\n return layout;\n }\n\n function clearDispatch(): void {\n dispatchTimeline?.kill();\n dispatchTimeline = undefined;\n if (dispatchSource !== undefined) {\n gsap.killTweensOf(dispatchSource);\n gsap.set(dispatchSource, { clearProps: \"filter,transform\" });\n dispatchSource = undefined;\n }\n if (dispatchTarget !== undefined) {\n gsap.killTweensOf(dispatchTarget);\n gsap.set(dispatchTarget, { clearProps: \"boxShadow\" });\n dispatchTarget = undefined;\n }\n elements.surface.dataset.agentCharging = \"false\";\n }\n\n function completeDispatch(): void {\n dispatchTimeline = undefined;\n if (dispatchSource !== undefined) {\n gsap.set(dispatchSource, { clearProps: \"filter,transform\" });\n dispatchSource = undefined;\n }\n if (dispatchTarget !== undefined) {\n gsap.set(dispatchTarget, { clearProps: \"boxShadow\" });\n dispatchTarget = undefined;\n }\n elements.surface.dataset.agentCharging = \"false\";\n }\n\n function sweepOnce(): void {\n if (!supportsMotion(document) || document.hidden) return;\n gsap.killTweensOf(elements.execution.sweep);\n gsap.fromTo(\n elements.execution.sweep,\n { autoAlpha: 0, xPercent: -160 },\n {\n autoAlpha: 0.72,\n xPercent: 620,\n duration: MOTION.sweepSeconds,\n ease: \"power2.inOut\",\n onComplete: () => {\n gsap.set(elements.execution.sweep, {\n clearProps: \"opacity,transform,visibility\",\n });\n },\n },\n );\n }\n\n function animateGeometry(\n previous: SurfaceLayout,\n next: SurfaceLayout,\n activeScene: HTMLElement,\n reveal: boolean,\n detailTransition?: DetailTransition,\n ): void {\n const geometryHasChanged =\n geometryChanged(previous.geometry.rect, next.geometry.rect) ||\n previous.geometry.borderRadius !== next.geometry.borderRadius;\n const sharedLayoutHasChanged = sharedExecutionElements.some((element) => {\n const previousOffset = previous.sharedOffsets.get(element);\n const nextOffset = next.sharedOffsets.get(element);\n return (\n previousOffset !== undefined &&\n nextOffset !== undefined &&\n (Math.abs(previousOffset.x - nextOffset.x) > 0.5 ||\n Math.abs(previousOffset.y - nextOffset.y) > 0.5)\n );\n });\n\n if (\n !supportsMotion(document) ||\n !finiteRect(previous.geometry.rect) ||\n !finiteRect(next.geometry.rect) ||\n (!geometryHasChanged && !sharedLayoutHasChanged && detailTransition === undefined)\n ) {\n clearMorphProperties();\n return;\n }\n\n const morphDuration =\n detailTransition === \"expand\" ? MOTION.expandSeconds : MOTION.morphSeconds;\n elements.surface.dataset.motionMorphing = \"true\";\n morphTimeline = gsap.timeline({\n defaults: { overwrite: \"auto\" },\n onComplete: () => {\n clearMorphProperties();\n reconcile();\n morphTimeline = undefined;\n },\n });\n\n if (geometryHasChanged) {\n morphTimeline.fromTo(\n elements.surface,\n {\n borderRadius: previous.geometry.borderRadius,\n height: previous.geometry.rect.height,\n width: previous.geometry.rect.width,\n x: previous.geometry.rect.left - next.geometry.rect.left,\n y: previous.geometry.rect.top - next.geometry.rect.top,\n willChange: \"width,height,transform\",\n },\n {\n borderRadius: next.geometry.borderRadius,\n height: next.geometry.rect.height,\n width: next.geometry.rect.width,\n x: 0,\n y: 0,\n duration: morphDuration,\n ease: \"expo.inOut\",\n },\n 0,\n );\n }\n\n for (const element of sharedExecutionElements) {\n const previousOffset = previous.sharedOffsets.get(element);\n const nextOffset = next.sharedOffsets.get(element);\n if (previousOffset === undefined || nextOffset === undefined) continue;\n const x = previousOffset.x - nextOffset.x;\n const y = previousOffset.y - nextOffset.y;\n if (Math.abs(x) <= 0.5 && Math.abs(y) <= 0.5) continue;\n morphTimeline.fromTo(\n element,\n { x, y, willChange: \"transform\" },\n {\n x: 0,\n y: 0,\n duration: morphDuration,\n ease: \"expo.inOut\",\n },\n 0,\n );\n }\n\n if (detailTransition === \"expand\") {\n morphTimeline.fromTo(\n elements.execution.recent,\n { autoAlpha: 0, filter: \"blur(4px)\", y: 6 },\n {\n autoAlpha: 1,\n filter: \"blur(0px)\",\n y: 0,\n duration: MOTION.detailRevealSeconds,\n ease: \"power3.out\",\n },\n MOTION.detailRevealDelaySeconds,\n );\n } else if (detailTransition === \"collapse\") {\n morphTimeline.fromTo(\n elements.execution.recent,\n { autoAlpha: 1, filter: \"blur(0px)\", y: 0 },\n {\n autoAlpha: 0,\n filter: \"blur(3px)\",\n y: -4,\n duration: MOTION.detailRetireSeconds,\n ease: \"power2.in\",\n },\n 0,\n );\n }\n\n if (reveal) {\n morphTimeline.fromTo(\n activeScene,\n { autoAlpha: 0, y: 4 },\n {\n autoAlpha: 1,\n y: 0,\n duration: MOTION.revealSeconds,\n ease: \"power2.out\",\n clearProps: \"transform,opacity,visibility\",\n },\n MOTION.sceneRevealDelaySeconds,\n );\n }\n }\n\n function applyProjection(\n projection: FloatingSurfaceProjection,\n renderContent: () => void,\n ): void {\n if (disposed) return;\n const previousScene = currentScene;\n const sceneChanged = previousScene !== projection.scene;\n const layerChanged =\n previousScene === undefined ||\n surfaceLayer(previousScene) !== surfaceLayer(projection.scene);\n const wasExpanded = elements.execution.root.dataset.expanded === \"true\";\n const executionRemainsActive =\n previousScene !== undefined &&\n surfaceLayer(previousScene) === \"execution\" &&\n surfaceLayer(projection.scene) === \"execution\";\n const preserveInterruptedSharedLayout =\n executionRemainsActive && (wasExpanded || morphTimeline?.isActive() === true);\n const previousGeometry = interruptMorph(preserveInterruptedSharedLayout);\n const activityChanged = currentActivityKey !== projection.activity?.key;\n\n elements.surface.dataset.scene = projection.scene;\n elements.surface.dataset.tone = projection.tone;\n elements.surface.style.setProperty(\n \"--spotpatch-island-compact-width\",\n `${String(compactIslandWidth(projection))}px`,\n );\n renderContent();\n const activeScene = setSceneVisibility(elements, projection);\n const isExpanded = elements.execution.root.dataset.expanded === \"true\";\n const detailTransition: DetailTransition =\n executionRemainsActive && wasExpanded && !isExpanded ? \"collapse\" : undefined;\n if (detailTransition === \"collapse\") {\n elements.execution.recent.hidden = false;\n }\n reconcile();\n const nextGeometry = captureSurfaceLayout(\n preserveInterruptedSharedLayout || detailTransition !== undefined,\n );\n currentScene = projection.scene;\n currentActivityKey = projection.activity?.key;\n animateGeometry(\n previousGeometry,\n nextGeometry,\n activeScene,\n layerChanged,\n detailTransition,\n );\n\n const executionActive =\n projection.scene === \"handoff\" ||\n projection.scene === \"running\" ||\n projection.scene === \"success\" ||\n projection.scene === \"failed\";\n if (executionActive && (sceneChanged || activityChanged)) sweepOnce();\n }\n\n function updateLayout(updateContent: () => void): void {\n if (disposed) return;\n const wasExpanded = elements.execution.root.dataset.expanded === \"true\";\n const previousGeometry = interruptMorph(true);\n updateContent();\n const isExpanded = elements.execution.root.dataset.expanded === \"true\";\n const detailTransition: DetailTransition = wasExpanded\n ? isExpanded\n ? undefined\n : \"collapse\"\n : isExpanded\n ? \"expand\"\n : undefined;\n if (detailTransition === \"collapse\") {\n elements.execution.recent.hidden = false;\n }\n reconcile();\n const nextGeometry = captureSurfaceLayout(true);\n const activeScene = elements.execution.root.hidden\n ? elements.planner.hidden\n ? elements.pill\n : elements.planner\n : elements.execution.root;\n animateGeometry(\n previousGeometry,\n nextGeometry,\n activeScene,\n false,\n detailTransition,\n );\n }\n\n function cancel(): void {\n pendingProjection = undefined;\n clearMorph();\n clearDispatch();\n gsap.killTweensOf(elements.execution.sweep);\n gsap.set(elements.execution.sweep, {\n clearProps: \"opacity,transform,visibility\",\n });\n }\n\n function render(\n projection: FloatingSurfaceProjection,\n renderContent: () => void,\n ): void {\n if (disposed) return;\n const dispatchActive = dispatchTimeline?.isActive() === true;\n const leavesChargingScene =\n projection.scene !== \"planner\" && projection.scene !== \"agent-charging\";\n\n if (dispatchActive && currentScene === \"agent-charging\" && leavesChargingScene) {\n pendingProjection = Object.freeze({ projection, renderContent });\n return;\n }\n\n if (dispatchActive && projection.scene !== \"agent-charging\") {\n pendingProjection = undefined;\n clearDispatch();\n }\n\n applyProjection(projection, renderContent);\n }\n\n function dispatch(source: HTMLElement, target: HTMLElement): void {\n if (disposed || dispatchTimeline?.isActive() === true) return;\n if (!supportsMotion(document)) return;\n\n clearDispatch();\n dispatchSource = source;\n dispatchTarget = target;\n elements.surface.dataset.agentCharging = \"true\";\n dispatchTimeline = gsap.timeline({\n onComplete: () => {\n const nextProjection = pendingProjection;\n pendingProjection = undefined;\n completeDispatch();\n if (nextProjection !== undefined) {\n applyProjection(nextProjection.projection, nextProjection.renderContent);\n }\n },\n });\n dispatchTimeline.fromTo(\n source,\n { filter: \"brightness(1)\", scaleX: 1, scaleY: 1 },\n {\n filter: \"brightness(1.06)\",\n scaleX: 0.995,\n scaleY: 0.97,\n duration: MOTION.pressSeconds,\n ease: \"power2.out\",\n yoyo: true,\n repeat: 1,\n clearProps: \"filter,transform\",\n },\n 0,\n );\n dispatchTimeline.fromTo(\n target,\n { boxShadow: \"0 0 0 rgb(100 120 255 / 0%)\" },\n {\n boxShadow: \"0 0 18px rgb(100 120 255 / 14%)\",\n duration: MOTION.targetFeedbackSeconds,\n yoyo: true,\n repeat: 1,\n clearProps: \"boxShadow\",\n },\n MOTION.targetFeedbackDelaySeconds,\n );\n dispatchTimeline.to({}, { duration: MOTION.dispatchSeconds }, 0);\n }\n\n return Object.freeze({\n cancel,\n dispatch,\n render,\n updateLayout,\n dispose(): void {\n if (disposed) return;\n disposed = true;\n cancel();\n document.removeEventListener(\"visibilitychange\", handleVisibility);\n },\n });\n}\n","export const UI_MARKER_ATTRIBUTE = \"data-spotpatch-ui\" as const;\n\nexport const UI_Z_INDEX = Object.freeze({\n highlight: 2_147_483_646,\n controls: 2_147_483_647,\n});\n\nexport const FLOATING_SURFACE_LAYOUT = Object.freeze({\n compactInset: 8,\n compactViewportWidth: 520,\n desktopInset: 24,\n dragActivationDistance: 6,\n edgeSnapDistance: 20,\n workbenchMaxHeight: 620,\n workbenchMaxWidth: 460,\n});\n","import { UI_MARKER_ATTRIBUTE } from \"./ui-constants.js\";\n\nexport function createMarkedElement<K extends keyof HTMLElementTagNameMap>(\n document: Document,\n tagName: K,\n): HTMLElementTagNameMap[K] {\n const element = document.createElement(tagName);\n element.setAttribute(UI_MARKER_ATTRIBUTE, \"\");\n return element;\n}\n\nexport function createButton(\n document: Document,\n label: string,\n className = \"\",\n): HTMLButtonElement {\n const button = createMarkedElement(document, \"button\");\n button.type = \"button\";\n button.className = className;\n button.textContent = label;\n return button;\n}\n","/**\n * Canonical SpotPatch mark from docs/assets/spotpatch-logo-mark.svg.\n *\n * The Vite development injector consumes this trusted asset separately from\n * the core browser bundle so the Runtime gzip budget remains enforceable.\n */\nexport const BRAND_MARK_CONTENT = `\n <defs>\n <linearGradient id=\"locator-gradient\" x1=\"76\" y1=\"92\" x2=\"436\" y2=\"374\" gradientUnits=\"userSpaceOnUse\">\n <stop offset=\"0\" stop-color=\"#B61CFF\" />\n <stop offset=\"0.38\" stop-color=\"#6D35FF\" />\n <stop offset=\"0.72\" stop-color=\"#168EFF\" />\n <stop offset=\"1\" stop-color=\"#00D9E9\" />\n </linearGradient>\n <linearGradient id=\"left-code-gradient\" x1=\"165\" y1=\"166\" x2=\"236\" y2=\"258\" gradientUnits=\"userSpaceOnUse\">\n <stop stop-color=\"#A51EFF\" />\n <stop offset=\"1\" stop-color=\"#653BFF\" />\n </linearGradient>\n <linearGradient id=\"right-code-gradient\" x1=\"276\" y1=\"166\" x2=\"347\" y2=\"258\" gradientUnits=\"userSpaceOnUse\">\n <stop stop-color=\"#158DFF\" />\n <stop offset=\"1\" stop-color=\"#00D8E9\" />\n </linearGradient>\n <linearGradient id=\"bolt-gradient\" x1=\"270\" y1=\"111\" x2=\"252\" y2=\"365\" gradientUnits=\"userSpaceOnUse\">\n <stop stop-color=\"#6840FF\" />\n <stop offset=\"0.48\" stop-color=\"#257BFF\" />\n <stop offset=\"1\" stop-color=\"#00CBEF\" />\n </linearGradient>\n </defs>\n <path\n fill=\"url(#locator-gradient)\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M256 52C345.47 52 418 124.53 418 214C418 267.55 391.98 316.24 354.04 348.02L256 468L157.96 348.02C120.02 316.24 94 267.55 94 214C94 124.53 166.53 52 256 52ZM256 88C186.41 88 130 144.41 130 214C130 258.2 152.76 297.08 187.2 319.57L256 403.8L324.8 319.57C359.24 297.08 382 258.2 382 214C382 144.41 325.59 88 256 88Z\"\n />\n <rect x=\"238\" y=\"20\" width=\"36\" height=\"84\" rx=\"4\" fill=\"url(#locator-gradient)\" />\n <rect x=\"62\" y=\"196\" width=\"84\" height=\"36\" rx=\"4\" fill=\"url(#locator-gradient)\" />\n <rect x=\"366\" y=\"196\" width=\"84\" height=\"36\" rx=\"4\" fill=\"url(#locator-gradient)\" />\n <path\n d=\"M213.5 160L158 211.5L213.5 263L238 236.5L211 211.5L238 186.5L213.5 160Z\"\n fill=\"url(#left-code-gradient)\"\n />\n <path\n d=\"M298.5 160L354 211.5L298.5 263L274 236.5L301 211.5L274 186.5L298.5 160Z\"\n fill=\"url(#right-code-gradient)\"\n />\n <path\n d=\"M283 108L232 212L266 253L238 369L302 237L267 198L283 108Z\"\n fill=\"url(#bolt-gradient)\"\n />\n`;\n","import { BRAND_MARK_CONTENT } from \"./brand-mark-content.js\";\n\nconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\ndeclare const __SPOTPATCH_INLINE_BRAND_MARK__: boolean;\ndeclare const __SPOTPATCH_BRAND_MARK_CONTENT__: string | undefined;\n\n/**\n * Deliberately empty fail-closed fallback for an invalid Vite injection.\n *\n * The browser bundle must not carry a second logo implementation: normal\n * Vite development injects BRAND_MARK_CONTENT lexically, while standalone\n * Runtime builds inline the canonical asset at compile time. Keeping this\n * branch empty preserves the bundle budget and prevents stale branding if a\n * host violates either build contract.\n */\nconst FALLBACK_BRAND_MARK_CONTENT = \"\";\n\nfunction resolveBrandMarkContent(override?: string): Readonly<{\n readonly content: string;\n readonly viewBox: string;\n}> {\n if (override !== undefined) {\n return { content: override, viewBox: \"0 0 512 512\" };\n }\n\n const injected =\n typeof __SPOTPATCH_BRAND_MARK_CONTENT__ === \"string\"\n ? __SPOTPATCH_BRAND_MARK_CONTENT__\n : undefined;\n if (typeof injected === \"string\") {\n return { content: injected, viewBox: \"0 0 512 512\" };\n }\n\n return __SPOTPATCH_INLINE_BRAND_MARK__\n ? { content: BRAND_MARK_CONTENT, viewBox: \"0 0 512 512\" }\n : { content: FALLBACK_BRAND_MARK_CONTENT, viewBox: \"0 0 1 1\" };\n}\n\nfunction svgElement<K extends keyof SVGElementTagNameMap>(\n document: Document,\n tagName: K,\n attributes: Readonly<Record<string, string>>,\n): SVGElementTagNameMap[K] {\n const element = document.createElementNS(SVG_NAMESPACE, tagName);\n\n for (const [name, value] of Object.entries(attributes)) {\n element.setAttribute(name, value);\n }\n\n return element;\n}\n\nfunction namespaceSvgIds(svg: SVGSVGElement, prefix: string): void {\n const safePrefix = prefix.replace(/[^a-zA-Z0-9_-]/gu, \"-\");\n const ids = new Map<string, string>();\n\n for (const element of svg.querySelectorAll(\"[id]\")) {\n const id = element.id;\n const namespacedId = `${safePrefix}-${id}`;\n ids.set(id, namespacedId);\n element.id = namespacedId;\n }\n\n for (const element of [svg, ...svg.querySelectorAll(\"*\")]) {\n for (const attribute of [...element.attributes]) {\n let value = attribute.value;\n for (const [id, namespacedId] of ids) {\n value = value.replaceAll(`url(#${id})`, `url(#${namespacedId})`);\n if (value === `#${id}`) value = `#${namespacedId}`;\n }\n if (value !== attribute.value) element.setAttribute(attribute.name, value);\n }\n }\n}\n\n/** Vector form of docs/assets/spotpatch-logo-mark.svg; safe to inline in Shadow DOM. */\nexport function createBrandMark(\n document: Document,\n content?: string,\n idPrefix?: string,\n): SVGSVGElement {\n const resolved = resolveBrandMarkContent(content);\n const svg = svgElement(document, \"svg\", {\n xmlns: SVG_NAMESPACE,\n class: \"spotpatch-brand-mark\",\n viewBox: resolved.viewBox,\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n });\n svg.innerHTML = resolved.content;\n if (idPrefix !== undefined) namespaceSvgIds(svg, idPrefix);\n return svg;\n}\n","import { createButton, createMarkedElement } from \"./dom.js\";\nimport { BRAND_MARK_CONTENT } from \"./brand-mark-content.js\";\nimport { createBrandMark } from \"./brand-mark.js\";\nimport type {\n FloatingSurfaceProjection,\n MotionExecutionIsland,\n} from \"./motion-extension-contract.js\";\n\nconst TIMER_INTERVAL_MS = 1_000;\n\nexport type { ExecutionActivityKind } from \"./motion-extension-contract.js\";\n\nfunction formatElapsed(milliseconds: number): string {\n const totalSeconds = Math.max(0, Math.floor(milliseconds / TIMER_INTERVAL_MS));\n const seconds = totalSeconds % 60;\n const totalMinutes = Math.floor(totalSeconds / 60);\n const minutes = totalMinutes % 60;\n const hours = Math.floor(totalMinutes / 60);\n const twoDigits = (value: number): string => String(value).padStart(2, \"0\");\n\n return hours > 0\n ? `${twoDigits(hours)}:${twoDigits(minutes)}:${twoDigits(seconds)}`\n : `${twoDigits(totalMinutes)}:${twoDigits(seconds)}`;\n}\n\nfunction validTimestamp(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n const timestamp = Date.parse(value);\n return Number.isFinite(timestamp) ? timestamp : undefined;\n}\n\nfunction prefersReducedMotion(window: Window): boolean {\n const matchMedia: unknown = Reflect.get(window, \"matchMedia\");\n if (typeof matchMedia !== \"function\") return false;\n const result: unknown = Reflect.apply(matchMedia, window, [\n \"(prefers-reduced-motion: reduce)\",\n ]);\n return (\n typeof result === \"object\" &&\n result !== null &&\n \"matches\" in result &&\n result.matches === true\n );\n}\n\nexport function createExecutionIsland(\n document: Document,\n now: () => number = Date.now,\n): MotionExecutionIsland {\n const window = document.defaultView;\n\n if (window === null) {\n throw new Error(\"SpotPatch Execution Island requires an associated window.\");\n }\n\n const root = createButton(document, \"\", \"spotpatch-execution-island\");\n root.hidden = true;\n root.setAttribute(\"aria-hidden\", \"true\");\n root.setAttribute(\"aria-expanded\", \"false\");\n\n const logo = createBrandMark(\n document,\n BRAND_MARK_CONTENT,\n \"spotpatch-execution-island\",\n );\n logo.classList.add(\"spotpatch-execution-logo\");\n const mark = createMarkedElement(document, \"span\");\n mark.className = \"spotpatch-execution-mark\";\n mark.append(logo);\n\n const content = createMarkedElement(document, \"span\");\n content.className = \"spotpatch-execution-content\";\n content.setAttribute(\"role\", \"status\");\n content.setAttribute(\"aria-live\", \"polite\");\n content.setAttribute(\"aria-atomic\", \"true\");\n const headlineWrap = createMarkedElement(document, \"span\");\n headlineWrap.className = \"spotpatch-execution-headline-wrap\";\n const headline = createMarkedElement(document, \"strong\");\n headline.className = \"spotpatch-execution-headline\";\n const headlineOutgoing = createMarkedElement(document, \"strong\");\n headlineOutgoing.className = \"spotpatch-execution-headline-outgoing\";\n headlineOutgoing.setAttribute(\"aria-hidden\", \"true\");\n headlineWrap.append(headlineOutgoing, headline);\n const actionWrap = createMarkedElement(document, \"span\");\n actionWrap.className = \"spotpatch-execution-action-wrap\";\n const action = createMarkedElement(document, \"span\");\n action.className = \"spotpatch-execution-action\";\n const actionOutgoing = createMarkedElement(document, \"span\");\n actionOutgoing.className = \"spotpatch-execution-action-outgoing\";\n actionOutgoing.setAttribute(\"aria-hidden\", \"true\");\n actionWrap.append(actionOutgoing, action);\n const recent = createMarkedElement(document, \"span\");\n recent.className = \"spotpatch-execution-recent\";\n content.append(headlineWrap, actionWrap);\n\n const meta = createMarkedElement(document, \"span\");\n meta.className = \"spotpatch-execution-meta\";\n const metaDot = createMarkedElement(document, \"span\");\n metaDot.className = \"spotpatch-execution-meta-dot\";\n metaDot.setAttribute(\"aria-hidden\", \"true\");\n const metaLabel = createMarkedElement(document, \"span\");\n metaLabel.className = \"spotpatch-execution-meta-label\";\n const timer = createMarkedElement(document, \"span\");\n timer.className = \"spotpatch-execution-timer\";\n timer.hidden = true;\n meta.append(metaDot, metaLabel, timer);\n\n const more = createMarkedElement(document, \"span\");\n more.className = \"spotpatch-execution-more\";\n more.textContent = \"•••\";\n more.setAttribute(\"aria-hidden\", \"true\");\n meta.append(more);\n\n const sweep = createMarkedElement(document, \"span\");\n sweep.className = \"spotpatch-island-sweep\";\n sweep.setAttribute(\"aria-hidden\", \"true\");\n root.append(mark, content, meta, recent, sweep);\n\n const elements = Object.freeze({\n action,\n actionOutgoing,\n content,\n headline,\n headlineOutgoing,\n logo,\n mark,\n meta,\n metaDot,\n metaLabel,\n more,\n recent,\n root,\n sweep,\n timer,\n });\n let currentProjection: FloatingSurfaceProjection | undefined;\n let expandable = false;\n let expanded = false;\n let timerHandle: number | undefined;\n let startedAt: number | undefined;\n let disposed = false;\n\n const updateExpandedState = (): void => {\n expanded = expandable && expanded;\n root.dataset.expandable = String(expandable);\n root.dataset.expanded = String(expanded);\n root.setAttribute(\"aria-expanded\", String(expanded));\n more.textContent = expanded ? \"×\" : \"•••\";\n recent.hidden = !expanded;\n };\n\n const animateCopyChange = (\n element: HTMLElement,\n outgoing: HTMLElement,\n value: string,\n ): void => {\n if (element.textContent === value) return;\n outgoing.textContent = element.textContent;\n element.textContent = value;\n root.classList.remove(\"spotpatch-execution-copy-changing\");\n if (!prefersReducedMotion(window)) {\n void root.offsetWidth;\n root.classList.add(\"spotpatch-execution-copy-changing\");\n }\n };\n const syncProjectionCopy = (projection: FloatingSurfaceProjection): void => {\n const visibleHeadline = expanded\n ? (projection.expandedHeadline ?? projection.headline)\n : projection.headline;\n const visibleAction = expanded\n ? (projection.expandedAction ?? projection.action)\n : projection.action;\n animateCopyChange(headline, headlineOutgoing, visibleHeadline);\n animateCopyChange(action, actionOutgoing, visibleAction);\n root.setAttribute(\n \"aria-label\",\n [visibleHeadline, visibleAction, projection.meta].filter(Boolean).join(\". \"),\n );\n };\n\n const stopTimer = (): void => {\n if (timerHandle === undefined) return;\n window.clearInterval(timerHandle);\n timerHandle = undefined;\n };\n const updateTimer = (): void => {\n if (startedAt === undefined) return;\n timer.textContent = formatElapsed(now() - startedAt);\n };\n const startTimer = (): void => {\n if (timerHandle !== undefined || startedAt === undefined || document.hidden) {\n return;\n }\n updateTimer();\n timerHandle = window.setInterval(updateTimer, TIMER_INTERVAL_MS);\n };\n const syncTimer = (projection: FloatingSurfaceProjection): void => {\n stopTimer();\n startedAt =\n projection.scene === \"running\" ? validTimestamp(projection.startedAt) : undefined;\n const timed = startedAt !== undefined;\n timer.hidden = !timed;\n metaLabel.textContent = projection.meta;\n if (timed) startTimer();\n };\n const handleVisibility = (): void => {\n if (document.hidden) {\n stopTimer();\n } else if (currentProjection !== undefined) {\n syncTimer(currentProjection);\n }\n };\n document.addEventListener(\"visibilitychange\", handleVisibility);\n\n return Object.freeze({\n canExpand: () => expandable,\n elements,\n isExpanded: () => expanded,\n root,\n setExpanded(nextExpanded: boolean): void {\n expanded = nextExpanded;\n updateExpandedState();\n if (currentProjection !== undefined) syncProjectionCopy(currentProjection);\n },\n render(projection: FloatingSurfaceProjection): void {\n if (disposed) return;\n currentProjection = projection;\n root.dataset.executionScene = projection.scene;\n meta.dataset.tone = projection.tone;\n syncTimer(projection);\n\n recent.replaceChildren(\n ...projection.recentActivities.slice(-3).map((item) => {\n const row = createMarkedElement(document, \"span\");\n row.className = \"spotpatch-execution-recent-item\";\n row.dataset.state = item.state;\n const kind = createMarkedElement(document, \"span\");\n kind.className = \"spotpatch-execution-recent-kind\";\n kind.textContent = item.kind;\n const detail = createMarkedElement(document, \"span\");\n detail.className = \"spotpatch-execution-recent-detail\";\n detail.textContent = item.detail ?? item.label;\n const state = createMarkedElement(document, \"span\");\n state.className = \"spotpatch-execution-recent-state\";\n state.textContent = item.state;\n row.append(kind, detail, state);\n return row;\n }),\n );\n expandable = projection.recentActivities.length > 0;\n if (projection.scene === \"success\" || projection.scene === \"failed\") {\n expanded = false;\n }\n updateExpandedState();\n syncProjectionCopy(projection);\n },\n dispose(): void {\n if (disposed) return;\n disposed = true;\n stopTimer();\n document.removeEventListener(\"visibilitychange\", handleVisibility);\n },\n });\n}\n","export type FloatingSurfaceScene =\n | \"pill\"\n | \"capturing\"\n | \"planner\"\n | \"agent-charging\"\n | \"handoff\"\n | \"running\"\n | \"success\"\n | \"failed\";\n\nexport type FloatingSurfaceTone =\n \"neutral\" | \"capturing\" | \"ready\" | \"running\" | \"success\" | \"danger\";\n\nexport type ExecutionActivityKind =\n | \"prepare\"\n | \"dispatch\"\n | \"discover\"\n | \"search\"\n | \"read\"\n | \"patch\"\n | \"check\"\n | \"audit\"\n | \"apply\"\n | \"sync\"\n | \"unknown\";\n\nexport interface FloatingSurfaceActivity {\n readonly detail?: string;\n readonly key: string;\n readonly kind: ExecutionActivityKind;\n readonly label: string;\n readonly state: \"active\" | \"success\" | \"failure\" | \"info\";\n}\n\nexport interface FloatingSurfaceProjection {\n readonly action: string;\n readonly activity?: FloatingSurfaceActivity;\n readonly expandedAction?: string;\n readonly expandedHeadline?: string;\n readonly headline: string;\n readonly meta: string;\n readonly recentActivities: readonly FloatingSurfaceActivity[];\n readonly scene: FloatingSurfaceScene;\n readonly startedAt?: string;\n readonly tone: FloatingSurfaceTone;\n}\n\nexport interface ExecutionIslandElements {\n readonly action: HTMLElement;\n readonly actionOutgoing: HTMLElement;\n readonly content: HTMLElement;\n readonly headline: HTMLElement;\n readonly headlineOutgoing: HTMLElement;\n readonly logo: SVGSVGElement;\n readonly mark: HTMLElement;\n readonly meta: HTMLElement;\n readonly metaDot: HTMLElement;\n readonly metaLabel: HTMLElement;\n readonly more: HTMLElement;\n readonly recent: HTMLElement;\n readonly root: HTMLButtonElement;\n readonly sweep: HTMLElement;\n readonly timer: HTMLElement;\n}\n\nexport interface ExecutionIslandView {\n readonly canExpand: () => boolean;\n readonly dispose: () => void;\n readonly isExpanded: () => boolean;\n readonly render: (projection: FloatingSurfaceProjection) => void;\n readonly root: HTMLButtonElement;\n readonly setExpanded: (expanded: boolean) => void;\n}\n\nexport interface MotionExecutionIsland extends ExecutionIslandView {\n readonly elements: ExecutionIslandElements;\n}\n\nexport interface FloatingSurfaceMotionElements {\n readonly execution: ExecutionIslandElements;\n readonly pill: HTMLButtonElement;\n readonly planner: HTMLElement;\n readonly surface: HTMLElement;\n}\n\nexport interface FloatingSurfaceMotionController {\n readonly cancel: () => void;\n readonly dispatch: (source: HTMLElement, target: HTMLElement) => void;\n readonly dispose: () => void;\n readonly render: (\n projection: FloatingSurfaceProjection,\n renderContent: () => void,\n ) => void;\n readonly updateLayout: (updateContent: () => void) => void;\n}\n\nexport interface FloatingSurfaceMotionExtension {\n readonly createExecutionIsland: (document: Document) => MotionExecutionIsland;\n readonly createController: (\n document: Document,\n elements: FloatingSurfaceMotionElements,\n reconcile: () => void,\n ) => FloatingSurfaceMotionController;\n readonly createStyles: (document: Document) => HTMLStyleElement;\n}\n\nconst MOTION_EXTENSION_KEY = Symbol.for(\"spotpatch.motion.v1\");\ntype ExtensionStore = Partial<Record<symbol, FloatingSurfaceMotionExtension>>;\n\nexport function registerFloatingSurfaceMotionExtension(\n extension: FloatingSurfaceMotionExtension,\n): void {\n (globalThis as ExtensionStore)[MOTION_EXTENSION_KEY] = extension;\n}\n\nexport function getFloatingSurfaceMotionExtension():\n FloatingSurfaceMotionExtension | undefined {\n return (globalThis as ExtensionStore)[MOTION_EXTENSION_KEY];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAqB;AAQrB,IAAM,SAAS,OAAO,OAAO;AAAA,EAC3B,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,cAAc;AAAA,EACd,4BAA4B;AAAA,EAC5B,uBAAuB;AACzB,CAAC;AAED,IAAM,cAAc,OAAO,OAAO;AAAA,EAChC,eAAe;AAAA,EACf,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,cAAc;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K;AACzB,cAAI,OAAO,MAAM,QAAQ,KAAK;AAC9B,iBAAO;AAAA,QACT,CAAC;AAAA,MACH;AACA,mBAAa,WAAW,iBAAiB,SAAS;AAClD,UAAI,WAAW,UAAU,aAAa,WAAW,UAAU,UAAU;AACnE,mBAAW;AAAA,MACb;AACA,0BAAoB;AACpB,yBAAmB,UAAU;AAAA,IAC/B;AAAA,IACA,UAAgB;AACd,UAAI,SAAU;AACd,iBAAW;AACX,gBAAU;AACV,eAAS,oBAAoB,oBAAoB,gBAAgB;AAAA,IACnE;AAAA,EACF,CAAC;AACH;;;AC7JA,IAAM,uBAAuB,uBAAO,IAAI,qBAAqB;AAGtD,SAAS,uCACd,WACM;AACN,EAAC,WAA8B,oBAAoB,IAAI;AACzD;AAEO,SAAS,oCAC6B;AAC3C,SAAQ,WAA8B,oBAAoB;AAC5D;;;AP5GA,IAAM,oCAAoC,OAAO,OAAO;AAAA,EACtD;AAAA,EACA,kBAAkB;AAAA,EAClB,cAAc;AAChB,CAAC;AAEM,SAAS,wCAA8C;AAC5D,yCAAuC,iCAAiC;AAC1E;","names":[]}
@@ -0,0 +1,79 @@
1
+ type FloatingSurfaceScene = "pill" | "capturing" | "planner" | "agent-charging" | "handoff" | "running" | "success" | "failed";
2
+ type FloatingSurfaceTone = "neutral" | "capturing" | "ready" | "running" | "success" | "danger";
3
+ type ExecutionActivityKind = "prepare" | "dispatch" | "discover" | "search" | "read" | "patch" | "check" | "audit" | "apply" | "sync" | "unknown";
4
+ interface FloatingSurfaceActivity {
5
+ readonly detail?: string;
6
+ readonly key: string;
7
+ readonly kind: ExecutionActivityKind;
8
+ readonly label: string;
9
+ readonly state: "active" | "success" | "failure" | "info";
10
+ }
11
+ interface FloatingSurfaceProjection {
12
+ readonly action: string;
13
+ readonly activity?: FloatingSurfaceActivity;
14
+ readonly expandedAction?: string;
15
+ readonly expandedHeadline?: string;
16
+ readonly headline: string;
17
+ readonly meta: string;
18
+ readonly recentActivities: readonly FloatingSurfaceActivity[];
19
+ readonly scene: FloatingSurfaceScene;
20
+ readonly startedAt?: string;
21
+ readonly tone: FloatingSurfaceTone;
22
+ }
23
+ interface ExecutionIslandElements {
24
+ readonly action: HTMLElement;
25
+ readonly actionOutgoing: HTMLElement;
26
+ readonly content: HTMLElement;
27
+ readonly headline: HTMLElement;
28
+ readonly headlineOutgoing: HTMLElement;
29
+ readonly logo: SVGSVGElement;
30
+ readonly mark: HTMLElement;
31
+ readonly meta: HTMLElement;
32
+ readonly metaDot: HTMLElement;
33
+ readonly metaLabel: HTMLElement;
34
+ readonly more: HTMLElement;
35
+ readonly recent: HTMLElement;
36
+ readonly root: HTMLButtonElement;
37
+ readonly sweep: HTMLElement;
38
+ readonly timer: HTMLElement;
39
+ }
40
+ interface ExecutionIslandView {
41
+ readonly canExpand: () => boolean;
42
+ readonly dispose: () => void;
43
+ readonly isExpanded: () => boolean;
44
+ readonly render: (projection: FloatingSurfaceProjection) => void;
45
+ readonly root: HTMLButtonElement;
46
+ readonly setExpanded: (expanded: boolean) => void;
47
+ }
48
+ interface MotionExecutionIsland extends ExecutionIslandView {
49
+ readonly elements: ExecutionIslandElements;
50
+ }
51
+ interface FloatingSurfaceMotionElements {
52
+ readonly execution: ExecutionIslandElements;
53
+ readonly pill: HTMLButtonElement;
54
+ readonly planner: HTMLElement;
55
+ readonly surface: HTMLElement;
56
+ }
57
+ interface FloatingSurfaceMotionController {
58
+ readonly cancel: () => void;
59
+ readonly dispatch: (source: HTMLElement, target: HTMLElement) => void;
60
+ readonly dispose: () => void;
61
+ readonly render: (projection: FloatingSurfaceProjection, renderContent: () => void) => void;
62
+ readonly updateLayout: (updateContent: () => void) => void;
63
+ }
64
+ interface FloatingSurfaceMotionExtension {
65
+ readonly createExecutionIsland: (document: Document) => MotionExecutionIsland;
66
+ readonly createController: (document: Document, elements: FloatingSurfaceMotionElements, reconcile: () => void) => FloatingSurfaceMotionController;
67
+ readonly createStyles: (document: Document) => HTMLStyleElement;
68
+ }
69
+ declare function registerFloatingSurfaceMotionExtension(extension: FloatingSurfaceMotionExtension): void;
70
+ declare function getFloatingSurfaceMotionExtension(): FloatingSurfaceMotionExtension | undefined;
71
+
72
+ declare function createExecutionIsland(document: Document, now?: () => number): MotionExecutionIsland;
73
+
74
+ declare function createFloatingSurfaceMotionStyles(document: Document): HTMLStyleElement;
75
+ declare function createFloatingSurfaceMotionController(document: Document, elements: FloatingSurfaceMotionElements, reconcile: () => void): FloatingSurfaceMotionController;
76
+
77
+ declare function installFloatingSurfaceMotionExtension(): void;
78
+
79
+ export { type FloatingSurfaceMotionController, type FloatingSurfaceMotionElements, type FloatingSurfaceMotionExtension, type FloatingSurfaceProjection, type FloatingSurfaceScene, type FloatingSurfaceTone, type MotionExecutionIsland, createExecutionIsland, createFloatingSurfaceMotionController, createFloatingSurfaceMotionStyles, getFloatingSurfaceMotionExtension, installFloatingSurfaceMotionExtension, registerFloatingSurfaceMotionExtension };
@@ -0,0 +1,79 @@
1
+ type FloatingSurfaceScene = "pill" | "capturing" | "planner" | "agent-charging" | "handoff" | "running" | "success" | "failed";
2
+ type FloatingSurfaceTone = "neutral" | "capturing" | "ready" | "running" | "success" | "danger";
3
+ type ExecutionActivityKind = "prepare" | "dispatch" | "discover" | "search" | "read" | "patch" | "check" | "audit" | "apply" | "sync" | "unknown";
4
+ interface FloatingSurfaceActivity {
5
+ readonly detail?: string;
6
+ readonly key: string;
7
+ readonly kind: ExecutionActivityKind;
8
+ readonly label: string;
9
+ readonly state: "active" | "success" | "failure" | "info";
10
+ }
11
+ interface FloatingSurfaceProjection {
12
+ readonly action: string;
13
+ readonly activity?: FloatingSurfaceActivity;
14
+ readonly expandedAction?: string;
15
+ readonly expandedHeadline?: string;
16
+ readonly headline: string;
17
+ readonly meta: string;
18
+ readonly recentActivities: readonly FloatingSurfaceActivity[];
19
+ readonly scene: FloatingSurfaceScene;
20
+ readonly startedAt?: string;
21
+ readonly tone: FloatingSurfaceTone;
22
+ }
23
+ interface ExecutionIslandElements {
24
+ readonly action: HTMLElement;
25
+ readonly actionOutgoing: HTMLElement;
26
+ readonly content: HTMLElement;
27
+ readonly headline: HTMLElement;
28
+ readonly headlineOutgoing: HTMLElement;
29
+ readonly logo: SVGSVGElement;
30
+ readonly mark: HTMLElement;
31
+ readonly meta: HTMLElement;
32
+ readonly metaDot: HTMLElement;
33
+ readonly metaLabel: HTMLElement;
34
+ readonly more: HTMLElement;
35
+ readonly recent: HTMLElement;
36
+ readonly root: HTMLButtonElement;
37
+ readonly sweep: HTMLElement;
38
+ readonly timer: HTMLElement;
39
+ }
40
+ interface ExecutionIslandView {
41
+ readonly canExpand: () => boolean;
42
+ readonly dispose: () => void;
43
+ readonly isExpanded: () => boolean;
44
+ readonly render: (projection: FloatingSurfaceProjection) => void;
45
+ readonly root: HTMLButtonElement;
46
+ readonly setExpanded: (expanded: boolean) => void;
47
+ }
48
+ interface MotionExecutionIsland extends ExecutionIslandView {
49
+ readonly elements: ExecutionIslandElements;
50
+ }
51
+ interface FloatingSurfaceMotionElements {
52
+ readonly execution: ExecutionIslandElements;
53
+ readonly pill: HTMLButtonElement;
54
+ readonly planner: HTMLElement;
55
+ readonly surface: HTMLElement;
56
+ }
57
+ interface FloatingSurfaceMotionController {
58
+ readonly cancel: () => void;
59
+ readonly dispatch: (source: HTMLElement, target: HTMLElement) => void;
60
+ readonly dispose: () => void;
61
+ readonly render: (projection: FloatingSurfaceProjection, renderContent: () => void) => void;
62
+ readonly updateLayout: (updateContent: () => void) => void;
63
+ }
64
+ interface FloatingSurfaceMotionExtension {
65
+ readonly createExecutionIsland: (document: Document) => MotionExecutionIsland;
66
+ readonly createController: (document: Document, elements: FloatingSurfaceMotionElements, reconcile: () => void) => FloatingSurfaceMotionController;
67
+ readonly createStyles: (document: Document) => HTMLStyleElement;
68
+ }
69
+ declare function registerFloatingSurfaceMotionExtension(extension: FloatingSurfaceMotionExtension): void;
70
+ declare function getFloatingSurfaceMotionExtension(): FloatingSurfaceMotionExtension | undefined;
71
+
72
+ declare function createExecutionIsland(document: Document, now?: () => number): MotionExecutionIsland;
73
+
74
+ declare function createFloatingSurfaceMotionStyles(document: Document): HTMLStyleElement;
75
+ declare function createFloatingSurfaceMotionController(document: Document, elements: FloatingSurfaceMotionElements, reconcile: () => void): FloatingSurfaceMotionController;
76
+
77
+ declare function installFloatingSurfaceMotionExtension(): void;
78
+
79
+ export { type FloatingSurfaceMotionController, type FloatingSurfaceMotionElements, type FloatingSurfaceMotionExtension, type FloatingSurfaceProjection, type FloatingSurfaceScene, type FloatingSurfaceTone, type MotionExecutionIsland, createExecutionIsland, createFloatingSurfaceMotionController, createFloatingSurfaceMotionStyles, getFloatingSurfaceMotionExtension, installFloatingSurfaceMotionExtension, registerFloatingSurfaceMotionExtension };