@pixerate/editor 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/index.cjs +6 -2
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.d.cts +2 -2
- package/dist/animation/index.d.ts +2 -2
- package/dist/animation/index.js +17 -13
- package/dist/canvas/index.cjs +618 -33
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +193 -9
- package/dist/canvas/index.d.ts +193 -9
- package/dist/canvas/index.js +603 -18
- package/dist/canvas/index.js.map +1 -1
- package/dist/chunk-UB2OY7FD.js +262 -0
- package/dist/chunk-UB2OY7FD.js.map +1 -0
- package/dist/{chunk-PWJARCI4.js → chunk-W7BOBWZD.js} +5 -196
- package/dist/chunk-W7BOBWZD.js.map +1 -0
- package/dist/{chunk-TTYCN6ZH.cjs → chunk-XHRZSB77.cjs} +8 -199
- package/dist/chunk-XHRZSB77.cjs.map +1 -0
- package/dist/chunk-XZ4L3R4K.cjs +262 -0
- package/dist/chunk-XZ4L3R4K.cjs.map +1 -0
- package/dist/{easing-B6iAnJHk.d.cts → easing-DTmX99QG.d.cts} +20 -6
- package/dist/{easing-B6iAnJHk.d.ts → easing-DTmX99QG.d.ts} +20 -6
- package/dist/parameters/index.cjs +38 -1
- package/dist/parameters/index.cjs.map +1 -1
- package/dist/parameters/index.d.cts +32 -2
- package/dist/parameters/index.d.ts +32 -2
- package/dist/parameters/index.js +37 -0
- package/dist/parameters/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-PWJARCI4.js.map +0 -1
- package/dist/chunk-TTYCN6ZH.cjs.map +0 -1
package/dist/canvas/index.cjs
CHANGED
|
@@ -41,6 +41,7 @@ var _chunkK2UYKJ6Mcjs = require('../chunk-K2UYKJ6M.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
+
var _chunkXHRZSB77cjs = require('../chunk-XHRZSB77.cjs');
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
|
|
@@ -53,7 +54,9 @@ var _chunkK2UYKJ6Mcjs = require('../chunk-K2UYKJ6M.cjs');
|
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
var _chunkXZ4L3R4Kcjs = require('../chunk-XZ4L3R4K.cjs');
|
|
57
60
|
|
|
58
61
|
|
|
59
62
|
var _chunkA6PHCAGXcjs = require('../chunk-A6PHCAGX.cjs');
|
|
@@ -138,7 +141,7 @@ function runMultiNodeTransition(transitions, options = {}) {
|
|
|
138
141
|
const {
|
|
139
142
|
defaultDuration = 400,
|
|
140
143
|
defaultEasing: easingFunc = defaultEasing,
|
|
141
|
-
clock =
|
|
144
|
+
clock = _chunkXHRZSB77cjs.realClock,
|
|
142
145
|
styleFormat = "string",
|
|
143
146
|
onUpdate,
|
|
144
147
|
onComplete
|
|
@@ -574,7 +577,7 @@ var StreamingLayoutManager = (_class = class {
|
|
|
574
577
|
this.throttleMs = _nullishCoalesce(options.throttleMs, () => ( 200));
|
|
575
578
|
this.glideDurationMs = _nullishCoalesce(options.glideDurationMs, () => ( 300));
|
|
576
579
|
this.connectedOnly = _nullishCoalesce(options.connectedOnly, () => ( false));
|
|
577
|
-
this.clock = _nullishCoalesce(options.clock, () => (
|
|
580
|
+
this.clock = _nullishCoalesce(options.clock, () => ( _chunkXHRZSB77cjs.realClock));
|
|
578
581
|
this.layoutOptions = _nullishCoalesce(options.layoutOptions, () => ( { direction: "LR" }));
|
|
579
582
|
this.onLayoutUpdated = options.onLayoutUpdated;
|
|
580
583
|
}
|
|
@@ -2449,6 +2452,233 @@ function fitFreehandPath(points, options = {}) {
|
|
|
2449
2452
|
return fitPathData(points, { tolerance: 1, ...options, closed: false });
|
|
2450
2453
|
}
|
|
2451
2454
|
|
|
2455
|
+
// src/canvas/gradient.ts
|
|
2456
|
+
var CANVAS_GRADIENT_PRESETS = {
|
|
2457
|
+
sunset: {
|
|
2458
|
+
type: "linear",
|
|
2459
|
+
angle: 90,
|
|
2460
|
+
stops: [
|
|
2461
|
+
{ offset: 0, color: "#f97316" },
|
|
2462
|
+
{ offset: 1, color: "#ec4899" }
|
|
2463
|
+
]
|
|
2464
|
+
},
|
|
2465
|
+
ocean: {
|
|
2466
|
+
type: "linear",
|
|
2467
|
+
angle: 90,
|
|
2468
|
+
stops: [
|
|
2469
|
+
{ offset: 0, color: "#06b6d4" },
|
|
2470
|
+
{ offset: 1, color: "#3b82f6" }
|
|
2471
|
+
]
|
|
2472
|
+
},
|
|
2473
|
+
aurora: {
|
|
2474
|
+
type: "linear",
|
|
2475
|
+
angle: 90,
|
|
2476
|
+
stops: [
|
|
2477
|
+
{ offset: 0, color: "#10b981" },
|
|
2478
|
+
{ offset: 1, color: "#6366f1" }
|
|
2479
|
+
]
|
|
2480
|
+
},
|
|
2481
|
+
neon: {
|
|
2482
|
+
type: "linear",
|
|
2483
|
+
angle: 90,
|
|
2484
|
+
stops: [
|
|
2485
|
+
{ offset: 0, color: "#a855f7" },
|
|
2486
|
+
{ offset: 1, color: "#ec4899" }
|
|
2487
|
+
]
|
|
2488
|
+
},
|
|
2489
|
+
amber: {
|
|
2490
|
+
type: "linear",
|
|
2491
|
+
angle: 90,
|
|
2492
|
+
stops: [
|
|
2493
|
+
{ offset: 0, color: "#f59e0b" },
|
|
2494
|
+
{ offset: 1, color: "#ef4444" }
|
|
2495
|
+
]
|
|
2496
|
+
},
|
|
2497
|
+
cosmic: {
|
|
2498
|
+
type: "linear",
|
|
2499
|
+
angle: 90,
|
|
2500
|
+
stops: [
|
|
2501
|
+
{ offset: 0, color: "#3b82f6" },
|
|
2502
|
+
{ offset: 0.5, color: "#8b5cf6" },
|
|
2503
|
+
{ offset: 1, color: "#ec4899" }
|
|
2504
|
+
]
|
|
2505
|
+
}
|
|
2506
|
+
};
|
|
2507
|
+
function isCanvasGradient(value) {
|
|
2508
|
+
if (!value || typeof value !== "object") return false;
|
|
2509
|
+
const val = value;
|
|
2510
|
+
if (val.type !== "linear" && val.type !== "radial") return false;
|
|
2511
|
+
if (!Array.isArray(val.stops)) return false;
|
|
2512
|
+
return true;
|
|
2513
|
+
}
|
|
2514
|
+
function splitCssArgs(str) {
|
|
2515
|
+
const parts = [];
|
|
2516
|
+
let depth = 0;
|
|
2517
|
+
let current = "";
|
|
2518
|
+
for (let i = 0; i < str.length; i++) {
|
|
2519
|
+
const char = str[i];
|
|
2520
|
+
if (char === "(") depth++;
|
|
2521
|
+
else if (char === ")") depth = Math.max(0, depth - 1);
|
|
2522
|
+
if (char === "," && depth === 0) {
|
|
2523
|
+
if (current.trim()) parts.push(current.trim());
|
|
2524
|
+
current = "";
|
|
2525
|
+
} else {
|
|
2526
|
+
current += char;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
if (current.trim()) parts.push(current.trim());
|
|
2530
|
+
return parts;
|
|
2531
|
+
}
|
|
2532
|
+
function parseCssAngle(val) {
|
|
2533
|
+
const trimmed = val.trim().toLowerCase();
|
|
2534
|
+
if (trimmed.endsWith("deg")) {
|
|
2535
|
+
return parseFloat(trimmed);
|
|
2536
|
+
}
|
|
2537
|
+
if (trimmed.endsWith("turn")) {
|
|
2538
|
+
return parseFloat(trimmed) * 360;
|
|
2539
|
+
}
|
|
2540
|
+
if (trimmed.endsWith("rad")) {
|
|
2541
|
+
return parseFloat(trimmed) * 180 / Math.PI;
|
|
2542
|
+
}
|
|
2543
|
+
if (trimmed.startsWith("to ")) {
|
|
2544
|
+
const dir = trimmed.slice(3).trim();
|
|
2545
|
+
if (dir === "bottom") return 180;
|
|
2546
|
+
if (dir === "top") return 0;
|
|
2547
|
+
if (dir === "right") return 90;
|
|
2548
|
+
if (dir === "left") return 270;
|
|
2549
|
+
if (dir === "bottom right" || dir === "right bottom") return 135;
|
|
2550
|
+
if (dir === "bottom left" || dir === "left bottom") return 225;
|
|
2551
|
+
if (dir === "top right" || dir === "right top") return 45;
|
|
2552
|
+
if (dir === "top left" || dir === "left top") return 315;
|
|
2553
|
+
}
|
|
2554
|
+
const n = parseFloat(trimmed);
|
|
2555
|
+
return Number.isFinite(n) ? n : 180;
|
|
2556
|
+
}
|
|
2557
|
+
function parseCssGradient(css) {
|
|
2558
|
+
const trimmed = css.trim();
|
|
2559
|
+
const linearMatch = trimmed.match(/^linear-gradient\s*\((.*)\)$/is);
|
|
2560
|
+
if (linearMatch) {
|
|
2561
|
+
const rawArgs = splitCssArgs(linearMatch[1]);
|
|
2562
|
+
if (rawArgs.length === 0) return null;
|
|
2563
|
+
let angle = 180;
|
|
2564
|
+
let stopStartIndex = 0;
|
|
2565
|
+
const first = rawArgs[0].trim().toLowerCase();
|
|
2566
|
+
if (first.endsWith("deg") || first.endsWith("turn") || first.endsWith("rad") || first.startsWith("to ")) {
|
|
2567
|
+
angle = parseCssAngle(first);
|
|
2568
|
+
stopStartIndex = 1;
|
|
2569
|
+
}
|
|
2570
|
+
const stopStrings = rawArgs.slice(stopStartIndex);
|
|
2571
|
+
if (stopStrings.length === 0) return null;
|
|
2572
|
+
const stops = parseStopStrings(stopStrings);
|
|
2573
|
+
if (stops.length === 0) return null;
|
|
2574
|
+
return {
|
|
2575
|
+
type: "linear",
|
|
2576
|
+
angle,
|
|
2577
|
+
stops
|
|
2578
|
+
};
|
|
2579
|
+
}
|
|
2580
|
+
const radialMatch = trimmed.match(/^radial-gradient\s*\((.*)\)$/is);
|
|
2581
|
+
if (radialMatch) {
|
|
2582
|
+
const rawArgs = splitCssArgs(radialMatch[1]);
|
|
2583
|
+
if (rawArgs.length === 0) return null;
|
|
2584
|
+
let stopStartIndex = 0;
|
|
2585
|
+
const first = rawArgs[0].trim().toLowerCase();
|
|
2586
|
+
if (first.startsWith("circle") || first.startsWith("ellipse") || first.includes("at ")) {
|
|
2587
|
+
stopStartIndex = 1;
|
|
2588
|
+
}
|
|
2589
|
+
const stopStrings = rawArgs.slice(stopStartIndex);
|
|
2590
|
+
if (stopStrings.length === 0) return null;
|
|
2591
|
+
const stops = parseStopStrings(stopStrings);
|
|
2592
|
+
if (stops.length === 0) return null;
|
|
2593
|
+
return {
|
|
2594
|
+
type: "radial",
|
|
2595
|
+
cx: 0.5,
|
|
2596
|
+
cy: 0.5,
|
|
2597
|
+
r: 0.5,
|
|
2598
|
+
stops
|
|
2599
|
+
};
|
|
2600
|
+
}
|
|
2601
|
+
return null;
|
|
2602
|
+
}
|
|
2603
|
+
function parseStopStrings(stopStrings) {
|
|
2604
|
+
const count = stopStrings.length;
|
|
2605
|
+
return stopStrings.map((str, idx) => {
|
|
2606
|
+
const parts = str.trim().split(/\s+(?=[0-9%])/);
|
|
2607
|
+
const color = parts[0];
|
|
2608
|
+
let offset = count === 1 ? 0 : idx / (count - 1);
|
|
2609
|
+
if (parts.length > 1) {
|
|
2610
|
+
const posStr = parts[1].trim();
|
|
2611
|
+
if (posStr.endsWith("%")) {
|
|
2612
|
+
offset = parseFloat(posStr) / 100;
|
|
2613
|
+
} else {
|
|
2614
|
+
const val = parseFloat(posStr);
|
|
2615
|
+
if (Number.isFinite(val)) offset = val;
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
return {
|
|
2619
|
+
offset: Math.min(1, Math.max(0, offset)),
|
|
2620
|
+
color
|
|
2621
|
+
};
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
function resolveCanvasGradient(value) {
|
|
2625
|
+
if (!value) return null;
|
|
2626
|
+
if (isCanvasGradient(value)) return value;
|
|
2627
|
+
if (typeof value === "string") {
|
|
2628
|
+
const lower = value.trim().toLowerCase();
|
|
2629
|
+
if (CANVAS_GRADIENT_PRESETS[lower]) {
|
|
2630
|
+
return CANVAS_GRADIENT_PRESETS[lower];
|
|
2631
|
+
}
|
|
2632
|
+
if (lower.startsWith("linear-gradient") || lower.startsWith("radial-gradient")) {
|
|
2633
|
+
return parseCssGradient(value);
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
return null;
|
|
2637
|
+
}
|
|
2638
|
+
function angleToSvgLinearCoords(angleDeg = 180) {
|
|
2639
|
+
const rad = (90 - angleDeg) * Math.PI / 180;
|
|
2640
|
+
const dx = Math.cos(rad);
|
|
2641
|
+
const dy = -Math.sin(rad);
|
|
2642
|
+
const half = 0.5;
|
|
2643
|
+
return {
|
|
2644
|
+
x1: Math.round((half - dx * half) * 1e3) / 1e3,
|
|
2645
|
+
y1: Math.round((half - dy * half) * 1e3) / 1e3,
|
|
2646
|
+
x2: Math.round((half + dx * half) * 1e3) / 1e3,
|
|
2647
|
+
y2: Math.round((half + dy * half) * 1e3) / 1e3
|
|
2648
|
+
};
|
|
2649
|
+
}
|
|
2650
|
+
function gradientToSvgDef(gradient, id) {
|
|
2651
|
+
const stops = (_nullishCoalesce(gradient.stops, () => ( []))).map((s) => ({
|
|
2652
|
+
offset: `${Math.round(s.offset * 1e3) / 10}%`,
|
|
2653
|
+
stopColor: s.color,
|
|
2654
|
+
stopOpacity: s.opacity
|
|
2655
|
+
}));
|
|
2656
|
+
if (gradient.type === "radial") {
|
|
2657
|
+
return {
|
|
2658
|
+
id,
|
|
2659
|
+
type: "radial",
|
|
2660
|
+
attrs: {
|
|
2661
|
+
cx: gradient.cx !== void 0 ? `${gradient.cx * 100}%` : "50%",
|
|
2662
|
+
cy: gradient.cy !== void 0 ? `${gradient.cy * 100}%` : "50%",
|
|
2663
|
+
r: gradient.r !== void 0 ? `${gradient.r * 100}%` : "50%"
|
|
2664
|
+
},
|
|
2665
|
+
stops
|
|
2666
|
+
};
|
|
2667
|
+
}
|
|
2668
|
+
const coords = angleToSvgLinearCoords(_nullishCoalesce(gradient.angle, () => ( 180)));
|
|
2669
|
+
return {
|
|
2670
|
+
id,
|
|
2671
|
+
type: "linear",
|
|
2672
|
+
attrs: {
|
|
2673
|
+
x1: `${coords.x1 * 100}%`,
|
|
2674
|
+
y1: `${coords.y1 * 100}%`,
|
|
2675
|
+
x2: `${coords.x2 * 100}%`,
|
|
2676
|
+
y2: `${coords.y2 * 100}%`
|
|
2677
|
+
},
|
|
2678
|
+
stops
|
|
2679
|
+
};
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2452
2682
|
// src/canvas/shapeGeometry.ts
|
|
2453
2683
|
var SHAPE_KINDS = ["rect", "ellipse", "polygon", "star", "path"];
|
|
2454
2684
|
function isShapeDescription(value) {
|
|
@@ -2858,23 +3088,54 @@ function getShapeSvg(shape, size) {
|
|
|
2858
3088
|
}
|
|
2859
3089
|
return transforms.length > 0 ? { d, transform: transforms.join(" "), fillRule } : { d, fillRule };
|
|
2860
3090
|
}
|
|
2861
|
-
function getShapeRenderData(shape, size = {}) {
|
|
3091
|
+
function getShapeRenderData(shape, size = {}, options = {}) {
|
|
2862
3092
|
const vb = shape.kind === "path" ? validViewBox(shape.viewBox) : null;
|
|
2863
3093
|
const width = size.width && size.width > 0 ? size.width : vb ? vb[2] : 100;
|
|
2864
3094
|
const height = size.height && size.height > 0 ? size.height : vb ? vb[3] : 100;
|
|
2865
3095
|
const svg = getShapeSvg(shape, { width, height });
|
|
3096
|
+
const baseId = options.id || Math.random().toString(36).slice(2, 9);
|
|
3097
|
+
let fillStr = "currentColor";
|
|
3098
|
+
let fillGradientDef;
|
|
3099
|
+
const rawFill = _nullishCoalesce(shape.fillGradient, () => ( shape.fill));
|
|
3100
|
+
const resolvedFillGradient = resolveCanvasGradient(rawFill);
|
|
3101
|
+
if (resolvedFillGradient) {
|
|
3102
|
+
const gradId = `shape-fill-${baseId}`;
|
|
3103
|
+
fillGradientDef = gradientToSvgDef(resolvedFillGradient, gradId);
|
|
3104
|
+
fillStr = `url(#${gradId})`;
|
|
3105
|
+
} else if (typeof shape.fill === "string") {
|
|
3106
|
+
fillStr = shape.fill;
|
|
3107
|
+
} else if (shape.fill === void 0) {
|
|
3108
|
+
fillStr = "currentColor";
|
|
3109
|
+
}
|
|
3110
|
+
let strokeStr = "none";
|
|
3111
|
+
let strokeGradientDef;
|
|
3112
|
+
const rawStroke = _nullishCoalesce(shape.strokeGradient, () => ( shape.stroke));
|
|
3113
|
+
const resolvedStrokeGradient = resolveCanvasGradient(rawStroke);
|
|
3114
|
+
if (resolvedStrokeGradient) {
|
|
3115
|
+
const gradId = `shape-stroke-${baseId}`;
|
|
3116
|
+
strokeGradientDef = gradientToSvgDef(resolvedStrokeGradient, gradId);
|
|
3117
|
+
strokeStr = `url(#${gradId})`;
|
|
3118
|
+
} else if (typeof shape.stroke === "string") {
|
|
3119
|
+
strokeStr = shape.stroke;
|
|
3120
|
+
} else if (shape.stroke === void 0) {
|
|
3121
|
+
strokeStr = "none";
|
|
3122
|
+
}
|
|
2866
3123
|
const data = {
|
|
2867
3124
|
viewBox: `0 0 ${formatNumber2(width, 3)} ${formatNumber2(height, 3)}`,
|
|
2868
3125
|
width,
|
|
2869
3126
|
height,
|
|
2870
3127
|
d: svg.d,
|
|
2871
3128
|
fillRule: svg.fillRule,
|
|
2872
|
-
fill:
|
|
2873
|
-
stroke:
|
|
3129
|
+
fill: fillStr,
|
|
3130
|
+
stroke: strokeStr,
|
|
2874
3131
|
strokeWidth: _nullishCoalesce(shape.strokeWidth, () => ( 1))
|
|
2875
3132
|
};
|
|
2876
3133
|
if (svg.transform) data.transform = svg.transform;
|
|
2877
3134
|
if (shape.opacity !== void 0) data.opacity = shape.opacity;
|
|
3135
|
+
if (shape.strokeLinecap) data.strokeLinecap = shape.strokeLinecap;
|
|
3136
|
+
if (shape.strokeLinejoin) data.strokeLinejoin = shape.strokeLinejoin;
|
|
3137
|
+
if (fillGradientDef) data.fillGradient = fillGradientDef;
|
|
3138
|
+
if (strokeGradientDef) data.strokeGradient = strokeGradientDef;
|
|
2878
3139
|
return data;
|
|
2879
3140
|
}
|
|
2880
3141
|
function clampRatio(value) {
|
|
@@ -5310,12 +5571,18 @@ function revertShapeCombination(nodes, change, previous) {
|
|
|
5310
5571
|
}
|
|
5311
5572
|
var INVISIBLE_PAINT = /* @__PURE__ */ new Set(["none", "transparent"]);
|
|
5312
5573
|
function hasVisibleStroke(shape) {
|
|
5313
|
-
if (!shape
|
|
5574
|
+
if (!shape) return false;
|
|
5575
|
+
const stroke = _nullishCoalesce(shape.strokeGradient, () => ( shape.stroke));
|
|
5576
|
+
if (stroke === void 0 || stroke === null) return false;
|
|
5577
|
+
if (typeof stroke === "string" && INVISIBLE_PAINT.has(stroke.trim().toLowerCase())) return false;
|
|
5314
5578
|
const width = _nullishCoalesce(shape.strokeWidth, () => ( 1));
|
|
5315
5579
|
return Number.isFinite(width) && width > 0;
|
|
5316
5580
|
}
|
|
5317
5581
|
function hasVisibleFill(shape) {
|
|
5318
|
-
|
|
5582
|
+
if (shape.fillGradient) return true;
|
|
5583
|
+
if (shape.fill === void 0) return true;
|
|
5584
|
+
if (typeof shape.fill === "object" && shape.fill !== null) return true;
|
|
5585
|
+
return !INVISIBLE_PAINT.has(String(shape.fill).trim().toLowerCase());
|
|
5319
5586
|
}
|
|
5320
5587
|
function shapeTargets(nodes, ids) {
|
|
5321
5588
|
const idSet = new Set(ids);
|
|
@@ -7949,7 +8216,7 @@ function getNodeAnimation(node) {
|
|
|
7949
8216
|
}
|
|
7950
8217
|
function getAnimationTrack(node, property) {
|
|
7951
8218
|
const track = _optionalChain([getNodeAnimation, 'call', _217 => _217(node), 'optionalAccess', _218 => _218.tracks, 'access', _219 => _219[property]]);
|
|
7952
|
-
return track && Array.isArray(track.keyframes) &&
|
|
8219
|
+
return track && Array.isArray(track.keyframes) && _chunkXHRZSB77cjs.normalizeKeyframes.call(void 0, track.keyframes).length > 0 ? track : void 0;
|
|
7953
8220
|
}
|
|
7954
8221
|
function isNodeAnimated(node) {
|
|
7955
8222
|
const animation = getNodeAnimation(node);
|
|
@@ -7986,7 +8253,7 @@ function getAnimationDuration(doc) {
|
|
|
7986
8253
|
if (!animation) continue;
|
|
7987
8254
|
for (const track of Object.values(animation.tracks)) {
|
|
7988
8255
|
if (!track || track.enabled === false) continue;
|
|
7989
|
-
const keys =
|
|
8256
|
+
const keys = _chunkXHRZSB77cjs.normalizeKeyframes.call(void 0, track.keyframes);
|
|
7990
8257
|
if (keys.length > 0) end = Math.max(end, keys[keys.length - 1].time);
|
|
7991
8258
|
}
|
|
7992
8259
|
}
|
|
@@ -8003,7 +8270,7 @@ function evaluateAnimation(doc, time, options = {}) {
|
|
|
8003
8270
|
for (const [key, track] of Object.entries(animation.tracks)) {
|
|
8004
8271
|
if (!track || track.enabled === false) continue;
|
|
8005
8272
|
const property = (_nullishCoalesce(options.properties, () => ( ANIMATABLE_PROPERTIES))).find((p) => p.key === key);
|
|
8006
|
-
const value =
|
|
8273
|
+
const value = _chunkXHRZSB77cjs.evaluateTrack.call(void 0, track, time, _nullishCoalesce(_optionalChain([property, 'optionalAccess', _221 => _221.type]), () => ( "number")));
|
|
8007
8274
|
if (value === void 0) continue;
|
|
8008
8275
|
(values ??= {})[key] = clampAnimationValue(property, value);
|
|
8009
8276
|
}
|
|
@@ -8041,7 +8308,7 @@ var AnimationEditError = class extends Error {
|
|
|
8041
8308
|
}
|
|
8042
8309
|
};
|
|
8043
8310
|
var MAX_KEYFRAME_REFS = 4096;
|
|
8044
|
-
var sameTime = (a, b) => Math.abs(a - b) <=
|
|
8311
|
+
var sameTime = (a, b) => Math.abs(a - b) <= _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON;
|
|
8045
8312
|
var refKey = (r) => `${r.nodeId}\0${r.property}`;
|
|
8046
8313
|
function snapTimeToFrame(time, fps) {
|
|
8047
8314
|
if (!(fps > 0)) return time;
|
|
@@ -8061,9 +8328,9 @@ function coerceValue(property, value) {
|
|
|
8061
8328
|
}
|
|
8062
8329
|
function coerceEasing(easing) {
|
|
8063
8330
|
if (typeof easing === "string") {
|
|
8064
|
-
const parsed =
|
|
8331
|
+
const parsed = _chunkXZ4L3R4Kcjs.parseCssEasing.call(void 0, easing);
|
|
8065
8332
|
if (parsed) return parsed;
|
|
8066
|
-
} else if (
|
|
8333
|
+
} else if (_chunkXZ4L3R4Kcjs.isAnimationEasing.call(void 0, easing)) return easing;
|
|
8067
8334
|
throw new AnimationEditError("invalid_easing", `Unknown easing ${JSON.stringify(easing)}.`);
|
|
8068
8335
|
}
|
|
8069
8336
|
function coerceTime(time) {
|
|
@@ -8095,7 +8362,7 @@ var Draft = (_class7 = class {
|
|
|
8095
8362
|
const current = getNodeAnimation(this.node(id));
|
|
8096
8363
|
const tracks = {};
|
|
8097
8364
|
for (const [key, track] of Object.entries(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _223 => _223.tracks]), () => ( {})))) {
|
|
8098
|
-
if (track) tracks[key] = { ...track, keyframes:
|
|
8365
|
+
if (track) tracks[key] = { ...track, keyframes: _chunkXHRZSB77cjs.normalizeKeyframes.call(void 0, track.keyframes) };
|
|
8099
8366
|
}
|
|
8100
8367
|
animation = { ..._nullishCoalesce(current, () => ( {})), tracks };
|
|
8101
8368
|
this.animations.set(id, animation);
|
|
@@ -8165,7 +8432,7 @@ function readAnimatableValue(node, property) {
|
|
|
8165
8432
|
function getAnimatedValue(node, propertyKey, time, options = {}) {
|
|
8166
8433
|
const property = getAnimatableProperty(propertyKey, options);
|
|
8167
8434
|
const track = getAnimationTrack(node, propertyKey);
|
|
8168
|
-
if (track && track.enabled !== false) return
|
|
8435
|
+
if (track && track.enabled !== false) return _chunkXHRZSB77cjs.evaluateTrack.call(void 0, track, time, _nullishCoalesce(_optionalChain([property, 'optionalAccess', _229 => _229.type]), () => ( "number")));
|
|
8169
8436
|
return property ? readAnimatableValue(node, property) : void 0;
|
|
8170
8437
|
}
|
|
8171
8438
|
function putKey(draft, nodeId, property, time, value, easing, inherit = true) {
|
|
@@ -8267,7 +8534,7 @@ function removeTrack(nodes, nodeId, property, options = {}) {
|
|
|
8267
8534
|
if (!track) return nodes;
|
|
8268
8535
|
const p = draft.property(property);
|
|
8269
8536
|
if (options.keepValueAt !== void 0 && p && property !== "motionPath") {
|
|
8270
|
-
const value =
|
|
8537
|
+
const value = _chunkXHRZSB77cjs.evaluateTrack.call(void 0, track, options.keepValueAt, p.type);
|
|
8271
8538
|
if (value !== void 0) draft.writeNode(nodeId, (n) => p.write(n, value));
|
|
8272
8539
|
}
|
|
8273
8540
|
draft.setKeys(nodeId, property, []);
|
|
@@ -8296,10 +8563,10 @@ function moveKeyframes(nodes, refs, delta, options = {}) {
|
|
|
8296
8563
|
low = Math.max(low, min - time);
|
|
8297
8564
|
high = Math.min(high, max - time);
|
|
8298
8565
|
}
|
|
8299
|
-
if (low > high +
|
|
8566
|
+
if (low > high + _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON) throw new AnimationEditError("no_movement_range", "The keyframes have no common movement range.");
|
|
8300
8567
|
const applied = Math.min(high, Math.max(low, delta));
|
|
8301
8568
|
const moved = refs.map((ref) => ({ ...ref, time: draft.keys(ref.nodeId, ref.property)[draft.find(ref)].time + applied }));
|
|
8302
|
-
if (Math.abs(applied) <=
|
|
8569
|
+
if (Math.abs(applied) <= _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON) return { nodes, delta: 0, refs: refs.map((r) => ({ ...r })) };
|
|
8303
8570
|
retime(draft, refs, (time) => time + applied);
|
|
8304
8571
|
return { nodes: draft.commit(), delta: applied, refs: moved };
|
|
8305
8572
|
}
|
|
@@ -8345,7 +8612,7 @@ function getKeyframeTimes(nodes, options = {}) {
|
|
|
8345
8612
|
if (!animation) continue;
|
|
8346
8613
|
for (const [property, track] of Object.entries(animation.tracks)) {
|
|
8347
8614
|
const skip = _nullishCoalesce(excluded.get(refKey({ nodeId: node.id, property })), () => ( []));
|
|
8348
|
-
for (const k of
|
|
8615
|
+
for (const k of _chunkXHRZSB77cjs.normalizeKeyframes.call(void 0, _optionalChain([track, 'optionalAccess', _231 => _231.keyframes]))) if (!skip.some((t) => sameTime(t, k.time))) times.push(k.time);
|
|
8349
8616
|
}
|
|
8350
8617
|
}
|
|
8351
8618
|
times.sort((a, b) => a - b);
|
|
@@ -8403,7 +8670,7 @@ function parseKeyframeClipboard(input) {
|
|
|
8403
8670
|
const clip = value;
|
|
8404
8671
|
if (clip.type !== "pixerate/keyframes" || clip.version !== 1 || !Array.isArray(clip.keyframes)) return null;
|
|
8405
8672
|
const keyframes = clip.keyframes.filter(
|
|
8406
|
-
(k) => k && typeof k.nodeId === "string" && typeof k.property === "string" && typeof k.offset === "number" && Number.isFinite(k.offset) && (typeof k.value === "number" && Number.isFinite(k.value) || typeof k.value === "string") && (k.easing === void 0 ||
|
|
8673
|
+
(k) => k && typeof k.nodeId === "string" && typeof k.property === "string" && typeof k.offset === "number" && Number.isFinite(k.offset) && (typeof k.value === "number" && Number.isFinite(k.value) || typeof k.value === "string") && (k.easing === void 0 || _chunkXZ4L3R4Kcjs.isAnimationEasing.call(void 0, k.easing))
|
|
8407
8674
|
);
|
|
8408
8675
|
return keyframes.length > 0 ? { type: "pixerate/keyframes", version: 1, keyframes } : null;
|
|
8409
8676
|
}
|
|
@@ -8464,7 +8731,7 @@ function recordAnimationChanges(base, before, after, time, options = {}) {
|
|
|
8464
8731
|
};
|
|
8465
8732
|
if (animated) {
|
|
8466
8733
|
if (changed) {
|
|
8467
|
-
const keys =
|
|
8734
|
+
const keys = _chunkXHRZSB77cjs.normalizeKeyframes.call(void 0, track.keyframes).filter((k) => !sameTime(k.time, t));
|
|
8468
8735
|
const before2 = [...keys].reverse().find((k) => k.time < t);
|
|
8469
8736
|
keys.push({ time: t, value: now, ..._optionalChain([before2, 'optionalAccess', _233 => _233.easing]) !== void 0 ? { easing: before2.easing } : {} });
|
|
8470
8737
|
tracksOf()[p.key] = { ...track, keyframes: keys.sort((a, b) => a.time - b.time) };
|
|
@@ -8473,7 +8740,7 @@ function recordAnimationChanges(base, before, after, time, options = {}) {
|
|
|
8473
8740
|
restore();
|
|
8474
8741
|
} else if (changed && options.recording && !track) {
|
|
8475
8742
|
const keys = [];
|
|
8476
|
-
if (t >
|
|
8743
|
+
if (t > _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON && was !== void 0) keys.push({ time: 0, value: was });
|
|
8477
8744
|
keys.push({ time: t, value: now });
|
|
8478
8745
|
tracksOf()[p.key] = { keyframes: keys };
|
|
8479
8746
|
keyed.push({ nodeId: next.id, property: p.key, time: t });
|
|
@@ -8576,7 +8843,7 @@ function exactStops(keys, duration, format) {
|
|
|
8576
8843
|
stops.push({
|
|
8577
8844
|
offset: Math.min(1, Math.max(0, k.time / duration)),
|
|
8578
8845
|
value: format(k, i),
|
|
8579
|
-
...next ? { easing:
|
|
8846
|
+
...next ? { easing: _chunkXZ4L3R4Kcjs.easingToCss.call(void 0, k.easing, next.time - k.time) } : {}
|
|
8580
8847
|
});
|
|
8581
8848
|
});
|
|
8582
8849
|
const last = keys[keys.length - 1];
|
|
@@ -8600,7 +8867,7 @@ function getCssPropertyAnimations(nodes, nodeId, options = {}) {
|
|
|
8600
8867
|
const tracks = /* @__PURE__ */ new Map();
|
|
8601
8868
|
for (const [key, track] of Object.entries(animation.tracks)) {
|
|
8602
8869
|
if (!track || track.enabled === false || !map[key]) continue;
|
|
8603
|
-
const keys =
|
|
8870
|
+
const keys = _chunkXHRZSB77cjs.normalizeKeyframes.call(void 0, track.keyframes);
|
|
8604
8871
|
if (keys.length > 0) tracks.set(key, keys);
|
|
8605
8872
|
}
|
|
8606
8873
|
const typeOf = (key) => _nullishCoalesce(_optionalChain([ANIMATABLE_PROPERTIES, 'access', _238 => _238.find, 'call', _239 => _239((p) => p.key === key), 'optionalAccess', _240 => _240.type]), () => ( "number"));
|
|
@@ -8613,7 +8880,7 @@ function getCssPropertyAnimations(nodes, nodeId, options = {}) {
|
|
|
8613
8880
|
for (const [css, sources] of groups) {
|
|
8614
8881
|
const camel2 = map[sources[0]].camel;
|
|
8615
8882
|
const keysOf = (k) => tracks.get(k);
|
|
8616
|
-
const evalAt = (k, t) =>
|
|
8883
|
+
const evalAt = (k, t) => _chunkXHRZSB77cjs.evaluateTrack.call(void 0, keysOf(k), t, typeOf(k));
|
|
8617
8884
|
const allTimes = sources.flatMap((k) => keysOf(k).map((x) => x.time));
|
|
8618
8885
|
if (sources.includes("motionPath")) {
|
|
8619
8886
|
const position = (t) => {
|
|
@@ -8709,7 +8976,7 @@ function isCssExportExact(nodes, nodeId) {
|
|
|
8709
8976
|
|
|
8710
8977
|
// src/canvas/animation/timeline.ts
|
|
8711
8978
|
function isKeyframeSelected(selection, ref) {
|
|
8712
|
-
return selection.some((s) => s.nodeId === ref.nodeId && s.property === ref.property && Math.abs(s.time - ref.time) <=
|
|
8979
|
+
return selection.some((s) => s.nodeId === ref.nodeId && s.property === ref.property && Math.abs(s.time - ref.time) <= _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON);
|
|
8713
8980
|
}
|
|
8714
8981
|
var defaultLabel = (node) => typeof _optionalChain([node, 'access', _241 => _241.data, 'optionalAccess', _242 => _242.label]) === "string" && node.data.label.trim() ? node.data.label : node.id;
|
|
8715
8982
|
function getTimelineRows(nodes, ids, options = {}) {
|
|
@@ -8730,7 +8997,7 @@ function getTimelineRows(nodes, ids, options = {}) {
|
|
|
8730
8997
|
property,
|
|
8731
8998
|
label,
|
|
8732
8999
|
enabled: track.enabled !== false,
|
|
8733
|
-
keyframes:
|
|
9000
|
+
keyframes: _chunkXHRZSB77cjs.normalizeKeyframes.call(void 0, track.keyframes).map((k) => {
|
|
8734
9001
|
const ref = { nodeId: id, property, time: k.time };
|
|
8735
9002
|
const selected = isKeyframeSelected(selection, ref);
|
|
8736
9003
|
return {
|
|
@@ -8790,7 +9057,7 @@ function createCanvasAnimationController(options) {
|
|
|
8790
9057
|
}
|
|
8791
9058
|
return _nullishCoalesce(fixedDuration, () => ( durationValue));
|
|
8792
9059
|
};
|
|
8793
|
-
const player = new (0,
|
|
9060
|
+
const player = new (0, _chunkXHRZSB77cjs.AnimationPlayer)({
|
|
8794
9061
|
clock: options.clock,
|
|
8795
9062
|
duration,
|
|
8796
9063
|
loop: options.loop,
|
|
@@ -8869,7 +9136,7 @@ function createCanvasAnimationController(options) {
|
|
|
8869
9136
|
const byId = new Map(options.getNodes().map((n) => [n.id, n]));
|
|
8870
9137
|
const kept = selection.filter((ref) => {
|
|
8871
9138
|
const track = _optionalChain([getNodeAnimation, 'call', _255 => _255(byId.get(ref.nodeId)), 'optionalAccess', _256 => _256.tracks, 'access', _257 => _257[ref.property]]);
|
|
8872
|
-
return !!track &&
|
|
9139
|
+
return !!track && _chunkXHRZSB77cjs.normalizeKeyframes.call(void 0, track.keyframes).some((k) => Math.abs(k.time - ref.time) <= _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON);
|
|
8873
9140
|
});
|
|
8874
9141
|
if (kept.length !== selection.length) selection = kept;
|
|
8875
9142
|
}
|
|
@@ -8941,7 +9208,7 @@ function createCanvasAnimationController(options) {
|
|
|
8941
9208
|
nextKeyframe(ids = selectedIds()) {
|
|
8942
9209
|
const list = [...ids];
|
|
8943
9210
|
const times = getKeyframeTimes(options.getNodes(), list.length ? { ids: list } : {});
|
|
8944
|
-
const next = times.find((t) => t > player.currentTime +
|
|
9211
|
+
const next = times.find((t) => t > player.currentTime + _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON);
|
|
8945
9212
|
if (next === void 0) return null;
|
|
8946
9213
|
player.seek(next);
|
|
8947
9214
|
return next;
|
|
@@ -8949,7 +9216,7 @@ function createCanvasAnimationController(options) {
|
|
|
8949
9216
|
previousKeyframe(ids = selectedIds()) {
|
|
8950
9217
|
const list = [...ids];
|
|
8951
9218
|
const times = getKeyframeTimes(options.getNodes(), list.length ? { ids: list } : {});
|
|
8952
|
-
const prev = [...times].reverse().find((t) => t < player.currentTime -
|
|
9219
|
+
const prev = [...times].reverse().find((t) => t < player.currentTime - _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON);
|
|
8953
9220
|
if (prev === void 0) return null;
|
|
8954
9221
|
player.seek(prev);
|
|
8955
9222
|
return prev;
|
|
@@ -11398,6 +11665,324 @@ function getCanvasComponentDragId(dataTransfer) {
|
|
|
11398
11665
|
return id ? id : void 0;
|
|
11399
11666
|
}
|
|
11400
11667
|
|
|
11668
|
+
// src/canvas/freehand.ts
|
|
11669
|
+
function createDefaultStrokeStyle(tool) {
|
|
11670
|
+
if (tool === "highlighter") {
|
|
11671
|
+
return {
|
|
11672
|
+
color: "#facc15",
|
|
11673
|
+
width: 24,
|
|
11674
|
+
opacity: 0.35,
|
|
11675
|
+
cap: "round",
|
|
11676
|
+
join: "round"
|
|
11677
|
+
};
|
|
11678
|
+
}
|
|
11679
|
+
return {
|
|
11680
|
+
color: "#3b82f6",
|
|
11681
|
+
width: 3,
|
|
11682
|
+
opacity: 1,
|
|
11683
|
+
cap: "round",
|
|
11684
|
+
join: "round"
|
|
11685
|
+
};
|
|
11686
|
+
}
|
|
11687
|
+
function streamlinePoints(points, factor = 0.35) {
|
|
11688
|
+
if (points.length < 3 || factor <= 0) return [...points];
|
|
11689
|
+
const clampedFactor = Math.min(Math.max(factor, 0), 0.95);
|
|
11690
|
+
const smoothed = [points[0]];
|
|
11691
|
+
for (let i = 1; i < points.length - 1; i++) {
|
|
11692
|
+
const prev = smoothed[i - 1];
|
|
11693
|
+
const curr = points[i];
|
|
11694
|
+
const x = prev[0] * clampedFactor + curr[0] * (1 - clampedFactor);
|
|
11695
|
+
const y = prev[1] * clampedFactor + curr[1] * (1 - clampedFactor);
|
|
11696
|
+
smoothed.push([x, y]);
|
|
11697
|
+
}
|
|
11698
|
+
smoothed.push(points[points.length - 1]);
|
|
11699
|
+
return smoothed;
|
|
11700
|
+
}
|
|
11701
|
+
function strokeBoundingBox(points, margin = 0) {
|
|
11702
|
+
if (points.length === 0) {
|
|
11703
|
+
return { x: 0, y: 0, width: 0, height: 0 };
|
|
11704
|
+
}
|
|
11705
|
+
let minX = Infinity;
|
|
11706
|
+
let minY = Infinity;
|
|
11707
|
+
let maxX = -Infinity;
|
|
11708
|
+
let maxY = -Infinity;
|
|
11709
|
+
for (const [x, y] of points) {
|
|
11710
|
+
if (x < minX) minX = x;
|
|
11711
|
+
if (y < minY) minY = y;
|
|
11712
|
+
if (x > maxX) maxX = x;
|
|
11713
|
+
if (y > maxY) maxY = y;
|
|
11714
|
+
}
|
|
11715
|
+
const w = Math.max(maxX - minX, 0);
|
|
11716
|
+
const h = Math.max(maxY - minY, 0);
|
|
11717
|
+
return {
|
|
11718
|
+
x: minX - margin,
|
|
11719
|
+
y: minY - margin,
|
|
11720
|
+
width: Math.max(w + margin * 2, 1),
|
|
11721
|
+
height: Math.max(h + margin * 2, 1)
|
|
11722
|
+
};
|
|
11723
|
+
}
|
|
11724
|
+
function strokePointsToPathData(points, options = {}) {
|
|
11725
|
+
if (points.length === 0) return "";
|
|
11726
|
+
if (points.length === 1) {
|
|
11727
|
+
const [x, y] = points[0];
|
|
11728
|
+
return `M ${x} ${y} L ${x + 0.01} ${y}`;
|
|
11729
|
+
}
|
|
11730
|
+
if (points.length === 2) {
|
|
11731
|
+
const [p0, p1] = points;
|
|
11732
|
+
return `M ${p0[0]} ${p0[1]} L ${p1[0]} ${p1[1]}`;
|
|
11733
|
+
}
|
|
11734
|
+
const fitted = fitFreehandPath(points, options);
|
|
11735
|
+
return fitted.length > 0 ? fitted : `M ${points[0][0]} ${points[0][1]}`;
|
|
11736
|
+
}
|
|
11737
|
+
function strokeToShapeNode(stroke, options = {}) {
|
|
11738
|
+
const points = stroke.points;
|
|
11739
|
+
const strokeWidth = stroke.style.width || 3;
|
|
11740
|
+
const bounds = strokeBoundingBox(points, 0);
|
|
11741
|
+
const localPoints = points.map(
|
|
11742
|
+
([x, y]) => [x - bounds.x, y - bounds.y]
|
|
11743
|
+
);
|
|
11744
|
+
const d = strokePointsToPathData(localPoints, {
|
|
11745
|
+
tolerance: _nullishCoalesce(options.tolerance, () => ( 1)),
|
|
11746
|
+
cornerAngleDeg: _nullishCoalesce(options.cornerAngleDeg, () => ( 40))
|
|
11747
|
+
});
|
|
11748
|
+
const width = Math.max(bounds.width, 1);
|
|
11749
|
+
const height = Math.max(bounds.height, 1);
|
|
11750
|
+
const strokePaint = _nullishCoalesce(stroke.style.gradient, () => ( stroke.style.color));
|
|
11751
|
+
const strokeGradient = _nullishCoalesce(stroke.style.gradient, () => ( (typeof stroke.style.color === "object" && stroke.style.color ? stroke.style.color : void 0)));
|
|
11752
|
+
return {
|
|
11753
|
+
id: _nullishCoalesce(options.id, () => ( stroke.id)),
|
|
11754
|
+
type: "shape",
|
|
11755
|
+
position: { x: bounds.x, y: bounds.y },
|
|
11756
|
+
width,
|
|
11757
|
+
height,
|
|
11758
|
+
style: {
|
|
11759
|
+
width,
|
|
11760
|
+
height
|
|
11761
|
+
},
|
|
11762
|
+
data: {
|
|
11763
|
+
shape: {
|
|
11764
|
+
kind: "path",
|
|
11765
|
+
d,
|
|
11766
|
+
viewBox: [0, 0, width, height],
|
|
11767
|
+
stroke: strokePaint,
|
|
11768
|
+
strokeWidth,
|
|
11769
|
+
opacity: stroke.style.opacity,
|
|
11770
|
+
strokeLinecap: _nullishCoalesce(stroke.style.cap, () => ( "round")),
|
|
11771
|
+
strokeLinejoin: _nullishCoalesce(stroke.style.join, () => ( "round")),
|
|
11772
|
+
...strokeGradient ? { strokeGradient } : {},
|
|
11773
|
+
fill: "none"
|
|
11774
|
+
},
|
|
11775
|
+
tool: stroke.tool
|
|
11776
|
+
}
|
|
11777
|
+
};
|
|
11778
|
+
}
|
|
11779
|
+
function findStrokesAtPoint(point, nodes, radius = 12) {
|
|
11780
|
+
const matches2 = [];
|
|
11781
|
+
for (const node of nodes) {
|
|
11782
|
+
const shape = getNodeShape(node);
|
|
11783
|
+
if (!shape || shape.kind !== "path") continue;
|
|
11784
|
+
const rect = getNodeRect(node);
|
|
11785
|
+
const strokeWidth = _nullishCoalesce(shape.strokeWidth, () => ( 2));
|
|
11786
|
+
const effectiveRadius = radius + strokeWidth / 2;
|
|
11787
|
+
if (point[0] < rect.x - effectiveRadius || point[0] > rect.x + rect.width + effectiveRadius || point[1] < rect.y - effectiveRadius || point[1] > rect.y + rect.height + effectiveRadius) {
|
|
11788
|
+
continue;
|
|
11789
|
+
}
|
|
11790
|
+
const localPoint = [point[0] - rect.x, point[1] - rect.y];
|
|
11791
|
+
try {
|
|
11792
|
+
const dist3 = distanceToBezierPath(shape.d, localPoint);
|
|
11793
|
+
if (dist3 <= effectiveRadius) {
|
|
11794
|
+
matches2.push(node);
|
|
11795
|
+
}
|
|
11796
|
+
} catch (e12) {
|
|
11797
|
+
if (point[0] >= rect.x && point[0] <= rect.x + rect.width && point[1] >= rect.y && point[1] <= rect.y + rect.height) {
|
|
11798
|
+
matches2.push(node);
|
|
11799
|
+
}
|
|
11800
|
+
}
|
|
11801
|
+
}
|
|
11802
|
+
return matches2;
|
|
11803
|
+
}
|
|
11804
|
+
|
|
11805
|
+
// src/canvas/drawController.ts
|
|
11806
|
+
function createCanvasDrawController(options) {
|
|
11807
|
+
let currentTool = _nullishCoalesce(options.tool, () => ( "select"));
|
|
11808
|
+
let currentStyle = {
|
|
11809
|
+
...createDefaultStrokeStyle(currentTool),
|
|
11810
|
+
...options.style
|
|
11811
|
+
};
|
|
11812
|
+
let activeStroke = null;
|
|
11813
|
+
const erasedInDrag = /* @__PURE__ */ new Map();
|
|
11814
|
+
let dragStartNodes = null;
|
|
11815
|
+
function setTool(tool) {
|
|
11816
|
+
if (currentTool === tool) return;
|
|
11817
|
+
cancelStroke();
|
|
11818
|
+
currentTool = tool;
|
|
11819
|
+
if (tool === "pen" || tool === "highlighter") {
|
|
11820
|
+
currentStyle = {
|
|
11821
|
+
...createDefaultStrokeStyle(tool),
|
|
11822
|
+
...options.style
|
|
11823
|
+
};
|
|
11824
|
+
_optionalChain([options, 'access', _332 => _332.onStyleChange, 'optionalCall', _333 => _333(currentStyle)]);
|
|
11825
|
+
}
|
|
11826
|
+
_optionalChain([options, 'access', _334 => _334.onToolChange, 'optionalCall', _335 => _335(tool)]);
|
|
11827
|
+
}
|
|
11828
|
+
function setStyle(style) {
|
|
11829
|
+
currentStyle = { ...currentStyle, ...style };
|
|
11830
|
+
_optionalChain([options, 'access', _336 => _336.onStyleChange, 'optionalCall', _337 => _337(currentStyle)]);
|
|
11831
|
+
}
|
|
11832
|
+
function startStroke(point) {
|
|
11833
|
+
if (currentTool === "select") return;
|
|
11834
|
+
if (currentTool === "eraser") {
|
|
11835
|
+
erasedInDrag.clear();
|
|
11836
|
+
dragStartNodes = [...options.getNodes()];
|
|
11837
|
+
eraseAt(point);
|
|
11838
|
+
return;
|
|
11839
|
+
}
|
|
11840
|
+
const id = _nullishCoalesce(_optionalChain([options, 'access', _338 => _338.generateNodeId, 'optionalCall', _339 => _339()]), () => ( `stroke-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`));
|
|
11841
|
+
activeStroke = {
|
|
11842
|
+
id,
|
|
11843
|
+
tool: currentTool,
|
|
11844
|
+
points: [point],
|
|
11845
|
+
style: { ...currentStyle },
|
|
11846
|
+
startTime: Date.now()
|
|
11847
|
+
};
|
|
11848
|
+
_optionalChain([options, 'access', _340 => _340.onActiveStrokeChange, 'optionalCall', _341 => _341(activeStroke)]);
|
|
11849
|
+
}
|
|
11850
|
+
function continueStroke(point) {
|
|
11851
|
+
if (currentTool === "eraser") {
|
|
11852
|
+
eraseAt(point);
|
|
11853
|
+
return;
|
|
11854
|
+
}
|
|
11855
|
+
if (!activeStroke) return;
|
|
11856
|
+
const points = activeStroke.points;
|
|
11857
|
+
const last = points[points.length - 1];
|
|
11858
|
+
if (Math.hypot(point[0] - last[0], point[1] - last[1]) < 0.25) return;
|
|
11859
|
+
points.push(point);
|
|
11860
|
+
_optionalChain([options, 'access', _342 => _342.onActiveStrokeChange, 'optionalCall', _343 => _343({ ...activeStroke, points: [...points] })]);
|
|
11861
|
+
}
|
|
11862
|
+
function endStroke() {
|
|
11863
|
+
if (currentTool === "eraser") {
|
|
11864
|
+
const startSnapshot = dragStartNodes;
|
|
11865
|
+
dragStartNodes = null;
|
|
11866
|
+
if (erasedInDrag.size > 0 && options.history && startSnapshot) {
|
|
11867
|
+
const erasedIds = new Set(Array.from(erasedInDrag.keys()));
|
|
11868
|
+
options.history.execute({
|
|
11869
|
+
name: "Erase strokes",
|
|
11870
|
+
execute: () => {
|
|
11871
|
+
const remaining = options.getNodes().filter((n) => !erasedIds.has(n.id));
|
|
11872
|
+
options.setNodes(remaining);
|
|
11873
|
+
},
|
|
11874
|
+
undo: () => {
|
|
11875
|
+
options.setNodes(startSnapshot);
|
|
11876
|
+
}
|
|
11877
|
+
});
|
|
11878
|
+
}
|
|
11879
|
+
erasedInDrag.clear();
|
|
11880
|
+
return null;
|
|
11881
|
+
}
|
|
11882
|
+
if (!activeStroke) return null;
|
|
11883
|
+
const stroke = activeStroke;
|
|
11884
|
+
activeStroke = null;
|
|
11885
|
+
_optionalChain([options, 'access', _344 => _344.onActiveStrokeChange, 'optionalCall', _345 => _345(null)]);
|
|
11886
|
+
if (stroke.points.length === 0) return null;
|
|
11887
|
+
const drawOpts = _nullishCoalesce(options.drawOptions, () => ( {}));
|
|
11888
|
+
const smoothed = streamlinePoints(stroke.points, _nullishCoalesce(drawOpts.streamline, () => ( 0.35)));
|
|
11889
|
+
const node = strokeToShapeNode(
|
|
11890
|
+
{ ...stroke, points: smoothed },
|
|
11891
|
+
{
|
|
11892
|
+
tolerance: _nullishCoalesce(drawOpts.tolerance, () => ( 1)),
|
|
11893
|
+
cornerAngleDeg: _nullishCoalesce(drawOpts.cornerAngleDeg, () => ( 40))
|
|
11894
|
+
}
|
|
11895
|
+
);
|
|
11896
|
+
if (options.history) {
|
|
11897
|
+
options.history.execute({
|
|
11898
|
+
name: `Draw ${stroke.tool}`,
|
|
11899
|
+
execute: () => {
|
|
11900
|
+
options.setNodes([...options.getNodes(), node]);
|
|
11901
|
+
},
|
|
11902
|
+
undo: () => {
|
|
11903
|
+
options.setNodes(options.getNodes().filter((n) => n.id !== node.id));
|
|
11904
|
+
}
|
|
11905
|
+
});
|
|
11906
|
+
} else {
|
|
11907
|
+
options.setNodes([...options.getNodes(), node]);
|
|
11908
|
+
}
|
|
11909
|
+
_optionalChain([options, 'access', _346 => _346.onStrokeComplete, 'optionalCall', _347 => _347(node)]);
|
|
11910
|
+
return node;
|
|
11911
|
+
}
|
|
11912
|
+
function cancelStroke() {
|
|
11913
|
+
if (activeStroke) {
|
|
11914
|
+
activeStroke = null;
|
|
11915
|
+
_optionalChain([options, 'access', _348 => _348.onActiveStrokeChange, 'optionalCall', _349 => _349(null)]);
|
|
11916
|
+
}
|
|
11917
|
+
if (erasedInDrag.size > 0) {
|
|
11918
|
+
const entries = Array.from(erasedInDrag.values());
|
|
11919
|
+
const current = [...options.getNodes()];
|
|
11920
|
+
const sorted = [...entries].sort((a, b) => a.index - b.index);
|
|
11921
|
+
for (const { node, index } of sorted) {
|
|
11922
|
+
const insertAt = Math.min(index, current.length);
|
|
11923
|
+
current.splice(insertAt, 0, node);
|
|
11924
|
+
}
|
|
11925
|
+
options.setNodes(current);
|
|
11926
|
+
erasedInDrag.clear();
|
|
11927
|
+
}
|
|
11928
|
+
}
|
|
11929
|
+
function eraseAt(point, radius = 12) {
|
|
11930
|
+
const nodes = options.getNodes();
|
|
11931
|
+
const candidates = findStrokesAtPoint(point, nodes, radius);
|
|
11932
|
+
const newlyErased = [];
|
|
11933
|
+
for (const candidate of candidates) {
|
|
11934
|
+
if (erasedInDrag.has(candidate.id) || isLocked(candidate)) continue;
|
|
11935
|
+
const index = nodes.findIndex((n) => n.id === candidate.id);
|
|
11936
|
+
if (index !== -1) {
|
|
11937
|
+
erasedInDrag.set(candidate.id, { node: candidate, index });
|
|
11938
|
+
newlyErased.push(candidate);
|
|
11939
|
+
}
|
|
11940
|
+
}
|
|
11941
|
+
if (newlyErased.length > 0) {
|
|
11942
|
+
const erasedSet = new Set(newlyErased.map((n) => n.id));
|
|
11943
|
+
const nextNodes = nodes.filter((n) => !erasedSet.has(n.id));
|
|
11944
|
+
options.setNodes(nextNodes);
|
|
11945
|
+
_optionalChain([options, 'access', _350 => _350.onNodesErase, 'optionalCall', _351 => _351(newlyErased)]);
|
|
11946
|
+
}
|
|
11947
|
+
return newlyErased;
|
|
11948
|
+
}
|
|
11949
|
+
return {
|
|
11950
|
+
get tool() {
|
|
11951
|
+
return currentTool;
|
|
11952
|
+
},
|
|
11953
|
+
setTool,
|
|
11954
|
+
get style() {
|
|
11955
|
+
return currentStyle;
|
|
11956
|
+
},
|
|
11957
|
+
setStyle,
|
|
11958
|
+
get activeStroke() {
|
|
11959
|
+
return activeStroke;
|
|
11960
|
+
},
|
|
11961
|
+
get isDrawing() {
|
|
11962
|
+
return activeStroke !== null;
|
|
11963
|
+
},
|
|
11964
|
+
startStroke,
|
|
11965
|
+
continueStroke,
|
|
11966
|
+
endStroke,
|
|
11967
|
+
cancelStroke,
|
|
11968
|
+
eraseAt
|
|
11969
|
+
};
|
|
11970
|
+
}
|
|
11971
|
+
|
|
11972
|
+
|
|
11973
|
+
|
|
11974
|
+
|
|
11975
|
+
|
|
11976
|
+
|
|
11977
|
+
|
|
11978
|
+
|
|
11979
|
+
|
|
11980
|
+
|
|
11981
|
+
|
|
11982
|
+
|
|
11983
|
+
|
|
11984
|
+
|
|
11985
|
+
|
|
11401
11986
|
|
|
11402
11987
|
|
|
11403
11988
|
|
|
@@ -11752,5 +12337,5 @@ function getCanvasComponentDragId(dataTransfer) {
|
|
|
11752
12337
|
|
|
11753
12338
|
|
|
11754
12339
|
|
|
11755
|
-
exports.ANIMATABLE_PROPERTIES = ANIMATABLE_PROPERTIES; exports.ANIMATION_DATA_KEY = ANIMATION_DATA_KEY; exports.ANIMATION_EASING_LABELS = _chunkTTYCN6ZHcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkTTYCN6ZHcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkTTYCN6ZHcjs.ANIMATION_TIME_EPSILON; exports.AUTO_LAYOUT_DATA_KEY = AUTO_LAYOUT_DATA_KEY; exports.AnimationEditError = AnimationEditError; exports.AnimationPlayer = _chunkTTYCN6ZHcjs.AnimationPlayer; exports.CANVAS_COMPONENT_DRAG_TYPE = CANVAS_COMPONENT_DRAG_TYPE; exports.CANVAS_TOKEN_PROPERTIES = CANVAS_TOKEN_PROPERTIES; exports.CHILD_LAYOUT_DATA_KEY = CHILD_LAYOUT_DATA_KEY; exports.COMPONENT_DATA_KEY = COMPONENT_DATA_KEY; exports.COMPONENT_OVERRIDES_DATA_KEY = COMPONENT_OVERRIDES_DATA_KEY; exports.COMPONENT_PROPERTY_REFS_DATA_KEY = COMPONENT_PROPERTY_REFS_DATA_KEY; exports.COMPONENT_SET_DATA_KEY = COMPONENT_SET_DATA_KEY; exports.COMPONENT_SOURCE_DATA_KEY = COMPONENT_SOURCE_DATA_KEY; exports.CONNECTION_LINE_TYPES = CONNECTION_LINE_TYPES; exports.CSS_ANIMATION_PROPERTIES = CSS_ANIMATION_PROPERTIES; exports.CUBIC_BEZIER_PRESETS = _chunkTTYCN6ZHcjs.CUBIC_BEZIER_PRESETS; exports.CanvasScenesStore = CanvasScenesStore; exports.DEFAULT_ARRANGE_SHORTCUTS = _chunk26BVFKHUcjs.DEFAULT_ARRANGE_SHORTCUTS; exports.DEFAULT_NODE_HEIGHT = _chunkWADCJ7A7cjs.DEFAULT_NODE_HEIGHT; exports.DEFAULT_NODE_WIDTH = _chunkWADCJ7A7cjs.DEFAULT_NODE_WIDTH; exports.DEFAULT_PLACEMENT_GAP = _chunkWADCJ7A7cjs.DEFAULT_PLACEMENT_GAP; exports.INSTANCE_DATA_KEY = INSTANCE_DATA_KEY; exports.LOCKED_DATA_KEY = LOCKED_DATA_KEY; exports.LOCKED_PREVIOUS_FLAGS_KEY = LOCKED_PREVIOUS_FLAGS_KEY; exports.MAX_KEYFRAME_REFS = MAX_KEYFRAME_REFS; exports.ManualClock = _chunkTTYCN6ZHcjs.ManualClock; exports.PathOpsError = PathOpsError; exports.RESIZE_HANDLES = RESIZE_HANDLES; exports.SHAPE_DATA_KEY = SHAPE_DATA_KEY; exports.SHAPE_KINDS = SHAPE_KINDS; exports.SHAPE_NODE_TYPE = SHAPE_NODE_TYPE; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.StreamingLayoutManager = StreamingLayoutManager; exports.TOKEN_BINDINGS_DATA_KEY = TOKEN_BINDINGS_DATA_KEY; exports.TOKEN_MODES_DATA_KEY = TOKEN_MODES_DATA_KEY; exports.addCanvasVariant = addCanvasVariant; exports.addKeyframesAtTime = addKeyframesAtTime; exports.alignNodes = alignNodes; exports.animateNode = animateNode; exports.applyAnimation = applyAnimation; exports.applyAnimationOverrides = applyAnimationOverrides; exports.applyConstraints = applyConstraints; exports.applyNodeUpdates = applyNodeUpdates; exports.applyShapeCombination = applyShapeCombination; exports.applyShapeReplacement = applyShapeReplacement; exports.arcToCubics = arcToCubics; exports.bezierPathArea = bezierPathArea; exports.bezierPathBounds = bezierPathBounds; exports.bezierPathLength = bezierPathLength; exports.bezierPathPointAtLength = bezierPathPointAtLength; exports.bezierPathSignedArea = bezierPathSignedArea; exports.bezierPathToSvg = bezierPathToSvg; exports.bindCanvasComponentProperty = bindCanvasComponentProperty; exports.bindCanvasToken = bindCanvasToken; exports.blendLayout = blendLayout; exports.boundsOf = _chunkWADCJ7A7cjs.boundsOf; exports.calculateDagreReflowDisplacement = calculateDagreReflowDisplacement; exports.calculateDirectionalDisplacement = calculateDirectionalDisplacement; exports.canCombineShapeNodes = canCombineShapeNodes; exports.canOffsetShapeNodes = canOffsetShapeNodes; exports.canOutlineShapeNodeStrokes = canOutlineShapeNodeStrokes; exports.canvasHeight = canvasHeight; exports.centerNodes = _chunkWADCJ7A7cjs.centerNodes; exports.centre = _chunkWADCJ7A7cjs.centre; exports.clampAnimationValue = clampAnimationValue; exports.clampLayoutSize = clampLayoutSize; exports.closeContour = closeContour; exports.collectDescendantIds = collectDescendantIds; exports.combineCanvasComponentsAsVariants = combineCanvasComponentsAsVariants; exports.combineShapeNodes = combineShapeNodes; exports.computeNodesBoundingBox = computeNodesBoundingBox; exports.computeSnapGuides = computeSnapGuides; exports.connectedOnly = connectedOnly; exports.contourSignedArea = contourSignedArea; exports.contoursToPath = contoursToPath; exports.copyKeyframes = copyKeyframes; exports.countPathSegments = countPathSegments; exports.createAnimationPlayer = _chunkTTYCN6ZHcjs.createAnimationPlayer; exports.createBezierTrajectory = createBezierTrajectory; exports.createCanvasAnimationController = createCanvasAnimationController; exports.createCanvasArrangeController = createCanvasArrangeController; exports.createCanvasAutoLayoutController = createCanvasAutoLayoutController; exports.createCanvasComponent = createCanvasComponent; exports.createCanvasComponentsController = createCanvasComponentsController; exports.createCanvasInstance = createCanvasInstance; exports.createCanvasScenesStore = createCanvasScenesStore; exports.createFanOutTrajectory = createFanOutTrajectory; exports.createGuideIndex = createGuideIndex; exports.createNodeGuideIndex = createNodeGuideIndex; exports.createNodeLookup = createNodeLookup; exports.cubicBezierAt = _chunkTTYCN6ZHcjs.cubicBezierAt; exports.cubicPointAt = cubicPointAt; exports.cubicsToPathData = cubicsToPathData; exports.dashContours = dashContours; exports.defaultEasing = defaultEasing; exports.deleteKeyframes = deleteKeyframes; exports.detachCanvasInstance = detachCanvasInstance; exports.detachTokenBindings = detachTokenBindings; exports.diffOverrideGroups = diffOverrideGroups; exports.distanceToBezierPath = distanceToBezierPath; exports.distributeNodes = distributeNodes; exports.dividePaths = dividePaths; exports.dividePolygons = dividePolygons; exports.easingFromInfluence = _chunkTTYCN6ZHcjs.easingFromInfluence; exports.easingLabel = _chunkTTYCN6ZHcjs.easingLabel; exports.easingToCss = _chunkTTYCN6ZHcjs.easingToCss; exports.ensureLayout = _chunkWADCJ7A7cjs.ensureLayout; exports.estimateCanvasHeight = estimateCanvasHeight; exports.estimateNodeSize = _chunkWADCJ7A7cjs.estimateNodeSize; exports.evaluateAnimation = evaluateAnimation; exports.evaluateEasing = _chunkTTYCN6ZHcjs.evaluateEasing; exports.evaluateTrack = _chunkTTYCN6ZHcjs.evaluateTrack; exports.excludePaths = excludePaths; exports.exportCssAnimation = exportCssAnimation; exports.findConnectorSnap = findConnectorSnap; exports.findVariant = findVariant; exports.fitCubicRun = fitCubicRun; exports.fitCubics = fitCubics; exports.fitFreehandPath = fitFreehandPath; exports.fitPathData = fitPathData; exports.fitViewportToNodes = fitViewportToNodes; exports.fitViewportToRect = fitViewportToRect; exports.flattenSvgPath = flattenSvgPath; exports.flowSide = _chunkWADCJ7A7cjs.flowSide; exports.formatAnimationTime = formatAnimationTime; exports.formatNumber = formatNumber2; exports.formatOklab = _chunkTTYCN6ZHcjs.formatOklab; exports.formatVariantName = formatVariantName; exports.getAbsolutePosition = getAbsolutePosition; exports.getAnimatableProperty = getAnimatableProperty; exports.getAnimatedProperties = getAnimatedProperties; exports.getAnimatedValue = getAnimatedValue; exports.getAnimationDuration = getAnimationDuration; exports.getAnimationTrack = getAnimationTrack; exports.getAutoLayout = getAutoLayout; exports.getAutoLayoutGrid = getAutoLayoutGrid; exports.getAutoLayoutInsertTarget = getAutoLayoutInsertTarget; exports.getBindableTokenProperties = getBindableTokenProperties; exports.getCanvasComponentDragId = getCanvasComponentDragId; exports.getCanvasTokenProperty = getCanvasTokenProperty; exports.getCenteredNodePosition = _chunkWADCJ7A7cjs.getCenteredNodePosition; exports.getChildLayout = getChildLayout; exports.getComponentData = getComponentData; exports.getComponentInstances = getComponentInstances; exports.getComponentPropertyDefs = getComponentPropertyDefs; exports.getComponentPropertyRefs = getComponentPropertyRefs; exports.getComponentSourceId = getComponentSourceId; exports.getCssPropertyAnimations = getCssPropertyAnimations; exports.getDefaultVariant = getDefaultVariant; exports.getEffectiveTokenModes = getEffectiveTokenModes; exports.getFlowChildren = getFlowChildren; exports.getInstanceData = getInstanceData; exports.getInstanceProperties = getInstanceProperties; exports.getInstanceStatus = getInstanceStatus; exports.getKeyframeTimes = getKeyframeTimes; exports.getLayerName = getLayerName; exports.getLayoutParent = getLayoutParent; exports.getLayoutSizing = getLayoutSizing; exports.getLayoutedNodes = _chunkWADCJ7A7cjs.getLayoutedNodes; exports.getNextVariantValues = getNextVariantValues; exports.getNodeAnimation = getNodeAnimation; exports.getNodeOverrides = getNodeOverrides; exports.getNodeRect = getNodeRect; exports.getNodeShape = getNodeShape; exports.getNodeSize = getNodeSize; exports.getNodeTokenBindings = getNodeTokenBindings; exports.getNodeTokenModes = getNodeTokenModes; exports.getOwningComponent = getOwningComponent; exports.getOwningInstance = getOwningInstance; exports.getResizingNodeRect = getResizingNodeRect; exports.getRootInstance = getRootInstance; exports.getShapeRenderData = getShapeRenderData; exports.getShapeSvg = getShapeSvg; exports.getTimelineRows = getTimelineRows; exports.getTimelineTicks = getTimelineTicks; exports.getTokenPropertyScope = getTokenPropertyScope; exports.getTokensForProperty = getTokensForProperty; exports.getVariantConflicts = getVariantConflicts; exports.getVariantOptions = getVariantOptions; exports.getVariantSet = getVariantSet; exports.getVariantValues = getVariantValues; exports.handlePoint = handlePoint; exports.hasVisibleStroke = hasVisibleStroke; exports.inferResizeHandle = inferResizeHandle; exports.inspectCanvasInstance = inspectCanvasInstance; exports.inspectNodeTokens = inspectNodeTokens; exports.interpolateAnimationValue = _chunkTTYCN6ZHcjs.interpolateAnimationValue; exports.intersectPaths = intersectPaths; exports.intersectPolygons = intersectPolygons; exports.invertNodeUpdates = invertNodeUpdates; exports.isAnimationEasing = _chunkTTYCN6ZHcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkTTYCN6ZHcjs.isAnimationKeyframe; exports.isAutoLayoutFrame = isAutoLayoutFrame; exports.isCanvasComponent = isCanvasComponent; exports.isCanvasComponentSet = isCanvasComponentSet; exports.isCanvasInstance = isCanvasInstance; exports.isCssExportExact = isCssExportExact; exports.isEventFromTextInput = isEventFromTextInput; exports.isInsideInstance = isInsideInstance; exports.isKeyframeSelected = isKeyframeSelected; exports.isLocked = isLocked; exports.isMeasureModifierHeld = isMeasureModifierHeld; exports.isNodeAnimated = isNodeAnimated; exports.isShapeDescription = isShapeDescription; exports.isShapeNode = isShapeNode; exports.isStraightCubic = isStraightCubic; exports.isValidCanvasEdge = isValidCanvasEdge; exports.isValidCanvasNode = isValidCanvasNode; exports.isValidCanvasScene = isValidCanvasScene; exports.isValidUrl = isValidUrl; exports.layoutAll = layoutAll; exports.layoutBounds = layoutBounds; exports.layoutFrame = layoutFrame; exports.layoutUp = layoutUp; exports.layoutUpMany = layoutUpMany; exports.linearPositionTrajectory = linearPositionTrajectory; exports.linearTrajectory = linearTrajectory; exports.listCanvasComponents = listCanvasComponents; exports.lockNodes = lockNodes; exports.makeSizingCoherent = makeSizingCoherent; exports.matchArrangeShortcut = _chunk26BVFKHUcjs.matchArrangeShortcut; exports.matchSize = matchSize; exports.measureBetween = measureBetween; exports.measureLabel = measureLabel; exports.measureSelection = measureSelection; exports.measureToLine = measureToLine; exports.mergeNodeUpdates = mergeNodeUpdates; exports.mixColorsOklab = _chunkTTYCN6ZHcjs.mixColorsOklab; exports.moveKeyframes = moveKeyframes; exports.moveLayoutChild = moveLayoutChild; exports.multiPolygonArea = multiPolygonArea; exports.multiPolygonBounds = multiPolygonBounds; exports.nearestHandlePositions = nearestHandlePositions; exports.normalizeBezierPath = normalizeBezierPath; exports.normalizeKeyframes = _chunkTTYCN6ZHcjs.normalizeKeyframes; exports.offsetPath = offsetPath; exports.offsetShapeNodes = offsetShapeNodes; exports.oklabToRgb = _chunkTTYCN6ZHcjs.oklabToRgb; exports.oppositePosition = oppositePosition; exports.outlineShapeNodeStrokes = outlineShapeNodeStrokes; exports.outlineStroke = outlineStroke; exports.overlaps = _chunkWADCJ7A7cjs.overlaps; exports.pageHidden = _chunkTTYCN6ZHcjs.pageHidden; exports.parseCanvasClipboardData = parseCanvasClipboardData; exports.parseCanvasScenes = parseCanvasScenes; exports.parseCssEasing = _chunkTTYCN6ZHcjs.parseCssEasing; exports.parseKeyframeClipboard = parseKeyframeClipboard; exports.parseNodeStyleDeclarations = parseNodeStyleDeclarations; exports.parseOklab = _chunkTTYCN6ZHcjs.parseOklab; exports.parseSvgPath = parseSvgPath; exports.parseVariantName = parseVariantName; exports.pasteKeyframes = pasteKeyframes; exports.pathBoolean = pathBoolean; exports.pathToContours = pathToContours; exports.placeBeside = _chunkWADCJ7A7cjs.placeBeside; exports.playWebAnimations = playWebAnimations; exports.pointInBezierPath = pointInBezierPath; exports.pointInMultiPolygon = pointInMultiPolygon; exports.pointInRings = pointInRings; exports.polygonArea = polygonArea; exports.polygonBoolean = polygonBoolean; exports.polygonToSvgPath = polygonToSvgPath; exports.positionToSide = positionToSide; exports.pruneCanvasTokenModes = pruneCanvasTokenModes; exports.pushCanvasInstanceOverrides = pushCanvasInstanceOverrides; exports.readAnimatableValue = readAnimatableValue; exports.readNodeStyleProperty = readNodeStyleProperty; exports.readOverrideGroup = readOverrideGroup; exports.readStyleSize = readStyleSize; exports.realClock = _chunkTTYCN6ZHcjs.realClock; exports.recordAnimationChanges = recordAnimationChanges; exports.relayoutUpdates = relayoutUpdates; exports.remapPastedNodes = remapPastedNodes; exports.removeCanvasVariant = removeCanvasVariant; exports.removeTrack = removeTrack; exports.renameCanvasVariantProperty = renameCanvasVariantProperty; exports.renameCanvasVariantValue = renameCanvasVariantValue; exports.reorderNodes = reorderNodes; exports.repositionNodesTo = repositionNodesTo; exports.resetCanvasInstanceOverrides = resetCanvasInstanceOverrides; exports.resizeHandleAxes = resizeHandleAxes; exports.resolveCanvasTokens = resolveCanvasTokens; exports.resolveEasing = _chunkTTYCN6ZHcjs.resolveEasing; exports.resolvePadding = resolvePadding; exports.restoreCanvasMainComponent = restoreCanvasMainComponent; exports.revertShapeCombination = revertShapeCombination; exports.rgbToOklab = _chunkTTYCN6ZHcjs.rgbToOklab; exports.ringSignedArea = ringSignedArea; exports.runMultiNodeTransition = runMultiNodeTransition; exports.sampleAnimationFrames = sampleAnimationFrames; exports.scaleKeyframes = scaleKeyframes; exports.segmentBounds = segmentBounds; exports.segmentCurvature = segmentCurvature; exports.segmentDerivative = segmentDerivative; exports.segmentExtrema = segmentExtrema; exports.segmentLength = segmentLength; exports.segmentNearest = segmentNearest; exports.segmentParamAtLength = segmentParamAtLength; exports.segmentPoint = segmentPoint; exports.segmentTangent = segmentTangent; exports.serializeCanvasNodes = serializeCanvasNodes; exports.setCanvasComponentProperty = setCanvasComponentProperty; exports.setCanvasInstanceProperties = setCanvasInstanceProperties; exports.setCanvasTokenMode = setCanvasTokenMode; exports.setCanvasVariantProperties = setCanvasVariantProperties; exports.setKeyframe = setKeyframe; exports.setKeyframeEasing = setKeyframeEasing; exports.setMotionPath = setMotionPath; exports.setTrackEnabled = setTrackEnabled; exports.shapeNodeToBezierPath = shapeNodeToBezierPath; exports.shapeNodeToPolygon = shapeNodeToPolygon; exports.shapeToBezierPath = shapeToBezierPath; exports.shapeToPolygon = shapeToPolygon; exports.sideToPosition = sideToPosition; exports.simplifyRing = simplifyRing; exports.snapKeyframeDelta = snapKeyframeDelta; exports.snapNodeDrag = snapNodeDrag; exports.snapNodeResize = snapNodeResize; exports.snapResize = snapResize; exports.snapTimeToFrame = snapTimeToFrame; exports.snapToGrid = snapToGrid; exports.splitSegment = splitSegment; exports.springAt = _chunkTTYCN6ZHcjs.springAt; exports.strokeOutlineRings = strokeOutlineRings; exports.subSegment = subSegment; exports.subtractPaths = subtractPaths; exports.subtractPolygons = subtractPolygons; exports.swapCanvasInstance = swapCanvasInstance; exports.syncAllCanvasInstances = syncAllCanvasInstances; exports.syncCanvasComponents = syncCanvasComponents; exports.syncCanvasInstance = syncCanvasInstance; exports.timeToX = timeToX; exports.toBezierPath = toBezierPath; exports.toWebAnimations = toWebAnimations; exports.toggleLockNodes = toggleLockNodes; exports.transformBezierPath = transformBezierPath; exports.trimSegments = trimSegments; exports.unionPolygons = unionPolygons; exports.unitePaths = unitePaths; exports.unlockNodes = unlockNodes; exports.updateKeyframe = updateKeyframe; exports.windingNumber = windingNumber; exports.withNodeAnimation = withNodeAnimation; exports.withStyleOpacity = withStyleOpacity; exports.withStyleSize = withStyleSize; exports.wouldCreateComponentCycle = wouldCreateComponentCycle; exports.wrapAnimationTime = _chunkTTYCN6ZHcjs.wrapAnimationTime; exports.writeNodeStyleProperty = writeNodeStyleProperty; exports.writeOverrideGroup = writeOverrideGroup; exports.xToTime = xToTime; exports.xorPolygons = xorPolygons;
|
|
12340
|
+
exports.ANIMATABLE_PROPERTIES = ANIMATABLE_PROPERTIES; exports.ANIMATION_DATA_KEY = ANIMATION_DATA_KEY; exports.ANIMATION_EASING_LABELS = _chunkXZ4L3R4Kcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkXZ4L3R4Kcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkXHRZSB77cjs.ANIMATION_TIME_EPSILON; exports.AUTO_LAYOUT_DATA_KEY = AUTO_LAYOUT_DATA_KEY; exports.AnimationEditError = AnimationEditError; exports.AnimationPlayer = _chunkXHRZSB77cjs.AnimationPlayer; exports.CANVAS_COMPONENT_DRAG_TYPE = CANVAS_COMPONENT_DRAG_TYPE; exports.CANVAS_GRADIENT_PRESETS = CANVAS_GRADIENT_PRESETS; exports.CANVAS_TOKEN_PROPERTIES = CANVAS_TOKEN_PROPERTIES; exports.CHILD_LAYOUT_DATA_KEY = CHILD_LAYOUT_DATA_KEY; exports.COMPONENT_DATA_KEY = COMPONENT_DATA_KEY; exports.COMPONENT_OVERRIDES_DATA_KEY = COMPONENT_OVERRIDES_DATA_KEY; exports.COMPONENT_PROPERTY_REFS_DATA_KEY = COMPONENT_PROPERTY_REFS_DATA_KEY; exports.COMPONENT_SET_DATA_KEY = COMPONENT_SET_DATA_KEY; exports.COMPONENT_SOURCE_DATA_KEY = COMPONENT_SOURCE_DATA_KEY; exports.CONNECTION_LINE_TYPES = CONNECTION_LINE_TYPES; exports.CSS_ANIMATION_PROPERTIES = CSS_ANIMATION_PROPERTIES; exports.CUBIC_BEZIER_PRESETS = _chunkXZ4L3R4Kcjs.CUBIC_BEZIER_PRESETS; exports.CanvasScenesStore = CanvasScenesStore; exports.DEFAULT_ARRANGE_SHORTCUTS = _chunk26BVFKHUcjs.DEFAULT_ARRANGE_SHORTCUTS; exports.DEFAULT_NODE_HEIGHT = _chunkWADCJ7A7cjs.DEFAULT_NODE_HEIGHT; exports.DEFAULT_NODE_WIDTH = _chunkWADCJ7A7cjs.DEFAULT_NODE_WIDTH; exports.DEFAULT_PLACEMENT_GAP = _chunkWADCJ7A7cjs.DEFAULT_PLACEMENT_GAP; exports.INSTANCE_DATA_KEY = INSTANCE_DATA_KEY; exports.LOCKED_DATA_KEY = LOCKED_DATA_KEY; exports.LOCKED_PREVIOUS_FLAGS_KEY = LOCKED_PREVIOUS_FLAGS_KEY; exports.MAX_KEYFRAME_REFS = MAX_KEYFRAME_REFS; exports.ManualClock = _chunkXHRZSB77cjs.ManualClock; exports.PathOpsError = PathOpsError; exports.RESIZE_HANDLES = RESIZE_HANDLES; exports.SHAPE_DATA_KEY = SHAPE_DATA_KEY; exports.SHAPE_KINDS = SHAPE_KINDS; exports.SHAPE_NODE_TYPE = SHAPE_NODE_TYPE; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.StreamingLayoutManager = StreamingLayoutManager; exports.TOKEN_BINDINGS_DATA_KEY = TOKEN_BINDINGS_DATA_KEY; exports.TOKEN_MODES_DATA_KEY = TOKEN_MODES_DATA_KEY; exports.addCanvasVariant = addCanvasVariant; exports.addKeyframesAtTime = addKeyframesAtTime; exports.alignNodes = alignNodes; exports.angleToSvgLinearCoords = angleToSvgLinearCoords; exports.animateNode = animateNode; exports.applyAnimation = applyAnimation; exports.applyAnimationOverrides = applyAnimationOverrides; exports.applyConstraints = applyConstraints; exports.applyNodeUpdates = applyNodeUpdates; exports.applyShapeCombination = applyShapeCombination; exports.applyShapeReplacement = applyShapeReplacement; exports.arcToCubics = arcToCubics; exports.bezierPathArea = bezierPathArea; exports.bezierPathBounds = bezierPathBounds; exports.bezierPathLength = bezierPathLength; exports.bezierPathPointAtLength = bezierPathPointAtLength; exports.bezierPathSignedArea = bezierPathSignedArea; exports.bezierPathToSvg = bezierPathToSvg; exports.bindCanvasComponentProperty = bindCanvasComponentProperty; exports.bindCanvasToken = bindCanvasToken; exports.blendLayout = blendLayout; exports.boundsOf = _chunkWADCJ7A7cjs.boundsOf; exports.calculateDagreReflowDisplacement = calculateDagreReflowDisplacement; exports.calculateDirectionalDisplacement = calculateDirectionalDisplacement; exports.canCombineShapeNodes = canCombineShapeNodes; exports.canOffsetShapeNodes = canOffsetShapeNodes; exports.canOutlineShapeNodeStrokes = canOutlineShapeNodeStrokes; exports.canvasHeight = canvasHeight; exports.centerNodes = _chunkWADCJ7A7cjs.centerNodes; exports.centre = _chunkWADCJ7A7cjs.centre; exports.clampAnimationValue = clampAnimationValue; exports.clampLayoutSize = clampLayoutSize; exports.closeContour = closeContour; exports.collectDescendantIds = collectDescendantIds; exports.combineCanvasComponentsAsVariants = combineCanvasComponentsAsVariants; exports.combineShapeNodes = combineShapeNodes; exports.computeNodesBoundingBox = computeNodesBoundingBox; exports.computeSnapGuides = computeSnapGuides; exports.connectedOnly = connectedOnly; exports.contourSignedArea = contourSignedArea; exports.contoursToPath = contoursToPath; exports.copyKeyframes = copyKeyframes; exports.countPathSegments = countPathSegments; exports.createAnimationPlayer = _chunkXHRZSB77cjs.createAnimationPlayer; exports.createBezierTrajectory = createBezierTrajectory; exports.createCanvasAnimationController = createCanvasAnimationController; exports.createCanvasArrangeController = createCanvasArrangeController; exports.createCanvasAutoLayoutController = createCanvasAutoLayoutController; exports.createCanvasComponent = createCanvasComponent; exports.createCanvasComponentsController = createCanvasComponentsController; exports.createCanvasDrawController = createCanvasDrawController; exports.createCanvasInstance = createCanvasInstance; exports.createCanvasScenesStore = createCanvasScenesStore; exports.createDefaultStrokeStyle = createDefaultStrokeStyle; exports.createFanOutTrajectory = createFanOutTrajectory; exports.createGuideIndex = createGuideIndex; exports.createNodeGuideIndex = createNodeGuideIndex; exports.createNodeLookup = createNodeLookup; exports.cubicBezierAt = _chunkXZ4L3R4Kcjs.cubicBezierAt; exports.cubicPointAt = cubicPointAt; exports.cubicsToPathData = cubicsToPathData; exports.dashContours = dashContours; exports.defaultEasing = defaultEasing; exports.deleteKeyframes = deleteKeyframes; exports.detachCanvasInstance = detachCanvasInstance; exports.detachTokenBindings = detachTokenBindings; exports.diffOverrideGroups = diffOverrideGroups; exports.distanceToBezierPath = distanceToBezierPath; exports.distributeNodes = distributeNodes; exports.dividePaths = dividePaths; exports.dividePolygons = dividePolygons; exports.easingFromInfluence = _chunkXZ4L3R4Kcjs.easingFromInfluence; exports.easingLabel = _chunkXZ4L3R4Kcjs.easingLabel; exports.easingToCss = _chunkXZ4L3R4Kcjs.easingToCss; exports.elasticAt = _chunkXZ4L3R4Kcjs.elasticAt; exports.ensureLayout = _chunkWADCJ7A7cjs.ensureLayout; exports.estimateCanvasHeight = estimateCanvasHeight; exports.estimateNodeSize = _chunkWADCJ7A7cjs.estimateNodeSize; exports.evaluateAnimation = evaluateAnimation; exports.evaluateEasing = _chunkXZ4L3R4Kcjs.evaluateEasing; exports.evaluateTrack = _chunkXHRZSB77cjs.evaluateTrack; exports.excludePaths = excludePaths; exports.exportCssAnimation = exportCssAnimation; exports.findConnectorSnap = findConnectorSnap; exports.findStrokesAtPoint = findStrokesAtPoint; exports.findVariant = findVariant; exports.fitCubicRun = fitCubicRun; exports.fitCubics = fitCubics; exports.fitFreehandPath = fitFreehandPath; exports.fitPathData = fitPathData; exports.fitViewportToNodes = fitViewportToNodes; exports.fitViewportToRect = fitViewportToRect; exports.flattenSvgPath = flattenSvgPath; exports.flowSide = _chunkWADCJ7A7cjs.flowSide; exports.formatAnimationTime = formatAnimationTime; exports.formatNumber = formatNumber2; exports.formatOklab = _chunkXHRZSB77cjs.formatOklab; exports.formatVariantName = formatVariantName; exports.getAbsolutePosition = getAbsolutePosition; exports.getAnimatableProperty = getAnimatableProperty; exports.getAnimatedProperties = getAnimatedProperties; exports.getAnimatedValue = getAnimatedValue; exports.getAnimationDuration = getAnimationDuration; exports.getAnimationTrack = getAnimationTrack; exports.getAutoLayout = getAutoLayout; exports.getAutoLayoutGrid = getAutoLayoutGrid; exports.getAutoLayoutInsertTarget = getAutoLayoutInsertTarget; exports.getBindableTokenProperties = getBindableTokenProperties; exports.getCanvasComponentDragId = getCanvasComponentDragId; exports.getCanvasTokenProperty = getCanvasTokenProperty; exports.getCenteredNodePosition = _chunkWADCJ7A7cjs.getCenteredNodePosition; exports.getChildLayout = getChildLayout; exports.getComponentData = getComponentData; exports.getComponentInstances = getComponentInstances; exports.getComponentPropertyDefs = getComponentPropertyDefs; exports.getComponentPropertyRefs = getComponentPropertyRefs; exports.getComponentSourceId = getComponentSourceId; exports.getCssPropertyAnimations = getCssPropertyAnimations; exports.getDefaultVariant = getDefaultVariant; exports.getEffectiveTokenModes = getEffectiveTokenModes; exports.getFlowChildren = getFlowChildren; exports.getInstanceData = getInstanceData; exports.getInstanceProperties = getInstanceProperties; exports.getInstanceStatus = getInstanceStatus; exports.getKeyframeTimes = getKeyframeTimes; exports.getLayerName = getLayerName; exports.getLayoutParent = getLayoutParent; exports.getLayoutSizing = getLayoutSizing; exports.getLayoutedNodes = _chunkWADCJ7A7cjs.getLayoutedNodes; exports.getNextVariantValues = getNextVariantValues; exports.getNodeAnimation = getNodeAnimation; exports.getNodeOverrides = getNodeOverrides; exports.getNodeRect = getNodeRect; exports.getNodeShape = getNodeShape; exports.getNodeSize = getNodeSize; exports.getNodeTokenBindings = getNodeTokenBindings; exports.getNodeTokenModes = getNodeTokenModes; exports.getOwningComponent = getOwningComponent; exports.getOwningInstance = getOwningInstance; exports.getResizingNodeRect = getResizingNodeRect; exports.getRootInstance = getRootInstance; exports.getShapeRenderData = getShapeRenderData; exports.getShapeSvg = getShapeSvg; exports.getTimelineRows = getTimelineRows; exports.getTimelineTicks = getTimelineTicks; exports.getTokenPropertyScope = getTokenPropertyScope; exports.getTokensForProperty = getTokensForProperty; exports.getVariantConflicts = getVariantConflicts; exports.getVariantOptions = getVariantOptions; exports.getVariantSet = getVariantSet; exports.getVariantValues = getVariantValues; exports.gradientToSvgDef = gradientToSvgDef; exports.handlePoint = handlePoint; exports.hasVisibleStroke = hasVisibleStroke; exports.inferResizeHandle = inferResizeHandle; exports.inspectCanvasInstance = inspectCanvasInstance; exports.inspectNodeTokens = inspectNodeTokens; exports.interpolateAnimationValue = _chunkXHRZSB77cjs.interpolateAnimationValue; exports.intersectPaths = intersectPaths; exports.intersectPolygons = intersectPolygons; exports.invertNodeUpdates = invertNodeUpdates; exports.isAnimationEasing = _chunkXZ4L3R4Kcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkXHRZSB77cjs.isAnimationKeyframe; exports.isAutoLayoutFrame = isAutoLayoutFrame; exports.isCanvasComponent = isCanvasComponent; exports.isCanvasComponentSet = isCanvasComponentSet; exports.isCanvasGradient = isCanvasGradient; exports.isCanvasInstance = isCanvasInstance; exports.isCssExportExact = isCssExportExact; exports.isEventFromTextInput = isEventFromTextInput; exports.isInsideInstance = isInsideInstance; exports.isKeyframeSelected = isKeyframeSelected; exports.isLocked = isLocked; exports.isMeasureModifierHeld = isMeasureModifierHeld; exports.isNodeAnimated = isNodeAnimated; exports.isShapeDescription = isShapeDescription; exports.isShapeNode = isShapeNode; exports.isStraightCubic = isStraightCubic; exports.isValidCanvasEdge = isValidCanvasEdge; exports.isValidCanvasNode = isValidCanvasNode; exports.isValidCanvasScene = isValidCanvasScene; exports.isValidUrl = isValidUrl; exports.layoutAll = layoutAll; exports.layoutBounds = layoutBounds; exports.layoutFrame = layoutFrame; exports.layoutUp = layoutUp; exports.layoutUpMany = layoutUpMany; exports.linearPositionTrajectory = linearPositionTrajectory; exports.linearTrajectory = linearTrajectory; exports.listCanvasComponents = listCanvasComponents; exports.lockNodes = lockNodes; exports.makeSizingCoherent = makeSizingCoherent; exports.matchArrangeShortcut = _chunk26BVFKHUcjs.matchArrangeShortcut; exports.matchSize = matchSize; exports.measureBetween = measureBetween; exports.measureLabel = measureLabel; exports.measureSelection = measureSelection; exports.measureToLine = measureToLine; exports.mergeNodeUpdates = mergeNodeUpdates; exports.mixColorsOklab = _chunkXHRZSB77cjs.mixColorsOklab; exports.moveKeyframes = moveKeyframes; exports.moveLayoutChild = moveLayoutChild; exports.multiPolygonArea = multiPolygonArea; exports.multiPolygonBounds = multiPolygonBounds; exports.nearestHandlePositions = nearestHandlePositions; exports.normalizeBezierPath = normalizeBezierPath; exports.normalizeKeyframes = _chunkXHRZSB77cjs.normalizeKeyframes; exports.offsetPath = offsetPath; exports.offsetShapeNodes = offsetShapeNodes; exports.oklabToRgb = _chunkXHRZSB77cjs.oklabToRgb; exports.oppositePosition = oppositePosition; exports.outlineShapeNodeStrokes = outlineShapeNodeStrokes; exports.outlineStroke = outlineStroke; exports.overlaps = _chunkWADCJ7A7cjs.overlaps; exports.pageHidden = _chunkXHRZSB77cjs.pageHidden; exports.parseCanvasClipboardData = parseCanvasClipboardData; exports.parseCanvasScenes = parseCanvasScenes; exports.parseCssEasing = _chunkXZ4L3R4Kcjs.parseCssEasing; exports.parseCssGradient = parseCssGradient; exports.parseKeyframeClipboard = parseKeyframeClipboard; exports.parseNodeStyleDeclarations = parseNodeStyleDeclarations; exports.parseOklab = _chunkXHRZSB77cjs.parseOklab; exports.parseSvgPath = parseSvgPath; exports.parseVariantName = parseVariantName; exports.pasteKeyframes = pasteKeyframes; exports.pathBoolean = pathBoolean; exports.pathToContours = pathToContours; exports.placeBeside = _chunkWADCJ7A7cjs.placeBeside; exports.playWebAnimations = playWebAnimations; exports.pointInBezierPath = pointInBezierPath; exports.pointInMultiPolygon = pointInMultiPolygon; exports.pointInRings = pointInRings; exports.polygonArea = polygonArea; exports.polygonBoolean = polygonBoolean; exports.polygonToSvgPath = polygonToSvgPath; exports.positionToSide = positionToSide; exports.pruneCanvasTokenModes = pruneCanvasTokenModes; exports.pushCanvasInstanceOverrides = pushCanvasInstanceOverrides; exports.readAnimatableValue = readAnimatableValue; exports.readNodeStyleProperty = readNodeStyleProperty; exports.readOverrideGroup = readOverrideGroup; exports.readStyleSize = readStyleSize; exports.realClock = _chunkXHRZSB77cjs.realClock; exports.recordAnimationChanges = recordAnimationChanges; exports.relayoutUpdates = relayoutUpdates; exports.remapPastedNodes = remapPastedNodes; exports.removeCanvasVariant = removeCanvasVariant; exports.removeTrack = removeTrack; exports.renameCanvasVariantProperty = renameCanvasVariantProperty; exports.renameCanvasVariantValue = renameCanvasVariantValue; exports.reorderNodes = reorderNodes; exports.repositionNodesTo = repositionNodesTo; exports.resetCanvasInstanceOverrides = resetCanvasInstanceOverrides; exports.resizeHandleAxes = resizeHandleAxes; exports.resolveCanvasGradient = resolveCanvasGradient; exports.resolveCanvasTokens = resolveCanvasTokens; exports.resolveEasing = _chunkXZ4L3R4Kcjs.resolveEasing; exports.resolvePadding = resolvePadding; exports.restoreCanvasMainComponent = restoreCanvasMainComponent; exports.revertShapeCombination = revertShapeCombination; exports.rgbToOklab = _chunkXHRZSB77cjs.rgbToOklab; exports.ringSignedArea = ringSignedArea; exports.runMultiNodeTransition = runMultiNodeTransition; exports.sampleAnimationFrames = sampleAnimationFrames; exports.scaleKeyframes = scaleKeyframes; exports.segmentBounds = segmentBounds; exports.segmentCurvature = segmentCurvature; exports.segmentDerivative = segmentDerivative; exports.segmentExtrema = segmentExtrema; exports.segmentLength = segmentLength; exports.segmentNearest = segmentNearest; exports.segmentParamAtLength = segmentParamAtLength; exports.segmentPoint = segmentPoint; exports.segmentTangent = segmentTangent; exports.serializeCanvasNodes = serializeCanvasNodes; exports.setCanvasComponentProperty = setCanvasComponentProperty; exports.setCanvasInstanceProperties = setCanvasInstanceProperties; exports.setCanvasTokenMode = setCanvasTokenMode; exports.setCanvasVariantProperties = setCanvasVariantProperties; exports.setKeyframe = setKeyframe; exports.setKeyframeEasing = setKeyframeEasing; exports.setMotionPath = setMotionPath; exports.setTrackEnabled = setTrackEnabled; exports.shapeNodeToBezierPath = shapeNodeToBezierPath; exports.shapeNodeToPolygon = shapeNodeToPolygon; exports.shapeToBezierPath = shapeToBezierPath; exports.shapeToPolygon = shapeToPolygon; exports.sideToPosition = sideToPosition; exports.simplifyRing = simplifyRing; exports.snapKeyframeDelta = snapKeyframeDelta; exports.snapNodeDrag = snapNodeDrag; exports.snapNodeResize = snapNodeResize; exports.snapResize = snapResize; exports.snapTimeToFrame = snapTimeToFrame; exports.snapToGrid = snapToGrid; exports.splitSegment = splitSegment; exports.springAt = _chunkXZ4L3R4Kcjs.springAt; exports.streamlinePoints = streamlinePoints; exports.strokeBoundingBox = strokeBoundingBox; exports.strokeOutlineRings = strokeOutlineRings; exports.strokePointsToPathData = strokePointsToPathData; exports.strokeToShapeNode = strokeToShapeNode; exports.subSegment = subSegment; exports.subtractPaths = subtractPaths; exports.subtractPolygons = subtractPolygons; exports.swapCanvasInstance = swapCanvasInstance; exports.syncAllCanvasInstances = syncAllCanvasInstances; exports.syncCanvasComponents = syncCanvasComponents; exports.syncCanvasInstance = syncCanvasInstance; exports.timeToX = timeToX; exports.toBezierPath = toBezierPath; exports.toWebAnimations = toWebAnimations; exports.toggleLockNodes = toggleLockNodes; exports.transformBezierPath = transformBezierPath; exports.trimSegments = trimSegments; exports.unionPolygons = unionPolygons; exports.unitePaths = unitePaths; exports.unlockNodes = unlockNodes; exports.updateKeyframe = updateKeyframe; exports.windingNumber = windingNumber; exports.withNodeAnimation = withNodeAnimation; exports.withStyleOpacity = withStyleOpacity; exports.withStyleSize = withStyleSize; exports.wouldCreateComponentCycle = wouldCreateComponentCycle; exports.wrapAnimationTime = _chunkXHRZSB77cjs.wrapAnimationTime; exports.writeNodeStyleProperty = writeNodeStyleProperty; exports.writeOverrideGroup = writeOverrideGroup; exports.xToTime = xToTime; exports.xorPolygons = xorPolygons;
|
|
11756
12341
|
//# sourceMappingURL=index.cjs.map
|