@mkbabb/glass-ui 8.0.0 → 10.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/MIGRATION.md +4768 -0
- package/README.md +57 -13
- package/dist/DialogContent-CwIBvou_.js +157 -0
- package/dist/{DropdownMenuTrigger-8UZsBtZ8.js → DropdownMenuTrigger-CKRnhDSQ.js} +1 -1
- package/dist/{Surface-i1tWC-Ga.js → Surface-1nPoabc3.js} +1 -1
- package/dist/{accent-tone-solve-Cw7WkRD9.js → accent-tone-solve-5H6FY2QO.js} +1 -1
- package/dist/aurora.js +386 -355
- package/dist/{badge-owUOaaba.js → badge-BO6BC4G5.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/blob.js +44 -44
- package/dist/{button-yvGPb0Bx.js → button-BOFTUPyU.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/{card-3HFFpC7_.js → card-ByyqRBvK.js} +2 -2
- package/dist/card.js +1 -1
- package/dist/carousel.js +3 -3
- package/dist/{checkbox-BnXuGgJ3.js → checkbox-B1qn65se.js} +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip.js +8 -3
- package/dist/{class-names-q-UGOkHH.js → class-names-FlXcvRRT.js} +65 -18
- package/dist/{collapsible-B7O6m-Ch.js → collapsible-DFzK29Oh.js} +5 -2
- package/dist/collapsible.js +1 -1
- package/dist/color.glsl-DTJhdekG.js +34 -0
- package/dist/color.js +11 -11
- package/dist/color.wgsl-BTszLY39.js +398 -0
- package/dist/{command-BuBnYpxF.js → command-C-5xSEJ2.js} +8 -8
- package/dist/command.js +1 -1
- package/dist/component-styles.css +1 -0
- package/dist/components/_shared/class-names.d.ts +10 -1
- package/dist/components/_shared/control.d.ts +0 -1
- package/dist/components/_shared/index.d.ts +0 -1
- package/dist/components/_shared/menu/menu.css +1 -1
- package/dist/components/_shared/overlay/index.d.ts +1 -0
- package/dist/components/_shared/overlay/shortcuts.d.ts +12 -0
- package/dist/components/aurora/Aurora.vue.d.ts +1 -0
- package/dist/components/aurora/composables/atoms.d.ts +22 -6
- package/dist/components/aurora/composables/frameLoop.d.ts +6 -5
- package/dist/components/aurora/composables/runtime.d.ts +28 -1
- package/dist/components/aurora/composables/useAurora.d.ts +28 -0
- package/dist/components/aurora/composables/wgpuSetup.d.ts +1 -1
- package/dist/components/aurora/constants/presets.d.ts +62 -5
- package/dist/components/aurora/index.d.ts +1 -1
- package/dist/components/blob/Blob.vue.d.ts +3 -3
- package/dist/components/card/Card.vue.d.ts +8 -2
- package/dist/components/chip/Chip.vue.d.ts +1 -7
- package/dist/components/chip/chipVariants.d.ts +1 -0
- package/dist/components/collapsible/Collapsible.vue.d.ts +1 -0
- package/dist/components/command/CommandDialog.vue.d.ts +1 -1
- package/dist/components/configurator/Configurator.vue.d.ts +25 -2
- package/dist/components/configurator/ConfiguratorRow.vue.d.ts +4 -2
- package/dist/components/configurator/styles.css +1 -1
- package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
- package/dist/components/deck/styles/capture.css +1 -1
- package/dist/components/dialog/styles.css +1 -1
- package/dist/components/dock/DockSeparator.vue.d.ts +2 -3
- package/dist/components/dock/GlassDock.vue.d.ts +1 -0
- package/dist/components/dock/composables/dockContext.d.ts +1 -8
- package/dist/components/dock/composables/dockCrossfadeContext.d.ts +0 -2
- package/dist/components/dock/composables/index.d.ts +1 -1
- package/dist/components/dock/composables/useDockHold.d.ts +16 -12
- package/dist/components/dock/composables/useDockRun.d.ts +20 -0
- package/dist/components/dock/composables/useDockSearch.d.ts +1 -1
- package/dist/components/dock/composables/useDockShellProps.d.ts +18 -101
- package/dist/components/dock/composables/useDockState.d.ts +2 -9
- package/dist/components/dock/constants.d.ts +15 -0
- package/dist/components/dock/index.d.ts +2 -2
- package/dist/components/dock/styles/controls/icon-button.css +1 -1
- package/dist/components/dock/styles/controls/tab-button.css +1 -1
- package/dist/components/dock/styles/controls/triggers.css +1 -1
- package/dist/components/dock/styles/controls.css +1 -1
- package/dist/components/dock/styles/density.css +1 -1
- package/dist/components/dock/styles/index.css +1 -1
- package/dist/components/dock/styles/layer-group.css +1 -1
- package/dist/components/dock/styles/layers.css +1 -1
- package/dist/components/dock/styles/morph.css +1 -1
- package/dist/components/dock/styles/run.css +1 -0
- package/dist/components/dock/styles/search.css +1 -1
- package/dist/components/dock/styles/shape.css +1 -1
- package/dist/components/dock/styles/shell-regions.css +1 -1
- package/dist/components/dock/styles/shell.css +1 -1
- package/dist/components/fourier-field/FourierField.vue.d.ts +29 -26
- package/dist/components/fourier-field/clock.d.ts +35 -0
- package/dist/components/fourier-field/constants.d.ts +80 -104
- package/dist/components/fourier-field/index.d.ts +3 -28
- package/dist/components/fourier-field/math.d.ts +69 -77
- package/dist/components/fourier-field/renderer/mint.d.ts +50 -0
- package/dist/components/fourier-field/renderer/uniforms.d.ts +84 -0
- package/dist/components/fourier-field/renderer/wgpu.d.ts +28 -0
- package/dist/components/fourier-field/shaders/compute.wgsl.d.ts +1 -0
- package/dist/components/fourier-field/shaders/render.wgsl.d.ts +1 -0
- package/dist/components/fourier-field/useFourierField.d.ts +49 -0
- package/dist/components/handmark/HandMark.vue.d.ts +18 -14
- package/dist/components/handmark/index.d.ts +4 -23
- package/dist/components/handmark/stroke.d.ts +92 -0
- package/dist/components/labeled-field/LabeledSwitch.vue.d.ts +3 -1
- package/dist/components/labeled-field/types.d.ts +1 -1
- package/dist/components/menu/DropdownMenu.vue.d.ts +1 -1
- package/dist/components/metric/coalesce-metric.d.ts +6 -1
- package/dist/components/metric/styles.css +1 -1
- package/dist/components/popover/Popover.vue.d.ts +1 -1
- package/dist/components/scroll-progress-rim/styles.css +1 -1
- package/dist/components/sheet/styles.css +1 -1
- package/dist/components/slider/styles.css +1 -1
- package/dist/components/tabs/SegmentedTabs.vue.d.ts +25 -112
- package/dist/components/tabs/composables/useTabDragMorph.d.ts +1 -1
- package/dist/components/tabs/composables/useTabResponsive.d.ts +11 -11
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/styles/drag.css +1 -1
- package/dist/components/tabs/styles/segmented.css +1 -1
- package/dist/components/tabs/types.d.ts +85 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/toast/Toast.vue.d.ts +2 -2
- package/dist/composables/color/index.d.ts +0 -15
- package/dist/composables/dark/darkModeSyncScript.d.ts +42 -0
- package/dist/composables/dom/useResolveTokenColor.d.ts +1 -1
- package/dist/composables/glass/index.d.ts +2 -0
- package/dist/composables/keyboard/useKeyboardShortcuts.d.ts +47 -1
- package/dist/composables/motion/pointer/pointerFieldMappings.d.ts +0 -41
- package/dist/{components/search/composables → composables/search}/index.d.ts +2 -2
- package/dist/{components/search/composables/fuzzySearchIndex.d.ts → composables/search/match.d.ts} +8 -3
- package/dist/composables/sidebar/types.d.ts +5 -1
- package/dist/configurator-DiwVN573.js +339 -0
- package/dist/configurator.js +1 -1
- package/dist/constellation.js +5 -5
- package/dist/{content-CWO-XL7o.js → content-So3j6SOe.js} +1 -1
- package/dist/control-DJp15L4U.js +7 -0
- package/dist/dark-mode-toggle.js +2 -2
- package/dist/{dark-z_P5QwqI.js → dark-pONY3x93.js} +2 -2
- package/dist/dark.js +1 -1
- package/dist/{data-table-_RrOEdiw.js → data-table-Ba_uTfPc.js} +3 -3
- package/dist/data-table.js +1 -1
- package/dist/{deck-Ci6YjB5e.js → deck-Cm_VmyNL.js} +1 -1
- package/dist/deck.js +1 -1
- package/dist/{dialog-CbRnTRtg.js → dialog-BZoFG0j8.js} +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +718 -496
- package/dist/dom.js +90 -8
- package/dist/easing.js +5 -5
- package/dist/expandable-container-CZUj9BzY.js +142 -0
- package/dist/expandable-container.js +2 -142
- package/dist/fourier-field.js +638 -855
- package/dist/fourier-math.js +6 -6
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +88 -75
- package/dist/handmark.js +330 -718
- package/dist/index.d.ts +2 -2
- package/dist/infinite-scroll.js +16 -17
- package/dist/{input-Bls2A4Tt.js → input-eLZ_AU7l.js} +1 -1
- package/dist/input.js +1 -1
- package/dist/keyboard.js +64 -21
- package/dist/{label-BQEZhnK_.js → label-CE03H1KL.js} +2 -2
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +9 -6
- package/dist/{menu-wLu1XGKn.js → menu-BnmCOa3y.js} +93 -90
- package/dist/menu.js +2 -2
- package/dist/metric.js +12 -7
- package/dist/{motion-D4uYE0UM.js → motion-BvV1_24p.js} +1 -1
- package/dist/motion-core.js +35 -35
- package/dist/{number-field-NFAwQ0HK.js → number-field-RP89046a.js} +2 -2
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +3 -3
- package/dist/{participation-B0hdsIRo.js → participation-Di4UHbzk.js} +8 -8
- package/dist/{pointerFieldMappings-DP5tla5z.js → pointerFieldMappings-DXwlU5uj.js} +7 -23
- package/dist/popover-DA87hFBx.js +184 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-DF8dWZIX.js → progress-eVa-mc7J.js} +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-Ci8o-pDx.js → radio-group-B58Bz16F.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{select-CDgwGH_P.js → select-fy3vtArm.js} +13 -13
- package/dist/select.js +1 -1
- package/dist/{separator-CN11t406.js → separator-D4EZM10u.js} +2 -2
- package/dist/separator.js +1 -1
- package/dist/{sheet-BEFvnO_u.js → sheet-BQJyER59.js} +120 -115
- package/dist/sheet.js +2 -2
- package/dist/shortcuts-DGGWNRNe.js +13 -0
- package/dist/sidebar.js +4 -4
- package/dist/{slider-gsc8jDIo.js → slider-5ChjjWSR.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{status-dot-BpnqOP5N.js → status-dot-W4LFiJps.js} +2 -2
- package/dist/status-dot.js +1 -1
- package/dist/styles/accessibility.css +1 -1
- package/dist/styles/animations.css +1 -1
- package/dist/styles/components.css +1 -1
- package/dist/styles/glass/a11y-fallback.css +1 -1
- package/dist/styles/glass/dissolve.css +1 -1
- package/dist/styles/glass/focus-veil.css +1 -1
- package/dist/styles/glass/ladder.css +1 -1
- package/dist/styles/glass/material.css +1 -1
- package/dist/styles/glass/overlay-plate.css +1 -1
- package/dist/styles/glass/reveal.css +1 -1
- package/dist/styles/glass-specular-track.css +1 -1
- package/dist/styles/paper.css +1 -1
- package/dist/styles/scroll-choreography.css +1 -1
- package/dist/styles/scroll-chrome.css +1 -1
- package/dist/styles/scroll-driven.css +1 -1
- package/dist/styles/theme/literals.css +1 -1
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/dark-arm-glass.css +1 -1
- package/dist/styles/tokens/light-dark.css +1 -1
- package/dist/styles/tokens/offsets.css +1 -1
- package/dist/styles/tokens/scheme-motion.css +1 -1
- package/dist/styles/tokens/sizing.css +1 -1
- package/dist/styles/typography/semantic.css +1 -1
- package/dist/styles/typography/utilities.css +1 -1
- package/dist/styles/utilities/a11y-overrides.css +1 -1
- package/dist/styles/utilities/responsive.css +1 -1
- package/dist/styles/view-transition.css +1 -1
- package/dist/styles/viz-reveal.css +1 -1
- package/dist/surface.js +1 -1
- package/dist/{switch-DxZzDrmV.js → switch-BYUZ6g9G.js} +2 -2
- package/dist/switch.js +1 -1
- package/dist/{tabs-CYscnq5H.js → tabs-rdRXKXxd.js} +4 -3
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +44 -42
- package/dist/{toast-9c6Kp58L.js → toast-DVOwo6GB.js} +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-11aPGMfE.js → toggle-group-CC5b3o1R.js} +2 -2
- package/dist/toggle-group.js +1 -1
- package/dist/{tooltip-DqKMZ4dn.js → tooltip-DhTHhtJN.js} +2 -2
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAccentTone-DFAh1osB.js → useAccentTone-DitmKfGL.js} +1 -1
- package/dist/{resolveCanvasColor-6MCrswTB.js → useCanvas2D-CQRElMyE.js} +1 -11
- package/dist/{usePointerVelocityField-DsIf7yyq.js → usePointerVelocityField-Lx26_Yap.js} +1 -1
- package/dist/useResolveTokenColor-B2FfJnd9.js +24 -0
- package/package.json +5 -21
- package/dist/DialogContent-4hzLiaCQ.js +0 -152
- package/dist/canvas.d.ts +0 -1
- package/dist/canvas.js +0 -2
- package/dist/color.wgsl-B0N3mKMb.js +0 -412
- package/dist/compile-D7VYG3gi.js +0 -19
- package/dist/components/dock/composables/useDockOverflowFit.d.ts +0 -20
- package/dist/components/dock/composables/useDockTouchGate.d.ts +0 -42
- package/dist/components/dock/styles/overflow.css +0 -1
- package/dist/components/fourier-field/composables/fourierFieldGLSetup.d.ts +0 -24
- package/dist/components/fourier-field/composables/fourierFieldWGPUSetup.d.ts +0 -31
- package/dist/components/fourier-field/composables/uniformBridgeWGPU.d.ts +0 -39
- package/dist/components/fourier-field/composables/useFourierField.d.ts +0 -56
- package/dist/components/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +0 -1
- package/dist/components/fourier-field/shaders/fourier-field.glsl.d.ts +0 -4
- package/dist/components/fourier-field/shaders/fourier-field.render.wgsl.d.ts +0 -1
- package/dist/components/fourier-field/shaders/fourier-field.ribbon.d.ts +0 -51
- package/dist/components/handmark/brush.d.ts +0 -269
- package/dist/components/handmark/composables/useHandMark.d.ts +0 -99
- package/dist/components/handmark/constants.d.ts +0 -69
- package/dist/components/handmark/freehand.d.ts +0 -69
- package/dist/components/handmark/geometry.d.ts +0 -62
- package/dist/components/handmark/ink.d.ts +0 -11
- package/dist/components/handmark/noise.d.ts +0 -30
- package/dist/components/handmark/texture.d.ts +0 -39
- package/dist/components/handmark/types.d.ts +0 -70
- package/dist/components/search/SearchBar.vue.d.ts +0 -38
- package/dist/components/search/index.d.ts +0 -8
- package/dist/components/search/searchVariants.d.ts +0 -16
- package/dist/configurator-BoeScnDL.js +0 -311
- package/dist/control-Da4XeT43.js +0 -11
- package/dist/popover-DBMKTPkL.js +0 -181
- package/dist/search.d.ts +0 -1
- package/dist/search.js +0 -61
- package/dist/useFuzzySearch-CUnZknpm.js +0 -177
- package/dist/useResolveTokenColor-CspQv_ik.js +0 -107
- /package/dist/{components/search/composables → composables/search}/types.d.ts +0 -0
- /package/dist/{components/search/composables → composables/search}/useFuzzySearch.d.ts +0 -0
package/README.md
CHANGED
|
@@ -65,6 +65,14 @@ The optional `styles/fonts` entry carries the packaged Plus Jakarta Sans and
|
|
|
65
65
|
Fira Code faces as self-contained WOFF2 data URLs. Consumers that need raw font
|
|
66
66
|
files can address the same built assets through `@mkbabb/glass-ui/fonts/*`.
|
|
67
67
|
|
|
68
|
+
Every packaged face is roman: there is no italic `@font-face` and none is
|
|
69
|
+
intended. Three utilities ask for one anyway — `text-math`, `text-math-body` and
|
|
70
|
+
`fourier-f`, because mathematical italic is notation — so they are
|
|
71
|
+
SYNTHESIS-DEPENDENT: the browser obliques the roman face for them. The library
|
|
72
|
+
declares no `font-synthesis`, so the UA default (`auto`) applies and they paint.
|
|
73
|
+
If your app sets `font-synthesis: none` at the root, those three lose their slant.
|
|
74
|
+
`text-caption` is upright; add `italic` beside it if you want the slant back.
|
|
75
|
+
|
|
68
76
|
## Documentation
|
|
69
77
|
|
|
70
78
|
The authoritative canon lives under [`docs/canon/`](./docs/canon/), with the
|
|
@@ -78,6 +86,8 @@ consumer-facing migration path in [`MIGRATION.md`](./MIGRATION.md):
|
|
|
78
86
|
- [`docs/canon/motion-system.md`](./docs/canon/motion-system.md) — the spring/bezier motion canon
|
|
79
87
|
- [`DESIGN.md`](./DESIGN.md) — the storybook category index
|
|
80
88
|
|
|
89
|
+
Of that, only `MIGRATION.md` ships. `package.json` declares `files: ["dist", "MIGRATION.md"]`, so an install carries `dist/`, `MIGRATION.md`, this README and the licence — nothing else; the migration guide for the version you pinned is at `node_modules/@mkbabb/glass-ui/MIGRATION.md`. Read `DESIGN.md` and `docs/` on GitHub.
|
|
90
|
+
|
|
81
91
|
## Build
|
|
82
92
|
|
|
83
93
|
```bash
|
|
@@ -131,6 +141,11 @@ import { InstrumentChassis } from "@mkbabb/glass-ui/instrument-chassis";
|
|
|
131
141
|
import { useSidebarState } from "@mkbabb/glass-ui/sidebar";
|
|
132
142
|
```
|
|
133
143
|
|
|
144
|
+
There is no `/clipboard` subpath. `useClipboard` and `writeClipboard` ship on `/dom` and on
|
|
145
|
+
the root barrel; `useClipboard` returns `{ status, copy, invalidate }`, where `status` is a
|
|
146
|
+
`ComputedRef<ClipboardStatus>` — the `copied` boolean was removed at 7.0.0, and the
|
|
147
|
+
equivalent is `status.value === "success"`.
|
|
148
|
+
|
|
134
149
|
The v0.9.x nested subpaths `@mkbabb/glass-ui/composables/dark` and
|
|
135
150
|
`.../composables/keyboard` were flattened to `/dark` and `/keyboard` at v1.0.
|
|
136
151
|
The demo-only `/pagination` and `/virtual` subpaths are retired. The 5.0.0 export
|
|
@@ -153,12 +168,42 @@ Convenience classes bundle a tier with a shape: `.glass-card` (resting + `--radi
|
|
|
153
168
|
|
|
154
169
|
## Design Tokens
|
|
155
170
|
|
|
156
|
-
`src/styles/tokens/` defines the shared `:root` properties consumed by all style modules and components — duration, easing (`--spring-{smooth,snappy,bouncy,gentle}` + `--spring-<name>-duration` clocks), z-index, radius (primitive + semantic), shadows (composed via `color-mix(in srgb, var(--shadow-color) N%, transparent)`), the 5-tier glass ladder, paper/grain textures, the `--surface-tint-*` family, and the warm-chroma color palette.
|
|
171
|
+
`src/styles/tokens/` defines the shared `:root` properties consumed by all style modules and components — duration, easing (`--spring-{smooth,snappy,bouncy,gentle}` + `--spring-<name>-duration` clocks), z-index, radius (primitive + semantic), shadows (composed via `color-mix(in srgb, var(--shadow-color) N%, transparent)`), the 5-tier glass ladder, paper/grain textures, the `--surface-tint-*` family, and the warm-chroma color palette. These are declared in a plain unlayered `:root`, which beats every layered consumer `:root`: re-declare one in an unlayered `:root` of your own, or on an element below `:root` in any layer, and every reader downstream follows; a `:root` inside `@theme` or any `@layer` loses to the package root. Font registers are the one exception and live in the theme layer — re-declare `--font-serif-math` in your own `@theme`, and rebrand `--font-text` / `--font-display` there or through `--font-stack-text` / `--font-stack-display` on an unlayered `:root` (`MIGRATION.md`, _The token-root contract_ under 10.0.0). [2026-09-22 · O-23/O-32 B-1 — this sentence said any re-declaration in your own CSS wins; a layered `:root` does not.]
|
|
172
|
+
|
|
173
|
+
**Every other rule the package ships sits in `@layer components`**, and `./styles.css` opens with `@layer theme, base, components, utilities;` (the same order `./styles` declares), so a rule of yours — unlayered, or in `@layer utilities` — beats a library rule at any specificity. What stays outside the layer: the token roots above, the `@utility` / `@theme` / `@property` / `@font-face` / `@keyframes` at-rules, and one named exception, the slider's stylesheet. `!important` runs the other way across layers: a library `!important` beats yours unless yours sits in a layer ordered before `components`.
|
|
174
|
+
|
|
175
|
+
**Bridge names are not tokens, and overriding one does nothing.** `src/styles/theme/bridges.css` is a single `@theme inline` block mapping Tailwind theme keys onto those tokens: `--shadow-glass-*`, `--color-*`, `--text-*`, `--spacing-icon-*`, `--blur-glass-*` and nine more families (`--z-*`, `--font-*`, `--leading-*`, `--tracking-*`, `--transition-*`, `--ease-*` among them). Their job is to generate utilities — `shadow-glass-quiet`, `blur-glass-wash`, `size-icon-md` — with the referenced value substituted in place, and `inline` is what stops them minting a second spelling of the same value. A theme key reaches your built CSS as a custom property only when something in that build reads it with `var()`; nothing in this library's own build reads the shadow, blur or icon bridges, so none of them emits here; the shadow family also measures zero in four independently compiled consumer bundles. `var(--shadow-glass-quiet)` therefore resolves to nothing. Override the `tokens/` spelling instead:
|
|
176
|
+
|
|
177
|
+
```css
|
|
178
|
+
/* the override point — a plain :root token, always emitted */
|
|
179
|
+
:root {
|
|
180
|
+
--glass-shadow-quiet: 0 1px 3px rgb(0 0 0 / 0.08);
|
|
181
|
+
--glass-shadow-resting: 0 4px 12px rgb(0 0 0 / 0.1);
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Five of the six shadow rungs are bridged: `--glass-shadow-capsule` has no `--shadow-glass-capsule` and no utility, only the token.
|
|
186
|
+
|
|
187
|
+
**The easing seam.** `<EasingCurve>` writes `--easing-curve-accent: var(--motion-accent, var(--viz-legendre))` on its own wrapper, so that name is already bound on the curve's subtree and an ancestor's `--easing-curve-accent` never reaches it. The one free arm is `--motion-accent`: set it on or above the curve to re-point the accent.
|
|
157
188
|
|
|
158
189
|
## Typography
|
|
159
190
|
|
|
160
191
|
Type scale based on √φ ≈ 1.272 (modulated golden ratio); each step is φ^(n/2) of the base. Semantic classes run `.text-micro` → `.text-body` → `.text-heading` → `.text-title` → the audacious `.text-display-*` ladder. The `@theme` block in `theme.css` maps these to Tailwind's `--font-size-*` tokens, so `text-sm` / `text-lg` adopt the golden-ratio scale.
|
|
161
192
|
|
|
193
|
+
## Target size
|
|
194
|
+
|
|
195
|
+
Three mechanisms carry the WCAG-2.5.5 44px floor, and a consumer reaches all
|
|
196
|
+
three. `--control-floor` is the clamp seam in the height cohort: `0px` at
|
|
197
|
+
desktop, lifted to `--touch-target` (`2.75rem`) under `pointer: coarse`, and
|
|
198
|
+
every `--control-h-xs|sm|md|lg` rung is a `max()` against it, so no `--ui-scale`
|
|
199
|
+
below 1 can drop a control under the floor. `[data-control-target]` is the
|
|
200
|
+
attribute opt-in — one shared rule in `styles/utilities/responsive.css` floors
|
|
201
|
+
both axes of any element wearing it under coarse pointer, and you can put it on
|
|
202
|
+
your own interactive faces. `.control-bit` is the binary-control register
|
|
203
|
+
(checkbox · switch · radio): the host itself is the ≥44 seat, in flow, and the
|
|
204
|
+
paint sits on the smaller `.control-bit__face` child — so the rect the pointer
|
|
205
|
+
hits is the rect `getBoundingClientRect` reads, and the paint stays small.
|
|
206
|
+
|
|
162
207
|
## Conventions
|
|
163
208
|
|
|
164
209
|
- TypeScript `strict:true`, `verbatimModuleSyntax:true`; `moduleResolution:bundler`, `target:ES2022`, `lib:ES2023`
|
|
@@ -173,18 +218,17 @@ See [`docs/canon/conventions.md`](./docs/canon/conventions.md) for the full set.
|
|
|
173
218
|
|
|
174
219
|
All runtime deps are peer — glass-ui declares them in `peerDependencies` and ships none in its own `dependencies` bundle, so the consumer's single Vue / Tailwind / reka-ui spine is reused rather than re-vendored.
|
|
175
220
|
|
|
176
|
-
| Package
|
|
177
|
-
|
|
|
178
|
-
| `vue` ^3.5
|
|
179
|
-
| `reka-ui` ^2.0
|
|
180
|
-
|
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
|
|
|
184
|
-
| `@
|
|
185
|
-
| `@mkbabb/value.js` ^4.0.0
|
|
186
|
-
|
|
|
187
|
-
| `tw-animate-css` ^1.2.5 | `animate-in`/`animate-out` data-state utilities (optional peer) |
|
|
221
|
+
| Package | Role |
|
|
222
|
+
| ----------------------------------- | ----------------------------------------------------------------- |
|
|
223
|
+
| `vue` ^3.5 | Framework |
|
|
224
|
+
| `reka-ui` ^2.0 | Headless UI primitives |
|
|
225
|
+
| `tailwindcss` ^4.0 | Utility CSS |
|
|
226
|
+
| `@lucide/vue` ^1.16.0 | Icon set (the renamed v1 package; was `lucide-vue-next` pre-v1.0) |
|
|
227
|
+
| `@mkbabb/keyframes.js` ^6.0.0 | Spring/keyframe runtime |
|
|
228
|
+
| `vue-component-type-helpers` ^3.0.3 | Emitted-declaration helper types |
|
|
229
|
+
| `@vueuse/core` ^14.0 | useDark, createGlobalState, useEventListener (optional peer) |
|
|
230
|
+
| `@mkbabb/value.js` ^4.0.0 | Color and easing capabilities (optional peer) |
|
|
231
|
+
| `tw-animate-css` ^1.2.5 | `animate-in`/`animate-out` data-state utilities (optional peer) |
|
|
188
232
|
|
|
189
233
|
`tw-animate-css` is required only for the animated overlay surfaces (Dialog / Sheet / Popover / DropdownMenu emit `animate-in`/`animate-out` data-state utilities); a Button-only consumer never needs it. See [`docs/canon/dependencies.md`](./docs/canon/dependencies.md).
|
|
190
234
|
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
|
+
import { t } from "./resolve-DdrNvBby.js";
|
|
3
|
+
import { t as n } from "./useSpringMount-OA-0mTNv.js";
|
|
4
|
+
import { i as r, n as i } from "./motion-BvV1_24p.js";
|
|
5
|
+
import { t as a } from "./useMotionAxis-D-rtIhca.js";
|
|
6
|
+
import { t as o } from "./shortcuts-DGGWNRNe.js";
|
|
7
|
+
import { computed as s, createBlock as c, createCommentVNode as l, createElementVNode as u, createVNode as d, defineComponent as f, mergeProps as p, openBlock as m, ref as h, renderSlot as g, unref as _, watch as v, withCtx as y } from "vue";
|
|
8
|
+
import { DialogClose as b, DialogContent as x, DialogPortal as S, DialogRoot as C, injectDialogRootContext as w, useForwardPropsEmits as T } from "reka-ui";
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/components/dialog/Dialog.vue
|
|
11
|
+
var E = /* @__PURE__ */ f({
|
|
12
|
+
__name: "Dialog",
|
|
13
|
+
props: {
|
|
14
|
+
open: { type: Boolean },
|
|
15
|
+
defaultOpen: { type: Boolean },
|
|
16
|
+
modal: { type: Boolean },
|
|
17
|
+
unmountOnHide: { type: Boolean },
|
|
18
|
+
origin: {}
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:open"],
|
|
21
|
+
setup(e, { emit: t }) {
|
|
22
|
+
let n = e, r = t, i = T(s(() => {
|
|
23
|
+
let { origin: e, ...t } = n;
|
|
24
|
+
return t;
|
|
25
|
+
}), r);
|
|
26
|
+
return (e, t) => (m(), c(_(C), p({ "data-slot": "dialog" }, _(i)), {
|
|
27
|
+
default: y(() => [g(e.$slots, "default")]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16));
|
|
30
|
+
}
|
|
31
|
+
}), D = /* @__PURE__ */ f({
|
|
32
|
+
inheritAttrs: !1,
|
|
33
|
+
__name: "DialogContent",
|
|
34
|
+
props: {
|
|
35
|
+
forceMount: { type: Boolean },
|
|
36
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
37
|
+
class: { type: [
|
|
38
|
+
Boolean,
|
|
39
|
+
null,
|
|
40
|
+
String,
|
|
41
|
+
Object,
|
|
42
|
+
Array
|
|
43
|
+
] },
|
|
44
|
+
surface: { default: "glass" },
|
|
45
|
+
motion: {},
|
|
46
|
+
scroll: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
dismiss: { default: "free" }
|
|
51
|
+
},
|
|
52
|
+
emits: [
|
|
53
|
+
"escapeKeyDown",
|
|
54
|
+
"pointerDownOutside",
|
|
55
|
+
"focusOutside",
|
|
56
|
+
"interactOutside",
|
|
57
|
+
"openAutoFocus",
|
|
58
|
+
"closeAutoFocus"
|
|
59
|
+
],
|
|
60
|
+
setup(f, { emit: C }) {
|
|
61
|
+
let E = f, D = C, O = s(() => {
|
|
62
|
+
let { class: e, surface: t, motion: n, scroll: r, dismiss: i, forceMount: a, ...o } = E;
|
|
63
|
+
return o;
|
|
64
|
+
}), k = a(() => E.motion), A = s(() => k.resolved.value !== "off"), j = w();
|
|
65
|
+
o(() => j.open.value && j.modal.value);
|
|
66
|
+
let M = n({
|
|
67
|
+
open: j.open,
|
|
68
|
+
preset: "present"
|
|
69
|
+
}), N = s(() => {
|
|
70
|
+
if (!A.value) return;
|
|
71
|
+
let e = M.position.value;
|
|
72
|
+
return {
|
|
73
|
+
transform: "none",
|
|
74
|
+
scale: String(1 - .05 * e),
|
|
75
|
+
opacity: String(1 - e),
|
|
76
|
+
transition: "none"
|
|
77
|
+
};
|
|
78
|
+
}), P = s(() => A.value ? M.present.value || j.open.value : E.forceMount), F = s(() => A.value && !j.open.value ? "" : void 0), I = s(() => A.value ? i(M.position.value) : null), L = s(() => A.value ? M.present.value || j.open.value : void 0), R = h(null), z = () => R.value?.closest("[data-slot=\"dialog-content\"]") ?? null;
|
|
79
|
+
v(() => j.open.value, (e) => {
|
|
80
|
+
if (!A.value || e !== !1) return;
|
|
81
|
+
let t = document.activeElement;
|
|
82
|
+
t && z()?.contains(t) && j.triggerElement.value?.focus({ preventScroll: !0 });
|
|
83
|
+
}, { flush: "sync" });
|
|
84
|
+
let B = h(0), V = s(() => B.value === 0 ? void 0 : B.value % 2 == 1 ? "a" : "b"), H = s(() => E.dismiss === "free");
|
|
85
|
+
function U(e) {
|
|
86
|
+
E.dismiss === "locked" && (e.preventDefault(), B.value += 1);
|
|
87
|
+
}
|
|
88
|
+
let W = T(O, D), G = s(() => ({
|
|
89
|
+
"--glass-veil-tier": "var(--glass-veil-dialog)",
|
|
90
|
+
...k.hostStyle.value ?? {},
|
|
91
|
+
...N.value ?? {}
|
|
92
|
+
})), K = s(() => e("fixed left-1/2 top-1/2 z-modal", t("floating"), E.scroll ? "max-h-[calc(100dvh-2rem)] overflow-y-auto" : "", E.class));
|
|
93
|
+
return (e, t) => (m(), c(_(S), { "force-mount": P.value }, {
|
|
94
|
+
default: y(() => [d(r, {
|
|
95
|
+
veil: "",
|
|
96
|
+
opacity: I.value,
|
|
97
|
+
"force-mount": L.value
|
|
98
|
+
}, null, 8, ["opacity", "force-mount"]), d(_(x), p({
|
|
99
|
+
..._(W),
|
|
100
|
+
...e.$attrs,
|
|
101
|
+
inert: F.value
|
|
102
|
+
}, {
|
|
103
|
+
"aria-modal": _(j).modal.value ? "true" : void 0,
|
|
104
|
+
"force-mount": P.value,
|
|
105
|
+
class: K.value,
|
|
106
|
+
style: G.value,
|
|
107
|
+
"data-surface": E.surface,
|
|
108
|
+
"data-slot": "dialog-content",
|
|
109
|
+
"data-dismiss": E.dismiss,
|
|
110
|
+
"data-rebuff": V.value,
|
|
111
|
+
"data-scroll": E.scroll ? "" : void 0,
|
|
112
|
+
"data-motion": _(k).dataMotion.value,
|
|
113
|
+
onEscapeKeyDown: U,
|
|
114
|
+
onPointerDownOutside: U
|
|
115
|
+
}), {
|
|
116
|
+
default: y(() => [
|
|
117
|
+
u("span", {
|
|
118
|
+
ref_key: "contentAnchorEl",
|
|
119
|
+
ref: R,
|
|
120
|
+
hidden: ""
|
|
121
|
+
}, null, 512),
|
|
122
|
+
H.value ? (m(), c(_(b), {
|
|
123
|
+
key: 0,
|
|
124
|
+
"data-slot": "dialog-close"
|
|
125
|
+
}, {
|
|
126
|
+
default: y(() => [...t[0] ||= [u("svg", {
|
|
127
|
+
class: "w-4 h-4",
|
|
128
|
+
viewBox: "0 0 24 24",
|
|
129
|
+
fill: "none",
|
|
130
|
+
stroke: "currentColor",
|
|
131
|
+
"stroke-width": "2",
|
|
132
|
+
"stroke-linecap": "round",
|
|
133
|
+
"stroke-linejoin": "round",
|
|
134
|
+
"aria-hidden": "true"
|
|
135
|
+
}, [u("path", { d: "M18 6 6 18M6 6l12 12" })], -1), u("span", { class: "sr-only" }, "Close", -1)]]),
|
|
136
|
+
_: 1
|
|
137
|
+
})) : l("", !0),
|
|
138
|
+
g(e.$slots, "default")
|
|
139
|
+
]),
|
|
140
|
+
_: 3
|
|
141
|
+
}, 16, [
|
|
142
|
+
"aria-modal",
|
|
143
|
+
"force-mount",
|
|
144
|
+
"class",
|
|
145
|
+
"style",
|
|
146
|
+
"data-surface",
|
|
147
|
+
"data-dismiss",
|
|
148
|
+
"data-rebuff",
|
|
149
|
+
"data-scroll",
|
|
150
|
+
"data-motion"
|
|
151
|
+
])]),
|
|
152
|
+
_: 3
|
|
153
|
+
}, 8, ["force-mount"]));
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
//#endregion
|
|
157
|
+
export { E as n, D as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./class-names-
|
|
1
|
+
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
2
|
import { t } from "./primitive-B2t2jdqM.js";
|
|
3
3
|
import { computed as n, createBlock as r, defineComponent as i, inject as a, isRef as o, mergeProps as s, openBlock as c, provide as l, renderSlot as u, resolveDynamicComponent as d, unref as f, useAttrs as p, withCtx as m } from "vue";
|
|
4
4
|
import { ContextMenuCheckboxItem as h, ContextMenuContent as g, ContextMenuGroup as _, ContextMenuItem as v, ContextMenuItemIndicator as y, ContextMenuLabel as b, ContextMenuPortal as x, ContextMenuRadioGroup as S, ContextMenuRadioItem as C, ContextMenuSeparator as w, ContextMenuSub as T, ContextMenuSubContent as E, ContextMenuSubTrigger as D, ContextMenuTrigger as O, DropdownMenuCheckboxItem as k, DropdownMenuContent as A, DropdownMenuGroup as j, DropdownMenuItem as M, DropdownMenuItemIndicator as N, DropdownMenuLabel as P, DropdownMenuPortal as F, DropdownMenuRadioGroup as I, DropdownMenuRadioItem as L, DropdownMenuSeparator as R, DropdownMenuSub as z, DropdownMenuSubContent as B, DropdownMenuSubTrigger as V, DropdownMenuTrigger as H, injectDropdownMenuRootContext as U } from "reka-ui";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./class-names-
|
|
1
|
+
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
2
|
import { t } from "./resolve-DdrNvBby.js";
|
|
3
3
|
import { computed as n, createBlock as r, defineComponent as i, mergeProps as a, openBlock as o, renderSlot as s, unref as c, useAttrs as l, withCtx as u } from "vue";
|
|
4
4
|
import { Primitive as d } from "reka-ui";
|
|
@@ -2,7 +2,7 @@ import { i as e, t } from "./value-DMhh2R94.js";
|
|
|
2
2
|
import { mixColors as n, safeAccentColor as r } from "@mkbabb/value.js/color";
|
|
3
3
|
import { serializeCssColor as i } from "@mkbabb/value.js/css";
|
|
4
4
|
//#region src/composables/color/accent-tone-solve.ts
|
|
5
|
-
var a = "hsl(
|
|
5
|
+
var a = "hsl(30 85% 96%)", o = 4.5, s = .18;
|
|
6
6
|
function c(c, l = {}) {
|
|
7
7
|
let u = l.bandStrength ?? s, d = l.inkContrast ?? o, f = l.surface || a, p = e(c, "solveAccentInk:tone");
|
|
8
8
|
return t("solveAccentInk:serialize", i(t("solveAccentInk:contrast", r(p, t("solveAccentInk:band", n(e(f, "solveAccentInk:surface"), p, u, { space: "oklab" })), {
|