@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,14 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export interface UseInViewOnceOptions {
|
|
3
|
+
amount?: number;
|
|
4
|
+
rootMargin?: string;
|
|
5
|
+
root?: Element | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Fires once when the element first crosses the viewport threshold and stays
|
|
9
|
+
* true thereafter. Synchronously checks the element's bounding rect on mount
|
|
10
|
+
* via `useLayoutEffect` — elements already inside the viewport at mount time
|
|
11
|
+
* skip the `false` state entirely, avoiding a one-frame flash of the
|
|
12
|
+
* `hidden` variant on critical typography (titles/heroes that mount in-view).
|
|
13
|
+
*/
|
|
14
|
+
export declare function useInViewOnce<T extends Element>(ref: RefObject<T | null>, options?: UseInViewOnceOptions): boolean;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
export interface UseScrollDirectionOptions {
|
|
3
|
+
/** The scroll container to observe (e.g. the canvas scroller). */
|
|
4
|
+
container: RefObject<HTMLElement | null>;
|
|
5
|
+
/** Within this many px of the origin the surface is always treated as "at top"
|
|
6
|
+
* — never collapsed, so a tiny scroll near the start can't fold chrome.
|
|
7
|
+
* Default 24. */
|
|
8
|
+
topThreshold?: number;
|
|
9
|
+
/** Minimum px between samples to register as a real direction change — filters
|
|
10
|
+
* jitter / rubber-band overscroll. Default 6. */
|
|
11
|
+
minDelta?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ScrollDirection {
|
|
14
|
+
/** Latest committed direction of travel. `idle` before the first real move. */
|
|
15
|
+
direction: 'up' | 'down' | 'idle';
|
|
16
|
+
/** Scroll is within `topThreshold` of the origin. */
|
|
17
|
+
atTop: boolean;
|
|
18
|
+
/** Stable "collapse chrome" signal: flips true once the visitor scrolls DOWN
|
|
19
|
+
* past the top threshold, back to false on any upward scroll or on returning
|
|
20
|
+
* to the top. Built to drive a fold-on-scroll surface (a bar folding to a
|
|
21
|
+
* FAB). Stable between scroll events — it holds its last decision rather than
|
|
22
|
+
* resetting to a momentary direction. */
|
|
23
|
+
collapsed: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Observer-driven scroll-direction signal bound to a passed scroll container.
|
|
27
|
+
*
|
|
28
|
+
* Listens natively on `scrollEventTarget(el)` — NOT framer's `useScroll`,
|
|
29
|
+
* whose element binding attaches to the element itself and therefore never
|
|
30
|
+
* fires for the mobile shell's document-scroll model (see the helper's doc
|
|
31
|
+
* comment; `document.scrollingElement` doesn't emit `scroll`). Position reads
|
|
32
|
+
* stay on the element (`scrollTop` resolves in both models); everything is
|
|
33
|
+
* scoped through the element (no `window`), per the platform motion rule.
|
|
34
|
+
* Derives a STABLE collapse decision from the frame-to-frame delta, so
|
|
35
|
+
* fold-on-scroll chrome holds steady while reading and springs back the
|
|
36
|
+
* instant the visitor scrolls up or reaches the top.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useScrollDirection({ container, topThreshold, minDelta, }: UseScrollDirectionOptions): ScrollDirection;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useScroll, type MotionValue } from 'framer-motion';
|
|
2
|
+
import type { RefObject } from 'react';
|
|
3
|
+
export type ScrollOffset = Parameters<typeof useScroll>[0] extends infer T ? T extends {
|
|
4
|
+
offset?: infer O;
|
|
5
|
+
} ? O : never : never;
|
|
6
|
+
export interface UseScrollProgressOptions {
|
|
7
|
+
/** Track this specific element's position within the viewport/container. */
|
|
8
|
+
target?: RefObject<HTMLElement | null>;
|
|
9
|
+
/** Override the scroll container. Defaults to window. */
|
|
10
|
+
container?: RefObject<HTMLElement | null>;
|
|
11
|
+
/** Framer offset tuple (e.g. ['start end', 'end start']). */
|
|
12
|
+
offset?: ScrollOffset;
|
|
13
|
+
}
|
|
14
|
+
export interface ScrollProgress {
|
|
15
|
+
scrollY: MotionValue<number>;
|
|
16
|
+
progress: MotionValue<number>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Scroll progress that targets either window or a passed container ref. Brand
|
|
20
|
+
* components decide their own container — there is no implicit context. If
|
|
21
|
+
* the consumer's app uses a non-window scroller, pass its ref explicitly.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useScrollProgress(options?: UseScrollProgressOptions): ScrollProgress;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface UseStableValueOptions {
|
|
2
|
+
/** ms a new value must remain unchanged before it propagates. Default 250. */
|
|
3
|
+
settleMs?: number;
|
|
4
|
+
/** Skip the debounce on first paint — emit the initial value immediately
|
|
5
|
+
* even if `settleMs > 0`. Default true. The flicker we want to suppress
|
|
6
|
+
* is later state churn, not the first render. */
|
|
7
|
+
immediateFirst?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Which transitions to debounce:
|
|
10
|
+
* - 'all' (default) — every change waits for settle
|
|
11
|
+
* - 'falsy' — truthy values propagate instantly; only drops to a
|
|
12
|
+
* falsy value (0, '', false, null, undefined) wait for
|
|
13
|
+
* settle. Use for cart badge counts: optimistic +1 must
|
|
14
|
+
* appear immediately, but a transient drop to 0 during
|
|
15
|
+
* refetch should NOT flash the badge off and back on.
|
|
16
|
+
* - 'truthy' — falsy propagates instantly; truthy waits. Rare.
|
|
17
|
+
*/
|
|
18
|
+
when?: 'all' | 'falsy' | 'truthy';
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns `value` after it has remained unchanged for `settleMs`. Use when
|
|
22
|
+
* upstream state (optimistic update → real fetch reply) churns rapidly
|
|
23
|
+
* and the consumer (a count badge, a label, an animation trigger) would
|
|
24
|
+
* otherwise paint every intermediate value and "flash".
|
|
25
|
+
*
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const stableCount = useStableValue(cart.totalQuantity, { settleMs: 250 });
|
|
28
|
+
* {stableCount > 0 && <Badge>{stableCount}</Badge>}
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* Why not `useDeferredValue`? React's deferred value yields to high-prio
|
|
32
|
+
* renders but doesn't gate on a time window — multiple churns inside the
|
|
33
|
+
* same frame still all paint. This hook waits until the value is stable
|
|
34
|
+
* across `settleMs`, which is what "stop flashing" actually means.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useStableValue<T>(value: T, options?: UseStableValueOptions): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useSuccessFlash, type UseSuccessFlashApi, type UseSuccessFlashOptions } from '@40rty/ams-sdk';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { Reveal, type RevealProps } from './primitives/Reveal';
|
|
2
|
+
export { RevealStagger, type RevealStaggerProps } from './primitives/RevealStagger';
|
|
3
|
+
export { Pin, type PinProps, type PinRenderArg } from './primitives/Pin';
|
|
4
|
+
export { Parallax, type ParallaxProps } from './primitives/Parallax';
|
|
5
|
+
export { StickyShelf, type StickyShelfProps } from './primitives/StickyShelf';
|
|
6
|
+
export { MorphRegion, type MorphRegionProps } from './primitives/MorphRegion';
|
|
7
|
+
export { AgentReveal, AgentStagger, AgentStaggerItem, AgentTypeIn, AgentCaret, AgentPulseOnChange, AgentShimmer, agentStaggerVariants, type AgentRevealProps, type AgentStaggerProps, type AgentStaggerItemProps, type AgentTypeInProps, type AgentCaretProps, type AgentPulseOnChangeProps, type AgentShimmerProps, } from './primitives/Agent';
|
|
8
|
+
export * from './generation';
|
|
9
|
+
export { useInViewOnce, type UseInViewOnceOptions } from './hooks/useInViewOnce';
|
|
10
|
+
export { useScrollProgress, type UseScrollProgressOptions, type ScrollProgress, type ScrollOffset, } from './hooks/useScrollProgress';
|
|
11
|
+
export { scrollEventTarget } from '@40rty/ams-sdk';
|
|
12
|
+
export { useScrollDirection, type UseScrollDirectionOptions, type ScrollDirection, } from './hooks/useScrollDirection';
|
|
13
|
+
export { useSuccessFlash, type UseSuccessFlashOptions, type UseSuccessFlashApi, } from './hooks/useSuccessFlash';
|
|
14
|
+
export { useStableValue, type UseStableValueOptions, } from './hooks/useStableValue';
|
|
15
|
+
export { motionPresets, type MotionPresetName, updatePresets, type UpdatePresetName, hoverPresets, pressPresets, successFlash, panelSlideIn, inputFocusRing, chipEntry, } from './presets';
|
|
16
|
+
export { motion, AnimatePresence, LayoutGroup, MotionConfig, useMotionValue, useTransform, useSpring, animate, useDragControls, useMotionValueEvent, useScroll, useInView, useReducedMotion, useAnimationControls, cubicBezier, } from 'framer-motion';
|
|
17
|
+
export type { Variants, Transition, MotionValue, MotionProps, Target, TargetAndTransition, } from 'framer-motion';
|
|
18
|
+
export { editorialEase } from './ease';
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import type { Variants } from 'framer-motion';
|
|
2
|
+
export declare const motionPresets: {
|
|
3
|
+
fadeIn: {
|
|
4
|
+
hidden: {
|
|
5
|
+
opacity: number;
|
|
6
|
+
};
|
|
7
|
+
visible: {
|
|
8
|
+
opacity: number;
|
|
9
|
+
transition: {
|
|
10
|
+
duration: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
fadeUp: {
|
|
15
|
+
hidden: {
|
|
16
|
+
opacity: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
visible: {
|
|
20
|
+
opacity: number;
|
|
21
|
+
y: number;
|
|
22
|
+
transition: {
|
|
23
|
+
duration: number;
|
|
24
|
+
ease: (t: number) => number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
riseStagger: {
|
|
29
|
+
hidden: {};
|
|
30
|
+
visible: {
|
|
31
|
+
transition: {
|
|
32
|
+
staggerChildren: number;
|
|
33
|
+
delayChildren: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
riseStaggerItem: {
|
|
38
|
+
hidden: {
|
|
39
|
+
opacity: number;
|
|
40
|
+
y: number;
|
|
41
|
+
};
|
|
42
|
+
visible: {
|
|
43
|
+
opacity: number;
|
|
44
|
+
y: number;
|
|
45
|
+
transition: {
|
|
46
|
+
duration: number;
|
|
47
|
+
ease: (t: number) => number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
morphIn: {
|
|
52
|
+
hidden: {
|
|
53
|
+
opacity: number;
|
|
54
|
+
scale: number;
|
|
55
|
+
};
|
|
56
|
+
visible: {
|
|
57
|
+
opacity: number;
|
|
58
|
+
scale: number;
|
|
59
|
+
transition: {
|
|
60
|
+
duration: number;
|
|
61
|
+
ease: (t: number) => number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
pinReveal: {
|
|
66
|
+
hidden: {
|
|
67
|
+
opacity: number;
|
|
68
|
+
y: number;
|
|
69
|
+
};
|
|
70
|
+
visible: {
|
|
71
|
+
opacity: number;
|
|
72
|
+
y: number;
|
|
73
|
+
transition: {
|
|
74
|
+
duration: number;
|
|
75
|
+
ease: (t: number) => number;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
softScale: {
|
|
80
|
+
hidden: {
|
|
81
|
+
opacity: number;
|
|
82
|
+
scale: number;
|
|
83
|
+
};
|
|
84
|
+
visible: {
|
|
85
|
+
opacity: number;
|
|
86
|
+
scale: number;
|
|
87
|
+
transition: {
|
|
88
|
+
duration: number;
|
|
89
|
+
ease: (t: number) => number;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
slideInLeft: {
|
|
94
|
+
hidden: {
|
|
95
|
+
opacity: number;
|
|
96
|
+
x: number;
|
|
97
|
+
};
|
|
98
|
+
visible: {
|
|
99
|
+
opacity: number;
|
|
100
|
+
x: number;
|
|
101
|
+
transition: {
|
|
102
|
+
duration: number;
|
|
103
|
+
ease: (t: number) => number;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
slideInRight: {
|
|
108
|
+
hidden: {
|
|
109
|
+
x: string;
|
|
110
|
+
};
|
|
111
|
+
visible: {
|
|
112
|
+
x: number;
|
|
113
|
+
transition: {
|
|
114
|
+
duration: number;
|
|
115
|
+
ease: (t: number) => number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
exit: {
|
|
119
|
+
x: string;
|
|
120
|
+
transition: {
|
|
121
|
+
duration: number;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
editorialMask: {
|
|
126
|
+
hidden: {
|
|
127
|
+
clipPath: string;
|
|
128
|
+
};
|
|
129
|
+
visible: {
|
|
130
|
+
clipPath: string;
|
|
131
|
+
transition: {
|
|
132
|
+
duration: number;
|
|
133
|
+
ease: (t: number) => number;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
export type MotionPresetName = keyof typeof motionPresets;
|
|
139
|
+
/**
|
|
140
|
+
* Patch-driven content update presets. Brand components opt into these when
|
|
141
|
+
* a piece of content is being mutated by streaming patches and they want a
|
|
142
|
+
* subtle visual cue.
|
|
143
|
+
*/
|
|
144
|
+
export declare const updatePresets: {
|
|
145
|
+
contentUpdate: {
|
|
146
|
+
idle: {
|
|
147
|
+
opacity: number;
|
|
148
|
+
};
|
|
149
|
+
pulse: {
|
|
150
|
+
opacity: number[];
|
|
151
|
+
transition: {
|
|
152
|
+
duration: number;
|
|
153
|
+
ease: "easeInOut";
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
textCrossfade: {
|
|
158
|
+
enter: {
|
|
159
|
+
opacity: number;
|
|
160
|
+
};
|
|
161
|
+
visible: {
|
|
162
|
+
opacity: number;
|
|
163
|
+
transition: {
|
|
164
|
+
duration: number;
|
|
165
|
+
ease: "easeIn";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
exit: {
|
|
169
|
+
opacity: number;
|
|
170
|
+
transition: {
|
|
171
|
+
duration: number;
|
|
172
|
+
ease: "easeOut";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
listItemEnter: {
|
|
177
|
+
hidden: {
|
|
178
|
+
opacity: number;
|
|
179
|
+
y: number;
|
|
180
|
+
scale: number;
|
|
181
|
+
};
|
|
182
|
+
visible: {
|
|
183
|
+
opacity: number;
|
|
184
|
+
y: number;
|
|
185
|
+
scale: number;
|
|
186
|
+
transition: {
|
|
187
|
+
duration: number;
|
|
188
|
+
ease: (t: number) => number;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
listItemExit: {
|
|
193
|
+
exit: {
|
|
194
|
+
opacity: number;
|
|
195
|
+
scale: number;
|
|
196
|
+
transition: {
|
|
197
|
+
duration: number;
|
|
198
|
+
ease: "easeIn";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
export type UpdatePresetName = keyof typeof updatePresets;
|
|
204
|
+
/**
|
|
205
|
+
* Suggestion-chip entry/exit. Consumed by the agent's follow-up chip
|
|
206
|
+
* strip + brand starter prompts: each chip pops in with a brief y/scale
|
|
207
|
+
* settle, staggered by its index (`custom={i}`), and fades out
|
|
208
|
+
* symmetrically when the chip set is replaced.
|
|
209
|
+
*
|
|
210
|
+
* Usage:
|
|
211
|
+
* ```tsx
|
|
212
|
+
* <AnimatePresence mode="popLayout" initial={false}>
|
|
213
|
+
* {chips.map((c, i) => (
|
|
214
|
+
* <motion.button
|
|
215
|
+
* key={c.id}
|
|
216
|
+
* custom={i}
|
|
217
|
+
* variants={chipEntry}
|
|
218
|
+
* initial="hidden"
|
|
219
|
+
* animate="visible"
|
|
220
|
+
* exit="exit"
|
|
221
|
+
* />
|
|
222
|
+
* ))}
|
|
223
|
+
* </AnimatePresence>
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
export declare const chipEntry: Variants;
|
|
227
|
+
/** Hover-state convenience values. Not Variants — applied as motion props. */
|
|
228
|
+
export declare const hoverPresets: {
|
|
229
|
+
readonly scaleOnHover: {
|
|
230
|
+
readonly whileHover: {
|
|
231
|
+
readonly scale: 1.02;
|
|
232
|
+
};
|
|
233
|
+
readonly transition: {
|
|
234
|
+
readonly duration: 0.2;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
readonly imageZoom: {
|
|
238
|
+
readonly whileHover: {
|
|
239
|
+
readonly scale: 1.08;
|
|
240
|
+
};
|
|
241
|
+
readonly transition: {
|
|
242
|
+
readonly duration: 0.4;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
readonly cardHoverLift: {
|
|
246
|
+
readonly whileHover: {
|
|
247
|
+
readonly y: -4;
|
|
248
|
+
readonly transition: {
|
|
249
|
+
readonly duration: 0.25;
|
|
250
|
+
readonly ease: (t: number) => number;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Press-state convenience values for interactive controls. Three flavours:
|
|
257
|
+
*
|
|
258
|
+
* icon — small icon buttons (Menu, Back, CartPill, NewSession). Tiny
|
|
259
|
+
* lift on hover, decisive squash on tap. Reads as "tactile".
|
|
260
|
+
* primary — primary CTAs (Send, AddToCart). Subtle lift, modest squash
|
|
261
|
+
* so the press feels expensive, not floppy.
|
|
262
|
+
* chip — pill / chip-sized controls. Matches the AMS composer rail.
|
|
263
|
+
*
|
|
264
|
+
* Each entry is a `{ whileHover, whileTap, transition }` triple — spread
|
|
265
|
+
* onto a `motion.button`/`motion.div`:
|
|
266
|
+
* `<motion.button {...pressPresets.icon}>...`
|
|
267
|
+
*/
|
|
268
|
+
export declare const pressPresets: {
|
|
269
|
+
readonly icon: {
|
|
270
|
+
readonly whileHover: {
|
|
271
|
+
readonly y: -1;
|
|
272
|
+
readonly scale: 1.06;
|
|
273
|
+
};
|
|
274
|
+
readonly whileTap: {
|
|
275
|
+
readonly scale: 0.9;
|
|
276
|
+
};
|
|
277
|
+
readonly transition: {
|
|
278
|
+
readonly duration: 0.16;
|
|
279
|
+
readonly ease: (t: number) => number;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
readonly primary: {
|
|
283
|
+
readonly whileHover: {
|
|
284
|
+
readonly y: -1;
|
|
285
|
+
readonly scale: 1.02;
|
|
286
|
+
};
|
|
287
|
+
readonly whileTap: {
|
|
288
|
+
readonly scale: 0.97;
|
|
289
|
+
};
|
|
290
|
+
readonly transition: {
|
|
291
|
+
readonly duration: 0.18;
|
|
292
|
+
readonly ease: (t: number) => number;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
readonly chip: {
|
|
296
|
+
readonly whileHover: {
|
|
297
|
+
readonly y: -2;
|
|
298
|
+
readonly scale: 1.04;
|
|
299
|
+
};
|
|
300
|
+
readonly whileTap: {
|
|
301
|
+
readonly scale: 0.96;
|
|
302
|
+
};
|
|
303
|
+
readonly transition: {
|
|
304
|
+
readonly duration: 0.18;
|
|
305
|
+
readonly ease: (t: number) => number;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* One-shot "operation succeeded" flash. Use on confirm-style controls —
|
|
311
|
+
* Add to bag, Save look — at the moment the underlying op resolves:
|
|
312
|
+
*
|
|
313
|
+
* ```tsx
|
|
314
|
+
* <motion.button
|
|
315
|
+
* animate={justAdded ? 'flash' : 'idle'}
|
|
316
|
+
* variants={successFlash}
|
|
317
|
+
* >…</motion.button>
|
|
318
|
+
* ```
|
|
319
|
+
*
|
|
320
|
+
* Caller owns the `justAdded` state flip — typically a 600ms window
|
|
321
|
+
* after the cart line lands.
|
|
322
|
+
*/
|
|
323
|
+
export declare const successFlash: Variants;
|
|
324
|
+
/**
|
|
325
|
+
* Side-panel entrance. Slide from the right with a soft settle. Pair with
|
|
326
|
+
* `useReducedMotion` at the call site or rely on framer's reduced-motion
|
|
327
|
+
* fallback.
|
|
328
|
+
*/
|
|
329
|
+
export declare const panelSlideIn: Variants;
|
|
330
|
+
/**
|
|
331
|
+
* Focus-ring expansion for input wrappers. Caller toggles `state` between
|
|
332
|
+
* 'idle' and 'focused' on the wrapping `motion.div`. The ring is drawn
|
|
333
|
+
* with `boxShadow` so layout never reflows during focus.
|
|
334
|
+
*/
|
|
335
|
+
export declare const inputFocusRing: Variants;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic motion vocabulary — primitives that make a surface feel like
|
|
3
|
+
* it is being composed by an agent in real time, not a static page
|
|
4
|
+
* hydrating. Pair with the scroll-trigger vocabulary (Reveal,
|
|
5
|
+
* RevealStagger, Pin, Parallax) in this directory; pick by intent:
|
|
6
|
+
*
|
|
7
|
+
* scroll-trigger (this dir, non-Agent files)
|
|
8
|
+
* Use when content already exists and you want it to *announce
|
|
9
|
+
* itself* as the visitor scrolls. Editorial vibe.
|
|
10
|
+
*
|
|
11
|
+
* agentic (this file)
|
|
12
|
+
* Use when content is *arriving* — patches landing, layout being
|
|
13
|
+
* assembled, the agent talking. Always mount-triggered, never
|
|
14
|
+
* scroll-triggered (scroll-revealing late children fights the
|
|
15
|
+
* "this is streaming in right now" signal).
|
|
16
|
+
*
|
|
17
|
+
* Vocabulary
|
|
18
|
+
* AgentReveal — single element fades + rises + un-blurs
|
|
19
|
+
* AgentStagger — container that streams children in sequence
|
|
20
|
+
* AgentStaggerItem — child variant matching AgentStagger
|
|
21
|
+
* AgentTypeIn — character-by-character text reveal
|
|
22
|
+
* AgentCaret — thin blinking caret, "still composing"
|
|
23
|
+
* AgentPulseOnChange — pulses children when `value` flips
|
|
24
|
+
* AgentShimmer — sweeping highlight overlay (skeleton accent)
|
|
25
|
+
*
|
|
26
|
+
* All primitives honor `prefers-reduced-motion` (instant render, no
|
|
27
|
+
* transforms) and share the editorial ease from this dir's `ease` module.
|
|
28
|
+
*/
|
|
29
|
+
import * as React from 'react';
|
|
30
|
+
import { type Variants } from 'framer-motion';
|
|
31
|
+
export interface AgentRevealProps {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
/** Delay before the entrance begins (s). Useful to sequence siblings
|
|
34
|
+
* outside a stagger container. */
|
|
35
|
+
delay?: number;
|
|
36
|
+
/** Total duration (s). Defaults to 0.6 — long enough to feel composed,
|
|
37
|
+
* short enough to never block interaction. */
|
|
38
|
+
duration?: number;
|
|
39
|
+
/** Vertical rise distance (px). Defaults to 12. Use 0 for fade-only. */
|
|
40
|
+
rise?: number;
|
|
41
|
+
/** Initial blur amount (px). Defaults to 4. Creates the "thought
|
|
42
|
+
* resolving into form" feel — the agentic signature of this set. */
|
|
43
|
+
blur?: number;
|
|
44
|
+
/** Render `as` — defaults to a div. Pass `'span'` for inline reveals. */
|
|
45
|
+
as?: 'div' | 'span';
|
|
46
|
+
className?: string;
|
|
47
|
+
style?: React.CSSProperties;
|
|
48
|
+
}
|
|
49
|
+
export declare function AgentReveal({ children, as, className, style, delay, }: AgentRevealProps): React.ReactElement;
|
|
50
|
+
export interface AgentStaggerProps {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
/** Per-child stagger delay (s). Defaults to the profile's row stagger. */
|
|
53
|
+
step?: number;
|
|
54
|
+
/** Delay before the first child enters (s). Default 0.05. */
|
|
55
|
+
delay?: number;
|
|
56
|
+
as?: 'div' | 'ul' | 'section';
|
|
57
|
+
className?: string;
|
|
58
|
+
style?: React.CSSProperties;
|
|
59
|
+
}
|
|
60
|
+
export declare function AgentStagger({ children, step, delay, as, className, style, }: AgentStaggerProps): React.ReactElement;
|
|
61
|
+
export interface AgentStaggerItemProps {
|
|
62
|
+
children: React.ReactNode;
|
|
63
|
+
as?: 'div' | 'li' | 'span';
|
|
64
|
+
className?: string;
|
|
65
|
+
style?: React.CSSProperties;
|
|
66
|
+
}
|
|
67
|
+
export declare function AgentStaggerItem({ children, as, className, style, }: AgentStaggerItemProps): React.ReactElement;
|
|
68
|
+
/** Raw platform-default variants — for callers that wire their own
|
|
69
|
+
* motion container/items (e.g. a custom scroll rail). Profile-driven
|
|
70
|
+
* components above are preferred; these are the static floor. */
|
|
71
|
+
export declare const agentStaggerVariants: {
|
|
72
|
+
container: Variants;
|
|
73
|
+
item: Variants;
|
|
74
|
+
};
|
|
75
|
+
export interface AgentTypeInProps {
|
|
76
|
+
text: string;
|
|
77
|
+
/** ms per character. Default 22 — short titles resolve under ~1s
|
|
78
|
+
* while still reading as "being typed". */
|
|
79
|
+
speed?: number;
|
|
80
|
+
/** Delay before typing begins (ms). */
|
|
81
|
+
delay?: number;
|
|
82
|
+
/** Render an inline blinking caret while typing. Default true. */
|
|
83
|
+
caret?: boolean;
|
|
84
|
+
/** Keep the caret visible after the text settles. */
|
|
85
|
+
caretWhenDone?: boolean;
|
|
86
|
+
as?: 'span' | 'h1' | 'h2' | 'h3' | 'p';
|
|
87
|
+
className?: string;
|
|
88
|
+
style?: React.CSSProperties;
|
|
89
|
+
}
|
|
90
|
+
export declare function AgentTypeIn({ text, speed, delay, caret, caretWhenDone, as, className, style, }: AgentTypeInProps): React.ReactElement;
|
|
91
|
+
export interface AgentCaretProps {
|
|
92
|
+
/** Inline (next to text) vs block (own line). Default inline. */
|
|
93
|
+
inline?: boolean;
|
|
94
|
+
/** Caret height. Defaults to 1em. */
|
|
95
|
+
height?: number | string;
|
|
96
|
+
/** Caret color. Defaults to currentColor. */
|
|
97
|
+
color?: string;
|
|
98
|
+
}
|
|
99
|
+
export declare function AgentCaret({ inline, height, color, }: AgentCaretProps): React.ReactElement;
|
|
100
|
+
export interface AgentPulseOnChangeProps {
|
|
101
|
+
/** Trigger value — pulses on change between renders. */
|
|
102
|
+
value: string | number | boolean | null | undefined;
|
|
103
|
+
children: React.ReactNode;
|
|
104
|
+
as?: 'div' | 'span';
|
|
105
|
+
className?: string;
|
|
106
|
+
style?: React.CSSProperties;
|
|
107
|
+
}
|
|
108
|
+
export declare function AgentPulseOnChange({ value, children, as, className, style, }: AgentPulseOnChangeProps): React.ReactElement;
|
|
109
|
+
export interface AgentShimmerProps {
|
|
110
|
+
children: React.ReactNode;
|
|
111
|
+
/** Sweep duration (s). Default 1.4. */
|
|
112
|
+
duration?: number;
|
|
113
|
+
/** Highlight color. Defaults to a soft white. */
|
|
114
|
+
highlight?: string;
|
|
115
|
+
className?: string;
|
|
116
|
+
style?: React.CSSProperties;
|
|
117
|
+
}
|
|
118
|
+
export declare function AgentShimmer({ children, duration, highlight, className, style, }: AgentShimmerProps): React.ReactElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface MorphRegionProps {
|
|
3
|
+
/**
|
|
4
|
+
* Stable id used as framer-motion `layoutId`. Two MorphRegion instances
|
|
5
|
+
* with the same id animate between each other when one unmounts and the
|
|
6
|
+
* other mounts.
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Layout-id-bound region. Use to morph one piece of UI into another (e.g.
|
|
14
|
+
* card -> detail) by giving both elements the same `id`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function MorphRegion({ id, children, className }: MorphRegionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ParallaxProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* -1..1. Positive = drifts opposite to scroll direction (perceived
|
|
6
|
+
* "slower"). Negative = drifts with scroll (perceived "faster"). Default
|
|
7
|
+
* 0.3.
|
|
8
|
+
*/
|
|
9
|
+
speed?: number;
|
|
10
|
+
axis?: 'y' | 'x';
|
|
11
|
+
/** Optional non-window scroll container ref. */
|
|
12
|
+
container?: React.RefObject<HTMLElement | null>;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parallax-drift wrapper. Translates its child against scroll progress over
|
|
17
|
+
* the element's own viewport range. Reduced-motion users see no transform.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Parallax({ children, speed, axis, container, className }: ParallaxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type MotionValue } from 'framer-motion';
|
|
3
|
+
export interface PinRenderArg {
|
|
4
|
+
progress: MotionValue<number>;
|
|
5
|
+
}
|
|
6
|
+
export interface PinProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Pin distance in viewport heights. e.g. 1.5 = the pinned element stays
|
|
10
|
+
* stuck while the user scrolls 150vh past its top edge. Default 1.
|
|
11
|
+
*/
|
|
12
|
+
distance?: number;
|
|
13
|
+
/** Render prop receiving a 0..1 motion value across the pin range. */
|
|
14
|
+
render?: (arg: PinRenderArg) => ReactNode;
|
|
15
|
+
/** Optional non-window scroll container ref. */
|
|
16
|
+
container?: React.RefObject<HTMLElement | null>;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Pins a child element to the top of the viewport across `distance` viewport
|
|
21
|
+
* heights of scroll. Reserves a spacer of the right height so surrounding
|
|
22
|
+
* layout doesn't jump. Renders the child via translateY against scroll
|
|
23
|
+
* progress so it stays pinned without `position: sticky` quirks at the
|
|
24
|
+
* boundaries.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Pin({ children, distance, render, container, className }: PinProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type Variants } from 'framer-motion';
|
|
3
|
+
import { type MotionPresetName } from '../presets';
|
|
4
|
+
export interface RevealProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Named preset from motionPresets. Default 'fadeUp'. Ignored if `variants` is passed. */
|
|
7
|
+
preset?: MotionPresetName;
|
|
8
|
+
/** Custom variants — takes precedence over preset. */
|
|
9
|
+
variants?: Variants;
|
|
10
|
+
/** Animate only on first viewport entry. Default true. */
|
|
11
|
+
once?: boolean;
|
|
12
|
+
/** IntersectionObserver threshold. Default 0.25. */
|
|
13
|
+
amount?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Defer the reveal animation until this prop is false. Caller wires it
|
|
16
|
+
* to streaming state (e.g. `defer={isStreaming}`). The library does not
|
|
17
|
+
* know about streaming on its own.
|
|
18
|
+
*/
|
|
19
|
+
defer?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Reveal-on-scroll wrapper. Picks a named motion preset, respects user's
|
|
24
|
+
* reduced-motion setting, and supports caller-controlled deferral so brand
|
|
25
|
+
* authors can hold off mount-in animations during streaming patches.
|
|
26
|
+
*
|
|
27
|
+
* Renders a `<div>`. Wrap in your own semantic tag if needed.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Reveal({ children, preset, variants, once, amount, defer, className, }: RevealProps): import("react/jsx-runtime").JSX.Element;
|