@pixerate/editor 0.233.0 → 0.235.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-editor/controller.d.cts +25 -0
- package/dist/animation-editor/controller.d.ts +25 -0
- package/dist/animation-editor/index.cjs +159 -50
- package/dist/animation-editor/index.d.cts +1 -0
- package/dist/animation-editor/index.d.ts +1 -0
- package/dist/animation-editor/index.js +115 -6
- package/dist/animation-editor/layers.d.cts +2 -0
- package/dist/animation-editor/layers.d.ts +2 -0
- package/dist/animation-editor/sequence.d.cts +33 -0
- package/dist/animation-editor/sequence.d.ts +33 -0
- package/dist/canvas/editorDocument.d.cts +49 -4
- package/dist/canvas/editorDocument.d.ts +49 -4
- package/dist/canvas/index.cjs +47 -20
- package/dist/canvas/index.js +40 -13
- package/dist/{chunk-I277KJLQ.js → chunk-G3RUKJ5C.js} +105 -1
- package/dist/{chunk-6RZVFYGJ.cjs → chunk-JWCKJNDR.cjs} +105 -1
- package/dist/effects/index.cjs +19 -11
- package/dist/effects/index.d.cts +1 -0
- package/dist/effects/index.d.ts +1 -0
- package/dist/effects/index.js +9 -1
- package/dist/effects/template-tools.d.cts +25 -0
- package/dist/effects/template-tools.d.ts +25 -0
- package/dist/effects/templates.d.cts +30 -1
- package/dist/effects/templates.d.ts +30 -1
- package/dist/video-editor/controller.d.cts +26 -0
- package/dist/video-editor/controller.d.ts +26 -0
- package/dist/video-editor/index.cjs +187 -42
- package/dist/video-editor/index.d.cts +1 -0
- package/dist/video-editor/index.d.ts +1 -0
- package/dist/video-editor/index.js +145 -0
- package/dist/video-editor/sequence.d.cts +38 -0
- package/dist/video-editor/sequence.d.ts +38 -0
- package/package.json +1 -1
- package/skills/pixerate-animation-editor/SKILL.md +10 -0
- package/skills/pixerate-animation-motion-graphics/SKILL.md +4 -0
- package/skills/pixerate-canvas/SKILL.md +2 -2
- package/skills/pixerate-video-editor/SKILL.md +11 -0
- package/skills/pixerate-video-montage/SKILL.md +2 -0
package/dist/canvas/index.cjs
CHANGED
|
@@ -11786,17 +11786,26 @@ function createCanvasEffectsToolProvider(controller, options = {}) {
|
|
|
11786
11786
|
|
|
11787
11787
|
// src/canvas/editorDocument.ts
|
|
11788
11788
|
var RUNTIME_NODE_KEYS = ["selected", "dragging", "measured", "resizing"];
|
|
11789
|
-
var
|
|
11790
|
-
|
|
11791
|
-
|
|
11789
|
+
var RUNTIME_EDGE_KEYS = ["selected"];
|
|
11790
|
+
var omit = (value, keys) => {
|
|
11791
|
+
const copy = { ...value };
|
|
11792
|
+
for (const key of keys) delete copy[key];
|
|
11792
11793
|
return copy;
|
|
11793
11794
|
};
|
|
11794
|
-
var
|
|
11795
|
-
|
|
11796
|
-
|
|
11795
|
+
var omitKeys = (options = {}) => ({
|
|
11796
|
+
node: [...RUNTIME_NODE_KEYS, ..._nullishCoalesce(options.omitNodeKeys, () => ( []))],
|
|
11797
|
+
edge: [...RUNTIME_EDGE_KEYS, ..._nullishCoalesce(options.omitEdgeKeys, () => ( []))]
|
|
11798
|
+
});
|
|
11799
|
+
function canvasDocumentContentKey(nodes, edges, options) {
|
|
11800
|
+
const keys = omitKeys(options);
|
|
11801
|
+
return JSON.stringify([nodes.map((n3) => omit(n3, keys.node)), edges.map((e) => omit(e, keys.edge))]);
|
|
11802
|
+
}
|
|
11803
|
+
var isViewport = (value) => {
|
|
11804
|
+
const v = value;
|
|
11805
|
+
return !!v && typeof v === "object" && [v.x, v.y, v.zoom].every((n3) => typeof n3 === "number" && Number.isFinite(n3)) && v.zoom > 0;
|
|
11797
11806
|
};
|
|
11798
11807
|
function checkCanvasDocument(document2) {
|
|
11799
|
-
const hint = "A canvas document is { nodes: [{ id, position: { x, y }, data }], edges: [{ id, source, target }], scenes? } as get_canvas_document returns it.";
|
|
11808
|
+
const hint = "A canvas document is { nodes: [{ id, position: { x, y }, data }], edges: [{ id, source, target }], scenes?, viewport? } as get_canvas_document returns it.";
|
|
11800
11809
|
const value = document2;
|
|
11801
11810
|
if (!value || typeof value !== "object" || !Array.isArray(value.nodes)) throw new Error(`nodes must be an array. ${hint}`);
|
|
11802
11811
|
if (!Array.isArray(value.edges)) throw new Error(`edges must be an array. ${hint}`);
|
|
@@ -11819,25 +11828,42 @@ function checkCanvasDocument(document2) {
|
|
|
11819
11828
|
}
|
|
11820
11829
|
});
|
|
11821
11830
|
if (value.scenes !== void 0 && !Array.isArray(value.scenes)) throw new Error(`scenes must be an array. ${hint}`);
|
|
11831
|
+
if (value.viewport !== void 0 && !isViewport(value.viewport)) throw new Error(`viewport must be { x, y, zoom } with finite numbers and a zoom above 0. ${hint}`);
|
|
11822
11832
|
}
|
|
11823
11833
|
function createCanvasEditorDocument(options) {
|
|
11824
11834
|
const { history, scenes: scenes2 } = options;
|
|
11835
|
+
const keys = omitKeys(options);
|
|
11825
11836
|
const snapshot = () => ({
|
|
11826
|
-
nodes: options.getNodes().map(
|
|
11827
|
-
edges: options.getEdges().map(
|
|
11828
|
-
...scenes2 ? { scenes: scenes2.toJSON().scenes } : {}
|
|
11837
|
+
nodes: options.getNodes().map((n3) => omit(n3, keys.node)),
|
|
11838
|
+
edges: options.getEdges().map((e) => omit(e, keys.edge)),
|
|
11839
|
+
...scenes2 ? { scenes: scenes2.toJSON().scenes } : {},
|
|
11840
|
+
...options.getViewport ? { viewport: { ...options.getViewport() } } : {}
|
|
11829
11841
|
});
|
|
11830
11842
|
const apply = (doc) => {
|
|
11831
11843
|
options.setNodes(doc.nodes.map((n3) => ({ ...n3 })));
|
|
11832
11844
|
options.setEdges(doc.edges.map((e) => ({ ...e })));
|
|
11833
11845
|
if (scenes2) scenes2.load(_nullishCoalesce(doc.scenes, () => ( [])));
|
|
11846
|
+
if (doc.viewport) _optionalChain([options, 'access', _508 => _508.setViewport, 'optionalCall', _509 => _509({ ...doc.viewport })]);
|
|
11847
|
+
};
|
|
11848
|
+
const check = (document2) => {
|
|
11849
|
+
checkCanvasDocument(document2);
|
|
11850
|
+
const next = document2;
|
|
11851
|
+
if (options.validateNode) {
|
|
11852
|
+
next.nodes.forEach((node, i) => {
|
|
11853
|
+
const problem = options.validateNode(node, i);
|
|
11854
|
+
if (problem) throw new Error(`Node "${node.id}" (nodes[${i}]): ${problem}`);
|
|
11855
|
+
});
|
|
11856
|
+
}
|
|
11857
|
+
return next;
|
|
11834
11858
|
};
|
|
11835
11859
|
return _chunkSJ2CPTQCcjs.defineEditorDocument.call(void 0, {
|
|
11836
11860
|
kind: "canvas",
|
|
11861
|
+
formatVersion: options.formatVersion,
|
|
11862
|
+
migrations: options.migrations,
|
|
11863
|
+
assets: options.assets,
|
|
11837
11864
|
get: snapshot,
|
|
11838
11865
|
load: (document2, { history: mode }) => {
|
|
11839
|
-
|
|
11840
|
-
const next = document2;
|
|
11866
|
+
const next = check(options.normalize ? options.normalize(document2) : document2);
|
|
11841
11867
|
if (mode === "record") {
|
|
11842
11868
|
const before = snapshot();
|
|
11843
11869
|
history.execute({ name: "Load canvas", execute: () => apply(next), undo: () => apply(before) });
|
|
@@ -11862,8 +11888,8 @@ function createCanvasEditorDocument(options) {
|
|
|
11862
11888
|
}
|
|
11863
11889
|
function createCanvasGestureRecorder(options) {
|
|
11864
11890
|
let before = null;
|
|
11865
|
-
const take = () => ({ nodes: options.getNodes(), edges: _optionalChain([options, 'access',
|
|
11866
|
-
const key = (s) =>
|
|
11891
|
+
const take = () => ({ nodes: options.getNodes(), edges: _optionalChain([options, 'access', _510 => _510.getEdges, 'optionalCall', _511 => _511()]) });
|
|
11892
|
+
const key = (s) => canvasDocumentContentKey(s.nodes, _nullishCoalesce(s.edges, () => ( [])));
|
|
11867
11893
|
const restore = (s) => {
|
|
11868
11894
|
options.setNodes(s.nodes);
|
|
11869
11895
|
if (s.edges && options.setEdges) options.setEdges(s.edges);
|
|
@@ -11995,8 +12021,8 @@ function createCanvasExplosionStateController(options = {}) {
|
|
|
11995
12021
|
clearTimer();
|
|
11996
12022
|
const previous = snapshot.activeId;
|
|
11997
12023
|
set({ activeId: nodeId, collapsingId: null });
|
|
11998
|
-
if (previous !== null) _optionalChain([options, 'access',
|
|
11999
|
-
_optionalChain([options, 'access',
|
|
12024
|
+
if (previous !== null) _optionalChain([options, 'access', _512 => _512.onCollapse, 'optionalCall', _513 => _513(previous)]);
|
|
12025
|
+
_optionalChain([options, 'access', _514 => _514.onExplode, 'optionalCall', _515 => _515(nodeId)]);
|
|
12000
12026
|
return true;
|
|
12001
12027
|
};
|
|
12002
12028
|
const collapse = (nodeId) => {
|
|
@@ -12005,7 +12031,7 @@ function createCanvasExplosionStateController(options = {}) {
|
|
|
12005
12031
|
if (active === null || nodeId !== void 0 && nodeId !== active) return false;
|
|
12006
12032
|
clearTimer();
|
|
12007
12033
|
set({ activeId: null, collapsingId: active });
|
|
12008
|
-
_optionalChain([options, 'access',
|
|
12034
|
+
_optionalChain([options, 'access', _516 => _516.onCollapse, 'optionalCall', _517 => _517(active)]);
|
|
12009
12035
|
if (duration === 0) finishCollapse();
|
|
12010
12036
|
else timer = setTimeout(() => {
|
|
12011
12037
|
timer = null;
|
|
@@ -12066,7 +12092,7 @@ function canvasExplosionToolTarget(state, options) {
|
|
|
12066
12092
|
var READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
12067
12093
|
var WRITE_IDEMPOTENT = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
12068
12094
|
var labelOf = (node) => {
|
|
12069
|
-
const label = _nullishCoalesce(_optionalChain([node, 'access',
|
|
12095
|
+
const label = _nullishCoalesce(_optionalChain([node, 'access', _518 => _518.data, 'optionalAccess', _519 => _519.label]), () => ( _optionalChain([node, 'access', _520 => _520.data, 'optionalAccess', _521 => _521.name])));
|
|
12070
12096
|
return typeof label === "string" && label !== "" ? label : void 0;
|
|
12071
12097
|
};
|
|
12072
12098
|
function createCanvasExplosionToolProvider(target, options = {}) {
|
|
@@ -12079,7 +12105,7 @@ function createCanvasExplosionToolProvider(target, options = {}) {
|
|
|
12079
12105
|
if (ok === true) return null;
|
|
12080
12106
|
return typeof ok === "string" && ok ? ok : `Node "${node.id}" has nothing to explode into.`;
|
|
12081
12107
|
};
|
|
12082
|
-
const state = () => ({ exploded: [...target.exploded()], collapsing: [..._nullishCoalesce(_optionalChain([target, 'access',
|
|
12108
|
+
const state = () => ({ exploded: [...target.exploded()], collapsing: [..._nullishCoalesce(_optionalChain([target, 'access', _522 => _522.collapsing, 'optionalCall', _523 => _523()]), () => ( []))] });
|
|
12083
12109
|
const findNode = (id) => {
|
|
12084
12110
|
const node = target.getNodes().find((n3) => n3.id === id);
|
|
12085
12111
|
if (!node) throw new Error(`No node "${id}" on the canvas. Call list_explodable_nodes for node ids.`);
|
|
@@ -12692,4 +12718,5 @@ function createCanvasExplosionToolProvider(target, options = {}) {
|
|
|
12692
12718
|
|
|
12693
12719
|
|
|
12694
12720
|
|
|
12695
|
-
exports.ANIMATABLE_PROPERTIES = ANIMATABLE_PROPERTIES; exports.ANIMATION_DATA_KEY = ANIMATION_DATA_KEY; exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkM5GLQQWGcjs.ANIMATION_TIME_EPSILON; exports.AUTO_LAYOUT_DATA_KEY = AUTO_LAYOUT_DATA_KEY; exports.AnimationEditError = AnimationEditError; exports.AnimationPlayer = _chunkM5GLQQWGcjs.AnimationPlayer; exports.BUILTIN_FAMILY_SCENES = BUILTIN_FAMILY_SCENES; exports.CANVAS_CAPTURE_CHROME_SELECTORS = CANVAS_CAPTURE_CHROME_SELECTORS; exports.CANVAS_CAPTURE_OVERLAY_SELECTORS = CANVAS_CAPTURE_OVERLAY_SELECTORS; exports.CANVAS_CAPTURE_VIEWPORT_SELECTOR = CANVAS_CAPTURE_VIEWPORT_SELECTOR; exports.CANVAS_COMPONENT_DRAG_TYPE = CANVAS_COMPONENT_DRAG_TYPE; exports.CANVAS_EFFECT_MISSING_PATTERN = CANVAS_EFFECT_MISSING_PATTERN; exports.CANVAS_EFFECT_PLACES = CANVAS_EFFECT_PLACES; exports.CANVAS_GRADIENT_PRESETS = _chunkNM3G4VQTcjs.CANVAS_GRADIENT_PRESETS; exports.CANVAS_TOKEN_PROPERTIES = CANVAS_TOKEN_PROPERTIES; exports.CARD_INSPECTION_ZONES = CARD_INSPECTION_ZONES; 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.CSS_VARIABLE_DIAGRAM_SCENE_THEME = CSS_VARIABLE_DIAGRAM_SCENE_THEME; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.CanvasScenesStore = CanvasScenesStore; exports.DEFAULT_ARRANGE_SHORTCUTS = _chunkT7QSEKDYcjs.DEFAULT_ARRANGE_SHORTCUTS; exports.DEFAULT_CURSOR_INACTIVITY_MS = DEFAULT_CURSOR_INACTIVITY_MS; exports.DEFAULT_DIAGRAM_NODE_HEIGHT = DEFAULT_DIAGRAM_NODE_HEIGHT; exports.DEFAULT_DIAGRAM_NODE_WIDTH = DEFAULT_DIAGRAM_NODE_WIDTH; exports.DEFAULT_NODE_HEIGHT = _chunkEL4PSKFTcjs.DEFAULT_NODE_HEIGHT; exports.DEFAULT_NODE_WIDTH = _chunkEL4PSKFTcjs.DEFAULT_NODE_WIDTH; exports.DEFAULT_PLACEMENT_GAP = _chunkEL4PSKFTcjs.DEFAULT_PLACEMENT_GAP; exports.DIAGRAM_MARKER_IDS = DIAGRAM_MARKER_IDS; exports.DIAGRAM_RASTER_MAX_SIZE = DIAGRAM_RASTER_MAX_SIZE; exports.DIAGRAM_SCENE_DARK_THEME = DIAGRAM_SCENE_DARK_THEME; exports.DIAGRAM_SCENE_LIGHT_THEME = DIAGRAM_SCENE_LIGHT_THEME; exports.DIAGRAM_SVG_DARK_THEME = DIAGRAM_SVG_DARK_THEME; exports.DIAGRAM_SVG_LIGHT_THEME = DIAGRAM_SVG_LIGHT_THEME; exports.DIAGRAM_TITLE_TARGET = DIAGRAM_TITLE_TARGET; exports.DiagramStream = DiagramStream; exports.INSTANCE_DATA_KEY = INSTANCE_DATA_KEY; exports.LOCKED_DATA_KEY = _chunkEL4PSKFTcjs.LOCKED_DATA_KEY; exports.LOCKED_PREVIOUS_FLAGS_KEY = _chunkEL4PSKFTcjs.LOCKED_PREVIOUS_FLAGS_KEY; exports.MAX_KEYFRAME_REFS = MAX_KEYFRAME_REFS; exports.MERMAID_SHAPE_PAINT = MERMAID_SHAPE_PAINT; exports.ManualClock = _chunkM5GLQQWGcjs.ManualClock; exports.PATHFINDER_OPERATIONS = _chunkYAWLMF3Ocjs.PATHFINDER_OPERATIONS; exports.PIXERATE_BRAND_GRADIENT = _chunkNM3G4VQTcjs.PIXERATE_BRAND_GRADIENT; exports.PathOpsError = _chunkGF2RBSDMcjs.PathOpsError; exports.PlanarMap = _chunkYAWLMF3Ocjs.PlanarMap; exports.RESIZE_HANDLES = RESIZE_HANDLES; exports.SHAPE_DATA_KEY = SHAPE_DATA_KEY; exports.SHAPE_KINDS = _chunkNM3G4VQTcjs.SHAPE_KINDS; exports.SHAPE_NODE_TYPE = SHAPE_NODE_TYPE; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.SPRING_PRESETS = _chunkDWJJI6RTcjs.SPRING_PRESETS; 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 = _chunkEL4PSKFTcjs.alignNodes; exports.angleToSvgLinearCoords = _chunkNM3G4VQTcjs.angleToSvgLinearCoords; exports.animateNode = animateNode; exports.applyAnimation = applyAnimation; exports.applyAnimationOverrides = applyAnimationOverrides; exports.applyConstraints = applyConstraints; exports.applyNodeUpdates = _chunkEL4PSKFTcjs.applyNodeUpdates; exports.applyShapeCombination = applyShapeCombination; exports.applyShapeReplacement = applyShapeReplacement; exports.arcToCubics = _chunkGF2RBSDMcjs.arcToCubics; exports.architectureScene = architectureScene; exports.arrowGesture = _chunkT7QSEKDYcjs.arrowGesture; exports.autoLayoutDiagram = autoLayoutDiagram; exports.bezierPathArea = _chunkGF2RBSDMcjs.bezierPathArea; exports.bezierPathBounds = _chunkGF2RBSDMcjs.bezierPathBounds; exports.bezierPathLength = _chunkGF2RBSDMcjs.bezierPathLength; exports.bezierPathPointAtLength = _chunkGF2RBSDMcjs.bezierPathPointAtLength; exports.bezierPathSignedArea = _chunkGF2RBSDMcjs.bezierPathSignedArea; exports.bezierPathToSvg = _chunkGF2RBSDMcjs.bezierPathToSvg; exports.bindCanvasComponentProperty = bindCanvasComponentProperty; exports.bindCanvasToken = bindCanvasToken; exports.blendDiagramLayout = blendDiagramLayout; exports.blendLayout = blendLayout; exports.boundsOf = _chunkEL4PSKFTcjs.boundsOf; exports.bracketGesture = _chunkT7QSEKDYcjs.bracketGesture; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeSeed = _chunkV3L7U63Ncjs.brushstrokeSeed; exports.c4Scene = c4Scene; exports.calculateCursorArrowRotation = calculateCursorArrowRotation; exports.calculateCurvedPath = calculateCurvedPath; exports.calculateDagreReflowDisplacement = calculateDagreReflowDisplacement; exports.calculateDirectionalDisplacement = calculateDirectionalDisplacement; exports.calculateReflowDisplacement = calculateReflowDisplacement; exports.canCombineShapeNodes = canCombineShapeNodes; exports.canOffsetShapeNodes = canOffsetShapeNodes; exports.canOutlineShapeNodeStrokes = canOutlineShapeNodeStrokes; exports.canvasEffectErrorReason = canvasEffectErrorReason; exports.canvasEffectStatus = canvasEffectStatus; exports.canvasEffectsPool = canvasEffectsPool; exports.canvasExplosionToolTarget = canvasExplosionToolTarget; exports.canvasHeight = canvasHeight; exports.canvasNodeCaptureRect = canvasNodeCaptureRect; exports.canvasNodeEffect = canvasNodeEffect; exports.captureCanvasView = captureCanvasView; exports.centerNodes = _chunkEL4PSKFTcjs.centerNodes; exports.centre = _chunkEL4PSKFTcjs.centre; exports.checkGesture = _chunkT7QSEKDYcjs.checkGesture; exports.circleGesture = _chunkT7QSEKDYcjs.circleGesture; exports.clampAnimationValue = clampAnimationValue; exports.clampLayoutSize = clampLayoutSize; exports.closeContour = _chunkGF2RBSDMcjs.closeContour; exports.collectDescendantIds = collectDescendantIds; exports.combineCanvasComponentsAsVariants = combineCanvasComponentsAsVariants; exports.combineShapeNodes = combineShapeNodes; exports.computeCanvasExplosionLayout = computeCanvasExplosionLayout; exports.computeDragBounds = computeDragBounds; exports.computeDragBoundsFromPoints = computeDragBoundsFromPoints; exports.computeNodesBoundingBox = computeNodesBoundingBox; exports.computeSnapGuides = computeSnapGuides; exports.connectedDiagramOnly = connectedDiagramOnly; exports.connectedOnly = connectedOnly; exports.contourEnclosesArea = _chunkYAWLMF3Ocjs.contourEnclosesArea; exports.contourSignedArea = _chunkGF2RBSDMcjs.contourSignedArea; exports.contoursToPath = _chunkGF2RBSDMcjs.contoursToPath; exports.copyKeyframes = copyKeyframes; exports.countPathSegments = _chunkGF2RBSDMcjs.countPathSegments; exports.createAnimationPlayer = _chunkM5GLQQWGcjs.createAnimationPlayer; exports.createBezierTrajectory = createBezierTrajectory; exports.createCanvasAnimationController = createCanvasAnimationController; exports.createCanvasArrangeController = createCanvasArrangeController; exports.createCanvasAutoLayoutController = createCanvasAutoLayoutController; exports.createCanvasCaptureSurface = createCanvasCaptureSurface; exports.createCanvasCaptureToolProvider = createCanvasCaptureToolProvider; exports.createCanvasComponent = createCanvasComponent; exports.createCanvasComponentsController = createCanvasComponentsController; exports.createCanvasDrawController = createCanvasDrawController; exports.createCanvasEditorDocument = createCanvasEditorDocument; exports.createCanvasEffectsController = createCanvasEffectsController; exports.createCanvasEffectsToolProvider = createCanvasEffectsToolProvider; exports.createCanvasExplosionStateController = createCanvasExplosionStateController; exports.createCanvasExplosionToolProvider = createCanvasExplosionToolProvider; exports.createCanvasGestureRecorder = createCanvasGestureRecorder; exports.createCanvasInstance = createCanvasInstance; exports.createCanvasPlaybackLocator = createCanvasPlaybackLocator; exports.createCanvasScenesStore = createCanvasScenesStore; exports.createDefaultStrokeStyle = createDefaultStrokeStyle; exports.createFanOutTrajectory = createFanOutTrajectory; exports.createGuideIndex = createGuideIndex; exports.createNodeGuideIndex = createNodeGuideIndex; exports.createNodeLookup = _chunkEL4PSKFTcjs.createNodeLookup; exports.crossGesture = _chunkT7QSEKDYcjs.crossGesture; exports.cubicBezierAt = _chunkDWJJI6RTcjs.cubicBezierAt; exports.cubicPointAt = _chunkNM3G4VQTcjs.cubicPointAt; exports.cubicsToPathData = _chunkNM3G4VQTcjs.cubicsToPathData; exports.cutOutPiece = _chunkYAWLMF3Ocjs.cutOutPiece; exports.dashContours = _chunkGF2RBSDMcjs.dashContours; exports.defaultEasing = defaultEasing; exports.deleteKeyframes = deleteKeyframes; exports.detachCanvasInstance = detachCanvasInstance; exports.detachTokenBindings = detachTokenBindings; exports.diagramCanvasHeight = diagramCanvasHeight; exports.diagramFileName = diagramFileName; exports.diagramGroupSize = diagramGroupSize; exports.diagramImageSize = diagramImageSize; exports.diagramLayoutBounds = diagramLayoutBounds; exports.diagramMarksBounds = diagramMarksBounds; exports.diagramMarksToSvg = diagramMarksToSvg; exports.diagramRenameOp = diagramRenameOp; exports.diagramTargetLabel = diagramTargetLabel; exports.diagramTextBaseline = diagramTextBaseline; exports.diffOverrideGroups = diffOverrideGroups; exports.distanceToBezierPath = _chunkGF2RBSDMcjs.distanceToBezierPath; exports.distributeNodes = _chunkEL4PSKFTcjs.distributeNodes; exports.dividePaths = _chunkGF2RBSDMcjs.dividePaths; exports.dividePolygons = _chunkGF2RBSDMcjs.dividePolygons; exports.downloadDiagramPng = downloadDiagramPng; exports.easeDiagramTween = easeDiagramTween; exports.easingFromInfluence = _chunkDWJJI6RTcjs.easingFromInfluence; exports.easingLabel = _chunkDWJJI6RTcjs.easingLabel; exports.easingToCss = _chunkDWJJI6RTcjs.easingToCss; exports.elasticAt = _chunkDWJJI6RTcjs.elasticAt; exports.ensureDiagramLayout = ensureDiagramLayout; exports.ensureLayout = _chunkEL4PSKFTcjs.ensureLayout; exports.estimateCanvasHeight = estimateCanvasHeight; exports.estimateDiagramCanvasHeight = estimateDiagramCanvasHeight; exports.estimateDiagramNodeSize = estimateDiagramNodeSize; exports.estimateNodeSize = _chunkEL4PSKFTcjs.estimateNodeSize; exports.estimateTextWidth = estimateTextWidth2; exports.evaluateAnimation = evaluateAnimation; exports.evaluateEasing = _chunkDWJJI6RTcjs.evaluateEasing; exports.evaluateTrack = _chunkM5GLQQWGcjs.evaluateTrack; exports.excludePaths = _chunkGF2RBSDMcjs.excludePaths; exports.explosionEdgeId = explosionEdgeId; exports.exportCssAnimation = exportCssAnimation; exports.familySceneFromLayout = familySceneFromLayout; exports.findConnectorSnap = findConnectorSnap; exports.findStrokesAtPoint = findStrokesAtPoint; exports.findVariant = findVariant; exports.fitCubicRun = _chunkNM3G4VQTcjs.fitCubicRun; exports.fitCubicWithTangents = _chunkNM3G4VQTcjs.fitCubicWithTangents; exports.fitCubics = _chunkNM3G4VQTcjs.fitCubics; exports.fitFreehandPath = _chunkNM3G4VQTcjs.fitFreehandPath; exports.fitPathData = _chunkNM3G4VQTcjs.fitPathData; exports.fitViewportToNodes = fitViewportToNodes; exports.fitViewportToRect = fitViewportToRect; exports.flattenSvgPath = _chunkNM3G4VQTcjs.flattenSvgPath; exports.flowSide = _chunkEL4PSKFTcjs.flowSide; exports.formatAgentCursorName = formatAgentCursorName; exports.formatAnimationTime = formatAnimationTime; exports.formatNumber = _chunkNM3G4VQTcjs.formatNumber; exports.formatOklab = _chunk4ZC5QJE2cjs.formatOklab; exports.formatVariantName = formatVariantName; exports.freehandBrushstroke = freehandBrushstroke; exports.ganttScene = ganttScene; exports.gestureEdgePoint = _chunkT7QSEKDYcjs.gestureEdgePoint; exports.gestureRandom = _chunkT7QSEKDYcjs.gestureRandom; exports.gestureSeed = _chunkT7QSEKDYcjs.gestureSeed; exports.gestureUnion = _chunkT7QSEKDYcjs.gestureUnion; exports.getAbsolutePosition = _chunkEL4PSKFTcjs.getAbsolutePosition; exports.getAgentCardAnchor = getAgentCardAnchor; 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.getBrushedShapeSvg = _chunkV3L7U63Ncjs.getBrushedShapeSvg; exports.getCanvasComponentDragId = getCanvasComponentDragId; exports.getCanvasTokenProperty = getCanvasTokenProperty; exports.getCenteredNodePosition = _chunkEL4PSKFTcjs.getCenteredNodePosition; exports.getChildLayout = getChildLayout; exports.getComponentData = getComponentData; exports.getComponentInstances = getComponentInstances; exports.getComponentPropertyDefs = getComponentPropertyDefs; exports.getComponentPropertyRefs = getComponentPropertyRefs; exports.getComponentSourceId = getComponentSourceId; exports.getCssPropertyAnimations = getCssPropertyAnimations; exports.getCursorTransitionDuration = getCursorTransitionDuration; exports.getDefaultVariant = getDefaultVariant; exports.getEffectiveTokenModes = getEffectiveTokenModes; exports.getFamilyScene = getFamilyScene; 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 = _chunkEL4PSKFTcjs.getLayoutedNodes; exports.getNaturalMovementTiming = getNaturalMovementTiming; exports.getNextVariantValues = getNextVariantValues; exports.getNodeAnimation = getNodeAnimation; exports.getNodeOverrides = getNodeOverrides; exports.getNodeRect = _chunkEL4PSKFTcjs.getNodeRect; exports.getNodeShape = getNodeShape; exports.getNodeSize = _chunkEL4PSKFTcjs.getNodeSize; exports.getNodeTokenBindings = getNodeTokenBindings; exports.getNodeTokenModes = getNodeTokenModes; exports.getOwningComponent = getOwningComponent; exports.getOwningInstance = getOwningInstance; exports.getResizingNodeRect = getResizingNodeRect; exports.getRootInstance = getRootInstance; exports.getShapeRenderData = _chunkNM3G4VQTcjs.getShapeRenderData; exports.getShapeSvg = _chunkNM3G4VQTcjs.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.gitGraphScene = gitGraphScene; exports.gradientToSvgDef = _chunkNM3G4VQTcjs.gradientToSvgDef; exports.handlePoint = handlePoint; exports.hasFamilyScene = hasFamilyScene; exports.hasVisibleStroke = hasVisibleStroke; exports.hashString = hashString; exports.hatchPath = _chunkYAWLMF3Ocjs.hatchPath; exports.inferResizeHandle = inferResizeHandle; exports.inspectCanvasInstance = inspectCanvasInstance; exports.inspectNodeTokens = inspectNodeTokens; exports.interiorPoint = _chunkYAWLMF3Ocjs.interiorPoint; exports.interpolateAnimationValue = _chunkM5GLQQWGcjs.interpolateAnimationValue; exports.intersectPaths = _chunkGF2RBSDMcjs.intersectPaths; exports.intersectPolygons = _chunkGF2RBSDMcjs.intersectPolygons; exports.invertNodeUpdates = _chunkEL4PSKFTcjs.invertNodeUpdates; exports.isAgentCursor = isAgentCursor; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkM5GLQQWGcjs.isAnimationKeyframe; exports.isAutoLayoutFrame = isAutoLayoutFrame; exports.isBrushedShape = _chunkV3L7U63Ncjs.isBrushedShape; exports.isCanvasComponent = isCanvasComponent; exports.isCanvasComponentSet = isCanvasComponentSet; exports.isCanvasGradient = _chunkNM3G4VQTcjs.isCanvasGradient; exports.isCanvasInstance = isCanvasInstance; exports.isCssExportExact = isCssExportExact; exports.isEventFromTextInput = isEventFromTextInput; exports.isInsideInstance = isInsideInstance; exports.isKeyframeSelected = isKeyframeSelected; exports.isLocked = _chunkEL4PSKFTcjs.isLocked; exports.isMeasureModifierHeld = isMeasureModifierHeld; exports.isNodeAnimated = isNodeAnimated; exports.isShapeDescription = _chunkNM3G4VQTcjs.isShapeDescription; exports.isShapeNode = isShapeNode; exports.isStraightCubic = _chunkNM3G4VQTcjs.isStraightCubic; exports.isValidCanvasEdge = isValidCanvasEdge; exports.isValidCanvasNode = isValidCanvasNode; exports.isValidCanvasScene = isValidCanvasScene; exports.isValidUrl = isValidUrl; exports.journeyScene = journeyScene; exports.layoutAll = layoutAll; exports.layoutBounds = layoutBounds; exports.layoutFrame = layoutFrame; exports.layoutUp = layoutUp; exports.layoutUpMany = layoutUpMany; exports.linearPositionTrajectory = linearPositionTrajectory; exports.linearTrajectory = linearTrajectory; exports.listCanvasBrushes = _chunkV3L7U63Ncjs.listCanvasBrushes; exports.listCanvasComponents = listCanvasComponents; exports.loadCanvasBrushstrokeRenderer = _chunkV3L7U63Ncjs.loadCanvasBrushstrokeRenderer; exports.lockNodes = _chunkEL4PSKFTcjs.lockNodes; exports.makeSizingCoherent = makeSizingCoherent; exports.matchArrangeShortcut = _chunkT7QSEKDYcjs.matchArrangeShortcut; exports.matchSize = _chunkEL4PSKFTcjs.matchSize; exports.measureBetween = measureBetween; exports.measureLabel = measureLabel; exports.measureSelection = measureSelection; exports.measureToLine = measureToLine; exports.mergeNodeUpdates = mergeNodeUpdates; exports.mermaidEdgeDash = mermaidEdgeDash; exports.mermaidEdgeMarker = mermaidEdgeMarker; exports.mermaidEdgeWidth = mermaidEdgeWidth; exports.mermaidFlowEdges = mermaidFlowEdges; exports.mermaidFlowNodes = mermaidFlowNodes; exports.mermaidLabelLines = mermaidLabelLines; exports.mermaidMarkerId = mermaidMarkerId; exports.mermaidMovesFromCanvas = mermaidMovesFromCanvas; exports.mermaidNodeMembers = mermaidNodeMembers; exports.mermaidNodePaint = mermaidNodePaint; exports.mermaidShapePaths = mermaidShapePaths; exports.mermaidThumbnailSvg = mermaidThumbnailSvg; exports.mermaidToCanvas = mermaidToCanvas; exports.mermaidToScene = mermaidToScene; exports.mermaidToSvg = mermaidToSvg; exports.mindmapScene = mindmapScene; exports.mixColorsOklab = _chunk4ZC5QJE2cjs.mixColorsOklab; exports.moveKeyframes = moveKeyframes; exports.moveLayoutChild = moveLayoutChild; exports.multiPolygonArea = _chunkGF2RBSDMcjs.multiPolygonArea; exports.multiPolygonBounds = _chunkGF2RBSDMcjs.multiPolygonBounds; exports.nearestHandlePositions = nearestHandlePositions; exports.nodeSizeOf = nodeSizeOf; exports.normalizeBezierPath = _chunkGF2RBSDMcjs.normalizeBezierPath; exports.normalizeKeyframes = _chunkM5GLQQWGcjs.normalizeKeyframes; exports.offsetPath = _chunkGF2RBSDMcjs.offsetPath; exports.offsetShapeNodes = offsetShapeNodes; exports.oklabToRgb = _chunk4ZC5QJE2cjs.oklabToRgb; exports.oppositePosition = oppositePosition; exports.outlineShapeNodeStrokes = outlineShapeNodeStrokes; exports.outlineStroke = _chunkGF2RBSDMcjs.outlineStroke; exports.overlaps = _chunkEL4PSKFTcjs.overlaps; exports.pageHidden = _chunkM5GLQQWGcjs.pageHidden; exports.parseCanvasClipboardData = parseCanvasClipboardData; exports.parseCanvasScenes = parseCanvasScenes; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseCssGradient = _chunkNM3G4VQTcjs.parseCssGradient; exports.parseKeyframeClipboard = parseKeyframeClipboard; exports.parseMermaidStyles = parseMermaidStyles; exports.parseNodeStyleDeclarations = parseNodeStyleDeclarations; exports.parseOklab = _chunk4ZC5QJE2cjs.parseOklab; exports.parseSvgPath = _chunkNM3G4VQTcjs.parseSvgPath; exports.parseVariantName = parseVariantName; exports.pasteKeyframes = pasteKeyframes; exports.pathBoolean = _chunkGF2RBSDMcjs.pathBoolean; exports.pathBooleanSelect = _chunkGF2RBSDMcjs.pathBooleanSelect; exports.pathDataToPolyline = _chunkV3L7U63Ncjs.pathDataToPolyline; exports.pathToContours = _chunkGF2RBSDMcjs.pathToContours; exports.pathfinder = _chunkYAWLMF3Ocjs.pathfinder; exports.pieScene = pieScene; exports.placeBeside = _chunkEL4PSKFTcjs.placeBeside; exports.placeInView = _chunkEL4PSKFTcjs.placeInView; exports.planarSplit = _chunkGF2RBSDMcjs.planarSplit; exports.playCanvasSceneTransition = playCanvasSceneTransition; exports.playWebAnimations = playWebAnimations; exports.pointInBezierPath = _chunkGF2RBSDMcjs.pointInBezierPath; exports.pointInMultiPolygon = _chunkGF2RBSDMcjs.pointInMultiPolygon; exports.pointInRings = _chunkGF2RBSDMcjs.pointInRings; exports.pointerPenSample = pointerPenSample; exports.polygonArea = _chunkGF2RBSDMcjs.polygonArea; exports.polygonBoolean = _chunkGF2RBSDMcjs.polygonBoolean; exports.polygonToSvgPath = _chunkNM3G4VQTcjs.polygonToSvgPath; exports.positionToSide = positionToSide; exports.profileAlongPolyline = _chunkV3L7U63Ncjs.profileAlongPolyline; exports.pruneCanvasTokenModes = pruneCanvasTokenModes; exports.pushCanvasInstanceOverrides = pushCanvasInstanceOverrides; exports.quadrantScene = quadrantScene; exports.radarChartSpec = radarChartSpec; exports.radarScene = radarScene; exports.rasterSize = rasterSize; exports.rasterizeSvg = rasterizeSvg; exports.readAnimatableValue = readAnimatableValue; exports.readNodeStyleProperty = readNodeStyleProperty; exports.readOverrideGroup = readOverrideGroup; exports.readStyleSize = _chunkEL4PSKFTcjs.readStyleSize; exports.realClock = _chunkM5GLQQWGcjs.realClock; exports.recordAnimationChanges = recordAnimationChanges; exports.registerFamilyScene = registerFamilyScene; exports.relayoutUpdates = relayoutUpdates; exports.remapPastedNodes = remapPastedNodes; exports.removeCanvasVariant = removeCanvasVariant; exports.removeTrack = removeTrack; exports.renameCanvasVariantProperty = renameCanvasVariantProperty; exports.renameCanvasVariantValue = renameCanvasVariantValue; exports.renderCanvasBrushSwatch = _chunkV3L7U63Ncjs.renderCanvasBrushSwatch; exports.renderShapeBrushstroke = _chunkV3L7U63Ncjs.renderShapeBrushstroke; exports.reorderNodes = _chunkEL4PSKFTcjs.reorderNodes; exports.repositionNodesTo = repositionNodesTo; exports.resetCanvasInstanceOverrides = resetCanvasInstanceOverrides; exports.resizeHandleAxes = resizeHandleAxes; exports.resolveCanvasGradient = _chunkNM3G4VQTcjs.resolveCanvasGradient; exports.resolveCanvasTokens = resolveCanvasTokens; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.resolveMermaidStyles = resolveMermaidStyles; exports.resolvePadding = resolvePadding; exports.restoreCanvasMainComponent = restoreCanvasMainComponent; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.revertShapeCombination = revertShapeCombination; exports.rgbToOklab = _chunk4ZC5QJE2cjs.rgbToOklab; exports.ringSignedArea = _chunkGF2RBSDMcjs.ringSignedArea; exports.runCanvasNodeEffect = runCanvasNodeEffect; exports.runMultiNodeTransition = runMultiNodeTransition; exports.sampleAnimationFrames = sampleAnimationFrames; exports.scaleKeyframes = scaleKeyframes; exports.sceneColor = sceneColor; exports.segmentBounds = _chunkGF2RBSDMcjs.segmentBounds; exports.segmentCurvature = _chunkGF2RBSDMcjs.segmentCurvature; exports.segmentDerivative = _chunkGF2RBSDMcjs.segmentDerivative; exports.segmentExtrema = _chunkGF2RBSDMcjs.segmentExtrema; exports.segmentIntersections = _chunkGF2RBSDMcjs.segmentIntersections; exports.segmentLength = _chunkGF2RBSDMcjs.segmentLength; exports.segmentNearest = _chunkGF2RBSDMcjs.segmentNearest; exports.segmentParamAtLength = _chunkGF2RBSDMcjs.segmentParamAtLength; exports.segmentPoint = _chunkGF2RBSDMcjs.segmentPoint; exports.segmentTangent = _chunkGF2RBSDMcjs.segmentTangent; exports.sequenceScene = sequenceScene; 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 = _chunkNM3G4VQTcjs.shapeToPolygon; exports.sideToPosition = sideToPosition; exports.simplifyRing = _chunkNM3G4VQTcjs.simplifyRing; exports.snapKeyframeDelta = snapKeyframeDelta; exports.snapNodeDrag = snapNodeDrag; exports.snapNodeResize = snapNodeResize; exports.snapResize = snapResize; exports.snapTimeToFrame = snapTimeToFrame; exports.snapToGrid = snapToGrid; exports.splitSegment = _chunkGF2RBSDMcjs.splitSegment; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.streamedDiagramText = streamedDiagramText; exports.streamlinePoints = streamlinePoints; exports.strikeGesture = _chunkT7QSEKDYcjs.strikeGesture; exports.strokeBoundingBox = strokeBoundingBox; exports.strokeOutlineRings = _chunkGF2RBSDMcjs.strokeOutlineRings; exports.strokePointsToPathData = strokePointsToPathData; exports.strokeToShapeNode = strokeToShapeNode; exports.subSegment = _chunkGF2RBSDMcjs.subSegment; exports.subtractPaths = _chunkGF2RBSDMcjs.subtractPaths; exports.subtractPolygons = _chunkGF2RBSDMcjs.subtractPolygons; exports.swapCanvasInstance = swapCanvasInstance; exports.syncAllCanvasInstances = syncAllCanvasInstances; exports.syncCanvasComponents = syncCanvasComponents; exports.syncCanvasInstance = syncCanvasInstance; exports.timeToX = timeToX; exports.timelineScene = timelineScene; exports.toBezierPath = _chunkGF2RBSDMcjs.toBezierPath; exports.toWebAnimations = toWebAnimations; exports.toggleLockNodes = _chunkEL4PSKFTcjs.toggleLockNodes; exports.transformBezierPath = _chunkGF2RBSDMcjs.transformBezierPath; exports.transitionCanvasView = transitionCanvasView; exports.trimSegments = _chunkGF2RBSDMcjs.trimSegments; exports.underlineGesture = _chunkT7QSEKDYcjs.underlineGesture; exports.unionPolygons = _chunkGF2RBSDMcjs.unionPolygons; exports.unitePaths = _chunkGF2RBSDMcjs.unitePaths; exports.unlockNodes = _chunkEL4PSKFTcjs.unlockNodes; exports.updateKeyframe = updateKeyframe; exports.validateCanvasBrush = _chunkV3L7U63Ncjs.validateCanvasBrush; exports.validateCanvasBrushPaint = _chunkV3L7U63Ncjs.validateCanvasBrushPaint; exports.windingNumber = _chunkGF2RBSDMcjs.windingNumber; exports.withNodeAnimation = withNodeAnimation; exports.withStyleOpacity = withStyleOpacity; exports.withStyleSize = _chunkEL4PSKFTcjs.withStyleSize; exports.wouldCreateComponentCycle = wouldCreateComponentCycle; exports.wrapAnimationTime = _chunkM5GLQQWGcjs.wrapAnimationTime; exports.writeNodeStyleProperty = writeNodeStyleProperty; exports.writeOverrideGroup = writeOverrideGroup; exports.xToTime = xToTime; exports.xorPolygons = _chunkGF2RBSDMcjs.xorPolygons; exports.xyChartScene = xyChartScene; exports.xyChartSpec = xyChartSpec;
|
|
12721
|
+
|
|
12722
|
+
exports.ANIMATABLE_PROPERTIES = ANIMATABLE_PROPERTIES; exports.ANIMATION_DATA_KEY = ANIMATION_DATA_KEY; exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkM5GLQQWGcjs.ANIMATION_TIME_EPSILON; exports.AUTO_LAYOUT_DATA_KEY = AUTO_LAYOUT_DATA_KEY; exports.AnimationEditError = AnimationEditError; exports.AnimationPlayer = _chunkM5GLQQWGcjs.AnimationPlayer; exports.BUILTIN_FAMILY_SCENES = BUILTIN_FAMILY_SCENES; exports.CANVAS_CAPTURE_CHROME_SELECTORS = CANVAS_CAPTURE_CHROME_SELECTORS; exports.CANVAS_CAPTURE_OVERLAY_SELECTORS = CANVAS_CAPTURE_OVERLAY_SELECTORS; exports.CANVAS_CAPTURE_VIEWPORT_SELECTOR = CANVAS_CAPTURE_VIEWPORT_SELECTOR; exports.CANVAS_COMPONENT_DRAG_TYPE = CANVAS_COMPONENT_DRAG_TYPE; exports.CANVAS_EFFECT_MISSING_PATTERN = CANVAS_EFFECT_MISSING_PATTERN; exports.CANVAS_EFFECT_PLACES = CANVAS_EFFECT_PLACES; exports.CANVAS_GRADIENT_PRESETS = _chunkNM3G4VQTcjs.CANVAS_GRADIENT_PRESETS; exports.CANVAS_TOKEN_PROPERTIES = CANVAS_TOKEN_PROPERTIES; exports.CARD_INSPECTION_ZONES = CARD_INSPECTION_ZONES; 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.CSS_VARIABLE_DIAGRAM_SCENE_THEME = CSS_VARIABLE_DIAGRAM_SCENE_THEME; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.CanvasScenesStore = CanvasScenesStore; exports.DEFAULT_ARRANGE_SHORTCUTS = _chunkT7QSEKDYcjs.DEFAULT_ARRANGE_SHORTCUTS; exports.DEFAULT_CURSOR_INACTIVITY_MS = DEFAULT_CURSOR_INACTIVITY_MS; exports.DEFAULT_DIAGRAM_NODE_HEIGHT = DEFAULT_DIAGRAM_NODE_HEIGHT; exports.DEFAULT_DIAGRAM_NODE_WIDTH = DEFAULT_DIAGRAM_NODE_WIDTH; exports.DEFAULT_NODE_HEIGHT = _chunkEL4PSKFTcjs.DEFAULT_NODE_HEIGHT; exports.DEFAULT_NODE_WIDTH = _chunkEL4PSKFTcjs.DEFAULT_NODE_WIDTH; exports.DEFAULT_PLACEMENT_GAP = _chunkEL4PSKFTcjs.DEFAULT_PLACEMENT_GAP; exports.DIAGRAM_MARKER_IDS = DIAGRAM_MARKER_IDS; exports.DIAGRAM_RASTER_MAX_SIZE = DIAGRAM_RASTER_MAX_SIZE; exports.DIAGRAM_SCENE_DARK_THEME = DIAGRAM_SCENE_DARK_THEME; exports.DIAGRAM_SCENE_LIGHT_THEME = DIAGRAM_SCENE_LIGHT_THEME; exports.DIAGRAM_SVG_DARK_THEME = DIAGRAM_SVG_DARK_THEME; exports.DIAGRAM_SVG_LIGHT_THEME = DIAGRAM_SVG_LIGHT_THEME; exports.DIAGRAM_TITLE_TARGET = DIAGRAM_TITLE_TARGET; exports.DiagramStream = DiagramStream; exports.INSTANCE_DATA_KEY = INSTANCE_DATA_KEY; exports.LOCKED_DATA_KEY = _chunkEL4PSKFTcjs.LOCKED_DATA_KEY; exports.LOCKED_PREVIOUS_FLAGS_KEY = _chunkEL4PSKFTcjs.LOCKED_PREVIOUS_FLAGS_KEY; exports.MAX_KEYFRAME_REFS = MAX_KEYFRAME_REFS; exports.MERMAID_SHAPE_PAINT = MERMAID_SHAPE_PAINT; exports.ManualClock = _chunkM5GLQQWGcjs.ManualClock; exports.PATHFINDER_OPERATIONS = _chunkYAWLMF3Ocjs.PATHFINDER_OPERATIONS; exports.PIXERATE_BRAND_GRADIENT = _chunkNM3G4VQTcjs.PIXERATE_BRAND_GRADIENT; exports.PathOpsError = _chunkGF2RBSDMcjs.PathOpsError; exports.PlanarMap = _chunkYAWLMF3Ocjs.PlanarMap; exports.RESIZE_HANDLES = RESIZE_HANDLES; exports.SHAPE_DATA_KEY = SHAPE_DATA_KEY; exports.SHAPE_KINDS = _chunkNM3G4VQTcjs.SHAPE_KINDS; exports.SHAPE_NODE_TYPE = SHAPE_NODE_TYPE; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.SPRING_PRESETS = _chunkDWJJI6RTcjs.SPRING_PRESETS; 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 = _chunkEL4PSKFTcjs.alignNodes; exports.angleToSvgLinearCoords = _chunkNM3G4VQTcjs.angleToSvgLinearCoords; exports.animateNode = animateNode; exports.applyAnimation = applyAnimation; exports.applyAnimationOverrides = applyAnimationOverrides; exports.applyConstraints = applyConstraints; exports.applyNodeUpdates = _chunkEL4PSKFTcjs.applyNodeUpdates; exports.applyShapeCombination = applyShapeCombination; exports.applyShapeReplacement = applyShapeReplacement; exports.arcToCubics = _chunkGF2RBSDMcjs.arcToCubics; exports.architectureScene = architectureScene; exports.arrowGesture = _chunkT7QSEKDYcjs.arrowGesture; exports.autoLayoutDiagram = autoLayoutDiagram; exports.bezierPathArea = _chunkGF2RBSDMcjs.bezierPathArea; exports.bezierPathBounds = _chunkGF2RBSDMcjs.bezierPathBounds; exports.bezierPathLength = _chunkGF2RBSDMcjs.bezierPathLength; exports.bezierPathPointAtLength = _chunkGF2RBSDMcjs.bezierPathPointAtLength; exports.bezierPathSignedArea = _chunkGF2RBSDMcjs.bezierPathSignedArea; exports.bezierPathToSvg = _chunkGF2RBSDMcjs.bezierPathToSvg; exports.bindCanvasComponentProperty = bindCanvasComponentProperty; exports.bindCanvasToken = bindCanvasToken; exports.blendDiagramLayout = blendDiagramLayout; exports.blendLayout = blendLayout; exports.boundsOf = _chunkEL4PSKFTcjs.boundsOf; exports.bracketGesture = _chunkT7QSEKDYcjs.bracketGesture; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeSeed = _chunkV3L7U63Ncjs.brushstrokeSeed; exports.c4Scene = c4Scene; exports.calculateCursorArrowRotation = calculateCursorArrowRotation; exports.calculateCurvedPath = calculateCurvedPath; exports.calculateDagreReflowDisplacement = calculateDagreReflowDisplacement; exports.calculateDirectionalDisplacement = calculateDirectionalDisplacement; exports.calculateReflowDisplacement = calculateReflowDisplacement; exports.canCombineShapeNodes = canCombineShapeNodes; exports.canOffsetShapeNodes = canOffsetShapeNodes; exports.canOutlineShapeNodeStrokes = canOutlineShapeNodeStrokes; exports.canvasDocumentContentKey = canvasDocumentContentKey; exports.canvasEffectErrorReason = canvasEffectErrorReason; exports.canvasEffectStatus = canvasEffectStatus; exports.canvasEffectsPool = canvasEffectsPool; exports.canvasExplosionToolTarget = canvasExplosionToolTarget; exports.canvasHeight = canvasHeight; exports.canvasNodeCaptureRect = canvasNodeCaptureRect; exports.canvasNodeEffect = canvasNodeEffect; exports.captureCanvasView = captureCanvasView; exports.centerNodes = _chunkEL4PSKFTcjs.centerNodes; exports.centre = _chunkEL4PSKFTcjs.centre; exports.checkGesture = _chunkT7QSEKDYcjs.checkGesture; exports.circleGesture = _chunkT7QSEKDYcjs.circleGesture; exports.clampAnimationValue = clampAnimationValue; exports.clampLayoutSize = clampLayoutSize; exports.closeContour = _chunkGF2RBSDMcjs.closeContour; exports.collectDescendantIds = collectDescendantIds; exports.combineCanvasComponentsAsVariants = combineCanvasComponentsAsVariants; exports.combineShapeNodes = combineShapeNodes; exports.computeCanvasExplosionLayout = computeCanvasExplosionLayout; exports.computeDragBounds = computeDragBounds; exports.computeDragBoundsFromPoints = computeDragBoundsFromPoints; exports.computeNodesBoundingBox = computeNodesBoundingBox; exports.computeSnapGuides = computeSnapGuides; exports.connectedDiagramOnly = connectedDiagramOnly; exports.connectedOnly = connectedOnly; exports.contourEnclosesArea = _chunkYAWLMF3Ocjs.contourEnclosesArea; exports.contourSignedArea = _chunkGF2RBSDMcjs.contourSignedArea; exports.contoursToPath = _chunkGF2RBSDMcjs.contoursToPath; exports.copyKeyframes = copyKeyframes; exports.countPathSegments = _chunkGF2RBSDMcjs.countPathSegments; exports.createAnimationPlayer = _chunkM5GLQQWGcjs.createAnimationPlayer; exports.createBezierTrajectory = createBezierTrajectory; exports.createCanvasAnimationController = createCanvasAnimationController; exports.createCanvasArrangeController = createCanvasArrangeController; exports.createCanvasAutoLayoutController = createCanvasAutoLayoutController; exports.createCanvasCaptureSurface = createCanvasCaptureSurface; exports.createCanvasCaptureToolProvider = createCanvasCaptureToolProvider; exports.createCanvasComponent = createCanvasComponent; exports.createCanvasComponentsController = createCanvasComponentsController; exports.createCanvasDrawController = createCanvasDrawController; exports.createCanvasEditorDocument = createCanvasEditorDocument; exports.createCanvasEffectsController = createCanvasEffectsController; exports.createCanvasEffectsToolProvider = createCanvasEffectsToolProvider; exports.createCanvasExplosionStateController = createCanvasExplosionStateController; exports.createCanvasExplosionToolProvider = createCanvasExplosionToolProvider; exports.createCanvasGestureRecorder = createCanvasGestureRecorder; exports.createCanvasInstance = createCanvasInstance; exports.createCanvasPlaybackLocator = createCanvasPlaybackLocator; exports.createCanvasScenesStore = createCanvasScenesStore; exports.createDefaultStrokeStyle = createDefaultStrokeStyle; exports.createFanOutTrajectory = createFanOutTrajectory; exports.createGuideIndex = createGuideIndex; exports.createNodeGuideIndex = createNodeGuideIndex; exports.createNodeLookup = _chunkEL4PSKFTcjs.createNodeLookup; exports.crossGesture = _chunkT7QSEKDYcjs.crossGesture; exports.cubicBezierAt = _chunkDWJJI6RTcjs.cubicBezierAt; exports.cubicPointAt = _chunkNM3G4VQTcjs.cubicPointAt; exports.cubicsToPathData = _chunkNM3G4VQTcjs.cubicsToPathData; exports.cutOutPiece = _chunkYAWLMF3Ocjs.cutOutPiece; exports.dashContours = _chunkGF2RBSDMcjs.dashContours; exports.defaultEasing = defaultEasing; exports.deleteKeyframes = deleteKeyframes; exports.detachCanvasInstance = detachCanvasInstance; exports.detachTokenBindings = detachTokenBindings; exports.diagramCanvasHeight = diagramCanvasHeight; exports.diagramFileName = diagramFileName; exports.diagramGroupSize = diagramGroupSize; exports.diagramImageSize = diagramImageSize; exports.diagramLayoutBounds = diagramLayoutBounds; exports.diagramMarksBounds = diagramMarksBounds; exports.diagramMarksToSvg = diagramMarksToSvg; exports.diagramRenameOp = diagramRenameOp; exports.diagramTargetLabel = diagramTargetLabel; exports.diagramTextBaseline = diagramTextBaseline; exports.diffOverrideGroups = diffOverrideGroups; exports.distanceToBezierPath = _chunkGF2RBSDMcjs.distanceToBezierPath; exports.distributeNodes = _chunkEL4PSKFTcjs.distributeNodes; exports.dividePaths = _chunkGF2RBSDMcjs.dividePaths; exports.dividePolygons = _chunkGF2RBSDMcjs.dividePolygons; exports.downloadDiagramPng = downloadDiagramPng; exports.easeDiagramTween = easeDiagramTween; exports.easingFromInfluence = _chunkDWJJI6RTcjs.easingFromInfluence; exports.easingLabel = _chunkDWJJI6RTcjs.easingLabel; exports.easingToCss = _chunkDWJJI6RTcjs.easingToCss; exports.elasticAt = _chunkDWJJI6RTcjs.elasticAt; exports.ensureDiagramLayout = ensureDiagramLayout; exports.ensureLayout = _chunkEL4PSKFTcjs.ensureLayout; exports.estimateCanvasHeight = estimateCanvasHeight; exports.estimateDiagramCanvasHeight = estimateDiagramCanvasHeight; exports.estimateDiagramNodeSize = estimateDiagramNodeSize; exports.estimateNodeSize = _chunkEL4PSKFTcjs.estimateNodeSize; exports.estimateTextWidth = estimateTextWidth2; exports.evaluateAnimation = evaluateAnimation; exports.evaluateEasing = _chunkDWJJI6RTcjs.evaluateEasing; exports.evaluateTrack = _chunkM5GLQQWGcjs.evaluateTrack; exports.excludePaths = _chunkGF2RBSDMcjs.excludePaths; exports.explosionEdgeId = explosionEdgeId; exports.exportCssAnimation = exportCssAnimation; exports.familySceneFromLayout = familySceneFromLayout; exports.findConnectorSnap = findConnectorSnap; exports.findStrokesAtPoint = findStrokesAtPoint; exports.findVariant = findVariant; exports.fitCubicRun = _chunkNM3G4VQTcjs.fitCubicRun; exports.fitCubicWithTangents = _chunkNM3G4VQTcjs.fitCubicWithTangents; exports.fitCubics = _chunkNM3G4VQTcjs.fitCubics; exports.fitFreehandPath = _chunkNM3G4VQTcjs.fitFreehandPath; exports.fitPathData = _chunkNM3G4VQTcjs.fitPathData; exports.fitViewportToNodes = fitViewportToNodes; exports.fitViewportToRect = fitViewportToRect; exports.flattenSvgPath = _chunkNM3G4VQTcjs.flattenSvgPath; exports.flowSide = _chunkEL4PSKFTcjs.flowSide; exports.formatAgentCursorName = formatAgentCursorName; exports.formatAnimationTime = formatAnimationTime; exports.formatNumber = _chunkNM3G4VQTcjs.formatNumber; exports.formatOklab = _chunk4ZC5QJE2cjs.formatOklab; exports.formatVariantName = formatVariantName; exports.freehandBrushstroke = freehandBrushstroke; exports.ganttScene = ganttScene; exports.gestureEdgePoint = _chunkT7QSEKDYcjs.gestureEdgePoint; exports.gestureRandom = _chunkT7QSEKDYcjs.gestureRandom; exports.gestureSeed = _chunkT7QSEKDYcjs.gestureSeed; exports.gestureUnion = _chunkT7QSEKDYcjs.gestureUnion; exports.getAbsolutePosition = _chunkEL4PSKFTcjs.getAbsolutePosition; exports.getAgentCardAnchor = getAgentCardAnchor; 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.getBrushedShapeSvg = _chunkV3L7U63Ncjs.getBrushedShapeSvg; exports.getCanvasComponentDragId = getCanvasComponentDragId; exports.getCanvasTokenProperty = getCanvasTokenProperty; exports.getCenteredNodePosition = _chunkEL4PSKFTcjs.getCenteredNodePosition; exports.getChildLayout = getChildLayout; exports.getComponentData = getComponentData; exports.getComponentInstances = getComponentInstances; exports.getComponentPropertyDefs = getComponentPropertyDefs; exports.getComponentPropertyRefs = getComponentPropertyRefs; exports.getComponentSourceId = getComponentSourceId; exports.getCssPropertyAnimations = getCssPropertyAnimations; exports.getCursorTransitionDuration = getCursorTransitionDuration; exports.getDefaultVariant = getDefaultVariant; exports.getEffectiveTokenModes = getEffectiveTokenModes; exports.getFamilyScene = getFamilyScene; 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 = _chunkEL4PSKFTcjs.getLayoutedNodes; exports.getNaturalMovementTiming = getNaturalMovementTiming; exports.getNextVariantValues = getNextVariantValues; exports.getNodeAnimation = getNodeAnimation; exports.getNodeOverrides = getNodeOverrides; exports.getNodeRect = _chunkEL4PSKFTcjs.getNodeRect; exports.getNodeShape = getNodeShape; exports.getNodeSize = _chunkEL4PSKFTcjs.getNodeSize; exports.getNodeTokenBindings = getNodeTokenBindings; exports.getNodeTokenModes = getNodeTokenModes; exports.getOwningComponent = getOwningComponent; exports.getOwningInstance = getOwningInstance; exports.getResizingNodeRect = getResizingNodeRect; exports.getRootInstance = getRootInstance; exports.getShapeRenderData = _chunkNM3G4VQTcjs.getShapeRenderData; exports.getShapeSvg = _chunkNM3G4VQTcjs.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.gitGraphScene = gitGraphScene; exports.gradientToSvgDef = _chunkNM3G4VQTcjs.gradientToSvgDef; exports.handlePoint = handlePoint; exports.hasFamilyScene = hasFamilyScene; exports.hasVisibleStroke = hasVisibleStroke; exports.hashString = hashString; exports.hatchPath = _chunkYAWLMF3Ocjs.hatchPath; exports.inferResizeHandle = inferResizeHandle; exports.inspectCanvasInstance = inspectCanvasInstance; exports.inspectNodeTokens = inspectNodeTokens; exports.interiorPoint = _chunkYAWLMF3Ocjs.interiorPoint; exports.interpolateAnimationValue = _chunkM5GLQQWGcjs.interpolateAnimationValue; exports.intersectPaths = _chunkGF2RBSDMcjs.intersectPaths; exports.intersectPolygons = _chunkGF2RBSDMcjs.intersectPolygons; exports.invertNodeUpdates = _chunkEL4PSKFTcjs.invertNodeUpdates; exports.isAgentCursor = isAgentCursor; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkM5GLQQWGcjs.isAnimationKeyframe; exports.isAutoLayoutFrame = isAutoLayoutFrame; exports.isBrushedShape = _chunkV3L7U63Ncjs.isBrushedShape; exports.isCanvasComponent = isCanvasComponent; exports.isCanvasComponentSet = isCanvasComponentSet; exports.isCanvasGradient = _chunkNM3G4VQTcjs.isCanvasGradient; exports.isCanvasInstance = isCanvasInstance; exports.isCssExportExact = isCssExportExact; exports.isEventFromTextInput = isEventFromTextInput; exports.isInsideInstance = isInsideInstance; exports.isKeyframeSelected = isKeyframeSelected; exports.isLocked = _chunkEL4PSKFTcjs.isLocked; exports.isMeasureModifierHeld = isMeasureModifierHeld; exports.isNodeAnimated = isNodeAnimated; exports.isShapeDescription = _chunkNM3G4VQTcjs.isShapeDescription; exports.isShapeNode = isShapeNode; exports.isStraightCubic = _chunkNM3G4VQTcjs.isStraightCubic; exports.isValidCanvasEdge = isValidCanvasEdge; exports.isValidCanvasNode = isValidCanvasNode; exports.isValidCanvasScene = isValidCanvasScene; exports.isValidUrl = isValidUrl; exports.journeyScene = journeyScene; exports.layoutAll = layoutAll; exports.layoutBounds = layoutBounds; exports.layoutFrame = layoutFrame; exports.layoutUp = layoutUp; exports.layoutUpMany = layoutUpMany; exports.linearPositionTrajectory = linearPositionTrajectory; exports.linearTrajectory = linearTrajectory; exports.listCanvasBrushes = _chunkV3L7U63Ncjs.listCanvasBrushes; exports.listCanvasComponents = listCanvasComponents; exports.loadCanvasBrushstrokeRenderer = _chunkV3L7U63Ncjs.loadCanvasBrushstrokeRenderer; exports.lockNodes = _chunkEL4PSKFTcjs.lockNodes; exports.makeSizingCoherent = makeSizingCoherent; exports.matchArrangeShortcut = _chunkT7QSEKDYcjs.matchArrangeShortcut; exports.matchSize = _chunkEL4PSKFTcjs.matchSize; exports.measureBetween = measureBetween; exports.measureLabel = measureLabel; exports.measureSelection = measureSelection; exports.measureToLine = measureToLine; exports.mergeNodeUpdates = mergeNodeUpdates; exports.mermaidEdgeDash = mermaidEdgeDash; exports.mermaidEdgeMarker = mermaidEdgeMarker; exports.mermaidEdgeWidth = mermaidEdgeWidth; exports.mermaidFlowEdges = mermaidFlowEdges; exports.mermaidFlowNodes = mermaidFlowNodes; exports.mermaidLabelLines = mermaidLabelLines; exports.mermaidMarkerId = mermaidMarkerId; exports.mermaidMovesFromCanvas = mermaidMovesFromCanvas; exports.mermaidNodeMembers = mermaidNodeMembers; exports.mermaidNodePaint = mermaidNodePaint; exports.mermaidShapePaths = mermaidShapePaths; exports.mermaidThumbnailSvg = mermaidThumbnailSvg; exports.mermaidToCanvas = mermaidToCanvas; exports.mermaidToScene = mermaidToScene; exports.mermaidToSvg = mermaidToSvg; exports.mindmapScene = mindmapScene; exports.mixColorsOklab = _chunk4ZC5QJE2cjs.mixColorsOklab; exports.moveKeyframes = moveKeyframes; exports.moveLayoutChild = moveLayoutChild; exports.multiPolygonArea = _chunkGF2RBSDMcjs.multiPolygonArea; exports.multiPolygonBounds = _chunkGF2RBSDMcjs.multiPolygonBounds; exports.nearestHandlePositions = nearestHandlePositions; exports.nodeSizeOf = nodeSizeOf; exports.normalizeBezierPath = _chunkGF2RBSDMcjs.normalizeBezierPath; exports.normalizeKeyframes = _chunkM5GLQQWGcjs.normalizeKeyframes; exports.offsetPath = _chunkGF2RBSDMcjs.offsetPath; exports.offsetShapeNodes = offsetShapeNodes; exports.oklabToRgb = _chunk4ZC5QJE2cjs.oklabToRgb; exports.oppositePosition = oppositePosition; exports.outlineShapeNodeStrokes = outlineShapeNodeStrokes; exports.outlineStroke = _chunkGF2RBSDMcjs.outlineStroke; exports.overlaps = _chunkEL4PSKFTcjs.overlaps; exports.pageHidden = _chunkM5GLQQWGcjs.pageHidden; exports.parseCanvasClipboardData = parseCanvasClipboardData; exports.parseCanvasScenes = parseCanvasScenes; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseCssGradient = _chunkNM3G4VQTcjs.parseCssGradient; exports.parseKeyframeClipboard = parseKeyframeClipboard; exports.parseMermaidStyles = parseMermaidStyles; exports.parseNodeStyleDeclarations = parseNodeStyleDeclarations; exports.parseOklab = _chunk4ZC5QJE2cjs.parseOklab; exports.parseSvgPath = _chunkNM3G4VQTcjs.parseSvgPath; exports.parseVariantName = parseVariantName; exports.pasteKeyframes = pasteKeyframes; exports.pathBoolean = _chunkGF2RBSDMcjs.pathBoolean; exports.pathBooleanSelect = _chunkGF2RBSDMcjs.pathBooleanSelect; exports.pathDataToPolyline = _chunkV3L7U63Ncjs.pathDataToPolyline; exports.pathToContours = _chunkGF2RBSDMcjs.pathToContours; exports.pathfinder = _chunkYAWLMF3Ocjs.pathfinder; exports.pieScene = pieScene; exports.placeBeside = _chunkEL4PSKFTcjs.placeBeside; exports.placeInView = _chunkEL4PSKFTcjs.placeInView; exports.planarSplit = _chunkGF2RBSDMcjs.planarSplit; exports.playCanvasSceneTransition = playCanvasSceneTransition; exports.playWebAnimations = playWebAnimations; exports.pointInBezierPath = _chunkGF2RBSDMcjs.pointInBezierPath; exports.pointInMultiPolygon = _chunkGF2RBSDMcjs.pointInMultiPolygon; exports.pointInRings = _chunkGF2RBSDMcjs.pointInRings; exports.pointerPenSample = pointerPenSample; exports.polygonArea = _chunkGF2RBSDMcjs.polygonArea; exports.polygonBoolean = _chunkGF2RBSDMcjs.polygonBoolean; exports.polygonToSvgPath = _chunkNM3G4VQTcjs.polygonToSvgPath; exports.positionToSide = positionToSide; exports.profileAlongPolyline = _chunkV3L7U63Ncjs.profileAlongPolyline; exports.pruneCanvasTokenModes = pruneCanvasTokenModes; exports.pushCanvasInstanceOverrides = pushCanvasInstanceOverrides; exports.quadrantScene = quadrantScene; exports.radarChartSpec = radarChartSpec; exports.radarScene = radarScene; exports.rasterSize = rasterSize; exports.rasterizeSvg = rasterizeSvg; exports.readAnimatableValue = readAnimatableValue; exports.readNodeStyleProperty = readNodeStyleProperty; exports.readOverrideGroup = readOverrideGroup; exports.readStyleSize = _chunkEL4PSKFTcjs.readStyleSize; exports.realClock = _chunkM5GLQQWGcjs.realClock; exports.recordAnimationChanges = recordAnimationChanges; exports.registerFamilyScene = registerFamilyScene; exports.relayoutUpdates = relayoutUpdates; exports.remapPastedNodes = remapPastedNodes; exports.removeCanvasVariant = removeCanvasVariant; exports.removeTrack = removeTrack; exports.renameCanvasVariantProperty = renameCanvasVariantProperty; exports.renameCanvasVariantValue = renameCanvasVariantValue; exports.renderCanvasBrushSwatch = _chunkV3L7U63Ncjs.renderCanvasBrushSwatch; exports.renderShapeBrushstroke = _chunkV3L7U63Ncjs.renderShapeBrushstroke; exports.reorderNodes = _chunkEL4PSKFTcjs.reorderNodes; exports.repositionNodesTo = repositionNodesTo; exports.resetCanvasInstanceOverrides = resetCanvasInstanceOverrides; exports.resizeHandleAxes = resizeHandleAxes; exports.resolveCanvasGradient = _chunkNM3G4VQTcjs.resolveCanvasGradient; exports.resolveCanvasTokens = resolveCanvasTokens; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.resolveMermaidStyles = resolveMermaidStyles; exports.resolvePadding = resolvePadding; exports.restoreCanvasMainComponent = restoreCanvasMainComponent; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.revertShapeCombination = revertShapeCombination; exports.rgbToOklab = _chunk4ZC5QJE2cjs.rgbToOklab; exports.ringSignedArea = _chunkGF2RBSDMcjs.ringSignedArea; exports.runCanvasNodeEffect = runCanvasNodeEffect; exports.runMultiNodeTransition = runMultiNodeTransition; exports.sampleAnimationFrames = sampleAnimationFrames; exports.scaleKeyframes = scaleKeyframes; exports.sceneColor = sceneColor; exports.segmentBounds = _chunkGF2RBSDMcjs.segmentBounds; exports.segmentCurvature = _chunkGF2RBSDMcjs.segmentCurvature; exports.segmentDerivative = _chunkGF2RBSDMcjs.segmentDerivative; exports.segmentExtrema = _chunkGF2RBSDMcjs.segmentExtrema; exports.segmentIntersections = _chunkGF2RBSDMcjs.segmentIntersections; exports.segmentLength = _chunkGF2RBSDMcjs.segmentLength; exports.segmentNearest = _chunkGF2RBSDMcjs.segmentNearest; exports.segmentParamAtLength = _chunkGF2RBSDMcjs.segmentParamAtLength; exports.segmentPoint = _chunkGF2RBSDMcjs.segmentPoint; exports.segmentTangent = _chunkGF2RBSDMcjs.segmentTangent; exports.sequenceScene = sequenceScene; 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 = _chunkNM3G4VQTcjs.shapeToPolygon; exports.sideToPosition = sideToPosition; exports.simplifyRing = _chunkNM3G4VQTcjs.simplifyRing; exports.snapKeyframeDelta = snapKeyframeDelta; exports.snapNodeDrag = snapNodeDrag; exports.snapNodeResize = snapNodeResize; exports.snapResize = snapResize; exports.snapTimeToFrame = snapTimeToFrame; exports.snapToGrid = snapToGrid; exports.splitSegment = _chunkGF2RBSDMcjs.splitSegment; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.streamedDiagramText = streamedDiagramText; exports.streamlinePoints = streamlinePoints; exports.strikeGesture = _chunkT7QSEKDYcjs.strikeGesture; exports.strokeBoundingBox = strokeBoundingBox; exports.strokeOutlineRings = _chunkGF2RBSDMcjs.strokeOutlineRings; exports.strokePointsToPathData = strokePointsToPathData; exports.strokeToShapeNode = strokeToShapeNode; exports.subSegment = _chunkGF2RBSDMcjs.subSegment; exports.subtractPaths = _chunkGF2RBSDMcjs.subtractPaths; exports.subtractPolygons = _chunkGF2RBSDMcjs.subtractPolygons; exports.swapCanvasInstance = swapCanvasInstance; exports.syncAllCanvasInstances = syncAllCanvasInstances; exports.syncCanvasComponents = syncCanvasComponents; exports.syncCanvasInstance = syncCanvasInstance; exports.timeToX = timeToX; exports.timelineScene = timelineScene; exports.toBezierPath = _chunkGF2RBSDMcjs.toBezierPath; exports.toWebAnimations = toWebAnimations; exports.toggleLockNodes = _chunkEL4PSKFTcjs.toggleLockNodes; exports.transformBezierPath = _chunkGF2RBSDMcjs.transformBezierPath; exports.transitionCanvasView = transitionCanvasView; exports.trimSegments = _chunkGF2RBSDMcjs.trimSegments; exports.underlineGesture = _chunkT7QSEKDYcjs.underlineGesture; exports.unionPolygons = _chunkGF2RBSDMcjs.unionPolygons; exports.unitePaths = _chunkGF2RBSDMcjs.unitePaths; exports.unlockNodes = _chunkEL4PSKFTcjs.unlockNodes; exports.updateKeyframe = updateKeyframe; exports.validateCanvasBrush = _chunkV3L7U63Ncjs.validateCanvasBrush; exports.validateCanvasBrushPaint = _chunkV3L7U63Ncjs.validateCanvasBrushPaint; exports.windingNumber = _chunkGF2RBSDMcjs.windingNumber; exports.withNodeAnimation = withNodeAnimation; exports.withStyleOpacity = withStyleOpacity; exports.withStyleSize = _chunkEL4PSKFTcjs.withStyleSize; exports.wouldCreateComponentCycle = wouldCreateComponentCycle; exports.wrapAnimationTime = _chunkM5GLQQWGcjs.wrapAnimationTime; exports.writeNodeStyleProperty = writeNodeStyleProperty; exports.writeOverrideGroup = writeOverrideGroup; exports.xToTime = xToTime; exports.xorPolygons = _chunkGF2RBSDMcjs.xorPolygons; exports.xyChartScene = xyChartScene; exports.xyChartSpec = xyChartSpec;
|
package/dist/canvas/index.js
CHANGED
|
@@ -11786,17 +11786,26 @@ function createCanvasEffectsToolProvider(controller, options = {}) {
|
|
|
11786
11786
|
|
|
11787
11787
|
// src/canvas/editorDocument.ts
|
|
11788
11788
|
var RUNTIME_NODE_KEYS = ["selected", "dragging", "measured", "resizing"];
|
|
11789
|
-
var
|
|
11790
|
-
|
|
11791
|
-
|
|
11789
|
+
var RUNTIME_EDGE_KEYS = ["selected"];
|
|
11790
|
+
var omit = (value, keys) => {
|
|
11791
|
+
const copy = { ...value };
|
|
11792
|
+
for (const key of keys) delete copy[key];
|
|
11792
11793
|
return copy;
|
|
11793
11794
|
};
|
|
11794
|
-
var
|
|
11795
|
-
|
|
11796
|
-
|
|
11795
|
+
var omitKeys = (options = {}) => ({
|
|
11796
|
+
node: [...RUNTIME_NODE_KEYS, ...options.omitNodeKeys ?? []],
|
|
11797
|
+
edge: [...RUNTIME_EDGE_KEYS, ...options.omitEdgeKeys ?? []]
|
|
11798
|
+
});
|
|
11799
|
+
function canvasDocumentContentKey(nodes, edges, options) {
|
|
11800
|
+
const keys = omitKeys(options);
|
|
11801
|
+
return JSON.stringify([nodes.map((n3) => omit(n3, keys.node)), edges.map((e) => omit(e, keys.edge))]);
|
|
11802
|
+
}
|
|
11803
|
+
var isViewport = (value) => {
|
|
11804
|
+
const v = value;
|
|
11805
|
+
return !!v && typeof v === "object" && [v.x, v.y, v.zoom].every((n3) => typeof n3 === "number" && Number.isFinite(n3)) && v.zoom > 0;
|
|
11797
11806
|
};
|
|
11798
11807
|
function checkCanvasDocument(document2) {
|
|
11799
|
-
const hint = "A canvas document is { nodes: [{ id, position: { x, y }, data }], edges: [{ id, source, target }], scenes? } as get_canvas_document returns it.";
|
|
11808
|
+
const hint = "A canvas document is { nodes: [{ id, position: { x, y }, data }], edges: [{ id, source, target }], scenes?, viewport? } as get_canvas_document returns it.";
|
|
11800
11809
|
const value = document2;
|
|
11801
11810
|
if (!value || typeof value !== "object" || !Array.isArray(value.nodes)) throw new Error(`nodes must be an array. ${hint}`);
|
|
11802
11811
|
if (!Array.isArray(value.edges)) throw new Error(`edges must be an array. ${hint}`);
|
|
@@ -11819,25 +11828,42 @@ function checkCanvasDocument(document2) {
|
|
|
11819
11828
|
}
|
|
11820
11829
|
});
|
|
11821
11830
|
if (value.scenes !== void 0 && !Array.isArray(value.scenes)) throw new Error(`scenes must be an array. ${hint}`);
|
|
11831
|
+
if (value.viewport !== void 0 && !isViewport(value.viewport)) throw new Error(`viewport must be { x, y, zoom } with finite numbers and a zoom above 0. ${hint}`);
|
|
11822
11832
|
}
|
|
11823
11833
|
function createCanvasEditorDocument(options) {
|
|
11824
11834
|
const { history, scenes: scenes2 } = options;
|
|
11835
|
+
const keys = omitKeys(options);
|
|
11825
11836
|
const snapshot = () => ({
|
|
11826
|
-
nodes: options.getNodes().map(
|
|
11827
|
-
edges: options.getEdges().map(
|
|
11828
|
-
...scenes2 ? { scenes: scenes2.toJSON().scenes } : {}
|
|
11837
|
+
nodes: options.getNodes().map((n3) => omit(n3, keys.node)),
|
|
11838
|
+
edges: options.getEdges().map((e) => omit(e, keys.edge)),
|
|
11839
|
+
...scenes2 ? { scenes: scenes2.toJSON().scenes } : {},
|
|
11840
|
+
...options.getViewport ? { viewport: { ...options.getViewport() } } : {}
|
|
11829
11841
|
});
|
|
11830
11842
|
const apply = (doc) => {
|
|
11831
11843
|
options.setNodes(doc.nodes.map((n3) => ({ ...n3 })));
|
|
11832
11844
|
options.setEdges(doc.edges.map((e) => ({ ...e })));
|
|
11833
11845
|
if (scenes2) scenes2.load(doc.scenes ?? []);
|
|
11846
|
+
if (doc.viewport) options.setViewport?.({ ...doc.viewport });
|
|
11847
|
+
};
|
|
11848
|
+
const check = (document2) => {
|
|
11849
|
+
checkCanvasDocument(document2);
|
|
11850
|
+
const next = document2;
|
|
11851
|
+
if (options.validateNode) {
|
|
11852
|
+
next.nodes.forEach((node, i) => {
|
|
11853
|
+
const problem = options.validateNode(node, i);
|
|
11854
|
+
if (problem) throw new Error(`Node "${node.id}" (nodes[${i}]): ${problem}`);
|
|
11855
|
+
});
|
|
11856
|
+
}
|
|
11857
|
+
return next;
|
|
11834
11858
|
};
|
|
11835
11859
|
return defineEditorDocument({
|
|
11836
11860
|
kind: "canvas",
|
|
11861
|
+
formatVersion: options.formatVersion,
|
|
11862
|
+
migrations: options.migrations,
|
|
11863
|
+
assets: options.assets,
|
|
11837
11864
|
get: snapshot,
|
|
11838
11865
|
load: (document2, { history: mode }) => {
|
|
11839
|
-
|
|
11840
|
-
const next = document2;
|
|
11866
|
+
const next = check(options.normalize ? options.normalize(document2) : document2);
|
|
11841
11867
|
if (mode === "record") {
|
|
11842
11868
|
const before = snapshot();
|
|
11843
11869
|
history.execute({ name: "Load canvas", execute: () => apply(next), undo: () => apply(before) });
|
|
@@ -11863,7 +11889,7 @@ function createCanvasEditorDocument(options) {
|
|
|
11863
11889
|
function createCanvasGestureRecorder(options) {
|
|
11864
11890
|
let before = null;
|
|
11865
11891
|
const take = () => ({ nodes: options.getNodes(), edges: options.getEdges?.() });
|
|
11866
|
-
const key = (s) =>
|
|
11892
|
+
const key = (s) => canvasDocumentContentKey(s.nodes, s.edges ?? []);
|
|
11867
11893
|
const restore = (s) => {
|
|
11868
11894
|
options.setNodes(s.nodes);
|
|
11869
11895
|
if (s.edges && options.setEdges) options.setEdges(s.edges);
|
|
@@ -12273,6 +12299,7 @@ export {
|
|
|
12273
12299
|
canCombineShapeNodes,
|
|
12274
12300
|
canOffsetShapeNodes,
|
|
12275
12301
|
canOutlineShapeNodeStrokes,
|
|
12302
|
+
canvasDocumentContentKey,
|
|
12276
12303
|
canvasEffectErrorReason,
|
|
12277
12304
|
canvasEffectStatus,
|
|
12278
12305
|
canvasEffectsPool,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EFFECT_LAYER_ROLES,
|
|
3
|
+
EFFECT_TRANSITION_MS,
|
|
4
|
+
EffectUnsupportedError,
|
|
5
|
+
NoEffectsProviderError,
|
|
3
6
|
hasEffectTags
|
|
4
7
|
} from "./chunk-SIK3LT6M.js";
|
|
5
8
|
|
|
@@ -231,6 +234,103 @@ function effectSequenceSlots(sequence) {
|
|
|
231
234
|
for (const shot of sequence.shots) for (const l of shot.layers) if (l.subject && "slot" in l.subject) out.add(l.subject.slot);
|
|
232
235
|
return [...out];
|
|
233
236
|
}
|
|
237
|
+
async function fillEffectTemplate(provider, id, values = {}, options = {}) {
|
|
238
|
+
if (!provider) throw new NoEffectsProviderError();
|
|
239
|
+
if (!provider.capabilities.supportsTemplates || !provider.describeTemplate || !provider.instantiateTemplate) throw new EffectUnsupportedError(`${provider.name} has no sequence templates (capabilities.supportsTemplates is not set).`);
|
|
240
|
+
const template = await provider.describeTemplate(id);
|
|
241
|
+
const errors = checkTemplateValues(template.slots, values);
|
|
242
|
+
if (errors.length) throw new Error(`${errors.join(" ")} describe_template lists what each slot takes.`);
|
|
243
|
+
const result = await provider.instantiateTemplate(id, values, options);
|
|
244
|
+
if (!result.ok) throw new Error(`${result.errors.join(" ")} describe_template lists what each slot takes.`);
|
|
245
|
+
const problems = checkEffectSequence(result.sequence, await provider.list());
|
|
246
|
+
if (problems.length) throw new Error(`${provider.name} filled "${id}" with a sequence this editor cannot load: ${problems.join(" ")}`);
|
|
247
|
+
return { template, sequence: result.sequence, openSlots: [...result.openSlots], notes: [...result.notes] };
|
|
248
|
+
}
|
|
249
|
+
function effectLayerSpan(layer, shotIndex, shotStarts, total) {
|
|
250
|
+
const at = (t, fallback) => t === void 0 ? fallback : typeof t === "number" ? shotStarts[shotIndex] + t : shotStarts[shotIndex + t.shots] ?? total;
|
|
251
|
+
const start = at(layer.from, shotStarts[shotIndex]);
|
|
252
|
+
return { start, end: Math.max(start, at(layer.until ?? { shots: 1 }, total)) };
|
|
253
|
+
}
|
|
254
|
+
function effectSequenceTiming(sequence) {
|
|
255
|
+
const starts = [];
|
|
256
|
+
const leadIns = [];
|
|
257
|
+
let t = 0;
|
|
258
|
+
sequence.shots.forEach((shot, i) => {
|
|
259
|
+
const transition = i > 0 && shot.transition ? shot.transition.ms ?? EFFECT_TRANSITION_MS : 0;
|
|
260
|
+
const move = typeof shot.camera?.in === "object" && i > 0 ? shot.camera.in.ms ?? 0 : 0;
|
|
261
|
+
const lead = Math.max(transition, move);
|
|
262
|
+
starts.push(t);
|
|
263
|
+
leadIns.push(lead);
|
|
264
|
+
t += lead + shot.hold;
|
|
265
|
+
});
|
|
266
|
+
return { starts, leadIns, total: t };
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// src/effects/template-tools.ts
|
|
270
|
+
var unavailable = (provider) => !provider ? "No effects provider is registered, so there are no sequence templates." : !provider.capabilities.supportsTemplates || !provider.listTemplates ? `${provider.name} has no sequence templates (capabilities.supportsTemplates is not set).` : null;
|
|
271
|
+
function effectTemplateTools(host, ctx) {
|
|
272
|
+
const require2 = () => {
|
|
273
|
+
const provider = host.provider();
|
|
274
|
+
const reason = unavailable(provider);
|
|
275
|
+
if (reason) throw new Error(reason);
|
|
276
|
+
return provider;
|
|
277
|
+
};
|
|
278
|
+
return [
|
|
279
|
+
{
|
|
280
|
+
name: "list_templates",
|
|
281
|
+
title: "List sequence templates",
|
|
282
|
+
description: "Lists the effects provider's sequence templates (ready-made scenes of several shots with slots to fill: a product reveal, before and after, a stat countdown\u2026), best match first: { available, templates: [{ id, name, description, tags, shots, durationMs }] }. Then describe_template for a template's slots and fill_template to use it. Without a provider that has templates it returns available: false and the reason.",
|
|
283
|
+
inputSchema: {
|
|
284
|
+
type: "object",
|
|
285
|
+
properties: {
|
|
286
|
+
query: { type: "string", description: "Words to match in the name, id, tags or description (default: every template)." },
|
|
287
|
+
tags: { type: "array", items: { type: "string", minLength: 1 }, description: "Only templates carrying every one of these tags." },
|
|
288
|
+
limit: { type: "integer", minimum: 1, maximum: 100, description: "Most templates to return (default all)." }
|
|
289
|
+
},
|
|
290
|
+
additionalProperties: false
|
|
291
|
+
},
|
|
292
|
+
annotations: { title: "List sequence templates", ...ctx.annotations.read },
|
|
293
|
+
handler: async ({ query, tags, limit }) => {
|
|
294
|
+
const provider = host.provider();
|
|
295
|
+
const reason = unavailable(provider);
|
|
296
|
+
if (reason) return { available: false, reason, templates: [] };
|
|
297
|
+
return { available: true, provider: provider.name, templates: await provider.listTemplates({ ...query ? { query } : {}, ...tags ? { tags } : {}, ...limit ? { limit } : {} }) };
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: "describe_template",
|
|
302
|
+
title: "Describe a sequence template",
|
|
303
|
+
description: `Describes a template's slots in the order a form shows them: { id, name, description, shots, slots: [{ name, type (image, video, svg, text, color, number), label, description, default or hasDefault, maxLength, min, max, integer }], slotSummaries (one line each), valuesSchema (the JSON Schema fill_template's values follow), exampleValues (the text, colour and number defaults, to change) }. Subject slots (image, video, svg) take a URL, markup, or { "slot": name } to leave them for the host.`,
|
|
304
|
+
inputSchema: { type: "object", properties: { template: { type: "string", minLength: 1, description: "A template id from list_templates." } }, required: ["template"], additionalProperties: false },
|
|
305
|
+
annotations: { title: "Describe a sequence template", ...ctx.annotations.read },
|
|
306
|
+
handler: async ({ template }) => {
|
|
307
|
+
const d = await require2().describeTemplate(template);
|
|
308
|
+
return { ...d, slotSummaries: d.slots.map(templateSlotSummary), valuesSchema: templateValuesSchema(d.slots), exampleValues: templateDefaultValues(d.slots) };
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
name: "fill_template",
|
|
313
|
+
title: "Fill a sequence template",
|
|
314
|
+
description: `Fills a template's slots and loads the result. ${host.fillDetails} Slots left out take their defaults. Values are checked first: every value that does not fit (an unknown slot, a wrong type, a number out of range, text too long) is refused at once, naming what the slot takes, and nothing changes. One undo step. Subject slots left open draw nothing until filled; the result's openSlots says which.`,
|
|
315
|
+
inputSchema: {
|
|
316
|
+
type: "object",
|
|
317
|
+
properties: {
|
|
318
|
+
template: { type: "string", minLength: 1, description: "A template id from list_templates." },
|
|
319
|
+
values: { type: "object", description: "Slot values by name, following describe_template's valuesSchema (default: every slot's default)." },
|
|
320
|
+
name: { type: "string", pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$", description: "A name for the result: lowercase words and dashes (default the template's)." },
|
|
321
|
+
...host.fillOptions ?? {}
|
|
322
|
+
},
|
|
323
|
+
required: ["template"],
|
|
324
|
+
additionalProperties: false
|
|
325
|
+
},
|
|
326
|
+
annotations: { title: "Fill a sequence template", ...ctx.annotations.write },
|
|
327
|
+
handler: async ({ template, values, ...options }) => {
|
|
328
|
+
require2();
|
|
329
|
+
return host.fill(template, values ?? {}, options);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
];
|
|
333
|
+
}
|
|
234
334
|
|
|
235
335
|
export {
|
|
236
336
|
EFFECT_SEQUENCE_NAME,
|
|
@@ -251,5 +351,9 @@ export {
|
|
|
251
351
|
effectSubjectProblem,
|
|
252
352
|
checkEffectSequence,
|
|
253
353
|
effectSequenceEffects,
|
|
254
|
-
effectSequenceSlots
|
|
354
|
+
effectSequenceSlots,
|
|
355
|
+
fillEffectTemplate,
|
|
356
|
+
effectLayerSpan,
|
|
357
|
+
effectSequenceTiming,
|
|
358
|
+
effectTemplateTools
|
|
255
359
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
4
7
|
var _chunkJAOSL334cjs = require('./chunk-JAOSL334.cjs');
|
|
5
8
|
|
|
6
9
|
// src/effects/templates.ts
|
|
@@ -231,6 +234,107 @@ function effectSequenceSlots(sequence) {
|
|
|
231
234
|
for (const shot of sequence.shots) for (const l of shot.layers) if (l.subject && "slot" in l.subject) out.add(l.subject.slot);
|
|
232
235
|
return [...out];
|
|
233
236
|
}
|
|
237
|
+
async function fillEffectTemplate(provider, id, values = {}, options = {}) {
|
|
238
|
+
if (!provider) throw new (0, _chunkJAOSL334cjs.NoEffectsProviderError)();
|
|
239
|
+
if (!provider.capabilities.supportsTemplates || !provider.describeTemplate || !provider.instantiateTemplate) throw new (0, _chunkJAOSL334cjs.EffectUnsupportedError)(`${provider.name} has no sequence templates (capabilities.supportsTemplates is not set).`);
|
|
240
|
+
const template = await provider.describeTemplate(id);
|
|
241
|
+
const errors = checkTemplateValues(template.slots, values);
|
|
242
|
+
if (errors.length) throw new Error(`${errors.join(" ")} describe_template lists what each slot takes.`);
|
|
243
|
+
const result = await provider.instantiateTemplate(id, values, options);
|
|
244
|
+
if (!result.ok) throw new Error(`${result.errors.join(" ")} describe_template lists what each slot takes.`);
|
|
245
|
+
const problems = checkEffectSequence(result.sequence, await provider.list());
|
|
246
|
+
if (problems.length) throw new Error(`${provider.name} filled "${id}" with a sequence this editor cannot load: ${problems.join(" ")}`);
|
|
247
|
+
return { template, sequence: result.sequence, openSlots: [...result.openSlots], notes: [...result.notes] };
|
|
248
|
+
}
|
|
249
|
+
function effectLayerSpan(layer, shotIndex, shotStarts, total) {
|
|
250
|
+
const at = (t, fallback) => t === void 0 ? fallback : typeof t === "number" ? shotStarts[shotIndex] + t : _nullishCoalesce(shotStarts[shotIndex + t.shots], () => ( total));
|
|
251
|
+
const start = at(layer.from, shotStarts[shotIndex]);
|
|
252
|
+
return { start, end: Math.max(start, at(_nullishCoalesce(layer.until, () => ( { shots: 1 })), total)) };
|
|
253
|
+
}
|
|
254
|
+
function effectSequenceTiming(sequence) {
|
|
255
|
+
const starts = [];
|
|
256
|
+
const leadIns = [];
|
|
257
|
+
let t = 0;
|
|
258
|
+
sequence.shots.forEach((shot, i) => {
|
|
259
|
+
const transition = i > 0 && shot.transition ? _nullishCoalesce(shot.transition.ms, () => ( _chunkJAOSL334cjs.EFFECT_TRANSITION_MS)) : 0;
|
|
260
|
+
const move = typeof _optionalChain([shot, 'access', _4 => _4.camera, 'optionalAccess', _5 => _5.in]) === "object" && i > 0 ? _nullishCoalesce(shot.camera.in.ms, () => ( 0)) : 0;
|
|
261
|
+
const lead = Math.max(transition, move);
|
|
262
|
+
starts.push(t);
|
|
263
|
+
leadIns.push(lead);
|
|
264
|
+
t += lead + shot.hold;
|
|
265
|
+
});
|
|
266
|
+
return { starts, leadIns, total: t };
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// src/effects/template-tools.ts
|
|
270
|
+
var unavailable = (provider) => !provider ? "No effects provider is registered, so there are no sequence templates." : !provider.capabilities.supportsTemplates || !provider.listTemplates ? `${provider.name} has no sequence templates (capabilities.supportsTemplates is not set).` : null;
|
|
271
|
+
function effectTemplateTools(host, ctx) {
|
|
272
|
+
const require2 = () => {
|
|
273
|
+
const provider = host.provider();
|
|
274
|
+
const reason = unavailable(provider);
|
|
275
|
+
if (reason) throw new Error(reason);
|
|
276
|
+
return provider;
|
|
277
|
+
};
|
|
278
|
+
return [
|
|
279
|
+
{
|
|
280
|
+
name: "list_templates",
|
|
281
|
+
title: "List sequence templates",
|
|
282
|
+
description: "Lists the effects provider's sequence templates (ready-made scenes of several shots with slots to fill: a product reveal, before and after, a stat countdown\u2026), best match first: { available, templates: [{ id, name, description, tags, shots, durationMs }] }. Then describe_template for a template's slots and fill_template to use it. Without a provider that has templates it returns available: false and the reason.",
|
|
283
|
+
inputSchema: {
|
|
284
|
+
type: "object",
|
|
285
|
+
properties: {
|
|
286
|
+
query: { type: "string", description: "Words to match in the name, id, tags or description (default: every template)." },
|
|
287
|
+
tags: { type: "array", items: { type: "string", minLength: 1 }, description: "Only templates carrying every one of these tags." },
|
|
288
|
+
limit: { type: "integer", minimum: 1, maximum: 100, description: "Most templates to return (default all)." }
|
|
289
|
+
},
|
|
290
|
+
additionalProperties: false
|
|
291
|
+
},
|
|
292
|
+
annotations: { title: "List sequence templates", ...ctx.annotations.read },
|
|
293
|
+
handler: async ({ query, tags, limit }) => {
|
|
294
|
+
const provider = host.provider();
|
|
295
|
+
const reason = unavailable(provider);
|
|
296
|
+
if (reason) return { available: false, reason, templates: [] };
|
|
297
|
+
return { available: true, provider: provider.name, templates: await provider.listTemplates({ ...query ? { query } : {}, ...tags ? { tags } : {}, ...limit ? { limit } : {} }) };
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: "describe_template",
|
|
302
|
+
title: "Describe a sequence template",
|
|
303
|
+
description: `Describes a template's slots in the order a form shows them: { id, name, description, shots, slots: [{ name, type (image, video, svg, text, color, number), label, description, default or hasDefault, maxLength, min, max, integer }], slotSummaries (one line each), valuesSchema (the JSON Schema fill_template's values follow), exampleValues (the text, colour and number defaults, to change) }. Subject slots (image, video, svg) take a URL, markup, or { "slot": name } to leave them for the host.`,
|
|
304
|
+
inputSchema: { type: "object", properties: { template: { type: "string", minLength: 1, description: "A template id from list_templates." } }, required: ["template"], additionalProperties: false },
|
|
305
|
+
annotations: { title: "Describe a sequence template", ...ctx.annotations.read },
|
|
306
|
+
handler: async ({ template }) => {
|
|
307
|
+
const d = await require2().describeTemplate(template);
|
|
308
|
+
return { ...d, slotSummaries: d.slots.map(templateSlotSummary), valuesSchema: templateValuesSchema(d.slots), exampleValues: templateDefaultValues(d.slots) };
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
name: "fill_template",
|
|
313
|
+
title: "Fill a sequence template",
|
|
314
|
+
description: `Fills a template's slots and loads the result. ${host.fillDetails} Slots left out take their defaults. Values are checked first: every value that does not fit (an unknown slot, a wrong type, a number out of range, text too long) is refused at once, naming what the slot takes, and nothing changes. One undo step. Subject slots left open draw nothing until filled; the result's openSlots says which.`,
|
|
315
|
+
inputSchema: {
|
|
316
|
+
type: "object",
|
|
317
|
+
properties: {
|
|
318
|
+
template: { type: "string", minLength: 1, description: "A template id from list_templates." },
|
|
319
|
+
values: { type: "object", description: "Slot values by name, following describe_template's valuesSchema (default: every slot's default)." },
|
|
320
|
+
name: { type: "string", pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$", description: "A name for the result: lowercase words and dashes (default the template's)." },
|
|
321
|
+
..._nullishCoalesce(host.fillOptions, () => ( {}))
|
|
322
|
+
},
|
|
323
|
+
required: ["template"],
|
|
324
|
+
additionalProperties: false
|
|
325
|
+
},
|
|
326
|
+
annotations: { title: "Fill a sequence template", ...ctx.annotations.write },
|
|
327
|
+
handler: async ({ template, values, ...options }) => {
|
|
328
|
+
require2();
|
|
329
|
+
return host.fill(template, _nullishCoalesce(values, () => ( {})), options);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
];
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
234
338
|
|
|
235
339
|
|
|
236
340
|
|
|
@@ -252,4 +356,4 @@ function effectSequenceSlots(sequence) {
|
|
|
252
356
|
|
|
253
357
|
|
|
254
358
|
|
|
255
|
-
exports.EFFECT_SEQUENCE_NAME = EFFECT_SEQUENCE_NAME; exports.isSubjectTemplateSlot = isSubjectTemplateSlot; exports.effectSubjectKind = effectSubjectKind; exports.templateSlotTakes = templateSlotTakes; exports.templateValueProblem = templateValueProblem; exports.checkTemplateValues = checkTemplateValues; exports.templateSlotSchema = templateSlotSchema; exports.templateValuesSchema = templateValuesSchema; exports.templateDefaultValues = templateDefaultValues; exports.templateSlotSummary = templateSlotSummary; exports.searchTemplateSummaries = searchTemplateSummaries; exports.effectLayerRole = effectLayerRole; exports.effectLayerInput = effectLayerInput; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.effectLayerOffered = effectLayerOffered; exports.effectSubjectProblem = effectSubjectProblem; exports.checkEffectSequence = checkEffectSequence; exports.effectSequenceEffects = effectSequenceEffects; exports.effectSequenceSlots = effectSequenceSlots;
|
|
359
|
+
exports.EFFECT_SEQUENCE_NAME = EFFECT_SEQUENCE_NAME; exports.isSubjectTemplateSlot = isSubjectTemplateSlot; exports.effectSubjectKind = effectSubjectKind; exports.templateSlotTakes = templateSlotTakes; exports.templateValueProblem = templateValueProblem; exports.checkTemplateValues = checkTemplateValues; exports.templateSlotSchema = templateSlotSchema; exports.templateValuesSchema = templateValuesSchema; exports.templateDefaultValues = templateDefaultValues; exports.templateSlotSummary = templateSlotSummary; exports.searchTemplateSummaries = searchTemplateSummaries; exports.effectLayerRole = effectLayerRole; exports.effectLayerInput = effectLayerInput; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.effectLayerOffered = effectLayerOffered; exports.effectSubjectProblem = effectSubjectProblem; exports.checkEffectSequence = checkEffectSequence; exports.effectSequenceEffects = effectSequenceEffects; exports.effectSequenceSlots = effectSequenceSlots; exports.fillEffectTemplate = fillEffectTemplate; exports.effectLayerSpan = effectLayerSpan; exports.effectSequenceTiming = effectSequenceTiming; exports.effectTemplateTools = effectTemplateTools;
|