@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.
- package/dist/index.js +11918 -0
- package/dist/types/ecommerce/src/attribute-buckets.d.ts +79 -0
- package/dist/types/ecommerce/src/base-attributes.d.ts +42 -0
- package/dist/types/ecommerce/src/bucket-labels.d.ts +37 -0
- package/dist/types/ecommerce/src/cart-line-selections.d.ts +24 -0
- package/dist/types/ecommerce/src/commerce-schemas.d.ts +1813 -0
- package/dist/types/ecommerce/src/format-variant-value.d.ts +1 -0
- package/dist/types/ecommerce/src/index.d.ts +13 -0
- package/dist/types/ecommerce/src/locale.d.ts +31 -0
- package/dist/types/ecommerce/src/optimistic-cart-line.d.ts +38 -0
- package/dist/types/ecommerce/src/pdp-companions.d.ts +21 -0
- package/dist/types/ecommerce/src/pick-product-card-action.d.ts +38 -0
- package/dist/types/ecommerce/src/product-lookup.d.ts +34 -0
- package/dist/types/ecommerce/src/projection-spec.d.ts +38 -0
- package/dist/types/ecommerce/src/review-schemas.d.ts +425 -0
- package/dist/types/sdk/src/analytics/consent.d.ts +52 -0
- package/dist/types/sdk/src/analytics/drops.d.ts +98 -0
- package/dist/types/sdk/src/analytics/emitting-scope.d.ts +2 -0
- package/dist/types/sdk/src/analytics/index.d.ts +12 -0
- package/dist/types/sdk/src/analytics/inert-scope.d.ts +2 -0
- package/dist/types/sdk/src/analytics/notify.d.ts +41 -0
- package/dist/types/sdk/src/analytics/outbox.d.ts +118 -0
- package/dist/types/sdk/src/analytics/scope-context.d.ts +24 -0
- package/dist/types/sdk/src/analytics/scope.d.ts +149 -0
- package/dist/types/sdk/src/analytics/surface.d.ts +77 -0
- package/dist/types/sdk/src/analytics/transport.d.ts +91 -0
- package/dist/types/sdk/src/animation/index.d.ts +2 -0
- package/dist/types/sdk/src/animation/useListTransition.d.ts +16 -0
- package/dist/types/sdk/src/animation/useUpdateTransition.d.ts +16 -0
- package/dist/types/sdk/src/canvas/ElementIdContext.d.ts +13 -0
- package/dist/types/sdk/src/canvas/GenerationStyleContext.d.ts +13 -0
- package/dist/types/sdk/src/canvas/ShimmerSweep.d.ts +18 -0
- package/dist/types/sdk/src/canvas/TransitionContext.d.ts +52 -0
- package/dist/types/sdk/src/canvas/canvas-arrangement.d.ts +20 -0
- package/dist/types/sdk/src/canvas/canvas-motion-style.d.ts +18 -0
- package/dist/types/sdk/src/canvas/canvas-outlet.d.ts +14 -0
- package/dist/types/sdk/src/canvas/canvas-tail.d.ts +31 -0
- package/dist/types/sdk/src/canvas/dom-targets.d.ts +140 -0
- package/dist/types/sdk/src/canvas/generation-entrance.d.ts +26 -0
- package/dist/types/sdk/src/canvas/generation-style.d.ts +62 -0
- package/dist/types/sdk/src/canvas/index.d.ts +21 -0
- package/dist/types/sdk/src/canvas/item-motion/ItemTransitionGroup.d.ts +72 -0
- package/dist/types/sdk/src/canvas/item-motion/classify-items.d.ts +24 -0
- package/dist/types/sdk/src/canvas/item-motion/index.d.ts +5 -0
- package/dist/types/sdk/src/canvas/item-motion/plugins/wipe.d.ts +11 -0
- package/dist/types/sdk/src/canvas/item-motion/profile.d.ts +77 -0
- package/dist/types/sdk/src/canvas/item-motion/wipe.d.ts +57 -0
- package/dist/types/sdk/src/canvas/nav-direction.d.ts +22 -0
- package/dist/types/sdk/src/canvas/runtime-context.d.ts +15 -0
- package/dist/types/sdk/src/canvas/runtime-hooks.d.ts +106 -0
- package/dist/types/sdk/src/canvas/runtime-types.d.ts +183 -0
- package/dist/types/sdk/src/canvas/scroll-event-target.d.ts +21 -0
- package/dist/types/sdk/src/canvas/turn-change-anchor.d.ts +34 -0
- package/dist/types/sdk/src/canvas/turn-edit.d.ts +8 -0
- package/dist/types/sdk/src/canvas/use-canvas-actions.d.ts +41 -0
- package/dist/types/sdk/src/canvas/use-fourty-layout.d.ts +19 -0
- package/dist/types/sdk/src/catalog/CatalogContext.d.ts +7 -0
- package/dist/types/sdk/src/catalog/DebugContext.d.ts +5 -0
- package/dist/types/sdk/src/catalog/HydrationStateContext.d.ts +45 -0
- package/dist/types/sdk/src/catalog/HydratorContext.d.ts +7 -0
- package/dist/types/sdk/src/catalog/component-library.d.ts +32 -0
- package/dist/types/sdk/src/catalog/define.d.ts +149 -0
- package/dist/types/sdk/src/catalog/hydrator-registry.d.ts +91 -0
- package/dist/types/sdk/src/catalog/index.d.ts +14 -0
- package/dist/types/sdk/src/catalog/interaction-contract.d.ts +78 -0
- package/dist/types/sdk/src/catalog/normalize-components.d.ts +17 -0
- package/dist/types/sdk/src/catalog/prose-value.d.ts +22 -0
- package/dist/types/sdk/src/catalog/registration/index.d.ts +4 -0
- package/dist/types/sdk/src/catalog/registration/register-component.d.ts +35 -0
- package/dist/types/sdk/src/catalog/registration/registry.d.ts +27 -0
- package/dist/types/sdk/src/catalog/registration/types.d.ts +83 -0
- package/dist/types/sdk/src/catalog/registry.d.ts +22 -0
- package/dist/types/sdk/src/catalog/render-inline.d.ts +39 -0
- package/dist/types/sdk/src/catalog/resolve-hydrators.d.ts +27 -0
- package/dist/types/sdk/src/chat/chat-context.d.ts +40 -0
- package/dist/types/sdk/src/chat/index.d.ts +1 -0
- package/dist/types/sdk/src/client-state/index.d.ts +2 -0
- package/dist/types/sdk/src/client-state/server-store.d.ts +38 -0
- package/dist/types/sdk/src/client-state/store.d.ts +20 -0
- package/dist/types/sdk/src/commerce/commerce-context.d.ts +62 -0
- package/dist/types/sdk/src/commerce/commerce-shapes.d.ts +170 -0
- package/dist/types/sdk/src/commerce/ecommerce/agentic-overlay.d.ts +27 -0
- package/dist/types/sdk/src/commerce/ecommerce/buy-now-exit.d.ts +36 -0
- package/dist/types/sdk/src/commerce/ecommerce/cart-action-failures.d.ts +54 -0
- package/dist/types/sdk/src/commerce/ecommerce/cart-drawer-store.d.ts +18 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-reasons.d.ts +54 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-shape.d.ts +73 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-store.d.ts +39 -0
- package/dist/types/sdk/src/commerce/ecommerce/comparison-rows.d.ts +30 -0
- package/dist/types/sdk/src/commerce/ecommerce/index.d.ts +21 -0
- package/dist/types/sdk/src/commerce/ecommerce/normalize-collection.d.ts +17 -0
- package/dist/types/sdk/src/commerce/ecommerce/preselect-from-facts.d.ts +25 -0
- package/dist/types/sdk/src/commerce/ecommerce/product-filters.d.ts +40 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-buy-now.d.ts +33 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-cart-drawer.d.ts +35 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-cart-line-row.d.ts +30 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-comparison-table.d.ts +22 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-look-card.d.ts +80 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-card.d.ts +62 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-carousel-scroll.d.ts +13 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-detail.d.ts +48 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-grid-filter.d.ts +17 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-selected-variants-state.d.ts +8 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-wishlist-drawer.d.ts +34 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-option-axes.d.ts +56 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-resolution.d.ts +83 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-selection.d.ts +22 -0
- package/dist/types/sdk/src/commerce/external-navigation.d.ts +41 -0
- package/dist/types/sdk/src/commerce/index.d.ts +9 -0
- package/dist/types/sdk/src/commerce/option-selection-store.d.ts +8 -0
- package/dist/types/sdk/src/commerce/pending-variant-choice-store.d.ts +20 -0
- package/dist/types/sdk/src/commerce/variant-selection-store.d.ts +7 -0
- package/dist/types/sdk/src/content/index.d.ts +2 -0
- package/dist/types/sdk/src/content/use-faq-accordion.d.ts +11 -0
- package/dist/types/sdk/src/content/use-newsletter-form.d.ts +16 -0
- package/dist/types/sdk/src/host/Spacefront.d.ts +11 -0
- package/dist/types/sdk/src/host/engine-loader.d.ts +14 -0
- package/dist/types/sdk/src/host/host-modules.d.ts +5833 -0
- package/dist/types/sdk/src/host/index.d.ts +4 -0
- package/dist/types/sdk/src/host/types.d.ts +52 -0
- package/dist/types/sdk/src/index.d.ts +21 -0
- package/dist/types/sdk/src/interaction/haptics.d.ts +8 -0
- package/dist/types/sdk/src/interaction/index.d.ts +3 -0
- package/dist/types/sdk/src/interaction/normalize-signals.d.ts +8 -0
- package/dist/types/sdk/src/interaction/withInteractionTracking.d.ts +48 -0
- package/dist/types/sdk/src/npm.d.ts +3 -0
- package/dist/types/sdk/src/projection/ProjectionSignalBridge.d.ts +5 -0
- package/dist/types/sdk/src/projection/index.d.ts +1 -0
- package/dist/types/sdk/src/projection/preferences.d.ts +12 -0
- package/dist/types/sdk/src/projection/transform.d.ts +7 -0
- package/dist/types/sdk/src/provider/AgentAsk.d.ts +16 -0
- package/dist/types/sdk/src/provider/index.d.ts +4 -0
- package/dist/types/sdk/src/provider/providers/handler-registry.d.ts +11 -0
- package/dist/types/sdk/src/provider/use-clamp-toggle.d.ts +22 -0
- package/dist/types/sdk/src/provider/use-timed-flag.d.ts +16 -0
- package/dist/types/sdk/src/rendering/index.d.ts +1 -0
- package/dist/types/sdk/src/rendering/post-hydration.d.ts +37 -0
- package/dist/types/sdk/src/session/FourtySessionContext.d.ts +228 -0
- package/dist/types/sdk/src/session/clear-registry.d.ts +6 -0
- package/dist/types/sdk/src/session/index.d.ts +4 -0
- package/dist/types/sdk/src/session/use-action.d.ts +25 -0
- package/dist/types/sdk/src/session/visitor-locale.d.ts +2 -0
- package/dist/types/sdk/src/shared/index.d.ts +2 -0
- package/dist/types/sdk/src/shared/use-expandable.d.ts +9 -0
- package/dist/types/sdk/src/shared/use-image-hover.d.ts +13 -0
- package/dist/types/sdk/src/shell/ScrollContainerContext.d.ts +25 -0
- package/dist/types/sdk/src/shell/ShellRegistry.d.ts +25 -0
- package/dist/types/sdk/src/shell/ShellRootContext.d.ts +15 -0
- package/dist/types/sdk/src/shell/dock-persistence.d.ts +49 -0
- package/dist/types/sdk/src/shell/exclusive-overlay.d.ts +16 -0
- package/dist/types/sdk/src/shell/index.d.ts +12 -0
- package/dist/types/sdk/src/shell/thread-scroll/ThreadHeadroom.d.ts +11 -0
- package/dist/types/sdk/src/shell/thread-scroll/headroom.d.ts +4 -0
- package/dist/types/sdk/src/shell/thread-scroll/index.d.ts +6 -0
- package/dist/types/sdk/src/shell/thread-scroll/pin-turn-head.d.ts +12 -0
- package/dist/types/sdk/src/shell/thread-scroll/settle-thread-row.d.ts +23 -0
- package/dist/types/sdk/src/shell/thread-scroll/thread-geometry.d.ts +27 -0
- package/dist/types/sdk/src/shell/thread-scroll/thread-row-attr.d.ts +4 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-pin-turn-to-top.d.ts +22 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-scroll-has-more-below.d.ts +19 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-thread-jump-marks.d.ts +28 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-thread-landing.d.ts +1 -0
- package/dist/types/sdk/src/shell/use-composer-chip-select.d.ts +21 -0
- package/dist/types/sdk/src/shell/use-go-home.d.ts +11 -0
- package/dist/types/sdk/src/shell/use-hydrated.d.ts +19 -0
- package/dist/types/sdk/src/shell/use-menu-item-select.d.ts +13 -0
- package/dist/types/sdk/src/shell/use-overridable-toggle.d.ts +24 -0
- package/dist/types/sdk/src/shell/use-thread-rows.d.ts +41 -0
- package/dist/types/sdk/src/social/index.d.ts +2 -0
- package/dist/types/sdk/src/social/use-review-helpful.d.ts +10 -0
- package/dist/types/sdk/src/social/use-testimonials-carousel.d.ts +15 -0
- package/dist/types/sdk/src/utils/core-utils/format-distance.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/format-price.d.ts +7 -0
- package/dist/types/sdk/src/utils/core-utils/index.d.ts +10 -0
- package/dist/types/sdk/src/utils/core-utils/inject-google-fonts.d.ts +17 -0
- package/dist/types/sdk/src/utils/core-utils/is-on-sale.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/is-video-url.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/maps-directions-url.d.ts +5 -0
- package/dist/types/sdk/src/utils/core-utils/mint-id.d.ts +10 -0
- package/dist/types/sdk/src/utils/core-utils/resolve-swatch-color.d.ts +2 -0
- package/dist/types/sdk/src/utils/core-utils/validate-all.d.ts +13 -0
- package/dist/types/sdk/src/utils/index.d.ts +10 -0
- package/dist/types/sdk/src/utils/storage.d.ts +9 -0
- package/dist/types/sdk/src/utils/use-document-visible.d.ts +9 -0
- package/dist/types/sdk/src/utils/use-form-factor.d.ts +24 -0
- package/dist/types/sdk/src/utils/use-inline-completion.d.ts +48 -0
- package/dist/types/sdk/src/utils/use-interval.d.ts +7 -0
- package/dist/types/sdk/src/utils/use-success-flash.d.ts +35 -0
- package/dist/types/sdk/src/utils/use-wake-lock.d.ts +15 -0
- package/dist/types/sdk/src/utils/viewport-window.d.ts +39 -0
- package/dist/types/sdk/src/voice/index.d.ts +2 -0
- package/dist/types/sdk/src/voice/use-dictation.d.ts +80 -0
- package/dist/types/sdk/src/voice/use-voice-capture.d.ts +65 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/fact-form-registry.d.ts +43 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/fact-shape.d.ts +70 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/form-registry.d.ts +28 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/knowledge.d.ts +18 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/presence-restore.d.ts +13 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/presence-stream.d.ts +64 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/source-form-registry.d.ts +129 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/standing-signal-store.d.ts +19 -0
- package/dist/types/sdk/src/widgets/presence/flows/flow-store.d.ts +22 -0
- package/dist/types/sdk/src/widgets/presence/index.d.ts +17 -0
- package/dist/types/sdk/src/widgets/presence/runtime-context.d.ts +109 -0
- package/dist/types/sdk/src/widgets/presence/use-layout-entity-ids.d.ts +12 -0
- package/dist/types/sdk/src/widgets/presence/use-optimistic-facts.d.ts +43 -0
- package/dist/types/sdk/src/widgets/presence/use-optimistic-flow-set.d.ts +24 -0
- package/dist/types/sdk/src/widgets/presence/use-presence-notch.d.ts +75 -0
- package/dist/types/sdk/src/widgets/presence/use-presence.d.ts +45 -0
- package/dist/types/sdk/src/widgets/presence/use-standing-signal.d.ts +12 -0
- package/dist/types/spacestation/src/analytics/catalog.d.ts +89 -0
- package/dist/types/spacestation/src/analytics/ecommerce/events.d.ts +183 -0
- package/dist/types/spacestation/src/analytics/ecommerce/funnel.d.ts +22 -0
- package/dist/types/spacestation/src/analytics/ecommerce/index.d.ts +14 -0
- package/dist/types/spacestation/src/analytics/ecommerce/surfacing.d.ts +42 -0
- package/dist/types/spacestation/src/analytics/envelope.d.ts +222 -0
- package/dist/types/spacestation/src/analytics/index.d.ts +28 -0
- package/dist/types/spacestation/src/analytics/kind.d.ts +155 -0
- package/dist/types/spacestation/src/analytics/session.d.ts +35 -0
- package/dist/types/spacestation/src/attachment/attachment.d.ts +83 -0
- package/dist/types/spacestation/src/catalog/attribute-registry.d.ts +148 -0
- package/dist/types/spacestation/src/catalog/attribute-scope.d.ts +41 -0
- package/dist/types/spacestation/src/catalog/canvas-arrangement.d.ts +43 -0
- package/dist/types/spacestation/src/catalog/catalog-schemas.d.ts +264 -0
- package/dist/types/spacestation/src/catalog/config.d.ts +13 -0
- package/dist/types/spacestation/src/catalog/derive-props-doc.d.ts +11 -0
- package/dist/types/spacestation/src/catalog/element-filled.d.ts +77 -0
- package/dist/types/spacestation/src/catalog/entity-refs.d.ts +14 -0
- package/dist/types/spacestation/src/catalog/function-props.d.ts +23 -0
- package/dist/types/spacestation/src/catalog/hydration-paths.d.ts +19 -0
- package/dist/types/spacestation/src/catalog/prose.d.ts +60 -0
- package/dist/types/spacestation/src/catalog/ref-sites.d.ts +45 -0
- package/dist/types/spacestation/src/catalog/required-props.d.ts +31 -0
- package/dist/types/spacestation/src/catalog/resolved.d.ts +145 -0
- package/dist/types/spacestation/src/catalog/structural-baseline.d.ts +7 -0
- package/dist/types/spacestation/src/catalog/wire/catalog-wire.d.ts +191 -0
- package/dist/types/spacestation/src/catalog/wire/index.d.ts +5 -0
- package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +351 -0
- package/dist/types/spacestation/src/catalog/wire/schema-from-wire.d.ts +7 -0
- package/dist/types/spacestation/src/catalog/wire/schema-to-wire.d.ts +8 -0
- package/dist/types/spacestation/src/catalog/wire/wire-schema.d.ts +78 -0
- package/dist/types/spacestation/src/commerce/cart-add-signal.d.ts +125 -0
- package/dist/types/spacestation/src/commerce/cart-state.d.ts +87 -0
- package/dist/types/spacestation/src/commerce/cart-verb-signals.d.ts +80 -0
- package/dist/types/spacestation/src/commerce/page-kinds.d.ts +40 -0
- package/dist/types/spacestation/src/commerce/selection-signal.d.ts +25 -0
- package/dist/types/spacestation/src/contracts/entry-context.d.ts +35 -0
- package/dist/types/spacestation/src/contracts/knowledge/index.d.ts +12 -0
- package/dist/types/spacestation/src/contracts/knowledge/types.d.ts +238 -0
- package/dist/types/spacestation/src/contracts/retrieval/core/knowledge-source.d.ts +36 -0
- package/dist/types/spacestation/src/contracts/retrieval/core/platform-connector.d.ts +49 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/types.d.ts +29 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/client.d.ts +238 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/types.d.ts +23 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/connector.d.ts +11 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/domains.d.ts +27 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/types.d.ts +21 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/option-values.d.ts +71 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/types.d.ts +18 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/source.d.ts +5 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/types.d.ts +47 -0
- package/dist/types/spacestation/src/contracts/retrieval/index.d.ts +25 -0
- package/dist/types/spacestation/src/contracts/session-arrival-params.d.ts +32 -0
- package/dist/types/spacestation/src/contracts/session-arrival.d.ts +215 -0
- package/dist/types/spacestation/src/contracts/tools/definitions.d.ts +139 -0
- package/dist/types/spacestation/src/contracts/tools/execution-context.d.ts +135 -0
- package/dist/types/spacestation/src/contracts/tools/index.d.ts +9 -0
- package/dist/types/spacestation/src/contracts/tools/types.d.ts +163 -0
- package/dist/types/spacestation/src/focus/focus.d.ts +12 -0
- package/dist/types/spacestation/src/hydration/hydration.d.ts +46 -0
- package/dist/types/spacestation/src/index.d.ts +71 -0
- package/dist/types/spacestation/src/layout/apply-patch.d.ts +17 -0
- package/dist/types/spacestation/src/layout/conversation.d.ts +136 -0
- package/dist/types/spacestation/src/layout/layout-diff.d.ts +17 -0
- package/dist/types/spacestation/src/layout/layout.d.ts +275 -0
- package/dist/types/spacestation/src/layout/page.d.ts +244 -0
- package/dist/types/spacestation/src/layout/patch.d.ts +92 -0
- package/dist/types/spacestation/src/layout/reduce-patch.d.ts +19 -0
- package/dist/types/spacestation/src/layout/reserved-ids.d.ts +13 -0
- package/dist/types/spacestation/src/projection/projection.d.ts +249 -0
- package/dist/types/spacestation/src/shell/shell.d.ts +109 -0
- package/dist/types/spacestation/src/signal/agent-signals.d.ts +539 -0
- package/dist/types/spacestation/src/space/connector.d.ts +61 -0
- package/dist/types/spacestation/src/space/generation-job.d.ts +4 -0
- package/dist/types/spacestation/src/space/hosting.d.ts +36 -0
- package/dist/types/spacestation/src/space/manifest.d.ts +8 -0
- package/dist/types/spacestation/src/space/package-version.d.ts +18 -0
- package/dist/types/spacestation/src/space/package.d.ts +35 -0
- package/dist/types/spacestation/src/space/prompt-config.d.ts +17 -0
- package/dist/types/spacestation/src/space/session-activity.d.ts +71 -0
- package/dist/types/spacestation/src/space/session-queue.d.ts +2147 -0
- package/dist/types/spacestation/src/space/space-config.d.ts +96 -0
- package/dist/types/spacestation/src/space/space-otp.d.ts +18 -0
- package/dist/types/spacestation/src/space/space.d.ts +104 -0
- package/dist/types/spacestation/src/space/tool-manifest.d.ts +8 -0
- package/dist/types/spacestation/src/space/trace.d.ts +555 -0
- package/dist/types/spacestation/src/space/workspace-catalog.d.ts +112 -0
- package/dist/types/spacestation/src/tool-compression/compress.d.ts +88 -0
- package/dist/types/spacestation/src/tool-compression/index.d.ts +11 -0
- package/dist/types/spacestation/src/tool-compression/scoring.d.ts +38 -0
- package/dist/types/spacestation/src/tool-compression/tokenize.d.ts +29 -0
- package/dist/types/spacestation/src/trace/trace-data.d.ts +126 -0
- package/dist/types/spacestation/src/trace/trace-diagnostics.d.ts +224 -0
- package/dist/types/spacestation/src/trace/trace-envelopes.d.ts +144 -0
- package/dist/types/spacestation/src/trace/trace-events.d.ts +450 -0
- package/dist/types/spacestation/src/types.d.ts +253 -0
- package/dist/types/spacestation/src/view/continuation.d.ts +45 -0
- package/dist/types/spacestation/src/widgets/presence/element.d.ts +241 -0
- package/dist/types/spacestation/src/widgets/presence/frame.d.ts +56 -0
- package/dist/types/spacestation/src/widgets/presence/index.d.ts +4 -0
- package/dist/types/spacestation/src/widgets/presence/profile.d.ts +75 -0
- package/dist/types/spacestation/src/widgets/presence/scan.d.ts +45 -0
- package/package.json +43 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Product, ProductVariant } from '../../../../ecommerce/src/index';
|
|
2
|
+
/** One selectable value on an option axis, with its purchasability. */
|
|
3
|
+
export interface VariantOptionValue {
|
|
4
|
+
value: string;
|
|
5
|
+
available: boolean;
|
|
6
|
+
/** A real per-SKU photo for this exact option value — never a fabricated /
|
|
7
|
+
* approximated color swatch. Present only when the axis's photos actually
|
|
8
|
+
* tell its values apart (see `photosDiscriminate`), so a renderer can trust
|
|
9
|
+
* this field as "show the photo instead of the label" without re-deciding.
|
|
10
|
+
* Either every value on an axis carries one, or none does. */
|
|
11
|
+
image?: {
|
|
12
|
+
url: string;
|
|
13
|
+
altText: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** An option axis the visitor must still pick (e.g. "Size" → 6,7,8,…). */
|
|
17
|
+
export interface VariantOptionChoice {
|
|
18
|
+
name: string;
|
|
19
|
+
values: VariantOptionValue[];
|
|
20
|
+
}
|
|
21
|
+
/** Does `variant` sit at `value` on the `name` axis? Axis NAMES and option
|
|
22
|
+
* VALUES both compare canonically — the two sources disagree on casing for
|
|
23
|
+
* both. */
|
|
24
|
+
export declare function carriesValue(variant: ProductVariant, name: string, value: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Can we reason about option values on this product at all?
|
|
27
|
+
*
|
|
28
|
+
* A selection can be neither honored nor denied when the variants don't declare
|
|
29
|
+
* their option coordinates — some catalog backends omit `selectedOptions`
|
|
30
|
+
* entirely. Callers use this to keep the pre-existing fall-through (add
|
|
31
|
+
* *something* purchasable) rather than refusing an add on the strength of data
|
|
32
|
+
* the product never carried.
|
|
33
|
+
*/
|
|
34
|
+
export declare function axesAreLegible(product: Product): boolean;
|
|
35
|
+
/** Does this product have an axis by this name? Reads the declared options AND
|
|
36
|
+
* the variants' own coordinates, since a backend may supply either. */
|
|
37
|
+
export declare function hasAxis(product: Product, axisName: string): boolean;
|
|
38
|
+
/** Every variant carrying ALL of `selections` — exact match on each stated
|
|
39
|
+
* axis. A variant with no `selectedOptions` carries nothing and never matches;
|
|
40
|
+
* an empty selection map picks out nothing (it is not a wildcard). */
|
|
41
|
+
export declare function variantsMatching(product: Product, selections: Readonly<Record<string, string>>): ProductVariant[];
|
|
42
|
+
/**
|
|
43
|
+
* The values of `axisName` the visitor could ACTUALLY buy, holding every OTHER
|
|
44
|
+
* stated selection fixed.
|
|
45
|
+
*
|
|
46
|
+
* Conditioning on the rest of the ask is the whole point. Answering "in stock:
|
|
47
|
+
* S, M, L" when those sizes exist only in a colour they didn't ask for replaces
|
|
48
|
+
* the false claim we just refused with a fresh one. Returns `null` when the
|
|
49
|
+
* product has no such axis at all — "there is no Colour option here" and
|
|
50
|
+
* "Colour Rose is sold out" are different things to tell someone.
|
|
51
|
+
*/
|
|
52
|
+
export declare function purchasableAlternativesFor(product: Product, axisName: string, selections: Readonly<Record<string, string>>): string[] | null;
|
|
53
|
+
/** The option axes that still vary across `candidates` — i.e. the questions the
|
|
54
|
+
* visitor must answer. Empty when nothing varies (single variant) or when
|
|
55
|
+
* variants lack `selectedOptions` (can't form a question). */
|
|
56
|
+
export declare function differingAxes(product: Product, candidates: ProductVariant[]): VariantOptionChoice[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type AvailabilityStatus, type Product, type ProductVariant } from '../../../../ecommerce/src/index';
|
|
2
|
+
import { type VariantOptionChoice } from './variant-option-axes';
|
|
3
|
+
export type { VariantOptionChoice, VariantOptionValue } from './variant-option-axes';
|
|
4
|
+
/** A product whose variant can't be resolved without the visitor choosing. */
|
|
5
|
+
export interface VariantGap {
|
|
6
|
+
productId: string;
|
|
7
|
+
productTitle: string;
|
|
8
|
+
image?: {
|
|
9
|
+
url: string;
|
|
10
|
+
altText: string;
|
|
11
|
+
};
|
|
12
|
+
/** The axes that still differ across purchasable variants. */
|
|
13
|
+
options: VariantOptionChoice[];
|
|
14
|
+
}
|
|
15
|
+
/** A stated set of option values this product cannot honor — the visitor asked
|
|
16
|
+
* for size M and M is sold out, or M isn't a combination this product carries.
|
|
17
|
+
* Carries enough for the caller to say exactly that without re-deriving it. */
|
|
18
|
+
export interface UnavailableSelection {
|
|
19
|
+
productId: string;
|
|
20
|
+
productTitle: string;
|
|
21
|
+
/** Exactly what was asked for, verbatim. */
|
|
22
|
+
requested: Record<string, string>;
|
|
23
|
+
/** For each REQUESTED axis the product actually has: the values on that axis
|
|
24
|
+
* that are buyable WITH the rest of the ask held fixed. An axis missing from
|
|
25
|
+
* this map is not an axis of this product at all; an empty array means the
|
|
26
|
+
* axis exists but nothing on it is buyable alongside the other selections. */
|
|
27
|
+
purchasableByAxis: Record<string, string[]>;
|
|
28
|
+
/**
|
|
29
|
+
* WHY the exact variant they asked for cannot be bought, when the selections
|
|
30
|
+
* did pin one and the backend told us. Absent when the selections pinned no
|
|
31
|
+
* single variant, or when the backend reported no status.
|
|
32
|
+
*
|
|
33
|
+
* This is the difference between "sold out", "on backorder — ships later" and
|
|
34
|
+
* "discontinued", and the visitor's next move differs in each case: wait, buy
|
|
35
|
+
* anyway, or pick something else. Collapsing all three into `available:
|
|
36
|
+
* false` is what made every refusal generic.
|
|
37
|
+
*/
|
|
38
|
+
status?: AvailabilityStatus;
|
|
39
|
+
}
|
|
40
|
+
export type VariantResolution = {
|
|
41
|
+
kind: 'resolved';
|
|
42
|
+
variantId: string;
|
|
43
|
+
} | {
|
|
44
|
+
kind: 'needs-choice';
|
|
45
|
+
gap: VariantGap;
|
|
46
|
+
} | {
|
|
47
|
+
kind: 'unavailable';
|
|
48
|
+
unavailable: UnavailableSelection;
|
|
49
|
+
} | {
|
|
50
|
+
kind: 'fallback';
|
|
51
|
+
};
|
|
52
|
+
/** The variant uniquely identified by a full set of option selections, if any.
|
|
53
|
+
* Prefers an available match. Returns null when the selections don't pin one.
|
|
54
|
+
*
|
|
55
|
+
* NOTE for callers: this is a best-effort matcher and will happily return a
|
|
56
|
+
* variant for a PARTIAL selection, choosing the open axes itself. Adding to
|
|
57
|
+
* cart must not do that — go through `resolveProductVariant`, which treats an
|
|
58
|
+
* open axis as a question rather than answering it. */
|
|
59
|
+
export declare function variantForSelections(product: Product, selections: Readonly<Record<string, string>>): ProductVariant | null;
|
|
60
|
+
/**
|
|
61
|
+
* Decide the variant for adding `product` to cart. Best-EVIDENCE first, and the
|
|
62
|
+
* strongest evidence is what the visitor just said:
|
|
63
|
+
*
|
|
64
|
+
* - `selections` stated in this message resolve, refuse (`unavailable`), or
|
|
65
|
+
* open a narrowed question — see `resolveStatedSelections`.
|
|
66
|
+
* - `knownVariantId` (a prior pick / agent-bound choice) resolves when nothing
|
|
67
|
+
* was stated, or when it agrees with what was.
|
|
68
|
+
* - A single purchasable variant resolves with no question.
|
|
69
|
+
* - `facts` (the agent's standing knowledge of the visitor) resolve to a
|
|
70
|
+
* unique variant when every fact-bound option axis agrees — the visitor is
|
|
71
|
+
* never asked something the agent already knows.
|
|
72
|
+
* - Otherwise the visitor must choose → `needs-choice` with the open axes.
|
|
73
|
+
* - When no axis explains the variants → `fallback` (defer to product-id path).
|
|
74
|
+
*
|
|
75
|
+
* The order matters: `knownVariantId` used to short-circuit ahead of
|
|
76
|
+
* `selections`, so a variant pinned earlier in the session outranked an
|
|
77
|
+
* explicit "add the M" and the add landed on the pinned size instead.
|
|
78
|
+
*/
|
|
79
|
+
export declare function resolveProductVariant(product: Product, opts?: {
|
|
80
|
+
knownVariantId?: string;
|
|
81
|
+
selections?: Readonly<Record<string, string>>;
|
|
82
|
+
facts?: Readonly<Record<string, unknown>>;
|
|
83
|
+
}): VariantResolution;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Product } from '../../../../ecommerce/src/index';
|
|
2
|
+
export type ProductVariant = Product['variants'][number];
|
|
3
|
+
/**
|
|
4
|
+
* Pure variant-selection logic over a Product — the derivations
|
|
5
|
+
* `useProductDetail` hooks up to React state. Extracted so the hook file
|
|
6
|
+
* owns only the stateful composition (single responsibility + the sdk's
|
|
7
|
+
* enforced file-size ceiling); everything here is deterministic and
|
|
8
|
+
* directly unit-testable without a render.
|
|
9
|
+
*/
|
|
10
|
+
/** The selectable option groups, derived from `product.options` (or empty). */
|
|
11
|
+
export declare function deriveVariantGroups(product: Product): Array<{
|
|
12
|
+
name: string;
|
|
13
|
+
options: string[];
|
|
14
|
+
}>;
|
|
15
|
+
/** The variant whose selected-options exactly satisfy `opts`, if any. */
|
|
16
|
+
export declare function matchVariant(product: Product, opts: Record<string, string>): ProductVariant | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* A `(group, opt)` pair is unavailable when EVERY product variant that
|
|
19
|
+
* includes it is sold out. Picks in OTHER groups narrow the pool first,
|
|
20
|
+
* falling back to the full candidate set when the narrowing empties it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isOptionUnavailable(product: Product, selectedVariants: Record<string, string>, group: string, opt: string): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* navigateToExternalCommerceUrl — the single exit rule for every cart
|
|
3
|
+
* surface (CartContent/CartDrawer, CartPill, CartWidget, ComposerDock
|
|
4
|
+
* cart pane, brand drawers via useCartDrawer). It covers BOTH external
|
|
5
|
+
* commerce exits: checkout handoff (`cart.checkoutUrl`) and the
|
|
6
|
+
* official-store cart handoff (`cart.storeCartUrl`). Do NOT inline
|
|
7
|
+
* external redirects in components; route them through here so embedded
|
|
8
|
+
* contexts keep working.
|
|
9
|
+
*
|
|
10
|
+
* Two contexts, picked at click time:
|
|
11
|
+
*
|
|
12
|
+
* 1. Standalone spacefront (not framed) → in-place top-window redirect.
|
|
13
|
+
* Most immersive: the visitor leaves the canvas, lands on the
|
|
14
|
+
* external surface, and a post-purchase `redirect_url` can return
|
|
15
|
+
* them to the spacefront.
|
|
16
|
+
*
|
|
17
|
+
* 2. Embedded (admin playground iframe / partner embed / mobile
|
|
18
|
+
* webview) → new tab. Shopify checkout sends
|
|
19
|
+
* `frame-ancestors 'none'`, so navigating the iframe itself blanks
|
|
20
|
+
* it; and navigating the top window would hijack a host page that
|
|
21
|
+
* isn't ours. A new tab escapes both failure modes.
|
|
22
|
+
*
|
|
23
|
+
* Frame detection: `window.top !== window.self` marks framed; a
|
|
24
|
+
* cross-origin parent throws on `window.top` access, which is caught
|
|
25
|
+
* and treated as framed.
|
|
26
|
+
*
|
|
27
|
+
* Returns the action taken so callers can manage pending-spinner state
|
|
28
|
+
* — and, for the agent-driven checkout handoff, so the outcome can be
|
|
29
|
+
* reported back honestly instead of assumed:
|
|
30
|
+
* - 'redirected' — page is being replaced; leave the spinner on.
|
|
31
|
+
* - 'new-tab' — current page stays; release the spinner shortly.
|
|
32
|
+
* - 'blocked' — the browser refused the new tab (popup blocker);
|
|
33
|
+
* the visitor did NOT reach the external surface, so
|
|
34
|
+
* an in-page affordance has to carry them there. Only
|
|
35
|
+
* reachable in the framed branch, and in practice only
|
|
36
|
+
* when the open was not driven by a user gesture (the
|
|
37
|
+
* agent-armed handoff fires after the turn lands).
|
|
38
|
+
* - 'no-url' — nothing happened (missing url / SSR); release now.
|
|
39
|
+
*/
|
|
40
|
+
export type ExternalNavigationResult = 'redirected' | 'new-tab' | 'blocked' | 'no-url';
|
|
41
|
+
export declare function navigateToExternalCommerceUrl(url: string | undefined): ExternalNavigationResult;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { useCart, useAddToCart, useWishlist, useToggleWishlist, useProducts, useCollectionByHandle, useProductReviews, useCommerceRuntime, FourtyCommerceRuntimeProvider, } from './commerce-context';
|
|
2
|
+
export type { FourtyCommerceRuntime, CartApi, AddToCartApi, WishlistApi, ToggleWishlistApi, ProductsQuery, ProductReviewItem, ProductReviewHighlight, ProductReviewsResult, CartAddOptions, CartAddHints, WishlistState, } from './commerce-context';
|
|
3
|
+
export { navigateToExternalCommerceUrl } from './external-navigation';
|
|
4
|
+
export type { ExternalNavigationResult } from './external-navigation';
|
|
5
|
+
export { recordVariantSelection, getVariantSelection, useVariantSelections, } from './variant-selection-store';
|
|
6
|
+
export { requestVariantChoice, clearVariantChoice, usePendingVariantChoice, type PendingVariantChoice, } from './pending-variant-choice-store';
|
|
7
|
+
export { recordOptionSelections, getOptionSelections, useOptionSelections, } from './option-selection-store';
|
|
8
|
+
export * from './ecommerce';
|
|
9
|
+
export * from '../../../spacestation/src/analytics/ecommerce/index';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Merge option picks for a product (later picks win per axis). Idempotent —
|
|
2
|
+
* a no-op merge notifies nobody. */
|
|
3
|
+
export declare function recordOptionSelections(productId: string, picks: Readonly<Record<string, string>>): void;
|
|
4
|
+
/** The recorded option picks for a product, or undefined when none. */
|
|
5
|
+
export declare function getOptionSelections(productId: string): Readonly<Record<string, string>> | undefined;
|
|
6
|
+
/** React hook — the whole per-product option-pick map. Re-renders on any
|
|
7
|
+
* change; referentially stable between changes (useSyncExternalStore). */
|
|
8
|
+
export declare function useOptionSelections(): ReadonlyMap<string, Readonly<Record<string, string>>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Product } from '../../../ecommerce/src/index';
|
|
2
|
+
import { type VariantGap } from './ecommerce/variant-resolution';
|
|
3
|
+
export interface PendingVariantChoice {
|
|
4
|
+
/** The full product — needed to resolve a variant id once the visitor
|
|
5
|
+
* has picked every open axis (`variantForSelections`/`resolveProductVariant`
|
|
6
|
+
* need the variant list; the gap alone only carries the open axes), and to
|
|
7
|
+
* build the optimistic line + modal header (title / image / price all come
|
|
8
|
+
* from it — no separate hints to keep in sync). */
|
|
9
|
+
product: Product;
|
|
10
|
+
/** The axes still needing a choice. */
|
|
11
|
+
gap: VariantGap;
|
|
12
|
+
quantity: number;
|
|
13
|
+
}
|
|
14
|
+
/** Open the picker for an ambiguous add. A second ambiguous add while one is
|
|
15
|
+
* already pending replaces it — one modal surface, resolved one at a time. */
|
|
16
|
+
export declare function requestVariantChoice(choice: PendingVariantChoice): void;
|
|
17
|
+
/** Dismiss without resolving — nothing was added. */
|
|
18
|
+
export declare function clearVariantChoice(): void;
|
|
19
|
+
/** React hook — the current pending choice, or null. Re-renders on any change. */
|
|
20
|
+
export declare function usePendingVariantChoice(): PendingVariantChoice | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Record the variant the visitor settled on for a product. Idempotent. */
|
|
2
|
+
export declare function recordVariantSelection(productId: string, variantId: string): void;
|
|
3
|
+
/** The known variant id for a product, or undefined when the visitor hasn't
|
|
4
|
+
* pinned one yet (so the caller knows it must resolve or ask). */
|
|
5
|
+
export declare function getVariantSelection(productId: string): string | undefined;
|
|
6
|
+
/** React hook — the whole known-variant map. Re-renders on any change. */
|
|
7
|
+
export declare function useVariantSelections(): ReadonlyMap<string, string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useFaqAccordion — single-open accordion. Returns the open index, a
|
|
3
|
+
* predicate, and a toggle that closes the current item or opens a new
|
|
4
|
+
* one (passing -1 = closed).
|
|
5
|
+
*/
|
|
6
|
+
export declare function useFaqAccordion(defaultOpenIndex?: number): {
|
|
7
|
+
openIndex: number;
|
|
8
|
+
isOpen: (i: number) => boolean;
|
|
9
|
+
toggle: (i: number) => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type NewsletterFormState = 'idle' | 'loading' | 'success' | 'error';
|
|
2
|
+
/**
|
|
3
|
+
* useNewsletterForm — owns the email input value and submit lifecycle.
|
|
4
|
+
* Brands wire `email`/`setEmail`/`submit` and read `state` to decide
|
|
5
|
+
* which slot to render (idle form / loading dots / success message /
|
|
6
|
+
* error string). Validation is built-in; the consumer-supplied
|
|
7
|
+
* `submitFn` runs only after a syntactically valid email.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useNewsletterForm(submitFn: (email: string) => Promise<void> | void): {
|
|
10
|
+
email: string;
|
|
11
|
+
setEmail: (next: string) => void;
|
|
12
|
+
state: NewsletterFormState;
|
|
13
|
+
error: string;
|
|
14
|
+
submit: () => Promise<void>;
|
|
15
|
+
reset: () => void;
|
|
16
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SpacefrontProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Mounts the spacefront inside a host app's own React tree.
|
|
4
|
+
*
|
|
5
|
+
* Client-only by construction: the engine is fetched in an effect, so a server
|
|
6
|
+
* render emits the empty host element and nothing of ours runs in the host's
|
|
7
|
+
* server runtime. A failed engine load is thrown during render so the host's
|
|
8
|
+
* nearest error boundary owns it — a spacefront that silently renders nothing
|
|
9
|
+
* is the failure mode this avoids.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Spacefront(props: SpacefrontProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type HostModules } from './host-modules';
|
|
2
|
+
import type { FortyEngine } from './types';
|
|
3
|
+
declare global {
|
|
4
|
+
var __forty_host__: HostModules | undefined;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Load the engine bundle that matches THIS sdk build from the AMS origin.
|
|
8
|
+
*
|
|
9
|
+
* The URL carries the sdk's exact version: the engine resolves the whole sdk
|
|
10
|
+
* surface from the host at runtime, so an engine built against a different sdk
|
|
11
|
+
* would bind to exports that may not exist. One load per origin, shared by
|
|
12
|
+
* every `<Spacefront>` on the page.
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadEngine(apiUrl: string): Promise<FortyEngine>;
|