@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/timing.ts","../src/core/loop.ts","../src/core/reduced.ts","../src/core/scope.ts"],"sourcesContent":["/**\n * Every Stepbro duration in one place (seconds, like GSAP, unless the name says\n * ms). Recipes and components take their defaults from here, so a timing is\n * changed once. Sources: Stepbro replication kit, tasks/especificacion-replicacion.json\n * and money/replication-catalog.json.\n */\nexport const TIMING = Object.freeze({\n flow: 0.5,\n flowStagger: 0.05,\n stepChange: 0.5,\n reveal: Object.freeze({\n fast: [0.5, 0.25],\n normal: [0.7, 0.35],\n slow: [1.05, 0.5],\n slower: [1.6, 0.75],\n } as const),\n details: 0.32,\n chevron: 0.25,\n indicator: 0.45,\n number: 0.6,\n numberPricing: 0.7,\n revealCounter: 0.9,\n layoutTravel: 0.62,\n /** New items in a reflow enter in this share of the travel time. */\n layoutEnterFactor: 0.6,\n menu: Object.freeze({ duration: 0.35, stagger: 0.04, delay: 0.1 }),\n palette: Object.freeze({ duration: 0.1, stagger: 0.01 }),\n form: Object.freeze({ duration: 0.35, stagger: 0.04 }),\n landing: Object.freeze({ duration: 0.4, stagger: 0.05, delay: 0.15 }),\n content: Object.freeze({ duration: 0.6, stagger: 0.06 }),\n bubble: 0.7,\n bubbleStagger: 0.06,\n word: 0.25,\n wordStagger: 0.05,\n chatScroll: 0.35,\n composer: 0.18,\n slot: Object.freeze({ durationMs: 300, staggerMs: 45, exitOffsetMs: 50, colorFadeMs: 280, maxTilt: 5, minResizeMs: 140 }),\n swatch: 0.5,\n swatchLight: 3.5,\n swatchBackground: 4.5,\n /** ModalHost (modal-origin, modal-close-origin, modal-fallback, modal-auto-resize). */\n dialog: Object.freeze({\n /** The surface travels from its opener. */\n open: 0.7,\n /** The opener's colour hands over to the surface's. */\n surfaceColor: 0.3,\n /** Back into the opener. */\n close: 0.5,\n /** While closing, the content heads for the opener on a 2 s path cut at `close`. */\n contentReturn: 2,\n originHide: 0.08,\n originShow: 0.3,\n originShowDelay: 0.2,\n /** No opener on screen: scale .92 → 1. */\n fallback: 0.35,\n autoResize: 0.45,\n /** Backdrop tint on the signature curve. */\n backdrop: 0.5,\n /** Items of a list that opens from its control. */\n list: 0.25,\n }),\n /** modal-liquid (spring channels; springs are stiffness/damping, not times). */\n liquid: Object.freeze({\n size: 0.3,\n radius: 0.7,\n content: 0.3,\n color: 0.4,\n colorDelay: 0.15,\n ghost: 0.25,\n ghostDelay: 0.05,\n closeSize: 0.25,\n closeContent: 0.3,\n originRestore: 0.3,\n originRestoreDelay: 0.2,\n safetyMs: 1100,\n }),\n /** modal-drag: the spring back when a drag is not far enough. */\n drag: Object.freeze({ restore: 0.5, radiusRestore: 0.3 }),\n /** modal-float. */\n float: Object.freeze({ shadow: 0.45, glideDecay: 0.18, sizeSmoothing: 0.08 }),\n /** chat-loader-delay, chat-confirmation-bar. */\n chat: Object.freeze({ pendingDelayMs: 500, confirmWordStagger: 0.1 }),\n /** onboarding-busy-background, step-change, onboarding-reveal-counter. */\n onboarding: Object.freeze({ busy: 0.8, idle: 0.6, step: 0.5, counter: 0.9 }),\n /** task-drag: lift, land (FA .62), crossfade (66 % of the land), neighbours shifting (FA .52). */\n sortable: Object.freeze({ lift: 0.18, land: 0.42, landFade: 0.42 * 0.66, shift: 0.62 }),\n /** toast-deck, toast-morph, toast-character-reveal. */\n toast: Object.freeze({\n relayout: 0.6,\n expand: 0.55,\n expandStagger: 0.06,\n enter: 0.5,\n exit: 0.3,\n collapseDelayMs: 150,\n morphSize: 0.32,\n morphRadius: 0.7,\n morphContent: 0.32,\n morphColor: 0.4,\n morphColorDelay: 0.15,\n morphShadow: 0.6,\n morphShadowDelay: 0.05,\n safetyMs: 1100,\n chars: 0.4,\n charsDelay: 0.225,\n charsStagger: 0.02,\n }),\n /** Dousan's glass (CSS): surface/shadow transitions, ring and shine. */\n glass: Object.freeze({ hover: 0.4, ring: 0.5 }),\n /** Stepbro's utility animations (css/effects/anim.css), by name. */\n effects: Object.freeze({\n out: 0.5,\n 'out-left': 0.5,\n 'out-bottom': 0.5,\n collapse: 0.25,\n highlight: 1,\n shake: 0.5,\n 'shake-strong': 0.4,\n fade: 0.3,\n wipe: 0.7,\n 'progress-in': 1,\n }),\n /** Dousan's success confetti, per 60 fps frame. */\n confetti: Object.freeze({\n count: 45,\n speed: [2, 8] as const,\n lift: 2,\n radius: [3, 7] as const,\n decay: [0.015, 0.03] as const,\n gravity: 0.15,\n drag: 0.98,\n spin: 2.5,\n }),\n /** Dousan's project sheet. */\n sheet: Object.freeze({ open: 0.72, close: 0.72, underlayScale: 0.98, underlayOpacity: 0.4 }),\n /** Dousan's springs as Motion declares them: [stiffness, damping]. */\n springs: Object.freeze({\n press: [400, 10] as const,\n success: [260, 18] as const,\n underlay: [300, 30] as const,\n letters: [300, 10] as const,\n cursorFollow: [800, 35] as const,\n cursorAppear: [500, 30] as const,\n bentoEnter: [60, 15] as const,\n bentoRepel: [300, 25] as const,\n dockPill: [380, 30] as const,\n }),\n /** OFFFICE's masked type (Siena's case titles start at 120 %). */\n maskText: Object.freeze({ duration: 1.2, delay: 0.1, stagger: 0.02, exitStagger: 0.002, y: 100, threshold: 0.8 }),\n /** Siena's reveal group (rules, fades, rises). */\n cascade: Object.freeze({ duration: 1.2, step: 0.03, rise: 200, threshold: 0.3 }),\n /** Siena's slot title: each letter turns 8–14 times inside a 2 s expo.out envelope. */\n textRoll: Object.freeze({ duration: 2, stagger: 0.04, turns: [8, 14] as const, interval: 6000, quietMs: 1000 }),\n /** Dousan's hero letters: scale on hover, pastel blink. */\n letters: Object.freeze({\n scale: 1.3,\n y: -5,\n step: 0.03,\n blink: 0.6,\n blinkStart: 0.6,\n blinkRepeatDelay: 0.1,\n blinkDelays: [0.1, 0.6, 0.2, 1, 0.4, 1.2, 0.15, 0.8, 0.3] as const,\n }),\n /** Siena's image parallax. */\n parallax: Object.freeze({ travel: 10, scale: 1.2, strongScale: 1.3, lerp: 1 }),\n /** Siena's About grid gathering from depth. */\n depthGrid: Object.freeze({\n perspective: 600,\n distance: 900,\n depth: -3000,\n rotate: -160,\n opacity: 0.05,\n scale: 0.4,\n stagger: 0.15,\n lerp: 1,\n }),\n /** Siena's video mask: the frame and the picture inside scale in opposite directions. */\n frameZoom: Object.freeze({\n outer: [80, 20] as const,\n inner: [130, 20] as const,\n phoneOuter: [95, 5] as const,\n phoneInner: [105, 5] as const,\n open: 1,\n lerp: 1,\n }),\n /** Siena's marquee: seconds per item, at most 14 counted. */\n marquee: Object.freeze({ perItem: 2, maxItems: 14 }),\n /** Dousan's glass chip and Siena's dot cursor. */\n cursor: Object.freeze({ gutter: 10, circle: 96, dotLerp: 0.2, light: 180 }),\n /** iyo.ai's floating navbar: enters from −300 % over 1.8 s; rows follow 0.15 s + 0.025 s each. */\n island: Object.freeze({ entrance: 1.8, offset: -300, delay: 0.15, step: 0.025, focus: 150 }),\n /** iyo.ai's product dock: spread for 1.6 s on load; tablet range re-checked 250 ms after a resize. */\n cardDock: Object.freeze({ intro: 1600, resizeDebounce: 250 }),\n /** iyo.ai's phone cards: 5 s a card, 2 s wait after a touch, 0.5 s after it shows. */\n snapStrip: Object.freeze({ interval: 5000, resume: 2000, delay: 500 }),\n /** iyo.ai's fill-text: letters from .2, 0.5 s each, 0.1 s apart, top 90 % → centre 40 %. */\n fillText: Object.freeze({ from: 0.2, duration: 0.5, stagger: 0.1, start: 'top 90%', end: 'center 40%' }),\n /** iyo.ai's particle hero (adapted): fade in 1 s after 0.3 s, morph cycles, pointer push. */\n particleHero: Object.freeze({ fadeIn: 1, fadeDelay: 0.3, size: 128, pointSize: 1.7, maxDpr: 1.5, stillSteps: 110 }),\n ticketMenu: Object.freeze({ open: 0.9, content: 1.1, stagger: 0.02, from: 150 }),\n infiniteReel: Object.freeze({ friction: 0.95, wheel: 0.05, dragThreshold: 5 }),\n repelBento: Object.freeze({ offset: 0.6, stagger: 0.006, strength: 5000, distance: 30, breakpoint: 1024 }),\n rotator: Object.freeze({ interval: 8000, duration: 0.25, y: 5 }),\n dragRuler: Object.freeze({ min: 0, max: 8, step: 0.1, pixelsPerUnit: 60 }),\n});\n","import { gsap } from 'gsap';\n\n/** Called every frame with dt = 1 at 60 Hz. */\nexport type Tick = (dt: number) => void;\n\nconst subscribers = new Set<Tick>();\nconst FRAME_MS = 1000 / 60;\n\nfunction tick(_time: number, deltaMs: number) {\n // Capped so a backgrounded tab does not explode the springs.\n const dt = Math.min(deltaMs / FRAME_MS, 3);\n subscribers.forEach((fn) => fn(dt));\n}\n\n/** One shared ticker callback for every recipe (spencergabor.com's single rAF loop). */\nexport function subscribe(fn: Tick): () => void {\n if (!subscribers.size) gsap.ticker.add(tick);\n subscribers.add(fn);\n return () => {\n subscribers.delete(fn);\n if (!subscribers.size) gsap.ticker.remove(tick);\n };\n}\n\n/** Run `fn` every frame only while `el` is near the viewport. */\nexport function whileVisible(el: Element, fn: Tick, rootMargin = '100px'): () => void {\n let stop: (() => void) | null = null;\n const io = new IntersectionObserver(\n ([entry]) => {\n if (entry?.isIntersecting) stop ??= subscribe(fn);\n else {\n stop?.();\n stop = null;\n }\n },\n { rootMargin },\n );\n io.observe(el);\n return () => {\n io.disconnect();\n stop?.();\n stop = null;\n };\n}\n","/** `prefers-reduced-motion: reduce`. Always false during SSR. */\nexport function reduced(): boolean {\n return typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n\n/**\n * Entrance animations run only with motion allowed and when the head safety net\n * (see MK_HEAD_SCRIPT) has not given up on JavaScript.\n */\nexport function entrances(): boolean {\n if (reduced()) return false;\n return !(typeof document !== 'undefined' && document.documentElement.classList.contains('mk-failed'));\n}\n\n/**\n * Inline this in <head> (before CSS paints). It enables the hidden entrance states\n * (`.mk-js`) and reveals everything again (`.mk-failed`) if no recipe has started\n * within 2.5 s — e.g. the bundle failed to load.\n */\nexport const MK_HEAD_SCRIPT =\n \"(function(){var r=document.documentElement;r.classList.add('mk-js');setTimeout(function(){if(!r.classList.contains('mk-ready'))r.classList.add('mk-failed')},2500)})();\";\n","import type { Cleanup } from './types';\n\nexport interface Scope {\n /** Register any cleanup; returns it for convenience. */\n add(fn: Cleanup): Cleanup;\n /** addEventListener that is removed on dispose. */\n on<K extends keyof HTMLElementEventMap>(\n target: EventTarget,\n type: K | (string & {}),\n listener: (event: HTMLElementEventMap[K]) => void,\n options?: AddEventListenerOptions | boolean,\n ): void;\n /** Disconnects the observer on dispose and returns it. */\n observe<O extends { disconnect(): void }>(observer: O): O;\n /** setTimeout that is cleared on dispose. */\n timeout(fn: () => void, ms: number): void;\n /** Set (or remove, with null) an attribute; dispose puts the original value back. */\n attr(el: Element, name: string, value: string | null): void;\n /** Run every cleanup once, newest first. */\n dispose(): void;\n readonly disposed: boolean;\n}\n\n/** Collects the side effects of one recipe instance so `destroy()` can undo all of them. */\nexport function createScope(): Scope {\n const cleanups: Cleanup[] = [];\n const originals = new Map<Element, Map<string, string | null>>();\n let disposed = false;\n return {\n add(fn) {\n cleanups.push(fn);\n return fn;\n },\n on(target, type, listener, options) {\n target.addEventListener(type, listener as EventListener, options);\n cleanups.push(() => target.removeEventListener(type, listener as EventListener, options));\n },\n observe(observer) {\n cleanups.push(() => observer.disconnect());\n return observer;\n },\n timeout(fn, ms) {\n const id = setTimeout(fn, ms);\n cleanups.push(() => clearTimeout(id));\n },\n attr(el, name, value) {\n let saved = originals.get(el);\n if (!saved) originals.set(el, (saved = new Map()));\n if (!saved.has(name)) {\n saved.set(name, el.getAttribute(name));\n cleanups.push(() => {\n const original = saved.get(name);\n if (original === null || original === undefined) el.removeAttribute(name);\n else el.setAttribute(name, original);\n });\n }\n if (value === null) el.removeAttribute(name);\n else el.setAttribute(name, value);\n },\n dispose() {\n if (disposed) return;\n disposed = true;\n for (const fn of cleanups.reverse()) fn();\n cleanups.length = 0;\n },\n get disposed() {\n return disposed;\n },\n };\n}\n"],"mappings":";AAMO,IAAM,SAAS,OAAO,OAAO;AAAA,EAClC,MAAM;AAAA,EACN,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,QAAQ,OAAO,OAAO;AAAA,IACpB,MAAM,CAAC,KAAK,IAAI;AAAA,IAChB,QAAQ,CAAC,KAAK,IAAI;AAAA,IAClB,MAAM,CAAC,MAAM,GAAG;AAAA,IAChB,QAAQ,CAAC,KAAK,IAAI;AAAA,EACpB,CAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,eAAe;AAAA,EACf,cAAc;AAAA;AAAA,EAEd,mBAAmB;AAAA,EACnB,MAAM,OAAO,OAAO,EAAE,UAAU,MAAM,SAAS,MAAM,OAAO,IAAI,CAAC;AAAA,EACjE,SAAS,OAAO,OAAO,EAAE,UAAU,KAAK,SAAS,KAAK,CAAC;AAAA,EACvD,MAAM,O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+
function inert(extra) {
|
|
3
|
+
return { destroy() {
|
|
4
|
+
}, ...extra };
|
|
5
|
+
}
|
|
6
|
+
var warned = /* @__PURE__ */ new Set();
|
|
7
|
+
function warnOnce(message) {
|
|
8
|
+
if (warned.has(message)) return;
|
|
9
|
+
warned.add(message);
|
|
10
|
+
console.warn(`[motion-kit] ${message}`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
inert,
|
|
15
|
+
warnOnce
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=chunk-TGV27ZWM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/types.ts"],"sourcesContent":["/** Every recipe returns at least this. `destroy()` is idempotent and leaves the DOM as it found it. */\r\nexport interface Instance {\r\n destroy(): void;\r\n}\r\n\r\nexport type Cleanup = () => void;\r\n\r\n/** Instance returned when a recipe cannot start (missing root or children). */\r\nexport function inert<T extends Instance = Instance>(extra?: Omit<T, 'destroy'>): T {\r\n return { destroy() {}, ...extra } as T;\r\n}\r\n\r\nconst warned = new Set<string>();\r\n\r\n/** Warn once per message, so a misconfigured recipe inside a loop does not flood the console. */\r\nexport function warnOnce(message: string) {\r\n if (warned.has(message)) return;\r\n warned.add(message);\r\n console.warn(`[motion-kit] ${message}`);\r\n}\r\n"],"mappings":";AAQO,SAAS,MAAqC,OAA+B;AAClF,SAAO,EAAE,UAAU;AAAA,EAAC,GAAG,GAAG,MAAM;AAClC;AAEA,IAAM,SAAS,oBAAI,IAAY;AAGxB,SAAS,SAAS,SAAiB;AACxC,MAAI,OAAO,IAAI,OAAO,EAAG;AACzB,SAAO,IAAI,OAAO;AAClB,UAAQ,KAAK,gBAAgB,OAAO,EAAE;AACxC;","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Flip } from 'gsap/Flip';
|
|
2
|
+
|
|
3
|
+
interface CapturedLayout {
|
|
4
|
+
state: ReturnType<typeof Flip.getState>;
|
|
5
|
+
ids: Set<string | undefined>;
|
|
6
|
+
}
|
|
7
|
+
declare function captureLayout(root: Element, selector: string): CapturedLayout;
|
|
8
|
+
declare function reflowLayout(root: Element, selector: string, captured: CapturedLayout, { duration }?: {
|
|
9
|
+
duration?: number;
|
|
10
|
+
}): gsap.core.Timeline | null;
|
|
11
|
+
|
|
12
|
+
declare const ANIMATIONS: readonly ["out", "out-left", "out-bottom", "collapse", "highlight", "shake", "shake-strong", "fade", "wipe", "progress-in"];
|
|
13
|
+
type AnimationName = (typeof ANIMATIONS)[number];
|
|
14
|
+
type ExitName = 'out' | 'out-left' | 'out-bottom' | 'collapse';
|
|
15
|
+
interface AnimateOptions {
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
}
|
|
18
|
+
declare function animate(el: Element, name: AnimationName, { signal }?: AnimateOptions): Promise<void>;
|
|
19
|
+
interface LeaveOptions {
|
|
20
|
+
/** Remove the element (default) or hide it. */
|
|
21
|
+
remove?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare function leave(el: Element, name: ExitName, { remove }?: LeaveOptions): Promise<void>;
|
|
24
|
+
|
|
25
|
+
interface ConfettiOptions {
|
|
26
|
+
count?: number;
|
|
27
|
+
/** Default: the theme's primary, tertiary, secondary and containers. */
|
|
28
|
+
colors?: string[];
|
|
29
|
+
/** Draw inside this (positioned) element instead of over the whole window. */
|
|
30
|
+
container?: HTMLElement | null;
|
|
31
|
+
}
|
|
32
|
+
interface ConfettiHandle {
|
|
33
|
+
stop(): void;
|
|
34
|
+
finished: Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
declare function confetti(origin?: Element | {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
} | null, options?: ConfettiOptions): ConfettiHandle;
|
|
40
|
+
|
|
41
|
+
export { ANIMATIONS as A, type CapturedLayout as C, type ExitName as E, type LeaveOptions as L, type AnimateOptions as a, type AnimationName as b, type ConfettiHandle as c, type ConfettiOptions as d, animate as e, captureLayout as f, confetti as g, leave as l, reflowLayout as r };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* components/chat-background/chat-background.css */
|
|
2
|
+
/* chat-background — Stepbro's PrettyBackground: two orbiting blobs and a grain, driven by energy. */
|
|
3
|
+
.mk-chat-background,
|
|
4
|
+
mk-chat-background {
|
|
5
|
+
--mk-chat-orbit-1: 10s;
|
|
6
|
+
--mk-chat-orbit-2: 15s;
|
|
7
|
+
--mk-chat-blob-opacity: 0.5;
|
|
8
|
+
--mk-chat-scale: 1;
|
|
9
|
+
--mk-chat-background-opacity: 1;
|
|
10
|
+
--mk-chat-blob-1: var(--md-sys-color-primary-container);
|
|
11
|
+
--mk-chat-blob-2: var(--md-sys-color-tertiary-container);
|
|
12
|
+
position: absolute;
|
|
13
|
+
inset: 0;
|
|
14
|
+
display: block;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
border-radius: inherit;
|
|
17
|
+
opacity: var(--mk-chat-background-opacity);
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mk-chat-background::before,
|
|
22
|
+
.mk-chat-background::after,
|
|
23
|
+
mk-chat-background::before,
|
|
24
|
+
mk-chat-background::after {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 50%;
|
|
27
|
+
left: 50%;
|
|
28
|
+
width: 800px;
|
|
29
|
+
height: 800px;
|
|
30
|
+
content: '';
|
|
31
|
+
opacity: var(--mk-chat-blob-opacity);
|
|
32
|
+
translate: -50% -50%;
|
|
33
|
+
scale: var(--mk-chat-scale);
|
|
34
|
+
filter: saturate(150%);
|
|
35
|
+
transition: opacity 1s ease;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.mk-chat-background::before,
|
|
39
|
+
mk-chat-background::before {
|
|
40
|
+
background: radial-gradient(circle at center, var(--mk-chat-blob-1) 0%, transparent 70%);
|
|
41
|
+
animation: mk-chat-blob-1 var(--mk-chat-orbit-1) linear infinite;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.mk-chat-background::after,
|
|
45
|
+
mk-chat-background::after {
|
|
46
|
+
background: radial-gradient(circle at center, var(--mk-chat-blob-2) 0%, transparent 70%);
|
|
47
|
+
animation: mk-chat-blob-2 var(--mk-chat-orbit-2) linear infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Grain on top (Stepbro ships a PNG; this is SVG turbulence at the same 30 %). */
|
|
51
|
+
.mk-chat-background__noise {
|
|
52
|
+
position: absolute;
|
|
53
|
+
inset: 0;
|
|
54
|
+
z-index: 2;
|
|
55
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
|
|
56
|
+
opacity: 0.3;
|
|
57
|
+
mix-blend-mode: overlay;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes mk-chat-blob-1 {
|
|
61
|
+
from {
|
|
62
|
+
transform: rotate(0) translate(150px) rotate(0);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
to {
|
|
66
|
+
transform: rotate(360deg) translate(150px) rotate(-360deg);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@keyframes mk-chat-blob-2 {
|
|
71
|
+
from {
|
|
72
|
+
transform: rotate(180deg) translateY(120px) rotate(-180deg);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
to {
|
|
76
|
+
transform: rotate(-180deg) translateY(120px) rotate(180deg);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@media (prefers-reduced-motion: reduce) {
|
|
81
|
+
.mk-chat-background::before,
|
|
82
|
+
.mk-chat-background::after,
|
|
83
|
+
mk-chat-background::before,
|
|
84
|
+
mk-chat-background::after {
|
|
85
|
+
animation: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/* components/chat/chat.css */
|
|
2
|
+
/* chat — Stepbro's PrettyChat: glass bubbles over the live background, a soft fade at the bottom, a 64 px composer. */
|
|
3
|
+
.mk-chat,
|
|
4
|
+
mk-chat {
|
|
5
|
+
--mk-chat-radius: var(--mk-radius-2xl);
|
|
6
|
+
--mk-chat-bubble-radius: var(--mk-radius-bubble);
|
|
7
|
+
--mk-chat-user-bg: color-mix(in srgb, var(--md-sys-color-on-background) 62%, transparent);
|
|
8
|
+
--mk-chat-user-fg: var(--md-sys-color-background);
|
|
9
|
+
--mk-chat-assistant-bg: color-mix(in srgb, var(--md-sys-color-background) 58%, transparent);
|
|
10
|
+
--mk-chat-assistant-fg: var(--md-sys-color-on-surface);
|
|
11
|
+
position: relative;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
height: 100%;
|
|
15
|
+
min-height: 0;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
border-radius: var(--mk-chat-radius);
|
|
18
|
+
color: var(--mk-text);
|
|
19
|
+
font-family: var(--mk-font);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mk-chat > .mk-chat-background,
|
|
23
|
+
mk-chat > .mk-chat-background,
|
|
24
|
+
mk-chat > mk-chat-background {
|
|
25
|
+
z-index: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:is(.mk-chat, mk-chat) [data-mk-part='messages'] {
|
|
29
|
+
--mk-chat-fade: 64px;
|
|
30
|
+
position: relative;
|
|
31
|
+
z-index: 1;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex: 1 1 0;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
gap: 12px;
|
|
36
|
+
min-height: 0;
|
|
37
|
+
padding: 16px 16px 80px;
|
|
38
|
+
overflow-y: auto;
|
|
39
|
+
-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--mk-chat-fade)), transparent 100%);
|
|
40
|
+
mask-image: linear-gradient(to bottom, #000 calc(100% - var(--mk-chat-fade)), transparent 100%);
|
|
41
|
+
overscroll-behavior: contain;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:is(.mk-chat, mk-chat) [data-mk-message] {
|
|
45
|
+
position: relative;
|
|
46
|
+
z-index: 10;
|
|
47
|
+
display: block;
|
|
48
|
+
flex: 0 0 auto;
|
|
49
|
+
width: fit-content;
|
|
50
|
+
max-width: 80%;
|
|
51
|
+
padding: 16px 24px;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
border-radius: var(--mk-chat-bubble-radius);
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
line-height: 1.3;
|
|
57
|
+
white-space: pre-wrap;
|
|
58
|
+
overflow-wrap: anywhere;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:is(.mk-chat, mk-chat) [data-mk-message][data-mk-role='user'] {
|
|
62
|
+
align-self: flex-end;
|
|
63
|
+
background: var(--mk-chat-user-bg);
|
|
64
|
+
color: var(--mk-chat-user-fg);
|
|
65
|
+
-webkit-backdrop-filter: blur(16px);
|
|
66
|
+
backdrop-filter: blur(16px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:is(.mk-chat, mk-chat) [data-mk-message][data-mk-role='assistant'] {
|
|
70
|
+
align-self: flex-start;
|
|
71
|
+
background: var(--mk-chat-assistant-bg);
|
|
72
|
+
color: var(--mk-chat-assistant-fg);
|
|
73
|
+
-webkit-backdrop-filter: blur(16px);
|
|
74
|
+
backdrop-filter: blur(16px);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:is(.mk-chat, mk-chat) [data-mk-message][data-mk-role='system'] {
|
|
78
|
+
align-self: center;
|
|
79
|
+
max-width: 90%;
|
|
80
|
+
padding: 8px 16px;
|
|
81
|
+
background: none;
|
|
82
|
+
color: color-mix(in srgb, var(--md-sys-color-on-background) 62%, transparent);
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
text-align: center;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (max-width: 679px) {
|
|
88
|
+
:is(.mk-chat, mk-chat) [data-mk-message][data-mk-role='assistant'] {
|
|
89
|
+
max-width: 100%;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:is(.mk-chat, mk-chat) [data-mk-text] {
|
|
94
|
+
display: block;
|
|
95
|
+
white-space: pre-wrap;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:is(.mk-chat, mk-chat) .mk-split-word {
|
|
99
|
+
white-space: pre;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* The thinking placeholder and its glow sweep (1.1 s). */
|
|
103
|
+
:is(.mk-chat, mk-chat) [data-mk-pending] {
|
|
104
|
+
position: relative;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:is(.mk-chat, mk-chat) [data-mk-pending]::after {
|
|
108
|
+
position: absolute;
|
|
109
|
+
inset: 0 auto 0 0;
|
|
110
|
+
z-index: 2;
|
|
111
|
+
width: 50%;
|
|
112
|
+
background: radial-gradient(ellipse at center, var(--md-sys-color-background), transparent 70%);
|
|
113
|
+
content: '';
|
|
114
|
+
animation: mk-chat-glow 1.1s ease-in-out infinite;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.mk-chat__thinking {
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
gap: 8px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@keyframes mk-chat-glow {
|
|
124
|
+
from {
|
|
125
|
+
transform: translate(-100%);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
to {
|
|
129
|
+
transform: translate(200%);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Composer: the textarea grows from 64 px; round 64 px buttons. */
|
|
134
|
+
:is(.mk-chat, mk-chat) [data-mk-part='composer'] {
|
|
135
|
+
position: relative;
|
|
136
|
+
z-index: 2;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: flex-end;
|
|
139
|
+
gap: 8px;
|
|
140
|
+
margin: 0;
|
|
141
|
+
padding: 8px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:is(.mk-chat, mk-chat) [data-mk-part='input'],
|
|
145
|
+
:is(.mk-chat, mk-chat) [data-mk-part='composer'] textarea {
|
|
146
|
+
flex: 1;
|
|
147
|
+
min-width: 0;
|
|
148
|
+
min-height: 64px;
|
|
149
|
+
max-height: 40vh;
|
|
150
|
+
margin: 0;
|
|
151
|
+
padding: 18px 16px;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
box-sizing: border-box;
|
|
154
|
+
border: 0;
|
|
155
|
+
background: transparent;
|
|
156
|
+
color: inherit;
|
|
157
|
+
font: inherit;
|
|
158
|
+
font-size: 24px;
|
|
159
|
+
line-height: 1.3;
|
|
160
|
+
resize: none;
|
|
161
|
+
outline: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:is(.mk-chat, mk-chat) [data-mk-part='input']::placeholder {
|
|
165
|
+
color: var(--md-sys-color-on-background);
|
|
166
|
+
opacity: 0.5;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:is(.mk-chat, mk-chat) [data-mk-part='buttons'] {
|
|
170
|
+
display: flex;
|
|
171
|
+
gap: 8px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:is(.mk-chat, mk-chat) :is([data-mk-part='mic'], [data-mk-part='send']) {
|
|
175
|
+
display: grid;
|
|
176
|
+
flex: none;
|
|
177
|
+
place-items: center;
|
|
178
|
+
width: 64px;
|
|
179
|
+
height: 64px;
|
|
180
|
+
padding: 0;
|
|
181
|
+
border: 0;
|
|
182
|
+
border-radius: 32px;
|
|
183
|
+
background: color-mix(in srgb, var(--md-sys-color-background) 40%, transparent);
|
|
184
|
+
color: inherit;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
-webkit-backdrop-filter: blur(16px);
|
|
187
|
+
backdrop-filter: blur(16px);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:is(.mk-chat, mk-chat) :is([data-mk-part='mic'], [data-mk-part='send']):disabled {
|
|
191
|
+
opacity: 0.6;
|
|
192
|
+
cursor: not-allowed;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:is(.mk-chat, mk-chat) :is([data-mk-part='mic'], [data-mk-part='send']):focus-visible {
|
|
196
|
+
outline: 2px solid var(--mk-accent);
|
|
197
|
+
outline-offset: 2px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:is(.mk-chat, mk-chat) [data-mk-recording] {
|
|
201
|
+
background: color-mix(in srgb, var(--md-sys-color-error) 50%, transparent);
|
|
202
|
+
animation: mk-chat-recording 1.5s ease-in-out infinite;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@keyframes mk-chat-recording {
|
|
206
|
+
0%,
|
|
207
|
+
100% {
|
|
208
|
+
opacity: 1;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
50% {
|
|
212
|
+
opacity: 0.6;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* A confirmation bar above the composer. */
|
|
217
|
+
:is(.mk-chat, mk-chat) [data-mk-part='confirm'] {
|
|
218
|
+
position: relative;
|
|
219
|
+
z-index: 2;
|
|
220
|
+
display: flex;
|
|
221
|
+
flex-wrap: wrap;
|
|
222
|
+
align-items: center;
|
|
223
|
+
gap: 8px;
|
|
224
|
+
margin: 0 16px 8px;
|
|
225
|
+
padding: 12px 16px;
|
|
226
|
+
border-radius: var(--mk-radius-lg);
|
|
227
|
+
background: var(--mk-chat-assistant-bg);
|
|
228
|
+
-webkit-backdrop-filter: blur(16px);
|
|
229
|
+
backdrop-filter: blur(16px);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@media (prefers-reduced-motion: reduce) {
|
|
233
|
+
:is(.mk-chat, mk-chat) [data-mk-pending]::after,
|
|
234
|
+
:is(.mk-chat, mk-chat) [data-mk-recording] {
|
|
235
|
+
animation: none;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/* components/cursor/cursor.css */
|
|
2
|
+
/* cursor — Dousan's glass chip and Siena's dot. The layer follows the pointer; the engine writes its transform. */
|
|
3
|
+
.mk-cursor {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: 2147483000;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
will-change: transform;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* chip (Dousan): a .mk-glass label; ink follows the background under it. */
|
|
13
|
+
.mk-cursor__chip {
|
|
14
|
+
--mk-glass-fg: #fff;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 6px;
|
|
18
|
+
padding: 8px 16px;
|
|
19
|
+
font-family: var(--mk-font);
|
|
20
|
+
font-size: 0.875rem;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
line-height: 1;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
transition: color 0.15s;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.mk-cursor__chip[data-mk-tone='light'] {
|
|
28
|
+
--mk-glass-fg: var(--mk-cursor-light-ink, var(--md-sys-color-primary));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mk-cursor__chip--circle {
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: var(--mk-cursor-circle, 96px);
|
|
35
|
+
height: var(--mk-cursor-circle, 96px);
|
|
36
|
+
padding: 8px;
|
|
37
|
+
line-height: 1.15;
|
|
38
|
+
text-align: center;
|
|
39
|
+
white-space: normal;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mk-cursor__icon {
|
|
43
|
+
font-size: 0.875rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.mk-cursor__icon:empty {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* dot (Siena): a disc with a word and two arrows that slide in when pressed. */
|
|
51
|
+
.mk-cursor--dot {
|
|
52
|
+
--mk-cursor-size: 88px;
|
|
53
|
+
transition: opacity 0.15s var(--mk-ease-quint);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.mk-cursor__dot {
|
|
57
|
+
position: relative;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
gap: 4px;
|
|
63
|
+
width: var(--mk-cursor-size);
|
|
64
|
+
height: var(--mk-cursor-size);
|
|
65
|
+
color: var(--mk-cursor-ink, var(--md-sys-color-background));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.mk-cursor--dot[data-mk-arrows='x'] .mk-cursor__dot {
|
|
69
|
+
flex-direction: row;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mk-cursor__circle {
|
|
73
|
+
position: absolute;
|
|
74
|
+
inset: 0;
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
background: var(--mk-cursor-fill, var(--md-sys-color-on-background));
|
|
77
|
+
transition: transform 0.5s var(--mk-ease-quint);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mk-cursor__text {
|
|
81
|
+
position: relative;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
font-family: var(--mk-font);
|
|
84
|
+
font-size: 12px;
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
line-height: 0.9;
|
|
87
|
+
letter-spacing: 0.04em;
|
|
88
|
+
text-transform: uppercase;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.mk-cursor__word {
|
|
92
|
+
display: block;
|
|
93
|
+
transition: transform 0.5s var(--mk-ease-quint);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.mk-cursor__arrow {
|
|
97
|
+
position: relative;
|
|
98
|
+
display: grid;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mk-cursor__arrow > svg {
|
|
103
|
+
transition: transform 0.3s var(--mk-ease-quint);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.mk-cursor__arrow--start > svg {
|
|
107
|
+
transform: translateY(130%);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mk-cursor__arrow--end > svg {
|
|
111
|
+
transform: translateY(-130%) rotate(180deg);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.mk-cursor--dot[data-mk-arrows='x'] .mk-cursor__arrow--start > svg {
|
|
115
|
+
transform: translateX(130%) rotate(-90deg);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.mk-cursor--dot[data-mk-arrows='x'] .mk-cursor__arrow--end > svg {
|
|
119
|
+
transform: translateX(-130%) rotate(90deg);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.mk-cursor[data-mk-pressed] .mk-cursor__circle {
|
|
123
|
+
transform: scale(0.7);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.mk-cursor[data-mk-pressed] .mk-cursor__word {
|
|
127
|
+
transform: translateY(150%);
|
|
128
|
+
transition-duration: 0.2s;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mk-cursor[data-mk-pressed] .mk-cursor__arrow > svg {
|
|
132
|
+
transition-delay: 0.1s;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mk-cursor[data-mk-pressed] .mk-cursor__arrow--start > svg {
|
|
136
|
+
transform: translateY(0);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.mk-cursor[data-mk-pressed] .mk-cursor__arrow--end > svg {
|
|
140
|
+
transform: translateY(0) rotate(180deg);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.mk-cursor--dot[data-mk-arrows='x'][data-mk-pressed] .mk-cursor__arrow--start > svg {
|
|
144
|
+
transform: translateX(0) rotate(-90deg);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mk-cursor--dot[data-mk-arrows='x'][data-mk-pressed] .mk-cursor__arrow--end > svg {
|
|
148
|
+
transform: translateX(0) rotate(90deg);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.mk-cursor--dot[data-mk-hidden] {
|
|
152
|
+
opacity: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.mk-cursor--dot[data-mk-hidden] .mk-cursor__circle {
|
|
156
|
+
transform: scale(0);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* The dot replaces the system cursor inside its zone. */
|
|
160
|
+
[data-mk-cursor-zone],
|
|
161
|
+
[data-mk-cursor-zone] * {
|
|
162
|
+
cursor: none;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
mk-cursor {
|
|
166
|
+
display: block;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
|
|
170
|
+
.mk-cursor {
|
|
171
|
+
display: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
[data-mk-cursor-zone],
|
|
175
|
+
[data-mk-cursor-zone] * {
|
|
176
|
+
cursor: auto;
|
|
177
|
+
}
|
|
178
|
+
}
|