microboard-temp 0.13.77 → 0.13.79
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/cjs/browser.js +237 -173
- package/dist/cjs/index.js +237 -173
- package/dist/cjs/node.js +237 -173
- package/dist/cjs/protocol.js +0 -16
- package/dist/esm/browser.js +237 -173
- package/dist/esm/index.js +237 -173
- package/dist/esm/node.js +237 -173
- package/dist/esm/protocol.js +0 -16
- package/dist/types/Events/Log/EventsLog.d.ts +1 -0
- package/dist/types/Events/MessageRouter/boardMessageInterface.d.ts +1 -3
- package/dist/types/Events/MessageRouter/socketContract.d.ts +0 -13
- package/dist/types/Settings.d.ts +0 -24
- package/package.json +1 -1
- package/dist/types/Items/ItemsCommandUtils.d.ts +0 -4
package/dist/esm/node.js
CHANGED
|
@@ -3829,24 +3829,6 @@ var init_Settings = __esm(() => {
|
|
|
3829
3829
|
HIGHLIGHTER_DEFAULT_COLOR: "rgba(0, 158, 41, 0.5)",
|
|
3830
3830
|
ERASER_DEFAULT_COLOR: "rgba(222, 224, 227, 0.5)",
|
|
3831
3831
|
ERASER_MAX_LINE_LENGTH: 12,
|
|
3832
|
-
TEMPLATE_CATEGORIES: [
|
|
3833
|
-
"Research & Analysis",
|
|
3834
|
-
"Diagramming",
|
|
3835
|
-
"Meeting & Workshop",
|
|
3836
|
-
"Strategy & Planning",
|
|
3837
|
-
"Brainstorming",
|
|
3838
|
-
"Agile Workflow",
|
|
3839
|
-
"Icebreaker & Game",
|
|
3840
|
-
"Education"
|
|
3841
|
-
],
|
|
3842
|
-
TEMPLATE_LANGUAGES: [
|
|
3843
|
-
{ value: "ru", label: "Russian" },
|
|
3844
|
-
{ value: "en", label: "English" },
|
|
3845
|
-
{ value: "de", label: "German" },
|
|
3846
|
-
{ value: "es", label: "Spanish" },
|
|
3847
|
-
{ value: "fr", label: "French" },
|
|
3848
|
-
{ value: "zh", label: "Chinese" }
|
|
3849
|
-
],
|
|
3850
3832
|
CANVAS_BG_COLOR: "#f6f6f6",
|
|
3851
3833
|
URL_REGEX: /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i,
|
|
3852
3834
|
AI_NODE_DEFAULT_NODE_WIDTH: 640,
|
|
@@ -6236,6 +6218,21 @@ class EventsLog {
|
|
|
6236
6218
|
}
|
|
6237
6219
|
return records[records.length - 1].event;
|
|
6238
6220
|
}
|
|
6221
|
+
refreshUnconfirmedIdentity(sessionId, authorUserId) {
|
|
6222
|
+
const records = [
|
|
6223
|
+
...this.list.getRecordsToSend(),
|
|
6224
|
+
...this.list.getNewRecords()
|
|
6225
|
+
];
|
|
6226
|
+
for (const record of records) {
|
|
6227
|
+
record.event.body.sessionId = sessionId;
|
|
6228
|
+
record.event.body.userId = sessionId;
|
|
6229
|
+
record.event.body.authorUserId = authorUserId;
|
|
6230
|
+
}
|
|
6231
|
+
if (this.pendingEvent) {
|
|
6232
|
+
this.pendingEvent = null;
|
|
6233
|
+
this.firstSentTime = null;
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6239
6236
|
}
|
|
6240
6237
|
function createEventsLog(board, commandFactory) {
|
|
6241
6238
|
return new EventsLog(board, commandFactory);
|
|
@@ -6253,15 +6250,6 @@ var init_Log = __esm(() => {
|
|
|
6253
6250
|
init_EventsLog();
|
|
6254
6251
|
});
|
|
6255
6252
|
|
|
6256
|
-
// src/Items/ItemsCommandUtils.ts
|
|
6257
|
-
function mapItemsByOperation(item, getCallback) {
|
|
6258
|
-
const items = Array.isArray(item) ? item : [item];
|
|
6259
|
-
return items.map((item2) => {
|
|
6260
|
-
const operation = getCallback(item2);
|
|
6261
|
-
return { item: item2, operation };
|
|
6262
|
-
});
|
|
6263
|
-
}
|
|
6264
|
-
|
|
6265
6253
|
// src/Items/Shape/ShapeCommand.ts
|
|
6266
6254
|
class ShapeCommand {
|
|
6267
6255
|
shape;
|
|
@@ -6292,52 +6280,73 @@ class ShapeCommand {
|
|
|
6292
6280
|
const shape = this.shape;
|
|
6293
6281
|
switch (this.operation.method) {
|
|
6294
6282
|
case "setBackgroundColor":
|
|
6295
|
-
return
|
|
6283
|
+
return shape.map((shape2) => {
|
|
6296
6284
|
return {
|
|
6297
|
-
|
|
6298
|
-
|
|
6285
|
+
item: shape2,
|
|
6286
|
+
operation: {
|
|
6287
|
+
...this.operation,
|
|
6288
|
+
backgroundColor: shape2.getBackgroundColor()
|
|
6289
|
+
}
|
|
6299
6290
|
};
|
|
6300
6291
|
});
|
|
6301
6292
|
case "setBackgroundOpacity":
|
|
6302
|
-
return
|
|
6293
|
+
return shape.map((shape2) => {
|
|
6303
6294
|
return {
|
|
6304
|
-
|
|
6305
|
-
|
|
6295
|
+
item: shape2,
|
|
6296
|
+
operation: {
|
|
6297
|
+
...this.operation,
|
|
6298
|
+
backgroundOpacity: shape2.getBackgroundOpacity()
|
|
6299
|
+
}
|
|
6306
6300
|
};
|
|
6307
6301
|
});
|
|
6308
6302
|
case "setBorderColor":
|
|
6309
|
-
return
|
|
6303
|
+
return shape.map((shape2) => {
|
|
6310
6304
|
return {
|
|
6311
|
-
|
|
6312
|
-
|
|
6305
|
+
item: shape2,
|
|
6306
|
+
operation: {
|
|
6307
|
+
...this.operation,
|
|
6308
|
+
borderColor: shape2.getStrokeColor()
|
|
6309
|
+
}
|
|
6313
6310
|
};
|
|
6314
6311
|
});
|
|
6315
6312
|
case "setBorderOpacity":
|
|
6316
|
-
return
|
|
6313
|
+
return shape.map((shape2) => {
|
|
6317
6314
|
return {
|
|
6318
|
-
|
|
6319
|
-
|
|
6315
|
+
item: shape2,
|
|
6316
|
+
operation: {
|
|
6317
|
+
...this.operation,
|
|
6318
|
+
borderOpacity: shape2.getBorderOpacity()
|
|
6319
|
+
}
|
|
6320
6320
|
};
|
|
6321
6321
|
});
|
|
6322
6322
|
case "setBorderStyle":
|
|
6323
|
-
return
|
|
6323
|
+
return shape.map((shape2) => {
|
|
6324
6324
|
return {
|
|
6325
|
-
|
|
6326
|
-
|
|
6325
|
+
item: shape2,
|
|
6326
|
+
operation: {
|
|
6327
|
+
...this.operation,
|
|
6328
|
+
borderStyle: shape2.getBorderStyle()
|
|
6329
|
+
}
|
|
6327
6330
|
};
|
|
6328
6331
|
});
|
|
6329
6332
|
case "setBorderWidth":
|
|
6330
|
-
return
|
|
6333
|
+
return shape.map((_shape) => {
|
|
6331
6334
|
return {
|
|
6332
|
-
|
|
6333
|
-
|
|
6335
|
+
item: _shape,
|
|
6336
|
+
operation: {
|
|
6337
|
+
...this.operation,
|
|
6338
|
+
borderWidth: this.operation.prevBorderWidth
|
|
6339
|
+
}
|
|
6334
6340
|
};
|
|
6335
6341
|
});
|
|
6336
6342
|
case "setShapeType":
|
|
6337
|
-
return
|
|
6343
|
+
return shape.map((shape2) => {
|
|
6338
6344
|
return {
|
|
6339
|
-
|
|
6340
|
-
|
|
6345
|
+
item: shape2,
|
|
6346
|
+
operation: {
|
|
6347
|
+
...this.operation,
|
|
6348
|
+
shapeType: shape2.getShapeType()
|
|
6349
|
+
}
|
|
6341
6350
|
};
|
|
6342
6351
|
});
|
|
6343
6352
|
}
|
|
@@ -6420,78 +6429,99 @@ class TransformationCommand {
|
|
|
6420
6429
|
});
|
|
6421
6430
|
}
|
|
6422
6431
|
case "translateTo":
|
|
6423
|
-
return
|
|
6432
|
+
return this.transformation.map((transformation) => {
|
|
6424
6433
|
return {
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6434
|
+
item: transformation,
|
|
6435
|
+
operation: {
|
|
6436
|
+
...this.operation,
|
|
6437
|
+
x: transformation.getTranslation().x,
|
|
6438
|
+
y: transformation.getTranslation().y
|
|
6439
|
+
}
|
|
6428
6440
|
};
|
|
6429
6441
|
});
|
|
6430
6442
|
case "translateBy": {
|
|
6431
6443
|
const op2 = this.operation;
|
|
6432
|
-
return
|
|
6444
|
+
return this.transformation.map((transformation) => {
|
|
6433
6445
|
return {
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6446
|
+
item: transformation,
|
|
6447
|
+
operation: {
|
|
6448
|
+
...this.operation,
|
|
6449
|
+
x: -op2.x,
|
|
6450
|
+
y: -op2.y
|
|
6451
|
+
}
|
|
6437
6452
|
};
|
|
6438
6453
|
});
|
|
6439
6454
|
}
|
|
6440
6455
|
case "scaleTo":
|
|
6441
6456
|
case "scaleToRelativeTo": {
|
|
6442
|
-
return
|
|
6457
|
+
return this.transformation.map((transformation) => {
|
|
6443
6458
|
return {
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6459
|
+
item: transformation,
|
|
6460
|
+
operation: {
|
|
6461
|
+
...op,
|
|
6462
|
+
x: transformation.getScale().x,
|
|
6463
|
+
y: transformation.getScale().y
|
|
6464
|
+
}
|
|
6447
6465
|
};
|
|
6448
6466
|
});
|
|
6449
6467
|
}
|
|
6450
6468
|
case "scaleBy":
|
|
6451
6469
|
case "scaleByRelativeTo": {
|
|
6452
6470
|
const op2 = this.operation;
|
|
6453
|
-
return
|
|
6471
|
+
return this.transformation.map((transformation) => {
|
|
6454
6472
|
return {
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6473
|
+
item: transformation,
|
|
6474
|
+
operation: {
|
|
6475
|
+
...op2,
|
|
6476
|
+
x: 1 / op2.x,
|
|
6477
|
+
y: 1 / op2.y
|
|
6478
|
+
}
|
|
6458
6479
|
};
|
|
6459
6480
|
});
|
|
6460
6481
|
}
|
|
6461
6482
|
case "scaleByTranslateBy": {
|
|
6462
6483
|
const op2 = this.operation;
|
|
6463
|
-
const scaleTransformation =
|
|
6484
|
+
const scaleTransformation = this.transformation.map((transformation) => {
|
|
6464
6485
|
const scaleX = 1 / op2.scale.x;
|
|
6465
6486
|
const scaleY = 1 / op2.scale.y;
|
|
6466
6487
|
const translateX = -op2.translate.x;
|
|
6467
6488
|
const translateY = -op2.translate.y;
|
|
6468
6489
|
return {
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6490
|
+
item: transformation,
|
|
6491
|
+
operation: {
|
|
6492
|
+
...op2,
|
|
6493
|
+
scale: {
|
|
6494
|
+
x: scaleX,
|
|
6495
|
+
y: scaleY
|
|
6496
|
+
},
|
|
6497
|
+
translate: {
|
|
6498
|
+
x: translateX,
|
|
6499
|
+
y: translateY
|
|
6500
|
+
}
|
|
6477
6501
|
}
|
|
6478
6502
|
};
|
|
6479
6503
|
});
|
|
6480
6504
|
return scaleTransformation;
|
|
6481
6505
|
}
|
|
6482
6506
|
case "rotateTo":
|
|
6483
|
-
return
|
|
6507
|
+
return this.transformation.map((transformation) => {
|
|
6484
6508
|
return {
|
|
6485
|
-
|
|
6486
|
-
|
|
6509
|
+
item: transformation,
|
|
6510
|
+
operation: {
|
|
6511
|
+
...this.operation,
|
|
6512
|
+
degree: transformation.getRotation()
|
|
6513
|
+
}
|
|
6487
6514
|
};
|
|
6488
6515
|
});
|
|
6489
6516
|
case "rotateBy": {
|
|
6490
6517
|
const op2 = this.operation;
|
|
6491
|
-
return
|
|
6518
|
+
return this.transformation.map((transformation) => {
|
|
6492
6519
|
return {
|
|
6493
|
-
|
|
6494
|
-
|
|
6520
|
+
item: transformation,
|
|
6521
|
+
operation: {
|
|
6522
|
+
...this.operation,
|
|
6523
|
+
degree: -op2.degree
|
|
6524
|
+
}
|
|
6495
6525
|
};
|
|
6496
6526
|
});
|
|
6497
6527
|
}
|
|
@@ -6529,23 +6559,29 @@ class TransformationCommand {
|
|
|
6529
6559
|
}
|
|
6530
6560
|
case "locked": {
|
|
6531
6561
|
const op2 = this.operation;
|
|
6532
|
-
return
|
|
6562
|
+
return this.transformation.map((transformation) => {
|
|
6533
6563
|
return {
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6564
|
+
item: transformation,
|
|
6565
|
+
operation: {
|
|
6566
|
+
...op2,
|
|
6567
|
+
item: [...op2.item],
|
|
6568
|
+
method: "unlocked",
|
|
6569
|
+
locked: false
|
|
6570
|
+
}
|
|
6538
6571
|
};
|
|
6539
6572
|
});
|
|
6540
6573
|
}
|
|
6541
6574
|
case "unlocked": {
|
|
6542
6575
|
const op2 = this.operation;
|
|
6543
|
-
return
|
|
6576
|
+
return this.transformation.map((transformation) => {
|
|
6544
6577
|
return {
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6578
|
+
item: transformation,
|
|
6579
|
+
operation: {
|
|
6580
|
+
...op2,
|
|
6581
|
+
item: [...op2.item],
|
|
6582
|
+
method: "locked",
|
|
6583
|
+
locked: true
|
|
6584
|
+
}
|
|
6549
6585
|
};
|
|
6550
6586
|
});
|
|
6551
6587
|
}
|
|
@@ -7065,16 +7101,18 @@ class StickerCommand {
|
|
|
7065
7101
|
getReverse() {
|
|
7066
7102
|
switch (this.operation.method) {
|
|
7067
7103
|
case "setBackgroundColor":
|
|
7068
|
-
return
|
|
7104
|
+
return this.sticker.map((sticker) => {
|
|
7069
7105
|
return {
|
|
7070
|
-
|
|
7071
|
-
|
|
7106
|
+
item: sticker,
|
|
7107
|
+
operation: {
|
|
7108
|
+
...this.operation,
|
|
7109
|
+
backgroundColor: sticker.getBackgroundColor()
|
|
7110
|
+
}
|
|
7072
7111
|
};
|
|
7073
7112
|
});
|
|
7074
7113
|
}
|
|
7075
7114
|
}
|
|
7076
7115
|
}
|
|
7077
|
-
var init_StickerCommand = () => {};
|
|
7078
7116
|
|
|
7079
7117
|
// src/Items/Frame/FrameCommand.ts
|
|
7080
7118
|
class FrameCommand {
|
|
@@ -7100,51 +7138,68 @@ class FrameCommand {
|
|
|
7100
7138
|
const frame = this.frame;
|
|
7101
7139
|
switch (this.operation.method) {
|
|
7102
7140
|
case "setBackgroundColor":
|
|
7103
|
-
return
|
|
7141
|
+
return frame.map((frame2) => {
|
|
7104
7142
|
return {
|
|
7105
|
-
|
|
7106
|
-
|
|
7143
|
+
item: frame2,
|
|
7144
|
+
operation: {
|
|
7145
|
+
...this.operation,
|
|
7146
|
+
backgroundColor: frame2.getBackgroundColor()
|
|
7147
|
+
}
|
|
7107
7148
|
};
|
|
7108
7149
|
});
|
|
7109
7150
|
case "setCanChangeRatio":
|
|
7110
|
-
return
|
|
7151
|
+
return frame.map((frame2) => {
|
|
7111
7152
|
return {
|
|
7112
|
-
|
|
7113
|
-
|
|
7153
|
+
item: frame2,
|
|
7154
|
+
operation: {
|
|
7155
|
+
...this.operation,
|
|
7156
|
+
canChangeRatio: frame2.getCanChangeRatio()
|
|
7157
|
+
}
|
|
7114
7158
|
};
|
|
7115
7159
|
});
|
|
7116
7160
|
case "setFrameType":
|
|
7117
|
-
return
|
|
7161
|
+
return frame.map((frame2) => {
|
|
7118
7162
|
return {
|
|
7119
|
-
|
|
7120
|
-
|
|
7163
|
+
item: frame2,
|
|
7164
|
+
operation: {
|
|
7165
|
+
...this.operation,
|
|
7166
|
+
shapeType: this.operation.prevShapeType
|
|
7167
|
+
}
|
|
7121
7168
|
};
|
|
7122
7169
|
});
|
|
7123
7170
|
case "addChild":
|
|
7124
|
-
return
|
|
7171
|
+
return frame.map((frame2) => {
|
|
7125
7172
|
return {
|
|
7126
|
-
|
|
7127
|
-
|
|
7173
|
+
item: frame2,
|
|
7174
|
+
operation: {
|
|
7175
|
+
...this.operation,
|
|
7176
|
+
children: frame2.getChildrenIds()
|
|
7177
|
+
}
|
|
7128
7178
|
};
|
|
7129
7179
|
});
|
|
7130
7180
|
case "removeChild":
|
|
7131
|
-
return
|
|
7181
|
+
return frame.map((frame2) => {
|
|
7132
7182
|
return {
|
|
7133
|
-
|
|
7134
|
-
|
|
7183
|
+
item: frame2,
|
|
7184
|
+
operation: {
|
|
7185
|
+
...this.operation,
|
|
7186
|
+
children: frame2.getChildrenIds()
|
|
7187
|
+
}
|
|
7135
7188
|
};
|
|
7136
7189
|
});
|
|
7137
7190
|
case "addChildren":
|
|
7138
7191
|
case "removeChildren":
|
|
7139
|
-
return
|
|
7192
|
+
return frame.map((item) => {
|
|
7140
7193
|
return {
|
|
7141
|
-
|
|
7194
|
+
item,
|
|
7195
|
+
operation: {
|
|
7196
|
+
...this.operation
|
|
7197
|
+
}
|
|
7142
7198
|
};
|
|
7143
7199
|
});
|
|
7144
7200
|
}
|
|
7145
7201
|
}
|
|
7146
7202
|
}
|
|
7147
|
-
var init_FrameCommand = () => {};
|
|
7148
7203
|
|
|
7149
7204
|
// src/SubjectOperation.ts
|
|
7150
7205
|
class SubjectOperation {
|
|
@@ -7626,60 +7681,80 @@ class CommentCommand {
|
|
|
7626
7681
|
const op = this.operation;
|
|
7627
7682
|
switch (op.method) {
|
|
7628
7683
|
case "createMessage":
|
|
7629
|
-
return
|
|
7684
|
+
return this.comment.map((comment) => {
|
|
7630
7685
|
return {
|
|
7631
|
-
|
|
7632
|
-
|
|
7686
|
+
item: comment,
|
|
7687
|
+
operation: {
|
|
7688
|
+
...this.operation,
|
|
7689
|
+
message: comment.getThread()[comment.getThread().length - 1]
|
|
7690
|
+
}
|
|
7633
7691
|
};
|
|
7634
7692
|
});
|
|
7635
7693
|
case "editMessage":
|
|
7636
|
-
return
|
|
7694
|
+
return this.comment.map((comment) => {
|
|
7637
7695
|
return {
|
|
7638
|
-
|
|
7639
|
-
|
|
7696
|
+
item: comment,
|
|
7697
|
+
operation: {
|
|
7698
|
+
...op,
|
|
7699
|
+
message: comment.getThread().find((mes) => mes.id === op.message.id)
|
|
7700
|
+
}
|
|
7640
7701
|
};
|
|
7641
7702
|
});
|
|
7642
7703
|
case "removeMessage":
|
|
7643
|
-
return
|
|
7704
|
+
return this.comment.map((comment) => {
|
|
7644
7705
|
return {
|
|
7645
|
-
|
|
7646
|
-
|
|
7706
|
+
item: comment,
|
|
7707
|
+
operation: {
|
|
7708
|
+
...this.operation,
|
|
7709
|
+
messageId: op.messageId
|
|
7710
|
+
}
|
|
7647
7711
|
};
|
|
7648
7712
|
});
|
|
7649
7713
|
case "setResolved":
|
|
7650
|
-
return
|
|
7714
|
+
return this.comment.map((comment) => {
|
|
7651
7715
|
return {
|
|
7652
|
-
|
|
7653
|
-
|
|
7716
|
+
item: comment,
|
|
7717
|
+
operation: {
|
|
7718
|
+
...this.operation,
|
|
7719
|
+
resolved: comment.getResolved()
|
|
7720
|
+
}
|
|
7654
7721
|
};
|
|
7655
7722
|
});
|
|
7656
7723
|
case "markMessagesAsRead":
|
|
7657
|
-
return
|
|
7724
|
+
return this.comment.map((comment) => {
|
|
7658
7725
|
return {
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7726
|
+
item: comment,
|
|
7727
|
+
operation: {
|
|
7728
|
+
...this.operation,
|
|
7729
|
+
messageIds: comment.getThread().filter((mes) => op.messageIds.includes(mes.id)).map((mes) => mes.id),
|
|
7730
|
+
userId: op.userId
|
|
7731
|
+
}
|
|
7662
7732
|
};
|
|
7663
7733
|
});
|
|
7664
7734
|
case "markThreadAsUnread":
|
|
7665
7735
|
case "markThreadAsRead":
|
|
7666
|
-
return
|
|
7736
|
+
return this.comment.map((comment) => {
|
|
7667
7737
|
return {
|
|
7668
|
-
|
|
7669
|
-
|
|
7738
|
+
item: comment,
|
|
7739
|
+
operation: {
|
|
7740
|
+
...this.operation,
|
|
7741
|
+
userId: op.userId
|
|
7742
|
+
}
|
|
7670
7743
|
};
|
|
7671
7744
|
});
|
|
7672
7745
|
case "setItemToFollow":
|
|
7673
|
-
return
|
|
7746
|
+
return this.comment.map((comment) => {
|
|
7674
7747
|
return {
|
|
7675
|
-
|
|
7676
|
-
|
|
7748
|
+
item: comment,
|
|
7749
|
+
operation: {
|
|
7750
|
+
...this.operation,
|
|
7751
|
+
itemId: op.itemId
|
|
7752
|
+
}
|
|
7677
7753
|
};
|
|
7678
7754
|
});
|
|
7679
7755
|
}
|
|
7680
7756
|
}
|
|
7681
7757
|
}
|
|
7682
|
-
var init_CommentCommand = () => {};
|
|
7683
7758
|
|
|
7684
7759
|
// src/Items/GeometricNormal.ts
|
|
7685
7760
|
class GeometricNormal {
|
|
@@ -8313,16 +8388,18 @@ class LinkToCommand {
|
|
|
8313
8388
|
getReverse() {
|
|
8314
8389
|
switch (this.operation.method) {
|
|
8315
8390
|
case "setLinkTo":
|
|
8316
|
-
return
|
|
8391
|
+
return this.linkTo.map((linkTo) => {
|
|
8317
8392
|
return {
|
|
8318
|
-
|
|
8319
|
-
|
|
8393
|
+
item: linkTo,
|
|
8394
|
+
operation: {
|
|
8395
|
+
...this.operation,
|
|
8396
|
+
link: linkTo.link
|
|
8397
|
+
}
|
|
8320
8398
|
};
|
|
8321
8399
|
});
|
|
8322
8400
|
}
|
|
8323
8401
|
}
|
|
8324
8402
|
}
|
|
8325
|
-
var init_LinkToCommand = () => {};
|
|
8326
8403
|
|
|
8327
8404
|
// src/Items/LinkTo/LinkTo.ts
|
|
8328
8405
|
class LinkTo {
|
|
@@ -8428,7 +8505,6 @@ class LinkTo {
|
|
|
8428
8505
|
}
|
|
8429
8506
|
}
|
|
8430
8507
|
var init_LinkTo = __esm(() => {
|
|
8431
|
-
init_LinkToCommand();
|
|
8432
8508
|
init_Settings();
|
|
8433
8509
|
});
|
|
8434
8510
|
|
|
@@ -13474,7 +13550,6 @@ var ANONYMOUS_ID = 9999999999, Comment;
|
|
|
13474
13550
|
var init_Comment = __esm(() => {
|
|
13475
13551
|
init_Point2();
|
|
13476
13552
|
init_Transformation2();
|
|
13477
|
-
init_CommentCommand();
|
|
13478
13553
|
init_Mbr2();
|
|
13479
13554
|
init_Line2();
|
|
13480
13555
|
init_esm();
|
|
@@ -13828,7 +13903,6 @@ var init_Comment = __esm(() => {
|
|
|
13828
13903
|
// src/Items/Comment/index.ts
|
|
13829
13904
|
var init_Comment2 = __esm(() => {
|
|
13830
13905
|
init_Comment();
|
|
13831
|
-
init_CommentCommand();
|
|
13832
13906
|
});
|
|
13833
13907
|
|
|
13834
13908
|
// src/Items/Group/GroupCommand.ts
|
|
@@ -13935,30 +14009,38 @@ class PlaceholderCommand {
|
|
|
13935
14009
|
const placeholder = this.placeholder;
|
|
13936
14010
|
switch (this.operation.method) {
|
|
13937
14011
|
case "setBackgroundColor":
|
|
13938
|
-
return
|
|
14012
|
+
return placeholder.map((placeholder2) => {
|
|
13939
14013
|
return {
|
|
13940
|
-
|
|
13941
|
-
|
|
14014
|
+
item: placeholder2,
|
|
14015
|
+
operation: {
|
|
14016
|
+
...this.operation,
|
|
14017
|
+
backgroundColor: placeholder2.getBackgroundColor()
|
|
14018
|
+
}
|
|
13942
14019
|
};
|
|
13943
14020
|
});
|
|
13944
14021
|
case "setIcon":
|
|
13945
|
-
return
|
|
14022
|
+
return placeholder.map((placeholder2) => {
|
|
13946
14023
|
return {
|
|
13947
|
-
|
|
13948
|
-
|
|
14024
|
+
item: placeholder2,
|
|
14025
|
+
operation: {
|
|
14026
|
+
...this.operation,
|
|
14027
|
+
icon: placeholder2.getIcon()
|
|
14028
|
+
}
|
|
13949
14029
|
};
|
|
13950
14030
|
});
|
|
13951
14031
|
case "setMiroData":
|
|
13952
|
-
return
|
|
14032
|
+
return placeholder.map((placeholder2) => {
|
|
13953
14033
|
return {
|
|
13954
|
-
|
|
13955
|
-
|
|
14034
|
+
item: placeholder2,
|
|
14035
|
+
operation: {
|
|
14036
|
+
...this.operation,
|
|
14037
|
+
miroData: placeholder2.getIcon()
|
|
14038
|
+
}
|
|
13956
14039
|
};
|
|
13957
14040
|
});
|
|
13958
14041
|
}
|
|
13959
14042
|
}
|
|
13960
14043
|
}
|
|
13961
|
-
var init_PlaceholderCommand = () => {};
|
|
13962
14044
|
|
|
13963
14045
|
// src/Items/Image/ImageCommand.ts
|
|
13964
14046
|
class ImageCommand {
|
|
@@ -14196,11 +14278,7 @@ var init_CreateCommand = __esm(() => {
|
|
|
14196
14278
|
init_EventsCommand();
|
|
14197
14279
|
init_ConnectorCommand();
|
|
14198
14280
|
init_DrawingCommand();
|
|
14199
|
-
init_StickerCommand();
|
|
14200
|
-
init_FrameCommand();
|
|
14201
14281
|
init_Comment2();
|
|
14202
|
-
init_LinkToCommand();
|
|
14203
|
-
init_PlaceholderCommand();
|
|
14204
14282
|
init_Command();
|
|
14205
14283
|
itemCommandFactories = {
|
|
14206
14284
|
Sticker: createStickerCommand,
|
|
@@ -28248,7 +28326,7 @@ function normalizeBoardSubscriptionCompletedMsg(data) {
|
|
|
28248
28326
|
eventsSinceLastSnapshot: exports_external.array(SocketSyncEventSchema).parse(parsed.eventsSinceLastSnapshot)
|
|
28249
28327
|
});
|
|
28250
28328
|
}
|
|
28251
|
-
var StringOrNumberSchema, StringArraySchema, UnknownRecordSchema, TimestampSchema, accessModeValues, AccessModeSchema, OptionalTransportTimestampSchema, MatrixDataSchema, ApplyMatrixItemSchema, UndoOperationSchema, RedoOperationSchema, AddSingleItemBoardOperationSchema, AddManyItemsBoardOperationSchema, BoardOperationSchemas, TranslateOperationSchema, ScaleOperationSchema, RotateOperationSchema, ScaleRelativeToOperationSchema, ScaleByTranslateByOperationSchema, ApplyMatrixOperationSchema, TransformManyItemsOperationSchema, TransformationOperationSchemas, ShapeOperationSchemas, StickerOperationSchema, RichTextWholeTextOperationSchema, RichTextSelectionOperationSchema, RichTextGroupEditOperationSchema, ConnectorOperationSchemas, DrawingOperationSchemas, FrameOperationSchemas, LinkToOperationSchema, PlaceholderOperationSchemas, GroupOperationSchemas, CommentOperationSchemas, ImageOperationSchema, VideoOperationSchema, AudioOperationSchema, SocketOperationSchema, SocketBoardEventBodySchema, SocketBoardEventPackBodySchema, SocketBoardEventSchema, SocketBoardEventPackSchema, SocketSyncBoardEventSchema, SocketSyncBoardEventPackSchema, SocketSyncEventSchema, PointerMovePresenceEventSchema, SelectionPresenceEventSchema, SetUserColorPresenceEventSchema, DrawSelectPresenceEventSchema, CancelDrawSelectPresenceEventSchema, CameraPresenceEventSchema, PingPresenceEventSchema, BringToMePresenceEventSchema, StopFollowingPresenceEventSchema, FollowPresenceEventSchema, PresenceEventSchema, TextActionSchema, UserRequestAiChatEventSchema, GenerateImageRequestAiChatEventSchema, GenerateImageResponseAiChatEventSchema, GenerateAudioRequestAiChatEventSchema, GenerateAudioResponseAiChatEventSchema, StopGenerationAiChatEventSchema, ChatChunkAiChatEventSchema, AiChatEventSchema, SocketBoardSnapshotSchema, NormalizedBoardSnapshotSchema, AuthMsgSchema, LogoutMsgSchema, InvalidateRightsMsgSchema, GetModeMsgSchema, SubscribeMsgSchema, UnsubscribeMsgSchema, ErrorMsgSchema, VersionCheckMsgSchema, AuthConfirmationMsgSchema, PingMsgSchema, PongMsgSchema, BoardAccessDeniedMsgSchema, BoardSubscriptionCompletedMsgSchema, NormalizedBoardSubscriptionCompletedMsgSchema, BoardSnapshotMsgSchema, AiChatMsgSchema, BoardEventMsgSchema, ConfirmationMsgSchema, ModeMsgSchema, SnapshotRequestMsgSchema, UserJoinMsgSchema, PresenceEventMsgSchema, EventsMsgSchema, SocketMsgSchema, BoardWsHandshakeJwtPayloadSchema,
|
|
28329
|
+
var StringOrNumberSchema, StringArraySchema, UnknownRecordSchema, TimestampSchema, accessModeValues, AccessModeSchema, OptionalTransportTimestampSchema, MatrixDataSchema, ApplyMatrixItemSchema, UndoOperationSchema, RedoOperationSchema, AddSingleItemBoardOperationSchema, AddManyItemsBoardOperationSchema, BoardOperationSchemas, TranslateOperationSchema, ScaleOperationSchema, RotateOperationSchema, ScaleRelativeToOperationSchema, ScaleByTranslateByOperationSchema, ApplyMatrixOperationSchema, TransformManyItemsOperationSchema, TransformationOperationSchemas, ShapeOperationSchemas, StickerOperationSchema, RichTextWholeTextOperationSchema, RichTextSelectionOperationSchema, RichTextGroupEditOperationSchema, ConnectorOperationSchemas, DrawingOperationSchemas, FrameOperationSchemas, LinkToOperationSchema, PlaceholderOperationSchemas, GroupOperationSchemas, CommentOperationSchemas, ImageOperationSchema, VideoOperationSchema, AudioOperationSchema, SocketOperationSchema, SocketBoardEventBodySchema, SocketBoardEventPackBodySchema, SocketBoardEventSchema, SocketBoardEventPackSchema, SocketSyncBoardEventSchema, SocketSyncBoardEventPackSchema, SocketSyncEventSchema, PointerMovePresenceEventSchema, SelectionPresenceEventSchema, SetUserColorPresenceEventSchema, DrawSelectPresenceEventSchema, CancelDrawSelectPresenceEventSchema, CameraPresenceEventSchema, PingPresenceEventSchema, BringToMePresenceEventSchema, StopFollowingPresenceEventSchema, FollowPresenceEventSchema, PresenceEventSchema, TextActionSchema, UserRequestAiChatEventSchema, GenerateImageRequestAiChatEventSchema, GenerateImageResponseAiChatEventSchema, GenerateAudioRequestAiChatEventSchema, GenerateAudioResponseAiChatEventSchema, StopGenerationAiChatEventSchema, ChatChunkAiChatEventSchema, AiChatEventSchema, SocketBoardSnapshotSchema, NormalizedBoardSnapshotSchema, AuthMsgSchema, LogoutMsgSchema, InvalidateRightsMsgSchema, GetModeMsgSchema, SubscribeMsgSchema, UnsubscribeMsgSchema, ErrorMsgSchema, VersionCheckMsgSchema, AuthConfirmationMsgSchema, PingMsgSchema, PongMsgSchema, BoardAccessDeniedMsgSchema, BoardSubscriptionCompletedMsgSchema, NormalizedBoardSubscriptionCompletedMsgSchema, BoardSnapshotMsgSchema, AiChatMsgSchema, BoardEventMsgSchema, ConfirmationMsgSchema, ModeMsgSchema, SnapshotRequestMsgSchema, UserJoinMsgSchema, PresenceEventMsgSchema, EventsMsgSchema, SocketMsgSchema, BoardWsHandshakeJwtPayloadSchema, BoardConnectResponseSchema;
|
|
28252
28330
|
var init_socketContract = __esm(() => {
|
|
28253
28331
|
init_zod();
|
|
28254
28332
|
StringOrNumberSchema = exports_external.union([exports_external.string(), exports_external.number()]);
|
|
@@ -29237,11 +29315,6 @@ var init_socketContract = __esm(() => {
|
|
|
29237
29315
|
accessMode: exports_external.enum(accessModeValues),
|
|
29238
29316
|
isWsToken: exports_external.literal(true)
|
|
29239
29317
|
}).strict();
|
|
29240
|
-
TemplateWsHandshakeJwtPayloadSchema = exports_external.object({
|
|
29241
|
-
templateId: exports_external.string(),
|
|
29242
|
-
connectionType: exports_external.literal("template"),
|
|
29243
|
-
isWsToken: exports_external.literal(true)
|
|
29244
|
-
}).strict();
|
|
29245
29318
|
BoardConnectResponseSchema = exports_external.object({
|
|
29246
29319
|
wsUrl: exports_external.string(),
|
|
29247
29320
|
jwt: exports_external.string(),
|
|
@@ -29249,11 +29322,6 @@ var init_socketContract = __esm(() => {
|
|
|
29249
29322
|
sessionId: exports_external.string(),
|
|
29250
29323
|
accessMode: exports_external.enum(accessModeValues)
|
|
29251
29324
|
}).strict();
|
|
29252
|
-
TemplateConnectResponseSchema = exports_external.object({
|
|
29253
|
-
wsUrl: exports_external.string(),
|
|
29254
|
-
jwt: exports_external.string(),
|
|
29255
|
-
userId: exports_external.string()
|
|
29256
|
-
}).strict();
|
|
29257
29325
|
});
|
|
29258
29326
|
|
|
29259
29327
|
// src/Events/MessageRouter/createMessageRouter.ts
|
|
@@ -60813,7 +60881,6 @@ var init_Sticker = __esm(() => {
|
|
|
60813
60881
|
init_Transformation();
|
|
60814
60882
|
init_getResizeMatrix();
|
|
60815
60883
|
init_RichText();
|
|
60816
|
-
init_StickerCommand();
|
|
60817
60884
|
init_StickerOperation();
|
|
60818
60885
|
init_LinkTo();
|
|
60819
60886
|
init_SessionStorage();
|
|
@@ -62065,7 +62132,6 @@ var init_Frame = __esm(() => {
|
|
|
62065
62132
|
init_RichText();
|
|
62066
62133
|
init_Matrix();
|
|
62067
62134
|
init_Basic();
|
|
62068
|
-
init_FrameCommand();
|
|
62069
62135
|
init_exportBoardSnapshot();
|
|
62070
62136
|
init_LinkTo();
|
|
62071
62137
|
init_HTMLRender();
|
|
@@ -62595,7 +62661,6 @@ var init_Frame = __esm(() => {
|
|
|
62595
62661
|
// src/Items/Frame/index.ts
|
|
62596
62662
|
var init_Frame2 = __esm(() => {
|
|
62597
62663
|
init_Frame();
|
|
62598
|
-
init_FrameCommand();
|
|
62599
62664
|
init_FrameData();
|
|
62600
62665
|
init_FrameData();
|
|
62601
62666
|
init_Basic();
|
|
@@ -71805,7 +71870,6 @@ var init_Placeholder2 = __esm(() => {
|
|
|
71805
71870
|
init_Shape2();
|
|
71806
71871
|
init_Path();
|
|
71807
71872
|
init_Transformation();
|
|
71808
|
-
init_PlaceholderCommand();
|
|
71809
71873
|
init_getResizeMatrix();
|
|
71810
71874
|
init_BaseItem();
|
|
71811
71875
|
Placeholder2 = class Placeholder2 extends BaseItem {
|
|
@@ -72718,10 +72782,10 @@ function normalizeForBoard(msg) {
|
|
|
72718
72782
|
}
|
|
72719
72783
|
function handleSeqNumApplication(initialSequenceNumber, board) {
|
|
72720
72784
|
const { log } = board.events;
|
|
72785
|
+
const sessionId = getConnectionSessionId(board.events.connection);
|
|
72786
|
+
const authorUserId = getConnectionAuthorUserId(board.events.connection);
|
|
72787
|
+
log.refreshUnconfirmedIdentity(sessionId, authorUserId);
|
|
72721
72788
|
log.currentSequenceNumber = initialSequenceNumber;
|
|
72722
|
-
if (log.pendingEvent) {
|
|
72723
|
-
log.pendingEvent.sequenceNumber = log.currentSequenceNumber;
|
|
72724
|
-
}
|
|
72725
72789
|
startIntervals(board);
|
|
72726
72790
|
}
|
|
72727
72791
|
function startIntervals(board) {
|