microboard-temp 0.1.7 → 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.
@@ -1,7 +1,7 @@
1
- import { Board } from 'Board';
2
- import { SyncEvent } from '../Events';
1
+ import { Board } from "Board";
2
+ import { SyncEvent } from "../Events";
3
3
  export interface BoardEventMsg {
4
- type: 'BoardEvent';
4
+ type: "BoardEvent";
5
5
  boardId: string;
6
6
  event: SyncEvent;
7
7
  sequenceNumber: number;
@@ -1,8 +1,13 @@
1
- import { Board } from 'Board';
2
- export type ViewMode = 'view' | 'edit' | 'loading';
1
+ import { Board } from "Board";
2
+ export type ViewMode = "view" | "edit" | "loading";
3
3
  export interface ModeMsg {
4
- type: 'Mode';
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
1
  export { AINode, CONTEXT_NODE_HIGHLIGHT_COLOR } from "./AINode.js";
2
- export { AINodeData } from "./AINodeData.js";
2
+ export type { AINodeData } from "./AINodeData.js";
3
+ export type { ThreadDirection } from "./AINode.js";
@@ -1,2 +1,3 @@
1
- export { AudioItem, AudioItemData } from './Audio.js';
2
- export { uploadAudio } from './uploadAudio.js';
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,2 +1,4 @@
1
1
  export * from "./Image";
2
2
  export * from "./ImageOperation";
3
+ export * from "./ImageHelpers";
4
+ export { calculatePosition } from "./calculatePosition";
@@ -1 +1,2 @@
1
1
  export { Mbr } from "./Mbr";
2
+ export { updateRects } from "./updateRects";
@@ -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 '../Path';
2
- import { RichTextData } from '../RichText';
3
- import { DefaultRichTextData } from '../RichText/RichTextData';
4
- import { TransformationData, DefaultTransformationData } from '../Transformation';
5
- import { ShapeType } from './index';
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: 'Shape';
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 | 'None';
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]['name'];
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 { DefaultShapeData } from "./ShapeData";
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 +1,2 @@
1
1
  export * from "./Sticker";
2
+ export * from "./StickerOperation";
@@ -1,4 +1,3 @@
1
- export type { VideoItemData, VideoConstructorData } from './Video.js';
2
- export { VideoItem } from './Video.js';
1
+ export type { VideoItemData, VideoConstructorData } from "./Video.js";
2
+ export { VideoItem } from "./Video.js";
3
3
  export * from "./VideoHelpers.js";
4
- export { uploadVideo } from './uploadVideo.js';
@@ -2,17 +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 { Path, Paths } from "./Path";
6
- export { Mbr } from "./Mbr";
5
+ export { Mbr, updateRects } from "./Mbr";
6
+ export { DrawingContext } from "./DrawingContext";
7
+ export * from "./Path";
7
8
  export * from "./Transformation";
8
- export type { ConnectorOperation } from "./Connector";
9
- export type { RichTextData, RichTextOperation } from "./RichText";
10
- export type { ShapeData } from "./Shape";
11
- export type { FrameData } from "./Frame";
12
- export { Connector, ConnectorData } from "./Connector";
13
- export { RichText } from "./RichText";
14
- export { Shape } from "./Shape";
15
- export { Frame } from "./Frame";
9
+ export * from "./Connector";
10
+ export * from "./RichText";
11
+ export * from "./Shape";
12
+ export * from "./Sticker";
13
+ export * from "./Frame";
16
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";
17
22
  export type { Item, ItemType, ItemData } from "./Item";
18
23
  export { Comment } from "./Comment";
24
+ export type { HorisontalAlignment, VerticalAlignment } from "./Alignment";
@@ -14,3 +14,4 @@ export { isHotkeyPushed } from "./isHotkeyPushed";
14
14
  export * from "./checkHotkeys";
15
15
  export { getHotkeyLabel } from "./getHotkeyLabel";
16
16
  export { isControlCharacter } from "./isControlCharacter";
17
+ export type { HotkeysMap } from "./types";
@@ -1 +1,3 @@
1
+ export { ExportSnapshot } from "./ExportSnapshot/ExportSnapshot";
2
+ export { exportBoardSnapshot } from "./ExportSnapshot/exportBoardSnapshot";
1
3
  export { Tools } from "./Tools";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.1.7",
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",
@@ -61,7 +61,10 @@
61
61
  "slate-history": "^0.113.1",
62
62
  "unified": "^11.0.5",
63
63
  "remark-parse": "^11.0.0",
64
+ "remark-stringify": "11.0.0",
64
65
  "remark-slate": "^1.8.6",
66
+ "rehype-parse": "9.0.1",
67
+ "rehype-remark": "10.0.1",
65
68
  "canvas": "^2.11.2",
66
69
  "css.escape": "^1.5.1",
67
70
  "i18next": "^23.4.4",
@@ -1,3 +0,0 @@
1
- import { Board } from 'Board';
2
- import { NotifyFunction } from 'shared/ui-lib/Toast/notify';
3
- export declare function uploadAudio(file: File, board: Board, notify: NotifyFunction, extension: string, accessToken: string | null): void;
@@ -1,2 +0,0 @@
1
- import { Board } from 'Board';
2
- export declare function uploadImage(file: File, board: Board, accessToken: string | null): void;
@@ -1,17 +0,0 @@
1
- import { type App } from 'App';
2
- import { type Board } from 'Board';
3
- import { Mbr } from 'Items';
4
- import { type RefObject } from 'react';
5
- import type { SubjectName } from 'App/getSubscriptions';
6
- type Params = {
7
- app: App;
8
- board: Board;
9
- ref: RefObject<HTMLElement>;
10
- subjects?: SubjectName[];
11
- targetMbr?: Mbr;
12
- verticalOffset?: number;
13
- horizontalOffset?: number;
14
- fit?: 'contextPanel' | 'linkToBtn' | 'comment' | 'threadPanel' | 'boardMenu' | 'hyperLink';
15
- };
16
- export declare function useDomMbr({ app, board, ref, subjects, targetMbr, horizontalOffset, verticalOffset, fit, }: Params): any;
17
- export {};
@@ -1,2 +0,0 @@
1
- import { Board } from 'Board';
2
- export declare function uploadVideo(file: File, board: Board, notify: NotifyFunction, extension: 'mp4' | 'webm', accessToken: string | null): void;