@40rty/ams-ui 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/agent.js +148 -0
- package/dist/catalog-data.js +93 -0
- package/dist/catalog-entries.js +8 -0
- package/dist/chunk-432XYPDT.js +1012 -0
- package/dist/chunk-54QPRWEG.js +2800 -0
- package/dist/chunk-CKGGECAQ.js +239 -0
- package/dist/chunk-E3IJDSKY.js +173 -0
- package/dist/chunk-JQNZ5UUK.js +226 -0
- package/dist/chunk-LQLOG2V3.js +649 -0
- package/dist/chunk-MHUEIBJ3.js +117 -0
- package/dist/chunk-ORIOBWTD.js +112 -0
- package/dist/css/preset/motion.css +78 -0
- package/dist/css/preset/tailwind-theme.css +163 -0
- package/dist/css/shell/mobile/island.css +478 -0
- package/dist/hooks.js +25 -0
- package/dist/index.js +7165 -0
- package/dist/motion.js +113 -0
- package/dist/shell.js +5621 -0
- package/dist/types/agent/AgentStreamingState.d.ts +58 -0
- package/dist/types/agent/ProseSurface.d.ts +31 -0
- package/dist/types/agent/index.d.ts +8 -0
- package/dist/types/agent/phase-label.d.ts +13 -0
- package/dist/types/agent/presence/AgentPresenceWidget.d.ts +85 -0
- package/dist/types/agent/presence/BriefIdentity.d.ts +9 -0
- package/dist/types/agent/presence/CompactRead.d.ts +44 -0
- package/dist/types/agent/presence/CriteriaRail.d.ts +68 -0
- package/dist/types/agent/presence/DefaultNotch.d.ts +2 -0
- package/dist/types/agent/presence/FactChip.d.ts +10 -0
- package/dist/types/agent/presence/InlinePresenceRead.d.ts +25 -0
- package/dist/types/agent/presence/KnowledgePeek.d.ts +23 -0
- package/dist/types/agent/presence/LayoutMorphSkeleton.d.ts +59 -0
- package/dist/types/agent/presence/PresenceBrief.d.ts +29 -0
- package/dist/types/agent/presence/PresenceFiller.d.ts +24 -0
- package/dist/types/agent/presence/SourceSift.d.ts +48 -0
- package/dist/types/agent/presence/StreamRead.d.ts +50 -0
- package/dist/types/agent/presence/VoiceLine.d.ts +19 -0
- package/dist/types/agent/presence/band-beat.d.ts +40 -0
- package/dist/types/agent/presence/band-row.d.ts +188 -0
- package/dist/types/agent/presence/cite-image.d.ts +9 -0
- package/dist/types/agent/presence/class-names.d.ts +134 -0
- package/dist/types/agent/presence/element-view.d.ts +83 -0
- package/dist/types/agent/presence/fact-forms/baseline-forms.d.ts +20 -0
- package/dist/types/agent/presence/fact-forms/class-names.d.ts +14 -0
- package/dist/types/agent/presence/fact-forms/index.d.ts +3 -0
- package/dist/types/agent/presence/fact-forms/register.d.ts +9 -0
- package/dist/types/agent/presence/fact-rail.d.ts +76 -0
- package/dist/types/agent/presence/fact-slots.d.ts +97 -0
- package/dist/types/agent/presence/folded.d.ts +26 -0
- package/dist/types/agent/presence/forms.d.ts +5 -0
- package/dist/types/agent/presence/index.d.ts +39 -0
- package/dist/types/agent/presence/notch/PresenceNotch.d.ts +20 -0
- package/dist/types/agent/presence/parts.d.ts +29 -0
- package/dist/types/agent/presence/read-data.d.ts +48 -0
- package/dist/types/agent/presence/reads.d.ts +37 -0
- package/dist/types/agent/presence/sift-deck.d.ts +58 -0
- package/dist/types/agent/presence/source-cards/ArticleSourceCard.d.ts +4 -0
- package/dist/types/agent/presence/source-cards/CollectionSourceCard.d.ts +4 -0
- package/dist/types/agent/presence/source-cards/PolicySourceCard.d.ts +4 -0
- package/dist/types/agent/presence/source-cards/ProductSourceCard.d.ts +4 -0
- package/dist/types/agent/presence/source-cards/ReviewSourceCard.d.ts +4 -0
- package/dist/types/agent/presence/source-cards/SourceCard.d.ts +4 -0
- package/dist/types/agent/presence/source-cards/card-frame.d.ts +38 -0
- package/dist/types/agent/presence/source-cards/card-marks.d.ts +69 -0
- package/dist/types/agent/presence/source-cards/card-plate.d.ts +20 -0
- package/dist/types/agent/presence/source-cards/card-shell.d.ts +91 -0
- package/dist/types/agent/presence/source-cards/register.d.ts +6 -0
- package/dist/types/agent/presence/source-cards/review-passage.d.ts +53 -0
- package/dist/types/agent/presence/swatch.d.ts +4 -0
- package/dist/types/agent/presence/use-band-facts.d.ts +9 -0
- package/dist/types/agent/presence/use-forget-fact.d.ts +56 -0
- package/dist/types/agent/presence/use-measured-height.d.ts +11 -0
- package/dist/types/catalog-data/base.d.ts +2 -0
- package/dist/types/catalog-data/chat.d.ts +55 -0
- package/dist/types/catalog-data/content.d.ts +1129 -0
- package/dist/types/catalog-data/ecommerce.d.ts +4842 -0
- package/dist/types/catalog-data/index.d.ts +7 -0
- package/dist/types/catalog-data/social.d.ts +1552 -0
- package/dist/types/catalog-data/tokens.d.ts +20 -0
- package/dist/types/catalog-data/ugc.d.ts +50 -0
- package/dist/types/catalog-entries.d.ts +35 -0
- package/dist/types/catalog.d.ts +18 -0
- package/dist/types/components/SkeletonSwap.d.ts +27 -0
- package/dist/types/components/agentic/AgentText.d.ts +44 -0
- package/dist/types/components/agentic/Turn.d.ts +21 -0
- package/dist/types/components/browse/CanvasBootLoader.d.ts +16 -0
- package/dist/types/components/browse/ContinuationLoading.d.ts +22 -0
- package/dist/types/components/browse/canvas-booting.d.ts +37 -0
- package/dist/types/components/browse/constants.d.ts +2 -0
- package/dist/types/components/browse/index.d.ts +4 -0
- package/dist/types/components/chat/SuggestionCards.d.ts +2 -0
- package/dist/types/components/chat/index.d.ts +1 -0
- package/dist/types/components/content/FAQ.d.ts +12 -0
- package/dist/types/components/content/FeatureGrid.d.ts +11 -0
- package/dist/types/components/content/InfoCards.d.ts +16 -0
- package/dist/types/components/content/Reviews.d.ts +9 -0
- package/dist/types/components/content/RichText.d.ts +10 -0
- package/dist/types/components/content/article/ArticleDetail.d.ts +15 -0
- package/dist/types/components/content/article/BlogCard.d.ts +11 -0
- package/dist/types/components/content/article/BlogPosts.d.ts +19 -0
- package/dist/types/components/content/page/PageDetail.d.ts +13 -0
- package/dist/types/components/content/page/PolicyDetail.d.ts +23 -0
- package/dist/types/components/ecommerce/cart/AddToCartButton.d.ts +9 -0
- package/dist/types/components/ecommerce/cart/CartContent.d.ts +40 -0
- package/dist/types/components/ecommerce/cart/CartDrawer.d.ts +41 -0
- package/dist/types/components/ecommerce/cart/CartFoot.d.ts +30 -0
- package/dist/types/components/ecommerce/cart/CartLineItem.d.ts +13 -0
- package/dist/types/components/ecommerce/cart/CartLineRow.d.ts +17 -0
- package/dist/types/components/ecommerce/cart/CartPromoCode.d.ts +29 -0
- package/dist/types/components/ecommerce/cart/CartSummary.d.ts +7 -0
- package/dist/types/components/ecommerce/cart/CartWidget.d.ts +10 -0
- package/dist/types/components/ecommerce/cart/VariantPickerModal.d.ts +12 -0
- package/dist/types/components/ecommerce/cart/cart-format.d.ts +8 -0
- package/dist/types/components/ecommerce/cart/use-cart-view.d.ts +50 -0
- package/dist/types/components/ecommerce/collection/CollectionCard.d.ts +10 -0
- package/dist/types/components/ecommerce/collection/CollectionGrid.d.ts +8 -0
- package/dist/types/components/ecommerce/collection/CollectionList.d.ts +13 -0
- package/dist/types/components/ecommerce/collection/internal/CollectionListItem.d.ts +13 -0
- package/dist/types/components/ecommerce/product/AddToRegistry.d.ts +36 -0
- package/dist/types/components/ecommerce/product/ComparisonTable.d.ts +25 -0
- package/dist/types/components/ecommerce/product/ComparisonTableSkeleton.d.ts +11 -0
- package/dist/types/components/ecommerce/product/PresenceProductRail.d.ts +35 -0
- package/dist/types/components/ecommerce/product/ProductBadge.d.ts +9 -0
- package/dist/types/components/ecommerce/product/ProductCard.d.ts +27 -0
- package/dist/types/components/ecommerce/product/ProductDetail.d.ts +25 -0
- package/dist/types/components/ecommerce/product/ProductGallery.d.ts +19 -0
- package/dist/types/components/ecommerce/product/ProductGrid.d.ts +26 -0
- package/dist/types/components/ecommerce/product/ProductImage.d.ts +54 -0
- package/dist/types/components/ecommerce/product/ProductOption.d.ts +9 -0
- package/dist/types/components/ecommerce/product/ProductPrice.d.ts +8 -0
- package/dist/types/components/ecommerce/product/ProductVideoPlayer.d.ts +17 -0
- package/dist/types/components/ecommerce/product/comparison-table-parts.d.ts +41 -0
- package/dist/types/components/ecommerce/product/comparison-table-rows.d.ts +24 -0
- package/dist/types/components/ecommerce/product/image-trim.d.ts +35 -0
- package/dist/types/components/ecommerce/product/product-card-glyphs.d.ts +2 -0
- package/dist/types/components/ecommerce/product/registry-logos.d.ts +2 -0
- package/dist/types/components/ecommerce/product/trim-geometry.d.ts +45 -0
- package/dist/types/components/ecommerce/wishlist/WishlistDrawer.d.ts +16 -0
- package/dist/types/components/feedback/Skeleton.d.ts +13 -0
- package/dist/types/components/feedback/Thinking.d.ts +15 -0
- package/dist/types/components/layout/AspectRatio.d.ts +5 -0
- package/dist/types/components/layout/Backdrop.d.ts +32 -0
- package/dist/types/components/layout/Container.d.ts +6 -0
- package/dist/types/components/layout/Divider.d.ts +5 -0
- package/dist/types/components/layout/Drawer.d.ts +9 -0
- package/dist/types/components/layout/DrawerDockSlot.d.ts +40 -0
- package/dist/types/components/layout/Grid.d.ts +8 -0
- package/dist/types/components/layout/Modal.d.ts +25 -0
- package/dist/types/components/layout/Page.d.ts +11 -0
- package/dist/types/components/layout/Section.d.ts +6 -0
- package/dist/types/components/layout/Stack.d.ts +7 -0
- package/dist/types/components/marketing/AnnouncementBar.d.ts +15 -0
- package/dist/types/components/marketing/BrandStory.d.ts +19 -0
- package/dist/types/components/marketing/HeroBanner.d.ts +69 -0
- package/dist/types/components/marketing/HeroBannerFeatures.d.ts +10 -0
- package/dist/types/components/marketing/HeroBannerInline.d.ts +20 -0
- package/dist/types/components/marketing/PromoBanner.d.ts +11 -0
- package/dist/types/components/marketing/internal/AnnouncementLink.d.ts +5 -0
- package/dist/types/components/marketing/internal/AnnouncementMessage.d.ts +10 -0
- package/dist/types/components/navigation/Breadcrumbs.d.ts +10 -0
- package/dist/types/components/navigation/Footer.d.ts +15 -0
- package/dist/types/components/navigation/Header.d.ts +14 -0
- package/dist/types/components/navigation/internal/BreadcrumbLink.d.ts +5 -0
- package/dist/types/components/navigation/internal/FooterLink.d.ts +5 -0
- package/dist/types/components/navigation/internal/HeaderLink.d.ts +5 -0
- package/dist/types/components/shell/BaseMark.d.ts +11 -0
- package/dist/types/components/shell/CartPill.d.ts +13 -0
- package/dist/types/components/shell/ComposerDock.d.ts +9 -0
- package/dist/types/components/shell/ErrorBanner.d.ts +14 -0
- package/dist/types/components/shell/HistoryMenu.d.ts +15 -0
- package/dist/types/components/shell/MenuButton.d.ts +31 -0
- package/dist/types/components/shell/MountainRidges.d.ts +11 -0
- package/dist/types/components/shell/PendingTurn.d.ts +1 -0
- package/dist/types/components/shell/ShellTop.d.ts +35 -0
- package/dist/types/components/shell/brand-shell.d.ts +441 -0
- package/dist/types/components/shell/index.d.ts +9 -0
- package/dist/types/components/shell/marks/index.d.ts +5 -0
- package/dist/types/components/social/ReviewCard.d.ts +9 -0
- package/dist/types/components/social/ReviewSummary.d.ts +7 -0
- package/dist/types/components/social/TestimonialCard.d.ts +9 -0
- package/dist/types/components/social/TestimonialCarousel.d.ts +16 -0
- package/dist/types/components/social/UgcCard.d.ts +9 -0
- package/dist/types/components/social/UgcGallery.d.ts +8 -0
- package/dist/types/hooks/index.d.ts +8 -0
- package/dist/types/hooks/keyboard.d.ts +18 -0
- package/dist/types/hooks/use-container-width.d.ts +11 -0
- package/dist/types/hooks/use-dismiss-on-outside.d.ts +23 -0
- package/dist/types/hooks/use-focus-on-change.d.ts +8 -0
- package/dist/types/hooks/use-focus-trap.d.ts +12 -0
- package/dist/types/hooks/use-media-query.d.ts +12 -0
- package/dist/types/hooks/use-projection.d.ts +24 -0
- package/dist/types/hooks/use-reduced-motion.d.ts +1 -0
- package/dist/types/hooks/use-scroll-lock.d.ts +19 -0
- package/dist/types/hooks/use-scroll-threshold.d.ts +14 -0
- package/dist/types/hooks/use-textarea-autosize.d.ts +16 -0
- package/dist/types/index.d.ts +74 -0
- package/dist/types/labels-context.d.ts +18 -0
- package/dist/types/labels.d.ts +240 -0
- package/dist/types/motion/ease.d.ts +10 -0
- package/dist/types/motion/generation/ActiveBlockIndicator.d.ts +27 -0
- package/dist/types/motion/generation/BlurUpImage.d.ts +23 -0
- package/dist/types/motion/generation/ResolveEntrance.d.ts +22 -0
- package/dist/types/motion/generation/ShimmerSkeleton.d.ts +20 -0
- package/dist/types/motion/generation/WordReveal.d.ts +26 -0
- package/dist/types/motion/generation/index.d.ts +6 -0
- package/dist/types/motion/hooks/useInViewOnce.d.ts +14 -0
- package/dist/types/motion/hooks/useScrollDirection.d.ts +38 -0
- package/dist/types/motion/hooks/useScrollProgress.d.ts +23 -0
- package/dist/types/motion/hooks/useStableValue.d.ts +36 -0
- package/dist/types/motion/hooks/useSuccessFlash.d.ts +1 -0
- package/dist/types/motion/index.d.ts +18 -0
- package/dist/types/motion/presets.d.ts +335 -0
- package/dist/types/motion/primitives/Agent.d.ts +118 -0
- package/dist/types/motion/primitives/MorphRegion.d.ts +16 -0
- package/dist/types/motion/primitives/Parallax.d.ts +19 -0
- package/dist/types/motion/primitives/Pin.d.ts +26 -0
- package/dist/types/motion/primitives/Reveal.d.ts +29 -0
- package/dist/types/motion/primitives/RevealStagger.d.ts +16 -0
- package/dist/types/motion/primitives/StickyShelf.d.ts +18 -0
- package/dist/types/primitives/Badge/index.d.ts +12 -0
- package/dist/types/primitives/Button/index.d.ts +25 -0
- package/dist/types/primitives/Input/index.d.ts +5 -0
- package/dist/types/primitives/Money/index.d.ts +13 -0
- package/dist/types/primitives/Select/index.d.ts +5 -0
- package/dist/types/primitives/Skeleton/index.d.ts +4 -0
- package/dist/types/shell/AnimatedPlaceholder.d.ts +13 -0
- package/dist/types/shell/BottomSheet.d.ts +54 -0
- package/dist/types/shell/Button.d.ts +19 -0
- package/dist/types/shell/ChromeSurface.d.ts +33 -0
- package/dist/types/shell/Composer.d.ts +56 -0
- package/dist/types/shell/ComposerChipStrip.d.ts +9 -0
- package/dist/types/shell/ConversationTransition.d.ts +27 -0
- package/dist/types/shell/DictationButton.d.ts +24 -0
- package/dist/types/shell/DragSheet.d.ts +34 -0
- package/dist/types/shell/InlineCompletion.d.ts +38 -0
- package/dist/types/shell/LauncherDock.d.ts +40 -0
- package/dist/types/shell/ListeningWaveform.d.ts +18 -0
- package/dist/types/shell/MenuAccordionPanel.d.ts +26 -0
- package/dist/types/shell/MenuDrawer.d.ts +72 -0
- package/dist/types/shell/MenuFlyout.d.ts +22 -0
- package/dist/types/shell/MenuNav.d.ts +30 -0
- package/dist/types/shell/MenuNavBar.d.ts +22 -0
- package/dist/types/shell/ShellMenuChrome.d.ts +66 -0
- package/dist/types/shell/ShellScaffold.d.ts +92 -0
- package/dist/types/shell/SideDock.d.ts +75 -0
- package/dist/types/shell/Skeleton.d.ts +22 -0
- package/dist/types/shell/Spinner.d.ts +10 -0
- package/dist/types/shell/TypedPlaceholder.d.ts +11 -0
- package/dist/types/shell/VoiceControl.d.ts +23 -0
- package/dist/types/shell/VoiceIsland.d.ts +24 -0
- package/dist/types/shell/canvas-gutter-style.d.ts +15 -0
- package/dist/types/shell/composer/AttachButton.d.ts +14 -0
- package/dist/types/shell/composer/AttachmentStrip.d.ts +12 -0
- package/dist/types/shell/composer/ClearSessionButton.d.ts +16 -0
- package/dist/types/shell/composer/ConversationHistoryButton.d.ts +25 -0
- package/dist/types/shell/composer/ShareCanvasButton.d.ts +19 -0
- package/dist/types/shell/composer/ThreadJumpRail.d.ts +43 -0
- package/dist/types/shell/composer/composer-metrics.d.ts +6 -0
- package/dist/types/shell/composer/field-metrics.d.ts +97 -0
- package/dist/types/shell/composer/heic-convert.d.ts +6 -0
- package/dist/types/shell/composer/use-field-autosize.d.ts +26 -0
- package/dist/types/shell/composer/useComposerAttachments.d.ts +37 -0
- package/dist/types/shell/composer/usePromptComposer.d.ts +51 -0
- package/dist/types/shell/dock-context.d.ts +10 -0
- package/dist/types/shell/index.d.ts +36 -0
- package/dist/types/shell/menu-columns.d.ts +19 -0
- package/dist/types/shell/mobile/DefaultMobileShell.d.ts +88 -0
- package/dist/types/shell/mobile/IslandComposeGroup.d.ts +41 -0
- package/dist/types/shell/mobile/IslandInputBar.d.ts +61 -0
- package/dist/types/shell/mobile/IslandNavButtons.d.ts +20 -0
- package/dist/types/shell/mobile/IslandTrailingAction.d.ts +34 -0
- package/dist/types/shell/mobile/MobileChrome.d.ts +34 -0
- package/dist/types/shell/mobile/MobileVoiceConsole.d.ts +42 -0
- package/dist/types/shell/mobile/MorphIsland.d.ts +105 -0
- package/dist/types/shell/mobile/RestIsland.d.ts +41 -0
- package/dist/types/shell/mobile/constants.d.ts +26 -0
- package/dist/types/shell/mobile/document-scroll-ref.d.ts +22 -0
- package/dist/types/shell/mobile/hero-entry-point.d.ts +110 -0
- package/dist/types/shell/mobile/island-metrics.d.ts +131 -0
- package/dist/types/shell/mobile/sheet-detents.d.ts +49 -0
- package/dist/types/shell/mobile/turn-end-action.d.ts +44 -0
- package/dist/types/shell/mobile/use-blur-on-canvas-gesture.d.ts +31 -0
- package/dist/types/shell/mobile/use-island-fold-scroll.d.ts +28 -0
- package/dist/types/shell/mobile/use-keyboard-inset.d.ts +18 -0
- package/dist/types/shell/mobile/use-sheet-fold-gesture.d.ts +57 -0
- package/dist/types/shell/slots.d.ts +16 -0
- package/dist/types/shell/thread-reland.d.ts +22 -0
- package/dist/types/shell/use-dock-state.d.ts +54 -0
- package/dist/types/types/commerce.d.ts +1 -0
- package/dist/types/utils/cn.d.ts +2 -0
- package/dist/types/utils/format-money.d.ts +2 -0
- package/dist/types/utils/html-to-text.d.ts +8 -0
- package/dist/types/utils/sanitize-html.d.ts +12 -0
- package/dist/types/utils/use-backdrop-presence.d.ts +24 -0
- package/dist/types/utils/use-composer-mode.d.ts +26 -0
- package/dist/types/utils/use-is-seed-home.d.ts +13 -0
- package/dist/types/utils/use-safe-cart.d.ts +17 -0
- package/dist/types/utils/use-safe-facts.d.ts +9 -0
- package/dist/types/utils/use-safe-fourty-session.d.ts +15 -0
- package/package.json +80 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Visual-weight levels — how much presence an element claims in its section. */
|
|
3
|
+
export declare const emphasisEnum: z.ZodEnum<["subtle", "normal", "feature"]>;
|
|
4
|
+
export type Emphasis = z.infer<typeof emphasisEnum>;
|
|
5
|
+
/** The weight dial as a catalog prop (optional → component default applies). */
|
|
6
|
+
export declare const emphasisProp: z.ZodOptional<z.ZodEnum<["subtle", "normal", "feature"]>>;
|
|
7
|
+
/** Spacing scale shared by the layout primitives (gaps, insets). Each consumer
|
|
8
|
+
* adds its own `.optional().describe(...)` because defaults differ per use. */
|
|
9
|
+
export declare const spaceScaleEnum: z.ZodEnum<["sm", "md", "lg"]>;
|
|
10
|
+
export type SpaceScale = z.infer<typeof spaceScaleEnum>;
|
|
11
|
+
/** How a product photo fills its fixed card frame. `cover` fills edge-to-edge
|
|
12
|
+
* (cropping any empty margin baked into the packshot — biggest, most like the
|
|
13
|
+
* brand's own storefront grid); `contain` shows the whole photo, letterboxing
|
|
14
|
+
* when its shape differs from the frame (use when nothing may be cropped).
|
|
15
|
+
* The editorial mosaic ignores this — its tiles always size to each photo's
|
|
16
|
+
* true aspect ratio. */
|
|
17
|
+
export declare const imageFitEnum: z.ZodEnum<["cover", "contain"]>;
|
|
18
|
+
export type ImageFit = z.infer<typeof imageFitEnum>;
|
|
19
|
+
/** The image-fit dial as a catalog prop (optional → `cover` default applies). */
|
|
20
|
+
export declare const imageFitProp: z.ZodOptional<z.ZodEnum<["cover", "contain"]>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ugcProps: z.ZodObject<{
|
|
3
|
+
title: z.ZodString;
|
|
4
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
5
|
+
items: z.ZodArray<z.ZodObject<{
|
|
6
|
+
mediaUrl: z.ZodString;
|
|
7
|
+
mediaType: z.ZodOptional<z.ZodEnum<["image", "video"]>>;
|
|
8
|
+
author: z.ZodString;
|
|
9
|
+
likes: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
11
|
+
productGid: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
author: string;
|
|
14
|
+
mediaUrl: string;
|
|
15
|
+
mediaType?: "video" | "image" | undefined;
|
|
16
|
+
likes?: number | undefined;
|
|
17
|
+
caption?: string | undefined;
|
|
18
|
+
productGid?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
author: string;
|
|
21
|
+
mediaUrl: string;
|
|
22
|
+
mediaType?: "video" | "image" | undefined;
|
|
23
|
+
likes?: number | undefined;
|
|
24
|
+
caption?: string | undefined;
|
|
25
|
+
productGid?: string | undefined;
|
|
26
|
+
}>, "many">;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
title: string;
|
|
29
|
+
items: {
|
|
30
|
+
author: string;
|
|
31
|
+
mediaUrl: string;
|
|
32
|
+
mediaType?: "video" | "image" | undefined;
|
|
33
|
+
likes?: number | undefined;
|
|
34
|
+
caption?: string | undefined;
|
|
35
|
+
productGid?: string | undefined;
|
|
36
|
+
}[];
|
|
37
|
+
subtitle?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
title: string;
|
|
40
|
+
items: {
|
|
41
|
+
author: string;
|
|
42
|
+
mediaUrl: string;
|
|
43
|
+
mediaType?: "video" | "image" | undefined;
|
|
44
|
+
likes?: number | undefined;
|
|
45
|
+
caption?: string | undefined;
|
|
46
|
+
productGid?: string | undefined;
|
|
47
|
+
}[];
|
|
48
|
+
subtitle?: string | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const ugcExamples: z.infer<typeof ugcProps>[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentCatalogStructural } from '@40rty/ams-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Component catalog for @fourty/ui — generic, brand-agnostic vocabulary.
|
|
4
|
+
*
|
|
5
|
+
* **TS carries STRUCTURE only.** propsSchema (Zod), bindings, slots,
|
|
6
|
+
* layout, defaultLayoutWeight, defaultMaxHeight, alwaysInclude, examples
|
|
7
|
+
* (placeholder shapes). Component descriptions / whenToUse / dontUseWhen
|
|
8
|
+
* live exclusively in `catalogs/<domain>/<component>.md` and are merged
|
|
9
|
+
* onto each entry at runtime by `apps/api/src/lib/load-component-catalog-manifests.ts`.
|
|
10
|
+
* Editing descriptions here is a no-op; edit the manifest markdown.
|
|
11
|
+
*
|
|
12
|
+
* `examples` are placeholder / structural — they show the LLM what shape
|
|
13
|
+
* to emit, with `<...>` tokens where space-knowledge values plug in. They
|
|
14
|
+
* should never carry brand-specific copy.
|
|
15
|
+
*
|
|
16
|
+
* Type keys MUST match the componentMap in catalog.ts AND the `# <type>`
|
|
17
|
+
* heading in the corresponding manifest .md file. Only components with
|
|
18
|
+
* working renderers are included.
|
|
19
|
+
*/
|
|
20
|
+
export declare const catalog: ComponentCatalogStructural;
|
|
21
|
+
/**
|
|
22
|
+
* NO STATIC SLOT BINDINGS HERE.
|
|
23
|
+
*
|
|
24
|
+
* Slot bindings = manifest data (recipe), not structural data (code).
|
|
25
|
+
* `@fourty/ui` ships component implementations and Zod schemas; *which*
|
|
26
|
+
* signals route to *which* component prop is a brand decision and lives
|
|
27
|
+
* on the per-component manifest in the recipe repo
|
|
28
|
+
* (`recipes/catalogs/<vertical>/<component>.md` frontmatter
|
|
29
|
+
* `slotBindings: [...]`).
|
|
30
|
+
*
|
|
31
|
+
* The platform's manifest parser extracts these bindings, the API
|
|
32
|
+
* forwards them to the SDK in the session response, and the SDK uses
|
|
33
|
+
* them to auto-route generic agent signals (text.delta, chip.show, …)
|
|
34
|
+
* onto the right components at runtime.
|
|
35
|
+
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export { catalog } from './catalog-entries';
|
|
3
|
+
/**
|
|
4
|
+
* Renderers for the layout-protocol types the PLATFORM owns (the client
|
|
5
|
+
* counterpart of spacestation's `STRUCTURAL_BASELINE_CATALOG`). The scoped
|
|
6
|
+
* registry seeds these under every space, so brand packages declare ZERO
|
|
7
|
+
* platform types — a brand package is a closed enumeration of its own
|
|
8
|
+
* bespoke surfaces. A brand MAY still layer its own `page` renderer on top.
|
|
9
|
+
*/
|
|
10
|
+
export declare const STRUCTURAL_BASELINE_RENDERERS: Record<string, React.ComponentType<Record<string, unknown>>>;
|
|
11
|
+
/**
|
|
12
|
+
* Maps catalog type keys to their React components.
|
|
13
|
+
* Keys MUST match the catalog-entries.ts type names.
|
|
14
|
+
*/
|
|
15
|
+
export declare const componentMap: Record<string, React.ComponentType<Record<string, unknown>>>;
|
|
16
|
+
export declare const components: ({
|
|
17
|
+
component: import("@40rty/ams-sdk").BrandComponent;
|
|
18
|
+
} & import("@40rty/ams-sdk").CatalogEntryStructural)[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SkeletonSwapProps {
|
|
3
|
+
/** True while the swap-gap skeleton should be shown — the SDK-injected
|
|
4
|
+
* `__loading` prop, decided at the hydration boundary. */
|
|
5
|
+
showSkeleton: boolean;
|
|
6
|
+
/** The skeleton node — shaped like the real component. */
|
|
7
|
+
skeleton: React.ReactNode;
|
|
8
|
+
/** The real content node — rendered once data is genuinely renderable. */
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Cross-fades a swap-gap skeleton into real content IN PLACE.
|
|
13
|
+
*
|
|
14
|
+
* The naive `showSkeleton ? <Skeleton/> : <Content/>` swap unmounts the
|
|
15
|
+
* skeleton and mounts the content in the same frame — the slot collapses
|
|
16
|
+
* to zero height for a beat, then the content pops in.
|
|
17
|
+
*
|
|
18
|
+
* This wraps both in an `AnimatePresence` (`mode="popLayout"`, so the
|
|
19
|
+
* outgoing skeleton is taken out of layout flow while the incoming
|
|
20
|
+
* content fades in over it) — the same approach `ElementChildren` uses
|
|
21
|
+
* for the placeholder→real element swap. The skeleton and the content
|
|
22
|
+
* occupy the slot continuously: no empty frame, no height collapse,
|
|
23
|
+
* just a soft cross-fade. `showSkeleton` is the SDK-computed `__loading`
|
|
24
|
+
* signal, which only drops once the entities are genuinely hydrated, so
|
|
25
|
+
* the content the cross-fade reveals is always already populated.
|
|
26
|
+
*/
|
|
27
|
+
export declare function SkeletonSwap({ showSkeleton, skeleton, children }: SkeletonSwapProps): React.ReactElement;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { renderInline } from '@40rty/ams-sdk';
|
|
3
|
+
export { renderInline };
|
|
4
|
+
interface AgentTextPart {
|
|
5
|
+
type: 'text' | 'em';
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
interface AgentTextProps {
|
|
9
|
+
/** Override prose. Optional — when omitted, the component subscribes to
|
|
10
|
+
* the per-turn `prose` stream via `useStream('prose')` and renders the
|
|
11
|
+
* agent's accumulating response text. */
|
|
12
|
+
text?: string;
|
|
13
|
+
/** Pre-segmented prose with mixed sans + italic spans. Wins over `text`. */
|
|
14
|
+
parts?: AgentTextPart[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Light prose normaliser. Fence stripping + orphan-line filtering live
|
|
18
|
+
* in the server-side compose transform — anything that
|
|
19
|
+
* reaches this component is meant for visitor display. We only collapse
|
|
20
|
+
* stray inter-word whitespace runs that the splitter sometimes leaves
|
|
21
|
+
* behind around fence boundaries.
|
|
22
|
+
*/
|
|
23
|
+
export declare function sanitizeProse(raw: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Splits the (sanitized) prose into a stream of paragraphs and bullet
|
|
26
|
+
* lists. Lines starting with `* ` or `- ` collapse into a single <ul>;
|
|
27
|
+
* blank lines start a new paragraph; everything else flows into one.
|
|
28
|
+
* Streaming-safe — every prose-delta tick re-runs the parser; partial
|
|
29
|
+
* trailing content renders as plain text until the next newline lands.
|
|
30
|
+
*/
|
|
31
|
+
export declare function blockifyProse(text: string): React.ReactNode[];
|
|
32
|
+
/**
|
|
33
|
+
* AgentText — the agent's prose, rendered with the design's `.agent-prose`
|
|
34
|
+
* class. 15px sans body with `.em-h` Newsreader italic for emphasis spans.
|
|
35
|
+
* Subscribes to the per-turn `prose` stream by default; pass `text` /
|
|
36
|
+
* `parts` for static authored copy.
|
|
37
|
+
*
|
|
38
|
+
* Streaming prose runs through `sanitizeProse` (strips embedded gids the
|
|
39
|
+
* agent leaks into conversational text) and `blockifyProse` (turns
|
|
40
|
+
* `* item` lines into bullet lists, `**text**` into bold). Authored
|
|
41
|
+
* `parts` skip the parser — they're already segmented.
|
|
42
|
+
*/
|
|
43
|
+
declare const AgentText: React.FC<AgentTextProps>;
|
|
44
|
+
export default AgentText;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TurnProps {
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated The prompt is rendered by the shell-level TurnHeader,
|
|
5
|
+
* not by Turn. Kept in the type so layouts that still pass it don't
|
|
6
|
+
* break, but the value is ignored.
|
|
7
|
+
*/
|
|
8
|
+
prompt?: string;
|
|
9
|
+
/** Composed response — agentText, blocks. */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Turn — editorial wrapper for one agent response.
|
|
14
|
+
*
|
|
15
|
+
* Renders the response body only. The user's prompt is shell chrome
|
|
16
|
+
* (DefaultShell → TurnHeader, fed by `useTurn().userMessage`), so
|
|
17
|
+
* Turn must NOT render it again — doing so doubled every prompt on
|
|
18
|
+
* screen.
|
|
19
|
+
*/
|
|
20
|
+
declare const Turn: React.FC<TurnProps>;
|
|
21
|
+
export default Turn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The boot loader — the layout engine at work, centred over the canvas while the
|
|
4
|
+
* agent composes the visitor's ask onto a canvas that holds nothing from any
|
|
5
|
+
* turn (see `isCanvasBooting`). That is the arrival with an opening `?intent=`:
|
|
6
|
+
* before this, the agent ran with the seed welcome on screen and no sign
|
|
7
|
+
* anything was happening.
|
|
8
|
+
*
|
|
9
|
+
* The surface is the continuation foot's, reused whole — `InlinePresenceRead`'s
|
|
10
|
+
* morphing layout tiles over the agent's live read — on the FOREGROUND presence
|
|
11
|
+
* flow (the foot reads `EXTEND_FLOW`), scaled up by `CANVAS_BOOT_CLASS`
|
|
12
|
+
* (base.css). Rides the canvas-tail mount, so every shell gets it without
|
|
13
|
+
* wiring: no brand shell mounts a loading surface today, which is why the
|
|
14
|
+
* default shell's `PendingTurn` skeletons never appeared on a brand space.
|
|
15
|
+
*/
|
|
16
|
+
export declare function CanvasBootLoader(): React.ReactElement;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Foot streaming state for the agent continuation. Delegates to
|
|
4
|
+
* `InlinePresenceRead`: while the extend composes, a miniature of the layout
|
|
5
|
+
* engine at work — frosted tiles morphing through layout archetypes over a live
|
|
6
|
+
* status line (the agent's evolving read, or the archetype label naming the shape
|
|
7
|
+
* forming) — and while it's mid-search, the scan deck of real candidates.
|
|
8
|
+
* `EXTEND_LOADING_CLASS` supplies the `--fourty-notch-fg` token every tile + line
|
|
9
|
+
* tints off + the foot's spacing outside the notch's own DOM (see base.css).
|
|
10
|
+
*
|
|
11
|
+
* Gated on `fresh` so a value restored from a prior session never paints a
|
|
12
|
+
* phantom load, and on `kind !== 'idle'` so it renders nothing once there's
|
|
13
|
+
* genuinely no continuation in flight (idle = no frame at all yet, or the
|
|
14
|
+
* flow was cleared on settle).
|
|
15
|
+
*
|
|
16
|
+
* On a phone the read takes its COMPACT form: the wide editorial scan row (eyebrow ·
|
|
17
|
+
* rule · prose, side by side) squeezes the prose into a sliver at that width and
|
|
18
|
+
* wraps it into a tall ragged block at the canvas tail. Compact-vs-full is a
|
|
19
|
+
* form-factor decision everywhere else in presence (`AgentPresenceWidget`), so
|
|
20
|
+
* it is here too — no second definition of the narrow read.
|
|
21
|
+
*/
|
|
22
|
+
export declare function AgentContinuationFoot(): React.ReactElement | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useDisplayedLayout } from '@40rty/ams-sdk';
|
|
2
|
+
type Layout = ReturnType<typeof useDisplayedLayout>;
|
|
3
|
+
/** The slice of `useTurn()` the gate reads — so the rule is testable without React. */
|
|
4
|
+
interface TurnShape {
|
|
5
|
+
/** Message index of the turn on canvas. 0 only while no turn has committed. */
|
|
6
|
+
index: number;
|
|
7
|
+
/** Id stamped onto every element THIS turn patches. */
|
|
8
|
+
turnId: string | undefined;
|
|
9
|
+
status: 'streaming' | 'done';
|
|
10
|
+
userMessage: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* BOOTING — the agent is working on the ARRIVAL'S OWN ASK and the canvas holds
|
|
14
|
+
* nothing of that work yet.
|
|
15
|
+
*
|
|
16
|
+
* A visit carrying `?intent=` auto-submits its prompt, so the agent runs for
|
|
17
|
+
* seconds over a layout the visitor never asked for. That is the whole of the
|
|
18
|
+
* defect this covers, and `isOpeningTurn` is the whole of the gate: the loader
|
|
19
|
+
* belongs to the one turn the arrival submitted for itself, never to an ask the
|
|
20
|
+
* visitor typed (they watched themselves send it) and never to a second turn in
|
|
21
|
+
* the same session.
|
|
22
|
+
*
|
|
23
|
+
* It holds however the visit started — including a returning visitor whose
|
|
24
|
+
* stored thread restores a previous answer onto the canvas, which is why it
|
|
25
|
+
* cannot be keyed on the turn index or on the canvas being untouched (measured:
|
|
26
|
+
* such an arrival opens its intent turn at index 5 with the previous turn's
|
|
27
|
+
* layout displayed, so both of those tests read "nothing to show" on precisely
|
|
28
|
+
* the arrival this exists for).
|
|
29
|
+
*
|
|
30
|
+
* It ends on this turn's own first layout patch (`turnHasLanded`) — not on the
|
|
31
|
+
* canvas merely holding something, which a restored thread already does. And a
|
|
32
|
+
* turn with no `userMessage` is the mount/bootstrap turn, the space's own cold
|
|
33
|
+
* start rather than a visitor waiting on an answer, so it never counts.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isCanvasBooting(turn: TurnShape, layout: Layout, isOpeningTurn: boolean): boolean;
|
|
36
|
+
export declare function useCanvasBooting(): boolean;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SuggestionCards } from './SuggestionCards';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FAQItem {
|
|
3
|
+
question: string;
|
|
4
|
+
/** `prose()`-marked in the catalog schema — the hydration boundary renders
|
|
5
|
+
* inline markdown before this component sees it. Never a raw string. */
|
|
6
|
+
answer: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface FAQProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
title?: string;
|
|
10
|
+
items: FAQItem[];
|
|
11
|
+
}
|
|
12
|
+
export declare const FAQ: React.ForwardRefExoticComponent<FAQProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Feature {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface FeatureGridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
features: Feature[];
|
|
9
|
+
columns?: 2 | 3 | 4;
|
|
10
|
+
}
|
|
11
|
+
export declare const FeatureGrid: React.ForwardRefExoticComponent<FeatureGridProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface InfoCard {
|
|
3
|
+
title: string;
|
|
4
|
+
/** `prose()`-marked in the catalog schema — the hydration boundary renders
|
|
5
|
+
* inline markdown before this component sees it. Never a raw string. */
|
|
6
|
+
description: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
type InfoCardsVariant = 'strip' | 'checklist' | 'stat';
|
|
9
|
+
interface InfoCardsProps {
|
|
10
|
+
title?: string;
|
|
11
|
+
cards?: InfoCard[];
|
|
12
|
+
items?: InfoCard[];
|
|
13
|
+
variant?: InfoCardsVariant;
|
|
14
|
+
}
|
|
15
|
+
export declare function InfoCards(props: InfoCardsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reviews — premium product-specific review block. Two render modes
|
|
3
|
+
* via slot density: standalone (full-bleed editorial section) and
|
|
4
|
+
* embedded (compact, sits inside a parent's slot).
|
|
5
|
+
*
|
|
6
|
+
* All typography goes through the design tokens (`--fourty-color-*`,
|
|
7
|
+
* `--fourty-font-display`/`--fourty-font-sans`). No hardcoded hex.
|
|
8
|
+
*/
|
|
9
|
+
export declare function Reviews(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface RichTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Raw HTML from an untrusted source (e.g. a merchant's Shopify product/page
|
|
4
|
+
* body). Sanitized with DOMPurify before it reaches the DOM. */
|
|
5
|
+
html: string;
|
|
6
|
+
}
|
|
7
|
+
/** Renders untrusted rich-text HTML (merchant product descriptions, policy
|
|
8
|
+
* pages, articles) safely. The one place `dangerouslySetInnerHTML` is
|
|
9
|
+
* allowed in this library — every other caller must render through here. */
|
|
10
|
+
export declare const RichText: React.ForwardRefExoticComponent<RichTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArticleDetail — prebuilt article reading surface. Editorial layout
|
|
3
|
+
* mirroring the journal aesthetic: hero image · meta eyebrow · headline ·
|
|
4
|
+
* deck · body html · tags. Viewport-fit container with internal scroll
|
|
5
|
+
* on the article body; chrome (eyebrow, title, deck) stays anchored.
|
|
6
|
+
*
|
|
7
|
+
* **Display only.** Follow-up reading actions (more articles, shop the
|
|
8
|
+
* look) are generated off-path by the chip-gen faculty and ride the
|
|
9
|
+
* composer, not this layout.
|
|
10
|
+
*
|
|
11
|
+
* Hydrates an entity reference of `kind:'article'`. The agent emits
|
|
12
|
+
* `articleDetail` with `article: [gid]`; the SDK's HydratorMap resolves
|
|
13
|
+
* the gid into a fully-shaped Article object before render.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ArticleDetail(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BlogCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
title: string;
|
|
4
|
+
excerpt?: string;
|
|
5
|
+
imageSrc?: string;
|
|
6
|
+
imageAlt?: string;
|
|
7
|
+
date?: string;
|
|
8
|
+
author?: string;
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const BlogCard: React.ForwardRefExoticComponent<BlogCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type SuggestionActionInput } from '@40rty/ams-sdk';
|
|
3
|
+
export interface BlogPostsProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
/** `prose()`-marked — the boundary renders markdown before this lands. */
|
|
6
|
+
subtitle?: ReactNode;
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
moreLabel?: string;
|
|
9
|
+
moreAction?: SuggestionActionInput;
|
|
10
|
+
/** Hydrated articles (agent may also stream the legacy `posts` alias). */
|
|
11
|
+
articles?: unknown[];
|
|
12
|
+
posts?: unknown[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Premium editorial blog posts section. Eyebrow + serif title + italic
|
|
16
|
+
* subtitle, then a row of editorial cards (image · title · excerpt ·
|
|
17
|
+
* meta). Viewport-fit: header pinned, cards row fills.
|
|
18
|
+
*/
|
|
19
|
+
export declare function BlogPosts({ title, subtitle, eyebrow, moreLabel, moreAction, articles: articlesProp, posts: postsProp, }: BlogPostsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PageDetail — prebuilt CMS page (about, shipping, returns, terms, …).
|
|
3
|
+
* Centered editorial column with title + html body. Viewport-fit
|
|
4
|
+
* container with internal scroll on the page body.
|
|
5
|
+
*
|
|
6
|
+
* **Display only.** Follow-up chips are generated off-path by the
|
|
7
|
+
* chip-gen faculty and ride the composer, not this layout.
|
|
8
|
+
*
|
|
9
|
+
* Hydrates an entity reference of `kind:'page'`. The agent emits
|
|
10
|
+
* `pageDetail` with `page: [gid]`; the SDK's HydratorMap resolves the
|
|
11
|
+
* gid into a fully-shaped Page object before render.
|
|
12
|
+
*/
|
|
13
|
+
export declare function PageDetail(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PolicyDetail — three modes for surfacing a Shopify shop policy
|
|
3
|
+
* (refund, privacy, terms, shipping, subscription).
|
|
4
|
+
*
|
|
5
|
+
* - `mode: 'answer'` (default) — small inline card. Renders the
|
|
6
|
+
* agent-written `answer` text below the policy title, with a
|
|
7
|
+
* "Read full policy" affordance. COMPOSABLE alongside productGrid
|
|
8
|
+
* etc. — does NOT take over the canvas. The 95% case for
|
|
9
|
+
* conversational policy questions.
|
|
10
|
+
*
|
|
11
|
+
* - `mode: 'excerpt'` — small inline card. Renders the BM25-matched
|
|
12
|
+
* paragraph from `excerptHtml` instead of the agent answer. Use
|
|
13
|
+
* when the matched excerpt directly answers the question and the
|
|
14
|
+
* agent has no value to add by paraphrasing.
|
|
15
|
+
*
|
|
16
|
+
* - `mode: 'full'` — fullbleed reader. The original behavior:
|
|
17
|
+
* centered editorial column with the entire `bodyHtml`. Use ONLY
|
|
18
|
+
* when the visitor explicitly asks to read the whole document
|
|
19
|
+
* ("open the returns policy", "show me the full terms").
|
|
20
|
+
*
|
|
21
|
+
* Always hydrates from a single ShopPolicy gid (`policy: [gid]`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function PolicyDetail(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ButtonProps } from '../../../primitives/Button';
|
|
3
|
+
export interface AddToCartButtonProps extends Omit<ButtonProps, 'onClick'> {
|
|
4
|
+
onAddToCart?: () => void | Promise<void>;
|
|
5
|
+
addedLabel?: string;
|
|
6
|
+
/** How long the "added" confirmation lingers before reverting to idle. */
|
|
7
|
+
addedDurationMs?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const AddToCartButton: React.ForwardRefExoticComponent<AddToCartButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Cart } from '../../../types/commerce';
|
|
2
|
+
export interface CartContentProps {
|
|
3
|
+
cart: Cart | null;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onUpdateQuantity?: (lineId: string, quantity: number) => void;
|
|
6
|
+
onRemove?: (lineId: string) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Host override for the checkout CTA. When absent, CartContent
|
|
9
|
+
* navigates to `cart.checkoutUrl` itself (framed contexts open a new
|
|
10
|
+
* tab, standalone spacefronts redirect in place).
|
|
11
|
+
*/
|
|
12
|
+
onCheckout?: () => void | Promise<void>;
|
|
13
|
+
/** Apply a promo code — absent hides the promo input entirely. */
|
|
14
|
+
onApplyDiscountCode?: (code: string) => void;
|
|
15
|
+
/** Remove an applied promo code. */
|
|
16
|
+
onRemoveDiscountCode?: (code: string) => void;
|
|
17
|
+
/** True while a promo apply/remove round-trip is in flight. */
|
|
18
|
+
discountPending?: boolean;
|
|
19
|
+
closeIcon?: 'x' | 'back';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* CartContent — head + body + foot of the cart drawer, no slide-over
|
|
23
|
+
* chrome. Used by `CartDrawer` (inside its motion.aside) and by
|
|
24
|
+
* `ComposerDock`'s in-pane cart view (which slides this content into
|
|
25
|
+
* place of the chat history). Same line-item rendering, same totals,
|
|
26
|
+
* same exit flows — only the surrounding wrapper differs.
|
|
27
|
+
*
|
|
28
|
+
* CartContent is the single owner of cart-exit navigation:
|
|
29
|
+
* - checkout → `cart.checkoutUrl` (or the host's `onCheckout` override)
|
|
30
|
+
* - official store → `cart.storeCartUrl` (online-store cart handoff;
|
|
31
|
+
* the CTA renders only when the platform adapter provides the URL)
|
|
32
|
+
*
|
|
33
|
+
* Line items, counts, and totals are derived from `cart` here — hosts
|
|
34
|
+
* pass the cart object and callbacks, nothing else. Promo code +
|
|
35
|
+
* discount-aware totals render in `CartFoot`.
|
|
36
|
+
*
|
|
37
|
+
* `closeIcon` swaps the head's close affordance: `x` = close drawer,
|
|
38
|
+
* `back` = back to chat (chevron pointing left).
|
|
39
|
+
*/
|
|
40
|
+
export declare function CartContent({ cart, onClose, onUpdateQuantity, onRemove, onCheckout, onApplyDiscountCode, onRemoveDiscountCode, discountPending, closeIcon, }: CartContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Cart } from '../../../types/commerce';
|
|
3
|
+
import { type CartContentProps } from './CartContent';
|
|
4
|
+
export interface CartDrawerProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
cart: Cart | null;
|
|
8
|
+
onUpdateQuantity?: (lineId: string, quantity: number) => void;
|
|
9
|
+
onRemove?: (lineId: string) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Host override for the checkout CTA. When absent, the drawer's
|
|
12
|
+
* CartContent navigates to `cart.checkoutUrl` itself with the shared
|
|
13
|
+
* framed/standalone logic — most hosts should NOT pass this.
|
|
14
|
+
*/
|
|
15
|
+
onCheckout?: () => void | Promise<void>;
|
|
16
|
+
/** Apply a promo code — absent hides the promo input. */
|
|
17
|
+
onApplyDiscountCode?: (code: string) => void;
|
|
18
|
+
/** Remove an applied promo code. */
|
|
19
|
+
onRemoveDiscountCode?: (code: string) => void;
|
|
20
|
+
/** True while a promo apply/remove round-trip is in flight. */
|
|
21
|
+
discountPending?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Brand override for the drawer's HEAD/BODY/FOOT markup. Receives the resolved
|
|
24
|
+
* content props (cart + callbacks) and returns the brand's own dumb cart UI —
|
|
25
|
+
* which shares the cart LOGIC via `useCartView`, so only the markup differs.
|
|
26
|
+
* Absent → the base `CartContent`. The slide-over CHROME (backdrop, focus trap,
|
|
27
|
+
* motion) stays shared here regardless.
|
|
28
|
+
*/
|
|
29
|
+
renderContent?: (props: CartContentProps) => React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* CartDrawer — design's `.cart-drawer` slide-over (right-anchored).
|
|
33
|
+
* Pixel-perfect to the original design handoff: blackout sans `bag` head,
|
|
34
|
+
* mono caps count, line items with image + brand + name + qty
|
|
35
|
+
* stepper + price, foot total + free-shipping line + dark CTA.
|
|
36
|
+
*
|
|
37
|
+
* Pure chrome: the head/body/foot (including checkout + official-store
|
|
38
|
+
* exit flows, promo code, and discount-aware totals) live in
|
|
39
|
+
* `CartContent`, shared with ComposerDock's in-pane cart view.
|
|
40
|
+
*/
|
|
41
|
+
export declare function CartDrawer({ open, onClose, cart, onUpdateQuantity, onRemove, onCheckout, onApplyDiscountCode, onRemoveDiscountCode, discountPending, renderContent, }: CartDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Cart } from '../../../types/commerce';
|
|
2
|
+
/** Which exit CTA is mid-navigation. Both buttons disable while set. */
|
|
3
|
+
export type ExitPending = 'checkout' | 'store' | null;
|
|
4
|
+
export interface CartFootProps {
|
|
5
|
+
lines: Cart['lines'];
|
|
6
|
+
/** Applied discount codes (from `cart.discountCodes`). */
|
|
7
|
+
discountCodes: Cart['discountCodes'];
|
|
8
|
+
subtotal: number;
|
|
9
|
+
/** Backend post-discount total — absent when the backend doesn't distinguish it. */
|
|
10
|
+
backendTotal: number | undefined;
|
|
11
|
+
currency: string;
|
|
12
|
+
/** Which exit CTA is mid-navigation (disables both). */
|
|
13
|
+
exitPending: ExitPending;
|
|
14
|
+
/** Online-store cart handoff URL — absent hides the store CTA. */
|
|
15
|
+
storeCartUrl: string | undefined;
|
|
16
|
+
onCheckout: () => void;
|
|
17
|
+
onGoToStore: () => void;
|
|
18
|
+
/** Apply a promo code — absent hides the promo input entirely. */
|
|
19
|
+
onApplyDiscountCode?: (code: string) => void;
|
|
20
|
+
/** Remove an applied promo code. */
|
|
21
|
+
onRemoveDiscountCode?: (code: string) => void;
|
|
22
|
+
/** True while a promo apply/remove round-trip is in flight. */
|
|
23
|
+
discountPending?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* CartFoot — the cart drawer foot: promo code, discount-aware totals,
|
|
27
|
+
* and both exit CTAs (checkout + official-store handoff). Presentational;
|
|
28
|
+
* `CartContent` owns the exit navigation and passes the handlers down.
|
|
29
|
+
*/
|
|
30
|
+
export declare function CartFoot({ lines, discountCodes, subtotal, backendTotal, currency, exitPending, storeCartUrl, onCheckout, onGoToStore, onApplyDiscountCode, onRemoveDiscountCode, discountPending, }: CartFootProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CartLine } from '../../../types/commerce';
|
|
3
|
+
export interface CartLineItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
line: CartLine;
|
|
5
|
+
onUpdateQuantity?: (lineId: string, quantity: number) => void;
|
|
6
|
+
onRemove?: (lineId: string) => void;
|
|
7
|
+
/** Fired after the line title / image is tapped to navigate to the
|
|
8
|
+
* product page. Useful for hosts that mount this inside a drawer
|
|
9
|
+
* and want to dismiss it on nav. Optional — when absent, nav still
|
|
10
|
+
* fires through the agentic signal channel. */
|
|
11
|
+
onNavigate?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const CartLineItem: React.ForwardRefExoticComponent<CartLineItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Cart } from '../../../types/commerce';
|
|
2
|
+
export interface CartLineRowProps {
|
|
3
|
+
line: Cart['lines'][number];
|
|
4
|
+
onQty: (q: number) => void;
|
|
5
|
+
onRemove: () => void;
|
|
6
|
+
currency: string;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* CartLineRow — one line item inside the cart drawer body: image +
|
|
11
|
+
* brand + name + variant/sku + qty stepper + price.
|
|
12
|
+
*
|
|
13
|
+
* A dumb presentational row — the `useCanvasActions` runtime seam (the
|
|
14
|
+
* harness) owns what tapping a line means (navigate to the product);
|
|
15
|
+
* the row just reports it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function CartLineRow({ line, onQty, onRemove, currency, onClose }: CartLineRowProps): import("react/jsx-runtime").JSX.Element;
|