@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.
Files changed (299) hide show
  1. package/dist/agent.js +148 -0
  2. package/dist/catalog-data.js +93 -0
  3. package/dist/catalog-entries.js +8 -0
  4. package/dist/chunk-432XYPDT.js +1012 -0
  5. package/dist/chunk-54QPRWEG.js +2800 -0
  6. package/dist/chunk-CKGGECAQ.js +239 -0
  7. package/dist/chunk-E3IJDSKY.js +173 -0
  8. package/dist/chunk-JQNZ5UUK.js +226 -0
  9. package/dist/chunk-LQLOG2V3.js +649 -0
  10. package/dist/chunk-MHUEIBJ3.js +117 -0
  11. package/dist/chunk-ORIOBWTD.js +112 -0
  12. package/dist/css/preset/motion.css +78 -0
  13. package/dist/css/preset/tailwind-theme.css +163 -0
  14. package/dist/css/shell/mobile/island.css +478 -0
  15. package/dist/hooks.js +25 -0
  16. package/dist/index.js +7165 -0
  17. package/dist/motion.js +113 -0
  18. package/dist/shell.js +5621 -0
  19. package/dist/types/agent/AgentStreamingState.d.ts +58 -0
  20. package/dist/types/agent/ProseSurface.d.ts +31 -0
  21. package/dist/types/agent/index.d.ts +8 -0
  22. package/dist/types/agent/phase-label.d.ts +13 -0
  23. package/dist/types/agent/presence/AgentPresenceWidget.d.ts +85 -0
  24. package/dist/types/agent/presence/BriefIdentity.d.ts +9 -0
  25. package/dist/types/agent/presence/CompactRead.d.ts +44 -0
  26. package/dist/types/agent/presence/CriteriaRail.d.ts +68 -0
  27. package/dist/types/agent/presence/DefaultNotch.d.ts +2 -0
  28. package/dist/types/agent/presence/FactChip.d.ts +10 -0
  29. package/dist/types/agent/presence/InlinePresenceRead.d.ts +25 -0
  30. package/dist/types/agent/presence/KnowledgePeek.d.ts +23 -0
  31. package/dist/types/agent/presence/LayoutMorphSkeleton.d.ts +59 -0
  32. package/dist/types/agent/presence/PresenceBrief.d.ts +29 -0
  33. package/dist/types/agent/presence/PresenceFiller.d.ts +24 -0
  34. package/dist/types/agent/presence/SourceSift.d.ts +48 -0
  35. package/dist/types/agent/presence/StreamRead.d.ts +50 -0
  36. package/dist/types/agent/presence/VoiceLine.d.ts +19 -0
  37. package/dist/types/agent/presence/band-beat.d.ts +40 -0
  38. package/dist/types/agent/presence/band-row.d.ts +188 -0
  39. package/dist/types/agent/presence/cite-image.d.ts +9 -0
  40. package/dist/types/agent/presence/class-names.d.ts +134 -0
  41. package/dist/types/agent/presence/element-view.d.ts +83 -0
  42. package/dist/types/agent/presence/fact-forms/baseline-forms.d.ts +20 -0
  43. package/dist/types/agent/presence/fact-forms/class-names.d.ts +14 -0
  44. package/dist/types/agent/presence/fact-forms/index.d.ts +3 -0
  45. package/dist/types/agent/presence/fact-forms/register.d.ts +9 -0
  46. package/dist/types/agent/presence/fact-rail.d.ts +76 -0
  47. package/dist/types/agent/presence/fact-slots.d.ts +97 -0
  48. package/dist/types/agent/presence/folded.d.ts +26 -0
  49. package/dist/types/agent/presence/forms.d.ts +5 -0
  50. package/dist/types/agent/presence/index.d.ts +39 -0
  51. package/dist/types/agent/presence/notch/PresenceNotch.d.ts +20 -0
  52. package/dist/types/agent/presence/parts.d.ts +29 -0
  53. package/dist/types/agent/presence/read-data.d.ts +48 -0
  54. package/dist/types/agent/presence/reads.d.ts +37 -0
  55. package/dist/types/agent/presence/sift-deck.d.ts +58 -0
  56. package/dist/types/agent/presence/source-cards/ArticleSourceCard.d.ts +4 -0
  57. package/dist/types/agent/presence/source-cards/CollectionSourceCard.d.ts +4 -0
  58. package/dist/types/agent/presence/source-cards/PolicySourceCard.d.ts +4 -0
  59. package/dist/types/agent/presence/source-cards/ProductSourceCard.d.ts +4 -0
  60. package/dist/types/agent/presence/source-cards/ReviewSourceCard.d.ts +4 -0
  61. package/dist/types/agent/presence/source-cards/SourceCard.d.ts +4 -0
  62. package/dist/types/agent/presence/source-cards/card-frame.d.ts +38 -0
  63. package/dist/types/agent/presence/source-cards/card-marks.d.ts +69 -0
  64. package/dist/types/agent/presence/source-cards/card-plate.d.ts +20 -0
  65. package/dist/types/agent/presence/source-cards/card-shell.d.ts +91 -0
  66. package/dist/types/agent/presence/source-cards/register.d.ts +6 -0
  67. package/dist/types/agent/presence/source-cards/review-passage.d.ts +53 -0
  68. package/dist/types/agent/presence/swatch.d.ts +4 -0
  69. package/dist/types/agent/presence/use-band-facts.d.ts +9 -0
  70. package/dist/types/agent/presence/use-forget-fact.d.ts +56 -0
  71. package/dist/types/agent/presence/use-measured-height.d.ts +11 -0
  72. package/dist/types/catalog-data/base.d.ts +2 -0
  73. package/dist/types/catalog-data/chat.d.ts +55 -0
  74. package/dist/types/catalog-data/content.d.ts +1129 -0
  75. package/dist/types/catalog-data/ecommerce.d.ts +4842 -0
  76. package/dist/types/catalog-data/index.d.ts +7 -0
  77. package/dist/types/catalog-data/social.d.ts +1552 -0
  78. package/dist/types/catalog-data/tokens.d.ts +20 -0
  79. package/dist/types/catalog-data/ugc.d.ts +50 -0
  80. package/dist/types/catalog-entries.d.ts +35 -0
  81. package/dist/types/catalog.d.ts +18 -0
  82. package/dist/types/components/SkeletonSwap.d.ts +27 -0
  83. package/dist/types/components/agentic/AgentText.d.ts +44 -0
  84. package/dist/types/components/agentic/Turn.d.ts +21 -0
  85. package/dist/types/components/browse/CanvasBootLoader.d.ts +16 -0
  86. package/dist/types/components/browse/ContinuationLoading.d.ts +22 -0
  87. package/dist/types/components/browse/canvas-booting.d.ts +37 -0
  88. package/dist/types/components/browse/constants.d.ts +2 -0
  89. package/dist/types/components/browse/index.d.ts +4 -0
  90. package/dist/types/components/chat/SuggestionCards.d.ts +2 -0
  91. package/dist/types/components/chat/index.d.ts +1 -0
  92. package/dist/types/components/content/FAQ.d.ts +12 -0
  93. package/dist/types/components/content/FeatureGrid.d.ts +11 -0
  94. package/dist/types/components/content/InfoCards.d.ts +16 -0
  95. package/dist/types/components/content/Reviews.d.ts +9 -0
  96. package/dist/types/components/content/RichText.d.ts +10 -0
  97. package/dist/types/components/content/article/ArticleDetail.d.ts +15 -0
  98. package/dist/types/components/content/article/BlogCard.d.ts +11 -0
  99. package/dist/types/components/content/article/BlogPosts.d.ts +19 -0
  100. package/dist/types/components/content/page/PageDetail.d.ts +13 -0
  101. package/dist/types/components/content/page/PolicyDetail.d.ts +23 -0
  102. package/dist/types/components/ecommerce/cart/AddToCartButton.d.ts +9 -0
  103. package/dist/types/components/ecommerce/cart/CartContent.d.ts +40 -0
  104. package/dist/types/components/ecommerce/cart/CartDrawer.d.ts +41 -0
  105. package/dist/types/components/ecommerce/cart/CartFoot.d.ts +30 -0
  106. package/dist/types/components/ecommerce/cart/CartLineItem.d.ts +13 -0
  107. package/dist/types/components/ecommerce/cart/CartLineRow.d.ts +17 -0
  108. package/dist/types/components/ecommerce/cart/CartPromoCode.d.ts +29 -0
  109. package/dist/types/components/ecommerce/cart/CartSummary.d.ts +7 -0
  110. package/dist/types/components/ecommerce/cart/CartWidget.d.ts +10 -0
  111. package/dist/types/components/ecommerce/cart/VariantPickerModal.d.ts +12 -0
  112. package/dist/types/components/ecommerce/cart/cart-format.d.ts +8 -0
  113. package/dist/types/components/ecommerce/cart/use-cart-view.d.ts +50 -0
  114. package/dist/types/components/ecommerce/collection/CollectionCard.d.ts +10 -0
  115. package/dist/types/components/ecommerce/collection/CollectionGrid.d.ts +8 -0
  116. package/dist/types/components/ecommerce/collection/CollectionList.d.ts +13 -0
  117. package/dist/types/components/ecommerce/collection/internal/CollectionListItem.d.ts +13 -0
  118. package/dist/types/components/ecommerce/product/AddToRegistry.d.ts +36 -0
  119. package/dist/types/components/ecommerce/product/ComparisonTable.d.ts +25 -0
  120. package/dist/types/components/ecommerce/product/ComparisonTableSkeleton.d.ts +11 -0
  121. package/dist/types/components/ecommerce/product/PresenceProductRail.d.ts +35 -0
  122. package/dist/types/components/ecommerce/product/ProductBadge.d.ts +9 -0
  123. package/dist/types/components/ecommerce/product/ProductCard.d.ts +27 -0
  124. package/dist/types/components/ecommerce/product/ProductDetail.d.ts +25 -0
  125. package/dist/types/components/ecommerce/product/ProductGallery.d.ts +19 -0
  126. package/dist/types/components/ecommerce/product/ProductGrid.d.ts +26 -0
  127. package/dist/types/components/ecommerce/product/ProductImage.d.ts +54 -0
  128. package/dist/types/components/ecommerce/product/ProductOption.d.ts +9 -0
  129. package/dist/types/components/ecommerce/product/ProductPrice.d.ts +8 -0
  130. package/dist/types/components/ecommerce/product/ProductVideoPlayer.d.ts +17 -0
  131. package/dist/types/components/ecommerce/product/comparison-table-parts.d.ts +41 -0
  132. package/dist/types/components/ecommerce/product/comparison-table-rows.d.ts +24 -0
  133. package/dist/types/components/ecommerce/product/image-trim.d.ts +35 -0
  134. package/dist/types/components/ecommerce/product/product-card-glyphs.d.ts +2 -0
  135. package/dist/types/components/ecommerce/product/registry-logos.d.ts +2 -0
  136. package/dist/types/components/ecommerce/product/trim-geometry.d.ts +45 -0
  137. package/dist/types/components/ecommerce/wishlist/WishlistDrawer.d.ts +16 -0
  138. package/dist/types/components/feedback/Skeleton.d.ts +13 -0
  139. package/dist/types/components/feedback/Thinking.d.ts +15 -0
  140. package/dist/types/components/layout/AspectRatio.d.ts +5 -0
  141. package/dist/types/components/layout/Backdrop.d.ts +32 -0
  142. package/dist/types/components/layout/Container.d.ts +6 -0
  143. package/dist/types/components/layout/Divider.d.ts +5 -0
  144. package/dist/types/components/layout/Drawer.d.ts +9 -0
  145. package/dist/types/components/layout/DrawerDockSlot.d.ts +40 -0
  146. package/dist/types/components/layout/Grid.d.ts +8 -0
  147. package/dist/types/components/layout/Modal.d.ts +25 -0
  148. package/dist/types/components/layout/Page.d.ts +11 -0
  149. package/dist/types/components/layout/Section.d.ts +6 -0
  150. package/dist/types/components/layout/Stack.d.ts +7 -0
  151. package/dist/types/components/marketing/AnnouncementBar.d.ts +15 -0
  152. package/dist/types/components/marketing/BrandStory.d.ts +19 -0
  153. package/dist/types/components/marketing/HeroBanner.d.ts +69 -0
  154. package/dist/types/components/marketing/HeroBannerFeatures.d.ts +10 -0
  155. package/dist/types/components/marketing/HeroBannerInline.d.ts +20 -0
  156. package/dist/types/components/marketing/PromoBanner.d.ts +11 -0
  157. package/dist/types/components/marketing/internal/AnnouncementLink.d.ts +5 -0
  158. package/dist/types/components/marketing/internal/AnnouncementMessage.d.ts +10 -0
  159. package/dist/types/components/navigation/Breadcrumbs.d.ts +10 -0
  160. package/dist/types/components/navigation/Footer.d.ts +15 -0
  161. package/dist/types/components/navigation/Header.d.ts +14 -0
  162. package/dist/types/components/navigation/internal/BreadcrumbLink.d.ts +5 -0
  163. package/dist/types/components/navigation/internal/FooterLink.d.ts +5 -0
  164. package/dist/types/components/navigation/internal/HeaderLink.d.ts +5 -0
  165. package/dist/types/components/shell/BaseMark.d.ts +11 -0
  166. package/dist/types/components/shell/CartPill.d.ts +13 -0
  167. package/dist/types/components/shell/ComposerDock.d.ts +9 -0
  168. package/dist/types/components/shell/ErrorBanner.d.ts +14 -0
  169. package/dist/types/components/shell/HistoryMenu.d.ts +15 -0
  170. package/dist/types/components/shell/MenuButton.d.ts +31 -0
  171. package/dist/types/components/shell/MountainRidges.d.ts +11 -0
  172. package/dist/types/components/shell/PendingTurn.d.ts +1 -0
  173. package/dist/types/components/shell/ShellTop.d.ts +35 -0
  174. package/dist/types/components/shell/brand-shell.d.ts +441 -0
  175. package/dist/types/components/shell/index.d.ts +9 -0
  176. package/dist/types/components/shell/marks/index.d.ts +5 -0
  177. package/dist/types/components/social/ReviewCard.d.ts +9 -0
  178. package/dist/types/components/social/ReviewSummary.d.ts +7 -0
  179. package/dist/types/components/social/TestimonialCard.d.ts +9 -0
  180. package/dist/types/components/social/TestimonialCarousel.d.ts +16 -0
  181. package/dist/types/components/social/UgcCard.d.ts +9 -0
  182. package/dist/types/components/social/UgcGallery.d.ts +8 -0
  183. package/dist/types/hooks/index.d.ts +8 -0
  184. package/dist/types/hooks/keyboard.d.ts +18 -0
  185. package/dist/types/hooks/use-container-width.d.ts +11 -0
  186. package/dist/types/hooks/use-dismiss-on-outside.d.ts +23 -0
  187. package/dist/types/hooks/use-focus-on-change.d.ts +8 -0
  188. package/dist/types/hooks/use-focus-trap.d.ts +12 -0
  189. package/dist/types/hooks/use-media-query.d.ts +12 -0
  190. package/dist/types/hooks/use-projection.d.ts +24 -0
  191. package/dist/types/hooks/use-reduced-motion.d.ts +1 -0
  192. package/dist/types/hooks/use-scroll-lock.d.ts +19 -0
  193. package/dist/types/hooks/use-scroll-threshold.d.ts +14 -0
  194. package/dist/types/hooks/use-textarea-autosize.d.ts +16 -0
  195. package/dist/types/index.d.ts +74 -0
  196. package/dist/types/labels-context.d.ts +18 -0
  197. package/dist/types/labels.d.ts +240 -0
  198. package/dist/types/motion/ease.d.ts +10 -0
  199. package/dist/types/motion/generation/ActiveBlockIndicator.d.ts +27 -0
  200. package/dist/types/motion/generation/BlurUpImage.d.ts +23 -0
  201. package/dist/types/motion/generation/ResolveEntrance.d.ts +22 -0
  202. package/dist/types/motion/generation/ShimmerSkeleton.d.ts +20 -0
  203. package/dist/types/motion/generation/WordReveal.d.ts +26 -0
  204. package/dist/types/motion/generation/index.d.ts +6 -0
  205. package/dist/types/motion/hooks/useInViewOnce.d.ts +14 -0
  206. package/dist/types/motion/hooks/useScrollDirection.d.ts +38 -0
  207. package/dist/types/motion/hooks/useScrollProgress.d.ts +23 -0
  208. package/dist/types/motion/hooks/useStableValue.d.ts +36 -0
  209. package/dist/types/motion/hooks/useSuccessFlash.d.ts +1 -0
  210. package/dist/types/motion/index.d.ts +18 -0
  211. package/dist/types/motion/presets.d.ts +335 -0
  212. package/dist/types/motion/primitives/Agent.d.ts +118 -0
  213. package/dist/types/motion/primitives/MorphRegion.d.ts +16 -0
  214. package/dist/types/motion/primitives/Parallax.d.ts +19 -0
  215. package/dist/types/motion/primitives/Pin.d.ts +26 -0
  216. package/dist/types/motion/primitives/Reveal.d.ts +29 -0
  217. package/dist/types/motion/primitives/RevealStagger.d.ts +16 -0
  218. package/dist/types/motion/primitives/StickyShelf.d.ts +18 -0
  219. package/dist/types/primitives/Badge/index.d.ts +12 -0
  220. package/dist/types/primitives/Button/index.d.ts +25 -0
  221. package/dist/types/primitives/Input/index.d.ts +5 -0
  222. package/dist/types/primitives/Money/index.d.ts +13 -0
  223. package/dist/types/primitives/Select/index.d.ts +5 -0
  224. package/dist/types/primitives/Skeleton/index.d.ts +4 -0
  225. package/dist/types/shell/AnimatedPlaceholder.d.ts +13 -0
  226. package/dist/types/shell/BottomSheet.d.ts +54 -0
  227. package/dist/types/shell/Button.d.ts +19 -0
  228. package/dist/types/shell/ChromeSurface.d.ts +33 -0
  229. package/dist/types/shell/Composer.d.ts +56 -0
  230. package/dist/types/shell/ComposerChipStrip.d.ts +9 -0
  231. package/dist/types/shell/ConversationTransition.d.ts +27 -0
  232. package/dist/types/shell/DictationButton.d.ts +24 -0
  233. package/dist/types/shell/DragSheet.d.ts +34 -0
  234. package/dist/types/shell/InlineCompletion.d.ts +38 -0
  235. package/dist/types/shell/LauncherDock.d.ts +40 -0
  236. package/dist/types/shell/ListeningWaveform.d.ts +18 -0
  237. package/dist/types/shell/MenuAccordionPanel.d.ts +26 -0
  238. package/dist/types/shell/MenuDrawer.d.ts +72 -0
  239. package/dist/types/shell/MenuFlyout.d.ts +22 -0
  240. package/dist/types/shell/MenuNav.d.ts +30 -0
  241. package/dist/types/shell/MenuNavBar.d.ts +22 -0
  242. package/dist/types/shell/ShellMenuChrome.d.ts +66 -0
  243. package/dist/types/shell/ShellScaffold.d.ts +92 -0
  244. package/dist/types/shell/SideDock.d.ts +75 -0
  245. package/dist/types/shell/Skeleton.d.ts +22 -0
  246. package/dist/types/shell/Spinner.d.ts +10 -0
  247. package/dist/types/shell/TypedPlaceholder.d.ts +11 -0
  248. package/dist/types/shell/VoiceControl.d.ts +23 -0
  249. package/dist/types/shell/VoiceIsland.d.ts +24 -0
  250. package/dist/types/shell/canvas-gutter-style.d.ts +15 -0
  251. package/dist/types/shell/composer/AttachButton.d.ts +14 -0
  252. package/dist/types/shell/composer/AttachmentStrip.d.ts +12 -0
  253. package/dist/types/shell/composer/ClearSessionButton.d.ts +16 -0
  254. package/dist/types/shell/composer/ConversationHistoryButton.d.ts +25 -0
  255. package/dist/types/shell/composer/ShareCanvasButton.d.ts +19 -0
  256. package/dist/types/shell/composer/ThreadJumpRail.d.ts +43 -0
  257. package/dist/types/shell/composer/composer-metrics.d.ts +6 -0
  258. package/dist/types/shell/composer/field-metrics.d.ts +97 -0
  259. package/dist/types/shell/composer/heic-convert.d.ts +6 -0
  260. package/dist/types/shell/composer/use-field-autosize.d.ts +26 -0
  261. package/dist/types/shell/composer/useComposerAttachments.d.ts +37 -0
  262. package/dist/types/shell/composer/usePromptComposer.d.ts +51 -0
  263. package/dist/types/shell/dock-context.d.ts +10 -0
  264. package/dist/types/shell/index.d.ts +36 -0
  265. package/dist/types/shell/menu-columns.d.ts +19 -0
  266. package/dist/types/shell/mobile/DefaultMobileShell.d.ts +88 -0
  267. package/dist/types/shell/mobile/IslandComposeGroup.d.ts +41 -0
  268. package/dist/types/shell/mobile/IslandInputBar.d.ts +61 -0
  269. package/dist/types/shell/mobile/IslandNavButtons.d.ts +20 -0
  270. package/dist/types/shell/mobile/IslandTrailingAction.d.ts +34 -0
  271. package/dist/types/shell/mobile/MobileChrome.d.ts +34 -0
  272. package/dist/types/shell/mobile/MobileVoiceConsole.d.ts +42 -0
  273. package/dist/types/shell/mobile/MorphIsland.d.ts +105 -0
  274. package/dist/types/shell/mobile/RestIsland.d.ts +41 -0
  275. package/dist/types/shell/mobile/constants.d.ts +26 -0
  276. package/dist/types/shell/mobile/document-scroll-ref.d.ts +22 -0
  277. package/dist/types/shell/mobile/hero-entry-point.d.ts +110 -0
  278. package/dist/types/shell/mobile/island-metrics.d.ts +131 -0
  279. package/dist/types/shell/mobile/sheet-detents.d.ts +49 -0
  280. package/dist/types/shell/mobile/turn-end-action.d.ts +44 -0
  281. package/dist/types/shell/mobile/use-blur-on-canvas-gesture.d.ts +31 -0
  282. package/dist/types/shell/mobile/use-island-fold-scroll.d.ts +28 -0
  283. package/dist/types/shell/mobile/use-keyboard-inset.d.ts +18 -0
  284. package/dist/types/shell/mobile/use-sheet-fold-gesture.d.ts +57 -0
  285. package/dist/types/shell/slots.d.ts +16 -0
  286. package/dist/types/shell/thread-reland.d.ts +22 -0
  287. package/dist/types/shell/use-dock-state.d.ts +54 -0
  288. package/dist/types/types/commerce.d.ts +1 -0
  289. package/dist/types/utils/cn.d.ts +2 -0
  290. package/dist/types/utils/format-money.d.ts +2 -0
  291. package/dist/types/utils/html-to-text.d.ts +8 -0
  292. package/dist/types/utils/sanitize-html.d.ts +12 -0
  293. package/dist/types/utils/use-backdrop-presence.d.ts +24 -0
  294. package/dist/types/utils/use-composer-mode.d.ts +26 -0
  295. package/dist/types/utils/use-is-seed-home.d.ts +13 -0
  296. package/dist/types/utils/use-safe-cart.d.ts +17 -0
  297. package/dist/types/utils/use-safe-facts.d.ts +9 -0
  298. package/dist/types/utils/use-safe-fourty-session.d.ts +15 -0
  299. package/package.json +80 -0
@@ -0,0 +1,97 @@
1
+ import { type Fact } from './read-data';
2
+ /** Whatever can answer "did the visitor forget this label?" — a `Set` in tests,
3
+ * the optimistic dismissal overlay at runtime. Structural, so neither side has
4
+ * to adopt the other's container. */
5
+ export interface LabelPredicate {
6
+ has: (label: string) => boolean;
7
+ }
8
+ /** A criterion and the slot it stands in. */
9
+ export interface SlottedFact {
10
+ /** 0-based slot — stable for the life of the tenancy. */
11
+ slot: number;
12
+ fact: Fact;
13
+ }
14
+ /**
15
+ * One slot's tenant.
16
+ *
17
+ * Keyed by LABEL — the attribute, not the attribute-and-its-value. A tenancy is
18
+ * "the agent's colour preference stands here"; the agent revising black to
19
+ * burgundy is that tenant's content changing, not a different tenant. (The chip
20
+ * is React-keyed by `factIdentity`, so a revision still reads as a substitution:
21
+ * the value is news, the place is not.) It is also the key the visitor's
22
+ * dismissal uses, so a forgotten fact and its tenancy cannot disagree about what
23
+ * was forgotten.
24
+ *
25
+ * `seen` is the registry's own monotonic clock, used only to pick the stalest
26
+ * incumbent when a newcomer needs a slot.
27
+ */
28
+ interface Tenancy {
29
+ label: string;
30
+ fact: Fact;
31
+ seen: number;
32
+ }
33
+ /** The registry's state. Carried across renders in a ref; a plain object so the
34
+ * assignment pass below is a pure function of (state, facts) and testable
35
+ * without React. */
36
+ export interface SlotRegistry {
37
+ slots: Array<Tenancy | undefined>;
38
+ clock: number;
39
+ }
40
+ export declare function emptySlotRegistry(limit: number): SlotRegistry;
41
+ /**
42
+ * Place this frame's facts into slots.
43
+ *
44
+ * `dismissed` is what the visitor has forgotten (by label — the same key the
45
+ * dismissal signal uses). Everything else about what leaves is decided by the
46
+ * assertion rule above.
47
+ *
48
+ * Returns a NEW registry — the caller commits it. Nothing here mutates its
49
+ * input, so a render that is thrown away cannot advance the registry's clock.
50
+ */
51
+ export declare function assignSlots(registry: SlotRegistry, facts: readonly Fact[], dismissed: LabelPredicate): {
52
+ registry: SlotRegistry;
53
+ slotted: SlottedFact[];
54
+ };
55
+ /**
56
+ * The registry as a hook — placement AFTER the band's beat.
57
+ *
58
+ * Deliberately not folded into `useBandFacts`: placement has to run on the
59
+ * snapshot the band is actually DRAWING, not on the live one. Slotting before
60
+ * the beat would give the chips their own cadence — updating a frame ahead of
61
+ * the sentence and the deck beside them — which is the exact "each part firing
62
+ * on its own clock" this surface is being rid of.
63
+ */
64
+ export declare function useFactSlots(facts: readonly Fact[]): SlottedFact[];
65
+ /**
66
+ * THE UNCAPPED RAIL'S version — stable ORDER and the same bounded retention,
67
+ * without a cap.
68
+ *
69
+ * The mobile island draws its dossier uncapped (`PresenceBriefRail`): there is
70
+ * no drawer on a phone, so that row IS the brief and a `+N` there would name
71
+ * constraints with nowhere to go. No cap means no slot competition — but the
72
+ * two properties the band gets from the registry still matter, and arguably
73
+ * matter more on a rail the visitor scrolls with a thumb:
74
+ *
75
+ * · ORDER IS FIRST-SEEN, so a re-ranked projection cannot reshuffle the row
76
+ * under the finger that is scrolling it.
77
+ * · RETENTION through the working window, so the phone does not blank what the
78
+ * agent knows every time a turn opens and the stream is rebuilt.
79
+ */
80
+ export declare function useRetainedFacts(facts: readonly Fact[]): Fact[];
81
+ /**
82
+ * THE RAIL'S SLOT COUNT, held until the chips that are leaving have LEFT.
83
+ *
84
+ * A release and the geometry that follows it are two different moments. The
85
+ * registry drops a tenancy the instant the agent asserts a set without it — but
86
+ * the chip is still on screen, fading, for `holdMs` after that. Shrinking the
87
+ * rail's template underneath it re-places the departing chip into whatever cell
88
+ * now occupies its column (the tail lane, the handle lane, an implicit column),
89
+ * and the measured result was a chip at 40% opacity jumping 267px sideways in
90
+ * 23ms on its way out.
91
+ *
92
+ * So the count only ever GROWS immediately. Shrinking waits for the exit — the
93
+ * chips clear, and then the row re-composes, which is the same order the band's
94
+ * beat imposes everywhere else: nothing moves while something else is moving.
95
+ */
96
+ export declare function useHeldSlotCount(slots: number, holdMs: number): number;
97
+ export {};
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import type { Fact } from './read-data';
3
+ export declare function FoldedRead({ label, facts, text }: {
4
+ label: string;
5
+ facts: Fact[];
6
+ text: string;
7
+ }): React.ReactElement;
8
+ /**
9
+ * The small chevron at the band's edge — now a real HANDLE for the brief rather
10
+ * than a hint that the band expands on hover.
11
+ *
12
+ * It used to describe a fold: fade in when folded, rotate when open, and do
13
+ * nothing when pressed, because hovering was the only way to act on it. That
14
+ * left the surface with two affordances (this and the `+N`) neither of which
15
+ * could be clicked. One button, always visible while there is a brief to open,
16
+ * rotated to say whether it is open.
17
+ *
18
+ * Its accessible name used to be "Show what the stylist knows" — hard-coded, in
19
+ * shared infra, in ONE brand's voice. Shared code carries no brand's words; the
20
+ * default is neutral and Steve Madden overrides it back to "the stylist"
21
+ * through the `Labels` seam like any other piece of brand copy.
22
+ */
23
+ export declare function BriefHandle({ open, onToggle, }: {
24
+ open: boolean;
25
+ onToggle: () => void;
26
+ }): React.ReactElement;
@@ -0,0 +1,5 @@
1
+ /** Register the default `dossier` + `thought` renderers. Idempotent. Heights are
2
+ * omitted on purpose — the default read widget MEASURES its content, so a brand
3
+ * rescaling type via CSS never clips the band. `thought` doubles as the safe
4
+ * fallback the notch uses for an unknown agent form. */
5
+ export declare function registerDefaultPresenceForms(): void;
@@ -0,0 +1,39 @@
1
+ export { DefaultNotch } from './DefaultNotch';
2
+ export { PresenceNotch } from './notch/PresenceNotch';
3
+ export { AgentPresenceWidget, type AgentPresenceWidgetProps } from './AgentPresenceWidget';
4
+ export { registerDefaultPresenceForms } from './forms';
5
+ export { PresenceStream, streamLeadLine } from './StreamRead';
6
+ export { VoiceLine } from './VoiceLine';
7
+ export { CriteriaRail } from './CriteriaRail';
8
+ export { registerBaselineFactForms, BaselineColorFactForm, BaselineFigureFactForm, factFormClass, } from './fact-forms';
9
+ export { SourceSift, SIFT_BAND_HEIGHT, siftRegionWidth } from './SourceSift';
10
+ export { CRITERION_SLOT, CRITERION_GAP, CRITERION_TAIL_LANE, VOICE_MIN_WIDTH, criteriaRegionWidth, criteriaRailTemplate, bandRowTemplate, } from './band-row';
11
+ export { siftDeck, type SiftCard, type SiftCardState, type SiftDeck } from './sift-deck';
12
+ export { derivePresenceView, withCappedFacts, viewIsEmpty, viewHasHeld, EMPTY_PRESENCE_VIEW, type PresenceStreamView, } from './element-view';
13
+ export { PRESENCE_FACT_LIMIT, PRESENCE_DURABLE_SLOTS, capWithDurableFloor, rankFactElements, selectPresenceFacts, } from './fact-rail';
14
+ export { PresenceSourceCard } from './source-cards/SourceCard';
15
+ export { registerDefaultPresenceSourceForms, BASELINE_SOURCE_KINDS, } from './source-cards/register';
16
+ export { ProductSourceCard, productSourceForm } from './source-cards/ProductSourceCard';
17
+ export { CollectionSourceCard, collectionSourceForm } from './source-cards/CollectionSourceCard';
18
+ export { ArticleSourceCard, articleSourceForm } from './source-cards/ArticleSourceCard';
19
+ export { PolicySourceCard, policySourceForm } from './source-cards/PolicySourceCard';
20
+ export { ReviewSourceCard, reviewSourceForm } from './source-cards/ReviewSourceCard';
21
+ export { sourceCardClass, sourceCardBox, sourceCardState, platePad, ruleWeight, ink, SOURCE_CARD_BOX, CARD_EASE, CARD_SETTLE_MS, type SourceCardState, } from './source-cards/card-shell';
22
+ export { SourceCardFrame } from './source-cards/card-frame';
23
+ export { SourcePlate } from './source-cards/card-plate';
24
+ export { SourceImage, CaptionRule, RuledLines, CornerFold, type RuledLine, } from './source-cards/card-marks';
25
+ export { InlinePresenceRead } from './InlinePresenceRead';
26
+ export { LayoutMorphSkeleton, useLayoutMorph, LAYOUT_ARCHETYPES } from './LayoutMorphSkeleton';
27
+ export { Eyebrow, Rule, Fallback } from './parts';
28
+ export { Thought, Dossier } from './reads';
29
+ export { FoldedRead, BriefHandle } from './folded';
30
+ export { PresenceBriefBody, PresenceBriefDrawer } from './PresenceBrief';
31
+ export { BriefIdentity } from './BriefIdentity';
32
+ export { colorSwatch } from './swatch';
33
+ export { readFacts, readLabel, factIdentity, type Fact } from './read-data';
34
+ export { CompactStream } from './CompactRead';
35
+ export { presenceClass } from './class-names';
36
+ export { useMeasuredHeight } from './use-measured-height';
37
+ export { FactChips } from './CompactRead';
38
+ export { useForgetFact, useVisibleFacts, useVisibleFactList, type ForgetFactApi } from './use-forget-fact';
39
+ export { PresenceBriefRail } from './KnowledgePeek';
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import { type NotchWidget, type NotchWidgetProps } from '@40rty/ams-sdk';
3
+ export type { NotchWidget, NotchWidgetProps };
4
+ /**
5
+ * PresenceNotch — a thin presence BAND that lays widgets out by zone. It is NOT
6
+ * a host that manages or routes to its widgets: it owns only zone placement +
7
+ * the drawer region; `usePresenceNotch` (the SDK) owns the fold mechanics. Each
8
+ * widget consumes the agent signals it cares about on its own (the widget SDK
9
+ * routes signals by type to whoever consumes them) — the band is just where
10
+ * some of them happen to mount.
11
+ *
12
+ * • Zones — `lead` widgets fill the main (left) area; `trail` widgets pin right.
13
+ * • The generic deciding-question beat (`agent_ask`) takes the lead while it
14
+ * stands (it needs answering); brand prompts are their own widgets elsewhere.
15
+ *
16
+ * Structural + `fourty-notch*` class hooks only; the THEME owns the band's skin.
17
+ */
18
+ export declare function PresenceNotch({ widgets }: {
19
+ widgets: NotchWidget[];
20
+ }): React.ReactElement;
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ export declare const FALLBACK = "";
3
+ export declare const enter: {
4
+ initial: {
5
+ opacity: number;
6
+ };
7
+ animate: {
8
+ opacity: number;
9
+ };
10
+ exit: {
11
+ opacity: number;
12
+ };
13
+ transition: {
14
+ duration: number;
15
+ ease: [number, number, number, number];
16
+ };
17
+ };
18
+ /** The small tracked-uppercase label naming the activity ("NYC WORK DINNER"). */
19
+ export declare function Eyebrow({ children }: {
20
+ children: React.ReactNode;
21
+ }): React.ReactElement;
22
+ /** A faint hairline between the eyebrow and the content. */
23
+ export declare function Rule(): React.ReactElement;
24
+ /** The resting line shown when there's nothing for the agent to read AND the
25
+ * host supplied no brand `idleContent`. Infra carries no brand promo copy
26
+ * (`FALLBACK` is empty), so this renders nothing rather than inventing a line;
27
+ * a brand fills the rest band by passing `idleContent`. Pure layout — the
28
+ * presence FRAME wrapper owns the fade. */
29
+ export declare function Fallback(): React.ReactElement | null;
@@ -0,0 +1,48 @@
1
+ import { AgentPresenceFrame, type PresenceFactRender } from '@40rty/ams-sdk';
2
+ /**
3
+ * A single locked-in fact the agent surfaces under its read — the widget
4
+ * artifact (`PresenceFact`): `tier`/`scope` are server-stamped metadata
5
+ * (session vs profile memory; the vertical's attribute bucket), plus the
6
+ * element stream's `provenance` where the fact came from one.
7
+ *
8
+ * `provenance` is optional because the FRAME path (`readFacts`) predates the
9
+ * element stream and carries no such field — not because it is decorative. It
10
+ * is the difference between "I remember you" and "I worked this out just now",
11
+ * which is the most load-bearing distinction this surface draws.
12
+ *
13
+ * An ALIAS of the contract the fact-FORM registry is typed against
14
+ * (`PresenceFactRender`), not a second definition of it: a brand writing a form
15
+ * and this package rendering one must be handed the same shape, or the seam is
16
+ * two shapes that happen to agree today.
17
+ */
18
+ export type Fact = PresenceFactRender;
19
+ /**
20
+ * The two registers the brief actually draws — what the agent KNEW before this
21
+ * visit versus what it WORKED OUT during it.
22
+ *
23
+ * Read from `provenance` when the fact carries one and from `tier` otherwise,
24
+ * and the two can never disagree: the producer stamps `recalled` on exactly the
25
+ * facts it stamps `profile` (see `deriveProvenance` — durability is the input to
26
+ * both). `stated` cannot reach here; the projection suppresses it upstream.
27
+ */
28
+ export declare function factRegister(fact: Fact): 'recalled' | 'inferred';
29
+ /** Pull the `facts` array off a frame's generic `data` payload, defensively.
30
+ * `data` is opaque to the platform — the agent fills it — so we read it
31
+ * reflectively and keep only well-formed {label,value} entries. */
32
+ export declare function readFacts(frame: AgentPresenceFrame): Fact[];
33
+ /**
34
+ * A fact's IDENTITY. Label alone isn't enough: re-stating a known label with a
35
+ * different value ("size: 8" → "size: 8.5") is the agent learning something new,
36
+ * not restating something old. Anything keyed on facts — the read signature, the
37
+ * unseen-fact count — must agree on this, so it lives here once.
38
+ */
39
+ export declare function factIdentity(fact: Fact): string;
40
+ /** The agent-authored eyebrow label for a frame (from `data.label`), or ''. */
41
+ export declare function readLabel(frame: AgentPresenceFrame): string;
42
+ /** A stable IDENTITY for a read, derived from everything it renders (form +
43
+ * eyebrow + prose + facts). `AgentPresenceFrame` carries no id, so the notch
44
+ * keys its read on this signature: a genuinely NEW read changes the signature,
45
+ * remounts, and crossfades in — without it, a new dossier with the same form
46
+ * reuses the instance and the text/facts hard-swap in place (the harsh,
47
+ * un-animated update). */
48
+ export declare function readKey(frame: AgentPresenceFrame): string;
@@ -0,0 +1,37 @@
1
+ import * as React from 'react';
2
+ import type { Fact } from './read-data';
3
+ /** The agent's read — the readable lead sentence. The eyebrow is the agent's own
4
+ * label (or the live query); omitted entirely when there's none, so we never
5
+ * invent a header.
6
+ *
7
+ * `compact` stacks the eyebrow above a single ellipsized prose line instead of
8
+ * laying them side by side. On a phone the inline row is the wrong shape: the
9
+ * eyebrow is `nowrap` and the rule is fixed, so together they squeeze the
10
+ * never-truncating prose into a sliver that wraps into a tall ragged block. The
11
+ * column form is the same one the compact presence read already uses — one
12
+ * definition of "the narrow read", styled by `[data-compact]` in base.css. The
13
+ * vertical rule has no place between stacked rows, so it drops. */
14
+ export declare function Thought({ text, eyebrow, compact, }: {
15
+ text: string;
16
+ eyebrow: string;
17
+ compact?: boolean;
18
+ }): React.ReactElement;
19
+ /** The fresh read just after a turn — a calm editorial block: the agent's
20
+ * eyebrow KICKER over its lead sentence over the firm facts it locked in. Laid
21
+ * out as a vertical stack (kicker / read / facts), left-aligned and top-
22
+ * anchored, so it reads like a campaign card, not a label floating left of a
23
+ * tall column. The whole block fades in as one (the shared blur-settle on the
24
+ * wrapper); no per-chip stagger that would read as the facts popping in one by
25
+ * one.
26
+ *
27
+ * Facts are EDITABLE: hovering a chip reveals an ×, and dismissing it is just
28
+ * another signal — `sendImmediateSignal(PRESENCE_FACT_DISMISS)` tells the agent
29
+ * to drop that confirmed slot so future reads omit it (the visitor editing
30
+ * their own brief; the agent still OWNS the dossier — the client never mutates
31
+ * the frame). Removal is optimistic + ANIMATED (the chip collapses out and the
32
+ * neighbours slide in via `layout`), so it's never a sudden vanish. */
33
+ export declare function Dossier({ text, facts, eyebrow }: {
34
+ text: string;
35
+ facts: Fact[];
36
+ eyebrow: string;
37
+ }): React.ReactElement;
@@ -0,0 +1,58 @@
1
+ import type { PresenceSourceElement, PresenceSourceRef } from '@40rty/ams-sdk';
2
+ export type SiftCardState = 'sifting' | 'chosen' | 'pending' | 'missed';
3
+ export interface SiftCard {
4
+ /** Stable identity for the whole life of the turn — the entity id for a
5
+ * preview, the lookup id for the other three, which is why a card never
6
+ * remounts as its state changes and its motion is always a transition. */
7
+ key: string;
8
+ sourceKind: string;
9
+ /** The record this card stands for. Absent while a lookup runs, and for a
10
+ * miss, which has no record by definition. */
11
+ ref?: PresenceSourceRef;
12
+ state: SiftCardState;
13
+ /** The lookup that produced this card. Cards are dealt to the track one
14
+ * lookup at a time, so several lookups running at once each get room. */
15
+ lookupId: string;
16
+ /** Every record the card stands in for — set only on a COLLAPSED card, which
17
+ * is the one that represents a whole lookup rather than one record. */
18
+ records?: readonly PresenceSourceRef[];
19
+ /** Deck slots this card occupies — one unless its form spans (a kind that
20
+ * draws prose needs reading width). Counted against the host's room, so a
21
+ * wide card takes the space of the cards it stands in place of rather than
22
+ * overflowing the track it was reserved inside. */
23
+ slots: number;
24
+ }
25
+ export interface SiftDeck {
26
+ /** In draw order: the live candidates (chosen and undecided alike, in arrival
27
+ * order — see RANK), then what is still running, then the misses. Capped by
28
+ * the host. */
29
+ cards: SiftCard[];
30
+ /** Records every settled lookup accounted for — how WIDE the search was.
31
+ * Stamped from each element's `total`, so it never falls while it is read. */
32
+ read: number;
33
+ /** Cards the deck holds but has no room to draw. */
34
+ overflow: number;
35
+ }
36
+ /**
37
+ * Project the live source elements onto the deck the band draws.
38
+ *
39
+ * `limit` is the host's, not the deck's: the band, the island and the canvas
40
+ * foot have different room, and a projection that picked its own cap would make
41
+ * the two disagree about what "the deck" is.
42
+ *
43
+ * `admitted` is the renderer's memory of which candidates the deck has ALREADY
44
+ * shown, and it exists to make one guarantee: after the canvas prunes the
45
+ * unchosen away, the deck can only LOSE cards. Without it the cap is a moving
46
+ * window over whatever survives, so a candidate sitting at position twelve —
47
+ * never once drawn — could appear for the first time at the settle, which is the
48
+ * one moment the row must be closing rather than opening. Slots freed by the
49
+ * prune are deliberately not refilled.
50
+ *
51
+ * It maps each admitted key to the SLOTS that card took, not merely the keys:
52
+ * `limit` and `card.slots` are both counted in slots, so a set's `size` is the
53
+ * wrong unit. A five-slot review column and a one-slot product card reserve six
54
+ * slots but would count as two — and once both were pruned, a new five-slot
55
+ * column would pass the check against an eight-slot limit and refill room that
56
+ * must stay spent.
57
+ */
58
+ export declare function siftDeck(sources: readonly PresenceSourceElement[], materialized: ReadonlySet<string>, limit: number, admitted?: ReadonlyMap<string, number>): SiftDeck;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { PresenceSourceCardProps, PresenceSourceFormDef } from '@40rty/ams-sdk';
3
+ export declare const ArticleSourceCard: React.ForwardRefExoticComponent<PresenceSourceCardProps & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const articleSourceForm: PresenceSourceFormDef;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { PresenceSourceCardProps, PresenceSourceFormDef } from '@40rty/ams-sdk';
3
+ export declare const CollectionSourceCard: React.ForwardRefExoticComponent<PresenceSourceCardProps & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const collectionSourceForm: PresenceSourceFormDef;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { PresenceSourceCardProps, PresenceSourceFormDef } from '@40rty/ams-sdk';
3
+ export declare const PolicySourceCard: React.ForwardRefExoticComponent<PresenceSourceCardProps & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const policySourceForm: PresenceSourceFormDef;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { PresenceSourceCardProps, PresenceSourceFormDef } from '@40rty/ams-sdk';
3
+ export declare const ProductSourceCard: React.ForwardRefExoticComponent<PresenceSourceCardProps & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const productSourceForm: PresenceSourceFormDef;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { PresenceSourceCardProps, PresenceSourceFormDef } from '@40rty/ams-sdk';
3
+ export declare const ReviewSourceCard: React.ForwardRefExoticComponent<PresenceSourceCardProps & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const reviewSourceForm: PresenceSourceFormDef;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import { type PresenceSourceCardProps } from '@40rty/ams-sdk';
3
+ import './register';
4
+ export declare const PresenceSourceCard: React.ForwardRefExoticComponent<PresenceSourceCardProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import type { PresenceSourceCardSize } from '@40rty/ams-sdk';
3
+ import { type SourceCardState } from './card-shell';
4
+ /**
5
+ * The motion box one card occupies.
6
+ *
7
+ * Motion here means MEANING, never activity: a card enters because a lookup
8
+ * started, thickens because it returned, comes FORWARD because the canvas chose
9
+ * it, and leaves because the canvas finished without choosing it. Nothing
10
+ * pulses, nothing loops, nothing is scheduled.
11
+ *
12
+ * A card only ever moves sideways to CLOSE A GAP, and only as fast as the gap
13
+ * opens. `layout` was removed entirely once, because the full spring gave a
14
+ * survivor at the far end of an eight-slot track a glide across most of the
15
+ * deck's width. But the deck sits in `AnimatePresence mode="popLayout"`, which
16
+ * pulls a leaving card out of flow the instant it starts fading — so with NO
17
+ * layout animation the neighbours do not stand still, they TELEPORT into the
18
+ * slot the same frame. `layout="position"` is the honest middle: position only
19
+ * (never size, so nothing is scale-sheared), on a short editorial curve, so the
20
+ * row re-flows in one legible beat instead of snapping.
21
+ *
22
+ * THE REF IS LOAD-BEARING, not a convenience. `popLayout` clones each child of
23
+ * the presence to measure it (`PopChild`), and a component that drops that ref
24
+ * measures as nothing — so the injected `position: absolute` rule never lands,
25
+ * the exiting card keeps its slot for the whole 620ms exit, and the whole deck
26
+ * lurches when it finally unmounts. That was the sift's jump. Every registered
27
+ * source form must forward to this frame; the registry's `Component` type says
28
+ * so.
29
+ */
30
+ export declare const SourceCardFrame: React.ForwardRefExoticComponent<{
31
+ kind: string;
32
+ state: SourceCardState;
33
+ size: PresenceSourceCardSize;
34
+ /** Deck slots this card spans. Absent = one. Width only — see
35
+ * `sourceCardSpan`. */
36
+ slots?: number;
37
+ children: React.ReactNode;
38
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,69 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The face of an image-bearing card.
4
+ *
5
+ * A record with no `imageUrl`, and a record whose `imageUrl` fails to load, are
6
+ * the SAME thing to a visitor — and neither may be allowed to render the
7
+ * browser's broken-image glyph, which is the one mark that says "this surface is
8
+ * broken" instead of "the agent read this". Both fall back to `caption`: the
9
+ * plate's own fill with a short rule where a caption would sit — deliberate, and
10
+ * unmistakably not a failure.
11
+ */
12
+ export declare function SourceImage({ imageUrl, caption, }: {
13
+ imageUrl: string | undefined;
14
+ caption: React.ReactNode;
15
+ }): React.ReactElement;
16
+ /** The short rule an imageless (or unloadable) tile shows instead of a picture —
17
+ * where a caption would sit. */
18
+ export declare function CaptionRule({ width, height }: {
19
+ width: number;
20
+ height: number;
21
+ }): React.ReactElement;
22
+ /** One ruled line — `width` is a fraction of the interior, `weight` its px
23
+ * thickness (a heavier first rule reads as a headline). */
24
+ export interface RuledLine {
25
+ width: number;
26
+ weight: number;
27
+ }
28
+ /**
29
+ * The abstraction of prose. A stack of hairlines with a ragged last line, laid
30
+ * out `space-between` so it always fills its box exactly — no gap constant to
31
+ * re-tune per size.
32
+ */
33
+ export declare function RuledLines({ lines, headline, }: {
34
+ lines: RuledLine[];
35
+ /** Extra air under the first rule, so a headline separates from its body. */
36
+ headline: boolean;
37
+ }): React.ReactElement;
38
+ /** The dog-ear — one diagonal hairline across the top-right corner. Drawn in
39
+ * BOTH states, because the fold is what says "document". */
40
+ export declare function CornerFold({ width, fold }: {
41
+ width: number;
42
+ fold: number;
43
+ }): React.ReactElement;
44
+ /**
45
+ * A rating, drawn as STARS filled to the score.
46
+ *
47
+ * These were five squares — a "pip row" chosen when `PresenceSourceRef` carried
48
+ * no score and the row could only say "there is a rating here". Squares said
49
+ * that honestly and said nothing else; now that the score is on the wire, the
50
+ * mark that reads as a rating at a glance is the one everybody already knows,
51
+ * and no legend is needed to say a filled star is a point.
52
+ *
53
+ * Still card-shell rule 2: ONE ink at two weights. A filled star is solid ink,
54
+ * an empty one is the same outline the squares drew, so this survives a
55
+ * monochrome brand and inverts with the band exactly as before.
56
+ *
57
+ * The `pips`/`pip` class hooks are kept deliberately. They are the documented
58
+ * surface a brand reaches these marks through, and renaming them would break
59
+ * that CSS to describe an internal change to the shape drawn inside.
60
+ */
61
+ export declare function RatingStars({ width, score, count, }: {
62
+ /** Room the whole row has. Stars are sized to fill it, so the row never
63
+ * overflows its plate or collapses to a smudge. */
64
+ width: number;
65
+ /** 0-`count`. Absent draws every star empty: "there is a rating here",
66
+ * without claiming what it is. */
67
+ score?: number;
68
+ count?: number;
69
+ }): React.ReactElement;
@@ -0,0 +1,20 @@
1
+ import type * as React from 'react';
2
+ import { type SourceCardState } from './card-shell';
3
+ /**
4
+ * One sheet of "paper" — the material every kind is cut from.
5
+ *
6
+ * The three states above stay distinguishable at a glance: a loaded card is
7
+ * FILLED with full-weight marks, a pending card is the same marks at a lighter
8
+ * weight on a fainter sheet, a missed card is a dashed OUTLINE with a struck
9
+ * rule and no interior at all.
10
+ */
11
+ export declare function SourcePlate({ width, height, state, mark, style, children, }: {
12
+ width: number;
13
+ height: number;
14
+ state: SourceCardState;
15
+ /** Draw the "and there was nothing" rule. False for a stack's backing sheets,
16
+ * which must not each claim their own miss. */
17
+ mark: boolean;
18
+ style?: React.CSSProperties;
19
+ children?: React.ReactNode;
20
+ }): React.ReactElement;
@@ -0,0 +1,91 @@
1
+ import type { PresenceSourceCardFootprint, PresenceSourceCardSize } from '@40rty/ams-sdk';
2
+ /** Class hooks so a brand can reach a card in CSS (spacing, an added rule) even
3
+ * though the marks themselves are JS-owned. */
4
+ export declare const sourceCardClass: {
5
+ card: string;
6
+ plate: string;
7
+ rules: string;
8
+ rule: string;
9
+ pips: string;
10
+ pip: string;
11
+ /** The hairline struck under a card the canvas chose. */
12
+ chosenRule: string;
13
+ fold: string;
14
+ ghost: string;
15
+ image: string;
16
+ };
17
+ /**
18
+ * What a card is currently saying. Four states, four distinct treatments —
19
+ * conflating any two of them is a lie the visitor cannot detect:
20
+ *
21
+ * · 'pending' the lookup is running right now. The SAME marks at a lighter ink
22
+ * weight on a fainter plate — visibly the same kind, visibly not settled.
23
+ * · 'loaded' the lookup returned this and nothing has been decided about it.
24
+ * A CANDIDATE: held back, drawn without colour, awaiting the answer.
25
+ * · 'chosen' the canvas placed this entity. It became the answer, so it comes
26
+ * forward: full ink, its colour back, a rule struck under it.
27
+ * · 'missed' the lookup returned nothing. Dashed OUTLINE with a struck rule
28
+ * and no interior: "I checked here and there was nothing."
29
+ */
30
+ export type SourceCardState = 'loaded' | 'chosen' | 'pending' | 'missed';
31
+ /**
32
+ * The state a card is in, from the element's three flags, in strict precedence.
33
+ *
34
+ * `pending` wins over everything: a lookup that has not returned has not found
35
+ * nothing, it has found nothing YET. `chosen` then wins over `loaded`, because
36
+ * "the canvas placed this" is a settled fact about a record the lookup already
37
+ * returned — the two are never in genuine conflict, and stating the order here
38
+ * keeps a card from having to decide it.
39
+ */
40
+ export declare function sourceCardState(found: boolean, pending: boolean, chosen: boolean): SourceCardState;
41
+ /** The ink. One colour, many weights — see rule 2 above. The `currentColor`
42
+ * fallback keeps a card visible if it is ever mounted outside a notch band. */
43
+ export declare function ink(pct: number): string;
44
+ /**
45
+ * THE box — identical for every kind at a given host size (rule 1).
46
+ *
47
+ * The three sizes are the three hosts: the desktop presence band, the slim
48
+ * mobile island, and the canvas-section continuation foot. Portrait at roughly
49
+ * 0.78, which reads as "a thing that was read" for both a photo and a page.
50
+ * Deliberately smaller than the scanning deck's tile it replaces — the sift
51
+ * shares its row with the agent's line and its facts, and the band opens to the
52
+ * card's height, so every px here is a px the notch grows by.
53
+ */
54
+ export declare const SOURCE_CARD_BOX: Record<PresenceSourceCardSize, PresenceSourceCardFootprint>;
55
+ /**
56
+ * Gap between two cards on the deck, per host. Lives here beside the box
57
+ * because the two are one geometry: the deck reserves its track from them, and
58
+ * a card that SPANS several slots has to span the gaps between them as well.
59
+ * One source, so a spanning card and the track it sits in cannot be computed
60
+ * from two different numbers.
61
+ */
62
+ export declare const SOURCE_CARD_GAP: Record<PresenceSourceCardSize, number>;
63
+ /** The box a card occupies. A function, not just the record, so a brand form
64
+ * reads its geometry the same way the baseline set does. */
65
+ export declare function sourceCardBox(size: PresenceSourceCardSize): PresenceSourceCardFootprint;
66
+ /**
67
+ * The box a card occupies when it SPANS several slots — the gaps it swallows
68
+ * included, so it lands exactly where N cards would have.
69
+ *
70
+ * WIDTH ONLY. Height stays the host's, uniform across every kind, and that is
71
+ * the whole of card-shell rule 1 that matters: the band sizes to the TALLEST
72
+ * card on the row, so a kind choosing its own height inflates the notch for
73
+ * everything. A kind choosing its own width costs the row nothing vertically —
74
+ * it takes slots the deck was already reserving. That is why the `footprint()`
75
+ * this resembles was removed and this is not the same mistake: the removal note
76
+ * names height as the cost, and height is not on offer here.
77
+ */
78
+ export declare function sourceCardSpan(size: PresenceSourceCardSize, slots: number): PresenceSourceCardFootprint;
79
+ /** Interior breathing room, proportional so a compact card is not all padding. */
80
+ export declare function platePad(width: number): number;
81
+ /** Hairline weight. 1px on the notch sizes; thicker only on the large
82
+ * canvas-section foot, where a 1px rule disappears. */
83
+ export declare function ruleWeight(size: PresenceSourceCardSize): number;
84
+ /** The editorial settle curve the whole presence surface moves on. Shared by the
85
+ * card's motion (`card-frame.tsx`) and its fill transitions (`card-plate.tsx`),
86
+ * so a card's move and its settle cannot drift apart. */
87
+ export declare const CARD_EASE: [number, number, number, number];
88
+ /** How long a card takes to SETTLE from one fill to another (pending → loaded,
89
+ * loaded → chosen). A state change, so it is animated; a plain ink transition,
90
+ * so it is calm. */
91
+ export declare const CARD_SETTLE_MS = 260;
@@ -0,0 +1,6 @@
1
+ /** The kinds the shipping tools declare today (`search_catalog`,
2
+ * `get_collections`, `get_content`, `search_policies`) plus `review`, which no
3
+ * tool emits yet — registered anyway to keep the open registry honest. */
4
+ export declare const BASELINE_SOURCE_KINDS: string[];
5
+ /** Register the baseline card forms. Idempotent. */
6
+ export declare function registerDefaultPresenceSourceForms(): void;