@inditextech/weave-sdk 5.4.0 → 5.5.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.js +292 -78
- package/dist/sdk.node.js +293 -79
- package/dist/sdk.node.stats.html +1 -1
- package/dist/sdk.stats.html +1 -1
- package/dist/types.d.ts +124 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +292 -78
- package/dist/types.js.map +1 -1
- package/dist/types.stats.html +1 -1
- package/package.json +5 -5
package/dist/sdk.js
CHANGED
|
@@ -9466,7 +9466,7 @@ var WeaveRegisterManager = class {
|
|
|
9466
9466
|
};
|
|
9467
9467
|
//#endregion
|
|
9468
9468
|
//#region package.json
|
|
9469
|
-
var version = "5.
|
|
9469
|
+
var version = "5.5.0";
|
|
9470
9470
|
//#endregion
|
|
9471
9471
|
//#region src/managers/setup.ts
|
|
9472
9472
|
var WeaveSetupManager = class {
|
|
@@ -18015,21 +18015,29 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
18015
18015
|
const WEAVE_STROKE_NODE_TYPE = "stroke";
|
|
18016
18016
|
const WEAVE_STROKE_NODE_DEFAULT_CONFIG = {
|
|
18017
18017
|
splineResolution: 8,
|
|
18018
|
+
splineTargetEdge: 1,
|
|
18019
|
+
splineMaxSteps: 48,
|
|
18018
18020
|
resamplingSpacing: 2,
|
|
18019
18021
|
isEraser: false
|
|
18020
18022
|
};
|
|
18021
18023
|
//#endregion
|
|
18022
18024
|
//#region src/nodes/stroke/stroke.ts
|
|
18023
|
-
var WeaveStrokeNode = class extends WeaveNode {
|
|
18025
|
+
var WeaveStrokeNode = class WeaveStrokeNode extends WeaveNode {
|
|
18024
18026
|
config;
|
|
18025
18027
|
nodeType = WEAVE_STROKE_NODE_TYPE;
|
|
18026
18028
|
initialize = void 0;
|
|
18029
|
+
/**
|
|
18030
|
+
* Below this chord deviation (in canvas units) a spline span is treated as
|
|
18031
|
+
* straight and emitted as a single edge. Subdividing a straight span costs
|
|
18032
|
+
* vertices without changing any pixel.
|
|
18033
|
+
*/
|
|
18034
|
+
static SPLINE_FLATNESS_EPSILON = .08;
|
|
18027
18035
|
constructor(params) {
|
|
18028
18036
|
super();
|
|
18029
18037
|
const { config } = params ?? {};
|
|
18030
18038
|
this.config = mergeExceptArrays(WEAVE_STROKE_NODE_DEFAULT_CONFIG, config);
|
|
18031
18039
|
}
|
|
18032
|
-
resamplePoints(pts, minDist =
|
|
18040
|
+
resamplePoints(pts, minDist = this.config.resamplingSpacing) {
|
|
18033
18041
|
if (pts.length < 2) return pts;
|
|
18034
18042
|
const result = [pts[0]];
|
|
18035
18043
|
let last = pts[0];
|
|
@@ -18043,29 +18051,73 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
18043
18051
|
}
|
|
18044
18052
|
return result;
|
|
18045
18053
|
}
|
|
18046
|
-
|
|
18054
|
+
/** Perpendicular distance from `p` to the segment `a`-`b`. */
|
|
18055
|
+
distanceToSegment(p, a, b) {
|
|
18056
|
+
const dx = b.x - a.x;
|
|
18057
|
+
const dy = b.y - a.y;
|
|
18058
|
+
const lengthSq = dx * dx + dy * dy;
|
|
18059
|
+
let t = lengthSq ? ((p.x - a.x) * dx + (p.y - a.y) * dy) / lengthSq : 0;
|
|
18060
|
+
t = Math.max(0, Math.min(1, t));
|
|
18061
|
+
return Math.hypot(p.x - (a.x + dx * t), p.y - (a.y + dy * t));
|
|
18062
|
+
}
|
|
18063
|
+
/**
|
|
18064
|
+
* Evaluates the uniform Catmull-Rom basis for one 4-point window at `t`.
|
|
18065
|
+
*/
|
|
18066
|
+
catmullRomAt(p0, p1, p2, p3, t) {
|
|
18067
|
+
const tt = t * t;
|
|
18068
|
+
const ttt = tt * t;
|
|
18069
|
+
const q1 = -ttt + 2 * tt - t;
|
|
18070
|
+
const q2 = 3 * ttt - 5 * tt + 2;
|
|
18071
|
+
const q3 = -3 * ttt + 4 * tt + t;
|
|
18072
|
+
const q4 = ttt - tt;
|
|
18073
|
+
return {
|
|
18074
|
+
x: (q1 * p0.x + q2 * p1.x + q3 * p2.x + q4 * p3.x) / 2,
|
|
18075
|
+
y: (q1 * p0.y + q2 * p1.y + q3 * p2.y + q4 * p3.y) / 2,
|
|
18076
|
+
pressure: (q1 * p0.pressure + q2 * p1.pressure + q3 * p2.pressure + q4 * p3.pressure) / 2
|
|
18077
|
+
};
|
|
18078
|
+
}
|
|
18079
|
+
/**
|
|
18080
|
+
* Samples a Catmull-Rom spline through `pts`, subdividing each span by its
|
|
18081
|
+
* ARC LENGTH rather than by a fixed step count.
|
|
18082
|
+
*
|
|
18083
|
+
* A fixed count is the reason a finished stroke looks faceted while the
|
|
18084
|
+
* one being drawn looks smooth: both render with the same number of
|
|
18085
|
+
* subdivisions per span, but a live stroke's control points sit ~1-2px
|
|
18086
|
+
* apart while a finalized stroke's - after Douglas-Peucker simplification
|
|
18087
|
+
* - sit a median 9-28px apart. The same 8 subdivisions therefore produce
|
|
18088
|
+
* sub-pixel edges live and edges up to ~15px long once finalized, with
|
|
18089
|
+
* visible turns between them.
|
|
18090
|
+
*
|
|
18091
|
+
* `resolution` is now the MINIMUM number of subdivisions for a curved
|
|
18092
|
+
* span (so dense, live-drawn spans behave exactly as before); long spans
|
|
18093
|
+
* get proportionally more, capped so pathological input cannot explode
|
|
18094
|
+
* the vertex count. Spans whose midpoint deviates from their chord by
|
|
18095
|
+
* less than `SPLINE_FLATNESS_EPSILON` are effectively straight and are
|
|
18096
|
+
* emitted as a single edge - subdividing a straight line adds vertices
|
|
18097
|
+
* without changing a pixel.
|
|
18098
|
+
*/
|
|
18099
|
+
getSplinePoints(pts, resolution = this.config.splineResolution) {
|
|
18100
|
+
if (pts.length < 2) return [...pts];
|
|
18101
|
+
const targetEdge = this.config.splineTargetEdge;
|
|
18102
|
+
const maxSteps = this.config.splineMaxSteps;
|
|
18047
18103
|
const result = [];
|
|
18048
18104
|
for (let i = -1; i < pts.length - 2; i++) {
|
|
18049
18105
|
const p0 = pts[Math.max(i, 0)];
|
|
18050
18106
|
const p1 = pts[i + 1];
|
|
18051
18107
|
const p2 = pts[i + 2];
|
|
18052
18108
|
const p3 = pts[Math.min(i + 3, pts.length - 1)];
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
|
|
18057
|
-
|
|
18058
|
-
|
|
18059
|
-
|
|
18060
|
-
const
|
|
18061
|
-
|
|
18062
|
-
|
|
18063
|
-
|
|
18064
|
-
|
|
18065
|
-
y,
|
|
18066
|
-
pressure
|
|
18067
|
-
});
|
|
18068
|
-
}
|
|
18109
|
+
const chord = Math.hypot(p2.x - p1.x, p2.y - p1.y);
|
|
18110
|
+
let deviation = 0;
|
|
18111
|
+
for (const probe of [
|
|
18112
|
+
.25,
|
|
18113
|
+
.5,
|
|
18114
|
+
.75
|
|
18115
|
+
]) {
|
|
18116
|
+
const at = this.catmullRomAt(p0, p1, p2, p3, probe);
|
|
18117
|
+
deviation = Math.max(deviation, this.distanceToSegment(at, p1, p2));
|
|
18118
|
+
}
|
|
18119
|
+
const steps = deviation < WeaveStrokeNode.SPLINE_FLATNESS_EPSILON ? 1 : Math.min(Math.max(Math.ceil(chord / targetEdge), resolution), maxSteps);
|
|
18120
|
+
for (let s = 0; s < steps; s++) result.push(this.catmullRomAt(p0, p1, p2, p3, s / steps));
|
|
18069
18121
|
}
|
|
18070
18122
|
result.push(pts[pts.length - 1]);
|
|
18071
18123
|
return result;
|
|
@@ -18083,19 +18135,26 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
18083
18135
|
* Draws a filled polygon from the accumulated left/right outline points of a
|
|
18084
18136
|
* dash segment and adds round caps at both ends.
|
|
18085
18137
|
* NOTE: mutates `rightSide` via Array.reverse() — callers must not reuse it after this call.
|
|
18138
|
+
*
|
|
18139
|
+
* The outline is NOT re-smoothed here. It used to be, back when the
|
|
18140
|
+
* centerline was sampled at a fixed subdivision count and could be coarse;
|
|
18141
|
+
* now that the centerline is subdivided by arc length, its offset curves
|
|
18142
|
+
* are already smooth, and measurement showed the extra spline pass cost
|
|
18143
|
+
* roughly half of the node's total render time while changing the drawn
|
|
18144
|
+
* result by well under a pixel (95th-percentile outline edge 1.72px vs
|
|
18145
|
+
* 1.76px; byte-identical on long, gently-curved strokes).
|
|
18086
18146
|
*/
|
|
18087
18147
|
drawDashPolygon(ctx, leftSide, rightSide, color) {
|
|
18088
18148
|
const capStartL = leftSide[0];
|
|
18089
18149
|
const capStartR = rightSide[0];
|
|
18090
18150
|
const capEndL = leftSide.at(-1);
|
|
18091
18151
|
const capEndR = rightSide.at(-1);
|
|
18092
|
-
const
|
|
18093
|
-
const smoothRight = this.getSplinePoints(rightSide.reverse(), 4);
|
|
18152
|
+
const outlineRight = rightSide.reverse();
|
|
18094
18153
|
ctx.beginPath();
|
|
18095
18154
|
ctx.fillStyle = color;
|
|
18096
|
-
ctx.moveTo(
|
|
18097
|
-
for (const p of
|
|
18098
|
-
for (const p of
|
|
18155
|
+
ctx.moveTo(leftSide[0].x, leftSide[0].y);
|
|
18156
|
+
for (const p of leftSide) ctx.lineTo(p.x, p.y);
|
|
18157
|
+
for (const p of outlineRight) ctx.lineTo(p.x, p.y);
|
|
18099
18158
|
ctx.closePath();
|
|
18100
18159
|
ctx.fill();
|
|
18101
18160
|
this.drawRoundCap(ctx, capStartL, capStartR, color);
|
|
@@ -18112,13 +18171,23 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
18112
18171
|
ctx.fill();
|
|
18113
18172
|
return;
|
|
18114
18173
|
}
|
|
18115
|
-
const filtered = this.resamplePoints(pts,
|
|
18116
|
-
const centerline = this.getSplinePoints(filtered,
|
|
18174
|
+
const filtered = this.resamplePoints(pts, this.config.resamplingSpacing);
|
|
18175
|
+
const centerline = this.getSplinePoints(filtered, this.config.splineResolution);
|
|
18117
18176
|
let dashIndex = 0;
|
|
18118
18177
|
let dashOn = true;
|
|
18119
18178
|
let dashRemaining = dash.length ? dash[0] : Infinity;
|
|
18120
18179
|
let leftSide = [];
|
|
18121
18180
|
let rightSide = [];
|
|
18181
|
+
let pendingEndLeft = null;
|
|
18182
|
+
let pendingEndRight = null;
|
|
18183
|
+
const flushRun = () => {
|
|
18184
|
+
if (!dashOn || !leftSide.length || !rightSide.length) return;
|
|
18185
|
+
if (pendingEndLeft && pendingEndRight) {
|
|
18186
|
+
leftSide.push(pendingEndLeft);
|
|
18187
|
+
rightSide.push(pendingEndRight);
|
|
18188
|
+
}
|
|
18189
|
+
this.drawDashPolygon(ctx, leftSide, rightSide, color);
|
|
18190
|
+
};
|
|
18122
18191
|
for (let i = 0; i < centerline.length - 1; i++) {
|
|
18123
18192
|
const p0 = centerline[i];
|
|
18124
18193
|
const p1 = centerline[i + 1];
|
|
@@ -18151,22 +18220,24 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
18151
18220
|
y: y0 - ny * pw0,
|
|
18152
18221
|
pressure: 1
|
|
18153
18222
|
});
|
|
18154
|
-
|
|
18223
|
+
pendingEndLeft = {
|
|
18155
18224
|
x: x1 + nx * pw1,
|
|
18156
18225
|
y: y1 + ny * pw1,
|
|
18157
18226
|
pressure: 1
|
|
18158
|
-
}
|
|
18159
|
-
|
|
18227
|
+
};
|
|
18228
|
+
pendingEndRight = {
|
|
18160
18229
|
x: x1 - nx * pw1,
|
|
18161
18230
|
y: y1 - ny * pw1,
|
|
18162
18231
|
pressure: 1
|
|
18163
|
-
}
|
|
18232
|
+
};
|
|
18164
18233
|
}
|
|
18165
18234
|
dashRemaining -= step;
|
|
18166
18235
|
if (dashRemaining <= 0) {
|
|
18167
|
-
|
|
18236
|
+
flushRun();
|
|
18168
18237
|
leftSide = [];
|
|
18169
18238
|
rightSide = [];
|
|
18239
|
+
pendingEndLeft = null;
|
|
18240
|
+
pendingEndRight = null;
|
|
18170
18241
|
dashOn = !dashOn;
|
|
18171
18242
|
dashIndex = (dashIndex + 1) % dash.length;
|
|
18172
18243
|
dashRemaining = dash[dashIndex];
|
|
@@ -18174,7 +18245,7 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
18174
18245
|
traveled += step;
|
|
18175
18246
|
}
|
|
18176
18247
|
}
|
|
18177
|
-
|
|
18248
|
+
flushRun();
|
|
18178
18249
|
}
|
|
18179
18250
|
drawShape(ctx, shape) {
|
|
18180
18251
|
const strokeElements = shape.getAttrs().strokeElements;
|
|
@@ -24178,7 +24249,22 @@ const BRUSH_TOOL_STATE = {
|
|
|
24178
24249
|
["IDLE"]: "idle",
|
|
24179
24250
|
["DEFINE_STROKE"]: "defineStroke"
|
|
24180
24251
|
};
|
|
24181
|
-
|
|
24252
|
+
/**
|
|
24253
|
+
* Suffix applied to a finished stroke's preview node while it is briefly
|
|
24254
|
+
* kept on screen alongside the persisted node, so the two cannot collide on
|
|
24255
|
+
* the same id.
|
|
24256
|
+
*/
|
|
24257
|
+
const PREVIEW_ID_SUFFIX = "--preview";
|
|
24258
|
+
/**
|
|
24259
|
+
* How many frames the preview of a finished stroke may wait for its
|
|
24260
|
+
* persisted counterpart to be rendered before it is removed regardless.
|
|
24261
|
+
* Bounds the handover so a preview can never be orphaned on screen.
|
|
24262
|
+
*/
|
|
24263
|
+
const PREVIEW_HANDOVER_MAX_FRAMES = 30;
|
|
24264
|
+
const BRUSH_TOOL_DEFAULT_CONFIG = {
|
|
24265
|
+
interpolationSteps: 10,
|
|
24266
|
+
simplifyTolerance: .5
|
|
24267
|
+
};
|
|
24182
24268
|
//#endregion
|
|
24183
24269
|
//#region src/actions/brush-tool/brush-tool.ts
|
|
24184
24270
|
var WeaveBrushToolAction = class extends WeaveAction {
|
|
@@ -24195,6 +24281,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
24195
24281
|
prevTouchAction;
|
|
24196
24282
|
penActive = false;
|
|
24197
24283
|
lastSmoothedPressure = .5;
|
|
24284
|
+
hasPressureSample = false;
|
|
24198
24285
|
lastPointerPos = null;
|
|
24199
24286
|
lastPointerTime = 0;
|
|
24200
24287
|
predictedCount = 0;
|
|
@@ -24226,26 +24313,84 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
24226
24313
|
opacity: 1
|
|
24227
24314
|
};
|
|
24228
24315
|
}
|
|
24229
|
-
|
|
24316
|
+
/**
|
|
24317
|
+
* Velocity-adaptive exponential smoothing of a single raw pressure sample.
|
|
24318
|
+
*
|
|
24319
|
+
* This is the one place pressure smoothing happens. Every sample that
|
|
24320
|
+
* becomes a stroke point must go through it - including the
|
|
24321
|
+
* high-frequency coalesced samples a stylus reports (see
|
|
24322
|
+
* `handlePointerMove`), which previously bypassed it entirely and so
|
|
24323
|
+
* landed in the stroke with their raw value, no pressure floor, and
|
|
24324
|
+
* without advancing the smoothing state for later samples.
|
|
24325
|
+
*
|
|
24326
|
+
* Timing intentionally uses `performance.now()` (not the event's own
|
|
24327
|
+
* `timeStamp`), matching the original behaviour: the two are not
|
|
24328
|
+
* guaranteed to share a time origin, and mixing them corrupts the
|
|
24329
|
+
* velocity term that drives `alpha`.
|
|
24330
|
+
*
|
|
24331
|
+
* The first sample of a stroke SEEDS the filter with its own value
|
|
24332
|
+
* rather than being blended toward the neutral 0.5 baseline. Blending
|
|
24333
|
+
* from a constant gives every stroke a warm-up transient: the filter
|
|
24334
|
+
* starts at 0.5 and converges toward the pressure actually being
|
|
24335
|
+
* applied, so a stroke drawn lighter than 0.5 renders visibly fatter at
|
|
24336
|
+
* its start (and heavier than 0.5, thinner) until the filter catches
|
|
24337
|
+
* up. Seeding removes that transient entirely - smoothing then only
|
|
24338
|
+
* ever acts between real samples, which is its actual purpose.
|
|
24339
|
+
*/
|
|
24340
|
+
smoothPressureSample(raw, clientX, clientY) {
|
|
24230
24341
|
const now = performance.now();
|
|
24231
24342
|
let velocity = 0;
|
|
24232
|
-
|
|
24233
|
-
|
|
24234
|
-
const
|
|
24343
|
+
const hasPosition = Number.isFinite(clientX) && Number.isFinite(clientY);
|
|
24344
|
+
if (hasPosition && this.lastPointerPos && now - this.lastPointerTime > 0) {
|
|
24345
|
+
const dx = clientX - this.lastPointerPos.x;
|
|
24346
|
+
const dy = clientY - this.lastPointerPos.y;
|
|
24235
24347
|
velocity = Math.hypot(dx, dy) / (now - this.lastPointerTime) * 1e3;
|
|
24236
24348
|
}
|
|
24237
|
-
this.lastPointerPos = {
|
|
24238
|
-
x:
|
|
24239
|
-
y:
|
|
24349
|
+
if (hasPosition) this.lastPointerPos = {
|
|
24350
|
+
x: clientX,
|
|
24351
|
+
y: clientY
|
|
24240
24352
|
};
|
|
24241
24353
|
this.lastPointerTime = now;
|
|
24354
|
+
const safeRaw = Number.isFinite(raw) ? raw : .5;
|
|
24355
|
+
if (!this.hasPressureSample) {
|
|
24356
|
+
this.hasPressureSample = true;
|
|
24357
|
+
this.lastSmoothedPressure = safeRaw;
|
|
24358
|
+
return Math.max(this.lastSmoothedPressure, .15);
|
|
24359
|
+
}
|
|
24242
24360
|
const alpha = Math.min(Math.max(velocity / 1500, .15), .6);
|
|
24243
|
-
|
|
24244
|
-
|
|
24245
|
-
else raw = .5;
|
|
24246
|
-
this.lastSmoothedPressure = alpha * raw + (1 - alpha) * this.lastSmoothedPressure;
|
|
24361
|
+
const smoothed = alpha * safeRaw + (1 - alpha) * this.lastSmoothedPressure;
|
|
24362
|
+
this.lastSmoothedPressure = Number.isFinite(smoothed) ? smoothed : safeRaw;
|
|
24247
24363
|
return Math.max(this.lastSmoothedPressure, .15);
|
|
24248
24364
|
}
|
|
24365
|
+
/**
|
|
24366
|
+
* Raw pressure a pointer sample reports: the device's own reading for a
|
|
24367
|
+
* pen, a neutral constant for devices that do not sense pressure.
|
|
24368
|
+
*/
|
|
24369
|
+
getRawPressure(pointerType, pressure) {
|
|
24370
|
+
if (pointerType === "pen") return (typeof pressure === "number" ? pressure : 0) || .5;
|
|
24371
|
+
return .5;
|
|
24372
|
+
}
|
|
24373
|
+
getEventPressure(e) {
|
|
24374
|
+
return this.smoothPressureSample(this.getRawPressure(e.evt.pointerType, e.evt.pressure), e.evt.clientX, e.evt.clientY);
|
|
24375
|
+
}
|
|
24376
|
+
/**
|
|
24377
|
+
* Resets the pressure-smoothing state (smoothed pressure, last known pointer
|
|
24378
|
+
* position/time, and predicted-point bookkeeping) to a neutral baseline.
|
|
24379
|
+
*
|
|
24380
|
+
* This state is scoped to a single stroke: it must be reset before the
|
|
24381
|
+
* first pressure sample of a new stroke is computed (in `handlePointerDown`,
|
|
24382
|
+
* ahead of the `getEventPressure` call for point 0), not only afterwards -
|
|
24383
|
+
* otherwise that first sample can inherit smoothing state left behind by
|
|
24384
|
+
* the previous stroke (its ending pressure, pointer position and time),
|
|
24385
|
+
* inflating the very first point's pressure.
|
|
24386
|
+
*/
|
|
24387
|
+
resetPressureSmoothingState() {
|
|
24388
|
+
this.lastSmoothedPressure = .5;
|
|
24389
|
+
this.hasPressureSample = false;
|
|
24390
|
+
this.lastPointerPos = null;
|
|
24391
|
+
this.lastPointerTime = 0;
|
|
24392
|
+
this.predictedCount = 0;
|
|
24393
|
+
}
|
|
24249
24394
|
setupEvents() {
|
|
24250
24395
|
const stage = this.instance.getStage();
|
|
24251
24396
|
this.prevTouchAction = stage.container().style.touchAction;
|
|
@@ -24277,6 +24422,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
24277
24422
|
if (e?.evt?.button !== 0) return;
|
|
24278
24423
|
if (e.evt.pointerType === "touch" && this.penActive) return;
|
|
24279
24424
|
if (e.evt.pointerType === "pen") this.penActive = true;
|
|
24425
|
+
this.resetPressureSmoothingState();
|
|
24280
24426
|
const pointPressure = this.getEventPressure(e);
|
|
24281
24427
|
this.handleStartStroke(pointPressure);
|
|
24282
24428
|
e.evt.stopPropagation();
|
|
@@ -24289,16 +24435,21 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
24289
24435
|
if (this.getZoomPlugin()?.isPinching()) return;
|
|
24290
24436
|
const coalescedEvents = e.evt.getCoalescedEvents ? e.evt.getCoalescedEvents() : [];
|
|
24291
24437
|
if (coalescedEvents.length > 1) {
|
|
24292
|
-
|
|
24293
|
-
|
|
24294
|
-
|
|
24295
|
-
}
|
|
24438
|
+
const samples = coalescedEvents.map((ce) => ({
|
|
24439
|
+
pressure: this.smoothPressureSample(this.getRawPressure(ce.pointerType, ce.pressure), ce.clientX, ce.clientY),
|
|
24440
|
+
isPredicted: false
|
|
24441
|
+
}));
|
|
24296
24442
|
const predictedEvents = e.evt.getPredictedEvents ? e.evt.getPredictedEvents() : [];
|
|
24297
24443
|
if (predictedEvents.length > 0) {
|
|
24298
24444
|
const last = predictedEvents[predictedEvents.length - 1];
|
|
24299
|
-
const predPressure = last.pointerType
|
|
24300
|
-
|
|
24445
|
+
const predPressure = Math.max(.15 * this.getRawPressure(last.pointerType, last.pressure) + .85 * this.lastSmoothedPressure, .15);
|
|
24446
|
+
samples.push({
|
|
24447
|
+
pressure: predPressure,
|
|
24448
|
+
sourceEvent: last,
|
|
24449
|
+
isPredicted: true
|
|
24450
|
+
});
|
|
24301
24451
|
}
|
|
24452
|
+
this.applyMovementSamples(samples);
|
|
24302
24453
|
} else {
|
|
24303
24454
|
const pointPressure = this.getEventPressure(e);
|
|
24304
24455
|
this.handleMovement(pointPressure, void 0, false);
|
|
@@ -24344,10 +24495,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
24344
24495
|
};
|
|
24345
24496
|
}
|
|
24346
24497
|
handleStartStroke(pressure) {
|
|
24347
|
-
this.
|
|
24348
|
-
this.lastPointerPos = null;
|
|
24349
|
-
this.lastPointerTime = 0;
|
|
24350
|
-
this.predictedCount = 0;
|
|
24498
|
+
this.resetPressureSmoothingState();
|
|
24351
24499
|
const { mousePoint, container, measureContainer } = this.instance.getMousePointer();
|
|
24352
24500
|
this.clickPoint = mousePoint;
|
|
24353
24501
|
this.container = container;
|
|
@@ -24376,36 +24524,60 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
24376
24524
|
}
|
|
24377
24525
|
this.setState(BRUSH_TOOL_STATE.DEFINE_STROKE);
|
|
24378
24526
|
}
|
|
24379
|
-
|
|
24527
|
+
/**
|
|
24528
|
+
* Appends one or more pointer samples to the stroke in a single
|
|
24529
|
+
* read-modify-write, then renders once.
|
|
24530
|
+
*
|
|
24531
|
+
* Batching matters: a stylus reports a burst of coalesced samples per
|
|
24532
|
+
* frame, and applying them one at a time meant copying the whole point
|
|
24533
|
+
* array, recomputing the whole bounding box and issuing a full redraw
|
|
24534
|
+
* once PER SAMPLE. That is O(n) work repeated ~10x a frame, i.e.
|
|
24535
|
+
* quadratic in stroke length - which is why drawing fast could stall for
|
|
24536
|
+
* seconds. Here that O(n) work happens once per event instead.
|
|
24537
|
+
*/
|
|
24538
|
+
applyMovementSamples(samples) {
|
|
24380
24539
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
24540
|
+
if (samples.length === 0) return;
|
|
24381
24541
|
const stage = this.instance.getStage();
|
|
24382
|
-
const tempStroke =
|
|
24383
|
-
if (this.measureContainer
|
|
24384
|
-
|
|
24542
|
+
const tempStroke = stage.findOne(`#${this.strokeId}`);
|
|
24543
|
+
if (!this.measureContainer || !tempStroke) return;
|
|
24544
|
+
let newStrokeElements = [...tempStroke.getAttrs().strokeElements];
|
|
24545
|
+
for (const sample of samples) {
|
|
24546
|
+
if (sample.sourceEvent) stage.setPointersPositions(sample.sourceEvent);
|
|
24385
24547
|
const { mousePoint } = this.instance.getMousePointerRelativeToContainer(this.measureContainer);
|
|
24386
24548
|
const currentPoint = {
|
|
24387
24549
|
x: mousePoint.x - tempStroke.x(),
|
|
24388
24550
|
y: mousePoint.y - tempStroke.y(),
|
|
24389
|
-
pressure
|
|
24551
|
+
pressure: sample.pressure
|
|
24390
24552
|
};
|
|
24391
|
-
|
|
24392
|
-
if (!isPredicted && this.predictedCount > 0) {
|
|
24553
|
+
if (!sample.isPredicted && this.predictedCount > 0) {
|
|
24393
24554
|
newStrokeElements = newStrokeElements.slice(0, -1 * this.predictedCount);
|
|
24394
24555
|
this.predictedCount = 0;
|
|
24395
24556
|
}
|
|
24557
|
+
if (!sample.isPredicted && newStrokeElements.length === 1) newStrokeElements[0] = {
|
|
24558
|
+
...newStrokeElements[0],
|
|
24559
|
+
pressure: currentPoint.pressure
|
|
24560
|
+
};
|
|
24396
24561
|
newStrokeElements.push(currentPoint);
|
|
24397
|
-
if (isPredicted) this.predictedCount++;
|
|
24398
|
-
const box = this.getBoundingBox(newStrokeElements);
|
|
24399
|
-
tempStroke.setAttrs({
|
|
24400
|
-
width: box.width,
|
|
24401
|
-
height: box.height,
|
|
24402
|
-
x: 0,
|
|
24403
|
-
y: 0,
|
|
24404
|
-
strokeElements: newStrokeElements
|
|
24405
|
-
});
|
|
24406
|
-
const nodeHandler = this.instance.getNodeHandler("stroke");
|
|
24407
|
-
if (nodeHandler) nodeHandler.onUpdate(tempStroke, tempStroke.getAttrs());
|
|
24562
|
+
if (sample.isPredicted) this.predictedCount++;
|
|
24408
24563
|
}
|
|
24564
|
+
const box = this.getBoundingBox(newStrokeElements);
|
|
24565
|
+
tempStroke.setAttrs({
|
|
24566
|
+
width: box.width,
|
|
24567
|
+
height: box.height,
|
|
24568
|
+
x: 0,
|
|
24569
|
+
y: 0,
|
|
24570
|
+
strokeElements: newStrokeElements
|
|
24571
|
+
});
|
|
24572
|
+
const nodeHandler = this.instance.getNodeHandler("stroke");
|
|
24573
|
+
if (nodeHandler) nodeHandler.onUpdate(tempStroke, tempStroke.getAttrs());
|
|
24574
|
+
}
|
|
24575
|
+
handleMovement(pressure, predictedEvent, isPredicted = false) {
|
|
24576
|
+
this.applyMovementSamples([{
|
|
24577
|
+
pressure,
|
|
24578
|
+
sourceEvent: predictedEvent,
|
|
24579
|
+
isPredicted
|
|
24580
|
+
}]);
|
|
24409
24581
|
}
|
|
24410
24582
|
finalizeStroke(tempStroke, nodeHandler) {
|
|
24411
24583
|
const box = this.getBoundingBox(tempStroke.getAttrs().strokeElements);
|
|
@@ -24414,12 +24586,19 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
24414
24586
|
newStrokeElements = newStrokeElements.slice(0, -1 * this.predictedCount);
|
|
24415
24587
|
this.predictedCount = 0;
|
|
24416
24588
|
}
|
|
24589
|
+
if (newStrokeElements.length >= 2) {
|
|
24590
|
+
const lastIndex = newStrokeElements.length - 1;
|
|
24591
|
+
newStrokeElements[lastIndex] = {
|
|
24592
|
+
...newStrokeElements[lastIndex],
|
|
24593
|
+
pressure: newStrokeElements[lastIndex - 1].pressure
|
|
24594
|
+
};
|
|
24595
|
+
}
|
|
24417
24596
|
newStrokeElements = newStrokeElements.map((point) => ({
|
|
24418
24597
|
...point,
|
|
24419
24598
|
x: point.x - box.x,
|
|
24420
24599
|
y: point.y - box.y
|
|
24421
24600
|
}));
|
|
24422
|
-
const compressedPoints = simplify(newStrokeElements,
|
|
24601
|
+
const compressedPoints = simplify(newStrokeElements, this.config.simplifyTolerance, true);
|
|
24423
24602
|
const sw = tempStroke.getAttrs().strokeWidth ?? 1;
|
|
24424
24603
|
const finalWidth = Math.max(box.width, sw);
|
|
24425
24604
|
const finalHeight = Math.max(box.height, sw);
|
|
@@ -24432,9 +24611,44 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
24432
24611
|
y: finalY,
|
|
24433
24612
|
strokeElements: compressedPoints
|
|
24434
24613
|
});
|
|
24435
|
-
const
|
|
24436
|
-
|
|
24437
|
-
|
|
24614
|
+
const strokeNodeId = tempStroke.getAttrs().id ?? "";
|
|
24615
|
+
const serializedNode = nodeHandler.serialize(tempStroke);
|
|
24616
|
+
const hasPoints = tempStroke.getAttrs().strokeElements.length >= 1;
|
|
24617
|
+
const preview = this.instance.getStage().findOne(`#${strokeNodeId}`);
|
|
24618
|
+
if (!hasPoints) {
|
|
24619
|
+
preview?.destroy();
|
|
24620
|
+
return;
|
|
24621
|
+
}
|
|
24622
|
+
if (preview) preview.setAttrs({ id: `${strokeNodeId}${PREVIEW_ID_SUFFIX}` });
|
|
24623
|
+
this.instance.addNode(serializedNode, this.container?.getAttrs().id);
|
|
24624
|
+
this.removePreviewWhenRendered(preview, strokeNodeId);
|
|
24625
|
+
}
|
|
24626
|
+
/**
|
|
24627
|
+
* Destroys the finished stroke's preview node once its persisted
|
|
24628
|
+
* counterpart has actually been rendered onto the stage, so the stroke is
|
|
24629
|
+
* never absent from the canvas between the two.
|
|
24630
|
+
*
|
|
24631
|
+
* Falls back to destroying immediately where no frame scheduler exists
|
|
24632
|
+
* (non-browser hosts), and gives up waiting after a bounded number of
|
|
24633
|
+
* frames so a preview can never be orphaned if the node never arrives.
|
|
24634
|
+
*/
|
|
24635
|
+
removePreviewWhenRendered(preview, realNodeId) {
|
|
24636
|
+
if (!preview) return;
|
|
24637
|
+
const scheduleFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : void 0;
|
|
24638
|
+
if (!scheduleFrame) {
|
|
24639
|
+
preview.destroy();
|
|
24640
|
+
return;
|
|
24641
|
+
}
|
|
24642
|
+
let framesWaited = 0;
|
|
24643
|
+
const check = () => {
|
|
24644
|
+
if (this.instance.getStage().findOne(`#${realNodeId}`) || framesWaited >= 30) {
|
|
24645
|
+
preview.destroy();
|
|
24646
|
+
return;
|
|
24647
|
+
}
|
|
24648
|
+
framesWaited++;
|
|
24649
|
+
scheduleFrame(check);
|
|
24650
|
+
};
|
|
24651
|
+
check();
|
|
24438
24652
|
}
|
|
24439
24653
|
handleEndStroke() {
|
|
24440
24654
|
const tempStroke = this.instance.getStage().findOne(`#${this.strokeId}`);
|
|
@@ -33089,4 +33303,4 @@ function getJSONFromYjsBinary(actualState) {
|
|
|
33089
33303
|
return JSON.parse(actualStateString);
|
|
33090
33304
|
}
|
|
33091
33305
|
//#endregion
|
|
33092
|
-
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_DEFAULT_CONFIG, BRUSH_TOOL_STATE, CONNECTOR_TOOL_ACTION_NAME, CONNECTOR_TOOL_DEFAULT_CONFIG, CONNECTOR_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, DEFAULT_GUIDE_TOOL_ACTION_CONFIG, DEFAULT_SNAPPING_MANAGER_CONFIG, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_NAME, GUIDE_DISTANCE_ORIGIN, GUIDE_KIND, GUIDE_NAME, GUIDE_ORIENTATION, GUIDE_STATE, GUIDE_TOOL_ACTION_NAME, GUIDE_TOOL_STATE, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_TOOL_STATE, MOVE_ORIENTATION, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, POLYGON_TOOL_ACTION_NAME, POLYGON_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAGE_MINIMAP_DEFAULT_CONFIG, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, VIDEO_TOOL_ACTION_NAME, VIDEO_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_ARROW_TOOL_ACTION_NAME, WEAVE_ARROW_TOOL_STATE, WEAVE_COMMENTS_RENDERER_KEY, WEAVE_COMMENTS_TOOL_LAYER_ID, WEAVE_COMMENT_CREATE_ACTION, WEAVE_COMMENT_NODE_ACTION, WEAVE_COMMENT_NODE_DEFAULTS, WEAVE_COMMENT_NODE_TYPE, WEAVE_COMMENT_STATUS, WEAVE_COMMENT_TOOL_ACTION_NAME, WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, WEAVE_COMMENT_TOOL_STATE, WEAVE_COMMENT_VIEW_ACTION, WEAVE_CONNECTOR_NODE_ANCHOR_ORIGIN, WEAVE_CONNECTOR_NODE_DECORATOR_TYPE, WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, WEAVE_CONNECTOR_NODE_LINE_ORIGIN, WEAVE_CONNECTOR_NODE_LINE_TYPE, WEAVE_CONNECTOR_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_DEFAULT_BACKGROUND_COLOR, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_CONFIG, WEAVE_GRID_DOT_TYPES, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_PLUGIN_KEY, WEAVE_POLYGON_NODE_TYPE, WEAVE_POLYGON_PRESETS, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_SHAPE_LABEL_DEFAULTS, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_SHAPE_LABEL_EDITION_MODE, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_LINK_ALLOWED_PROTOCOLS, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveGuideToolAction, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeaveNodesSnappingPlugin, WeavePenToolAction, WeavePlugin, WeavePolygonNode, WeavePolygonToolAction, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStateManipulation, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, buildAncestorGroupIds, canComposite, clearContainerTargets, computeEllipseLabelMinSize, computePolygonLabelMinSize, computeRectangleLabelMinSize, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile, getJSONFromYjsBinary, getSelectedNodesMetadata, getShapeLabelSchemaFields, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, instantiatePreset, intersectArrays, isArray, isIOS, isInShadowDOM, isNodeInSelection, isNumber, isObject, isServer, labelId, loadImageSource, mapJsonToYjsArray, mapJsonToYjsElements, mapJsonToYjsMap, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, sleep, spreadLabelProps, weavejsToYjsBinary };
|
|
33306
|
+
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_DEFAULT_CONFIG, BRUSH_TOOL_STATE, CONNECTOR_TOOL_ACTION_NAME, CONNECTOR_TOOL_DEFAULT_CONFIG, CONNECTOR_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, DEFAULT_GUIDE_TOOL_ACTION_CONFIG, DEFAULT_SNAPPING_MANAGER_CONFIG, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_NAME, GUIDE_DISTANCE_ORIGIN, GUIDE_KIND, GUIDE_NAME, GUIDE_ORIENTATION, GUIDE_STATE, GUIDE_TOOL_ACTION_NAME, GUIDE_TOOL_STATE, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_TOOL_STATE, MOVE_ORIENTATION, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, POLYGON_TOOL_ACTION_NAME, POLYGON_TOOL_STATE, PREVIEW_HANDOVER_MAX_FRAMES, PREVIEW_ID_SUFFIX, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAGE_MINIMAP_DEFAULT_CONFIG, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, VIDEO_TOOL_ACTION_NAME, VIDEO_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_ARROW_TOOL_ACTION_NAME, WEAVE_ARROW_TOOL_STATE, WEAVE_COMMENTS_RENDERER_KEY, WEAVE_COMMENTS_TOOL_LAYER_ID, WEAVE_COMMENT_CREATE_ACTION, WEAVE_COMMENT_NODE_ACTION, WEAVE_COMMENT_NODE_DEFAULTS, WEAVE_COMMENT_NODE_TYPE, WEAVE_COMMENT_STATUS, WEAVE_COMMENT_TOOL_ACTION_NAME, WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, WEAVE_COMMENT_TOOL_STATE, WEAVE_COMMENT_VIEW_ACTION, WEAVE_CONNECTOR_NODE_ANCHOR_ORIGIN, WEAVE_CONNECTOR_NODE_DECORATOR_TYPE, WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, WEAVE_CONNECTOR_NODE_LINE_ORIGIN, WEAVE_CONNECTOR_NODE_LINE_TYPE, WEAVE_CONNECTOR_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_DEFAULT_BACKGROUND_COLOR, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_CONFIG, WEAVE_GRID_DOT_TYPES, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_PLUGIN_KEY, WEAVE_POLYGON_NODE_TYPE, WEAVE_POLYGON_PRESETS, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_SHAPE_LABEL_DEFAULTS, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_SHAPE_LABEL_EDITION_MODE, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_LINK_ALLOWED_PROTOCOLS, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveGuideToolAction, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeaveNodesSnappingPlugin, WeavePenToolAction, WeavePlugin, WeavePolygonNode, WeavePolygonToolAction, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStateManipulation, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, buildAncestorGroupIds, canComposite, clearContainerTargets, computeEllipseLabelMinSize, computePolygonLabelMinSize, computeRectangleLabelMinSize, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile, getJSONFromYjsBinary, getSelectedNodesMetadata, getShapeLabelSchemaFields, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, instantiatePreset, intersectArrays, isArray, isIOS, isInShadowDOM, isNodeInSelection, isNumber, isObject, isServer, labelId, loadImageSource, mapJsonToYjsArray, mapJsonToYjsElements, mapJsonToYjsMap, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, sleep, spreadLabelProps, weavejsToYjsBinary };
|