@mkbabb/glass-ui 3.13.0 → 4.0.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-XH4YBVEK.js +158 -0
- package/dist/{CommandShortcut-RowNEO6i.js → CommandShortcut-DdtWXxOK.js} +57 -52
- package/dist/{ContextMenuSubContent-BQmxTAdw.js → ContextMenuSubContent-B0Vs6atR.js} +1 -1
- package/dist/{DataTable-BCddn3T3.js → DataTable-C464Zbqd.js} +99 -97
- package/dist/DialogContent-DDE6pQBU.js +103 -0
- package/dist/{DialogFooter-Blu4t7tJ.js → DialogFooter-8eZbdmPc.js} +1 -1
- package/dist/FadingScroll-DwNnvKMs.js +76 -0
- package/dist/{HoverPopover-CISOJQuZ.js → HoverPopover-Dpzwvc4t.js} +1 -1
- package/dist/IconChip-BDw1j5mu.js +54 -0
- package/dist/{MetricBadge-C9QMz1KT.js → MetricBadge-BpC0R_Ec.js} +1 -1
- package/dist/{Notification-DdwNxIrI.js → Notification-DKjKsQq8.js} +8 -8
- package/dist/{NumberFieldContent-CqaN-SvN.js → NumberFieldContent-1VtwDSgf.js} +1 -1
- package/dist/PopoverContent-BTorlp--.js +127 -0
- package/dist/{Progress-DwlUKGbr.js → Progress-hAT4gqGH.js} +97 -77
- package/dist/{ScrollingText-DfFrwSph.js → ScrollingText-CUVFTWk2.js} +2 -2
- package/dist/{SelectScrollDownButton-CiDUxfEj.js → SelectScrollDownButton-C1jb3b3K.js} +22 -6
- package/dist/{Switch-CsIuYP_e.js → Switch-Dr--uLGH.js} +1 -1
- package/dist/{Toaster-D6q4HtXu.js → Toaster-Bm_HQSpc.js} +6 -6
- package/dist/{ToggleGroupItem-D_AHlRw9.js → ToggleGroupItem-Dzk9hWsF.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +8 -5
- package/dist/api.js +2 -2
- package/dist/aurora.js +132 -117
- package/dist/{button-ChXMfsud.js → button-BNDWhAZb.js} +2 -2
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.d.ts +1 -1
- package/dist/carousel.js +97 -141
- package/dist/collapsible.js +1 -1
- package/dist/color-swatch.d.ts +1 -0
- package/dist/color-swatch.js +47 -0
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/components/custom/aurora/constants/presets.d.ts +28 -0
- package/dist/components/custom/aurora/constants/renderMode.d.ts +2 -0
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/color-swatch/ColorSwatch.vue.d.ts +22 -0
- package/dist/components/custom/color-swatch/index.d.ts +1 -0
- package/dist/components/custom/configurator/Configurator.vue.d.ts +19 -8
- package/dist/components/custom/constellation/Constellation.vue.d.ts +18 -206
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +26 -0
- package/dist/components/custom/constellation/constellationField.d.ts +2 -369
- package/dist/components/custom/constellation/constellationTypes.d.ts +369 -0
- package/dist/components/custom/constellation/index.d.ts +1 -1
- package/dist/components/custom/dock/DockRail.vue.d.ts +17 -16
- package/dist/components/custom/dock/DockSection.vue.d.ts +69 -0
- package/dist/components/custom/dock/DockSeparator.vue.d.ts +49 -1
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +5 -5
- package/dist/components/custom/dock/constants.d.ts +35 -0
- package/dist/components/custom/dock/index.d.ts +2 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
- package/dist/components/custom/fading-scroll/FadingScroll.vue.d.ts +25 -0
- package/dist/components/custom/fading-scroll/composables/useFadingScroll.d.ts +31 -0
- package/dist/components/custom/fading-scroll/constants.d.ts +19 -0
- package/dist/components/custom/fading-scroll/index.d.ts +2 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +7 -0
- package/dist/components/custom/fourier-field/index.d.ts +1 -1
- package/dist/components/custom/fourier-field/math.d.ts +17 -0
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +8 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +11 -1
- package/dist/components/custom/goo-blob/constants.d.ts +6 -1
- package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
- package/dist/components/custom/handmark/brush.d.ts +269 -0
- package/dist/components/custom/handmark/composables/useHandMark.d.ts +89 -0
- package/dist/components/custom/handmark/constants.d.ts +39 -0
- package/dist/components/custom/handmark/freehand.d.ts +69 -0
- package/dist/components/custom/handmark/geometry.d.ts +52 -0
- package/dist/components/custom/handmark/index.d.ts +27 -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 +62 -0
- package/dist/components/custom/icon-chip/IconChip.vue.d.ts +4 -0
- package/dist/components/custom/icon-chip/index.d.ts +2 -0
- package/dist/components/custom/icon-chip/types.d.ts +72 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +15 -2
- package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +39 -0
- package/dist/components/custom/pager-dots/index.d.ts +2 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +20 -25
- package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +30 -21
- package/dist/components/custom/tabs/constants.d.ts +9 -3
- package/dist/components/custom/tabs/index.d.ts +1 -1
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +14 -0
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/menuItemVariants.d.ts +19 -0
- package/dist/components/ui/_shared/useSurfaceAxis.d.ts +41 -0
- package/dist/components/ui/card/Card.vue.d.ts +1 -1
- package/dist/components/ui/carousel/index.d.ts +0 -1
- package/dist/components/ui/command/Command.vue.d.ts +3 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -3
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +5 -0
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +3 -0
- package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +14 -3
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +27 -4
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +6 -0
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +3 -0
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +23 -1
- package/dist/composables/motion/useViewTransition.d.ts +36 -1
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +2 -2
- package/dist/constellation.js +92 -94
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +10 -4
- package/dist/dark.d.ts +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +510 -321
- package/dist/{dockContext-BegmJVmx.js → dockContext-Bu1Avy-a.js} +1 -1
- package/dist/dom.js +5 -5
- package/dist/{dropdown-menu-DzkkyBwX.js → dropdown-menu-BJ7E9js_.js} +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +42 -38
- package/dist/fading-scroll.d.ts +1 -0
- package/dist/fading-scroll.js +2 -0
- package/dist/forms.js +3 -3
- package/dist/fourier-field.js +38 -37
- package/dist/fourier-math.js +2 -2
- package/dist/glass-panel.js +39 -36
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +129 -145
- package/dist/goo-blob.js +86 -81
- package/dist/handmark.d.ts +1 -0
- package/dist/handmark.js +707 -0
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-chip.d.ts +1 -0
- package/dist/icon-chip.js +2 -0
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/{math-U6-RrLmV.js → math-DeuJwLFx.js} +11 -3
- package/dist/{menuItemVariants-DPiEarb0.js → menuItemVariants-DWRQXBxJ.js} +10 -4
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +25 -22
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +33 -32
- package/dist/motion-curves.js +1 -1
- package/dist/motion.js +4 -4
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.d.ts +1 -0
- package/dist/pager-dots.js +91 -0
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-BKVyQfbt.js → presets-BW2b-fr1.js} +14 -1
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +5 -5
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-1fChZjtw.js → sheet-CquRYOAw.js} +59 -55
- package/dist/sheet.js +1 -1
- package/dist/{slider-B-JP2JlI.js → slider-DQ95MET2.js} +7 -7
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/styles/animations.css +11 -26
- package/dist/styles/components.css +1 -1
- package/dist/styles/configurator.css +35 -0
- package/dist/styles/dock/density.css +19 -0
- package/dist/styles/dock/overflow.css +15 -0
- package/dist/styles/dock/rail-extend.css +168 -71
- package/dist/styles/dock/section.css +59 -0
- package/dist/styles/dock/shell.css +34 -5
- package/dist/styles/dock-controls/icon-button.css +11 -1
- package/dist/styles/dock-controls/tab-button.css +24 -83
- package/dist/styles/dock-controls/triggers.css +7 -0
- package/dist/styles/dock.css +6 -3
- package/dist/styles/drawer.css +46 -0
- package/dist/styles/feedback-tone.css +104 -0
- package/dist/styles/glass/ladder.css +68 -22
- package/dist/styles/glass/surface-axis.css +113 -0
- package/dist/styles/glass/surfaces.css +88 -12
- package/dist/styles/glass.css +5 -2
- package/dist/styles/icon-chip.css +149 -0
- package/dist/styles/index.css +67 -5
- package/dist/styles/instrument-chassis.css +42 -0
- package/dist/styles/menu.css +127 -0
- package/dist/styles/segmented-tabs.css +160 -89
- package/dist/styles/select.css +50 -0
- package/dist/styles/theme/bridges.css +11 -1
- package/dist/styles/tokens/color-radius.css +40 -13
- package/dist/styles/tokens/dark-arm.css +124 -16
- package/dist/styles/tokens/glass.css +83 -23
- package/dist/styles/tokens/light-dark.css +48 -19
- package/dist/styles/tokens/offsets-sizing.css +62 -0
- package/dist/styles/tokens/property-regs.css +3 -10
- package/dist/styles/tokens/scale-paper.css +45 -2
- package/dist/styles/tokens/scheme-motion.css +32 -14
- package/dist/styles/transitions.css +7 -7
- package/dist/styles/typography/scale.css +153 -0
- package/dist/styles/typography/semantic.css +220 -0
- package/dist/styles/typography/utilities.css +159 -0
- package/dist/styles/typography.css +23 -507
- package/dist/styles/utilities/a11y-overrides.css +33 -4
- package/dist/styles/utilities/base.css +177 -1
- package/dist/styles/utilities/btn.css +18 -201
- package/dist/styles/view-transition.css +4 -1
- package/dist/switch.js +1 -1
- package/dist/tabs.js +154 -183
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +3 -1
- package/dist/toggle-group.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-C_3wZLx4.js} +1 -1
- package/dist/useConfiguratorState-kiIlun8I.js +303 -0
- package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-C28t0VWJ.js} +22 -3
- package/dist/{useRAFLoop-Bxv0o6L5.js → useRAFLoop-CdwJ7284.js} +1 -1
- package/dist/{useSpringMount-CI2jOstM.js → useSpringMount-CvopqiFr.js} +1 -1
- package/dist/useSurfaceAxis-CMnF2zHb.js +7 -0
- package/dist/{useTouchGate-Dg7MQI1G.js → useTouchGate-28Tk2-t2.js} +1 -1
- package/dist/{vReveal-CqaCz_mC.js → useViewTransition-COsPjQVZ.js} +15 -12
- package/dist/vReveal-D9k0jADx.js +10 -0
- package/dist/watercolor-dot.js +12 -5
- package/package.json +71 -7
- package/src/styles/animations.css +11 -26
- package/src/styles/configurator.css +35 -0
- package/src/styles/dock/density.css +19 -0
- package/src/styles/dock/overflow.css +15 -0
- package/src/styles/dock/rail-extend.css +168 -71
- package/src/styles/dock/section.css +59 -0
- package/src/styles/dock/shell.css +34 -5
- package/src/styles/dock-controls/icon-button.css +11 -1
- package/src/styles/dock-controls/tab-button.css +24 -83
- package/src/styles/dock-controls/triggers.css +7 -0
- package/src/styles/dock.css +6 -3
- package/src/styles/drawer.css +42 -0
- package/src/styles/feedback-tone.css +104 -0
- package/src/styles/glass/ladder.css +68 -22
- package/src/styles/glass/surface-axis.css +113 -0
- package/src/styles/glass/surfaces.css +88 -12
- package/src/styles/glass.css +5 -2
- package/src/styles/icon-chip.css +149 -0
- package/src/styles/index.css +66 -4
- package/src/styles/instrument-chassis.css +42 -0
- package/src/styles/menu.css +127 -0
- package/src/styles/segmented-tabs.css +156 -87
- package/src/styles/select.css +50 -0
- package/src/styles/theme/bridges.css +11 -1
- package/src/styles/tokens/color-radius.css +40 -13
- package/src/styles/tokens/dark-arm.css +124 -16
- package/src/styles/tokens/glass.css +83 -23
- package/src/styles/tokens/light-dark.css +48 -19
- package/src/styles/tokens/offsets-sizing.css +62 -0
- package/src/styles/tokens/property-regs.css +3 -10
- package/src/styles/tokens/scale-paper.css +45 -2
- package/src/styles/tokens/scheme-motion.css +32 -14
- package/src/styles/transitions.css +7 -7
- package/src/styles/typography/scale.css +153 -0
- package/src/styles/typography/semantic.css +220 -0
- package/src/styles/typography/utilities.css +159 -0
- package/src/styles/typography.css +23 -507
- package/src/styles/utilities/a11y-overrides.css +33 -4
- package/src/styles/utilities/base.css +177 -1
- package/src/styles/utilities/btn.css +18 -201
- package/src/styles/view-transition.css +4 -1
- package/dist/CardAction-Cj2eycQ2.js +0 -157
- package/dist/DialogContent-Dl9WkAoS.js +0 -100
- package/dist/PopoverContent-BYwt2-4x.js +0 -121
- package/dist/TabsList-Dttss653.js +0 -105
- 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/components/ui/carousel/CarouselDots.vue.d.ts +0 -4
- package/dist/underline.d.ts +0 -1
- package/dist/underline.js +0 -85
- package/dist/useConfiguratorState-DAoeHVue.js +0 -287
- /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-C_s6fG7r.js} +0 -0
- /package/dist/{ContextMenuContent-CT3AS1WX.js → ContextMenuContent-ON3x7cuk.js} +0 -0
- /package/dist/{HoverCardContent-Csywg3YF.js → HoverCardContent-DkMaQzH5.js} +0 -0
- /package/dist/{IconTooltip-DPzE09X9.js → IconTooltip-DSjasZIt.js} +0 -0
- /package/dist/{Input-DWQQIOC4.js → Input-DVG_J0ne.js} +0 -0
- /package/dist/{Label-r3WzWrsj.js → Label-Ck9SWEKM.js} +0 -0
- /package/dist/{ModalOverlay-DVLI2VRr.js → ModalOverlay-CkPRRgl_.js} +0 -0
- /package/dist/{PaperBackdrop-DIXTtVq6.js → PaperBackdrop-nBKe0vkB.js} +0 -0
- /package/dist/{SelectGroup-aumMgWLs.js → SelectGroup-Dcczq44n.js} +0 -0
- /package/dist/{SelectSeparator-BQ_1Fcbp.js → SelectSeparator-DK2y1Bun.js} +0 -0
- /package/dist/{Separator-0JE6LtNu.js → Separator-BArl4OaB.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-CBt_VvXa.js} +0 -0
- /package/dist/{color-CUYeFbgd.js → color-DweYl7pE.js} +0 -0
- /package/dist/{compile-B7NGOBcP.js → compile-EXXzEr1q.js} +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
- /package/dist/{createContext-BM46COQ-.js → createContext-B2RaZ-b8.js} +0 -0
- /package/dist/{prng-D27-B3tK.js → prng-Cg22zv8g.js} +0 -0
- /package/dist/{springPresets--YdWTHtm.js → springPresets-WXaLbu8u.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
- /package/dist/{useInterval-iHludrxk.js → useInterval-CNdua40W.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
- /package/dist/{useLiquidFlex-BL0lLLN2.js → useLiquidFlex-C12hXwOZ.js} +0 -0
- /package/dist/{useResizeObserver-BhgdhOIj.js → useResizeObserver-V6nq5gJb.js} +0 -0
- /package/dist/{useResolveTokenColor-Dvn2RZJW.js → useResolveTokenColor-NUG2zYAW.js} +0 -0
- /package/dist/{useScrollProgress-Dlvx-L3v.js → useScrollProgress-D7bYU2RK.js} +0 -0
- /package/dist/{useSortable-muI29agz.js → useSortable-BVqlJRBR.js} +0 -0
- /package/dist/{useTextHighlight-DmRYkOBx.js → useTextHighlight-NmBM5V_4.js} +0 -0
- /package/dist/{useTimer-Dzarvzuk.js → useTimer-B_PAasDL.js} +0 -0
- /package/dist/{useUserInvalidAria-B2h6jAM_.js → useUserInvalidAria-CDfJuakL.js} +0 -0
- /package/dist/{useViewportReady-B40FK4Pa.js → useViewportReady-CvBcCYDf.js} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Scroll axis. `"x"` is the horizontal strip, `"y"` the vertical column. Default `"x"`. */
|
|
3
|
+
axis?: "x" | "y";
|
|
4
|
+
/** Feather the start edge once scrolled past the start. Default `true`. */
|
|
5
|
+
fadeStart?: boolean;
|
|
6
|
+
/** Feather the end edge while trailing overflow remains. Default `true`. */
|
|
7
|
+
fadeEnd?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
axis: "x" | "y";
|
|
15
|
+
fadeStart: boolean;
|
|
16
|
+
fadeEnd: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { MaybeRef, Ref } from "vue";
|
|
2
|
+
export interface UseFadingScrollOptions {
|
|
3
|
+
/** Scroll axis. `"x"` reads scrollLeft/Width; `"y"` reads scrollTop/Height. Default `"x"`. */
|
|
4
|
+
axis?: "x" | "y";
|
|
5
|
+
/** Feather the start edge once scrolled past the start. Default `true`. */
|
|
6
|
+
fadeStart?: boolean;
|
|
7
|
+
/** Feather the end edge while trailing overflow remains. Default `true`. */
|
|
8
|
+
fadeEnd?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseFadingScrollControls {
|
|
11
|
+
/** True when this composable is the ACTIVE writer (the native timeline is absent). */
|
|
12
|
+
readonly active: Readonly<Ref<boolean>>;
|
|
13
|
+
/** Re-measure the scroll state and rewrite the customs. Safe to call manually. */
|
|
14
|
+
measure: () => void;
|
|
15
|
+
/** Detach all listeners/observers. Auto-called on unmount in a component scope. */
|
|
16
|
+
stop: () => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Drive the per-edge `--fade-start` / `--fade-end` mask-width customs off an
|
|
20
|
+
* element's live scroll state, the JS fallback for the native `scroll(self)`
|
|
21
|
+
* timeline. On a supporting engine this attaches NOTHING (the CSS recipe is the
|
|
22
|
+
* sole writer); on a non-supporting engine it measures `scrollLeft/Top`,
|
|
23
|
+
* `scrollWidth/Height − clientWidth/Height`, a `ResizeObserver` (the shared
|
|
24
|
+
* `useResizeObserver` substrate) + a rAF-coalesced `scroll` listener, writing
|
|
25
|
+
* `--fade-start = --fade-scroll-width` only past `scroll > 0` and `--fade-end`
|
|
26
|
+
* only while trailing overflow remains. The customs default to `0px` (no
|
|
27
|
+
* feather) so the at-rest no-overflow edge is SHARP.
|
|
28
|
+
*
|
|
29
|
+
* @param target the scroll-port element (the same element the CSS customs apply to)
|
|
30
|
+
*/
|
|
31
|
+
export declare function useFadingScroll(target: MaybeRef<HTMLElement | null>, options?: UseFadingScrollOptions): UseFadingScrollControls;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The module-scope constants for the FadingScroll family — the colocation home
|
|
3
|
+
* (`proof:colocation`) the dir owes once it carries a complex composable. Both
|
|
4
|
+
* were promoted out of `composables/useFadingScroll.ts` verbatim.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* True when the engine genuinely supports a `scroll()` timeline — the CSS recipe
|
|
8
|
+
* in `utilities/base.css` then owns the visual axis on the compositor and the
|
|
9
|
+
* `useFadingScroll` composable becomes the inert (non-attaching) path. Module-level
|
|
10
|
+
* so the feature gate is computed once. (Mirrors `useScrollProgress`'s twin.)
|
|
11
|
+
*/
|
|
12
|
+
export declare const NATIVE_SCROLL_TIMELINE: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Tolerance (CSS px) absorbing scroll-snap jitter — `snap-mandatory` parks the
|
|
15
|
+
* active card a few px off the true start, so the start edge reads as sharp until
|
|
16
|
+
* the user genuinely scrolls past the first child. Promoted verbatim from the
|
|
17
|
+
* bespoke `PresetPickerRow` SNAP_TOLERANCE.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SNAP_TOLERANCE = 12;
|
|
@@ -38,6 +38,13 @@ type __VLS_Props = {
|
|
|
38
38
|
* loudness); clamped [0, 2] — the field's ~2 upper bound lets a hero push
|
|
39
39
|
* brighter than the recessed default without runaway. */
|
|
40
40
|
intensity?: number;
|
|
41
|
+
/** OPTIONAL injected clock — a getter returning the loop parameter `t ∈ [0,1)`.
|
|
42
|
+
* When BOUND, the render reads `clock()` (a controllable studio clock: pause,
|
|
43
|
+
* scrub, speed); when ABSENT (the ambient face), the autonomous
|
|
44
|
+
* `(now / durationMs) % 1` frame-time loop is the DEFAULT. `freeze` /
|
|
45
|
+
* `prefers-reduced-motion` still short-circuit to `frozenT` regardless — the
|
|
46
|
+
* ambient bundle is unchanged. The SOLE additive seam (BA.W-FOURIER-STUDIO). */
|
|
47
|
+
clock?: () => number;
|
|
41
48
|
};
|
|
42
49
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
50
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ColorResolver } from "../../../composables/color";
|
|
2
2
|
export { default as FourierField } from "./FourierField.vue";
|
|
3
|
-
export { comp, positionsAt, dftFromPoints, makeEllipticSpectrum, type BasisComponent, type EllipticSpectrumOptions, } from "./math";
|
|
3
|
+
export { comp, positionsAt, partialSumAt, dftFromPoints, makeEllipticSpectrum, type BasisComponent, type EllipticSpectrumOptions, } from "./math";
|
|
4
4
|
/** The configuration-BUNDLE axis — `hero` (epicycles on, fewer harmonics) vs
|
|
5
5
|
* `final` (epicycles off, denser). Not a recolour of one curve; one engine,
|
|
6
6
|
* two presets. */
|
|
@@ -23,6 +23,23 @@ export declare function comp(index: number, re: number, im: number): BasisCompon
|
|
|
23
23
|
* carries).
|
|
24
24
|
*/
|
|
25
25
|
export declare function positionsAt(components: BasisComponent[], t: number, maxCircles?: number): [number, number][];
|
|
26
|
+
/**
|
|
27
|
+
* The PARTIAL-SUM curve point at parameter `t` over the FIRST `maxTerms` phasors
|
|
28
|
+
* — the inverse-DFT truncated summation `Σ_{k<maxTerms} c_k * exp(2*pi*i*k*t)`.
|
|
29
|
+
* It is {@link positionsAt} truncated at `maxTerms` and read at the FINAL tip:
|
|
30
|
+
* the single curve POINT (not the whole chain). The truncation axis is the SAME
|
|
31
|
+
* one `positionsAt`'s `maxCircles` arg drives — `maxCircles` reads the whole
|
|
32
|
+
* chain truncated, `partialSumAt` reads only its endpoint — so the studio's
|
|
33
|
+
* N-harmonics slider can draw the assembling chain (`positionsAt(.., N)`) AND the
|
|
34
|
+
* resolving curve point (`partialSumAt(.., t, N)`) off the ONE axis. Sweeping `t`
|
|
35
|
+
* over `[0,1)` and joining the points traces the partial-sum CURVE: at `maxTerms`
|
|
36
|
+
* = 1 a single ellipse, growing toward the full reconstruction as `maxTerms`
|
|
37
|
+
* climbs to `components.length` (the reference's "watch it sum" beauty).
|
|
38
|
+
*
|
|
39
|
+
* `maxTerms` omitted (or ≥ `components.length`) is the full reconstruction — the
|
|
40
|
+
* same point `positionsAt(components, t)` returns at its final tip.
|
|
41
|
+
*/
|
|
42
|
+
export declare function partialSumAt(components: BasisComponent[], t: number, maxTerms?: number): [number, number];
|
|
26
43
|
/**
|
|
27
44
|
* The forward DFT — the inverse of {@link positionsAt}. Takes a closed sequence
|
|
28
45
|
* of `[x, y]` samples around a curve (treated as the complex signal `x + i·y`,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type GlassTier } from "../../../composables/glass/useGlassRenderer";
|
|
2
|
+
import { type Surface } from "../../ui/_shared/useSurfaceAxis";
|
|
2
3
|
/**
|
|
3
4
|
* Surface-tier vocabulary for the CSS rendering branch. Mirrors the v0.8
|
|
4
5
|
* five-rung ladder declared in `tokens.css §8` and consumed by the
|
|
@@ -18,6 +19,12 @@ export interface GlassPanelProps {
|
|
|
18
19
|
chromaticAberration?: boolean;
|
|
19
20
|
/** Glass surface tier for the CSS rendering branch (v0.8 5-rung ladder). */
|
|
20
21
|
variant?: GlassPanelVariant;
|
|
22
|
+
/** Surface decoration register (BA.W-SURFACE-AXIS) — the SHARED
|
|
23
|
+
* {glass·veil·opaque} axis. `glass` (default) renders the variant's plain
|
|
24
|
+
* glass rung; `veil` overlays the borderless/rimless text-legibility plate;
|
|
25
|
+
* `opaque` sets `--glass-level:0` (the solid-card escape). Orthogonal to
|
|
26
|
+
* `variant`/`tier`, exactly as `surface` is on `<Card>`. */
|
|
27
|
+
surface?: Surface;
|
|
21
28
|
/** Additional classes */
|
|
22
29
|
class?: string;
|
|
23
30
|
}
|
|
@@ -27,6 +34,7 @@ type __VLS_Slots = {} & {
|
|
|
27
34
|
};
|
|
28
35
|
declare const __VLS_base: import("vue").DefineComponent<GlassPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GlassPanelProps> & Readonly<{}>, {
|
|
29
36
|
variant: GlassPanelVariant;
|
|
37
|
+
surface: Surface;
|
|
30
38
|
blur: number;
|
|
31
39
|
refraction: number;
|
|
32
40
|
chromaticAberration: boolean;
|
|
@@ -24,10 +24,20 @@ export interface UseMetaballRendererOptions {
|
|
|
24
24
|
satellites: BlobSatelliteSystem;
|
|
25
25
|
config: BlobConfig;
|
|
26
26
|
}
|
|
27
|
-
/** The renderer's public control surface — pause/resume the demand loop. */
|
|
27
|
+
/** The renderer's public control surface — pause/resume + wake the demand loop. */
|
|
28
28
|
export interface UseMetaballRendererReturn {
|
|
29
29
|
pause: () => void;
|
|
30
30
|
resume: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* BA.W-GOO-REDRESS — re-arm the demand-parked loop on demand (the public twin
|
|
33
|
+
* of the internal `color`/`paletteStops` wake watchers). The SFC's pointer-wake
|
|
34
|
+
* wire calls this so a first hover over a fully-parked blob (all satellites
|
|
35
|
+
* orbiting → the AX.W16 quiescence gate has parked the rAF) repaints on the
|
|
36
|
+
* SAME frame instead of waiting up to an orbit horizon for the next scheduled
|
|
37
|
+
* satellite wake (root cause 2 / BA-goo-3). It is the EXISTING substrate wake
|
|
38
|
+
* handle — NO new rAF, NO second wake path (the single-substrate-loop invariant).
|
|
39
|
+
*/
|
|
40
|
+
wake: () => void;
|
|
31
41
|
}
|
|
32
42
|
/**
|
|
33
43
|
* The GooBlob WebGL renderer — composes the `useWebGLCanvas` substrate (AU.W6).
|
|
@@ -42,7 +42,12 @@ export declare const PULSE_OMEGA = 18;
|
|
|
42
42
|
export declare const PULSE_ZETA = 0.35;
|
|
43
43
|
/** The at-rest epsilon — velocity/position below this is "settled" (the park gate). */
|
|
44
44
|
export declare const REST_EPS = 0.001;
|
|
45
|
-
|
|
45
|
+
export declare const ORBIT_RANDOM_BASE = 0.85;
|
|
46
|
+
export declare const ORBIT_RANDOM_SPAN = 0.2;
|
|
47
|
+
export declare const SAT_WOBBLE1_BASE = 0.015;
|
|
48
|
+
export declare const SAT_WOBBLE1_SPAN = 0.02;
|
|
49
|
+
export declare const SAT_WOBBLE2_BASE = 0.01;
|
|
50
|
+
export declare const SAT_WOBBLE2_SPAN = 0.015;
|
|
46
51
|
export declare const BASE_OPACITY = 0.75;
|
|
47
52
|
/** Duration (ms) to blend from emerge endpoint into live orbit — eliminates snap. */
|
|
48
53
|
export declare const ORBIT_BLEND_MS = 2000;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HandMarkProps } from "./types";
|
|
2
|
+
declare function play(): void;
|
|
3
|
+
declare var __VLS_1: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
default?: (props: typeof __VLS_1) => any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<HandMarkProps, {
|
|
8
|
+
play: typeof play;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HandMarkProps> & Readonly<{}>, {
|
|
10
|
+
color: string;
|
|
11
|
+
seed: number;
|
|
12
|
+
shape: import("./types").HandShape;
|
|
13
|
+
animation: import("./types").HandAnimation;
|
|
14
|
+
appear: "mount" | "visible" | "manual";
|
|
15
|
+
jagged: boolean;
|
|
16
|
+
brush: import("./brush").BrushName | Partial<import("./brush").Brush>;
|
|
17
|
+
drawMs: number;
|
|
18
|
+
drawDelayMs: number;
|
|
19
|
+
boilFps: number;
|
|
20
|
+
boilFrames: number;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brush.ts — the flat Brush DATA model (the keystone; SPEC §2). Pure data, 0 deps.
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* A `Brush` is a plain JSON-serialisable record — twelve scalars, four enums, and
|
|
5
|
+
* one optional `stamp` function. Every built-in medium is a frozen literal: a
|
|
6
|
+
* POINT in one continuous parameter space, NOT a class in a taxonomy. The renderer
|
|
7
|
+
* (`ink.ts`) reads fields — it NEVER branches on instrument name (SPEC §12 acc-1).
|
|
8
|
+
* Adding a medium = adding one row here; an in-between medium = a spread/lerp.
|
|
9
|
+
*
|
|
10
|
+
* Field-count discipline (SPEC §2): resist a 13th scalar per new instrument —
|
|
11
|
+
* `blend` earned its place only because highlighter genuinely needed `multiply`.
|
|
12
|
+
*
|
|
13
|
+
* The shipped register: PEN is the default (clean ink, grain:0 ⇒ no filter); the
|
|
14
|
+
* CRAYON ships as the proven STROKE-crayon (constant-width offset passes + the
|
|
15
|
+
* seeded static feTurbulence grain — `ds-crayon-handmark` verdict), i.e.
|
|
16
|
+
* `ribbon:'stroke'`. The HIGHLIGHTER (BA.W-HANDMARK C-1) ENGAGES `ribbon:'hull'`
|
|
17
|
+
* — the perfect-freehand variable-width slab the atlas's field delta names — so the
|
|
18
|
+
* vendored pf body ships whenever the highlighter does (the budget note in the cut
|
|
19
|
+
* + a `profile:budget` rebaseline).
|
|
20
|
+
*/
|
|
21
|
+
export type BlendMode = "source-over" | "multiply" | "darken" | "screen";
|
|
22
|
+
export interface TaperSpec {
|
|
23
|
+
/** px the width ramps 0→full at the start (lift-on). */
|
|
24
|
+
start: number;
|
|
25
|
+
/** px the width ramps full→0 at the end (lift-off / dry run-out). */
|
|
26
|
+
end: number;
|
|
27
|
+
/** out-cubic = the lazy pencil run-out. */
|
|
28
|
+
ease: "linear" | "out-cubic";
|
|
29
|
+
}
|
|
30
|
+
export interface Brush {
|
|
31
|
+
/** base stroke diameter, in viewBox units. */
|
|
32
|
+
weight: number;
|
|
33
|
+
/** 0..1.4 seeded ±width variance along arc-length. */
|
|
34
|
+
weightJitter: number;
|
|
35
|
+
/** -1..1 pressure→width gain (pf `thinning`). */
|
|
36
|
+
thinning: number;
|
|
37
|
+
/** lift-on / lift-off ramp. */
|
|
38
|
+
taper: TaperSpec;
|
|
39
|
+
/** L2 body strategy: plain stroked <path> | pf filled hull. DEFAULT 'stroke'. */
|
|
40
|
+
ribbon: "stroke" | "hull";
|
|
41
|
+
/** 0..1 base alpha. */
|
|
42
|
+
opacity: number;
|
|
43
|
+
/** 'source-over' ink | 'multiply' highlighter-behind-text. */
|
|
44
|
+
blend: BlendMode;
|
|
45
|
+
/** overdraw count (pen 1 · crayon 2-3). */
|
|
46
|
+
passes: number;
|
|
47
|
+
/** 0..1 per-pass alpha falloff (heavy core, light fringe). */
|
|
48
|
+
passOpacity: number;
|
|
49
|
+
/** 0..1 paper-through depth — THE master pen↔crayon knob. 0 ⇒ NO filter. */
|
|
50
|
+
grain: number;
|
|
51
|
+
/** feTurbulence baseFrequency (high=pencil tooth · low=crayon wax). */
|
|
52
|
+
grainFreq: number;
|
|
53
|
+
/** feDisplacementMap edge-fray scale, px. */
|
|
54
|
+
grainScale: number;
|
|
55
|
+
/** feTurbulence numOctaves (grain richness). */
|
|
56
|
+
octaves: number;
|
|
57
|
+
/** macro tremor → wobbleLinePoints({ roughness }). */
|
|
58
|
+
roughness: number;
|
|
59
|
+
/** micro displacement scale (boil amplitude + warp filter). */
|
|
60
|
+
wobble: number;
|
|
61
|
+
/** wobble centerline resolution. */
|
|
62
|
+
segments: number;
|
|
63
|
+
cap: "round" | "square" | "butt";
|
|
64
|
+
/** when present, OVERRIDES the built-in ink stage only. */
|
|
65
|
+
stamp?: StampFn;
|
|
66
|
+
}
|
|
67
|
+
/** SPEC §5 — the arbitrary-brush escape hatch (one optional field, not a framework). */
|
|
68
|
+
export type StampFn = (ctx: {
|
|
69
|
+
centerline: [number, number][];
|
|
70
|
+
brush: Brush;
|
|
71
|
+
rng: () => number;
|
|
72
|
+
seed: number;
|
|
73
|
+
length: number;
|
|
74
|
+
color: string;
|
|
75
|
+
}) => {
|
|
76
|
+
paths: InkPath[];
|
|
77
|
+
filterId?: string | null;
|
|
78
|
+
defs?: string[];
|
|
79
|
+
};
|
|
80
|
+
/** One ink path the renderer emits (shared with ink.ts; declared here to avoid a cycle). */
|
|
81
|
+
export interface InkPath {
|
|
82
|
+
d: string;
|
|
83
|
+
fill?: string;
|
|
84
|
+
stroke?: string;
|
|
85
|
+
opacity: number;
|
|
86
|
+
blend: BlendMode;
|
|
87
|
+
/** geometry finish — bound to the SVG `stroke-linecap` on the path (C-1(d)). */
|
|
88
|
+
cap?: "round" | "square" | "butt";
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The named points in the continuum. `pen` is the DEFAULT (clean ink, grain:0).
|
|
92
|
+
* `crayon` is the SHIPPED stroke-crayon (ribbon:'stroke', the static grain filter);
|
|
93
|
+
* `pencil`/`marker`/`highlighter` round out the spanning set.
|
|
94
|
+
*/
|
|
95
|
+
export declare const BRUSHES: {
|
|
96
|
+
readonly pen: {
|
|
97
|
+
readonly weight: 6;
|
|
98
|
+
readonly weightJitter: 0.1;
|
|
99
|
+
readonly thinning: 0.15;
|
|
100
|
+
readonly taper: {
|
|
101
|
+
readonly start: 14;
|
|
102
|
+
readonly end: 14;
|
|
103
|
+
readonly ease: "out-cubic";
|
|
104
|
+
};
|
|
105
|
+
readonly ribbon: "stroke";
|
|
106
|
+
readonly opacity: 1;
|
|
107
|
+
readonly blend: "source-over";
|
|
108
|
+
readonly passes: 1;
|
|
109
|
+
readonly passOpacity: 0;
|
|
110
|
+
readonly grain: 0;
|
|
111
|
+
readonly grainFreq: 0.1;
|
|
112
|
+
readonly grainScale: 0;
|
|
113
|
+
readonly octaves: 2;
|
|
114
|
+
readonly roughness: 0.7;
|
|
115
|
+
readonly wobble: 1.2;
|
|
116
|
+
readonly segments: 9;
|
|
117
|
+
readonly cap: "round";
|
|
118
|
+
};
|
|
119
|
+
readonly boil: {
|
|
120
|
+
readonly weight: 5;
|
|
121
|
+
readonly weightJitter: 0.12;
|
|
122
|
+
readonly thinning: 0.2;
|
|
123
|
+
readonly taper: {
|
|
124
|
+
readonly start: 12;
|
|
125
|
+
readonly end: 12;
|
|
126
|
+
readonly ease: "out-cubic";
|
|
127
|
+
};
|
|
128
|
+
readonly ribbon: "stroke";
|
|
129
|
+
readonly opacity: 1;
|
|
130
|
+
readonly blend: "source-over";
|
|
131
|
+
readonly passes: 1;
|
|
132
|
+
readonly passOpacity: 0;
|
|
133
|
+
readonly grain: 0;
|
|
134
|
+
readonly grainFreq: 0.1;
|
|
135
|
+
readonly grainScale: 0;
|
|
136
|
+
readonly octaves: 2;
|
|
137
|
+
readonly roughness: 0.9;
|
|
138
|
+
readonly wobble: 1.4;
|
|
139
|
+
readonly segments: 14;
|
|
140
|
+
readonly cap: "round";
|
|
141
|
+
};
|
|
142
|
+
readonly pencil: {
|
|
143
|
+
readonly weight: 3;
|
|
144
|
+
readonly weightJitter: 0.3;
|
|
145
|
+
readonly thinning: 0.4;
|
|
146
|
+
readonly taper: {
|
|
147
|
+
readonly start: 8;
|
|
148
|
+
readonly end: 18;
|
|
149
|
+
readonly ease: "out-cubic";
|
|
150
|
+
};
|
|
151
|
+
readonly ribbon: "stroke";
|
|
152
|
+
readonly opacity: 0.6;
|
|
153
|
+
readonly blend: "source-over";
|
|
154
|
+
readonly passes: 1;
|
|
155
|
+
readonly passOpacity: 0;
|
|
156
|
+
readonly grain: 0.5;
|
|
157
|
+
readonly grainFreq: 0.42;
|
|
158
|
+
readonly grainScale: 1.5;
|
|
159
|
+
readonly octaves: 3;
|
|
160
|
+
readonly roughness: 1;
|
|
161
|
+
readonly wobble: 1.6;
|
|
162
|
+
readonly segments: 11;
|
|
163
|
+
readonly cap: "round";
|
|
164
|
+
};
|
|
165
|
+
readonly crayon: {
|
|
166
|
+
readonly weight: 16;
|
|
167
|
+
readonly weightJitter: 1;
|
|
168
|
+
readonly thinning: 0.25;
|
|
169
|
+
readonly taper: {
|
|
170
|
+
readonly start: 6;
|
|
171
|
+
readonly end: 6;
|
|
172
|
+
readonly ease: "linear";
|
|
173
|
+
};
|
|
174
|
+
readonly ribbon: "stroke";
|
|
175
|
+
readonly opacity: 0.8;
|
|
176
|
+
readonly blend: "source-over";
|
|
177
|
+
readonly passes: 2;
|
|
178
|
+
readonly passOpacity: 0.18;
|
|
179
|
+
readonly grain: 0.85;
|
|
180
|
+
readonly grainFreq: 0.16;
|
|
181
|
+
readonly grainScale: 2.6;
|
|
182
|
+
readonly octaves: 4;
|
|
183
|
+
readonly roughness: 1.5;
|
|
184
|
+
readonly wobble: 3;
|
|
185
|
+
readonly segments: 13;
|
|
186
|
+
readonly cap: "round";
|
|
187
|
+
};
|
|
188
|
+
readonly ring: {
|
|
189
|
+
readonly weight: 5;
|
|
190
|
+
readonly weightJitter: 0.6;
|
|
191
|
+
readonly thinning: 0.3;
|
|
192
|
+
readonly taper: {
|
|
193
|
+
readonly start: 8;
|
|
194
|
+
readonly end: 12;
|
|
195
|
+
readonly ease: "out-cubic";
|
|
196
|
+
};
|
|
197
|
+
readonly ribbon: "stroke";
|
|
198
|
+
readonly opacity: 0.55;
|
|
199
|
+
readonly blend: "source-over";
|
|
200
|
+
readonly passes: 1;
|
|
201
|
+
readonly passOpacity: 0;
|
|
202
|
+
readonly grain: 0.7;
|
|
203
|
+
readonly grainFreq: 0.18;
|
|
204
|
+
readonly grainScale: 1.8;
|
|
205
|
+
readonly octaves: 4;
|
|
206
|
+
readonly roughness: 1.4;
|
|
207
|
+
readonly wobble: 2.6;
|
|
208
|
+
readonly segments: 13;
|
|
209
|
+
readonly cap: "round";
|
|
210
|
+
};
|
|
211
|
+
readonly marker: {
|
|
212
|
+
readonly weight: 12;
|
|
213
|
+
readonly weightJitter: 0.2;
|
|
214
|
+
readonly thinning: 0.1;
|
|
215
|
+
readonly taper: {
|
|
216
|
+
readonly start: 4;
|
|
217
|
+
readonly end: 10;
|
|
218
|
+
readonly ease: "out-cubic";
|
|
219
|
+
};
|
|
220
|
+
readonly ribbon: "stroke";
|
|
221
|
+
readonly opacity: 0.92;
|
|
222
|
+
readonly blend: "source-over";
|
|
223
|
+
readonly passes: 1;
|
|
224
|
+
readonly passOpacity: 0;
|
|
225
|
+
readonly grain: 0.22;
|
|
226
|
+
readonly grainFreq: 0.09;
|
|
227
|
+
readonly grainScale: 1;
|
|
228
|
+
readonly octaves: 3;
|
|
229
|
+
readonly roughness: 1;
|
|
230
|
+
readonly wobble: 2.2;
|
|
231
|
+
readonly segments: 9;
|
|
232
|
+
readonly cap: "square";
|
|
233
|
+
};
|
|
234
|
+
readonly highlighter: {
|
|
235
|
+
readonly weight: 26;
|
|
236
|
+
readonly weightJitter: 0.05;
|
|
237
|
+
readonly thinning: 0;
|
|
238
|
+
readonly taper: {
|
|
239
|
+
readonly start: 6;
|
|
240
|
+
readonly end: 10;
|
|
241
|
+
readonly ease: "out-cubic";
|
|
242
|
+
};
|
|
243
|
+
readonly ribbon: "hull";
|
|
244
|
+
readonly opacity: 0.38;
|
|
245
|
+
readonly blend: "multiply";
|
|
246
|
+
readonly passes: 1;
|
|
247
|
+
readonly passOpacity: 0;
|
|
248
|
+
readonly grain: 0.12;
|
|
249
|
+
readonly grainFreq: 0.2;
|
|
250
|
+
readonly grainScale: 1.5;
|
|
251
|
+
readonly octaves: 2;
|
|
252
|
+
readonly roughness: 0.5;
|
|
253
|
+
readonly wobble: 1.4;
|
|
254
|
+
readonly segments: 9;
|
|
255
|
+
readonly cap: "square";
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
export type BrushName = keyof typeof BRUSHES;
|
|
259
|
+
/**
|
|
260
|
+
* Resolution order (KISS, deterministic): preset → object overrides → extra `o`.
|
|
261
|
+
* A string selects a preset; an object spreads over `pen`. Later wins.
|
|
262
|
+
*/
|
|
263
|
+
export declare const resolveBrush: (b: BrushName | Partial<Brush>, o?: Partial<Brush>) => Brush;
|
|
264
|
+
/**
|
|
265
|
+
* lerpBrush — the continuum proof (SPEC §12 acc-2). Linearly interpolate the
|
|
266
|
+
* scalar fields of two brushes; enums/taper/ribbon snap from `a` below 0.5, `b`
|
|
267
|
+
* at/above. Yields a sensible in-between ("inky crayon"), no NaN.
|
|
268
|
+
*/
|
|
269
|
+
export declare const lerpBrush: (a: Brush, b: Brush, t: number) => Brush;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useHandMark.ts — the headless reactive core (L2/L3/L4; SPEC §9).
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* Sits between the props and the SFC template so a future React/web-component skin
|
|
5
|
+
* reuses L1–L4. It orchestrates: resolve brush → shapeGeom → ink → animation. It
|
|
6
|
+
* owns NO DOM (the SFC anchors/measures/mounts the filter); it owns the reactive
|
|
7
|
+
* pipeline + the draw-on / boil state machine.
|
|
8
|
+
*
|
|
9
|
+
* Two draw-on mechanisms, picked by a FIELD (never an instrument `if`):
|
|
10
|
+
* - clean ink (no grain): `stroke-dashoffset` on `pathLength="1"` — the slides
|
|
11
|
+
* recipe, geometry-agnostic, compositor-cheap, no filter to re-raster.
|
|
12
|
+
* - grained ink (crayon): a `clip-path: inset()` WIPE — the filter rasters ONCE
|
|
13
|
+
* and the reveal mutates only the clip (`ds-crayon-handmark §5.1`). NEVER
|
|
14
|
+
* dashoffset under a filter (it would re-raster the graph per frame — the Δ4
|
|
15
|
+
* gate).
|
|
16
|
+
*
|
|
17
|
+
* PRM: every draw-on collapses to instant (finished static state); boil no-ops
|
|
18
|
+
* (`useLineBoil.start()` early-returns under reduced motion).
|
|
19
|
+
*/
|
|
20
|
+
import { type Ref } from "vue";
|
|
21
|
+
import { type Brush, type BrushName } from "../brush";
|
|
22
|
+
/**
|
|
23
|
+
* The boil clock surface the SFC binds — the `useLineBoil` return shape, declared
|
|
24
|
+
* structurally over glass-ui's OWN `Ref` (pencil-boil ships a nested `@vue`, so its
|
|
25
|
+
* `Ref` symbol differs; the no-op stub is built with this `ref`, hence the surface
|
|
26
|
+
* is named here rather than `ReturnType<typeof useLineBoil>`).
|
|
27
|
+
*/
|
|
28
|
+
export interface BoilClock {
|
|
29
|
+
currentFrame: Ref<number>;
|
|
30
|
+
start: () => void;
|
|
31
|
+
stop: () => void;
|
|
32
|
+
}
|
|
33
|
+
import { type ShapeGeom } from "../geometry";
|
|
34
|
+
import { type SVGFragment } from "../ink";
|
|
35
|
+
import type { HandAnimation, HandMarkProps, HandShape, MarkBox } from "../types";
|
|
36
|
+
export interface UseHandMarkInput {
|
|
37
|
+
brush: BrushName | Partial<Brush>;
|
|
38
|
+
shape: HandShape;
|
|
39
|
+
color: string;
|
|
40
|
+
seed: number;
|
|
41
|
+
overrides?: Partial<Brush>;
|
|
42
|
+
animation: HandAnimation;
|
|
43
|
+
boilFps: number;
|
|
44
|
+
boilFrames: number;
|
|
45
|
+
roughness: number | null;
|
|
46
|
+
segments: number | null;
|
|
47
|
+
jagged: boolean;
|
|
48
|
+
/** NATURAL underline morphology (C-2) — procedural off the house-seeded engine. */
|
|
49
|
+
natural: boolean;
|
|
50
|
+
box: MarkBox | null;
|
|
51
|
+
path: string | null;
|
|
52
|
+
filterId: string;
|
|
53
|
+
/**
|
|
54
|
+
* The MEASURED text baseline as a fraction of the `.hm` box height (text-mode
|
|
55
|
+
* underline anchor). `null` until the SFC measures it (ResizeObserver +
|
|
56
|
+
* `document.fonts.ready`) — geometry falls back to the legacy constant for that
|
|
57
|
+
* one pre-measure frame. Ignored in positioned (`box`) mode.
|
|
58
|
+
*/
|
|
59
|
+
baselineFrac: number | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Normalise raw HandMarkProps (with their defaults applied) into the core input.
|
|
63
|
+
* `baselineFrac` is the SFC's MEASURED text baseline (text-mode underline anchor) —
|
|
64
|
+
* passed in (not a prop) because it is a runtime measurement, `null` until measured.
|
|
65
|
+
*/
|
|
66
|
+
export declare function normalizeProps(props: HandMarkProps, filterId: string, baselineFrac?: number | null): UseHandMarkInput;
|
|
67
|
+
export interface HandMarkCore {
|
|
68
|
+
/** the resolved effective brush vector. */
|
|
69
|
+
brush: Ref<Brush>;
|
|
70
|
+
/** the static base geometry (boil re-perturbs THIS). */
|
|
71
|
+
baseGeom: Ref<ShapeGeom>;
|
|
72
|
+
/** the live SVG fragment (paths + filter defs). */
|
|
73
|
+
fragment: Ref<SVGFragment>;
|
|
74
|
+
/** the live `d` (escape-hatch path > boiled geometry > static base). */
|
|
75
|
+
pathD: Ref<string>;
|
|
76
|
+
/** does the brush emit a grain filter? (drives the draw-on mechanism). */
|
|
77
|
+
grained: Ref<boolean>;
|
|
78
|
+
/** the draw-on mechanism for this mark: dashoffset (pen) | clip (crayon). */
|
|
79
|
+
drawKind: Ref<"dashoffset" | "clip">;
|
|
80
|
+
/** does this animation draw on at all? */
|
|
81
|
+
draws: Ref<boolean>;
|
|
82
|
+
/** does this animation boil? */
|
|
83
|
+
boils: Ref<boolean>;
|
|
84
|
+
/** the boil clock (a real `useLineBoil` only when the mark boils; else a no-op stub). */
|
|
85
|
+
boil: BoilClock;
|
|
86
|
+
/** arm/disarm boil (draw-then-boil holds it until the draw finishes). */
|
|
87
|
+
boilArmed: Ref<boolean>;
|
|
88
|
+
}
|
|
89
|
+
export declare function useHandMark(input: Ref<UseHandMarkInput>): HandMarkCore;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* constants.ts — the marking-space geometry constants (the colocation home).
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* The hand-mark family's named geometry constants live here (the AY.W-COLOCATE
|
|
5
|
+
* convention's `constants.ts` home). geometry.ts + the SFC re-read them by name.
|
|
6
|
+
*/
|
|
7
|
+
/** Marking-space width (the 0..100 × 0..40 viewBox; `preserveAspectRatio="none"`). */
|
|
8
|
+
export declare const VB_W = 100;
|
|
9
|
+
/** Marking-space height. */
|
|
10
|
+
export declare const VB_H = 40;
|
|
11
|
+
/**
|
|
12
|
+
* The hairline gap, as a fraction of the `.hm` box, between the MEASURED text
|
|
13
|
+
* baseline and the underline centerline. The underline rides just under the real
|
|
14
|
+
* glyph bottoms — a hand mark sits a few % of cap-height below the baseline, never
|
|
15
|
+
* through it (the E1 occlusion root: a constant `y=32` strikethroughs tight-leading
|
|
16
|
+
* display type because 80% of a `line-height:1.02` box IS the baseline).
|
|
17
|
+
*/
|
|
18
|
+
export declare const UNDERLINE_GAP = 0.06;
|
|
19
|
+
/**
|
|
20
|
+
* The highlighter LOW-SEAT band (BA.W-HANDMARK C-1(a)). A real highlighter rides
|
|
21
|
+
* the low two-thirds of the line — the ink sits on the baseline and rises to
|
|
22
|
+
* ~x-height — NOT the box vertical center the fork shipped. The band centerline
|
|
23
|
+
* seats at `baselineFrac − HIGHLIGHT_RISE` (raised off the baseline by ~half a
|
|
24
|
+
* lowercase x-height) so the wide slab (weight 26) covers x-height down to the
|
|
25
|
+
* baseline. Expressed as a fraction of the `.hm` box, parallel to UNDERLINE_GAP.
|
|
26
|
+
*/
|
|
27
|
+
export declare const HIGHLIGHT_RISE = 0.22;
|
|
28
|
+
/** Pre-measure fallback for the highlight band's low seat (null baselineFrac). */
|
|
29
|
+
export declare const HIGHLIGHT_FALLBACK_FRAC = 0.66;
|
|
30
|
+
/**
|
|
31
|
+
* Natural-underline morphology (BA.W-HANDMARK C-2). The procedural wobble is
|
|
32
|
+
* SCALE-RELATIVE: the amplitude is a fraction of the rendered word width (a long
|
|
33
|
+
* word and a short word wobble in proportion, not the viewBox-stretched-constant
|
|
34
|
+
* the fork's GlassUnderline shipped). The period count is IRREGULAR — a seeded
|
|
35
|
+
* pick in [PERIODS_MIN, PERIODS_MAX] — so two seeds differ in hump count, never
|
|
36
|
+
* identical twins.
|
|
37
|
+
*/
|
|
38
|
+
export declare const PERIODS_MIN = 2;
|
|
39
|
+
export declare const PERIODS_MAX = 4;
|