@mkbabb/glass-ui 3.10.1 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CardAction-DrAcAV4d.js → CardAction-DuArVky-.js} +2 -2
- package/dist/{CommandShortcut-mV2e1aG6.js → CommandShortcut-CefCj5mt.js} +2 -2
- package/dist/{DataTable-C3E6jZ5B.js → DataTable-CUHMukiQ.js} +2 -2
- package/dist/DeckProgress-Dmk4_AKN.js +23 -0
- package/dist/{DialogContent-BxaaafFi.js → DialogContent-BRkT1cjP.js} +1 -1
- package/dist/{HoverPopover-CDA_SaCe.js → HoverPopover-2LOIW34a.js} +1 -1
- package/dist/InstrumentRail-CUJ05YVG.js +44 -0
- package/dist/{MetricBadge-idgrkqoP.js → MetricBadge-BZVWIxNy.js} +7 -5
- package/dist/{Notification-Cu0nN17_.js → Notification-DLMhblXR.js} +1 -1
- package/dist/{NumberFieldContent-CHEWghnY.js → NumberFieldContent-BbLOh8RU.js} +2 -2
- package/dist/{PopoverContent-DpUvdYY-.js → PopoverContent-BId6ggf_.js} +1 -1
- package/dist/{Progress-BW-StFw2.js → Progress-iEuD9pxG.js} +1 -1
- package/dist/{ScrollingText-DruYCni_.js → ScrollingText-BPP84wKo.js} +1 -1
- package/dist/{SelectScrollDownButton-pirzjm--.js → SelectScrollDownButton-T32cVFeM.js} +3 -3
- package/dist/{Switch-DeAqg6pi.js → Switch-Ch-k3Rv-.js} +1 -1
- package/dist/{TabsList-BAVzOZpg.js → TabsList-B8CVOQPC.js} +2 -2
- package/dist/{Toaster-CvuuW_y9.js → Toaster-1rYWrmAm.js} +46 -49
- package/dist/{ToggleGroupItem-DtD37b4G.js → ToggleGroupItem-COu_4IW4.js} +21 -17
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +5 -4
- package/dist/api.js +2 -2
- package/dist/aurora.js +70 -70
- package/dist/{badge-NdCQMvvB.js → badge-CaoFJzRb.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/{button-DyiWFAOE.js → button-DN39cGqL.js} +12 -12
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +1 -1
- package/dist/carousel.js +5 -5
- package/dist/collapsible.js +1 -1
- package/dist/{color-B65wWyQz.js → color-C5ls_QF7.js} +7 -9
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/components/custom/aurora/constants/presets.d.ts +62 -5
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/constellation/Constellation.vue.d.ts +0 -12
- package/dist/components/custom/constellation/constellationField.d.ts +151 -10
- package/dist/components/custom/constellation/index.d.ts +1 -3
- package/dist/components/custom/controls/DarkModeToggle.vue.d.ts +0 -11
- package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +27 -0
- package/dist/components/custom/deck-progress/index.d.ts +2 -0
- package/dist/components/custom/dialog-native/GlassDialogNative.vue.d.ts +57 -0
- package/dist/components/custom/dialog-native/index.d.ts +1 -0
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +4 -3
- package/dist/components/custom/dock/GlassDock.vue.d.ts +115 -3
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +0 -36
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +0 -44
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +37 -5
- package/dist/components/custom/fourier-field/index.d.ts +1 -1
- package/dist/components/custom/fourier-field/math.d.ts +0 -17
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +41 -0
- package/dist/components/custom/glass-panel/index.d.ts +2 -0
- package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +3 -4
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +8 -11
- package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
- package/dist/components/custom/handmark/brush.d.ts +242 -0
- package/dist/components/custom/handmark/freehand.d.ts +69 -0
- package/dist/components/custom/handmark/geometry.d.ts +50 -0
- package/dist/components/custom/handmark/index.d.ts +21 -0
- package/dist/components/custom/handmark/ink.d.ts +11 -0
- package/dist/components/custom/handmark/texture.d.ts +39 -0
- package/dist/components/custom/handmark/types.d.ts +53 -0
- package/dist/components/custom/handmark/useHandMark.d.ts +87 -0
- package/dist/components/custom/header-ribbon/HeaderRibbon.vue.d.ts +31 -0
- package/dist/components/custom/header-ribbon/index.d.ts +2 -0
- package/dist/components/custom/header-ribbon/types.d.ts +7 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +2 -2
- package/dist/components/custom/instrument-rail/InstrumentRail.vue.d.ts +91 -0
- package/dist/components/custom/instrument-rail/index.d.ts +2 -0
- package/dist/components/custom/metric-badge/MetricBadge.vue.d.ts +8 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +0 -1
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +2 -2
- package/dist/components/ui/slider/index.d.ts +19 -22
- package/dist/components/ui/toast/use-toast.d.ts +2 -2
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/components/ui/toggle/index.d.ts +1 -1
- package/dist/components/ui/toggle-group/ToggleGroup.vue.d.ts +7 -1
- package/dist/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +3 -1
- package/dist/components/ui/toggle-group/toggleGroupContext.d.ts +13 -0
- package/dist/composables/color/index.d.ts +0 -12
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +21 -1
- package/dist/composables/glass/useSpecularTracking.d.ts +3 -12
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/index.d.ts +0 -2
- package/dist/composables/motion/useRouteTransition.d.ts +42 -0
- package/dist/composables/motion/useSpringMount.d.ts +1 -1
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +2 -2
- package/dist/constellation.js +225 -260
- package/dist/controls.js +14 -48
- package/dist/dark.d.ts +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck-progress.d.ts +1 -0
- package/dist/deck-progress.js +2 -0
- package/dist/dialog.js +2 -2
- package/dist/dock.js +345 -340
- package/dist/dockContext-BKeIMmNk.js +9 -0
- package/dist/{dropdown-menu-DVnQcA0E.js → dropdown-menu-D77jX6Df.js} +4 -7
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +79 -38
- package/dist/forms.js +2 -2
- package/dist/fourier-field.js +102 -137
- package/dist/fourier-math.js +2 -2
- package/dist/glass-panel.d.ts +1 -0
- package/dist/glass-panel.js +44 -0
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +209 -287
- package/dist/goo-blob.js +212 -243
- package/dist/handmark.d.ts +1 -0
- package/dist/handmark.js +662 -0
- package/dist/header-ribbon.d.ts +1 -0
- package/dist/header-ribbon.js +63 -0
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/instrument-rail.d.ts +1 -0
- package/dist/instrument-rail.js +2 -0
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +5 -5
- package/dist/{math-BUU9hHID.js → math-DTpRVC0e.js} +2 -18
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +70 -69
- package/dist/motion.js +37 -38
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-1OhFpaIC.js → presets-BP_ALM0m.js} +14 -1
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +6 -6
- package/dist/select.js +1 -1
- package/dist/{sheet-ChSXcJpU.js → sheet-VZEtNFvO.js} +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-sfl8gFDD.js → slider-ClgpP7EB.js} +4 -4
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -2
- package/dist/stacked-icons.js +6 -6
- package/dist/styles/animations.css +111 -15
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock/layer-group.css +0 -22
- package/dist/styles/dock/layers.css +1 -11
- package/dist/styles/dock/morph.css +19 -95
- package/dist/styles/dock/shell.css +0 -12
- package/dist/styles/dock-controls.css +31 -28
- package/dist/styles/drawer.css +0 -2
- package/dist/styles/floating-panel.css +0 -2
- package/dist/styles/glass-refract.css +0 -2
- package/dist/styles/glass.css +1188 -31
- package/dist/styles/hover-popover.css +0 -2
- package/dist/styles/index.css +6 -24
- package/dist/styles/instrument-chassis.css +0 -4
- package/dist/styles/paper.css +68 -2
- package/dist/styles/theme.css +20 -13
- package/dist/styles/tokens.css +2360 -22
- package/dist/styles/typography.css +6 -18
- package/dist/styles/utilities.css +1291 -19
- package/dist/styles/view-transition.css +51 -0
- package/dist/switch.js +1 -1
- package/dist/tabs.js +98 -98
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-DfVgP4te.js → useAnimatedNumber-Bcpy5Etf.js} +1 -1
- package/dist/{useConfiguratorState-BdQXh9ie.js → useConfiguratorState-DxAqksK6.js} +1 -1
- package/dist/useGlassRenderer-D7YGOYiM.js +69 -0
- package/dist/{useGlobalDark-D7R9OypB.js → useGlobalDark-D1wgEqfW.js} +21 -2
- package/dist/useSpecularTracking-BVRZsRHA.js +26 -0
- package/dist/useSpringMount-BJSHcLl3.js +113 -0
- package/dist/useViewTransition-DaN5Zrox.js +21 -0
- package/dist/vReveal-zUIQk-rJ.js +53 -0
- package/dist/watercolor-dot.js +2 -2
- package/package.json +57 -33
- package/src/styles/animations.css +111 -15
- package/src/styles/dock/layer-group.css +0 -22
- package/src/styles/dock/layers.css +1 -11
- package/src/styles/dock/morph.css +19 -95
- package/src/styles/dock/shell.css +0 -12
- package/src/styles/dock-controls.css +31 -28
- package/src/styles/glass.css +1188 -31
- package/src/styles/index.css +6 -24
- package/src/styles/paper.css +68 -2
- package/src/styles/theme.css +20 -13
- package/src/styles/tokens.css +2360 -22
- package/src/styles/typography.css +6 -18
- package/src/styles/utilities.css +1291 -19
- package/src/styles/view-transition.css +51 -0
- package/dist/components/custom/aurora/constants/shaders/vangogh-medium.glsl.d.ts +0 -1
- package/dist/components/custom/constellation/composables/createConstellationField.d.ts +0 -35
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +0 -35
- package/dist/components/custom/constellation/constants.d.ts +0 -36
- package/dist/components/custom/constellation/constellationDraw.d.ts +0 -18
- package/dist/components/custom/constellation/constellationInteraction.d.ts +0 -102
- package/dist/components/custom/dock/composables/useDockMorphWindow.d.ts +0 -15
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +0 -131
- package/dist/components/custom/dock/constants.d.ts +0 -23
- package/dist/components/custom/fourier-field/presets.d.ts +0 -54
- package/dist/components/custom/goo-blob/composables/buildMetaballProgram.d.ts +0 -18
- package/dist/components/custom/goo-blob/composables/uploadBlobUniforms.d.ts +0 -41
- package/dist/components/custom/goo-blob/constants.d.ts +0 -52
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +0 -1
- package/dist/components/custom/tabs/constants.d.ts +0 -12
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +0 -84
- package/dist/components/custom/underline/index.d.ts +0 -2
- package/dist/components/custom/underline/types.d.ts +0 -56
- package/dist/composables/motion/curves.d.ts +0 -48
- package/dist/composables/motion/springPresets.d.ts +0 -33
- package/dist/composables/motion/suite.d.ts +0 -2
- package/dist/dockContext-bho8B1A4.js +0 -17
- package/dist/motion-curves.d.ts +0 -1
- package/dist/motion-curves.js +0 -130
- package/dist/springPresets-aRSm-4_k.js +0 -40
- package/dist/styles/glass/a11y-fallback.css +0 -245
- package/dist/styles/glass/ladder.css +0 -304
- package/dist/styles/glass/material.css +0 -238
- package/dist/styles/glass/progress-rail.css +0 -78
- package/dist/styles/glass/squircle.css +0 -66
- package/dist/styles/glass/surfaces.css +0 -306
- package/dist/styles/tokens/color-radius.css +0 -250
- package/dist/styles/tokens/dark-arm.css +0 -194
- package/dist/styles/tokens/glass.css +0 -413
- package/dist/styles/tokens/light-dark.css +0 -158
- package/dist/styles/tokens/offsets-sizing.css +0 -406
- package/dist/styles/tokens/property-regs.css +0 -169
- package/dist/styles/tokens/scale-paper.css +0 -361
- package/dist/styles/tokens/scheme-motion.css +0 -334
- package/dist/styles/tokens/shadow.css +0 -132
- package/dist/styles/utilities/a11y-overrides.css +0 -140
- package/dist/styles/utilities/animate.css +0 -26
- package/dist/styles/utilities/base.css +0 -365
- package/dist/styles/utilities/btn.css +0 -399
- package/dist/styles/utilities/components.css +0 -317
- package/dist/underline.d.ts +0 -1
- package/dist/underline.js +0 -85
- package/dist/useSpecularTracking-DFK_fhpG.js +0 -32
- package/dist/useSpringMount-DXUzxBjV.js +0 -108
- package/dist/vReveal-CqaCz_mC.js +0 -44
- package/src/styles/glass/a11y-fallback.css +0 -245
- package/src/styles/glass/ladder.css +0 -304
- package/src/styles/glass/material.css +0 -238
- package/src/styles/glass/progress-rail.css +0 -78
- package/src/styles/glass/squircle.css +0 -66
- package/src/styles/glass/surfaces.css +0 -306
- package/src/styles/tokens/color-radius.css +0 -250
- package/src/styles/tokens/dark-arm.css +0 -194
- package/src/styles/tokens/glass.css +0 -413
- package/src/styles/tokens/light-dark.css +0 -158
- package/src/styles/tokens/offsets-sizing.css +0 -406
- package/src/styles/tokens/property-regs.css +0 -169
- package/src/styles/tokens/scale-paper.css +0 -361
- package/src/styles/tokens/scheme-motion.css +0 -334
- package/src/styles/tokens/shadow.css +0 -132
- package/src/styles/utilities/a11y-overrides.css +0 -140
- package/src/styles/utilities/animate.css +0 -26
- package/src/styles/utilities/base.css +0 -365
- package/src/styles/utilities/btn.css +0 -399
- package/src/styles/utilities/components.css +0 -317
- /package/dist/{CollapsibleContent-Drow5WkV.js → CollapsibleContent-CP9qF1v4.js} +0 -0
- /package/dist/{DialogFooter-DufLHi0y.js → DialogFooter-Gprw8H_A.js} +0 -0
- /package/dist/{IconTooltip-BrQ5p181.js → IconTooltip-Cus0fvK0.js} +0 -0
- /package/dist/{Input-B-F818RU.js → Input-xuDwALQR.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-DWghtRt7.js → _plugin-vue_export-helper-ok8pgSl5.js} +0 -0
- /package/dist/{compile-Ce_V55zi.js → compile-BOXjLUxu.js} +0 -0
- /package/dist/{constants-C8NMonuo.js → constants-yKeKnE84.js} +0 -0
- /package/dist/{prng-CjVgzjQT.js → prng-D27-B3tK.js} +0 -0
- /package/dist/{resolveCanvasColor-CRvVzOvP.js → resolveCanvasColor-BBiYfp8g.js} +0 -0
- /package/dist/{useCanvas2D-CSeH8h16.js → useCanvas2D-ClrQuZtp.js} +0 -0
- /package/dist/{useIntersectionPause-DAdVPVp4.js → useIntersectionPause-Cck5Uxk8.js} +0 -0
- /package/dist/{useInterval-D3USn0yc.js → useInterval-Dsmqwi03.js} +0 -0
- /package/dist/{useKeyboardShortcuts-i8tHd5WO.js → useKeyboardShortcuts-CyIYrndH.js} +0 -0
- /package/dist/{useScrollProgress-CcgmgMQt.js → useScrollProgress-CffFGLa5.js} +0 -0
- /package/dist/{useSortable-DnyGXKKY.js → useSortable-C8ReQ50P.js} +0 -0
- /package/dist/{useTextHighlight-B3b10W6r.js → useTextHighlight-CWEi25hf.js} +0 -0
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { BlobMood, MoodParams } from "./types";
|
|
2
|
-
/** Compile-time satellite cap — mirrors `uSat*[N]` in metaball.frag.ts. */
|
|
3
|
-
export declare const MAX_SATS = 4;
|
|
4
|
-
/** Compile-time trail length — mirrors the `uTrail*[N]` arrays in metaball.frag.ts. */
|
|
5
|
-
export declare const TRAIL_N = 15;
|
|
6
|
-
/** Compile-time palette cap — mirrors `#define MAX_BLOB_STOPS` in metaball-uniforms.glsl.ts. */
|
|
7
|
-
export declare const MAX_BLOB_STOPS = 4;
|
|
8
|
-
/**
|
|
9
|
-
* Canvas is CSS-sized 1.6x its layout wrapper (see GooBlob.vue). Positions are in
|
|
10
|
-
* [-0.5, 0.5] normalized space mapped to canvas UVs. To make the layout footprint
|
|
11
|
-
* represent the "visible blob region" and have the extra 60% of canvas serve as
|
|
12
|
-
* overflow margin for satellite orbits, scale all length-like uniforms by
|
|
13
|
-
* 1/1.6 = 0.625.
|
|
14
|
-
*/
|
|
15
|
-
export declare const POS_SCALE: number;
|
|
16
|
-
/** The full ordered scalar/vector uniform-name list the program builder caches a location per. */
|
|
17
|
-
/** A point in the 2-axis circumplex affect space. */
|
|
18
|
-
export interface AffectPoint {
|
|
19
|
-
/** Pleasantness, -1 (unpleasant) .. +1 (pleasant). */
|
|
20
|
-
valence: number;
|
|
21
|
-
/** Activation, 0 (calm/sleepy) .. 1 (energized/excited). */
|
|
22
|
-
arousal: number;
|
|
23
|
-
}
|
|
24
|
-
/** The five named moods as POINTS in the {valence, arousal} circumplex. */
|
|
25
|
-
export declare const MOOD_AVA: Record<BlobMood, AffectPoint>;
|
|
26
|
-
/**
|
|
27
|
-
* Derive the full MoodParams from a {valence, arousal} point. Arousal drives the
|
|
28
|
-
* motion energy (orbit speed, wobble, pulse rate/amp, noise, the iridescence/SSS
|
|
29
|
-
* sheen); valence warms the palette (hue range, chroma, brightness) and the
|
|
30
|
-
* pointer lean. ONE principled surface — the five named moods are samples of it.
|
|
31
|
-
*/
|
|
32
|
-
export declare function paramsFor({ valence, arousal }: AffectPoint): MoodParams;
|
|
33
|
-
/** The resolved per-mood target params (samples of the `paramsFor` surface). */
|
|
34
|
-
export declare const MOOD_TARGETS: Record<BlobMood, MoodParams>;
|
|
35
|
-
/** The per-mood cross-fade duration (ms). */
|
|
36
|
-
export declare const TRANSITION_MS: Record<BlobMood, number>;
|
|
37
|
-
/** Idle timeout (ms of no pointer) after which the blob drifts to `sleepy`. */
|
|
38
|
-
export declare const IDLE_SLEEP_MS = 6000;
|
|
39
|
-
/** Click-impulse spring ring frequency (rad/s). */
|
|
40
|
-
export declare const PULSE_OMEGA = 18;
|
|
41
|
-
/** Click-impulse spring damping (< 1 = underdamped, overshoot-then-settle). */
|
|
42
|
-
export declare const PULSE_ZETA = 0.35;
|
|
43
|
-
/** The at-rest epsilon — velocity/position below this is "settled" (the park gate). */
|
|
44
|
-
export declare const REST_EPS = 0.001;
|
|
45
|
-
/** Base satellite opacity. */
|
|
46
|
-
export declare const BASE_OPACITY = 0.75;
|
|
47
|
-
/** Duration (ms) to blend from emerge endpoint into live orbit — eliminates snap. */
|
|
48
|
-
export declare const ORBIT_BLEND_MS = 2000;
|
|
49
|
-
/** Minimum spacing (ms) between satellite merge events. */
|
|
50
|
-
export declare const MERGE_STAGGER_MS = 3000;
|
|
51
|
-
export declare const UNIFORM_NAMES: readonly ["uResolution", "uTime", "uBaseColor", "uPointer", "uPointerActive", "uPointerAttraction", "uPointerStrength", "uBodyRadius", "uPulsePhase", "uPulseAmp", "uNoiseAmp", "uNoiseFreq", "uNoiseSpeed", "uWarpAmp", "uSmoothK", "uMerge", "uMaxReach", "uLit", "uRimColor", "uLightDir", "uSpecStrength", "uSpecShininess", "uRimPower", "uRimStrength", "uIridescence", "uIridHue", "uIridSpeed", "uSssScale", "uSssPower", "uCoreGlow", "uHueRange", "uSatShift", "uBrightnessShift", "uColorNoiseFreq", "uColorNoiseSpeed", "uStopCount", "uSatCount", "uTrailCount", "uVelocity", "uStretch"];
|
|
52
|
-
export type UniformName = (typeof UNIFORM_NAMES)[number];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const METABALL_UNIFORMS_GLSL = "#version 300 es\nprecision highp float;\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform vec2 uResolution;\nuniform float uTime;\nuniform vec3 uBaseColor;\n\n// Multi-stop palette (W11.b) \u2014 2-4 in-family OKLCh stops (uploaded GAMMA sRGB, like\n// uBaseColor). uStopCount <= 1 falls back to uBaseColor (the single-color default,\n// zero regression). MAX_BLOB_STOPS is a compile-time #define.\n#define MAX_BLOB_STOPS 4\nuniform int uStopCount;\nuniform vec3 uPalette[MAX_BLOB_STOPS];\n\n// Pointer\nuniform vec2 uPointer;\nuniform float uPointerActive;\nuniform float uPointerAttraction;\nuniform float uPointerStrength;\n\n// Main body\nuniform float uBodyRadius;\n\n// Pulsation\nuniform float uPulsePhase;\nuniform float uPulseAmp;\n\n// Surface noise\nuniform float uNoiseAmp;\nuniform float uNoiseFreq;\nuniform float uNoiseSpeed;\n\n// Gooey\nuniform float uSmoothK;\nuniform float uMerge; // 0 = quadratic smin, 1 = circular smin (rounder menisci)\n\n// AX.W16 (arm 5) \u2014 the PRE-FBM bounding-discard radius (UV space). main() early-outs\n// to a transparent write for any fragment OUTSIDE this radius BEFORE the two 3-octave\n// FBM calls + the OKLCh round-trip. The renderer uploads it PADDED by every\n// outward-expanding term (body + eccentric orbit + sat radius + smin band + FBM edge\n// amplitude + click-pulse + a lean/squash safety pad) so it NEVER clips the wet\n// meniscus (IQ: inflate the bound to match any outward op).\nuniform float uMaxReach;\n\n// Membrane \u2014 domain-warp strength on the FBM edge displacement (0 = plain fbm).\nuniform float uWarpAmp;\n\n// Lit glass surface (W9.b) \u2014 gated behind uLit so the flat fill stays default.\nuniform float uLit; // 0 = flat fill (default), 1 = lit droplet\nuniform vec3 uRimColor; // Fresnel rim tint (GAMMA sRGB, via the /color leaf)\nuniform vec3 uLightDir; // normalized light direction (x, y, z)\nuniform float uSpecStrength; // Blinn-Phong specular weight\nuniform float uSpecShininess; // specular exponent (16-64, tight glint)\nuniform float uRimPower; // Fresnel/Schlick exponent (~2-3)\nuniform float uRimStrength; // Fresnel rim weight\n\n// Iridescence + fake subsurface (W11.a) \u2014 translucent-gel read.\nuniform float uIridescence; // warm-pearl rim sheen weight (0 = off)\nuniform float uIridHue; // base hue (radians) the cosine palette biases toward (warm)\nuniform float uIridSpeed; // animated-thickness scroll for the iridescent t\nuniform float uSssScale; // fast-SSS back-light weight\nuniform float uSssPower; // fast-SSS exponent\nuniform float uCoreGlow; // thickness-driven inner-luminosity lift\n\n// Color perturbation (perceptually uniform \u2014 OKLCh L/C/h)\nuniform float uHueRange; // degrees of hue swing (converted to radians)\nuniform float uSatShift; // OKLCh chroma swing\nuniform float uBrightnessShift; // OKLCh lightness bias\nuniform float uColorNoiseFreq;\nuniform float uColorNoiseSpeed;\n\n// Satellites (max 4)\n#define MAX_SATS 4\nuniform int uSatCount;\nuniform vec2 uSatPos[MAX_SATS];\nuniform float uSatRadius[MAX_SATS];\nuniform float uSatOpacity[MAX_SATS];\n\n// Pointer trail (W10) \u2014 a decaying-radius pseudopod toward the cursor. uTrail is a\n// COMPILE-TIME-SIZED array (GLSL ES 3.00 forbids a uniform-sized array) with a\n// DYNAMIC break on uTrailCount, mirroring the satellite loop. Later samples paint\n// smaller metaballs (r *= 1 - i/N) so the trail tapers into a tail.\n#define TRAIL_N 15\nuniform int uTrailCount;\nuniform vec2 uTrailPos[TRAIL_N];\nuniform float uTrailRadius[TRAIL_N];\n\n// Velocity-driven volume-preserving squash-and-stretch (W10).\nuniform vec2 uVelocity; // smoothed pointer velocity (motion direction + speed)\nuniform float uStretch; // squash-stretch magnitude (0 = off)\n\nconst float PI = 3.141592653589793;\n";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fallback for `--tab-indicator-max-stretch` when the cascade leaves it unset — the
|
|
3
|
-
* default ≈+8% travel-squish cap (AX.W53). `--stretch = 1 + frac · (cap − 1)`, so a
|
|
4
|
-
* full-width jump reaches the cap and a tiny hop stays near 1. The token is the
|
|
5
|
-
* authority; this is the no-token floor.
|
|
6
|
-
*/
|
|
7
|
-
export declare const DEFAULT_INDICATOR_MAX_STRETCH = 1.08;
|
|
8
|
-
/**
|
|
9
|
-
* ms after the stretch opens before it releases back to fit (`--stretch → 1`) — the
|
|
10
|
-
* Material "grow then shrink" close. Rides the same snappy glide clock as the travel.
|
|
11
|
-
*/
|
|
12
|
-
export declare const INDICATOR_RELEASE_MS = 60;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { TimingFunction } from "@mkbabb/keyframes.js";
|
|
2
|
-
import type { GlassUnderlinePaths } from "./types";
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
/**
|
|
5
|
-
* Which clock drives the draw. `load` (default) — the draw is a
|
|
6
|
-
* `NumericAnimation` the parent's load `Sequence` fires once via `play()`.
|
|
7
|
-
* `scroll` — native `view()` keyframes, bidirectional, no JS. `static` —
|
|
8
|
-
* set drawn, no clock.
|
|
9
|
-
*/
|
|
10
|
-
clock?: "load" | "scroll" | "static";
|
|
11
|
-
/**
|
|
12
|
-
* The render variant. `pen` is the only PROVEN, filter-free render.
|
|
13
|
-
* pencil | crayon | boil are UNPROVEN headroom — the API seam for a future
|
|
14
|
-
* wave, NOT shipped here (they render pen today).
|
|
15
|
-
*/
|
|
16
|
-
variant?: "pen" | "pencil" | "crayon" | "boil";
|
|
17
|
-
/** The stroke colour. Defaults to `var(--primary)` (re-resolves under .dark). */
|
|
18
|
-
color?: string;
|
|
19
|
-
/** The load-clock draw duration (ms). Default 700. */
|
|
20
|
-
drawMs?: number;
|
|
21
|
-
/**
|
|
22
|
-
* The load-clock easing. Default `easeOutCubic` — doctrine-compliant (DEC-6):
|
|
23
|
-
* ink is an irreversible additive reveal, so an overshooting spring would lay
|
|
24
|
-
* ink past the end then retract it (the "never overshoot past gone" logic).
|
|
25
|
-
* The value.js `TimingFunction` type (already a peer) serves a consumer's own
|
|
26
|
-
* decelerating register (e.g. an expo).
|
|
27
|
-
*/
|
|
28
|
-
easing?: TimingFunction;
|
|
29
|
-
/**
|
|
30
|
-
* The scroll-clock timeline name (DEC-5). Default the element's own `view()`.
|
|
31
|
-
* Bound as `--gu-timeline`; the CSS reads `animation-timeline:
|
|
32
|
-
* var(--gu-timeline, view())`. A consumer (`--beat-tl`, a named scroll
|
|
33
|
-
* timeline) passes its own.
|
|
34
|
-
*/
|
|
35
|
-
timeline?: string;
|
|
36
|
-
/**
|
|
37
|
-
* The declarative third clock (DEC-2). A thin overlay ON the load clock:
|
|
38
|
-
* `undefined` (default) = source parity (seeds undrawn, parent fires
|
|
39
|
-
* `play()`); bound: rising edge → play() (under PRM → snap()), falling edge
|
|
40
|
-
* → reset to undrawn so re-activation REPLAYS, mount with `true` → plays.
|
|
41
|
-
* Only meaningful with `clock="load"` (the other clocks rest drawn).
|
|
42
|
-
*/
|
|
43
|
-
active?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* The geometry escape (DEC-7). The FULL geometry tuple
|
|
46
|
-
* `{ stroke, ghost?, viewBox?, len? }` — a bare `d`-string escape silently
|
|
47
|
-
* breaks the dash model when the consumer geometry's viewBox/length differ.
|
|
48
|
-
* Defaults to the canonical pen + ghost.
|
|
49
|
-
*/
|
|
50
|
-
paths?: GlassUnderlinePaths;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* CLOCK A — draw the underline ONCE. The awaitable a parent's load `Sequence` fires
|
|
54
|
-
* as a causal link. Resolves a Promise so the Sequence can `await` it; under PRM it
|
|
55
|
-
* snaps to drawn in one paint and resolves immediately. A no-op for scroll/static.
|
|
56
|
-
*/
|
|
57
|
-
declare function play(): Promise<void>;
|
|
58
|
-
/** Snap to terminal (drawn) — the PRM / interrupt path. */
|
|
59
|
-
declare function snap(): void;
|
|
60
|
-
declare var __VLS_1: {};
|
|
61
|
-
type __VLS_Slots = {} & {
|
|
62
|
-
default?: (props: typeof __VLS_1) => any;
|
|
63
|
-
};
|
|
64
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
65
|
-
play: typeof play;
|
|
66
|
-
snap: typeof snap;
|
|
67
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
68
|
-
active: boolean;
|
|
69
|
-
variant: "pen" | "pencil" | "crayon" | "boil";
|
|
70
|
-
color: string;
|
|
71
|
-
clock: "load" | "scroll" | "static";
|
|
72
|
-
drawMs: number;
|
|
73
|
-
easing: TimingFunction;
|
|
74
|
-
timeline: string;
|
|
75
|
-
paths: GlassUnderlinePaths;
|
|
76
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
77
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
78
|
-
declare const _default: typeof __VLS_export;
|
|
79
|
-
export default _default;
|
|
80
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
81
|
-
new (): {
|
|
82
|
-
$slots: S;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { TimingFunction } from "@mkbabb/keyframes.js";
|
|
2
|
-
/** Which clock drives the draw. */
|
|
3
|
-
export type GlassUnderlineClock = "load" | "scroll" | "static";
|
|
4
|
-
/**
|
|
5
|
-
* The render variant. `pen` is the only PROVEN, filter-free render (the masthead
|
|
6
|
-
* invariant). pencil | crayon | boil are UNPROVEN headroom — the API seam for a
|
|
7
|
-
* future wave, NOT shipped (they render pen today).
|
|
8
|
-
*/
|
|
9
|
-
export type GlassUnderlineVariant = "pen" | "pencil" | "crayon" | "boil";
|
|
10
|
-
/**
|
|
11
|
-
* The geometry escape tuple (DEC-7). Carries the FULL geometry so an escaped path
|
|
12
|
-
* stays dash-coherent — a bare `d`-string escape silently breaks the dash model when
|
|
13
|
-
* the consumer geometry's viewBox/length differ from the canonical
|
|
14
|
-
* (`0 0 100 10` + `len` 120).
|
|
15
|
-
*/
|
|
16
|
-
export interface GlassUnderlinePaths {
|
|
17
|
-
/** The primary pen stroke `d`. */
|
|
18
|
-
readonly stroke: string;
|
|
19
|
-
/** The faint ghost overdraw `d`. Omit for a single-path (no overdraw) render. */
|
|
20
|
-
readonly ghost?: string;
|
|
21
|
-
/** The SVG viewBox. Default `0 0 100 10`. */
|
|
22
|
-
readonly viewBox?: string;
|
|
23
|
-
/** The dasharray length (the over-long fixed dash). Default `120`. */
|
|
24
|
-
readonly len?: number;
|
|
25
|
-
}
|
|
26
|
-
/** GlassUnderline props (the public prop surface). */
|
|
27
|
-
export interface GlassUnderlineProps {
|
|
28
|
-
/** Which clock drives the draw. Default `load`. */
|
|
29
|
-
clock?: GlassUnderlineClock;
|
|
30
|
-
/** The render variant. Default `pen` (the only proven render). */
|
|
31
|
-
variant?: GlassUnderlineVariant;
|
|
32
|
-
/** The stroke colour. Default `var(--primary)` (re-resolves under `.dark`). */
|
|
33
|
-
color?: string;
|
|
34
|
-
/** The load-clock draw duration (ms). Default `700`. */
|
|
35
|
-
drawMs?: number;
|
|
36
|
-
/** The load-clock easing (value.js `TimingFunction`). Default `easeOutCubic`. */
|
|
37
|
-
easing?: TimingFunction;
|
|
38
|
-
/** The scroll-clock timeline name. Default the element's own `view()`. */
|
|
39
|
-
timeline?: string;
|
|
40
|
-
/**
|
|
41
|
-
* The declarative third clock — a thin overlay ON the load clock. `undefined`
|
|
42
|
-
* (default) = source parity (parent fires `play()`); rising edge → play, falling
|
|
43
|
-
* edge → reset-to-undrawn (re-rise REPLAYS), mount-`true` → plays. Only
|
|
44
|
-
* meaningful with `clock="load"`.
|
|
45
|
-
*/
|
|
46
|
-
active?: boolean;
|
|
47
|
-
/** The geometry escape tuple. Defaults to the canonical pen + ghost. */
|
|
48
|
-
paths?: GlassUnderlinePaths;
|
|
49
|
-
}
|
|
50
|
-
/** The imperative handle exposed via `defineExpose` / a template ref. */
|
|
51
|
-
export interface GlassUnderlineExpose {
|
|
52
|
-
/** Draw the load-clock underline once (the awaitable a Sequence chains). */
|
|
53
|
-
play: () => Promise<void>;
|
|
54
|
-
/** Snap to terminal (drawn) — the PRM / interrupt path. */
|
|
55
|
-
snap: () => void;
|
|
56
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { type easeInQuad } from "@mkbabb/value.js";
|
|
2
|
-
import { type Easing, type TimingFunction } from "@mkbabb/keyframes.js";
|
|
3
|
-
/** A value.js easing callable `(t: number) => number` (the family's shape). */
|
|
4
|
-
export type CurveFn = typeof easeInQuad;
|
|
5
|
-
/** The kind of a `MOTION_CURVES` row — a spring `linear()` or a cubic-bezier. */
|
|
6
|
-
export type MotionCurveKind = "spring" | "bezier";
|
|
7
|
-
/**
|
|
8
|
-
* One row of the CSS↔JS curve table. CANONICAL rows carry their own JS twin;
|
|
9
|
-
* ALIAS rows resolve through a `canonical` target (no duplicated twin).
|
|
10
|
-
*/
|
|
11
|
-
export interface MotionCurve {
|
|
12
|
-
/** The CSS token name, including the leading `--`. */
|
|
13
|
-
readonly token: `--${string}`;
|
|
14
|
-
/** `spring` (a solved `linear()` token) or `bezier` (a cubic-bezier token). */
|
|
15
|
-
readonly kind: MotionCurveKind;
|
|
16
|
-
/**
|
|
17
|
-
* The JS twin — a callable `Easing` (springs, via `springTimingFunction`) or a
|
|
18
|
-
* `TimingFunction` (`(t) => number`, beziers via `CSSCubicBezier`). For ALIAS
|
|
19
|
-
* rows this is the canonical row's twin (resolve-through, not a copy).
|
|
20
|
-
*/
|
|
21
|
-
readonly js: Easing | TimingFunction;
|
|
22
|
-
/**
|
|
23
|
-
* For an ALIAS row: the canonical `--token` this resolves through. `undefined`
|
|
24
|
-
* on a canonical row.
|
|
25
|
-
*/
|
|
26
|
-
readonly canonical?: `--${string}`;
|
|
27
|
-
/** The register doc (springs lift it from the shared preset table). */
|
|
28
|
-
readonly note: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The CSS↔JS curve table, keyed by CSS token name. Covers EVERY `--ease-*` /
|
|
32
|
-
* `--spring-*` token declared in `tokens.css §2` + `theme.css` (CURVE-TABLE-BOUND
|
|
33
|
-
* gate §3.2). Spring rows carry a keyframes.js `Easing`; bezier rows a value.js
|
|
34
|
-
* `TimingFunction`; alias rows resolve through their `canonical` target.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* import { MOTION_CURVES } from "@mkbabb/glass-ui/motion";
|
|
38
|
-
* const easing = MOTION_CURVES["--spring-snappy"].js; // the iOS-control twin
|
|
39
|
-
* new NumericAnimation(frames, { timingFunction: easing });
|
|
40
|
-
*/
|
|
41
|
-
export declare const MOTION_CURVES: Readonly<Record<string, MotionCurve>>;
|
|
42
|
-
/** The canonical (non-alias) curve rows, in declaration order. */
|
|
43
|
-
export declare const MOTION_CURVES_CANONICAL: readonly MotionCurve[];
|
|
44
|
-
/** Look up a curve's JS twin by CSS token name (throws on an unknown token). */
|
|
45
|
-
export declare function motionCurve(token: string): MotionCurve;
|
|
46
|
-
export { linear, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic, easeInSine, easeOutSine, easeInOutSine, easeInCirc, easeOutCirc, easeInOutCirc, easeInExpo, easeOutExpo, easeInOutExpo, easeInBounce, CSSCubicBezier, } from "@mkbabb/value.js";
|
|
47
|
-
export { SPRING_PRESETS, springPreset } from "./springPresets";
|
|
48
|
-
export type { SpringPresetRow, SpringPresetName } from "./springPresets";
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** A glass-ui named-spring preset name. */
|
|
2
|
-
export type SpringPresetName = "smooth" | "snappy" | "bouncy" | "gentle" | "dock";
|
|
3
|
-
/** One named-spring row: the analytic (response, dampingFraction) pair + its register doc. */
|
|
4
|
-
export interface SpringPresetRow {
|
|
5
|
-
/** The token suffix — `--spring-<name>` (CSS) and the `MOTION_CURVES` key. */
|
|
6
|
-
readonly name: SpringPresetName;
|
|
7
|
-
/** Response time in seconds (the spring's `response` solver input). */
|
|
8
|
-
readonly response: number;
|
|
9
|
-
/** Damping fraction ζ (1 = critical; <1 overshoots). */
|
|
10
|
-
readonly dampingFraction: number;
|
|
11
|
-
/** The register this curve serves (the doc-table derives from this one string). */
|
|
12
|
-
readonly comment: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* iOS-canonical (response, dampingFraction) pairs per AL-X4 §3. The names match
|
|
16
|
-
* the `--spring-*` CSS tokens AND the speedtest CSS consumers that read
|
|
17
|
-
* `var(--spring-smooth)` etc. directly, so they MUST stay stable across retunes —
|
|
18
|
-
* only the `(response, ζ)` pair and the emitted curves change.
|
|
19
|
-
*
|
|
20
|
-
* GOVERNED iOS-SPRING VOCABULARY (AX.W05) — the SINGLE source of the register
|
|
21
|
-
* vocabulary. Each row's `comment` names the surface-class that rides it:
|
|
22
|
-
*
|
|
23
|
-
* SETTLE → smooth — patient entrances, fades, scale-ins (no overshoot read).
|
|
24
|
-
* CONTROL → snappy — crisp position morphs: tab underline glide, progress fill,
|
|
25
|
-
* the continuous-marker pop, the generic crisp settle.
|
|
26
|
-
* PLAYFUL → bouncy — deliberate emphatic one-shots ONLY: the bouncy toggle press,
|
|
27
|
-
* dialog/success entrances, the VT default. Largest overshoot.
|
|
28
|
-
* GENTLE → gentle — critically-damped slow settles (the patient end of the ladder).
|
|
29
|
-
* DOCK → dock — the dock expand/collapse morph AND everything inside it.
|
|
30
|
-
*/
|
|
31
|
-
export declare const SPRING_PRESETS: readonly SpringPresetRow[];
|
|
32
|
-
/** Lookup one preset row by name (used by `MOTION_CURVES` spring rows). */
|
|
33
|
-
export declare function springPreset(name: SpringPresetName): SpringPresetRow;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { NumericAnimation, SpringProgress, SmoothProgress, Sequence, Timeline, ManualTimeline, RAFPlayback, ScrollTimeline, createNativeTimeline, flip, flipShared, ElementMorph, drag, Draggable, decay, decayRest, stagger, springTimingFunction, springLinearStops, toEasing, resolveEasing, AnimationOptionError, UnknownEasingError, loadAnimationEngine, } from "@mkbabb/keyframes.js";
|
|
2
|
-
export type { Easing, TimingFunction, TimingFunctionNames, SpringProgressOptions, SpringFrameCallback, SpringSubscriber, SpringLinearStopsOptions, SpringTimingFunctionOptions, SmoothProgressOptions, NumericAnimationOptions, NumericFrameCallback, SequenceEntry, SequenceOptions, SequencePosition, TimelineOptions, NativeTimelineSpec, RAFPlaybackOptions, Tickable, FlipOptions, ElementMorphOptions, MorphRect, DragOptions, DragAxis, DragSubscriber, DecayOptions, DecaySample, StaggerFn, StaggerOptions, StaggerOrigin, AnimationEngine, AnimationOptions, AnimationFrame, AnimateOptions, InputAnimationOptions, ResolvedKeyframes, Vars, } from "@mkbabb/keyframes.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./createContext-B44Sah_H.js";
|
|
2
|
-
//#region src/components/custom/dock/constants.ts
|
|
3
|
-
var t = {
|
|
4
|
-
response: .32,
|
|
5
|
-
dampingFraction: .7
|
|
6
|
-
}, n = new Set([
|
|
7
|
-
"width",
|
|
8
|
-
"height",
|
|
9
|
-
"padding",
|
|
10
|
-
"transform"
|
|
11
|
-
]), r = "glass-ui:dock-context", i = "glass-ui:dock-layer-group", a = "glass-ui:dock-morph-context", o = e(r, "[glass-ui:dock] useDockContext() called outside <GlassDock>; use useOptionalDockContext() if the primitive may render outside a dock."), { KEY: s } = o;
|
|
12
|
-
function c(e) {
|
|
13
|
-
o.provide(e);
|
|
14
|
-
}
|
|
15
|
-
var l = o.use, u = o.useOptional;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { i as a, n as c, u as i, c as n, a as o, l as r, t as s, s as t };
|
package/dist/motion-curves.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./composables/motion/curves";
|
package/dist/motion-curves.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { n as e, t } from "./springPresets-aRSm-4_k.js";
|
|
2
|
-
import { springTimingFunction as n } from "@mkbabb/keyframes.js";
|
|
3
|
-
import { CSSCubicBezier as r, CSSCubicBezier as i, easeInBounce as a, easeInCirc as o, easeInCubic as s, easeInExpo as c, easeInOutCirc as l, easeInOutCubic as u, easeInOutExpo as d, easeInOutQuad as f, easeInOutSine as p, easeInQuad as m, easeInSine as h, easeOutCirc as g, easeOutCubic as _, easeOutExpo as v, easeOutExpo as y, easeOutQuad as b, easeOutSine as x, linear as S } from "@mkbabb/value.js";
|
|
4
|
-
//#region src/composables/motion/curves.ts
|
|
5
|
-
var C = i(.4, 0, .2, 1), w = i(0, 0, .2, 1), T = i(.4, 0, 1, 1), E = y, D = i(.25, .1, .25, 1);
|
|
6
|
-
function O(t) {
|
|
7
|
-
let r = e(t);
|
|
8
|
-
return {
|
|
9
|
-
token: `--spring-${t}`,
|
|
10
|
-
kind: "spring",
|
|
11
|
-
js: n({
|
|
12
|
-
response: r.response,
|
|
13
|
-
dampingFraction: r.dampingFraction
|
|
14
|
-
}),
|
|
15
|
-
note: r.comment
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
var k = [
|
|
19
|
-
...t.map((e) => O(e.name)),
|
|
20
|
-
{
|
|
21
|
-
token: "--motion-ease-standard",
|
|
22
|
-
kind: "bezier",
|
|
23
|
-
js: C,
|
|
24
|
-
note: "Material standard — surface props (bg/border/color/box-shadow/opacity)"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
token: "--motion-ease-out",
|
|
28
|
-
kind: "bezier",
|
|
29
|
-
js: w,
|
|
30
|
-
note: "decelerate — exits, no overshoot"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
token: "--motion-ease-in",
|
|
34
|
-
kind: "bezier",
|
|
35
|
-
js: T,
|
|
36
|
-
note: "accelerate — leaving entrances"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
token: "--motion-ease-out-expo",
|
|
40
|
-
kind: "bezier",
|
|
41
|
-
js: E,
|
|
42
|
-
note: "house expo — bold decelerating reveal (the underline draw-on register)"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
token: "--motion-ease-apple",
|
|
46
|
-
kind: "bezier",
|
|
47
|
-
js: D,
|
|
48
|
-
note: "Apple ambient — the Pulse aura register (NOT an interactive-transform authority)"
|
|
49
|
-
}
|
|
50
|
-
];
|
|
51
|
-
function A(e) {
|
|
52
|
-
let t = k.find((t) => t.token === e);
|
|
53
|
-
if (!t) throw Error(`MOTION_CURVES alias targets a missing canonical row: ${e}`);
|
|
54
|
-
return t.js;
|
|
55
|
-
}
|
|
56
|
-
var j = [
|
|
57
|
-
{
|
|
58
|
-
token: "--ease-standard",
|
|
59
|
-
canonical: "--motion-ease-standard",
|
|
60
|
-
note: "alias → --motion-ease-standard"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
token: "--ease-out",
|
|
64
|
-
canonical: "--motion-ease-out",
|
|
65
|
-
note: "alias → --motion-ease-out"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
token: "--ease-in",
|
|
69
|
-
canonical: "--motion-ease-in",
|
|
70
|
-
note: "alias → --motion-ease-in"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
token: "--ease-out-expo",
|
|
74
|
-
canonical: "--motion-ease-out-expo",
|
|
75
|
-
note: "alias → --motion-ease-out-expo"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
token: "--ease-apple",
|
|
79
|
-
canonical: "--motion-ease-apple",
|
|
80
|
-
note: "alias → --motion-ease-apple"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
token: "--ease-spring",
|
|
84
|
-
canonical: "--spring-snappy",
|
|
85
|
-
note: "alias → --spring-snappy (the default spring register)"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
token: "--ease-decelerate",
|
|
89
|
-
canonical: "--motion-ease-out",
|
|
90
|
-
note: "alias → --motion-ease-out"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
token: "--ease-accelerate",
|
|
94
|
-
canonical: "--motion-ease-in",
|
|
95
|
-
note: "alias → --motion-ease-in"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
token: "--ease-spring-smooth",
|
|
99
|
-
canonical: "--spring-smooth",
|
|
100
|
-
note: "@theme alias → --spring-smooth"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
token: "--ease-spring-snappy",
|
|
104
|
-
canonical: "--spring-snappy",
|
|
105
|
-
note: "@theme alias → --spring-snappy"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
token: "--ease-spring-bouncy",
|
|
109
|
-
canonical: "--spring-bouncy",
|
|
110
|
-
note: "@theme alias → --spring-bouncy"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
token: "--ease-spring-gentle",
|
|
114
|
-
canonical: "--spring-gentle",
|
|
115
|
-
note: "@theme alias → --spring-gentle"
|
|
116
|
-
}
|
|
117
|
-
].map(({ token: e, canonical: t, note: n }) => ({
|
|
118
|
-
token: e,
|
|
119
|
-
kind: k.find((e) => e.token === t).kind,
|
|
120
|
-
js: A(t),
|
|
121
|
-
canonical: t,
|
|
122
|
-
note: n
|
|
123
|
-
})), M = Object.freeze(Object.fromEntries([...k, ...j].map((e) => [e.token, e]))), N = k;
|
|
124
|
-
function P(e) {
|
|
125
|
-
let t = M[e];
|
|
126
|
-
if (!t) throw Error(`Unknown motion curve token: ${e}`);
|
|
127
|
-
return t;
|
|
128
|
-
}
|
|
129
|
-
//#endregion
|
|
130
|
-
export { r as CSSCubicBezier, M as MOTION_CURVES, N as MOTION_CURVES_CANONICAL, t as SPRING_PRESETS, a as easeInBounce, o as easeInCirc, s as easeInCubic, c as easeInExpo, l as easeInOutCirc, u as easeInOutCubic, d as easeInOutExpo, f as easeInOutQuad, p as easeInOutSine, m as easeInQuad, h as easeInSine, g as easeOutCirc, _ as easeOutCubic, v as easeOutExpo, b as easeOutQuad, x as easeOutSine, S as linear, P as motionCurve, e as springPreset };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
//#region src/composables/motion/springPresets.ts
|
|
2
|
-
var e = [
|
|
3
|
-
{
|
|
4
|
-
name: "smooth",
|
|
5
|
-
response: .5,
|
|
6
|
-
dampingFraction: .86,
|
|
7
|
-
comment: "SETTLE register — entrances/fades/scale-ins, no overshoot read"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: "snappy",
|
|
11
|
-
response: .35,
|
|
12
|
-
dampingFraction: .65,
|
|
13
|
-
comment: "CONTROL register — crisp position morphs (tab underline, progress fill, marker pop), overshoot ~+6.8%"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: "bouncy",
|
|
17
|
-
response: .5,
|
|
18
|
-
dampingFraction: .45,
|
|
19
|
-
comment: "PLAYFUL register — emphatic one-shots only (bouncy toggle, dialog/success entrance, VT default), overshoot ~+20.5%"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: "gentle",
|
|
23
|
-
response: .7,
|
|
24
|
-
dampingFraction: 1,
|
|
25
|
-
comment: "GENTLE register — patient critically-damped settle, reached via the --ease-spring-gentle @theme alias"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: "dock",
|
|
29
|
-
response: .32,
|
|
30
|
-
dampingFraction: .7,
|
|
31
|
-
comment: "DOCK register — dock expand/collapse morph + the in-dock Slider thumb, iOS-control settled, overshoot ~+4.6%"
|
|
32
|
-
}
|
|
33
|
-
];
|
|
34
|
-
function t(t) {
|
|
35
|
-
let n = e.find((e) => e.name === t);
|
|
36
|
-
if (!n) throw Error(`Unknown spring preset: ${t}`);
|
|
37
|
-
return n;
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
export { t as n, e as t };
|