@inditextech/weave-sdk 0.55.2 → 0.56.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/sdk.cjs +215 -55
- package/dist/sdk.d.cts +31 -4
- package/dist/sdk.d.cts.map +1 -1
- package/dist/sdk.d.ts +31 -4
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +213 -56
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.cjs
CHANGED
|
@@ -18239,6 +18239,9 @@ function memoize(fn) {
|
|
|
18239
18239
|
return result;
|
|
18240
18240
|
};
|
|
18241
18241
|
}
|
|
18242
|
+
function isIOS() {
|
|
18243
|
+
return /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
18244
|
+
}
|
|
18242
18245
|
|
|
18243
18246
|
//#endregion
|
|
18244
18247
|
//#region src/actions/selection-tool/constants.ts
|
|
@@ -19542,8 +19545,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19542
19545
|
let transformerAttrs = { ...this.config.selection };
|
|
19543
19546
|
const currentAttrs = this.tr.getAttrs();
|
|
19544
19547
|
Object.keys(currentAttrs).forEach((key) => {
|
|
19545
|
-
if (["rotationSnaps", "enabledAnchors"].includes(key)) this.tr
|
|
19546
|
-
else this.tr
|
|
19548
|
+
if (["rotationSnaps", "enabledAnchors"].includes(key)) this.tr?.setAttr(key, []);
|
|
19549
|
+
else this.tr?.setAttr(key, void 0);
|
|
19547
19550
|
});
|
|
19548
19551
|
if (nodesSelected === 1) {
|
|
19549
19552
|
transformerAttrs = (0, import_merge.default)(transformerAttrs, nodes[0].getTransformerProperties());
|
|
@@ -19554,8 +19557,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19554
19557
|
for (const node of nodes) anchorsArrays.push(node.allowedAnchors());
|
|
19555
19558
|
transformerAttrs.enabledAnchors = intersectArrays(anchorsArrays);
|
|
19556
19559
|
}
|
|
19557
|
-
this.tr
|
|
19558
|
-
this.tr
|
|
19560
|
+
this.tr?.setAttrs(transformerAttrs);
|
|
19561
|
+
this.tr?.forceUpdate();
|
|
19559
19562
|
}
|
|
19560
19563
|
setSelectedNodes(nodes) {
|
|
19561
19564
|
this.tr.setNodes(nodes);
|
|
@@ -20599,15 +20602,15 @@ var WeaveReconciler = class {
|
|
|
20599
20602
|
child,
|
|
20600
20603
|
beforeChild
|
|
20601
20604
|
}, "insertBefore ");
|
|
20602
|
-
if (parentInstance instanceof konva.default.Layer) {
|
|
20603
|
-
parentInstance.
|
|
20604
|
-
const
|
|
20605
|
-
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20605
|
+
if (parentInstance instanceof konva.default.Layer || parentInstance instanceof konva.default.Group) {
|
|
20606
|
+
const children = parentInstance.getChildren();
|
|
20607
|
+
const fromIndex = children.indexOf(child);
|
|
20608
|
+
const toIndex = children.indexOf(beforeChild);
|
|
20609
|
+
if (fromIndex === -1 || toIndex === -1) return;
|
|
20610
|
+
children.splice(fromIndex, 1);
|
|
20611
|
+
const adjustedIndex = fromIndex < toIndex ? toIndex - 1 : toIndex;
|
|
20612
|
+
parentInstance.getChildren().splice(adjustedIndex, 0, child);
|
|
20613
|
+
parentInstance.children = parentInstance.getChildren();
|
|
20611
20614
|
}
|
|
20612
20615
|
},
|
|
20613
20616
|
appendChild(parentInstance, child) {
|
|
@@ -21565,7 +21568,6 @@ var WeaveZIndexManager = class {
|
|
|
21565
21568
|
}
|
|
21566
21569
|
moveUp(instance) {
|
|
21567
21570
|
this.logger.debug(`Moving instance with id [${instance.getAttrs().id}], up one step of z-index`);
|
|
21568
|
-
instance.moveUp();
|
|
21569
21571
|
const handler = this.instance.getNodeHandler(instance.getAttrs().nodeType);
|
|
21570
21572
|
if (handler) {
|
|
21571
21573
|
const nodeState = handler.serialize(instance);
|
|
@@ -21574,7 +21576,6 @@ var WeaveZIndexManager = class {
|
|
|
21574
21576
|
}
|
|
21575
21577
|
moveDown(instance) {
|
|
21576
21578
|
this.logger.debug(`Moving instance with id [${instance.getAttrs().id}], down one step of z-index`);
|
|
21577
|
-
instance.moveDown();
|
|
21578
21579
|
const handler = this.instance.getNodeHandler(instance.getAttrs().nodeType);
|
|
21579
21580
|
if (handler) {
|
|
21580
21581
|
const nodeState = handler.serialize(instance);
|
|
@@ -21585,7 +21586,6 @@ var WeaveZIndexManager = class {
|
|
|
21585
21586
|
const nodes = Array.isArray(instances) ? instances : [instances];
|
|
21586
21587
|
const nodesDescending = nodes.toSorted((a, b) => b.zIndex() - a.zIndex());
|
|
21587
21588
|
for (const node of nodesDescending) {
|
|
21588
|
-
node.moveToBottom();
|
|
21589
21589
|
const handler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
21590
21590
|
if (handler) {
|
|
21591
21591
|
const nodeState = handler.serialize(node);
|
|
@@ -21597,7 +21597,6 @@ var WeaveZIndexManager = class {
|
|
|
21597
21597
|
const nodes = Array.isArray(instances) ? instances : [instances];
|
|
21598
21598
|
const nodesAscending = nodes.toSorted((a, b) => a.zIndex() - b.zIndex());
|
|
21599
21599
|
for (const node of nodesAscending) {
|
|
21600
|
-
node.moveToTop();
|
|
21601
21600
|
const handler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
21602
21601
|
if (handler) {
|
|
21603
21602
|
const nodeState = handler.serialize(node);
|
|
@@ -21924,7 +21923,7 @@ var WeaveRegisterManager = class {
|
|
|
21924
21923
|
|
|
21925
21924
|
//#endregion
|
|
21926
21925
|
//#region package.json
|
|
21927
|
-
var version = "0.
|
|
21926
|
+
var version = "0.56.0";
|
|
21928
21927
|
|
|
21929
21928
|
//#endregion
|
|
21930
21929
|
//#region src/managers/setup.ts
|
|
@@ -22152,6 +22151,23 @@ var WeaveExportManager = class {
|
|
|
22152
22151
|
this.logger = this.instance.getChildLogger("export-manager");
|
|
22153
22152
|
this.logger.debug("Export manager created");
|
|
22154
22153
|
}
|
|
22154
|
+
fitKonvaPixelRatio(sw, sh, targetPR = 1, maxArea = 16777216) {
|
|
22155
|
+
if (sw <= 0 || sh <= 0) return {
|
|
22156
|
+
pixelRatio: 0,
|
|
22157
|
+
outW: 0,
|
|
22158
|
+
outH: 0
|
|
22159
|
+
};
|
|
22160
|
+
const desiredArea = sw * sh * targetPR * targetPR;
|
|
22161
|
+
let pr = targetPR;
|
|
22162
|
+
if (desiredArea > maxArea) pr = Math.sqrt(maxArea / (sw * sh));
|
|
22163
|
+
const outW = Math.max(1, Math.floor(sw * pr));
|
|
22164
|
+
const outH = Math.max(1, Math.floor(sh * pr));
|
|
22165
|
+
return {
|
|
22166
|
+
pixelRatio: pr,
|
|
22167
|
+
outW,
|
|
22168
|
+
outH
|
|
22169
|
+
};
|
|
22170
|
+
}
|
|
22155
22171
|
exportNodes(nodes, boundingNodes, options) {
|
|
22156
22172
|
return new Promise((resolve) => {
|
|
22157
22173
|
const { format: format$2 = __inditextech_weave_types.WEAVE_EXPORT_FORMATS.PNG, padding = 0, pixelRatio = 1, backgroundColor = __inditextech_weave_types.WEAVE_EXPORT_BACKGROUND_COLOR } = options;
|
|
@@ -22205,13 +22221,14 @@ var WeaveExportManager = class {
|
|
|
22205
22221
|
mainLayer.add(exportGroup);
|
|
22206
22222
|
const backgroundRect = background.getClientRect();
|
|
22207
22223
|
stage.batchDraw();
|
|
22224
|
+
const { pixelRatio: finalPixelRatio } = this.fitKonvaPixelRatio(Math.round(backgroundRect.width), Math.round(backgroundRect.height), pixelRatio);
|
|
22208
22225
|
exportGroup.toImage({
|
|
22209
22226
|
x: Math.round(backgroundRect.x),
|
|
22210
22227
|
y: Math.round(backgroundRect.y),
|
|
22211
22228
|
width: Math.round(backgroundRect.width),
|
|
22212
22229
|
height: Math.round(backgroundRect.height),
|
|
22213
22230
|
mimeType: format$2,
|
|
22214
|
-
pixelRatio,
|
|
22231
|
+
pixelRatio: finalPixelRatio,
|
|
22215
22232
|
quality: options.quality ?? 1,
|
|
22216
22233
|
callback: (img) => {
|
|
22217
22234
|
exportGroup.destroy();
|
|
@@ -25069,6 +25086,11 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
25069
25086
|
//#endregion
|
|
25070
25087
|
//#region src/nodes/stroke/constants.ts
|
|
25071
25088
|
const WEAVE_STROKE_NODE_TYPE = "stroke";
|
|
25089
|
+
const WEAVE_STROKE_NODE_DEFAULT_CONFIG = {
|
|
25090
|
+
smoothingFactor: .1,
|
|
25091
|
+
resamplingSpacing: 2,
|
|
25092
|
+
pressureScale: 1
|
|
25093
|
+
};
|
|
25072
25094
|
|
|
25073
25095
|
//#endregion
|
|
25074
25096
|
//#region src/nodes/stroke/stroke.ts
|
|
@@ -25077,45 +25099,145 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
25077
25099
|
constructor(params) {
|
|
25078
25100
|
super();
|
|
25079
25101
|
const { config } = params ?? {};
|
|
25080
|
-
this.config =
|
|
25102
|
+
this.config = (0, import_merge.default)(WEAVE_STROKE_NODE_DEFAULT_CONFIG, config);
|
|
25103
|
+
}
|
|
25104
|
+
resamplePoints(pts, spacing) {
|
|
25105
|
+
if (pts.length < 2) return pts;
|
|
25106
|
+
const resampled = [pts[0]];
|
|
25107
|
+
for (let i = 1; i < pts.length; i++) {
|
|
25108
|
+
let last = resampled[resampled.length - 1];
|
|
25109
|
+
const current = pts[i];
|
|
25110
|
+
const segDist = this.dist(last, current);
|
|
25111
|
+
if (segDist === 0) continue;
|
|
25112
|
+
let remaining = segDist;
|
|
25113
|
+
while (remaining >= spacing) {
|
|
25114
|
+
const t = spacing / segDist;
|
|
25115
|
+
const newPt = this.lerpPoint(last, current, t);
|
|
25116
|
+
resampled.push(newPt);
|
|
25117
|
+
last = newPt;
|
|
25118
|
+
remaining = this.dist(last, current);
|
|
25119
|
+
}
|
|
25120
|
+
}
|
|
25121
|
+
return resampled;
|
|
25122
|
+
}
|
|
25123
|
+
dist(a, b) {
|
|
25124
|
+
const dx = b.x - a.x, dy = b.y - a.y;
|
|
25125
|
+
return Math.hypot(dx, dy);
|
|
25081
25126
|
}
|
|
25082
|
-
|
|
25083
|
-
|
|
25084
|
-
|
|
25085
|
-
|
|
25086
|
-
|
|
25087
|
-
|
|
25088
|
-
|
|
25089
|
-
|
|
25090
|
-
|
|
25091
|
-
|
|
25092
|
-
|
|
25093
|
-
|
|
25094
|
-
const
|
|
25095
|
-
|
|
25096
|
-
|
|
25127
|
+
lerpPoint(a, b, t) {
|
|
25128
|
+
return {
|
|
25129
|
+
x: a.x + (b.x - a.x) * t,
|
|
25130
|
+
y: a.y + (b.y - a.y) * t,
|
|
25131
|
+
pressure: a.pressure + (b.pressure - a.pressure) * t
|
|
25132
|
+
};
|
|
25133
|
+
}
|
|
25134
|
+
buildPolygonFromPressure(pts, baseWidth) {
|
|
25135
|
+
if (pts.length < 2) return [];
|
|
25136
|
+
const left = [];
|
|
25137
|
+
const right = [];
|
|
25138
|
+
for (let i = 0; i < pts.length; i++) {
|
|
25139
|
+
const p = pts[i];
|
|
25140
|
+
const w = (baseWidth + p.pressure * this.config.pressureScale) / 2;
|
|
25141
|
+
let dx, dy;
|
|
25142
|
+
if (i === 0) {
|
|
25143
|
+
dx = pts[1].x - p.x;
|
|
25144
|
+
dy = pts[1].y - p.y;
|
|
25145
|
+
} else if (i === pts.length - 1) {
|
|
25146
|
+
dx = p.x - pts[i - 1].x;
|
|
25147
|
+
dy = p.y - pts[i - 1].y;
|
|
25148
|
+
} else {
|
|
25149
|
+
dx = pts[i + 1].x - pts[i - 1].x;
|
|
25150
|
+
dy = pts[i + 1].y - pts[i - 1].y;
|
|
25151
|
+
}
|
|
25152
|
+
const len = Math.hypot(dx, dy) || 1;
|
|
25153
|
+
const nx = -dy / len;
|
|
25154
|
+
const ny = dx / len;
|
|
25155
|
+
left.push({
|
|
25156
|
+
x: p.x + nx * w,
|
|
25157
|
+
y: p.y + ny * w
|
|
25158
|
+
});
|
|
25159
|
+
right.push({
|
|
25160
|
+
x: p.x - nx * w,
|
|
25161
|
+
y: p.y - ny * w
|
|
25162
|
+
});
|
|
25163
|
+
}
|
|
25164
|
+
const reversed = right.toReversed();
|
|
25165
|
+
return left.concat(reversed);
|
|
25166
|
+
}
|
|
25167
|
+
dashSegments(pts, pattern) {
|
|
25168
|
+
const segments = [];
|
|
25169
|
+
let patIndex = 0;
|
|
25170
|
+
let patDist = pattern[patIndex];
|
|
25171
|
+
let draw = true;
|
|
25172
|
+
let segPts = [pts[0]];
|
|
25173
|
+
for (let i = 1; i < pts.length; i++) {
|
|
25174
|
+
let d = this.dist(pts[i - 1], pts[i]);
|
|
25175
|
+
while (d >= patDist) {
|
|
25176
|
+
const t = patDist / d;
|
|
25177
|
+
const mid = this.lerpPoint(pts[i - 1], pts[i], t);
|
|
25178
|
+
segPts.push(mid);
|
|
25179
|
+
if (draw) segments.push(segPts);
|
|
25180
|
+
draw = !draw;
|
|
25181
|
+
patIndex = (patIndex + 1) % pattern.length;
|
|
25182
|
+
patDist = pattern[patIndex];
|
|
25183
|
+
segPts = [mid];
|
|
25184
|
+
d -= patDist;
|
|
25185
|
+
pts[i - 1] = mid;
|
|
25186
|
+
}
|
|
25187
|
+
segPts.push(pts[i]);
|
|
25188
|
+
patDist -= d;
|
|
25189
|
+
}
|
|
25190
|
+
if (draw && segPts.length > 1) segments.push(segPts);
|
|
25191
|
+
return segments;
|
|
25192
|
+
}
|
|
25193
|
+
catmullRomSpline(pts, spacing) {
|
|
25194
|
+
const curvePoints = [];
|
|
25195
|
+
for (let i = 0; i < pts.length - 1; i++) {
|
|
25196
|
+
const p0 = pts[i - 1] || pts[i];
|
|
25197
|
+
const p1 = pts[i];
|
|
25198
|
+
const p2 = pts[i + 1];
|
|
25199
|
+
const p3 = pts[i + 2] || p2;
|
|
25200
|
+
for (let t = 0; t < 1; t += spacing) {
|
|
25201
|
+
const t2 = t * t;
|
|
25202
|
+
const t3 = t2 * t;
|
|
25203
|
+
const x = .5 * (2 * p1.x + (-p0.x + p2.x) * t + (2 * p0.x - 5 * p1.x + 4 * p2.x - p3.x) * t2 + (-p0.x + 3 * p1.x - 3 * p2.x + p3.x) * t3);
|
|
25204
|
+
const y = .5 * (2 * p1.y + (-p0.y + p2.y) * t + (2 * p0.y - 5 * p1.y + 4 * p2.y - p3.y) * t2 + (-p0.y + 3 * p1.y - 3 * p2.y + p3.y) * t3);
|
|
25205
|
+
const pressure = .5 * (2 * p1.pressure + (-p0.pressure + p2.pressure) * t + (2 * p0.pressure - 5 * p1.pressure + 4 * p2.pressure - p3.pressure) * t2 + (-p0.pressure + 3 * p1.pressure - 3 * p2.pressure + p3.pressure) * t3);
|
|
25206
|
+
curvePoints.push({
|
|
25207
|
+
x,
|
|
25208
|
+
y,
|
|
25209
|
+
pressure
|
|
25210
|
+
});
|
|
25211
|
+
}
|
|
25097
25212
|
}
|
|
25213
|
+
return curvePoints;
|
|
25098
25214
|
}
|
|
25099
25215
|
onRender(props) {
|
|
25100
25216
|
const stroke = new konva.default.Shape({
|
|
25101
25217
|
...props,
|
|
25102
25218
|
name: "node",
|
|
25103
|
-
sceneFunc: (
|
|
25104
|
-
context.beginPath();
|
|
25105
|
-
context.strokeStyle = shape.getAttrs().stroke ?? "black";
|
|
25106
|
-
context.setLineDash(shape.getAttrs().dash || []);
|
|
25107
|
-
context.lineCap = shape.getAttrs().lineCap ?? "round";
|
|
25108
|
-
context.lineJoin = shape.getAttrs().lineJoin ?? "round";
|
|
25219
|
+
sceneFunc: (ctx, shape) => {
|
|
25109
25220
|
const strokeElements = shape.getAttrs().strokeElements;
|
|
25110
25221
|
if (strokeElements.length === 0) return;
|
|
25111
|
-
|
|
25112
|
-
|
|
25113
|
-
const
|
|
25114
|
-
strokeElements.
|
|
25115
|
-
|
|
25116
|
-
|
|
25222
|
+
if (strokeElements.length < 2) return;
|
|
25223
|
+
const color = shape.getAttrs().stroke ?? "black";
|
|
25224
|
+
const strokeWidth = shape.getAttrs().strokeWidth ?? 1;
|
|
25225
|
+
const smoothPoints = this.catmullRomSpline(strokeElements, this.config.smoothingFactor);
|
|
25226
|
+
const evenlySpaced = this.resamplePoints(smoothPoints, this.config.resamplingSpacing);
|
|
25227
|
+
const dashes = this.dashSegments(evenlySpaced, shape.getAttrs().dash || []);
|
|
25228
|
+
dashes.forEach((segment) => {
|
|
25229
|
+
const poly = this.buildPolygonFromPressure(segment, strokeWidth);
|
|
25230
|
+
if (!poly.length) return;
|
|
25231
|
+
ctx.beginPath();
|
|
25232
|
+
ctx.moveTo(poly[0].x, poly[0].y);
|
|
25233
|
+
for (let i = 1; i < poly.length; i++) ctx.lineTo(poly[i].x, poly[i].y);
|
|
25234
|
+
ctx.strokeStyle = color;
|
|
25235
|
+
ctx.lineCap = shape.getAttrs().lineCap ?? "butt";
|
|
25236
|
+
ctx.lineJoin = shape.getAttrs().lineJoin ?? "miter";
|
|
25237
|
+
ctx.closePath();
|
|
25238
|
+
ctx.fillStyle = color;
|
|
25239
|
+
ctx.fill();
|
|
25117
25240
|
});
|
|
25118
|
-
context.strokeShape(shape);
|
|
25119
25241
|
},
|
|
25120
25242
|
dashEnabled: false,
|
|
25121
25243
|
hitFunc: (context, shape) => {
|
|
@@ -26646,15 +26768,18 @@ const BRUSH_TOOL_STATE = {
|
|
|
26646
26768
|
["IDLE"]: "idle",
|
|
26647
26769
|
["DEFINE_STROKE"]: "defineStroke"
|
|
26648
26770
|
};
|
|
26771
|
+
const BRUSH_TOOL_DEFAULT_CONFIG = { interpolationSteps: 10 };
|
|
26649
26772
|
|
|
26650
26773
|
//#endregion
|
|
26651
26774
|
//#region src/actions/brush-tool/brush-tool.ts
|
|
26652
26775
|
var WeaveBrushToolAction = class extends WeaveAction {
|
|
26653
26776
|
initialized = false;
|
|
26777
|
+
rawPoints = [];
|
|
26654
26778
|
onPropsChange = void 0;
|
|
26655
26779
|
onInit = void 0;
|
|
26656
|
-
constructor() {
|
|
26780
|
+
constructor(params) {
|
|
26657
26781
|
super();
|
|
26782
|
+
this.config = (0, import_merge.default)(BRUSH_TOOL_DEFAULT_CONFIG, params?.config ?? {});
|
|
26658
26783
|
this.initialized = false;
|
|
26659
26784
|
this.state = BRUSH_TOOL_STATE.INACTIVE;
|
|
26660
26785
|
this.strokeId = null;
|
|
@@ -26699,7 +26824,8 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26699
26824
|
this.handleStartStroke(pointPressure);
|
|
26700
26825
|
e.evt.stopPropagation();
|
|
26701
26826
|
};
|
|
26702
|
-
stage.on("
|
|
26827
|
+
if (isIOS()) stage.on("touchstart", handlePointerDown);
|
|
26828
|
+
else stage.on("pointerdown", handlePointerDown);
|
|
26703
26829
|
const handlePointerMove = (e) => {
|
|
26704
26830
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
26705
26831
|
if (this.getZoomPlugin()?.isPinching()) return;
|
|
@@ -26708,14 +26834,16 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26708
26834
|
this.handleMovement(pointPressure);
|
|
26709
26835
|
e.evt.stopPropagation();
|
|
26710
26836
|
};
|
|
26711
|
-
stage.on("
|
|
26837
|
+
if (isIOS()) stage.on("touchmove", handlePointerMove);
|
|
26838
|
+
else stage.on("pointermove", handlePointerMove);
|
|
26712
26839
|
const handlePointerUp = (e) => {
|
|
26713
26840
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
26714
26841
|
if (this.getZoomPlugin()?.isPinching()) return;
|
|
26715
26842
|
this.handleEndStroke();
|
|
26716
26843
|
e.evt.stopPropagation();
|
|
26717
26844
|
};
|
|
26718
|
-
stage.on("
|
|
26845
|
+
if (isIOS()) stage.on("touchend", handlePointerUp);
|
|
26846
|
+
else stage.on("pointerup", handlePointerUp);
|
|
26719
26847
|
this.initialized = true;
|
|
26720
26848
|
}
|
|
26721
26849
|
setState(state) {
|
|
@@ -26773,17 +26901,44 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26773
26901
|
}
|
|
26774
26902
|
this.setState(BRUSH_TOOL_STATE.DEFINE_STROKE);
|
|
26775
26903
|
}
|
|
26904
|
+
catmullRom1D(p0, p1, p2, p3, t) {
|
|
26905
|
+
const t2 = t * t;
|
|
26906
|
+
const t3 = t2 * t;
|
|
26907
|
+
return .5 * (2 * p1 + (-p0 + p2) * t + (2 * p0 - 5 * p1 + 4 * p2 - p3) * t2 + (-p0 + 3 * p1 - 3 * p2 + p3) * t3);
|
|
26908
|
+
}
|
|
26909
|
+
smoothInterpolation(last4Points, steps) {
|
|
26910
|
+
const [p0, p1, p2, p3] = last4Points;
|
|
26911
|
+
const pts = [];
|
|
26912
|
+
for (let i = 0; i <= steps; i++) {
|
|
26913
|
+
const t = i / steps;
|
|
26914
|
+
pts.push({
|
|
26915
|
+
x: this.catmullRom1D(p0.x, p1.x, p2.x, p3.x, t),
|
|
26916
|
+
y: this.catmullRom1D(p0.y, p1.y, p2.y, p3.y, t),
|
|
26917
|
+
pressure: this.catmullRom1D(p0.pressure, p1.pressure, p2.pressure, p3.pressure, t)
|
|
26918
|
+
});
|
|
26919
|
+
}
|
|
26920
|
+
return pts;
|
|
26921
|
+
}
|
|
26776
26922
|
handleMovement(pressure) {
|
|
26777
26923
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
26778
26924
|
const tempStroke = this.instance.getStage().findOne(`#${this.strokeId}`);
|
|
26779
26925
|
if (this.measureContainer && tempStroke) {
|
|
26780
26926
|
const { mousePoint } = this.instance.getMousePointerRelativeToContainer(this.measureContainer);
|
|
26781
|
-
const
|
|
26782
|
-
newStrokeElements.push({
|
|
26927
|
+
const currentPoint = {
|
|
26783
26928
|
x: mousePoint.x - tempStroke.x(),
|
|
26784
26929
|
y: mousePoint.y - tempStroke.y(),
|
|
26785
26930
|
pressure
|
|
26786
|
-
}
|
|
26931
|
+
};
|
|
26932
|
+
this.rawPoints.push(currentPoint);
|
|
26933
|
+
let newStrokeElements = [...tempStroke.getAttrs().strokeElements];
|
|
26934
|
+
const smoothPoints = [];
|
|
26935
|
+
if (isIOS()) if (this.rawPoints.length >= 4) {
|
|
26936
|
+
const last4 = this.rawPoints.slice(-4);
|
|
26937
|
+
const interpolatedPts = this.smoothInterpolation(last4, this.config.interpolationSteps);
|
|
26938
|
+
smoothPoints.push(...interpolatedPts);
|
|
26939
|
+
} else smoothPoints.push(currentPoint);
|
|
26940
|
+
else smoothPoints.push(currentPoint);
|
|
26941
|
+
newStrokeElements = [...newStrokeElements, ...smoothPoints];
|
|
26787
26942
|
const box = this.getBoundingBox(newStrokeElements);
|
|
26788
26943
|
tempStroke.setAttrs({
|
|
26789
26944
|
width: box.width,
|
|
@@ -26820,6 +26975,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26820
26975
|
if (realNode) realNode.destroy();
|
|
26821
26976
|
if (tempStroke.getAttrs().strokeElements.length >= 3) this.instance.addNode(nodeHandler.serialize(tempStroke), this.container?.getAttrs().id);
|
|
26822
26977
|
}
|
|
26978
|
+
this.rawPoints = [];
|
|
26823
26979
|
this.clickPoint = null;
|
|
26824
26980
|
stage.container().style.cursor = "crosshair";
|
|
26825
26981
|
stage.container().tabIndex = 1;
|
|
@@ -26855,6 +27011,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26855
27011
|
if (node) selectionPlugin.setSelectedNodes([node]);
|
|
26856
27012
|
this.instance.triggerAction(SELECTION_TOOL_ACTION_NAME);
|
|
26857
27013
|
}
|
|
27014
|
+
this.rawPoints = [];
|
|
26858
27015
|
this.clickPoint = null;
|
|
26859
27016
|
this.setState(BRUSH_TOOL_STATE.INACTIVE);
|
|
26860
27017
|
}
|
|
@@ -29858,6 +30015,7 @@ exports.ALIGN_NODES_TOOL_STATE = ALIGN_NODES_TOOL_STATE
|
|
|
29858
30015
|
exports.ARROW_TOOL_ACTION_NAME = ARROW_TOOL_ACTION_NAME
|
|
29859
30016
|
exports.ARROW_TOOL_STATE = ARROW_TOOL_STATE
|
|
29860
30017
|
exports.BRUSH_TOOL_ACTION_NAME = BRUSH_TOOL_ACTION_NAME
|
|
30018
|
+
exports.BRUSH_TOOL_DEFAULT_CONFIG = BRUSH_TOOL_DEFAULT_CONFIG
|
|
29861
30019
|
exports.BRUSH_TOOL_STATE = BRUSH_TOOL_STATE
|
|
29862
30020
|
exports.COPY_PASTE_NODES_PLUGIN_STATE = COPY_PASTE_NODES_PLUGIN_STATE
|
|
29863
30021
|
exports.ELLIPSE_TOOL_ACTION_NAME = ELLIPSE_TOOL_ACTION_NAME
|
|
@@ -29933,6 +30091,7 @@ exports.WEAVE_STAGE_DEFAULT_MODE = WEAVE_STAGE_DEFAULT_MODE
|
|
|
29933
30091
|
exports.WEAVE_STAGE_GRID_KEY = WEAVE_STAGE_GRID_KEY
|
|
29934
30092
|
exports.WEAVE_STAGE_NODE_TYPE = WEAVE_STAGE_NODE_TYPE
|
|
29935
30093
|
exports.WEAVE_STAR_NODE_TYPE = WEAVE_STAR_NODE_TYPE
|
|
30094
|
+
exports.WEAVE_STROKE_NODE_DEFAULT_CONFIG = WEAVE_STROKE_NODE_DEFAULT_CONFIG
|
|
29936
30095
|
exports.WEAVE_STROKE_NODE_TYPE = WEAVE_STROKE_NODE_TYPE
|
|
29937
30096
|
exports.WEAVE_TEXT_NODE_TYPE = WEAVE_TEXT_NODE_TYPE
|
|
29938
30097
|
exports.WEAVE_USERS_POINTERS_KEY = WEAVE_USERS_POINTERS_KEY
|
|
@@ -30006,6 +30165,7 @@ exports.getVisibleNodesInViewport = getVisibleNodesInViewport
|
|
|
30006
30165
|
exports.hasFrames = hasFrames
|
|
30007
30166
|
exports.hasImages = hasImages
|
|
30008
30167
|
exports.intersectArrays = intersectArrays
|
|
30168
|
+
exports.isIOS = isIOS
|
|
30009
30169
|
exports.isInShadowDOM = isInShadowDOM
|
|
30010
30170
|
exports.isNodeInSelection = isNodeInSelection
|
|
30011
30171
|
exports.memoize = memoize
|
package/dist/sdk.d.cts
CHANGED
|
@@ -899,6 +899,7 @@ declare function isInShadowDOM(el: DOMElement): boolean;
|
|
|
899
899
|
declare function getTopmostShadowHost(el: DOMElement): ShadowRoot | null;
|
|
900
900
|
declare function getVisibleNodes(instance: Weave, stage: Konva.Stage, nodeParent: Konva.Node, skipNodes: string[], referenceLayer: Konva.Layer | Konva.Group): konva_lib_Node5.Node<konva_lib_Node4.NodeConfig>[];
|
|
901
901
|
declare function memoize<T extends (...args: any[]) => any>(fn: T): T;
|
|
902
|
+
declare function isIOS(): boolean;
|
|
902
903
|
|
|
903
904
|
//#endregion
|
|
904
905
|
//#region src/nodes/stage/stage.d.ts
|
|
@@ -1326,7 +1327,10 @@ declare const WEAVE_FRAME_NODE_DEFAULT_PROPS: {
|
|
|
1326
1327
|
//#region src/nodes/stroke/types.d.ts
|
|
1327
1328
|
//# sourceMappingURL=constants.d.ts.map
|
|
1328
1329
|
type WeaveStrokeProperties = {
|
|
1329
|
-
|
|
1330
|
+
smoothingFactor: number;
|
|
1331
|
+
resamplingSpacing: number;
|
|
1332
|
+
pressureScale: number;
|
|
1333
|
+
transform?: WeaveNodeTransformerProperties;
|
|
1330
1334
|
};
|
|
1331
1335
|
type WeaveStrokeNodeParams = {
|
|
1332
1336
|
config: Partial<WeaveStrokeProperties>;
|
|
@@ -1344,7 +1348,12 @@ declare class WeaveStrokeNode extends WeaveNode {
|
|
|
1344
1348
|
private readonly config;
|
|
1345
1349
|
protected nodeType: string;
|
|
1346
1350
|
constructor(params?: WeaveStrokeNodeParams);
|
|
1347
|
-
private
|
|
1351
|
+
private resamplePoints;
|
|
1352
|
+
private dist;
|
|
1353
|
+
private lerpPoint;
|
|
1354
|
+
private buildPolygonFromPressure;
|
|
1355
|
+
private dashSegments;
|
|
1356
|
+
private catmullRomSpline;
|
|
1348
1357
|
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1349
1358
|
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1350
1359
|
scaleReset(node: Konva.Node): void;
|
|
@@ -1355,6 +1364,11 @@ declare class WeaveStrokeNode extends WeaveNode {
|
|
|
1355
1364
|
//#region src/nodes/stroke/constants.d.ts
|
|
1356
1365
|
//# sourceMappingURL=stroke.d.ts.map
|
|
1357
1366
|
declare const WEAVE_STROKE_NODE_TYPE = "stroke";
|
|
1367
|
+
declare const WEAVE_STROKE_NODE_DEFAULT_CONFIG: {
|
|
1368
|
+
smoothingFactor: number;
|
|
1369
|
+
resamplingSpacing: number;
|
|
1370
|
+
pressureScale: number;
|
|
1371
|
+
};
|
|
1358
1372
|
|
|
1359
1373
|
//#endregion
|
|
1360
1374
|
//#region src/actions/zoom-out-tool/types.d.ts
|
|
@@ -1721,6 +1735,9 @@ declare const BRUSH_TOOL_STATE: {
|
|
|
1721
1735
|
readonly IDLE: "idle";
|
|
1722
1736
|
readonly DEFINE_STROKE: "defineStroke";
|
|
1723
1737
|
};
|
|
1738
|
+
declare const BRUSH_TOOL_DEFAULT_CONFIG: {
|
|
1739
|
+
interpolationSteps: number;
|
|
1740
|
+
};
|
|
1724
1741
|
|
|
1725
1742
|
//#endregion
|
|
1726
1743
|
//#region src/actions/brush-tool/types.d.ts
|
|
@@ -1729,6 +1746,12 @@ type WeaveBrushToolActionStateKeys = keyof typeof BRUSH_TOOL_STATE;
|
|
|
1729
1746
|
type WeaveBrushToolActionState = (typeof BRUSH_TOOL_STATE)[WeaveBrushToolActionStateKeys];
|
|
1730
1747
|
type WeaveBrushToolActionOnAddingEvent = undefined;
|
|
1731
1748
|
type WeaveBrushToolActionOnAddedEvent = undefined;
|
|
1749
|
+
type WeaveBrushToolActionProperties = {
|
|
1750
|
+
interpolationSteps: number;
|
|
1751
|
+
};
|
|
1752
|
+
type WeaveBrushToolActionParams = {
|
|
1753
|
+
config: Partial<WeaveBrushToolActionProperties>;
|
|
1754
|
+
};
|
|
1732
1755
|
|
|
1733
1756
|
//#endregion
|
|
1734
1757
|
//#region src/plugins/stage-zoom/constants.d.ts
|
|
@@ -1889,6 +1912,7 @@ declare class WeaveStageZoomPlugin extends WeavePlugin {
|
|
|
1889
1912
|
//#region src/actions/brush-tool/brush-tool.d.ts
|
|
1890
1913
|
//# sourceMappingURL=stage-zoom.d.ts.map
|
|
1891
1914
|
declare class WeaveBrushToolAction extends WeaveAction {
|
|
1915
|
+
protected config: WeaveBrushToolActionProperties;
|
|
1892
1916
|
protected initialized: boolean;
|
|
1893
1917
|
protected state: WeaveBrushToolActionState;
|
|
1894
1918
|
protected clickPoint: Vector2d | null;
|
|
@@ -1896,9 +1920,10 @@ declare class WeaveBrushToolAction extends WeaveAction {
|
|
|
1896
1920
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
1897
1921
|
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
1898
1922
|
protected cancelAction: () => void;
|
|
1923
|
+
protected rawPoints: WeaveStrokePoint[];
|
|
1899
1924
|
onPropsChange: undefined;
|
|
1900
1925
|
onInit: undefined;
|
|
1901
|
-
constructor();
|
|
1926
|
+
constructor(params?: WeaveBrushToolActionParams);
|
|
1902
1927
|
getName(): string;
|
|
1903
1928
|
initProps(): {
|
|
1904
1929
|
stroke: string;
|
|
@@ -1910,6 +1935,8 @@ declare class WeaveBrushToolAction extends WeaveAction {
|
|
|
1910
1935
|
private setState;
|
|
1911
1936
|
private getBoundingBox;
|
|
1912
1937
|
private handleStartStroke;
|
|
1938
|
+
private catmullRom1D;
|
|
1939
|
+
private smoothInterpolation;
|
|
1913
1940
|
private handleMovement;
|
|
1914
1941
|
private handleEndStroke;
|
|
1915
1942
|
trigger(cancel: () => void): void;
|
|
@@ -2757,5 +2784,5 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
2757
2784
|
//#endregion
|
|
2758
2785
|
//# sourceMappingURL=copy-paste-nodes.d.ts.map
|
|
2759
2786
|
|
|
2760
|
-
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, DistanceInfoH, DistanceInfoV, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, GUIDE_ENTER_SNAPPING_TOLERANCE, GUIDE_EXIT_SNAPPING_TOLERANCE, GUIDE_HORIZONTAL_LINE_NAME, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, GUIDE_VERTICAL_LINE_NAME, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageOptions, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, NodeSnap, NodeSnapHorizontal, NodeSnapHorizontalKeys, NodeSnapKeys, NodeSnapVertical, NodeSnapVerticalKeys, NodeSnappingEdge, NodeSnappingEdges, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, PaddingOnPaste, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, WEAVE_ARROW_NODE_TYPE, WEAVE_COPY_PASTE_CONFIG_DEFAULT, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_COPY_PASTE_PASTE_CATCHER_ID, WEAVE_COPY_PASTE_PASTE_MODES, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS, WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO, WEAVE_GRID_DEFAULT_MAJOR_EVERY, WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_RADIUS, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_STROKE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_GRID_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTERS_DEFAULT_PROPS, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveAlignNodesToolAction, WeaveAlignNodesToolActionAlignTo, WeaveAlignNodesToolActionAlignToKeys, WeaveAlignNodesToolActionState, WeaveAlignNodesToolActionStateKeys, WeaveAlignNodesToolActionTriggerParams, WeaveArrowNode, WeaveArrowNodeParams, WeaveArrowProperties, WeaveArrowToolAction, WeaveArrowToolActionOnAddedEvent, WeaveArrowToolActionOnAddingEvent, WeaveArrowToolActionState, WeaveArrowToolActionStateKeys, WeaveBrushToolAction, WeaveBrushToolActionOnAddedEvent, WeaveBrushToolActionOnAddingEvent, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginConfig, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginParams, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveCopyPastePasteMode, WeaveCopyPastePasteModeKeys, WeaveEllipseNode, WeaveEllipseNodeParams, WeaveEllipseProperties, WeaveEllipseToolAction, WeaveEllipseToolActionOnAddedEvent, WeaveEllipseToolActionOnAddingEvent, WeaveEllipseToolActionState, WeaveEllipseToolActionStateKeys, WeaveEraserToolAction, WeaveEraserToolActionState, WeaveEraserToolActionStateKeys, WeaveExportNodesActionParams, WeaveExportNodesToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionOnAddedEvent, WeaveFrameToolActionOnAddingEvent, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveGroupNodeParams, WeaveGroupProperties, WeaveImageCropEndType, WeaveImageCropEndTypeKeys, WeaveImageNode, WeaveImageNodeParams, WeaveImageOnCropEndEvent, WeaveImageOnCropStartEvent, WeaveImageProperties, WeaveImageToolAction, WeaveImageToolActionOnAddedEvent, WeaveImageToolActionOnAddingEvent, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveLineNodeParams, WeaveLineProperties, WeaveMoveToolAction, WeaveMoveToolActionParams, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesDistanceSnappingPluginConfig, WeaveNodesDistanceSnappingPluginParams, WeaveNodesDistanceSnappingUIConfig, WeaveNodesEdgeSnappingPlugin, WeaveNodesEdgeSnappingPluginConfig, WeaveNodesEdgeSnappingPluginParams, WeaveNodesSelectionBehaviorsConfig, WeaveNodesSelectionConfig, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionOnAddedEvent, WeavePenToolActionOnAddingEvent, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleNodeParams, WeaveRectangleProperties, WeaveRectangleToolAction, WeaveRectangleToolActionOnAddedEvent, WeaveRectangleToolActionOnAddingEvent, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveRegularPolygonNode, WeaveRegularPolygonNodeParams, WeaveRegularPolygonProperties, WeaveRegularPolygonToolAction, WeaveRegularPolygonToolActionOnAddedEvent, WeaveRegularPolygonToolActionOnAddingEvent, WeaveRegularPolygonToolActionState, WeaveRegularPolygonToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStageZoomType, WeaveStageZoomTypeKeys, WeaveStarNode, WeaveStarNodeParams, WeaveStarProperties, WeaveStarToolAction, WeaveStarToolActionOnAddedEvent, WeaveStarToolActionOnAddingEvent, WeaveStarToolActionState, WeaveStarToolActionStateKeys, WeaveStore, WeaveStoreOnNodeChangeEvent, WeaveStoreOnRoomLoadedEvent, WeaveStoreOnStateChangeEvent, WeaveStoreOnUndoRedoChangeEvent, WeaveStrokeNode, WeaveStrokeNodeParams, WeaveStrokePoint, WeaveStrokeProperties, WeaveTextLayout, WeaveTextLayoutKeys, WeaveTextNode, WeaveTextNodeParams, WeaveTextProperties, WeaveTextToolAction, WeaveTextToolActionOnAddedEvent, WeaveTextToolActionOnAddingEvent, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUserPointersUIProperties, WeaveUserSelectionInfo, WeaveUserSelectionKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveUsersSelectionPlugin, WeaveUsersSelectionPluginConfig, WeaveUsersSelectionPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isInShadowDOM, isNodeInSelection, memoize, moveNodeToContainer, resetScale };
|
|
2787
|
+
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_DEFAULT_CONFIG, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, DistanceInfoH, DistanceInfoV, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, GUIDE_ENTER_SNAPPING_TOLERANCE, GUIDE_EXIT_SNAPPING_TOLERANCE, GUIDE_HORIZONTAL_LINE_NAME, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, GUIDE_VERTICAL_LINE_NAME, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageOptions, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, NodeSnap, NodeSnapHorizontal, NodeSnapHorizontalKeys, NodeSnapKeys, NodeSnapVertical, NodeSnapVerticalKeys, NodeSnappingEdge, NodeSnappingEdges, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, PaddingOnPaste, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, WEAVE_ARROW_NODE_TYPE, WEAVE_COPY_PASTE_CONFIG_DEFAULT, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_COPY_PASTE_PASTE_CATCHER_ID, WEAVE_COPY_PASTE_PASTE_MODES, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS, WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO, WEAVE_GRID_DEFAULT_MAJOR_EVERY, WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_RADIUS, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_STROKE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_GRID_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTERS_DEFAULT_PROPS, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveAlignNodesToolAction, WeaveAlignNodesToolActionAlignTo, WeaveAlignNodesToolActionAlignToKeys, WeaveAlignNodesToolActionState, WeaveAlignNodesToolActionStateKeys, WeaveAlignNodesToolActionTriggerParams, WeaveArrowNode, WeaveArrowNodeParams, WeaveArrowProperties, WeaveArrowToolAction, WeaveArrowToolActionOnAddedEvent, WeaveArrowToolActionOnAddingEvent, WeaveArrowToolActionState, WeaveArrowToolActionStateKeys, WeaveBrushToolAction, WeaveBrushToolActionOnAddedEvent, WeaveBrushToolActionOnAddingEvent, WeaveBrushToolActionParams, WeaveBrushToolActionProperties, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginConfig, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginParams, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveCopyPastePasteMode, WeaveCopyPastePasteModeKeys, WeaveEllipseNode, WeaveEllipseNodeParams, WeaveEllipseProperties, WeaveEllipseToolAction, WeaveEllipseToolActionOnAddedEvent, WeaveEllipseToolActionOnAddingEvent, WeaveEllipseToolActionState, WeaveEllipseToolActionStateKeys, WeaveEraserToolAction, WeaveEraserToolActionState, WeaveEraserToolActionStateKeys, WeaveExportNodesActionParams, WeaveExportNodesToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionOnAddedEvent, WeaveFrameToolActionOnAddingEvent, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveGroupNodeParams, WeaveGroupProperties, WeaveImageCropEndType, WeaveImageCropEndTypeKeys, WeaveImageNode, WeaveImageNodeParams, WeaveImageOnCropEndEvent, WeaveImageOnCropStartEvent, WeaveImageProperties, WeaveImageToolAction, WeaveImageToolActionOnAddedEvent, WeaveImageToolActionOnAddingEvent, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveLineNodeParams, WeaveLineProperties, WeaveMoveToolAction, WeaveMoveToolActionParams, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesDistanceSnappingPluginConfig, WeaveNodesDistanceSnappingPluginParams, WeaveNodesDistanceSnappingUIConfig, WeaveNodesEdgeSnappingPlugin, WeaveNodesEdgeSnappingPluginConfig, WeaveNodesEdgeSnappingPluginParams, WeaveNodesSelectionBehaviorsConfig, WeaveNodesSelectionConfig, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionOnAddedEvent, WeavePenToolActionOnAddingEvent, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleNodeParams, WeaveRectangleProperties, WeaveRectangleToolAction, WeaveRectangleToolActionOnAddedEvent, WeaveRectangleToolActionOnAddingEvent, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveRegularPolygonNode, WeaveRegularPolygonNodeParams, WeaveRegularPolygonProperties, WeaveRegularPolygonToolAction, WeaveRegularPolygonToolActionOnAddedEvent, WeaveRegularPolygonToolActionOnAddingEvent, WeaveRegularPolygonToolActionState, WeaveRegularPolygonToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStageZoomType, WeaveStageZoomTypeKeys, WeaveStarNode, WeaveStarNodeParams, WeaveStarProperties, WeaveStarToolAction, WeaveStarToolActionOnAddedEvent, WeaveStarToolActionOnAddingEvent, WeaveStarToolActionState, WeaveStarToolActionStateKeys, WeaveStore, WeaveStoreOnNodeChangeEvent, WeaveStoreOnRoomLoadedEvent, WeaveStoreOnStateChangeEvent, WeaveStoreOnUndoRedoChangeEvent, WeaveStrokeNode, WeaveStrokeNodeParams, WeaveStrokePoint, WeaveStrokeProperties, WeaveTextLayout, WeaveTextLayoutKeys, WeaveTextNode, WeaveTextNodeParams, WeaveTextProperties, WeaveTextToolAction, WeaveTextToolActionOnAddedEvent, WeaveTextToolActionOnAddingEvent, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUserPointersUIProperties, WeaveUserSelectionInfo, WeaveUserSelectionKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveUsersSelectionPlugin, WeaveUsersSelectionPluginConfig, WeaveUsersSelectionPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, memoize, moveNodeToContainer, resetScale };
|
|
2761
2788
|
//# sourceMappingURL=sdk.d.cts.map
|