@inditextech/weave-sdk 0.55.2 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk.cjs +215 -56
- 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 -57
- 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);
|
|
@@ -19732,7 +19735,6 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
19732
19735
|
});
|
|
19733
19736
|
if (catcher) {
|
|
19734
19737
|
document.addEventListener("paste", async (e) => {
|
|
19735
|
-
e.preventDefault();
|
|
19736
19738
|
const dataList = e.clipboardData?.items;
|
|
19737
19739
|
if (!dataList) return;
|
|
19738
19740
|
if (dataList?.length > 0) this.sendExternalPasteEvent(dataList);
|
|
@@ -20599,15 +20601,15 @@ var WeaveReconciler = class {
|
|
|
20599
20601
|
child,
|
|
20600
20602
|
beforeChild
|
|
20601
20603
|
}, "insertBefore ");
|
|
20602
|
-
if (parentInstance instanceof konva.default.Layer) {
|
|
20603
|
-
parentInstance.
|
|
20604
|
-
const
|
|
20605
|
-
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20604
|
+
if (parentInstance instanceof konva.default.Layer || parentInstance instanceof konva.default.Group) {
|
|
20605
|
+
const children = parentInstance.getChildren();
|
|
20606
|
+
const fromIndex = children.indexOf(child);
|
|
20607
|
+
const toIndex = children.indexOf(beforeChild);
|
|
20608
|
+
if (fromIndex === -1 || toIndex === -1) return;
|
|
20609
|
+
children.splice(fromIndex, 1);
|
|
20610
|
+
const adjustedIndex = fromIndex < toIndex ? toIndex - 1 : toIndex;
|
|
20611
|
+
parentInstance.getChildren().splice(adjustedIndex, 0, child);
|
|
20612
|
+
parentInstance.children = parentInstance.getChildren();
|
|
20611
20613
|
}
|
|
20612
20614
|
},
|
|
20613
20615
|
appendChild(parentInstance, child) {
|
|
@@ -21565,7 +21567,6 @@ var WeaveZIndexManager = class {
|
|
|
21565
21567
|
}
|
|
21566
21568
|
moveUp(instance) {
|
|
21567
21569
|
this.logger.debug(`Moving instance with id [${instance.getAttrs().id}], up one step of z-index`);
|
|
21568
|
-
instance.moveUp();
|
|
21569
21570
|
const handler = this.instance.getNodeHandler(instance.getAttrs().nodeType);
|
|
21570
21571
|
if (handler) {
|
|
21571
21572
|
const nodeState = handler.serialize(instance);
|
|
@@ -21574,7 +21575,6 @@ var WeaveZIndexManager = class {
|
|
|
21574
21575
|
}
|
|
21575
21576
|
moveDown(instance) {
|
|
21576
21577
|
this.logger.debug(`Moving instance with id [${instance.getAttrs().id}], down one step of z-index`);
|
|
21577
|
-
instance.moveDown();
|
|
21578
21578
|
const handler = this.instance.getNodeHandler(instance.getAttrs().nodeType);
|
|
21579
21579
|
if (handler) {
|
|
21580
21580
|
const nodeState = handler.serialize(instance);
|
|
@@ -21585,7 +21585,6 @@ var WeaveZIndexManager = class {
|
|
|
21585
21585
|
const nodes = Array.isArray(instances) ? instances : [instances];
|
|
21586
21586
|
const nodesDescending = nodes.toSorted((a, b) => b.zIndex() - a.zIndex());
|
|
21587
21587
|
for (const node of nodesDescending) {
|
|
21588
|
-
node.moveToBottom();
|
|
21589
21588
|
const handler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
21590
21589
|
if (handler) {
|
|
21591
21590
|
const nodeState = handler.serialize(node);
|
|
@@ -21597,7 +21596,6 @@ var WeaveZIndexManager = class {
|
|
|
21597
21596
|
const nodes = Array.isArray(instances) ? instances : [instances];
|
|
21598
21597
|
const nodesAscending = nodes.toSorted((a, b) => a.zIndex() - b.zIndex());
|
|
21599
21598
|
for (const node of nodesAscending) {
|
|
21600
|
-
node.moveToTop();
|
|
21601
21599
|
const handler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
21602
21600
|
if (handler) {
|
|
21603
21601
|
const nodeState = handler.serialize(node);
|
|
@@ -21924,7 +21922,7 @@ var WeaveRegisterManager = class {
|
|
|
21924
21922
|
|
|
21925
21923
|
//#endregion
|
|
21926
21924
|
//#region package.json
|
|
21927
|
-
var version = "0.
|
|
21925
|
+
var version = "0.56.1";
|
|
21928
21926
|
|
|
21929
21927
|
//#endregion
|
|
21930
21928
|
//#region src/managers/setup.ts
|
|
@@ -22152,6 +22150,23 @@ var WeaveExportManager = class {
|
|
|
22152
22150
|
this.logger = this.instance.getChildLogger("export-manager");
|
|
22153
22151
|
this.logger.debug("Export manager created");
|
|
22154
22152
|
}
|
|
22153
|
+
fitKonvaPixelRatio(sw, sh, targetPR = 1, maxArea = 16777216) {
|
|
22154
|
+
if (sw <= 0 || sh <= 0) return {
|
|
22155
|
+
pixelRatio: 0,
|
|
22156
|
+
outW: 0,
|
|
22157
|
+
outH: 0
|
|
22158
|
+
};
|
|
22159
|
+
const desiredArea = sw * sh * targetPR * targetPR;
|
|
22160
|
+
let pr = targetPR;
|
|
22161
|
+
if (desiredArea > maxArea) pr = Math.sqrt(maxArea / (sw * sh));
|
|
22162
|
+
const outW = Math.max(1, Math.floor(sw * pr));
|
|
22163
|
+
const outH = Math.max(1, Math.floor(sh * pr));
|
|
22164
|
+
return {
|
|
22165
|
+
pixelRatio: pr,
|
|
22166
|
+
outW,
|
|
22167
|
+
outH
|
|
22168
|
+
};
|
|
22169
|
+
}
|
|
22155
22170
|
exportNodes(nodes, boundingNodes, options) {
|
|
22156
22171
|
return new Promise((resolve) => {
|
|
22157
22172
|
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 +22220,14 @@ var WeaveExportManager = class {
|
|
|
22205
22220
|
mainLayer.add(exportGroup);
|
|
22206
22221
|
const backgroundRect = background.getClientRect();
|
|
22207
22222
|
stage.batchDraw();
|
|
22223
|
+
const { pixelRatio: finalPixelRatio } = this.fitKonvaPixelRatio(Math.round(backgroundRect.width), Math.round(backgroundRect.height), pixelRatio);
|
|
22208
22224
|
exportGroup.toImage({
|
|
22209
22225
|
x: Math.round(backgroundRect.x),
|
|
22210
22226
|
y: Math.round(backgroundRect.y),
|
|
22211
22227
|
width: Math.round(backgroundRect.width),
|
|
22212
22228
|
height: Math.round(backgroundRect.height),
|
|
22213
22229
|
mimeType: format$2,
|
|
22214
|
-
pixelRatio,
|
|
22230
|
+
pixelRatio: finalPixelRatio,
|
|
22215
22231
|
quality: options.quality ?? 1,
|
|
22216
22232
|
callback: (img) => {
|
|
22217
22233
|
exportGroup.destroy();
|
|
@@ -25069,6 +25085,11 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
25069
25085
|
//#endregion
|
|
25070
25086
|
//#region src/nodes/stroke/constants.ts
|
|
25071
25087
|
const WEAVE_STROKE_NODE_TYPE = "stroke";
|
|
25088
|
+
const WEAVE_STROKE_NODE_DEFAULT_CONFIG = {
|
|
25089
|
+
smoothingFactor: .1,
|
|
25090
|
+
resamplingSpacing: 2,
|
|
25091
|
+
pressureScale: 1
|
|
25092
|
+
};
|
|
25072
25093
|
|
|
25073
25094
|
//#endregion
|
|
25074
25095
|
//#region src/nodes/stroke/stroke.ts
|
|
@@ -25077,45 +25098,145 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
25077
25098
|
constructor(params) {
|
|
25078
25099
|
super();
|
|
25079
25100
|
const { config } = params ?? {};
|
|
25080
|
-
this.config =
|
|
25101
|
+
this.config = (0, import_merge.default)(WEAVE_STROKE_NODE_DEFAULT_CONFIG, config);
|
|
25102
|
+
}
|
|
25103
|
+
resamplePoints(pts, spacing) {
|
|
25104
|
+
if (pts.length < 2) return pts;
|
|
25105
|
+
const resampled = [pts[0]];
|
|
25106
|
+
for (let i = 1; i < pts.length; i++) {
|
|
25107
|
+
let last = resampled[resampled.length - 1];
|
|
25108
|
+
const current = pts[i];
|
|
25109
|
+
const segDist = this.dist(last, current);
|
|
25110
|
+
if (segDist === 0) continue;
|
|
25111
|
+
let remaining = segDist;
|
|
25112
|
+
while (remaining >= spacing) {
|
|
25113
|
+
const t = spacing / segDist;
|
|
25114
|
+
const newPt = this.lerpPoint(last, current, t);
|
|
25115
|
+
resampled.push(newPt);
|
|
25116
|
+
last = newPt;
|
|
25117
|
+
remaining = this.dist(last, current);
|
|
25118
|
+
}
|
|
25119
|
+
}
|
|
25120
|
+
return resampled;
|
|
25121
|
+
}
|
|
25122
|
+
dist(a, b) {
|
|
25123
|
+
const dx = b.x - a.x, dy = b.y - a.y;
|
|
25124
|
+
return Math.hypot(dx, dy);
|
|
25081
25125
|
}
|
|
25082
|
-
|
|
25083
|
-
|
|
25084
|
-
|
|
25085
|
-
|
|
25086
|
-
|
|
25087
|
-
|
|
25088
|
-
|
|
25089
|
-
|
|
25090
|
-
|
|
25091
|
-
|
|
25092
|
-
|
|
25093
|
-
|
|
25094
|
-
const
|
|
25095
|
-
|
|
25096
|
-
|
|
25126
|
+
lerpPoint(a, b, t) {
|
|
25127
|
+
return {
|
|
25128
|
+
x: a.x + (b.x - a.x) * t,
|
|
25129
|
+
y: a.y + (b.y - a.y) * t,
|
|
25130
|
+
pressure: a.pressure + (b.pressure - a.pressure) * t
|
|
25131
|
+
};
|
|
25132
|
+
}
|
|
25133
|
+
buildPolygonFromPressure(pts, baseWidth) {
|
|
25134
|
+
if (pts.length < 2) return [];
|
|
25135
|
+
const left = [];
|
|
25136
|
+
const right = [];
|
|
25137
|
+
for (let i = 0; i < pts.length; i++) {
|
|
25138
|
+
const p = pts[i];
|
|
25139
|
+
const w = (baseWidth + p.pressure * this.config.pressureScale) / 2;
|
|
25140
|
+
let dx, dy;
|
|
25141
|
+
if (i === 0) {
|
|
25142
|
+
dx = pts[1].x - p.x;
|
|
25143
|
+
dy = pts[1].y - p.y;
|
|
25144
|
+
} else if (i === pts.length - 1) {
|
|
25145
|
+
dx = p.x - pts[i - 1].x;
|
|
25146
|
+
dy = p.y - pts[i - 1].y;
|
|
25147
|
+
} else {
|
|
25148
|
+
dx = pts[i + 1].x - pts[i - 1].x;
|
|
25149
|
+
dy = pts[i + 1].y - pts[i - 1].y;
|
|
25150
|
+
}
|
|
25151
|
+
const len = Math.hypot(dx, dy) || 1;
|
|
25152
|
+
const nx = -dy / len;
|
|
25153
|
+
const ny = dx / len;
|
|
25154
|
+
left.push({
|
|
25155
|
+
x: p.x + nx * w,
|
|
25156
|
+
y: p.y + ny * w
|
|
25157
|
+
});
|
|
25158
|
+
right.push({
|
|
25159
|
+
x: p.x - nx * w,
|
|
25160
|
+
y: p.y - ny * w
|
|
25161
|
+
});
|
|
25162
|
+
}
|
|
25163
|
+
const reversed = right.toReversed();
|
|
25164
|
+
return left.concat(reversed);
|
|
25165
|
+
}
|
|
25166
|
+
dashSegments(pts, pattern) {
|
|
25167
|
+
const segments = [];
|
|
25168
|
+
let patIndex = 0;
|
|
25169
|
+
let patDist = pattern[patIndex];
|
|
25170
|
+
let draw = true;
|
|
25171
|
+
let segPts = [pts[0]];
|
|
25172
|
+
for (let i = 1; i < pts.length; i++) {
|
|
25173
|
+
let d = this.dist(pts[i - 1], pts[i]);
|
|
25174
|
+
while (d >= patDist) {
|
|
25175
|
+
const t = patDist / d;
|
|
25176
|
+
const mid = this.lerpPoint(pts[i - 1], pts[i], t);
|
|
25177
|
+
segPts.push(mid);
|
|
25178
|
+
if (draw) segments.push(segPts);
|
|
25179
|
+
draw = !draw;
|
|
25180
|
+
patIndex = (patIndex + 1) % pattern.length;
|
|
25181
|
+
patDist = pattern[patIndex];
|
|
25182
|
+
segPts = [mid];
|
|
25183
|
+
d -= patDist;
|
|
25184
|
+
pts[i - 1] = mid;
|
|
25185
|
+
}
|
|
25186
|
+
segPts.push(pts[i]);
|
|
25187
|
+
patDist -= d;
|
|
25188
|
+
}
|
|
25189
|
+
if (draw && segPts.length > 1) segments.push(segPts);
|
|
25190
|
+
return segments;
|
|
25191
|
+
}
|
|
25192
|
+
catmullRomSpline(pts, spacing) {
|
|
25193
|
+
const curvePoints = [];
|
|
25194
|
+
for (let i = 0; i < pts.length - 1; i++) {
|
|
25195
|
+
const p0 = pts[i - 1] || pts[i];
|
|
25196
|
+
const p1 = pts[i];
|
|
25197
|
+
const p2 = pts[i + 1];
|
|
25198
|
+
const p3 = pts[i + 2] || p2;
|
|
25199
|
+
for (let t = 0; t < 1; t += spacing) {
|
|
25200
|
+
const t2 = t * t;
|
|
25201
|
+
const t3 = t2 * t;
|
|
25202
|
+
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);
|
|
25203
|
+
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);
|
|
25204
|
+
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);
|
|
25205
|
+
curvePoints.push({
|
|
25206
|
+
x,
|
|
25207
|
+
y,
|
|
25208
|
+
pressure
|
|
25209
|
+
});
|
|
25210
|
+
}
|
|
25097
25211
|
}
|
|
25212
|
+
return curvePoints;
|
|
25098
25213
|
}
|
|
25099
25214
|
onRender(props) {
|
|
25100
25215
|
const stroke = new konva.default.Shape({
|
|
25101
25216
|
...props,
|
|
25102
25217
|
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";
|
|
25218
|
+
sceneFunc: (ctx, shape) => {
|
|
25109
25219
|
const strokeElements = shape.getAttrs().strokeElements;
|
|
25110
25220
|
if (strokeElements.length === 0) return;
|
|
25111
|
-
|
|
25112
|
-
|
|
25113
|
-
const
|
|
25114
|
-
strokeElements.
|
|
25115
|
-
|
|
25116
|
-
|
|
25221
|
+
if (strokeElements.length < 2) return;
|
|
25222
|
+
const color = shape.getAttrs().stroke ?? "black";
|
|
25223
|
+
const strokeWidth = shape.getAttrs().strokeWidth ?? 1;
|
|
25224
|
+
const smoothPoints = this.catmullRomSpline(strokeElements, this.config.smoothingFactor);
|
|
25225
|
+
const evenlySpaced = this.resamplePoints(smoothPoints, this.config.resamplingSpacing);
|
|
25226
|
+
const dashes = this.dashSegments(evenlySpaced, shape.getAttrs().dash || []);
|
|
25227
|
+
dashes.forEach((segment) => {
|
|
25228
|
+
const poly = this.buildPolygonFromPressure(segment, strokeWidth);
|
|
25229
|
+
if (!poly.length) return;
|
|
25230
|
+
ctx.beginPath();
|
|
25231
|
+
ctx.moveTo(poly[0].x, poly[0].y);
|
|
25232
|
+
for (let i = 1; i < poly.length; i++) ctx.lineTo(poly[i].x, poly[i].y);
|
|
25233
|
+
ctx.strokeStyle = color;
|
|
25234
|
+
ctx.lineCap = shape.getAttrs().lineCap ?? "butt";
|
|
25235
|
+
ctx.lineJoin = shape.getAttrs().lineJoin ?? "miter";
|
|
25236
|
+
ctx.closePath();
|
|
25237
|
+
ctx.fillStyle = color;
|
|
25238
|
+
ctx.fill();
|
|
25117
25239
|
});
|
|
25118
|
-
context.strokeShape(shape);
|
|
25119
25240
|
},
|
|
25120
25241
|
dashEnabled: false,
|
|
25121
25242
|
hitFunc: (context, shape) => {
|
|
@@ -26646,15 +26767,18 @@ const BRUSH_TOOL_STATE = {
|
|
|
26646
26767
|
["IDLE"]: "idle",
|
|
26647
26768
|
["DEFINE_STROKE"]: "defineStroke"
|
|
26648
26769
|
};
|
|
26770
|
+
const BRUSH_TOOL_DEFAULT_CONFIG = { interpolationSteps: 10 };
|
|
26649
26771
|
|
|
26650
26772
|
//#endregion
|
|
26651
26773
|
//#region src/actions/brush-tool/brush-tool.ts
|
|
26652
26774
|
var WeaveBrushToolAction = class extends WeaveAction {
|
|
26653
26775
|
initialized = false;
|
|
26776
|
+
rawPoints = [];
|
|
26654
26777
|
onPropsChange = void 0;
|
|
26655
26778
|
onInit = void 0;
|
|
26656
|
-
constructor() {
|
|
26779
|
+
constructor(params) {
|
|
26657
26780
|
super();
|
|
26781
|
+
this.config = (0, import_merge.default)(BRUSH_TOOL_DEFAULT_CONFIG, params?.config ?? {});
|
|
26658
26782
|
this.initialized = false;
|
|
26659
26783
|
this.state = BRUSH_TOOL_STATE.INACTIVE;
|
|
26660
26784
|
this.strokeId = null;
|
|
@@ -26699,7 +26823,8 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26699
26823
|
this.handleStartStroke(pointPressure);
|
|
26700
26824
|
e.evt.stopPropagation();
|
|
26701
26825
|
};
|
|
26702
|
-
stage.on("
|
|
26826
|
+
if (isIOS()) stage.on("touchstart", handlePointerDown);
|
|
26827
|
+
else stage.on("pointerdown", handlePointerDown);
|
|
26703
26828
|
const handlePointerMove = (e) => {
|
|
26704
26829
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
26705
26830
|
if (this.getZoomPlugin()?.isPinching()) return;
|
|
@@ -26708,14 +26833,16 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26708
26833
|
this.handleMovement(pointPressure);
|
|
26709
26834
|
e.evt.stopPropagation();
|
|
26710
26835
|
};
|
|
26711
|
-
stage.on("
|
|
26836
|
+
if (isIOS()) stage.on("touchmove", handlePointerMove);
|
|
26837
|
+
else stage.on("pointermove", handlePointerMove);
|
|
26712
26838
|
const handlePointerUp = (e) => {
|
|
26713
26839
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
26714
26840
|
if (this.getZoomPlugin()?.isPinching()) return;
|
|
26715
26841
|
this.handleEndStroke();
|
|
26716
26842
|
e.evt.stopPropagation();
|
|
26717
26843
|
};
|
|
26718
|
-
stage.on("
|
|
26844
|
+
if (isIOS()) stage.on("touchend", handlePointerUp);
|
|
26845
|
+
else stage.on("pointerup", handlePointerUp);
|
|
26719
26846
|
this.initialized = true;
|
|
26720
26847
|
}
|
|
26721
26848
|
setState(state) {
|
|
@@ -26773,17 +26900,44 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26773
26900
|
}
|
|
26774
26901
|
this.setState(BRUSH_TOOL_STATE.DEFINE_STROKE);
|
|
26775
26902
|
}
|
|
26903
|
+
catmullRom1D(p0, p1, p2, p3, t) {
|
|
26904
|
+
const t2 = t * t;
|
|
26905
|
+
const t3 = t2 * t;
|
|
26906
|
+
return .5 * (2 * p1 + (-p0 + p2) * t + (2 * p0 - 5 * p1 + 4 * p2 - p3) * t2 + (-p0 + 3 * p1 - 3 * p2 + p3) * t3);
|
|
26907
|
+
}
|
|
26908
|
+
smoothInterpolation(last4Points, steps) {
|
|
26909
|
+
const [p0, p1, p2, p3] = last4Points;
|
|
26910
|
+
const pts = [];
|
|
26911
|
+
for (let i = 0; i <= steps; i++) {
|
|
26912
|
+
const t = i / steps;
|
|
26913
|
+
pts.push({
|
|
26914
|
+
x: this.catmullRom1D(p0.x, p1.x, p2.x, p3.x, t),
|
|
26915
|
+
y: this.catmullRom1D(p0.y, p1.y, p2.y, p3.y, t),
|
|
26916
|
+
pressure: this.catmullRom1D(p0.pressure, p1.pressure, p2.pressure, p3.pressure, t)
|
|
26917
|
+
});
|
|
26918
|
+
}
|
|
26919
|
+
return pts;
|
|
26920
|
+
}
|
|
26776
26921
|
handleMovement(pressure) {
|
|
26777
26922
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
26778
26923
|
const tempStroke = this.instance.getStage().findOne(`#${this.strokeId}`);
|
|
26779
26924
|
if (this.measureContainer && tempStroke) {
|
|
26780
26925
|
const { mousePoint } = this.instance.getMousePointerRelativeToContainer(this.measureContainer);
|
|
26781
|
-
const
|
|
26782
|
-
newStrokeElements.push({
|
|
26926
|
+
const currentPoint = {
|
|
26783
26927
|
x: mousePoint.x - tempStroke.x(),
|
|
26784
26928
|
y: mousePoint.y - tempStroke.y(),
|
|
26785
26929
|
pressure
|
|
26786
|
-
}
|
|
26930
|
+
};
|
|
26931
|
+
this.rawPoints.push(currentPoint);
|
|
26932
|
+
let newStrokeElements = [...tempStroke.getAttrs().strokeElements];
|
|
26933
|
+
const smoothPoints = [];
|
|
26934
|
+
if (isIOS()) if (this.rawPoints.length >= 4) {
|
|
26935
|
+
const last4 = this.rawPoints.slice(-4);
|
|
26936
|
+
const interpolatedPts = this.smoothInterpolation(last4, this.config.interpolationSteps);
|
|
26937
|
+
smoothPoints.push(...interpolatedPts);
|
|
26938
|
+
} else smoothPoints.push(currentPoint);
|
|
26939
|
+
else smoothPoints.push(currentPoint);
|
|
26940
|
+
newStrokeElements = [...newStrokeElements, ...smoothPoints];
|
|
26787
26941
|
const box = this.getBoundingBox(newStrokeElements);
|
|
26788
26942
|
tempStroke.setAttrs({
|
|
26789
26943
|
width: box.width,
|
|
@@ -26820,6 +26974,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26820
26974
|
if (realNode) realNode.destroy();
|
|
26821
26975
|
if (tempStroke.getAttrs().strokeElements.length >= 3) this.instance.addNode(nodeHandler.serialize(tempStroke), this.container?.getAttrs().id);
|
|
26822
26976
|
}
|
|
26977
|
+
this.rawPoints = [];
|
|
26823
26978
|
this.clickPoint = null;
|
|
26824
26979
|
stage.container().style.cursor = "crosshair";
|
|
26825
26980
|
stage.container().tabIndex = 1;
|
|
@@ -26855,6 +27010,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
26855
27010
|
if (node) selectionPlugin.setSelectedNodes([node]);
|
|
26856
27011
|
this.instance.triggerAction(SELECTION_TOOL_ACTION_NAME);
|
|
26857
27012
|
}
|
|
27013
|
+
this.rawPoints = [];
|
|
26858
27014
|
this.clickPoint = null;
|
|
26859
27015
|
this.setState(BRUSH_TOOL_STATE.INACTIVE);
|
|
26860
27016
|
}
|
|
@@ -29858,6 +30014,7 @@ exports.ALIGN_NODES_TOOL_STATE = ALIGN_NODES_TOOL_STATE
|
|
|
29858
30014
|
exports.ARROW_TOOL_ACTION_NAME = ARROW_TOOL_ACTION_NAME
|
|
29859
30015
|
exports.ARROW_TOOL_STATE = ARROW_TOOL_STATE
|
|
29860
30016
|
exports.BRUSH_TOOL_ACTION_NAME = BRUSH_TOOL_ACTION_NAME
|
|
30017
|
+
exports.BRUSH_TOOL_DEFAULT_CONFIG = BRUSH_TOOL_DEFAULT_CONFIG
|
|
29861
30018
|
exports.BRUSH_TOOL_STATE = BRUSH_TOOL_STATE
|
|
29862
30019
|
exports.COPY_PASTE_NODES_PLUGIN_STATE = COPY_PASTE_NODES_PLUGIN_STATE
|
|
29863
30020
|
exports.ELLIPSE_TOOL_ACTION_NAME = ELLIPSE_TOOL_ACTION_NAME
|
|
@@ -29933,6 +30090,7 @@ exports.WEAVE_STAGE_DEFAULT_MODE = WEAVE_STAGE_DEFAULT_MODE
|
|
|
29933
30090
|
exports.WEAVE_STAGE_GRID_KEY = WEAVE_STAGE_GRID_KEY
|
|
29934
30091
|
exports.WEAVE_STAGE_NODE_TYPE = WEAVE_STAGE_NODE_TYPE
|
|
29935
30092
|
exports.WEAVE_STAR_NODE_TYPE = WEAVE_STAR_NODE_TYPE
|
|
30093
|
+
exports.WEAVE_STROKE_NODE_DEFAULT_CONFIG = WEAVE_STROKE_NODE_DEFAULT_CONFIG
|
|
29936
30094
|
exports.WEAVE_STROKE_NODE_TYPE = WEAVE_STROKE_NODE_TYPE
|
|
29937
30095
|
exports.WEAVE_TEXT_NODE_TYPE = WEAVE_TEXT_NODE_TYPE
|
|
29938
30096
|
exports.WEAVE_USERS_POINTERS_KEY = WEAVE_USERS_POINTERS_KEY
|
|
@@ -30006,6 +30164,7 @@ exports.getVisibleNodesInViewport = getVisibleNodesInViewport
|
|
|
30006
30164
|
exports.hasFrames = hasFrames
|
|
30007
30165
|
exports.hasImages = hasImages
|
|
30008
30166
|
exports.intersectArrays = intersectArrays
|
|
30167
|
+
exports.isIOS = isIOS
|
|
30009
30168
|
exports.isInShadowDOM = isInShadowDOM
|
|
30010
30169
|
exports.isNodeInSelection = isNodeInSelection
|
|
30011
30170
|
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
|