@zsviczian/excalidraw 0.17.6-3 → 0.17.6-30
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 +0 -605
- package/types/excalidraw/actions/actionAlign.d.ts +0 -108
- package/types/excalidraw/actions/actionBoundText.d.ts +0 -440
- package/types/excalidraw/actions/actionCanvas.d.ts +0 -2958
- package/types/excalidraw/actions/actionClipboard.d.ts +0 -1322
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +0 -640
- package/types/excalidraw/actions/actionDistribute.d.ts +0 -34
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +0 -21
- package/types/excalidraw/actions/actionElementLock.d.ts +0 -428
- package/types/excalidraw/actions/actionExport.d.ts +0 -1884
- package/types/excalidraw/actions/actionFinalize.d.ts +0 -409
- package/types/excalidraw/actions/actionFlip.d.ts +0 -34
- package/types/excalidraw/actions/actionFrame.d.ts +0 -855
- package/types/excalidraw/actions/actionGroup.d.ts +0 -438
- package/types/excalidraw/actions/actionHistory.d.ts +0 -7
- package/types/excalidraw/actions/actionLinearEditor.d.ts +0 -215
- package/types/excalidraw/actions/actionLink.d.ts +0 -215
- package/types/excalidraw/actions/actionMenu.d.ts +0 -628
- package/types/excalidraw/actions/actionNavigate.d.ts +0 -414
- package/types/excalidraw/actions/actionProperties.d.ts +0 -3156
- package/types/excalidraw/actions/actionSelectAll.d.ts +0 -214
- package/types/excalidraw/actions/actionStyles.d.ts +0 -228
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +0 -17
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +0 -217
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -215
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +0 -407
- package/types/excalidraw/actions/actionToggleStats.d.ts +0 -215
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +0 -216
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +0 -216
- package/types/excalidraw/actions/actionZindex.d.ts +0 -74
- package/types/excalidraw/actions/index.d.ts +0 -26
- package/types/excalidraw/actions/manager.d.ts +0 -21
- package/types/excalidraw/actions/register.d.ts +0 -5
- package/types/excalidraw/actions/shortcuts.d.ts +0 -4
- package/types/excalidraw/actions/types.d.ts +0 -46
- package/types/excalidraw/align.d.ts +0 -6
- package/types/excalidraw/analytics.d.ts +0 -1
- package/types/excalidraw/animated-trail.d.ts +0 -33
- package/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/types/excalidraw/appState.d.ts +0 -89
- package/types/excalidraw/binaryheap.d.ts +0 -12
- package/types/excalidraw/change.d.ts +0 -191
- package/types/excalidraw/charts.d.ts +0 -27
- package/types/excalidraw/clients.d.ts +0 -14
- package/types/excalidraw/clipboard.d.ts +0 -44
- package/types/excalidraw/colors.d.ts +0 -61
- package/types/excalidraw/components/Actions.d.ts +0 -34
- package/types/excalidraw/components/ActiveConfirmDialog.d.ts +0 -4
- package/types/excalidraw/components/App.d.ts +0 -535
- package/types/excalidraw/components/Avatar.d.ts +0 -11
- package/types/excalidraw/components/BraveMeasureTextError.d.ts +0 -2
- package/types/excalidraw/components/Button.d.ts +0 -17
- package/types/excalidraw/components/ButtonIcon.d.ts +0 -14
- package/types/excalidraw/components/ButtonIconCycle.d.ts +0 -10
- package/types/excalidraw/components/ButtonIconSelect.d.ts +0 -19
- package/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/types/excalidraw/components/ButtonSeparator.d.ts +0 -1
- package/types/excalidraw/components/Card.d.ts +0 -6
- package/types/excalidraw/components/CheckboxItem.d.ts +0 -8
- package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +0 -9
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -19
- package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +0 -8
- package/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +0 -8
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +0 -18
- package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +0 -10
- package/types/excalidraw/components/ColorPicker/PickerHeading.d.ts +0 -5
- package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +0 -8
- package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +0 -9
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -21
- package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -20
- package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +0 -18
- package/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +0 -2
- package/types/excalidraw/components/CommandPalette/types.d.ts +0 -25
- package/types/excalidraw/components/ConfirmDialog.d.ts +0 -10
- package/types/excalidraw/components/ContextMenu.d.ts +0 -16
- package/types/excalidraw/components/DarkModeToggle.d.ts +0 -7
- package/types/excalidraw/components/DefaultSidebar.d.ts +0 -30
- package/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/types/excalidraw/components/Dialog.d.ts +0 -13
- package/types/excalidraw/components/DialogActionButton.d.ts +0 -10
- package/types/excalidraw/components/ErrorDialog.d.ts +0 -5
- package/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
- package/types/excalidraw/components/EyeDropper.d.ts +0 -27
- package/types/excalidraw/components/FilledButton.d.ts +0 -18
- package/types/excalidraw/components/FixedSideContainer.d.ts +0 -9
- package/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
- package/types/excalidraw/components/FontPicker/FontPicker.d.ts +0 -21
- package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +0 -25
- package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +0 -6
- package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -13
- package/types/excalidraw/components/HandButton.d.ts +0 -10
- package/types/excalidraw/components/HelpButton.d.ts +0 -7
- package/types/excalidraw/components/HelpDialog.d.ts +0 -4
- package/types/excalidraw/components/HintViewer.d.ts +0 -10
- package/types/excalidraw/components/IconPicker.d.ts +0 -14
- package/types/excalidraw/components/ImageExportDialog.d.ts +0 -14
- package/types/excalidraw/components/InitializeApp.d.ts +0 -10
- package/types/excalidraw/components/InlineIcon.d.ts +0 -3
- package/types/excalidraw/components/Island.d.ts +0 -10
- package/types/excalidraw/components/JSONExportDialog.d.ts +0 -15
- package/types/excalidraw/components/LaserPointerButton.d.ts +0 -10
- package/types/excalidraw/components/LayerUI.d.ts +0 -30
- package/types/excalidraw/components/LibraryMenu.d.ts +0 -24
- package/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +0 -7
- package/types/excalidraw/components/LibraryMenuControlButtons.d.ts +0 -9
- package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +0 -17
- package/types/excalidraw/components/LibraryMenuItems.d.ts +0 -14
- package/types/excalidraw/components/LibraryMenuSection.d.ts +0 -23
- package/types/excalidraw/components/LibraryUnit.d.ts +0 -14
- package/types/excalidraw/components/LoadingMessage.d.ts +0 -5
- package/types/excalidraw/components/LockButton.d.ts +0 -10
- package/types/excalidraw/components/MagicButton.d.ts +0 -9
- package/types/excalidraw/components/MagicSettings.d.ts +0 -8
- package/types/excalidraw/components/MobileMenu.d.ts +0 -24
- package/types/excalidraw/components/Modal.d.ts +0 -14
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +0 -17
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +0 -17
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +0 -22
- package/types/excalidraw/components/Paragraph.d.ts +0 -4
- package/types/excalidraw/components/PasteChartDialog.d.ts +0 -8
- package/types/excalidraw/components/PenModeButton.d.ts +0 -12
- package/types/excalidraw/components/Popover.d.ts +0 -15
- package/types/excalidraw/components/ProjectName.d.ts +0 -10
- package/types/excalidraw/components/PropertiesPopover.d.ts +0 -15
- package/types/excalidraw/components/PublishLibrary.d.ts +0 -16
- package/types/excalidraw/components/QuickSearch.d.ts +0 -9
- package/types/excalidraw/components/RadioGroup.d.ts +0 -13
- package/types/excalidraw/components/SVGLayer.d.ts +0 -7
- package/types/excalidraw/components/ScrollableList.d.ts +0 -8
- package/types/excalidraw/components/SearchMenu.d.ts +0 -5
- package/types/excalidraw/components/Section.d.ts +0 -6
- package/types/excalidraw/components/ShareableLinkDialog.d.ts +0 -7
- package/types/excalidraw/components/Sidebar/Sidebar.d.ts +0 -76
- package/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +0 -7
- package/types/excalidraw/components/Sidebar/SidebarTab.d.ts +0 -8
- package/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +0 -9
- package/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +0 -6
- package/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +0 -6
- package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +0 -6
- package/types/excalidraw/components/Sidebar/common.d.ts +0 -33
- package/types/excalidraw/components/Spinner.d.ts +0 -8
- package/types/excalidraw/components/Stack.d.ts +0 -16
- package/types/excalidraw/components/Stats/Angle.d.ts +0 -11
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -10
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +0 -10
- package/types/excalidraw/components/Stats/Collapsible.d.ts +0 -8
- package/types/excalidraw/components/Stats/Dimension.d.ts +0 -11
- package/types/excalidraw/components/Stats/DragInput.d.ts +0 -34
- package/types/excalidraw/components/Stats/FontSize.d.ts +0 -11
- package/types/excalidraw/components/Stats/MultiAngle.d.ts +0 -11
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +0 -14
- package/types/excalidraw/components/Stats/MultiFontSize.d.ts +0 -12
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +0 -14
- package/types/excalidraw/components/Stats/Position.d.ts +0 -12
- package/types/excalidraw/components/Stats/index.d.ts +0 -35
- package/types/excalidraw/components/Stats/utils.d.ts +0 -26
- package/types/excalidraw/components/Stats.d.ts +0 -11
- package/types/excalidraw/components/Switch.d.ts +0 -9
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +0 -14
- package/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +0 -29
- package/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +0 -9
- package/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +0 -7
- package/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +0 -17
- package/types/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +0 -4
- package/types/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.d.ts +0 -1
- package/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +0 -7
- package/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +0 -8
- package/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +0 -6
- package/types/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +0 -11
- package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
- package/types/excalidraw/components/TTDDialog/common.d.ts +0 -32
- package/types/excalidraw/components/TextField.d.ts +0 -21
- package/types/excalidraw/components/Toast.d.ts +0 -9
- package/types/excalidraw/components/ToolButton.d.ts +0 -49
- package/types/excalidraw/components/Tooltip.d.ts +0 -18
- package/types/excalidraw/components/Trans.d.ts +0 -9
- package/types/excalidraw/components/UserList.d.ts +0 -18
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -29
- package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +0 -14
- package/types/excalidraw/components/canvases/StaticCanvas.d.ts +0 -19
- package/types/excalidraw/components/canvases/index.d.ts +0 -3
- package/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +0 -86
- package/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +0 -15
- package/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +0 -11
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +0 -45
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +0 -7
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -17
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +0 -7
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +0 -15
- package/types/excalidraw/components/dropdownMenu/DropdownMenuSeparator.d.ts +0 -5
- package/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +0 -10
- package/types/excalidraw/components/dropdownMenu/common.d.ts +0 -6
- package/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +0 -3
- package/types/excalidraw/components/footer/Footer.d.ts +0 -12
- package/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/types/excalidraw/components/hoc/withInternalFallback.d.ts +0 -4
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +0 -18
- package/types/excalidraw/components/hyperlink/helpers.d.ts +0 -8
- package/types/excalidraw/components/icons.d.ts +0 -212
- package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -9
- package/types/excalidraw/components/main-menu/DefaultItems.d.ts +0 -64
- package/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -80
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -59
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -86
- package/types/excalidraw/constants.d.ts +0 -322
- package/types/excalidraw/context/tunnels.d.ts +0 -20
- package/types/excalidraw/context/ui-appState.d.ts +0 -4
- package/types/excalidraw/cursor.d.ts +0 -6
- package/types/excalidraw/data/EditorLocalStorage.d.ts +0 -8
- package/types/excalidraw/data/ai/types.d.ts +0 -242
- package/types/excalidraw/data/blob.d.ts +0 -49
- package/types/excalidraw/data/encode.d.ts +0 -54
- package/types/excalidraw/data/encryption.d.ts +0 -9
- package/types/excalidraw/data/filesystem.d.ts +0 -20
- package/types/excalidraw/data/image.d.ts +0 -15
- package/types/excalidraw/data/index.d.ts +0 -22
- package/types/excalidraw/data/json.d.ts +0 -16
- package/types/excalidraw/data/library.d.ts +0 -106
- package/types/excalidraw/data/magic.d.ts +0 -23
- package/types/excalidraw/data/reconcile.d.ts +0 -6
- package/types/excalidraw/data/resave.d.ts +0 -5
- package/types/excalidraw/data/restore.d.ts +0 -21
- package/types/excalidraw/data/transform.d.ts +0 -81
- package/types/excalidraw/data/types.d.ts +0 -45
- package/types/excalidraw/data/url.d.ts +0 -8
- package/types/excalidraw/deburr.d.ts +0 -1
- package/types/excalidraw/dist/excalidraw.development.d.ts +0 -2
- package/types/excalidraw/dist/excalidraw.production.min.d.ts +0 -1
- package/types/excalidraw/distribute.d.ts +0 -6
- package/types/excalidraw/element/ElementCanvasButtons.d.ts +0 -7
- package/types/excalidraw/element/binding.d.ts +0 -99
- package/types/excalidraw/element/bounds.d.ts +0 -76
- package/types/excalidraw/element/collision.d.ts +0 -17
- package/types/excalidraw/element/containerCache.d.ts +0 -11
- package/types/excalidraw/element/dragElements.d.ts +0 -32
- package/types/excalidraw/element/embeddable.d.ts +0 -221
- package/types/excalidraw/element/flowchart.d.ts +0 -25
- package/types/excalidraw/element/heading.d.ts +0 -12
- package/types/excalidraw/element/image.d.ts +0 -32
- package/types/excalidraw/element/index.d.ts +0 -26
- package/types/excalidraw/element/linearElementEditor.d.ts +0 -128
- package/types/excalidraw/element/mutateElement.d.ts +0 -11
- package/types/excalidraw/element/newElement.d.ts +0 -105
- package/types/excalidraw/element/resizeElements.d.ts +0 -16
- package/types/excalidraw/element/resizeTest.d.ts +0 -15
- package/types/excalidraw/element/routing.d.ts +0 -12
- package/types/excalidraw/element/showSelectedShapeActions.d.ts +0 -3
- package/types/excalidraw/element/sizeHelpers.d.ts +0 -35
- package/types/excalidraw/element/sortElements.d.ts +0 -2
- package/types/excalidraw/element/textElement.d.ts +0 -73
- package/types/excalidraw/element/textWysiwyg.d.ts +0 -22
- package/types/excalidraw/element/transformHandles.d.ts +0 -55
- package/types/excalidraw/element/typeChecks.d.ts +0 -39
- package/types/excalidraw/element/types.d.ts +0 -253
- package/types/excalidraw/emitter.d.ts +0 -16
- package/types/excalidraw/entry.d.ts +0 -1
- package/types/excalidraw/env.d.cts +0 -1
- package/types/excalidraw/env.d.ts +0 -1
- package/types/excalidraw/errors.d.ts +0 -25
- package/types/excalidraw/fonts/ExcalidrawFont.d.ts +0 -37
- package/types/excalidraw/fonts/ExcalidrawFontFace.d.ts +0 -35
- package/types/excalidraw/fonts/index.d.ts +0 -87
- package/types/excalidraw/fonts/metadata.d.ts +0 -37
- package/types/excalidraw/fonts/subset/subset-main.d.ts +0 -12
- package/types/excalidraw/fonts/subset/subset-shared.chunk.d.ts +0 -32
- package/types/excalidraw/fonts/subset/subset-worker.chunk.d.ts +0 -15
- package/types/excalidraw/fonts/wasm/hb-subset-bindings.d.ts +0 -45
- package/types/excalidraw/fonts/wasm/hb-subset-loader.d.ts +0 -13
- package/types/excalidraw/fonts/wasm/hb-subset-wasm.d.ts +0 -2
- 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 -14
- package/types/excalidraw/fonts/wasm/woff2-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/Cascadia/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Comic/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Emoji/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Excalifont/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Helvetica/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Liberation/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Lilita/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Nunito/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Virgil/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Xiaolai/index.d.ts +0 -8
- package/types/excalidraw/fractionalIndex.d.ts +0 -48
- package/types/excalidraw/frame.d.ts +0 -63
- 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/gesture.d.ts +0 -6
- package/types/excalidraw/groups.d.ts +0 -33
- package/types/excalidraw/history.d.ts +0 -40
- package/types/excalidraw/hooks/useCallbackRefState.d.ts +0 -1
- package/types/excalidraw/hooks/useCopiedIndicator.d.ts +0 -5
- package/types/excalidraw/hooks/useCreatePortalContainer.d.ts +0 -7
- package/types/excalidraw/hooks/useEmitter.d.ts +0 -2
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +0 -11
- package/types/excalidraw/hooks/useOutsideClick.d.ts +0 -19
- package/types/excalidraw/hooks/useScrollPosition.d.ts +0 -1
- package/types/excalidraw/hooks/useStable.d.ts +0 -1
- package/types/excalidraw/hooks/useStableCallback.d.ts +0 -4
- package/types/excalidraw/hooks/useTransition.d.ts +0 -2
- package/types/excalidraw/i18n.d.ts +0 -24
- package/types/excalidraw/index-node.d.ts +0 -1
- package/types/excalidraw/index.d.ts +0 -63
- package/types/excalidraw/jotai.d.ts +0 -34
- package/types/excalidraw/keys.d.ts +0 -82
- package/types/excalidraw/laser-trails.d.ts +0 -20
- package/types/excalidraw/main.d.ts +0 -2
- package/types/excalidraw/math.d.ts +0 -79
- package/types/excalidraw/mermaid.d.ts +0 -2
- package/types/excalidraw/obsidianUtils.d.ts +0 -21
- package/types/excalidraw/points.d.ts +0 -7
- package/types/excalidraw/polyfill.d.ts +0 -2
- package/types/excalidraw/publicPath.d.ts +0 -1
- package/types/excalidraw/queue.d.ts +0 -9
- package/types/excalidraw/random.d.ts +0 -4
- package/types/excalidraw/reactUtils.d.ts +0 -14
- package/types/excalidraw/renderer/easingFunctions.d.ts +0 -6
- package/types/excalidraw/renderer/helpers.d.ts +0 -13
- package/types/excalidraw/renderer/interactiveScene.d.ts +0 -20
- package/types/excalidraw/renderer/renderElement.d.ts +0 -27
- package/types/excalidraw/renderer/renderNewElementScene.d.ts +0 -7
- package/types/excalidraw/renderer/renderSnaps.d.ts +0 -2
- package/types/excalidraw/renderer/roundRect.d.ts +0 -11
- package/types/excalidraw/renderer/staticScene.d.ts +0 -11
- package/types/excalidraw/renderer/staticSvgScene.d.ts +0 -5
- package/types/excalidraw/scene/Fonts.d.ts +0 -19
- package/types/excalidraw/scene/Renderer.d.ts +0 -28
- package/types/excalidraw/scene/Scene.d.ts +0 -78
- package/types/excalidraw/scene/Shape.d.ts +0 -17
- package/types/excalidraw/scene/ShapeCache.d.ts +0 -25
- package/types/excalidraw/scene/comparisons.d.ts +0 -487
- package/types/excalidraw/scene/export.d.ts +0 -29
- package/types/excalidraw/scene/index.d.ts +0 -4
- package/types/excalidraw/scene/normalize.d.ts +0 -4
- package/types/excalidraw/scene/scroll.d.ts +0 -23
- package/types/excalidraw/scene/scrollbars.d.ts +0 -12
- package/types/excalidraw/scene/selection.d.ts +0 -32
- package/types/excalidraw/scene/types.d.ts +0 -112
- package/types/excalidraw/scene/zoom.d.ts +0 -12
- package/types/excalidraw/shapes.d.ts +0 -85
- package/types/excalidraw/snapping.d.ts +0 -112
- package/types/excalidraw/store.d.ts +0 -129
- package/types/excalidraw/types.d.ts +0 -718
- package/types/excalidraw/utility-types.d.ts +0 -31
- package/types/excalidraw/utils.d.ts +0 -249
- package/types/excalidraw/visualdebug.d.ts +0 -35
- package/types/excalidraw/webpack.dev.config.d.ts +0 -81
- package/types/excalidraw/webpack.prod.config.d.ts +0 -97
- package/types/excalidraw/workers.d.ts +0 -36
- package/types/excalidraw/zindex.d.ts +0 -6
- package/types/math/angle.d.ts +0 -17
- package/types/math/arc.d.ts +0 -6
- package/types/math/curve.d.ts +0 -32
- package/types/math/ga/ga.d.ts +0 -63
- package/types/math/ga/gadirections.d.ts +0 -8
- package/types/math/ga/galines.d.ts +0 -22
- package/types/math/ga/gapoints.d.ts +0 -7
- package/types/math/ga/gatransforms.d.ts +0 -10
- package/types/math/index.d.ts +0 -12
- package/types/math/line.d.ts +0 -26
- package/types/math/point.d.ts +0 -140
- package/types/math/polygon.d.ts +0 -5
- package/types/math/range.d.ts +0 -44
- package/types/math/segment.d.ts +0 -32
- package/types/math/triangle.d.ts +0 -11
- package/types/math/types.d.ts +0 -96
- package/types/math/utils.d.ts +0 -6
- package/types/math/vector.d.ts +0 -88
- package/types/utils/bbox.d.ts +0 -9
- package/types/utils/collision.d.ts +0 -9
- package/types/utils/export.d.ts +0 -44
- package/types/utils/geometry/geometry.d.ts +0 -89
- package/types/utils/geometry/shape.d.ts +0 -71
- package/types/utils/index.d.ts +0 -4
- package/types/utils/withinBounds.d.ts +0 -19
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import type { LocalPoint, Radians } from "../../math";
|
|
2
|
-
import type { FONT_FAMILY, ROUNDNESS, TEXT_ALIGN, THEME, VERTICAL_ALIGN } from "../constants";
|
|
3
|
-
import type { MakeBrand, MarkNonNullable, Merge, ValueOf } from "../utility-types";
|
|
4
|
-
export type ChartType = "bar" | "line";
|
|
5
|
-
export type FillStyle = "hachure" | "cross-hatch" | "solid" | "zigzag";
|
|
6
|
-
export type FontFamilyKeys = keyof typeof FONT_FAMILY;
|
|
7
|
-
export type FontFamilyValues = typeof FONT_FAMILY[FontFamilyKeys];
|
|
8
|
-
export type Theme = typeof THEME[keyof typeof THEME];
|
|
9
|
-
export type FontString = string & {
|
|
10
|
-
_brand: "fontString";
|
|
11
|
-
};
|
|
12
|
-
export type GroupId = string;
|
|
13
|
-
export type PointerType = "mouse" | "pen" | "touch";
|
|
14
|
-
export type StrokeRoundness = "round" | "sharp";
|
|
15
|
-
export type RoundnessType = ValueOf<typeof ROUNDNESS>;
|
|
16
|
-
export type StrokeStyle = "solid" | "dashed" | "dotted";
|
|
17
|
-
export type TextAlign = typeof TEXT_ALIGN[keyof typeof TEXT_ALIGN];
|
|
18
|
-
type VerticalAlignKeys = keyof typeof VERTICAL_ALIGN;
|
|
19
|
-
export type VerticalAlign = typeof VERTICAL_ALIGN[VerticalAlignKeys];
|
|
20
|
-
export type FractionalIndex = string & {
|
|
21
|
-
_brand: "franctionalIndex";
|
|
22
|
-
};
|
|
23
|
-
export type BoundElement = Readonly<{
|
|
24
|
-
id: ExcalidrawLinearElement["id"];
|
|
25
|
-
type: "arrow" | "text";
|
|
26
|
-
}>;
|
|
27
|
-
type _ExcalidrawElementBase = Readonly<{
|
|
28
|
-
id: string;
|
|
29
|
-
x: number;
|
|
30
|
-
y: number;
|
|
31
|
-
strokeColor: string;
|
|
32
|
-
backgroundColor: string;
|
|
33
|
-
fillStyle: FillStyle;
|
|
34
|
-
strokeWidth: number;
|
|
35
|
-
strokeStyle: StrokeStyle;
|
|
36
|
-
roundness: null | {
|
|
37
|
-
type: RoundnessType;
|
|
38
|
-
value?: number;
|
|
39
|
-
};
|
|
40
|
-
roughness: number;
|
|
41
|
-
opacity: number;
|
|
42
|
-
width: number;
|
|
43
|
-
height: number;
|
|
44
|
-
angle: Radians;
|
|
45
|
-
/** Random integer used to seed shape generation so that the roughjs shape
|
|
46
|
-
doesn't differ across renders. */
|
|
47
|
-
seed: number;
|
|
48
|
-
/** Integer that is sequentially incremented on each change. Used to reconcile
|
|
49
|
-
elements during collaboration or when saving to server. */
|
|
50
|
-
version: number;
|
|
51
|
-
/** Random integer that is regenerated on each change.
|
|
52
|
-
Used for deterministic reconciliation of updates during collaboration,
|
|
53
|
-
in case the versions (see above) are identical. */
|
|
54
|
-
versionNonce: number;
|
|
55
|
-
/** String in a fractional form defined by https://github.com/rocicorp/fractional-indexing.
|
|
56
|
-
Used for ordering in multiplayer scenarios, such as during reconciliation or undo / redo.
|
|
57
|
-
Always kept in sync with the array order by `syncMovedIndices` and `syncInvalidIndices`.
|
|
58
|
-
Could be null, i.e. for new elements which were not yet assigned to the scene. */
|
|
59
|
-
index: FractionalIndex | null;
|
|
60
|
-
isDeleted: boolean;
|
|
61
|
-
/** List of groups the element belongs to.
|
|
62
|
-
Ordered from deepest to shallowest. */
|
|
63
|
-
groupIds: readonly GroupId[];
|
|
64
|
-
frameId: string | null;
|
|
65
|
-
/** other elements that are bound to this element */
|
|
66
|
-
boundElements: readonly BoundElement[] | null;
|
|
67
|
-
/** epoch (ms) timestamp of last element update */
|
|
68
|
-
updated: number;
|
|
69
|
-
link: string | null;
|
|
70
|
-
locked: boolean;
|
|
71
|
-
customData?: Record<string, any>;
|
|
72
|
-
}>;
|
|
73
|
-
export type ExcalidrawSelectionElement = _ExcalidrawElementBase & {
|
|
74
|
-
type: "selection";
|
|
75
|
-
};
|
|
76
|
-
export type ExcalidrawRectangleElement = _ExcalidrawElementBase & {
|
|
77
|
-
type: "rectangle";
|
|
78
|
-
};
|
|
79
|
-
export type ExcalidrawDiamondElement = _ExcalidrawElementBase & {
|
|
80
|
-
type: "diamond";
|
|
81
|
-
};
|
|
82
|
-
export type ExcalidrawEllipseElement = _ExcalidrawElementBase & {
|
|
83
|
-
type: "ellipse";
|
|
84
|
-
};
|
|
85
|
-
export type ExcalidrawEmbeddableElement = _ExcalidrawElementBase & Readonly<{
|
|
86
|
-
type: "embeddable";
|
|
87
|
-
scale: [number, number];
|
|
88
|
-
}>;
|
|
89
|
-
export type MagicGenerationData = {
|
|
90
|
-
status: "pending";
|
|
91
|
-
} | {
|
|
92
|
-
status: "done";
|
|
93
|
-
html: string;
|
|
94
|
-
} | {
|
|
95
|
-
status: "error";
|
|
96
|
-
message?: string;
|
|
97
|
-
code: "ERR_GENERATION_INTERRUPTED" | string;
|
|
98
|
-
};
|
|
99
|
-
export type ExcalidrawIframeElement = _ExcalidrawElementBase & Readonly<{
|
|
100
|
-
type: "iframe";
|
|
101
|
-
customData?: {
|
|
102
|
-
generationData?: MagicGenerationData;
|
|
103
|
-
};
|
|
104
|
-
scale: [number, number];
|
|
105
|
-
}>;
|
|
106
|
-
export type ExcalidrawIframeLikeElement = ExcalidrawIframeElement | ExcalidrawEmbeddableElement;
|
|
107
|
-
export type IframeData = ({
|
|
108
|
-
intrinsicSize: {
|
|
109
|
-
w: number;
|
|
110
|
-
h: number;
|
|
111
|
-
};
|
|
112
|
-
error?: Error;
|
|
113
|
-
sandbox?: {
|
|
114
|
-
allowSameOrigin?: boolean;
|
|
115
|
-
};
|
|
116
|
-
} & ({
|
|
117
|
-
type: "video" | "generic";
|
|
118
|
-
link: string;
|
|
119
|
-
} | {
|
|
120
|
-
type: "document";
|
|
121
|
-
srcdoc: (theme: Theme) => string;
|
|
122
|
-
}));
|
|
123
|
-
export type ExcalidrawImageElement = _ExcalidrawElementBase & Readonly<{
|
|
124
|
-
type: "image";
|
|
125
|
-
fileId: FileId | null;
|
|
126
|
-
/** whether respective file is persisted */
|
|
127
|
-
status: "pending" | "saved" | "error";
|
|
128
|
-
/** X and Y scale factors <-1, 1>, used for image axis flipping */
|
|
129
|
-
scale: [number, number];
|
|
130
|
-
}>;
|
|
131
|
-
export type InitializedExcalidrawImageElement = MarkNonNullable<ExcalidrawImageElement, "fileId">;
|
|
132
|
-
export type ExcalidrawFrameElement = _ExcalidrawElementBase & {
|
|
133
|
-
type: "frame";
|
|
134
|
-
name: string | null;
|
|
135
|
-
};
|
|
136
|
-
export type ExcalidrawMagicFrameElement = _ExcalidrawElementBase & {
|
|
137
|
-
type: "magicframe";
|
|
138
|
-
name: string | null;
|
|
139
|
-
};
|
|
140
|
-
export type ExcalidrawFrameLikeElement = ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
|
|
141
|
-
/**
|
|
142
|
-
* These are elements that don't have any additional properties.
|
|
143
|
-
*/
|
|
144
|
-
export type ExcalidrawGenericElement = ExcalidrawSelectionElement | ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
145
|
-
export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
146
|
-
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement;
|
|
147
|
-
/**
|
|
148
|
-
* ExcalidrawElement should be JSON serializable and (eventually) contain
|
|
149
|
-
* no computed data. The list of all ExcalidrawElements should be shareable
|
|
150
|
-
* between peers and contain no state local to the peer.
|
|
151
|
-
*/
|
|
152
|
-
export type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawArrowElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement;
|
|
153
|
-
export type ExcalidrawNonSelectionElement = Exclude<ExcalidrawElement, ExcalidrawSelectionElement>;
|
|
154
|
-
export type Ordered<TElement extends ExcalidrawElement> = TElement & {
|
|
155
|
-
index: FractionalIndex;
|
|
156
|
-
};
|
|
157
|
-
export type OrderedExcalidrawElement = Ordered<ExcalidrawElement>;
|
|
158
|
-
export type NonDeleted<TElement extends ExcalidrawElement> = TElement & {
|
|
159
|
-
isDeleted: boolean;
|
|
160
|
-
};
|
|
161
|
-
export type NonDeletedExcalidrawElement = NonDeleted<ExcalidrawElement>;
|
|
162
|
-
export type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
|
|
163
|
-
type: "text";
|
|
164
|
-
fontSize: number;
|
|
165
|
-
fontFamily: FontFamilyValues;
|
|
166
|
-
text: string;
|
|
167
|
-
rawText: string;
|
|
168
|
-
textAlign: TextAlign;
|
|
169
|
-
verticalAlign: VerticalAlign;
|
|
170
|
-
containerId: ExcalidrawGenericElement["id"] | null;
|
|
171
|
-
originalText: string;
|
|
172
|
-
/**
|
|
173
|
-
* If `true` the width will fit the text. If `false`, the text will
|
|
174
|
-
* wrap to fit the width.
|
|
175
|
-
*
|
|
176
|
-
* @default true
|
|
177
|
-
*/
|
|
178
|
-
autoResize: boolean;
|
|
179
|
-
/**
|
|
180
|
-
* Unitless line height (aligned to W3C). To get line height in px, multiply
|
|
181
|
-
* with font size (using `getLineHeightInPx` helper).
|
|
182
|
-
*/
|
|
183
|
-
lineHeight: number & {
|
|
184
|
-
_brand: "unitlessLineHeight";
|
|
185
|
-
};
|
|
186
|
-
}>;
|
|
187
|
-
export type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
|
|
188
|
-
export type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawArrowElement;
|
|
189
|
-
export type ExcalidrawTextElementWithContainer = {
|
|
190
|
-
containerId: ExcalidrawTextContainer["id"];
|
|
191
|
-
} & ExcalidrawTextElement;
|
|
192
|
-
export type FixedPoint = [number, number];
|
|
193
|
-
export type PointBinding = {
|
|
194
|
-
elementId: ExcalidrawBindableElement["id"];
|
|
195
|
-
focus: number;
|
|
196
|
-
gap: number;
|
|
197
|
-
};
|
|
198
|
-
export type FixedPointBinding = Merge<PointBinding, {
|
|
199
|
-
fixedPoint: FixedPoint;
|
|
200
|
-
}>;
|
|
201
|
-
export type Arrowhead = "arrow" | "bar" | "dot" | "circle" | "circle_outline" | "triangle" | "triangle_outline" | "diamond" | "diamond_outline";
|
|
202
|
-
export type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<{
|
|
203
|
-
type: "line" | "arrow";
|
|
204
|
-
points: readonly LocalPoint[];
|
|
205
|
-
lastCommittedPoint: LocalPoint | null;
|
|
206
|
-
startBinding: PointBinding | null;
|
|
207
|
-
endBinding: PointBinding | null;
|
|
208
|
-
startArrowhead: Arrowhead | null;
|
|
209
|
-
endArrowhead: Arrowhead | null;
|
|
210
|
-
}>;
|
|
211
|
-
export type ExcalidrawArrowElement = ExcalidrawLinearElement & Readonly<{
|
|
212
|
-
type: "arrow";
|
|
213
|
-
elbowed: boolean;
|
|
214
|
-
}>;
|
|
215
|
-
export type ExcalidrawElbowArrowElement = Merge<ExcalidrawArrowElement, {
|
|
216
|
-
elbowed: true;
|
|
217
|
-
startBinding: FixedPointBinding | null;
|
|
218
|
-
endBinding: FixedPointBinding | null;
|
|
219
|
-
}>;
|
|
220
|
-
export type ExcalidrawFreeDrawElement = _ExcalidrawElementBase & Readonly<{
|
|
221
|
-
type: "freedraw";
|
|
222
|
-
points: readonly LocalPoint[];
|
|
223
|
-
pressures: readonly number[];
|
|
224
|
-
simulatePressure: boolean;
|
|
225
|
-
lastCommittedPoint: LocalPoint | null;
|
|
226
|
-
}>;
|
|
227
|
-
export type FileId = string & {
|
|
228
|
-
_brand: "FileId";
|
|
229
|
-
};
|
|
230
|
-
export type ExcalidrawElementType = ExcalidrawElement["type"];
|
|
231
|
-
/**
|
|
232
|
-
* Map of excalidraw elements.
|
|
233
|
-
* Unspecified whether deleted or non-deleted.
|
|
234
|
-
* Can be a subset of Scene elements.
|
|
235
|
-
*/
|
|
236
|
-
export type ElementsMap = Map<ExcalidrawElement["id"], ExcalidrawElement>;
|
|
237
|
-
/**
|
|
238
|
-
* Map of non-deleted elements.
|
|
239
|
-
* Can be a subset of Scene elements.
|
|
240
|
-
*/
|
|
241
|
-
export type NonDeletedElementsMap = Map<ExcalidrawElement["id"], NonDeletedExcalidrawElement> & MakeBrand<"NonDeletedElementsMap">;
|
|
242
|
-
/**
|
|
243
|
-
* Map of all excalidraw Scene elements, including deleted.
|
|
244
|
-
* Not a subset. Use this type when you need access to current Scene elements.
|
|
245
|
-
*/
|
|
246
|
-
export type SceneElementsMap = Map<ExcalidrawElement["id"], Ordered<ExcalidrawElement>> & MakeBrand<"SceneElementsMap">;
|
|
247
|
-
/**
|
|
248
|
-
* Map of all non-deleted Scene elements.
|
|
249
|
-
* Not a subset. Use this type when you need access to current Scene elements.
|
|
250
|
-
*/
|
|
251
|
-
export type NonDeletedSceneElementsMap = Map<ExcalidrawElement["id"], Ordered<NonDeletedExcalidrawElement>> & MakeBrand<"NonDeletedSceneElementsMap">;
|
|
252
|
-
export type ElementsMapOrArray = readonly ExcalidrawElement[] | Readonly<ElementsMap>;
|
|
253
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { UnsubscribeCallback } from "./types";
|
|
2
|
-
type Subscriber<T extends any[]> = (...payload: T) => void;
|
|
3
|
-
export declare class Emitter<T extends any[] = []> {
|
|
4
|
-
subscribers: Subscriber<T>[];
|
|
5
|
-
/**
|
|
6
|
-
* Attaches subscriber
|
|
7
|
-
*
|
|
8
|
-
* @returns unsubscribe function
|
|
9
|
-
*/
|
|
10
|
-
on(...handlers: Subscriber<T>[] | Subscriber<T>[][]): UnsubscribeCallback;
|
|
11
|
-
once(...handlers: Subscriber<T>[] | Subscriber<T>[][]): UnsubscribeCallback;
|
|
12
|
-
off(...handlers: Subscriber<T>[] | Subscriber<T>[][]): void;
|
|
13
|
-
trigger(...payload: T): this;
|
|
14
|
-
clear(): void;
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./index";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function parseEnvVariables(filepath: any): {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function parseEnvVariables(filepath: any): {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type CANVAS_ERROR_NAMES = "CANVAS_ERROR" | "CANVAS_POSSIBLY_TOO_BIG";
|
|
2
|
-
export declare class CanvasError extends Error {
|
|
3
|
-
constructor(message?: string, name?: CANVAS_ERROR_NAMES);
|
|
4
|
-
}
|
|
5
|
-
export declare class AbortError extends DOMException {
|
|
6
|
-
constructor(message?: string);
|
|
7
|
-
}
|
|
8
|
-
type ImageSceneDataErrorCode = "IMAGE_NOT_CONTAINS_SCENE_DATA" | "IMAGE_SCENE_DATA_ERROR";
|
|
9
|
-
export declare class ImageSceneDataError extends Error {
|
|
10
|
-
code: ImageSceneDataErrorCode;
|
|
11
|
-
constructor(message?: string, code?: ImageSceneDataErrorCode);
|
|
12
|
-
}
|
|
13
|
-
export declare class InvalidFractionalIndexError extends Error {
|
|
14
|
-
code: "ELEMENT_HAS_INVALID_INDEX";
|
|
15
|
-
}
|
|
16
|
-
type WorkerErrorCodes = "WORKER_URL_NOT_DEFINED" | "WORKER_IN_THE_MAIN_CHUNK";
|
|
17
|
-
export declare class WorkerUrlNotDefinedError extends Error {
|
|
18
|
-
code: WorkerErrorCodes;
|
|
19
|
-
constructor(message?: string, code?: WorkerErrorCodes);
|
|
20
|
-
}
|
|
21
|
-
export declare class WorkerInTheMainChunkError extends Error {
|
|
22
|
-
code: WorkerErrorCodes;
|
|
23
|
-
constructor(message?: string, code?: WorkerErrorCodes);
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
@@ -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,35 +0,0 @@
|
|
|
1
|
-
type DataURL = string;
|
|
2
|
-
export interface IExcalidrawFontFace {
|
|
3
|
-
urls: URL[] | DataURL[];
|
|
4
|
-
fontFace: FontFace;
|
|
5
|
-
toCSS(characters: string, codePoints: Array<number>): Promise<string> | undefined;
|
|
6
|
-
getContentLegacy(): Promise<string>;
|
|
7
|
-
}
|
|
8
|
-
export declare class ExcalidrawFontFace implements IExcalidrawFontFace {
|
|
9
|
-
readonly urls: URL[] | DataURL[];
|
|
10
|
-
readonly fontFace: FontFace;
|
|
11
|
-
private static readonly UNPKG_FALLBACK_URL;
|
|
12
|
-
constructor(family: string, uri: string, descriptors?: FontFaceDescriptors);
|
|
13
|
-
/**
|
|
14
|
-
* Generates CSS `@font-face` definition with the (subsetted) font source as a data url for the characters within the unicode range.
|
|
15
|
-
*
|
|
16
|
-
* Retrieves `undefined` otherwise.
|
|
17
|
-
*/
|
|
18
|
-
toCSS(characters: string, codePoints: Array<number>): Promise<string> | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* Tries to fetch woff2 content, based on the registered urls (from first to last, treated as fallbacks).
|
|
21
|
-
*
|
|
22
|
-
* @returns base64 with subsetted glyphs based on the passed codepoint, last defined url otherwise
|
|
23
|
-
*/
|
|
24
|
-
getContent(codePoints: Array<number>): Promise<string>;
|
|
25
|
-
fetchFont(url: URL | DataURL): Promise<ArrayBuffer>;
|
|
26
|
-
private getUnicodeRangeRegex;
|
|
27
|
-
private static createUrls;
|
|
28
|
-
private static getFormat;
|
|
29
|
-
private static normalizeBaseUrl;
|
|
30
|
-
/**
|
|
31
|
-
* zsviczian https://github.com/zsviczian/excalidraw/commit/b4cfaaa4b4f46ca01f94e27fb7bf651a9da99daa
|
|
32
|
-
*/
|
|
33
|
-
getContentLegacy(): Promise<string>;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import type Scene from "../scene/Scene";
|
|
2
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, FontFamilyValues } from "../element/types";
|
|
3
|
-
import { type FontMetadata } from "./metadata";
|
|
4
|
-
import { type IExcalidrawFontFace } from "./ExcalidrawFontFace";
|
|
5
|
-
export declare class Fonts {
|
|
6
|
-
static readonly loadedFontsCache: Set<string>;
|
|
7
|
-
private static _registered;
|
|
8
|
-
private static _initialized;
|
|
9
|
-
static get registered(): Map<number, {
|
|
10
|
-
metadata: FontMetadata;
|
|
11
|
-
fontFaces: IExcalidrawFontFace[];
|
|
12
|
-
}>;
|
|
13
|
-
get registered(): Map<number, {
|
|
14
|
-
metadata: FontMetadata;
|
|
15
|
-
fontFaces: IExcalidrawFontFace[];
|
|
16
|
-
}>;
|
|
17
|
-
private readonly scene;
|
|
18
|
-
constructor({ scene }: {
|
|
19
|
-
scene: Scene;
|
|
20
|
-
});
|
|
21
|
-
/**
|
|
22
|
-
* if we load a (new) font, it's likely that text elements using it have
|
|
23
|
-
* already been rendered using a fallback font. Thus, we want invalidate
|
|
24
|
-
* their shapes and rerender. See #637.
|
|
25
|
-
*
|
|
26
|
-
* Invalidates text elements and rerenders scene, provided that at least one
|
|
27
|
-
* of the supplied fontFaces has not already been processed.
|
|
28
|
-
*/
|
|
29
|
-
onLoaded: (fontFaces: readonly FontFace[]) => void;
|
|
30
|
-
/**
|
|
31
|
-
* Load font faces for a given scene and trigger scene update.
|
|
32
|
-
*/
|
|
33
|
-
loadSceneFonts: () => Promise<FontFace[]>;
|
|
34
|
-
/**
|
|
35
|
-
* Load all registered font faces.
|
|
36
|
-
*/
|
|
37
|
-
static loadAllFonts: () => Promise<FontFace[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Load font faces for passed elements - use when the scene is unavailable (i.e. export).
|
|
40
|
-
*/
|
|
41
|
-
static loadElementsFonts: (elements: readonly ExcalidrawElement[]) => Promise<FontFace[]>;
|
|
42
|
-
static loadFontFaces(fontFamilies: Array<ExcalidrawTextElement["fontFamily"]>): Promise<FontFace[]>;
|
|
43
|
-
/**
|
|
44
|
-
* WARN: should be called just once on init, even across multiple instances.
|
|
45
|
-
*/
|
|
46
|
-
private static init;
|
|
47
|
-
/**
|
|
48
|
-
* Gets all the font families for the given scene.
|
|
49
|
-
*/
|
|
50
|
-
getSceneFamilies: () => number[];
|
|
51
|
-
private static getAllFamilies;
|
|
52
|
-
static getElementsFamilies(elements: ReadonlyArray<ExcalidrawElement>): Array<ExcalidrawTextElement["fontFamily"]>;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Register a new font.
|
|
56
|
-
*
|
|
57
|
-
* @param family font family
|
|
58
|
-
* @param metadata font metadata
|
|
59
|
-
* @param fontFacesDecriptors font faces descriptors
|
|
60
|
-
*/
|
|
61
|
-
export declare function register(//zsviczian (changed from private to export)
|
|
62
|
-
this: Fonts | {
|
|
63
|
-
registered: Map<number, {
|
|
64
|
-
metadata: FontMetadata;
|
|
65
|
-
fontFaces: IExcalidrawFontFace[];
|
|
66
|
-
}>;
|
|
67
|
-
}, family: string, metadata: FontMetadata, ...fontFacesDecriptors: ExcalidrawFontFaceDescriptor[]): Map<number, {
|
|
68
|
-
metadata: FontMetadata;
|
|
69
|
-
fontFaces: IExcalidrawFontFace[];
|
|
70
|
-
}> | Map<number, {
|
|
71
|
-
metadata: FontMetadata;
|
|
72
|
-
fontFaces: IExcalidrawFontFace[];
|
|
73
|
-
}>;
|
|
74
|
-
/**
|
|
75
|
-
* Calculates vertical offset for a text with alphabetic baseline.
|
|
76
|
-
*/
|
|
77
|
-
export declare const getVerticalOffset: (fontFamily: ExcalidrawTextElement["fontFamily"], fontSize: ExcalidrawTextElement["fontSize"], lineHeightPx: number) => number;
|
|
78
|
-
/**
|
|
79
|
-
* Gets line height forr a selected family.
|
|
80
|
-
*/
|
|
81
|
-
export declare const getLineHeight: (fontFamily: FontFamilyValues) => number & {
|
|
82
|
-
_brand: "unitlessLineHeight";
|
|
83
|
-
};
|
|
84
|
-
export interface ExcalidrawFontFaceDescriptor {
|
|
85
|
-
uri: string;
|
|
86
|
-
descriptors?: FontFaceDescriptors;
|
|
87
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Encapsulates font metrics with additional font metadata.
|
|
3
|
-
* */
|
|
4
|
-
export interface FontMetadata {
|
|
5
|
-
/** for head & hhea metrics read the woff2 with https://fontdrop.info/ */
|
|
6
|
-
metrics: {
|
|
7
|
-
/** head.unitsPerEm metric */
|
|
8
|
-
unitsPerEm: 1000 | 1024 | 2048;
|
|
9
|
-
/** hhea.ascender metric */
|
|
10
|
-
ascender: number;
|
|
11
|
-
/** hhea.descender metric */
|
|
12
|
-
descender: number;
|
|
13
|
-
/** harcoded unitless line-height, https://github.com/excalidraw/excalidraw/pull/6360#issuecomment-1477635971 */
|
|
14
|
-
lineHeight: number;
|
|
15
|
-
};
|
|
16
|
-
/** element to be displayed as an icon */
|
|
17
|
-
icon?: JSX.Element;
|
|
18
|
-
/** flag to indicate a deprecated font */
|
|
19
|
-
deprecated?: true;
|
|
20
|
-
/** flag to indicate a server-side only font */
|
|
21
|
-
serverSide?: true;
|
|
22
|
-
/** flag to indiccate a local-only font */
|
|
23
|
-
local?: true;
|
|
24
|
-
/** flag to indicate a fallback font */
|
|
25
|
-
fallback?: true;
|
|
26
|
-
}
|
|
27
|
-
export declare const FONT_METADATA: Record<number, FontMetadata>;
|
|
28
|
-
/** Unicode ranges defined by google fonts */
|
|
29
|
-
export declare const GOOGLE_FONTS_RANGES: {
|
|
30
|
-
LATIN: string;
|
|
31
|
-
LATIN_EXT: string;
|
|
32
|
-
CYRILIC_EXT: string;
|
|
33
|
-
CYRILIC: string;
|
|
34
|
-
VIETNAMESE: string;
|
|
35
|
-
};
|
|
36
|
-
/** local protocol to skip the local font from registering or inlining */
|
|
37
|
-
export declare const LOCAL_FONT_PROTOCOL = "local:";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tries to subset glyphs in a font based on the used codepoints, returning the font as dataurl.
|
|
3
|
-
* Under the hood utilizes worker threads (Web Workers, if available), otherwise fallbacks to the main thread.
|
|
4
|
-
*
|
|
5
|
-
* Check the following diagram for details: link.excalidraw.com/readonly/MbbnWPSWXgadXdtmzgeO
|
|
6
|
-
*
|
|
7
|
-
* @param arrayBuffer font data buffer in the woff2 format
|
|
8
|
-
* @param codePoints codepoints used to subset the glyphs
|
|
9
|
-
*
|
|
10
|
-
* @returns font with subsetted glyphs (all glyphs in case of errors) converted into a dataurl
|
|
11
|
-
*/
|
|
12
|
-
export declare const subsetWoff2GlyphsByCodepoints: (arrayBuffer: ArrayBuffer, codePoints: Array<number>) => Promise<string>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DON'T depend on anything from the outside like `promiseTry`, as this module is part of a separate lazy-loaded chunk.
|
|
3
|
-
*
|
|
4
|
-
* Including anything from the main chunk would include the whole chunk by default.
|
|
5
|
-
* Even it it would be tree-shaken during build, it won't be tree-shaken in dev.
|
|
6
|
-
*
|
|
7
|
-
* In the future consider separating common utils into a separate shared chunk.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Shared commands between the main thread and worker threads.
|
|
11
|
-
*/
|
|
12
|
-
export declare const Commands: {
|
|
13
|
-
readonly Subset: "SUBSET";
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Used by browser (main thread), node and jsdom, to subset the font based on the passed codepoints.
|
|
17
|
-
*
|
|
18
|
-
* @returns woff2 font as a base64 encoded string
|
|
19
|
-
*/
|
|
20
|
-
export declare const subsetToBase64: (arrayBuffer: ArrayBuffer, codePoints: Array<number>) => Promise<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Used by browser (worker thread) and as part of `subsetToBase64`, to subset the font based on the passed codepoints.
|
|
23
|
-
*
|
|
24
|
-
* @eturns woff2 font as an ArrayBuffer, to avoid copying large strings between worker threads and the main thread.
|
|
25
|
-
*/
|
|
26
|
-
export declare const subsetToBinary: (arrayBuffer: ArrayBuffer, codePoints: Array<number>) => Promise<ArrayBuffer>;
|
|
27
|
-
/**
|
|
28
|
-
* Util for isomoprhic browser (main thread), node and jsdom usage.
|
|
29
|
-
*
|
|
30
|
-
* Isn't used inside the worker to avoid copying large binary strings (as dataurl) between worker threads and the main thread.
|
|
31
|
-
*/
|
|
32
|
-
export declare const toBase64: (arrayBuffer: ArrayBuffer) => Promise<string>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DON'T depend on anything from the outside like `promiseTry`, as this module is part of a separate lazy-loaded chunk.
|
|
3
|
-
*
|
|
4
|
-
* Including anything from the main chunk would include the whole chunk by default.
|
|
5
|
-
* Even it it would be tree-shaken during build, it won't be tree-shaken in dev.
|
|
6
|
-
*
|
|
7
|
-
* In the future consider separating common utils into a separate shared chunk.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Due to this export (and related dynamic import), this worker code will be included in the bundle automatically (as a separate chunk),
|
|
11
|
-
* without the need for esbuild / vite /rollup plugins and special browser / server treatment.
|
|
12
|
-
*
|
|
13
|
-
* `import.meta.url` is undefined in nodejs
|
|
14
|
-
*/
|
|
15
|
-
export declare const WorkerUrl: URL | undefined;
|
|
@@ -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,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DON'T depend on anything from the outside like `promiseTry`, as this module is part of a separate lazy-loaded chunk.
|
|
3
|
-
*
|
|
4
|
-
* Including anything from the main chunk would include the whole chunk by default.
|
|
5
|
-
* Even it it would be tree-shaken during build, it won't be tree-shaken in dev.
|
|
6
|
-
*
|
|
7
|
-
* In the future consider separating common utils into a separate shared chunk.
|
|
8
|
-
*/
|
|
9
|
-
declare const load: () => Promise<{
|
|
10
|
-
subset: (fontBuffer: ArrayBuffer, codePoints: ReadonlySet<number>) => Uint8Array;
|
|
11
|
-
}>;
|
|
12
|
-
declare const _default: () => ReturnType<typeof load>;
|
|
13
|
-
export default _default;
|