@mkbabb/glass-ui 8.0.0 → 9.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.
Files changed (142) hide show
  1. package/dist/aurora.js +371 -349
  2. package/dist/blob.js +42 -42
  3. package/dist/{checkbox-BnXuGgJ3.js → checkbox-B1qn65se.js} +1 -1
  4. package/dist/checkbox.js +1 -1
  5. package/dist/color.glsl-DTJhdekG.js +34 -0
  6. package/dist/color.wgsl-BTszLY39.js +398 -0
  7. package/dist/{command-BuBnYpxF.js → command-tEzAaVY_.js} +1 -1
  8. package/dist/command.js +1 -1
  9. package/dist/components/_shared/control.d.ts +0 -1
  10. package/dist/components/_shared/index.d.ts +0 -1
  11. package/dist/components/aurora/Aurora.vue.d.ts +1 -0
  12. package/dist/components/aurora/composables/frameLoop.d.ts +6 -5
  13. package/dist/components/aurora/composables/runtime.d.ts +26 -1
  14. package/dist/components/aurora/composables/useAurora.d.ts +28 -0
  15. package/dist/components/aurora/composables/wgpuSetup.d.ts +1 -1
  16. package/dist/components/aurora/constants/presets.d.ts +44 -5
  17. package/dist/components/aurora/index.d.ts +1 -1
  18. package/dist/components/configurator/Configurator.vue.d.ts +25 -2
  19. package/dist/components/configurator/ConfiguratorRow.vue.d.ts +4 -2
  20. package/dist/components/configurator/styles.css +1 -1
  21. package/dist/components/dock/DockSeparator.vue.d.ts +2 -3
  22. package/dist/components/dock/GlassDock.vue.d.ts +1 -0
  23. package/dist/components/dock/composables/dockContext.d.ts +1 -8
  24. package/dist/components/dock/composables/useDockRun.d.ts +20 -0
  25. package/dist/components/dock/composables/useDockSearch.d.ts +1 -1
  26. package/dist/components/dock/composables/useDockShellProps.d.ts +18 -101
  27. package/dist/components/dock/composables/useDockState.d.ts +2 -9
  28. package/dist/components/dock/constants.d.ts +15 -0
  29. package/dist/components/dock/index.d.ts +2 -2
  30. package/dist/components/dock/styles/controls/icon-button.css +1 -1
  31. package/dist/components/dock/styles/controls/tab-button.css +1 -1
  32. package/dist/components/dock/styles/controls/triggers.css +1 -1
  33. package/dist/components/dock/styles/controls.css +1 -1
  34. package/dist/components/dock/styles/density.css +1 -1
  35. package/dist/components/dock/styles/index.css +1 -1
  36. package/dist/components/dock/styles/layer-group.css +1 -1
  37. package/dist/components/dock/styles/layers.css +1 -1
  38. package/dist/components/dock/styles/morph.css +1 -1
  39. package/dist/components/dock/styles/run.css +1 -0
  40. package/dist/components/dock/styles/search.css +1 -1
  41. package/dist/components/dock/styles/shape.css +1 -1
  42. package/dist/components/dock/styles/shell-regions.css +1 -1
  43. package/dist/components/dock/styles/shell.css +1 -1
  44. package/dist/components/fourier-field/FourierField.vue.d.ts +28 -25
  45. package/dist/components/fourier-field/clock.d.ts +35 -0
  46. package/dist/components/fourier-field/constants.d.ts +78 -103
  47. package/dist/components/fourier-field/index.d.ts +3 -28
  48. package/dist/components/fourier-field/math.d.ts +69 -77
  49. package/dist/components/fourier-field/renderer/mint.d.ts +50 -0
  50. package/dist/components/fourier-field/renderer/uniforms.d.ts +84 -0
  51. package/dist/components/fourier-field/renderer/wgpu.d.ts +28 -0
  52. package/dist/components/fourier-field/shaders/compute.wgsl.d.ts +1 -0
  53. package/dist/components/fourier-field/shaders/render.wgsl.d.ts +1 -0
  54. package/dist/components/fourier-field/useFourierField.d.ts +49 -0
  55. package/dist/components/handmark/HandMark.vue.d.ts +18 -14
  56. package/dist/components/handmark/index.d.ts +4 -23
  57. package/dist/components/handmark/stroke.d.ts +92 -0
  58. package/dist/composables/dark/darkModeSyncScript.d.ts +19 -0
  59. package/dist/composables/motion/pointer/pointerFieldMappings.d.ts +0 -41
  60. package/dist/{components/search/composables → composables/search}/index.d.ts +2 -2
  61. package/dist/{components/search/composables/fuzzySearchIndex.d.ts → composables/search/match.d.ts} +8 -3
  62. package/dist/configurator-BHJymdrF.js +339 -0
  63. package/dist/configurator.js +1 -1
  64. package/dist/constellation.js +2 -2
  65. package/dist/control-DJp15L4U.js +7 -0
  66. package/dist/{dark-z_P5QwqI.js → dark-CLlmo7dD.js} +2 -2
  67. package/dist/dark-mode-toggle.js +1 -1
  68. package/dist/dark.js +1 -1
  69. package/dist/dock.js +712 -486
  70. package/dist/dom.js +90 -8
  71. package/dist/easing.js +3 -3
  72. package/dist/expandable-container-BY1hQXi4.js +142 -0
  73. package/dist/expandable-container.js +2 -142
  74. package/dist/fourier-field.js +643 -855
  75. package/dist/fourier-math.js +6 -6
  76. package/dist/glass-ui.css +1 -1
  77. package/dist/glass-ui.js +85 -72
  78. package/dist/handmark.js +330 -718
  79. package/dist/index.d.ts +1 -1
  80. package/dist/labeled-field.js +2 -2
  81. package/dist/{menu-wLu1XGKn.js → menu-TDMNtZjG.js} +1 -1
  82. package/dist/menu.js +1 -1
  83. package/dist/motion-core.js +34 -34
  84. package/dist/{participation-B0hdsIRo.js → participation-Di4UHbzk.js} +8 -8
  85. package/dist/{pointerFieldMappings-DP5tla5z.js → pointerFieldMappings-DXwlU5uj.js} +7 -23
  86. package/dist/{popover-DBMKTPkL.js → popover-C04Rrdcz.js} +1 -1
  87. package/dist/popover.js +1 -1
  88. package/dist/{radio-group-Ci8o-pDx.js → radio-group-BNV7PN1O.js} +1 -1
  89. package/dist/radio-group.js +1 -1
  90. package/dist/{select-CDgwGH_P.js → select-COox45Kv.js} +1 -1
  91. package/dist/select.js +1 -1
  92. package/dist/{slider-gsc8jDIo.js → slider-5ChjjWSR.js} +1 -1
  93. package/dist/slider.js +1 -1
  94. package/dist/styles/components.css +1 -1
  95. package/dist/styles/glass/material.css +1 -1
  96. package/dist/styles/glass/overlay-plate.css +1 -1
  97. package/dist/{switch-DxZzDrmV.js → switch-lLkbREB-.js} +1 -1
  98. package/dist/switch.js +1 -1
  99. package/dist/{tabs-CYscnq5H.js → tabs-DSJMd1Et.js} +1 -1
  100. package/dist/tabs.js +1 -1
  101. package/dist/{toggle-group-11aPGMfE.js → toggle-group-DUcmKnDw.js} +1 -1
  102. package/dist/toggle-group.js +1 -1
  103. package/dist/{tooltip-DqKMZ4dn.js → tooltip-BKk2qVDn.js} +1 -1
  104. package/dist/tooltip.js +1 -1
  105. package/dist/{resolveCanvasColor-6MCrswTB.js → useCanvas2D-CQRElMyE.js} +1 -11
  106. package/dist/useResolveTokenColor-B2FfJnd9.js +24 -0
  107. package/package.json +2 -20
  108. package/dist/canvas.d.ts +0 -1
  109. package/dist/canvas.js +0 -2
  110. package/dist/color.wgsl-B0N3mKMb.js +0 -412
  111. package/dist/compile-D7VYG3gi.js +0 -19
  112. package/dist/components/dock/composables/useDockOverflowFit.d.ts +0 -20
  113. package/dist/components/dock/composables/useDockTouchGate.d.ts +0 -42
  114. package/dist/components/dock/styles/overflow.css +0 -1
  115. package/dist/components/fourier-field/composables/fourierFieldGLSetup.d.ts +0 -24
  116. package/dist/components/fourier-field/composables/fourierFieldWGPUSetup.d.ts +0 -31
  117. package/dist/components/fourier-field/composables/uniformBridgeWGPU.d.ts +0 -39
  118. package/dist/components/fourier-field/composables/useFourierField.d.ts +0 -56
  119. package/dist/components/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +0 -1
  120. package/dist/components/fourier-field/shaders/fourier-field.glsl.d.ts +0 -4
  121. package/dist/components/fourier-field/shaders/fourier-field.render.wgsl.d.ts +0 -1
  122. package/dist/components/fourier-field/shaders/fourier-field.ribbon.d.ts +0 -51
  123. package/dist/components/handmark/brush.d.ts +0 -269
  124. package/dist/components/handmark/composables/useHandMark.d.ts +0 -99
  125. package/dist/components/handmark/constants.d.ts +0 -69
  126. package/dist/components/handmark/freehand.d.ts +0 -69
  127. package/dist/components/handmark/geometry.d.ts +0 -62
  128. package/dist/components/handmark/ink.d.ts +0 -11
  129. package/dist/components/handmark/noise.d.ts +0 -30
  130. package/dist/components/handmark/texture.d.ts +0 -39
  131. package/dist/components/handmark/types.d.ts +0 -70
  132. package/dist/components/search/SearchBar.vue.d.ts +0 -38
  133. package/dist/components/search/index.d.ts +0 -8
  134. package/dist/components/search/searchVariants.d.ts +0 -16
  135. package/dist/configurator-BoeScnDL.js +0 -311
  136. package/dist/control-Da4XeT43.js +0 -11
  137. package/dist/search.d.ts +0 -1
  138. package/dist/search.js +0 -61
  139. package/dist/useFuzzySearch-CUnZknpm.js +0 -177
  140. package/dist/useResolveTokenColor-CspQv_ik.js +0 -107
  141. /package/dist/{components/search/composables → composables/search}/types.d.ts +0 -0
  142. /package/dist/{components/search/composables → composables/search}/useFuzzySearch.d.ts +0 -0
@@ -1,69 +0,0 @@
1
- /**
2
- * constants.ts — the marking-space geometry constants (the colocation home).
3
- * ─────────────────────────────────────────────────────────────────────────────
4
- * The hand-mark family's named geometry constants live here (the
5
- * convention's `constants.ts` home). geometry.ts + the SFC re-read them by name.
6
- */
7
- /** Marking-space width (the 0..100 × 0..40 viewBox; `preserveAspectRatio="none"`). */
8
- export declare const VB_W = 100;
9
- /** Marking-space height. */
10
- export declare const VB_H = 40;
11
- /**
12
- * The hairline gap, as a fraction of the `.hm` box, between the MEASURED text
13
- * baseline and the underline centerline. The underline rides just under the real
14
- * glyph bottoms — a hand mark sits a few % of cap-height below the baseline, never
15
- * through it (the E1 occlusion root: a constant `y=32` strikethroughs tight-leading
16
- * display type because 80% of a `line-height:1.02` box IS the baseline).
17
- */
18
- export declare const UNDERLINE_GAP = 0.06;
19
- /**
20
- * The highlighter LOW-SEAT band ( C-1(a)). A real highlighter rides
21
- * the low two-thirds of the line — the ink sits on the baseline and rises to
22
- * ~x-height — NOT the box vertical center the fork shipped. The band centerline
23
- * seats at `baselineFrac − HIGHLIGHT_RISE` (raised off the baseline by ~half a
24
- * lowercase x-height) so the wide slab (weight 26) covers x-height down to the
25
- * baseline. Expressed as a fraction of the `.hm` box, parallel to UNDERLINE_GAP.
26
- */
27
- export declare const HIGHLIGHT_RISE = 0.22;
28
- /** Pre-measure fallback for the highlight band's low seat (null baselineFrac). */
29
- export declare const HIGHLIGHT_FALLBACK_FRAC = 0.66;
30
- /**
31
- * The boil voice — φ-incommensurate fractal value-noise (the masthead morphology).
32
- * ─────────────────────────────────────────────────────────────────────────────
33
- * The boil centerline is a 1-D fractal value-noise displacement off the HOUSE
34
- * `mulberry32`, NOT a seeded sinusoid. A sinusoid self-correlates
35
- * into a near-period — it reads as a spell-check squiggle and a clean sine fails any
36
- * honest non-periodicity discriminator (a sine's extrema are near-uniformly spaced).
37
- * The value-noise sums octaves at φ-stepped frequencies (mutually irrational → the
38
- * sum NEVER closes into a period); each octave's amplitude decays by 1/φ. The result
39
- * is a hump-to-hump-IRREGULAR hand line whose inter-extremum spacing-CV is the honest
40
- * teeth (measured: ~0.41 at the paint's segment count, ~0.71 resampled at RES=64,
41
- * over 400 seeds — vs a sinusoid's ~0.14; a clean separation either side of a
42
- * 0.30 floor). The amplitude is SCALE-RELATIVE (a fraction of the rendered span), so
43
- * a long word and a short word wobble in proportion. FILTER-FREE — the wander lives
44
- * in the control points + the hull width, never a feTurbulence.
45
- *
46
- * Constants pinned against a 400-seed spacing-CV spike (NOT a seed-overfit autocorr
47
- * peak — autocorr cannot separate smooth low-frequency value-
48
- * noise from a sinusoid at any resolution).
49
- */
50
- /** φ — the per-octave frequency step (mutually irrational → never periodic). */
51
- export declare const NOISE_PHI = 1.618033988749895;
52
- /** octave count of the fractal value-noise sum. */
53
- export declare const NOISE_OCTAVES = 4;
54
- /** base octave frequency (humps across the unit span); octave k rides F0·φ^k. */
55
- export declare const NOISE_F0 = 2.5;
56
- /** displacement amplitude as a fraction of the rendered span (scale-relative). */
57
- export declare const NOISE_AMP_FRAC = 0.05;
58
- /** endpoint-only cosine taper width (the ends settle to baseline; the BODY stays irregular). */
59
- export declare const NOISE_EDGE = 0.12;
60
- /**
61
- * The AMPLITUDE-KNOB reference wobble ( (c)). The natural-underline
62
- * excursion is `span × NOISE_AMP_FRAC × f(wobble)` where `f(wobble) = wobble, NOISE_WOBBLE_REF`
63
- * repurposing the existing Brush `wobble` scalar to drive the centerline amplitude,
64
- * decoupling excursion from stroke `weight` (the published `amplitude` contract, no 13th
65
- * scalar). Pinned to the shipped `boil` brush's wobble (1.4) so `f(1.4) = 1` ⇒ the default
66
- * boil render is BYTE-IDENTICAL; a consumer lifts excursion by raising `wobble` (or the
67
- * explicit `amplitude` prop, which wins). A lower-wobble brush wobbles proportionally less.
68
- */
69
- export declare const NOISE_WOBBLE_REF = 1.4;
@@ -1,69 +0,0 @@
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 {};
@@ -1,62 +0,0 @@
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's `ellipsePoints` (the hand-circle
16
- * overshoot ring — the sole upstream geometry delta this component required).
17
- *
18
- * THE SEED RECONCILE ( [S2]): the wobble centerlines are seeded from
19
- * the HOUSE prng leaf (`src/composables/glass/procedural/prng.ts` mulberry32 + hashString — the
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 type { HandShape, MarkBox } from "./types.js";
26
- /** A shape maps to one or more centerlines (open polylines) or one closed ring. */
27
- export interface ShapeGeom {
28
- lines: [number, number][][];
29
- closed: boolean;
30
- }
31
- /**
32
- * Semantic shape → { lines, closed } in the marking space (or a positioned box).
33
- *
34
- * The text-mode underline anchors to a MEASURED baseline: `baselineFrac` is the
35
- * slotted word's alphabetic baseline as a fraction of the `.hm` box height (the SFC
36
- * measures it via ResizeObserver + `document.fonts.ready`). The underline y is then
37
- * `H × (baselineFrac + UNDERLINE_GAP)` — not a hardcoded fraction (a fixed `32`,
38
- * 80% of the box, strikes through tight-leading headings). `null` ⇒ not yet measured: fall
39
- * back to a fixed `H − 8` constant so first paint (and jsdom/SSR) still renders a
40
- * line, replaced the instant the measure lands.
41
- *
42
- * `natural` routes the underline through the φ-incommensurate value-noise
43
- * `naturalUnderlinePoints` morphology instead of pencil-boil's `wobbleLinePoints`
44
- * (the masthead `boil` voice); the default underline keeps the pencil-boil line.
45
- *
46
- * The aspect-correct viewBox: `vbH` is the SFC-measured
47
- * marking-space HEIGHT (`VB_W, boxAspect`) for the TEXT-MODE underline/strikethrough/
48
- * highlight, so `preserveAspectRatio="none"` scales the wobble SHAPE uniformly (the x
49
- * and y scales EQUAL → the humps stop being x-stretched flat). It defaults to `VB_H`,
50
- * and is used ONLY for the measured text-mode y — the positioned/box/circle/bracket
51
- * path keeps `VB_H` byte-for-byte (it DEPENDS on the none-stretch to fill the datum
52
- * rect; the text-mode fix must not touch it).
53
- *
54
- * The amplitude knob: `ampScale` multiplies the natural-
55
- * underline excursion (default 1 ⇒ byte-identical; the SFC derives it from the brush
56
- * `wobble` scalar, decoupling excursion from stroke `weight`).
57
- */
58
- export declare function shapeGeom(shape: HandShape, opts: WobbleOptions, box?: MarkBox | null, baselineFrac?: number | null, natural?: boolean, vbH?: number, ampScale?: number): ShapeGeom;
59
- /** Boil one geometry: re-perturb the CACHED centerlines (anchored → no draw-on pop). */
60
- export declare function boilLines({ lines, closed }: ShapeGeom, amount: number, seed: number): [number, number][][];
61
- /** Serialize centerlines → one SVG `d` (multi-line shapes concat with a space). */
62
- export declare function serialize(lines: [number, number][][], jagged?: boolean): string;
@@ -1,11 +0,0 @@
1
- import type { Brush, InkPath } from "./brush.js";
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;
@@ -1,30 +0,0 @@
1
- /** smootherstep (6t⁵−15t⁴+10t³) — the C² fairing for the value-noise lerp. */
2
- export declare function smootherstep(t: number): number;
3
- /**
4
- * The boil voice — φ-incommensurate fractal value-noise (the masthead morphology):
5
- *
6
- * disp(t) = Σ_{k=0..OCT-1} aₖ · vnoiseₖ(t·fₖ + φₖ) normalised by Σaₖ
7
- * fₖ = NOISE_F0 · φ^k (φ mutually-irrational steps → the sum NEVER closes
8
- * into a period — the non-periodicity mechanism)
9
- * aₖ = (1/φ)^k (per-octave decay)
10
- * φₖ = seeded per-octave phase (house mulberry32)
11
- * vnoiseₖ = seeded lattice value-noise, smootherstep-faired
12
- *
13
- * The four brush axes:
14
- * - amplitude SCALES with the rendered span (`(x2−x1) × NOISE_AMP_FRAC × ampScale`),
15
- * not a viewBox-stretched constant (a long word and a short word wobble in
16
- * proportion); `ampScale` is the excursion knob (default 1
17
- * ⇒ byte-identical; the SFC derives it from the brush `wobble` scalar, decoupling
18
- * excursion from stroke `weight`);
19
- * - the hump-to-hump spacing is IRREGULAR (the φ-incommensurate octave sum — the
20
- * honest non-periodicity teeth, spacing-CV ~0.41 at the paint count vs a
21
- * sinusoid's ~0.14, over 400 seeds);
22
- * - the non-uniform body gives the pf hull a pressure-taper-friendly point stream;
23
- * - the seed is the HOUSE mulberry32.
24
- *
25
- * ENDPOINT anchor (NOT a body-wide envelope): a narrow cosine taper at the very ends
26
- * only (`NOISE_EDGE`), so the ends settle to baseline (no draw-on pop) while the BODY
27
- * amplitude stays irregular hump-to-hump. FILTER-FREE: the wander is in the control
28
- * points + the hull width, never a feTurbulence.
29
- */
30
- export declare function naturalUnderlinePoints(x1: number, y: number, x2: number, seed: number, segments: number, ampScale?: number): [number, number][];
@@ -1,39 +0,0 @@
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 house per-instance SVG-namespace 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.js";
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;
@@ -1,70 +0,0 @@
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.js";
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 excursion knob ( (c)). Multiplies the
49
- * scale-relative wobble amplitude (`span × NOISE_AMP_FRAC × amplitude`). Default is
50
- * unset ⇒ the amplitude is derived from the brush `wobble` scalar (byte-identical at
51
- * the shipped default); an explicit value WINS (e.g. `1.4` for a bolder hand line,
52
- * font-proportional). Only the natural/boil underline reads it.
53
- */
54
- amplitude?: number;
55
- /**
56
- * NATURAL underline morphology ( C-2). When true (the masthead
57
- * `boil` voice), the underline geometry goes PROCEDURAL — scale-relative
58
- * amplitude, an IRREGULAR seeded period count, off the house prng leaf feeding
59
- * pencil-boil — instead of pencil-boil's single `wobbleLinePoints` line. The
60
- * `boil` brush auto-engages it; the default underline keeps the pencil-boil line.
61
- * Ignored on non-underline shapes.
62
- */
63
- natural?: boolean;
64
- /** POSITIONED mode (circle a datum): explicit target rect. */
65
- box?: MarkBox;
66
- /** shape:'path' escape hatch — arbitrary SVG `d` (wins over shape). */
67
- path?: string;
68
- /** arbitrary point stream → brush ink. */
69
- points?: [number, number][];
70
- }
@@ -1,38 +0,0 @@
1
- import { type Component } from "vue";
2
- import type { Surface } from "../_shared/axes.js";
3
- import { type ControlSize, type SearchVariant } from "./searchVariants.js";
4
- type __VLS_Props = {
5
- modelValue?: string;
6
- placeholder?: string;
7
- icon?: Component;
8
- tag?: string;
9
- size?: ControlSize;
10
- surface?: Surface;
11
- variant?: SearchVariant;
12
- };
13
- declare var __VLS_13: {};
14
- type __VLS_Slots = {} & {
15
- default?: (props: typeof __VLS_13) => any;
16
- };
17
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
18
- inputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
19
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
- "update:modelValue": (value: string) => any;
21
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
23
- }>, {
24
- size: ControlSize;
25
- placeholder: string;
26
- modelValue: string;
27
- variant: SearchVariant;
28
- surface: Surface;
29
- tag: string;
30
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
32
- declare const _default: typeof __VLS_export;
33
- export default _default;
34
- type __VLS_WithSlots<T, S> = T & {
35
- new (): {
36
- $slots: S;
37
- };
38
- };
@@ -1,8 +0,0 @@
1
- export { default as SearchBar } from "./SearchBar.vue.js";
2
- export { searchFieldVariants } from "./searchVariants.js";
3
- export type { SearchVariant, SearchVariants } from "./searchVariants.js";
4
- export { useFuzzySearch } from "./composables/useFuzzySearch.js";
5
- export type { UseFuzzySearchOptions } from "./composables/useFuzzySearch.js";
6
- export { buildIndex, searchIndex, fuzzyMatch, clearSearchCache } from "./composables/fuzzySearchIndex.js";
7
- export type { SearchIndex } from "./composables/fuzzySearchIndex.js";
8
- export type { SearchableItem, SearchResult, FuzzySearchState } from "./composables/types.js";
@@ -1,16 +0,0 @@
1
- import { type ClassValue } from "../_shared/class-names.js";
2
- import { type ControlSize } from "../_shared/control.js";
3
- declare const VARIANT: {
4
- readonly inline: "";
5
- readonly floating: "";
6
- readonly bare: "border-none bg-transparent p-0 rounded-none";
7
- };
8
- export type SearchVariant = keyof typeof VARIANT;
9
- export interface SearchVariants {
10
- variant?: SearchVariant | null;
11
- class?: ClassValue;
12
- className?: ClassValue;
13
- }
14
- /** Search field chrome; size remains on the shared control-size axis. */
15
- export declare function searchFieldVariants(options?: SearchVariants): string;
16
- export type { ControlSize };