@zsviczian/excalidraw 0.17.6-3 → 0.17.6-31
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/excalidraw.development.js +13100 -1540
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +21 -1
- package/dist/styles.development.css +490 -376
- package/dist/styles.production.css +10 -8
- package/package.json +5 -4
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +27 -3
- package/types/excalidraw/actions/actionAlign.d.ts +7 -6
- package/types/excalidraw/actions/actionBoundText.d.ts +18 -2
- package/types/excalidraw/actions/actionCanvas.d.ts +126 -14
- package/types/excalidraw/actions/actionClipboard.d.ts +61 -9
- package/types/excalidraw/actions/actionCropEditor.d.ts +222 -0
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +34 -6
- package/types/excalidraw/actions/actionElementLink.d.ts +244 -0
- package/types/excalidraw/actions/actionElementLock.d.ts +18 -2
- package/types/excalidraw/actions/actionExport.d.ts +77 -8
- package/types/excalidraw/actions/actionFinalize.d.ts +18 -2
- package/types/excalidraw/actions/actionFrame.d.ts +533 -4
- package/types/excalidraw/actions/actionGroup.d.ts +18 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +9 -1
- package/types/excalidraw/actions/actionLink.d.ts +10 -2
- package/types/excalidraw/actions/actionMenu.d.ts +23 -2
- package/types/excalidraw/actions/actionNavigate.d.ts +18 -2
- package/types/excalidraw/actions/actionProperties.d.ts +135 -15
- package/types/excalidraw/actions/actionSelectAll.d.ts +9 -1
- package/types/excalidraw/actions/actionStyles.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +14 -1
- package/types/excalidraw/actions/actionToggleStats.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +9 -1
- package/types/excalidraw/actions/index.d.ts +1 -0
- package/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/types/excalidraw/actions/types.d.ts +1 -1
- package/types/excalidraw/align.d.ts +2 -1
- package/types/excalidraw/change.d.ts +2 -2
- package/types/excalidraw/clipboard.d.ts +27 -5
- package/types/excalidraw/components/Actions.d.ts +2 -1
- package/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/types/excalidraw/components/App.d.ts +21 -5
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/types/excalidraw/components/ElementLinkDialog.d.ts +11 -0
- package/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/types/excalidraw/components/IconPicker.d.ts +2 -2
- package/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/types/excalidraw/components/Range.d.ts +8 -0
- package/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
- package/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -7
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidrawLib.d.ts +10 -0
- package/types/excalidraw/components/TTDDialog/common.d.ts +2 -2
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
- package/types/excalidraw/components/hyperlink/helpers.d.ts +1 -0
- package/types/excalidraw/components/icons.d.ts +11 -0
- package/types/excalidraw/constants.d.ts +5 -1
- package/types/excalidraw/context/tunnels.d.ts +2 -1
- package/types/excalidraw/data/blob.d.ts +4 -0
- package/types/excalidraw/data/encode.d.ts +6 -5
- package/types/excalidraw/data/filesystem.d.ts +2 -1
- package/types/excalidraw/data/image.d.ts +0 -6
- package/types/excalidraw/data/library.d.ts +9 -3
- package/types/excalidraw/data/url.d.ts +0 -1
- package/types/excalidraw/dist/excalidraw.production.min.d.ts +3 -1
- package/types/excalidraw/editor-jotai.d.ts +56 -0
- package/types/excalidraw/element/binding.d.ts +10 -7
- package/types/excalidraw/element/cropElement.d.ts +19 -0
- package/types/excalidraw/element/elbowArrow.d.ts +16 -0
- package/types/excalidraw/element/elementLink.d.ts +13 -0
- package/types/excalidraw/element/embeddable.d.ts +9 -1
- package/types/excalidraw/element/flowchart.d.ts +1 -1
- package/types/excalidraw/element/heading.d.ts +5 -1
- package/types/excalidraw/element/image.d.ts +1 -1
- package/types/excalidraw/element/linearElementEditor.d.ts +9 -10
- package/types/excalidraw/element/mutateElement.d.ts +3 -1
- package/types/excalidraw/element/newElement.d.ts +9 -7
- package/types/excalidraw/element/resizeElements.d.ts +27 -5
- package/types/excalidraw/element/textElement.d.ts +14 -4
- package/types/excalidraw/element/textWrapping.d.ts +13 -0
- package/types/excalidraw/element/transformHandles.d.ts +1 -1
- package/types/excalidraw/element/types.d.ts +33 -1
- package/types/excalidraw/errors.d.ts +7 -0
- package/types/excalidraw/fonts/{woff2/Cascadia → Cascadia}/index.d.ts +1 -1
- package/types/excalidraw/fonts/ComicShanns/index.d.ts +2 -0
- package/types/excalidraw/fonts/{woff2/Emoji → Emoji}/index.d.ts +1 -1
- package/types/excalidraw/fonts/ExcalidrawFontFace.d.ts +2 -8
- package/types/excalidraw/fonts/{woff2/Excalifont → Excalifont}/index.d.ts +1 -1
- package/types/excalidraw/fonts/Fonts.d.ts +100 -0
- package/types/excalidraw/fonts/{woff2/Helvetica → Helvetica}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Liberation → Liberation}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Lilita → Lilita}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Nunito → Nunito}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Virgil → Virgil}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Xiaolai → Xiaolai}/index.d.ts +1 -1
- package/types/excalidraw/fonts/index.d.ts +1 -87
- package/types/excalidraw/frame.d.ts +11 -5
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/types/excalidraw/index.d.ts +4 -3
- package/types/excalidraw/keys.d.ts +107 -0
- package/types/excalidraw/obsidianUtils.d.ts +9 -4
- package/types/excalidraw/renderer/renderElement.d.ts +3 -2
- package/types/excalidraw/scene/Scene.d.ts +1 -0
- package/types/excalidraw/scene/comparisons.d.ts +1 -0
- package/types/excalidraw/scene/export.d.ts +8 -0
- package/types/excalidraw/scene/types.d.ts +7 -0
- package/types/excalidraw/types.d.ts +25 -1
- package/types/excalidraw/utils.d.ts +7 -1
- package/types/excalidraw/visualdebug.d.ts +8 -1
- package/types/math/line.d.ts +19 -0
- package/types/math/point.d.ts +10 -0
- package/types/math/utils.d.ts +1 -0
- package/types/math/vector.d.ts +4 -0
- package/types/utils/export.d.ts +6 -4
- package/types/excalidraw/components/MagicSettings.d.ts +0 -8
- package/types/excalidraw/components/Stats.d.ts +0 -11
- package/types/excalidraw/data/magic.d.ts +0 -23
- package/types/excalidraw/element/routing.d.ts +0 -12
- package/types/excalidraw/fonts/ExcalidrawFont.d.ts +0 -37
- package/types/excalidraw/fonts/wasm/hb-subset.bindings.d.ts +0 -45
- package/types/excalidraw/fonts/wasm/hb-subset.loader.d.ts +0 -5
- package/types/excalidraw/fonts/wasm/hb-subset.wasm.d.ts +0 -2
- package/types/excalidraw/fonts/wasm/woff2.bindings.d.ts +0 -31
- package/types/excalidraw/fonts/wasm/woff2.loader.d.ts +0 -6
- package/types/excalidraw/fonts/wasm/woff2.wasm.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Comic/index.d.ts +0 -2
- package/types/excalidraw/ga.d.ts +0 -63
- package/types/excalidraw/gadirections.d.ts +0 -8
- package/types/excalidraw/galines.d.ts +0 -22
- package/types/excalidraw/gapoints.d.ts +0 -7
- package/types/excalidraw/gatransforms.d.ts +0 -10
- package/types/excalidraw/jotai.d.ts +0 -34
- package/types/excalidraw/math.d.ts +0 -79
- package/types/excalidraw/scene/Fonts.d.ts +0 -19
- package/types/utils/geometry/geometry.d.ts +0 -89
- /package/types/excalidraw/fonts/{metadata.d.ts → FontMetadata.d.ts} +0 -0
- /package/types/excalidraw/{fonts/wasm/hb-subset-bindings.d.ts → subset/harfbuzz/harfbuzz-bindings.d.ts} +0 -0
- /package/types/excalidraw/{fonts/wasm/hb-subset-loader.d.ts → subset/harfbuzz/harfbuzz-loader.d.ts} +0 -0
- /package/types/excalidraw/{fonts/wasm/hb-subset-wasm.d.ts → subset/harfbuzz/harfbuzz-wasm.d.ts} +0 -0
- /package/types/excalidraw/{fonts/subset → subset}/subset-main.d.ts +0 -0
- /package/types/excalidraw/{fonts/subset → subset}/subset-shared.chunk.d.ts +0 -0
- /package/types/excalidraw/{fonts/subset → subset}/subset-worker.chunk.d.ts +0 -0
- /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-bindings.d.ts +0 -0
- /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-loader.d.ts +0 -0
- /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-wasm.d.ts +0 -0
|
@@ -26,6 +26,13 @@ export type SVGRenderConfig = {
|
|
|
26
26
|
canvasBackgroundColor: AppState["viewBackgroundColor"];
|
|
27
27
|
frameColor?: AppState["frameColor"];
|
|
28
28
|
embedsValidationStatus: EmbedsValidationStatus;
|
|
29
|
+
/**
|
|
30
|
+
* whether to attempt to reuse images as much as possible through symbols
|
|
31
|
+
* (reduces SVG size, but may be incompoatible with some SVG renderers)
|
|
32
|
+
*
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
reuseImages: boolean;
|
|
29
36
|
};
|
|
30
37
|
export type InteractiveCanvasRenderConfig = {
|
|
31
38
|
remoteSelectedElementIds: Map<ExcalidrawElement["id"], SocketId[]>;
|
|
@@ -77,6 +77,11 @@ export type BinaryFileData = {
|
|
|
77
77
|
* Epoch timestamp in milliseconds.
|
|
78
78
|
*/
|
|
79
79
|
lastRetrieved?: number;
|
|
80
|
+
/**
|
|
81
|
+
* indicates the version of the file. This can be used to determine whether
|
|
82
|
+
* the file dataURL has changed e.g. as part of restore due to schema update.
|
|
83
|
+
*/
|
|
84
|
+
version?: number;
|
|
80
85
|
};
|
|
81
86
|
export type BinaryFileMetadata = Omit<BinaryFileData, "dataURL">;
|
|
82
87
|
export type BinaryFiles = Record<ExcalidrawElement["id"], BinaryFileData>;
|
|
@@ -102,6 +107,7 @@ type _CommonCanvasAppState = {
|
|
|
102
107
|
width: AppState["width"];
|
|
103
108
|
height: AppState["height"];
|
|
104
109
|
viewModeEnabled: AppState["viewModeEnabled"];
|
|
110
|
+
openDialog: AppState["openDialog"];
|
|
105
111
|
editingGroupId: AppState["editingGroupId"];
|
|
106
112
|
selectedElementIds: AppState["selectedElementIds"];
|
|
107
113
|
frameToHighlight: AppState["frameToHighlight"];
|
|
@@ -123,6 +129,8 @@ export type StaticCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
123
129
|
gridColor: AppState["gridColor"];
|
|
124
130
|
frameColor: AppState["frameColor"];
|
|
125
131
|
currentHoveredFontFamily: AppState["currentHoveredFontFamily"];
|
|
132
|
+
hoveredElementIds: AppState["hoveredElementIds"];
|
|
133
|
+
croppingElementId: AppState["croppingElementId"];
|
|
126
134
|
}>;
|
|
127
135
|
export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
128
136
|
activeEmbeddable: AppState["activeEmbeddable"];
|
|
@@ -141,6 +149,8 @@ export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
141
149
|
editingTextElement: AppState["editingTextElement"];
|
|
142
150
|
gridColor: AppState["gridColor"];
|
|
143
151
|
highlightSearchResult: AppState["highlightSearchResult"];
|
|
152
|
+
isCropping: AppState["isCropping"];
|
|
153
|
+
croppingElementId: AppState["croppingElementId"];
|
|
144
154
|
searchMatches: AppState["searchMatches"];
|
|
145
155
|
}>;
|
|
146
156
|
export type ObservedAppState = ObservedStandaloneAppState & ObservedElementsAppState;
|
|
@@ -154,6 +164,7 @@ export type ObservedElementsAppState = {
|
|
|
154
164
|
selectedGroupIds: AppState["selectedGroupIds"];
|
|
155
165
|
editingLinearElementId: LinearElementEditor["elementId"] | null;
|
|
156
166
|
selectedLinearElementId: LinearElementEditor["elementId"] | null;
|
|
167
|
+
croppingElementId: AppState["croppingElementId"];
|
|
157
168
|
};
|
|
158
169
|
export interface AppState {
|
|
159
170
|
contextMenu: {
|
|
@@ -256,6 +267,9 @@ export interface AppState {
|
|
|
256
267
|
tab: "text-to-diagram" | "mermaid";
|
|
257
268
|
} | {
|
|
258
269
|
name: "commandPalette";
|
|
270
|
+
} | {
|
|
271
|
+
name: "elementLinkSelector";
|
|
272
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
259
273
|
};
|
|
260
274
|
/**
|
|
261
275
|
* Reflects user preference for whether the default sidebar should be docked.
|
|
@@ -269,6 +283,9 @@ export interface AppState {
|
|
|
269
283
|
selectedElementIds: Readonly<{
|
|
270
284
|
[id: string]: true;
|
|
271
285
|
}>;
|
|
286
|
+
hoveredElementIds: Readonly<{
|
|
287
|
+
[id: string]: true;
|
|
288
|
+
}>;
|
|
272
289
|
previousSelectedElementIds: {
|
|
273
290
|
[id: string]: true;
|
|
274
291
|
};
|
|
@@ -358,6 +375,9 @@ export interface AppState {
|
|
|
358
375
|
userToFollow: UserToFollow | null;
|
|
359
376
|
/** the socket ids of the users following the current user */
|
|
360
377
|
followedBy: Set<SocketId>;
|
|
378
|
+
/** image cropping */
|
|
379
|
+
isCropping: boolean;
|
|
380
|
+
croppingElementId: ExcalidrawElement["id"] | null;
|
|
361
381
|
searchMatches: readonly SearchMatch[];
|
|
362
382
|
}
|
|
363
383
|
type SearchMatch = {
|
|
@@ -450,7 +470,7 @@ export interface ExcalidrawProps {
|
|
|
450
470
|
handleKeyboardGlobally?: boolean;
|
|
451
471
|
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
|
|
452
472
|
autoFocus?: boolean;
|
|
453
|
-
onBeforeTextEdit?: (textElement: ExcalidrawTextElement) => string;
|
|
473
|
+
onBeforeTextEdit?: (textElement: ExcalidrawTextElement, isExistingElement: boolean) => string;
|
|
454
474
|
onBeforeTextSubmit?: (textElement: ExcalidrawTextElement, nextText: string, //wrapped
|
|
455
475
|
nextOriginalText: string, isDeleted: boolean) => {
|
|
456
476
|
updatedNextOriginalText: string;
|
|
@@ -459,6 +479,7 @@ export interface ExcalidrawProps {
|
|
|
459
479
|
generateIdForFile?: (file: File) => string | Promise<string>;
|
|
460
480
|
onThemeChange?: (newTheme: string) => void;
|
|
461
481
|
onViewModeChange?: (isViewModeEnabled: boolean) => void;
|
|
482
|
+
generateLinkForSelection?: (id: string, type: "element" | "group") => string;
|
|
462
483
|
onLinkOpen?: (element: NonDeletedExcalidrawElement, event: CustomEvent<{
|
|
463
484
|
nativeEvent: MouseEvent | React.PointerEvent<HTMLCanvasElement>;
|
|
464
485
|
}>) => void;
|
|
@@ -476,6 +497,7 @@ export interface ExcalidrawProps {
|
|
|
476
497
|
onContextMenu?: (element: readonly NonDeletedExcalidrawElement[], appState: AppState, onClose: (callback?: () => void) => void) => JSX.Element | null;
|
|
477
498
|
aiEnabled?: boolean;
|
|
478
499
|
showDeprecatedFonts?: boolean;
|
|
500
|
+
insertLinkAction?: (linkVal: string) => void;
|
|
479
501
|
}
|
|
480
502
|
export type SceneData = {
|
|
481
503
|
elements?: ImportedDataState["elements"];
|
|
@@ -566,6 +588,7 @@ export type AppClassProperties = {
|
|
|
566
588
|
getEditorUIOffsets: App["getEditorUIOffsets"];
|
|
567
589
|
visibleElements: App["visibleElements"];
|
|
568
590
|
excalidrawContainerValue: App["excalidrawContainerValue"];
|
|
591
|
+
onPointerUpEmitter: App["onPointerUpEmitter"];
|
|
569
592
|
};
|
|
570
593
|
export type PointerDownState = Readonly<{
|
|
571
594
|
origin: Readonly<{
|
|
@@ -630,6 +653,7 @@ export interface ExcalidrawImperativeAPI {
|
|
|
630
653
|
clear: InstanceType<typeof App>["resetHistory"];
|
|
631
654
|
};
|
|
632
655
|
zoomToFit: InstanceType<typeof App>["zoomToFit"];
|
|
656
|
+
getColorAtScenePoint: InstanceType<typeof App>["getColorAtScenePoint"];
|
|
633
657
|
startLineEditor: InstanceType<typeof App>["startLineEditor"];
|
|
634
658
|
getSceneElements: InstanceType<typeof App>["getSceneElements"];
|
|
635
659
|
getAppState: () => InstanceType<typeof App>["state"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EVENT } from "./constants";
|
|
2
|
-
import type { FontFamilyValues, FontString } from "./element/types";
|
|
2
|
+
import type { ExcalidrawBindableElement, FontFamilyValues, FontString } from "./element/types";
|
|
3
3
|
import type { ActiveTool, AppState, ToolType, UnsubscribeCallback, Zoom } from "./types";
|
|
4
4
|
import type { MaybePromise } from "./utility-types";
|
|
5
5
|
export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
@@ -137,6 +137,7 @@ export declare const muteFSAbortError: (error?: Error) => void;
|
|
|
137
137
|
export declare const findIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
138
138
|
export declare const findLastIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
139
139
|
export declare const isTransparent: (color: string) => boolean;
|
|
140
|
+
export declare const isBindingFallthroughEnabled: (el: ExcalidrawBindableElement) => boolean;
|
|
140
141
|
export type ResolvablePromise<T> = Promise<T> & {
|
|
141
142
|
resolve: [T] extends [undefined] ? (value?: MaybePromise<Awaited<T>>) => void : (value: MaybePromise<Awaited<T>>) => void;
|
|
142
143
|
reject: (error: Error) => void;
|
|
@@ -246,4 +247,9 @@ export declare class PromisePool<T> {
|
|
|
246
247
|
constructor(source: IterableIterator<Promise<void | readonly [number, T]>>, concurrency: number);
|
|
247
248
|
all(): PromiseLike<T[]>;
|
|
248
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* use when you need to render unsafe string as HTML attribute, but MAKE SURE
|
|
252
|
+
* the attribute is double-quoted when constructing the HTML string
|
|
253
|
+
*/
|
|
254
|
+
export declare const escapeDoubleQuotes: (str: string) => string;
|
|
249
255
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type GlobalPoint } from "../math";
|
|
1
|
+
import { type GlobalPoint, type LocalPoint } from "../math";
|
|
2
2
|
import type { LineSegment } from "../utils";
|
|
3
3
|
import type { BoundingBox, Bounds } from "./element/bounds";
|
|
4
4
|
declare global {
|
|
@@ -7,6 +7,8 @@ declare global {
|
|
|
7
7
|
data: DebugElement[][];
|
|
8
8
|
currentFrame?: number;
|
|
9
9
|
};
|
|
10
|
+
debugDrawPoint: typeof debugDrawPoint;
|
|
11
|
+
debugDrawLine: typeof debugDrawLine;
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
14
|
export type DebugElement = {
|
|
@@ -31,5 +33,10 @@ export declare const debugDrawBounds: (box: Bounds | Bounds[], opts?: {
|
|
|
31
33
|
color?: string;
|
|
32
34
|
permanent?: boolean;
|
|
33
35
|
}) => void;
|
|
36
|
+
export declare const debugDrawPoints: ({ x, y, points, }: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
points: LocalPoint[];
|
|
40
|
+
}, options?: any) => void;
|
|
34
41
|
export declare const debugCloseFrame: () => void;
|
|
35
42
|
export declare const debugClear: () => void;
|
package/types/math/line.d.ts
CHANGED
|
@@ -23,4 +23,23 @@ export declare function lineFromPointPair<P extends GlobalPoint | LocalPoint>([a
|
|
|
23
23
|
* @returns
|
|
24
24
|
*/
|
|
25
25
|
export declare function lineFromPointArray<P extends GlobalPoint | LocalPoint>(pointArray: P[]): Line<P> | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Return the coordinates resulting from rotating the given line about an
|
|
28
|
+
* origin by an angle in degrees note that when the origin is not given,
|
|
29
|
+
* the midpoint of the given line is used as the origin
|
|
30
|
+
*
|
|
31
|
+
* @param l
|
|
32
|
+
* @param angle
|
|
33
|
+
* @param origin
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
26
36
|
export declare const lineRotate: <Point extends GlobalPoint | LocalPoint>(l: Line<Point>, angle: Radians, origin?: Point | undefined) => Line<Point>;
|
|
37
|
+
/**
|
|
38
|
+
* Determines the intersection point (unless the lines are parallel) of two
|
|
39
|
+
* lines
|
|
40
|
+
*
|
|
41
|
+
* @param a
|
|
42
|
+
* @param b
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
export declare const linesIntersectAt: <Point extends GlobalPoint | LocalPoint>(a: Line<Point>, b: Line<Point>) => Point | null;
|
package/types/math/point.d.ts
CHANGED
|
@@ -28,6 +28,16 @@ export declare function pointFromPair<Point extends GlobalPoint | LocalPoint>(pa
|
|
|
28
28
|
* @returns The point the vector points at with origin 0,0
|
|
29
29
|
*/
|
|
30
30
|
export declare function pointFromVector<P extends GlobalPoint | LocalPoint>(v: Vector): P;
|
|
31
|
+
/**
|
|
32
|
+
* Convert the coordiante object to a point.
|
|
33
|
+
*
|
|
34
|
+
* @param coords The coordinate object with x and y properties
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
export declare function pointFromCoords<Point extends GlobalPoint | LocalPoint>({ x, y, }: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
}): Point;
|
|
31
41
|
/**
|
|
32
42
|
* Checks if the provided value has the shape of a Point.
|
|
33
43
|
*
|
package/types/math/utils.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare const round: (value: number, precision: number, func?: "round" |
|
|
|
4
4
|
export declare const roundToStep: (value: number, step: number, func?: "round" | "floor" | "ceil") => number;
|
|
5
5
|
export declare const average: (a: number, b: number) => number;
|
|
6
6
|
export declare const isFiniteNumber: (value: any) => value is number;
|
|
7
|
+
export declare const isCloseTo: (a: number, b: number, precision?: number) => boolean;
|
package/types/math/vector.d.ts
CHANGED
|
@@ -86,3 +86,7 @@ export declare function vectorMagnitude(v: Vector): number;
|
|
|
86
86
|
* @returns The new normalized vector
|
|
87
87
|
*/
|
|
88
88
|
export declare const vectorNormalize: (v: Vector) => Vector;
|
|
89
|
+
/**
|
|
90
|
+
* Project the first vector onto the second vector
|
|
91
|
+
*/
|
|
92
|
+
export declare const vectorProjection: (a: Vector, b: Vector) => Vector;
|
package/types/utils/export.d.ts
CHANGED
|
@@ -22,10 +22,11 @@ export declare const exportToBlob: (opts: ExportOpts & {
|
|
|
22
22
|
quality?: number;
|
|
23
23
|
exportPadding?: number;
|
|
24
24
|
}) => Promise<Blob>;
|
|
25
|
-
export declare const exportToSvg: ({ elements, appState, files, exportPadding, renderEmbeddables, exportingFrame, skipInliningFonts, }: Omit<ExportOpts, "getDimensions"> & {
|
|
25
|
+
export declare const exportToSvg: ({ elements, appState, files, exportPadding, renderEmbeddables, exportingFrame, skipInliningFonts, reuseImages, }: Omit<ExportOpts, "getDimensions"> & {
|
|
26
26
|
exportPadding?: number | undefined;
|
|
27
27
|
renderEmbeddables?: boolean | undefined;
|
|
28
28
|
skipInliningFonts?: true | undefined;
|
|
29
|
+
reuseImages?: boolean | undefined;
|
|
29
30
|
}) => Promise<SVGSVGElement>;
|
|
30
31
|
export declare const exportToClipboard: (opts: ExportOpts & {
|
|
31
32
|
mimeType?: string;
|
|
@@ -36,9 +37,10 @@ export { getCommonBoundingBox } from "../excalidraw/element/bounds";
|
|
|
36
37
|
export { getMaximumGroups } from "../excalidraw/groups";
|
|
37
38
|
export { intersectElementWithLine } from "../excalidraw/element/binding";
|
|
38
39
|
export { determineFocusDistance } from "../excalidraw/element/binding";
|
|
39
|
-
export { measureText
|
|
40
|
+
export { measureText } from "../excalidraw/element/textElement";
|
|
41
|
+
export { wrapText } from "../excalidraw/element/textWrapping";
|
|
40
42
|
export { getLineHeight } from "../excalidraw/fonts/index";
|
|
41
43
|
export { getFontString, getFontFamilyString } from "../excalidraw/utils";
|
|
42
44
|
export { getBoundTextMaxWidth } from "../excalidraw/element/textElement";
|
|
43
|
-
export { mermaidToExcalidraw } from "../excalidraw/components/TTDDialog/
|
|
44
|
-
export { destroyObsidianUtils,
|
|
45
|
+
export { mermaidToExcalidraw } from "../excalidraw/components/TTDDialog/MermaidToExcalidrawLib";
|
|
46
|
+
export { destroyObsidianUtils, registerLocalFont, getFontFamilies, registerFontsInCSS, getCSSFontDefinition, loadSceneFonts, getSharedMermaidInstance, loadMermaid, } from "../excalidraw/obsidianUtils";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./MagicSettings.scss";
|
|
2
|
-
export declare const MagicSettings: (props: {
|
|
3
|
-
openAIKey: string | null;
|
|
4
|
-
isPersisted: boolean;
|
|
5
|
-
onChange: (key: string, shouldPersist: boolean) => void;
|
|
6
|
-
onConfirm: (key: string, shouldPersist: boolean) => void;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
}) => JSX.Element | null;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
3
|
-
import type { ExcalidrawProps, UIAppState } from "../types";
|
|
4
|
-
import "./Stats.scss";
|
|
5
|
-
export declare const Stats: (props: {
|
|
6
|
-
appState: UIAppState;
|
|
7
|
-
setAppState: React.Component<any, UIAppState>["setState"];
|
|
8
|
-
elements: readonly NonDeletedExcalidrawElement[];
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
renderCustomStats: ExcalidrawProps["renderCustomStats"];
|
|
11
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Theme } from "../element/types";
|
|
2
|
-
import type { DataURL } from "../types";
|
|
3
|
-
import type { OpenAIOutput } from "./ai/types";
|
|
4
|
-
export type MagicCacheData = {
|
|
5
|
-
status: "pending";
|
|
6
|
-
} | {
|
|
7
|
-
status: "done";
|
|
8
|
-
html: string;
|
|
9
|
-
} | {
|
|
10
|
-
status: "error";
|
|
11
|
-
message?: string;
|
|
12
|
-
code: "ERR_GENERATION_INTERRUPTED" | string;
|
|
13
|
-
};
|
|
14
|
-
export declare function diagramToHTML({ image, apiKey, text, theme, }: {
|
|
15
|
-
image: DataURL;
|
|
16
|
-
apiKey: string;
|
|
17
|
-
text: string;
|
|
18
|
-
theme?: Theme;
|
|
19
|
-
}): Promise<({
|
|
20
|
-
ok: true;
|
|
21
|
-
} & OpenAIOutput.ChatCompletion) | ({
|
|
22
|
-
ok: false;
|
|
23
|
-
} & OpenAIOutput.APIError)>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type LocalPoint, type Vector } from "../../math";
|
|
2
|
-
import type { ElementUpdate } from "./mutateElement";
|
|
3
|
-
import type { ExcalidrawElbowArrowElement, NonDeletedSceneElementsMap, SceneElementsMap } from "./types";
|
|
4
|
-
export declare const mutateElbowArrow: (arrow: ExcalidrawElbowArrowElement, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, nextPoints: readonly LocalPoint[], offset?: Vector, otherUpdates?: Omit<ElementUpdate<ExcalidrawElbowArrowElement>, "angle" | "x" | "y" | "width" | "height" | "elbowed" | "points">, options?: {
|
|
5
|
-
isDragging?: boolean;
|
|
6
|
-
informMutation?: boolean;
|
|
7
|
-
}) => void;
|
|
8
|
-
export declare const updateElbowArrow: (arrow: ExcalidrawElbowArrowElement, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, nextPoints: readonly LocalPoint[], offset?: Vector, options?: {
|
|
9
|
-
isDragging?: boolean;
|
|
10
|
-
disableBinding?: boolean;
|
|
11
|
-
informMutation?: boolean;
|
|
12
|
-
}) => ElementUpdate<ExcalidrawElbowArrowElement> | null;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface Font {
|
|
2
|
-
urls: URL[];
|
|
3
|
-
fontFace: FontFace;
|
|
4
|
-
getContent(codePoints: ReadonlySet<number>): Promise<string>;
|
|
5
|
-
getContentLegacy(): Promise<string>;
|
|
6
|
-
}
|
|
7
|
-
export declare const UNPKG_FALLBACK_URL: string;
|
|
8
|
-
export declare class ExcalidrawFont implements Font {
|
|
9
|
-
readonly urls: URL[];
|
|
10
|
-
readonly fontFace: FontFace;
|
|
11
|
-
constructor(family: string, uri: string, descriptors?: FontFaceDescriptors);
|
|
12
|
-
/**
|
|
13
|
-
* Tries to fetch woff2 content, based on the registered urls (from first to last, treated as fallbacks).
|
|
14
|
-
*
|
|
15
|
-
* NOTE: assumes usage of `dataurl` outside the browser environment
|
|
16
|
-
*
|
|
17
|
-
* @returns base64 with subsetted glyphs based on the passed codepoint, last defined url otherwise
|
|
18
|
-
*/
|
|
19
|
-
getContent(codePoints: ReadonlySet<number>): Promise<string>;
|
|
20
|
-
/**
|
|
21
|
-
* Tries to subset glyphs in a font based on the used codepoints, returning the font as daturl.
|
|
22
|
-
*
|
|
23
|
-
* @param arrayBuffer font data buffer, preferrably in the woff2 format, though others should work as well
|
|
24
|
-
* @param codePoints codepoints used to subset the glyphs
|
|
25
|
-
*
|
|
26
|
-
* @returns font with subsetted glyphs (all glyphs in case of errors) converted into a dataurl
|
|
27
|
-
*/
|
|
28
|
-
private static subsetGlyphsByCodePoints;
|
|
29
|
-
private static toBase64;
|
|
30
|
-
private static createUrls;
|
|
31
|
-
private static getFormat;
|
|
32
|
-
private static normalizeBaseUrl;
|
|
33
|
-
/**
|
|
34
|
-
* zsviczian https://github.com/zsviczian/excalidraw/commit/b4cfaaa4b4f46ca01f94e27fb7bf651a9da99daa
|
|
35
|
-
*/
|
|
36
|
-
getContentLegacy(): Promise<string>;
|
|
37
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Modified version of hb-subset bindings from "subset-font" package https://github.com/papandreou/subset-font/blob/3f711c8aa29a426c7f22655861abfb976950f527/index.js
|
|
3
|
-
*
|
|
4
|
-
* CHANGELOG:
|
|
5
|
-
* - removed dependency on node APIs to work inside the browser
|
|
6
|
-
* - removed dependency on font fontverter for brotli compression
|
|
7
|
-
* - removed dependencies on lodash and p-limit
|
|
8
|
-
* - removed options for preserveNameIds, variationAxes, noLayoutClosure (not needed for now)
|
|
9
|
-
* - replaced text input with codepoints
|
|
10
|
-
* - rewritten in typescript and with esm modules
|
|
11
|
-
|
|
12
|
-
Copyright (c) 2012, Andreas Lind Petersen
|
|
13
|
-
All rights reserved.
|
|
14
|
-
|
|
15
|
-
Redistribution and use in source and binary forms, with or without
|
|
16
|
-
modification, are permitted provided that the following conditions are
|
|
17
|
-
met:
|
|
18
|
-
|
|
19
|
-
* Redistributions of source code must retain the above copyright
|
|
20
|
-
notice, this list of conditions and the following disclaimer.
|
|
21
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
22
|
-
notice, this list of conditions and the following disclaimer in
|
|
23
|
-
the documentation and/or other materials provided with the
|
|
24
|
-
distribution.
|
|
25
|
-
* Neither the name of the author nor the names of contributors may
|
|
26
|
-
be used to endorse or promote products derived from this
|
|
27
|
-
software without specific prior written permission.
|
|
28
|
-
|
|
29
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
30
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
31
|
-
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
32
|
-
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
33
|
-
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
34
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
35
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
36
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
37
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
38
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
39
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
40
|
-
*/
|
|
41
|
-
declare function subset(hbSubsetWasm: any, heapu8: Uint8Array, font: ArrayBuffer, codePoints: ReadonlySet<number>): Uint8Array;
|
|
42
|
-
declare const _default: {
|
|
43
|
-
subset: typeof subset;
|
|
44
|
-
};
|
|
45
|
-
export default _default;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Slitghly modified emscripten bindings of https://github.com/kekee000/fonteditor-core/blob/582bba757aa2915ec2240c61717ff12c50594675/woff2src/woff2.js
|
|
3
|
-
*
|
|
4
|
-
* CHANGELOG:
|
|
5
|
-
* - replaced existing exports with default esm export (`export default Module;`)
|
|
6
|
-
* - replaced "instanceof ArrayBuffer" with "Object.prototype.toString.call(d) === "[object ArrayBuffer]", due to unreliability of different ArrayBuffer instances depending on the context (i.e. inside VM)
|
|
7
|
-
|
|
8
|
-
The MIT License (MIT)
|
|
9
|
-
|
|
10
|
-
Copyright (c) 2014 ecomfe
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
in the Software without restriction, including without limitation the rights
|
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
SOFTWARE.
|
|
29
|
-
*/
|
|
30
|
-
declare const Module: (Module: any) => any;
|
|
31
|
-
export default Module;
|
package/types/excalidraw/ga.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a 2D Projective Geometric Algebra implementation.
|
|
3
|
-
*
|
|
4
|
-
* For wider context on geometric algebra visit see https://bivector.net.
|
|
5
|
-
*
|
|
6
|
-
* For this specific algebra see cheatsheet https://bivector.net/2DPGA.pdf.
|
|
7
|
-
*
|
|
8
|
-
* Converted from generator written by enki, with a ton of added on top.
|
|
9
|
-
*
|
|
10
|
-
* This library uses 8-vectors to represent points, directions and lines
|
|
11
|
-
* in 2D space.
|
|
12
|
-
*
|
|
13
|
-
* An array `[a, b, c, d, e, f, g, h]` represents a n(8)vector:
|
|
14
|
-
* a + b*e0 + c*e1 + d*e2 + e*e01 + f*e20 + g*e12 + h*e012
|
|
15
|
-
*
|
|
16
|
-
* See GAPoint, GALine, GADirection and GATransform modules for common
|
|
17
|
-
* operations.
|
|
18
|
-
*/
|
|
19
|
-
export type Point = NVector;
|
|
20
|
-
export type Direction = NVector;
|
|
21
|
-
export type Line = NVector;
|
|
22
|
-
export type Transform = NVector;
|
|
23
|
-
export declare const point: (x: number, y: number) => NVector;
|
|
24
|
-
export declare const origin: () => NVector;
|
|
25
|
-
export declare const direction: (x: number, y: number) => NVector;
|
|
26
|
-
export declare const offset: (x: number, y: number) => NVector;
|
|
27
|
-
type NVector = readonly [
|
|
28
|
-
number,
|
|
29
|
-
number,
|
|
30
|
-
number,
|
|
31
|
-
number,
|
|
32
|
-
number,
|
|
33
|
-
number,
|
|
34
|
-
number,
|
|
35
|
-
number
|
|
36
|
-
];
|
|
37
|
-
export declare const nvector: (value?: number, index?: number) => NVector;
|
|
38
|
-
export declare const toString: (nvector: NVector) => string;
|
|
39
|
-
export declare const reverse: (nvector: NVector) => NVector;
|
|
40
|
-
export declare const dual: (nvector: NVector) => NVector;
|
|
41
|
-
export declare const conjugate: (nvector: NVector) => NVector;
|
|
42
|
-
export declare const involute: (nvector: NVector) => NVector;
|
|
43
|
-
export declare const add: (a: NVector, b: NVector | number) => NVector;
|
|
44
|
-
export declare const sub: (a: NVector, b: NVector | number) => NVector;
|
|
45
|
-
export declare const mul: (a: NVector, b: NVector | number) => NVector;
|
|
46
|
-
export declare const mulScalar: (a: NVector, b: NVector) => number;
|
|
47
|
-
export declare const meet: (a: NVector, b: NVector) => NVector;
|
|
48
|
-
export declare const join: (a: NVector, b: NVector) => NVector;
|
|
49
|
-
export declare const joinScalar: (a: NVector, b: NVector) => number;
|
|
50
|
-
export declare const dot: (a: NVector, b: NVector) => NVector;
|
|
51
|
-
export declare const norm: (a: NVector) => number;
|
|
52
|
-
export declare const inorm: (a: NVector) => number;
|
|
53
|
-
export declare const normalized: (a: NVector) => NVector;
|
|
54
|
-
export declare const inormalized: (a: NVector) => NVector;
|
|
55
|
-
export declare const E0: NVector;
|
|
56
|
-
export declare const E1: NVector;
|
|
57
|
-
export declare const E2: NVector;
|
|
58
|
-
export declare const E01: NVector;
|
|
59
|
-
export declare const E20: NVector;
|
|
60
|
-
export declare const E12: NVector;
|
|
61
|
-
export declare const E012: NVector;
|
|
62
|
-
export declare const I: NVector;
|
|
63
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A direction is stored as an array `[0, 0, 0, 0, y, x, 0, 0]` representing
|
|
3
|
-
* vector `(x, y)`.
|
|
4
|
-
*/
|
|
5
|
-
export declare const from: (point: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
6
|
-
export declare const fromTo: (from: readonly [number, number, number, number, number, number, number, number], to: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
7
|
-
export declare const orthogonal: (direction: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
8
|
-
export declare const orthogonalToLine: (line: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A line is stored as an array `[0, c, a, b, 0, 0, 0, 0]` representing:
|
|
3
|
-
* c * e0 + a * e1 + b*e2
|
|
4
|
-
*
|
|
5
|
-
* This maps to a standard formula `a * x + b * y + c`.
|
|
6
|
-
*
|
|
7
|
-
* `(-b, a)` corresponds to a 2D vector parallel to the line. The lines
|
|
8
|
-
* have a natural orientation, corresponding to that vector.
|
|
9
|
-
*
|
|
10
|
-
* The magnitude ("norm") of the line is `sqrt(a ^ 2 + b ^ 2)`.
|
|
11
|
-
* `c / norm(line)` is the oriented distance from line to origin.
|
|
12
|
-
*/
|
|
13
|
-
export declare const vector: (x: number, y: number) => readonly [number, number, number, number, number, number, number, number];
|
|
14
|
-
export declare const equation: (a: number, b: number, c: number) => readonly [number, number, number, number, number, number, number, number];
|
|
15
|
-
export declare const through: (from: readonly [number, number, number, number, number, number, number, number], to: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
16
|
-
export declare const orthogonal: (line: readonly [number, number, number, number, number, number, number, number], point: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
17
|
-
export declare const orthogonalThrough: (against: readonly [number, number, number, number, number, number, number, number], intersection: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
18
|
-
export declare const parallel: (line: readonly [number, number, number, number, number, number, number, number], distance: number) => readonly [number, number, number, number, number, number, number, number];
|
|
19
|
-
export declare const parallelThrough: (line: readonly [number, number, number, number, number, number, number, number], point: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
20
|
-
export declare const distance: (line1: readonly [number, number, number, number, number, number, number, number], line2: readonly [number, number, number, number, number, number, number, number]) => number;
|
|
21
|
-
export declare const angle: (line1: readonly [number, number, number, number, number, number, number, number], line2: readonly [number, number, number, number, number, number, number, number]) => number;
|
|
22
|
-
export declare const sign: (line: readonly [number, number, number, number, number, number, number, number]) => number;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const from: ([x, y]: readonly [number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
2
|
-
export declare const toTuple: (point: readonly [number, number, number, number, number, number, number, number]) => [number, number];
|
|
3
|
-
export declare const abs: (point: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
4
|
-
export declare const intersect: (line1: readonly [number, number, number, number, number, number, number, number], line2: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
5
|
-
export declare const project: (point: readonly [number, number, number, number, number, number, number, number], line: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
6
|
-
export declare const distance: (point1: readonly [number, number, number, number, number, number, number, number], point2: readonly [number, number, number, number, number, number, number, number]) => number;
|
|
7
|
-
export declare const distanceToLine: (point: readonly [number, number, number, number, number, number, number, number], line: readonly [number, number, number, number, number, number, number, number]) => number;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Line, Direction, Point } from "./ga";
|
|
2
|
-
/**
|
|
3
|
-
* TODO: docs
|
|
4
|
-
*/
|
|
5
|
-
export declare const rotation: (pivot: readonly [number, number, number, number, number, number, number, number], angle: number) => readonly [number, number, number, number, number, number, number, number];
|
|
6
|
-
export declare const translation: (direction: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
7
|
-
export declare const translationOrthogonal: (direction: readonly [number, number, number, number, number, number, number, number], distance: number) => readonly [number, number, number, number, number, number, number, number];
|
|
8
|
-
export declare const translationAlong: (line: readonly [number, number, number, number, number, number, number, number], distance: number) => readonly [number, number, number, number, number, number, number, number];
|
|
9
|
-
export declare const compose: (motor1: readonly [number, number, number, number, number, number, number, number], motor2: readonly [number, number, number, number, number, number, number, number]) => readonly [number, number, number, number, number, number, number, number];
|
|
10
|
-
export declare const apply: (motor: readonly [number, number, number, number, number, number, number, number], nvector: Point | Direction | Line) => Point | Direction | Line;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { PrimitiveAtom } from "jotai";
|
|
2
|
-
export declare const jotaiScope: unique symbol;
|
|
3
|
-
export declare const jotaiStore: {
|
|
4
|
-
get: <Value>(atom: import("jotai").Atom<Value>) => Awaited<Value> | undefined;
|
|
5
|
-
asyncGet: <Value_1>(atom: import("jotai").Atom<Value_1>) => Promise<Awaited<Value_1>>;
|
|
6
|
-
set: <Value_2, Update, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_2, Update, Result>, update: Update) => Result;
|
|
7
|
-
sub: (atom: import("jotai").Atom<unknown>, callback: () => void) => () => void;
|
|
8
|
-
SECRET_INTERNAL_store: {
|
|
9
|
-
r: <Value_3>(readingAtom: import("jotai").Atom<Value_3>, version?: import("jotai/core/store").VersionObject | undefined) => import("jotai/core/store").AtomState<Value_3>;
|
|
10
|
-
w: <Value_1_1, Update_1, Result_1 extends void | Promise<void>>(writingAtom: import("jotai").WritableAtom<Value_1_1, Update_1, Result_1>, update: Update_1, version?: import("jotai/core/store").VersionObject | undefined) => Result_1;
|
|
11
|
-
c: (_atom: import("jotai").Atom<unknown> | null, version?: import("jotai/core/store").VersionObject | undefined) => void;
|
|
12
|
-
s: (atom: import("jotai").Atom<unknown>, callback: (version?: import("jotai/core/store").VersionObject | undefined) => void, version?: import("jotai/core/store").VersionObject | undefined) => () => void;
|
|
13
|
-
h: (values: Iterable<readonly [import("jotai").Atom<unknown>, unknown]>, version?: import("jotai/core/store").VersionObject | undefined) => void;
|
|
14
|
-
n: (l: () => void) => () => void;
|
|
15
|
-
l: () => IterableIterator<import("jotai").Atom<unknown>>;
|
|
16
|
-
a: (a: import("jotai").Atom<unknown>) => import("jotai/core/store").AtomState<unknown> | undefined;
|
|
17
|
-
m: (a: import("jotai").Atom<unknown>) => {
|
|
18
|
-
l: Set<(version?: import("jotai/core/store").VersionObject | undefined) => void>;
|
|
19
|
-
t: Set<import("jotai").Atom<unknown>>;
|
|
20
|
-
u?: (() => void) | undefined;
|
|
21
|
-
} | undefined;
|
|
22
|
-
} | {
|
|
23
|
-
r: <Value_4>(readingAtom: import("jotai").Atom<Value_4>, version?: import("jotai/core/store").VersionObject | undefined) => import("jotai/core/store").AtomState<Value_4>;
|
|
24
|
-
w: <Value_1_2, Update_2, Result_2 extends void | Promise<void>>(writingAtom: import("jotai").WritableAtom<Value_1_2, Update_2, Result_2>, update: Update_2, version?: import("jotai/core/store").VersionObject | undefined) => Result_2;
|
|
25
|
-
c: (_atom: import("jotai").Atom<unknown> | null, version?: import("jotai/core/store").VersionObject | undefined) => void;
|
|
26
|
-
s: (atom: import("jotai").Atom<unknown>, callback: (version?: import("jotai/core/store").VersionObject | undefined) => void, version?: import("jotai/core/store").VersionObject | undefined) => () => void;
|
|
27
|
-
h: (values: Iterable<readonly [import("jotai").Atom<unknown>, unknown]>, version?: import("jotai/core/store").VersionObject | undefined) => void;
|
|
28
|
-
n?: undefined;
|
|
29
|
-
l?: undefined;
|
|
30
|
-
a?: undefined;
|
|
31
|
-
m?: undefined;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export declare const useAtomWithInitialValue: <T extends unknown, A extends PrimitiveAtom<T>>(atom: A, initialValue: T | (() => T)) => readonly [Awaited<T>, import("jotai/core/atom").SetAtom<T | ((prev: T) => T), void>];
|