@g9tm/lynxcontrols-canvas 0.0.0-stage → 2.5.9
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/README.md +39 -2
- package/catalog/cards/G9Canvas.md +17 -0
- package/catalog/cards/G9CanvasStylePanel.md +13 -0
- package/catalog/catalog.json +2334 -0
- package/catalog/index.md +6 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/board-controller.d.ts +161 -0
- package/dist/board-controller.d.ts.map +1 -0
- package/dist/board-controller.jsx +812 -0
- package/dist/board-model.d.ts +42 -0
- package/dist/board-model.d.ts.map +1 -0
- package/dist/board-model.jsx +66 -0
- package/dist/canvas.css +81 -0
- package/dist/canvas.css.map +1 -0
- package/dist/canvas.d.ts +144 -0
- package/dist/canvas.d.ts.map +1 -0
- package/dist/canvas.jsx +481 -0
- package/dist/element-core.d.ts +155 -0
- package/dist/element-core.d.ts.map +1 -0
- package/dist/element-core.jsx +1104 -0
- package/dist/export.d.ts +7 -0
- package/dist/export.d.ts.map +1 -0
- package/dist/export.jsx +75 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.jsx +7 -0
- package/dist/observable.d.ts +5 -0
- package/dist/observable.d.ts.map +1 -0
- package/dist/observable.jsx +14 -0
- package/dist/protocol.d.ts +258 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.jsx +2 -0
- package/dist/scene/edit.d.ts +59 -0
- package/dist/scene/edit.d.ts.map +1 -0
- package/dist/scene/edit.jsx +895 -0
- package/dist/scene/elements.d.ts +160 -0
- package/dist/scene/elements.d.ts.map +1 -0
- package/dist/scene/elements.jsx +392 -0
- package/dist/scene/geometry.d.ts +36 -0
- package/dist/scene/geometry.d.ts.map +1 -0
- package/dist/scene/geometry.jsx +367 -0
- package/dist/scene/index.d.ts +8 -0
- package/dist/scene/index.d.ts.map +1 -0
- package/dist/scene/index.jsx +6 -0
- package/dist/scene/path-data-parser.d.ts +17 -0
- package/dist/scene/path-data-parser.d.ts.map +1 -0
- package/dist/scene/path-data-parser.jsx +128 -0
- package/dist/scene/scene.d.ts +58 -0
- package/dist/scene/scene.d.ts.map +1 -0
- package/dist/scene/scene.jsx +169 -0
- package/dist/scene/shapes.d.ts +24 -0
- package/dist/scene/shapes.d.ts.map +1 -0
- package/dist/scene/shapes.jsx +807 -0
- package/dist/scene/types.d.ts +118 -0
- package/dist/scene/types.d.ts.map +1 -0
- package/dist/scene/types.jsx +1 -0
- package/dist/words.d.ts +100 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.jsx +186 -0
- package/package.json +50 -4
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The whiteboard's scene format: Excalidraw 0.18 elements, exactly as the web app (Excalidraw) and the server
|
|
3
|
+
* (`BoardElements`, reconciled per element) store them. The Lynx app reads and writes the same JSON — a board edited
|
|
4
|
+
* here and in the web app at the same time converges and looks the same on both. Only the fields this app uses are
|
|
5
|
+
* typed; unknown fields of elements made elsewhere are kept untouched (`[key: string]: unknown`).
|
|
6
|
+
*/
|
|
7
|
+
export type Point = [number, number];
|
|
8
|
+
/** An element's kind (Excalidraw's). */
|
|
9
|
+
export type ElementType = 'rectangle' | 'ellipse' | 'diamond' | 'arrow' | 'line' | 'freedraw' | 'text' | 'image' | 'frame' | 'magicframe' | 'embeddable' | 'iframe' | 'selection';
|
|
10
|
+
/** How a shape is filled. */
|
|
11
|
+
export type FillStyle = 'hachure' | 'cross-hatch' | 'solid' | 'zigzag';
|
|
12
|
+
/** How a stroke is drawn. */
|
|
13
|
+
export type StrokeStyle = 'solid' | 'dashed' | 'dotted';
|
|
14
|
+
/** A text's alignment. */
|
|
15
|
+
export type TextAlign = 'left' | 'center' | 'right';
|
|
16
|
+
/** A label's place inside its container. */
|
|
17
|
+
export type VerticalAlign = 'top' | 'middle' | 'bottom';
|
|
18
|
+
/** An arrow's head at one end. */
|
|
19
|
+
export type Arrowhead = 'arrow' | 'bar' | 'dot' | 'circle' | 'circle_outline' | 'triangle' | 'triangle_outline' | 'diamond' | 'diamond_outline' | 'crowfoot_one' | 'crowfoot_many' | 'crowfoot_one_or_many';
|
|
20
|
+
/** A shape's corners (a kind and an optional radius). */
|
|
21
|
+
export interface Roundness {
|
|
22
|
+
type: number;
|
|
23
|
+
value?: number;
|
|
24
|
+
}
|
|
25
|
+
/** An element bound to this one (a label, an arrow). */
|
|
26
|
+
export interface BoundElement {
|
|
27
|
+
id: string;
|
|
28
|
+
type: 'arrow' | 'text';
|
|
29
|
+
}
|
|
30
|
+
/** Where an arrow's end is bound (the element, focus and gap). */
|
|
31
|
+
export interface PointBinding {
|
|
32
|
+
elementId: string;
|
|
33
|
+
focus: number;
|
|
34
|
+
gap: number;
|
|
35
|
+
fixedPoint?: [number, number] | null;
|
|
36
|
+
}
|
|
37
|
+
/** A board element (Excalidraw's element model). */
|
|
38
|
+
export interface ExElement {
|
|
39
|
+
id: string;
|
|
40
|
+
type: ElementType | string;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
angle: number;
|
|
46
|
+
strokeColor: string;
|
|
47
|
+
backgroundColor: string;
|
|
48
|
+
fillStyle: FillStyle;
|
|
49
|
+
strokeWidth: number;
|
|
50
|
+
strokeStyle: StrokeStyle;
|
|
51
|
+
roughness: number;
|
|
52
|
+
opacity: number;
|
|
53
|
+
groupIds: string[];
|
|
54
|
+
frameId: string | null;
|
|
55
|
+
index: string | null;
|
|
56
|
+
roundness: Roundness | null;
|
|
57
|
+
seed: number;
|
|
58
|
+
version: number;
|
|
59
|
+
versionNonce: number;
|
|
60
|
+
isDeleted: boolean;
|
|
61
|
+
boundElements: BoundElement[] | null;
|
|
62
|
+
updated: number;
|
|
63
|
+
link: string | null;
|
|
64
|
+
locked: boolean;
|
|
65
|
+
customData?: Record<string, unknown>;
|
|
66
|
+
text?: string;
|
|
67
|
+
originalText?: string;
|
|
68
|
+
fontSize?: number;
|
|
69
|
+
fontFamily?: number;
|
|
70
|
+
textAlign?: TextAlign;
|
|
71
|
+
verticalAlign?: VerticalAlign;
|
|
72
|
+
containerId?: string | null;
|
|
73
|
+
autoResize?: boolean;
|
|
74
|
+
lineHeight?: number;
|
|
75
|
+
points?: Point[];
|
|
76
|
+
lastCommittedPoint?: Point | null;
|
|
77
|
+
startBinding?: PointBinding | null;
|
|
78
|
+
endBinding?: PointBinding | null;
|
|
79
|
+
startArrowhead?: Arrowhead | null;
|
|
80
|
+
endArrowhead?: Arrowhead | null;
|
|
81
|
+
elbowed?: boolean;
|
|
82
|
+
pressures?: number[];
|
|
83
|
+
simulatePressure?: boolean;
|
|
84
|
+
fileId?: string | null;
|
|
85
|
+
status?: 'pending' | 'saved' | 'error';
|
|
86
|
+
scale?: [number, number];
|
|
87
|
+
crop?: {
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
naturalWidth: number;
|
|
93
|
+
naturalHeight: number;
|
|
94
|
+
} | null;
|
|
95
|
+
name?: string | null;
|
|
96
|
+
[key: string]: unknown;
|
|
97
|
+
}
|
|
98
|
+
/** The drawing tools of the toolbar (Excalidraw's names where they exist). */
|
|
99
|
+
export type Tool = 'selection' | 'hand' | 'rectangle' | 'diamond' | 'ellipse' | 'arrow' | 'line' | 'freedraw' | 'text' | 'eraser' | 'image' | 'frame' | 'laser';
|
|
100
|
+
/** The style new elements get (Excalidraw's `currentItem*`). */
|
|
101
|
+
export interface ItemStyle {
|
|
102
|
+
strokeColor: string;
|
|
103
|
+
backgroundColor: string;
|
|
104
|
+
fillStyle: FillStyle;
|
|
105
|
+
strokeWidth: number;
|
|
106
|
+
strokeStyle: StrokeStyle;
|
|
107
|
+
roughness: number;
|
|
108
|
+
opacity: number;
|
|
109
|
+
roundness: 'round' | 'sharp';
|
|
110
|
+
fontSize: number;
|
|
111
|
+
fontFamily: number;
|
|
112
|
+
textAlign: TextAlign;
|
|
113
|
+
startArrowhead: Arrowhead | null;
|
|
114
|
+
endArrowhead: Arrowhead | null;
|
|
115
|
+
}
|
|
116
|
+
/** An axis-aligned box in scene coordinates: [x1, y1, x2, y2]. */
|
|
117
|
+
export type Bounds = [number, number, number, number];
|
|
118
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/scene/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAErC,wCAAwC;AACxC,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,GACN,UAAU,GACV,MAAM,GACN,OAAO,GACP,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,WAAW,CAAC;AAEhB,6BAA6B;AAC7B,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AACvE,6BAA6B;AAC7B,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACxD,0BAA0B;AAC1B,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AACpD,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACxD,kCAAkC;AAClC,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,KAAK,GACL,KAAK,GACL,QAAQ,GACR,gBAAgB,GAChB,UAAU,GACV,kBAAkB,GAClB,SAAS,GACT,iBAAiB,GACjB,cAAc,GACd,eAAe,GACf,sBAAsB,CAAC;AAE3B,yDAAyD;AACzD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;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GAAG,IAAI,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,8EAA8E;AAC9E,MAAM,MAAM,IAAI,GACZ,WAAW,GACX,MAAM,GACN,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,GACN,UAAU,GACV,MAAM,GACN,QAAQ,GACR,OAAO,GACP,OAAO,GACP,OAAO,CAAC;AAEZ,gEAAgE;AAChE,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;CAChC;AAED,kEAAkE;AAClE,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/words.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
declare const en: {
|
|
2
|
+
tools: {
|
|
3
|
+
selection: string;
|
|
4
|
+
hand: string;
|
|
5
|
+
rectangle: string;
|
|
6
|
+
diamond: string;
|
|
7
|
+
ellipse: string;
|
|
8
|
+
arrow: string;
|
|
9
|
+
line: string;
|
|
10
|
+
freedraw: string;
|
|
11
|
+
text: string;
|
|
12
|
+
eraser: string;
|
|
13
|
+
image: string;
|
|
14
|
+
frame: string;
|
|
15
|
+
laser: string;
|
|
16
|
+
more: string;
|
|
17
|
+
};
|
|
18
|
+
style: {
|
|
19
|
+
title: string;
|
|
20
|
+
stroke: string;
|
|
21
|
+
background: string;
|
|
22
|
+
fill: string;
|
|
23
|
+
hachure: string;
|
|
24
|
+
crossHatch: string;
|
|
25
|
+
solid: string;
|
|
26
|
+
strokeWidth: string;
|
|
27
|
+
thin: string;
|
|
28
|
+
bold: string;
|
|
29
|
+
extraBold: string;
|
|
30
|
+
strokeStyle: string;
|
|
31
|
+
dashed: string;
|
|
32
|
+
dotted: string;
|
|
33
|
+
sloppiness: string;
|
|
34
|
+
architect: string;
|
|
35
|
+
artist: string;
|
|
36
|
+
cartoonist: string;
|
|
37
|
+
edges: string;
|
|
38
|
+
sharp: string;
|
|
39
|
+
round: string;
|
|
40
|
+
opacity: string;
|
|
41
|
+
fontSize: string;
|
|
42
|
+
small: string;
|
|
43
|
+
medium: string;
|
|
44
|
+
large: string;
|
|
45
|
+
huge: string;
|
|
46
|
+
fontFamily: string;
|
|
47
|
+
handDrawn: string;
|
|
48
|
+
normal: string;
|
|
49
|
+
code: string;
|
|
50
|
+
textAlign: string;
|
|
51
|
+
left: string;
|
|
52
|
+
center: string;
|
|
53
|
+
right: string;
|
|
54
|
+
arrowheads: string;
|
|
55
|
+
start: string;
|
|
56
|
+
end: string;
|
|
57
|
+
none: string;
|
|
58
|
+
transparent: string;
|
|
59
|
+
layers: string;
|
|
60
|
+
toFront: string;
|
|
61
|
+
forward: string;
|
|
62
|
+
backward: string;
|
|
63
|
+
toBack: string;
|
|
64
|
+
};
|
|
65
|
+
actions: {
|
|
66
|
+
undo: string;
|
|
67
|
+
redo: string;
|
|
68
|
+
zoomIn: string;
|
|
69
|
+
zoomOut: string;
|
|
70
|
+
resetZoom: string;
|
|
71
|
+
fit: string;
|
|
72
|
+
delete: string;
|
|
73
|
+
duplicate: string;
|
|
74
|
+
selectAll: string;
|
|
75
|
+
group: string;
|
|
76
|
+
ungroup: string;
|
|
77
|
+
lock: string;
|
|
78
|
+
unlock: string;
|
|
79
|
+
clear: string;
|
|
80
|
+
clearConfirm: string;
|
|
81
|
+
clearHint: string;
|
|
82
|
+
editText: string;
|
|
83
|
+
textPlaceholder: string;
|
|
84
|
+
done: string;
|
|
85
|
+
imageTooLarge: string;
|
|
86
|
+
uploading: string;
|
|
87
|
+
desktopViewOnly: string;
|
|
88
|
+
openInBrowser: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
/** The shape of the whiteboard's words. */
|
|
92
|
+
export type G9CanvasWords = typeof en;
|
|
93
|
+
/** The whiteboard's English words. */
|
|
94
|
+
export declare const g9CanvasWordsEn: G9CanvasWords;
|
|
95
|
+
/** The whiteboard's Persian words. */
|
|
96
|
+
export declare const g9CanvasWordsFa: G9CanvasWords;
|
|
97
|
+
/** The words for a language (Persian for `fa`, else English). */
|
|
98
|
+
export declare function g9CanvasWords(language: string): G9CanvasWords;
|
|
99
|
+
export {};
|
|
100
|
+
//# sourceMappingURL=words.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"words.d.ts","sourceRoot":"","sources":["../src/words.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFP,CAAC;AA6FF,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GAAG,OAAO,EAAE,CAAC;AAEtC,sCAAsC;AACtC,eAAO,MAAM,eAAe,EAAE,aAAkB,CAAC;AAEjD,sCAAsC;AACtC,eAAO,MAAM,eAAe,EAAE,aAAkB,CAAC;AAEjD,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAE7D"}
|
package/dist/words.jsx
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
const en = {
|
|
2
|
+
tools: {
|
|
3
|
+
selection: 'Select',
|
|
4
|
+
hand: 'Hand (pan)',
|
|
5
|
+
rectangle: 'Rectangle',
|
|
6
|
+
diamond: 'Diamond',
|
|
7
|
+
ellipse: 'Ellipse',
|
|
8
|
+
arrow: 'Arrow',
|
|
9
|
+
line: 'Line',
|
|
10
|
+
freedraw: 'Draw',
|
|
11
|
+
text: 'Text',
|
|
12
|
+
eraser: 'Eraser',
|
|
13
|
+
image: 'Insert picture',
|
|
14
|
+
frame: 'Frame',
|
|
15
|
+
laser: 'Laser pointer',
|
|
16
|
+
more: 'More tools'
|
|
17
|
+
},
|
|
18
|
+
style: {
|
|
19
|
+
title: 'Style',
|
|
20
|
+
stroke: 'Stroke',
|
|
21
|
+
background: 'Background',
|
|
22
|
+
fill: 'Fill',
|
|
23
|
+
hachure: 'Hachure',
|
|
24
|
+
crossHatch: 'Cross-hatch',
|
|
25
|
+
solid: 'Solid',
|
|
26
|
+
strokeWidth: 'Stroke width',
|
|
27
|
+
thin: 'Thin',
|
|
28
|
+
bold: 'Bold',
|
|
29
|
+
extraBold: 'Extra bold',
|
|
30
|
+
strokeStyle: 'Stroke style',
|
|
31
|
+
dashed: 'Dashed',
|
|
32
|
+
dotted: 'Dotted',
|
|
33
|
+
sloppiness: 'Sloppiness',
|
|
34
|
+
architect: 'Architect',
|
|
35
|
+
artist: 'Artist',
|
|
36
|
+
cartoonist: 'Cartoonist',
|
|
37
|
+
edges: 'Edges',
|
|
38
|
+
sharp: 'Sharp',
|
|
39
|
+
round: 'Round',
|
|
40
|
+
opacity: 'Opacity',
|
|
41
|
+
fontSize: 'Font size',
|
|
42
|
+
small: 'S',
|
|
43
|
+
medium: 'M',
|
|
44
|
+
large: 'L',
|
|
45
|
+
huge: 'XL',
|
|
46
|
+
fontFamily: 'Font',
|
|
47
|
+
handDrawn: 'Hand-drawn',
|
|
48
|
+
normal: 'Normal',
|
|
49
|
+
code: 'Code',
|
|
50
|
+
textAlign: 'Text align',
|
|
51
|
+
left: 'Left',
|
|
52
|
+
center: 'Center',
|
|
53
|
+
right: 'Right',
|
|
54
|
+
arrowheads: 'Arrowheads',
|
|
55
|
+
start: 'Start',
|
|
56
|
+
end: 'End',
|
|
57
|
+
none: 'None',
|
|
58
|
+
transparent: 'Transparent',
|
|
59
|
+
layers: 'Layers',
|
|
60
|
+
toFront: 'Bring to front',
|
|
61
|
+
forward: 'Bring forward',
|
|
62
|
+
backward: 'Send backward',
|
|
63
|
+
toBack: 'Send to back'
|
|
64
|
+
},
|
|
65
|
+
actions: {
|
|
66
|
+
undo: 'Undo',
|
|
67
|
+
redo: 'Redo',
|
|
68
|
+
zoomIn: 'Zoom in',
|
|
69
|
+
zoomOut: 'Zoom out',
|
|
70
|
+
resetZoom: 'Reset zoom',
|
|
71
|
+
fit: 'Zoom to fit',
|
|
72
|
+
delete: 'Delete',
|
|
73
|
+
duplicate: 'Duplicate',
|
|
74
|
+
selectAll: 'Select all',
|
|
75
|
+
group: 'Group',
|
|
76
|
+
ungroup: 'Ungroup',
|
|
77
|
+
lock: 'Lock',
|
|
78
|
+
unlock: 'Unlock',
|
|
79
|
+
clear: 'Clear the board',
|
|
80
|
+
clearConfirm: 'Clear the whole board?',
|
|
81
|
+
clearHint: 'Everything on it is deleted for everyone (you can undo it).',
|
|
82
|
+
editText: 'Edit text',
|
|
83
|
+
textPlaceholder: 'Type the text',
|
|
84
|
+
done: 'Done',
|
|
85
|
+
imageTooLarge: 'The picture is too large',
|
|
86
|
+
uploading: 'Uploading the picture…',
|
|
87
|
+
desktopViewOnly: 'Drawing on the desktop app opens the board in your browser.',
|
|
88
|
+
openInBrowser: 'Open in the browser'
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const fa = {
|
|
92
|
+
tools: {
|
|
93
|
+
selection: 'انتخاب',
|
|
94
|
+
hand: 'دست (جابهجایی نما)',
|
|
95
|
+
rectangle: 'مستطیل',
|
|
96
|
+
diamond: 'لوزی',
|
|
97
|
+
ellipse: 'بیضی',
|
|
98
|
+
arrow: 'پیکان',
|
|
99
|
+
line: 'خط',
|
|
100
|
+
freedraw: 'قلم',
|
|
101
|
+
text: 'متن',
|
|
102
|
+
eraser: 'پاککن',
|
|
103
|
+
image: 'افزودن تصویر',
|
|
104
|
+
frame: 'قاب',
|
|
105
|
+
laser: 'اشارهگر لیزری',
|
|
106
|
+
more: 'ابزارهای بیشتر'
|
|
107
|
+
},
|
|
108
|
+
style: {
|
|
109
|
+
title: 'سبک',
|
|
110
|
+
stroke: 'رنگ خط',
|
|
111
|
+
background: 'پسزمینه',
|
|
112
|
+
fill: 'پرکردن',
|
|
113
|
+
hachure: 'هاشور',
|
|
114
|
+
crossHatch: 'هاشور متقاطع',
|
|
115
|
+
solid: 'یکدست',
|
|
116
|
+
strokeWidth: 'ضخامت خط',
|
|
117
|
+
thin: 'نازک',
|
|
118
|
+
bold: 'ضخیم',
|
|
119
|
+
extraBold: 'خیلی ضخیم',
|
|
120
|
+
strokeStyle: 'نوع خط',
|
|
121
|
+
dashed: 'خطچین',
|
|
122
|
+
dotted: 'نقطهچین',
|
|
123
|
+
sloppiness: 'دستخطی بودن',
|
|
124
|
+
architect: 'دقیق',
|
|
125
|
+
artist: 'هنری',
|
|
126
|
+
cartoonist: 'کارتونی',
|
|
127
|
+
edges: 'گوشهها',
|
|
128
|
+
sharp: 'تیز',
|
|
129
|
+
round: 'گرد',
|
|
130
|
+
opacity: 'شفافیت',
|
|
131
|
+
fontSize: 'اندازهٔ قلم',
|
|
132
|
+
small: 'ک',
|
|
133
|
+
medium: 'م',
|
|
134
|
+
large: 'ب',
|
|
135
|
+
huge: 'خب',
|
|
136
|
+
fontFamily: 'قلم',
|
|
137
|
+
handDrawn: 'دستنویس',
|
|
138
|
+
normal: 'معمولی',
|
|
139
|
+
code: 'کد',
|
|
140
|
+
textAlign: 'چینش متن',
|
|
141
|
+
left: 'چپ',
|
|
142
|
+
center: 'وسط',
|
|
143
|
+
right: 'راست',
|
|
144
|
+
arrowheads: 'سرِ پیکان',
|
|
145
|
+
start: 'آغاز',
|
|
146
|
+
end: 'پایان',
|
|
147
|
+
none: 'هیچ',
|
|
148
|
+
transparent: 'بیرنگ',
|
|
149
|
+
layers: 'لایهها',
|
|
150
|
+
toFront: 'بالاترین لایه',
|
|
151
|
+
forward: 'یک لایه بالاتر',
|
|
152
|
+
backward: 'یک لایه پایینتر',
|
|
153
|
+
toBack: 'پایینترین لایه'
|
|
154
|
+
},
|
|
155
|
+
actions: {
|
|
156
|
+
undo: 'واگرد',
|
|
157
|
+
redo: 'ازنو',
|
|
158
|
+
zoomIn: 'بزرگنمایی',
|
|
159
|
+
zoomOut: 'کوچکنمایی',
|
|
160
|
+
resetZoom: 'اندازهٔ واقعی',
|
|
161
|
+
fit: 'نمایش همه',
|
|
162
|
+
delete: 'حذف',
|
|
163
|
+
duplicate: 'تکثیر',
|
|
164
|
+
selectAll: 'انتخاب همه',
|
|
165
|
+
group: 'گروه کردن',
|
|
166
|
+
ungroup: 'لغو گروه',
|
|
167
|
+
lock: 'قفل',
|
|
168
|
+
unlock: 'باز کردن قفل',
|
|
169
|
+
clear: 'پاک کردن وایتبرد',
|
|
170
|
+
clearConfirm: 'همهٔ وایتبرد پاک شود؟',
|
|
171
|
+
clearHint: 'همهچیز برای همه حذف میشود (میتوانید واگرد کنید).',
|
|
172
|
+
editText: 'ویرایش متن',
|
|
173
|
+
textPlaceholder: 'متن را بنویسید',
|
|
174
|
+
done: 'تمام',
|
|
175
|
+
imageTooLarge: 'تصویر خیلی بزرگ است',
|
|
176
|
+
uploading: 'در حال بارگذاری تصویر…',
|
|
177
|
+
desktopViewOnly: 'برای کشیدن در برنامهٔ رومیزی، وایتبرد را در مرورگر باز کنید.',
|
|
178
|
+
openInBrowser: 'باز کردن در مرورگر'
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
const g9CanvasWordsEn = en;
|
|
182
|
+
const g9CanvasWordsFa = fa;
|
|
183
|
+
function g9CanvasWords(language) {
|
|
184
|
+
return 'fa' === language ? fa : en;
|
|
185
|
+
}
|
|
186
|
+
export { g9CanvasWords, g9CanvasWordsEn, g9CanvasWordsFa };
|
package/package.json
CHANGED
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/lynxcontrols-canvas",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2.5.9",
|
|
4
|
+
"description": "A whiteboard for G9LynxControls (G9Hub boards): G9Canvas on the host's <g9-canvas> element (Android, iOS, web) with an Excalidraw-compatible scene (shapes, arrows bound to shapes, free drawing, text, frames, pictures), the board controller (tools, selection, styles, undo, collaborators' pointers) and the style panel.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"**/*.css"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"source": "./src/index.ts",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.jsx"
|
|
15
|
+
},
|
|
16
|
+
"./protocol": {
|
|
17
|
+
"source": "./src/protocol.ts",
|
|
18
|
+
"types": "./dist/protocol.d.ts",
|
|
19
|
+
"default": "./dist/protocol.jsx"
|
|
20
|
+
},
|
|
21
|
+
"./element-core": {
|
|
22
|
+
"source": "./src/element-core.ts",
|
|
23
|
+
"types": "./dist/element-core.d.ts",
|
|
24
|
+
"default": "./dist/element-core.jsx"
|
|
25
|
+
},
|
|
26
|
+
"./scene": {
|
|
27
|
+
"source": "./src/scene/index.ts",
|
|
28
|
+
"types": "./dist/scene/index.d.ts",
|
|
29
|
+
"default": "./dist/scene/index.jsx"
|
|
30
|
+
},
|
|
31
|
+
"./catalog": "./catalog/catalog.json"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"README.md",
|
|
36
|
+
"catalog"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "rslib build"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@g9tm/lynxcontrols-foundation": "2.5.9",
|
|
43
|
+
"fractional-indexing": "3.2.0",
|
|
44
|
+
"path-data-parser": "0.1.0",
|
|
45
|
+
"perfect-freehand": "1.2.0",
|
|
46
|
+
"roughjs": "4.6.4"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@g9tm/lynxcontrols": "2.5.9",
|
|
50
|
+
"@lynx-js/react": ">=0.129.3 <0.130.0"
|
|
51
|
+
}
|
|
52
|
+
}
|