@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,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* freehand.ts — the VENDORED perfect-freehand geometry core (MIT, tldraw).
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* SPEC §1.1 / §11: glass-ui ships ZERO hard deps. `perfect-freehand` is an
|
|
5
|
+
* OPTIONAL peer; its `getStroke` is the only one of the four engines that
|
|
6
|
+
* produces TRUE variable width (the swelling/tapering crayon nib). We vendor only
|
|
7
|
+
* its *geometry* core (a few hundred LOC, MIT) behind this L2 seam so:
|
|
8
|
+
*
|
|
9
|
+
* - the default pen/crayon presets (`ribbon: 'stroke'`) NEVER import it — the
|
|
10
|
+
* bundle treeshakes it away (the shipped stroke-crayon, `ds-crayon-handmark`),
|
|
11
|
+
* - the `ribbon: 'hull'` opt-in (the future width-variance upgrade) has a
|
|
12
|
+
* dependency-free, deterministic body engine already in place,
|
|
13
|
+
* - the pointer-capture half of the library (dead weight to us) never ships.
|
|
14
|
+
*
|
|
15
|
+
* This is the `getStroke` + `getStrokeOutlinePoints` + `getStrokePoints` core
|
|
16
|
+
* from perfect-freehand@1.2.3 (Steve Ruiz, MIT), transcribed to TypeScript with
|
|
17
|
+
* the `getSvgPathFromStroke` median-quad serialiser the references use. The
|
|
18
|
+
* algorithm is verbatim; only the module shape (named exports, vendored vec math)
|
|
19
|
+
* is glass-ui-local.
|
|
20
|
+
*
|
|
21
|
+
* @license MIT — perfect-freehand © Stephen Ruiz Ltd. https://github.com/steveruizok/perfect-freehand
|
|
22
|
+
*/
|
|
23
|
+
/** A point: [x, y] or [x, y, pressure]. */
|
|
24
|
+
export type InputPoint = [number, number] | [number, number, number];
|
|
25
|
+
export interface StrokeOptions {
|
|
26
|
+
size?: number;
|
|
27
|
+
thinning?: number;
|
|
28
|
+
smoothing?: number;
|
|
29
|
+
streamline?: number;
|
|
30
|
+
easing?: (t: number) => number;
|
|
31
|
+
simulatePressure?: boolean;
|
|
32
|
+
start?: {
|
|
33
|
+
cap?: boolean;
|
|
34
|
+
taper?: number | boolean;
|
|
35
|
+
easing?: (t: number) => number;
|
|
36
|
+
};
|
|
37
|
+
end?: {
|
|
38
|
+
cap?: boolean;
|
|
39
|
+
taper?: number | boolean;
|
|
40
|
+
easing?: (t: number) => number;
|
|
41
|
+
};
|
|
42
|
+
last?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface StrokePoint {
|
|
45
|
+
point: number[];
|
|
46
|
+
pressure: number;
|
|
47
|
+
distance: number;
|
|
48
|
+
vector: number[];
|
|
49
|
+
runningLength: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* getStrokePoints — resample the raw input into smoothed StrokePoints with
|
|
53
|
+
* running length + per-segment unit vectors (the streamline low-pass).
|
|
54
|
+
*/
|
|
55
|
+
export declare function getStrokePoints(points: InputPoint[], options?: StrokeOptions): StrokePoint[];
|
|
56
|
+
/**
|
|
57
|
+
* getStrokeOutlinePoints — walk the StrokePoints, emit left/right offset points
|
|
58
|
+
* (the variable-width hull), with tapered caps.
|
|
59
|
+
*/
|
|
60
|
+
export declare function getStrokeOutlinePoints(points: StrokePoint[], options?: StrokeOptions): number[][];
|
|
61
|
+
/** getStroke — the public entry: raw input → variable-width hull outline points. */
|
|
62
|
+
export declare function getStroke(points: InputPoint[], options?: StrokeOptions): number[][];
|
|
63
|
+
/**
|
|
64
|
+
* getSvgPathFromStroke — the canonical median-quad serialiser the references use:
|
|
65
|
+
* each segment's control point is the midpoint of two consecutive outline points,
|
|
66
|
+
* yielding a smooth closed fill `d`-string.
|
|
67
|
+
*/
|
|
68
|
+
export declare function getSvgPathFromStroke(stroke: number[][], closed?: boolean): string;
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* geometry.ts — SEMANTIC shape → pencil-boil centerlines (L1, pure; SPEC §3).
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* A shape is a pure mapper: (semantic target) → L1 geometry. The renderer never
|
|
5
|
+
* knows what it drew — it sees only `Point[]`. Adding a shape = adding one switch
|
|
6
|
+
* arm; nothing downstream changes (texture + animation are shape-blind). This is
|
|
7
|
+
* the generality lever (Brush ⟂ Path).
|
|
8
|
+
*
|
|
9
|
+
* The marking coordinate space is 0..100 × 0..40, with `preserveAspectRatio="none"`
|
|
10
|
+
* so the <svg> stretches to the slotted word box (the SPEC §6.2 width-invariance
|
|
11
|
+
* contract). Two usage modes:
|
|
12
|
+
* - text mode (box == null): use the full viewBox (single-line underline/strike)
|
|
13
|
+
* - positioned mode (box = {x,y,w,h}): map an explicit rect (circle a datum)
|
|
14
|
+
*
|
|
15
|
+
* The circle arm rides pencil-boil 0.4.x's `ellipsePoints` (the hand-circle
|
|
16
|
+
* overshoot ring — the sole upstream geometry delta this component required).
|
|
17
|
+
*
|
|
18
|
+
* THE SEED RECONCILE (BA.W-HANDMARK [S2]): the wobble centerlines are seeded from
|
|
19
|
+
* the HOUSE prng leaf (`src/utils/prng.ts` mulberry32 + hashString — the AV.W14
|
|
20
|
+
* single-source). The family FEEDS pencil-boil a house-derived integer seed; glass-
|
|
21
|
+
* ui code imports ZERO `mulberry32` from pencil-boil (its internal mulberry32 stays
|
|
22
|
+
* inside its OWN perturb math). ONE seed leaf, the house identity.
|
|
23
|
+
*/
|
|
24
|
+
import { type WobbleOptions } from "@mkbabb/pencil-boil";
|
|
25
|
+
import { UNDERLINE_GAP, VB_H, VB_W } from "./constants";
|
|
26
|
+
import type { HandShape, MarkBox } from "./types";
|
|
27
|
+
export { VB_W, VB_H, UNDERLINE_GAP };
|
|
28
|
+
/** A shape maps to one or more centerlines (open polylines) or one closed ring. */
|
|
29
|
+
export interface ShapeGeom {
|
|
30
|
+
lines: [number, number][][];
|
|
31
|
+
closed: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Semantic shape → { lines, closed } in the marking space (or a positioned box).
|
|
35
|
+
*
|
|
36
|
+
* The text-mode underline anchors to a MEASURED baseline: `baselineFrac` is the
|
|
37
|
+
* slotted word's alphabetic baseline as a fraction of the `.hm` box height (the SFC
|
|
38
|
+
* measures it via ResizeObserver + `document.fonts.ready`). The underline y is then
|
|
39
|
+
* `VB_H × (baselineFrac + UNDERLINE_GAP)` — never the old hardcoded `32` (80% of the
|
|
40
|
+
* box), which struck through tight-leading headings. `null` ⇒ not yet measured: fall
|
|
41
|
+
* back to the legacy `VB_H − 8` constant so first paint (and jsdom/SSR) still renders
|
|
42
|
+
* a line, replaced the instant the measure lands.
|
|
43
|
+
*
|
|
44
|
+
* `natural` (BA.W-HANDMARK C-2) routes the underline through the procedural
|
|
45
|
+
* `naturalUnderlinePoints` morphology instead of pencil-boil's `wobbleLinePoints`
|
|
46
|
+
* (the masthead `boil` voice); the default underline keeps the pencil-boil line.
|
|
47
|
+
*/
|
|
48
|
+
export declare function shapeGeom(shape: HandShape, opts: WobbleOptions, box?: MarkBox | null, baselineFrac?: number | null, natural?: boolean): ShapeGeom;
|
|
49
|
+
/** Boil one geometry: re-perturb the CACHED centerlines (anchored → no draw-on pop). */
|
|
50
|
+
export declare function boilLines({ lines, closed }: ShapeGeom, amount: number, seed: number): [number, number][][];
|
|
51
|
+
/** Serialize centerlines → one SVG `d` (multi-line shapes concat with a space). */
|
|
52
|
+
export declare function serialize(lines: [number, number][][], jagged?: boolean): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* handmark — the ./handmark barrel (SPEC §11).
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* `HandMark` is the generic export; `InkMark` is the prose alias the atlas/slides
|
|
5
|
+
* import so call sites read as prose (one implementation, zero divergence). The
|
|
6
|
+
* pure L1–L3 functions ship too — they are framework-free, directly usable in
|
|
7
|
+
* slides decks, D3 charts (call `shapeGeom`/`ellipsePoints` to ink a path), even
|
|
8
|
+
* canvas.
|
|
9
|
+
*
|
|
10
|
+
* The DEFAULT is `pen` (clean ink, grain:0 ⇒ no filter, zero extra dep). The
|
|
11
|
+
* `@mkbabb/pencil-boil` geometry + `perfect-freehand` body are OPTIONAL PEERS;
|
|
12
|
+
* only `ribbon:'hull'` (the highlighter) touches the vendored pf core (treeshaken
|
|
13
|
+
* otherwise).
|
|
14
|
+
*
|
|
15
|
+
* BA.W-HANDMARK: `GlassUnderline`/the `/underline` subpath RETIRED onto
|
|
16
|
+
* `HandMark shape="underline"` (DEC-8 outcome 1; clean break, no alias). The
|
|
17
|
+
* editorial draw-on underline is `<HandMark shape="underline" animation="draw-on">`;
|
|
18
|
+
* the natural pencil-boil morphology is the `boil` brush.
|
|
19
|
+
*/
|
|
20
|
+
export { default as HandMark, default as InkMark } from "./HandMark.vue";
|
|
21
|
+
export { BRUSHES, resolveBrush, lerpBrush, type Brush, type BrushName, type BlendMode, type TaperSpec, type StampFn, type InkPath, } from "./brush";
|
|
22
|
+
export { shapeGeom, serialize, boilLines, VB_W, VB_H, UNDERLINE_GAP, type ShapeGeom, } from "./geometry";
|
|
23
|
+
export { ink, type SVGFragment } from "./ink";
|
|
24
|
+
export { grainFilter, hasGrain } from "./texture";
|
|
25
|
+
export { getStroke, getStrokePoints, getSvgPathFromStroke, type StrokeOptions, type InputPoint, } from "./freehand";
|
|
26
|
+
export { useHandMark, normalizeProps, type UseHandMarkInput, type HandMarkCore, type BoilClock, } from "./composables/useHandMark";
|
|
27
|
+
export type { HandMarkProps, HandShape, HandAnimation, MarkBox, } from "./types";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Brush, InkPath } from "./brush";
|
|
2
|
+
export interface SVGFragment {
|
|
3
|
+
paths: InkPath[];
|
|
4
|
+
filterId: string | null;
|
|
5
|
+
defs: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* ink — the only stage the brush fully drives. `jagged` serialises the stroke body
|
|
9
|
+
* with angular kinks (pointsToLinear) instead of the smooth Catmull-Rom bezier.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ink(centerline: [number, number][], b: Brush, seed: number, color: string, filterId: string, jagged?: boolean): SVGFragment;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* texture.ts — the L3 grain as ONE parameterized SVG <filter> (pure; SPEC §4.2).
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* `grainFilter(id, b, seed)` returns the markup for ONE static, seeded <filter>
|
|
5
|
+
* driven entirely by the brush vector. The KISS invariant (the PEN-is-free law,
|
|
6
|
+
* SPEC §12 acc-4):
|
|
7
|
+
*
|
|
8
|
+
* grain <= 0 && grainScale <= 0 ⇒ returns '' ⇒ NO filter emitted ⇒ bare <path>.
|
|
9
|
+
*
|
|
10
|
+
* So pen/marker-lite get the cleanest vector edge at zero filter cost; pencil/
|
|
11
|
+
* crayon get a real broken-edge filter. SAME code path, field delta only — never
|
|
12
|
+
* an instrument `if`.
|
|
13
|
+
*
|
|
14
|
+
* The graph is the proven 5-stage pipeline from the `proto/_final` sandbox (it
|
|
15
|
+
* supersets the bare SPEC §4.2 graph with a trailing re-break displacement —
|
|
16
|
+
* `ds-crayon-handmark §4.4` keeps the proven one):
|
|
17
|
+
* 1. feTurbulence (warp) — low-freq fractal noise for edge wobble
|
|
18
|
+
* 2. feDisplacementMap (wob) — push the stroke edge by grainScale
|
|
19
|
+
* 3. feTurbulence (grain) — high-freq noise = paper tooth / wax grain
|
|
20
|
+
* 4. feColorMatrix (grainA) — threshold the grain into a hard alpha mask
|
|
21
|
+
* 5. feComposite + feDisplace — knock paper-through holes (operator="in") + re-break
|
|
22
|
+
*
|
|
23
|
+
* CRITICAL (the Δ4 gate, `ds-crayon-handmark §3`): this filter is STATIC + SEEDED.
|
|
24
|
+
* It rasters ONCE per (mount, resize, scheme flip) and is cached. The draw-on is a
|
|
25
|
+
* `clip-path: inset()` wipe that mutates only the clip — it NEVER animates
|
|
26
|
+
* `stroke-dashoffset` under the filter (which would re-raster the graph per frame).
|
|
27
|
+
* Boil does NOT ship on this register (`ds-crayon-handmark §5.3`).
|
|
28
|
+
*
|
|
29
|
+
* `id` MUST be per-instance (the component's `useId()`) so two marks never collide
|
|
30
|
+
* their <filter> namespaces — the glass-ui WatercolorDot idiom.
|
|
31
|
+
*
|
|
32
|
+
* The grain sub-seed is derived (`seed ^ 0x85eb`) per SPEC §7, so one top seed
|
|
33
|
+
* re-rolls the grain coherently with the centerline wobble.
|
|
34
|
+
*/
|
|
35
|
+
import type { Brush } from "./brush";
|
|
36
|
+
/** @returns SVG <filter> markup, or '' when the brush is clean ink (pen). */
|
|
37
|
+
export declare function grainFilter(id: string, b: Brush, seed: number): string;
|
|
38
|
+
/** Does this brush emit a grain filter? (the pen-is-free predicate). */
|
|
39
|
+
export declare function hasGrain(b: Brush): boolean;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* types.ts — the public API surface (SPEC §6). Pure types, 0 runtime.
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* The L5 surface steals rough-notation's *vocabulary* (annotate-style props +
|
|
5
|
+
* ordered groups), not its code. Every prop has a per-brush default, so the
|
|
6
|
+
* common call is one tag: <HandMark>who pays in</HandMark>.
|
|
7
|
+
*/
|
|
8
|
+
import type { Brush, BrushName } from "./brush";
|
|
9
|
+
/** A target rect in the 0..100 × 0..40 marking space (positioned mode). */
|
|
10
|
+
export interface MarkBox {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
w: number;
|
|
14
|
+
h: number;
|
|
15
|
+
}
|
|
16
|
+
export type HandShape = "underline" | "strikethrough" | "highlight" | "circle" | "box" | "bracket" | "path";
|
|
17
|
+
export type HandAnimation = "none" | "draw-on" | "boil" | "draw-then-boil";
|
|
18
|
+
export interface HandMarkProps {
|
|
19
|
+
/** 'pen'(default) | preset name | full/partial Brush object. */
|
|
20
|
+
brush?: BrushName | Partial<Brush>;
|
|
21
|
+
/** default 'underline'. */
|
|
22
|
+
shape?: HandShape;
|
|
23
|
+
/** ANY CSS color. default 'currentColor'. */
|
|
24
|
+
color?: string;
|
|
25
|
+
/** procedural variant — deterministic. default 1. */
|
|
26
|
+
seed?: number;
|
|
27
|
+
/** spread over the resolved brush (3rd resolution level). */
|
|
28
|
+
overrides?: Partial<Brush>;
|
|
29
|
+
/** default 'none' (the static-masthead default). */
|
|
30
|
+
animation?: HandAnimation;
|
|
31
|
+
/** draw-on duration. default 800. */
|
|
32
|
+
drawMs?: number;
|
|
33
|
+
/** draw-on start delay. default 0. */
|
|
34
|
+
drawDelayMs?: number;
|
|
35
|
+
/** draw-on trigger. default 'visible' (IntersectionObserver). */
|
|
36
|
+
appear?: "mount" | "visible" | "manual";
|
|
37
|
+
/** boil frame rate. default 8 (≈125ms). */
|
|
38
|
+
boilFps?: number;
|
|
39
|
+
/** distinct boil frames. default 3. */
|
|
40
|
+
boilFrames?: number;
|
|
41
|
+
/** override brush.roughness. */
|
|
42
|
+
roughness?: number;
|
|
43
|
+
/** wobble resolution. default per-brush. */
|
|
44
|
+
segments?: number;
|
|
45
|
+
/** angular kinks vs smooth bezier. default false. */
|
|
46
|
+
jagged?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* NATURAL underline morphology (BA.W-HANDMARK C-2). When true (the masthead
|
|
49
|
+
* `boil` voice), the underline geometry goes PROCEDURAL — scale-relative
|
|
50
|
+
* amplitude, an IRREGULAR seeded period count, off the house prng leaf feeding
|
|
51
|
+
* pencil-boil — instead of pencil-boil's single `wobbleLinePoints` line. The
|
|
52
|
+
* `boil` brush auto-engages it; the default underline keeps the pencil-boil line.
|
|
53
|
+
* Ignored on non-underline shapes.
|
|
54
|
+
*/
|
|
55
|
+
natural?: boolean;
|
|
56
|
+
/** POSITIONED mode (circle a datum): explicit target rect. */
|
|
57
|
+
box?: MarkBox;
|
|
58
|
+
/** shape:'path' escape hatch — arbitrary SVG `d` (wins over shape). */
|
|
59
|
+
path?: string;
|
|
60
|
+
/** arbitrary point stream → brush ink. */
|
|
61
|
+
points?: [number, number][];
|
|
62
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IconChipProps } from "./types";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<IconChipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconChipProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Component, FunctionalComponent, HTMLAttributes } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Permissive icon type — Vue's `Component` ships across multiple structurally
|
|
4
|
+
* incompatible shapes (the @lucide/vue v1 functional-component form is one), so
|
|
5
|
+
* we accept the union a `<component :is>` render expression handles. Mirrors the
|
|
6
|
+
* `MetricCell` `IconLike` precedent (the AZ `isComponent` allowance).
|
|
7
|
+
*/
|
|
8
|
+
export type IconChipIcon = Component | FunctionalComponent | object;
|
|
9
|
+
/** A 0..12 index into the `--section-color-N` 13-stop ramp. */
|
|
10
|
+
export type IconChipSection = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
11
|
+
/**
|
|
12
|
+
* A complete token colour for the chip event (e.g. `var(--chart-download)`,
|
|
13
|
+
* `var(--tier-featured)`) — the MetricCell-`iconColor` reconcile path. NEVER a
|
|
14
|
+
* demo-local literal hue (ppmycota purple stays out of the library — the chip
|
|
15
|
+
* `tone` arm takes a token).
|
|
16
|
+
*/
|
|
17
|
+
export type IconChipTone = string;
|
|
18
|
+
export interface IconChipProps {
|
|
19
|
+
/**
|
|
20
|
+
* The lucide glyph (functional-component form per the AZ `isComponent`
|
|
21
|
+
* precedent). Rendered via `<component :is>`.
|
|
22
|
+
*/
|
|
23
|
+
icon: IconChipIcon;
|
|
24
|
+
/**
|
|
25
|
+
* The `--section-color-N` ramp index (0..12) — the section arm. XOR `tone`.
|
|
26
|
+
* When both are set, `tone` wins (the explicit complete-token override).
|
|
27
|
+
* Typed `number` for data-driven consumers (a `v-for` over a descriptor list
|
|
28
|
+
* with a `section: number` field); the 0..12 canonical range is the
|
|
29
|
+
* `IconChipSection` union the discovery layer publishes.
|
|
30
|
+
*/
|
|
31
|
+
section?: number;
|
|
32
|
+
/**
|
|
33
|
+
* A complete token colour (the tone arm — the MetricCell-`iconColor`
|
|
34
|
+
* reconcile). XOR `section`.
|
|
35
|
+
*/
|
|
36
|
+
tone?: IconChipTone;
|
|
37
|
+
/**
|
|
38
|
+
* The chip diameter in px — the FLOOR is `glyphSize × --icon-chip-glyph-ratio`
|
|
39
|
+
* so the plate can never paint under the glyph (the d2 proportion, structural).
|
|
40
|
+
* Default `48` (the reference register, 48/22 ≈ 2.18).
|
|
41
|
+
*/
|
|
42
|
+
size?: number;
|
|
43
|
+
/** The lucide glyph pixel size. Default `22` (the reference register). */
|
|
44
|
+
glyphSize?: number;
|
|
45
|
+
/** The lucide glyph stroke width. Default `1.75` (the reference register). */
|
|
46
|
+
strokeWidth?: number;
|
|
47
|
+
/**
|
|
48
|
+
* The NO-PLATE register — render the full-chroma glyph with NO backplate
|
|
49
|
+
* (the MetricCell leading-glyph tint). The chip≤glyph floor is moot (no plate).
|
|
50
|
+
*/
|
|
51
|
+
bare?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Duotone fill — a low-alpha fill of the same hue UNDER the full-chroma
|
|
54
|
+
* stroke (the iOS/Material "filled-tonal" move). Mono-hue (proportion-safe,
|
|
55
|
+
* never a second hue). Default `false`.
|
|
56
|
+
*/
|
|
57
|
+
duotone?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* The chip's own smooth-glass hover register (the backplate mix lifts, a soft
|
|
60
|
+
* glow ring appears, the stroke firms) — on the §6 easing doctrine, PRM-gated,
|
|
61
|
+
* disco-FREE. Default `false`.
|
|
62
|
+
*/
|
|
63
|
+
bloom?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Entrance choreography — composes the shipped `vReveal` directive. A numeric
|
|
66
|
+
* value is the `--d` stagger index; `true` is index 0. PRM-gated by `vReveal`'s
|
|
67
|
+
* construction. Default `false`.
|
|
68
|
+
*/
|
|
69
|
+
reveal?: boolean | number;
|
|
70
|
+
/** Pass-through class on the chip root. */
|
|
71
|
+
class?: HTMLAttributes["class"];
|
|
72
|
+
}
|
|
@@ -17,8 +17,19 @@ export type InstrumentChassisPhase = "ready" | "ping" | "download" | "upload" |
|
|
|
17
17
|
* architectural underclaim. Consumed at quiet-content App-level
|
|
18
18
|
* mounts (the inner card paints its own glass tier — the spine is
|
|
19
19
|
* the housing that frames it).
|
|
20
|
+
*
|
|
21
|
+
* - `"structure"` (BA.W-ATLAS-RECONCILE C-3) — the SILVER structure-metal
|
|
22
|
+
* register. A cool polished-steel milled-panel read: the engraved bezel +
|
|
23
|
+
* the structural grooves re-point to the `--silver` quad (the gold quad's
|
|
24
|
+
* cool mirror) instead of the warm-cream `--surface-tint-*` default, so the
|
|
25
|
+
* chassis reads as an INDUSTRIAL precision-instrument housing — the cool-metal
|
|
26
|
+
* twin of the gold "complete"-phase affirmation. The phase cascade stays
|
|
27
|
+
* orthogonal (a `structure` chassis still retints on `data-phase`); only the
|
|
28
|
+
* structure-metal recipe forks. The silver is the W-NO-GRAY named cool-neutral
|
|
29
|
+
* exception. Consumer #2 of the silver quad (the atlas's structure surface is
|
|
30
|
+
* consumer #1).
|
|
20
31
|
*/
|
|
21
|
-
export type InstrumentChassisVariant = "glass" | "spine";
|
|
32
|
+
export type InstrumentChassisVariant = "glass" | "spine" | "structure";
|
|
22
33
|
/**
|
|
23
34
|
* <InstrumentChassis> — single glass surface composing strip / dial / control
|
|
24
35
|
* regions, glued together by twin-line hairline grooves.
|
|
@@ -56,7 +67,9 @@ type __VLS_Props = {
|
|
|
56
67
|
* Surface register. Defaults to `"glass"` (the canonical chassis
|
|
57
68
|
* plate). Pass `"spine"` at App-level mount paths to get the
|
|
58
69
|
* housing register (polished sleeve, no backdrop-filter, interior
|
|
59
|
-
* vignette + hairline outer stroke).
|
|
70
|
+
* vignette + hairline outer stroke). Pass `"structure"` for the
|
|
71
|
+
* silver milled-panel register (cool polished-steel bezel + grooves;
|
|
72
|
+
* BA.W-ATLAS-RECONCILE C-3).
|
|
60
73
|
*/
|
|
61
74
|
variant?: InstrumentChassisVariant;
|
|
62
75
|
class?: HTMLAttributes["class"];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
export interface PagerDotsProps {
|
|
3
|
+
/** Total dot count (the slide/snap count). */
|
|
4
|
+
count: number;
|
|
5
|
+
/** Rail layout axis. Default horizontal. */
|
|
6
|
+
orientation?: "horizontal" | "vertical";
|
|
7
|
+
/**
|
|
8
|
+
* When set, window the rail to `fit` dots centered on the active dot
|
|
9
|
+
* (the DeckPager dock-gutter overflow generalized). Off (undefined) →
|
|
10
|
+
* show every dot.
|
|
11
|
+
*/
|
|
12
|
+
windowFit?: number;
|
|
13
|
+
/** Encapsulate the rail in the glass pager pill chassis. Default true. */
|
|
14
|
+
ring?: boolean;
|
|
15
|
+
/** Accessible name for the rail group. */
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
/** Additional classes for the rail root. */
|
|
18
|
+
class?: HTMLAttributes["class"];
|
|
19
|
+
}
|
|
20
|
+
type __VLS_Props = PagerDotsProps;
|
|
21
|
+
type __VLS_ModelProps = {
|
|
22
|
+
/** v-model:active — the active 0-based index. */
|
|
23
|
+
"active"?: number;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
26
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"update:active": (value: number) => any;
|
|
28
|
+
} & {
|
|
29
|
+
select: (index: number) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
|
+
onSelect?: ((index: number) => any) | undefined;
|
|
32
|
+
"onUpdate:active"?: ((value: number) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
orientation: "horizontal" | "vertical";
|
|
35
|
+
ariaLabel: string;
|
|
36
|
+
ring: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "vue";
|
|
2
|
-
/** The canonical tab/option shape — one descriptor across
|
|
2
|
+
/** The canonical tab/option shape — one descriptor across both materials. */
|
|
3
3
|
export interface SegmentedTabOption {
|
|
4
4
|
label: string;
|
|
5
5
|
value: string;
|
|
@@ -7,9 +7,13 @@ export interface SegmentedTabOption {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
tooltip?: string;
|
|
9
9
|
}
|
|
10
|
-
/** The
|
|
11
|
-
* `
|
|
12
|
-
export type SegmentedTabsVariant = "
|
|
10
|
+
/** The two materials. `pill` (DEFAULT) = the glass-track slider (absorbs the
|
|
11
|
+
* retired `segmented`); `underline` = the paper ink-hairline rule. */
|
|
12
|
+
export type SegmentedTabsVariant = "pill" | "underline";
|
|
13
|
+
/** The orientation axis — `horizontal` (default) lays children in a row + tracks
|
|
14
|
+
* the indicator on the inline axis; `vertical` stacks a column + tracks the
|
|
15
|
+
* block axis (the vertical underline is the leading-edge ink rail). */
|
|
16
|
+
export type SegmentedTabsOrientation = "horizontal" | "vertical";
|
|
13
17
|
export interface SegmentedTabsResponsive {
|
|
14
18
|
/**
|
|
15
19
|
* CSS length consumed inside `(min-width: <breakpoint>)`. BELOW it the
|
|
@@ -30,34 +34,26 @@ export interface SegmentedTabsResponsive {
|
|
|
30
34
|
export interface SegmentedTabsProps {
|
|
31
35
|
options: SegmentedTabOption[];
|
|
32
36
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
37
|
+
* The material — `pill` (DEFAULT, the glass-track slider) or `underline`
|
|
38
|
+
* (the paper ink-hairline rule).
|
|
35
39
|
*/
|
|
36
40
|
variant?: SegmentedTabsVariant;
|
|
37
41
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* `segmented`/`pill` variants; `underline` is panel-nav (single-select).
|
|
42
|
+
* Orientation — `horizontal` (default) or `vertical`. Axis-derived on the
|
|
43
|
+
* one indicator engine.
|
|
41
44
|
*/
|
|
42
|
-
|
|
45
|
+
orientation?: SegmentedTabsOrientation;
|
|
43
46
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* - `"auto"` — flex row with intrinsic widths + plain horizontal scroll.
|
|
48
|
-
*/
|
|
49
|
-
overflow?: "none" | "scroll" | "auto";
|
|
50
|
-
/**
|
|
51
|
-
* Responsive collapse — below the breakpoint the strip becomes a `<Select>`
|
|
52
|
-
* (subsumes the former standalone ResponsiveTabs). `true` uses defaults;
|
|
53
|
-
* an object tunes the breakpoint / desktop subset / accessible name.
|
|
47
|
+
* Responsive collapse — below the breakpoint the strip becomes a `<Select>`.
|
|
48
|
+
* `true` uses defaults; an object tunes the breakpoint / desktop subset /
|
|
49
|
+
* accessible name.
|
|
54
50
|
*/
|
|
55
51
|
responsive?: boolean | SegmentedTabsResponsive;
|
|
56
52
|
class?: HTMLAttributes["class"];
|
|
57
53
|
}
|
|
58
54
|
type __VLS_Props = SegmentedTabsProps;
|
|
59
55
|
type __VLS_ModelProps = {
|
|
60
|
-
modelValue: string
|
|
56
|
+
modelValue: string;
|
|
61
57
|
};
|
|
62
58
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
63
59
|
declare var __VLS_50: {
|
|
@@ -73,14 +69,13 @@ type __VLS_Slots = {} & {
|
|
|
73
69
|
option?: (props: typeof __VLS_58) => any;
|
|
74
70
|
};
|
|
75
71
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
76
|
-
"update:modelValue": (value: string
|
|
72
|
+
"update:modelValue": (value: string) => any;
|
|
77
73
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
78
|
-
"onUpdate:modelValue"?: ((value: string
|
|
74
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
79
75
|
}>, {
|
|
80
|
-
|
|
76
|
+
orientation: SegmentedTabsOrientation;
|
|
81
77
|
variant: SegmentedTabsVariant;
|
|
82
78
|
responsive: boolean | SegmentedTabsResponsive;
|
|
83
|
-
multiSelect: boolean;
|
|
84
79
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
85
80
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
86
81
|
declare const _default: typeof __VLS_export;
|
|
@@ -2,21 +2,32 @@ import { type Ref, type ComputedRef } from "vue";
|
|
|
2
2
|
import type { SegmentedTabOption } from "../SegmentedTabs.vue";
|
|
3
3
|
/**
|
|
4
4
|
* Package-private composable for `SegmentedTabs.vue` — owns the JS-measured
|
|
5
|
-
* indicator path: the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* single-select indicator path: the slider style, the offset measure, the
|
|
6
|
+
* model/options re-measure watchers, and the ResizeObserver lifecycle. It ALSO
|
|
7
|
+
* owns the AX.W53 travel-squish: a velocity-driven, volume-preserving `--stretch`
|
|
8
|
+
* scalar the active indicator reads so it STRETCHES along its travel axis as it
|
|
9
|
+
* glides between tabs and settles to fit (the Material 3 ELASTIC / Apple
|
|
10
|
+
* Liquid-Glass register, capped LOW).
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
12
|
+
* BA.W-TABS — the engine is AXIS-DERIVED (the `vertical` param): the JS slider
|
|
13
|
+
* writes width/translateX on the inline axis (horizontal) OR height/translateY on
|
|
14
|
+
* the block axis (vertical). It is CENTER-ANCHORED (the BA-VJS-3 / valuejs-fold A-5
|
|
15
|
+
* fix): the indicator is positioned by its CENTER == the active button's center
|
|
16
|
+
* (translate = buttonCenter − indicatorSize/2), so the squish (which scales from
|
|
17
|
+
* `transform-origin: center`) keeps the indicator center pinned to the label
|
|
18
|
+
* center — the prior `translateX(offsetLeft)` left-edge write is GONE.
|
|
19
|
+
*
|
|
20
|
+
* The composable is the SOLE writer of the JS slider style. The measure path runs
|
|
21
|
+
* only on the `@supports not (anchor)` branch — on an anchor-supporting engine the
|
|
22
|
+
* CSS `anchor-name` owns the slider position and that path stays dormant (no RO is
|
|
23
|
+
* constructed, no measure runs). The squish is independent of the position path: it
|
|
24
|
+
* is a transient `--stretch` write driven on EVERY selection (anchor or JS engine)
|
|
25
|
+
* and reads from `--tab-indicator-max-stretch`, and RELEASES AT ARRIVAL (keyed to
|
|
26
|
+
* the calibrated clock, not a fixed mid-glide timer). Honors
|
|
27
|
+
* `prefers-reduced-motion` (no squish under reduce). The underline material SLIDES
|
|
28
|
+
* (no squish — a hairline does not deform), gated by the `vertical`/underline
|
|
29
|
+
* early-return at the SFC's `squishOnTravel` call shape (the underline has no
|
|
30
|
+
* `indicatorRef` element).
|
|
20
31
|
*/
|
|
21
32
|
export interface UseTabIndicatorParams {
|
|
22
33
|
/** The container scroller root (observed by the ResizeObserver). */
|
|
@@ -28,21 +39,19 @@ export interface UseTabIndicatorParams {
|
|
|
28
39
|
/** The tab options (re-measure on change). */
|
|
29
40
|
options: ComputedRef<SegmentedTabOption[]>;
|
|
30
41
|
/** The defineModel value (re-measure on change). */
|
|
31
|
-
model: Ref<string |
|
|
32
|
-
/** True for the multi-select path. */
|
|
33
|
-
multiSelect: ComputedRef<boolean>;
|
|
42
|
+
model: Ref<string | undefined>;
|
|
34
43
|
/** Whether the browser supports CSS anchor positioning. */
|
|
35
44
|
anchorSupported: boolean;
|
|
36
|
-
/** True when
|
|
45
|
+
/** True when the JS slider writer is live (gates RO/watcher attach). */
|
|
37
46
|
jsSliderActive: ComputedRef<boolean>;
|
|
38
|
-
/** The active option values (used by the
|
|
47
|
+
/** The active option values (used by the measure). */
|
|
39
48
|
activeValues: ComputedRef<string[]>;
|
|
49
|
+
/** True for the vertical (block-axis) orientation. */
|
|
50
|
+
vertical: ComputedRef<boolean>;
|
|
40
51
|
}
|
|
41
52
|
export interface UseTabIndicatorReturn {
|
|
42
53
|
/** Inline style for the single-select JS slider. */
|
|
43
54
|
singleSliderStyle: Ref<Record<string, string>>;
|
|
44
|
-
/** Inline styles for each active multi-select slider, keyed by value. */
|
|
45
|
-
multiSliderStyles: Ref<Record<string, Record<string, string>>>;
|
|
46
55
|
/** Imperatively kick the travel-squish on a selection at `idx`. */
|
|
47
56
|
squishOnTravel: (toIdx: number) => void;
|
|
48
57
|
}
|
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const DEFAULT_INDICATOR_MAX_STRETCH = 1.08;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* The travel-progress fraction at which the squish RELEASES — the Material
|
|
10
|
+
* "grow then shrink" close, keyed to ARRIVAL (BA.W-TABS). The squish opens with
|
|
11
|
+
* the glide and releases when the indicator is within this fraction of its target
|
|
12
|
+
* (release-at-arrival), retiring the fixed mid-glide `INDICATOR_RELEASE_MS` timer
|
|
13
|
+
* (which fired at 60ms — BEFORE the ~100ms 90%-travel point, mid-glide). The
|
|
14
|
+
* release schedules off the calibrated clock (`--spring-snappy-duration`) scaled
|
|
15
|
+
* by this fraction, so the stretch peaks during travel and shrinks to fit AT
|
|
16
|
+
* arrival, never before.
|
|
11
17
|
*/
|
|
12
|
-
export declare const
|
|
18
|
+
export declare const INDICATOR_RELEASE_AT_ARRIVAL = 0.82;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as SegmentedTabs } from "./SegmentedTabs.vue";
|
|
2
|
-
export type { SegmentedTabOption, SegmentedTabsVariant, SegmentedTabsProps, SegmentedTabsResponsive, } from "./SegmentedTabs.vue";
|
|
2
|
+
export type { SegmentedTabOption, SegmentedTabsVariant, SegmentedTabsOrientation, SegmentedTabsProps, SegmentedTabsResponsive, } from "./SegmentedTabs.vue";
|
|
@@ -13,6 +13,19 @@
|
|
|
13
13
|
type __VLS_Props = {
|
|
14
14
|
/** CSS color painted as the swatch background (any CSS color form). */
|
|
15
15
|
color: string;
|
|
16
|
+
/**
|
|
17
|
+
* Render mode (BA.W-EMISSION / BA-VJS-C2):
|
|
18
|
+
* `solid` (default) — the filled organic blob (the swatch background IS the
|
|
19
|
+
* color; the existing register, unchanged).
|
|
20
|
+
* `ghost` — the SAME seeded blob SILHOUETTE rendered as a STROKE: a
|
|
21
|
+
* `color` border over a low-alpha `color` fill, the irregular-blob
|
|
22
|
+
* outline (NOT a CSS dashed rectangle). A `ghost` of a given
|
|
23
|
+
* `color + seed` matches the SAME silhouette the `solid` dot of
|
|
24
|
+
* that seed renders — both read the same `useWatercolorBlob`
|
|
25
|
+
* border-radius morph; the stroke is the only delta. The
|
|
26
|
+
* empty-palette-slot / placeholder affordance.
|
|
27
|
+
*/
|
|
28
|
+
variant?: "solid" | "ghost";
|
|
16
29
|
/** Run the rAF-driven shape morph (default false → static, hover-morph only). */
|
|
17
30
|
animate?: boolean;
|
|
18
31
|
/** Host tag — `div` (decorative) or `button` (interactive). */
|
|
@@ -30,6 +43,7 @@ type __VLS_Slots = {} & {
|
|
|
30
43
|
};
|
|
31
44
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
32
45
|
animate: boolean;
|
|
46
|
+
variant: "solid" | "ghost";
|
|
33
47
|
seed: string;
|
|
34
48
|
range: [number, number];
|
|
35
49
|
tag: "div" | "button";
|