@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,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE BEAT — the shortest interval between two compositions of the band.
|
|
3
|
+
*
|
|
4
|
+
* An arrival inside a beat does not draw immediately; it draws at the next
|
|
5
|
+
* boundary, with everything else that arrived with it. 260ms is about the
|
|
6
|
+
* length of the entrance it triggers, so one gesture finishes as the next
|
|
7
|
+
* becomes possible and the band never overlaps two of them.
|
|
8
|
+
*/
|
|
9
|
+
export declare const BAND_BEAT_MS = 260;
|
|
10
|
+
export declare const BAND_REGION_ORDER: {
|
|
11
|
+
readonly criteria: 0;
|
|
12
|
+
readonly voice: 1;
|
|
13
|
+
readonly deck: 2;
|
|
14
|
+
};
|
|
15
|
+
export type BandRegion = keyof typeof BAND_REGION_ORDER;
|
|
16
|
+
/** One region's offset inside the band's gesture. */
|
|
17
|
+
export declare function bandRegionDelay(region: BandRegion): number;
|
|
18
|
+
/** The editorial settle curve the whole band moves on — its own gesture, its
|
|
19
|
+
* regions, its chips and its cards. One curve, so nothing on this surface can
|
|
20
|
+
* move on a different footing from anything else. */
|
|
21
|
+
export declare const BAND_SETTLE: [number, number, number, number];
|
|
22
|
+
/**
|
|
23
|
+
* Admit a value to the band's composition ON THE BEAT.
|
|
24
|
+
*
|
|
25
|
+
* Returns the value the band should DRAW, which is the last one admitted at a
|
|
26
|
+
* beat boundary — not necessarily the newest one the stream holds. A change
|
|
27
|
+
* arriving a full beat after the previous one is admitted immediately (the
|
|
28
|
+
* common case: the band is not behind anything), and a burst is held to the
|
|
29
|
+
* boundary and drawn as one.
|
|
30
|
+
*
|
|
31
|
+
* ONE CALL SITE, at the top of the band (`StreamRead`), on the whole view. That
|
|
32
|
+
* is the point: quantising per region would give three regions three cadences
|
|
33
|
+
* and reinvent the problem in slower motion. One snapshot, one render, every
|
|
34
|
+
* region moving on the same frame.
|
|
35
|
+
*
|
|
36
|
+
* `signature` is what "changed" MEANS for the value — the caller states it,
|
|
37
|
+
* because only the caller knows which parts of its object are the composition
|
|
38
|
+
* and which are identity churn from an upstream re-render.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useBandBeat<T>(value: T, signature: string): T;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE BAND'S HEIGHT — one strip, every state, derived from the tallest thing
|
|
3
|
+
* that stands on it (the compact source card).
|
|
4
|
+
*
|
|
5
|
+
* It lives HERE, with the rest of the band's geometry, because two things need
|
|
6
|
+
* it and a percentage chain between them proved not to be a substitute. The row
|
|
7
|
+
* carried `height: 100%`, which resolves against the animated read box — and
|
|
8
|
+
* measured live it did NOT hold through a turn: the row's box went 44 → 34 → 40
|
|
9
|
+
* → 44 as the deck filled and the chips swapped, and since the row centres its
|
|
10
|
+
* regions, every chip and the sentence beside them slid up and down by half of
|
|
11
|
+
* each change. A stated height cannot fail to resolve.
|
|
12
|
+
*/
|
|
13
|
+
export declare const BAND_HEIGHT: number;
|
|
14
|
+
/**
|
|
15
|
+
* ONE criterion's slot on the rail, at the band's full width.
|
|
16
|
+
*
|
|
17
|
+
* The widest a criterion is allowed to be, not the widest one can be: a value
|
|
18
|
+
* past it wraps to a second line and only then clamps, and the full value is in
|
|
19
|
+
* the brief, which is the surface for reading a constraint properly. Sized for
|
|
20
|
+
* the rail's own type — a tracked 9px micro-label over a 12.5px uppercase value
|
|
21
|
+
* — against the values the agent actually writes: two words at this size
|
|
22
|
+
* ("BURGUNDY AND RED", "UNDER 2 INCHES") stand whole on one line, and the
|
|
23
|
+
* occasional phrase ("STRUCTURED SHOULDER BAGS") takes the second rather than
|
|
24
|
+
* being cut mid-word, which is what a 132px slot did to it.
|
|
25
|
+
*
|
|
26
|
+
* It is the number the RESERVATION is derived from, not the track itself: the
|
|
27
|
+
* slots divide the rail evenly (`criteriaRailTemplate`), which comes to exactly
|
|
28
|
+
* this at full width and shrinks all of them together under pressure. Fixed
|
|
29
|
+
* tracks clipped instead — at 1280px the third slot was cut in half and the
|
|
30
|
+
* constraint in it silently disappeared, uncounted, which is the one thing this
|
|
31
|
+
* surface may never do with something it claims to know.
|
|
32
|
+
*/
|
|
33
|
+
export declare const CRITERION_SLOT = 152;
|
|
34
|
+
/** Air between criteria. JS-owned because the region's reserved width is
|
|
35
|
+
* computed from it; the rail sets it inline from this constant. */
|
|
36
|
+
export declare const CRITERION_GAP = 22;
|
|
37
|
+
/**
|
|
38
|
+
* A CRITERION'S BOX — the same height for every chip, whatever is written in it.
|
|
39
|
+
*
|
|
40
|
+
* THE VERTICAL CHURN THIS REMOVES. The chip was content-sized, and its value was
|
|
41
|
+
* allowed to wrap to a second line, so a chip was ~34px with a short value and
|
|
42
|
+
* ~47px with a long one. The rail centres its chips and the row centres the
|
|
43
|
+
* rail, so the arrival of ONE two-line value lifted every other chip on the band
|
|
44
|
+
* by half the difference, and the next re-phrasing of that same constraint
|
|
45
|
+
* ("BURGUNDY" → "BURGUNDY AND RED" → "BURGUNDY") put them back. Nothing decided
|
|
46
|
+
* any of that: it is what centring content-sized boxes does while content is
|
|
47
|
+
* still arriving, and on a surface whose whole claim is stillness it read as the
|
|
48
|
+
* chips being nudged by things happening elsewhere.
|
|
49
|
+
*
|
|
50
|
+
* Reserved rather than measured, like every other region on this band. The three
|
|
51
|
+
* terms are the real type's line boxes, so the box cannot be shorter than what
|
|
52
|
+
* stands in it, and the value is ONE line — the band is a 44px strip and a
|
|
53
|
+
* two-line chip does not fit in it at all (it was clipped by the band's own edge
|
|
54
|
+
* before it was ever a jitter). A value past the slot fades out under the same
|
|
55
|
+
* mask the voice line uses, and the whole value is one click away in the brief.
|
|
56
|
+
*/
|
|
57
|
+
export declare const CRITERION_LABEL_LINE = 12;
|
|
58
|
+
/** The value's line box. One line — see `CRITERION_LABEL_LINE`. */
|
|
59
|
+
export declare const CRITERION_VALUE_LINE = 15;
|
|
60
|
+
/** Between the label and its value. */
|
|
61
|
+
export declare const CRITERION_LINE_GAP = 2;
|
|
62
|
+
/** Under the value, where the chip strikes its own rule as it locks in. */
|
|
63
|
+
export declare const CRITERION_RULE_GAP = 5;
|
|
64
|
+
/** The chip's fixed box — what the band reserves for one criterion. */
|
|
65
|
+
export declare const CRITERION_BOX_HEIGHT: number;
|
|
66
|
+
/**
|
|
67
|
+
* The BRIEF HANDLE's lane, at the very end of the rail.
|
|
68
|
+
*
|
|
69
|
+
* The handle used to be `position: absolute; right: 4px; top: 50%` on the band —
|
|
70
|
+
* a 10px glyph at 40% opacity, marooned at the far right edge, hovering over
|
|
71
|
+
* whatever the deck region happened to be holding, ~1400px from the chips it
|
|
72
|
+
* opens. It read as a stuck mark rather than a control. A control belongs beside
|
|
73
|
+
* the thing it controls, so it stands in the rail's own last lane, in the flow,
|
|
74
|
+
* reserved like everything else here.
|
|
75
|
+
*/
|
|
76
|
+
export declare const CRITERION_HANDLE_LANE = 22;
|
|
77
|
+
/**
|
|
78
|
+
* The `+N` tail's own lane at the end of the rail.
|
|
79
|
+
*
|
|
80
|
+
* Reserved, exactly as the deck's tail slot is (`SIFT_TAIL_WIDTH`): the count
|
|
81
|
+
* appears the moment the agent holds a fourth constraint, and a tail that took
|
|
82
|
+
* its width on arrival would spend a slot's room and pull the whole rail in.
|
|
83
|
+
* Wide enough for "+12" at the figure's own size.
|
|
84
|
+
*/
|
|
85
|
+
export declare const CRITERION_TAIL_LANE = 30;
|
|
86
|
+
/**
|
|
87
|
+
* THE VOICE LINE'S HEIGHT.
|
|
88
|
+
*
|
|
89
|
+
* A RESERVATION, like every other region here, and for a reason that showed up
|
|
90
|
+
* the moment it was not one: a line that could shrink DID — squeezed to 0px by
|
|
91
|
+
* the box around it, which read as "the sentence never arrived" and slid the
|
|
92
|
+
* chips the moment it did.
|
|
93
|
+
*
|
|
94
|
+
* It also has to be SHORTER THAN THE BAND, which is the constraint the stacked
|
|
95
|
+
* composition broke: this line stood above the row rather than in it, so the
|
|
96
|
+
* band was asked for 24 + a 10px gap + the 40px deck inside a 44px strip and
|
|
97
|
+
* clipped the difference. On the row, this is the shorter of the two things
|
|
98
|
+
* standing on it and the card sets the height.
|
|
99
|
+
*/
|
|
100
|
+
export declare const VOICE_LINE_HEIGHT = 24;
|
|
101
|
+
/**
|
|
102
|
+
* The floor under the VOICE track.
|
|
103
|
+
*
|
|
104
|
+
* The rail's reservation plus the deck's leaves a narrow band no room for a
|
|
105
|
+
* sentence, and a band whose voice is three words wide has stopped being a band
|
|
106
|
+
* with a voice on it. So the voice keeps a floor and the RAIL is what gives way
|
|
107
|
+
* below it — its chips ellipsize, and the constraints are still counted and
|
|
108
|
+
* still one click from being read whole.
|
|
109
|
+
*
|
|
110
|
+
* Stated as the floor rather than as a share of the row (it was `33%`, which bit
|
|
111
|
+
* at 1512px — the most common desktop width there is — and clipped the tail lane
|
|
112
|
+
* off a rail that had room for it). A share caps the rail hardest exactly where
|
|
113
|
+
* there is space to spare; a floor only intervenes when the sentence is actually
|
|
114
|
+
* being starved.
|
|
115
|
+
*/
|
|
116
|
+
export declare const VOICE_MIN_WIDTH = 280;
|
|
117
|
+
/**
|
|
118
|
+
* THE RAIL'S WIDTH — the slots the band is DRAWING, plus the lanes it is
|
|
119
|
+
* drawing, and nothing it is not.
|
|
120
|
+
*
|
|
121
|
+
* IT USED TO RESERVE THE WHOLE BUDGET, always: three slots and both end lanes
|
|
122
|
+
* whether the agent knew three things or one. That was the only way to keep the
|
|
123
|
+
* sentence beside it from starting somewhere new every time a constraint landed
|
|
124
|
+
* — and on the live storefront it cost exactly what a worst-case reservation
|
|
125
|
+
* costs. Two criteria on a three-slot rail: ~300px of void mid-band, the brief
|
|
126
|
+
* handle marooned in the middle of it, and the sentence next to it cut mid-word
|
|
127
|
+
* for want of the width standing empty to its left.
|
|
128
|
+
*
|
|
129
|
+
* What makes the honest width safe now is the BEAT (`band-beat.ts`): the rail's
|
|
130
|
+
* slot count is read from the composition the band admitted, which changes only
|
|
131
|
+
* on a beat boundary, as one eased move of the whole row. A region growing is a
|
|
132
|
+
* decision the visitor can read, not churn — the thing it must never be is a
|
|
133
|
+
* side effect of an arrival.
|
|
134
|
+
*/
|
|
135
|
+
export declare function criteriaRegionWidth(slots: number, lanes: RailLanes): number;
|
|
136
|
+
/** The rail's END LANES — drawn only when there is something to put in them. A
|
|
137
|
+
* `+N` exists only once the band is holding more than it can show, and the
|
|
138
|
+
* brief handle only where the host has a brief to open. */
|
|
139
|
+
export interface RailLanes {
|
|
140
|
+
tail: boolean;
|
|
141
|
+
handle: boolean;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* The rail's own tracks — ONE PER SLOT, plus the tail's lane.
|
|
145
|
+
*
|
|
146
|
+
* A criterion stands in its slot, not after its neighbour. The rail was a
|
|
147
|
+
* content-packed line, which left the set stable only as long as the words in it
|
|
148
|
+
* were: the agent re-labels the same constraint between turns ("COLOR" →
|
|
149
|
+
* "COLOUR PREFERENCE"), and every such re-phrasing slid every chip to the right
|
|
150
|
+
* of it. Nothing was decided by a synonym. A slot the second criterion always
|
|
151
|
+
* stands in is what makes the rail indifferent to how the first one is worded —
|
|
152
|
+
* and it is the renderer's half of the same doctrine the producer follows, where
|
|
153
|
+
* the deterministic layer owns slot IDENTITY and the model only authors words.
|
|
154
|
+
*
|
|
155
|
+
* The slots divide the rail EVENLY rather than each taking `CRITERION_SLOT`
|
|
156
|
+
* outright. At full width that is the same number (the reservation is computed
|
|
157
|
+
* from it), and under pressure it is the difference between every criterion
|
|
158
|
+
* getting narrower — labels and values ellipsizing, all three still on screen —
|
|
159
|
+
* and the last one being clipped out of existence by the rail's own edge.
|
|
160
|
+
*/
|
|
161
|
+
export declare function criteriaRailTemplate(slots: number, lanes: RailLanes): string;
|
|
162
|
+
/** The lane a rail's `+N` stands in — after the slots, and only when drawn. */
|
|
163
|
+
export declare function railTailLane(slots: number): number;
|
|
164
|
+
/** The lane the brief handle stands in — after the slots and the tail if there
|
|
165
|
+
* is one, so the handle is always immediately beside the chips it opens rather
|
|
166
|
+
* than at the end of a budget the rail is not spending. */
|
|
167
|
+
export declare function railHandleLane(slots: number, lanes: RailLanes): number;
|
|
168
|
+
/**
|
|
169
|
+
* The row's `grid-template-columns` — the band's three tracks.
|
|
170
|
+
*
|
|
171
|
+
* Takes both end regions' widths rather than deriving second copies of them, so
|
|
172
|
+
* the track a region stands in and the box that region reserves for itself are
|
|
173
|
+
* one number by construction.
|
|
174
|
+
*
|
|
175
|
+
* THE MIDDLE TRACK TAKES EVERYTHING THE ENDS ARE NOT USING. That is the whole
|
|
176
|
+
* change: both ends are now sized to what they are actually drawing (the rail
|
|
177
|
+
* from the criteria the band admitted, the deck from its own card box), and the
|
|
178
|
+
* sentence — the one element on this surface that is always short of room and
|
|
179
|
+
* fades out mid-thought when it runs short — is handed the remainder instead of
|
|
180
|
+
* a worst-case leftover. Three tracks, always, so the row can EASE between two
|
|
181
|
+
* compositions on the beat rather than jumping between them.
|
|
182
|
+
*
|
|
183
|
+
* Each end is `minmax(0, W)`: a track that takes its width wherever the row can
|
|
184
|
+
* pay for it and yields — rather than clipping the voice out of existence —
|
|
185
|
+
* where it cannot, with `VOICE_MIN_WIDTH` as the floor that decides where "it
|
|
186
|
+
* cannot" begins.
|
|
187
|
+
*/
|
|
188
|
+
export declare function bandRowTemplate(railWidth: number, deckWidth: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PresenceSourceElement, PresenceSourceRef } from '@40rty/ams-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Fill in the picture a record cites, when the turn read the cited record.
|
|
4
|
+
*
|
|
5
|
+
* Returns NEW refs — the elements are the reducer's and are never mutated. A
|
|
6
|
+
* ref that already has its own picture is left exactly as it is: what a record
|
|
7
|
+
* carries always beats what it cites.
|
|
8
|
+
*/
|
|
9
|
+
export declare function withCitedImages(refs: readonly PresenceSourceRef[], sources: readonly PresenceSourceElement[]): PresenceSourceRef[];
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export declare const presenceClass: {
|
|
2
|
+
/** The height-animating wrapper (the notch lead fills to it). */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Inner static box the ResizeObserver measures (so the band auto-fits). */
|
|
5
|
+
measure: string;
|
|
6
|
+
/** The single presence FRAME — the motion wrapper AnimatePresence swaps as the
|
|
7
|
+
* agent's state changes. `popLayout` floats an exiting frame out of flow so
|
|
8
|
+
* the band measures only the entering one. */
|
|
9
|
+
frame: string;
|
|
10
|
+
/** `InlinePresenceRead`'s own outer wrapper (prose line + composing skeleton,
|
|
11
|
+
* stacked). Distinct from `frame` above — that one is AgentPresenceWidget's
|
|
12
|
+
* AnimatePresence motion wrapper around whichever form is active; reusing it
|
|
13
|
+
* here previously bled `display:flex` onto the main notch's layout too. */
|
|
14
|
+
inlineFrame: string;
|
|
15
|
+
/** The ONE element-stream face — the row, plus the editable dossier beneath it
|
|
16
|
+
* when the band is open at rest. One node with one key: the row and the
|
|
17
|
+
* dossier used to be two trees swapped by AnimatePresence, and both stayed
|
|
18
|
+
* mounted, drawing every glyph twice. `data-stacked` carries the difference. */
|
|
19
|
+
stream: string;
|
|
20
|
+
/** The flex row a form lays out on — eyebrow · rule · content. */
|
|
21
|
+
row: string;
|
|
22
|
+
/** The right-hand DECK REGION — a fixed-width box (JS-set, see
|
|
23
|
+
* `siftRegionWidth`) holding the gate and the candidate deck, standing at the
|
|
24
|
+
* band's right edge WHETHER OR NOT there is a deck in it. Reserved rather
|
|
25
|
+
* than conditional so nothing on the row moves when a turn opens or settles.
|
|
26
|
+
* (Was `evidence`, a block that also held the criteria and swapped ends of
|
|
27
|
+
* the band on `data-working` — a ~1100px traversal twice per turn.) */
|
|
28
|
+
deck: string;
|
|
29
|
+
/** Small tracked-caps label naming the moment. */
|
|
30
|
+
eyebrow: string;
|
|
31
|
+
/** Hairline divider between eyebrow and content. */
|
|
32
|
+
rule: string;
|
|
33
|
+
/** A shimmering placeholder line — shown while a flow is live but before (or
|
|
34
|
+
* between) its reads land, so the lane reads as actively working, not blank. */
|
|
35
|
+
shimmer: string;
|
|
36
|
+
/** The FILLER sweep — a travelling hairline shown when the band is working
|
|
37
|
+
* and its stream is still empty, so the strip is never blank mid-turn. */
|
|
38
|
+
filler: string;
|
|
39
|
+
/** The inline lane's PROSE row — the agent's evolving voice (read or shimmer),
|
|
40
|
+
* kept never-empty above the working skeleton (scanning state). */
|
|
41
|
+
proseLine: string;
|
|
42
|
+
/** The grow box inside the prose row (the read/shimmer fills it, min-width:0). */
|
|
43
|
+
proseBody: string;
|
|
44
|
+
/** The continuation loader's centred column — the morphing layout preview stacked
|
|
45
|
+
* over its status line. */
|
|
46
|
+
loaderColumn: string;
|
|
47
|
+
/** The status line under the morph — the agent's live read, or the archetype label
|
|
48
|
+
* naming the shape forming, with a steady caret. */
|
|
49
|
+
status: string;
|
|
50
|
+
/** The morph box — six frosted tiles cycling through layout archetypes. */
|
|
51
|
+
layoutMorph: string;
|
|
52
|
+
/** One frosted tile in the morph (geometry set inline, skin + transition in CSS). */
|
|
53
|
+
layoutMorphTile: string;
|
|
54
|
+
/** The agent's read — the readable lead sentence. */
|
|
55
|
+
prose: string;
|
|
56
|
+
/** THE VOICE LINE — the band's sentence, in the row's middle track, typed.
|
|
57
|
+
* Distinct from `prose` (which the island and the inline read lay out): this
|
|
58
|
+
* one is clipped to a single line by a mask, because the band's height is
|
|
59
|
+
* fixed and a second line would be sheared by it. */
|
|
60
|
+
voiceLine: string;
|
|
61
|
+
/** The rail's last lane — the brief handle's reserved cell, beside the chips it
|
|
62
|
+
* opens rather than floating at the band's right edge. */
|
|
63
|
+
railHandle: string;
|
|
64
|
+
/** The dossier's vertical editorial stack — kicker / read / facts. */
|
|
65
|
+
dossier: string;
|
|
66
|
+
/** The dossier's top line — the live dot beside the eyebrow kicker. */
|
|
67
|
+
kicker: string;
|
|
68
|
+
/** Per-form presence HOST — the motion wrapper AnimatePresence swaps. Owns the
|
|
69
|
+
* crossfade so `popLayout` can pull an exiting form out of flow (the band then
|
|
70
|
+
* measures only the entering form → one eased move, no sum, no 2-step fold). */
|
|
71
|
+
formHost: string;
|
|
72
|
+
/** The fact row (the dossier chips). */
|
|
73
|
+
facts: string;
|
|
74
|
+
/** One labeled fact. */
|
|
75
|
+
fact: string;
|
|
76
|
+
/** A fact's quiet micro-label ("SHOE SIZE"). */
|
|
77
|
+
factLabel: string;
|
|
78
|
+
/** A fact's hard value ("SIZE 9"). */
|
|
79
|
+
factValue: string;
|
|
80
|
+
/** The value's TEXT box, inside the value (which may also hold a colour
|
|
81
|
+
* swatch). Exists so the brief can normalise the model's casing with
|
|
82
|
+
* `::first-letter`, which needs a box whose first content is a letter. */
|
|
83
|
+
factValueText: string;
|
|
84
|
+
/** Vertical hairline between facts. */
|
|
85
|
+
factSep: string;
|
|
86
|
+
/** The hover × that forgets a fact. */
|
|
87
|
+
factForget: string;
|
|
88
|
+
/** "+N" tail on a folded fact list. A BUTTON on the band (it opens the brief),
|
|
89
|
+
* plain text anywhere the brief is already on screen. */
|
|
90
|
+
factMore: string;
|
|
91
|
+
/** The BRIEF — everything the agent knows, drawn in the notch drawer (desktop)
|
|
92
|
+
* or inline on the expanded island (mobile). The band shows what is in play;
|
|
93
|
+
* this shows what is known. */
|
|
94
|
+
brief: string;
|
|
95
|
+
/** The drawer's own panel chrome around the brief. */
|
|
96
|
+
briefPanel: string;
|
|
97
|
+
/** THE BRIEF'S IDENTITY LINE — who the agent is talking to. One row, always in
|
|
98
|
+
* the same place: the greeting when a name is known, the invitation to give
|
|
99
|
+
* one when it is not. See `BriefIdentity`. */
|
|
100
|
+
identity: string;
|
|
101
|
+
/** The greeting itself — a button, because the name is the visitor's to correct. */
|
|
102
|
+
identityName: string;
|
|
103
|
+
/** The invitation shown to a visitor who has not given a name. */
|
|
104
|
+
identityInvite: string;
|
|
105
|
+
/** The name field. Bare — no commit control beside it (see `NameField`). */
|
|
106
|
+
identityInput: string;
|
|
107
|
+
/** One register of the brief — carried memory, or this session's derivations. */
|
|
108
|
+
briefGroup: string;
|
|
109
|
+
/** A register's heading row (its eyebrow + the one-line note under it). */
|
|
110
|
+
briefGroupHead: string;
|
|
111
|
+
/** A color dot beside a color-valued fact. */
|
|
112
|
+
swatch: string;
|
|
113
|
+
/** The SIFT — the deck of candidates the agent is choosing between, plus the
|
|
114
|
+
* tail count of what it read beyond them. */
|
|
115
|
+
sift: string;
|
|
116
|
+
/** The TRACK the candidates sit on. Reserved at full width on the band before
|
|
117
|
+
* anything lands, so records fill a space instead of pushing one open. */
|
|
118
|
+
siftTrack: string;
|
|
119
|
+
/** The hairline that passes across the deck when a criterion crystallizes. */
|
|
120
|
+
siftPass: string;
|
|
121
|
+
/** "+N" naming the records read beyond the ones the deck has room to draw. */
|
|
122
|
+
siftMore: string;
|
|
123
|
+
/** The CRITERIA rail — the crystallized facts, standing beside the deck they
|
|
124
|
+
* are being applied to rather than adrift at the other end of the band. */
|
|
125
|
+
criteria: string;
|
|
126
|
+
/** The rule a criterion draws under itself as it locks in. */
|
|
127
|
+
criterionRule: string;
|
|
128
|
+
/** The hairline gate between the criteria and the deck. */
|
|
129
|
+
gate: string;
|
|
130
|
+
/** The resting promo line when there's nothing to read. */
|
|
131
|
+
fallback: string;
|
|
132
|
+
/** The chevron hinting the read expands on hover. */
|
|
133
|
+
hint: string;
|
|
134
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { PresenceAskElement, PresenceConcessionElement, PresenceElement, PresenceSourceElement } from '@40rty/ams-sdk';
|
|
2
|
+
import { type Fact } from './read-data';
|
|
3
|
+
export interface PresenceStreamView {
|
|
4
|
+
/** What the agent is reading, in arrival order. Mixed kinds coexist — that IS
|
|
5
|
+
* the signal ("it moved from products to reviews"). */
|
|
6
|
+
sources: PresenceSourceElement[];
|
|
7
|
+
/**
|
|
8
|
+
* What the agent understands, minus the visitor's own words (see below),
|
|
9
|
+
* minus restatements of a constraint already listed, in the order the band
|
|
10
|
+
* should spend its slots: what this turn put in play, then durable memory,
|
|
11
|
+
* then the freshest of the rest. See `fact-rail.ts` for both rules.
|
|
12
|
+
*
|
|
13
|
+
* UNCAPPED — the cap belongs after the visitor's optimistic dismissals, so
|
|
14
|
+
* forgetting a visible chip promotes the next one instead of leaving a hole.
|
|
15
|
+
*/
|
|
16
|
+
facts: Fact[];
|
|
17
|
+
/**
|
|
18
|
+
* Facts this surface holds but is NOT drawing — the `+N` tail. Zero on a
|
|
19
|
+
* derived view (nothing is dropped there); set by `withCappedFacts`, which is
|
|
20
|
+
* the one place the band's slot budget is spent.
|
|
21
|
+
*/
|
|
22
|
+
hiddenFacts: number;
|
|
23
|
+
/** Every fact label the agent currently holds, INCLUDING suppressed ones.
|
|
24
|
+
* The optimistic-dismissal overlay reconciles against what the agent still
|
|
25
|
+
* reports, not against what this surface chose to draw. */
|
|
26
|
+
heldLabels: string[];
|
|
27
|
+
/** The turn's one lead line, or '' when the space runs `voice: 'off'`. There
|
|
28
|
+
* is NO fallback text: silence is the correct output when the agent was
|
|
29
|
+
* configured not to speak — and, because the default profile is 'terse',
|
|
30
|
+
* it is a configured silence rather than an accidental one. */
|
|
31
|
+
voice: string;
|
|
32
|
+
/** The agent needs the visitor before it can continue. */
|
|
33
|
+
ask: PresenceAskElement | undefined;
|
|
34
|
+
/** What could not be satisfied. Currently never produced (the faculty's
|
|
35
|
+
* output schema carries no concession field) — see AgentPresenceWidget. */
|
|
36
|
+
concession: PresenceConcessionElement | undefined;
|
|
37
|
+
}
|
|
38
|
+
export declare const EMPTY_PRESENCE_VIEW: PresenceStreamView;
|
|
39
|
+
/**
|
|
40
|
+
* Project the live element stream onto the notch's render buckets.
|
|
41
|
+
*
|
|
42
|
+
* `liveTurnId` is what makes the fact rail a set of CURRENT constraints rather
|
|
43
|
+
* than a growing archive: facts retire on `never`, so recency is only knowable
|
|
44
|
+
* by comparing each element's `turnId` against the turn that is open now.
|
|
45
|
+
* Undefined (no turn has run) simply removes that tier of the ranking.
|
|
46
|
+
*/
|
|
47
|
+
export declare function derivePresenceView(elements: readonly PresenceElement[], liveTurnId: string | undefined): PresenceStreamView;
|
|
48
|
+
/**
|
|
49
|
+
* THE CAP — the band's fact slots, spent once, here.
|
|
50
|
+
*
|
|
51
|
+
* Applied AFTER the visitor's optimistic dismissals (which is why it takes the
|
|
52
|
+
* fact list separately rather than reading `view.facts`): forgetting a chip must
|
|
53
|
+
* promote the next constraint into its slot, not leave three-minus-one.
|
|
54
|
+
*
|
|
55
|
+
* TWO LISTS, on purpose. `facts` is what the band may DRAW (the agent's facts
|
|
56
|
+
* plus the optimistic bridge); `reachable` is what the brief will SHOW (the
|
|
57
|
+
* agent's facts alone). The cap spends the band's slots from the first; the `+N`
|
|
58
|
+
* is derived from the second, because that count is a door and it must not
|
|
59
|
+
* promise entries the room behind it does not hold.
|
|
60
|
+
*
|
|
61
|
+
* A cap rather than a scroll or a wrap because the band is ONE ROW at a fixed
|
|
62
|
+
* height. Wrapping is what produced the wall — eleven chips over two rows, each
|
|
63
|
+
* one making the next less likely to be read. What does not fit is counted, and
|
|
64
|
+
* the count is honest about how much is behind it.
|
|
65
|
+
*
|
|
66
|
+
* Which `limit` facts survive is `capWithDurableFloor`'s call, not a `slice`:
|
|
67
|
+
* the row holds one slot for durable memory so a passing constraint can never
|
|
68
|
+
* evict "I remember you". See `PRESENCE_DURABLE_SLOTS`.
|
|
69
|
+
*
|
|
70
|
+
* Written out field by field rather than spread: the two shapes stay explicitly
|
|
71
|
+
* in agreement, and a field added to the view cannot pass through here unread.
|
|
72
|
+
*/
|
|
73
|
+
export declare function withCappedFacts(view: PresenceStreamView, facts: Fact[], reachable: Fact[], limit: number): PresenceStreamView;
|
|
74
|
+
/** Whether the stream has anything the notch would draw. Empty is a correct,
|
|
75
|
+
* common outcome — a clear ask with a clean find and nothing inferred renders
|
|
76
|
+
* nothing at all, and that rarity is what buys the surface attention. */
|
|
77
|
+
export declare function viewIsEmpty(view: PresenceStreamView): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Everything the notch shows once the sift has drained — the "held" half of the
|
|
80
|
+
* stream. Drives the fold affordance (there is only more to reveal when there
|
|
81
|
+
* is held content) and the `hideHeld` host option.
|
|
82
|
+
*/
|
|
83
|
+
export declare function viewHasHeld(view: PresenceStreamView): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PresenceFactFormProps } from '@40rty/ams-sdk';
|
|
3
|
+
/**
|
|
4
|
+
* A colour, shown as the colour.
|
|
5
|
+
*
|
|
6
|
+
* The platform's own dot is 9px — a bullet that says "this is a colour" while
|
|
7
|
+
* showing almost none of it. This is the same match (`colorHexOf`, so the
|
|
8
|
+
* classifier and the drawing can never disagree) at a size that reads.
|
|
9
|
+
*/
|
|
10
|
+
export declare function BaselineColorFactForm({ fact }: PresenceFactFormProps): React.ReactElement;
|
|
11
|
+
/**
|
|
12
|
+
* A number, with the qualifying words stood down around it.
|
|
13
|
+
*
|
|
14
|
+
* Serves both numeric shapes, because the difference between them is a question
|
|
15
|
+
* of EMPHASIS and this pack takes the same position on both: the numeral is what
|
|
16
|
+
* the visitor came to read ("under **3** inches", "**$**300"), and the words are
|
|
17
|
+
* the unit. A brand that wants the two to look genuinely different registers its
|
|
18
|
+
* own form for one of them.
|
|
19
|
+
*/
|
|
20
|
+
export declare function BaselineFigureFactForm({ fact }: PresenceFactFormProps): React.ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const factFormClass: {
|
|
2
|
+
/** A colour value — the swatch and its name. */
|
|
3
|
+
color: string;
|
|
4
|
+
/** The colour itself, at a size that actually shows the colour. */
|
|
5
|
+
colorChip: string;
|
|
6
|
+
/** The colour's name beside it. */
|
|
7
|
+
colorName: string;
|
|
8
|
+
/** A numeric value — the figure plus any qualifying words. */
|
|
9
|
+
figure: string;
|
|
10
|
+
/** The number itself, carrying any currency mark or comparator. */
|
|
11
|
+
figureAmount: string;
|
|
12
|
+
/** "under", "inches" — the quiet words around the number. */
|
|
13
|
+
figureQualifier: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the baseline value forms: a colour drawn as the colour, a number with
|
|
3
|
+
* its qualifiers stood down.
|
|
4
|
+
*
|
|
5
|
+
* Idempotent, so a space can call it from more than one entry point without
|
|
6
|
+
* re-registering. Kinds not covered here (and any `scope` a vertical declares)
|
|
7
|
+
* keep falling back to the plain label-over-text chip.
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerBaselineFactForms(): void;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { PresenceFactElement } from '@40rty/ams-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Chips the band renders, on desktop AND on the island.
|
|
4
|
+
*
|
|
5
|
+
* Three, and the same three on both, because the number is not a width budget —
|
|
6
|
+
* it is the claim the surface is making. "These are the constraints in play"
|
|
7
|
+
* stops being true somewhere around four: past that the row reads as a dossier
|
|
8
|
+
* dump and the eye stops reading it at all. The rest are counted (`+N`) and are
|
|
9
|
+
* one click away in the dossier, which is the surface for reading them properly.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PRESENCE_FACT_LIMIT = 3;
|
|
12
|
+
/**
|
|
13
|
+
* How many of those slots are HELD for durable memory.
|
|
14
|
+
*
|
|
15
|
+
* One, and it is the difference between a surface that knows the visitor and a
|
|
16
|
+
* surface that knows the sentence they just typed. Live, a turn about a beach
|
|
17
|
+
* outfit emitted three constraints of its own (MATERIAL, BUDGET, INCLUDED
|
|
18
|
+
* ITEMS) and those three took the whole row — so the shopper's SHOE SIZE, the
|
|
19
|
+
* one thing carried in from a previous visit and the only claim this surface
|
|
20
|
+
* makes that cannot be re-earned, was evicted by a passing preference about
|
|
21
|
+
* raffia. "I remember you" outranks "you just said this"; a passing constraint
|
|
22
|
+
* that pushes it off the row is the band forgetting the visitor in order to
|
|
23
|
+
* quote them.
|
|
24
|
+
*
|
|
25
|
+
* ONE and not two: the live turn must still own the majority of the row, or the
|
|
26
|
+
* band stops tracking the conversation and becomes a profile badge. So the
|
|
27
|
+
* reserve is a FLOOR, not a quota — durable facts take as many slots as the
|
|
28
|
+
* ranking gives them, and this only guarantees they are never given none.
|
|
29
|
+
*/
|
|
30
|
+
export declare const PRESENCE_DURABLE_SLOTS = 1;
|
|
31
|
+
/**
|
|
32
|
+
* RECENCY RANKING — which constraints are in play, not which were ever learned.
|
|
33
|
+
*
|
|
34
|
+
* Three tiers, in this order, and each answers a different question:
|
|
35
|
+
*
|
|
36
|
+
* 1. TOUCHED THIS TURN (`turnId === liveTurnId`). The faculty re-derives its
|
|
37
|
+
* facts from context on every read, so a fact it re-emitted this turn is one
|
|
38
|
+
* it still considers live — and a fact it stopped emitting is one it has
|
|
39
|
+
* quietly dropped. That makes re-emission the only recency signal the client
|
|
40
|
+
* has, and it is a good one. Within the tier the faculty's own "most
|
|
41
|
+
* important first" order is preserved.
|
|
42
|
+
* 2. PROFILE TIER. Durable memory carried across visits — "I remember you" is
|
|
43
|
+
* the highest-value thing this surface can say and the only one it cannot
|
|
44
|
+
* re-earn, so it outranks any amount of session chatter.
|
|
45
|
+
* 3. EVERYTHING ELSE, newest READ first — see `newestReadFirst`. Stale session
|
|
46
|
+
* notes, the freshest read of them first, because a fact the agent restated
|
|
47
|
+
* two turns ago is likelier to still apply than one from the opening turn.
|
|
48
|
+
*
|
|
49
|
+
* `liveTurnId` undefined (no turn has run this session) collapses tiers 1 and 3,
|
|
50
|
+
* which is correct: with no live turn nothing was touched this turn.
|
|
51
|
+
*/
|
|
52
|
+
export declare function rankFactElements(facts: readonly PresenceFactElement[], liveTurnId: string | undefined): PresenceFactElement[];
|
|
53
|
+
/** The ordered fact set the band draws from. Still UNCAPPED: the cap is applied
|
|
54
|
+
* after the visitor's optimistic dismissals, so forgetting a visible chip
|
|
55
|
+
* reveals the next one rather than leaving a gap. Facts arrive already one-per-
|
|
56
|
+
* slot (see the note at the top of this file) — ordering is all that is left. */
|
|
57
|
+
export declare function selectPresenceFacts(facts: readonly PresenceFactElement[], liveTurnId: string | undefined): PresenceFactElement[];
|
|
58
|
+
/**
|
|
59
|
+
* SPEND THE BAND'S SLOTS on a ranked, de-duplicated list — with the durable
|
|
60
|
+
* floor honoured (`PRESENCE_DURABLE_SLOTS`).
|
|
61
|
+
*
|
|
62
|
+
* The top `limit` win, exactly as before. The one addition: if that head holds
|
|
63
|
+
* NO durable fact while the tail does, the last slot goes to the highest-ranked
|
|
64
|
+
* durable fact instead. Three properties, all deliberate:
|
|
65
|
+
*
|
|
66
|
+
* · It is a FLOOR. When the ranking already surfaces durable memory (the usual
|
|
67
|
+
* case — profile facts are tier 2) nothing here fires at all.
|
|
68
|
+
* · It takes the LAST slot, never the first. The head keeps the constraints
|
|
69
|
+
* the visitor just set, in the order the ranking chose; only the weakest
|
|
70
|
+
* live slot is spent, so the row never reorders under the eye.
|
|
71
|
+
* · The overflow count is untouched: `limit` facts are still drawn, so `+N`
|
|
72
|
+
* stays honest about how much is behind the door.
|
|
73
|
+
*/
|
|
74
|
+
export declare function capWithDurableFloor<T extends {
|
|
75
|
+
tier?: 'session' | 'profile';
|
|
76
|
+
}>(facts: readonly T[], limit: number): T[];
|