@40rty/ams-sdk 0.1.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 (317) hide show
  1. package/dist/index.js +11918 -0
  2. package/dist/types/ecommerce/src/attribute-buckets.d.ts +79 -0
  3. package/dist/types/ecommerce/src/base-attributes.d.ts +42 -0
  4. package/dist/types/ecommerce/src/bucket-labels.d.ts +37 -0
  5. package/dist/types/ecommerce/src/cart-line-selections.d.ts +24 -0
  6. package/dist/types/ecommerce/src/commerce-schemas.d.ts +1813 -0
  7. package/dist/types/ecommerce/src/format-variant-value.d.ts +1 -0
  8. package/dist/types/ecommerce/src/index.d.ts +13 -0
  9. package/dist/types/ecommerce/src/locale.d.ts +31 -0
  10. package/dist/types/ecommerce/src/optimistic-cart-line.d.ts +38 -0
  11. package/dist/types/ecommerce/src/pdp-companions.d.ts +21 -0
  12. package/dist/types/ecommerce/src/pick-product-card-action.d.ts +38 -0
  13. package/dist/types/ecommerce/src/product-lookup.d.ts +34 -0
  14. package/dist/types/ecommerce/src/projection-spec.d.ts +38 -0
  15. package/dist/types/ecommerce/src/review-schemas.d.ts +425 -0
  16. package/dist/types/sdk/src/analytics/consent.d.ts +52 -0
  17. package/dist/types/sdk/src/analytics/drops.d.ts +98 -0
  18. package/dist/types/sdk/src/analytics/emitting-scope.d.ts +2 -0
  19. package/dist/types/sdk/src/analytics/index.d.ts +12 -0
  20. package/dist/types/sdk/src/analytics/inert-scope.d.ts +2 -0
  21. package/dist/types/sdk/src/analytics/notify.d.ts +41 -0
  22. package/dist/types/sdk/src/analytics/outbox.d.ts +118 -0
  23. package/dist/types/sdk/src/analytics/scope-context.d.ts +24 -0
  24. package/dist/types/sdk/src/analytics/scope.d.ts +149 -0
  25. package/dist/types/sdk/src/analytics/surface.d.ts +77 -0
  26. package/dist/types/sdk/src/analytics/transport.d.ts +91 -0
  27. package/dist/types/sdk/src/animation/index.d.ts +2 -0
  28. package/dist/types/sdk/src/animation/useListTransition.d.ts +16 -0
  29. package/dist/types/sdk/src/animation/useUpdateTransition.d.ts +16 -0
  30. package/dist/types/sdk/src/canvas/ElementIdContext.d.ts +13 -0
  31. package/dist/types/sdk/src/canvas/GenerationStyleContext.d.ts +13 -0
  32. package/dist/types/sdk/src/canvas/ShimmerSweep.d.ts +18 -0
  33. package/dist/types/sdk/src/canvas/TransitionContext.d.ts +52 -0
  34. package/dist/types/sdk/src/canvas/canvas-arrangement.d.ts +20 -0
  35. package/dist/types/sdk/src/canvas/canvas-motion-style.d.ts +18 -0
  36. package/dist/types/sdk/src/canvas/canvas-outlet.d.ts +14 -0
  37. package/dist/types/sdk/src/canvas/canvas-tail.d.ts +31 -0
  38. package/dist/types/sdk/src/canvas/dom-targets.d.ts +140 -0
  39. package/dist/types/sdk/src/canvas/generation-entrance.d.ts +26 -0
  40. package/dist/types/sdk/src/canvas/generation-style.d.ts +62 -0
  41. package/dist/types/sdk/src/canvas/index.d.ts +21 -0
  42. package/dist/types/sdk/src/canvas/item-motion/ItemTransitionGroup.d.ts +72 -0
  43. package/dist/types/sdk/src/canvas/item-motion/classify-items.d.ts +24 -0
  44. package/dist/types/sdk/src/canvas/item-motion/index.d.ts +5 -0
  45. package/dist/types/sdk/src/canvas/item-motion/plugins/wipe.d.ts +11 -0
  46. package/dist/types/sdk/src/canvas/item-motion/profile.d.ts +77 -0
  47. package/dist/types/sdk/src/canvas/item-motion/wipe.d.ts +57 -0
  48. package/dist/types/sdk/src/canvas/nav-direction.d.ts +22 -0
  49. package/dist/types/sdk/src/canvas/runtime-context.d.ts +15 -0
  50. package/dist/types/sdk/src/canvas/runtime-hooks.d.ts +106 -0
  51. package/dist/types/sdk/src/canvas/runtime-types.d.ts +183 -0
  52. package/dist/types/sdk/src/canvas/scroll-event-target.d.ts +21 -0
  53. package/dist/types/sdk/src/canvas/turn-change-anchor.d.ts +34 -0
  54. package/dist/types/sdk/src/canvas/turn-edit.d.ts +8 -0
  55. package/dist/types/sdk/src/canvas/use-canvas-actions.d.ts +41 -0
  56. package/dist/types/sdk/src/canvas/use-fourty-layout.d.ts +19 -0
  57. package/dist/types/sdk/src/catalog/CatalogContext.d.ts +7 -0
  58. package/dist/types/sdk/src/catalog/DebugContext.d.ts +5 -0
  59. package/dist/types/sdk/src/catalog/HydrationStateContext.d.ts +45 -0
  60. package/dist/types/sdk/src/catalog/HydratorContext.d.ts +7 -0
  61. package/dist/types/sdk/src/catalog/component-library.d.ts +32 -0
  62. package/dist/types/sdk/src/catalog/define.d.ts +149 -0
  63. package/dist/types/sdk/src/catalog/hydrator-registry.d.ts +91 -0
  64. package/dist/types/sdk/src/catalog/index.d.ts +14 -0
  65. package/dist/types/sdk/src/catalog/interaction-contract.d.ts +78 -0
  66. package/dist/types/sdk/src/catalog/normalize-components.d.ts +17 -0
  67. package/dist/types/sdk/src/catalog/prose-value.d.ts +22 -0
  68. package/dist/types/sdk/src/catalog/registration/index.d.ts +4 -0
  69. package/dist/types/sdk/src/catalog/registration/register-component.d.ts +35 -0
  70. package/dist/types/sdk/src/catalog/registration/registry.d.ts +27 -0
  71. package/dist/types/sdk/src/catalog/registration/types.d.ts +83 -0
  72. package/dist/types/sdk/src/catalog/registry.d.ts +22 -0
  73. package/dist/types/sdk/src/catalog/render-inline.d.ts +39 -0
  74. package/dist/types/sdk/src/catalog/resolve-hydrators.d.ts +27 -0
  75. package/dist/types/sdk/src/chat/chat-context.d.ts +40 -0
  76. package/dist/types/sdk/src/chat/index.d.ts +1 -0
  77. package/dist/types/sdk/src/client-state/index.d.ts +2 -0
  78. package/dist/types/sdk/src/client-state/server-store.d.ts +38 -0
  79. package/dist/types/sdk/src/client-state/store.d.ts +20 -0
  80. package/dist/types/sdk/src/commerce/commerce-context.d.ts +62 -0
  81. package/dist/types/sdk/src/commerce/commerce-shapes.d.ts +170 -0
  82. package/dist/types/sdk/src/commerce/ecommerce/agentic-overlay.d.ts +27 -0
  83. package/dist/types/sdk/src/commerce/ecommerce/buy-now-exit.d.ts +36 -0
  84. package/dist/types/sdk/src/commerce/ecommerce/cart-action-failures.d.ts +54 -0
  85. package/dist/types/sdk/src/commerce/ecommerce/cart-drawer-store.d.ts +18 -0
  86. package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-reasons.d.ts +54 -0
  87. package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-shape.d.ts +73 -0
  88. package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-store.d.ts +39 -0
  89. package/dist/types/sdk/src/commerce/ecommerce/comparison-rows.d.ts +30 -0
  90. package/dist/types/sdk/src/commerce/ecommerce/index.d.ts +21 -0
  91. package/dist/types/sdk/src/commerce/ecommerce/normalize-collection.d.ts +17 -0
  92. package/dist/types/sdk/src/commerce/ecommerce/preselect-from-facts.d.ts +25 -0
  93. package/dist/types/sdk/src/commerce/ecommerce/product-filters.d.ts +40 -0
  94. package/dist/types/sdk/src/commerce/ecommerce/use-buy-now.d.ts +33 -0
  95. package/dist/types/sdk/src/commerce/ecommerce/use-cart-drawer.d.ts +35 -0
  96. package/dist/types/sdk/src/commerce/ecommerce/use-cart-line-row.d.ts +30 -0
  97. package/dist/types/sdk/src/commerce/ecommerce/use-comparison-table.d.ts +22 -0
  98. package/dist/types/sdk/src/commerce/ecommerce/use-look-card.d.ts +80 -0
  99. package/dist/types/sdk/src/commerce/ecommerce/use-product-card.d.ts +62 -0
  100. package/dist/types/sdk/src/commerce/ecommerce/use-product-carousel-scroll.d.ts +13 -0
  101. package/dist/types/sdk/src/commerce/ecommerce/use-product-detail.d.ts +48 -0
  102. package/dist/types/sdk/src/commerce/ecommerce/use-product-grid-filter.d.ts +17 -0
  103. package/dist/types/sdk/src/commerce/ecommerce/use-selected-variants-state.d.ts +8 -0
  104. package/dist/types/sdk/src/commerce/ecommerce/use-wishlist-drawer.d.ts +34 -0
  105. package/dist/types/sdk/src/commerce/ecommerce/variant-option-axes.d.ts +56 -0
  106. package/dist/types/sdk/src/commerce/ecommerce/variant-resolution.d.ts +83 -0
  107. package/dist/types/sdk/src/commerce/ecommerce/variant-selection.d.ts +22 -0
  108. package/dist/types/sdk/src/commerce/external-navigation.d.ts +41 -0
  109. package/dist/types/sdk/src/commerce/index.d.ts +9 -0
  110. package/dist/types/sdk/src/commerce/option-selection-store.d.ts +8 -0
  111. package/dist/types/sdk/src/commerce/pending-variant-choice-store.d.ts +20 -0
  112. package/dist/types/sdk/src/commerce/variant-selection-store.d.ts +7 -0
  113. package/dist/types/sdk/src/content/index.d.ts +2 -0
  114. package/dist/types/sdk/src/content/use-faq-accordion.d.ts +11 -0
  115. package/dist/types/sdk/src/content/use-newsletter-form.d.ts +16 -0
  116. package/dist/types/sdk/src/host/Spacefront.d.ts +11 -0
  117. package/dist/types/sdk/src/host/engine-loader.d.ts +14 -0
  118. package/dist/types/sdk/src/host/host-modules.d.ts +5833 -0
  119. package/dist/types/sdk/src/host/index.d.ts +4 -0
  120. package/dist/types/sdk/src/host/types.d.ts +52 -0
  121. package/dist/types/sdk/src/index.d.ts +21 -0
  122. package/dist/types/sdk/src/interaction/haptics.d.ts +8 -0
  123. package/dist/types/sdk/src/interaction/index.d.ts +3 -0
  124. package/dist/types/sdk/src/interaction/normalize-signals.d.ts +8 -0
  125. package/dist/types/sdk/src/interaction/withInteractionTracking.d.ts +48 -0
  126. package/dist/types/sdk/src/npm.d.ts +3 -0
  127. package/dist/types/sdk/src/projection/ProjectionSignalBridge.d.ts +5 -0
  128. package/dist/types/sdk/src/projection/index.d.ts +1 -0
  129. package/dist/types/sdk/src/projection/preferences.d.ts +12 -0
  130. package/dist/types/sdk/src/projection/transform.d.ts +7 -0
  131. package/dist/types/sdk/src/provider/AgentAsk.d.ts +16 -0
  132. package/dist/types/sdk/src/provider/index.d.ts +4 -0
  133. package/dist/types/sdk/src/provider/providers/handler-registry.d.ts +11 -0
  134. package/dist/types/sdk/src/provider/use-clamp-toggle.d.ts +22 -0
  135. package/dist/types/sdk/src/provider/use-timed-flag.d.ts +16 -0
  136. package/dist/types/sdk/src/rendering/index.d.ts +1 -0
  137. package/dist/types/sdk/src/rendering/post-hydration.d.ts +37 -0
  138. package/dist/types/sdk/src/session/FourtySessionContext.d.ts +228 -0
  139. package/dist/types/sdk/src/session/clear-registry.d.ts +6 -0
  140. package/dist/types/sdk/src/session/index.d.ts +4 -0
  141. package/dist/types/sdk/src/session/use-action.d.ts +25 -0
  142. package/dist/types/sdk/src/session/visitor-locale.d.ts +2 -0
  143. package/dist/types/sdk/src/shared/index.d.ts +2 -0
  144. package/dist/types/sdk/src/shared/use-expandable.d.ts +9 -0
  145. package/dist/types/sdk/src/shared/use-image-hover.d.ts +13 -0
  146. package/dist/types/sdk/src/shell/ScrollContainerContext.d.ts +25 -0
  147. package/dist/types/sdk/src/shell/ShellRegistry.d.ts +25 -0
  148. package/dist/types/sdk/src/shell/ShellRootContext.d.ts +15 -0
  149. package/dist/types/sdk/src/shell/dock-persistence.d.ts +49 -0
  150. package/dist/types/sdk/src/shell/exclusive-overlay.d.ts +16 -0
  151. package/dist/types/sdk/src/shell/index.d.ts +12 -0
  152. package/dist/types/sdk/src/shell/thread-scroll/ThreadHeadroom.d.ts +11 -0
  153. package/dist/types/sdk/src/shell/thread-scroll/headroom.d.ts +4 -0
  154. package/dist/types/sdk/src/shell/thread-scroll/index.d.ts +6 -0
  155. package/dist/types/sdk/src/shell/thread-scroll/pin-turn-head.d.ts +12 -0
  156. package/dist/types/sdk/src/shell/thread-scroll/settle-thread-row.d.ts +23 -0
  157. package/dist/types/sdk/src/shell/thread-scroll/thread-geometry.d.ts +27 -0
  158. package/dist/types/sdk/src/shell/thread-scroll/thread-row-attr.d.ts +4 -0
  159. package/dist/types/sdk/src/shell/thread-scroll/use-pin-turn-to-top.d.ts +22 -0
  160. package/dist/types/sdk/src/shell/thread-scroll/use-scroll-has-more-below.d.ts +19 -0
  161. package/dist/types/sdk/src/shell/thread-scroll/use-thread-jump-marks.d.ts +28 -0
  162. package/dist/types/sdk/src/shell/thread-scroll/use-thread-landing.d.ts +1 -0
  163. package/dist/types/sdk/src/shell/use-composer-chip-select.d.ts +21 -0
  164. package/dist/types/sdk/src/shell/use-go-home.d.ts +11 -0
  165. package/dist/types/sdk/src/shell/use-hydrated.d.ts +19 -0
  166. package/dist/types/sdk/src/shell/use-menu-item-select.d.ts +13 -0
  167. package/dist/types/sdk/src/shell/use-overridable-toggle.d.ts +24 -0
  168. package/dist/types/sdk/src/shell/use-thread-rows.d.ts +41 -0
  169. package/dist/types/sdk/src/social/index.d.ts +2 -0
  170. package/dist/types/sdk/src/social/use-review-helpful.d.ts +10 -0
  171. package/dist/types/sdk/src/social/use-testimonials-carousel.d.ts +15 -0
  172. package/dist/types/sdk/src/utils/core-utils/format-distance.d.ts +6 -0
  173. package/dist/types/sdk/src/utils/core-utils/format-price.d.ts +7 -0
  174. package/dist/types/sdk/src/utils/core-utils/index.d.ts +10 -0
  175. package/dist/types/sdk/src/utils/core-utils/inject-google-fonts.d.ts +17 -0
  176. package/dist/types/sdk/src/utils/core-utils/is-on-sale.d.ts +6 -0
  177. package/dist/types/sdk/src/utils/core-utils/is-video-url.d.ts +6 -0
  178. package/dist/types/sdk/src/utils/core-utils/maps-directions-url.d.ts +5 -0
  179. package/dist/types/sdk/src/utils/core-utils/mint-id.d.ts +10 -0
  180. package/dist/types/sdk/src/utils/core-utils/resolve-swatch-color.d.ts +2 -0
  181. package/dist/types/sdk/src/utils/core-utils/validate-all.d.ts +13 -0
  182. package/dist/types/sdk/src/utils/index.d.ts +10 -0
  183. package/dist/types/sdk/src/utils/storage.d.ts +9 -0
  184. package/dist/types/sdk/src/utils/use-document-visible.d.ts +9 -0
  185. package/dist/types/sdk/src/utils/use-form-factor.d.ts +24 -0
  186. package/dist/types/sdk/src/utils/use-inline-completion.d.ts +48 -0
  187. package/dist/types/sdk/src/utils/use-interval.d.ts +7 -0
  188. package/dist/types/sdk/src/utils/use-success-flash.d.ts +35 -0
  189. package/dist/types/sdk/src/utils/use-wake-lock.d.ts +15 -0
  190. package/dist/types/sdk/src/utils/viewport-window.d.ts +39 -0
  191. package/dist/types/sdk/src/voice/index.d.ts +2 -0
  192. package/dist/types/sdk/src/voice/use-dictation.d.ts +80 -0
  193. package/dist/types/sdk/src/voice/use-voice-capture.d.ts +65 -0
  194. package/dist/types/sdk/src/widgets/presence/core-presence/fact-form-registry.d.ts +43 -0
  195. package/dist/types/sdk/src/widgets/presence/core-presence/fact-shape.d.ts +70 -0
  196. package/dist/types/sdk/src/widgets/presence/core-presence/form-registry.d.ts +28 -0
  197. package/dist/types/sdk/src/widgets/presence/core-presence/knowledge.d.ts +18 -0
  198. package/dist/types/sdk/src/widgets/presence/core-presence/presence-restore.d.ts +13 -0
  199. package/dist/types/sdk/src/widgets/presence/core-presence/presence-stream.d.ts +64 -0
  200. package/dist/types/sdk/src/widgets/presence/core-presence/source-form-registry.d.ts +129 -0
  201. package/dist/types/sdk/src/widgets/presence/core-presence/standing-signal-store.d.ts +19 -0
  202. package/dist/types/sdk/src/widgets/presence/flows/flow-store.d.ts +22 -0
  203. package/dist/types/sdk/src/widgets/presence/index.d.ts +17 -0
  204. package/dist/types/sdk/src/widgets/presence/runtime-context.d.ts +109 -0
  205. package/dist/types/sdk/src/widgets/presence/use-layout-entity-ids.d.ts +12 -0
  206. package/dist/types/sdk/src/widgets/presence/use-optimistic-facts.d.ts +43 -0
  207. package/dist/types/sdk/src/widgets/presence/use-optimistic-flow-set.d.ts +24 -0
  208. package/dist/types/sdk/src/widgets/presence/use-presence-notch.d.ts +75 -0
  209. package/dist/types/sdk/src/widgets/presence/use-presence.d.ts +45 -0
  210. package/dist/types/sdk/src/widgets/presence/use-standing-signal.d.ts +12 -0
  211. package/dist/types/spacestation/src/analytics/catalog.d.ts +89 -0
  212. package/dist/types/spacestation/src/analytics/ecommerce/events.d.ts +183 -0
  213. package/dist/types/spacestation/src/analytics/ecommerce/funnel.d.ts +22 -0
  214. package/dist/types/spacestation/src/analytics/ecommerce/index.d.ts +14 -0
  215. package/dist/types/spacestation/src/analytics/ecommerce/surfacing.d.ts +42 -0
  216. package/dist/types/spacestation/src/analytics/envelope.d.ts +222 -0
  217. package/dist/types/spacestation/src/analytics/index.d.ts +28 -0
  218. package/dist/types/spacestation/src/analytics/kind.d.ts +155 -0
  219. package/dist/types/spacestation/src/analytics/session.d.ts +35 -0
  220. package/dist/types/spacestation/src/attachment/attachment.d.ts +83 -0
  221. package/dist/types/spacestation/src/catalog/attribute-registry.d.ts +148 -0
  222. package/dist/types/spacestation/src/catalog/attribute-scope.d.ts +41 -0
  223. package/dist/types/spacestation/src/catalog/canvas-arrangement.d.ts +43 -0
  224. package/dist/types/spacestation/src/catalog/catalog-schemas.d.ts +264 -0
  225. package/dist/types/spacestation/src/catalog/config.d.ts +13 -0
  226. package/dist/types/spacestation/src/catalog/derive-props-doc.d.ts +11 -0
  227. package/dist/types/spacestation/src/catalog/element-filled.d.ts +77 -0
  228. package/dist/types/spacestation/src/catalog/entity-refs.d.ts +14 -0
  229. package/dist/types/spacestation/src/catalog/function-props.d.ts +23 -0
  230. package/dist/types/spacestation/src/catalog/hydration-paths.d.ts +19 -0
  231. package/dist/types/spacestation/src/catalog/prose.d.ts +60 -0
  232. package/dist/types/spacestation/src/catalog/ref-sites.d.ts +45 -0
  233. package/dist/types/spacestation/src/catalog/required-props.d.ts +31 -0
  234. package/dist/types/spacestation/src/catalog/resolved.d.ts +145 -0
  235. package/dist/types/spacestation/src/catalog/structural-baseline.d.ts +7 -0
  236. package/dist/types/spacestation/src/catalog/wire/catalog-wire.d.ts +191 -0
  237. package/dist/types/spacestation/src/catalog/wire/index.d.ts +5 -0
  238. package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +351 -0
  239. package/dist/types/spacestation/src/catalog/wire/schema-from-wire.d.ts +7 -0
  240. package/dist/types/spacestation/src/catalog/wire/schema-to-wire.d.ts +8 -0
  241. package/dist/types/spacestation/src/catalog/wire/wire-schema.d.ts +78 -0
  242. package/dist/types/spacestation/src/commerce/cart-add-signal.d.ts +125 -0
  243. package/dist/types/spacestation/src/commerce/cart-state.d.ts +87 -0
  244. package/dist/types/spacestation/src/commerce/cart-verb-signals.d.ts +80 -0
  245. package/dist/types/spacestation/src/commerce/page-kinds.d.ts +40 -0
  246. package/dist/types/spacestation/src/commerce/selection-signal.d.ts +25 -0
  247. package/dist/types/spacestation/src/contracts/entry-context.d.ts +35 -0
  248. package/dist/types/spacestation/src/contracts/knowledge/index.d.ts +12 -0
  249. package/dist/types/spacestation/src/contracts/knowledge/types.d.ts +238 -0
  250. package/dist/types/spacestation/src/contracts/retrieval/core/knowledge-source.d.ts +36 -0
  251. package/dist/types/spacestation/src/contracts/retrieval/core/platform-connector.d.ts +49 -0
  252. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/source.d.ts +3 -0
  253. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/types.d.ts +29 -0
  254. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/client.d.ts +238 -0
  255. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/source.d.ts +3 -0
  256. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/types.d.ts +23 -0
  257. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/connector.d.ts +11 -0
  258. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/domains.d.ts +27 -0
  259. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/source.d.ts +3 -0
  260. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/types.d.ts +21 -0
  261. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/option-values.d.ts +71 -0
  262. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/source.d.ts +3 -0
  263. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/types.d.ts +18 -0
  264. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/source.d.ts +5 -0
  265. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/types.d.ts +47 -0
  266. package/dist/types/spacestation/src/contracts/retrieval/index.d.ts +25 -0
  267. package/dist/types/spacestation/src/contracts/session-arrival-params.d.ts +32 -0
  268. package/dist/types/spacestation/src/contracts/session-arrival.d.ts +215 -0
  269. package/dist/types/spacestation/src/contracts/tools/definitions.d.ts +139 -0
  270. package/dist/types/spacestation/src/contracts/tools/execution-context.d.ts +135 -0
  271. package/dist/types/spacestation/src/contracts/tools/index.d.ts +9 -0
  272. package/dist/types/spacestation/src/contracts/tools/types.d.ts +163 -0
  273. package/dist/types/spacestation/src/focus/focus.d.ts +12 -0
  274. package/dist/types/spacestation/src/hydration/hydration.d.ts +46 -0
  275. package/dist/types/spacestation/src/index.d.ts +71 -0
  276. package/dist/types/spacestation/src/layout/apply-patch.d.ts +17 -0
  277. package/dist/types/spacestation/src/layout/conversation.d.ts +136 -0
  278. package/dist/types/spacestation/src/layout/layout-diff.d.ts +17 -0
  279. package/dist/types/spacestation/src/layout/layout.d.ts +275 -0
  280. package/dist/types/spacestation/src/layout/page.d.ts +244 -0
  281. package/dist/types/spacestation/src/layout/patch.d.ts +92 -0
  282. package/dist/types/spacestation/src/layout/reduce-patch.d.ts +19 -0
  283. package/dist/types/spacestation/src/layout/reserved-ids.d.ts +13 -0
  284. package/dist/types/spacestation/src/projection/projection.d.ts +249 -0
  285. package/dist/types/spacestation/src/shell/shell.d.ts +109 -0
  286. package/dist/types/spacestation/src/signal/agent-signals.d.ts +539 -0
  287. package/dist/types/spacestation/src/space/connector.d.ts +61 -0
  288. package/dist/types/spacestation/src/space/generation-job.d.ts +4 -0
  289. package/dist/types/spacestation/src/space/hosting.d.ts +36 -0
  290. package/dist/types/spacestation/src/space/manifest.d.ts +8 -0
  291. package/dist/types/spacestation/src/space/package-version.d.ts +18 -0
  292. package/dist/types/spacestation/src/space/package.d.ts +35 -0
  293. package/dist/types/spacestation/src/space/prompt-config.d.ts +17 -0
  294. package/dist/types/spacestation/src/space/session-activity.d.ts +71 -0
  295. package/dist/types/spacestation/src/space/session-queue.d.ts +2147 -0
  296. package/dist/types/spacestation/src/space/space-config.d.ts +96 -0
  297. package/dist/types/spacestation/src/space/space-otp.d.ts +18 -0
  298. package/dist/types/spacestation/src/space/space.d.ts +104 -0
  299. package/dist/types/spacestation/src/space/tool-manifest.d.ts +8 -0
  300. package/dist/types/spacestation/src/space/trace.d.ts +555 -0
  301. package/dist/types/spacestation/src/space/workspace-catalog.d.ts +112 -0
  302. package/dist/types/spacestation/src/tool-compression/compress.d.ts +88 -0
  303. package/dist/types/spacestation/src/tool-compression/index.d.ts +11 -0
  304. package/dist/types/spacestation/src/tool-compression/scoring.d.ts +38 -0
  305. package/dist/types/spacestation/src/tool-compression/tokenize.d.ts +29 -0
  306. package/dist/types/spacestation/src/trace/trace-data.d.ts +126 -0
  307. package/dist/types/spacestation/src/trace/trace-diagnostics.d.ts +224 -0
  308. package/dist/types/spacestation/src/trace/trace-envelopes.d.ts +144 -0
  309. package/dist/types/spacestation/src/trace/trace-events.d.ts +450 -0
  310. package/dist/types/spacestation/src/types.d.ts +253 -0
  311. package/dist/types/spacestation/src/view/continuation.d.ts +45 -0
  312. package/dist/types/spacestation/src/widgets/presence/element.d.ts +241 -0
  313. package/dist/types/spacestation/src/widgets/presence/frame.d.ts +56 -0
  314. package/dist/types/spacestation/src/widgets/presence/index.d.ts +4 -0
  315. package/dist/types/spacestation/src/widgets/presence/profile.d.ts +75 -0
  316. package/dist/types/spacestation/src/widgets/presence/scan.d.ts +45 -0
  317. package/package.json +43 -0
@@ -0,0 +1,91 @@
1
+ /**
2
+ * The delivery contract the SDK DECLARES and `@fourty/react` FILLS.
3
+ *
4
+ * ── WHY THE SPLIT RUNS EXACTLY HERE ────────────────────────────────────────
5
+ *
6
+ * `docs/architecture-invariants.md` §0: nothing under `packages/sdk/src/**` may
7
+ * import `@fourty/react`. And one measured fact — `grep -rn "fetch(" packages/sdk/src`
8
+ * outside tests returns nothing; every byte this app sends leaves through the
9
+ * engine's `session-api.ts` or `transport/WireTransport.ts`. Put together:
10
+ *
11
+ * - the SDK owns the QUEUE, because the queue is called from store mutators
12
+ * that must not import the engine;
13
+ * - `@fourty/react` owns the I/O, because only the engine layer performs it;
14
+ * - a catalog component or a brand package reads `useAnalyticsSink()` and
15
+ * never learns that a network exists.
16
+ *
17
+ * The same three-part seam the repo already runs for `FourtyRuntime`
18
+ * (`sdk/src/canvas/runtime-context.tsx` declares → `react/src/provider/runtime-bridge.ts`
19
+ * fills → `FourtyProvider.tsx` mounts), `PresenceRuntime`, and
20
+ * `FourtySessionContextValue`. Reversing it — putting the queue in
21
+ * `@fourty/react` — would mean `checkout-handoff-store.ts` importing the engine,
22
+ * which is the §0 deviation verbatim.
23
+ *
24
+ * NOTHING IN THIS FILE RUNS. It is types only; the implementation lands in
25
+ * `packages/react/src/analytics/http-transport.ts`.
26
+ */
27
+ import type { AnalyticsBatch } from '../../../spacestation/src/analytics/index';
28
+ import type { AnalyticsScope } from './scope';
29
+ /**
30
+ * What one delivery attempt did.
31
+ *
32
+ * A discriminated union and never a boolean, because the caller must NARROW:
33
+ * a refusal and a network failure need opposite handling, and a boolean makes
34
+ * them the same value. The mistake being avoided is in the repo —
35
+ * `applyServerState` returns a boolean its one caller
36
+ * (`use-agent-event-router.ts:211`) throws away.
37
+ */
38
+ export type DeliveryResult =
39
+ /** Stored (or knowingly discarded by a switched-off rail, which answers 202
40
+ * with `disabled: true` — see the ingest route). Nothing to retry. */
41
+ {
42
+ readonly status: 'accepted';
43
+ }
44
+ /**
45
+ * The server UNDERSTOOD and refused (4xx). Never re-queue: a content refusal
46
+ * belongs in `client_event_exceptions`, not in a retry loop that will be
47
+ * refused identically forever.
48
+ */
49
+ | {
50
+ readonly status: 'refused';
51
+ readonly reason: string;
52
+ }
53
+ /**
54
+ * Network-class failure — offline, throttled tab, 503. The batch is the only
55
+ * copy of those rows in existence, so it goes back to the FRONT of the outbox
56
+ * under the same ceiling.
57
+ *
58
+ * This is the ONE inversion from the server-side sink, whose comment
59
+ * (`apps/api/src/lib/llm-usage-sink.ts:93-94`) says rows are "deliberately NOT
60
+ * re-queued: a persistent failure (bad schema, revoked key) would otherwise
61
+ * retry forever". That reasoning holds on a server, where failures are
62
+ * permanent and the row can be re-derived. In a browser the dominant failure
63
+ * is transient and there is no second copy.
64
+ */
65
+ | {
66
+ readonly status: 'unreachable';
67
+ readonly reason: string;
68
+ };
69
+ export interface AnalyticsTransport {
70
+ /**
71
+ * Bind to one scope for the life of one mount. Returns the unbind, so the
72
+ * mount's effect cleanup tears the flush timer and the unload listeners down
73
+ * with the scope that owns them.
74
+ */
75
+ bind(scope: AnalyticsScope): () => void;
76
+ /** The ordinary path. The result MUST be narrowed by its caller. */
77
+ send(batch: AnalyticsBatch): Promise<DeliveryResult>;
78
+ /**
79
+ * The TERMINAL path — unmount, session teardown, `pagehide`,
80
+ * `visibilitychange` → hidden.
81
+ *
82
+ * Fire-and-forget BY CONSTRUCTION: it returns nothing, so a caller cannot
83
+ * write code that waits on it, and there is nothing to restore an
84
+ * `unreachable` result into anyway — the scope that owned the rows is gone.
85
+ * Implemented with `navigator.sendBeacon`, which sets no headers and does not
86
+ * follow redirects (`apps/platform/next.config.ts:144-151` already sets
87
+ * `skipTrailingSlashRedirect` because beacons "don't reliably follow
88
+ * redirects"), so the implementation posts to a byte-exact URL.
89
+ */
90
+ sendFinal(batch: AnalyticsBatch): void;
91
+ }
@@ -0,0 +1,2 @@
1
+ export { useListTransition } from './useListTransition';
2
+ export { useUpdateTransition } from './useUpdateTransition';
@@ -0,0 +1,16 @@
1
+ interface ListTransitionResult<T> {
2
+ /** Keys of items that are newly entering */
3
+ enteringKeys: Set<string>;
4
+ /** Items that have been removed but should still render for exit animation */
5
+ exitingItems: T[];
6
+ /** All items to render (current + exiting) */
7
+ renderItems: T[];
8
+ }
9
+ /**
10
+ * Tracks list item enter/exit for animated list components.
11
+ * Returns entering/exiting sets so the component can apply AnimatePresence on individual items.
12
+ *
13
+ * Exiting items stay in the render list for `exitDuration` ms, then are cleaned up.
14
+ */
15
+ export declare function useListTransition<T>(items: T[], keyFn: (item: T) => string, exitDuration?: number): ListTransitionResult<T>;
16
+ export {};
@@ -0,0 +1,16 @@
1
+ interface UpdateTransitionResult<T> {
2
+ displayValue: T;
3
+ isTransitioning: boolean;
4
+ transitionStyle: {
5
+ opacity: number;
6
+ transition: string;
7
+ };
8
+ }
9
+ /**
10
+ * Smoothly transitions between old and new values with a crossfade effect.
11
+ * Uses CSS transitions (not Framer Motion) to stay lightweight.
12
+ *
13
+ * When `value` changes: fade out (1→0) → swap displayValue → fade in (0→1)
14
+ */
15
+ export declare function useUpdateTransition<T>(value: T, duration?: number): UpdateTransitionResult<T>;
16
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Per-element SDK identity context. Provided by HydratedComponent for every
3
+ * rendered layout element. Components that need the element ID for SDK signals
4
+ * (e.g. `view.refs_resolved`) read it here instead of via a `__elementId`
5
+ * prop — keeping the SDK identity out of component prop signatures and
6
+ * preventing it from leaking to the DOM via `{...props}` spreads.
7
+ */
8
+ export declare const ElementIdContext: import("react").Context<string | null>;
9
+ /**
10
+ * Returns the current layout element's SDK identity string, or `null` when
11
+ * rendered outside a HydratedComponent (e.g. Storybook, tests).
12
+ */
13
+ export declare function useElementId(): string | null;
@@ -0,0 +1,13 @@
1
+ import { type GenerationStyle } from './generation-style';
2
+ /**
3
+ * The active generation style — PROVIDED by this SDK's
4
+ * CanvasMotionProvider (from the active canvas-motion profile's `generation`
5
+ * block), CONSUMED by catalog components that participate in generation
6
+ * motion (ProductImage blur-up, skeletons, entrances).
7
+ *
8
+ * The default keeps every consumer functional outside a canvas (playground,
9
+ * tests, storybook-style surfaces).
10
+ */
11
+ export declare const GenerationStyleContext: import("react").Context<GenerationStyle>;
12
+ export declare const GenerationStyleProvider: import("react").Provider<GenerationStyle>;
13
+ export declare function useGenerationStyle(): GenerationStyle;
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ export interface ShimmerSweepProps {
3
+ /** One full sweep in seconds. */
4
+ durationS: number;
5
+ }
6
+ /**
7
+ * The skeleton shimmer — a soft highlight sweeping across the parent box on
8
+ * a loop. The "this is being composed right now" signal.
9
+ *
10
+ * Mount inside any `position: relative; overflow: hidden` skeleton surface.
11
+ * Compositor-only (translateX on an absolutely-positioned gradient layer),
12
+ * safe to run on many skeletons at once. The highlight color is the
13
+ * brand-overridable `--fourty-shimmer-highlight` token.
14
+ *
15
+ * Shared by this SDK's streaming placeholder and @fourty/ui's
16
+ * ShimmerSkeleton — one sweep, one definition.
17
+ */
18
+ export declare function ShimmerSweep({ durationS }: ShimmerSweepProps): React.ReactElement | null;
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ /**
3
+ * Transition contract — wraps a single layout element. The SDK calls this
4
+ * for every root-level child so brand packages can swap entry/exit
5
+ * animation policy without forking the renderer.
6
+ *
7
+ * `id` doubles as the AnimatePresence key — passing it lets parent renderers
8
+ * coordinate exits when an element is removed from the spec mid-stream.
9
+ */
10
+ export interface LayoutTransitionItemProps {
11
+ id: string;
12
+ children: React.ReactNode;
13
+ /**
14
+ * This child's position in the root list, and how many siblings there are.
15
+ * A stage uses them to cascade sections down the page — and to run that
16
+ * cascade in reverse when the visitor is travelling backwards through
17
+ * their history, which is what makes a rewind legible as a rewind.
18
+ */
19
+ index: number;
20
+ count: number;
21
+ /**
22
+ * Applied to the motion wrapper. Used by the renderer to attach
23
+ * viewport-fit flex sizing (e.g. `flex: 1 1 0` for fillers,
24
+ * `flex: 0 0 auto` + max-height for shrinks) so each top-level
25
+ * child claims its share of the page's height.
26
+ */
27
+ style?: React.CSSProperties;
28
+ className?: string;
29
+ }
30
+ /**
31
+ * Wraps the entire root child list. Required so AnimatePresence can observe
32
+ * adds/removes across siblings — wrapping per-item alone wouldn't see the
33
+ * removal because the parent unmounts the wrapper too early.
34
+ */
35
+ export interface LayoutTransitionGroupProps {
36
+ children: React.ReactNode;
37
+ }
38
+ export interface LayoutTransition {
39
+ Group: React.ComponentType<LayoutTransitionGroupProps>;
40
+ Item: React.ComponentType<LayoutTransitionItemProps>;
41
+ }
42
+ /**
43
+ * No-op transition — instant mount/unmount. Kept as the explicit opt-out: a
44
+ * brand can `<TransitionProvider transition={FadeTransition}>` to disable the
45
+ * default wipe.
46
+ */
47
+ export declare const FadeTransition: LayoutTransition;
48
+ export declare function TransitionProvider({ transition, children, }: {
49
+ transition: LayoutTransition;
50
+ children: React.ReactNode;
51
+ }): import("react/jsx-runtime").JSX.Element;
52
+ export declare function useLayoutTransition(): LayoutTransition;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { CanvasArrangement } from '../../../spacestation/src/index';
3
+ export interface CanvasArrangementValue {
4
+ arrangement: CanvasArrangement;
5
+ /** One page per turn: a turn that answers something new shows only its own
6
+ * blocks; one that only adds (`extendsPage` blocks) keeps the page. */
7
+ turnPages: boolean;
8
+ }
9
+ /**
10
+ * How the canvas arranges the agent's top-level blocks. A brand shell mounts
11
+ * this around its canvas (`'bento'` → a 12-column grid packed from each
12
+ * block's catalog `size`; `turnPages` → each turn its own page); the engine
13
+ * reads it. The agent is unaware of it.
14
+ */
15
+ export declare function CanvasArrangementProvider({ arrangement, turnPages, children, }: {
16
+ arrangement: CanvasArrangement;
17
+ turnPages?: boolean;
18
+ children: React.ReactNode;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export declare function useCanvasArrangement(): CanvasArrangementValue;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import type { EntranceTreatment, GenerationTimings } from './generation-style';
3
+ /**
4
+ * A brand's choice of how its canvas MOVES — the entrance treatment and the
5
+ * timings the engine's generation style uses — layered over the engine's
6
+ * active profile. Absent (the default), every space moves exactly as before.
7
+ */
8
+ export interface CanvasMotionStyle {
9
+ entrance?: EntranceTreatment;
10
+ timings?: Partial<GenerationTimings>;
11
+ }
12
+ /** Mounted by a brand shell around its canvas; the engine reads it. */
13
+ export declare function CanvasMotionStyleProvider({ style, children }: {
14
+ style: CanvasMotionStyle;
15
+ children: React.ReactNode;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ /** The brand's motion overrides, or `null` when the brand chose none. */
18
+ export declare function useCanvasMotionStyle(): CanvasMotionStyle | null;
@@ -0,0 +1,14 @@
1
+ import { type ComponentType, type ReactNode } from 'react';
2
+ /** Engine-side: hand the shell the canvas it should mount. */
3
+ export declare function CanvasOutletProvider({ canvas, children }: {
4
+ canvas: ComponentType;
5
+ children: ReactNode;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ /**
8
+ * The agent's canvas — where a shell places the composed layout.
9
+ *
10
+ * The canvas itself is the engine's; a shell only decides WHERE it sits. This
11
+ * outlet is how a shell mounts it without importing the engine: the engine
12
+ * provides the component, the shell renders `<SpacefrontCanvas />`.
13
+ */
14
+ export declare function SpacefrontCanvas(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * A tail is the component rendered BELOW the agent's curated layout on the
4
+ * active canvas panel — today the LLM continuation's live loading foot (the
5
+ * agent's "what I'm pulling together next" read on `EXTEND_FLOW`). It is
6
+ * supplied by the UI layer (which owns vertical components) and consumed by
7
+ * the canvas via context, because this SDK must never import `@fourty/ui`
8
+ * (the dependency runs the other way). This is the single inverted touchpoint: `FourtyCanvas`
9
+ * renders `<CanvasTailMount/>` generically; the actual tail is injected once,
10
+ * near the shell. The tail reads all it needs from the agent flow store
11
+ * (`EXTEND_FLOW`), so the seam passes no props.
12
+ */
13
+ export type CanvasTailComponent = React.ComponentType;
14
+ /**
15
+ * Supplies the canvas tail to the subtree. Mount near the shell (e.g. in
16
+ * SpaceFront) with the vertical's tail; spaces that supply none simply
17
+ * render no tail.
18
+ */
19
+ export declare function CanvasTailProvider({ tail, children, }: {
20
+ tail: CanvasTailComponent;
21
+ children: React.ReactNode;
22
+ }): React.ReactElement;
23
+ export declare function useCanvasTail(): CanvasTailComponent | null;
24
+ /**
25
+ * The generic mount point dropped into `CanvasPanel`. Renders the injected
26
+ * tail only for the ACTIVE panel (keep-alive panels never grow a tail) and
27
+ * only when a tail was supplied. All vertical logic lives inside the tail.
28
+ */
29
+ export declare function CanvasTailMount({ isActive, }: {
30
+ isActive: boolean;
31
+ }): React.ReactElement | null;
@@ -0,0 +1,140 @@
1
+ import type { Spec } from '../../../spacestation/src/index';
2
+ import type { TurnChangeAnchor } from './turn-change-anchor';
3
+ /**
4
+ * The attribute `FourtyCanvas` stamps on the ONE visible keep-alive panel, and
5
+ * the selector every scoped lookup is built from.
6
+ *
7
+ * One literal, derived once. Inactive panels stay mounted, so an unscoped
8
+ * `[data-fourty-element]` / `[data-turn-id]` query can match inside a view the
9
+ * visitor already left — which makes this string load-bearing in the scroll,
10
+ * motion, ceiling and inspector paths alike. It was previously re-typed in nine
11
+ * places across `packages/react` (twice as a private `ACTIVE_PANEL` const, six
12
+ * times as a bare literal, once as the JSX that writes it), so a rename would
13
+ * have silently un-scoped whichever copies were missed rather than failing.
14
+ */
15
+ export declare const ACTIVE_PANEL_ATTR = "data-fourty-panel-active";
16
+ export declare const ACTIVE_PANEL_SELECTOR = "[data-fourty-panel-active]";
17
+ /** Resolve a layout element id to its scrollable box, scoped to the active panel. */
18
+ export declare function findElementScrollTarget(scroller: HTMLElement, elementId: string): HTMLElement | null;
19
+ /**
20
+ * Resolve a `TurnChangeAnchor` to its scrollable box. When the anchor carries a
21
+ * `refId` (a change INSIDE a long component — a grown item list), prefer that
22
+ * item's FLIP wrapper (`data-flip-id`, scoped to the component so a reused id
23
+ * elsewhere can't steal it) so the viewport lands on the change, not the
24
+ * component top. Falls back to the component box when the item isn't in the DOM
25
+ * (not an item, or not hydrated yet). `refId`-less anchors resolve exactly like
26
+ * `findElementScrollTarget` — the engine's existing behavior is unchanged.
27
+ */
28
+ export declare function findChangeAnchorTarget(scroller: HTMLElement, anchor: TurnChangeAnchor): HTMLElement | null;
29
+ /**
30
+ * The CHANGED ITEM's box only — no component-level fallback.
31
+ *
32
+ * `findChangeAnchorTarget` silently degrades to the component when the item is
33
+ * not in the DOM, which is right for a one-shot settle but wrong for a live
34
+ * reveal: during streaming the item mounts a frame or two AFTER the focus
35
+ * fires, so the fallback wins the race and the viewport lands on the
36
+ * component's title with the actual change below the fold — the exact failure
37
+ * the `refId` exists to prevent. A caller that can afford to wait asks for the
38
+ * item strictly, and falls back on its own terms.
39
+ */
40
+ export declare function findChangeAnchorItem(scroller: HTMLElement, anchor: TurnChangeAnchor): HTMLElement | null;
41
+ /**
42
+ * Resolve a turn id to the box of the topmost element that turn produced.
43
+ * `excludeElementId` (the layout root) is skipped — delta turns re-emit the
44
+ * root to update its `children`, so the root's stamp tracks "last touched",
45
+ * never "produced by"; it is a container, not a scroll destination.
46
+ */
47
+ export declare function findTurnScrollTarget(scroller: HTMLElement, messageId: string, excludeElementId?: string): HTMLElement | null;
48
+ /**
49
+ * True when every top-level section of `layout` (the root's children) was
50
+ * produced by `messageId`'s turn — i.e. the turn replaced the whole view, so
51
+ * time-traveling to it lands at the canvas top. The ROOT element's own stamp
52
+ * is deliberately NOT consulted: delta turns re-emit the root to update its
53
+ * `children` array, which would make every addition turn look like a full
54
+ * replace (the "rewind scrolls to top instead of the added section" bug).
55
+ */
56
+ export declare function turnOwnsView(layout: Spec, messageId: string): boolean;
57
+ /**
58
+ * The active panel's scroll-headroom spacer (rendered by `CanvasPanel`,
59
+ * sized imperatively by the canvas-motion engine so fresh content can pin
60
+ * to the viewport top even as the document's last section). Null when no
61
+ * active panel is mounted.
62
+ */
63
+ export declare function findPanelHeadroom(scroller: HTMLElement): HTMLElement | null;
64
+ /**
65
+ * The scroller's `scroll-padding-top` in px — the chrome band the browser's
66
+ * own `scrollIntoView` leaves clear (fixed brand headers overlaying the
67
+ * canvas top, e.g. the SM wordmark bar). Anchor math must measure against
68
+ * `scroller.top + this`, not the raw box top, or a perfectly-aligned target
69
+ * reads as "off by the header height". `auto`/unparsable → 0.
70
+ */
71
+ export declare function scrollPaddingTopOf(scroller: HTMLElement): number;
72
+ /** A viewport rectangle in `getBoundingClientRect()` client coordinates. */
73
+ export interface ViewportRect {
74
+ top: number;
75
+ bottom: number;
76
+ left: number;
77
+ right: number;
78
+ width: number;
79
+ height: number;
80
+ }
81
+ /**
82
+ * The scroller's VIEWPORT box, in the same client coordinates
83
+ * `getBoundingClientRect()` reports.
84
+ *
85
+ * For an `overflow` scroller the border box IS the viewport, so the raw rect is
86
+ * right. But the mobile shell scrolls the DOCUMENT (see `documentScrollRef`),
87
+ * and the document scrolling element's border box is the whole PAGE:
88
+ * `top === -scrollTop`, `bottom === -scrollTop + documentHeight`. Rect math
89
+ * against that reads every element as on-screen — `isFullyVisible` returns true
90
+ * for everything and the reveal scroll never moves. Its true viewport in client
91
+ * coordinates is origin-anchored: the root's client box IS the layout viewport,
92
+ * the very space `getBoundingClientRect()` measures from.
93
+ *
94
+ * `scrollTop` / `scrollHeight` / `clientHeight` / `scrollTo` are all correct on
95
+ * the document scroller — only the rect needed correcting.
96
+ */
97
+ export declare function viewportRectOf(scroller: HTMLElement): ViewportRect;
98
+ /**
99
+ * The client-Y line a `block: 'start'` scroll aligns a target's top edge to:
100
+ * the scroller's viewport top plus its `scroll-padding-top` (the fixed-chrome
101
+ * band). One definition shared by the streaming pin and the nav/time-travel
102
+ * settle, which must agree on where "the top" is.
103
+ */
104
+ export declare function anchorLineOf(scroller: HTMLElement): number;
105
+ /**
106
+ * True when `target` sits ENTIRELY within the scroller's viewport (both
107
+ * edges) — used by reveal-only scrolls, where a top-edge-only peek isn't
108
+ * "shown": a partially-clipped target still glides in. An element taller
109
+ * than the viewport is never fully visible, so it always scrolls.
110
+ */
111
+ export declare function isFullyVisible(target: HTMLElement, scroller: HTMLElement): boolean;
112
+ /** Set by `armScrollGlide` for the duration of a nav-driven scroll landing. */
113
+ export declare function setNavScrollActive(scroller: HTMLElement, active: boolean): void;
114
+ /** True while a nav-driven scroll (see `setNavScrollActive`) is in flight. */
115
+ export declare function isNavScrollActive(scroller: HTMLElement): boolean;
116
+ /** Shallow string-array equality. */
117
+ export declare function arraysEqual(a: string[], b: string[]): boolean;
118
+ /**
119
+ * Distance from the top of the scroller's scrollable content to `el`'s top
120
+ * border — `offsetTop` summed up the offset-parent chain.
121
+ *
122
+ * Deliberately NOT `getBoundingClientRect()`: both the thread rows and the
123
+ * canvas sections carry animated transforms (the framer entrance `y: 8 → 0`,
124
+ * the canvas generation entrance, the nav glide that absorbs a scroll
125
+ * teleport), and a rect reads the TRANSFORMED box. The scroll settles aim at a
126
+ * target and then stop re-asserting, so aiming at a transform mid-flight
127
+ * either bakes a permanent few-px error into the landing or makes the loop
128
+ * chase the very animation running underneath it. `offsetTop` is the
129
+ * untransformed layout position — stable from the element's first frame.
130
+ *
131
+ * Measured as the DIFFERENCE of two document-relative walks rather than by
132
+ * walking up *to* the scroller: `offsetParent` skips straight past a static
133
+ * ancestor, so a scroller that isn't positioned never appears in the chain at
134
+ * all. The canvas scroller (`main.ams-main-scroll`) is exactly that — static —
135
+ * and a terminate-on-scroller walk silently returned null for every canvas
136
+ * anchor, which stopped time-travel landing on its turn. Subtracting works
137
+ * either way, and is identical to the old walk whenever the scroller IS the
138
+ * offset parent (the thread's case).
139
+ */
140
+ export declare function layoutTopWithin(el: HTMLElement, scroller: HTMLElement): number;
@@ -0,0 +1,26 @@
1
+ import type { Transition } from 'framer-motion';
2
+ import { type EntranceTreatment, type GenerationTimings } from './generation-style';
3
+ import type { NavDirection } from './nav-direction';
4
+ export interface EntranceMotionProps {
5
+ initial: Record<string, string | number>;
6
+ animate: Record<string, string | number>;
7
+ transition: Transition;
8
+ }
9
+ /**
10
+ * Build the framer props for one element's entrance.
11
+ *
12
+ * `staggerIndex` shifts the start by `rowStaggerS` per slot (grid rows);
13
+ * pass 0 for standalone sections.
14
+ *
15
+ * `direction` is which way the visitor is travelling through their own
16
+ * history. A `backward` entrance sinks in from further above, on a wider
17
+ * stagger step, and the mask sweeps the other way — an opened-up version of
18
+ * the compose, not a mirrored blink. Every forward navigation — a fresh
19
+ * turn, a product click, Forward — passes `'forward'` and gets the untouched
20
+ * original motion.
21
+ *
22
+ * Pair it with a reversed `staggerIndex` (see `SectionStage`) so a rewind
23
+ * un-builds the page from the bottom; that ordering, not the sign of the
24
+ * offset, is what actually reads as time running backwards.
25
+ */
26
+ export declare function buildEntranceProps(treatment: EntranceTreatment, timings: GenerationTimings, staggerIndex: number, direction: NavDirection): EntranceMotionProps;
@@ -0,0 +1,62 @@
1
+ /** How not-yet-arrived content is drawn. */
2
+ export type SkeletonTreatment = 'gray' | 'shimmer';
3
+ /** How the block the agent is currently composing is marked. */
4
+ export type ActiveBlockTreatment = 'none' | 'beam' | 'glow' | 'trail';
5
+ /** How an arrived section/card enters. */
6
+ export type EntranceTreatment = 'fade' | 'blur-resolve' | 'mask-reveal' | 'slide-spring' | 'rise';
7
+ /** How streamed text (titles, captions) resolves. */
8
+ export type TextTreatment = 'instant' | 'word-blur' | 'line-mask';
9
+ /** How product images resolve once loaded. */
10
+ export type ImageTreatment = 'pop' | 'blur-up';
11
+ export interface GenerationTimings {
12
+ /** Entrance duration in seconds (tween treatments; springs ignore it). */
13
+ entranceDurationS: number;
14
+ /** Delay between grid rows entering (seconds). */
15
+ rowStaggerS: number;
16
+ /** Spring physics for spring-driven entrances. */
17
+ springStiffness: number;
18
+ springDamping: number;
19
+ /** One full skeleton shimmer sweep (seconds). */
20
+ shimmerDurationS: number;
21
+ /** Active-block indicator loop duration (seconds). */
22
+ activeLoopS: number;
23
+ /** Per-word stagger for text reveals (seconds). */
24
+ wordStaggerS: number;
25
+ /** Image blur-up resolve duration (seconds). */
26
+ imageResolveS: number;
27
+ }
28
+ /** One complete generation style — the unit the playground exports. */
29
+ export interface GenerationStyle {
30
+ skeleton: SkeletonTreatment;
31
+ activeBlock: ActiveBlockTreatment;
32
+ entrance: EntranceTreatment;
33
+ text: TextTreatment;
34
+ image: ImageTreatment;
35
+ /** Micro scale-settle on the focal element when the turn completes. */
36
+ settlePulse: boolean;
37
+ /**
38
+ * Time-travel replays the generation: navigating to a history view
39
+ * (history-row click, back/forward) replays the entrance choreography
40
+ * instead of an instant static swap.
41
+ *
42
+ * The replay runs in the direction the visitor is travelling — see
43
+ * `NavDirection`. Forward it composes exactly as the agent did; backward
44
+ * it mirrors the entrance axis and plays on a compressed clock, so a
45
+ * rewind reads as tape running the other way rather than as the page
46
+ * being generated a second time. A visitor holding an arrow scrubs: steps
47
+ * arriving inside the controller's scrub window swap instantly instead of
48
+ * queueing a replay each.
49
+ */
50
+ replayOnNavigation: boolean;
51
+ timings: GenerationTimings;
52
+ }
53
+ export declare const DEFAULT_GENERATION_TIMINGS: GenerationTimings;
54
+ /**
55
+ * The platform default — the style selected in the Motion Playground on
56
+ * 2026-06-02 (exported JSON, translated here): shimmer skeletons,
57
+ * blur-resolve entrances, blur-up images, settle pulse; no active-block
58
+ * decoration, instant text.
59
+ */
60
+ export declare const DEFAULT_GENERATION_STYLE: GenerationStyle;
61
+ /** The editorial ease shared by mask/line reveals. */
62
+ export declare const GENERATION_EASE: [number, number, number, number];
@@ -0,0 +1,21 @@
1
+ export { FourtyRuntimeProvider, useFourtyRuntime, useOptionalFourtyRuntime, } from './runtime-context';
2
+ export { useTurn, useStream, useDisplayedLayout, useFourtyShell, useAgentDriven, useReasoning, useSessionState, useSessionId, useSessionMessages, useFacts, useConversationMessages, usePendingMessage, useCurrentMessageIndex, useSelectMessage, useExplicitTurnId, useExplicitTurnSelection, useHistoryNav, useCanvasBack, useCanvasViewBack, useCanvasForward, useConversationState, useSuggestionsWithDefaults, useComposerPlaceholder, useComposerPlaceholderRotation, useLayout, useFocalEntityId, useInteraction, useConversations, useHasLeftSeedHome, useVisitorName, } from './runtime-hooks';
3
+ export type { TurnInfo, HistoryNav, CanvasBack, CanvasForward, ConversationState, RuntimeSessionState, FourtyRuntime, InteractionActions, VisitorName, ExplicitTurnSelection, } from './runtime-types';
4
+ export { CanvasTailProvider, useCanvasTail, CanvasTailMount, type CanvasTailComponent, } from './canvas-tail';
5
+ export { GenerationStyleContext, GenerationStyleProvider, useGenerationStyle, } from './GenerationStyleContext';
6
+ export { ShimmerSweep, type ShimmerSweepProps } from './ShimmerSweep';
7
+ export { FadeTransition, TransitionProvider, useLayoutTransition, type LayoutTransitionItemProps, type LayoutTransitionGroupProps, type LayoutTransition, } from './TransitionContext';
8
+ export { CanvasArrangementProvider, useCanvasArrangement, type CanvasArrangementValue } from './canvas-arrangement';
9
+ export { CanvasMotionStyleProvider, useCanvasMotionStyle, type CanvasMotionStyle } from './canvas-motion-style';
10
+ export { ElementIdContext, useElementId } from './ElementIdContext';
11
+ export { buildEntranceProps, type EntranceMotionProps } from './generation-entrance';
12
+ export { INITIAL_NAV_PRESENTATION, type NavDirection, type NavPace, type NavPresentation, } from './nav-direction';
13
+ export { DEFAULT_GENERATION_TIMINGS, DEFAULT_GENERATION_STYLE, GENERATION_EASE, type SkeletonTreatment, type ActiveBlockTreatment, type EntranceTreatment, type TextTreatment, type ImageTreatment, type GenerationTimings, type GenerationStyle, } from './generation-style';
14
+ export { useCanvasActions, type CanvasActions } from './use-canvas-actions';
15
+ export { useFourtyLayout } from './use-fourty-layout';
16
+ export { findElementScrollTarget, findChangeAnchorTarget, findChangeAnchorItem, findTurnScrollTarget, turnOwnsView, findPanelHeadroom, scrollPaddingTopOf, layoutTopWithin, viewportRectOf, anchorLineOf, isFullyVisible, arraysEqual, setNavScrollActive, isNavScrollActive, ACTIVE_PANEL_ATTR, ACTIVE_PANEL_SELECTOR, type ViewportRect, } from './dom-targets';
17
+ export { scrollEventTarget } from './scroll-event-target';
18
+ export { deriveTurnChangeAnchor, changeAnchorWithin, type TurnChangeAnchor } from './turn-change-anchor';
19
+ export { turnEditedBlock } from './turn-edit';
20
+ export { CanvasOutletProvider, SpacefrontCanvas } from './canvas-outlet';
21
+ export * from './item-motion';
@@ -0,0 +1,72 @@
1
+ import React from 'react';
2
+ /** The DOM attribute carrying item identity — the FLIP matching contract. */
3
+ export declare const ITEM_IDENTITY_ATTR = "data-flip-id";
4
+ export interface ItemTransitionGroupProps<T> {
5
+ /** The component's current item list (already resolved/hydrated). */
6
+ items: T[];
7
+ /** Stable identity per item — for commerce items this is the entity id
8
+ * (product gid). Identity is what survives across agent patches. */
9
+ getId: (item: T) => string;
10
+ /** Renders one item. The group owns the motion wrapper around it. */
11
+ children: (item: T) => React.ReactNode;
12
+ /** The brand's container markup (grid / carousel row) — the group renders
13
+ * the real container element so FLIP measurements stay coherent. Each
14
+ * item is wrapped in a block-level motion element; brand grid styling
15
+ * should treat these wrappers as the grid children. */
16
+ className?: string;
17
+ style?: React.CSSProperties;
18
+ /** Class applied to each item's OUTER (FLIP) wrapper. For flex / scroll-snap
19
+ * layouts whose children carry the sizing + snap alignment (a carousel
20
+ * card). Grid layouts size via the container's `grid-template-columns` and
21
+ * leave this unset. */
22
+ itemClassName?: string;
23
+ /** Style applied to each item's OUTER (FLIP) wrapper — e.g. a carousel
24
+ * card's `flexBasis` / `minWidth`. Static across items (per-item sizing is
25
+ * not a transition concern). */
26
+ itemStyle?: React.CSSProperties;
27
+ }
28
+ /**
29
+ * ItemTransitionGroup — the item-scoped transition engine.
30
+ *
31
+ * Brand components wrap their item mapping with this group instead of a bare
32
+ * `items.map(...)`:
33
+ *
34
+ * ```tsx
35
+ * <ItemTransitionGroup items={products} getId={(p) => p.id} className="grid …">
36
+ * {(product) => <ProductCard product={product} />}
37
+ * </ItemTransitionGroup>
38
+ * ```
39
+ *
40
+ * The group is self-classifying: it diffs its own item identities across
41
+ * renders (no engine coupling), names the scenario (add / update / insert /
42
+ * remove / swap), and plays the active profile's behavior for it:
43
+ *
44
+ * - exiting items wipe out (kept mounted by AnimatePresence until done)
45
+ * - entering items wipe in (delayed one phase when the behavior is
46
+ * sequenced and something is exiting)
47
+ * - surviving items FLIP to their new positions (framer `layout`)
48
+ *
49
+ * Each item renders as TWO nested motion elements — this split is
50
+ * load-bearing, not stylistic:
51
+ *
52
+ * outer — `layout` (FLIP positioning) + identity. Framer's layout
53
+ * projection system owns this element's transform/clip.
54
+ * inner — the wipe variants (clip-path enter/exit).
55
+ *
56
+ * Putting `layout` and clip-path variants on the SAME element silently
57
+ * breaks the wipe: the layout projection system rewrites `clip-path` every
58
+ * frame (it uses it for scale correction), freezing the variant animation
59
+ * at its initial value — entering items stay invisible for the whole
60
+ * duration and then pop in. Keeping projection and wipe on separate
61
+ * elements is what makes both work.
62
+ *
63
+ * The detected scenario latches until the next change, so re-renders that
64
+ * happen while a transition is still playing (streaming patches, parent
65
+ * state) never switch behaviors mid-flight.
66
+ *
67
+ * Item identity lands in the DOM as `data-flip-id` — the matching contract.
68
+ *
69
+ * This is the single composition point for item motion: brand components
70
+ * never hand-roll item enter/exit/reposition animation.
71
+ */
72
+ export declare function ItemTransitionGroup<T>({ items, getId, children, className, style, itemClassName, itemStyle, }: ItemTransitionGroupProps<T>): React.ReactElement;