@weasel-js/core 1.9.0 → 1.9.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 3ba97df: `reconcileSpecs(scene, prev, next)` brings a scene from one list of node specs to another: it adds and removes by id and writes only the fields that changed between the two lists, as one untracked step. What the scene did since `prev` survives unless `next` changes that same field.
8
+
9
+ `DiagramView` no longer remounts on a new `specs` array. It reconciles the new specs into the scene it holds, so the view, the pick and anything moved stay put. `onMove` turns on dragging and reports every node a drag or a layout run moved. `onConnect` makes ports grabbable and reports the edge a connect describes without drawing it, and `canConnect` and `portOptions` configure that. A `ref` gets `layout(algorithm)`, which re-runs a layout animated from where the nodes stand, and the run's `live` controls; `live` configures the run.
10
+
11
+ `diagramScene` gives every spec an id, and takes `layout: 'none'` to leave each node at its `at`.
12
+
13
+ `fitDiagram`'s scale and anchor arguments are now one options object.
14
+ - 1b7af8d: `sampleTrack` and timeline keyframe tracks compute their values with blits, the same engine tweens and springs run on. A track of number arrays or numeric objects no longer needs an `interpolate`, and keys whose shapes differ throw. A `segmentCache` handed a different track or a replaced `keys` array rebuilds instead of answering for the old one. Edits to keys must go through `timeline.edit` (or a dropped `segmentCache`) to take effect, which numeric tracks used to get away without.
15
+ - @weasel-js/cursor@1.9.2
16
+ - @weasel-js/font@1.9.2
17
+ - @weasel-js/geom@1.9.2
18
+ - @weasel-js/gestures@1.9.2
19
+ - @weasel-js/history@1.9.2
20
+ - @weasel-js/modes@1.9.2
21
+ - @weasel-js/paint@1.9.2
22
+ - @weasel-js/quantity@1.9.2
23
+ - @weasel-js/react@1.9.2
24
+ - @weasel-js/registry@1.9.2
25
+ - @weasel-js/routing@1.9.2
26
+ - @weasel-js/select@1.9.2
27
+ - @weasel-js/text@1.9.2
28
+
29
+ ## 1.9.1
30
+
31
+ ### Patch Changes
32
+
33
+ - c63f934: Pin `@msb235/blits` to 0.7.0. Nothing in core's own API changes.
34
+ - @weasel-js/cursor@1.9.1
35
+ - @weasel-js/font@1.9.1
36
+ - @weasel-js/geom@1.9.1
37
+ - @weasel-js/gestures@1.9.1
38
+ - @weasel-js/history@1.9.1
39
+ - @weasel-js/modes@1.9.1
40
+ - @weasel-js/paint@1.9.1
41
+ - @weasel-js/quantity@1.9.1
42
+ - @weasel-js/react@1.9.1
43
+ - @weasel-js/registry@1.9.1
44
+ - @weasel-js/routing@1.9.1
45
+ - @weasel-js/select@1.9.1
46
+ - @weasel-js/text@1.9.1
47
+
3
48
  ## 1.9.0
4
49
 
5
50
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"createTimeline.js","names":["trackEnd","track","tracksEnd","explicit","max","tracks","createTimeline","duration","opts","offset","lastVirtual","playhead","prevPlayhead","done","live","cancelled","wantPaused","wantScale","subscribers","loopOpt","loopsLeft","lap","booker","createBooker","warnedUnbooked","caches","cacheFor","c","applySampled","st","v","sampleTrack","path","fireEvents","k","end","firstAfter","to","i","from","ev","report","onWrap","tick","virtualNow","laps","finished","scale","base","onCancel","seed","register","rearm","s","t","loop","fn","cb","err"],"sources":["../../../src/animation/timeline/createTimeline.ts"],"sourcesContent":["import type { AnimationHandle } from '../types';\nimport { createBooker, firstAfter } from './booking';\nimport { sampleTrack } from './sampleTrack';\nimport type { EventTrack, SampledTrack, TimelineEvent, TimelineHandle, TimelineOptions, Track } from './types';\n\n/** The animator's internal `register`, narrowed to what a timeline needs. */\nexport type TimelineRegister = (seed: {\n id: number;\n cancelKey?: string;\n /** Registers under an existing `cancelKey` without cancelling whoever holds\n * it. A revived timeline is the same animation, not a new claim on the key. */\n keepExisting?: boolean;\n /** `scale` is the effective time scale this frame advanced at, zero while\n * paused at any level. */\n tick: (virtualNow: number, scale?: number) => boolean;\n onCancel?: () => void;\n kind: 'timeline';\n label?: string;\n progress?: () => number;\n}) => AnimationHandle;\n\n/** Where a timeline reports its crossings and laps to `animator.watch`. Each\n * call site checks `watched` first, so an unwatched timeline builds nothing. */\nexport interface TimelineReport {\n readonly watched: boolean;\n /** `path` is a scratch stack the timeline goes on mutating; copy it to keep it. */\n fire(track: EventTrack, path: readonly number[], event: TimelineEvent, lateBy: number): void;\n lap(lap: number): void;\n}\n\n/** End time of a track: its last key/event, or a nested timeline's own end. */\nfunction trackEnd(track: Track): number {\n switch (track.kind) {\n case 'sampled': return track.keys.length ? track.keys[track.keys.length - 1].t : 0;\n case 'event': return track.events.length ? track.events[track.events.length - 1].t : 0;\n case 'timeline': return track.at + tracksEnd(track.timeline.tracks, track.timeline.duration);\n }\n}\n\nfunction tracksEnd(tracks: Track[], explicit?: number): number {\n if (explicit != null) return explicit;\n let max = 0;\n for (const t of tracks) max = Math.max(max, trackEnd(t));\n return max;\n}\n\n/**\n * Create a timeline as a registered animator animation.\n *\n * The playhead is NOT the entry's `virtualNow` directly — it is\n * `virtualNow + offset`, where `offset` is what `seek` and looping move. That\n * keeps seek and wrap-around entirely inside the timeline and needs no setter\n * on the animator's entry.\n *\n * A finished timeline leaves the animator's table, so `seek` and a\n * duration-extending `edit` re-register it. Staying registered instead would\n * hold a slot — and the rAF loop — open for every timeline ever created.\n */\nexport function createTimeline(\n register: TimelineRegister,\n id: number,\n opts: TimelineOptions,\n report?: TimelineReport,\n): TimelineHandle {\n let duration = tracksEnd(opts.tracks, opts.duration);\n let offset = 0;\n let lastVirtual = 0;\n let playhead = 0;\n let prevPlayhead = -Infinity;\n let done = false;\n let live = true;\n let cancelled = false;\n let wantPaused = opts.autoplay === false;\n let wantScale = 1;\n\n const subscribers = new Set<() => void>();\n\n const loopOpt = opts.loop ?? false;\n let loopsLeft = loopOpt === true ? Infinity : loopOpt === false ? 0 : loopOpt;\n let lap = 0;\n\n const booker = opts.booking\n ? createBooker(opts.booking, {\n tracks: opts.tracks,\n duration: () => duration,\n lapsLeft: () => loopsLeft,\n lap: () => lap,\n playhead: () => playhead,\n })\n : null;\n let warnedUnbooked = false;\n\n // Per-sampled-track interpolator-factory caches, dropped wholesale by `edit`.\n let caches = new WeakMap<object, Map<number, (u: number) => unknown>>();\n const cacheFor = (track: object): Map<number, (u: number) => unknown> => {\n let c = caches.get(track);\n if (!c) { c = new Map(); caches.set(track, c); }\n return c;\n };\n\n const applySampled = (tracks: Track[], t: number): void => {\n for (const track of tracks) {\n if (track.kind === 'sampled') {\n const st = track as SampledTrack<unknown>;\n const v = sampleTrack(st, t, cacheFor(st));\n if (v !== undefined) st.onTick(v);\n } else if (track.kind === 'timeline') {\n applySampled(track.timeline.tracks, t - track.at);\n }\n }\n };\n\n // Track indexes from the root down to the track being fired, for `report`.\n const path: number[] = [];\n const fireEvents = (tracks: Track[], from: number, to: number): void => {\n for (let k = 0; k < tracks.length; k += 1) {\n const track = tracks[k];\n if (track.kind === 'event') {\n const end = firstAfter(track.events, to);\n for (let i = firstAfter(track.events, from); i < end; i += 1) {\n const ev = track.events[i];\n ev.fire?.(to - ev.t);\n if (report?.watched) {\n path.push(k);\n report.fire(track, path, ev, to - ev.t);\n path.pop();\n }\n if (ev.book && !booker && !warnedUnbooked) {\n warnedUnbooked = true;\n console.warn('timeline: an event has `book` but the timeline has no `booking` clock; it never books.');\n }\n }\n } else if (track.kind === 'timeline') {\n path.push(k);\n fireEvents(track.timeline.tracks, from - track.at, to - track.at);\n path.pop();\n }\n }\n };\n\n // Flush the outgoing pass's tail before re-arming, or an event between the\n // last tick and `duration` is dropped whenever a frame straddles the seam.\n const onWrap = (): void => {\n fireEvents(opts.tracks, prevPlayhead, duration);\n prevPlayhead = -Infinity;\n if (report?.watched) report.lap(lap);\n };\n\n const tick = (virtualNow: number, scale?: number): boolean => {\n lastVirtual = virtualNow;\n playhead = virtualNow + offset;\n\n // A far seek can skip a billion laps of a short duration, so an endless\n // loop takes them in one modulo rather than one iteration each.\n if (duration > 0 && playhead >= duration) {\n if (loopsLeft === Infinity) {\n const laps = Math.floor(playhead / duration);\n offset -= laps * duration;\n playhead -= laps * duration;\n lap += laps;\n onWrap();\n } else {\n while (playhead >= duration && loopsLeft > 0) {\n loopsLeft -= 1;\n offset -= duration;\n playhead -= duration;\n lap += 1;\n onWrap();\n }\n }\n }\n\n const finished = playhead >= duration;\n playhead = Math.min(playhead, duration);\n\n // Sampled before fired, so a handler reads the current frame's values.\n applySampled(opts.tracks, playhead);\n fireEvents(opts.tracks, prevPlayhead, playhead);\n prevPlayhead = playhead;\n booker?.tick(virtualNow, scale ?? (base.isPaused() ? 0 : base.timeScale()));\n\n if (finished && !done) { done = true; opts.onDone?.(); }\n // Re-read: `onDone` may have seeked back or extended the duration, and\n // retiring the entry would strand the replay its own handler just started.\n if (playhead < duration) return false;\n live = false;\n return true;\n };\n\n // Every cancel path inside the animator routes through here, so a timeline\n // cancelled by key or by `cancelAll` is as dead as one cancelled by hand.\n const onCancel = (): void => { cancelled = true; live = false; booker?.retract(); };\n\n const progress = (): number => (duration > 0 ? playhead / duration : 1);\n const seed = { id, cancelKey: opts.cancelKey, tick, onCancel, kind: 'timeline' as const, label: opts.label, progress };\n const base = register(seed);\n\n // A paused entry's scale is zero, so `virtualNow` never advances and the\n // playhead holds at 0 until the consumer resumes.\n if (opts.autoplay === false) base.pause();\n\n /** Put a finished timeline back on the animator's table. A re-registered\n * entry's `virtualNow` restarts at 0, so `offset` carries the playhead. */\n const rearm = (): void => {\n if (cancelled || playhead >= duration) return;\n done = false;\n if (live) return;\n booker?.rearm();\n lastVirtual = 0;\n offset = playhead;\n live = true;\n register({ ...seed, keepExisting: true });\n if (wantPaused) base.pause();\n base.setTimeScale(wantScale);\n };\n\n return {\n ...base,\n // Not just `onCancel`: cancelling a finished timeline never reaches the\n // animator, and must still keep a later seek from reviving it.\n cancel() { onCancel(); base.cancel(); },\n // Playback intent is tracked here, not read back from the entry: a revived\n // one is a fresh registration, and defaults to running at scale 1.\n pause() { wantPaused = true; base.pause(); booker?.retract(); },\n resume() { wantPaused = false; base.resume(); },\n setTimeScale(s) { wantScale = s; base.setTimeScale(s); },\n timeScale: () => (live ? base.timeScale() : wantScale),\n isPaused: () => (live ? base.isPaused() : wantPaused),\n seek(t) {\n booker?.retract();\n offset = t - lastVirtual;\n playhead = t;\n prevPlayhead = t;\n booker?.seek();\n rearm();\n },\n time: () => playhead,\n duration: () => duration,\n tracks: () => opts.tracks,\n setLoop(loop) {\n loopsLeft = loop === true ? Infinity : loop === false ? 0 : loop;\n booker?.retract();\n },\n loop: () => (loopsLeft === Infinity ? true : loopsLeft === 0 ? false : loopsLeft),\n edit(fn) {\n fn();\n caches = new WeakMap();\n duration = tracksEnd(opts.tracks, opts.duration);\n booker?.retract();\n rearm();\n for (const cb of subscribers) {\n try { cb(); } catch (err) { console.error('timeline: subscriber threw', err); }\n }\n },\n subscribe(cb) {\n subscribers.add(cb);\n return () => { subscribers.delete(cb); };\n },\n };\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"createTimeline.js","names":["trackEnd","track","tracksEnd","explicit","max","tracks","createTimeline","duration","opts","offset","lastVirtual","playhead","prevPlayhead","done","live","cancelled","wantPaused","wantScale","subscribers","loopOpt","loopsLeft","lap","booker","createBooker","warnedUnbooked","caches","cacheFor","c","applySampled","st","v","sampleTrack","path","fireEvents","k","end","firstAfter","to","i","from","ev","report","onWrap","tick","virtualNow","laps","finished","scale","base","onCancel","seed","register","rearm","s","t","loop","fn","cb","err"],"sources":["../../../src/animation/timeline/createTimeline.ts"],"sourcesContent":["import type { AnimationHandle } from '../types';\nimport { createBooker, firstAfter } from './booking';\nimport { sampleTrack } from './sampleTrack';\nimport type { EventTrack, SampledTrack, TimelineEvent, TimelineHandle, TimelineOptions, Track } from './types';\n\n/** The animator's internal `register`, narrowed to what a timeline needs. */\nexport type TimelineRegister = (seed: {\n id: number;\n cancelKey?: string;\n /** Registers under an existing `cancelKey` without cancelling whoever holds\n * it. A revived timeline is the same animation, not a new claim on the key. */\n keepExisting?: boolean;\n /** `scale` is the effective time scale this frame advanced at, zero while\n * paused at any level. */\n tick: (virtualNow: number, scale?: number) => boolean;\n onCancel?: () => void;\n kind: 'timeline';\n label?: string;\n progress?: () => number;\n}) => AnimationHandle;\n\n/** Where a timeline reports its crossings and laps to `animator.watch`. Each\n * call site checks `watched` first, so an unwatched timeline builds nothing. */\nexport interface TimelineReport {\n readonly watched: boolean;\n /** `path` is a scratch stack the timeline goes on mutating; copy it to keep it. */\n fire(track: EventTrack, path: readonly number[], event: TimelineEvent, lateBy: number): void;\n lap(lap: number): void;\n}\n\n/** End time of a track: its last key/event, or a nested timeline's own end. */\nfunction trackEnd(track: Track): number {\n switch (track.kind) {\n case 'sampled': return track.keys.length ? track.keys[track.keys.length - 1].t : 0;\n case 'event': return track.events.length ? track.events[track.events.length - 1].t : 0;\n case 'timeline': return track.at + tracksEnd(track.timeline.tracks, track.timeline.duration);\n }\n}\n\nfunction tracksEnd(tracks: Track[], explicit?: number): number {\n if (explicit != null) return explicit;\n let max = 0;\n for (const t of tracks) max = Math.max(max, trackEnd(t));\n return max;\n}\n\n/**\n * Create a timeline as a registered animator animation.\n *\n * The playhead is NOT the entry's `virtualNow` directly — it is\n * `virtualNow + offset`, where `offset` is what `seek` and looping move. That\n * keeps seek and wrap-around entirely inside the timeline and needs no setter\n * on the animator's entry.\n *\n * A finished timeline leaves the animator's table, so `seek` and a\n * duration-extending `edit` re-register it. Staying registered instead would\n * hold a slot — and the rAF loop — open for every timeline ever created.\n */\nexport function createTimeline(\n register: TimelineRegister,\n id: number,\n opts: TimelineOptions,\n report?: TimelineReport,\n): TimelineHandle {\n let duration = tracksEnd(opts.tracks, opts.duration);\n let offset = 0;\n let lastVirtual = 0;\n let playhead = 0;\n let prevPlayhead = -Infinity;\n let done = false;\n let live = true;\n let cancelled = false;\n let wantPaused = opts.autoplay === false;\n let wantScale = 1;\n\n const subscribers = new Set<() => void>();\n\n const loopOpt = opts.loop ?? false;\n let loopsLeft = loopOpt === true ? Infinity : loopOpt === false ? 0 : loopOpt;\n let lap = 0;\n\n const booker = opts.booking\n ? createBooker(opts.booking, {\n tracks: opts.tracks,\n duration: () => duration,\n lapsLeft: () => loopsLeft,\n lap: () => lap,\n playhead: () => playhead,\n })\n : null;\n let warnedUnbooked = false;\n\n // Per-sampled-track sampling caches, dropped wholesale by `edit`.\n let caches = new WeakMap<object, Map<number, (u: number) => unknown>>();\n const cacheFor = (track: object): Map<number, (u: number) => unknown> => {\n let c = caches.get(track);\n if (!c) { c = new Map(); caches.set(track, c); }\n return c;\n };\n\n const applySampled = (tracks: Track[], t: number): void => {\n for (const track of tracks) {\n if (track.kind === 'sampled') {\n const st = track as SampledTrack<unknown>;\n const v = sampleTrack(st, t, cacheFor(st));\n if (v !== undefined) st.onTick(v);\n } else if (track.kind === 'timeline') {\n applySampled(track.timeline.tracks, t - track.at);\n }\n }\n };\n\n // Track indexes from the root down to the track being fired, for `report`.\n const path: number[] = [];\n const fireEvents = (tracks: Track[], from: number, to: number): void => {\n for (let k = 0; k < tracks.length; k += 1) {\n const track = tracks[k];\n if (track.kind === 'event') {\n const end = firstAfter(track.events, to);\n for (let i = firstAfter(track.events, from); i < end; i += 1) {\n const ev = track.events[i];\n ev.fire?.(to - ev.t);\n if (report?.watched) {\n path.push(k);\n report.fire(track, path, ev, to - ev.t);\n path.pop();\n }\n if (ev.book && !booker && !warnedUnbooked) {\n warnedUnbooked = true;\n console.warn('timeline: an event has `book` but the timeline has no `booking` clock; it never books.');\n }\n }\n } else if (track.kind === 'timeline') {\n path.push(k);\n fireEvents(track.timeline.tracks, from - track.at, to - track.at);\n path.pop();\n }\n }\n };\n\n // Flush the outgoing pass's tail before re-arming, or an event between the\n // last tick and `duration` is dropped whenever a frame straddles the seam.\n const onWrap = (): void => {\n fireEvents(opts.tracks, prevPlayhead, duration);\n prevPlayhead = -Infinity;\n if (report?.watched) report.lap(lap);\n };\n\n const tick = (virtualNow: number, scale?: number): boolean => {\n lastVirtual = virtualNow;\n playhead = virtualNow + offset;\n\n // A far seek can skip a billion laps of a short duration, so an endless\n // loop takes them in one modulo rather than one iteration each.\n if (duration > 0 && playhead >= duration) {\n if (loopsLeft === Infinity) {\n const laps = Math.floor(playhead / duration);\n offset -= laps * duration;\n playhead -= laps * duration;\n lap += laps;\n onWrap();\n } else {\n while (playhead >= duration && loopsLeft > 0) {\n loopsLeft -= 1;\n offset -= duration;\n playhead -= duration;\n lap += 1;\n onWrap();\n }\n }\n }\n\n const finished = playhead >= duration;\n playhead = Math.min(playhead, duration);\n\n // Sampled before fired, so a handler reads the current frame's values.\n applySampled(opts.tracks, playhead);\n fireEvents(opts.tracks, prevPlayhead, playhead);\n prevPlayhead = playhead;\n booker?.tick(virtualNow, scale ?? (base.isPaused() ? 0 : base.timeScale()));\n\n if (finished && !done) { done = true; opts.onDone?.(); }\n // Re-read: `onDone` may have seeked back or extended the duration, and\n // retiring the entry would strand the replay its own handler just started.\n if (playhead < duration) return false;\n live = false;\n return true;\n };\n\n // Every cancel path inside the animator routes through here, so a timeline\n // cancelled by key or by `cancelAll` is as dead as one cancelled by hand.\n const onCancel = (): void => { cancelled = true; live = false; booker?.retract(); };\n\n const progress = (): number => (duration > 0 ? playhead / duration : 1);\n const seed = { id, cancelKey: opts.cancelKey, tick, onCancel, kind: 'timeline' as const, label: opts.label, progress };\n const base = register(seed);\n\n // A paused entry's scale is zero, so `virtualNow` never advances and the\n // playhead holds at 0 until the consumer resumes.\n if (opts.autoplay === false) base.pause();\n\n /** Put a finished timeline back on the animator's table. A re-registered\n * entry's `virtualNow` restarts at 0, so `offset` carries the playhead. */\n const rearm = (): void => {\n if (cancelled || playhead >= duration) return;\n done = false;\n if (live) return;\n booker?.rearm();\n lastVirtual = 0;\n offset = playhead;\n live = true;\n register({ ...seed, keepExisting: true });\n if (wantPaused) base.pause();\n base.setTimeScale(wantScale);\n };\n\n return {\n ...base,\n // Not just `onCancel`: cancelling a finished timeline never reaches the\n // animator, and must still keep a later seek from reviving it.\n cancel() { onCancel(); base.cancel(); },\n // Playback intent is tracked here, not read back from the entry: a revived\n // one is a fresh registration, and defaults to running at scale 1.\n pause() { wantPaused = true; base.pause(); booker?.retract(); },\n resume() { wantPaused = false; base.resume(); },\n setTimeScale(s) { wantScale = s; base.setTimeScale(s); },\n timeScale: () => (live ? base.timeScale() : wantScale),\n isPaused: () => (live ? base.isPaused() : wantPaused),\n seek(t) {\n booker?.retract();\n offset = t - lastVirtual;\n playhead = t;\n prevPlayhead = t;\n booker?.seek();\n rearm();\n },\n time: () => playhead,\n duration: () => duration,\n tracks: () => opts.tracks,\n setLoop(loop) {\n loopsLeft = loop === true ? Infinity : loop === false ? 0 : loop;\n booker?.retract();\n },\n loop: () => (loopsLeft === Infinity ? true : loopsLeft === 0 ? false : loopsLeft),\n edit(fn) {\n fn();\n caches = new WeakMap();\n duration = tracksEnd(opts.tracks, opts.duration);\n booker?.retract();\n rearm();\n for (const cb of subscribers) {\n try { cb(); } catch (err) { console.error('timeline: subscriber threw', err); }\n }\n },\n subscribe(cb) {\n subscribers.add(cb);\n return () => { subscribers.delete(cb); };\n },\n };\n}\n"],"mappings":"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"}
@@ -1,29 +1,71 @@
1
- import { resolveEasing as e } from "@weasel-js/geom";
1
+ import { axesOf as e } from "../engine/axes.js";
2
+ import { resolveEasing as t } from "@weasel-js/geom";
3
+ import { keys as n } from "@msb235/blits";
2
4
  //#region src/animation/timeline/sampleTrack.ts
3
- function t(e, t) {
4
- let n = 0, r = e.length - 1, i = -1;
5
- for (; n <= r;) {
6
- let a = n + r >> 1;
7
- e[a].t <= t ? (i = a, n = a + 1) : r = a - 1;
5
+ var r = {}, i = -1;
6
+ function a(r, i) {
7
+ let { keys: a } = r, o = Infinity, s = -Infinity, c = /* @__PURE__ */ new Map();
8
+ for (let e of a) o = Math.min(o, e.t), s = Math.max(s, e.t), c.set(e.t, e.value);
9
+ let l = s - o, u = {
10
+ track: r,
11
+ keys: a,
12
+ patch: null,
13
+ t0: o,
14
+ span: l,
15
+ exact: c,
16
+ first: a[0].value,
17
+ last: a[a.length - 1].value,
18
+ read: (e) => e
19
+ };
20
+ if (l <= 0) return u;
21
+ let d = (e) => e.easing ? t(e.easing) : void 0, { interpolator: f, interpolate: p } = r;
22
+ if (f || p) {
23
+ let e = a.map((e, t) => ({
24
+ i: t,
25
+ value: e.value
26
+ })), t = (e, t, n) => {
27
+ if (f) {
28
+ let r = i?.get(t.i);
29
+ return r || (r = f(e.value, t.value), i?.set(t.i, r)), {
30
+ i: -1,
31
+ value: r(n)
32
+ };
33
+ }
34
+ return {
35
+ i: -1,
36
+ value: p(e.value, t.value, n)
37
+ };
38
+ };
39
+ return u.patch = n(1, a.map((t, n) => ({
40
+ at: (t.t - o) / l,
41
+ delta: { v: e[n] },
42
+ ease: d(t)
43
+ })), { lerpBy: () => t }), u.read = (e) => e.value, u;
8
44
  }
9
- return i;
45
+ let m = e(a[0].value);
46
+ if (!m) return u;
47
+ for (let t of a) if (e(t.value)?.shape !== m.shape) throw Error(`sampleTrack: every key needs the shape of the first (${m.shape})`);
48
+ let h = m.shape === "number";
49
+ return u.patch = n(1, a.map((e) => ({
50
+ at: (e.t - o) / l,
51
+ delta: { v: h ? e.value : m.to(e.value) },
52
+ ease: d(e)
53
+ }))), h || (u.read = (e) => m.from(e)), u;
10
54
  }
11
- function n(n, r, i) {
12
- let { keys: a } = n;
13
- if (a.length === 0) return;
14
- let o = t(a, r);
15
- if (o < 0) return a[0].value;
16
- if (o >= a.length - 1) return a[a.length - 1].value;
17
- let s = a[o], c = a[o + 1], l = c.t - s.t, u = l <= 0 ? 1 : (r - s.t) / l, d = c.easing ? e(c.easing)(u) : u;
18
- if (n.interpolator) {
19
- let e = i?.get(o + 1);
20
- return e || (e = n.interpolator(s.value, c.value), i?.set(o + 1, e)), e(d);
55
+ function o(e, t, n) {
56
+ if (e.keys.length === 0) return;
57
+ let o = n, s = o?.get(i);
58
+ (!s || s.track !== e || s.keys !== e.keys) && (o?.clear(), s = a(e, n), o?.set(i, s));
59
+ let c = s.exact.get(t);
60
+ if (c !== void 0 || s.exact.has(t)) return c;
61
+ if (!s.patch) {
62
+ if (t < s.t0) return s.first;
63
+ if (t >= s.t0 + s.span) return s.last;
64
+ throw Error("sampleTrack: interpolate or interpolator is required for non-numeric keyframe values");
21
65
  }
22
- if (n.interpolate) return n.interpolate(s.value, c.value, d);
23
- if (typeof s.value == "number" && typeof c.value == "number") return s.value + (c.value - s.value) * d;
24
- throw Error("sampleTrack: interpolate or interpolator is required for non-numeric keyframe values");
66
+ return s.read(s.patch.at((t - s.t0) / s.span, 0, r).v);
25
67
  }
26
68
  //#endregion
27
- export { n as sampleTrack };
69
+ export { o as sampleTrack };
28
70
 
29
71
  //# sourceMappingURL=sampleTrack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleTrack.js","names":["floorKeyIndex","lo","hi","keys","found","mid","sampleTrack","track","i","t","a","b","span","raw","u","resolveEasing","fn","segmentCache"],"sources":["../../../src/animation/timeline/sampleTrack.ts"],"sourcesContent":["import { resolveEasing } from '@weasel-js/geom';\nimport type { SampledTrack } from './types';\n\n/** Index of the last key at or before `t`, or -1 when `t` precedes all keys.\n * Binary search: tracks are sorted and may be long. */\nfunction floorKeyIndex<T>(keys: SampledTrack<T>['keys'], t: number): number {\n let lo = 0;\n let hi = keys.length - 1;\n let found = -1;\n while (lo <= hi) {\n const mid = (lo + hi) >> 1;\n if (keys[mid].t <= t) {\n found = mid;\n lo = mid + 1;\n } else {\n hi = mid - 1;\n }\n }\n return found;\n}\n\n/**\n * Sample a track at `t`. Pure: no state, no side effects, safe to call for any\n * `t` in any order — which is what makes scrubbing free.\n *\n * `segmentCache` memoizes `interpolator` factories by the index of the segment's\n * later key. Callers that mutate keys must drop the cache; `createTimeline`\n * drops it wholesale on `edit`.\n */\nexport function sampleTrack<T>(\n track: SampledTrack<T>,\n t: number,\n segmentCache?: Map<number, (u: number) => T>,\n): T | undefined {\n const { keys } = track;\n if (keys.length === 0) return undefined;\n\n const i = floorKeyIndex(keys, t);\n if (i < 0) return keys[0].value;\n if (i >= keys.length - 1) return keys[keys.length - 1].value;\n\n const a = keys[i];\n const b = keys[i + 1];\n const span = b.t - a.t;\n const raw = span <= 0 ? 1 : (t - a.t) / span;\n // `easing` belongs to the key being approached, so `b` supplies it.\n const u = b.easing ? resolveEasing(b.easing)(raw) : raw;\n\n if (track.interpolator) {\n let fn = segmentCache?.get(i + 1);\n if (!fn) {\n fn = track.interpolator(a.value, b.value);\n segmentCache?.set(i + 1, fn);\n }\n return fn(u);\n }\n if (track.interpolate) return track.interpolate(a.value, b.value, u);\n\n if (typeof a.value === 'number' && typeof b.value === 'number') {\n return ((a.value as number) + ((b.value as number) - (a.value as number)) * u) as unknown as T;\n }\n throw new Error('sampleTrack: interpolate or interpolator is required for non-numeric keyframe values');\n}\n"],"mappings":";;AAKA,SAASA,EAAiB,GAA+B,GAAmB;CAC1E,IAAIC,IAAK,GACLC,IAAKC,EAAK,SAAS,GACnBC,IAAQ;CACZ,OAAOH,KAAMC,IAAI;EACf,IAAMG,IAAOJ,IAAKC,KAAO;EACzB,AAAIC,EAAKE,EAAI,CAAC,KAAK,KACjB,IAAQA,GACR,IAAKA,IAAM,KAEX,IAAKA,IAAM;CAEf;CACA,OAAOD;AACT;AAUA,SAAgBE,EACd,GACA,GACA,GACe;CACf,IAAM,EAAE,YAASC;CACjB,IAAIJ,EAAK,WAAW,GAAG;CAEvB,IAAMK,IAAIR,EAAcG,GAAMM,CAAC;CAC/B,IAAID,IAAI,GAAG,OAAOL,EAAK,EAAE,CAAC;CAC1B,IAAIK,KAAKL,EAAK,SAAS,GAAG,OAAOA,EAAKA,EAAK,SAAS,EAAE,CAAC;CAEvD,IAAMO,IAAIP,EAAKK,IACTG,IAAIR,EAAKK,IAAI,IACbI,IAAOD,EAAE,IAAID,EAAE,GACfG,IAAMD,KAAQ,IAAI,KAAKH,IAAIC,EAAE,KAAKE,GAElCE,IAAIH,EAAE,SAASI,EAAcJ,EAAE,MAAM,CAAC,CAACE,CAAG,IAAIA;CAEpD,IAAIN,EAAM,cAAc;EACtB,IAAIS,IAAKC,GAAc,IAAIT,IAAI,CAAC;EAKhC,OAJKQ,MACH,IAAKT,EAAM,aAAaG,EAAE,OAAOC,EAAE,KAAK,GACxCM,GAAc,IAAIT,IAAI,GAAGQ,CAAE,IAEtBA,EAAGF,CAAC;CACb;CACA,IAAIP,EAAM,aAAa,OAAOA,EAAM,YAAYG,EAAE,OAAOC,EAAE,OAAOG,CAAC;CAEnE,IAAI,OAAOJ,EAAE,SAAU,YAAY,OAAOC,EAAE,SAAU,UACpD,OAASD,EAAE,SAAqBC,EAAE,QAAoBD,EAAE,SAAoBI;CAE9E,MAAU,MAAM,sFAAsF;AACxG"}
1
+ {"version":3,"file":"sampleTrack.js","names":["keys","keysPatch","NO_SETTING","BUILT","build","keys$1","track","t0","t1","exact","k","span","out","v","ease","resolveEasing","interpolator","interpolate","boxes","lerp","fn","cache","b","a","u","keys","i","axes","axesOf","scalar","sampleTrack","segmentCache","hit"],"sources":["../../../src/animation/timeline/sampleTrack.ts"],"sourcesContent":["import { keys as keysPatch, type Patch, type Setting } from '@msb235/blits';\nimport { resolveEasing } from '@weasel-js/geom';\nimport { axesOf } from '../engine/axes';\nimport type { SampledTrack } from './types';\n\ntype Out = { v: unknown };\n/** What an interpolated track's stops carry: blits finds the segment and eases it, and the\n * track's own function makes the value. */\ninterface Box { i: number; value: unknown }\n\ninterface Built {\n /** What it was built from, so a cache handed another track, or new keys, rebuilds. */\n track: object;\n keys: readonly unknown[];\n /** Null where there is nothing to interpolate: one key time, or values with no way to lerp. */\n patch: Patch<number, Out, void> | null;\n t0: number;\n span: number;\n /** Every key's time to the value sampling exactly there returns: the later of keys sharing a\n * time, and the key's own value where blits would reach it as `a + (b - a) * ease(1)`. */\n exact: Map<number, unknown>;\n first: unknown;\n last: unknown;\n read: (v: unknown) => unknown;\n}\n\nconst NO_SETTING = {} as Setting<void>;\n/** Where a cache holds its track's `Built`; segment indexes start at 1. A `WeakMap` keyed on the\n * cache instead cost about a fifth of every sample. */\nconst BUILT = -1;\n\nfunction build<T>(track: SampledTrack<T>, cache: Map<number, (u: number) => T> | undefined): Built {\n const { keys } = track;\n let t0 = Infinity;\n let t1 = -Infinity;\n const exact = new Map<number, unknown>();\n for (const k of keys) {\n t0 = Math.min(t0, k.t);\n t1 = Math.max(t1, k.t);\n exact.set(k.t, k.value);\n }\n const span = t1 - t0;\n const out: Built = { track, keys, patch: null, t0, span, exact, first: keys[0].value, last: keys[keys.length - 1].value, read: (v) => v };\n if (span <= 0) return out;\n\n const ease = (k: (typeof keys)[number]) => (k.easing ? resolveEasing(k.easing) : undefined);\n const { interpolator, interpolate } = track;\n if (interpolator || interpolate) {\n const boxes: Box[] = keys.map((k, i) => ({ i, value: k.value }));\n const lerp = (a: Box, b: Box, u: number): Box => {\n if (interpolator) {\n let fn = cache?.get(b.i);\n if (!fn) {\n fn = interpolator(a.value as T, b.value as T);\n cache?.set(b.i, fn);\n }\n return { i: -1, value: fn(u) };\n }\n return { i: -1, value: interpolate!(a.value as T, b.value as T, u) };\n };\n out.patch = keysPatch<number, Out>(\n 1,\n keys.map((k, i) => ({ at: (k.t - t0) / span, delta: { v: boxes[i] }, ease: ease(k) })),\n { lerpBy: () => lerp as (a: never, b: never, u: number) => unknown },\n );\n out.read = (v) => (v as Box).value;\n return out;\n }\n\n const axes = axesOf(keys[0].value);\n if (!axes) return out;\n for (const k of keys) {\n if (axesOf(k.value)?.shape !== axes.shape) {\n throw new Error(`sampleTrack: every key needs the shape of the first (${axes.shape})`);\n }\n }\n const scalar = axes.shape === 'number';\n out.patch = keysPatch<number, Out>(\n 1,\n keys.map((k) => ({ at: (k.t - t0) / span, delta: { v: scalar ? k.value : axes.to(k.value) }, ease: ease(k) })),\n );\n if (!scalar) out.read = (v) => axes.from(v as number[]);\n return out;\n}\n\n/**\n * Sample a track at `t`. Pure: no state, no side effects, safe to call for any\n * `t` in any order — which is what makes scrubbing free.\n *\n * `segmentCache` holds what sampling builds from the keys: the track's blits\n * patch and its `interpolator` factories. Handed another track or a replaced\n * `keys` array, it rebuilds; a key edited in place needs the cache dropped,\n * which `createTimeline` does on `edit`. With no cache, every call builds afresh.\n */\nexport function sampleTrack<T>(\n track: SampledTrack<T>,\n t: number,\n segmentCache?: Map<number, (u: number) => T>,\n): T | undefined {\n if (track.keys.length === 0) return undefined;\n const cache = segmentCache as Map<number, unknown> | undefined;\n let b = cache?.get(BUILT) as Built | undefined;\n if (!b || b.track !== track || b.keys !== track.keys) {\n cache?.clear();\n b = build(track, segmentCache);\n cache?.set(BUILT, b);\n }\n const hit = b.exact.get(t);\n if (hit !== undefined || b.exact.has(t)) return hit as T;\n if (!b.patch) {\n if (t < b.t0) return b.first as T;\n if (t >= b.t0 + b.span) return b.last as T;\n throw new Error('sampleTrack: interpolate or interpolator is required for non-numeric keyframe values');\n }\n return b.read(b.patch.at((t - b.t0) / b.span, 0, NO_SETTING).v) as T;\n}\n"],"mappings":"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"}
@@ -2533,9 +2533,11 @@ interface Keyframe<T> {
2533
2533
  interface SampledTrack<T> {
2534
2534
  kind: 'sampled';
2535
2535
  label?: string;
2536
- /** Sorted ascending by `t`. `sampleTrack` assumes this and does not sort. */
2536
+ /** Sorted ascending by `t`. Of keys sharing a time, the last in the array is
2537
+ * the value at exactly that time. */
2537
2538
  keys: Keyframe<T>[];
2538
- /** Required when T is not `number`; defaults to numeric lerp otherwise. */
2539
+ /** Required unless every key's value is a number, a number array or a plain
2540
+ * object of numbers, all of one shape; those are lerped field by field. */
2539
2541
  interpolate?: Interpolate<T>;
2540
2542
  /** Built once per segment and cached. Takes precedence over `interpolate`. */
2541
2543
  interpolator?: InterpolatorFactory<T>;
@@ -4509,4 +4511,4 @@ declare function vignette({ amount, feather }: {
4509
4511
  feather?: number;
4510
4512
  }): Effect[];
4511
4513
 
4512
- export { type SvgIngestOptions as $, type PoseComposition as A, type PoseAdapter as B, type CullRect as C, type DrawCommand as D, type Effect as E, type GestureLifecycleOptions as F, type GroupDrawCommand as G, type SliceDep as H, IDENTITY_COLOR_MATRIX as I, type ToolsApi as J, type Tool as K, type Contribution as L, type LayerHit as M, type Node as N, type ChromeState as O, type PathDrawCommand as P, type VertexColorChannel as Q, type RenderOptions as R, SPRITE_STRIDE as S, type TextDrawCommand as T, type LayerGroup as U, type ViewAnimationOptions as V, WeaselRenderer as W, type InsertExtras as X, type SerializedScene as Y, type GeometryProjection as Z, type ContentHandlerEntry as _, type ImageDrawCommand as a, type LayoutFrame as a$, type AnyTool as a0, type PanBounds as a1, type Animator as a2, ColorOverrideRegistry as a3, type UseSceneOptions as a4, type SceneRegistry as a5, type RegisteredOp as a6, type PoseOverrides as a7, type DerivePoseFn as a8, type DerivePathFn as a9, type ColorOverride as aA, type ColorOverrideFn as aB, type ContainerNode as aC, type ContributionChrome as aD, type CreateOutlinesResult as aE, type CustomPaintContext as aF, type DecayLoopConfig as aG, type DecayOptions as aH, type EditAnchorsDep as aI, type EventBooking as aJ, type EventBookingHandle as aK, type EventTrack as aL, type FitViewToBoundsOptions as aM, type HitTestView as aN, IDENTITY_POSE_COMPOSITION as aO, type IngestCtx as aP, type IngestionDep as aQ, type InsertDep as aR, type Interpolate as aS, type InterpolatorFactory as aT, type Keyframe as aU, type LassoSelectDep as aV, type LayerCommandCache as aW, type LayerDrawFailure as aX, type LayerDrawSpan as aY, type LayerRecord as aZ, type LayoutDep as a_, type DerivedDep as aa, type ViewportDims as ab, type ViewApi as ac, type Affordance as ad, type AffordanceRegion as ae, type AffordanceBinding as af, type CommonAffordanceScratch as ag, type BooleansAdapter as ah, type CreateOutlinesAdapter as ai, type UseAnimatorOptions as aj, type AnimationHandle as ak, type SampledTrack as al, type SceneArrivalHandler as am, type AddLayerSpec as an, type AddNodeSpec as ao, type AnimateToBoundsOptions as ap, type AnimationInfo as aq, type AnimationKind as ar, type AnimatorEvent as as, type AnimatorListener as at, type AreaSelectDep as au, type BooleanOp as av, type BooleanOpResult as aw, type ClipFromPoseFn as ax, type ClipboardDep as ay, type ClipboardIngestCtx as az, type ImageMinification as b, isLayerVisible as b$, type LayoutMove as b0, type LeafNode as b1, type LiveAnimation as b2, type LoopFactory as b3, type LoopOptions as b4, type NestedTimeline as b5, type NodeAtPointDep as b6, type OutlinePathSpec as b7, type Overlay as b8, type PathInWorldPose as b9, type TextOutlinesFailure as bA, type TextPaintPath as bB, type TextToPathOptions as bC, type TimelineClock as bD, type TimelineEvent as bE, type TimelineHandle as bF, type TimelineOptions as bG, type TimelineTrack as bH, type ToolDef as bI, type Track as bJ, type TweenLoopOptions as bK, type TweenOptions as bL, type UseToolsOptions as bM, type UserLayerRecord as bN, VIEW_ANIMATION_KEY as bO, type ViewAnimationApi as bP, type ViewChannel as bQ, applyBooleanOp as bR, applyCreateOutlines as bS, asNodeId as bT, composeWorldPose as bU, createPointerStore as bV, depsUnchanged as bW, drawLayers as bX, drawOneLayer as bY, fitViewToBounds as bZ, isLayerPainted as b_, type PhysicsHandle as ba, type PhysicsOptions as bb, PointerContextProvider as bc, type PointerContextValue as bd, type PointerWorldPos as be, type PoseClosure as bf, type PoseOverride as bg, type ResizePolicy as bh, type SerializedLayer as bi, type SerializedNode as bj, type SnapDep as bk, type SpringOptions as bl, type StaggerBuilder as bm, type StaggerDelay as bn, type StaggerFactory as bo, type StaggerOptions as bp, type StaggerPerItem as bq, type StaggerSpringPoseOptions as br, type StaggerTweenOptions as bs, type SvgUnpacker as bt, type SystemLayerRecord as bu, type SystemLayerSpec as bv, type TextEditDep as bw, type TextNodeSource as bx, type TextOutlineSource as by, TextOutlinesError as bz, type RenderSpan as c, loadTextOutlines as c0, pathInPoseFrame as c1, pathInWorld as c2, rebaseLocalPose as c3, registerContentHandler as c4, resolveStrokeWidth as c5, subscribeToSources as c6, textToPath as c7, textToPathsByPaint as c8, useDecayLoop as c9, usePointerContext as ca, usePointerPosition as cb, useTools as cc, useViewAnimation as cd, useViewAnimationOn as ce, worldEditToStorage as cf, type RenderSpanStats as d, type RenderStats as e, type RenderTarget as f, type ShaderDrawCommand as g, type SolidPaint as h, type SpriteSheet as i, type SpritesDrawCommand as j, type StrokeOptions as k, type WeaselRendererOptions as l, blur as m, buildGradientRamp as n, cullDrawCommands as o, frameRect as p, vignette as q, registerEffect as r, type RenderLayer as s, tessellateStroke as t, type Dims as u, viewToMat3 as v, type RedrawSource as w, type Scene as x, type RectPose as y, type InertiaConfig as z };
4514
+ export { type SvgIngestOptions as $, type PoseComposition as A, type PoseAdapter as B, type CullRect as C, type DrawCommand as D, type Effect as E, type GestureLifecycleOptions as F, type GroupDrawCommand as G, type SliceDep as H, IDENTITY_COLOR_MATRIX as I, type ToolsApi as J, type Tool as K, type Contribution as L, type LayerHit as M, type Node as N, type ChromeState as O, type PathDrawCommand as P, type VertexColorChannel as Q, type RenderOptions as R, SPRITE_STRIDE as S, type TextDrawCommand as T, type LayerGroup as U, type ViewAnimationOptions as V, WeaselRenderer as W, type InsertExtras as X, type SerializedScene as Y, type GeometryProjection as Z, type ContentHandlerEntry as _, type ImageDrawCommand as a, type LayoutFrame as a$, type AnyTool as a0, type PanBounds as a1, type Animator as a2, ColorOverrideRegistry as a3, type UseSceneOptions as a4, type SceneRegistry as a5, type RegisteredOp as a6, type PoseOverrides as a7, type AddNodeSpec as a8, type DerivePoseFn as a9, type ColorOverride as aA, type ColorOverrideFn as aB, type ContainerNode as aC, type ContributionChrome as aD, type CreateOutlinesResult as aE, type CustomPaintContext as aF, type DecayLoopConfig as aG, type DecayOptions as aH, type EditAnchorsDep as aI, type EventBooking as aJ, type EventBookingHandle as aK, type EventTrack as aL, type FitViewToBoundsOptions as aM, type HitTestView as aN, IDENTITY_POSE_COMPOSITION as aO, type IngestCtx as aP, type IngestionDep as aQ, type InsertDep as aR, type Interpolate as aS, type InterpolatorFactory as aT, type Keyframe as aU, type LassoSelectDep as aV, type LayerCommandCache as aW, type LayerDrawFailure as aX, type LayerDrawSpan as aY, type LayerRecord as aZ, type LayoutDep as a_, type DerivePathFn as aa, type DerivedDep as ab, type ViewportDims as ac, type ViewApi as ad, type Affordance as ae, type AffordanceRegion as af, type AffordanceBinding as ag, type CommonAffordanceScratch as ah, type BooleansAdapter as ai, type CreateOutlinesAdapter as aj, type UseAnimatorOptions as ak, type AnimationHandle as al, type SampledTrack as am, type SceneArrivalHandler as an, type AddLayerSpec as ao, type AnimateToBoundsOptions as ap, type AnimationInfo as aq, type AnimationKind as ar, type AnimatorEvent as as, type AnimatorListener as at, type AreaSelectDep as au, type BooleanOp as av, type BooleanOpResult as aw, type ClipFromPoseFn as ax, type ClipboardDep as ay, type ClipboardIngestCtx as az, type ImageMinification as b, isLayerVisible as b$, type LayoutMove as b0, type LeafNode as b1, type LiveAnimation as b2, type LoopFactory as b3, type LoopOptions as b4, type NestedTimeline as b5, type NodeAtPointDep as b6, type OutlinePathSpec as b7, type Overlay as b8, type PathInWorldPose as b9, type TextOutlinesFailure as bA, type TextPaintPath as bB, type TextToPathOptions as bC, type TimelineClock as bD, type TimelineEvent as bE, type TimelineHandle as bF, type TimelineOptions as bG, type TimelineTrack as bH, type ToolDef as bI, type Track as bJ, type TweenLoopOptions as bK, type TweenOptions as bL, type UseToolsOptions as bM, type UserLayerRecord as bN, VIEW_ANIMATION_KEY as bO, type ViewAnimationApi as bP, type ViewChannel as bQ, applyBooleanOp as bR, applyCreateOutlines as bS, asNodeId as bT, composeWorldPose as bU, createPointerStore as bV, depsUnchanged as bW, drawLayers as bX, drawOneLayer as bY, fitViewToBounds as bZ, isLayerPainted as b_, type PhysicsHandle as ba, type PhysicsOptions as bb, PointerContextProvider as bc, type PointerContextValue as bd, type PointerWorldPos as be, type PoseClosure as bf, type PoseOverride as bg, type ResizePolicy as bh, type SerializedLayer as bi, type SerializedNode as bj, type SnapDep as bk, type SpringOptions as bl, type StaggerBuilder as bm, type StaggerDelay as bn, type StaggerFactory as bo, type StaggerOptions as bp, type StaggerPerItem as bq, type StaggerSpringPoseOptions as br, type StaggerTweenOptions as bs, type SvgUnpacker as bt, type SystemLayerRecord as bu, type SystemLayerSpec as bv, type TextEditDep as bw, type TextNodeSource as bx, type TextOutlineSource as by, TextOutlinesError as bz, type RenderSpan as c, loadTextOutlines as c0, pathInPoseFrame as c1, pathInWorld as c2, rebaseLocalPose as c3, registerContentHandler as c4, resolveStrokeWidth as c5, subscribeToSources as c6, textToPath as c7, textToPathsByPaint as c8, useDecayLoop as c9, usePointerContext as ca, usePointerPosition as cb, useTools as cc, useViewAnimation as cd, useViewAnimationOn as ce, worldEditToStorage as cf, type RenderSpanStats as d, type RenderStats as e, type RenderTarget as f, type ShaderDrawCommand as g, type SolidPaint as h, type SpriteSheet as i, type SpritesDrawCommand as j, type StrokeOptions as k, type WeaselRendererOptions as l, blur as m, buildGradientRamp as n, cullDrawCommands as o, frameRect as p, vignette as q, registerEffect as r, type RenderLayer as s, tessellateStroke as t, type Dims as u, viewToMat3 as v, type RedrawSource as w, type Scene as x, type RectPose as y, type InertiaConfig as z };
@@ -0,0 +1,47 @@
1
+ import { isPlainObject as e } from "../isPlainObject.js";
2
+ //#region src/core/scene/reconcileSpecs.ts
3
+ function t(e, t, a) {
4
+ let o = n(t), s = n(a), c = [];
5
+ for (let [e, t] of o) {
6
+ let n = s.get(e);
7
+ (n === void 0 || r(t, n)) && c.push(e);
8
+ }
9
+ let l = e.removalClosure(c.filter((t) => e.get(t) !== void 0)), u = new Set(l);
10
+ e.untracked(() => {
11
+ e.removeMany(l);
12
+ for (let t of a) {
13
+ let n = t.id, r = o.get(n);
14
+ if (e.get(n) === void 0 || r === void 0 || u.has(n)) {
15
+ e.add(t);
16
+ continue;
17
+ }
18
+ let a = t.parent ?? null;
19
+ a !== (r.parent ?? null) && e.move(n, a), t.layer !== r.layer && e.setLayer(n, t.layer), i(t.data, r.data) || e.update(n, { data: t.data }), i(t.dependsOn, r.dependsOn) || e.setDependsOn(n, t.dependsOn), i(t.pose, r.pose) || e.setPose(n, t.pose);
20
+ }
21
+ });
22
+ }
23
+ function n(e) {
24
+ let t = /* @__PURE__ */ new Map();
25
+ for (let n of e) {
26
+ if (n.id === void 0) throw Error("reconcileSpecs: every spec needs an id");
27
+ if (t.has(n.id)) throw Error(`reconcileSpecs: id "${n.id}" appears more than once`);
28
+ t.set(n.id, n);
29
+ }
30
+ return t;
31
+ }
32
+ function r(e, t) {
33
+ return e.kind !== t.kind || e.pickable !== t.pickable || e.derivePath !== t.derivePath || e.derivePose !== t.derivePose || e.clipFromPose !== t.clipFromPose || e.layout !== t.layout;
34
+ }
35
+ function i(t, n) {
36
+ if (Object.is(t, n)) return !0;
37
+ if (Array.isArray(t) && Array.isArray(n)) return t.length === n.length && t.every((e, t) => i(e, n[t]));
38
+ if (e(t) && e(n)) {
39
+ let e = Object.keys(t);
40
+ return e.length === Object.keys(n).length && e.every((e) => e in n && i(t[e], n[e]));
41
+ }
42
+ return !1;
43
+ }
44
+ //#endregion
45
+ export { t as reconcileSpecs };
46
+
47
+ //# sourceMappingURL=reconcileSpecs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconcileSpecs.js","names":["reconcileSpecs","prevById","byId","prev","nextById","next","gone","id","before","after","needsReplace","removing","scene","removed","spec","parent","same","out","specs","a","b","v","i","isPlainObject","ka","k"],"sources":["../../../src/core/scene/reconcileSpecs.ts"],"sourcesContent":["import { isPlainObject } from '../isPlainObject';\nimport type { AddNodeSpec, NodeId, Scene } from './types';\n\n/**\n * Bring `scene` from `prev` to `next`: add what `next` gained, remove what it\n * lost, and write only the fields that changed between the two.\n *\n * The diff is spec against spec, not spec against scene, so whatever the scene\n * did since `prev` — a node dragged, an edge authored by a gesture — survives\n * unless `next` changes that same field. The writes are untracked: syncing to\n * outside data is not an undo step.\n *\n * Every spec needs an `id`, and `next` must be in an order `createScene` would\n * accept — parents and dependencies before what names them. A node whose\n * `kind` or derive functions change is removed and added again, along with\n * everything its removal takes with it.\n */\nexport function reconcileSpecs<TData, TLayer extends string, TPose>(\n scene: Scene<TData, TLayer, TPose>,\n prev: readonly AddNodeSpec<TData, TLayer, TPose>[],\n next: readonly AddNodeSpec<TData, TLayer, TPose>[],\n): void {\n const prevById = byId(prev);\n const nextById = byId(next);\n const gone: NodeId[] = [];\n for (const [id, before] of prevById) {\n const after = nextById.get(id);\n if (after === undefined || needsReplace(before, after)) gone.push(id);\n }\n const removing = scene.removalClosure(gone.filter((id) => scene.get(id) !== undefined));\n const removed = new Set(removing);\n\n scene.untracked(() => {\n scene.removeMany(removing);\n for (const spec of next) {\n const id = spec.id!;\n const before = prevById.get(id);\n if (scene.get(id) === undefined || before === undefined || removed.has(id)) {\n scene.add(spec);\n continue;\n }\n const parent = spec.parent ?? null;\n if (parent !== (before.parent ?? null)) scene.move(id, parent);\n if (spec.layer !== before.layer) scene.setLayer(id, spec.layer);\n if (!same(spec.data, before.data)) scene.update(id, { data: spec.data });\n if (!same(spec.dependsOn, before.dependsOn)) scene.setDependsOn(id, spec.dependsOn);\n if (!same(spec.pose, before.pose)) scene.setPose(id, spec.pose);\n }\n });\n}\n\nfunction byId<T extends { id?: NodeId }>(specs: readonly T[]): Map<NodeId, T> {\n const out = new Map<NodeId, T>();\n for (const spec of specs) {\n if (spec.id === undefined) throw new Error('reconcileSpecs: every spec needs an id');\n if (out.has(spec.id)) throw new Error(`reconcileSpecs: id \"${spec.id}\" appears more than once`);\n out.set(spec.id, spec);\n }\n return out;\n}\n\nfunction needsReplace<TData, TLayer extends string, TPose>(\n a: AddNodeSpec<TData, TLayer, TPose>,\n b: AddNodeSpec<TData, TLayer, TPose>,\n): boolean {\n return a.kind !== b.kind\n || a.pickable !== b.pickable\n || a.derivePath !== b.derivePath\n || a.derivePose !== b.derivePose\n || a.clipFromPose !== b.clipFromPose\n || a.layout !== b.layout;\n}\n\n/** Structural equality over plain objects and arrays; anything else by identity. */\nfunction same(a: unknown, b: unknown): boolean {\n if (Object.is(a, b)) return true;\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((v, i) => same(v, b[i]));\n }\n if (isPlainObject(a) && isPlainObject(b)) {\n const ka = Object.keys(a);\n return ka.length === Object.keys(b).length && ka.every((k) => k in b && same(a[k], b[k]));\n }\n return false;\n}\n"],"mappings":";;AAiBA,SAAgBA,EACd,GACA,GACA,GACM;CACN,IAAMC,IAAWC,EAAKC,CAAI,GACpBC,IAAWF,EAAKG,CAAI,GACpBC,IAAiB,CAAC;CACxB,KAAK,IAAM,CAACC,GAAIC,MAAWP,GAAU;EACnC,IAAMQ,IAAQL,EAAS,IAAIG,CAAE;EAC7B,CAAIE,MAAU,KAAA,KAAaC,EAAaF,GAAQC,CAAK,MAAGH,EAAK,KAAKC,CAAE;CACtE;CACA,IAAMI,IAAWC,EAAM,eAAeN,EAAK,QAAQ,MAAOM,EAAM,IAAIL,CAAE,MAAM,KAAA,CAAS,CAAC,GAChFM,IAAU,IAAI,IAAIF,CAAQ;CAEhC,EAAM,gBAAgB;EACpB,EAAM,WAAWA,CAAQ;EACzB,KAAK,IAAMG,KAAQT,GAAM;GACvB,IAAME,IAAKO,EAAK,IACVN,IAASP,EAAS,IAAIM,CAAE;GAC9B,IAAIK,EAAM,IAAIL,CAAE,MAAM,KAAA,KAAaC,MAAW,KAAA,KAAaK,EAAQ,IAAIN,CAAE,GAAG;IAC1E,EAAM,IAAIO,CAAI;IACd;GACF;GACA,IAAMC,IAASD,EAAK,UAAU;GAK9B,AAJIC,OAAYP,EAAO,UAAU,SAAOI,EAAM,KAAKL,GAAIQ,CAAM,GACzDD,EAAK,UAAUN,EAAO,SAAOI,EAAM,SAASL,GAAIO,EAAK,KAAK,GACzDE,EAAKF,EAAK,MAAMN,EAAO,IAAI,KAAGI,EAAM,OAAOL,GAAI,EAAE,MAAMO,EAAK,KAAK,CAAC,GAClEE,EAAKF,EAAK,WAAWN,EAAO,SAAS,KAAGI,EAAM,aAAaL,GAAIO,EAAK,SAAS,GAC7EE,EAAKF,EAAK,MAAMN,EAAO,IAAI,KAAGI,EAAM,QAAQL,GAAIO,EAAK,IAAI;EAChE;CACF,CAAC;AACH;AAEA,SAASZ,EAAgC,GAAqC;CAC5E,IAAMe,oBAAM,IAAI,IAAe;CAC/B,KAAK,IAAMH,KAAQI,GAAO;EACxB,IAAIJ,EAAK,OAAO,KAAA,GAAW,MAAU,MAAM,wCAAwC;EACnF,IAAIG,EAAI,IAAIH,EAAK,EAAE,GAAG,MAAU,MAAM,uBAAuBA,EAAK,GAAG,yBAAyB;EAC9F,EAAI,IAAIA,EAAK,IAAIA,CAAI;CACvB;CACA,OAAOG;AACT;AAEA,SAASP,EACP,GACA,GACS;CACT,OAAOS,EAAE,SAASC,EAAE,QACfD,EAAE,aAAaC,EAAE,YACjBD,EAAE,eAAeC,EAAE,cACnBD,EAAE,eAAeC,EAAE,cACnBD,EAAE,iBAAiBC,EAAE,gBACrBD,EAAE,WAAWC,EAAE;AACtB;AAGA,SAASJ,EAAK,GAAY,GAAqB;CAC7C,IAAI,OAAO,GAAGG,GAAGC,CAAC,GAAG,OAAO;CAC5B,IAAI,MAAM,QAAQD,CAAC,KAAK,MAAM,QAAQC,CAAC,GACrC,OAAOD,EAAE,WAAWC,EAAE,UAAUD,EAAE,OAAO,GAAG,MAAMH,EAAKK,GAAGD,EAAEE,EAAE,CAAC;CAEjE,IAAIC,EAAcJ,CAAC,KAAKI,EAAcH,CAAC,GAAG;EACxC,IAAMI,IAAK,OAAO,KAAKL,CAAC;EACxB,OAAOK,EAAG,WAAW,OAAO,KAAKJ,CAAC,CAAC,CAAC,UAAUI,EAAG,OAAO,MAAMC,KAAKL,KAAKJ,EAAKG,EAAEM,IAAIL,EAAEK,EAAE,CAAC;CAC1F;CACA,OAAO;AACT"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { s as RenderLayer, u as Dims, w as RedrawSource, x as Scene, y as RectPose, z as InertiaConfig, V as ViewAnimationOptions, A as PoseComposition, B as PoseAdapter, N as Node$1, F as GestureLifecycleOptions, H as SliceDep, J as ToolsApi, K as Tool, L as Contribution, M as LayerHit, D as DrawCommand, O as ChromeState, Q as VertexColorChannel, U as LayerGroup, X as InsertExtras, Y as SerializedScene, Z as GeometryProjection, _ as ContentHandlerEntry, $ as SvgIngestOptions, a0 as AnyTool, a1 as PanBounds, a2 as Animator, a3 as ColorOverrideRegistry, a4 as UseSceneOptions, a5 as SceneRegistry, a6 as RegisteredOp, a7 as PoseOverrides, a8 as DerivePoseFn, a9 as DerivePathFn, aa as DerivedDep, ab as ViewportDims, P as PathDrawCommand, ac as ViewApi, ad as Affordance, ae as AffordanceRegion, af as AffordanceBinding, ag as CommonAffordanceScratch, T as TextDrawCommand, ah as BooleansAdapter, ai as CreateOutlinesAdapter, aj as UseAnimatorOptions, ak as AnimationHandle, al as SampledTrack, am as SceneArrivalHandler } from './builtins-CQcvcLXh.js';
2
- export { an as AddLayerSpec, ao as AddNodeSpec, ap as AnimateToBoundsOptions, aq as AnimationInfo, ar as AnimationKind, as as AnimatorEvent, at as AnimatorListener, au as AreaSelectDep, av as BooleanOp, aw as BooleanOpResult, ax as ClipFromPoseFn, ay as ClipboardDep, az as ClipboardIngestCtx, aA as ColorOverride, aB as ColorOverrideFn, aC as ContainerNode, aD as ContributionChrome, aE as CreateOutlinesResult, C as CullRect, aF as CustomPaintContext, aG as DecayLoopConfig, aH as DecayOptions, aI as EditAnchorsDep, E as Effect, aJ as EventBooking, aK as EventBookingHandle, aL as EventTrack, aM as FitViewToBoundsOptions, G as GroupDrawCommand, aN as HitTestView, aO as IDENTITY_POSE_COMPOSITION, a as ImageDrawCommand, b as ImageMinification, aP as IngestCtx, aQ as IngestionDep, aR as InsertDep, aS as Interpolate, aT as InterpolatorFactory, aU as Keyframe, aV as LassoSelectDep, aW as LayerCommandCache, aX as LayerDrawFailure, aY as LayerDrawSpan, aZ as LayerRecord, a_ as LayoutDep, a$ as LayoutFrame, b0 as LayoutMove, b1 as LeafNode, b2 as LiveAnimation, b3 as LoopFactory, b4 as LoopOptions, b5 as NestedTimeline, b6 as NodeAtPointDep, b7 as OutlinePathSpec, b8 as Overlay, b9 as PathInWorldPose, ba as PhysicsHandle, bb as PhysicsOptions, bc as PointerContextProvider, bd as PointerContextValue, be as PointerWorldPos, bf as PoseClosure, bg as PoseOverride, f as RenderTarget, bh as ResizePolicy, S as SPRITE_STRIDE, bi as SerializedLayer, bj as SerializedNode, g as ShaderDrawCommand, bk as SnapDep, bl as SpringOptions, i as SpriteSheet, j as SpritesDrawCommand, bm as StaggerBuilder, bn as StaggerDelay, bo as StaggerFactory, bp as StaggerOptions, bq as StaggerPerItem, br as StaggerSpringPoseOptions, bs as StaggerTweenOptions, bt as SvgUnpacker, bu as SystemLayerRecord, bv as SystemLayerSpec, bw as TextEditDep, bx as TextNodeSource, by as TextOutlineSource, bz as TextOutlinesError, bA as TextOutlinesFailure, bB as TextPaintPath, bC as TextToPathOptions, bD as TimelineClock, bE as TimelineEvent, bF as TimelineHandle, bG as TimelineOptions, bH as TimelineTrack, bI as ToolDef, bJ as Track, bK as TweenLoopOptions, bL as TweenOptions, bM as UseToolsOptions, bN as UserLayerRecord, bO as VIEW_ANIMATION_KEY, bP as ViewAnimationApi, bQ as ViewChannel, bR as applyBooleanOp, bS as applyCreateOutlines, bT as asNodeId, m as blur, bU as composeWorldPose, bV as createPointerStore, o as cullDrawCommands, bW as depsUnchanged, bX as drawLayers, bY as drawOneLayer, bZ as fitViewToBounds, p as frameRect, b_ as isLayerPainted, b$ as isLayerVisible, c0 as loadTextOutlines, c1 as pathInPoseFrame, c2 as pathInWorld, c3 as rebaseLocalPose, c4 as registerContentHandler, r as registerEffect, c5 as resolveStrokeWidth, c6 as subscribeToSources, c7 as textToPath, c8 as textToPathsByPaint, c9 as useDecayLoop, ca as usePointerContext, cb as usePointerPosition, cc as useTools, cd as useViewAnimation, ce as useViewAnimationOn, v as viewToMat3, q as vignette, cf as worldEditToStorage } from './builtins-CQcvcLXh.js';
1
+ import { s as RenderLayer, u as Dims, w as RedrawSource, x as Scene, y as RectPose, z as InertiaConfig, V as ViewAnimationOptions, A as PoseComposition, B as PoseAdapter, N as Node$1, F as GestureLifecycleOptions, H as SliceDep, J as ToolsApi, K as Tool, L as Contribution, M as LayerHit, D as DrawCommand, O as ChromeState, Q as VertexColorChannel, U as LayerGroup, X as InsertExtras, Y as SerializedScene, Z as GeometryProjection, _ as ContentHandlerEntry, $ as SvgIngestOptions, a0 as AnyTool, a1 as PanBounds, a2 as Animator, a3 as ColorOverrideRegistry, a4 as UseSceneOptions, a5 as SceneRegistry, a6 as RegisteredOp, a7 as PoseOverrides, a8 as AddNodeSpec, a9 as DerivePoseFn, aa as DerivePathFn, ab as DerivedDep, ac as ViewportDims, P as PathDrawCommand, ad as ViewApi, ae as Affordance, af as AffordanceRegion, ag as AffordanceBinding, ah as CommonAffordanceScratch, T as TextDrawCommand, ai as BooleansAdapter, aj as CreateOutlinesAdapter, ak as UseAnimatorOptions, al as AnimationHandle, am as SampledTrack, an as SceneArrivalHandler } from './builtins-C-VgUlWI.js';
2
+ export { ao as AddLayerSpec, ap as AnimateToBoundsOptions, aq as AnimationInfo, ar as AnimationKind, as as AnimatorEvent, at as AnimatorListener, au as AreaSelectDep, av as BooleanOp, aw as BooleanOpResult, ax as ClipFromPoseFn, ay as ClipboardDep, az as ClipboardIngestCtx, aA as ColorOverride, aB as ColorOverrideFn, aC as ContainerNode, aD as ContributionChrome, aE as CreateOutlinesResult, C as CullRect, aF as CustomPaintContext, aG as DecayLoopConfig, aH as DecayOptions, aI as EditAnchorsDep, E as Effect, aJ as EventBooking, aK as EventBookingHandle, aL as EventTrack, aM as FitViewToBoundsOptions, G as GroupDrawCommand, aN as HitTestView, aO as IDENTITY_POSE_COMPOSITION, a as ImageDrawCommand, b as ImageMinification, aP as IngestCtx, aQ as IngestionDep, aR as InsertDep, aS as Interpolate, aT as InterpolatorFactory, aU as Keyframe, aV as LassoSelectDep, aW as LayerCommandCache, aX as LayerDrawFailure, aY as LayerDrawSpan, aZ as LayerRecord, a_ as LayoutDep, a$ as LayoutFrame, b0 as LayoutMove, b1 as LeafNode, b2 as LiveAnimation, b3 as LoopFactory, b4 as LoopOptions, b5 as NestedTimeline, b6 as NodeAtPointDep, b7 as OutlinePathSpec, b8 as Overlay, b9 as PathInWorldPose, ba as PhysicsHandle, bb as PhysicsOptions, bc as PointerContextProvider, bd as PointerContextValue, be as PointerWorldPos, bf as PoseClosure, bg as PoseOverride, f as RenderTarget, bh as ResizePolicy, S as SPRITE_STRIDE, bi as SerializedLayer, bj as SerializedNode, g as ShaderDrawCommand, bk as SnapDep, bl as SpringOptions, i as SpriteSheet, j as SpritesDrawCommand, bm as StaggerBuilder, bn as StaggerDelay, bo as StaggerFactory, bp as StaggerOptions, bq as StaggerPerItem, br as StaggerSpringPoseOptions, bs as StaggerTweenOptions, bt as SvgUnpacker, bu as SystemLayerRecord, bv as SystemLayerSpec, bw as TextEditDep, bx as TextNodeSource, by as TextOutlineSource, bz as TextOutlinesError, bA as TextOutlinesFailure, bB as TextPaintPath, bC as TextToPathOptions, bD as TimelineClock, bE as TimelineEvent, bF as TimelineHandle, bG as TimelineOptions, bH as TimelineTrack, bI as ToolDef, bJ as Track, bK as TweenLoopOptions, bL as TweenOptions, bM as UseToolsOptions, bN as UserLayerRecord, bO as VIEW_ANIMATION_KEY, bP as ViewAnimationApi, bQ as ViewChannel, bR as applyBooleanOp, bS as applyCreateOutlines, bT as asNodeId, m as blur, bU as composeWorldPose, bV as createPointerStore, o as cullDrawCommands, bW as depsUnchanged, bX as drawLayers, bY as drawOneLayer, bZ as fitViewToBounds, p as frameRect, b_ as isLayerPainted, b$ as isLayerVisible, c0 as loadTextOutlines, c1 as pathInPoseFrame, c2 as pathInWorld, c3 as rebaseLocalPose, c4 as registerContentHandler, r as registerEffect, c5 as resolveStrokeWidth, c6 as subscribeToSources, c7 as textToPath, c8 as textToPathsByPaint, c9 as useDecayLoop, ca as usePointerContext, cb as usePointerPosition, cc as useTools, cd as useViewAnimation, ce as useViewAnimationOn, v as viewToMat3, q as vignette, cf as worldEditToStorage } from './builtins-C-VgUlWI.js';
3
3
  import { View as View$1, NodeId, PointerSessionCancelReason, DeviceProfile, Bounds, Action, ActionDeps, AffordanceHit, SelectionMode, SelectionExtendKey, SelectionApi, DepSchema, GestureBinding, ToolKeybinding, HotkeyTrigger, ModifierState, RuleCtx, Rule, DebugSink, HitShape, HandleKind, ViewportGestureKind, IngestItem, OngoingOverlay, DepName, ActionsProp, OverlayRole, ResizeAnchor } from '@weasel-js/routing';
4
4
  export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDispatch, ActionEnabledResult, ActionEntry, ActionItem, ActionPresentation, ActionVariant, ActionsProp, ActionsRegistry, AffordanceHit, BindingOpts, BindingScope, BindingSource, BoundGesture, Bounds, BuildRuleCtxArgs, COARSE_TARGET_SCALE, CONTROL_SELECTOR, ContributionDeps, ContributionRouting, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DRAG_THRESHOLD_PX, DebugSink, DepName, DepRegistry, DepSchema, DetectedDeviceFacts, DeviceProfile, DispatchRecord, DispatchRecordInput, Dispatcher, DispatcherContext, DragSample, DroppedCandidate, Eligibility, EligibilityState, GestureBinding, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, IngestItem, InputEvent, InvocationCtx, Invoker, KeyBinding, LONG_PRESS_MS, LongPressOptions, LongPressState, LongPressStore, MatchResult, ModeShortcutHandlers, ModifierState, NEVER, NodeId, OngoingHandle, OngoingInvoker, OngoingOverlay, OverlayPosition, OverlayRole, PendingLongPress, PlacedBy, Point2, PointerSession, PointerSessionCallbacks, PointerSessionCancelReason, PointerSessionOptions, RankedCandidate, RecordCandidate, ResizeAnchor, ResolveAllOptions, ResolveOnlyResult, ResolvedCandidate, Rule, RuleCtx, ScopedBinding, ScratchKey, ScratchStore, SelectionApi, SelectionExtendKey, SelectionMode, Selector, SpecificityPart, ToolCtx, ToolKeybinding, ToolLifecycleCtx, ToolModifiers, ToolPresentation, ToolSlot, UiOngoingControl, Point2 as Vec2, View, ViewportGestureKind, WalkStep, actionBindings, actionItems, buildDepsFromRequires, buildRuleCtx, clientToCanvas, createDepRegistry, createDispatcher, createLongPressStore, defineTool, deleteScratch, describeRule, evaluate, evaluateEnabled, getScratch, isEditableTarget, isInControlWithin, liveScope, matchesKeyBinding, modeShortcutSpec, modeShortcuts, openPointerSession, pastDragThreshold, resolveDeviceProfile, resolveParams, scopeBindings, scratchKey, setScratch, specificity } from '@weasel-js/routing';
5
5
  import { a as ParallaxOpts, L as LayoutStrategy, M as MoveAdapter, A as AreaSelectAdapter, e as LayerEnumerableAdapter, f as LassoHitMode, g as LassoSelectAdapter, h as ResizeAdapter, i as RotateAdapter, I as InsertAdapter, j as ClipboardSnapshot, c as LayoutDropTargetMode, d as ReflowTransition, O as OrderedAdapter, P as PlaneMap, b as SceneAdapter } from './types-A37hYkeR.js';
@@ -7514,6 +7514,22 @@ declare function createPoseOverrides<TPose>(getNode: (id: NodeId) => {
7514
7514
  data?: unknown;
7515
7515
  } | undefined, onInvalidate?: (id: NodeId) => void): PoseOverrides<TPose>;
7516
7516
 
7517
+ /**
7518
+ * Bring `scene` from `prev` to `next`: add what `next` gained, remove what it
7519
+ * lost, and write only the fields that changed between the two.
7520
+ *
7521
+ * The diff is spec against spec, not spec against scene, so whatever the scene
7522
+ * did since `prev` — a node dragged, an edge authored by a gesture — survives
7523
+ * unless `next` changes that same field. The writes are untracked: syncing to
7524
+ * outside data is not an undo step.
7525
+ *
7526
+ * Every spec needs an `id`, and `next` must be in an order `createScene` would
7527
+ * accept — parents and dependencies before what names them. A node whose
7528
+ * `kind` or derive functions change is removed and added again, along with
7529
+ * everything its removal takes with it.
7530
+ */
7531
+ declare function reconcileSpecs<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, prev: readonly AddNodeSpec<TData, TLayer, TPose>[], next: readonly AddNodeSpec<TData, TLayer, TPose>[]): void;
7532
+
7517
7533
  /**
7518
7534
  * Thrown by a scene edit — `batch`, `untracked`, or a bare `add` / `move` —
7519
7535
  * whose arrivals the scene's arrival handler refused. The edit has already
@@ -11515,9 +11531,10 @@ declare function solidVertexColors(n: number, r: number, g: number, b: number, a
11515
11531
  * Sample a track at `t`. Pure: no state, no side effects, safe to call for any
11516
11532
  * `t` in any order — which is what makes scrubbing free.
11517
11533
  *
11518
- * `segmentCache` memoizes `interpolator` factories by the index of the segment's
11519
- * later key. Callers that mutate keys must drop the cache; `createTimeline`
11520
- * drops it wholesale on `edit`.
11534
+ * `segmentCache` holds what sampling builds from the keys: the track's blits
11535
+ * patch and its `interpolator` factories. Handed another track or a replaced
11536
+ * `keys` array, it rebuilds; a key edited in place needs the cache dropped,
11537
+ * which `createTimeline` does on `edit`. With no cache, every call builds afresh.
11521
11538
  */
11522
11539
  declare function sampleTrack<T>(track: SampledTrack<T>, t: number, segmentCache?: Map<number, (u: number) => T>): T | undefined;
11523
11540
 
@@ -12128,4 +12145,4 @@ interface InsertOverlayStyle {
12128
12145
  lineWidth?: number;
12129
12146
  }
12130
12147
 
12131
- export { ACTION_GLYPHS, ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, type ActionGlyphProps, type ActionShortcut, ActionsProviderIfRoot, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, type AlignEdge, AlignLeftIcon, type AlignReference, AlignRightIcon, AlignTopIcon, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUILTIN_TOOL_IDS, type BaseFeature, type BindRigOptions, BooleansAdapter, BoundsConstraint, BringForwardIcon, BringToFrontIcon, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COMPOSITE_FEATURES, CROSSHAIR_HALO, type CanvasDebugSink, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type ChromeCtx, type ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type CompositeFeature, type ComputeFitViewOptions, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, Contribution, type ContributionDepReader, type ContributionFrameCtx, CopyIcon, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, CreateOutlinesAdapter, CreateOutlinesIcon, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateTiledLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, type CrosshairRect, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, CutIcon, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, type DebugConfig, type DebugFeature, type DebugSnapshot, type DebugStroke, type DebugStrokes, type DebugTheme, type DefaultTextData, type DeleteArgs, DeleteIcon, DepRegistryProviderIfRoot, DerivePathFn, DerivePoseFn, DerivedDep, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type DistributeAdapter, type DistributeAxis, DistributeHorizontalIcon, type DistributeMode, DistributeVerticalIcon, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, DrawCommand, type DropZoneOptions, DuplicateIcon, type EditedLayerOf, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, FEATURE_ACTION_IDS, type Feature, type FeedDelta, type FeedNode, type FitTextPoseOptions, type FlagKey, type FlipAxis, type FlipPivot, FlipXIcon, FlipYIcon, type FrameStats, GHOST_STROKE, type GateLayerOptions, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, GlMat3, GroupIcon, HANDLE_BASE_PX, HandIcon, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, IDENTITY_JOINT, type IconProps, type IkLimit, type IkPoint, type IkResult, ImageIcon, type ImageNodeData, type ImageRasterSize, type ImageStatus, type IndicatorStyle, InertiaConfig, InsertAdapter, type InsertArgs, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, IntersectIcon, type Joint, type JointTransform, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, type LayerFrameStats, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, type LayoutArrivalOptions, LayoutDropTargetMode, type LayoutRef, type LayoutSource, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, type LinkedCursorOptions, type LongPressFeedbackOptions, MINIMAP_CENTER, MINIMAP_PAN, MIXED, MarkerEntry, type MarkerSite, type MarkerSiteRequest, MinimapCanvas, type MinimapCanvasProps, type MinimapContributionOptions, type MinimapFit, type Mixed, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NestedHitOpts, type NestedHitTester, type NodeClientRect, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, type OpFactory, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, type OverlayVisibilityId, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBoundsFn, PaintKindEntry, PanBounds, ParallaxOpts, type ParallaxPlane, type ParallaxSource, PasteIcon, type PathAnchor, type PathAnchorAffordanceOptions, PathDrawCommand, type PathEditingOverlayStyle, type PenAnchor, type PenContinuation, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, PlaneMap, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, type PolygonPoint, type Pose, PoseAdapter, PoseComposition, PoseDescriptor, type PoseFeed, PoseOverrides, type PoseRotation, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PosedNode, type PressureToWidthOptions, type PreviewNode, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, type RecordedViewport, RectIcon, RectPose, RedoIcon, RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, type RegisterNodeShapeOptions, RegisteredOp, type RenderDebugSnapshotArgs, RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RequirementMismatch, ResizeAdapter, type ResolvableView, type ResolvedOverlay, type Rig, type RigApply, type RigApplyContext, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RunStylePatch, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SHAPE_KINDS, SampledTrack, type Scale2, Scene, SceneAdapter, type SceneAdapterSelection, SceneArrivalHandler, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScreenSlop, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SendBackwardIcon, SendToBackIcon, SerializedScene, type SetDataArgs, type SetFlagResult, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, ShaderProgramHandle, type ShapeCoversPointOptions, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type SiblingSlot, Simulation, SimulationNode, type Skeleton, type Slew, type SlewRates, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, SnapStrategy, type SolveIkOptions, type SpatialReference, type SpatialReferenceSources, type SpringPoseOptions, type SpringVertexColorsOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, type StyleKey, type StyleToggle, type StylusData, SubtractIcon, type SurfaceContribution, SvgIngestOptions, TEXT_EDIT_FONT_HOLD, TOOL_DRIVEN_ACTION_IDS, TOOL_PREF_KINDS, TextDrawCommand, type TextEditClipRect, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileBleed, type TilePatternOpts, type TilePeriod, type TileRange, Tool, type ToolPref, type ToolPrefBase, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefBooleanEncoding, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefEnumEncoding, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, ToolsApi, type TransformArgs, type TweenPoseOptions, type TweenVertexColorsOptions, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, UnknownIcon, type UseAlignOptions, type UseAlignReturn, UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, UseSimulationOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, VERSION, type VelocityTracker, type VersionCheck, VertexColorChannel, ViewAnimationOptions, ViewApi, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, ZOOM_FLOOR, type ZoomBound, type ZoomClampOpts, type ZoomFactor, actionIs, actionShortcuts, alignDeltaFor, alignTargetBounds, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, areaSelectContribution, arrayAdapter, axisAlignedBounds, bindRig, blendPoses, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, centerRootOn, charOffsetToDomPosition, checkRequirements, circlePath, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, cloneAction, coarsePointer, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeSliceOps, computeWheelAction, cond, constrainTo45, countPathAnchors, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createHistory, createInsertOp, createKeyState, createLinkedCursorContribution, createLongPressFeedbackContribution, createMinimapContribution, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createParallaxLayer, createParallaxPlane, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetLayoutOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSlew, createTextLayer, createTilePattern, createTiledLayer, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, crosshairRects, cycleFill, cycleVertexColors, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, derivedDepOf, derivedPose, dispatchApplyBatch, dlog, documentPose, domPositionToCharOffset, domToRuns, dragPanContribution, dwarn, editAnchorsAction, editingLayer, effectivePose, effectiveRangeStyle, enterTextEditAction, enumerateAnchors, findNodeShape, findShapeBounds, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenPreviews, focused, forEachCoalesced, gateLayer, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getImageBitmap, getNodeShapes, getStylusData, gradientForBounds, gradientGeometry, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inPlane, inferredNodeProperties, inferredNodeRouting, insertAction, insertLayer, insertPreviewExtent, interpolateView, isBuiltinToolPref, isDebugEnabled, isGradientFill, isPatternSpec, isPlainObject, isVectorImageSrc, keySpecShortcut, lassoSelectAction, layoutArrivalHandler, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerInset, markerKeyOf, markerSites, meanScale, mergeAlphaFromPrev, mergeContributions, minimapCenterAction, minimapPanAction, mirrorPose, modeDecorationLayer, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nestedHitTester, never, nodeHasFlag, normalizeHex, normalizeView, normalizeZoom, not, onEmptyCanvas, opFactoryRegistry, openFilePicker, or, paintAlpha, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, patchRangeStyle, pathOriginProjection, pathPoseDescriptor, pathToAnchors, pickTopMostHit, pinchZoomAction, planPixelRender, pointInTextPose, pointRegionFrame, poseRotationOf, prefUnit, pressureToWidth, pxExtent, rainbowVertexColors, rangeWeight, rasterToPng, rebuildOp, rectMarkerPath, registerNodeShape, registerOpFactory, registeredOpNames, releaseCanvasRenderer, renderDebugSnapshot, renderLabel, renderNeeds, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolvePatternSpec, resolvePreviews, resolveSkeleton, resolveSpatialReference, resolveVisibility, rgbaToHex, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotationDegreesUnit, rotationHandle, roundRectPath, runsToDom, sampleGradientStops, sampleTrack, satisfiesRange, scaleDelta, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, screenAngleOf, screenToWorld, screenTolerance, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setFlagOverRange, shapeCoversPoint, slewToward, sliceAction, snap, solid, solidVertexColors, solveIk, springPose, springVertexColors, squarePath, stableStringify, staggerVertexColors, standoff, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, tiledProject, toHex8, translateRectPose, tweenPose, tweenVertexColors, unboldPatch, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, useAlign, useAnimatedReflow, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGradientKinds, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyState, useKeybindings, useLassoTool, useLayoutArrivals, useLineTool, useNodeOverlayFrame, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRig, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useSliceDepSource, useSliceTool, useStandardActions, useStarTool, useTextEdit, useTextTool, useVelocityTracker, useVisibleRaf, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, warmRender, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, workspaceTintLayer, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast };
12148
+ export { ACTION_GLYPHS, ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, type ActionGlyphProps, type ActionShortcut, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, type AlignEdge, AlignLeftIcon, type AlignReference, AlignRightIcon, AlignTopIcon, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUILTIN_TOOL_IDS, type BaseFeature, type BindRigOptions, BooleansAdapter, BoundsConstraint, BringForwardIcon, BringToFrontIcon, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COMPOSITE_FEATURES, CROSSHAIR_HALO, type CanvasDebugSink, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type ChromeCtx, type ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type CompositeFeature, type ComputeFitViewOptions, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, Contribution, type ContributionDepReader, type ContributionFrameCtx, CopyIcon, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, CreateOutlinesAdapter, CreateOutlinesIcon, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateTiledLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, type CrosshairRect, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, CutIcon, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, type DebugConfig, type DebugFeature, type DebugSnapshot, type DebugStroke, type DebugStrokes, type DebugTheme, type DefaultTextData, type DeleteArgs, DeleteIcon, DepRegistryProviderIfRoot, DerivePathFn, DerivePoseFn, DerivedDep, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type DistributeAdapter, type DistributeAxis, DistributeHorizontalIcon, type DistributeMode, DistributeVerticalIcon, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, DrawCommand, type DropZoneOptions, DuplicateIcon, type EditedLayerOf, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, FEATURE_ACTION_IDS, type Feature, type FeedDelta, type FeedNode, type FitTextPoseOptions, type FlagKey, type FlipAxis, type FlipPivot, FlipXIcon, FlipYIcon, type FrameStats, GHOST_STROKE, type GateLayerOptions, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, GlMat3, GroupIcon, HANDLE_BASE_PX, HandIcon, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, IDENTITY_JOINT, type IconProps, type IkLimit, type IkPoint, type IkResult, ImageIcon, type ImageNodeData, type ImageRasterSize, type ImageStatus, type IndicatorStyle, InertiaConfig, InsertAdapter, type InsertArgs, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, IntersectIcon, type Joint, type JointTransform, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, type LayerFrameStats, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, type LayoutArrivalOptions, LayoutDropTargetMode, type LayoutRef, type LayoutSource, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, type LinkedCursorOptions, type LongPressFeedbackOptions, MINIMAP_CENTER, MINIMAP_PAN, MIXED, MarkerEntry, type MarkerSite, type MarkerSiteRequest, MinimapCanvas, type MinimapCanvasProps, type MinimapContributionOptions, type MinimapFit, type Mixed, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NestedHitOpts, type NestedHitTester, type NodeClientRect, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, type OpFactory, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, type OverlayVisibilityId, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBoundsFn, PaintKindEntry, PanBounds, ParallaxOpts, type ParallaxPlane, type ParallaxSource, PasteIcon, type PathAnchor, type PathAnchorAffordanceOptions, PathDrawCommand, type PathEditingOverlayStyle, type PenAnchor, type PenContinuation, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, PlaneMap, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, type PolygonPoint, type Pose, PoseAdapter, PoseComposition, PoseDescriptor, type PoseFeed, PoseOverrides, type PoseRotation, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PosedNode, type PressureToWidthOptions, type PreviewNode, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, type RecordedViewport, RectIcon, RectPose, RedoIcon, RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, type RegisterNodeShapeOptions, RegisteredOp, type RenderDebugSnapshotArgs, RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RequirementMismatch, ResizeAdapter, type ResolvableView, type ResolvedOverlay, type Rig, type RigApply, type RigApplyContext, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RunStylePatch, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SHAPE_KINDS, SampledTrack, type Scale2, Scene, SceneAdapter, type SceneAdapterSelection, SceneArrivalHandler, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScreenSlop, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SendBackwardIcon, SendToBackIcon, SerializedScene, type SetDataArgs, type SetFlagResult, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, ShaderProgramHandle, type ShapeCoversPointOptions, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type SiblingSlot, Simulation, SimulationNode, type Skeleton, type Slew, type SlewRates, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, SnapStrategy, type SolveIkOptions, type SpatialReference, type SpatialReferenceSources, type SpringPoseOptions, type SpringVertexColorsOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, type StyleKey, type StyleToggle, type StylusData, SubtractIcon, type SurfaceContribution, SvgIngestOptions, TEXT_EDIT_FONT_HOLD, TOOL_DRIVEN_ACTION_IDS, TOOL_PREF_KINDS, TextDrawCommand, type TextEditClipRect, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileBleed, type TilePatternOpts, type TilePeriod, type TileRange, Tool, type ToolPref, type ToolPrefBase, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefBooleanEncoding, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefEnumEncoding, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, ToolsApi, type TransformArgs, type TweenPoseOptions, type TweenVertexColorsOptions, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, UnknownIcon, type UseAlignOptions, type UseAlignReturn, UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, UseSimulationOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, VERSION, type VelocityTracker, type VersionCheck, VertexColorChannel, ViewAnimationOptions, ViewApi, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, ZOOM_FLOOR, type ZoomBound, type ZoomClampOpts, type ZoomFactor, actionIs, actionShortcuts, alignDeltaFor, alignTargetBounds, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, areaSelectContribution, arrayAdapter, axisAlignedBounds, bindRig, blendPoses, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, centerRootOn, charOffsetToDomPosition, checkRequirements, circlePath, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, cloneAction, coarsePointer, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeSliceOps, computeWheelAction, cond, constrainTo45, countPathAnchors, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createHistory, createInsertOp, createKeyState, createLinkedCursorContribution, createLongPressFeedbackContribution, createMinimapContribution, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createParallaxLayer, createParallaxPlane, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetLayoutOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSlew, createTextLayer, createTilePattern, createTiledLayer, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, crosshairRects, cycleFill, cycleVertexColors, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, derivedDepOf, derivedPose, dispatchApplyBatch, dlog, documentPose, domPositionToCharOffset, domToRuns, dragPanContribution, dwarn, editAnchorsAction, editingLayer, effectivePose, effectiveRangeStyle, enterTextEditAction, enumerateAnchors, findNodeShape, findShapeBounds, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenPreviews, focused, forEachCoalesced, gateLayer, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getImageBitmap, getNodeShapes, getStylusData, gradientForBounds, gradientGeometry, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inPlane, inferredNodeProperties, inferredNodeRouting, insertAction, insertLayer, insertPreviewExtent, interpolateView, isBuiltinToolPref, isDebugEnabled, isGradientFill, isPatternSpec, isPlainObject, isVectorImageSrc, keySpecShortcut, lassoSelectAction, layoutArrivalHandler, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerInset, markerKeyOf, markerSites, meanScale, mergeAlphaFromPrev, mergeContributions, minimapCenterAction, minimapPanAction, mirrorPose, modeDecorationLayer, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nestedHitTester, never, nodeHasFlag, normalizeHex, normalizeView, normalizeZoom, not, onEmptyCanvas, opFactoryRegistry, openFilePicker, or, paintAlpha, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, patchRangeStyle, pathOriginProjection, pathPoseDescriptor, pathToAnchors, pickTopMostHit, pinchZoomAction, planPixelRender, pointInTextPose, pointRegionFrame, poseRotationOf, prefUnit, pressureToWidth, pxExtent, rainbowVertexColors, rangeWeight, rasterToPng, rebuildOp, reconcileSpecs, rectMarkerPath, registerNodeShape, registerOpFactory, registeredOpNames, releaseCanvasRenderer, renderDebugSnapshot, renderLabel, renderNeeds, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolvePatternSpec, resolvePreviews, resolveSkeleton, resolveSpatialReference, resolveVisibility, rgbaToHex, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotationDegreesUnit, rotationHandle, roundRectPath, runsToDom, sampleGradientStops, sampleTrack, satisfiesRange, scaleDelta, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, screenAngleOf, screenToWorld, screenTolerance, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setFlagOverRange, shapeCoversPoint, slewToward, sliceAction, snap, solid, solidVertexColors, solveIk, springPose, springVertexColors, squarePath, stableStringify, staggerVertexColors, standoff, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, tiledProject, toHex8, translateRectPose, tweenPose, tweenVertexColors, unboldPatch, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, useAlign, useAnimatedReflow, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGradientKinds, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyState, useKeybindings, useLassoTool, useLayoutArrivals, useLineTool, useNodeOverlayFrame, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRig, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useSliceDepSource, useSliceTool, useStandardActions, useStarTool, useTextEdit, useTextTool, useVelocityTracker, useVisibleRaf, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, warmRender, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, workspaceTintLayer, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast };
package/dist/index.js CHANGED
@@ -233,81 +233,82 @@ import { DrawCanvas as kc } from "./canvas/DrawCanvas.js";
233
233
  import { MINIMAP_CENTER as Ac, MINIMAP_PAN as jc, centerRootOn as Mc, minimapCenterAction as Nc, minimapPanAction as Pc } from "./features/minimap/actions.js";
234
234
  import { CROSSHAIR_HALO as Fc, crosshairRects as Ic } from "./features/minimap/layers.js";
235
235
  import { useScene as Lc } from "./core/scene/useScene.js";
236
- import { createPoseFeed as Rc } from "./core/scene/poseFeed.js";
237
- import { FALLBACK_FIT_VIEW as zc, computeFitView as Bc, computeIndicatorCommand as Vc } from "./canvas/minimapMath.js";
238
- import { MinimapCanvas as Hc } from "./canvas/MinimapCanvas.js";
239
- import { createLinkedCursorContribution as Uc, createMinimapContribution as Wc } from "./features/minimap/createMinimapContribution.js";
240
- import { renderNeeds as Gc } from "./canvas/renderNeeds.js";
241
- import { createRasterSession as Kc, planPixelRender as qc, renderSceneToPixels as Jc, warmRender as Yc } from "./canvas/renderSceneToPixels.js";
242
- import { debugSnapshotArgs as Xc, renderDebugSnapshot as Zc } from "./canvas/renderDebugSnapshot.js";
243
- import { rasterToPng as Qc } from "./canvas/rasterToPng.js";
244
- import { ActionsProviderIfRoot as $c } from "./canvas/SceneCanvas/ActionsProviderIfRoot.js";
245
- import { DepRegistryProviderIfRoot as el } from "./canvas/SceneCanvas/DepRegistryProviderIfRoot.js";
246
- import { WeaselProvider as tl } from "./WeaselProvider.js";
247
- import { useCanvasFocus as nl } from "./features/focus/useCanvasFocus.js";
248
- import { gateLayer as rl } from "./features/focus/gateLayer.js";
249
- import { modeDecorationLayer as il, workspaceTintLayer as al } from "./features/modes/modeLayers.js";
250
- import { createChildrenLayer as ol } from "./features/groups/children.js";
251
- import { composeAffordanceLayer as sl } from "./affordances/composeAffordanceLayer.js";
252
- import { defaultLabelTextRenderer as cl, renderLabel as ll } from "./features/text/renderLabel.js";
253
- import { createTextLayer as ul } from "./features/text/textLayer.js";
254
- import { caretIndexAt as dl, pointInTextPose as fl } from "./features/text/hitTest.js";
255
- import { fitTextPose as pl } from "./features/text/fitTextPose.js";
256
- import { charOffsetToDomPosition as ml, domPositionToCharOffset as hl, domToRuns as gl, runsToDom as _l } from "./features/text/domRuns.js";
257
- import { MIXED as vl } from "./core/mixed.js";
258
- import { applyStyleToRange as yl, patchRangeStyle as bl, styleAtRange as xl } from "./features/text/runs/rangeStyle.js";
259
- import { nodeHasFlag as Sl, setFlagOverRange as Cl, unboldPatch as wl } from "./features/text/runs/flagRange.js";
260
- import { effectiveRangeStyle as Tl, rangeWeight as El } from "./features/text/runs/effectiveRangeStyle.js";
261
- import { TEXT_EDIT_FONT_HOLD as Dl, useTextEdit as Ol } from "./features/text/useTextEdit.js";
262
- import { useSceneTextEdit as kl } from "./features/text/useSceneTextEdit.js";
263
- import { createSetTextOp as Al } from "./core/ops/setText.js";
264
- import { createSetLayerOp as jl } from "./core/ops/setLayer.js";
265
- import { createSetLayoutOp as Ml } from "./core/ops/setLayout.js";
266
- import { createSetPathOp as Nl } from "./core/ops/setPath.js";
267
- import { nestedHitTester as Pl } from "./features/groups/nestedHit.js";
268
- import { unionOfChildrenVia as Fl } from "./features/groups/unionOfChildren.js";
269
- import { createPathLayer as Il } from "./features/paths/pathLayer.js";
270
- import { pathOriginProjection as Ll } from "./features/paths/originProjection.js";
271
- import { DEFAULT_FLATTEN_TOLERANCE as Rl, PATH_C as zl, PATH_CMD_LENGTHS as Bl, PATH_L as Vl, PATH_M as Hl, PATH_Q as Ul, PATH_Z as Wl, PathBuilder as Gl, boundsOfPath as Kl, composePath as ql, decomposePath as Jl, ellipsePath as Yl, flattenCubic as Xl, flattenCubicWithArcLen as Zl, flattenQuadratic as Ql, flattenQuadraticWithArcLen as $l, linePath as eu, pathCommandCoordCount as tu, pathContainsPoint as nu, pathContainsPolygon as ru, pathContainsRect as iu, pathDistanceToPoint as au, pathFromD as ou, pathIntersectsPolygon as su, pathIntersectsRect as cu, pathSignedArea as lu, pointAlongPath as uu, pointInPath as du, polygonFromPoints as fu, polylineFromPoints as pu, rectPath as mu, regularPolygonPath as hu, reversePath as gu, scalePathToBounds as _u, snipPathByPolyline as vu, splitPathByPolyline as yu, splitPathBySegment as bu, splitSubpaths as xu, starPath as Su, transformPath as Cu, translatePath as wu, unionBoundsPath as Tu } from "./features/paths/index.js";
272
- import { useGradientKinds as Eu, usePaintKind as Du, usePaintKinds as Ou } from "./core/usePaintKinds.js";
273
- import { createHistory as ku } from "./core/ops/createHistory.js";
274
- import { arrayAdapter as Au } from "./core/adapters/arrayAdapter.js";
275
- import { useArrayAdapter as ju } from "./core/adapters/useArrayAdapter.js";
276
- import { useDragGesture as Mu } from "./interactions/gestures/dragGesture/dragGesture.js";
277
- import { useDragRect as Nu } from "./interactions/gestures/dragRect/dragRect.js";
278
- import { useDragRadial as Pu } from "./interactions/gestures/dragRadial/dragRadial.js";
279
- import { hitAnchor as Fu } from "./interactions/actions/edit-anchors/handles.js";
280
- import { useClipboardOps as Iu } from "./interactions/actions/clipboard/clipboardOps.js";
281
- import { useDistribute as Lu } from "./interactions/actions/distribute/distribute.js";
282
- import { cloneByAltDrag as Ru } from "./interactions/actions/clone/behaviors/cloneByAltDrag.js";
283
- import { useBooleans as zu } from "./interactions/actions/booleans/useBooleans.js";
284
- import { useBooleansAdapter as Bu } from "./interactions/actions/booleans/useBooleansAdapter.js";
285
- import { useCreateOutlinesAdapter as Vu } from "./interactions/actions/outlines/useCreateOutlinesAdapter.js";
286
- import { animateOnSetPose as Hu } from "./animation/wrappers/animateOnSetPose.js";
287
- import { animateLifecycle as Uu } from "./animation/wrappers/animateLifecycle.js";
288
- import { createReflowTransition as Wu, useAnimatedReflow as Gu } from "./animation/reflow.js";
289
- import { momentum as Ku } from "./animation/behaviors/momentum.js";
290
- import { createSlew as qu, slewToward as Ju } from "./animation/slew.js";
291
- import { cycleVertexColors as Yu, rainbowVertexColors as Xu, solidVertexColors as Zu, springVertexColors as Qu, staggerVertexColors as $u, tweenVertexColors as ed } from "./animation/colorHelpers.js";
292
- import { IDENTITY_JOINT as td } from "./animation/rig/types.js";
293
- import { blendPoses as nd } from "./animation/rig/blendPoses.js";
294
- import { mirrorPose as rd } from "./animation/rig/mirrorPose.js";
295
- import { resolveSkeleton as id } from "./animation/rig/resolveSkeleton.js";
296
- import { bindRig as ad, rigidRigApply as od } from "./animation/rig/bindRig.js";
297
- import { solveIk as sd } from "./animation/rig/solveIk.js";
298
- import { useRig as cd } from "./animation/rig/useRig.js";
299
- import { EASINGS as ld, SPRING_PRESETS as ud, cubicBezierEasing as dd, easeIn as fd, easeInBack as pd, easeInBounce as md, easeInCirc as hd, easeInCubic as gd, easeInElastic as _d, easeInExpo as vd, easeInOut as yd, easeInOutBack as bd, easeInOutBounce as xd, easeInOutCirc as Sd, easeInOutCubic as Cd, easeInOutElastic as wd, easeInOutExpo as Td, easeInOutQuad as Ed, easeInOutQuart as Dd, easeInOutQuint as Od, easeInOutSine as kd, easeInQuad as Ad, easeInQuart as jd, easeInQuint as Md, easeInSine as Nd, easeOut as Pd, easeOutBack as Fd, easeOutBounce as Id, easeOutCirc as Ld, easeOutCubic as Rd, easeOutElastic as zd, easeOutExpo as Bd, easeOutQuad as Vd, easeOutQuart as Hd, easeOutQuint as Ud, easeOutSine as Wd, hexToOklchDeg as Gd, hslToSrgb as Kd, interpolateSrgb as qd, lerpColorArray as Jd, lerpOklab as Yd, lerpOklch as Xd, linear as Zd, linearSrgbToOklab as Qd, linearToSrgb as $d, oklabToLinearSrgb as ef, oklabToOklch as tf, oklabToSrgbU8 as nf, oklchDegToHex as rf, oklchToOklab as af, resolveEasing as of, srgbFloatToOklab as sf, srgbToHsl as cf, srgbToLinear as lf, srgbU8ToOklab as uf } from "./animation/index.js";
300
- import { mergeContributions as df } from "./canvas/surfaceContribution.js";
301
- import { canQueryLocalFonts as ff, cssFontFamily as pf, cssFontFamilyLoading as mf, enableLocalFontOutlines as hf, fontOutlineRegistry as gf, fontRegistry as _f, hasFontOutlines as vf, isCanvasFont as yf, listFontOutlines as bf, loadFontOutlines as xf, outlineStatus as Sf, registerCanvasFont as Cf, registerFont as wf, registerFontOutlines as Tf, subscribeGlyphReady as Ef, unregisterCanvasFont as Df, unregisterFontOutlines as Of, warmFonts as kf } from "@weasel-js/font";
302
- import { STROKE_DASH_RATIOS as Af, alignedStrokeRect as jf, composePatternTransform as Mf, contrastLineColor as Nf, dashForStrokeStyle as Pf, decomposePatternTransform as Ff, resolveScreenLength as If, strokeDashStyleOf as Lf } from "@weasel-js/paint";
303
- import { createReflectable as Rf } from "@weasel-js/registry";
304
- import { DEFAULT_DECORATION_METRICS as zf, DEFAULT_TEXT_STYLE as Bf, MARKDOWN_RUN_GRAMMAR as Vf, SCRIPT_METRICS as Hf, SMALL_CAPS_SCALE as Uf, cachedLayoutRuns as Wf, createMarkdownRenderer as Gf, decorationMetrics as Kf, fontString as qf, isBoldWeight as Jf, isSmallCapsLetter as Yf, layoutMarkdown as Xf, layoutRuns as Zf, layoutTextPose as Qf, markdownToRuns as $f, measureText as ep, measureTextBounds as tp, measuredWidth as np, numericWeight as rp, resolveAlign as ip, resolveRunFace as ap, resolveRuns as op, resolveTextStyle as sp, runsToMarkdown as cp, runsToPlainText as lp, scriptMetrics as up, scriptMetricsFor as dp, smallCapsScale as fp, smallCapsScaleFor as pp, smallCapsText as mp, textLineBoxes as hp, textPoseLayoutInput as gp, toRuns as _p, transformRunTexts as vp, verticalAlignOffset as yp } from "@weasel-js/text";
305
- import { trimPolyline as bp } from "@weasel-js/geom/tessellate";
306
- import { useLatest as xp } from "@weasel-js/react";
307
- import { ActionDisabledReason as Sp, CONTROL_SELECTOR as Cp, DRAG_THRESHOLD_PX as wp, LONG_PRESS_MS as Tp, actionBindings as Ep, actionItems as Dp, buildDepsFromRequires as Op, clientToCanvas as kp, createDepRegistry as Ap, createDispatcher as jp, createLongPressStore as Mp, deleteScratch as Np, evaluateEnabled as Pp, getScratch as Fp, isEditableTarget as Ip, isInControlWithin as Lp, liveScope as Rp, matchesKeyBinding as zp, modeShortcutSpec as Bp, modeShortcuts as Vp, openPointerSession as Hp, pastDragThreshold as Up, resolveParams as Wp, scopeBindings as Gp, scratchKey as Kp, setScratch as qp, specificity as Jp } from "@weasel-js/routing";
308
- import { ActionsProvider as Yp, ActiveToolContextProvider as Xp, ActiveToolContextProviderIfRoot as Zp, DepRegistryProvider as Qp, InputScope as $p, Yoke as em, useAction as tm, useActionsRegistry as nm, useActiveToolContext as rm, useDepRegistry as im, useDepSource as am, useGestureDispatcher as om, useOngoingAction as sm, useOptionalActiveToolContext as cm, useOptionalDepRegistry as lm, useYoke as um } from "@weasel-js/routing/react";
309
- import { ANGLE_RADIANS as dm, IMPERIAL_INCHES as fm, METRIC_MM as pm, PIXELS as mm, formatUnit as hm, resolveUnit as gm, unitScale as _m } from "@weasel-js/quantity";
310
- import { CURSOR_ANGLE_STEPS as vm, CURSOR_MAX_CSS_PX as ym, bakeCursor as bm, createPaintedCursorState as xm, cursorFor as Sm, resolveCursor as Cm, resolveCursorTier as wm } from "@weasel-js/cursor";
311
- import { CURVE_REPS as Tm, bezierCubic as Em, bezierQuadratic as Dm, nurbs as Om, spiro as km } from "@weasel-js/geom/curves";
236
+ import { reconcileSpecs as Rc } from "./core/scene/reconcileSpecs.js";
237
+ import { createPoseFeed as zc } from "./core/scene/poseFeed.js";
238
+ import { FALLBACK_FIT_VIEW as Bc, computeFitView as Vc, computeIndicatorCommand as Hc } from "./canvas/minimapMath.js";
239
+ import { MinimapCanvas as Uc } from "./canvas/MinimapCanvas.js";
240
+ import { createLinkedCursorContribution as Wc, createMinimapContribution as Gc } from "./features/minimap/createMinimapContribution.js";
241
+ import { renderNeeds as Kc } from "./canvas/renderNeeds.js";
242
+ import { createRasterSession as qc, planPixelRender as Jc, renderSceneToPixels as Yc, warmRender as Xc } from "./canvas/renderSceneToPixels.js";
243
+ import { debugSnapshotArgs as Zc, renderDebugSnapshot as Qc } from "./canvas/renderDebugSnapshot.js";
244
+ import { rasterToPng as $c } from "./canvas/rasterToPng.js";
245
+ import { ActionsProviderIfRoot as el } from "./canvas/SceneCanvas/ActionsProviderIfRoot.js";
246
+ import { DepRegistryProviderIfRoot as tl } from "./canvas/SceneCanvas/DepRegistryProviderIfRoot.js";
247
+ import { WeaselProvider as nl } from "./WeaselProvider.js";
248
+ import { useCanvasFocus as rl } from "./features/focus/useCanvasFocus.js";
249
+ import { gateLayer as il } from "./features/focus/gateLayer.js";
250
+ import { modeDecorationLayer as al, workspaceTintLayer as ol } from "./features/modes/modeLayers.js";
251
+ import { createChildrenLayer as sl } from "./features/groups/children.js";
252
+ import { composeAffordanceLayer as cl } from "./affordances/composeAffordanceLayer.js";
253
+ import { defaultLabelTextRenderer as ll, renderLabel as ul } from "./features/text/renderLabel.js";
254
+ import { createTextLayer as dl } from "./features/text/textLayer.js";
255
+ import { caretIndexAt as fl, pointInTextPose as pl } from "./features/text/hitTest.js";
256
+ import { fitTextPose as ml } from "./features/text/fitTextPose.js";
257
+ import { charOffsetToDomPosition as hl, domPositionToCharOffset as gl, domToRuns as _l, runsToDom as vl } from "./features/text/domRuns.js";
258
+ import { MIXED as yl } from "./core/mixed.js";
259
+ import { applyStyleToRange as bl, patchRangeStyle as xl, styleAtRange as Sl } from "./features/text/runs/rangeStyle.js";
260
+ import { nodeHasFlag as Cl, setFlagOverRange as wl, unboldPatch as Tl } from "./features/text/runs/flagRange.js";
261
+ import { effectiveRangeStyle as El, rangeWeight as Dl } from "./features/text/runs/effectiveRangeStyle.js";
262
+ import { TEXT_EDIT_FONT_HOLD as Ol, useTextEdit as kl } from "./features/text/useTextEdit.js";
263
+ import { useSceneTextEdit as Al } from "./features/text/useSceneTextEdit.js";
264
+ import { createSetTextOp as jl } from "./core/ops/setText.js";
265
+ import { createSetLayerOp as Ml } from "./core/ops/setLayer.js";
266
+ import { createSetLayoutOp as Nl } from "./core/ops/setLayout.js";
267
+ import { createSetPathOp as Pl } from "./core/ops/setPath.js";
268
+ import { nestedHitTester as Fl } from "./features/groups/nestedHit.js";
269
+ import { unionOfChildrenVia as Il } from "./features/groups/unionOfChildren.js";
270
+ import { createPathLayer as Ll } from "./features/paths/pathLayer.js";
271
+ import { pathOriginProjection as Rl } from "./features/paths/originProjection.js";
272
+ import { DEFAULT_FLATTEN_TOLERANCE as zl, PATH_C as Bl, PATH_CMD_LENGTHS as Vl, PATH_L as Hl, PATH_M as Ul, PATH_Q as Wl, PATH_Z as Gl, PathBuilder as Kl, boundsOfPath as ql, composePath as Jl, decomposePath as Yl, ellipsePath as Xl, flattenCubic as Zl, flattenCubicWithArcLen as Ql, flattenQuadratic as $l, flattenQuadraticWithArcLen as eu, linePath as tu, pathCommandCoordCount as nu, pathContainsPoint as ru, pathContainsPolygon as iu, pathContainsRect as au, pathDistanceToPoint as ou, pathFromD as su, pathIntersectsPolygon as cu, pathIntersectsRect as lu, pathSignedArea as uu, pointAlongPath as du, pointInPath as fu, polygonFromPoints as pu, polylineFromPoints as mu, rectPath as hu, regularPolygonPath as gu, reversePath as _u, scalePathToBounds as vu, snipPathByPolyline as yu, splitPathByPolyline as bu, splitPathBySegment as xu, splitSubpaths as Su, starPath as Cu, transformPath as wu, translatePath as Tu, unionBoundsPath as Eu } from "./features/paths/index.js";
273
+ import { useGradientKinds as Du, usePaintKind as Ou, usePaintKinds as ku } from "./core/usePaintKinds.js";
274
+ import { createHistory as Au } from "./core/ops/createHistory.js";
275
+ import { arrayAdapter as ju } from "./core/adapters/arrayAdapter.js";
276
+ import { useArrayAdapter as Mu } from "./core/adapters/useArrayAdapter.js";
277
+ import { useDragGesture as Nu } from "./interactions/gestures/dragGesture/dragGesture.js";
278
+ import { useDragRect as Pu } from "./interactions/gestures/dragRect/dragRect.js";
279
+ import { useDragRadial as Fu } from "./interactions/gestures/dragRadial/dragRadial.js";
280
+ import { hitAnchor as Iu } from "./interactions/actions/edit-anchors/handles.js";
281
+ import { useClipboardOps as Lu } from "./interactions/actions/clipboard/clipboardOps.js";
282
+ import { useDistribute as Ru } from "./interactions/actions/distribute/distribute.js";
283
+ import { cloneByAltDrag as zu } from "./interactions/actions/clone/behaviors/cloneByAltDrag.js";
284
+ import { useBooleans as Bu } from "./interactions/actions/booleans/useBooleans.js";
285
+ import { useBooleansAdapter as Vu } from "./interactions/actions/booleans/useBooleansAdapter.js";
286
+ import { useCreateOutlinesAdapter as Hu } from "./interactions/actions/outlines/useCreateOutlinesAdapter.js";
287
+ import { animateOnSetPose as Uu } from "./animation/wrappers/animateOnSetPose.js";
288
+ import { animateLifecycle as Wu } from "./animation/wrappers/animateLifecycle.js";
289
+ import { createReflowTransition as Gu, useAnimatedReflow as Ku } from "./animation/reflow.js";
290
+ import { momentum as qu } from "./animation/behaviors/momentum.js";
291
+ import { createSlew as Ju, slewToward as Yu } from "./animation/slew.js";
292
+ import { cycleVertexColors as Xu, rainbowVertexColors as Zu, solidVertexColors as Qu, springVertexColors as $u, staggerVertexColors as ed, tweenVertexColors as td } from "./animation/colorHelpers.js";
293
+ import { IDENTITY_JOINT as nd } from "./animation/rig/types.js";
294
+ import { blendPoses as rd } from "./animation/rig/blendPoses.js";
295
+ import { mirrorPose as id } from "./animation/rig/mirrorPose.js";
296
+ import { resolveSkeleton as ad } from "./animation/rig/resolveSkeleton.js";
297
+ import { bindRig as od, rigidRigApply as sd } from "./animation/rig/bindRig.js";
298
+ import { solveIk as cd } from "./animation/rig/solveIk.js";
299
+ import { useRig as ld } from "./animation/rig/useRig.js";
300
+ import { EASINGS as ud, SPRING_PRESETS as dd, cubicBezierEasing as fd, easeIn as pd, easeInBack as md, easeInBounce as hd, easeInCirc as gd, easeInCubic as _d, easeInElastic as vd, easeInExpo as yd, easeInOut as bd, easeInOutBack as xd, easeInOutBounce as Sd, easeInOutCirc as Cd, easeInOutCubic as wd, easeInOutElastic as Td, easeInOutExpo as Ed, easeInOutQuad as Dd, easeInOutQuart as Od, easeInOutQuint as kd, easeInOutSine as Ad, easeInQuad as jd, easeInQuart as Md, easeInQuint as Nd, easeInSine as Pd, easeOut as Fd, easeOutBack as Id, easeOutBounce as Ld, easeOutCirc as Rd, easeOutCubic as zd, easeOutElastic as Bd, easeOutExpo as Vd, easeOutQuad as Hd, easeOutQuart as Ud, easeOutQuint as Wd, easeOutSine as Gd, hexToOklchDeg as Kd, hslToSrgb as qd, interpolateSrgb as Jd, lerpColorArray as Yd, lerpOklab as Xd, lerpOklch as Zd, linear as Qd, linearSrgbToOklab as $d, linearToSrgb as ef, oklabToLinearSrgb as tf, oklabToOklch as nf, oklabToSrgbU8 as rf, oklchDegToHex as af, oklchToOklab as of, resolveEasing as sf, srgbFloatToOklab as cf, srgbToHsl as lf, srgbToLinear as uf, srgbU8ToOklab as df } from "./animation/index.js";
301
+ import { mergeContributions as ff } from "./canvas/surfaceContribution.js";
302
+ import { canQueryLocalFonts as pf, cssFontFamily as mf, cssFontFamilyLoading as hf, enableLocalFontOutlines as gf, fontOutlineRegistry as _f, fontRegistry as vf, hasFontOutlines as yf, isCanvasFont as bf, listFontOutlines as xf, loadFontOutlines as Sf, outlineStatus as Cf, registerCanvasFont as wf, registerFont as Tf, registerFontOutlines as Ef, subscribeGlyphReady as Df, unregisterCanvasFont as Of, unregisterFontOutlines as kf, warmFonts as Af } from "@weasel-js/font";
303
+ import { STROKE_DASH_RATIOS as jf, alignedStrokeRect as Mf, composePatternTransform as Nf, contrastLineColor as Pf, dashForStrokeStyle as Ff, decomposePatternTransform as If, resolveScreenLength as Lf, strokeDashStyleOf as Rf } from "@weasel-js/paint";
304
+ import { createReflectable as zf } from "@weasel-js/registry";
305
+ import { DEFAULT_DECORATION_METRICS as Bf, DEFAULT_TEXT_STYLE as Vf, MARKDOWN_RUN_GRAMMAR as Hf, SCRIPT_METRICS as Uf, SMALL_CAPS_SCALE as Wf, cachedLayoutRuns as Gf, createMarkdownRenderer as Kf, decorationMetrics as qf, fontString as Jf, isBoldWeight as Yf, isSmallCapsLetter as Xf, layoutMarkdown as Zf, layoutRuns as Qf, layoutTextPose as $f, markdownToRuns as ep, measureText as tp, measureTextBounds as np, measuredWidth as rp, numericWeight as ip, resolveAlign as ap, resolveRunFace as op, resolveRuns as sp, resolveTextStyle as cp, runsToMarkdown as lp, runsToPlainText as up, scriptMetrics as dp, scriptMetricsFor as fp, smallCapsScale as pp, smallCapsScaleFor as mp, smallCapsText as hp, textLineBoxes as gp, textPoseLayoutInput as _p, toRuns as vp, transformRunTexts as yp, verticalAlignOffset as bp } from "@weasel-js/text";
306
+ import { trimPolyline as xp } from "@weasel-js/geom/tessellate";
307
+ import { useLatest as Sp } from "@weasel-js/react";
308
+ import { ActionDisabledReason as Cp, CONTROL_SELECTOR as wp, DRAG_THRESHOLD_PX as Tp, LONG_PRESS_MS as Ep, actionBindings as Dp, actionItems as Op, buildDepsFromRequires as kp, clientToCanvas as Ap, createDepRegistry as jp, createDispatcher as Mp, createLongPressStore as Np, deleteScratch as Pp, evaluateEnabled as Fp, getScratch as Ip, isEditableTarget as Lp, isInControlWithin as Rp, liveScope as zp, matchesKeyBinding as Bp, modeShortcutSpec as Vp, modeShortcuts as Hp, openPointerSession as Up, pastDragThreshold as Wp, resolveParams as Gp, scopeBindings as Kp, scratchKey as qp, setScratch as Jp, specificity as Yp } from "@weasel-js/routing";
309
+ import { ActionsProvider as Xp, ActiveToolContextProvider as Zp, ActiveToolContextProviderIfRoot as Qp, DepRegistryProvider as $p, InputScope as em, Yoke as tm, useAction as nm, useActionsRegistry as rm, useActiveToolContext as im, useDepRegistry as am, useDepSource as om, useGestureDispatcher as sm, useOngoingAction as cm, useOptionalActiveToolContext as lm, useOptionalDepRegistry as um, useYoke as dm } from "@weasel-js/routing/react";
310
+ import { ANGLE_RADIANS as fm, IMPERIAL_INCHES as pm, METRIC_MM as mm, PIXELS as hm, formatUnit as gm, resolveUnit as _m, unitScale as vm } from "@weasel-js/quantity";
311
+ import { CURSOR_ANGLE_STEPS as ym, CURSOR_MAX_CSS_PX as bm, bakeCursor as xm, createPaintedCursorState as Sm, cursorFor as Cm, resolveCursor as wm, resolveCursorTier as Tm } from "@weasel-js/cursor";
312
+ import { CURVE_REPS as Em, bezierCubic as Dm, bezierQuadratic as Om, nurbs as km, spiro as Am } from "@weasel-js/geom/curves";
312
313
  export * from "@weasel-js/history";
313
- export { sr as ACTION_GLYPHS, pc as ALWAYS, lt as ANCHOR_HIT_BASE_PX, dm as ANGLE_RADIANS, Fa as AREA_SELECT_ID, as as AUTO_ORIGIN_PROJECTION, Jt as AUTO_POSE_DESCRIPTOR, Sp as ActionDisabledReason, Yp as ActionsProvider, $c as ActionsProviderIfRoot, Xp as ActiveToolContextProvider, Zp as ActiveToolContextProviderIfRoot, kr as AlignBottomIcon, Ar as AlignCenterXIcon, jr as AlignCenterYIcon, Mr as AlignLeftIcon, Nr as AlignRightIcon, Pr as AlignTopIcon, ma as ArrowIcon, E as BUILTIN_MARKERS, yc as BUILTIN_TOOL_IDS, Yn as BringForwardIcon, Xn as BringToFrontIcon, ft as COARSE_TARGET_SCALE, cs as COMPOSITE_FEATURES, Cp as CONTROL_SELECTOR, nn as CORNER_ANCHORS, Fc as CROSSHAIR_HALO, vm as CURSOR_ANGLE_STEPS, ym as CURSOR_MAX_CSS_PX, Tm as CURVE_REPS, es as CanvasView, Xi as ColorOverrideRegistry, Zn as CopyIcon, ei as CreateOutlinesIcon, qr as CropIcon, jo as CursorCoordsHud, Qn as CutIcon, mc as DEFAULT_ALLOWED_CAPABILITIES, he as DEFAULT_ALPHA_DECAY, ge as DEFAULT_ALPHA_MIN, ji as DEFAULT_DEBUG_STROKES, Mi as DEFAULT_DEBUG_THEME, zf as DEFAULT_DECORATION_METRICS, pt as DEFAULT_DEVICE_PROFILE, ai as DEFAULT_FILL_COLOR, Rl as DEFAULT_FLATTEN_TOLERANCE, bc as DEFAULT_HANDLE_SIZE, Ea as DEFAULT_INK, J as DEFAULT_MAX_ZOOM, Y as DEFAULT_MIN_ZOOM, oi as DEFAULT_PALETTE, vo as DEFAULT_ROTATION_HANDLE_DISTANCE, si as DEFAULT_SHAPE_FILL, ci as DEFAULT_STROKE_COLOR, Bf as DEFAULT_TEXT_STYLE, _e as DEFAULT_VELOCITY_DECAY, Qa as DRAG_PAN_ID, wp as DRAG_THRESHOLD_PX, cr as DeleteIcon, Qp as DepRegistryProvider, el as DepRegistryProviderIfRoot, Se as DeviceProfileProvider, Fr as DistributeHorizontalIcon, Ir as DistributeVerticalIcon, Jr as DivideIcon, kc as DrawCanvas, $n as DuplicateIcon, ld as EASINGS, ua as EllipseIcon, Yr as ExcludeIcon, fa as EyedropperIcon, zc as FALLBACK_FIT_VIEW, ls as FEATURE_ACTION_IDS, er as FlipXIcon, tr as FlipYIcon, li as GHOST_STROKE, nr as GroupIcon, ut as HANDLE_BASE_PX, ba as HandIcon, td as IDENTITY_JOINT, Te as IDENTITY_POSE_COMPOSITION, fm as IMPERIAL_INCHES, da as ImageIcon, $p as InputScope, Xr as IntersectIcon, _n as KIT_SHAPE_KINDS, Ii as KIT_STANDARD_ACTION_IDS, ts as KIT_VERSIONS, js as LONG_PRESS_FEEDBACK_ID, Tp as LONG_PRESS_MS, ca as LassoIcon, pa as LineIcon, Vf as MARKDOWN_RUN_GRAMMAR, pm as METRIC_MM, Ac as MINIMAP_CENTER, jc as MINIMAP_PAN, vl as MIXED, Hc as MinimapCanvas, hc as NEVER, To as PAINTED_CURSOR_LAYER_ID, Zo as PATH_ANCHOR_CHROME_ID, zl as PATH_C, Bl as PATH_CMD_LENGTHS, Vl as PATH_L, Hl as PATH_M, Ul as PATH_Q, Wl as PATH_Z, mm as PIXELS, rr as PasteIcon, Gl as PathBuilder, ya as PenIcon, _a as PencilIcon, Mo as PickHud, _r as PointerContextProvider, is as PointerProviderIfRoot, ha as PolygonIcon, os as RECT_ORIGIN_PROJECTION, Oe as RECT_POSE_COMPOSITION, Ht as RECT_POSE_DESCRIPTOR, ke as RIGID_POSE_COMPOSITION, Ut as ROTATED_POSE_DESCRIPTOR, dt as ROTATION_HANDLE_BASE_PX, la as RectIcon, lr as RedoIcon, us as SCENE_CANVAS_FEATURES, Hf as SCRIPT_METRICS, Ia as SELECTION_MOVE_ID, La as SELECTION_RESIZE_ID, Ra as SELECTION_ROTATE_ID, za as SELECTION_TRANSFORM_ID, vn as SHAPE_KINDS, Uf as SMALL_CAPS_SCALE, ud as SPRING_PRESETS, w as SPRITE_STRIDE, Af as STROKE_DASH_RATIOS, jt as SceneArrivalRefused, xc as SceneCanvas, Oc as SceneViewCanvas, sa as SelectIcon, Bo as SelectionContextProvider, Vo as SelectionContextProviderIfRoot, ir as SendBackwardIcon, ar as SendToBackIcon, ga as StarIcon, Zr as SubtractIcon, Dl as TEXT_EDIT_FONT_HOLD, ds as TOOL_DRIVEN_ACTION_IDS, ia as TOOL_PREF_KINDS, va as TextIcon, Hr as TextOutlinesError, hr as UNION_OF_CHILDREN, ur as UndoIcon, or as UngroupIcon, Qr as UnionIcon, xa as UnknownIcon, e as VERSION, Qi as VIEW_ANIMATION_KEY, Cs as WEASEL_CLIPBOARD_MIME, ws as WEASEL_CLIPBOARD_MIME_WEB, En as WHEEL_ZOOM_STEP, tl as WeaselProvider, em as Yoke, X as ZOOM_FLOOR, cn as aabbCenter, Ep as actionBindings, Is as actionIs, Dp as actionItems, Tt as actionShortcuts, Sr as alignDeltaFor, Cr as alignTargetBounds, jf as alignedStrokeRect, Ls as always, Rs as and, Uu as animateLifecycle, Hu as animateOnSetPose, Wo as annulusSemiAxes, Kr as applyBooleanOp, $r as applyCreateOutlines, Vn as applyOpsTo, yl as applyStyleToRange, gn as areaSelectAction, Ba as areaSelectContribution, Au as arrayAdapter, At as asNodeId, p as asPaint, zt as axisAlignedBounds, bm as bakeCursor, Em as bezierCubic, Dm as bezierQuadratic, ad as bindRig, nd as blendPoses, B as blur, Kl as boundsOfPath, dc as buildChromeCtx, Ni as buildDebugOverlayCommands, Op as buildDepsFromRequires, gc as buildRuleCtx, Ec as buildSceneViewCommands, Ts as buildWeaselClipboardText, Wf as cachedLayoutRuns, Tr as canBringForward, zs as canHover, ff as canQueryLocalFonts, Er as canSendBackward, Bs as capabilityAll, Vs as capabilityIn, Hs as capabilityIs, Us as capabilityNot, dl as caretIndexAt, Mc as centerRootOn, ml as charOffsetToDomPosition, ns as checkRequirements, hs as circlePath, yt as clampView, bn as clearSelectionAction, kp as clientToCanvas, dr as clipboardCopyAction, fr as clipboardCutAction, pr as clipboardPasteAction, Cn as cloneAction, Ru as cloneByAltDrag, Ws as coarsePointer, sl as composeAffordanceLayer, ql as composePath, Mf as composePatternTransform, Ae as composeRectPose, je as composeRigidPose, xo as composeSelectionPose, Ee as composeWorldPose, Bc as computeFitView, xt as computeFitViewport, Vc as computeIndicatorCommand, Vi as computeSliceOps, Dn as computeWheelAction, Gs as cond, to as constrainTo45, Nf as contrastLineColor, rn as cornerPoint, an as cornerResizeHandles, Fn as countPathAnchors, Fo as createArrangeOp, ol as createChildrenLayer, qo as createCornerResizeAffordance, Pi as createDebugOverlayLayer, xi as createDebugSink, xn as createDeleteOp, Ap as createDepRegistry, jp as createDispatcher, ku as createHistory, Sn as createInsertOp, Ct as createKeyState, Uc as createLinkedCursorContribution, Ms as createLongPressFeedbackContribution, Mp as createLongPressStore, Gf as createMarkdownRenderer, Wc as createMinimapContribution, Dr as createMoveToIndexOp, Sc as createNodeProperties, Ns as createNodeRouting, Eo as createPaintedCursorLayer, xm as createPaintedCursorState, fe as createParallaxLayer, de as createParallaxPlane, Qo as createPathAnchorAffordances, bs as createPathEditingOverlayLayer, Il as createPathLayer, ys as createPenPreviewLayer, vr as createPointerStore, Rc as createPoseFeed, Io as createPoseOverrides, Kc as createRasterSession, Rf as createReflectable, Wu as createReflowTransition, Or as createReorderOp, Lt as createReparentOp, Jo as createRotationAffordance, Lo as createScene, So as createSelectionHandlesLayer, Co as createSelectionOutlineLayer, wo as createSelectionOverlayLayer, Rt as createSetDataOp, jl as createSetLayerOp, Ml as createSetLayoutOp, Nl as createSetPathOp, Un as createSetSelectionOp, Al as createSetTextOp, ve as createSimulation, qu as createSlew, ul as createTextLayer, wi as createTilePattern, me as createTiledLayer, It as createTransformOp, wn as createVelocityTracker, ne as createViewResolver, te as createViewportLayer, Ic as crosshairRects, pf as cssFontFamily, mf as cssFontFamilyLoading, dd as cubicBezierEasing, R as cullDrawCommands, Sm as cursorFor, ui as cycleFill, Yu as cycleVertexColors, Pf as dashForStrokeStyle, Xc as debugSnapshotArgs, Jl as decomposePath, Ff as decomposePatternTransform, Me as decomposeRectPose, Ne as decomposeRigidPose, Kf as decorationMetrics, pn as defaultCommitAdapter, mo as defaultDrawOne, cl as defaultLabelTextRenderer, Cc as defaultNodeProperties, Ps as defaultNodeRouting, ho as defaultPaintBounds, lc as defaultVisibilityRules, ta as defineTool, Le as definesFrame, Np as deleteScratch, H as depsUnchanged, re as deriveParallaxView, Re as derivedDepOf, ze as derivedPose, _c as describeRule, Hn as dispatchApplyBatch, _i as dlog, Be as documentPose, hl as domPositionToCharOffset, gl as domToRuns, $a as dragPanContribution, U as drawLayers, W as drawOneLayer, vi as dwarn, fd as easeIn, pd as easeInBack, md as easeInBounce, hd as easeInCirc, gd as easeInCubic, _d as easeInElastic, vd as easeInExpo, yd as easeInOut, bd as easeInOutBack, xd as easeInOutBounce, Sd as easeInOutCirc, Cd as easeInOutCubic, wd as easeInOutElastic, Td as easeInOutExpo, Ed as easeInOutQuad, Dd as easeInOutQuart, Od as easeInOutQuint, kd as easeInOutSine, Ad as easeInQuad, jd as easeInQuart, Md as easeInQuint, Nd as easeInSine, Pd as easeOut, Fd as easeOutBack, Id as easeOutBounce, Ld as easeOutCirc, Rd as easeOutCubic, zd as easeOutElastic, Bd as easeOutExpo, Vd as easeOutQuad, Hd as easeOutQuart, Ud as easeOutQuint, Wd as easeOutSine, Bn as editAnchorsAction, Zt as editingLayer, Ve as effectivePose, Tl as effectiveRangeStyle, Yl as ellipsePath, Es as embedWeaselMetadataInSvg, hf as enableLocalFontOutlines, mr as enterTextEditAction, Yo as enumerateAnchors, vc as evaluate, Pp as evaluateEnabled, Ds as extractWeaselClipboardFromSvg, Si as fillInPoseFrame, Ci as fillToBoundsFrame, Da as findNodeShape, Oa as findShapeBounds, ka as findShapeInk, Aa as findShapeSilhouette, pl as fitTextPose, ht as fitToBounds, _t as fitViewToBounds, gt as fitZoom, on as fixedCornerOf, Xl as flattenCubic, Zl as flattenCubicWithArcLen, fs as flattenPreviews, Ql as flattenQuadratic, $l as flattenQuadraticWithArcLen, Ks as focused, gf as fontOutlineRegistry, _f as fontRegistry, qf as fontString, Ge as forEachCoalesced, hm as formatUnit, I as frameRect, ie as fromPlane, rl as gateLayer, Dt as gesturePlaneReader, Ot as gestureViewReader, qs as gesturing, ti as getAlpha01, Sa as getImageBitmap, D as getMarker, ja as getNodeShapes, m as getPaintKind, Fp as getScratch, Ke as getStylusData, s as gradientForBounds, c as gradientGeometry, vf as hasFontOutlines, Gd as hexToOklchDeg, t as hexToRgba, Go as hitAffordanceRegions, Fu as hitAnchor, sn as hitCornerHandle, yo as hitRotationHandle, Oo as hostAnchorCss, ko as hostAnchorRect, Js as hovering, Ys as hoveringSelected, Kd as hslToSrgb, Ca as imageStatus, Qt as inPlane, wc as inferredNodeProperties, Fs as inferredNodeRouting, yn as insertAction, $t as insertLayer, $o as insertPreviewExtent, qd as interpolateSrgb, Ki as interpolateView, Jf as isBoldWeight, aa as isBuiltinToolPref, yf as isCanvasFont, yi as isDebugEnabled, Ip as isEditableTarget, l as isGradientFill, Lp as isInControlWithin, G as isLayerPainted, K as isLayerVisible, h as isPaintKindKnown, Yt as isPathLike, Ti as isPatternSpec, Ie as isPlainObject, Xt as isRectPose, Yf as isSmallCapsLetter, wa as isVectorImageSrc, Et as keySpecShortcut, Gn as lassoSelectAction, xs as layoutArrivalHandler, Xf as layoutMarkdown, Zf as layoutRuns, Qf as layoutTextPose, Jd as lerpColorArray, Yd as lerpOklab, Xd as lerpOklch, eu as linePath, Zd as linear, Qd as linearSrgbToOklab, $d as linearToSrgb, bf as listFontOutlines, g as listGradientKinds, O as listMarkers, _ as listPaintKinds, Rp as liveScope, xf as loadFontOutlines, Ur as loadTextOutlines, qn as makePinchZoomAction, Nn as makeViewportWheelPanAction, jn as makeViewportZoomAction, $f as markdownToRuns, j as markerInset, M as markerKeyOf, k as markerRegistry, F as markerSites, f as mat3, zp as matchesKeyBinding, Ze as meanScale, ep as measureText, tp as measureTextBounds, np as measuredWidth, ni as mergeAlphaFromPrev, df as mergeContributions, Nc as minimapCenterAction, Pc as minimapPanAction, rd as mirrorPose, il as modeDecorationLayer, Xs as modeIn, Zs as modeIs, Qs as modeNot, Bp as modeShortcutSpec, Vp as modeShortcuts, $s as modifierHeld, Ku as momentum, tn as moveAction, ec as multiActive, Pl as nestedHitTester, tc as never, Sl as nodeHasFlag, n as normalizeHex, Q as normalizeView, Z as normalizeZoom, nc as not, rp as numericWeight, Om as nurbs, ef as oklabToLinearSrgb, tf as oklabToOklch, nf as oklabToSrgbU8, rf as oklchDegToHex, af as oklchToOklab, Va as onEmptyCanvas, Mt as opFactoryRegistry, As as openFilePicker, Hp as openPointerSession, rc as or, Sf as outlineStatus, di as paintAlpha, v as paintKindOf, y as paintKindRegistry, fi as paintWithAlpha, pi as paintWithColor, r as parseColor, i as parseColorToRgba255, bi as parseDebugFlags, Os as parseWeaselClipboardText, Up as pastDragThreshold, bl as patchRangeStyle, tu as pathCommandCoordCount, nu as pathContainsPoint, ru as pathContainsPolygon, iu as pathContainsRect, au as pathDistanceToPoint, Lr as pathDivide, Rr as pathExclude, ou as pathFromD, Ln as pathInPoseFrame, Rn as pathInWorld, zr as pathIntersect, su as pathIntersectsPolygon, cu as pathIntersectsRect, Ll as pathOriginProjection, qt as pathPoseDescriptor, lu as pathSignedArea, Br as pathSubtract, In as pathToAnchors, Vr as pathUnion, Pa as pickTopMostHit, Jn as pinchZoomAction, qc as planPixelRender, ae as planeMap, oe as planeMatrix, se as planeToPlane, uu as pointAlongPath, du as pointInPath, ln as pointInRotatedRect, fl as pointInTextPose, Ko as pointRegionFrame, fu as polygonFromPoints, pu as polylineFromPoints, Wt as poseDescriptorForNode, He as poseRotationOf, oa as prefUnit, qe as pressureToWidth, $e as pxExtent, Xu as rainbowVertexColors, El as rangeWeight, Qc as rasterToPng, De as rebaseLocalPose, Nt as rebuildOp, un as rectCorners, ce as rectFromPlane, gs as rectMarkerPath, mu as rectPath, le as rectToPlane, Cf as registerCanvasFont, Fi as registerContentHandler, z as registerEffect, wf as registerFont, Tf as registerFontOutlines, A as registerMarker, Ma as registerNodeShape, Pt as registerOpFactory, b as registerPaintKind, x as registerPaintKindLoader, Ft as registeredOpNames, hu as regularPolygonPath, go as releaseCanvasRenderer, Zc as renderDebugSnapshot, ll as renderLabel, Gc as renderNeeds, Dc as renderSceneToCanvas, Jc as renderSceneToPixels, mn as resizeAction, ip as resolveAlign, a as resolveColor, Cm as resolveCursor, wm as resolveCursorTier, mt as resolveDeviceProfile, of as resolveEasing, Ei as resolveFillPattern, N as resolveMarkerSize, ms as resolveOverlays, Wp as resolveParams, Di as resolvePatternSpec, ps as resolvePreviews, ap as resolveRunFace, op as resolveRuns, If as resolveScreenLength, id as resolveSkeleton, xr as resolveSpatialReference, T as resolveStrokeWidth, sp as resolveTextStyle, gm as resolveUnit, uc as resolveVisibility, gu as reversePath, o as rgbaToHex, od as rigidRigApply, hn as rotateAction, Do as rotateAroundAABBCenter, Ue as rotatePathAround, dn as rotatePoint, fn as rotatedRectCorners, Tc as rotationDegreesUnit, bo as rotationHandle, _s as roundRectPath, _l as runsToDom, cp as runsToMarkdown, lp as runsToPlainText, u as sampleGradientStops, Yi as sampleTrack, rs as satisfiesRange, et as scaleDelta, _u as scalePathToBounds, Ro as sceneFromJSON, bt as sceneNodeClientRect, zo as sceneSelectionStore, No as sceneToAdapter, Gp as scopeBindings, Kp as scratchKey, tt as screenAngleOf, Ye as screenToWorld, kt as screenTolerance, up as scriptMetrics, dp as scriptMetricsFor, Wn as selectFromLasso, ic as selectionAtLeast, ac as selectionEmpty, oc as selectionIs, en as selectionLayer, Ha as selectionMoveBindings, Ua as selectionMoveContribution, Wa as selectionResizeBindings, Ga as selectionResizeContribution, Ka as selectionRotateBindings, qa as selectionRotateContribution, Ja as selectionTransformBindings, Ya as selectionTransformContribution, Cl as setFlagOverRange, qp as setScratch, Na as shapeCoversPoint, Ju as slewToward, Kn as sliceAction, fp as smallCapsScale, pp as smallCapsScaleFor, mp as smallCapsText, ss as snap, ks as sniffWeaselClipboardText, vu as snipPathByPolyline, mi as solid, Zu as solidVertexColors, sd as solveIk, Jp as specificity, km as spiro, yu as splitPathByPolyline, bu as splitPathBySegment, xu as splitSubpaths, qi as springPose, Qu as springVertexColors, vs as squarePath, sf as srgbFloatToOklab, cf as srgbToHsl, lf as srgbToLinear, uf as srgbU8ToOklab, Qe as stableStringify, $u as staggerVertexColors, nt as standoff, Su as starPath, ct as startThresholdDrag, Lf as strokeDashStyleOf, P as strokeInsets, hi as strokeOf, gi as strokeWith, xl as styleAtRange, Ef as subscribeGlyphReady, Ta as subscribeImageReady, q as subscribeToSources, S as switchGradientKind, Oi as textCommand, ki as textCommandFromPose, Ai as textCommandFromRuns, hp as textLineBoxes, gp as textPoseLayoutInput, Wr as textToPath, Gr as textToPathsByPaint, pe as tiledProject, ri as toHex8, ue as toPlane, _p as toRuns, Cu as transformPath, vp as transformRunTexts, wu as translatePath, Gt as translatePoseViaDescriptor, Pe as translateRectPose, bp as trimPolyline, Ji as tweenPose, ed as tweenVertexColors, wl as unboldPatch, Bt as unionAABB, Vt as unionBounds, Tu as unionBoundsPath, gr as unionOfChildren, Fl as unionOfChildrenVia, _m as unitScale, Df as unregisterCanvasFont, Of as unregisterFontOutlines, tm as useAction, nm as useActionsRegistry, rm as useActiveToolContext, wr as useAlign, Gu as useAnimatedReflow, Zi as useAnimator, ju as useArrayAdapter, St as useAutoCenter, zu as useBooleans, Bu as useBooleansAdapter, nl as useCanvasFocus, we as useCanvasSize, Iu as useClipboardOps, Vu as useCreateOutlinesAdapter, Gi as useDecayLoop, im as useDepRegistry, am as useDepSource, Ce as useDeviceProfile, Lu as useDistribute, Mu as useDragGesture, ot as useDragHandle, Pu as useDragRadial, Nu as useDragRect, st as useDropZone, io as useEllipseTool, oo as useEyedropperTool, om as useGestureDispatcher, Eu as useGradientKinds, Za as useHandTool, at as useHandleDrag, Ao as useHostAnchor, fc as useHoverTracking, ao as useImageTool, wt as useKeyState, ra as useKeybindings, co as useLassoTool, xp as useLatest, Ss as useLayoutArrivals, so as useLineTool, We as useNodeOverlayFrame, sm as useOngoingAction, cm as useOptionalActiveToolContext, lm as useOptionalDepRegistry, Du as usePaintKind, Ou as usePaintKinds, no as usePenTool, fo as usePencilTool, yr as usePointerContext, br as usePointerPosition, Je as usePointerStylus, lo as usePolygonTool, Bi as usePoseCompositionDepSource, zi as usePoseDescriptorDepSource, xe as usePoseRun, Ho as usePublishSelection, ro as useRectTool, Ri as useResizePolicy, cd as useRig, Lc as useScene, Po as useSceneAdapter, kl as useSceneTextEdit, Xa as useSelectTool, _o as useSelection, Uo as useSelectionContext, be as useSimulation, Hi as useSliceDep, Ui as useSliceDepSource, po as useSliceTool, Li as useStandardActions, uo as useStarTool, Ol as useTextEdit, eo as useTextTool, na as useTools, Wi as useVelocityTracker, $i as useViewAnimation, ea as useViewAnimationOn, ye as useVisibleRaf, um as useYoke, yp as verticalAlignOffset, L as viewToMat3, $ as viewToTransform, ee as viewZoom, Tn as viewportDragPanAction, Pn as viewportWheelPanAction, Mn as viewportZoomAction, V as vignette, Kt as visualBoundsViaDescriptor, kf as warmFonts, C as warmPaintKinds, Yc as warmRender, On as wheelPan, kn as wheelZoom, An as wheelZoomFactor, sc as when, ii as withAlpha01, Xo as withCoord, d as withGradientKind, rt as withinPxBox, it as withinPxRadius, al as workspaceTintLayer, zn as worldEditToStorage, Fe as worldPoseLookup, Xe as worldToScreen, vt as zoomAt, cc as zoomAtLeast };
314
+ export { sr as ACTION_GLYPHS, pc as ALWAYS, lt as ANCHOR_HIT_BASE_PX, fm as ANGLE_RADIANS, Fa as AREA_SELECT_ID, as as AUTO_ORIGIN_PROJECTION, Jt as AUTO_POSE_DESCRIPTOR, Cp as ActionDisabledReason, Xp as ActionsProvider, el as ActionsProviderIfRoot, Zp as ActiveToolContextProvider, Qp as ActiveToolContextProviderIfRoot, kr as AlignBottomIcon, Ar as AlignCenterXIcon, jr as AlignCenterYIcon, Mr as AlignLeftIcon, Nr as AlignRightIcon, Pr as AlignTopIcon, ma as ArrowIcon, E as BUILTIN_MARKERS, yc as BUILTIN_TOOL_IDS, Yn as BringForwardIcon, Xn as BringToFrontIcon, ft as COARSE_TARGET_SCALE, cs as COMPOSITE_FEATURES, wp as CONTROL_SELECTOR, nn as CORNER_ANCHORS, Fc as CROSSHAIR_HALO, ym as CURSOR_ANGLE_STEPS, bm as CURSOR_MAX_CSS_PX, Em as CURVE_REPS, es as CanvasView, Xi as ColorOverrideRegistry, Zn as CopyIcon, ei as CreateOutlinesIcon, qr as CropIcon, jo as CursorCoordsHud, Qn as CutIcon, mc as DEFAULT_ALLOWED_CAPABILITIES, he as DEFAULT_ALPHA_DECAY, ge as DEFAULT_ALPHA_MIN, ji as DEFAULT_DEBUG_STROKES, Mi as DEFAULT_DEBUG_THEME, Bf as DEFAULT_DECORATION_METRICS, pt as DEFAULT_DEVICE_PROFILE, ai as DEFAULT_FILL_COLOR, zl as DEFAULT_FLATTEN_TOLERANCE, bc as DEFAULT_HANDLE_SIZE, Ea as DEFAULT_INK, J as DEFAULT_MAX_ZOOM, Y as DEFAULT_MIN_ZOOM, oi as DEFAULT_PALETTE, vo as DEFAULT_ROTATION_HANDLE_DISTANCE, si as DEFAULT_SHAPE_FILL, ci as DEFAULT_STROKE_COLOR, Vf as DEFAULT_TEXT_STYLE, _e as DEFAULT_VELOCITY_DECAY, Qa as DRAG_PAN_ID, Tp as DRAG_THRESHOLD_PX, cr as DeleteIcon, $p as DepRegistryProvider, tl as DepRegistryProviderIfRoot, Se as DeviceProfileProvider, Fr as DistributeHorizontalIcon, Ir as DistributeVerticalIcon, Jr as DivideIcon, kc as DrawCanvas, $n as DuplicateIcon, ud as EASINGS, ua as EllipseIcon, Yr as ExcludeIcon, fa as EyedropperIcon, Bc as FALLBACK_FIT_VIEW, ls as FEATURE_ACTION_IDS, er as FlipXIcon, tr as FlipYIcon, li as GHOST_STROKE, nr as GroupIcon, ut as HANDLE_BASE_PX, ba as HandIcon, nd as IDENTITY_JOINT, Te as IDENTITY_POSE_COMPOSITION, pm as IMPERIAL_INCHES, da as ImageIcon, em as InputScope, Xr as IntersectIcon, _n as KIT_SHAPE_KINDS, Ii as KIT_STANDARD_ACTION_IDS, ts as KIT_VERSIONS, js as LONG_PRESS_FEEDBACK_ID, Ep as LONG_PRESS_MS, ca as LassoIcon, pa as LineIcon, Hf as MARKDOWN_RUN_GRAMMAR, mm as METRIC_MM, Ac as MINIMAP_CENTER, jc as MINIMAP_PAN, yl as MIXED, Uc as MinimapCanvas, hc as NEVER, To as PAINTED_CURSOR_LAYER_ID, Zo as PATH_ANCHOR_CHROME_ID, Bl as PATH_C, Vl as PATH_CMD_LENGTHS, Hl as PATH_L, Ul as PATH_M, Wl as PATH_Q, Gl as PATH_Z, hm as PIXELS, rr as PasteIcon, Kl as PathBuilder, ya as PenIcon, _a as PencilIcon, Mo as PickHud, _r as PointerContextProvider, is as PointerProviderIfRoot, ha as PolygonIcon, os as RECT_ORIGIN_PROJECTION, Oe as RECT_POSE_COMPOSITION, Ht as RECT_POSE_DESCRIPTOR, ke as RIGID_POSE_COMPOSITION, Ut as ROTATED_POSE_DESCRIPTOR, dt as ROTATION_HANDLE_BASE_PX, la as RectIcon, lr as RedoIcon, us as SCENE_CANVAS_FEATURES, Uf as SCRIPT_METRICS, Ia as SELECTION_MOVE_ID, La as SELECTION_RESIZE_ID, Ra as SELECTION_ROTATE_ID, za as SELECTION_TRANSFORM_ID, vn as SHAPE_KINDS, Wf as SMALL_CAPS_SCALE, dd as SPRING_PRESETS, w as SPRITE_STRIDE, jf as STROKE_DASH_RATIOS, jt as SceneArrivalRefused, xc as SceneCanvas, Oc as SceneViewCanvas, sa as SelectIcon, Bo as SelectionContextProvider, Vo as SelectionContextProviderIfRoot, ir as SendBackwardIcon, ar as SendToBackIcon, ga as StarIcon, Zr as SubtractIcon, Ol as TEXT_EDIT_FONT_HOLD, ds as TOOL_DRIVEN_ACTION_IDS, ia as TOOL_PREF_KINDS, va as TextIcon, Hr as TextOutlinesError, hr as UNION_OF_CHILDREN, ur as UndoIcon, or as UngroupIcon, Qr as UnionIcon, xa as UnknownIcon, e as VERSION, Qi as VIEW_ANIMATION_KEY, Cs as WEASEL_CLIPBOARD_MIME, ws as WEASEL_CLIPBOARD_MIME_WEB, En as WHEEL_ZOOM_STEP, nl as WeaselProvider, tm as Yoke, X as ZOOM_FLOOR, cn as aabbCenter, Dp as actionBindings, Is as actionIs, Op as actionItems, Tt as actionShortcuts, Sr as alignDeltaFor, Cr as alignTargetBounds, Mf as alignedStrokeRect, Ls as always, Rs as and, Wu as animateLifecycle, Uu as animateOnSetPose, Wo as annulusSemiAxes, Kr as applyBooleanOp, $r as applyCreateOutlines, Vn as applyOpsTo, bl as applyStyleToRange, gn as areaSelectAction, Ba as areaSelectContribution, ju as arrayAdapter, At as asNodeId, p as asPaint, zt as axisAlignedBounds, xm as bakeCursor, Dm as bezierCubic, Om as bezierQuadratic, od as bindRig, rd as blendPoses, B as blur, ql as boundsOfPath, dc as buildChromeCtx, Ni as buildDebugOverlayCommands, kp as buildDepsFromRequires, gc as buildRuleCtx, Ec as buildSceneViewCommands, Ts as buildWeaselClipboardText, Gf as cachedLayoutRuns, Tr as canBringForward, zs as canHover, pf as canQueryLocalFonts, Er as canSendBackward, Bs as capabilityAll, Vs as capabilityIn, Hs as capabilityIs, Us as capabilityNot, fl as caretIndexAt, Mc as centerRootOn, hl as charOffsetToDomPosition, ns as checkRequirements, hs as circlePath, yt as clampView, bn as clearSelectionAction, Ap as clientToCanvas, dr as clipboardCopyAction, fr as clipboardCutAction, pr as clipboardPasteAction, Cn as cloneAction, zu as cloneByAltDrag, Ws as coarsePointer, cl as composeAffordanceLayer, Jl as composePath, Nf as composePatternTransform, Ae as composeRectPose, je as composeRigidPose, xo as composeSelectionPose, Ee as composeWorldPose, Vc as computeFitView, xt as computeFitViewport, Hc as computeIndicatorCommand, Vi as computeSliceOps, Dn as computeWheelAction, Gs as cond, to as constrainTo45, Pf as contrastLineColor, rn as cornerPoint, an as cornerResizeHandles, Fn as countPathAnchors, Fo as createArrangeOp, sl as createChildrenLayer, qo as createCornerResizeAffordance, Pi as createDebugOverlayLayer, xi as createDebugSink, xn as createDeleteOp, jp as createDepRegistry, Mp as createDispatcher, Au as createHistory, Sn as createInsertOp, Ct as createKeyState, Wc as createLinkedCursorContribution, Ms as createLongPressFeedbackContribution, Np as createLongPressStore, Kf as createMarkdownRenderer, Gc as createMinimapContribution, Dr as createMoveToIndexOp, Sc as createNodeProperties, Ns as createNodeRouting, Eo as createPaintedCursorLayer, Sm as createPaintedCursorState, fe as createParallaxLayer, de as createParallaxPlane, Qo as createPathAnchorAffordances, bs as createPathEditingOverlayLayer, Ll as createPathLayer, ys as createPenPreviewLayer, vr as createPointerStore, zc as createPoseFeed, Io as createPoseOverrides, qc as createRasterSession, zf as createReflectable, Gu as createReflowTransition, Or as createReorderOp, Lt as createReparentOp, Jo as createRotationAffordance, Lo as createScene, So as createSelectionHandlesLayer, Co as createSelectionOutlineLayer, wo as createSelectionOverlayLayer, Rt as createSetDataOp, Ml as createSetLayerOp, Nl as createSetLayoutOp, Pl as createSetPathOp, Un as createSetSelectionOp, jl as createSetTextOp, ve as createSimulation, Ju as createSlew, dl as createTextLayer, wi as createTilePattern, me as createTiledLayer, It as createTransformOp, wn as createVelocityTracker, ne as createViewResolver, te as createViewportLayer, Ic as crosshairRects, mf as cssFontFamily, hf as cssFontFamilyLoading, fd as cubicBezierEasing, R as cullDrawCommands, Cm as cursorFor, ui as cycleFill, Xu as cycleVertexColors, Ff as dashForStrokeStyle, Zc as debugSnapshotArgs, Yl as decomposePath, If as decomposePatternTransform, Me as decomposeRectPose, Ne as decomposeRigidPose, qf as decorationMetrics, pn as defaultCommitAdapter, mo as defaultDrawOne, ll as defaultLabelTextRenderer, Cc as defaultNodeProperties, Ps as defaultNodeRouting, ho as defaultPaintBounds, lc as defaultVisibilityRules, ta as defineTool, Le as definesFrame, Pp as deleteScratch, H as depsUnchanged, re as deriveParallaxView, Re as derivedDepOf, ze as derivedPose, _c as describeRule, Hn as dispatchApplyBatch, _i as dlog, Be as documentPose, gl as domPositionToCharOffset, _l as domToRuns, $a as dragPanContribution, U as drawLayers, W as drawOneLayer, vi as dwarn, pd as easeIn, md as easeInBack, hd as easeInBounce, gd as easeInCirc, _d as easeInCubic, vd as easeInElastic, yd as easeInExpo, bd as easeInOut, xd as easeInOutBack, Sd as easeInOutBounce, Cd as easeInOutCirc, wd as easeInOutCubic, Td as easeInOutElastic, Ed as easeInOutExpo, Dd as easeInOutQuad, Od as easeInOutQuart, kd as easeInOutQuint, Ad as easeInOutSine, jd as easeInQuad, Md as easeInQuart, Nd as easeInQuint, Pd as easeInSine, Fd as easeOut, Id as easeOutBack, Ld as easeOutBounce, Rd as easeOutCirc, zd as easeOutCubic, Bd as easeOutElastic, Vd as easeOutExpo, Hd as easeOutQuad, Ud as easeOutQuart, Wd as easeOutQuint, Gd as easeOutSine, Bn as editAnchorsAction, Zt as editingLayer, Ve as effectivePose, El as effectiveRangeStyle, Xl as ellipsePath, Es as embedWeaselMetadataInSvg, gf as enableLocalFontOutlines, mr as enterTextEditAction, Yo as enumerateAnchors, vc as evaluate, Fp as evaluateEnabled, Ds as extractWeaselClipboardFromSvg, Si as fillInPoseFrame, Ci as fillToBoundsFrame, Da as findNodeShape, Oa as findShapeBounds, ka as findShapeInk, Aa as findShapeSilhouette, ml as fitTextPose, ht as fitToBounds, _t as fitViewToBounds, gt as fitZoom, on as fixedCornerOf, Zl as flattenCubic, Ql as flattenCubicWithArcLen, fs as flattenPreviews, $l as flattenQuadratic, eu as flattenQuadraticWithArcLen, Ks as focused, _f as fontOutlineRegistry, vf as fontRegistry, Jf as fontString, Ge as forEachCoalesced, gm as formatUnit, I as frameRect, ie as fromPlane, il as gateLayer, Dt as gesturePlaneReader, Ot as gestureViewReader, qs as gesturing, ti as getAlpha01, Sa as getImageBitmap, D as getMarker, ja as getNodeShapes, m as getPaintKind, Ip as getScratch, Ke as getStylusData, s as gradientForBounds, c as gradientGeometry, yf as hasFontOutlines, Kd as hexToOklchDeg, t as hexToRgba, Go as hitAffordanceRegions, Iu as hitAnchor, sn as hitCornerHandle, yo as hitRotationHandle, Oo as hostAnchorCss, ko as hostAnchorRect, Js as hovering, Ys as hoveringSelected, qd as hslToSrgb, Ca as imageStatus, Qt as inPlane, wc as inferredNodeProperties, Fs as inferredNodeRouting, yn as insertAction, $t as insertLayer, $o as insertPreviewExtent, Jd as interpolateSrgb, Ki as interpolateView, Yf as isBoldWeight, aa as isBuiltinToolPref, bf as isCanvasFont, yi as isDebugEnabled, Lp as isEditableTarget, l as isGradientFill, Rp as isInControlWithin, G as isLayerPainted, K as isLayerVisible, h as isPaintKindKnown, Yt as isPathLike, Ti as isPatternSpec, Ie as isPlainObject, Xt as isRectPose, Xf as isSmallCapsLetter, wa as isVectorImageSrc, Et as keySpecShortcut, Gn as lassoSelectAction, xs as layoutArrivalHandler, Zf as layoutMarkdown, Qf as layoutRuns, $f as layoutTextPose, Yd as lerpColorArray, Xd as lerpOklab, Zd as lerpOklch, tu as linePath, Qd as linear, $d as linearSrgbToOklab, ef as linearToSrgb, xf as listFontOutlines, g as listGradientKinds, O as listMarkers, _ as listPaintKinds, zp as liveScope, Sf as loadFontOutlines, Ur as loadTextOutlines, qn as makePinchZoomAction, Nn as makeViewportWheelPanAction, jn as makeViewportZoomAction, ep as markdownToRuns, j as markerInset, M as markerKeyOf, k as markerRegistry, F as markerSites, f as mat3, Bp as matchesKeyBinding, Ze as meanScale, tp as measureText, np as measureTextBounds, rp as measuredWidth, ni as mergeAlphaFromPrev, ff as mergeContributions, Nc as minimapCenterAction, Pc as minimapPanAction, id as mirrorPose, al as modeDecorationLayer, Xs as modeIn, Zs as modeIs, Qs as modeNot, Vp as modeShortcutSpec, Hp as modeShortcuts, $s as modifierHeld, qu as momentum, tn as moveAction, ec as multiActive, Fl as nestedHitTester, tc as never, Cl as nodeHasFlag, n as normalizeHex, Q as normalizeView, Z as normalizeZoom, nc as not, ip as numericWeight, km as nurbs, tf as oklabToLinearSrgb, nf as oklabToOklch, rf as oklabToSrgbU8, af as oklchDegToHex, of as oklchToOklab, Va as onEmptyCanvas, Mt as opFactoryRegistry, As as openFilePicker, Up as openPointerSession, rc as or, Cf as outlineStatus, di as paintAlpha, v as paintKindOf, y as paintKindRegistry, fi as paintWithAlpha, pi as paintWithColor, r as parseColor, i as parseColorToRgba255, bi as parseDebugFlags, Os as parseWeaselClipboardText, Wp as pastDragThreshold, xl as patchRangeStyle, nu as pathCommandCoordCount, ru as pathContainsPoint, iu as pathContainsPolygon, au as pathContainsRect, ou as pathDistanceToPoint, Lr as pathDivide, Rr as pathExclude, su as pathFromD, Ln as pathInPoseFrame, Rn as pathInWorld, zr as pathIntersect, cu as pathIntersectsPolygon, lu as pathIntersectsRect, Rl as pathOriginProjection, qt as pathPoseDescriptor, uu as pathSignedArea, Br as pathSubtract, In as pathToAnchors, Vr as pathUnion, Pa as pickTopMostHit, Jn as pinchZoomAction, Jc as planPixelRender, ae as planeMap, oe as planeMatrix, se as planeToPlane, du as pointAlongPath, fu as pointInPath, ln as pointInRotatedRect, pl as pointInTextPose, Ko as pointRegionFrame, pu as polygonFromPoints, mu as polylineFromPoints, Wt as poseDescriptorForNode, He as poseRotationOf, oa as prefUnit, qe as pressureToWidth, $e as pxExtent, Zu as rainbowVertexColors, Dl as rangeWeight, $c as rasterToPng, De as rebaseLocalPose, Nt as rebuildOp, Rc as reconcileSpecs, un as rectCorners, ce as rectFromPlane, gs as rectMarkerPath, hu as rectPath, le as rectToPlane, wf as registerCanvasFont, Fi as registerContentHandler, z as registerEffect, Tf as registerFont, Ef as registerFontOutlines, A as registerMarker, Ma as registerNodeShape, Pt as registerOpFactory, b as registerPaintKind, x as registerPaintKindLoader, Ft as registeredOpNames, gu as regularPolygonPath, go as releaseCanvasRenderer, Qc as renderDebugSnapshot, ul as renderLabel, Kc as renderNeeds, Dc as renderSceneToCanvas, Yc as renderSceneToPixels, mn as resizeAction, ap as resolveAlign, a as resolveColor, wm as resolveCursor, Tm as resolveCursorTier, mt as resolveDeviceProfile, sf as resolveEasing, Ei as resolveFillPattern, N as resolveMarkerSize, ms as resolveOverlays, Gp as resolveParams, Di as resolvePatternSpec, ps as resolvePreviews, op as resolveRunFace, sp as resolveRuns, Lf as resolveScreenLength, ad as resolveSkeleton, xr as resolveSpatialReference, T as resolveStrokeWidth, cp as resolveTextStyle, _m as resolveUnit, uc as resolveVisibility, _u as reversePath, o as rgbaToHex, sd as rigidRigApply, hn as rotateAction, Do as rotateAroundAABBCenter, Ue as rotatePathAround, dn as rotatePoint, fn as rotatedRectCorners, Tc as rotationDegreesUnit, bo as rotationHandle, _s as roundRectPath, vl as runsToDom, lp as runsToMarkdown, up as runsToPlainText, u as sampleGradientStops, Yi as sampleTrack, rs as satisfiesRange, et as scaleDelta, vu as scalePathToBounds, Ro as sceneFromJSON, bt as sceneNodeClientRect, zo as sceneSelectionStore, No as sceneToAdapter, Kp as scopeBindings, qp as scratchKey, tt as screenAngleOf, Ye as screenToWorld, kt as screenTolerance, dp as scriptMetrics, fp as scriptMetricsFor, Wn as selectFromLasso, ic as selectionAtLeast, ac as selectionEmpty, oc as selectionIs, en as selectionLayer, Ha as selectionMoveBindings, Ua as selectionMoveContribution, Wa as selectionResizeBindings, Ga as selectionResizeContribution, Ka as selectionRotateBindings, qa as selectionRotateContribution, Ja as selectionTransformBindings, Ya as selectionTransformContribution, wl as setFlagOverRange, Jp as setScratch, Na as shapeCoversPoint, Yu as slewToward, Kn as sliceAction, pp as smallCapsScale, mp as smallCapsScaleFor, hp as smallCapsText, ss as snap, ks as sniffWeaselClipboardText, yu as snipPathByPolyline, mi as solid, Qu as solidVertexColors, cd as solveIk, Yp as specificity, Am as spiro, bu as splitPathByPolyline, xu as splitPathBySegment, Su as splitSubpaths, qi as springPose, $u as springVertexColors, vs as squarePath, cf as srgbFloatToOklab, lf as srgbToHsl, uf as srgbToLinear, df as srgbU8ToOklab, Qe as stableStringify, ed as staggerVertexColors, nt as standoff, Cu as starPath, ct as startThresholdDrag, Rf as strokeDashStyleOf, P as strokeInsets, hi as strokeOf, gi as strokeWith, Sl as styleAtRange, Df as subscribeGlyphReady, Ta as subscribeImageReady, q as subscribeToSources, S as switchGradientKind, Oi as textCommand, ki as textCommandFromPose, Ai as textCommandFromRuns, gp as textLineBoxes, _p as textPoseLayoutInput, Wr as textToPath, Gr as textToPathsByPaint, pe as tiledProject, ri as toHex8, ue as toPlane, vp as toRuns, wu as transformPath, yp as transformRunTexts, Tu as translatePath, Gt as translatePoseViaDescriptor, Pe as translateRectPose, xp as trimPolyline, Ji as tweenPose, td as tweenVertexColors, Tl as unboldPatch, Bt as unionAABB, Vt as unionBounds, Eu as unionBoundsPath, gr as unionOfChildren, Il as unionOfChildrenVia, vm as unitScale, Of as unregisterCanvasFont, kf as unregisterFontOutlines, nm as useAction, rm as useActionsRegistry, im as useActiveToolContext, wr as useAlign, Ku as useAnimatedReflow, Zi as useAnimator, Mu as useArrayAdapter, St as useAutoCenter, Bu as useBooleans, Vu as useBooleansAdapter, rl as useCanvasFocus, we as useCanvasSize, Lu as useClipboardOps, Hu as useCreateOutlinesAdapter, Gi as useDecayLoop, am as useDepRegistry, om as useDepSource, Ce as useDeviceProfile, Ru as useDistribute, Nu as useDragGesture, ot as useDragHandle, Fu as useDragRadial, Pu as useDragRect, st as useDropZone, io as useEllipseTool, oo as useEyedropperTool, sm as useGestureDispatcher, Du as useGradientKinds, Za as useHandTool, at as useHandleDrag, Ao as useHostAnchor, fc as useHoverTracking, ao as useImageTool, wt as useKeyState, ra as useKeybindings, co as useLassoTool, Sp as useLatest, Ss as useLayoutArrivals, so as useLineTool, We as useNodeOverlayFrame, cm as useOngoingAction, lm as useOptionalActiveToolContext, um as useOptionalDepRegistry, Ou as usePaintKind, ku as usePaintKinds, no as usePenTool, fo as usePencilTool, yr as usePointerContext, br as usePointerPosition, Je as usePointerStylus, lo as usePolygonTool, Bi as usePoseCompositionDepSource, zi as usePoseDescriptorDepSource, xe as usePoseRun, Ho as usePublishSelection, ro as useRectTool, Ri as useResizePolicy, ld as useRig, Lc as useScene, Po as useSceneAdapter, Al as useSceneTextEdit, Xa as useSelectTool, _o as useSelection, Uo as useSelectionContext, be as useSimulation, Hi as useSliceDep, Ui as useSliceDepSource, po as useSliceTool, Li as useStandardActions, uo as useStarTool, kl as useTextEdit, eo as useTextTool, na as useTools, Wi as useVelocityTracker, $i as useViewAnimation, ea as useViewAnimationOn, ye as useVisibleRaf, dm as useYoke, bp as verticalAlignOffset, L as viewToMat3, $ as viewToTransform, ee as viewZoom, Tn as viewportDragPanAction, Pn as viewportWheelPanAction, Mn as viewportZoomAction, V as vignette, Kt as visualBoundsViaDescriptor, Af as warmFonts, C as warmPaintKinds, Xc as warmRender, On as wheelPan, kn as wheelZoom, An as wheelZoomFactor, sc as when, ii as withAlpha01, Xo as withCoord, d as withGradientKind, rt as withinPxBox, it as withinPxRadius, ol as workspaceTintLayer, zn as worldEditToStorage, Fe as worldPoseLookup, Xe as worldToScreen, vt as zoomAt, cc as zoomAtLeast };
@@ -1,4 +1,4 @@
1
- export { C as CullRect, D as DrawCommand, E as Effect, G as GroupDrawCommand, I as IDENTITY_COLOR_MATRIX, a as ImageDrawCommand, b as ImageMinification, P as PathDrawCommand, R as RenderOptions, c as RenderSpan, d as RenderSpanStats, e as RenderStats, f as RenderTarget, S as SPRITE_STRIDE, g as ShaderDrawCommand, h as SolidPaint, i as SpriteSheet, j as SpritesDrawCommand, k as StrokeOptions, T as TextDrawCommand, W as WeaselRenderer, l as WeaselRendererOptions, m as blur, n as buildGradientRamp, o as cullDrawCommands, p as frameRect, r as registerEffect, t as tessellateStroke, v as viewToMat3, q as vignette } from './builtins-CQcvcLXh.js';
1
+ export { C as CullRect, D as DrawCommand, E as Effect, G as GroupDrawCommand, I as IDENTITY_COLOR_MATRIX, a as ImageDrawCommand, b as ImageMinification, P as PathDrawCommand, R as RenderOptions, c as RenderSpan, d as RenderSpanStats, e as RenderStats, f as RenderTarget, S as SPRITE_STRIDE, g as ShaderDrawCommand, h as SolidPaint, i as SpriteSheet, j as SpritesDrawCommand, k as StrokeOptions, T as TextDrawCommand, W as WeaselRenderer, l as WeaselRendererOptions, m as blur, n as buildGradientRamp, o as cullDrawCommands, p as frameRect, r as registerEffect, t as tessellateStroke, v as viewToMat3, q as vignette } from './builtins-C-VgUlWI.js';
2
2
  export { G as GlMat3, P as ProgramSource, S as ShaderCompileError, a as ShaderProgramHandle, b as ShaderUniform, m as mat3, p as programSourceRegistry, r as registerProgram } from './registerProgram-BMZRDgrh.js';
3
3
  export { Mesh, TessellateOptions, tessellate } from '@weasel-js/geom/tessellate';
4
4
  export { RegisterFontOptions, canQueryLocalFonts, cssFontFamily, cssFontFamilyLoading, enableLocalFontOutlines, fontOutlineRegistry, fontRegistry, hasFontOutlines, isCanvasFont, listFontOutlines, loadFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/version.ts
2
- var e = "1.9.0";
2
+ var e = "1.9.2";
3
3
  //#endregion
4
4
  export { e as VERSION };
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weasel-js/core",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "Domain-agnostic 2D scene graph primitives for React: viewport math, drag/resize/insert/clone interactions, layered canvas rendering.",
5
5
  "license": "MIT",
6
6
  "author": "orochi235",
@@ -85,23 +85,23 @@
85
85
  "typecheck": "tsc --noEmit -p tsconfig.json"
86
86
  },
87
87
  "peerDependencies": {
88
- "@weasel-js/font": "1.9.0",
88
+ "@weasel-js/font": "1.9.2",
89
89
  "react": ">=18"
90
90
  },
91
91
  "dependencies": {
92
- "@msb235/blits": "0.6.0",
93
- "@weasel-js/cursor": "1.9.0",
94
- "@weasel-js/geom": "1.9.0",
95
- "@weasel-js/gestures": "1.9.0",
96
- "@weasel-js/history": "1.9.0",
97
- "@weasel-js/modes": "1.9.0",
98
- "@weasel-js/quantity": "1.9.0",
99
- "@weasel-js/paint": "1.9.0",
100
- "@weasel-js/react": "1.9.0",
101
- "@weasel-js/registry": "1.9.0",
102
- "@weasel-js/routing": "1.9.0",
103
- "@weasel-js/select": "1.9.0",
104
- "@weasel-js/text": "1.9.0",
92
+ "@msb235/blits": "0.7.0",
93
+ "@weasel-js/cursor": "1.9.2",
94
+ "@weasel-js/geom": "1.9.2",
95
+ "@weasel-js/gestures": "1.9.2",
96
+ "@weasel-js/history": "1.9.2",
97
+ "@weasel-js/modes": "1.9.2",
98
+ "@weasel-js/quantity": "1.9.2",
99
+ "@weasel-js/paint": "1.9.2",
100
+ "@weasel-js/react": "1.9.2",
101
+ "@weasel-js/registry": "1.9.2",
102
+ "@weasel-js/routing": "1.9.2",
103
+ "@weasel-js/select": "1.9.2",
104
+ "@weasel-js/text": "1.9.2",
105
105
  "earcut": "3.2.3",
106
106
  "polygon-clipping": "^0.15.7"
107
107
  },
@@ -119,7 +119,7 @@
119
119
  "2d"
120
120
  ],
121
121
  "devDependencies": {
122
- "@weasel-js/modes": "1.9.0",
123
- "@weasel-js/theme": "1.9.0"
122
+ "@weasel-js/modes": "1.9.2",
123
+ "@weasel-js/theme": "1.9.2"
124
124
  }
125
125
  }