@mkbabb/glass-ui 3.10.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ToggleGroupItem-Cev4pOVK.js → ToggleGroupItem-COu_4IW4.js} +17 -13
- package/dist/api/index.d.ts +1 -1
- package/dist/api.js +2 -2
- package/dist/aurora.js +77 -77
- package/dist/components/custom/aurora/constants/presets.d.ts +62 -5
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/dock/GlassDock.vue.d.ts +5 -1
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -7
- package/dist/components/custom/handmark/brush.d.ts +23 -0
- package/dist/components/custom/handmark/geometry.d.ts +20 -2
- package/dist/components/custom/handmark/index.d.ts +2 -2
- package/dist/components/custom/handmark/useHandMark.d.ts +26 -5
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/components/ui/toggle/index.d.ts +1 -1
- package/dist/components/ui/toggle-group/ToggleGroup.vue.d.ts +7 -1
- package/dist/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +3 -1
- package/dist/components/ui/toggle-group/toggleGroupContext.d.ts +13 -0
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +21 -1
- package/dist/controls.js +1 -1
- package/dist/dark.d.ts +1 -1
- package/dist/dark.js +1 -1
- package/dist/dock.js +191 -174
- package/dist/expandable-container.js +67 -49
- package/dist/fourier-field.js +1 -1
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +2 -2
- package/dist/handmark.js +176 -123
- package/dist/labeled-field.js +1 -1
- package/dist/{presets-Dkdv55Gt.js → presets-BP_ALM0m.js} +14 -1
- package/dist/{slider-CyzcxBoh.js → slider-ClgpP7EB.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/styles/animations.css +40 -0
- package/dist/styles/components.css +1 -1
- package/dist/styles/tokens.css +5 -0
- package/dist/styles/utilities.css +44 -13
- package/dist/toggle-group.js +1 -1
- package/dist/{useGlobalDark-d6waty-X.js → useGlobalDark-D1wgEqfW.js} +21 -2
- package/package.json +10 -4
- package/src/styles/animations.css +40 -0
- package/src/styles/tokens.css +5 -0
- package/src/styles/utilities.css +44 -13
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Aurora v4.1 — library config shape.
|
|
3
3
|
*
|
|
4
|
-
* Authored presets (Sky, Dawn, Meadow, Deliberative, Day9, Oil Impasto,
|
|
4
|
+
* Authored THEMED presets (Sky, Dawn, Meadow, Deliberative, Day9, Oil Impasto,
|
|
5
5
|
* Oil Gestural, Oil Van Gogh, Crayon Sunset, Crayon Rainbow, Crayon Ocean)
|
|
6
6
|
* live in the consumer — see demo/stories/aurora/presets.ts.
|
|
7
7
|
*
|
|
8
|
-
* Per memory rule "Presets in consumers": named
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Per memory rule "Presets in consumers": named THEMED presets belong in each
|
|
9
|
+
* consumer project, not in the library. The library exports only the shape, a
|
|
10
|
+
* minimum-viable DEFAULT_AURORA_CONFIG, and — the one deliberate exception
|
|
11
|
+
* (E22 / d-paper-aurora M4) — the `PAPER_WASH_GROUND` CALIBRATION partial: a
|
|
12
|
+
* recessive-ground crayon TUNING (not a themed palette) whose deft tooth dials
|
|
13
|
+
* are LIBRARY CANON so a data-ground aurora reads as paper-on-tooth without each
|
|
14
|
+
* consumer dial-tuning the same recessive calibration by hand (the
|
|
15
|
+
* `proof:aurora-paper-ground` gate locks it). It carries NO palette/nuclei — the
|
|
16
|
+
* consumer spreads it over its own pole-derived pigment (page-glow IS data-glow).
|
|
12
17
|
*/
|
|
13
18
|
import type { OklchStop } from "../../../../composables/color";
|
|
14
19
|
export type { OklchStop };
|
|
@@ -114,6 +119,14 @@ export interface AuroraConfig {
|
|
|
114
119
|
granulation: number;
|
|
115
120
|
impasto: number;
|
|
116
121
|
brokenColor: number;
|
|
122
|
+
/**
|
|
123
|
+
* The medium's own paper-tooth multiplier (`uCanvasGrain` — `mediums.glsl.ts`
|
|
124
|
+
* `result *= 1 + tooth*toothAmp*uCanvasGrain`). The themed mediums ride the
|
|
125
|
+
* sub-0.1 band; the RECESSIVE-ground `crayon` preset (PAPER_WASH_GROUND) rides
|
|
126
|
+
* a higher tooth multiplier (~0.5) so the dry tooth is FELT at the clamped
|
|
127
|
+
* ground ceiling where a hue-tint dies — texture is cheap to the eye, flat hue
|
|
128
|
+
* is expensive (the d-paper-aurora load-bearing physics).
|
|
129
|
+
*/
|
|
117
130
|
canvasGrain: number;
|
|
118
131
|
/**
|
|
119
132
|
* AW.W4.2 — the impasto relight direction (the movable directional source the
|
|
@@ -181,3 +194,47 @@ export declare const MAX_STOPS = 8;
|
|
|
181
194
|
* Not a themed preset — the demo's 11 authored presets override every field.
|
|
182
195
|
*/
|
|
183
196
|
export declare const DEFAULT_AURORA_CONFIG: AuroraConfig;
|
|
197
|
+
/**
|
|
198
|
+
* `PAPER_WASH_GROUND` — the library-canon recessive-ground crayon calibration.
|
|
199
|
+
*
|
|
200
|
+
* The deft tooth dials the paper-aurora hybrid needs, pinned ONCE at the library
|
|
201
|
+
* level so a data-ground aurora reads as pigment-on-paper-tooth — NOT a dead hue
|
|
202
|
+
* tint, NOT a screen-like gradient — without each consumer hand-tuning the same
|
|
203
|
+
* recessive calibration (the root-repo law: the calibration lives in the library;
|
|
204
|
+
* the consumer never dial-tunes it). It is a PARTIAL: it carries NO palette /
|
|
205
|
+
* nuclei / motion — the consumer SPREADS it over its own pole-derived pigment so
|
|
206
|
+
* the page-glow stays the data-glow (the keystone the smooth-medium swap preserves
|
|
207
|
+
* verbatim; only the DEPOSITION changes from a gradient to a dry-tooth multiply).
|
|
208
|
+
*
|
|
209
|
+
* The pinned dials (the named stopping rules, d-paper-aurora M1):
|
|
210
|
+
* - `medium: "crayon"` — the DRY tooth-multiply (a TEXTURE, not strokes;
|
|
211
|
+
* admissible behind data where the four
|
|
212
|
+
* stroke-deposition mediums are forbidden).
|
|
213
|
+
* - `granulation: 0.30` — pigment settles in the paper tooth (felt-at-rest).
|
|
214
|
+
* - `canvasGrain: 0.5` — the medium's tooth multiplier, lifted so the dry
|
|
215
|
+
* tooth survives the clamped ground ceiling.
|
|
216
|
+
* - `strokeAmount: 0.35` — the crayon PRESSURE (how hard the tooth bites);
|
|
217
|
+
* LOW (recessive — the tooth is felt, never a slab).
|
|
218
|
+
* - `strokeAnisotropy: 0.5` — moderate directional squash; never high enough to
|
|
219
|
+
* read as STROKES (crumb-texture, not brushwork).
|
|
220
|
+
* Plus the recessive guards: `saturation < 1` (the ground spends NO chroma budget —
|
|
221
|
+
* the pops live in the icons), no impasto/sheen (`impasto: 0`, single layer), and a
|
|
222
|
+
* felt `paperGrain` floor.
|
|
223
|
+
*
|
|
224
|
+
* Spread it: `const cfg = { ...consumerBase, ...PAPER_WASH_GROUND }` — the
|
|
225
|
+
* calibration wins the deposition dials, the consumer keeps the pigment + nuclei.
|
|
226
|
+
*/
|
|
227
|
+
export declare const PAPER_WASH_GROUND: {
|
|
228
|
+
readonly medium: "crayon";
|
|
229
|
+
readonly strokeOrient: "tensor";
|
|
230
|
+
readonly granulation: 0.3;
|
|
231
|
+
readonly canvasGrain: 0.5;
|
|
232
|
+
readonly strokeAmount: 0.35;
|
|
233
|
+
readonly strokeAnisotropy: 0.5;
|
|
234
|
+
readonly strokeLayers: 1;
|
|
235
|
+
readonly impasto: 0;
|
|
236
|
+
readonly brokenColor: 0;
|
|
237
|
+
readonly wetEdge: 0;
|
|
238
|
+
readonly saturation: 0.92;
|
|
239
|
+
readonly paperGrain: 0.008;
|
|
240
|
+
};
|
|
@@ -5,7 +5,7 @@ export type { UseAuroraReturn } from "./composables/useAurora";
|
|
|
5
5
|
export { useCursorInteraction } from "./composables/useCursorInteraction";
|
|
6
6
|
export { createAurora } from "./composables/runtime";
|
|
7
7
|
export type { AuroraRuntimeMode, AuroraRuntimeOptions } from "./composables/runtime";
|
|
8
|
-
export { DEFAULT_AURORA_CONFIG, MAX_NUCLEI, MAX_STOPS, type AuroraConfig, type AuroraCursorApi, type AuroraFlow, type AuroraInstance, type AuroraInteractivity, type AuroraMedium, type AuroraNucleus, type FlowPattern, type OklchStop, type StrokeMode, type StrokeOrient, type WarpMode, } from "./constants/presets";
|
|
8
|
+
export { DEFAULT_AURORA_CONFIG, PAPER_WASH_GROUND, MAX_NUCLEI, MAX_STOPS, type AuroraConfig, type AuroraCursorApi, type AuroraFlow, type AuroraInstance, type AuroraInteractivity, type AuroraMedium, type AuroraNucleus, type FlowPattern, type OklchStop, type StrokeMode, type StrokeOrient, type WarpMode, } from "./constants/presets";
|
|
9
9
|
export { resolveAtoms, configToAtoms, nucleiPrior, DEFAULT_ATOMS, type AuroraAtoms, type AuroraMotionAtom, type AuroraZones, type AuroraZoneArrangement, type AuroraMediumAtom, type AuroraInteractivityAtom, } from "./composables/atoms";
|
|
10
10
|
export { cssToOklch, deriveAurora, flattenPalette, hexToOklchStop, oklchStopToHex, oklchToLinear, paletteToCssGradient, } from "./composables/color";
|
|
11
11
|
export type { AuroraHarmony, DeriveAuroraOptions, DeriveEasing, } from "./composables/color";
|
|
@@ -106,7 +106,7 @@ interface DockVariantProps extends DockCommonProps {
|
|
|
106
106
|
interface DockRailProps extends DockCommonProps {
|
|
107
107
|
variant: "rail" | "instrument-strip";
|
|
108
108
|
}
|
|
109
|
-
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_14: {};
|
|
109
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_14: {}, __VLS_16: {}, __VLS_18: {};
|
|
110
110
|
type __VLS_Slots = {} & {
|
|
111
111
|
persistent?: (props: typeof __VLS_1) => any;
|
|
112
112
|
} & {
|
|
@@ -117,6 +117,10 @@ type __VLS_Slots = {} & {
|
|
|
117
117
|
default?: (props: typeof __VLS_7) => any;
|
|
118
118
|
} & {
|
|
119
119
|
collapsed?: (props: typeof __VLS_14) => any;
|
|
120
|
+
} & {
|
|
121
|
+
default?: (props: typeof __VLS_16) => any;
|
|
122
|
+
} & {
|
|
123
|
+
collapsed?: (props: typeof __VLS_18) => any;
|
|
120
124
|
};
|
|
121
125
|
declare const __VLS_base: import("vue").DefineComponent<DockVariantProps | DockRailProps, {
|
|
122
126
|
expanded: import("vue").Ref<boolean, boolean>;
|
|
@@ -8,7 +8,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
8
8
|
collapseLabel?: string;
|
|
9
9
|
/**
|
|
10
10
|
* Opt into the `gl-expand` plate → fullscreen MORPH (D6.c M7). When set,
|
|
11
|
-
* the inline
|
|
11
|
+
* the inline anchor and the teleported fullscreen surface share ONE
|
|
12
12
|
* `view-transition-name` (this prop, suffixed by an app-unique `useId()`
|
|
13
13
|
* so two ExpandableContainers on a page never collide their groups — the
|
|
14
14
|
* proof:vt-names mandate), and the open/close toggle is wrapped in
|
|
@@ -27,7 +27,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
27
27
|
* buttons continue to operate without parent wiring.
|
|
28
28
|
*/
|
|
29
29
|
open?: boolean;
|
|
30
|
-
}, {
|
|
30
|
+
}, {
|
|
31
|
+
anchorEl: Readonly<import("vue").ShallowRef<HTMLElement | null>>;
|
|
32
|
+
surfaceEl: Readonly<import("vue").ShallowRef<HTMLElement | null>>;
|
|
33
|
+
expand: () => void;
|
|
34
|
+
collapse: () => void;
|
|
35
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
settle: (fullscreen: boolean) => any;
|
|
31
37
|
"update:open": (value: boolean) => any;
|
|
32
38
|
}, string, import("vue").PublicProps, Readonly<{
|
|
33
39
|
buttonPosition?: "left" | "right";
|
|
@@ -37,7 +43,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
37
43
|
collapseLabel?: string;
|
|
38
44
|
/**
|
|
39
45
|
* Opt into the `gl-expand` plate → fullscreen MORPH (D6.c M7). When set,
|
|
40
|
-
* the inline
|
|
46
|
+
* the inline anchor and the teleported fullscreen surface share ONE
|
|
41
47
|
* `view-transition-name` (this prop, suffixed by an app-unique `useId()`
|
|
42
48
|
* so two ExpandableContainers on a page never collide their groups — the
|
|
43
49
|
* proof:vt-names mandate), and the open/close toggle is wrapped in
|
|
@@ -57,6 +63,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
57
63
|
*/
|
|
58
64
|
open?: boolean;
|
|
59
65
|
}> & Readonly<{
|
|
66
|
+
onSettle?: ((fullscreen: boolean) => any) | undefined;
|
|
60
67
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
61
68
|
}>, {
|
|
62
69
|
viewTransitionName: string;
|
|
@@ -67,10 +74,6 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
67
74
|
default?: (props: {
|
|
68
75
|
fullscreen: boolean;
|
|
69
76
|
}) => any;
|
|
70
|
-
} & {
|
|
71
|
-
default?: (props: {
|
|
72
|
-
fullscreen: boolean;
|
|
73
|
-
}) => any;
|
|
74
77
|
}>;
|
|
75
78
|
type __VLS_WithSlots<T, S> = T & {
|
|
76
79
|
new (): {
|
|
@@ -158,6 +158,29 @@ export declare const BRUSHES: {
|
|
|
158
158
|
readonly segments: 13;
|
|
159
159
|
readonly cap: "round";
|
|
160
160
|
};
|
|
161
|
+
readonly ring: {
|
|
162
|
+
readonly weight: 5;
|
|
163
|
+
readonly weightJitter: 0.6;
|
|
164
|
+
readonly thinning: 0.3;
|
|
165
|
+
readonly taper: {
|
|
166
|
+
readonly start: 8;
|
|
167
|
+
readonly end: 12;
|
|
168
|
+
readonly ease: "out-cubic";
|
|
169
|
+
};
|
|
170
|
+
readonly ribbon: "stroke";
|
|
171
|
+
readonly opacity: 0.55;
|
|
172
|
+
readonly blend: "source-over";
|
|
173
|
+
readonly passes: 1;
|
|
174
|
+
readonly passOpacity: 0;
|
|
175
|
+
readonly grain: 0.7;
|
|
176
|
+
readonly grainFreq: 0.18;
|
|
177
|
+
readonly grainScale: 1.8;
|
|
178
|
+
readonly octaves: 4;
|
|
179
|
+
readonly roughness: 1.4;
|
|
180
|
+
readonly wobble: 2.6;
|
|
181
|
+
readonly segments: 13;
|
|
182
|
+
readonly cap: "round";
|
|
183
|
+
};
|
|
161
184
|
readonly marker: {
|
|
162
185
|
readonly weight: 12;
|
|
163
186
|
readonly weightJitter: 0.2;
|
|
@@ -19,13 +19,31 @@ import { type WobbleOptions } from "@mkbabb/pencil-boil";
|
|
|
19
19
|
import type { HandShape, MarkBox } from "./types";
|
|
20
20
|
export declare const VB_W = 100;
|
|
21
21
|
export declare const VB_H = 40;
|
|
22
|
+
/**
|
|
23
|
+
* The hairline gap, as a fraction of the `.hm` box, between the MEASURED text
|
|
24
|
+
* baseline and the underline centerline. The underline rides just under the real
|
|
25
|
+
* glyph bottoms — a hand mark sits a few % of cap-height below the baseline, never
|
|
26
|
+
* through it (the E1 occlusion root: a constant `y=32` strikethroughs tight-leading
|
|
27
|
+
* display type because 80% of a `line-height:1.02` box IS the baseline).
|
|
28
|
+
*/
|
|
29
|
+
export declare const UNDERLINE_GAP = 0.06;
|
|
22
30
|
/** A shape maps to one or more centerlines (open polylines) or one closed ring. */
|
|
23
31
|
export interface ShapeGeom {
|
|
24
32
|
lines: [number, number][][];
|
|
25
33
|
closed: boolean;
|
|
26
34
|
}
|
|
27
|
-
/**
|
|
28
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Semantic shape → { lines, closed } in the marking space (or a positioned box).
|
|
37
|
+
*
|
|
38
|
+
* The text-mode underline anchors to a MEASURED baseline: `baselineFrac` is the
|
|
39
|
+
* slotted word's alphabetic baseline as a fraction of the `.hm` box height (the SFC
|
|
40
|
+
* measures it via ResizeObserver + `document.fonts.ready`). The underline y is then
|
|
41
|
+
* `VB_H × (baselineFrac + UNDERLINE_GAP)` — never the old hardcoded `32` (80% of the
|
|
42
|
+
* box), which struck through tight-leading headings. `null` ⇒ not yet measured: fall
|
|
43
|
+
* back to the legacy `VB_H − 8` constant so first paint (and jsdom/SSR) still renders
|
|
44
|
+
* a line, replaced the instant the measure lands.
|
|
45
|
+
*/
|
|
46
|
+
export declare function shapeGeom(shape: HandShape, opts: WobbleOptions, box?: MarkBox | null, baselineFrac?: number | null): ShapeGeom;
|
|
29
47
|
/** Boil one geometry: re-perturb the CACHED centerlines (anchored → no draw-on pop). */
|
|
30
48
|
export declare function boilLines({ lines, closed }: ShapeGeom, amount: number, seed: number): [number, number][][];
|
|
31
49
|
/** Serialize centerlines → one SVG `d` (multi-line shapes concat with a space). */
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export { default as HandMark, default as InkMark } from "./HandMark.vue";
|
|
15
15
|
export { BRUSHES, resolveBrush, lerpBrush, type Brush, type BrushName, type BlendMode, type TaperSpec, type StampFn, type InkPath, } from "./brush";
|
|
16
|
-
export { shapeGeom, serialize, boilLines, VB_W, VB_H, type ShapeGeom, } from "./geometry";
|
|
16
|
+
export { shapeGeom, serialize, boilLines, VB_W, VB_H, UNDERLINE_GAP, type ShapeGeom, } from "./geometry";
|
|
17
17
|
export { ink, type SVGFragment } from "./ink";
|
|
18
18
|
export { grainFilter, hasGrain } from "./texture";
|
|
19
19
|
export { getStroke, getStrokePoints, getSvgPathFromStroke, type StrokeOptions, type InputPoint, } from "./freehand";
|
|
20
|
-
export { useHandMark, normalizeProps, type UseHandMarkInput, type HandMarkCore, } from "./useHandMark";
|
|
20
|
+
export { useHandMark, normalizeProps, type UseHandMarkInput, type HandMarkCore, type BoilClock, } from "./useHandMark";
|
|
21
21
|
export type { HandMarkProps, HandShape, HandAnimation, MarkBox, } from "./types";
|
|
@@ -18,8 +18,18 @@
|
|
|
18
18
|
* (`useLineBoil.start()` early-returns under reduced motion).
|
|
19
19
|
*/
|
|
20
20
|
import { type Ref } from "vue";
|
|
21
|
-
import { useLineBoil } from "@mkbabb/pencil-boil";
|
|
22
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
|
+
}
|
|
23
33
|
import { type ShapeGeom } from "./geometry";
|
|
24
34
|
import { type SVGFragment } from "./ink";
|
|
25
35
|
import type { HandAnimation, HandMarkProps, HandShape, MarkBox } from "./types";
|
|
@@ -38,9 +48,20 @@ export interface UseHandMarkInput {
|
|
|
38
48
|
box: MarkBox | null;
|
|
39
49
|
path: string | null;
|
|
40
50
|
filterId: string;
|
|
51
|
+
/**
|
|
52
|
+
* The MEASURED text baseline as a fraction of the `.hm` box height (text-mode
|
|
53
|
+
* underline anchor). `null` until the SFC measures it (ResizeObserver +
|
|
54
|
+
* `document.fonts.ready`) — geometry falls back to the legacy constant for that
|
|
55
|
+
* one pre-measure frame. Ignored in positioned (`box`) mode.
|
|
56
|
+
*/
|
|
57
|
+
baselineFrac: number | null;
|
|
41
58
|
}
|
|
42
|
-
/**
|
|
43
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Normalise raw HandMarkProps (with their defaults applied) into the core input.
|
|
61
|
+
* `baselineFrac` is the SFC's MEASURED text baseline (text-mode underline anchor) —
|
|
62
|
+
* passed in (not a prop) because it is a runtime measurement, `null` until measured.
|
|
63
|
+
*/
|
|
64
|
+
export declare function normalizeProps(props: HandMarkProps, filterId: string, baselineFrac?: number | null): UseHandMarkInput;
|
|
44
65
|
export interface HandMarkCore {
|
|
45
66
|
/** the resolved effective brush vector. */
|
|
46
67
|
brush: Ref<Brush>;
|
|
@@ -58,8 +79,8 @@ export interface HandMarkCore {
|
|
|
58
79
|
draws: Ref<boolean>;
|
|
59
80
|
/** does this animation boil? */
|
|
60
81
|
boils: Ref<boolean>;
|
|
61
|
-
/** the
|
|
62
|
-
boil:
|
|
82
|
+
/** the boil clock (a real `useLineBoil` only when the mark boils; else a no-op stub). */
|
|
83
|
+
boil: BoilClock;
|
|
63
84
|
/** arm/disarm boil (draw-then-boil holds it until the draw finishes). */
|
|
64
85
|
boilArmed: Ref<boolean>;
|
|
65
86
|
}
|
|
@@ -16,7 +16,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
16
16
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
18
|
size: "default" | "sm" | "lg" | null;
|
|
19
|
-
variant: "default" | "outline" | "card" | null;
|
|
19
|
+
variant: "default" | "outline" | "glass" | "card" | null;
|
|
20
20
|
disabled: boolean;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -20,7 +20,7 @@ export { default as Toggle } from './Toggle.vue';
|
|
|
20
20
|
* than re-declaring the surface at the consumer.
|
|
21
21
|
*/
|
|
22
22
|
export declare const toggleVariants: (props?: ({
|
|
23
|
-
variant?: "default" | "outline" | "card" | null | undefined;
|
|
23
|
+
variant?: "default" | "outline" | "glass" | "card" | null | undefined;
|
|
24
24
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
25
25
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
26
26
|
export type ToggleVariants = VariantProps<typeof toggleVariants>;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'vue';
|
|
2
2
|
import { type ToggleGroupRootProps } from 'reka-ui';
|
|
3
|
-
import { type ToggleGroupVariants } from './toggleGroupContext';
|
|
3
|
+
import { type ToggleGroupRegister, type ToggleGroupVariants } from './toggleGroupContext';
|
|
4
4
|
type __VLS_Props = ToggleGroupRootProps & {
|
|
5
5
|
class?: HTMLAttributes['class'];
|
|
6
6
|
variant?: ToggleGroupVariants['variant'];
|
|
7
7
|
size?: ToggleGroupVariants['size'];
|
|
8
|
+
/**
|
|
9
|
+
* The MATERIAL register (E21/E23 — d-glassui M2). `register="glass"` moves
|
|
10
|
+
* every item onto the control-glass chip tier (wash-rest, quiet-on-select)
|
|
11
|
+
* without each call-site naming `variant="glass"`. An explicit `variant` wins.
|
|
12
|
+
*/
|
|
13
|
+
register?: ToggleGroupRegister;
|
|
8
14
|
};
|
|
9
15
|
declare var __VLS_8: {};
|
|
10
16
|
type __VLS_Slots = {} & {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'vue';
|
|
2
2
|
import { type ToggleGroupItemProps } from 'reka-ui';
|
|
3
|
-
import { type ToggleGroupVariants } from './toggleGroupContext';
|
|
3
|
+
import { type ToggleGroupRegister, type ToggleGroupVariants } from './toggleGroupContext';
|
|
4
4
|
type __VLS_Props = ToggleGroupItemProps & {
|
|
5
5
|
class?: HTMLAttributes['class'];
|
|
6
6
|
variant?: ToggleGroupVariants['variant'];
|
|
7
7
|
size?: ToggleGroupVariants['size'];
|
|
8
|
+
/** Per-item material register override (E21/E23). Group `register` propagates by default. */
|
|
9
|
+
register?: ToggleGroupRegister;
|
|
8
10
|
};
|
|
9
11
|
declare var __VLS_8: {};
|
|
10
12
|
type __VLS_Slots = {} & {
|
|
@@ -10,9 +10,22 @@ import type { toggleVariants } from "../toggle";
|
|
|
10
10
|
* `inject<ToggleGroupVariants>("toggleGroup")` pair.
|
|
11
11
|
*/
|
|
12
12
|
export type ToggleGroupVariants = VariantProps<typeof toggleVariants>;
|
|
13
|
+
/**
|
|
14
|
+
* The MATERIAL register a toggle group wears (E21/E23 — d-glassui M2). `"glass"`
|
|
15
|
+
* moves every item onto the control-glass chip tier (wash-rest, quiet-on-select,
|
|
16
|
+
* one rung quieter than the host hull) WITHOUT each call-site opting into the
|
|
17
|
+
* heavyweight `card` variant. It is the semantic chrome-tier alias for
|
|
18
|
+
* `variant: "glass"`: a group-level register, not a per-item style override.
|
|
19
|
+
* Omitted ⇒ the flat default register (back-compat). An EXPLICIT item/group
|
|
20
|
+
* `variant` still wins over the register (the register only supplies the variant
|
|
21
|
+
* when none is named).
|
|
22
|
+
*/
|
|
23
|
+
export type ToggleGroupRegister = "glass";
|
|
13
24
|
export interface ToggleGroupContext {
|
|
14
25
|
variant: ToggleGroupVariants["variant"];
|
|
15
26
|
size: ToggleGroupVariants["size"];
|
|
27
|
+
/** The material register (E21/E23). Resolves to `variant: "glass"` when set. */
|
|
28
|
+
register?: ToggleGroupRegister;
|
|
16
29
|
}
|
|
17
30
|
export declare const TOGGLE_GROUP_KEY: import("vue").InjectionKey<ToggleGroupContext>;
|
|
18
31
|
export declare function provideToggleGroupContext(context: ToggleGroupContext): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { useGlobalDark } from "./useGlobalDark";
|
|
2
|
-
export type { UseGlobalDarkOptions } from "./useGlobalDark";
|
|
2
|
+
export type { UseGlobalDarkOptions, UseGlobalDarkReturn, DarkFlipSettledCallback, } from "./useGlobalDark";
|
|
3
3
|
export { installDarkModeSync } from "./installDarkModeSync";
|
|
4
4
|
export { darkModeSyncScript, DARK_MODE_STORAGE_KEY } from "./darkModeSyncScript";
|
|
5
5
|
export type { DarkModeSyncScriptOptions } from "./darkModeSyncScript";
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { BasicColorSchema } from "@vueuse/core";
|
|
2
2
|
import { type Ref, type WritableComputedRef } from "vue";
|
|
3
|
+
/**
|
|
4
|
+
* A post-flip settle callback. Receives the dark-mode flag's NEW value. Runs in
|
|
5
|
+
* the single coalesced post-flip task (see `onFlipSettled`).
|
|
6
|
+
*/
|
|
7
|
+
export type DarkFlipSettledCallback = (isDark: boolean) => void;
|
|
3
8
|
/**
|
|
4
9
|
* The `useGlobalDark` return shape (AW.W15 — named `Use<Name>Return`). The
|
|
5
10
|
* single shared dark-mode instance: the reactive `isDark` flag, a `toggleDark`
|
|
6
|
-
* that optionally suppresses transitions,
|
|
11
|
+
* that optionally suppresses transitions, the transition-suppression switch, and
|
|
12
|
+
* the post-flip settle hook (E9b).
|
|
7
13
|
*/
|
|
8
14
|
export interface UseGlobalDarkReturn {
|
|
9
15
|
/** Reactive dark-mode flag (vueuse `useDark` ref — writable). */
|
|
@@ -14,6 +20,20 @@ export interface UseGlobalDarkReturn {
|
|
|
14
20
|
disableTransitions: Ref<boolean>;
|
|
15
21
|
/** Configure transition suppression during the dark-mode toggle. */
|
|
16
22
|
setDisableTransitions: (value: boolean) => void;
|
|
23
|
+
/**
|
|
24
|
+
* E9b — the post-flip SETTLE hook. Register a callback that runs in ONE
|
|
25
|
+
* coalesced task AFTER each dark↔light flip's instant chrome paint, so
|
|
26
|
+
* consumers BATCH N expensive re-theme operations (e.g. an atlas's N-chart
|
|
27
|
+
* `merge-setOption` palette tween) into a single beat instead of N watchers
|
|
28
|
+
* firing in N sequential storms on the critical frame. The class toggle is
|
|
29
|
+
* synchronous (chrome flips instantly); the batch drains one frame later via a
|
|
30
|
+
* single `requestAnimationFrame` (an SSR/no-rAF env falls back to a macrotask).
|
|
31
|
+
* EVERY registered callback shares that ONE task — no per-subscriber scheduling.
|
|
32
|
+
* No View Transition is involved anywhere in this path (PRM-safe by
|
|
33
|
+
* construction). Returns an unsubscribe function. Idempotent re-registration
|
|
34
|
+
* of the same callback is a no-op.
|
|
35
|
+
*/
|
|
36
|
+
onFlipSettled: (callback: DarkFlipSettledCallback) => () => void;
|
|
17
37
|
}
|
|
18
38
|
export interface UseGlobalDarkOptions {
|
|
19
39
|
/**
|
package/dist/controls.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-ok8pgSl5.js";
|
|
3
|
-
import { t as n } from "./useGlobalDark-
|
|
3
|
+
import { t as n } from "./useGlobalDark-D1wgEqfW.js";
|
|
4
4
|
import { computed as r, createBlock as i, createElementVNode as a, defineComponent as o, mergeProps as s, openBlock as c, resolveDynamicComponent as l, unref as u, useAttrs as d, watchEffect as f, withCtx as p } from "vue";
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/components/custom/controls/DarkModeToggle.vue
|
package/dist/dark.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { useGlobalDark, installDarkModeSync, darkModeSyncScript, DARK_MODE_STORAGE_KEY, } from "./composables/dark";
|
|
2
|
-
export type { UseGlobalDarkOptions, DarkModeSyncScriptOptions } from "./composables/dark";
|
|
2
|
+
export type { UseGlobalDarkOptions, UseGlobalDarkReturn, DarkFlipSettledCallback, DarkModeSyncScriptOptions, } from "./composables/dark";
|
package/dist/dark.js
CHANGED