@weasel-js/core 1.6.0 → 1.6.1
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 +24 -0
- package/dist/{depSchema-BhgZc0-Q.d.ts → builtins-HWyuLzE-.d.ts} +132 -60
- package/dist/{chunk-THCSDHII.js → chunk-MZAIDI6D.js} +368 -59
- package/dist/chunk-MZAIDI6D.js.map +1 -0
- package/dist/{chunk-T3UQ3F6R.js → chunk-RMR4QMM6.js} +45 -11
- package/dist/chunk-RMR4QMM6.js.map +1 -0
- package/dist/clipboard.js +1 -1
- package/dist/index.d.ts +401 -313
- package/dist/index.js +2 -2
- package/dist/math.d.ts +1 -1
- package/dist/move.d.ts +2 -2
- package/dist/renderer.d.ts +3 -2
- package/dist/renderer.js +2 -2
- package/package.json +10 -10
- package/dist/chunk-T3UQ3F6R.js.map +0 -1
- package/dist/chunk-THCSDHII.js.map +0 -1
- package/dist/{grid-Dx2gQbNv.d.ts → grid-BXdz8GF2.d.ts} +27 -27
- package/dist/{math-DRa6HBBs.d.ts → math-MCQcf_gc.d.ts} +111 -111
|
@@ -3,7 +3,7 @@ import { createReparentOp, createTransformOp, snap } from './chunk-44EWMJV2.js';
|
|
|
3
3
|
import { fixedCornerOf, DEFAULT_RESIZE_BEHAVIORS, CORNER_ANCHORS, cornerPoint } from './chunk-H6N2JSZ3.js';
|
|
4
4
|
import { unitScale, formatUnit, resolveUnit, ANGLE_RADIANS, withinPxRadius, scaleDelta, pxExtent, withinPxBox, pointToGridCell } from './chunk-HPFJUUTF.js';
|
|
5
5
|
import { unionBounds, visualBoundsViaDescriptor, translatePoseViaDescriptor, poseDescriptorForNode, unionAABB, AUTO_POSE_DESCRIPTOR, remapRotatedLeaf, PATH_Z, PATH_Q, PATH_C, PATH_L, PATH_M, polylineFromPoints, starPath, regularPolygonPath, linePath, ellipsePath, rectPath, polygonFromPoints, PathBuilder, boundsOfPath, pointInPath, isPathLike, strokeHitTest, isRectPose, transformPath, translatePath, DEFAULT_FLATTEN_TOLERANCE, flattenQuadratic, flattenCubic, flattenCubicWithArcLen, flattenQuadraticWithArcLen, RECT_POSE_DESCRIPTOR, aabbIntersectsRect } from './chunk-L5YNZYEG.js';
|
|
6
|
-
import { dispatchApplyBatch, dlog, dwarn, usePointerContext, PointerContextProvider, extractWeaselClipboardFromSvg, parseWeaselClipboardText, materializePaste, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, sniffWeaselClipboardText, applyOpsTo } from './chunk-
|
|
6
|
+
import { dispatchApplyBatch, dlog, dwarn, usePointerContext, PointerContextProvider, extractWeaselClipboardFromSvg, parseWeaselClipboardText, materializePaste, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, sniffWeaselClipboardText, applyOpsTo, usePointerPosition } from './chunk-RMR4QMM6.js';
|
|
7
7
|
import { createSetSelectionOp } from './chunk-DOBSZOPR.js';
|
|
8
8
|
import { registerOpFactory, createInsertOp, createDeleteOp, rebuildOp } from './chunk-4RJP2N2L.js';
|
|
9
9
|
import { getTexture, chunks, dots, crosshatch, hatch } from './chunk-BJN5ZRIJ.js';
|
|
@@ -16,9 +16,9 @@ import { boxToBox, forEachSegment, multiply as multiply$1, rotate, translate as
|
|
|
16
16
|
import { resolveTextStyle, resolveAlign, resolveRuns, cachedLayoutRuns, verticalAlignOffset, textPoseLayoutInput, runsToPlainText, layoutTextPose, fontString, textLineBoxes } from '@weasel-js/text';
|
|
17
17
|
export { DEFAULT_TEXT_STYLE, MARKDOWN_RUN_GRAMMAR, SCRIPT_METRICS, cachedLayoutRuns, createMarkdownRenderer, fontString, layoutMarkdown, layoutRuns, layoutTextPose, markdownToRuns, measureText, measureTextBounds, measuredWidth, resolveAlign, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, textLineBoxes, textPoseLayoutInput, toRuns, transformRunTexts, verticalAlignOffset } from '@weasel-js/text';
|
|
18
18
|
import earcut from 'earcut';
|
|
19
|
-
import { isAnchorOrControl, isBody, ActionDisabledReason, scratchKey, resolveParams, createDispatcher, DEFAULT_ALLOWED_CAPABILITIES, itemsFromFiles, evaluate, resolveDeviceProfile, isResizeHandle, isRotateHandle, defineViewportTool as defineViewportTool$1, NEVER, recordModeSwitch, DEFAULT_DEVICE_PROFILE, defineTool as defineTool$1, getScratch, openPointerSession, actionBindings, ALWAYS, clientToCanvas, setScratch, clientToCanvasRect, isEditableTarget } from '@weasel-js/routing';
|
|
20
|
-
export { ALWAYS, ActionDisabledReason, COARSE_TARGET_SCALE, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, NEVER, actionBindings, actionItems, buildDepsFromRequires, buildRuleCtx, clientToCanvas, createDispatcher, deleteScratch, describeRule, evaluate, evaluateEnabled, getScratch, isEditableTarget, liveScope, matchesKeyBinding,
|
|
21
|
-
import { ActiveToolContextProviderIfRoot, useOptionalActiveToolContext, useTools as useTools$1, useOptionalDepRegistry, DepRegistryProvider, useActionsRegistry, ActionsScope, ActionsProvider, useDepRegistry,
|
|
19
|
+
import { isAnchorOrControl, isBody, ActionDisabledReason, scratchKey, resolveParams, createDispatcher, DEFAULT_ALLOWED_CAPABILITIES, itemsFromFiles, evaluate, resolveDeviceProfile, isResizeHandle, isRotateHandle, defineViewportTool as defineViewportTool$1, NEVER, recordModeSwitch, DEFAULT_DEVICE_PROFILE, defineTool as defineTool$1, getScratch, openPointerSession, actionBindings, ALWAYS, clientToCanvas, setScratch, mergeContributions as mergeContributions$1, clientToCanvasRect, isEditableTarget } from '@weasel-js/routing';
|
|
20
|
+
export { ALWAYS, ActionDisabledReason, COARSE_TARGET_SCALE, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, NEVER, actionBindings, actionItems, buildDepsFromRequires, buildRuleCtx, clientToCanvas, createDispatcher, deleteScratch, describeRule, evaluate, evaluateEnabled, getScratch, isEditableTarget, liveScope, matchesKeyBinding, openPointerSession, resolveDeviceProfile, resolveParams, scopeBindings, scratchKey, setScratch, specificity } from '@weasel-js/routing';
|
|
21
|
+
import { ActiveToolContextProviderIfRoot, useOptionalActiveToolContext, useTools as useTools$1, useOptionalDepRegistry, DepRegistryProvider, useActionsRegistry, ActionsScope, ActionsProvider, useDepRegistry, useDepSource, useGestureDispatcher, ActiveToolContextProvider } from '@weasel-js/routing/react';
|
|
22
22
|
export { ActionsProvider, ActionsScope, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, DepRegistryProvider, useAction, useActionsRegistry, useActiveToolContext, useDepRegistry, useDepSource, useGestureDispatcher, useOngoingAction, useOptionalActiveToolContext, useOptionalDepRegistry } from '@weasel-js/routing/react';
|
|
23
23
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
24
24
|
import { pathCrop as pathCrop$1, pathDivide as pathDivide$1, pathUnion as pathUnion$1, pathSubtract as pathSubtract$1, pathExclude as pathExclude$1, pathIntersect as pathIntersect$1 } from '@weasel-js/geom/booleans';
|
|
@@ -29,7 +29,7 @@ import { createHistory } from '@weasel-js/history';
|
|
|
29
29
|
export * from '@weasel-js/history';
|
|
30
30
|
|
|
31
31
|
// src/version.ts
|
|
32
|
-
var VERSION = "1.6.
|
|
32
|
+
var VERSION = "1.6.1" ;
|
|
33
33
|
|
|
34
34
|
// src/features/grid/roundToCell.ts
|
|
35
35
|
function roundToCell(value, cellSize) {
|
|
@@ -20172,7 +20172,7 @@ function CanvasInner(props, ref) {
|
|
|
20172
20172
|
const surfaceHelpers = {
|
|
20173
20173
|
getDebug: () => debugSink
|
|
20174
20174
|
};
|
|
20175
|
-
const helpersForLayers = { ...viewHelpers, ...surfaceHelpers };
|
|
20175
|
+
const helpersForLayers = { ...viewHelpers, ...surfaceHelpers, viewId: null };
|
|
20176
20176
|
helpersForLayersRef.current = helpersForLayers;
|
|
20177
20177
|
if (helpersRef) helpersRef.current = helpersForLayers;
|
|
20178
20178
|
const pointerDownRef = useRef(false);
|
|
@@ -23260,7 +23260,7 @@ function CanvasView(props) {
|
|
|
23260
23260
|
// The surface half of the envelope passes through; the view half is
|
|
23261
23261
|
// this view's, so its layers paint its chrome rather than the
|
|
23262
23262
|
// surface's.
|
|
23263
|
-
data: (outer) => ({ ...outer, ...helpersRef.current }),
|
|
23263
|
+
data: (outer) => ({ ...outer, ...helpersRef.current, viewId: id }),
|
|
23264
23264
|
...background !== void 0 ? { background } : {}
|
|
23265
23265
|
}),
|
|
23266
23266
|
layerIsPainted,
|
|
@@ -23315,13 +23315,35 @@ function ActionsProviderIfRoot({ children }) {
|
|
|
23315
23315
|
if (parent) return /* @__PURE__ */ jsx(ActionsScope, { children });
|
|
23316
23316
|
return /* @__PURE__ */ jsx(ActionsProvider, { children });
|
|
23317
23317
|
}
|
|
23318
|
-
function
|
|
23318
|
+
function contributionEntries(tools) {
|
|
23319
|
+
return [...Object.values(tools.registry), ...tools.ambient];
|
|
23320
|
+
}
|
|
23321
|
+
function useKeyedInstall(items) {
|
|
23322
|
+
const live2 = useRef(/* @__PURE__ */ new Map());
|
|
23323
|
+
useEffect(() => {
|
|
23324
|
+
for (const [key, teardown] of live2.current) {
|
|
23325
|
+
if (items.has(key)) continue;
|
|
23326
|
+
teardown();
|
|
23327
|
+
live2.current.delete(key);
|
|
23328
|
+
}
|
|
23329
|
+
for (const [key, install] of items) {
|
|
23330
|
+
if (live2.current.has(key)) continue;
|
|
23331
|
+
live2.current.set(key, install());
|
|
23332
|
+
}
|
|
23333
|
+
});
|
|
23334
|
+
useEffect(() => () => {
|
|
23335
|
+
for (const teardown of live2.current.values()) teardown();
|
|
23336
|
+
live2.current.clear();
|
|
23337
|
+
}, []);
|
|
23338
|
+
}
|
|
23339
|
+
function useContributionRoles(tools, api) {
|
|
23319
23340
|
const registry2 = useActionsRegistry();
|
|
23341
|
+
const depRegistry = useOptionalDepRegistry();
|
|
23320
23342
|
useEffect(() => {
|
|
23321
23343
|
if (!registry2) return;
|
|
23322
23344
|
const unregisters = [];
|
|
23323
|
-
for (const
|
|
23324
|
-
for (const action of
|
|
23345
|
+
for (const entry of contributionEntries(tools)) {
|
|
23346
|
+
for (const action of entry.actions ?? []) {
|
|
23325
23347
|
unregisters.push(registry2.register(action));
|
|
23326
23348
|
}
|
|
23327
23349
|
}
|
|
@@ -23329,6 +23351,23 @@ function useToolActions(tools) {
|
|
|
23329
23351
|
for (const u of unregisters) u();
|
|
23330
23352
|
};
|
|
23331
23353
|
}, [registry2, tools.registry, tools.ambient]);
|
|
23354
|
+
const installs = /* @__PURE__ */ new Map();
|
|
23355
|
+
for (const entry of contributionEntries(tools)) {
|
|
23356
|
+
const deps = entry.deps;
|
|
23357
|
+
if (deps && depRegistry) installs.set(deps, () => registerDeps(depRegistry, deps));
|
|
23358
|
+
const attach = entry.attach;
|
|
23359
|
+
if (attach && api) {
|
|
23360
|
+
const reader = depRegistry ?? { get: () => void 0 };
|
|
23361
|
+
installs.set(attach, () => attach(api, reader));
|
|
23362
|
+
}
|
|
23363
|
+
}
|
|
23364
|
+
useKeyedInstall(installs);
|
|
23365
|
+
}
|
|
23366
|
+
function registerDeps(depRegistry, deps) {
|
|
23367
|
+
const unregisters = Object.keys(deps).map((name) => depRegistry.register(name, deps[name]));
|
|
23368
|
+
return () => {
|
|
23369
|
+
for (const u of unregisters) u();
|
|
23370
|
+
};
|
|
23332
23371
|
}
|
|
23333
23372
|
function PointerProviderIfRoot({ children }) {
|
|
23334
23373
|
const parent = usePointerContext();
|
|
@@ -23353,7 +23392,7 @@ function PointerPublisher({
|
|
|
23353
23392
|
target?.origin ?? rect,
|
|
23354
23393
|
target?.view ?? { x: 0, y: 0, scale: { x: 1, y: 1 } }
|
|
23355
23394
|
);
|
|
23356
|
-
ctx.
|
|
23395
|
+
ctx.set({ worldX, worldY, viewId: target?.id ?? null });
|
|
23357
23396
|
};
|
|
23358
23397
|
const onMove = (e) => publish(e.pointerId, e.clientX, e.clientY);
|
|
23359
23398
|
const onLeave = (e) => {
|
|
@@ -23361,7 +23400,7 @@ function PointerPublisher({
|
|
|
23361
23400
|
publish(e.pointerId, e.clientX, e.clientY);
|
|
23362
23401
|
return;
|
|
23363
23402
|
}
|
|
23364
|
-
ctx.
|
|
23403
|
+
ctx.set(null);
|
|
23365
23404
|
};
|
|
23366
23405
|
const onDocMove = (e) => {
|
|
23367
23406
|
if (e.target === el) return;
|
|
@@ -26445,10 +26484,12 @@ function SceneCanvasInner(props, ref) {
|
|
|
26445
26484
|
internalTools,
|
|
26446
26485
|
toolsTakeover: toolsTakeover ?? void 0,
|
|
26447
26486
|
enableKeybindings,
|
|
26448
|
-
isToolEligible
|
|
26487
|
+
isToolEligible,
|
|
26488
|
+
canvasApi: canvasReady ? canvasApiRef.current : null
|
|
26449
26489
|
}
|
|
26450
26490
|
),
|
|
26451
26491
|
viewDescriptors?.map((v, i) => /* @__PURE__ */ jsx(CanvasView, { ...v, order: v.order ?? i }, v.id)),
|
|
26492
|
+
contributionEntries(tools).flatMap((e) => e.views ?? []).map((v) => /* @__PURE__ */ jsx(CanvasView, { ...v }, `contribution:${v.id}`)),
|
|
26452
26493
|
addedViews.map((v) => /* @__PURE__ */ jsx(CanvasView, { ...v }, `added:${v.id}`)),
|
|
26453
26494
|
children
|
|
26454
26495
|
] }) }) }) }) });
|
|
@@ -26457,7 +26498,8 @@ function ToolKeybindingsMounter({
|
|
|
26457
26498
|
internalTools,
|
|
26458
26499
|
toolsTakeover,
|
|
26459
26500
|
enableKeybindings,
|
|
26460
|
-
isToolEligible
|
|
26501
|
+
isToolEligible,
|
|
26502
|
+
canvasApi
|
|
26461
26503
|
}) {
|
|
26462
26504
|
useKeybindings(internalTools, {
|
|
26463
26505
|
disable: !!toolsTakeover || !enableKeybindings,
|
|
@@ -26467,7 +26509,7 @@ function ToolKeybindingsMounter({
|
|
|
26467
26509
|
disable: !toolsTakeover || !enableKeybindings,
|
|
26468
26510
|
isToolEligible
|
|
26469
26511
|
});
|
|
26470
|
-
|
|
26512
|
+
useContributionRoles(toolsTakeover ?? internalTools, canvasApi);
|
|
26471
26513
|
return null;
|
|
26472
26514
|
}
|
|
26473
26515
|
function GestureDispatcherMounter({
|
|
@@ -26703,6 +26745,9 @@ function StandardActionsRegistrar({
|
|
|
26703
26745
|
layerIsPainted
|
|
26704
26746
|
);
|
|
26705
26747
|
useStandardActions({ selection, scene, view, history: scene.history });
|
|
26748
|
+
useDepSource("rootView", () => view);
|
|
26749
|
+
const pointer = usePointerContext();
|
|
26750
|
+
useDepSource("pointer", () => pointer ?? void 0);
|
|
26706
26751
|
useViewportActions({ pan: viewportPanEnabled, zoom: viewportZoom, pinchZoom: viewportPinchZoom });
|
|
26707
26752
|
useAreaSelectDepSource(scene, selection, poseDescriptor, poseComposition, alphaOf);
|
|
26708
26753
|
useNodeAtPointDepSource(pickEvery);
|
|
@@ -27095,6 +27140,130 @@ function SceneViewCanvasInner(props) {
|
|
|
27095
27140
|
);
|
|
27096
27141
|
}
|
|
27097
27142
|
var SceneViewCanvas = SceneViewCanvasInner;
|
|
27143
|
+
|
|
27144
|
+
// src/features/minimap/actions.ts
|
|
27145
|
+
var MINIMAP_CENTER = "minimap.center";
|
|
27146
|
+
var MINIMAP_PAN = "minimap.pan";
|
|
27147
|
+
function centerRootOn(root, x, y) {
|
|
27148
|
+
const size = root.hostSize?.();
|
|
27149
|
+
if (!size) return;
|
|
27150
|
+
const v = root.get();
|
|
27151
|
+
root.set({
|
|
27152
|
+
x: x - size.width / (2 * v.scale.x),
|
|
27153
|
+
y: y - size.height / (2 * v.scale.y),
|
|
27154
|
+
scale: v.scale
|
|
27155
|
+
});
|
|
27156
|
+
}
|
|
27157
|
+
function rootOf(deps) {
|
|
27158
|
+
return deps.rootView;
|
|
27159
|
+
}
|
|
27160
|
+
function minimapCenterAction() {
|
|
27161
|
+
return {
|
|
27162
|
+
id: MINIMAP_CENTER,
|
|
27163
|
+
label: "Minimap \u2014 center the view here",
|
|
27164
|
+
requires: ["rootView"],
|
|
27165
|
+
invoker: {
|
|
27166
|
+
timing: "immediate",
|
|
27167
|
+
run: (deps, params) => {
|
|
27168
|
+
const p = params;
|
|
27169
|
+
const root = rootOf(deps);
|
|
27170
|
+
if (!root || p?.worldX === void 0 || p.worldY === void 0) return;
|
|
27171
|
+
centerRootOn(root, p.worldX, p.worldY);
|
|
27172
|
+
}
|
|
27173
|
+
}
|
|
27174
|
+
};
|
|
27175
|
+
}
|
|
27176
|
+
function minimapPanAction() {
|
|
27177
|
+
return {
|
|
27178
|
+
id: MINIMAP_PAN,
|
|
27179
|
+
label: "Minimap \u2014 pan the view",
|
|
27180
|
+
requires: ["rootView"],
|
|
27181
|
+
invoker: {
|
|
27182
|
+
timing: "ongoing",
|
|
27183
|
+
start(ctx) {
|
|
27184
|
+
const root = rootOf(ctx.deps);
|
|
27185
|
+
if (!root) return {};
|
|
27186
|
+
return {
|
|
27187
|
+
onMove: (m) => {
|
|
27188
|
+
const p = m.drag?.current ?? m.world;
|
|
27189
|
+
centerRootOn(root, p.x, p.y);
|
|
27190
|
+
},
|
|
27191
|
+
onEnd: () => {
|
|
27192
|
+
}
|
|
27193
|
+
};
|
|
27194
|
+
}
|
|
27195
|
+
}
|
|
27196
|
+
};
|
|
27197
|
+
}
|
|
27198
|
+
|
|
27199
|
+
// src/features/minimap/layers.ts
|
|
27200
|
+
function viewIdOf(data) {
|
|
27201
|
+
return data?.viewId ?? null;
|
|
27202
|
+
}
|
|
27203
|
+
function createIndicatorLayer(opts) {
|
|
27204
|
+
const { viewId, root, style = {} } = opts;
|
|
27205
|
+
return {
|
|
27206
|
+
id: `${viewId}.indicator`,
|
|
27207
|
+
label: "Minimap indicator",
|
|
27208
|
+
draw: (data, view) => {
|
|
27209
|
+
if (viewIdOf(data) !== viewId) return [];
|
|
27210
|
+
const r = root();
|
|
27211
|
+
const size = r?.hostSize?.();
|
|
27212
|
+
if (!r || !size) return [];
|
|
27213
|
+
const v = r.get();
|
|
27214
|
+
const px = 1 / view.scale.x;
|
|
27215
|
+
return [{
|
|
27216
|
+
kind: "path",
|
|
27217
|
+
path: { kind: "rect", x: v.x, y: v.y, width: size.width / v.scale.x, height: size.height / v.scale.y },
|
|
27218
|
+
stroke: {
|
|
27219
|
+
paint: { fill: "solid", color: style.stroke ?? "#ffffff" },
|
|
27220
|
+
width: (style.width ?? 1) * px,
|
|
27221
|
+
dash: (style.dash ?? [2, 3]).map((d) => d * px)
|
|
27222
|
+
}
|
|
27223
|
+
}];
|
|
27224
|
+
}
|
|
27225
|
+
};
|
|
27226
|
+
}
|
|
27227
|
+
var ARM = 9;
|
|
27228
|
+
var GAP = 3;
|
|
27229
|
+
var THICK = 2;
|
|
27230
|
+
var HALO = 1;
|
|
27231
|
+
var CROSSHAIR_HALO = "rgba(0, 0, 0, 0.6)";
|
|
27232
|
+
function crosshairRects(x, y, unitsPerPx) {
|
|
27233
|
+
const k = unitsPerPx;
|
|
27234
|
+
const arm = ARM * k, gap = GAP * k, t = THICK * k, h = HALO * k;
|
|
27235
|
+
const bars = [
|
|
27236
|
+
{ x: x - gap - arm, y: y - t / 2, w: arm, h: t },
|
|
27237
|
+
{ x: x + gap, y: y - t / 2, w: arm, h: t },
|
|
27238
|
+
{ x: x - t / 2, y: y - gap - arm, w: t, h: arm },
|
|
27239
|
+
{ x: x - t / 2, y: y + gap, w: t, h: arm }
|
|
27240
|
+
];
|
|
27241
|
+
const halo = bars.map((b) => ({ x: b.x - h, y: b.y - h, w: b.w + 2 * h, h: b.h + 2 * h }));
|
|
27242
|
+
return { halo, bars };
|
|
27243
|
+
}
|
|
27244
|
+
function createLinkedCursorLayer(opts) {
|
|
27245
|
+
const { id, pointer, color, views } = opts;
|
|
27246
|
+
return {
|
|
27247
|
+
id,
|
|
27248
|
+
label: "Linked cursor",
|
|
27249
|
+
draw: (data, view) => {
|
|
27250
|
+
const p = pointer();
|
|
27251
|
+
const here = viewIdOf(data);
|
|
27252
|
+
if (!p || p.viewId === here || views && !views.includes(here)) return [];
|
|
27253
|
+
const { halo, bars } = crosshairRects(p.worldX, p.worldY, 1 / view.scale.x);
|
|
27254
|
+
const rect = (r, c) => ({
|
|
27255
|
+
kind: "path",
|
|
27256
|
+
path: { kind: "rect", x: r.x, y: r.y, width: r.w, height: r.h },
|
|
27257
|
+
fill: { fill: "solid", color: c }
|
|
27258
|
+
});
|
|
27259
|
+
const accent = color();
|
|
27260
|
+
return [
|
|
27261
|
+
...halo.map((r) => rect(r, CROSSHAIR_HALO)),
|
|
27262
|
+
...bars.map((r) => rect(r, accent))
|
|
27263
|
+
];
|
|
27264
|
+
}
|
|
27265
|
+
};
|
|
27266
|
+
}
|
|
27098
27267
|
var NEVER_SUBSCRIBE = () => () => {
|
|
27099
27268
|
};
|
|
27100
27269
|
var DEFAULT_LAYER = "default";
|
|
@@ -27298,6 +27467,17 @@ function computeIndicatorCommand(mainView, mainViewDims, style = {}) {
|
|
|
27298
27467
|
}
|
|
27299
27468
|
};
|
|
27300
27469
|
}
|
|
27470
|
+
var MINIMAP_INPUT = {
|
|
27471
|
+
id: "minimap",
|
|
27472
|
+
eligibility: { always: true },
|
|
27473
|
+
bindings: [
|
|
27474
|
+
{ spec: { kind: "pointerDown" }, actionId: MINIMAP_CENTER },
|
|
27475
|
+
{ spec: { kind: "drag" }, actionId: MINIMAP_PAN }
|
|
27476
|
+
]
|
|
27477
|
+
};
|
|
27478
|
+
var TOOLS_BY_ID = /* @__PURE__ */ new Map([[MINIMAP_INPUT.id, MINIMAP_INPUT]]);
|
|
27479
|
+
var CHANNELS = { wheel: false, pinch: false, contextMenu: false, ingest: false };
|
|
27480
|
+
var FALLBACK_CURSOR_COLOR = "#4c8dff";
|
|
27301
27481
|
function MinimapCanvasInner(props) {
|
|
27302
27482
|
const {
|
|
27303
27483
|
scene,
|
|
@@ -27315,7 +27495,8 @@ function MinimapCanvasInner(props) {
|
|
|
27315
27495
|
poseDescriptor,
|
|
27316
27496
|
indicatorStyle,
|
|
27317
27497
|
className,
|
|
27318
|
-
canvasRef
|
|
27498
|
+
canvasRef,
|
|
27499
|
+
id = "minimap"
|
|
27319
27500
|
} = props;
|
|
27320
27501
|
const mainView = normalizeView(mainViewProp);
|
|
27321
27502
|
const sceneVersion = useSyncExternalStore(
|
|
@@ -27330,9 +27511,7 @@ function MinimapCanvasInner(props) {
|
|
|
27330
27511
|
const indicatorCmd = useMemo(() => {
|
|
27331
27512
|
return computeIndicatorCommand(mainView, mainViewDims, indicatorStyle);
|
|
27332
27513
|
}, [mainView, mainViewDims, indicatorStyle]);
|
|
27333
|
-
const extraCommands = useMemo(() => [indicatorCmd], [indicatorCmd]);
|
|
27334
27514
|
const localCanvasRef = useRef(null);
|
|
27335
|
-
const sessionRef = useRef(null);
|
|
27336
27515
|
const mainViewRef = useRef(mainView);
|
|
27337
27516
|
const mainViewDimsRef = useRef(mainViewDims);
|
|
27338
27517
|
const onMainViewChangeRef = useRef(onMainViewChange);
|
|
@@ -27341,38 +27520,68 @@ function MinimapCanvasInner(props) {
|
|
|
27341
27520
|
mainViewDimsRef.current = mainViewDims;
|
|
27342
27521
|
onMainViewChangeRef.current = onMainViewChange;
|
|
27343
27522
|
fitViewRef.current = fitView;
|
|
27344
|
-
const
|
|
27345
|
-
|
|
27346
|
-
|
|
27347
|
-
|
|
27348
|
-
|
|
27349
|
-
|
|
27523
|
+
const rootView = useMemo(() => ({
|
|
27524
|
+
get: () => mainViewRef.current,
|
|
27525
|
+
set: (v) => onMainViewChangeRef.current(v),
|
|
27526
|
+
hostSize: () => mainViewDimsRef.current
|
|
27527
|
+
}), []);
|
|
27528
|
+
useDepSource("rootView", () => rootView);
|
|
27529
|
+
const actions = useActionsRegistry();
|
|
27530
|
+
useEffect(() => {
|
|
27531
|
+
if (!actions) return;
|
|
27532
|
+
const off = [actions.register(minimapCenterAction()), actions.register(minimapPanAction())];
|
|
27533
|
+
return () => {
|
|
27534
|
+
for (const u of off) u();
|
|
27535
|
+
};
|
|
27536
|
+
}, [actions]);
|
|
27537
|
+
const clientToWorld2 = useCallback((cx, cy) => {
|
|
27538
|
+
const rect = localCanvasRef.current?.getBoundingClientRect();
|
|
27350
27539
|
const fv = fitViewRef.current;
|
|
27351
|
-
|
|
27352
|
-
|
|
27353
|
-
|
|
27354
|
-
const dims = mainViewDimsRef.current;
|
|
27355
|
-
const next = {
|
|
27356
|
-
x: worldX - dims.width / (2 * mv.scale.x),
|
|
27357
|
-
y: worldY - dims.height / (2 * mv.scale.y),
|
|
27358
|
-
scale: { x: mv.scale.x, y: mv.scale.y }
|
|
27540
|
+
return {
|
|
27541
|
+
x: fv.x + (cx - (rect?.left ?? 0)) / fv.scale.x,
|
|
27542
|
+
y: fv.y + (cy - (rect?.top ?? 0)) / fv.scale.y
|
|
27359
27543
|
};
|
|
27360
|
-
onMainViewChangeRef.current(next);
|
|
27361
27544
|
}, []);
|
|
27362
|
-
|
|
27363
|
-
|
|
27364
|
-
|
|
27365
|
-
|
|
27366
|
-
|
|
27367
|
-
|
|
27545
|
+
useGestureDispatcher({
|
|
27546
|
+
canvasRef: localCanvasRef,
|
|
27547
|
+
actions,
|
|
27548
|
+
toolsById: TOOLS_BY_ID,
|
|
27549
|
+
clientToWorld: clientToWorld2,
|
|
27550
|
+
keyboard: false,
|
|
27551
|
+
channels: CHANNELS
|
|
27552
|
+
});
|
|
27553
|
+
const pointerStore = usePointerContext();
|
|
27554
|
+
useEffect(() => {
|
|
27555
|
+
const el = localCanvasRef.current;
|
|
27556
|
+
if (!el || !pointerStore) return;
|
|
27557
|
+
const onMove = (e) => {
|
|
27558
|
+
const w = clientToWorld2(e.clientX, e.clientY);
|
|
27559
|
+
pointerStore.set({ worldX: w.x, worldY: w.y, viewId: id });
|
|
27368
27560
|
};
|
|
27369
|
-
|
|
27370
|
-
|
|
27371
|
-
|
|
27372
|
-
|
|
27373
|
-
|
|
27374
|
-
|
|
27375
|
-
|
|
27561
|
+
const onLeave = (e) => {
|
|
27562
|
+
if (e.buttons !== 0) return;
|
|
27563
|
+
if (pointerStore.get()?.viewId === id) pointerStore.set(null);
|
|
27564
|
+
};
|
|
27565
|
+
el.addEventListener("pointermove", onMove);
|
|
27566
|
+
el.addEventListener("pointerleave", onLeave);
|
|
27567
|
+
return () => {
|
|
27568
|
+
el.removeEventListener("pointermove", onMove);
|
|
27569
|
+
el.removeEventListener("pointerleave", onLeave);
|
|
27570
|
+
};
|
|
27571
|
+
}, [pointerStore, clientToWorld2, id]);
|
|
27572
|
+
const pointer = usePointerPosition();
|
|
27573
|
+
const cursorLayer = useMemo(() => createLinkedCursorLayer({
|
|
27574
|
+
id: `${id}.cursor`,
|
|
27575
|
+
pointer: () => pointer,
|
|
27576
|
+
color: () => {
|
|
27577
|
+
const el = localCanvasRef.current;
|
|
27578
|
+
return el && getComputedStyle(el).getPropertyValue("--wzl-accent").trim() || FALLBACK_CURSOR_COLOR;
|
|
27579
|
+
}
|
|
27580
|
+
}), [id, pointer]);
|
|
27581
|
+
const extraCommands = useMemo(() => [
|
|
27582
|
+
indicatorCmd,
|
|
27583
|
+
...cursorLayer.draw({ viewId: id }, fitView, { width, height })
|
|
27584
|
+
], [indicatorCmd, cursorLayer, id, fitView, width, height]);
|
|
27376
27585
|
const setCanvasRef = useCallback((el) => {
|
|
27377
27586
|
localCanvasRef.current = el;
|
|
27378
27587
|
if (typeof canvasRef === "function") {
|
|
@@ -27381,15 +27590,6 @@ function MinimapCanvasInner(props) {
|
|
|
27381
27590
|
canvasRef.current = el;
|
|
27382
27591
|
}
|
|
27383
27592
|
}, [canvasRef]);
|
|
27384
|
-
useLayoutEffect(() => {
|
|
27385
|
-
const canvas = localCanvasRef.current;
|
|
27386
|
-
if (!canvas) return;
|
|
27387
|
-
canvas.addEventListener("pointerdown", handlePointerDown);
|
|
27388
|
-
return () => {
|
|
27389
|
-
canvas.removeEventListener("pointerdown", handlePointerDown);
|
|
27390
|
-
sessionRef.current?.cancel();
|
|
27391
|
-
};
|
|
27392
|
-
}, [handlePointerDown]);
|
|
27393
27593
|
return /* @__PURE__ */ jsx(
|
|
27394
27594
|
SceneViewCanvas,
|
|
27395
27595
|
{
|
|
@@ -27408,7 +27608,100 @@ function MinimapCanvasInner(props) {
|
|
|
27408
27608
|
}
|
|
27409
27609
|
);
|
|
27410
27610
|
}
|
|
27411
|
-
|
|
27611
|
+
function MinimapCanvas(props) {
|
|
27612
|
+
return /* @__PURE__ */ jsx(DepRegistryProvider, { children: /* @__PURE__ */ jsx(ActionsProvider, { children: /* @__PURE__ */ jsx(ActiveToolContextProvider, { children: /* @__PURE__ */ jsx(PointerProviderIfRoot, { children: /* @__PURE__ */ jsx(MinimapCanvasInner, { ...props }) }) }) }) });
|
|
27613
|
+
}
|
|
27614
|
+
|
|
27615
|
+
// src/features/minimap/createMinimapContribution.ts
|
|
27616
|
+
var FALLBACK_CURSOR_COLOR2 = "#4c8dff";
|
|
27617
|
+
function accentOf(api) {
|
|
27618
|
+
const el = api.element;
|
|
27619
|
+
if (!el || typeof getComputedStyle !== "function") return FALLBACK_CURSOR_COLOR2;
|
|
27620
|
+
return getComputedStyle(el).getPropertyValue("--wzl-accent").trim() || FALLBACK_CURSOR_COLOR2;
|
|
27621
|
+
}
|
|
27622
|
+
function linkedCursor(id, ownViews) {
|
|
27623
|
+
let pointer = null;
|
|
27624
|
+
let color = FALLBACK_CURSOR_COLOR2;
|
|
27625
|
+
const visible = (p) => p !== null && ownViews.some((v) => v !== p.viewId);
|
|
27626
|
+
const layer = createLinkedCursorLayer({ id, pointer: () => pointer, color: () => color, views: ownViews });
|
|
27627
|
+
const attach = (api, deps) => {
|
|
27628
|
+
const store = deps.get("pointer");
|
|
27629
|
+
if (!store) return () => {
|
|
27630
|
+
};
|
|
27631
|
+
color = accentOf(api);
|
|
27632
|
+
pointer = store.get();
|
|
27633
|
+
const off = store.subscribe(() => {
|
|
27634
|
+
const prev = pointer;
|
|
27635
|
+
pointer = store.get();
|
|
27636
|
+
if (visible(prev) || visible(pointer)) api.requestRedraw();
|
|
27637
|
+
});
|
|
27638
|
+
return () => {
|
|
27639
|
+
off();
|
|
27640
|
+
pointer = null;
|
|
27641
|
+
api.requestRedraw();
|
|
27642
|
+
};
|
|
27643
|
+
};
|
|
27644
|
+
return { layer, attach };
|
|
27645
|
+
}
|
|
27646
|
+
function createLinkedCursorContribution(opts = {}) {
|
|
27647
|
+
const id = opts.id ?? "linked-cursor";
|
|
27648
|
+
const cursor = linkedCursor(id, opts.views ?? [null]);
|
|
27649
|
+
return { id, eligibility: { always: true }, overlay: cursor.layer, attach: cursor.attach };
|
|
27650
|
+
}
|
|
27651
|
+
var DEFAULT_BACKGROUND = "#18181c";
|
|
27652
|
+
function createMinimapContribution(opts) {
|
|
27653
|
+
const id = opts.id ?? "minimap";
|
|
27654
|
+
const fit = opts.fit ?? "scene";
|
|
27655
|
+
let deps = null;
|
|
27656
|
+
let cached = null;
|
|
27657
|
+
const fitCamera = (outer, dims) => {
|
|
27658
|
+
const scene = deps?.get("scene");
|
|
27659
|
+
if (!scene) return FALLBACK_FIT_VIEW;
|
|
27660
|
+
const r = typeof opts.rect === "function" ? opts.rect(outer, dims) : opts.rect;
|
|
27661
|
+
const version = scene.getVersion();
|
|
27662
|
+
if (cached && cached.scene === scene && cached.version === version && cached.w === r.w && cached.h === r.h) {
|
|
27663
|
+
return cached.view;
|
|
27664
|
+
}
|
|
27665
|
+
const descriptor = deps?.get("poseDescriptor") ?? AUTO_POSE_DESCRIPTOR;
|
|
27666
|
+
const view = computeFitView(scene, { width: r.w, height: r.h }, fit, descriptor);
|
|
27667
|
+
cached = { scene, version, w: r.w, h: r.h, view };
|
|
27668
|
+
return view;
|
|
27669
|
+
};
|
|
27670
|
+
const cursor = linkedCursor(`${id}.cursor`, [null, id]);
|
|
27671
|
+
const indicator = createIndicatorLayer({
|
|
27672
|
+
viewId: id,
|
|
27673
|
+
root: () => deps?.get("rootView"),
|
|
27674
|
+
...opts.indicatorStyle ? { style: opts.indicatorStyle } : {}
|
|
27675
|
+
});
|
|
27676
|
+
return {
|
|
27677
|
+
id,
|
|
27678
|
+
eligibility: { always: true },
|
|
27679
|
+
views: [{
|
|
27680
|
+
id,
|
|
27681
|
+
bounds: opts.rect,
|
|
27682
|
+
view: fitCamera,
|
|
27683
|
+
interactive: true,
|
|
27684
|
+
background: opts.background ?? DEFAULT_BACKGROUND,
|
|
27685
|
+
...opts.layers ? { layers: opts.layers } : {}
|
|
27686
|
+
}],
|
|
27687
|
+
actions: [minimapCenterAction(), minimapPanAction()],
|
|
27688
|
+
bindings: [
|
|
27689
|
+
{ spec: { kind: "pointerDown" }, actionId: MINIMAP_CENTER, opts: { views: [id] } },
|
|
27690
|
+
{ spec: { kind: "drag" }, actionId: MINIMAP_PAN, opts: { views: [id] } }
|
|
27691
|
+
],
|
|
27692
|
+
overlay: [indicator, cursor.layer],
|
|
27693
|
+
attach: (api, reader) => {
|
|
27694
|
+
deps = reader;
|
|
27695
|
+
const detachCursor = cursor.attach(api, reader);
|
|
27696
|
+
api.requestRedraw();
|
|
27697
|
+
return () => {
|
|
27698
|
+
detachCursor();
|
|
27699
|
+
deps = null;
|
|
27700
|
+
cached = null;
|
|
27701
|
+
};
|
|
27702
|
+
}
|
|
27703
|
+
};
|
|
27704
|
+
}
|
|
27412
27705
|
|
|
27413
27706
|
// src/canvas/renderSceneToPixels.ts
|
|
27414
27707
|
function planPixelRender(args) {
|
|
@@ -32177,7 +32470,23 @@ function snapPoint(opts) {
|
|
|
32177
32470
|
}
|
|
32178
32471
|
};
|
|
32179
32472
|
}
|
|
32473
|
+
function mergeContributions(...bundles) {
|
|
32474
|
+
const out = mergeContributions$1(...bundles);
|
|
32475
|
+
const viewOwner = /* @__PURE__ */ new Map();
|
|
32476
|
+
for (const entry of out) {
|
|
32477
|
+
for (const view of entry.views ?? []) {
|
|
32478
|
+
const owner = viewOwner.get(view.id);
|
|
32479
|
+
if (owner !== void 0) {
|
|
32480
|
+
throw new Error(
|
|
32481
|
+
`mergeContributions: view "${view.id}" is added by both "${owner}" and "${entry.id}". View ids are unique per surface; rename one.`
|
|
32482
|
+
);
|
|
32483
|
+
}
|
|
32484
|
+
viewOwner.set(view.id, entry.id);
|
|
32485
|
+
}
|
|
32486
|
+
}
|
|
32487
|
+
return out;
|
|
32488
|
+
}
|
|
32180
32489
|
|
|
32181
|
-
export { ACTION_GLYPHS, ANCHOR_HIT_BASE_PX, ActionsProviderIfRoot, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, AlignLeftIcon, AlignRightIcon, AlignTopIcon, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BringForwardIcon, BringToFrontIcon, CURVE_REPS, CanvasView, ColorOverrideRegistry, CopyIcon, CropIcon, CursorCoordsHud, CutIcon, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE2 as DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DeleteIcon, DepRegistryProviderIfRoot, DeviceProfileProvider, DistributeHorizontalIcon, DistributeVerticalIcon, DivideIcon, DuplicateIcon, EASINGS, EFFECT_KIT_UNIFORMS, EFFECT_VERT_SRC, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, FlipXIcon, FlipYIcon, GHOST_STROKE, GroupIcon, HANDLE_BASE_PX, HandIcon, IDENTITY_COLOR_MATRIX, IDENTITY_JOINT, IDENTITY_POSE_COMPOSITION, ImageIcon, IntersectIcon, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, LassoIcon, LineIcon, MESH_BAKE_SIZE, MESH_GRADIENT_KIND, MIXED, MOVE_ANCHORS, MinimapCanvas, OUTLINE_MIN_SCREEN_PX, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, PasteIcon, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, RectIcon, RedoIcon, SPRING_PRESETS, SPRITE_STRIDE, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, SendBackwardIcon, SendToBackIcon, ShaderCompileError, StarIcon, SubtractIcon, TOOL_PREF_KINDS, TextIcon, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, UnknownIcon, VERSION, VIEW_ANIMATION_KEY, WHEEL_ZOOM_STEP, WeaselProvider, WeaselRenderer, ZOOM_FLOOR, _resetMarkersForTests, _resetPaintKindsForTests, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, asPaint, bakeMesh, bezierCubic, bezierQuadratic, bindRig, blendPoses, blur, buildChromeCtx, buildGradientRamp, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, circlePath, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeRectPose, composeRigidPose, composeSelectionPose, composeWorldPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, cornerWeights, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createGridLayer, createGuidesLayer, createHistory2 as createHistory, createKeyState, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createSlew, createTextLayer, createTiledLayer, createVelocityTracker, createViewResolver, createViewportLayer, cubicBezierEasing, cullDrawCommands, cycleFill, cycleVertexColors, decomposePath, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, definesFrame, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, documentPose, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, effectivePose, effectiveRangeStyle, enterTextEditAction, enumerateAnchors, evalPatch, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, flattenPreviews, focused, forEachCoalesced, frameRect, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getStylusData, gradientForBounds, gradientGeometry, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, insertPreviewExtent, interpolateView, isBuiltinToolPref, isGradientFill, isLayerPainted, isLayerVisible, isMeshGradientFill, isPatternSpec, isTensorPatch, isValidPatch, isVectorImageSrc, keySpecShortcut, lassoSelectAction, linear, listMarkers, listPaintKinds, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, mat3, matchAlignment, meanScale, mergeAlphaFromPrev, meshBounds, meshGradientXml, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, normalizeView, normalizeZoom, not, nurbs, openFilePicker, or, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, patchBounds, patchCorner, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInTextPose, poseRotationOf, prefUnit, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectMarkerPath, registerContentHandler, registerEffect, registerMarker, registerNodeShape, registerPaintKind, registerProgram, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveEasing, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolvePatternSpec, resolvePreviews, resolveSkeleton, resolveStrokeWidth, resolveVisibility, rgbaToHex, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotationDegreesUnit, rotationHandle, roundRectPath, roundToCell, runsToDom, sampleGradientStops, sampleTrack, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, screenToWorld, seedMeshPatch, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, shapeCoversPoint, slewToward, sliceAction, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, squarePath, staggerVertexColors, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, tessellate, tessellateStroke, textCommand, textCommandFromPose, textCommandFromRuns, tileGrid, tiledProject, toHex8, translateRectPose, trimPolyline, tweenPose, tweenVertexColors, unionBoundsPath, unionOfChildren, unionOfChildrenVia, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyState, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRig, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewAnimationOn, useVisibleRaf, viewToMat3, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, vignette, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast };
|
|
32182
|
-
//# sourceMappingURL=chunk-
|
|
32183
|
-
//# sourceMappingURL=chunk-
|
|
32490
|
+
export { ACTION_GLYPHS, ANCHOR_HIT_BASE_PX, ActionsProviderIfRoot, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, AlignLeftIcon, AlignRightIcon, AlignTopIcon, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BringForwardIcon, BringToFrontIcon, CROSSHAIR_HALO, CURVE_REPS, CanvasView, ColorOverrideRegistry, CopyIcon, CropIcon, CursorCoordsHud, CutIcon, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE2 as DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DeleteIcon, DepRegistryProviderIfRoot, DeviceProfileProvider, DistributeHorizontalIcon, DistributeVerticalIcon, DivideIcon, DuplicateIcon, EASINGS, EFFECT_KIT_UNIFORMS, EFFECT_VERT_SRC, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, FlipXIcon, FlipYIcon, GHOST_STROKE, GroupIcon, HANDLE_BASE_PX, HandIcon, IDENTITY_COLOR_MATRIX, IDENTITY_JOINT, IDENTITY_POSE_COMPOSITION, ImageIcon, IntersectIcon, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, LassoIcon, LineIcon, MESH_BAKE_SIZE, MESH_GRADIENT_KIND, MINIMAP_CENTER, MINIMAP_PAN, MIXED, MOVE_ANCHORS, MinimapCanvas, OUTLINE_MIN_SCREEN_PX, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, PasteIcon, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, RectIcon, RedoIcon, SPRING_PRESETS, SPRITE_STRIDE, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, SendBackwardIcon, SendToBackIcon, ShaderCompileError, StarIcon, SubtractIcon, TOOL_PREF_KINDS, TextIcon, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, UnknownIcon, VERSION, VIEW_ANIMATION_KEY, WHEEL_ZOOM_STEP, WeaselProvider, WeaselRenderer, ZOOM_FLOOR, _resetMarkersForTests, _resetPaintKindsForTests, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, asPaint, bakeMesh, bezierCubic, bezierQuadratic, bindRig, blendPoses, blur, buildChromeCtx, buildGradientRamp, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, centerRootOn, charOffsetToDomPosition, circlePath, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeRectPose, composeRigidPose, composeSelectionPose, composeWorldPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, cornerWeights, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createGridLayer, createGuidesLayer, createHistory2 as createHistory, createKeyState, createLinkedCursorContribution, createMinimapContribution, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createSlew, createTextLayer, createTiledLayer, createVelocityTracker, createViewResolver, createViewportLayer, crosshairRects, cubicBezierEasing, cullDrawCommands, cycleFill, cycleVertexColors, decomposePath, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, definesFrame, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, documentPose, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, effectivePose, effectiveRangeStyle, enterTextEditAction, enumerateAnchors, evalPatch, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, flattenPreviews, focused, forEachCoalesced, frameRect, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getStylusData, gradientForBounds, gradientGeometry, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, insertPreviewExtent, interpolateView, isBuiltinToolPref, isGradientFill, isLayerPainted, isLayerVisible, isMeshGradientFill, isPatternSpec, isTensorPatch, isValidPatch, isVectorImageSrc, keySpecShortcut, lassoSelectAction, linear, listMarkers, listPaintKinds, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, mat3, matchAlignment, meanScale, mergeAlphaFromPrev, mergeContributions, meshBounds, meshGradientXml, minimapCenterAction, minimapPanAction, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, normalizeView, normalizeZoom, not, nurbs, openFilePicker, or, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, patchBounds, patchCorner, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInTextPose, poseRotationOf, prefUnit, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectMarkerPath, registerContentHandler, registerEffect, registerMarker, registerNodeShape, registerPaintKind, registerProgram, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveEasing, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolvePatternSpec, resolvePreviews, resolveSkeleton, resolveStrokeWidth, resolveVisibility, rgbaToHex, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotationDegreesUnit, rotationHandle, roundRectPath, roundToCell, runsToDom, sampleGradientStops, sampleTrack, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, screenToWorld, seedMeshPatch, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, shapeCoversPoint, slewToward, sliceAction, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, squarePath, staggerVertexColors, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, tessellate, tessellateStroke, textCommand, textCommandFromPose, textCommandFromRuns, tileGrid, tiledProject, toHex8, translateRectPose, trimPolyline, tweenPose, tweenVertexColors, unionBoundsPath, unionOfChildren, unionOfChildrenVia, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyState, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRig, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewAnimationOn, useVisibleRaf, viewToMat3, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, vignette, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast };
|
|
32491
|
+
//# sourceMappingURL=chunk-MZAIDI6D.js.map
|
|
32492
|
+
//# sourceMappingURL=chunk-MZAIDI6D.js.map
|