@yewdiel21/motion-kit 0.0.0-stage → 0.9.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/NOTICE +38 -0
- package/README.md +80 -2
- package/bin/motion-kit.mjs +242 -0
- package/css.d.ts +2 -0
- package/dist/auto/index.d.ts +63 -0
- package/dist/auto/index.js +207 -0
- package/dist/auto/index.js.map +1 -0
- package/dist/chunk-2BQGFOA7.js +177 -0
- package/dist/chunk-2BQGFOA7.js.map +1 -0
- package/dist/chunk-34XYOXHG.js +2374 -0
- package/dist/chunk-34XYOXHG.js.map +1 -0
- package/dist/chunk-6OJAP6ZL.js +832 -0
- package/dist/chunk-6OJAP6ZL.js.map +1 -0
- package/dist/chunk-ABNRDDO7.js +28 -0
- package/dist/chunk-ABNRDDO7.js.map +1 -0
- package/dist/chunk-FS2HJVVY.js +3320 -0
- package/dist/chunk-FS2HJVVY.js.map +1 -0
- package/dist/chunk-J27KH2A2.js +157 -0
- package/dist/chunk-J27KH2A2.js.map +1 -0
- package/dist/chunk-KLY5BRRI.js +18 -0
- package/dist/chunk-KLY5BRRI.js.map +1 -0
- package/dist/chunk-Q4LVFNLN.js +1617 -0
- package/dist/chunk-Q4LVFNLN.js.map +1 -0
- package/dist/chunk-RFDIZYFX.js +304 -0
- package/dist/chunk-RFDIZYFX.js.map +1 -0
- package/dist/chunk-TGV27ZWM.js +17 -0
- package/dist/chunk-TGV27ZWM.js.map +1 -0
- package/dist/confetti-BSX1CLLV.d.ts +41 -0
- package/dist/css/components/chat-background.css +87 -0
- package/dist/css/components/chat.css +237 -0
- package/dist/css/components/cursor.css +178 -0
- package/dist/css/components/dialog.css +259 -0
- package/dist/css/components/island.css +301 -0
- package/dist/css/components/menu.css +105 -0
- package/dist/css/components/nav.css +1054 -0
- package/dist/css/components/steps.css +50 -0
- package/dist/css/components/theme-picker.css +115 -0
- package/dist/css/components/toast.css +115 -0
- package/dist/css/controls.css +950 -0
- package/dist/css/effects.css +587 -0
- package/dist/css/fonts.css +3 -0
- package/dist/css/themes/black-green.css +126 -0
- package/dist/css/themes/black.css +126 -0
- package/dist/css/themes/blue.css +126 -0
- package/dist/css/themes/brown.css +126 -0
- package/dist/css/themes/cold-blue.css +126 -0
- package/dist/css/themes/funny.css +126 -0
- package/dist/css/themes/gray.css +126 -0
- package/dist/css/themes/green.css +126 -0
- package/dist/css/themes/modern-1.css +126 -0
- package/dist/css/themes/neogreen.css +126 -0
- package/dist/css/themes/new.css +126 -0
- package/dist/css/themes/new2.css +126 -0
- package/dist/css/themes/oled.css +126 -0
- package/dist/css/themes/orange.css +126 -0
- package/dist/css/themes/pastel-pink.css +126 -0
- package/dist/css/themes/pink.css +126 -0
- package/dist/css/themes/purple.css +126 -0
- package/dist/css/themes/red.css +126 -0
- package/dist/css/themes/super-blue.css +126 -0
- package/dist/css/themes.css +2431 -0
- package/dist/css/tokens.css +452 -0
- package/dist/elements/index.d.ts +183 -0
- package/dist/elements/index.js +472 -0
- package/dist/elements/index.js.map +1 -0
- package/dist/engine-CUr9QijM.d.ts +46 -0
- package/dist/gl/index.d.ts +61 -0
- package/dist/gl/index.js +18 -0
- package/dist/gl/index.js.map +1 -0
- package/dist/index.css +5296 -0
- package/dist/index.d.ts +440 -0
- package/dist/index.js +390 -0
- package/dist/index.js.map +1 -0
- package/dist/react/index.d.ts +476 -0
- package/dist/react/index.js +969 -0
- package/dist/react/index.js.map +1 -0
- package/dist/reduced-BM4Ls0g5.d.ts +566 -0
- package/dist/reveal-WFUWDrei.d.ts +416 -0
- package/dist/store-Bqy_obnD.d.ts +195 -0
- package/dist/theme/generate.d.ts +18 -0
- package/dist/theme/generate.js +64 -0
- package/dist/theme/generate.js.map +1 -0
- package/dist/theme/index.d.ts +17 -0
- package/dist/theme/index.js +32 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme-BFMoCzi6.d.ts +158 -0
- package/dist/types-BkS_raL8.d.ts +7 -0
- package/package.json +114 -3
- package/registry.json +469 -0
- package/skills/motion-kit/SKILL.md +189 -0
- package/skills/motion-kit/reference/components.md +86 -0
- package/skills/motion-kit/reference/design.md +92 -0
- package/skills/motion-kit/reference/recipes.md +172 -0
- package/src/auto/auto-init.ts +151 -0
- package/src/auto/index.ts +3 -0
- package/src/auto/parse-options.ts +68 -0
- package/src/components/chat/README.md +90 -0
- package/src/components/chat/chat.css +236 -0
- package/src/components/chat/element.ts +98 -0
- package/src/components/chat/engine.ts +295 -0
- package/src/components/chat/react.tsx +196 -0
- package/src/components/chat-background/README.md +50 -0
- package/src/components/chat-background/audio.ts +56 -0
- package/src/components/chat-background/chat-background.css +86 -0
- package/src/components/chat-background/element.ts +31 -0
- package/src/components/chat-background/engine.ts +108 -0
- package/src/components/chat-background/react.tsx +36 -0
- package/src/components/cursor/README.md +53 -0
- package/src/components/cursor/cursor.css +177 -0
- package/src/components/cursor/element.ts +23 -0
- package/src/components/cursor/engine.ts +254 -0
- package/src/components/cursor/react.tsx +26 -0
- package/src/components/dialog/README.md +106 -0
- package/src/components/dialog/dialog.css +258 -0
- package/src/components/dialog/element.ts +118 -0
- package/src/components/dialog/engine.ts +432 -0
- package/src/components/dialog/react.tsx +200 -0
- package/src/components/icon.tsx +10 -0
- package/src/components/icons.ts +24 -0
- package/src/components/island/README.md +91 -0
- package/src/components/island/element.ts +45 -0
- package/src/components/island/engine.ts +200 -0
- package/src/components/island/island.css +300 -0
- package/src/components/island/react.tsx +115 -0
- package/src/components/menu/README.md +67 -0
- package/src/components/menu/element.ts +55 -0
- package/src/components/menu/engine.ts +142 -0
- package/src/components/menu/menu.css +104 -0
- package/src/components/menu/react.tsx +82 -0
- package/src/components/nav/README.md +85 -0
- package/src/components/nav/element.ts +39 -0
- package/src/components/nav/engine.ts +164 -0
- package/src/components/nav/nav.css +1053 -0
- package/src/components/nav/react.tsx +90 -0
- package/src/components/steps/README.md +70 -0
- package/src/components/steps/element.ts +43 -0
- package/src/components/steps/engine.ts +185 -0
- package/src/components/steps/react.tsx +91 -0
- package/src/components/steps/steps.css +49 -0
- package/src/components/theme-picker/README.md +57 -0
- package/src/components/theme-picker/element.ts +20 -0
- package/src/components/theme-picker/engine.ts +91 -0
- package/src/components/theme-picker/react.tsx +31 -0
- package/src/components/theme-picker/theme-picker.css +114 -0
- package/src/components/toast/README.md +60 -0
- package/src/components/toast/element.ts +25 -0
- package/src/components/toast/engine.ts +483 -0
- package/src/components/toast/react.tsx +22 -0
- package/src/components/toast/store.ts +122 -0
- package/src/components/toast/toast.css +114 -0
- package/src/core/channels.ts +165 -0
- package/src/core/curves.ts +35 -0
- package/src/core/frame.ts +12 -0
- package/src/core/gsap.ts +65 -0
- package/src/core/loop.ts +44 -0
- package/src/core/math.ts +9 -0
- package/src/core/physics-spring.ts +59 -0
- package/src/core/pointer.ts +63 -0
- package/src/core/reduced.ts +21 -0
- package/src/core/scope.ts +70 -0
- package/src/core/scroll-track.ts +106 -0
- package/src/core/split.ts +68 -0
- package/src/core/spring.ts +22 -0
- package/src/core/styles.ts +31 -0
- package/src/core/timing.ts +204 -0
- package/src/core/types.ts +20 -0
- package/src/core/visible.ts +19 -0
- package/src/css/base.css +142 -0
- package/src/css/controls/README.md +122 -0
- package/src/css/controls/burger.css +67 -0
- package/src/css/controls/button.css +226 -0
- package/src/css/controls/checkbox.css +53 -0
- package/src/css/controls/chip.css +85 -0
- package/src/css/controls/field.css +124 -0
- package/src/css/controls/glass.css +220 -0
- package/src/css/controls/icon.css +26 -0
- package/src/css/controls/segmented.css +60 -0
- package/src/css/controls/switch.css +72 -0
- package/src/css/default-theme.css +123 -0
- package/src/css/effects/README.md +134 -0
- package/src/css/effects/anim.css +224 -0
- package/src/css/effects/fade.css +15 -0
- package/src/css/effects/float.css +64 -0
- package/src/css/effects/frost.css +62 -0
- package/src/css/effects/grain.css +58 -0
- package/src/css/effects/loading.css +60 -0
- package/src/css/effects/success.css +22 -0
- package/src/css/effects/text.css +67 -0
- package/src/css/fonts.css +3 -0
- package/src/css/states.css +51 -0
- package/src/css/themes/black-green.css +126 -0
- package/src/css/themes/black.css +126 -0
- package/src/css/themes/blue.css +126 -0
- package/src/css/themes/brown.css +126 -0
- package/src/css/themes/cold-blue.css +126 -0
- package/src/css/themes/funny.css +126 -0
- package/src/css/themes/gray.css +126 -0
- package/src/css/themes/green.css +126 -0
- package/src/css/themes/modern-1.css +126 -0
- package/src/css/themes/neogreen.css +126 -0
- package/src/css/themes/new.css +126 -0
- package/src/css/themes/new2.css +126 -0
- package/src/css/themes/oled.css +126 -0
- package/src/css/themes/orange.css +126 -0
- package/src/css/themes/pastel-pink.css +126 -0
- package/src/css/themes/pink.css +126 -0
- package/src/css/themes/purple.css +126 -0
- package/src/css/themes/red.css +126 -0
- package/src/css/themes/super-blue.css +126 -0
- package/src/css/tokens.css +182 -0
- package/src/elements/base.ts +76 -0
- package/src/elements/index.ts +48 -0
- package/src/gl/index.ts +15 -0
- package/src/gl/liquid-blend/README.md +23 -0
- package/src/gl/liquid-blend/create-liquid-blend.ts +7 -0
- package/src/gl/liquid-blend/shader.ts +9 -0
- package/src/gl/matcap/README.md +23 -0
- package/src/gl/matcap/create-matcap.ts +7 -0
- package/src/gl/matcap/shader.ts +16 -0
- package/src/gl/particle-hero/README.md +41 -0
- package/src/gl/particle-hero/create-particle-hero.ts +544 -0
- package/src/gl/particle-hero/particle-hero.css +19 -0
- package/src/gl/particle-hero/shaders.ts +84 -0
- package/src/gl/shader-blur/README.md +23 -0
- package/src/gl/shader-blur/create-shader-blur.ts +7 -0
- package/src/gl/shader-blur/shader.ts +11 -0
- package/src/gl/shader-grain/README.md +23 -0
- package/src/gl/shader-grain/create-shader-grain.ts +7 -0
- package/src/gl/shader-grain/shader.ts +6 -0
- package/src/gl/shared/create-shader-effect.ts +186 -0
- package/src/gl/shared/shader.css +3 -0
- package/src/gl/shared/shaders.ts +30 -0
- package/src/index.ts +177 -0
- package/src/motion/anchor.ts +45 -0
- package/src/motion/chat.ts +97 -0
- package/src/motion/confetti.ts +130 -0
- package/src/motion/count.ts +95 -0
- package/src/motion/details.ts +70 -0
- package/src/motion/drag-dismiss.ts +231 -0
- package/src/motion/effects.ts +81 -0
- package/src/motion/entrances.ts +27 -0
- package/src/motion/floating.ts +389 -0
- package/src/motion/flow.ts +115 -0
- package/src/motion/indicator.ts +44 -0
- package/src/motion/layout.ts +39 -0
- package/src/motion/liquid.ts +227 -0
- package/src/motion/morph.ts +540 -0
- package/src/motion/reveal.ts +112 -0
- package/src/motion/sheet.ts +65 -0
- package/src/motion/surface.ts +108 -0
- package/src/react/animated-number.tsx +30 -0
- package/src/react/flip-group.tsx +44 -0
- package/src/react/frost.tsx +33 -0
- package/src/react/index.ts +80 -0
- package/src/react/slot-text.tsx +44 -0
- package/src/react/theme-provider.tsx +42 -0
- package/src/react/use-card-dock.ts +9 -0
- package/src/react/use-cascade.ts +9 -0
- package/src/react/use-contrast.ts +9 -0
- package/src/react/use-counter.ts +8 -0
- package/src/react/use-curved-carousel.ts +10 -0
- package/src/react/use-depth-grid.ts +9 -0
- package/src/react/use-details.ts +7 -0
- package/src/react/use-dock-pill.ts +10 -0
- package/src/react/use-drag-ruler.ts +10 -0
- package/src/react/use-fill-text.ts +9 -0
- package/src/react/use-fit-text.ts +8 -0
- package/src/react/use-flow.ts +8 -0
- package/src/react/use-frame-zoom.ts +9 -0
- package/src/react/use-infinite-reel.ts +8 -0
- package/src/react/use-letters.ts +9 -0
- package/src/react/use-liquid-blend.ts +8 -0
- package/src/react/use-marquee.ts +9 -0
- package/src/react/use-mask-text.ts +9 -0
- package/src/react/use-matcap.ts +8 -0
- package/src/react/use-parallax.ts +9 -0
- package/src/react/use-particle-hero.ts +9 -0
- package/src/react/use-pile.ts +8 -0
- package/src/react/use-pop.ts +8 -0
- package/src/react/use-radial-menu.ts +10 -0
- package/src/react/use-recipe.ts +38 -0
- package/src/react/use-reflow.ts +9 -0
- package/src/react/use-repel-bento.ts +8 -0
- package/src/react/use-reveal.ts +8 -0
- package/src/react/use-rotator.ts +10 -0
- package/src/react/use-shader-blur.ts +8 -0
- package/src/react/use-shader-grain.ts +8 -0
- package/src/react/use-slot-text.ts +17 -0
- package/src/react/use-snap-strip.ts +9 -0
- package/src/react/use-sortable.ts +14 -0
- package/src/react/use-spring-cards.ts +8 -0
- package/src/react/use-stretch-footer.ts +20 -0
- package/src/react/use-tabs.ts +10 -0
- package/src/react/use-text-roll.ts +9 -0
- package/src/react/use-ticket-menu.ts +15 -0
- package/src/react/use-words.ts +8 -0
- package/src/recipes/card-dock/README.md +36 -0
- package/src/recipes/card-dock/card-dock.css +178 -0
- package/src/recipes/card-dock/create-card-dock.ts +97 -0
- package/src/recipes/cascade/README.md +33 -0
- package/src/recipes/cascade/create-cascade.ts +111 -0
- package/src/recipes/contrast/README.md +29 -0
- package/src/recipes/contrast/create-contrast.ts +68 -0
- package/src/recipes/counter/README.md +42 -0
- package/src/recipes/counter/create-counter.ts +84 -0
- package/src/recipes/curved-carousel/README.md +50 -0
- package/src/recipes/curved-carousel/carousel-math.ts +20 -0
- package/src/recipes/curved-carousel/create-curved-carousel.ts +257 -0
- package/src/recipes/curved-carousel/curved-carousel.css +50 -0
- package/src/recipes/depth-grid/README.md +30 -0
- package/src/recipes/depth-grid/create-depth-grid.ts +120 -0
- package/src/recipes/details/README.md +31 -0
- package/src/recipes/details/create-details.ts +27 -0
- package/src/recipes/dock-pill/README.md +23 -0
- package/src/recipes/dock-pill/create-dock-pill.ts +68 -0
- package/src/recipes/dock-pill/dock-pill.css +5 -0
- package/src/recipes/drag-ruler/README.md +21 -0
- package/src/recipes/drag-ruler/create-drag-ruler.ts +95 -0
- package/src/recipes/drag-ruler/drag-ruler.css +16 -0
- package/src/recipes/fill-text/README.md +27 -0
- package/src/recipes/fill-text/create-fill-text.ts +93 -0
- package/src/recipes/fit-text/README.md +37 -0
- package/src/recipes/fit-text/create-fit-text.ts +55 -0
- package/src/recipes/fit-text/fit-text.css +6 -0
- package/src/recipes/flow/README.md +46 -0
- package/src/recipes/flow/create-flow.ts +55 -0
- package/src/recipes/frame-zoom/README.md +29 -0
- package/src/recipes/frame-zoom/create-frame-zoom.ts +91 -0
- package/src/recipes/infinite-reel/README.md +23 -0
- package/src/recipes/infinite-reel/create-infinite-reel.ts +140 -0
- package/src/recipes/infinite-reel/infinite-reel.css +8 -0
- package/src/recipes/letters/README.md +30 -0
- package/src/recipes/letters/create-letters.ts +113 -0
- package/src/recipes/marquee/README.md +32 -0
- package/src/recipes/marquee/create-marquee.ts +74 -0
- package/src/recipes/marquee/marquee.css +41 -0
- package/src/recipes/mask-text/README.md +39 -0
- package/src/recipes/mask-text/create-mask-text.ts +134 -0
- package/src/recipes/parallax/README.md +31 -0
- package/src/recipes/parallax/create-parallax.ts +74 -0
- package/src/recipes/pile/README.md +48 -0
- package/src/recipes/pile/create-pile.ts +50 -0
- package/src/recipes/pile/pile-math.ts +27 -0
- package/src/recipes/pile/pile.css +63 -0
- package/src/recipes/pill/README.md +30 -0
- package/src/recipes/pill/pill.css +48 -0
- package/src/recipes/pop/README.md +36 -0
- package/src/recipes/pop/create-pop.ts +52 -0
- package/src/recipes/radial-menu/README.md +44 -0
- package/src/recipes/radial-menu/create-radial-menu.ts +96 -0
- package/src/recipes/radial-menu/radial-menu.css +45 -0
- package/src/recipes/reflow/README.md +47 -0
- package/src/recipes/reflow/create-reflow.ts +49 -0
- package/src/recipes/repel-bento/README.md +21 -0
- package/src/recipes/repel-bento/create-repel-bento.ts +65 -0
- package/src/recipes/repel-bento/repel-bento.css +3 -0
- package/src/recipes/reveal/README.md +36 -0
- package/src/recipes/reveal/create-reveal.ts +48 -0
- package/src/recipes/rotator/README.md +21 -0
- package/src/recipes/rotator/create-rotator.ts +66 -0
- package/src/recipes/rotator/rotator.css +3 -0
- package/src/recipes/slot-text/README.md +44 -0
- package/src/recipes/slot-text/create-slot-text.ts +244 -0
- package/src/recipes/slot-text/slot-text.css +42 -0
- package/src/recipes/snap-strip/README.md +31 -0
- package/src/recipes/snap-strip/create-snap-strip.ts +133 -0
- package/src/recipes/snap-strip/snap-strip.css +23 -0
- package/src/recipes/sortable/README.md +88 -0
- package/src/recipes/sortable/create-sortable.ts +863 -0
- package/src/recipes/sortable/sortable.css +40 -0
- package/src/recipes/spring-cards/README.md +48 -0
- package/src/recipes/spring-cards/create-spring-cards.ts +140 -0
- package/src/recipes/spring-cards/spring-cards.css +23 -0
- package/src/recipes/stretch-footer/README.md +44 -0
- package/src/recipes/stretch-footer/create-stretch-footer.ts +69 -0
- package/src/recipes/stretch-footer/stretch-footer.css +28 -0
- package/src/recipes/tabs/README.md +39 -0
- package/src/recipes/tabs/create-tabs.ts +91 -0
- package/src/recipes/tabs/tabs.css +19 -0
- package/src/recipes/text-roll/README.md +35 -0
- package/src/recipes/text-roll/create-text-roll.ts +137 -0
- package/src/recipes/text-roll/text-roll.css +21 -0
- package/src/recipes/ticket-menu/README.md +24 -0
- package/src/recipes/ticket-menu/create-ticket-menu.ts +6 -0
- package/src/recipes/words/README.md +43 -0
- package/src/recipes/words/create-words.ts +114 -0
- package/src/theme/css-format.ts +32 -0
- package/src/theme/generate.ts +72 -0
- package/src/theme/index.ts +15 -0
- package/src/theme/presets.ts +79 -0
- package/src/theme/theme.ts +119 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
export { D as DialogInstance, a as DialogLabels, b as DialogOptions, c as DialogPlacement, d as DialogVariant, M as MenuInstance, e as MenuOptions, R as RevealHandle, f as RevealOptions, g as RevealSpeed, T as TIMING, h as createDialog, i as createMenu, r as revealFrom } from './reveal-WFUWDrei.js';
|
|
2
|
+
export { H as CardDockInstance, I as CardDockOptions, J as CascadeInstance, K as CascadeOptions, L as ContrastInstance, N as ContrastOptions, O as CounterInstance, P as CounterOptions, C as CurvedCarouselInstance, Q as CurvedCarouselOptions, R as DepthGridInstance, S as DepthGridOptions, U as DockPillInstance, V as DockPillOptions, W as DragRulerInstance, X as DragRulerOptions, Y as FillTextInstance, Z as FillTextOptions, _ as FitTextInstance, $ as FitTextOptions, a0 as FlowInOptions, a1 as FlowInstance, a2 as FlowOptions, a3 as FlowOutOptions, a4 as FrameZoomInstance, a5 as FrameZoomOptions, a6 as InfiniteReelInstance, a7 as InfiniteReelOptions, a8 as LettersInstance, a9 as LettersOptions, M as MK_HEAD_SCRIPT, aa as MarqueeInstance, ab as MarqueeOptions, ac as MaskTextInstance, ad as MaskTextOptions, ae as ParallaxInstance, af as ParallaxOptions, ag as PileInstance, ah as PileLayer, ai as PileOptions, aj as PopInstance, ak as PopOptions, al as RadialMenuInstance, am as RadialMenuOptions, an as ReflowInstance, ao as ReflowOptions, ap as ReorderDetail, aq as RepelBentoInstance, ar as RepelBentoOptions, as as RevealInstance, at as RevealRecipeOptions, au as RotatorInstance, av as RotatorOptions, aw as SlotTextInstance, ax as SlotTextOptions, ay as SnapStripInstance, az as SnapStripOptions, aA as SortableInstance, aB as SortableLabels, aC as SortableOptions, aD as SpringCardsInstance, aE as SpringCardsOptions, aF as StretchFooterInstance, aG as StretchFooterOptions, aH as TabsInstance, aI as TabsOptions, aJ as TextRollInstance, aK as TextRollOptions, A as TicketMenuInstance, T as TicketMenuOptions, aL as WordsInstance, aM as WordsOptions, x as createCardDock, p as createCascade, v as createContrast, j as createCounter, aN as createCurvedCarousel, t as createDepthGrid, G as createDockPill, F as createDragRuler, z as createFillText, f as createFitText, d as createFlow, u as createFrameZoom, B as createInfiniteReel, r as createLetters, w as createMarquee, o as createMaskText, s as createParallax, a as createPile, e as createPop, h as createRadialMenu, l as createReflow, D as createRepelBento, k as createReveal, E as createRotator, m as createSlotText, y as createSnapStrip, n as createSortable, c as createSpringCards, g as createStretchFooter, i as createTabs, q as createTextRoll, aO as createTicketMenu, b as createWords, aP as entrances, aQ as flowIn, aR as flowOut, aS as moveItem, aT as pileLayers, aU as pileStyle, aV as reduced, aW as stepChange } from './reduced-BM4Ls0g5.js';
|
|
3
|
+
export { A as ANIMATIONS, a as AnimateOptions, b as AnimationName, C as CapturedLayout, c as ConfettiHandle, d as ConfettiOptions, E as ExitName, L as LeaveOptions, e as animate, f as captureLayout, g as confetti, l as leave, r as reflowLayout } from './confetti-BSX1CLLV.js';
|
|
4
|
+
import { C as Cleanup, I as Instance } from './types-BkS_raL8.js';
|
|
5
|
+
export { C as ChatInstance, e as ChatLabels, f as ChatOptions, b as ChatRole, d as CursorInstance, g as CursorOptions, h as CursorVariant, I as IslandInstance, i as IslandOptions, j as NAV_STYLES, N as NavInstance, k as NavOptions, c as NavStyle, l as NavigateDetail, P as PENDING_ID, m as TOAST_LIMIT, T as ThemePickerInstance, n as ThemePickerOptions, o as ToastAction, p as ToastItem, q as ToastOptions, r as ToastTone, a as ToasterInstance, s as ToasterLabels, u as ToasterOptions, v as capturePending, w as chatMessage, x as clearToasts, y as createChat, z as createCursor, A as createIsland, B as createNav, D as createThemePicker, E as createToaster, F as dismissToast, G as getToasts, H as morphPendingToReply, J as removeToast, K as revealShell, L as subscribeToasts, t as toast, M as toastTimers } from './store-Bqy_obnD.js';
|
|
6
|
+
export { C as ChatBackgroundInstance, a as ChatBackgroundOptions, b as StepDetail, S as StepsInstance, c as StepsOptions, d as chatBackgroundOf, e as createChatBackground, f as createSteps } from './engine-CUr9QijM.js';
|
|
7
|
+
export { CustomEase } from 'gsap/CustomEase';
|
|
8
|
+
export { Flip } from 'gsap/Flip';
|
|
9
|
+
export { ScrollTrigger } from 'gsap/ScrollTrigger';
|
|
10
|
+
export { SplitText } from 'gsap/SplitText';
|
|
11
|
+
export { gsap } from 'gsap';
|
|
12
|
+
|
|
13
|
+
/** Spencer's elastic overshoot; close to the `--mk-ease-elastic` CSS curve. */
|
|
14
|
+
declare const ELASTIC = "elastic.out(1, 0.45)";
|
|
15
|
+
/** Custom eases registered by `registerMotion()` (Stepbro curves). Use the names as GSAP `ease` values. */
|
|
16
|
+
declare const EASE: {
|
|
17
|
+
readonly signature: "mk-signature";
|
|
18
|
+
readonly flow: "mk-flow";
|
|
19
|
+
/** A closing surface's fade (`.56,.27,0,1`). Kept from v0.1; same curve as `fadeAway`. */
|
|
20
|
+
readonly close: "mk-close";
|
|
21
|
+
readonly fadeAway: "mk-fade-away";
|
|
22
|
+
/** A closing surface's blur (`.37,.35,0,1`). */
|
|
23
|
+
readonly blurAway: "mk-blur-away";
|
|
24
|
+
readonly chatScroll: "mk-chat-scroll";
|
|
25
|
+
/** Items travelling to a new place in a list (spring ratio .52). */
|
|
26
|
+
readonly layoutReflow: "mk-layout-reflow";
|
|
27
|
+
/** A dragged item landing in its slot (spring ratio .62). */
|
|
28
|
+
readonly sortableLand: "mk-sortable-land";
|
|
29
|
+
readonly slot: "mk-slot";
|
|
30
|
+
readonly slotResize: "mk-slot-resize";
|
|
31
|
+
readonly liquidSize: "mk-liquid-size";
|
|
32
|
+
readonly swatch: "mk-swatch";
|
|
33
|
+
readonly swatchLight: "mk-swatch-light";
|
|
34
|
+
readonly sheet: "mk-sheet";
|
|
35
|
+
readonly inOut: "mk-in-out";
|
|
36
|
+
};
|
|
37
|
+
/** Register plugins and eases once. Safe to call from every recipe and during SSR (no-op). */
|
|
38
|
+
declare function registerMotion(): void;
|
|
39
|
+
|
|
40
|
+
/** Stepbro's curve paths (CustomEase SVG syntax). */
|
|
41
|
+
declare const PATHS: {
|
|
42
|
+
/** The signature: a strong deceleration that is not a plain ease-out. */
|
|
43
|
+
readonly signature: "M0,0 C0.308,0.19 0.107,0.633 0.288,0.866 0.382,0.987 0.656,1 1,1";
|
|
44
|
+
/** Lists and steps entering (`flowSoft`, also `numberSoft`). */
|
|
45
|
+
readonly flow: "M0,0 C0.25,0.1 0.25,1 1,1";
|
|
46
|
+
/** A conversation scrolling to its newest message. */
|
|
47
|
+
readonly chatScroll: "M0,0 C0.308,0.19 0.318,0.567 0.5,0.8 0.593,0.921 0.656,1 1,1";
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* A damped spring sampled as an ease path (Stepbro's `FA`): `ratio` below 1
|
|
51
|
+
* overshoots and settles, `velocity` is the starting speed.
|
|
52
|
+
*/
|
|
53
|
+
declare function springPath(ratio: number, velocity?: number, steps?: number): string;
|
|
54
|
+
/**
|
|
55
|
+
* Stepbro's own linear() sampling of the signature curve (its backdrop tint),
|
|
56
|
+
* for CSS and the Web Animations API.
|
|
57
|
+
*/
|
|
58
|
+
declare const SIGNATURE_LINEAR = "linear(0 0%, .017 2.5%, .037 5%, .061 7.5%, .091 10%, .13 12.5%, .184 15%, .275 17.5%, .562 20%, .733 22.5%, .803 25%, .848 27.5%, .88 30%, .902 32.5%, .942 40%, .97 50%, .985 60%, .993 70%, .998 80%, 1 90%, 1 100%)";
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Stepbro's per-property motion channels (ported from Kayro's spring-channels):
|
|
62
|
+
* each value moves toward its target either on a spring (stiffness, damping, an
|
|
63
|
+
* initial kick) or on an eased duration, all stepped on GSAP's ticker. Used by
|
|
64
|
+
* surfaces that grow out of a control (liquid dialog, toasts) and floating windows.
|
|
65
|
+
*/
|
|
66
|
+
type Channel = {
|
|
67
|
+
type: 'spring';
|
|
68
|
+
stiffness: number;
|
|
69
|
+
damping: number;
|
|
70
|
+
mass?: number;
|
|
71
|
+
velocity?: number;
|
|
72
|
+
direction?: number;
|
|
73
|
+
} | {
|
|
74
|
+
type: 'ease';
|
|
75
|
+
duration: number;
|
|
76
|
+
ease: (progress: number) => number;
|
|
77
|
+
};
|
|
78
|
+
interface ChannelState {
|
|
79
|
+
current: number;
|
|
80
|
+
origin: number;
|
|
81
|
+
target: number;
|
|
82
|
+
velocity: number;
|
|
83
|
+
elapsed: number;
|
|
84
|
+
active: boolean;
|
|
85
|
+
config: Channel | null;
|
|
86
|
+
}
|
|
87
|
+
declare const easeOut: (t: number) => number;
|
|
88
|
+
declare const easeOutCubic: (t: number) => number;
|
|
89
|
+
declare const easeInCubic: (t: number) => number;
|
|
90
|
+
/** A cubic-bezier as a function of progress (Stepbro's `cr.bezier`). */
|
|
91
|
+
declare function bezier(x1: number, y1: number, x2: number, y2: number): (progress: number) => number;
|
|
92
|
+
declare const spring: (stiffness: number, damping: number, extra?: {
|
|
93
|
+
mass?: number;
|
|
94
|
+
velocity?: number;
|
|
95
|
+
direction?: number;
|
|
96
|
+
}) => Channel;
|
|
97
|
+
declare const eased: (duration: number, ease: (progress: number) => number) => Channel;
|
|
98
|
+
declare const createChannelState: (value: number) => ChannelState;
|
|
99
|
+
/** Advance one channel by `seconds`. Pure: exported for tests and custom loops. */
|
|
100
|
+
declare function stepChannel(channel: ChannelState, seconds: number): void;
|
|
101
|
+
/** Animate named values toward targets, each on its own channel, calling `onChange` per frame. */
|
|
102
|
+
declare function channels<K extends string>(start: Record<K, number>, onChange: (name: K, value: number) => void): {
|
|
103
|
+
state: Record<K, ChannelState>;
|
|
104
|
+
/** Start moving; resolves when every channel has settled (or `stop()` is called). */
|
|
105
|
+
animate(targets: Partial<Record<K, number>>, configs: Partial<Record<K, Channel>>): Promise<void>;
|
|
106
|
+
stop(): void;
|
|
107
|
+
};
|
|
108
|
+
/** A damped spring as an ease function of progress (Stepbro's `Vw`). */
|
|
109
|
+
declare function springEase(ratio: number, velocity?: number): (progress: number) => number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Split text for animation and put it back afterwards. Words become inline-block
|
|
113
|
+
* spans (so they can move); spaces stay plain text so lines still wrap. Elements
|
|
114
|
+
* matched by `exclude` (tables, code) are left whole.
|
|
115
|
+
*/
|
|
116
|
+
interface Split {
|
|
117
|
+
parts: HTMLElement[];
|
|
118
|
+
revert(): void;
|
|
119
|
+
}
|
|
120
|
+
interface SplitWordsOptions {
|
|
121
|
+
exclude?: string[];
|
|
122
|
+
className?: string;
|
|
123
|
+
}
|
|
124
|
+
declare function splitWords(el: HTMLElement, { exclude, className }?: SplitWordsOptions): Split;
|
|
125
|
+
/** User-perceived characters (emoji with modifiers stay whole), at most `limit`. */
|
|
126
|
+
declare function splitGraphemes(text: string, limit?: number): string[];
|
|
127
|
+
|
|
128
|
+
/** requestAnimationFrame with a timer fallback (tests, old WebViews). Returns a cancel function. */
|
|
129
|
+
declare function requestFrame(fn: (time: number) => void): () => void;
|
|
130
|
+
/** Resolves on the next frame, after the framework has painted a DOM change. */
|
|
131
|
+
declare const nextFrame: () => Promise<void>;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Remove inline properties GSAP wrote, without asking GSAP. `gsap.set(el,
|
|
135
|
+
* { clearProps: 'transform' })` measures the element first, and an element
|
|
136
|
+
* that is not rendered (a closed <dialog>, display: none) is moved to the end of
|
|
137
|
+
* the document and back to be measured — which reorders text around it and
|
|
138
|
+
* disconnects custom elements inside. This only edits the style attribute and
|
|
139
|
+
* drops GSAP's cache so the next tween starts from scratch.
|
|
140
|
+
*/
|
|
141
|
+
declare function clearStyles(targets: Iterable<Element>, properties: string[]): void;
|
|
142
|
+
/** What the surface morphs write. */
|
|
143
|
+
declare const MORPH_STYLES: string[];
|
|
144
|
+
|
|
145
|
+
interface MotionSpring {
|
|
146
|
+
/** Progress 0…1 over `duration` → position (overshoots when bouncy). */
|
|
147
|
+
ease: (progress: number) => number;
|
|
148
|
+
/** Seconds until it stays within 0.1 % of the target. */
|
|
149
|
+
duration: number;
|
|
150
|
+
}
|
|
151
|
+
declare function motionSpring(stiffness: number, damping: number, mass?: number): MotionSpring;
|
|
152
|
+
/** Seconds a Motion spring takes to settle. */
|
|
153
|
+
declare const springDuration: (stiffness: number, damping: number, mass?: number) => number;
|
|
154
|
+
/** The spring as a CSS linear() easing (pair it with springDuration). */
|
|
155
|
+
declare function springLinear(stiffness: number, damping: number, mass?: number, points?: number): string;
|
|
156
|
+
|
|
157
|
+
interface ScrollTrackOptions {
|
|
158
|
+
/** "<top|center|bottom|n%> <top|center|bottom|n%>" — default "top bottom" (the element enters). */
|
|
159
|
+
start?: string;
|
|
160
|
+
/** Default "bottom top" (the element has left). */
|
|
161
|
+
end?: string;
|
|
162
|
+
/** Share of the distance covered each 60 fps frame (default 1: follow the page exactly). */
|
|
163
|
+
lerp?: number;
|
|
164
|
+
onUpdate?: (value: number) => void;
|
|
165
|
+
}
|
|
166
|
+
interface ScrollTrack {
|
|
167
|
+
readonly value: number;
|
|
168
|
+
readonly target: number;
|
|
169
|
+
/** Raw progress now, from the element's box. */
|
|
170
|
+
measure(): number;
|
|
171
|
+
/** Measure and ease one frame (dt = 1 at 60 Hz). */
|
|
172
|
+
update(dt?: number): void;
|
|
173
|
+
/** Jump to a value (manual control). */
|
|
174
|
+
set(value: number): void;
|
|
175
|
+
destroy(): void;
|
|
176
|
+
}
|
|
177
|
+
declare function trackScroll(el: Element, { start, end, lerp, onUpdate }?: ScrollTrackOptions): ScrollTrack;
|
|
178
|
+
|
|
179
|
+
/** Navigation menu options: grow from 90 % out of 4 px blur, last first, after 0.1 s. */
|
|
180
|
+
declare const flowInMenu: (targets: gsap.TweenTarget) => gsap.core.Tween | null;
|
|
181
|
+
/** Theme picker swatches: pop in from half size, 10 ms apart. */
|
|
182
|
+
declare const flowInPalette: (targets: gsap.TweenTarget) => gsap.core.Tween | null;
|
|
183
|
+
/** Form cards (`[data-flow-item]`): grow from 90 % out of 8 px blur. */
|
|
184
|
+
declare const flowInForm: (targets: gsap.TweenTarget) => gsap.core.Tween | null;
|
|
185
|
+
/** Landing pieces: grow from 85 % out of 24 px blur, after 0.15 s. */
|
|
186
|
+
declare const flowInLanding: (targets: gsap.TweenTarget) => gsap.core.Tween | null;
|
|
187
|
+
/** Long-form content (`[data-flow]`, markdown blocks): style 2, 0.6 s, 60 ms apart. */
|
|
188
|
+
declare const flowInContent: (root: Element) => gsap.core.Tween | null;
|
|
189
|
+
|
|
190
|
+
declare function toggleDetails(details: HTMLDetailsElement, open: boolean, { duration }?: {
|
|
191
|
+
duration?: number;
|
|
192
|
+
}): gsap.core.Timeline | null;
|
|
193
|
+
/**
|
|
194
|
+
* Animate every disclosure under `root` with one listener. Controls inside a
|
|
195
|
+
* summary keep their clicks; `data-mk-motion="none"` opts a disclosure out.
|
|
196
|
+
* Returns the function that removes the listener.
|
|
197
|
+
*/
|
|
198
|
+
declare function installDetailsMotion(root?: Document | HTMLElement): () => void;
|
|
199
|
+
|
|
200
|
+
interface IndicatorOptions {
|
|
201
|
+
immediate?: boolean;
|
|
202
|
+
duration?: number;
|
|
203
|
+
/** Scroll container to centre the target in (when it overflows). */
|
|
204
|
+
scroller?: HTMLElement | null;
|
|
205
|
+
orientation?: 'horizontal' | 'vertical';
|
|
206
|
+
}
|
|
207
|
+
declare function slideIndicator(indicator: HTMLElement, target: HTMLElement | null, options?: IndicatorOptions): gsap.core.Tween | null;
|
|
208
|
+
|
|
209
|
+
type NumberFormat = (value: number) => string;
|
|
210
|
+
interface CountOptions {
|
|
211
|
+
/** Start value. Default: the last value counted on this element, else the number in its text. */
|
|
212
|
+
from?: number;
|
|
213
|
+
duration?: number;
|
|
214
|
+
format?: NumberFormat;
|
|
215
|
+
}
|
|
216
|
+
/** Tween a plain number (no DOM): `onUpdate` gets each value. Reduced motion jumps to `to`. */
|
|
217
|
+
declare function tweenNumber(from: number, to: number, onUpdate: (value: number) => void, { duration }?: {
|
|
218
|
+
duration?: number;
|
|
219
|
+
}): gsap.core.Tween | null;
|
|
220
|
+
declare function countTo(el: HTMLElement, to: number, { from, duration, format }?: CountOptions): gsap.core.Tween | null;
|
|
221
|
+
/** Count with requestAnimationFrame and ease-out cubic. Returns a cancel function. */
|
|
222
|
+
declare function revealCounter(el: HTMLElement, to: number, { from, duration, format }?: CountOptions): () => void;
|
|
223
|
+
|
|
224
|
+
interface EnterMessagesOptions {
|
|
225
|
+
/** Text inside each bubble whose words rise. */
|
|
226
|
+
textSelector?: string;
|
|
227
|
+
}
|
|
228
|
+
declare function enterMessages(bubbles: HTMLElement[], { textSelector }?: EnterMessagesOptions): gsap.core.Timeline | null;
|
|
229
|
+
/** A message box grows or shrinks to its text (0.18 s, power2.out), from `min` px. */
|
|
230
|
+
declare function fitComposer(field: HTMLTextAreaElement, min?: number): gsap.core.Tween | null;
|
|
231
|
+
/** Scroll a conversation to its newest message (0.35 s, Stepbro's chat scroll curve). */
|
|
232
|
+
declare function scrollToLatest(scroller: HTMLElement): gsap.core.Tween | null;
|
|
233
|
+
|
|
234
|
+
/** Called every frame with dt = 1 at 60 Hz. */
|
|
235
|
+
type Tick = (dt: number) => void;
|
|
236
|
+
/** One shared ticker callback for every recipe (spencergabor.com's single rAF loop). */
|
|
237
|
+
declare function subscribe(fn: Tick): () => void;
|
|
238
|
+
/** Run `fn` every frame only while `el` is near the viewport. */
|
|
239
|
+
declare function whileVisible(el: Element, fn: Tick, rootMargin?: string): () => void;
|
|
240
|
+
|
|
241
|
+
interface Vec {
|
|
242
|
+
x: number;
|
|
243
|
+
y: number;
|
|
244
|
+
}
|
|
245
|
+
interface Spring {
|
|
246
|
+
current: Vec;
|
|
247
|
+
target: Vec;
|
|
248
|
+
velocity: Vec;
|
|
249
|
+
update(dt?: number): void;
|
|
250
|
+
}
|
|
251
|
+
/** Spencer Gabor's spring (stiffness .05, friction .8), normalised so dt = 1 is one 60 Hz frame. */
|
|
252
|
+
declare function createSpring(stiffness?: number, friction?: number): Spring;
|
|
253
|
+
|
|
254
|
+
declare const clamp: (v: number, min: number, max: number) => number;
|
|
255
|
+
declare const lerp: (a: number, b: number, t: number) => number;
|
|
256
|
+
/** Spencer's frame-rate independent smoothing: lerp by 1 - e^(-lambda·dt). */
|
|
257
|
+
declare const damp: (a: number, b: number, lambda: number, dt: number) => number;
|
|
258
|
+
declare const wrap: (v: number, length: number) => number;
|
|
259
|
+
declare function mapRange(v: number, inMin: number, inMax: number, outMin: number, outMax: number, clamped?: boolean): number;
|
|
260
|
+
|
|
261
|
+
/** Live pointer position (viewport px) plus movement accumulated since the last frame. */
|
|
262
|
+
declare const pointer: {
|
|
263
|
+
x: number;
|
|
264
|
+
y: number;
|
|
265
|
+
active: boolean;
|
|
266
|
+
};
|
|
267
|
+
/** Start tracking (reference-counted). Call the returned function when the recipe is destroyed. */
|
|
268
|
+
declare function bindPointer(): () => void;
|
|
269
|
+
/**
|
|
270
|
+
* Pointer movement since the previous animation frame. Every caller in the same
|
|
271
|
+
* frame gets the same value (two recipes on a page both feel the pointer); the
|
|
272
|
+
* next frame starts again from what moved since.
|
|
273
|
+
*/
|
|
274
|
+
declare function takeMovement(): {
|
|
275
|
+
mx: number;
|
|
276
|
+
my: number;
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
interface Scope {
|
|
280
|
+
/** Register any cleanup; returns it for convenience. */
|
|
281
|
+
add(fn: Cleanup): Cleanup;
|
|
282
|
+
/** addEventListener that is removed on dispose. */
|
|
283
|
+
on<K extends keyof HTMLElementEventMap>(target: EventTarget, type: K | (string & {}), listener: (event: HTMLElementEventMap[K]) => void, options?: AddEventListenerOptions | boolean): void;
|
|
284
|
+
/** Disconnects the observer on dispose and returns it. */
|
|
285
|
+
observe<O extends {
|
|
286
|
+
disconnect(): void;
|
|
287
|
+
}>(observer: O): O;
|
|
288
|
+
/** setTimeout that is cleared on dispose. */
|
|
289
|
+
timeout(fn: () => void, ms: number): void;
|
|
290
|
+
/** Set (or remove, with null) an attribute; dispose puts the original value back. */
|
|
291
|
+
attr(el: Element, name: string, value: string | null): void;
|
|
292
|
+
/** Run every cleanup once, newest first. */
|
|
293
|
+
dispose(): void;
|
|
294
|
+
readonly disposed: boolean;
|
|
295
|
+
}
|
|
296
|
+
/** Collects the side effects of one recipe instance so `destroy()` can undo all of them. */
|
|
297
|
+
declare function createScope(): Scope;
|
|
298
|
+
|
|
299
|
+
type DetailsInstance = Instance;
|
|
300
|
+
declare function createDetails(root: HTMLElement | null): DetailsInstance;
|
|
301
|
+
|
|
302
|
+
/** A computed colour with no alpha: `transparent`, `rgba(…, 0)` or `color(… / 0)`. */
|
|
303
|
+
declare const transparentColor: (color: string) => boolean;
|
|
304
|
+
type DialogLike = HTMLElement & Partial<Pick<HTMLDialogElement, 'showModal' | 'show' | 'close'>>;
|
|
305
|
+
/** Open a <dialog> modally (or not). Falls back to the `open` attribute. */
|
|
306
|
+
declare function openModal(dialog: DialogLike, modal?: boolean): void;
|
|
307
|
+
declare function closeModal(dialog: DialogLike): void;
|
|
308
|
+
/**
|
|
309
|
+
* Fade a modal <dialog>'s ::backdrop in (Stepbro's tint: 0.5 s on the signature
|
|
310
|
+
* curve) or out (linear). Resolves at once without the Web Animations API.
|
|
311
|
+
*/
|
|
312
|
+
declare function fadeBackdrop(dialog: HTMLElement, direction: 'in' | 'out'): Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* An inert visual copy of `surface`, fixed over the place it occupies now and not
|
|
315
|
+
* yet in the document (null when it has no size). A picture, not a second form:
|
|
316
|
+
* no ids, labels, names or roles to collide with the page.
|
|
317
|
+
*/
|
|
318
|
+
/** A fixed copy of a modal's backdrop (tint and blur), for a closing ghost to fade with. Not appended. */
|
|
319
|
+
declare function backdropVeil(surface: HTMLElement): HTMLElement;
|
|
320
|
+
declare function ghostOf(surface: HTMLElement): HTMLElement | null;
|
|
321
|
+
|
|
322
|
+
/** Whether a surface is opening or closing right now. */
|
|
323
|
+
declare const isMorphing: (surface: HTMLElement) => boolean;
|
|
324
|
+
/** Stop a surface's morph now and put the surface and its content back to rest. */
|
|
325
|
+
declare function stopMorph(surface: HTMLElement): void;
|
|
326
|
+
/** Show a hidden opener again; with `fade` it comes back while its surface closes (0.3 s after 0.2 s). */
|
|
327
|
+
declare function showOrigin(origin: HTMLElement | null | undefined, { fade }?: {
|
|
328
|
+
fade?: boolean;
|
|
329
|
+
}): void;
|
|
330
|
+
/** Show the opener's shared pieces again (a surface closed without its animation). */
|
|
331
|
+
declare function releaseShared(origin: HTMLElement | null | undefined): void;
|
|
332
|
+
/** The opener's pieces travel into the surface; they stay hidden at home until it closes. */
|
|
333
|
+
declare function shareInto(origin: HTMLElement, surface: HTMLElement, duration?: number): void;
|
|
334
|
+
/** The surface's pieces travel back home and show there again. */
|
|
335
|
+
declare function shareBack(surface: HTMLElement, origin: HTMLElement, duration?: number): void;
|
|
336
|
+
interface MorphOpenOptions {
|
|
337
|
+
duration?: number;
|
|
338
|
+
/** Keep a compact opener hidden while the surface is open; call showOrigin when it closes. */
|
|
339
|
+
hideOrigin?: boolean;
|
|
340
|
+
/** What enters inside the surface (selector); by default its children. */
|
|
341
|
+
content?: string;
|
|
342
|
+
/** Delay between content parts: an option list cascades instead of growing as one. */
|
|
343
|
+
stagger?: number;
|
|
344
|
+
liquid?: boolean;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Open `surface` out of `origin`. Returns the timeline (null when reduced).
|
|
348
|
+
* Shape travels from the opener (0.7 s, signature) and takes the surface's
|
|
349
|
+
* colour over the first 0.3 s; the content grows from the opener's box out of
|
|
350
|
+
* an 8 px blur on the same curve. Without an opener on screen: scale .92 → 1, 0.35 s.
|
|
351
|
+
*/
|
|
352
|
+
declare function morphOpen(surface: HTMLElement, origin: HTMLElement | null, options?: MorphOpenOptions): gsap.core.Timeline | null;
|
|
353
|
+
interface MorphCloseOptions {
|
|
354
|
+
duration?: number;
|
|
355
|
+
content?: string;
|
|
356
|
+
liquid?: boolean;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Fold `surface` back into `origin`, then call `onComplete` (which hides it).
|
|
360
|
+
* Without an opener on screen it closes in place: 90 % scale, 32 px blur.
|
|
361
|
+
*/
|
|
362
|
+
declare function morphClose(surface: HTMLElement, origin: HTMLElement | null, onComplete: () => void, options?: MorphCloseOptions): gsap.core.Timeline | null;
|
|
363
|
+
/**
|
|
364
|
+
* Close a modal at once (focus returns, the page takes input) while an inert
|
|
365
|
+
* copy folds back into the opener over a fading veil. `inPlace` (after a drag)
|
|
366
|
+
* closes it where it was dropped instead of folding into the opener.
|
|
367
|
+
*/
|
|
368
|
+
declare function morphCloseWithGhost(surface: HTMLElement, origin: HTMLElement | null, { inPlace, liquid }?: {
|
|
369
|
+
inPlace?: boolean;
|
|
370
|
+
liquid?: boolean;
|
|
371
|
+
}): void;
|
|
372
|
+
|
|
373
|
+
/** Open `surface` out of `origin` the liquid way. Returns a function that stops it and settles the surface. */
|
|
374
|
+
declare function liquidOpen(surface: HTMLElement, origin: HTMLElement, parts: HTMLElement[]): () => void;
|
|
375
|
+
/** Close `surface` back into `origin` the liquid way, then call `onComplete`. */
|
|
376
|
+
declare function liquidClose(surface: HTMLElement, origin: HTMLElement, parts: HTMLElement[], onComplete: () => void): void;
|
|
377
|
+
|
|
378
|
+
declare function sheetOpen(surface: HTMLElement): gsap.core.Tween | null;
|
|
379
|
+
/** Drop a copy of the (still open) sheet off the bottom of the screen. */
|
|
380
|
+
declare function sheetClose(surface: HTMLElement, { inPlace }?: {
|
|
381
|
+
inPlace?: boolean;
|
|
382
|
+
}): gsap.core.Tween | null;
|
|
383
|
+
declare function pushUnderlay(elements: HTMLElement[]): void;
|
|
384
|
+
declare function releaseUnderlay(elements: HTMLElement[], animated?: boolean): void;
|
|
385
|
+
|
|
386
|
+
interface DragDismissOptions {
|
|
387
|
+
/** Whether a gesture may start now (not while opening, saving or floating). */
|
|
388
|
+
canDrag?: () => boolean;
|
|
389
|
+
onDismiss: () => void;
|
|
390
|
+
}
|
|
391
|
+
/** Let `surface` be dragged away. Returns the function that detaches it. */
|
|
392
|
+
declare function attachDragDismiss(surface: HTMLElement, { canDrag, onDismiss }: DragDismissOptions): () => void;
|
|
393
|
+
|
|
394
|
+
declare const floatingAvailable: () => boolean;
|
|
395
|
+
interface Rect {
|
|
396
|
+
top: number;
|
|
397
|
+
left: number;
|
|
398
|
+
width: number;
|
|
399
|
+
height: number;
|
|
400
|
+
}
|
|
401
|
+
/** A window kept inside the viewport, at least 320 × 240. */
|
|
402
|
+
declare function clampRect(rect: Rect, viewport?: {
|
|
403
|
+
width: number;
|
|
404
|
+
height: number;
|
|
405
|
+
}): Rect;
|
|
406
|
+
/** Where a floating window was left, if this device remembers it. */
|
|
407
|
+
declare function savedFloat(key: string): Rect | null;
|
|
408
|
+
declare function forgetFloat(key: string): void;
|
|
409
|
+
/** Lift a surface into a window at `rect` (its shadow eases in, 0.45 s). */
|
|
410
|
+
declare function liftWindow(surface: HTMLElement, rect: Rect): void;
|
|
411
|
+
/** Put a floating surface back in its place, travelling from where it floated. */
|
|
412
|
+
declare function dockWindow(surface: HTMLElement, from: Rect): void;
|
|
413
|
+
interface FloatingOptions {
|
|
414
|
+
key: string;
|
|
415
|
+
handle: HTMLElement;
|
|
416
|
+
corners?: HTMLElement[];
|
|
417
|
+
isFloating: () => boolean;
|
|
418
|
+
float: () => void;
|
|
419
|
+
dock: () => void;
|
|
420
|
+
}
|
|
421
|
+
/** Move a floating surface by its handle and resize it from its corners. Returns the detach function. */
|
|
422
|
+
declare function attachFloating(surface: HTMLElement, { key, handle, corners, isFloating, float, dock }: FloatingOptions): () => void;
|
|
423
|
+
|
|
424
|
+
interface Viewport {
|
|
425
|
+
width: number;
|
|
426
|
+
height: number;
|
|
427
|
+
}
|
|
428
|
+
declare function anchorSurface(surface: HTMLElement, origin: DOMRect | null | undefined, viewport?: Viewport): void;
|
|
429
|
+
/** Remove the inline place anchorSurface wrote. */
|
|
430
|
+
declare function clearAnchor(surface: HTMLElement): void;
|
|
431
|
+
|
|
432
|
+
interface AudioEnergy {
|
|
433
|
+
stop(): void;
|
|
434
|
+
}
|
|
435
|
+
declare function audioEnergy(stream: MediaStream, onEnergy: (energy: number) => void, { fftSize, smoothing }?: {
|
|
436
|
+
fftSize?: number;
|
|
437
|
+
smoothing?: number;
|
|
438
|
+
}): AudioEnergy;
|
|
439
|
+
|
|
440
|
+
export { type AudioEnergy, type Channel, type ChannelState, Cleanup, type CountOptions, type DetailsInstance, type DragDismissOptions, EASE, ELASTIC, type EnterMessagesOptions, type FloatingOptions, type IndicatorOptions, Instance, MORPH_STYLES, type MorphCloseOptions, type MorphOpenOptions, type MotionSpring, type NumberFormat, PATHS, type Rect, SIGNATURE_LINEAR, type Scope, type ScrollTrack, type ScrollTrackOptions, type Split, type SplitWordsOptions, type Spring, type Tick, type Vec, type Viewport, anchorSurface, attachDragDismiss, attachFloating, audioEnergy, backdropVeil, bezier, bindPointer, channels, clamp, clampRect, clearAnchor, clearStyles, closeModal, countTo, createChannelState, createDetails, createScope, createSpring, damp, dockWindow, easeInCubic, easeOut, easeOutCubic, eased, enterMessages, fadeBackdrop, fitComposer, floatingAvailable, flowInContent, flowInForm, flowInLanding, flowInMenu, flowInPalette, forgetFloat, ghostOf, installDetailsMotion, isMorphing, lerp, liftWindow, liquidClose, liquidOpen, mapRange, morphClose, morphCloseWithGhost, morphOpen, motionSpring, nextFrame, openModal, pointer, pushUnderlay, registerMotion, releaseShared, releaseUnderlay, requestFrame, revealCounter, savedFloat, scrollToLatest, shareBack, shareInto, sheetClose, sheetOpen, showOrigin, slideIndicator, splitGraphemes, splitWords, spring, springDuration, springEase, springLinear, springPath, stepChannel, stopMorph, subscribe, takeMovement, toggleDetails, trackScroll, transparentColor, tweenNumber, whileVisible, wrap };
|