@weasel-js/core 1.15.2 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/canvas/NodeShape.js +23 -10
- package/dist/canvas/NodeShape.js.map +1 -1
- package/dist/canvas/SceneCanvas/props.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +4 -1
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js +3 -3
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js.map +1 -1
- package/dist/canvas/SceneCanvas.js +1 -1
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +4 -1
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/nodeShapes/derivedPainter.js +57 -8
- package/dist/canvas/nodeShapes/derivedPainter.js.map +1 -1
- package/dist/canvas/nodeShapes/nodePaint.js +33 -2
- package/dist/canvas/nodeShapes/nodePaint.js.map +1 -1
- package/dist/canvas/nodeShapes/pathPainter.js +5 -4
- package/dist/canvas/nodeShapes/pathPainter.js.map +1 -1
- package/dist/canvas/nodeShapes/pickOutline.js +48 -0
- package/dist/canvas/nodeShapes/pickOutline.js.map +1 -0
- package/dist/canvas/nodeShapes/shapePainter.js +6 -4
- package/dist/canvas/nodeShapes/shapePainter.js.map +1 -1
- package/dist/canvas/paintOverrides.js +43 -0
- package/dist/canvas/paintOverrides.js.map +1 -0
- package/dist/canvas/renderSceneToPixels.js +1 -1
- package/dist/canvas/renderSceneToPixels.js.map +1 -1
- package/dist/canvas/sceneSlotWiring.js +3 -3
- package/dist/canvas/sceneSlotWiring.js.map +1 -1
- package/dist/canvas/sceneViewRender.js +11 -7
- package/dist/canvas/sceneViewRender.js.map +1 -1
- package/dist/canvas/trimOverrides.js +18 -0
- package/dist/canvas/trimOverrides.js.map +1 -0
- package/dist/core/paint/meshKindLazy.js +4 -1
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/scene/pathEffects/textAlong.js +2 -2
- package/dist/core/scene/pathEffects/textAlong.js.map +1 -1
- package/dist/domains/paths/pathLayer.js +20 -6
- package/dist/domains/paths/pathLayer.js.map +1 -1
- package/dist/domains/snap/angle2d.js +2 -2
- package/dist/domains/snap/angle2d.js.map +1 -1
- package/dist/index.d.ts +48 -31
- package/dist/version.js +1 -1
- package/package.json +25 -25
- package/dist/canvas/colorOverrides.js +0 -23
- package/dist/canvas/colorOverrides.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textAlong.js","names":[],"sources":["../../../../src/core/scene/pathEffects/textAlong.ts"],"sourcesContent":["/**\n * Text along a path: a source's items — a text node's grapheme clusters, or a\n * whole shape as one item — laid end to end along a path, each turned to it.\n */\nimport {\n boundsOfPath, clamp01, multiply, pathShape, placeAlongRun, rotate, runLength, trackRun, transformPath, translate,\n type Affine, type Path, type RunAlign, type RunPlace, type TrackSide,\n} from '@weasel-js/geom';\nimport type { DerivedPart } from '../derivedParts';\nimport type { EffectItem, EffectSource, PathEffectOptions } from './source';\nimport { bandParts, type LaidItem } from './textAlongBands';\n\n/**\n * Text (or any shape) laid along a path, item by item. Its sources are `[text, path]`. Only the text's first laid line\n * follows the path; a color glyph keeps its advance and paints nothing. An item's bands — underline, strikethrough and\n * overline — join their alike neighbors' and bend with the path as one ribbon, while the glyphs stay rigid.\n * On an open path an item whose middle falls past either end is not drawn; on a closed one the text wraps past the\n * seam, and an item a whole lap on from the first item's start is not drawn.\n */\nexport interface TextAlongEffect extends PathEffectOptions {\n kind: 'textAlong';\n /** Which part of the text sits at `start`. Default `'start'`. */\n align?: RunAlign;\n /** Where the text sits, as a fraction 0..1 of the path's length from its first point. Default 0. */\n start?: number;\n /** How far the anchor line sits off the path, toward the glyphs' up, in world units. Default 0. */\n shift?: number;\n /** What sits on the path: the glyphs' baseline, or (`'center'`) their x-height middle. Default `'baseline'`. */\n anchor?: 'baseline' | 'center';\n /** Text longer than its room is cut at the path's end (`'clip'`), or has the gaps between items squeezed until it\n * fits (`'fit'`). Default `'clip'`. */\n overflow?: 'clip' | 'fit';\n /** Which side of the path the glyphs stand on; see `TrackSide`. Default `'auto'`, whichever reads upright. Turned over,\n * the text keeps the stretch of path it had, and on an open path drops whichever letters fall off it. */\n side?: TrackSide;\n}\n\nconst LEAD: Record<RunAlign, number> = { start: 0, center: 0.5, end: 1 };\n\n/** The parts `items` paint laid along `path` as `effect` says; `[]` when there is nothing to lay or nowhere to lay it. */\nexport function textAlongParts(effect: TextAlongEffect, items: readonly EffectItem[], path: Path): DerivedPart[] {\n const shape = pathShape(path);\n if (shape === null || !(shape.length > 0) || items.length === 0) return [];\n const L = shape.length;\n const closed = shape.closed;\n const lengths = items.map((it) => it.length);\n const k = LEAD[effect.align ?? 'start'];\n const at = unit(effect.start ?? 0) * L;\n const gap = effect.overflow === 'fit' ? fitGap(lengths, roomAt(at, L, k, closed)) : 0;\n const total = runLength(lengths, gap);\n const c = at + (0.5 - k) * total;\n const about = closed ? ((c / L) % 1 + 1) % 1 : unit(c / L);\n const run = trackRun(shape, 0, 1, { side: effect.side ?? 'auto', about });\n const shift = finiteOr(effect.shift, 0);\n const places = placeAlongRun(run, lengths, { gap, align: 'center', at: run.reversed ? L - c : c, shift, wrap: closed });\n const center = effect.anchor === 'center';\n const out: DerivedPart[] = [];\n const laid: (LaidItem | null)[] = [];\n const firstStart = places[0]!.center - lengths[0]! / 2;\n places.forEach((place, i) => {\n // By center (SVG textPath's rule), not by RunPlace.clipped, which judges by extent.\n if (dropped(place, closed ? firstStart : null, L)) {\n laid.push(null);\n return;\n }\n const item = items[i]!;\n const lift = center ? item.middle : 0;\n const m = itemFrame(place, item.length, lift);\n for (const part of item.parts) out.push({ ...part, path: transformPath(part.path, m) });\n laid.push({ item, start: place.center - item.length / 2, lift });\n });\n if (items.some((it) => it.bands !== undefined && it.bands.length > 0)) out.push(...bandParts(laid, run, shift));\n return out;\n}\n\n/** `source`'s whole outline as one item: its bounds' left at x = 0 and their vertical middle on the anchor line. */\nexport function wholeItem(source: EffectSource): EffectItem {\n const b = boundsOfPath(source.world);\n return {\n length: b.width,\n middle: 0,\n parts: [{\n path: transformPath(source.world, translate(-b.x, -(b.y + b.height / 2))),\n fill: source.fill,\n stroke: source.stroke,\n }],\n };\n}\n\n/** SVG `textPath`'s rule: an item is not drawn once its middle is past an open path's ends, or on a closed path a whole\n * lap or more on from the first item's start. Judged within a hair of rounding. */\nfunction dropped(place: RunPlace, firstStart: number | null, L: number): boolean {\n const hair = 1e-9 * Math.max(1, L);\n if (firstStart !== null) return place.center - firstStart >= L - hair;\n return place.center < -hair || place.center > L + hair;\n}\n\n/** How much path the text has before it runs off, from `at`, with `k` of it laid back behind `at`. */\nfunction roomAt(at: number, L: number, k: number, closed: boolean): number {\n if (closed) return L;\n return k === 0 ? L - at : k === 1 ? at : 2 * Math.min(at, L - at);\n}\n\n/** The gap that makes `lengths` fill `room`, or 0 when they fit already. Never so negative that an item's step back\n * from the one before it (its length plus the gap) goes below zero, so items keep their order in too short a room. */\nfunction fitGap(lengths: readonly number[], room: number): number {\n const total = runLength(lengths, 0);\n if (!(total > room) || lengths.length < 2) return 0;\n let floor = -Infinity;\n for (let i = 1; i < lengths.length; i++) floor = Math.max(floor, -(lengths[i - 1]! + lengths[i]!) / 2);\n return Math.max((room - total) / (lengths.length - 1), floor);\n}\n\n/** Item frame to world: its middle on `place`, turned to it, its anchor line `lift` above y = 0 brought onto the path. */\nfunction itemFrame(place: RunPlace, length: number, lift: number): Affine {\n const turn = multiply(rotate(
|
|
1
|
+
{"version":3,"file":"textAlong.js","names":[],"sources":["../../../../src/core/scene/pathEffects/textAlong.ts"],"sourcesContent":["/**\n * Text along a path: a source's items — a text node's grapheme clusters, or a\n * whole shape as one item — laid end to end along a path, each turned to it.\n */\nimport {\n DEG_TO_RAD, boundsOfPath, clamp01, multiply, pathShape, placeAlongRun, rotate, runLength, trackRun, transformPath, translate,\n type Affine, type Path, type RunAlign, type RunPlace, type TrackSide,\n} from '@weasel-js/geom';\nimport type { DerivedPart } from '../derivedParts';\nimport type { EffectItem, EffectSource, PathEffectOptions } from './source';\nimport { bandParts, type LaidItem } from './textAlongBands';\n\n/**\n * Text (or any shape) laid along a path, item by item. Its sources are `[text, path]`. Only the text's first laid line\n * follows the path; a color glyph keeps its advance and paints nothing. An item's bands — underline, strikethrough and\n * overline — join their alike neighbors' and bend with the path as one ribbon, while the glyphs stay rigid.\n * On an open path an item whose middle falls past either end is not drawn; on a closed one the text wraps past the\n * seam, and an item a whole lap on from the first item's start is not drawn.\n */\nexport interface TextAlongEffect extends PathEffectOptions {\n kind: 'textAlong';\n /** Which part of the text sits at `start`. Default `'start'`. */\n align?: RunAlign;\n /** Where the text sits, as a fraction 0..1 of the path's length from its first point. Default 0. */\n start?: number;\n /** How far the anchor line sits off the path, toward the glyphs' up, in world units. Default 0. */\n shift?: number;\n /** What sits on the path: the glyphs' baseline, or (`'center'`) their x-height middle. Default `'baseline'`. */\n anchor?: 'baseline' | 'center';\n /** Text longer than its room is cut at the path's end (`'clip'`), or has the gaps between items squeezed until it\n * fits (`'fit'`). Default `'clip'`. */\n overflow?: 'clip' | 'fit';\n /** Which side of the path the glyphs stand on; see `TrackSide`. Default `'auto'`, whichever reads upright. Turned over,\n * the text keeps the stretch of path it had, and on an open path drops whichever letters fall off it. */\n side?: TrackSide;\n}\n\nconst LEAD: Record<RunAlign, number> = { start: 0, center: 0.5, end: 1 };\n\n/** The parts `items` paint laid along `path` as `effect` says; `[]` when there is nothing to lay or nowhere to lay it. */\nexport function textAlongParts(effect: TextAlongEffect, items: readonly EffectItem[], path: Path): DerivedPart[] {\n const shape = pathShape(path);\n if (shape === null || !(shape.length > 0) || items.length === 0) return [];\n const L = shape.length;\n const closed = shape.closed;\n const lengths = items.map((it) => it.length);\n const k = LEAD[effect.align ?? 'start'];\n const at = unit(effect.start ?? 0) * L;\n const gap = effect.overflow === 'fit' ? fitGap(lengths, roomAt(at, L, k, closed)) : 0;\n const total = runLength(lengths, gap);\n const c = at + (0.5 - k) * total;\n const about = closed ? ((c / L) % 1 + 1) % 1 : unit(c / L);\n const run = trackRun(shape, 0, 1, { side: effect.side ?? 'auto', about });\n const shift = finiteOr(effect.shift, 0);\n const places = placeAlongRun(run, lengths, { gap, align: 'center', at: run.reversed ? L - c : c, shift, wrap: closed });\n const center = effect.anchor === 'center';\n const out: DerivedPart[] = [];\n const laid: (LaidItem | null)[] = [];\n const firstStart = places[0]!.center - lengths[0]! / 2;\n places.forEach((place, i) => {\n // By center (SVG textPath's rule), not by RunPlace.clipped, which judges by extent.\n if (dropped(place, closed ? firstStart : null, L)) {\n laid.push(null);\n return;\n }\n const item = items[i]!;\n const lift = center ? item.middle : 0;\n const m = itemFrame(place, item.length, lift);\n for (const part of item.parts) out.push({ ...part, path: transformPath(part.path, m) });\n laid.push({ item, start: place.center - item.length / 2, lift });\n });\n if (items.some((it) => it.bands !== undefined && it.bands.length > 0)) out.push(...bandParts(laid, run, shift));\n return out;\n}\n\n/** `source`'s whole outline as one item: its bounds' left at x = 0 and their vertical middle on the anchor line. */\nexport function wholeItem(source: EffectSource): EffectItem {\n const b = boundsOfPath(source.world);\n return {\n length: b.width,\n middle: 0,\n parts: [{\n path: transformPath(source.world, translate(-b.x, -(b.y + b.height / 2))),\n fill: source.fill,\n stroke: source.stroke,\n }],\n };\n}\n\n/** SVG `textPath`'s rule: an item is not drawn once its middle is past an open path's ends, or on a closed path a whole\n * lap or more on from the first item's start. Judged within a hair of rounding. */\nfunction dropped(place: RunPlace, firstStart: number | null, L: number): boolean {\n const hair = 1e-9 * Math.max(1, L);\n if (firstStart !== null) return place.center - firstStart >= L - hair;\n return place.center < -hair || place.center > L + hair;\n}\n\n/** How much path the text has before it runs off, from `at`, with `k` of it laid back behind `at`. */\nfunction roomAt(at: number, L: number, k: number, closed: boolean): number {\n if (closed) return L;\n return k === 0 ? L - at : k === 1 ? at : 2 * Math.min(at, L - at);\n}\n\n/** The gap that makes `lengths` fill `room`, or 0 when they fit already. Never so negative that an item's step back\n * from the one before it (its length plus the gap) goes below zero, so items keep their order in too short a room. */\nfunction fitGap(lengths: readonly number[], room: number): number {\n const total = runLength(lengths, 0);\n if (!(total > room) || lengths.length < 2) return 0;\n let floor = -Infinity;\n for (let i = 1; i < lengths.length; i++) floor = Math.max(floor, -(lengths[i - 1]! + lengths[i]!) / 2);\n return Math.max((room - total) / (lengths.length - 1), floor);\n}\n\n/** Item frame to world: its middle on `place`, turned to it, its anchor line `lift` above y = 0 brought onto the path. */\nfunction itemFrame(place: RunPlace, length: number, lift: number): Affine {\n const turn = multiply(rotate(place.angle * DEG_TO_RAD), translate(-length / 2, lift));\n return multiply(translate(place.point.x, place.point.y), turn);\n}\n\n/** `clamp01`, with `NaN` read as 0. */\nconst unit = (v: number): number => clamp01(v) || 0;\nconst finiteOr = (v: number | undefined, d: number): number => (v !== undefined && Number.isFinite(v) ? v : d);\n"],"mappings":";;;;;;;;AAqCA,IAAM,OAAiC;CAAE,OAAO;CAAG,QAAQ;CAAK,KAAK;AAAE;;AAGvE,SAAgB,eAAe,QAAyB,OAA8B,MAA2B;CAC/G,MAAM,QAAQ,UAAU,IAAI;CAC5B,IAAI,UAAU,QAAQ,EAAE,MAAM,SAAS,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;CACzE,MAAM,IAAI,MAAM;CAChB,MAAM,SAAS,MAAM;CACrB,MAAM,UAAU,MAAM,KAAK,OAAO,GAAG,MAAM;CAC3C,MAAM,IAAI,KAAK,OAAO,SAAS;CAC/B,MAAM,KAAK,KAAK,OAAO,SAAS,CAAC,IAAI;CACrC,MAAM,MAAM,OAAO,aAAa,QAAQ,OAAO,SAAS,OAAO,IAAI,GAAG,GAAG,MAAM,C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1,6 @@
|
|
|
1
|
+
import { subscribeToSources } from "../../core/layers/redrawSource.js";
|
|
2
|
+
import { paintOverrideSources } from "../../canvas/paintOverrides.js";
|
|
3
|
+
import { overrideTrim } from "../../canvas/trimOverrides.js";
|
|
1
4
|
import "@weasel-js/renderer";
|
|
2
5
|
import { countPathAnchors } from "@weasel-js/geom";
|
|
3
6
|
import { isDev } from "@weasel-js/react";
|
|
@@ -9,14 +12,29 @@ var PLACEHOLDER_STROKE = {
|
|
|
9
12
|
paint: { color: "#ffffff" },
|
|
10
13
|
width: 1
|
|
11
14
|
};
|
|
15
|
+
/** `base` with the per-anchor arrays that validated, and a trim override's edges. */
|
|
16
|
+
function strokeWith(base, vertexColors, vertexWidths, override) {
|
|
17
|
+
const trim = overrideTrim(base.trim, override);
|
|
18
|
+
return {
|
|
19
|
+
...base,
|
|
20
|
+
...vertexColors != null ? { vertexColors } : {},
|
|
21
|
+
...vertexWidths != null ? { vertexWidths } : {},
|
|
22
|
+
...trim !== void 0 ? { trim } : {}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
12
25
|
/** Build a `RenderLayer` that fills/strokes `Path` instances enumerated from a node list. */
|
|
13
26
|
function createPathLayer(opts) {
|
|
14
|
-
const { id = "paths", label = "Paths", getNodes, getPath, getFill, getStroke, isHidden, getVertexColors, getStrokeVertexColors, getStrokeVertexWidths, colorOverrides, now = () => typeof performance !== "undefined" ? performance.now() : Date.now() } = opts;
|
|
27
|
+
const { id = "paths", label = "Paths", getNodes, getPath, getFill, getStroke, isHidden, getVertexColors, getStrokeVertexColors, getStrokeVertexWidths, colorOverrides, trimOverrides, now = () => typeof performance !== "undefined" ? performance.now() : Date.now() } = opts;
|
|
15
28
|
const warned = /* @__PURE__ */ new Set();
|
|
16
29
|
const dev = isDev();
|
|
30
|
+
const sources = paintOverrideSources({
|
|
31
|
+
colorOverrides,
|
|
32
|
+
trimOverrides
|
|
33
|
+
});
|
|
17
34
|
return {
|
|
18
35
|
id,
|
|
19
36
|
label,
|
|
37
|
+
...sources.length > 0 ? { subscribe: subscribeToSources(sources) } : {},
|
|
20
38
|
draw: () => {
|
|
21
39
|
const children = [];
|
|
22
40
|
const nodes = getNodes();
|
|
@@ -71,11 +89,7 @@ function createPathLayer(opts) {
|
|
|
71
89
|
}
|
|
72
90
|
}
|
|
73
91
|
const baseStroke = strokeFromHook != null ? strokeFromHook : useStrokeVColors != null || useStrokeVWidths != null ? PLACEHOLDER_STROKE : void 0;
|
|
74
|
-
const stroke = baseStroke
|
|
75
|
-
...baseStroke,
|
|
76
|
-
...useStrokeVColors != null ? { vertexColors: useStrokeVColors } : {},
|
|
77
|
-
...useStrokeVWidths != null ? { vertexWidths: useStrokeVWidths } : {}
|
|
78
|
-
} : baseStroke;
|
|
92
|
+
const stroke = baseStroke && strokeWith(baseStroke, useStrokeVColors, useStrokeVWidths, trimOverrides?.resolve(nodeId));
|
|
79
93
|
if (fill == null && stroke == null) continue;
|
|
80
94
|
children.push({
|
|
81
95
|
kind: "path",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathLayer.js","names":[],"sources":["../../../src/domains/paths/pathLayer.ts"],"sourcesContent":["/**\n * `RenderLayer` that fills/strokes `Path` instances. Mirrors the shape of\n * `createTextLayer`: caller hands over a `getNodes()` enumerator and a\n * `getPath(node)` lookup; the layer iterates and renders. Fill and\n * stroke are looked up per node so consumers can keep the path geometry\n * separate from the visual style record (the typical scene-graph layout).\n */\n\nimport { type DrawCommand } from '@weasel-js/renderer';\nimport { type CommandStroke, type CommandFill, type VertexWidth } from '@weasel-js/paint';\nimport type { RenderLayer } from 'core/layers/render';\nimport { type Path, countPathAnchors } from '@weasel-js/geom';\nimport type { ColorOverrideRegistry } from '@weasel-js/animator';\nimport { isDev } from '@weasel-js/react';\n\nconst PLACEHOLDER_FILL: CommandFill = { paint: { color: '#ffffff' } };\nconst PLACEHOLDER_STROKE: CommandStroke = { paint: { color: '#ffffff' }, width: 1 };\n\n\n/** Options for `createPathLayer`. */\nexport interface CreatePathLayerOpts<T> {\n id?: string;\n label?: string;\n getNodes: () => readonly T[];\n getPath: (node: T) => Path;\n /** Per-node fill. Return `null`/`undefined` to skip filling. */\n getFill?: (node: T) => CommandFill | null | undefined;\n /** Per-node stroke. Return `null`/`undefined` to skip stroking. */\n getStroke?: (node: T) => CommandStroke | null | undefined;\n /** Optional per-node hide hook (e.g., suppress while editing). */\n isHidden?: (node: T) => boolean;\n /**\n * Per-node fill vertex-color array, flat RGBA-per-path-anchor, in\n * 0..1 floats (same color space as `PathDrawCommand.vertexColors`).\n * Length must be `4 × countPathAnchors(getPath(node))`. When set and\n * `getFill` returns null/undefined, a white placeholder fill is\n * synthesized so the renderer's per-vertex shader path activates.\n */\n getVertexColors?: (node: T) => number[] | null | undefined;\n /**\n * Per-node stroke vertex-color array, flat RGBA-per-path-anchor, in\n * 0..1 floats (same color space as `Stroke.vertexColors`).\n * Length must be `4 × countPathAnchors(getPath(node))`. When set and\n * `getStroke` returns null/undefined, a white 1px placeholder stroke\n * is synthesized.\n */\n getStrokeVertexColors?: (node: T) => number[] | null | undefined;\n /**\n * Per-node stroke vertex-width array (one `VertexWidth` per anchor: a\n * width, or a `{ left, right }` pair).\n * Length must be `countPathAnchors(getPath(node))`. The tessellator\n * interpolates half-widths along each segment for tapered strokes.\n * When set and `getStroke` returns null/undefined, a 1px placeholder\n * stroke is synthesized so the per-anchor widths take effect.\n */\n getStrokeVertexWidths?: (node: T) => VertexWidth[] | null | undefined;\n /**\n * Optional color override registry, typically `animator.colorOverrides`.\n * When set, the renderer consults it before falling back to\n * `getVertexColors` / `getStrokeVertexColors`. Function-form overrides\n * receive the base color array and the current animation timestamp.\n */\n colorOverrides?: ColorOverrideRegistry;\n /** Clock used to timestamp function-form color overrides. Defaults to\n * `performance.now`. Override in tests. */\n now?: () => number;\n}\n\n/** Build a `RenderLayer` that fills/strokes `Path` instances enumerated from a node list. */\nexport function createPathLayer<T>(opts: CreatePathLayerOpts<T>): RenderLayer<unknown> {\n const {\n id = 'paths', label = 'Paths',\n getNodes, getPath, getFill, getStroke, isHidden,\n getVertexColors, getStrokeVertexColors, getStrokeVertexWidths,\n colorOverrides,\n now = (): number => (typeof performance !== 'undefined' ? performance.now() : Date.now()),\n } = opts;\n const warned = new Set<string>();\n const dev = isDev();\n\n return {\n id,\n label,\n draw: () => {\n const children: DrawCommand[] = [];\n const nodes = getNodes();\n for (let idx = 0; idx < nodes.length; idx++) {\n const node = nodes[idx];\n if (isHidden?.(node)) continue;\n const path = getPath(node);\n const fillFromHook = getFill?.(node);\n const strokeFromHook = getStroke?.(node);\n const baseVColors = getVertexColors?.(node);\n const baseStrokeVColors = getStrokeVertexColors?.(node);\n const strokeVWidths = getStrokeVertexWidths?.(node);\n\n const nodeId = (node as { id?: string }).id ?? String(idx);\n const tMs = colorOverrides ? now() : 0;\n\n const vColors = colorOverrides\n ? colorOverrides.resolve(nodeId, 'fill', baseVColors ?? undefined, tMs)\n : baseVColors;\n const strokeVColors = colorOverrides\n ? colorOverrides.resolve(nodeId, 'stroke', baseStrokeVColors ?? undefined, tMs)\n : baseStrokeVColors;\n\n const nodeKey = nodeId;\n const anchorCount = countPathAnchors(path);\n const expectedLen = 4 * anchorCount;\n\n let useVColors: readonly number[] | null = null;\n if (vColors != null) {\n if (vColors.length === expectedLen) {\n useVColors = vColors;\n } else if (dev) {\n const key = `${id}:${nodeKey}:fill`;\n if (!warned.has(key)) {\n warned.add(key);\n console.warn(\n `[createPathLayer ${id}] node ${nodeKey}: fill vertexColors length ${vColors.length}, expected ${expectedLen}; dropping`,\n );\n }\n }\n }\n\n let useStrokeVColors: readonly number[] | null = null;\n if (strokeVColors != null) {\n if (strokeVColors.length === expectedLen) {\n useStrokeVColors = strokeVColors;\n } else if (dev) {\n const key = `${id}:${nodeKey}:stroke`;\n if (!warned.has(key)) {\n warned.add(key);\n console.warn(\n `[createPathLayer ${id}] node ${nodeKey}: stroke vertexColors length ${strokeVColors.length}, expected ${expectedLen}; dropping`,\n );\n }\n }\n }\n\n // Synthesize placeholder only when colors validate (useVColors != null),\n // not on any raw hook return. Mismatched-length arrays drop both the\n // colors and placeholder so the dev signal (console warning) isn't duplicated.\n const fill: CommandFill | undefined =\n fillFromHook != null ? fillFromHook\n : (useVColors != null ? PLACEHOLDER_FILL : undefined);\n\n let useStrokeVWidths: VertexWidth[] | null = null;\n if (strokeVWidths != null) {\n if (strokeVWidths.length === anchorCount) {\n useStrokeVWidths = strokeVWidths;\n } else if (dev) {\n const key = `${id}:${nodeKey}:strokeWidths`;\n if (!warned.has(key)) {\n warned.add(key);\n console.warn(\n `[createPathLayer ${id}] node ${nodeKey}: stroke vertexWidths length ${strokeVWidths.length}, expected ${anchorCount}; dropping`,\n );\n }\n }\n }\n\n const baseStroke: CommandStroke | undefined =\n strokeFromHook != null ? strokeFromHook\n : (useStrokeVColors != null || useStrokeVWidths != null ? PLACEHOLDER_STROKE : undefined);\n\n const stroke: CommandStroke | undefined =\n baseStroke != null\n ? {\n ...baseStroke,\n ...(useStrokeVColors != null ? { vertexColors: useStrokeVColors as number[] } : {}),\n ...(useStrokeVWidths != null ? { vertexWidths: useStrokeVWidths } : {}),\n }\n : baseStroke;\n\n if (fill == null && stroke == null) continue;\n\n children.push({\n kind: 'path',\n path,\n ...(fill != null ? { fill } : {}),\n ...(stroke != null ? { stroke } : {}),\n ...(useVColors != null ? { vertexColors: useVColors as number[] } : {}),\n });\n }\n // World-space commands; drawLayers wraps in viewToMat3 automatically.\n return children;\n },\n };\n}\n"],"mappings":";;;;;;AAeA,IAAM,mBAAgC,EAAE,OAAO,EAAE,OAAO,UAAU,EAAE;AACpE,IAAM,qBAAoC;CAAE,OAAO,EAAE,OAAO,UAAU;CAAG,OAAO;AAAE;;AAqDlF,SAAgB,gBAAmB,MAAoD;CACrF,MAAM,EACJ,KAAK,SAAS,QAAQ,SACtB,UAAU,SAAS,SAAS,WAAW,UACvC,iBAAiB,uBAAuB,uBACxC,gBACA,YAAqB,OAAO,gBAAgB,cAAc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G,GAAG,GAAG,QAAQ;MAC7B,IAAI,CAAC,OAAO,IAAI,GAAG,GAAG;OACpB,OAAO,IAAI,GAAG;OACd,QAAQ,KACN,oBAAoB,GAAG,SAAS,QAAQ,+BAA+B,cAAc,OAAO,aAAa,YAAY,WACvH;MACF;KACF;IACF;IAKA,MAAM,OACJ,gBAAgB,OAAO,eACpB,cAAc,OAAO,mBAAmB;IAE7C,IAAI,mBAAyC;IAC7C,IAAI,iBAAiB,MAAM;KACzB,IAAI,cAAc,WAAW,aAC3B,mBAAmB;UACd,IAAI,KAAK;MACd,MAAM,MAAM,GAAG,GAAG,GAAG,QAAQ;MAC7B,IAAI,CAAC,OAAO,IAAI,GAAG,GAAG;OACpB,OAAO,IAAI,GAAG;OACd,QAAQ,KACN,oBAAoB,GAAG,SAAS,QAAQ,+BAA+B,cAAc,OAAO,aAAa,YAAY,WACvH;MACF;KACF;IACF;IAEA,MAAM,aACJ,kBAAkB,OAAO,iBACtB,oBAAoB,QAAQ,oBAAoB,OAAO,qBAAqB;IAEjF,MAAM,SACJ,cAAc,OACV;KACE,GAAG;KACH,GAAI,oBAAoB,OAAO,EAAE,cAAc,iBAA6B,IAAI,CAAC;KACjF,GAAI,oBAAoB,OAAO,EAAE,cAAc,iBAAiB,IAAI,CAAC;IACvE,IACA;IAEN,IAAI,QAAQ,QAAQ,UAAU,MAAM;IAEpC,SAAS,KAAK;KACZ,MAAM;KACN;KACA,GAAI,QAAQ,OAAO,EAAE,KAAK,IAAI,CAAC;KAC/B,GAAI,UAAU,OAAO,EAAE,OAAO,IAAI,CAAC;KACnC,GAAI,cAAc,OAAO,EAAE,cAAc,WAAuB,IAAI,CAAC;IACvE,CAAC;GACH;GAEA,OAAO;EACT;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"pathLayer.js","names":[],"sources":["../../../src/domains/paths/pathLayer.ts"],"sourcesContent":["/**\n * `RenderLayer` that fills/strokes `Path` instances. Mirrors the shape of\n * `createTextLayer`: caller hands over a `getNodes()` enumerator and a\n * `getPath(node)` lookup; the layer iterates and renders. Fill and\n * stroke are looked up per node so consumers can keep the path geometry\n * separate from the visual style record (the typical scene-graph layout).\n */\n\nimport { type DrawCommand } from '@weasel-js/renderer';\nimport { type CommandStroke, type CommandFill, type VertexWidth } from '@weasel-js/paint';\nimport { subscribeToSources, type RenderLayer } from 'core/layers/render';\nimport { paintOverrideSources, type PaintOverrides } from 'canvas/paintOverrides';\nimport { type Path, countPathAnchors } from '@weasel-js/geom';\nimport type { TrimOverride } from '@weasel-js/animator';\nimport { overrideTrim } from 'canvas/trimOverrides';\nimport { isDev } from '@weasel-js/react';\n\nconst PLACEHOLDER_FILL: CommandFill = { paint: { color: '#ffffff' } };\nconst PLACEHOLDER_STROKE: CommandStroke = { paint: { color: '#ffffff' }, width: 1 };\n\n\n/** Options for `createPathLayer`. Its animated paint, typically an animator,\n * comes before `getVertexColors`, `getStrokeVertexColors` and `getStroke`'s\n * trim; a function-form color override receives the base colors and the\n * timestamp `now` gives. The layer repaints for a `set` or `clear` on either registry. */\nexport interface CreatePathLayerOpts<T> extends PaintOverrides {\n id?: string;\n label?: string;\n getNodes: () => readonly T[];\n getPath: (node: T) => Path;\n /** Per-node fill. Return `null`/`undefined` to skip filling. */\n getFill?: (node: T) => CommandFill | null | undefined;\n /** Per-node stroke. Return `null`/`undefined` to skip stroking. */\n getStroke?: (node: T) => CommandStroke | null | undefined;\n /** Optional per-node hide hook (e.g., suppress while editing). */\n isHidden?: (node: T) => boolean;\n /**\n * Per-node fill vertex-color array, flat RGBA-per-path-anchor, in\n * 0..1 floats (same color space as `PathDrawCommand.vertexColors`).\n * Length must be `4 × countPathAnchors(getPath(node))`. When set and\n * `getFill` returns null/undefined, a white placeholder fill is\n * synthesized so the renderer's per-vertex shader path activates.\n */\n getVertexColors?: (node: T) => number[] | null | undefined;\n /**\n * Per-node stroke vertex-color array, flat RGBA-per-path-anchor, in\n * 0..1 floats (same color space as `Stroke.vertexColors`).\n * Length must be `4 × countPathAnchors(getPath(node))`. When set and\n * `getStroke` returns null/undefined, a white 1px placeholder stroke\n * is synthesized.\n */\n getStrokeVertexColors?: (node: T) => number[] | null | undefined;\n /**\n * Per-node stroke vertex-width array (one `VertexWidth` per anchor: a\n * width, or a `{ left, right }` pair).\n * Length must be `countPathAnchors(getPath(node))`. The tessellator\n * interpolates half-widths along each segment for tapered strokes.\n * When set and `getStroke` returns null/undefined, a 1px placeholder\n * stroke is synthesized so the per-anchor widths take effect.\n */\n getStrokeVertexWidths?: (node: T) => VertexWidth[] | null | undefined;\n /** Clock used to timestamp function-form color overrides. Defaults to\n * `performance.now`. Override in tests. */\n now?: () => number;\n}\n\n/** `base` with the per-anchor arrays that validated, and a trim override's edges. */\nfunction strokeWith(\n base: CommandStroke,\n vertexColors: readonly number[] | null,\n vertexWidths: VertexWidth[] | null,\n override: TrimOverride | undefined,\n): CommandStroke {\n const trim = overrideTrim(base.trim, override);\n return {\n ...base,\n ...(vertexColors != null ? { vertexColors: vertexColors as number[] } : {}),\n ...(vertexWidths != null ? { vertexWidths } : {}),\n ...(trim !== undefined ? { trim } : {}),\n };\n}\n\n/** Build a `RenderLayer` that fills/strokes `Path` instances enumerated from a node list. */\nexport function createPathLayer<T>(opts: CreatePathLayerOpts<T>): RenderLayer<unknown> {\n const {\n id = 'paths', label = 'Paths',\n getNodes, getPath, getFill, getStroke, isHidden,\n getVertexColors, getStrokeVertexColors, getStrokeVertexWidths,\n colorOverrides, trimOverrides,\n now = (): number => (typeof performance !== 'undefined' ? performance.now() : Date.now()),\n } = opts;\n const warned = new Set<string>();\n const dev = isDev();\n const sources = paintOverrideSources({ colorOverrides, trimOverrides });\n\n return {\n id,\n label,\n ...(sources.length > 0 ? { subscribe: subscribeToSources(sources) } : {}),\n draw: () => {\n const children: DrawCommand[] = [];\n const nodes = getNodes();\n for (let idx = 0; idx < nodes.length; idx++) {\n const node = nodes[idx];\n if (isHidden?.(node)) continue;\n const path = getPath(node);\n const fillFromHook = getFill?.(node);\n const strokeFromHook = getStroke?.(node);\n const baseVColors = getVertexColors?.(node);\n const baseStrokeVColors = getStrokeVertexColors?.(node);\n const strokeVWidths = getStrokeVertexWidths?.(node);\n\n const nodeId = (node as { id?: string }).id ?? String(idx);\n const tMs = colorOverrides ? now() : 0;\n\n const vColors = colorOverrides\n ? colorOverrides.resolve(nodeId, 'fill', baseVColors ?? undefined, tMs)\n : baseVColors;\n const strokeVColors = colorOverrides\n ? colorOverrides.resolve(nodeId, 'stroke', baseStrokeVColors ?? undefined, tMs)\n : baseStrokeVColors;\n\n const nodeKey = nodeId;\n const anchorCount = countPathAnchors(path);\n const expectedLen = 4 * anchorCount;\n\n let useVColors: readonly number[] | null = null;\n if (vColors != null) {\n if (vColors.length === expectedLen) {\n useVColors = vColors;\n } else if (dev) {\n const key = `${id}:${nodeKey}:fill`;\n if (!warned.has(key)) {\n warned.add(key);\n console.warn(\n `[createPathLayer ${id}] node ${nodeKey}: fill vertexColors length ${vColors.length}, expected ${expectedLen}; dropping`,\n );\n }\n }\n }\n\n let useStrokeVColors: readonly number[] | null = null;\n if (strokeVColors != null) {\n if (strokeVColors.length === expectedLen) {\n useStrokeVColors = strokeVColors;\n } else if (dev) {\n const key = `${id}:${nodeKey}:stroke`;\n if (!warned.has(key)) {\n warned.add(key);\n console.warn(\n `[createPathLayer ${id}] node ${nodeKey}: stroke vertexColors length ${strokeVColors.length}, expected ${expectedLen}; dropping`,\n );\n }\n }\n }\n\n // Synthesize placeholder only when colors validate (useVColors != null),\n // not on any raw hook return. Mismatched-length arrays drop both the\n // colors and placeholder so the dev signal (console warning) isn't duplicated.\n const fill: CommandFill | undefined =\n fillFromHook != null ? fillFromHook\n : (useVColors != null ? PLACEHOLDER_FILL : undefined);\n\n let useStrokeVWidths: VertexWidth[] | null = null;\n if (strokeVWidths != null) {\n if (strokeVWidths.length === anchorCount) {\n useStrokeVWidths = strokeVWidths;\n } else if (dev) {\n const key = `${id}:${nodeKey}:strokeWidths`;\n if (!warned.has(key)) {\n warned.add(key);\n console.warn(\n `[createPathLayer ${id}] node ${nodeKey}: stroke vertexWidths length ${strokeVWidths.length}, expected ${anchorCount}; dropping`,\n );\n }\n }\n }\n\n const baseStroke: CommandStroke | undefined =\n strokeFromHook != null ? strokeFromHook\n : (useStrokeVColors != null || useStrokeVWidths != null ? PLACEHOLDER_STROKE : undefined);\n\n const stroke = baseStroke && strokeWith(baseStroke, useStrokeVColors, useStrokeVWidths, trimOverrides?.resolve(nodeId));\n\n if (fill == null && stroke == null) continue;\n\n children.push({\n kind: 'path',\n path,\n ...(fill != null ? { fill } : {}),\n ...(stroke != null ? { stroke } : {}),\n ...(useVColors != null ? { vertexColors: useVColors as number[] } : {}),\n });\n }\n // World-space commands; drawLayers wraps in viewToMat3 automatically.\n return children;\n },\n };\n}\n"],"mappings":";;;;;;;;;AAiBA,IAAM,mBAAgC,EAAE,OAAO,EAAE,OAAO,UAAU,EAAE;AACpE,IAAM,qBAAoC;CAAE,OAAO,EAAE,OAAO,UAAU;CAAG,OAAO;AAAE;;AAiDlF,SAAS,WACP,MACA,cACA,cACA,UACe;CACf,MAAM,OAAO,aAAa,KAAK,MAAM,QAAQ;CAC7C,OAAO;EACL,GAAG;EACH,GAAI,gBAAgB,OAAO,EAAgB,aAAyB,IAAI,CAAC;EACzE,GAAI,gBAAgB,OAAO,EAAE,aAAa,IAAI,CAAC;EAC/C,GAAI,SAAS,SAAY,EAAE,KAAK,IAAI,CAAC;CACvC;AACF;;AAGA,SAAgB,gBAAmB,MAAoD;CACrF,MAAM,EACJ,KAAK,SAAS,QAAQ,SACtB,UAAU,SAAS,SAAS,WAAW,UACvC,iBAAiB,uBAAuB,uBACxC,gBAAgB,eAChB,YAAqB,OAAO,gBAAgB,cAAc,YAAY,IAAI,IAAI,KAAK,IAAI,MACrF;CACJ,MAAM,yBAAS,IAAI,IAAY;CAC/B,MAAM,MAAM,MAAM;CAClB,MAAM,UAAU,qBAAqB;EAAE;EAAgB;CAAc,CAAC;CAEtE,OAAO;EACL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,CAAC,OAAO,IAAI,GAAG,GAAG;OACpB,OAAO,IAAI,GAAG;OACd,QAAQ,KACN,oBAAoB,GAAG,SAAS,QAAQ,+BAA+B,cAAc,OAAO,aAAa,YAAY,WACvH;MACF;KACF;IACF;IAKA,MAAM,OACJ,gBAAgB,OAAO,eACpB,cAAc,OAAO,mBAAmB;IAE7C,IAAI,mBAAyC;IAC7C,IAAI,iBAAiB,MAAM;KACzB,IAAI,cAAc,WAAW,aAC3B,mBAAmB;UACd,IAAI,KAAK;MACd,MAAM,MAAM,GAAG,GAAG,GAAG,QAAQ;MAC7B,IAAI,CAAC,OAAO,IAAI,GAAG,GAAG;OACpB,OAAO,IAAI,GAAG;OACd,QAAQ,KACN,oBAAoB,GAAG,SAAS,QAAQ,+BAA+B,cAAc,OAAO,aAAa,YAAY,WACvH;MACF;KACF;IACF;IAEA,MAAM,aACJ,kBAAkB,OAAO,iBACtB,oBAAoB,QAAQ,oBAAoB,OAAO,qBAAqB;IAEjF,MAAM,SAAS,cAAc,WAAW,YAAY,kBAAkB,kBAAkB,eAAe,QAAQ,MAAM,CAAC;IAEtH,IAAI,QAAQ,QAAQ,UAAU,MAAM;IAEpC,SAAS,KAAK;KACZ,MAAM;KACN;KACA,GAAI,QAAQ,OAAO,EAAE,KAAK,IAAI,CAAC;KAC/B,GAAI,UAAU,OAAO,EAAE,OAAO,IAAI,CAAC;KACnC,GAAI,cAAc,OAAO,EAAE,cAAc,WAAuB,IAAI,CAAC;IACvE,CAAC;GACH;GAEA,OAAO;EACT;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { distinct, markFromPlane } from "./marks.js";
|
|
2
2
|
import { screenOf } from "./screen.js";
|
|
3
3
|
import { stepAngles } from "./stepAngles.js";
|
|
4
|
-
import { wrapPositive } from "@weasel-js/geom";
|
|
4
|
+
import { RAD_TO_DEG, wrapPositive } from "@weasel-js/geom";
|
|
5
5
|
import { resolveSnap } from "@weasel-js/geom/nd";
|
|
6
6
|
|
|
7
7
|
// src/domains/snap/angle2d.ts
|
|
@@ -141,7 +141,7 @@ function rayMarks(inputs, theta) {
|
|
|
141
141
|
x: pivot.x + r * Math.cos(dir),
|
|
142
142
|
y: pivot.y + r * Math.sin(dir)
|
|
143
143
|
};
|
|
144
|
-
const deg = wrapPositive(Math.round(theta *
|
|
144
|
+
const deg = wrapPositive(Math.round(theta * RAD_TO_DEG), 360);
|
|
145
145
|
return [{
|
|
146
146
|
kind: "line",
|
|
147
147
|
from: pivot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angle2d.js","names":[],"sources":["../../../src/domains/snap/angle2d.ts"],"sourcesContent":["/** A snap session's one-dimensional path: an angle about a pivot, snapped by\n * the same resolver as a point, with reach carried through the radius. */\nimport { wrapPositive } from '@weasel-js/geom';\nimport { resolveSnap, type SnapCandidate } from '@weasel-js/geom/nd';\nimport type { SnapMods } from 'interactions/actions/snapDep';\nimport { distinct, markFromPlane } from './marks';\nimport { screenOf } from './screen';\nimport { stepAngles } from './stepAngles';\nimport type { Session2dInputs } from './session2d';\nimport type { AngleCollect, SnapMark, SnapMarks, SnapSource } from './types';\n\nconst TURN = Math.PI * 2;\nconst PROBE = 'angle';\n/** A press near the pivot turns px reach into a wide angle; it reaches no\n * further than this. */\nconst MAX_REACH_RAD = Math.PI / 6;\n\n/** Where `theta` lands, and what it met. Writes the marks to the store. */\nexport function angleAt(\n inputs: Session2dInputs, sources: readonly SnapSource[], theta: number, mods: SnapMods,\n): { theta: number; marks: readonly SnapMark[] } {\n const { req, store } = inputs;\n // Screen px per radian, or 1 when the gesture gives its reach in radians.\n const scale = req.reachRad !== undefined ? 1 : pressRadiusPx(inputs);\n const reachOf = (s: SnapSource) => req.reachRad\n ?? Math.min(s.reachPx ?? inputs.reachPx, MAX_REACH_RAD * scale);\n const candidates = collectAngles(inputs, sources, theta, mods, reachOf);\n if (candidates.length === 0) {\n store.set([]);\n return { theta, marks: [] };\n }\n const res = resolveSnap({\n probes: [{ id: PROBE, at: [0], role: 'pointer' }],\n input: { at: [0], dirs: [[1]] },\n delta0: [theta],\n candidates,\n // No radius, no reach: only a required angle can win.\n toScreen: ([t]) => [scale > 0 ? t * scale : NaN],\n });\n const out = res.delta[0];\n const marks = distinct(res.satisfied.flatMap((c) => {\n const m = c.mark ?? rayMarks(inputs, out);\n return 'kind' in m ? [m] : m;\n }));\n const plane = req.plane?.() ?? null;\n store.set(plane ? marks.map((m) => markFromPlane(m, plane)) : marks);\n return { theta: out, marks };\n}\n\nfunction collectAngles(\n inputs: Session2dInputs, sources: readonly SnapSource[], theta: number, mods: SnapMods,\n reachOf: (s: SnapSource) => number,\n): SnapCandidate<SnapMarks>[] {\n const { req } = inputs;\n const out: SnapCandidate<SnapMarks>[] = [];\n const c = req.constrain;\n if (mods.constrain && typeof c === 'object' && c.step > 0) {\n for (const at of stepAngles(theta, c.step)) {\n out.push({ probe: PROBE, locus: { at: [at], dirs: [] }, source: 'constrain', order: -1, tier: 'target', reachPx: 0, required: true });\n }\n }\n const theta0 = req.theta0 ?? 0;\n if (mods.hold) {\n const at = theta0 + TURN * Math.round((theta - theta0) / TURN);\n out.push({ probe: PROBE, locus: { at: [at], dirs: [] }, source: 'hold', order: -1, tier: 'target', reachPx: 0, required: true, mark: [] });\n }\n if (mods.suspend) return out;\n const q: AngleCollect = {\n pivot: req.pivot ?? req.press,\n press: req.press,\n theta0,\n theta,\n ids: req.ids ?? [],\n exclude: inputs.exclude ?? req.ids ?? [],\n mods,\n ...(req.also ? { also: req.also } : {}),\n ...(inputs.scene ? { scene: inputs.scene } : {}),\n ...(inputs.rotationOf ? { rotationOf: inputs.rotationOf } : {}),\n };\n // Runs across sources and their yields: an earlier source, then an earlier\n // yield, wins a tie.\n let order = 0;\n sources.forEach((source) => {\n if (!source.angles) return;\n const reachPx = reachOf(source);\n for (const a of source.angles(q)) {\n // The whole turn of the angle nearest `theta`: 0 catches 359°.\n const at = a.angle + TURN * Math.round((theta - a.angle) / TURN);\n out.push({\n probe: PROBE, locus: { at: [at], dirs: [] }, source: source.id, order: order++, tier: source.tier ?? 'target', reachPx,\n ...(a.required ? { required: true } : {}),\n ...(a.mark ? { mark: a.mark } : {}),\n });\n }\n });\n return out;\n}\n\n/** The screen distance from the pivot to the press: what turns reach in px\n * into radians. */\nfunction pressRadiusPx(inputs: Session2dInputs): number {\n const { req } = inputs;\n const pivot = req.pivot ?? req.press;\n const toScreen = screenOf(inputs.view(), req.plane?.() ?? null);\n const [ax, ay] = toScreen([pivot.x, pivot.y]);\n const [bx, by] = toScreen([req.press.x, req.press.y]);\n return Math.hypot(bx - ax, by - ay);\n}\n\n/** A ray from the pivot out to the press radius, along where the pointer\n * lands at `theta`, labeled with `theta` in degrees. */\nfunction rayMarks(inputs: Session2dInputs, theta: number): SnapMark[] {\n const { req } = inputs;\n const pivot = req.pivot ?? req.press;\n const r = Math.hypot(req.press.x - pivot.x, req.press.y - pivot.y);\n const dir = Math.atan2(req.press.y - pivot.y, req.press.x - pivot.x) + theta - (req.theta0 ?? 0);\n const end = { x: pivot.x + r * Math.cos(dir), y: pivot.y + r * Math.sin(dir) };\n const deg = wrapPositive(Math.round(theta *
|
|
1
|
+
{"version":3,"file":"angle2d.js","names":[],"sources":["../../../src/domains/snap/angle2d.ts"],"sourcesContent":["/** A snap session's one-dimensional path: an angle about a pivot, snapped by\n * the same resolver as a point, with reach carried through the radius. */\nimport { RAD_TO_DEG, wrapPositive } from '@weasel-js/geom';\nimport { resolveSnap, type SnapCandidate } from '@weasel-js/geom/nd';\nimport type { SnapMods } from 'interactions/actions/snapDep';\nimport { distinct, markFromPlane } from './marks';\nimport { screenOf } from './screen';\nimport { stepAngles } from './stepAngles';\nimport type { Session2dInputs } from './session2d';\nimport type { AngleCollect, SnapMark, SnapMarks, SnapSource } from './types';\n\nconst TURN = Math.PI * 2;\nconst PROBE = 'angle';\n/** A press near the pivot turns px reach into a wide angle; it reaches no\n * further than this. */\nconst MAX_REACH_RAD = Math.PI / 6;\n\n/** Where `theta` lands, and what it met. Writes the marks to the store. */\nexport function angleAt(\n inputs: Session2dInputs, sources: readonly SnapSource[], theta: number, mods: SnapMods,\n): { theta: number; marks: readonly SnapMark[] } {\n const { req, store } = inputs;\n // Screen px per radian, or 1 when the gesture gives its reach in radians.\n const scale = req.reachRad !== undefined ? 1 : pressRadiusPx(inputs);\n const reachOf = (s: SnapSource) => req.reachRad\n ?? Math.min(s.reachPx ?? inputs.reachPx, MAX_REACH_RAD * scale);\n const candidates = collectAngles(inputs, sources, theta, mods, reachOf);\n if (candidates.length === 0) {\n store.set([]);\n return { theta, marks: [] };\n }\n const res = resolveSnap({\n probes: [{ id: PROBE, at: [0], role: 'pointer' }],\n input: { at: [0], dirs: [[1]] },\n delta0: [theta],\n candidates,\n // No radius, no reach: only a required angle can win.\n toScreen: ([t]) => [scale > 0 ? t * scale : NaN],\n });\n const out = res.delta[0];\n const marks = distinct(res.satisfied.flatMap((c) => {\n const m = c.mark ?? rayMarks(inputs, out);\n return 'kind' in m ? [m] : m;\n }));\n const plane = req.plane?.() ?? null;\n store.set(plane ? marks.map((m) => markFromPlane(m, plane)) : marks);\n return { theta: out, marks };\n}\n\nfunction collectAngles(\n inputs: Session2dInputs, sources: readonly SnapSource[], theta: number, mods: SnapMods,\n reachOf: (s: SnapSource) => number,\n): SnapCandidate<SnapMarks>[] {\n const { req } = inputs;\n const out: SnapCandidate<SnapMarks>[] = [];\n const c = req.constrain;\n if (mods.constrain && typeof c === 'object' && c.step > 0) {\n for (const at of stepAngles(theta, c.step)) {\n out.push({ probe: PROBE, locus: { at: [at], dirs: [] }, source: 'constrain', order: -1, tier: 'target', reachPx: 0, required: true });\n }\n }\n const theta0 = req.theta0 ?? 0;\n if (mods.hold) {\n const at = theta0 + TURN * Math.round((theta - theta0) / TURN);\n out.push({ probe: PROBE, locus: { at: [at], dirs: [] }, source: 'hold', order: -1, tier: 'target', reachPx: 0, required: true, mark: [] });\n }\n if (mods.suspend) return out;\n const q: AngleCollect = {\n pivot: req.pivot ?? req.press,\n press: req.press,\n theta0,\n theta,\n ids: req.ids ?? [],\n exclude: inputs.exclude ?? req.ids ?? [],\n mods,\n ...(req.also ? { also: req.also } : {}),\n ...(inputs.scene ? { scene: inputs.scene } : {}),\n ...(inputs.rotationOf ? { rotationOf: inputs.rotationOf } : {}),\n };\n // Runs across sources and their yields: an earlier source, then an earlier\n // yield, wins a tie.\n let order = 0;\n sources.forEach((source) => {\n if (!source.angles) return;\n const reachPx = reachOf(source);\n for (const a of source.angles(q)) {\n // The whole turn of the angle nearest `theta`: 0 catches 359°.\n const at = a.angle + TURN * Math.round((theta - a.angle) / TURN);\n out.push({\n probe: PROBE, locus: { at: [at], dirs: [] }, source: source.id, order: order++, tier: source.tier ?? 'target', reachPx,\n ...(a.required ? { required: true } : {}),\n ...(a.mark ? { mark: a.mark } : {}),\n });\n }\n });\n return out;\n}\n\n/** The screen distance from the pivot to the press: what turns reach in px\n * into radians. */\nfunction pressRadiusPx(inputs: Session2dInputs): number {\n const { req } = inputs;\n const pivot = req.pivot ?? req.press;\n const toScreen = screenOf(inputs.view(), req.plane?.() ?? null);\n const [ax, ay] = toScreen([pivot.x, pivot.y]);\n const [bx, by] = toScreen([req.press.x, req.press.y]);\n return Math.hypot(bx - ax, by - ay);\n}\n\n/** A ray from the pivot out to the press radius, along where the pointer\n * lands at `theta`, labeled with `theta` in degrees. */\nfunction rayMarks(inputs: Session2dInputs, theta: number): SnapMark[] {\n const { req } = inputs;\n const pivot = req.pivot ?? req.press;\n const r = Math.hypot(req.press.x - pivot.x, req.press.y - pivot.y);\n const dir = Math.atan2(req.press.y - pivot.y, req.press.x - pivot.x) + theta - (req.theta0 ?? 0);\n const end = { x: pivot.x + r * Math.cos(dir), y: pivot.y + r * Math.sin(dir) };\n const deg = wrapPositive(Math.round(theta * RAD_TO_DEG), 360);\n return [\n { kind: 'line', from: pivot, to: end },\n { kind: 'point', at: end, glyph: 'quadrant', label: `${deg}°` },\n ];\n}\n"],"mappings":";;;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EAAY,OAAO,GAAG,IAAI;CAAG,CAChE;AACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -26,12 +26,12 @@ import { DrawCommand, FlattenTolerance, ImageMinification, ShaderProgramHandle,
|
|
|
26
26
|
export { BlendFactor, BlendFactors, CompositeOp, CullRect, DrawCommand, Effect, FillPoseBox, FlattenTolerance, GlMat3, GroupDrawCommand, ImageDrawCommand, ImageMinification, ImageNodeData, ImageRasterSize, ImageStatus, PaintBindContext, PaintDrawKind, PaintProgram, PaintResources, PathDrawCommand, ProgramSource, RenderTarget, SPRITE_STRIDE, ShaderDrawCommand, ShaderProgram, ShaderProgramHandle, ShaderUniform, SpriteSheet, SpritesDrawCommand, TextDrawCommand, TilePatternOpts, bitmapSrc, blur, commandFill, commandPaint, commandStroke, createTilePattern, cullDrawCommands, fillInPoseFrame, fillToBoundsFrame, frameRect, getImageBitmap, imageStatus, isPaintKindKnown, isVectorImageSrc, mat3, registerEffect, releaseImage, resolveFillPattern, resolvePatternSpec, retryImage, setImageCacheBudget, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, textCommandFromRunsInto, viewToMat3, vignette, warmPaintKinds } from '@weasel-js/renderer';
|
|
27
27
|
import { C as CanvasDebugSink, D as DebugSnapshot, a as DebugConfig, b as DebugStrokes, c as DebugTheme } from './types-BN9hbdMI.js';
|
|
28
28
|
export { d as DEBUG_FEATURES, e as DebugFeature, f as DebugStroke, F as FrameStats, L as LayerFrameStats, R as RecordedBounds, g as RecordedHandle, h as RecordedHitbox, i as RecordedLayer, j as RecordedOrigin, k as RecordedSnap, l as RecordedViewport } from './types-BN9hbdMI.js';
|
|
29
|
-
import { VertexColorChannel, Target, Animator, ColorOverrideRegistry, TargetAxes, Pose, ClipBinder, SpringPresetName, StaggerOptions, StaggerDelay, EasingSpec, AnimationHandle, Skeleton, Skin } from '@weasel-js/animator';
|
|
29
|
+
import { VertexColorChannel, Target, Animator, ColorOverrideRegistry, TrimOverrideRegistry, TargetAxes, Pose, ClipBinder, SpringPresetName, StaggerOptions, StaggerDelay, EasingSpec, AnimationHandle, Skeleton, Skin } from '@weasel-js/animator';
|
|
30
30
|
import { SelectionStore as SelectionStore$1 } from '@weasel-js/select';
|
|
31
31
|
import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1, PointerWorldPos, PointerContextValue, Yoke } from '@weasel-js/routing/react';
|
|
32
32
|
export { ActionsProvider, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, CommandOptions, DepRegistryProvider, DispatcherChannels, InputScope, OngoingAction, PointerContextProvider, PointerContextValue, PointerWorldPos, SelectionContextProvider, SelectionContextProviderIfRoot, SelectionContextValue, UseGestureDispatcherOptions, Yoke, createPointerStore, lastOperationOf, useAction, useActionsRegistry, useActiveToolContext, useCommand, useDepRegistry, useDepSource, useGestureDispatcher, useLastOperation, useLastOperationStore, useMenuHost, useMenus, useOngoingAction, useOpenKeymap, useOptionalActiveToolContext, useOptionalDepRegistry, usePointerContext, usePointerPosition, usePublishSelection, useSelectionContext, useYoke } from '@weasel-js/routing/react';
|
|
33
|
-
import { Paint, CommandFill, CommandStroke, Fill, Inherit, Stroke, CommandPaint, Palette, SolidPaint, VertexWidth, PaintedFill, PaintedStroke } from '@weasel-js/paint';
|
|
34
|
-
export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, INHERIT, ImagePatternPaint, Inherit, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Paint, PaintUnits, PaintedFill, PaintedStroke, PatternPaint, PatternPlacement, PatternTransform, PatternTransformParts, PosedPaint, Region, STROKE_DASH_RATIOS, ScreenLength, SolidPaint, Stroke, StrokeAlign, StrokeDashStyle, StrokeNib, TILE_KINDS, TextureHandle, TexturePaint, TileExtent, TileKind, TilePaint, TilePatternSpec, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, contrastRatio, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isImagePatternPaint, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linearSrgbToOklab, linearToSrgb, luminanceContrast, normalizeHex, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, relativeLuminance, resolveColor, resolveFill, resolveScreenLength, resolveStroke, rgbaToHex, sampleGradientStops, scaleVertexWidth, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf, tileSpecOf, vertexHalfWidths, vertexWidthFromSides, wcagLevels, widestHalfWidth, withGradientKind } from '@weasel-js/paint';
|
|
33
|
+
import { StrokeTrim, Paint, CommandFill, CommandStroke, Fill, Inherit, Stroke, CommandPaint, Palette, SolidPaint, VertexWidth, PaintedFill, PaintedStroke } from '@weasel-js/paint';
|
|
34
|
+
export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, INHERIT, ImagePatternPaint, Inherit, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Paint, PaintUnits, PaintedFill, PaintedStroke, PatternPaint, PatternPlacement, PatternTransform, PatternTransformParts, PosedPaint, Region, STROKE_DASH_RATIOS, ScreenLength, SolidPaint, Stroke, StrokeAlign, StrokeDashStyle, StrokeNib, StrokeTrim, TILE_KINDS, TextureHandle, TexturePaint, TileExtent, TileKind, TilePaint, TilePatternSpec, TrimAt, TrimPace, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, contrastRatio, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isImagePatternPaint, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linearSrgbToOklab, linearToSrgb, luminanceContrast, normalizeHex, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, relativeLuminance, resolveColor, resolveFill, resolveScreenLength, resolveStroke, rgbaToHex, sampleGradientStops, scaleVertexWidth, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf, tileSpecOf, vertexHalfWidths, vertexWidthFromSides, wcagLevels, widestHalfWidth, withGradientKind } from '@weasel-js/paint';
|
|
35
35
|
import { FontRequest } from '@weasel-js/font';
|
|
36
36
|
export { FaceMetrics, FaceRuleMetrics, FaceScriptMetrics, FontFamilyFaces, FontRequest, FontStyle, FontVariant, LocalFontOutlinesResult, OutlineFaceInfo, OutlineSource, OutlineStatus, OutlineVariant, RegisterFontOptions, canQueryLocalFonts, cssFamilyName, cssFontFamily, cssFontFamilyLoading, enableLocalFontOutlines, fontOutlineRegistry, fontRegistry, hasFontOutlines, isCanvasFont, listFontOutlines, loadFontOutlines, outlineStatus, refreshCanvasFont, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines, warmFonts } from '@weasel-js/font';
|
|
37
37
|
import * as _weasel_js_history from '@weasel-js/history';
|
|
@@ -231,8 +231,13 @@ interface NodePaintCtx {
|
|
|
231
231
|
derivedPath?: Path | null;
|
|
232
232
|
/** A node's animated per-anchor colors: given the colors a painter would paint
|
|
233
233
|
* on `channel`, the colors to paint instead. **Absent** when nothing animates
|
|
234
|
-
* the node. The kit's path painters apply it; see `
|
|
234
|
+
* the node. The kit's path painters apply it; see `withPaintOverrides`. */
|
|
235
235
|
vertexColors?: (channel: VertexColorChannel, base: readonly number[] | undefined) => readonly number[] | undefined;
|
|
236
|
+
/** A node's animated stroke trim: given the trim a painter would draw, the
|
|
237
|
+
* trim to draw instead. **Absent** when nothing animates the node. The
|
|
238
|
+
* kit's path painters apply it to the drawn stroke and never to picking;
|
|
239
|
+
* see `withPaintOverrides`. */
|
|
240
|
+
trim?: (base: StrokeTrim | undefined) => StrokeTrim | undefined;
|
|
236
241
|
/** What the node's `'inherit'` fill and stroke resolve to, looked up from
|
|
237
242
|
* its containers by the scene's `drawOne` wrapper. **Absent** for a node
|
|
238
243
|
* that inherits nothing. Hand it to `resolveFill` / `resolveStroke`. */
|
|
@@ -322,6 +327,9 @@ interface NodeInk {
|
|
|
322
327
|
outsetPx?: number;
|
|
323
328
|
/** Reach past `inset`, likewise. */
|
|
324
329
|
insetPx?: number;
|
|
330
|
+
/** The trim of the stroke drawn along the silhouette, when it has one: only
|
|
331
|
+
* that stretch of the outline is grabbable by its stroke. */
|
|
332
|
+
trim?: StrokeTrim;
|
|
325
333
|
}
|
|
326
334
|
/** Per-call context for {@link NodeShapeEntry.silhouette}. */
|
|
327
335
|
interface NodeSilhouetteCtx {
|
|
@@ -2281,6 +2289,20 @@ interface SurfaceSizeProps {
|
|
|
2281
2289
|
onResize?: (size: CanvasSize) => void;
|
|
2282
2290
|
}
|
|
2283
2291
|
|
|
2292
|
+
/**
|
|
2293
|
+
* The render walk's half of animated paint: handing a node's live vertex-color
|
|
2294
|
+
* and stroke-trim overrides to its painter. The overrides live in an animator's
|
|
2295
|
+
* `ColorOverrideRegistry` and `TrimOverrideRegistry`; picking never reads them.
|
|
2296
|
+
*/
|
|
2297
|
+
|
|
2298
|
+
/** Animated paint to lay over a scene's nodes, typically an `animator`. */
|
|
2299
|
+
interface PaintOverrides {
|
|
2300
|
+
/** Per-anchor colors; see `NodePaintCtx.vertexColors`. */
|
|
2301
|
+
colorOverrides?: ColorOverrideRegistry;
|
|
2302
|
+
/** Stroke trims; see `NodePaintCtx.trim`. */
|
|
2303
|
+
trimOverrides?: TrimOverrideRegistry;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2284
2306
|
/** Where a node's paint can reach, before its pose frame — the scene
|
|
2285
2307
|
* slot's `paintBounds`. `null` means unknown, and the node is painted.
|
|
2286
2308
|
* `ctx.inherited` is what its `'inherit'` fill and stroke take, as `drawOne` gets it. */
|
|
@@ -2313,8 +2335,8 @@ interface SceneViewCull<TData, TLayer extends string, TPose> {
|
|
|
2313
2335
|
paintBounds?: PaintBoundsFn<Node<TData, TLayer, TPose>, TPose>;
|
|
2314
2336
|
}
|
|
2315
2337
|
/** What to draw into an existing canvas: the scene, the view, and the same
|
|
2316
|
-
* painting hooks `<SceneCanvas>` takes. */
|
|
2317
|
-
interface RenderSceneToCanvasArgs<TData, TLayer extends string, TPose> {
|
|
2338
|
+
* painting hooks `<SceneCanvas>` takes, its animated paint among them. */
|
|
2339
|
+
interface RenderSceneToCanvasArgs<TData, TLayer extends string, TPose> extends PaintOverrides {
|
|
2318
2340
|
/** The DOM canvas to paint into. The first call on a given canvas creates
|
|
2319
2341
|
* its renderer and later calls reuse it;
|
|
2320
2342
|
* `releaseCanvasRenderer(canvas)` frees it. */
|
|
@@ -2337,9 +2359,6 @@ interface RenderSceneToCanvasArgs<TData, TLayer extends string, TPose> {
|
|
|
2337
2359
|
layerVisibility?: SceneViewLayers['layerVisibility'];
|
|
2338
2360
|
/** Per-view layer order. See {@link SceneViewLayers}. */
|
|
2339
2361
|
layerOrder?: SceneViewLayers['layerOrder'];
|
|
2340
|
-
/** Animated vertex colors to paint, typically an animator's
|
|
2341
|
-
* `colorOverrides` — see `NodePaintCtx.vertexColors`. */
|
|
2342
|
-
colorOverrides?: ColorOverrideRegistry;
|
|
2343
2362
|
/** Skip what cannot reach the `width × height` view: nodes `paintBounds`
|
|
2344
2363
|
* places outside it are not painted, and scene commands that cannot reach
|
|
2345
2364
|
* it are dropped before the renderer — the scene slot's `cull`. Off by
|
|
@@ -2368,8 +2387,8 @@ interface RenderSceneToCanvasArgs<TData, TLayer extends string, TPose> {
|
|
|
2368
2387
|
declare function buildSceneViewCommands<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, view: View, drawOne: SceneViewDrawOne<TData, TLayer, TPose>, extraCommands?: ReadonlyArray<DrawCommand>, alphaFor?: (id: string) => number,
|
|
2369
2388
|
/** This view's own layer visibility and order. */
|
|
2370
2389
|
layers?: SceneViewLayers,
|
|
2371
|
-
/** Animated
|
|
2372
|
-
|
|
2390
|
+
/** Animated paint to lay over the nodes, typically an animator. */
|
|
2391
|
+
overrides?: PaintOverrides,
|
|
2373
2392
|
/** Cull the scene to this CSS-pixel view size — see
|
|
2374
2393
|
* `RenderSceneToCanvasArgs.cull`. Omit to paint every node. */
|
|
2375
2394
|
cull?: SceneViewCull<TData, TLayer, TPose>): DrawCommand[];
|
|
@@ -2412,8 +2431,8 @@ interface SceneViewCanvasProps<TData, TLayer extends string, TPose> extends Surf
|
|
|
2412
2431
|
* `defaultDrawOne`. */
|
|
2413
2432
|
paintBounds?: RenderSceneToCanvasArgs<TData, TLayer, TPose>['paintBounds'];
|
|
2414
2433
|
/** Optional animator, as on `<SceneCanvas>`: the view repaints on its ticks
|
|
2415
|
-
* and paints its `colorOverrides`. Pass the main canvas's
|
|
2416
|
-
* show the same colors. */
|
|
2434
|
+
* and paints its `colorOverrides` and `trimOverrides`. Pass the main canvas's
|
|
2435
|
+
* animator so both show the same colors and trims. */
|
|
2417
2436
|
animator?: Animator;
|
|
2418
2437
|
/** Optional CSS class for the `<canvas>`. Its size is `width` × `height`
|
|
2419
2438
|
* unless a rule on this class sizes it. */
|
|
@@ -2739,6 +2758,8 @@ declare function createLongPressFeedbackContribution(opts?: LongPressFeedbackOpt
|
|
|
2739
2758
|
* holds are that component's to free, on unmount. */
|
|
2740
2759
|
declare function releaseCanvasRenderer(canvas: HTMLCanvasElement): void;
|
|
2741
2760
|
|
|
2761
|
+
/** The types `renderSceneToPixels` and its siblings take and answer. */
|
|
2762
|
+
|
|
2742
2763
|
/** Plain RGBA raster — structurally `ImageData`-compatible ({ width, height,
|
|
2743
2764
|
* data }), deliberately free of printer/dpi/physical-unit concepts. */
|
|
2744
2765
|
interface RasterImage {
|
|
@@ -2754,8 +2775,10 @@ interface HeadlessCanvasLike {
|
|
|
2754
2775
|
height: number;
|
|
2755
2776
|
getContext(contextId: 'webgl2', options?: WebGLContextAttributes): unknown;
|
|
2756
2777
|
}
|
|
2757
|
-
/** What to render, at what resolution, and with which quality settings.
|
|
2758
|
-
|
|
2778
|
+
/** What to render, at what resolution, and with which quality settings. Pass
|
|
2779
|
+
* the on-screen canvas's animated paint, typically an animator, so an export
|
|
2780
|
+
* shows the frame on screen. */
|
|
2781
|
+
interface RenderSceneToPixelsArgs<TData, TLayer extends string, TPose> extends PaintOverrides {
|
|
2759
2782
|
scene: Scene<TData, TLayer, TPose>;
|
|
2760
2783
|
/** Scene-space rect to render (origin + size in scene units). Output pixel
|
|
2761
2784
|
* dimensions follow from rect × scale (round, min 1 — see module doc). */
|
|
@@ -2786,9 +2809,6 @@ interface RenderSceneToPixelsArgs<TData, TLayer extends string, TPose> {
|
|
|
2786
2809
|
* `alphaFor`. Pass the same function the on-screen canvas uses so an
|
|
2787
2810
|
* export matches what the user is looking at. Defaults to `() => 1`. */
|
|
2788
2811
|
alphaFor?: (id: string) => number;
|
|
2789
|
-
/** Animated vertex colors to paint, typically an animator's
|
|
2790
|
-
* `colorOverrides`, so an export shows the frame on screen. */
|
|
2791
|
-
colorOverrides?: ColorOverrideRegistry;
|
|
2792
2812
|
/** Background fill (any CSS color accepted by the renderer). Default:
|
|
2793
2813
|
* fully transparent. Passing a color is always valid. */
|
|
2794
2814
|
background?: string;
|
|
@@ -2822,6 +2842,7 @@ interface PixelRenderPlan {
|
|
|
2822
2842
|
view: View;
|
|
2823
2843
|
commands: DrawCommand[];
|
|
2824
2844
|
}
|
|
2845
|
+
|
|
2825
2846
|
/** Pure planning half of `renderSceneToPixels`: output dimensions, the
|
|
2826
2847
|
* anisotropic `View`, and the full command list (background + view-wrapped
|
|
2827
2848
|
* scene). Exported for tests and for callers targeting their own renderer. */
|
|
@@ -7072,9 +7093,9 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
7072
7093
|
describeKind?: (node: Node<TData, TLayer, TPose>) => string | undefined;
|
|
7073
7094
|
/**
|
|
7074
7095
|
* Animator to bind for per-frame redraws. SceneCanvas requests a redraw on every active
|
|
7075
|
-
* animation frame and paints `animator.colorOverrides`
|
|
7076
|
-
* kit's path and shape painters apply them, and a custom `drawOne`
|
|
7077
|
-
* `ctx.vertexColors`.
|
|
7096
|
+
* animation frame and paints `animator.colorOverrides` and `animator.trimOverrides` onto
|
|
7097
|
+
* the scene's nodes: the kit's path and shape painters apply them, and a custom `drawOne`
|
|
7098
|
+
* receives them as `ctx.vertexColors` and `ctx.trim`. Picking reads the authored trim.
|
|
7078
7099
|
*/
|
|
7079
7100
|
animator?: Animator;
|
|
7080
7101
|
/**
|
|
@@ -9676,8 +9697,11 @@ declare function pathSnapGlyph(kind: PathSnapKind, x: number, y: number, r: numb
|
|
|
9676
9697
|
* separate from the visual style record (the typical scene-graph layout).
|
|
9677
9698
|
*/
|
|
9678
9699
|
|
|
9679
|
-
/** Options for `createPathLayer`.
|
|
9680
|
-
|
|
9700
|
+
/** Options for `createPathLayer`. Its animated paint, typically an animator,
|
|
9701
|
+
* comes before `getVertexColors`, `getStrokeVertexColors` and `getStroke`'s
|
|
9702
|
+
* trim; a function-form color override receives the base colors and the
|
|
9703
|
+
* timestamp `now` gives. The layer repaints for a `set` or `clear` on either registry. */
|
|
9704
|
+
interface CreatePathLayerOpts<T> extends PaintOverrides {
|
|
9681
9705
|
id?: string;
|
|
9682
9706
|
label?: string;
|
|
9683
9707
|
getNodes: () => readonly T[];
|
|
@@ -9713,13 +9737,6 @@ interface CreatePathLayerOpts<T> {
|
|
|
9713
9737
|
* stroke is synthesized so the per-anchor widths take effect.
|
|
9714
9738
|
*/
|
|
9715
9739
|
getStrokeVertexWidths?: (node: T) => VertexWidth[] | null | undefined;
|
|
9716
|
-
/**
|
|
9717
|
-
* Optional color override registry, typically `animator.colorOverrides`.
|
|
9718
|
-
* When set, the renderer consults it before falling back to
|
|
9719
|
-
* `getVertexColors` / `getStrokeVertexColors`. Function-form overrides
|
|
9720
|
-
* receive the base color array and the current animation timestamp.
|
|
9721
|
-
*/
|
|
9722
|
-
colorOverrides?: ColorOverrideRegistry;
|
|
9723
9740
|
/** Clock used to timestamp function-form color overrides. Defaults to
|
|
9724
9741
|
* `performance.now`. Override in tests. */
|
|
9725
9742
|
now?: () => number;
|
|
@@ -12006,4 +12023,4 @@ declare const coreKitSettingsSchema: Omit<_weasel_js_prefs.PrefGroup, "children"
|
|
|
12006
12023
|
};
|
|
12007
12024
|
};
|
|
12008
12025
|
|
|
12009
|
-
export { ANCHORS_TOOL_ID, ANCHOR_HIT_BASE_PX, ANCHOR_TOOLS, AREA_SELECT_ID, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AimHeldViewProps, type AimOutline, type AimPoint, type AimSource, type AimSpace, type AlignAdapter, type AlignEdge, type AlignReference, type AnchorEdit, type AnchorFieldsApi, type AnchorHit, AnchorMarkerShape, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, type AnnotationFlag, type AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, BASELINE_ACTIONS, BASELINE_ACTION_IDS, BOOLEAN_OF_CHILDREN, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanShapeOp, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CANVAS_CONTEXT_ATTRIBUTES, type CameraHeldViewProps, type CameraProps, CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasRetainOptions, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewCommonProps, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type CarrySource, type ChildOrder, type ChromeCtx, type ChromeId, type ChromeRulesDep, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CoreIconName, type CoreKitTargetSettings, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, CreateOutlinesAdapter, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, DRAW_TOOLS, DebugConfig, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, type DeleteActionOptions, type DeleteArgs, DepRegistryProviderIfRoot, type Departures, DerivePathFn, DerivePoseFn, DerivedDep, type DerivedPart, DeviceProfileProvider, type DeviceProfileProviderProps, DevtoolsLabel, type DevtoolsLabelProps, Dims, type DistributeAdapter, type DistributeAxis, type DistributeMode, 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, type DrawnBoundsOptions, type DrawnBoundsScene, type DropZoneOptions, EditAnchorsDep, EditAnchorsParams, type EditableShape, type EditedLayerOf, type EditingDrawOne, type EffectBand, type EffectItem, type EffectSource, type EffectSourceReader, type ElementSizeOptions, type EnterGroupOptions, EnteredGroupApi, FALLBACK_ACCENT, FEATURE_ACTION_IDS, FEATURE_PRESETS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FinishedEditFrame, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, GHOST_STROKE, GROUP_ENTRY_ID, type GateLayerOptions, type GateSource, type GatedLayer, type GatedNode, type GatherSnapOptions, type GeneratedShape, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HandleEdit, HandleLocks, type HandleScope, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, type IconRegistryProviderProps, InertiaConfig, InheritedPaint, type InkExtents, InsertAdapter, type InsertArgs, InsertBehavior, InsertNodeFactory, type InsertOp, type InsertOverlayStyle, InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, type JoinPlan, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitHandlersOption, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerDims, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LeaveGroupOptions, type LifecycleAdapter, type LifecycleAnimation, type LinePoint, type LivePathEditSpec, type LocatePointer, type LongPressFeedbackOptions, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, MOVE_NODES_REQUIRES, type MeasureCell, type MeasureData, type MeasureEnd, type MeasureEndSourceOptions, type MeasureHit, type MeasurePoint, type Measurement, type Measurements, type ModeTriggerHandlers, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NamedPresets, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeClip, type NodeFlagArgs, type NodeGates, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, NoticesDep, OVERLAY_ROLE_STROKES, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_KEYMAP, PATHFINDER_KEYMAP_ID, PATHFINDER_LEADER, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_SNAP_LABELS, POLYGON_INSERT_PARAMS, type Page, type PageEditOptions, type PageLayoutOptions, type PagesDoc, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, PasteCtx, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, PathEditExtension, type PathEditFrame, type PathEditHost, PathEditMark, type PathEditOpening, type PathEditPreview, PathEditTarget, type PathEditingOverlaySlotConfig, type PathEditingOverlayStyle, type PathEffect, type PathEffectDerivations, type PathEffectOptions, type PathGestureFamily, type PathNode, PathPaint, type PathSnapSourceOptions, type PathStorageKind, PathSymmetryDep, type PenContinuation, type PenPreviewStyle, type PenScratch, type PenSubpath, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, type PlacedSpec, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, PoseComposition, PoseDescriptor, type PoseFeed, type PoseFrame, PoseOverrides, PoseRemoval, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PoseTransitionScene, type PoseTransitionSeat, PoseWrite, type PosedNode, type PresetDescription, type PressTargetTree, type PressureToWidthOptions, type PreviewNode, type PuckerBloatEffect, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RectAim, RectPose, 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 RepeatAlongEffect, type RepeatableTransform, type RequirementMismatch, type ResizeActionOptions, ResizeAdapter, ResizeHandleLayout, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RoughenEffect, type RoutedNode, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, STAR_INSERT_PARAMS, STAR_RATIO_RANGE, SavedScene, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasTextEditor, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, type SceneOptions, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, ScrollOffset, type ScrollRange, type SelectAdapter, type SelectFromLassoOptions, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SerializedScene, type SetAnchorFieldParams, type SetChildOrderArgs, type SetDataArgs, type SetDependsOnArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type ShownDataSource, type ShownDeparture, type SiblingSlot, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapCandidateMark, SnapCollect, SnapDep, SnapGesture, SnapMark, SnapMods, SnapOutcome, SnapOutcomeStore, SnapProbeAt, SnapReadoutStyle, SnapSource, SourceCandidate, type SpatialReference, type SpatialReferenceSources, SpecsFromSerializedOptions, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, type StatedNodeFields, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TOOL_GROUP_ORDER, TYPE_TOOLS, TargetTransform, type TextAlongEffect, type TextEditDoubleClick, TextOverflow, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, TransformFollower, type TweenPoseOptions, UNION_OF_CHILDREN, type UndeclaredMagnification, type UseAlignOptions, type UseAlignReturn, type UseBooleansOptions, type UseBooleansReturn, 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, type UseMeasureToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseStickyToolOptions, type UseToolsOptions, VERSION, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, type VelocityTracker, type VersionCheck, type ViewAim, ViewAnimationOptions, type ViewAt, type ViewKitSettings, type ViewLike, ViewMarker, type ViewMarkerGrab, type ViewMarkerHost, type ViewMarkerProps, type ViewMarkerStyle, type ViewPoseAdapter, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRule, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenNode, type WrittenPoseTargetOptions, type ZigzagEffect, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignPreset, alignTargetBounds, always, anchorEditWouldChange, anchorKeysPreset, anchorsTool, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, assertSnapSourceIds, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, booleanGroupFields, booleanGroupRouting, booleanOfChildren, booleanOpOf, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, carriedDescendants, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, clipboardPreset, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, containerScrollAction, contextMenuAction, contextMenuPreset, coreKitSettingsSchema, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepartures, createEnteredGroupScope, createGroupEntryContribution, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPenPreviewLayer, createPointerFollower, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSnapReadoutLayer, createTextLayer, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, currentMeasureId, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deletePreset, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, describePresets, dispatchApplyBatch, distributePreset, documentDepOf, documentOf, documentPose, dragPanContribution, dragPointOf, drawPreset, drawToolsPreset, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, duplicatePreset, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, enterTextEditAction, enumerateAnchors, escapePreset, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, flipPreset, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, grabViewMarker, groupNodeRouting, groupPreset, hasChildren, hasEditablePath, heldInFrame, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertParams, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isAtom, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isRectAim, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, localizeInScene, localizeWorldPoses, locksInForce, makeBooleanGroup, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePose, measuredSegmentCommands, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modeTriggers, modifierHeld, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextPageId, nodeAsShown, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, nudgePreset, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, outlinesPreset, overChildren, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pageToolsPreset, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCommandsPreset, pathCopy, pathEditPathOf, pathEditPreset, pathEditPreview, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathfinderPreset, pathsPreset, pickPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, publishPreviews, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, rectAim, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, removePage, renamePage, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, reorderPreset, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePage, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePartPaint, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, routeKind, satisfiesRange, sceneBoxFrames, sceneCarrySource, sceneClipTargets, sceneDeclaredScopes, sceneFromJSON, sceneMagnification, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, sceneViewPoseAdapter, screenToWorld, screenTolerance, scrollRange, scrollRectPose, scrollRigidPose, scrollableAt, segmentUnder, selectAllPreset, selectAnchorAction, selectFromLasso, selectPreset, selectToolsPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setPages, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, shapeToolsPreset, sliceAction, slotOf, snapMods, snapSourcesFor, solid, sourcesHiddenBy, sourcesOf, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, statedFields, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, stylePreset, textAlongParts, tickedSegment, toHex8, transformPreset, translateRectPose, tweenPose, typeToolsPreset, undeclaredMagnifications, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEyedropperTool, useGradientKinds, useGroupEntryContribution, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useMeasureTool, useNodeOverlayFrame, useNotices, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, usePublishPointer, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextTool, useToolOptionTunings, useToolOptionValues, useTools, useTransformFollower, useVelocityTracker, viewForAim, viewMarkerDragAction, viewPreset, viewToTransform, viewToolsPreset, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldPosesOf, worldToScreen, writtenBy, zoomAt, zoomAtLeast };
|
|
12026
|
+
export { ANCHORS_TOOL_ID, ANCHOR_HIT_BASE_PX, ANCHOR_TOOLS, AREA_SELECT_ID, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AimHeldViewProps, type AimOutline, type AimPoint, type AimSource, type AimSpace, type AlignAdapter, type AlignEdge, type AlignReference, type AnchorEdit, type AnchorFieldsApi, type AnchorHit, AnchorMarkerShape, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, type AnnotationFlag, type AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, BASELINE_ACTIONS, BASELINE_ACTION_IDS, BOOLEAN_OF_CHILDREN, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanShapeOp, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CANVAS_CONTEXT_ATTRIBUTES, type CameraHeldViewProps, type CameraProps, CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasRetainOptions, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewCommonProps, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type CarrySource, type ChildOrder, type ChromeCtx, type ChromeId, type ChromeRulesDep, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CoreIconName, type CoreKitTargetSettings, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, CreateOutlinesAdapter, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, DRAW_TOOLS, DebugConfig, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, type DeleteActionOptions, type DeleteArgs, DepRegistryProviderIfRoot, type Departures, DerivePathFn, DerivePoseFn, DerivedDep, type DerivedPart, DeviceProfileProvider, type DeviceProfileProviderProps, DevtoolsLabel, type DevtoolsLabelProps, Dims, type DistributeAdapter, type DistributeAxis, type DistributeMode, 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, type DrawnBoundsOptions, type DrawnBoundsScene, type DropZoneOptions, EditAnchorsDep, EditAnchorsParams, type EditableShape, type EditedLayerOf, type EditingDrawOne, type EffectBand, type EffectItem, type EffectSource, type EffectSourceReader, type ElementSizeOptions, type EnterGroupOptions, EnteredGroupApi, FALLBACK_ACCENT, FEATURE_ACTION_IDS, FEATURE_PRESETS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FinishedEditFrame, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, GHOST_STROKE, GROUP_ENTRY_ID, type GateLayerOptions, type GateSource, type GatedLayer, type GatedNode, type GatherSnapOptions, type GeneratedShape, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HandleEdit, HandleLocks, type HandleScope, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, type IconRegistryProviderProps, InertiaConfig, InheritedPaint, type InkExtents, InsertAdapter, type InsertArgs, InsertBehavior, InsertNodeFactory, type InsertOp, type InsertOverlayStyle, InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, type JoinPlan, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitHandlersOption, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerDims, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LeaveGroupOptions, type LifecycleAdapter, type LifecycleAnimation, type LinePoint, type LivePathEditSpec, type LocatePointer, type LongPressFeedbackOptions, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, MOVE_NODES_REQUIRES, type MeasureCell, type MeasureData, type MeasureEnd, type MeasureEndSourceOptions, type MeasureHit, type MeasurePoint, type Measurement, type Measurements, type ModeTriggerHandlers, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NamedPresets, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeClip, type NodeFlagArgs, type NodeGates, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, NoticesDep, OVERLAY_ROLE_STROKES, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_KEYMAP, PATHFINDER_KEYMAP_ID, PATHFINDER_LEADER, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_SNAP_LABELS, POLYGON_INSERT_PARAMS, type Page, type PageEditOptions, type PageLayoutOptions, type PagesDoc, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintOverrides, type PaintedSkins, PasteCtx, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, PathEditExtension, type PathEditFrame, type PathEditHost, PathEditMark, type PathEditOpening, type PathEditPreview, PathEditTarget, type PathEditingOverlaySlotConfig, type PathEditingOverlayStyle, type PathEffect, type PathEffectDerivations, type PathEffectOptions, type PathGestureFamily, type PathNode, PathPaint, type PathSnapSourceOptions, type PathStorageKind, PathSymmetryDep, type PenContinuation, type PenPreviewStyle, type PenScratch, type PenSubpath, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, type PlacedSpec, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, PoseComposition, PoseDescriptor, type PoseFeed, type PoseFrame, PoseOverrides, PoseRemoval, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PoseTransitionScene, type PoseTransitionSeat, PoseWrite, type PosedNode, type PresetDescription, type PressTargetTree, type PressureToWidthOptions, type PreviewNode, type PuckerBloatEffect, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RectAim, RectPose, 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 RepeatAlongEffect, type RepeatableTransform, type RequirementMismatch, type ResizeActionOptions, ResizeAdapter, ResizeHandleLayout, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RoughenEffect, type RoutedNode, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, STAR_INSERT_PARAMS, STAR_RATIO_RANGE, SavedScene, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasTextEditor, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, type SceneOptions, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, ScrollOffset, type ScrollRange, type SelectAdapter, type SelectFromLassoOptions, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SerializedScene, type SetAnchorFieldParams, type SetChildOrderArgs, type SetDataArgs, type SetDependsOnArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type ShownDataSource, type ShownDeparture, type SiblingSlot, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapCandidateMark, SnapCollect, SnapDep, SnapGesture, SnapMark, SnapMods, SnapOutcome, SnapOutcomeStore, SnapProbeAt, SnapReadoutStyle, SnapSource, SourceCandidate, type SpatialReference, type SpatialReferenceSources, SpecsFromSerializedOptions, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, type StatedNodeFields, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TOOL_GROUP_ORDER, TYPE_TOOLS, TargetTransform, type TextAlongEffect, type TextEditDoubleClick, TextOverflow, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, TransformFollower, type TweenPoseOptions, UNION_OF_CHILDREN, type UndeclaredMagnification, type UseAlignOptions, type UseAlignReturn, type UseBooleansOptions, type UseBooleansReturn, 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, type UseMeasureToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseStickyToolOptions, type UseToolsOptions, VERSION, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, type VelocityTracker, type VersionCheck, type ViewAim, ViewAnimationOptions, type ViewAt, type ViewKitSettings, type ViewLike, ViewMarker, type ViewMarkerGrab, type ViewMarkerHost, type ViewMarkerProps, type ViewMarkerStyle, type ViewPoseAdapter, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRule, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenNode, type WrittenPoseTargetOptions, type ZigzagEffect, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignPreset, alignTargetBounds, always, anchorEditWouldChange, anchorKeysPreset, anchorsTool, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, assertSnapSourceIds, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, booleanGroupFields, booleanGroupRouting, booleanOfChildren, booleanOpOf, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, carriedDescendants, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, clipboardPreset, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, containerScrollAction, contextMenuAction, contextMenuPreset, coreKitSettingsSchema, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepartures, createEnteredGroupScope, createGroupEntryContribution, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPenPreviewLayer, createPointerFollower, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSnapReadoutLayer, createTextLayer, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, currentMeasureId, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deletePreset, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, describePresets, dispatchApplyBatch, distributePreset, documentDepOf, documentOf, documentPose, dragPanContribution, dragPointOf, drawPreset, drawToolsPreset, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, duplicatePreset, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, enterTextEditAction, enumerateAnchors, escapePreset, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, flipPreset, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, grabViewMarker, groupNodeRouting, groupPreset, hasChildren, hasEditablePath, heldInFrame, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertParams, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isAtom, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isRectAim, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, localizeInScene, localizeWorldPoses, locksInForce, makeBooleanGroup, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePose, measuredSegmentCommands, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modeTriggers, modifierHeld, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextPageId, nodeAsShown, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, nudgePreset, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, outlinesPreset, overChildren, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pageToolsPreset, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCommandsPreset, pathCopy, pathEditPathOf, pathEditPreset, pathEditPreview, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathfinderPreset, pathsPreset, pickPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, publishPreviews, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, rectAim, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, removePage, renamePage, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, reorderPreset, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePage, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePartPaint, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, routeKind, satisfiesRange, sceneBoxFrames, sceneCarrySource, sceneClipTargets, sceneDeclaredScopes, sceneFromJSON, sceneMagnification, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, sceneViewPoseAdapter, screenToWorld, screenTolerance, scrollRange, scrollRectPose, scrollRigidPose, scrollableAt, segmentUnder, selectAllPreset, selectAnchorAction, selectFromLasso, selectPreset, selectToolsPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setPages, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, shapeToolsPreset, sliceAction, slotOf, snapMods, snapSourcesFor, solid, sourcesHiddenBy, sourcesOf, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, statedFields, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, stylePreset, textAlongParts, tickedSegment, toHex8, transformPreset, translateRectPose, tweenPose, typeToolsPreset, undeclaredMagnifications, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEyedropperTool, useGradientKinds, useGroupEntryContribution, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useMeasureTool, useNodeOverlayFrame, useNotices, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, usePublishPointer, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextTool, useToolOptionTunings, useToolOptionValues, useTools, useTransformFollower, useVelocityTracker, viewForAim, viewMarkerDragAction, viewPreset, viewToTransform, viewToolsPreset, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldPosesOf, worldToScreen, writtenBy, zoomAt, zoomAtLeast };
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weasel-js/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "A 2D scene-graph engine for React, rendered on WebGL2: the scene tree, viewport math, pointer and keyboard input, layered rendering, and op-based undo.",
|
|
5
5
|
"weasel": {
|
|
6
6
|
"needs": ["webgl2"]
|
|
@@ -110,31 +110,31 @@
|
|
|
110
110
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
|
-
"@weasel-js/font": "1.
|
|
113
|
+
"@weasel-js/font": "1.16.0",
|
|
114
114
|
"react": ">=18"
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
117
|
"@msb235/blits": "0.16.1",
|
|
118
|
-
"@weasel-js/animator": "1.
|
|
119
|
-
"@weasel-js/cursor": "1.
|
|
120
|
-
"@weasel-js/geom": "1.
|
|
121
|
-
"@weasel-js/gestures": "1.
|
|
122
|
-
"@weasel-js/ui-logic": "1.
|
|
123
|
-
"@weasel-js/history": "1.
|
|
124
|
-
"@weasel-js/icons": "1.
|
|
125
|
-
"@weasel-js/modes": "1.
|
|
126
|
-
"@weasel-js/paint": "1.
|
|
127
|
-
"@weasel-js/prefs": "1.
|
|
128
|
-
"@weasel-js/quantity": "1.
|
|
129
|
-
"@weasel-js/react": "1.
|
|
130
|
-
"@weasel-js/registry": "1.
|
|
131
|
-
"@weasel-js/renderer": "1.
|
|
132
|
-
"@weasel-js/routing": "1.
|
|
133
|
-
"@weasel-js/select": "1.
|
|
134
|
-
"@weasel-js/simulation": "1.
|
|
135
|
-
"@weasel-js/stroke": "1.
|
|
136
|
-
"@weasel-js/text": "1.
|
|
137
|
-
"@weasel-js/text-dom": "1.
|
|
118
|
+
"@weasel-js/animator": "1.16.0",
|
|
119
|
+
"@weasel-js/cursor": "1.16.0",
|
|
120
|
+
"@weasel-js/geom": "1.16.0",
|
|
121
|
+
"@weasel-js/gestures": "1.16.0",
|
|
122
|
+
"@weasel-js/ui-logic": "1.16.0",
|
|
123
|
+
"@weasel-js/history": "1.16.0",
|
|
124
|
+
"@weasel-js/icons": "1.16.0",
|
|
125
|
+
"@weasel-js/modes": "1.16.0",
|
|
126
|
+
"@weasel-js/paint": "1.16.0",
|
|
127
|
+
"@weasel-js/prefs": "1.16.0",
|
|
128
|
+
"@weasel-js/quantity": "1.16.0",
|
|
129
|
+
"@weasel-js/react": "1.16.0",
|
|
130
|
+
"@weasel-js/registry": "1.16.0",
|
|
131
|
+
"@weasel-js/renderer": "1.16.0",
|
|
132
|
+
"@weasel-js/routing": "1.16.0",
|
|
133
|
+
"@weasel-js/select": "1.16.0",
|
|
134
|
+
"@weasel-js/simulation": "1.16.0",
|
|
135
|
+
"@weasel-js/stroke": "1.16.0",
|
|
136
|
+
"@weasel-js/text": "1.16.0",
|
|
137
|
+
"@weasel-js/text-dom": "1.16.0",
|
|
138
138
|
"earcut": "3.2.4",
|
|
139
139
|
"polygon-clipping": "^0.15.7"
|
|
140
140
|
},
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
"2d"
|
|
153
153
|
],
|
|
154
154
|
"devDependencies": {
|
|
155
|
-
"@weasel-js/icons-plugin": "1.
|
|
156
|
-
"@weasel-js/modes": "1.
|
|
157
|
-
"@weasel-js/theme": "1.
|
|
155
|
+
"@weasel-js/icons-plugin": "1.16.0",
|
|
156
|
+
"@weasel-js/modes": "1.16.0",
|
|
157
|
+
"@weasel-js/theme": "1.16.0"
|
|
158
158
|
}
|
|
159
159
|
}
|