microboard-temp 0.13.76 → 0.13.77
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 +1 -4
- package/dist/cjs/index.js +1 -4
- package/dist/cjs/node.js +1 -4
- package/dist/esm/browser.js +1 -4
- package/dist/esm/index.js +1 -4
- package/dist/esm/node.js +1 -4
- package/dist/types/Events/Events.d.ts +35 -32
- package/dist/types/Events/MessageRouter/socketContract.d.ts +51 -44
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -14252,10 +14252,6 @@ class Events {
|
|
|
14252
14252
|
connection?.subscribe(board);
|
|
14253
14253
|
}
|
|
14254
14254
|
emit(operation, command) {
|
|
14255
|
-
if (operation.method === "transformMany") {
|
|
14256
|
-
console.error("[DEBUG] transformMany emitted from Events.emit!", JSON.stringify(operation));
|
|
14257
|
-
console.trace("[DEBUG] transformMany stack trace");
|
|
14258
|
-
}
|
|
14259
14255
|
const sessionId = this.getSessionId();
|
|
14260
14256
|
const authorUserId = this.getAuthorUserId();
|
|
14261
14257
|
const body = {
|
|
@@ -30066,6 +30062,7 @@ function parseHTMLConnector(el) {
|
|
|
30066
30062
|
lineColor: coerceColorValue(el.getAttribute("data-line-color") || ""),
|
|
30067
30063
|
lineWidth: parseInt(el.getAttribute("data-line-width") || "1"),
|
|
30068
30064
|
borderStyle: el.getAttribute("data-border-style") || "",
|
|
30065
|
+
smartJump: (el.getAttribute("data-smart-jump") || "true") !== "false",
|
|
30069
30066
|
text: new DefaultRichTextData,
|
|
30070
30067
|
linkTo: el.getAttribute("data-link-to") || undefined
|
|
30071
30068
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -14252,10 +14252,6 @@ class Events {
|
|
|
14252
14252
|
connection?.subscribe(board);
|
|
14253
14253
|
}
|
|
14254
14254
|
emit(operation, command) {
|
|
14255
|
-
if (operation.method === "transformMany") {
|
|
14256
|
-
console.error("[DEBUG] transformMany emitted from Events.emit!", JSON.stringify(operation));
|
|
14257
|
-
console.trace("[DEBUG] transformMany stack trace");
|
|
14258
|
-
}
|
|
14259
14255
|
const sessionId = this.getSessionId();
|
|
14260
14256
|
const authorUserId = this.getAuthorUserId();
|
|
14261
14257
|
const body = {
|
|
@@ -30066,6 +30062,7 @@ function parseHTMLConnector(el) {
|
|
|
30066
30062
|
lineColor: coerceColorValue(el.getAttribute("data-line-color") || ""),
|
|
30067
30063
|
lineWidth: parseInt(el.getAttribute("data-line-width") || "1"),
|
|
30068
30064
|
borderStyle: el.getAttribute("data-border-style") || "",
|
|
30065
|
+
smartJump: (el.getAttribute("data-smart-jump") || "true") !== "false",
|
|
30069
30066
|
text: new DefaultRichTextData,
|
|
30070
30067
|
linkTo: el.getAttribute("data-link-to") || undefined
|
|
30071
30068
|
};
|
package/dist/cjs/node.js
CHANGED
|
@@ -14272,10 +14272,6 @@ class Events {
|
|
|
14272
14272
|
connection?.subscribe(board);
|
|
14273
14273
|
}
|
|
14274
14274
|
emit(operation, command) {
|
|
14275
|
-
if (operation.method === "transformMany") {
|
|
14276
|
-
console.error("[DEBUG] transformMany emitted from Events.emit!", JSON.stringify(operation));
|
|
14277
|
-
console.trace("[DEBUG] transformMany stack trace");
|
|
14278
|
-
}
|
|
14279
14275
|
const sessionId = this.getSessionId();
|
|
14280
14276
|
const authorUserId = this.getAuthorUserId();
|
|
14281
14277
|
const body = {
|
|
@@ -30086,6 +30082,7 @@ function parseHTMLConnector(el) {
|
|
|
30086
30082
|
lineColor: coerceColorValue(el.getAttribute("data-line-color") || ""),
|
|
30087
30083
|
lineWidth: parseInt(el.getAttribute("data-line-width") || "1"),
|
|
30088
30084
|
borderStyle: el.getAttribute("data-border-style") || "",
|
|
30085
|
+
smartJump: (el.getAttribute("data-smart-jump") || "true") !== "false",
|
|
30089
30086
|
text: new DefaultRichTextData,
|
|
30090
30087
|
linkTo: el.getAttribute("data-link-to") || undefined
|
|
30091
30088
|
};
|
package/dist/esm/browser.js
CHANGED
|
@@ -14224,10 +14224,6 @@ class Events {
|
|
|
14224
14224
|
connection?.subscribe(board);
|
|
14225
14225
|
}
|
|
14226
14226
|
emit(operation, command) {
|
|
14227
|
-
if (operation.method === "transformMany") {
|
|
14228
|
-
console.error("[DEBUG] transformMany emitted from Events.emit!", JSON.stringify(operation));
|
|
14229
|
-
console.trace("[DEBUG] transformMany stack trace");
|
|
14230
|
-
}
|
|
14231
14227
|
const sessionId = this.getSessionId();
|
|
14232
14228
|
const authorUserId = this.getAuthorUserId();
|
|
14233
14229
|
const body = {
|
|
@@ -30038,6 +30034,7 @@ function parseHTMLConnector(el) {
|
|
|
30038
30034
|
lineColor: coerceColorValue(el.getAttribute("data-line-color") || ""),
|
|
30039
30035
|
lineWidth: parseInt(el.getAttribute("data-line-width") || "1"),
|
|
30040
30036
|
borderStyle: el.getAttribute("data-border-style") || "",
|
|
30037
|
+
smartJump: (el.getAttribute("data-smart-jump") || "true") !== "false",
|
|
30041
30038
|
text: new DefaultRichTextData,
|
|
30042
30039
|
linkTo: el.getAttribute("data-link-to") || undefined
|
|
30043
30040
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -14217,10 +14217,6 @@ class Events {
|
|
|
14217
14217
|
connection?.subscribe(board);
|
|
14218
14218
|
}
|
|
14219
14219
|
emit(operation, command) {
|
|
14220
|
-
if (operation.method === "transformMany") {
|
|
14221
|
-
console.error("[DEBUG] transformMany emitted from Events.emit!", JSON.stringify(operation));
|
|
14222
|
-
console.trace("[DEBUG] transformMany stack trace");
|
|
14223
|
-
}
|
|
14224
14220
|
const sessionId = this.getSessionId();
|
|
14225
14221
|
const authorUserId = this.getAuthorUserId();
|
|
14226
14222
|
const body = {
|
|
@@ -30031,6 +30027,7 @@ function parseHTMLConnector(el) {
|
|
|
30031
30027
|
lineColor: coerceColorValue(el.getAttribute("data-line-color") || ""),
|
|
30032
30028
|
lineWidth: parseInt(el.getAttribute("data-line-width") || "1"),
|
|
30033
30029
|
borderStyle: el.getAttribute("data-border-style") || "",
|
|
30030
|
+
smartJump: (el.getAttribute("data-smart-jump") || "true") !== "false",
|
|
30034
30031
|
text: new DefaultRichTextData,
|
|
30035
30032
|
linkTo: el.getAttribute("data-link-to") || undefined
|
|
30036
30033
|
};
|
package/dist/esm/node.js
CHANGED
|
@@ -14239,10 +14239,6 @@ class Events {
|
|
|
14239
14239
|
connection?.subscribe(board);
|
|
14240
14240
|
}
|
|
14241
14241
|
emit(operation, command) {
|
|
14242
|
-
if (operation.method === "transformMany") {
|
|
14243
|
-
console.error("[DEBUG] transformMany emitted from Events.emit!", JSON.stringify(operation));
|
|
14244
|
-
console.trace("[DEBUG] transformMany stack trace");
|
|
14245
|
-
}
|
|
14246
14242
|
const sessionId = this.getSessionId();
|
|
14247
14243
|
const authorUserId = this.getAuthorUserId();
|
|
14248
14244
|
const body = {
|
|
@@ -30053,6 +30049,7 @@ function parseHTMLConnector(el) {
|
|
|
30053
30049
|
lineColor: coerceColorValue(el.getAttribute("data-line-color") || ""),
|
|
30054
30050
|
lineWidth: parseInt(el.getAttribute("data-line-width") || "1"),
|
|
30055
30051
|
borderStyle: el.getAttribute("data-border-style") || "",
|
|
30052
|
+
smartJump: (el.getAttribute("data-smart-jump") || "true") !== "false",
|
|
30056
30053
|
text: new DefaultRichTextData,
|
|
30057
30054
|
linkTo: el.getAttribute("data-link-to") || undefined
|
|
30058
30055
|
};
|
|
@@ -5,41 +5,44 @@ import { Command } from './Command';
|
|
|
5
5
|
import { EventsLog } from './Log';
|
|
6
6
|
import { Operation } from './EventsOperations';
|
|
7
7
|
import { PresenceEventType } from '../Presence/Events';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export
|
|
13
|
-
eventId:
|
|
14
|
-
userId?:
|
|
15
|
-
authorUserId?:
|
|
16
|
-
sessionId?:
|
|
17
|
-
boardId:
|
|
8
|
+
import type { SocketContractBoardEvent, SocketContractBoardEventBody, SocketContractBoardEventPack, SocketContractBoardEventPackBody, SocketContractSyncBoardEvent, SocketContractSyncBoardEventPack } from './MessageRouter/socketContract';
|
|
9
|
+
type PackedOperation = Operation & {
|
|
10
|
+
actualId?: string;
|
|
11
|
+
};
|
|
12
|
+
export type BoardEventBody = {
|
|
13
|
+
eventId: SocketContractBoardEventBody['eventId'];
|
|
14
|
+
userId?: SocketContractBoardEventBody['userId'];
|
|
15
|
+
authorUserId?: SocketContractBoardEventBody['authorUserId'];
|
|
16
|
+
sessionId?: SocketContractBoardEventBody['sessionId'];
|
|
17
|
+
boardId: SocketContractBoardEventBody['boardId'];
|
|
18
18
|
operation: Operation;
|
|
19
|
-
}
|
|
20
|
-
export
|
|
21
|
-
order:
|
|
19
|
+
};
|
|
20
|
+
export type BoardEvent = {
|
|
21
|
+
order: SocketContractBoardEvent['order'];
|
|
22
|
+
body: BoardEventBody;
|
|
23
|
+
};
|
|
24
|
+
export type BoardEventPackBody = {
|
|
25
|
+
eventId: SocketContractBoardEventPackBody['eventId'];
|
|
26
|
+
userId?: SocketContractBoardEventPackBody['userId'];
|
|
27
|
+
authorUserId?: SocketContractBoardEventPackBody['authorUserId'];
|
|
28
|
+
sessionId?: SocketContractBoardEventPackBody['sessionId'];
|
|
29
|
+
boardId: SocketContractBoardEventPackBody['boardId'];
|
|
30
|
+
operations: PackedOperation[];
|
|
31
|
+
};
|
|
32
|
+
export type BoardEventPack = {
|
|
33
|
+
order: SocketContractBoardEventPack['order'];
|
|
22
34
|
body: BoardEventPackBody;
|
|
23
|
-
}
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})[];
|
|
33
|
-
}
|
|
34
|
-
export interface SyncBoardEvent extends BoardEvent {
|
|
35
|
-
lastKnownOrder: number;
|
|
36
|
-
}
|
|
37
|
-
interface SyncBoardEventPackBody extends BoardEventPackBody {
|
|
38
|
-
lastKnownOrder: number;
|
|
39
|
-
}
|
|
40
|
-
export interface SyncBoardEventPack extends BoardEventPack {
|
|
35
|
+
};
|
|
36
|
+
export type SyncBoardEvent = BoardEvent & {
|
|
37
|
+
lastKnownOrder: SocketContractSyncBoardEvent['lastKnownOrder'];
|
|
38
|
+
};
|
|
39
|
+
type SyncBoardEventPackBody = BoardEventPackBody & {
|
|
40
|
+
lastKnownOrder: SocketContractSyncBoardEventPack['body']['lastKnownOrder'];
|
|
41
|
+
};
|
|
42
|
+
export type SyncBoardEventPack = {
|
|
43
|
+
order: SocketContractSyncBoardEventPack['order'];
|
|
41
44
|
body: SyncBoardEventPackBody;
|
|
42
|
-
}
|
|
45
|
+
};
|
|
43
46
|
export type SyncEvent = SyncBoardEvent | SyncBoardEventPack;
|
|
44
47
|
export declare class Events {
|
|
45
48
|
static createCommand: (board: Board, operation: Operation) => Command;
|
|
@@ -13646,6 +13646,13 @@ export type SocketContractPresenceEventMsg = z.infer<typeof PresenceEventMsgSche
|
|
|
13646
13646
|
export type SocketContractEventsMsg = z.infer<typeof EventsMsgSchema>;
|
|
13647
13647
|
export type SocketContractSocketMsg = z.infer<typeof SocketMsgSchema>;
|
|
13648
13648
|
export type SocketContractOperation = z.infer<typeof SocketOperationSchema>;
|
|
13649
|
+
export type SocketContractBoardEventBody = z.infer<typeof SocketBoardEventBodySchema>;
|
|
13650
|
+
export type SocketContractBoardEventPackBody = z.infer<typeof SocketBoardEventPackBodySchema>;
|
|
13651
|
+
export type SocketContractBoardEvent = z.infer<typeof SocketBoardEventSchema>;
|
|
13652
|
+
export type SocketContractBoardEventPack = z.infer<typeof SocketBoardEventPackSchema>;
|
|
13653
|
+
export type SocketContractSyncBoardEvent = z.infer<typeof SocketSyncBoardEventSchema>;
|
|
13654
|
+
export type SocketContractSyncBoardEventPack = z.infer<typeof SocketSyncBoardEventPackSchema>;
|
|
13655
|
+
export type SocketContractSyncEvent = z.infer<typeof SocketSyncEventSchema>;
|
|
13649
13656
|
export type SocketContractAccessMode = z.infer<typeof AccessModeSchema>;
|
|
13650
13657
|
export type SocketContractBoardWsHandshakeJwtPayload = z.infer<typeof BoardWsHandshakeJwtPayloadSchema>;
|
|
13651
13658
|
export type SocketContractTemplateWsHandshakeJwtPayload = z.infer<typeof TemplateWsHandshakeJwtPayloadSchema>;
|
|
@@ -13779,12 +13786,11 @@ export declare function safeParseSocketMsg(data: unknown): z.ZodSafeParseResult<
|
|
|
13779
13786
|
event: {
|
|
13780
13787
|
[x: string]: unknown;
|
|
13781
13788
|
order: number;
|
|
13782
|
-
lastKnownOrder: number;
|
|
13783
13789
|
body: {
|
|
13784
13790
|
[x: string]: unknown;
|
|
13785
13791
|
eventId: string;
|
|
13786
13792
|
boardId: string;
|
|
13787
|
-
|
|
13793
|
+
operations: ({
|
|
13788
13794
|
[x: string]: unknown;
|
|
13789
13795
|
class: "Events";
|
|
13790
13796
|
method: "undo";
|
|
@@ -13950,25 +13956,6 @@ export declare function safeParseSocketMsg(data: unknown): z.ZodSafeParseResult<
|
|
|
13950
13956
|
};
|
|
13951
13957
|
timeStamp?: number | undefined;
|
|
13952
13958
|
timestamp?: number | undefined;
|
|
13953
|
-
} | {
|
|
13954
|
-
[x: string]: unknown;
|
|
13955
|
-
class: "Transformation";
|
|
13956
|
-
method: "applyMatrix";
|
|
13957
|
-
items: {
|
|
13958
|
-
[x: string]: unknown;
|
|
13959
|
-
id: string;
|
|
13960
|
-
matrix: {
|
|
13961
|
-
[x: string]: unknown;
|
|
13962
|
-
translateX: number;
|
|
13963
|
-
translateY: number;
|
|
13964
|
-
scaleX: number;
|
|
13965
|
-
scaleY: number;
|
|
13966
|
-
shearX: number;
|
|
13967
|
-
shearY: number;
|
|
13968
|
-
};
|
|
13969
|
-
}[];
|
|
13970
|
-
timeStamp?: number | undefined;
|
|
13971
|
-
timestamp?: number | undefined;
|
|
13972
13959
|
} | {
|
|
13973
13960
|
[x: string]: unknown;
|
|
13974
13961
|
class: "Transformation";
|
|
@@ -13993,6 +13980,25 @@ export declare function safeParseSocketMsg(data: unknown): z.ZodSafeParseResult<
|
|
|
13993
13980
|
locked: boolean;
|
|
13994
13981
|
timeStamp?: number | undefined;
|
|
13995
13982
|
timestamp?: number | undefined;
|
|
13983
|
+
} | {
|
|
13984
|
+
[x: string]: unknown;
|
|
13985
|
+
class: "Transformation";
|
|
13986
|
+
method: "applyMatrix";
|
|
13987
|
+
items: {
|
|
13988
|
+
[x: string]: unknown;
|
|
13989
|
+
id: string;
|
|
13990
|
+
matrix: {
|
|
13991
|
+
[x: string]: unknown;
|
|
13992
|
+
translateX: number;
|
|
13993
|
+
translateY: number;
|
|
13994
|
+
scaleX: number;
|
|
13995
|
+
scaleY: number;
|
|
13996
|
+
shearX: number;
|
|
13997
|
+
shearY: number;
|
|
13998
|
+
};
|
|
13999
|
+
}[];
|
|
14000
|
+
timeStamp?: number | undefined;
|
|
14001
|
+
timestamp?: number | undefined;
|
|
13996
14002
|
} | {
|
|
13997
14003
|
[x: string]: unknown;
|
|
13998
14004
|
class: "Transformation";
|
|
@@ -14429,7 +14435,8 @@ export declare function safeParseSocketMsg(data: unknown): z.ZodSafeParseResult<
|
|
|
14429
14435
|
method: "setUrl";
|
|
14430
14436
|
item: string[];
|
|
14431
14437
|
url: string;
|
|
14432
|
-
};
|
|
14438
|
+
})[];
|
|
14439
|
+
lastKnownOrder: number;
|
|
14433
14440
|
userId?: string | number | undefined;
|
|
14434
14441
|
authorUserId?: string | undefined;
|
|
14435
14442
|
sessionId?: string | undefined;
|
|
@@ -14437,11 +14444,12 @@ export declare function safeParseSocketMsg(data: unknown): z.ZodSafeParseResult<
|
|
|
14437
14444
|
} | {
|
|
14438
14445
|
[x: string]: unknown;
|
|
14439
14446
|
order: number;
|
|
14447
|
+
lastKnownOrder: number;
|
|
14440
14448
|
body: {
|
|
14441
14449
|
[x: string]: unknown;
|
|
14442
14450
|
eventId: string;
|
|
14443
14451
|
boardId: string;
|
|
14444
|
-
|
|
14452
|
+
operation: {
|
|
14445
14453
|
[x: string]: unknown;
|
|
14446
14454
|
class: "Events";
|
|
14447
14455
|
method: "undo";
|
|
@@ -14607,25 +14615,6 @@ export declare function safeParseSocketMsg(data: unknown): z.ZodSafeParseResult<
|
|
|
14607
14615
|
};
|
|
14608
14616
|
timeStamp?: number | undefined;
|
|
14609
14617
|
timestamp?: number | undefined;
|
|
14610
|
-
} | {
|
|
14611
|
-
[x: string]: unknown;
|
|
14612
|
-
class: "Transformation";
|
|
14613
|
-
method: "applyMatrix";
|
|
14614
|
-
items: {
|
|
14615
|
-
[x: string]: unknown;
|
|
14616
|
-
id: string;
|
|
14617
|
-
matrix: {
|
|
14618
|
-
[x: string]: unknown;
|
|
14619
|
-
translateX: number;
|
|
14620
|
-
translateY: number;
|
|
14621
|
-
scaleX: number;
|
|
14622
|
-
scaleY: number;
|
|
14623
|
-
shearX: number;
|
|
14624
|
-
shearY: number;
|
|
14625
|
-
};
|
|
14626
|
-
}[];
|
|
14627
|
-
timeStamp?: number | undefined;
|
|
14628
|
-
timestamp?: number | undefined;
|
|
14629
14618
|
} | {
|
|
14630
14619
|
[x: string]: unknown;
|
|
14631
14620
|
class: "Transformation";
|
|
@@ -14650,6 +14639,25 @@ export declare function safeParseSocketMsg(data: unknown): z.ZodSafeParseResult<
|
|
|
14650
14639
|
locked: boolean;
|
|
14651
14640
|
timeStamp?: number | undefined;
|
|
14652
14641
|
timestamp?: number | undefined;
|
|
14642
|
+
} | {
|
|
14643
|
+
[x: string]: unknown;
|
|
14644
|
+
class: "Transformation";
|
|
14645
|
+
method: "applyMatrix";
|
|
14646
|
+
items: {
|
|
14647
|
+
[x: string]: unknown;
|
|
14648
|
+
id: string;
|
|
14649
|
+
matrix: {
|
|
14650
|
+
[x: string]: unknown;
|
|
14651
|
+
translateX: number;
|
|
14652
|
+
translateY: number;
|
|
14653
|
+
scaleX: number;
|
|
14654
|
+
scaleY: number;
|
|
14655
|
+
shearX: number;
|
|
14656
|
+
shearY: number;
|
|
14657
|
+
};
|
|
14658
|
+
}[];
|
|
14659
|
+
timeStamp?: number | undefined;
|
|
14660
|
+
timestamp?: number | undefined;
|
|
14653
14661
|
} | {
|
|
14654
14662
|
[x: string]: unknown;
|
|
14655
14663
|
class: "Transformation";
|
|
@@ -15086,8 +15094,7 @@ export declare function safeParseSocketMsg(data: unknown): z.ZodSafeParseResult<
|
|
|
15086
15094
|
method: "setUrl";
|
|
15087
15095
|
item: string[];
|
|
15088
15096
|
url: string;
|
|
15089
|
-
}
|
|
15090
|
-
lastKnownOrder: number;
|
|
15097
|
+
};
|
|
15091
15098
|
userId?: string | number | undefined;
|
|
15092
15099
|
authorUserId?: string | undefined;
|
|
15093
15100
|
sessionId?: string | undefined;
|