@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,160 @@
|
|
|
1
|
+
import type { Arrowhead, ExElement, ItemStyle, Point, Roundness } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* New elements and edits, exactly the way Excalidraw 0.18 makes them (`newElement`, `newTextElement`,
|
|
4
|
+
* `newLinearElement`, `newArrowElement`, `newFreeDrawElement`, `newImageElement`, `newFrameElement`, `mutateElement`):
|
|
5
|
+
* the same fields and defaults, so an element drawn here is a normal Excalidraw element in the web app.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ROUGHNESS: {
|
|
8
|
+
readonly architect: 0;
|
|
9
|
+
readonly artist: 1;
|
|
10
|
+
readonly cartoonist: 2;
|
|
11
|
+
};
|
|
12
|
+
/** Excalidraw's roundness kinds. */
|
|
13
|
+
export declare const ROUNDNESS: {
|
|
14
|
+
readonly LEGACY: 1;
|
|
15
|
+
readonly PROPORTIONAL_RADIUS: 2;
|
|
16
|
+
readonly ADAPTIVE_RADIUS: 3;
|
|
17
|
+
};
|
|
18
|
+
/** The corner of a proportional roundness, as a part of the shorter side. */
|
|
19
|
+
export declare const DEFAULT_PROPORTIONAL_RADIUS = 0.25;
|
|
20
|
+
/** The corner of an adaptive roundness (dp). */
|
|
21
|
+
export declare const DEFAULT_ADAPTIVE_RADIUS = 32;
|
|
22
|
+
/** How close (dp) a line's end must come to its start to close it. */
|
|
23
|
+
export declare const LINE_CONFIRM_THRESHOLD = 8;
|
|
24
|
+
/** Excalidraw's font family ids. */
|
|
25
|
+
export declare const FONT_FAMILY: {
|
|
26
|
+
readonly Virgil: 1;
|
|
27
|
+
readonly Helvetica: 2;
|
|
28
|
+
readonly Cascadia: 3;
|
|
29
|
+
readonly Excalifont: 5;
|
|
30
|
+
readonly Nunito: 6;
|
|
31
|
+
readonly 'Lilita One': 7;
|
|
32
|
+
readonly 'Comic Shanns': 8;
|
|
33
|
+
readonly 'Liberation Sans': 9;
|
|
34
|
+
};
|
|
35
|
+
/** A new text's size. */
|
|
36
|
+
export declare const DEFAULT_FONT_SIZE = 20;
|
|
37
|
+
/** A new text's font. */
|
|
38
|
+
export declare const DEFAULT_FONT_FAMILY: 5;
|
|
39
|
+
/** The space around a label inside its container. */
|
|
40
|
+
export declare const BOUND_TEXT_PADDING = 5;
|
|
41
|
+
/** Font metrics Excalidraw positions text with (FONT_METADATA): units per em, ascender, descender, line height. */
|
|
42
|
+
export declare const FONT_METRICS: Record<number, {
|
|
43
|
+
unitsPerEm: number;
|
|
44
|
+
ascender: number;
|
|
45
|
+
descender: number;
|
|
46
|
+
lineHeight: number;
|
|
47
|
+
}>;
|
|
48
|
+
/** How frames are drawn (stroke, radius, name). */
|
|
49
|
+
export declare const FRAME_STYLE: {
|
|
50
|
+
readonly strokeColor: "#bbb";
|
|
51
|
+
readonly strokeWidth: 2;
|
|
52
|
+
readonly strokeStyle: "solid";
|
|
53
|
+
readonly fillStyle: "solid";
|
|
54
|
+
readonly roughness: 0;
|
|
55
|
+
readonly roundness: null;
|
|
56
|
+
readonly backgroundColor: "transparent";
|
|
57
|
+
readonly radius: 8;
|
|
58
|
+
readonly nameOffsetY: 3;
|
|
59
|
+
readonly nameColorLightTheme: "#999999";
|
|
60
|
+
readonly nameColorDarkTheme: "#7a7a7a";
|
|
61
|
+
readonly nameFontSize: 14;
|
|
62
|
+
readonly nameLineHeight: 1.25;
|
|
63
|
+
};
|
|
64
|
+
/** Excalidraw's default item style (appState `currentItem*`). */
|
|
65
|
+
export declare const DEFAULT_STYLE: ItemStyle;
|
|
66
|
+
/** Excalidraw's quick colour picks (open-color shades it shows first). */
|
|
67
|
+
export declare const STROKE_COLORS: string[];
|
|
68
|
+
/** Excalidraw's quick background picks (light open-color shades). */
|
|
69
|
+
export declare const BACKGROUND_COLORS: string[];
|
|
70
|
+
/** A 21-character id like Excalidraw's `nanoid()`. */
|
|
71
|
+
export declare function randomId(): string;
|
|
72
|
+
/** Excalidraw's `randomInteger()` (seeds and nonces). */
|
|
73
|
+
export declare function randomInteger(): number;
|
|
74
|
+
/** A file id for a picture (Excalidraw uses a SHA-1 of the data; any unique 40-character hex string works). */
|
|
75
|
+
export declare function randomFileId(): string;
|
|
76
|
+
/** Rectangles and pictures round adaptively, diamonds and lines proportionally (`getDefaultRoundnessTypeForElement`). */
|
|
77
|
+
export declare function defaultRoundness(type: string, style: Pick<ItemStyle, 'roundness'>): Roundness | null;
|
|
78
|
+
interface BaseOptions {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
width?: number;
|
|
82
|
+
height?: number;
|
|
83
|
+
angle?: number;
|
|
84
|
+
style: ItemStyle;
|
|
85
|
+
/** Its place in the order (a fractional index); default none (null: after the indexed ones). */
|
|
86
|
+
index?: string | null;
|
|
87
|
+
frameId?: string | null;
|
|
88
|
+
groupIds?: string[];
|
|
89
|
+
roundness?: Roundness | null;
|
|
90
|
+
id?: string;
|
|
91
|
+
}
|
|
92
|
+
/** A new rectangle, ellipse or diamond element. */
|
|
93
|
+
export declare function newShape(type: 'rectangle' | 'ellipse' | 'diamond', options: BaseOptions): ExElement;
|
|
94
|
+
/** A new frame element (named or not). */
|
|
95
|
+
export declare function newFrame(options: Omit<BaseOptions, 'style'> & {
|
|
96
|
+
name?: string | null;
|
|
97
|
+
}): ExElement;
|
|
98
|
+
/** A new line or arrow element through points. */
|
|
99
|
+
export declare function newLinear(type: 'arrow' | 'line', options: BaseOptions & {
|
|
100
|
+
points: Point[];
|
|
101
|
+
startArrowhead?: Arrowhead | null;
|
|
102
|
+
endArrowhead?: Arrowhead | null;
|
|
103
|
+
}): ExElement;
|
|
104
|
+
/** A new free-drawing element. */
|
|
105
|
+
export declare function newFreeDraw(options: BaseOptions & {
|
|
106
|
+
points: Point[];
|
|
107
|
+
pressures: number[];
|
|
108
|
+
simulatePressure: boolean;
|
|
109
|
+
}): ExElement;
|
|
110
|
+
/** A new text element (measured; a fixed width when `autoResize` is false). */
|
|
111
|
+
export declare function newText(options: BaseOptions & {
|
|
112
|
+
text: string;
|
|
113
|
+
containerId?: string | null;
|
|
114
|
+
verticalAlign?: 'top' | 'middle';
|
|
115
|
+
autoResize?: boolean;
|
|
116
|
+
width?: number;
|
|
117
|
+
}): ExElement;
|
|
118
|
+
/** A new picture element of a file. */
|
|
119
|
+
export declare function newImage(options: BaseOptions & {
|
|
120
|
+
fileId: string;
|
|
121
|
+
}): ExElement;
|
|
122
|
+
/** `mutateElement`: the change plus a new version, nonce and timestamp (what makes it win the reconciliation). */
|
|
123
|
+
export declare function bump<T extends ExElement>(element: T, changes?: Partial<ExElement>): T;
|
|
124
|
+
/** The width and height the points span. */
|
|
125
|
+
export declare function sizeOfPoints(points: readonly Point[]): {
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
};
|
|
129
|
+
/** The line height of a font family (Excalidraw's table). */
|
|
130
|
+
export declare function lineHeightOf(fontFamily: number): number;
|
|
131
|
+
/** Excalidraw's `getVerticalOffset`: where the first baseline sits below the text's top. */
|
|
132
|
+
export declare function verticalOffset(fontFamily: number, fontSize: number, lineHeightPx: number): number;
|
|
133
|
+
/** Text with tabs as spaces and line breaks unified. */
|
|
134
|
+
export declare function normalizeText(text: string): string;
|
|
135
|
+
/**
|
|
136
|
+
* Text size without a canvas (the app has none on the native engines): an estimate per character class. The element
|
|
137
|
+
* draws with its host's fonts; Excalidraw measures again with its own when it shows the text.
|
|
138
|
+
*/
|
|
139
|
+
export declare function textWidth(line: string, fontSize: number, fontFamily: number): number;
|
|
140
|
+
/** A text's size in a font (estimated per script; no DOM). */
|
|
141
|
+
export declare function measureText(text: string, fontSize: number, fontFamily: number, lineHeight: number): {
|
|
142
|
+
width: number;
|
|
143
|
+
height: number;
|
|
144
|
+
};
|
|
145
|
+
/** Fractional index after `last` (or the first index). */
|
|
146
|
+
export declare function indexAfter(last: string | null | undefined): string;
|
|
147
|
+
/** Fractional indices between two (for an order). */
|
|
148
|
+
export declare function indicesBetween(lower: string | null | undefined, upper: string | null | undefined, count: number): string[];
|
|
149
|
+
/** Excalidraw's order: by fractional index, ties by id; elements without an index last. */
|
|
150
|
+
export declare function compareOrder(a: Pick<ExElement, 'index' | 'id'>, b: Pick<ExElement, 'index' | 'id'>): number;
|
|
151
|
+
/** A line or an arrow. */
|
|
152
|
+
export declare function isLinear(element: Pick<ExElement, 'type'>): boolean;
|
|
153
|
+
/** An element drawn through points (a line, an arrow, a free stroke). */
|
|
154
|
+
export declare function isPointsElement(element: Pick<ExElement, 'type'>): boolean;
|
|
155
|
+
/** A frame (or a magic frame). */
|
|
156
|
+
export declare function isFrame(element: Pick<ExElement, 'type'>): boolean;
|
|
157
|
+
/** A colour that draws nothing (empty, `transparent`, zero alpha). */
|
|
158
|
+
export declare function isTransparent(color: string | undefined | null): boolean;
|
|
159
|
+
export {};
|
|
160
|
+
//# sourceMappingURL=elements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../src/scene/elements.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAe,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9F;;;;GAIG;AAEH,eAAO,MAAM,SAAS;;;;CAAsD,CAAC;AAC7E,oCAAoC;AACpC,eAAO,MAAM,SAAS;;;;CAAqE,CAAC;AAC5F,6EAA6E;AAC7E,eA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,GAAG,SAAS,GAAG,MAAM,CAMlE;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,KAAK,EAAE,MAAM,GACZ,MAAM,EAAE,CAMV;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC,GAAG,MAAM,CAS3G;AAED,0BAA0B;AAC1B,wBAAgB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,OAAO,CAElE;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,OAAO,CAEzE;AAED,kCAAkC;AAClC,wBAAgB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,OAAO,CAEjE;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CASvE"}
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { generateKeyBetween, generateNKeysBetween } from "fractional-indexing";
|
|
2
|
+
const ROUGHNESS = {
|
|
3
|
+
architect: 0,
|
|
4
|
+
artist: 1,
|
|
5
|
+
cartoonist: 2
|
|
6
|
+
};
|
|
7
|
+
const ROUNDNESS = {
|
|
8
|
+
LEGACY: 1,
|
|
9
|
+
PROPORTIONAL_RADIUS: 2,
|
|
10
|
+
ADAPTIVE_RADIUS: 3
|
|
11
|
+
};
|
|
12
|
+
const DEFAULT_PROPORTIONAL_RADIUS = 0.25;
|
|
13
|
+
const DEFAULT_ADAPTIVE_RADIUS = 32;
|
|
14
|
+
const LINE_CONFIRM_THRESHOLD = 8;
|
|
15
|
+
const FONT_FAMILY = {
|
|
16
|
+
Virgil: 1,
|
|
17
|
+
Helvetica: 2,
|
|
18
|
+
Cascadia: 3,
|
|
19
|
+
Excalifont: 5,
|
|
20
|
+
Nunito: 6,
|
|
21
|
+
'Lilita One': 7,
|
|
22
|
+
'Comic Shanns': 8,
|
|
23
|
+
'Liberation Sans': 9
|
|
24
|
+
};
|
|
25
|
+
const DEFAULT_FONT_SIZE = 20;
|
|
26
|
+
const DEFAULT_FONT_FAMILY = FONT_FAMILY.Excalifont;
|
|
27
|
+
const BOUND_TEXT_PADDING = 5;
|
|
28
|
+
const FONT_METRICS = {
|
|
29
|
+
5: {
|
|
30
|
+
unitsPerEm: 1000,
|
|
31
|
+
ascender: 886,
|
|
32
|
+
descender: -374,
|
|
33
|
+
lineHeight: 1.25
|
|
34
|
+
},
|
|
35
|
+
6: {
|
|
36
|
+
unitsPerEm: 1000,
|
|
37
|
+
ascender: 1011,
|
|
38
|
+
descender: -353,
|
|
39
|
+
lineHeight: 1.35
|
|
40
|
+
},
|
|
41
|
+
7: {
|
|
42
|
+
unitsPerEm: 1000,
|
|
43
|
+
ascender: 923,
|
|
44
|
+
descender: -220,
|
|
45
|
+
lineHeight: 1.15
|
|
46
|
+
},
|
|
47
|
+
8: {
|
|
48
|
+
unitsPerEm: 1000,
|
|
49
|
+
ascender: 750,
|
|
50
|
+
descender: -250,
|
|
51
|
+
lineHeight: 1.25
|
|
52
|
+
},
|
|
53
|
+
1: {
|
|
54
|
+
unitsPerEm: 1000,
|
|
55
|
+
ascender: 886,
|
|
56
|
+
descender: -374,
|
|
57
|
+
lineHeight: 1.25
|
|
58
|
+
},
|
|
59
|
+
2: {
|
|
60
|
+
unitsPerEm: 2048,
|
|
61
|
+
ascender: 1577,
|
|
62
|
+
descender: -471,
|
|
63
|
+
lineHeight: 1.15
|
|
64
|
+
},
|
|
65
|
+
3: {
|
|
66
|
+
unitsPerEm: 2048,
|
|
67
|
+
ascender: 1900,
|
|
68
|
+
descender: -480,
|
|
69
|
+
lineHeight: 1.2
|
|
70
|
+
},
|
|
71
|
+
9: {
|
|
72
|
+
unitsPerEm: 2048,
|
|
73
|
+
ascender: 1854,
|
|
74
|
+
descender: -434,
|
|
75
|
+
lineHeight: 1.15
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const FRAME_STYLE = {
|
|
79
|
+
strokeColor: '#bbb',
|
|
80
|
+
strokeWidth: 2,
|
|
81
|
+
strokeStyle: 'solid',
|
|
82
|
+
fillStyle: 'solid',
|
|
83
|
+
roughness: 0,
|
|
84
|
+
roundness: null,
|
|
85
|
+
backgroundColor: 'transparent',
|
|
86
|
+
radius: 8,
|
|
87
|
+
nameOffsetY: 3,
|
|
88
|
+
nameColorLightTheme: '#999999',
|
|
89
|
+
nameColorDarkTheme: '#7a7a7a',
|
|
90
|
+
nameFontSize: 14,
|
|
91
|
+
nameLineHeight: 1.25
|
|
92
|
+
};
|
|
93
|
+
const DEFAULT_STYLE = {
|
|
94
|
+
strokeColor: '#1e1e1e',
|
|
95
|
+
backgroundColor: 'transparent',
|
|
96
|
+
fillStyle: 'solid',
|
|
97
|
+
strokeWidth: 2,
|
|
98
|
+
strokeStyle: 'solid',
|
|
99
|
+
roughness: ROUGHNESS.artist,
|
|
100
|
+
opacity: 100,
|
|
101
|
+
roundness: 'round',
|
|
102
|
+
fontSize: DEFAULT_FONT_SIZE,
|
|
103
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
104
|
+
textAlign: 'left',
|
|
105
|
+
startArrowhead: null,
|
|
106
|
+
endArrowhead: 'arrow'
|
|
107
|
+
};
|
|
108
|
+
const STROKE_COLORS = [
|
|
109
|
+
'#1e1e1e',
|
|
110
|
+
'#e03131',
|
|
111
|
+
'#2f9e44',
|
|
112
|
+
'#1971c2',
|
|
113
|
+
'#f08c00',
|
|
114
|
+
'#9c36b5',
|
|
115
|
+
'#0c8599',
|
|
116
|
+
'#846358'
|
|
117
|
+
];
|
|
118
|
+
const BACKGROUND_COLORS = [
|
|
119
|
+
'transparent',
|
|
120
|
+
'#ffc9c9',
|
|
121
|
+
'#b2f2bb',
|
|
122
|
+
'#a5d8ff',
|
|
123
|
+
'#ffec99',
|
|
124
|
+
'#eebefa',
|
|
125
|
+
'#99e9f2',
|
|
126
|
+
'#eaddd7'
|
|
127
|
+
];
|
|
128
|
+
const ID_ALPHABET = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
129
|
+
function randomBytes(count) {
|
|
130
|
+
const bytes = new Uint8Array(count);
|
|
131
|
+
const crypto = globalThis.crypto;
|
|
132
|
+
try {
|
|
133
|
+
if (null == crypto ? void 0 : crypto.getRandomValues) return crypto.getRandomValues(bytes);
|
|
134
|
+
} catch {}
|
|
135
|
+
for(let i = 0; i < count; i++)bytes[i] = Math.floor(256 * Math.random());
|
|
136
|
+
return bytes;
|
|
137
|
+
}
|
|
138
|
+
function randomId() {
|
|
139
|
+
const bytes = randomBytes(21);
|
|
140
|
+
let id = '';
|
|
141
|
+
for(let i = 0; i < 21; i++)id += ID_ALPHABET[63 & bytes[i]];
|
|
142
|
+
return id;
|
|
143
|
+
}
|
|
144
|
+
function randomInteger() {
|
|
145
|
+
return Math.floor(Math.random() * 2 ** 31);
|
|
146
|
+
}
|
|
147
|
+
function randomFileId() {
|
|
148
|
+
return Array.from(randomBytes(20), (byte)=>byte.toString(16).padStart(2, '0')).join('');
|
|
149
|
+
}
|
|
150
|
+
function defaultRoundness(type, style) {
|
|
151
|
+
if ('round' !== style.roundness) return null;
|
|
152
|
+
if ('line' === type || 'arrow' === type || 'diamond' === type) return {
|
|
153
|
+
type: ROUNDNESS.PROPORTIONAL_RADIUS
|
|
154
|
+
};
|
|
155
|
+
if ('rectangle' === type || 'image' === type || 'embeddable' === type || 'iframe' === type) return {
|
|
156
|
+
type: ROUNDNESS.ADAPTIVE_RADIUS
|
|
157
|
+
};
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
function base(type, options) {
|
|
161
|
+
var _options_id, _options_width, _options_height, _options_angle, _options_groupIds, _options_frameId, _options_index;
|
|
162
|
+
const style = options.style;
|
|
163
|
+
return {
|
|
164
|
+
id: null != (_options_id = options.id) ? _options_id : randomId(),
|
|
165
|
+
type,
|
|
166
|
+
x: options.x,
|
|
167
|
+
y: options.y,
|
|
168
|
+
width: null != (_options_width = options.width) ? _options_width : 0,
|
|
169
|
+
height: null != (_options_height = options.height) ? _options_height : 0,
|
|
170
|
+
angle: null != (_options_angle = options.angle) ? _options_angle : 0,
|
|
171
|
+
strokeColor: style.strokeColor,
|
|
172
|
+
backgroundColor: style.backgroundColor,
|
|
173
|
+
fillStyle: style.fillStyle,
|
|
174
|
+
strokeWidth: style.strokeWidth,
|
|
175
|
+
strokeStyle: style.strokeStyle,
|
|
176
|
+
roughness: style.roughness,
|
|
177
|
+
opacity: style.opacity,
|
|
178
|
+
groupIds: null != (_options_groupIds = options.groupIds) ? _options_groupIds : [],
|
|
179
|
+
frameId: null != (_options_frameId = options.frameId) ? _options_frameId : null,
|
|
180
|
+
index: null != (_options_index = options.index) ? _options_index : null,
|
|
181
|
+
roundness: void 0 === options.roundness ? defaultRoundness(type, style) : options.roundness,
|
|
182
|
+
seed: randomInteger(),
|
|
183
|
+
version: 1,
|
|
184
|
+
versionNonce: randomInteger(),
|
|
185
|
+
isDeleted: false,
|
|
186
|
+
boundElements: null,
|
|
187
|
+
updated: Date.now(),
|
|
188
|
+
link: null,
|
|
189
|
+
locked: false
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function newShape(type, options) {
|
|
193
|
+
return base(type, options);
|
|
194
|
+
}
|
|
195
|
+
function newFrame(options) {
|
|
196
|
+
var _options_name;
|
|
197
|
+
const style = {
|
|
198
|
+
...DEFAULT_STYLE,
|
|
199
|
+
...FRAME_STYLE,
|
|
200
|
+
roundness: 'sharp',
|
|
201
|
+
fillStyle: 'solid',
|
|
202
|
+
strokeStyle: 'solid',
|
|
203
|
+
opacity: 100
|
|
204
|
+
};
|
|
205
|
+
return {
|
|
206
|
+
...base('frame', {
|
|
207
|
+
...options,
|
|
208
|
+
style,
|
|
209
|
+
roundness: null
|
|
210
|
+
}),
|
|
211
|
+
name: null != (_options_name = options.name) ? _options_name : null
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function newLinear(type, options) {
|
|
215
|
+
var _options_startArrowhead, _options_endArrowhead;
|
|
216
|
+
const size = sizeOfPoints(options.points);
|
|
217
|
+
const element = {
|
|
218
|
+
...base(type, {
|
|
219
|
+
...options,
|
|
220
|
+
width: size.width,
|
|
221
|
+
height: size.height
|
|
222
|
+
}),
|
|
223
|
+
points: options.points,
|
|
224
|
+
lastCommittedPoint: null,
|
|
225
|
+
startBinding: null,
|
|
226
|
+
endBinding: null,
|
|
227
|
+
startArrowhead: 'arrow' === type ? null != (_options_startArrowhead = options.startArrowhead) ? _options_startArrowhead : null : null,
|
|
228
|
+
endArrowhead: 'arrow' === type ? null != (_options_endArrowhead = options.endArrowhead) ? _options_endArrowhead : null : null
|
|
229
|
+
};
|
|
230
|
+
if ('arrow' === type) element.elbowed = false;
|
|
231
|
+
return element;
|
|
232
|
+
}
|
|
233
|
+
function newFreeDraw(options) {
|
|
234
|
+
const size = sizeOfPoints(options.points);
|
|
235
|
+
return {
|
|
236
|
+
...base('freedraw', {
|
|
237
|
+
...options,
|
|
238
|
+
width: size.width,
|
|
239
|
+
height: size.height,
|
|
240
|
+
roundness: null
|
|
241
|
+
}),
|
|
242
|
+
points: options.points,
|
|
243
|
+
pressures: options.pressures,
|
|
244
|
+
simulatePressure: options.simulatePressure,
|
|
245
|
+
lastCommittedPoint: options.points.length ? options.points[options.points.length - 1] : null
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function newText(options) {
|
|
249
|
+
var _options_verticalAlign, _options_containerId, _options_autoResize;
|
|
250
|
+
const fontFamily = options.style.fontFamily || DEFAULT_FONT_FAMILY;
|
|
251
|
+
const fontSize = options.style.fontSize || DEFAULT_FONT_SIZE;
|
|
252
|
+
const lineHeight = lineHeightOf(fontFamily);
|
|
253
|
+
const text = normalizeText(options.text);
|
|
254
|
+
const metrics = measureText(text, fontSize, fontFamily, lineHeight);
|
|
255
|
+
return {
|
|
256
|
+
...base('text', {
|
|
257
|
+
...options,
|
|
258
|
+
roundness: null
|
|
259
|
+
}),
|
|
260
|
+
text,
|
|
261
|
+
fontSize,
|
|
262
|
+
fontFamily,
|
|
263
|
+
textAlign: options.style.textAlign,
|
|
264
|
+
verticalAlign: null != (_options_verticalAlign = options.verticalAlign) ? _options_verticalAlign : 'top',
|
|
265
|
+
width: false === options.autoResize && options.width ? options.width : metrics.width,
|
|
266
|
+
height: metrics.height,
|
|
267
|
+
containerId: null != (_options_containerId = options.containerId) ? _options_containerId : null,
|
|
268
|
+
originalText: text,
|
|
269
|
+
autoResize: null != (_options_autoResize = options.autoResize) ? _options_autoResize : true,
|
|
270
|
+
lineHeight
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function newImage(options) {
|
|
274
|
+
return {
|
|
275
|
+
...base('image', options),
|
|
276
|
+
strokeColor: 'transparent',
|
|
277
|
+
status: 'pending',
|
|
278
|
+
fileId: options.fileId,
|
|
279
|
+
scale: [
|
|
280
|
+
1,
|
|
281
|
+
1
|
|
282
|
+
],
|
|
283
|
+
crop: null
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
function bump(element, changes = {}) {
|
|
287
|
+
return {
|
|
288
|
+
...element,
|
|
289
|
+
...changes,
|
|
290
|
+
version: element.version + 1,
|
|
291
|
+
versionNonce: randomInteger(),
|
|
292
|
+
updated: Date.now()
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function sizeOfPoints(points) {
|
|
296
|
+
if (!points.length) return {
|
|
297
|
+
width: 0,
|
|
298
|
+
height: 0
|
|
299
|
+
};
|
|
300
|
+
let minX = 1 / 0;
|
|
301
|
+
let minY = 1 / 0;
|
|
302
|
+
let maxX = -1 / 0;
|
|
303
|
+
let maxY = -1 / 0;
|
|
304
|
+
for (const [x, y] of points){
|
|
305
|
+
if (x < minX) minX = x;
|
|
306
|
+
if (y < minY) minY = y;
|
|
307
|
+
if (x > maxX) maxX = x;
|
|
308
|
+
if (y > maxY) maxY = y;
|
|
309
|
+
}
|
|
310
|
+
return {
|
|
311
|
+
width: maxX - minX,
|
|
312
|
+
height: maxY - minY
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
function lineHeightOf(fontFamily) {
|
|
316
|
+
var _FONT_METRICS_fontFamily;
|
|
317
|
+
return (null != (_FONT_METRICS_fontFamily = FONT_METRICS[fontFamily]) ? _FONT_METRICS_fontFamily : FONT_METRICS[5]).lineHeight;
|
|
318
|
+
}
|
|
319
|
+
function verticalOffset(fontFamily, fontSize, lineHeightPx) {
|
|
320
|
+
var _FONT_METRICS_fontFamily;
|
|
321
|
+
const metrics = null != (_FONT_METRICS_fontFamily = FONT_METRICS[fontFamily]) ? _FONT_METRICS_fontFamily : FONT_METRICS[1];
|
|
322
|
+
const em = fontSize / metrics.unitsPerEm;
|
|
323
|
+
const lineGap = (lineHeightPx - em * metrics.ascender + em * metrics.descender) / 2;
|
|
324
|
+
return em * metrics.ascender + lineGap;
|
|
325
|
+
}
|
|
326
|
+
function normalizeText(text) {
|
|
327
|
+
return text.replace(/\t/g, ' ').replace(/\r?\n|\r/g, '\n');
|
|
328
|
+
}
|
|
329
|
+
function textWidth(line, fontSize, fontFamily) {
|
|
330
|
+
const mono = fontFamily === FONT_FAMILY.Cascadia || fontFamily === FONT_FAMILY['Comic Shanns'];
|
|
331
|
+
let width = 0;
|
|
332
|
+
for (const char of line){
|
|
333
|
+
var _char_codePointAt;
|
|
334
|
+
const code = null != (_char_codePointAt = char.codePointAt(0)) ? _char_codePointAt : 0;
|
|
335
|
+
if (mono) width += code >= 0x2e80 ? 1 : 0.6;
|
|
336
|
+
else if (' ' === char) width += 0.3;
|
|
337
|
+
else if (code >= 0x2e80 && code < 0xd7ff) width += 1;
|
|
338
|
+
else if (code >= 0x0600 && code <= 0x06ff) width += 0.45;
|
|
339
|
+
else if (/[mwMW@]/.test(char)) width += 0.85;
|
|
340
|
+
else if (/[il.,;:'!|ftj]/.test(char)) width += 0.3;
|
|
341
|
+
else if (/[A-Z0-9]/.test(char)) width += 0.62;
|
|
342
|
+
else width += 0.52;
|
|
343
|
+
}
|
|
344
|
+
return width * fontSize;
|
|
345
|
+
}
|
|
346
|
+
function measureText(text, fontSize, fontFamily, lineHeight) {
|
|
347
|
+
const lines = text.split('\n');
|
|
348
|
+
const width = Math.max(...lines.map((line)=>textWidth(line, fontSize, fontFamily)));
|
|
349
|
+
return {
|
|
350
|
+
width,
|
|
351
|
+
height: lines.length * fontSize * lineHeight
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
function indexAfter(last) {
|
|
355
|
+
try {
|
|
356
|
+
return generateKeyBetween(null != last ? last : null, null);
|
|
357
|
+
} catch {
|
|
358
|
+
return generateKeyBetween(null, null);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function indicesBetween(lower, upper, count) {
|
|
362
|
+
try {
|
|
363
|
+
return generateNKeysBetween(null != lower ? lower : null, null != upper ? upper : null, count);
|
|
364
|
+
} catch {
|
|
365
|
+
return generateNKeysBetween(null != lower ? lower : null, null, count);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
function compareOrder(a, b) {
|
|
369
|
+
if (a.index && b.index) {
|
|
370
|
+
if (a.index < b.index) return -1;
|
|
371
|
+
if (a.index > b.index) return 1;
|
|
372
|
+
return a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
|
|
373
|
+
}
|
|
374
|
+
if (a.index) return -1;
|
|
375
|
+
if (b.index) return 1;
|
|
376
|
+
return 0;
|
|
377
|
+
}
|
|
378
|
+
function isLinear(element) {
|
|
379
|
+
return 'arrow' === element.type || 'line' === element.type;
|
|
380
|
+
}
|
|
381
|
+
function isPointsElement(element) {
|
|
382
|
+
return 'arrow' === element.type || 'line' === element.type || 'freedraw' === element.type;
|
|
383
|
+
}
|
|
384
|
+
function isFrame(element) {
|
|
385
|
+
return 'frame' === element.type || 'magicframe' === element.type;
|
|
386
|
+
}
|
|
387
|
+
function isTransparent(color) {
|
|
388
|
+
if (!color) return true;
|
|
389
|
+
const value = color.trim().toLowerCase();
|
|
390
|
+
return 'transparent' === value || 'none' === value || 5 === value.length && value.endsWith('0') && value.startsWith('#') || 9 === value.length && value.endsWith('00') && value.startsWith('#');
|
|
391
|
+
}
|
|
392
|
+
export { BACKGROUND_COLORS, BOUND_TEXT_PADDING, DEFAULT_ADAPTIVE_RADIUS, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_PROPORTIONAL_RADIUS, DEFAULT_STYLE, FONT_FAMILY, FONT_METRICS, FRAME_STYLE, LINE_CONFIRM_THRESHOLD, ROUGHNESS, ROUNDNESS, STROKE_COLORS, bump, compareOrder, defaultRoundness, indexAfter, indicesBetween, isFrame, isLinear, isPointsElement, isTransparent, lineHeightOf, measureText, newFrame, newFreeDraw, newImage, newLinear, newShape, newText, normalizeText, randomFileId, randomId, randomInteger, sizeOfPoints, textWidth, verticalOffset };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Bounds, ExElement, Point } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Geometry of elements in scene coordinates (Excalidraw's `getElementAbsoluteCoords`, `getElementBounds` and its
|
|
4
|
+
* hit-testing rules, simplified where the exact curve does not matter for a finger): boxes, centres, rotation, which
|
|
5
|
+
* element is under a point, which lie inside a selection box.
|
|
6
|
+
*/
|
|
7
|
+
/** [x1, y1, x2, y2, cx, cy] of the unrotated element (linear and freehand: their points' box). */
|
|
8
|
+
export declare function absoluteCoords(element: ExElement): [number, number, number, number, number, number];
|
|
9
|
+
/** A point turned about a centre. */
|
|
10
|
+
export declare function rotate(point: Point, center: Point, angle: number): Point;
|
|
11
|
+
/** The box around the element as drawn (rotation included). */
|
|
12
|
+
export declare function elementBounds(element: ExElement): Bounds;
|
|
13
|
+
/** The box around every element, or null for none. */
|
|
14
|
+
export declare function commonBounds(elements: readonly ExElement[]): Bounds | null;
|
|
15
|
+
/** Whether `outer` holds `inner` whole. */
|
|
16
|
+
export declare function boundsContain(outer: Bounds, inner: Bounds): boolean;
|
|
17
|
+
/** Whether two boxes overlap. */
|
|
18
|
+
export declare function boundsIntersect(a: Bounds, b: Bounds): boolean;
|
|
19
|
+
/** A box from two corners in any order. */
|
|
20
|
+
export declare function normalizeBox(x1: number, y1: number, x2: number, y2: number): Bounds;
|
|
21
|
+
/** The distance from a point to a polyline (closed: back to its start). */
|
|
22
|
+
export declare function distanceToPolyline(p: Point, points: readonly Point[], closed?: boolean): number;
|
|
23
|
+
/** Whether a point is inside a polygon (even-odd). */
|
|
24
|
+
export declare function insidePolygon(p: Point, points: readonly Point[]): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether `point` (scene) hits the element: within `threshold` of its outline, or inside it when it is filled, a text,
|
|
27
|
+
* a picture or a frame's name. Excalidraw's rule: transparent shapes are picked by their stroke only.
|
|
28
|
+
*/
|
|
29
|
+
export declare function hitElement(element: ExElement, point: Point, threshold: number): boolean;
|
|
30
|
+
/** The outline of a shape as points in scene coordinates (bindings aim arrows at it). */
|
|
31
|
+
export declare function outlineOf(element: ExElement): Point[];
|
|
32
|
+
/** Where the segment from `from` towards `to` first crosses the closed outline (null when it does not). */
|
|
33
|
+
export declare function intersectOutline(outline: readonly Point[], from: Point, to: Point): Point | null;
|
|
34
|
+
/** Whether an arrow can bind to the element. */
|
|
35
|
+
export declare function isBindable(element: ExElement): boolean;
|
|
36
|
+
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/scene/geometry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EA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