@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,53 @@
|
|
|
1
|
+
import type { PresenceSourceRef } from '@40rty/ams-sdk';
|
|
2
|
+
/** One run of the excerpt, marked or not. */
|
|
3
|
+
export interface PassageRun {
|
|
4
|
+
text: string;
|
|
5
|
+
marked: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** A review as the column reads it. */
|
|
8
|
+
export interface ReviewPassage {
|
|
9
|
+
/** The record's own id — the column's animation key. */
|
|
10
|
+
key: string;
|
|
11
|
+
/** 0-5, absent when the record carries no score. */
|
|
12
|
+
rating?: number;
|
|
13
|
+
/** The picture of the thing being reviewed, when the turn read it — filled in
|
|
14
|
+
* by `cite-image.ts`, never fetched for this surface. */
|
|
15
|
+
imageUrl?: string;
|
|
16
|
+
/** The excerpt, split into marked and unmarked runs. */
|
|
17
|
+
runs: PassageRun[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Split an excerpt around EVERY place the agent's mark occurs in it.
|
|
21
|
+
*
|
|
22
|
+
* The mark is the ONE honest thing this column can draw, and it is handed over
|
|
23
|
+
* ready to use: the tool resolves its matched passage back into the review body
|
|
24
|
+
* and ships both as VERBATIM slices (`excerpt` + `mark`), because a retrieval
|
|
25
|
+
* passage is not a substring of the review it came from — it may open with the
|
|
26
|
+
* review's title and its whitespace is normalised. This module therefore does
|
|
27
|
+
* no fuzzy matching; it splits on a string it was told is present. When the
|
|
28
|
+
* tool could not locate the span it sends an empty mark and nothing is marked.
|
|
29
|
+
* The client never invents a match.
|
|
30
|
+
*
|
|
31
|
+
* ALL occurrences, not the first: a reviewer who says "runs small" twice said
|
|
32
|
+
* it twice, and marking only the opening one draws a tidier picture than the
|
|
33
|
+
* text supports. Marks land where the phrase lands, which is scattered.
|
|
34
|
+
*/
|
|
35
|
+
export declare function splitPassage(excerpt: string, passage: string): PassageRun[];
|
|
36
|
+
/**
|
|
37
|
+
* How long the column rests on step `n` before moving on.
|
|
38
|
+
*
|
|
39
|
+
* NOT a constant, because a metronome reads as a carousel: a fixed beat is the
|
|
40
|
+
* one cadence that says "this is a widget cycling", and the claim here is that
|
|
41
|
+
* something is being READ. Real reading is uneven — a glance at one, longer on
|
|
42
|
+
* the next. The variation is derived from the step index rather than random, so
|
|
43
|
+
* the same read is the same every time and can be tested.
|
|
44
|
+
*/
|
|
45
|
+
export declare function dwellFor(step: number, base: number): number;
|
|
46
|
+
/**
|
|
47
|
+
* The reviews the column reads, in the order the tool ranked them.
|
|
48
|
+
*
|
|
49
|
+
* Vertical vocabulary (`rating`, `content`, `highlight`) is named HERE, in the
|
|
50
|
+
* form that draws reviews, and nowhere upstream — the wire carries an open
|
|
51
|
+
* `meta` bag and knows none of these words (§VIII).
|
|
52
|
+
*/
|
|
53
|
+
export declare function reviewPassages(refs: readonly PresenceSourceRef[]): ReviewPassage[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PresenceStreamView } from './element-view';
|
|
2
|
+
import { type Fact } from './read-data';
|
|
3
|
+
export interface BandFacts {
|
|
4
|
+
/** The band's view — capped, with `hiddenFacts` as the honest overflow count. */
|
|
5
|
+
view: PresenceStreamView;
|
|
6
|
+
/** Every fact the visitor has not dismissed, uncapped — what the brief draws. */
|
|
7
|
+
all: Fact[];
|
|
8
|
+
}
|
|
9
|
+
export declare function useBandFacts(): BandFacts;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type AgentPresenceFrame } from '@40rty/ams-sdk';
|
|
2
|
+
import { type Fact } from './read-data';
|
|
3
|
+
/**
|
|
4
|
+
* The facts to render: the agent's read, minus what the visitor dismissed. ONE
|
|
5
|
+
* rule, ONE list, every surface.
|
|
6
|
+
*
|
|
7
|
+
* THE OPTIMISTIC BRIDGE IS GONE FROM THIS SURFACE. It wrote a chip the instant a
|
|
8
|
+
* variant was tapped, ahead of the agent's own read, to cover a ~1-2s gap — and
|
|
9
|
+
* it was confusing in exactly the way a second source of truth always is: the
|
|
10
|
+
* band showed a pick the brief did not, the `+N` counted entries its destination
|
|
11
|
+
* could not show, a visitor clicking through four sizes accumulated four live
|
|
12
|
+
* "facts" about themselves, and none of it was anything the agent had actually
|
|
13
|
+
* concluded. The notch's whole claim is "here is what I understand about you";
|
|
14
|
+
* a client-side guess wearing the same chip as a derived fact undoes that claim
|
|
15
|
+
* to save a second.
|
|
16
|
+
*
|
|
17
|
+
* What remains is the agent's own derivation, live — which is the thing that has
|
|
18
|
+
* to work, and the thing the bridge was hiding the failure of.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useVisibleFacts(frame: AgentPresenceFrame | null): Fact[];
|
|
21
|
+
/**
|
|
22
|
+
* The same rule over a fact list the caller already has — the ELEMENT-stream
|
|
23
|
+
* path, where facts arrive as typed `PresenceFactElement`s rather than off a
|
|
24
|
+
* frame's untyped `data` bag.
|
|
25
|
+
*
|
|
26
|
+
* Both entry points share one body so a dismissed chip can never vanish from one
|
|
27
|
+
* surface and linger on another.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useVisibleFactList<T extends Pick<Fact, 'label'>>(facts: T[]): T[];
|
|
30
|
+
/** The brief's set — identical to the band's, now that neither carries a bridge.
|
|
31
|
+
* Kept as its own name because the two surfaces ASK different questions ("what
|
|
32
|
+
* may I draw" vs "what will the drawer show") and the `+N` is derived from the
|
|
33
|
+
* difference; collapsing the names would hide that the count has a source. */
|
|
34
|
+
export declare const useUndismissedFacts: typeof useVisibleFactList;
|
|
35
|
+
export interface ForgetFactApi {
|
|
36
|
+
forget: (f: Pick<Fact, 'label' | 'value'>) => void;
|
|
37
|
+
}
|
|
38
|
+
export declare function useForgetFact(): ForgetFactApi;
|
|
39
|
+
/**
|
|
40
|
+
* Retire optimistic dismissals once the agent's held read no longer shows them.
|
|
41
|
+
* Pass the read's CURRENT (unfiltered) fact labels, or `null` while there's no
|
|
42
|
+
* held read so the optimism survives the gap. Call once where the frame is known.
|
|
43
|
+
*/
|
|
44
|
+
export declare function useReconcileDismissed(presentLabels: string[] | null): void;
|
|
45
|
+
/**
|
|
46
|
+
* What the visitor has forgotten, by label.
|
|
47
|
+
*
|
|
48
|
+
* The slot registry needs this explicitly (`fact-slots.ts`): it retains a chip
|
|
49
|
+
* through the projection's silences, so "gone from the list" no longer means
|
|
50
|
+
* "gone". A dismissal is the one departure the visitor authors, and it has to be
|
|
51
|
+
* able to say so rather than be inferred from an absence that now means
|
|
52
|
+
* something else.
|
|
53
|
+
*/
|
|
54
|
+
export declare function useDismissedLabels(): {
|
|
55
|
+
has: (label: string) => boolean;
|
|
56
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Track an element's content height via a ResizeObserver, so the notch band can
|
|
4
|
+
* animate to whatever height the CURRENT skin produces — no hardcoded per-form
|
|
5
|
+
* pixel constants that go stale the moment a brand changes its type scale.
|
|
6
|
+
*
|
|
7
|
+
* Returns a ref to attach to the measured box and its latest height (0 until the
|
|
8
|
+
* first measurement). Observer-based (no window reads, no rAF polling); the
|
|
9
|
+
* observer is created lazily and guarded for SSR.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useMeasuredHeight(): [React.RefObject<HTMLDivElement | null>, number];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const promptQuoteProps: z.ZodObject<{
|
|
3
|
+
text: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
text: string;
|
|
6
|
+
}, {
|
|
7
|
+
text: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const promptQuoteExamples: z.infer<typeof promptQuoteProps>[];
|
|
10
|
+
export declare const agentTextProps: z.ZodObject<{
|
|
11
|
+
text: z.ZodOptional<z.ZodString>;
|
|
12
|
+
parts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
+
type: z.ZodEnum<["text", "em"]>;
|
|
14
|
+
value: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
value: string;
|
|
17
|
+
type: "text" | "em";
|
|
18
|
+
}, {
|
|
19
|
+
value: string;
|
|
20
|
+
type: "text" | "em";
|
|
21
|
+
}>, "many">>;
|
|
22
|
+
size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg"]>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
text?: string | undefined;
|
|
25
|
+
parts?: {
|
|
26
|
+
value: string;
|
|
27
|
+
type: "text" | "em";
|
|
28
|
+
}[] | undefined;
|
|
29
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
text?: string | undefined;
|
|
32
|
+
parts?: {
|
|
33
|
+
value: string;
|
|
34
|
+
type: "text" | "em";
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const agentTextExamples: z.infer<typeof agentTextProps>[];
|
|
39
|
+
export declare const turnProps: z.ZodObject<{
|
|
40
|
+
prompt: z.ZodString;
|
|
41
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
43
|
+
thinking: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
prompt: string;
|
|
46
|
+
index?: number | undefined;
|
|
47
|
+
timestamp?: string | undefined;
|
|
48
|
+
thinking?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
prompt: string;
|
|
51
|
+
index?: number | undefined;
|
|
52
|
+
timestamp?: string | undefined;
|
|
53
|
+
thinking?: string | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const turnExamples: z.infer<typeof turnProps>[];
|