microboard-temp 0.1.6 → 0.1.8
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-entry.js → browser.js} +25128 -10905
- package/dist/cjs/index.js +25028 -10805
- package/dist/cjs/{node-entry.js → node.js} +24582 -10358
- package/dist/esm/{browser-entry.js → browser.js} +25124 -10901
- package/dist/esm/index.js +25028 -10805
- package/dist/esm/{node-entry.js → node.js} +24578 -10354
- package/dist/types/Events/MessageRouter/handleBoardEventMessage.d.ts +3 -3
- package/dist/types/Events/MessageRouter/handleModeMessage.d.ts +8 -3
- package/dist/types/Events/MessageRouter/index.d.ts +6 -0
- package/dist/types/Events/index.d.ts +4 -2
- package/dist/types/Items/AINode/index.d.ts +2 -1
- package/dist/types/Items/Audio/index.d.ts +3 -2
- package/dist/types/Items/Comment/index.d.ts +1 -1
- package/dist/types/Items/Connector/index.d.ts +5 -3
- package/dist/types/Items/Frame/index.d.ts +3 -0
- package/dist/types/Items/Image/index.d.ts +2 -0
- package/dist/types/Items/Mbr/index.d.ts +1 -0
- package/dist/types/Items/RichText/index.d.ts +5 -1
- package/dist/types/Items/Shape/ShapeData.d.ts +8 -8
- package/dist/types/Items/Shape/index.d.ts +2 -2
- package/dist/types/Items/Sticker/index.d.ts +1 -0
- package/dist/types/Items/Video/index.d.ts +3 -2
- package/dist/types/Items/index.d.ts +19 -8
- package/dist/types/Keyboard/index.d.ts +2 -1
- package/dist/types/Presence/index.d.ts +2 -0
- package/dist/types/Selection/index.d.ts +1 -0
- package/dist/types/Tools/index.d.ts +2 -0
- package/package.json +12 -7
- package/dist/index.js +0 -46565
- package/dist/types/Items/Audio/uploadAudio.d.ts +0 -3
- package/dist/types/Items/Image/uploadImage.d.ts +0 -2
- package/dist/types/Items/Mbr/useDomMbr.d.ts +0 -17
- package/dist/types/Items/Video/uploadVideo.d.ts +0 -2
- /package/dist/types/{browser-entry.d.ts → browser.d.ts} +0 -0
- /package/dist/types/{node-entry.d.ts → node.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Board } from
|
|
2
|
-
import { SyncEvent } from
|
|
1
|
+
import { Board } from "Board";
|
|
2
|
+
import { SyncEvent } from "../Events";
|
|
3
3
|
export interface BoardEventMsg {
|
|
4
|
-
type:
|
|
4
|
+
type: "BoardEvent";
|
|
5
5
|
boardId: string;
|
|
6
6
|
event: SyncEvent;
|
|
7
7
|
sequenceNumber: number;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { Board } from
|
|
2
|
-
export type ViewMode =
|
|
1
|
+
import { Board } from "Board";
|
|
2
|
+
export type ViewMode = "view" | "edit" | "loading";
|
|
3
3
|
export interface ModeMsg {
|
|
4
|
-
type:
|
|
4
|
+
type: "Mode";
|
|
5
5
|
boardId: string;
|
|
6
6
|
mode: ViewMode;
|
|
7
7
|
}
|
|
8
8
|
export declare function handleModeMessage(message: ModeMsg, board: Board): void;
|
|
9
|
+
type PanelType = "titlePanel" | "userPanel";
|
|
10
|
+
/** Tries to find panel in search param, returns default value if not found */
|
|
11
|
+
export declare function shouldShow(panel: PanelType): boolean;
|
|
12
|
+
export declare function isTemplateView(): boolean;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { messageRouter } from "./messageRouter";
|
|
2
|
+
export type { AiChatMsg } from "./handleAiChatMassage";
|
|
3
|
+
export type { BoardEventMsg } from "./handleBoardEventMessage";
|
|
4
|
+
export type { ConfirmationMsg } from "./handleConfirmation";
|
|
5
|
+
export type { SnapshotRequestMsg } from "./handleCreateSnapshotRequestMessage";
|
|
6
|
+
export type { ModeMsg } from "./handleModeMessage";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { Events, createEvents } from "./Events";
|
|
2
|
-
export type { BoardEventBody } from "./Events";
|
|
3
|
-
export type { ItemOperation, EventsOperation, Operation } from "./EventsOperations";
|
|
2
|
+
export type { BoardEventBody, BoardEvent, SyncBoardEvent, SyncEvent, } from "./Events";
|
|
3
|
+
export type { ItemOperation, EventsOperation, Operation, } from "./EventsOperations";
|
|
4
4
|
export type { Command } from "./Command";
|
|
5
|
+
export type { SyncLog } from "./SyncLog";
|
|
6
|
+
export * from "./MessageRouter";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { AudioItem
|
|
2
|
-
export {
|
|
1
|
+
export { AudioItem } from "./Audio.js";
|
|
2
|
+
export type { AudioItemData } from "./Audio.js";
|
|
3
|
+
export { calculateAudioPosition } from "./AudioHelpers.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Comment } from "./Comment";
|
|
2
|
-
export type { CommentData } from "./Comment";
|
|
2
|
+
export type { CommentData, Message as CommentMessage, Commentator } from "./Comment";
|
|
3
3
|
export { CommentCommand } from "./CommentCommand";
|
|
4
4
|
export type { CommentOperation } from "./CommentOperation";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export { Connector } from "./Connector";
|
|
1
|
+
export { Connector, ConnectionLineWidths, CONNECTOR_POINTER_TYPES } from "./Connector";
|
|
2
2
|
export { ConnectorData } from "./ConnectorOperations";
|
|
3
|
-
export type { ConnectorLineStyle } from "./Connector";
|
|
3
|
+
export type { ConnectorLineStyle, ConnectionLineWidth } from "./Connector";
|
|
4
4
|
export type { ConnectorOperation } from "./ConnectorOperations";
|
|
5
|
-
export { BoardPoint, FloatingPoint, FixedPoint, FixedConnectorPoint, } from "./ControlPoint";
|
|
5
|
+
export { BoardPoint, FloatingPoint, FixedPoint, FixedConnectorPoint, toRelativePoint, } from "./ControlPoint";
|
|
6
6
|
export type { ControlPoint } from "./ControlPoint";
|
|
7
|
+
export type { ConnectorEdge } from "./Pointers";
|
|
8
|
+
export type { ConnectorPointerStyle } from "./Pointers/Pointers";
|
|
@@ -2,3 +2,6 @@ export { Frame } from "./Frame";
|
|
|
2
2
|
export type { FrameOperation } from "./FrameOperation";
|
|
3
3
|
export { FrameCommand } from "./FrameCommand";
|
|
4
4
|
export type { FrameData } from "./FrameData";
|
|
5
|
+
export { FRAME_FILL_COLORS } from "./FrameData";
|
|
6
|
+
export { FRAME_TYPES } from "./FrameData";
|
|
7
|
+
export * from "./Basic";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { RichText } from "./RichText";
|
|
2
2
|
export type { RichTextOperation } from "./RichTextOperations";
|
|
3
|
-
export type { TextStyle } from "./Editor/TextNode";
|
|
3
|
+
export type { TextStyle, TextNode } from "./Editor/TextNode";
|
|
4
|
+
export type { BlockNode, ListType } from "./Editor/BlockNode";
|
|
4
5
|
export type { RichTextData } from "./RichTextData";
|
|
6
|
+
export { transformHtmlOrTextToMarkdown } from "./transformHtmlToMarkdown";
|
|
7
|
+
export { getSlateSelectionRect } from "./getSlateSelectionRect";
|
|
8
|
+
export { EditorContainer } from "./EditorContainer";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BorderStyle, BorderWidth } from
|
|
2
|
-
import { RichTextData } from
|
|
3
|
-
import { DefaultRichTextData } from
|
|
4
|
-
import { TransformationData, DefaultTransformationData } from
|
|
5
|
-
import { ShapeType } from
|
|
1
|
+
import { BorderStyle, BorderWidth } from "../Path";
|
|
2
|
+
import { RichTextData } from "../RichText";
|
|
3
|
+
import { DefaultRichTextData } from "../RichText/RichTextData";
|
|
4
|
+
import { TransformationData, DefaultTransformationData } from "../Transformation";
|
|
5
|
+
import { ShapeType } from "./index";
|
|
6
6
|
export interface ShapeData {
|
|
7
|
-
readonly itemType:
|
|
7
|
+
readonly itemType: "Shape";
|
|
8
8
|
shapeType: ShapeType;
|
|
9
9
|
backgroundColor: string;
|
|
10
10
|
backgroundOpacity: number;
|
|
@@ -31,7 +31,7 @@ export declare class DefaultShapeData implements ShapeData {
|
|
|
31
31
|
constructor(shapeType?: ShapeType, backgroundColor?: string, backgroundOpacity?: number, borderColor?: string, borderOpacity?: number, borderStyle?: BorderStyle, borderWidth?: BorderWidth, transformation?: DefaultTransformationData, text?: DefaultRichTextData, linkTo?: string | undefined);
|
|
32
32
|
}
|
|
33
33
|
export declare const ADD_TO_SELECTION = true;
|
|
34
|
-
export declare const DEFAULT_SHAPE: ShapeType |
|
|
34
|
+
export declare const DEFAULT_SHAPE: ShapeType | "None";
|
|
35
35
|
export declare const MIN_STROKE_WIDTH = 1;
|
|
36
36
|
export declare const MAX_STROKE_WIDTH = 12;
|
|
37
37
|
export declare const STEP_STROKE_WIDTH = 1;
|
|
@@ -45,4 +45,4 @@ export declare const SHAPES_CATEGORIES: readonly [{
|
|
|
45
45
|
readonly name: "BPMN";
|
|
46
46
|
readonly shapes: string[];
|
|
47
47
|
}];
|
|
48
|
-
export type ShapeCategoryName = (typeof SHAPES_CATEGORIES)[number][
|
|
48
|
+
export type ShapeCategoryName = (typeof SHAPES_CATEGORIES)[number]["name"];
|
|
@@ -3,6 +3,6 @@ import { BPMN } from "./BPMN";
|
|
|
3
3
|
export { Shape, Shapes } from "./Shape";
|
|
4
4
|
export { ShapeCommand } from "./ShapeCommand";
|
|
5
5
|
export type { ShapeOperation } from "./ShapeOperation";
|
|
6
|
-
export
|
|
7
|
-
export type { ShapeData } from "./ShapeData";
|
|
6
|
+
export type * from "./ShapeData";
|
|
8
7
|
export type ShapeType = keyof typeof BasicShapes | BPMN;
|
|
8
|
+
export { DefaultShapeData } from "./ShapeData";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export type { VideoItemData, VideoConstructorData } from "./Video.js";
|
|
2
|
+
export { VideoItem } from "./Video.js";
|
|
3
|
+
export * from "./VideoHelpers.js";
|
|
@@ -2,12 +2,23 @@ export { Point } from "./Point";
|
|
|
2
2
|
export { Line } from "./Line";
|
|
3
3
|
export { CubicBezier, QuadraticBezier } from "./Curve";
|
|
4
4
|
export { Arc } from "./Arc";
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
5
|
+
export { Mbr, updateRects } from "./Mbr";
|
|
6
|
+
export { DrawingContext } from "./DrawingContext";
|
|
7
|
+
export * from "./Path";
|
|
8
|
+
export * from "./Transformation";
|
|
9
|
+
export * from "./Connector";
|
|
10
|
+
export * from "./RichText";
|
|
11
|
+
export * from "./Shape";
|
|
12
|
+
export * from "./Sticker";
|
|
13
|
+
export * from "./Frame";
|
|
14
|
+
export * from "./Video";
|
|
15
|
+
export * from "./Audio";
|
|
16
|
+
export * from "./AINode";
|
|
17
|
+
export * from "./Point";
|
|
18
|
+
export * from "./Image";
|
|
19
|
+
export * from "./Drawing";
|
|
20
|
+
export * from "./Placeholder";
|
|
21
|
+
export * from "./Group";
|
|
22
|
+
export type { Item, ItemType, ItemData } from "./Item";
|
|
13
23
|
export { Comment } from "./Comment";
|
|
24
|
+
export type { HorisontalAlignment, VerticalAlignment } from "./Alignment";
|
|
@@ -11,6 +11,7 @@ export declare class Keyboard {
|
|
|
11
11
|
keyUp(event: KeyboardEvent): void;
|
|
12
12
|
}
|
|
13
13
|
export { isHotkeyPushed } from "./isHotkeyPushed";
|
|
14
|
-
export
|
|
14
|
+
export * from "./checkHotkeys";
|
|
15
15
|
export { getHotkeyLabel } from "./getHotkeyLabel";
|
|
16
16
|
export { isControlCharacter } from "./isControlCharacter";
|
|
17
|
+
export type { HotkeysMap } from "./types";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microboard-temp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "A flexible interactive whiteboard library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -26,14 +26,15 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
|
-
"
|
|
30
|
-
"build:browser:
|
|
31
|
-
"build:
|
|
32
|
-
"build:node:
|
|
29
|
+
"clean": "rimraf dist",
|
|
30
|
+
"build:browser:esm": "bun build ./src/browser.ts --outdir ./dist/esm --target browser --format esm",
|
|
31
|
+
"build:browser:cjs": "bun build ./src/browser.ts --outdir ./dist/cjs --target browser --format cjs",
|
|
32
|
+
"build:node:esm": "bun build ./src/node.ts --outdir ./dist/esm --target node --format esm",
|
|
33
|
+
"build:node:cjs": "bun build ./src/node.ts --outdir ./dist/cjs --target node --format cjs",
|
|
33
34
|
"build:index:esm": "bun build ./src/index.ts --outdir ./dist/esm --target browser --format esm",
|
|
34
35
|
"build:index:cjs": "bun build ./src/index.ts --outdir ./dist/cjs --target browser --format cjs",
|
|
35
36
|
"build:types": "tsc --noEmit false --emitDeclarationOnly --declaration --declarationDir ./dist/types --skipLibCheck",
|
|
36
|
-
"build": "bun run build:browser:esm && bun run build:browser:cjs && bun run build:node:esm && bun run build:node:cjs && bun run build:index:esm && bun run build:index:cjs && bun run build:types",
|
|
37
|
+
"build": "bun run clean && bun run build:browser:esm && bun run build:browser:cjs && bun run build:node:esm && bun run build:node:cjs && bun run build:index:esm && bun run build:index:cjs && bun run build:types",
|
|
37
38
|
"dev": "bun build ./src/index.ts --outdir ./dist --target browser --format esm --watch",
|
|
38
39
|
"test": "bun test",
|
|
39
40
|
"lint": "eslint src/**/*.{ts,tsx}"
|
|
@@ -60,13 +61,17 @@
|
|
|
60
61
|
"slate-history": "^0.113.1",
|
|
61
62
|
"unified": "^11.0.5",
|
|
62
63
|
"remark-parse": "^11.0.0",
|
|
64
|
+
"remark-stringify": "11.0.0",
|
|
63
65
|
"remark-slate": "^1.8.6",
|
|
66
|
+
"rehype-parse": "9.0.1",
|
|
67
|
+
"rehype-remark": "10.0.1",
|
|
64
68
|
"canvas": "^2.11.2",
|
|
65
69
|
"css.escape": "^1.5.1",
|
|
66
70
|
"i18next": "^23.4.4",
|
|
67
71
|
"i18next-browser-languagedetector": "^7.1.0",
|
|
68
72
|
"react-i18next": "^13.4.1",
|
|
69
|
-
"jsdom": "26.1.0"
|
|
73
|
+
"jsdom": "26.1.0",
|
|
74
|
+
"rimraf": "^6.0.1"
|
|
70
75
|
},
|
|
71
76
|
"repository": {
|
|
72
77
|
"type": "git",
|