tldraw 4.1.0-next.2c81540f049b → 4.1.0-next.58b63dd1ac80
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-cjs/index.d.ts +11 -2
- package/dist-cjs/index.js +4 -1
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +63 -55
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js +54 -47
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +3 -3
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js +62 -55
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js +12 -5
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +2 -2
- package/dist-cjs/lib/ui/version.js +3 -3
- package/dist-cjs/lib/ui/version.js.map +1 -1
- package/dist-esm/index.d.mts +11 -2
- package/dist-esm/index.mjs +10 -4
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +68 -57
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs +54 -47
- package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +3 -3
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs +63 -56
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs +12 -5
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +2 -2
- package/dist-esm/lib/ui/version.mjs +3 -3
- package/dist-esm/lib/ui/version.mjs.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +3 -0
- package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +60 -49
- package/src/lib/ui/components/StylePanel/StylePanelButtonPicker.tsx +70 -53
- package/src/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.tsx +105 -90
- package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +72 -51
- package/src/lib/ui/version.ts +3 -3
package/dist-cjs/index.d.ts
CHANGED
|
@@ -2678,8 +2678,11 @@ export declare function StylePanelArrowheadPicker(): JSX_2.Element | null;
|
|
|
2678
2678
|
/** @public @react */
|
|
2679
2679
|
export declare function StylePanelArrowKindPicker(): JSX_2.Element | null;
|
|
2680
2680
|
|
|
2681
|
-
/** @public */
|
|
2682
|
-
export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) =>
|
|
2681
|
+
/** @public @react */
|
|
2682
|
+
export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => React.JSX.Element;
|
|
2683
|
+
|
|
2684
|
+
/** @public @react*/
|
|
2685
|
+
export declare const StylePanelButtonPickerInline: <T extends string>(props: StylePanelButtonPickerProps<T>) => React.JSX.Element;
|
|
2683
2686
|
|
|
2684
2687
|
/** @public */
|
|
2685
2688
|
export declare interface StylePanelButtonPickerProps<T extends string> {
|
|
@@ -2718,6 +2721,9 @@ export declare function StylePanelDashPicker(): JSX_2.Element | null;
|
|
|
2718
2721
|
/** @public @react */
|
|
2719
2722
|
export declare const StylePanelDoubleDropdownPicker: <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2720
2723
|
|
|
2724
|
+
/** @public @react */
|
|
2725
|
+
export declare const StylePanelDoubleDropdownPickerInline: <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2726
|
+
|
|
2721
2727
|
/** @public */
|
|
2722
2728
|
export declare interface StylePanelDoubleDropdownPickerProps<T extends string> {
|
|
2723
2729
|
uiTypeA: string;
|
|
@@ -2737,6 +2743,9 @@ export declare interface StylePanelDoubleDropdownPickerProps<T extends string> {
|
|
|
2737
2743
|
/** @public @react */
|
|
2738
2744
|
export declare const StylePanelDropdownPicker: <T extends string>(props: StylePanelDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2739
2745
|
|
|
2746
|
+
/** @public @react */
|
|
2747
|
+
export declare const StylePanelDropdownPickerInline: <T extends string>(props: StylePanelDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2748
|
+
|
|
2740
2749
|
/** @public */
|
|
2741
2750
|
export declare interface StylePanelDropdownPickerProps<T extends string> {
|
|
2742
2751
|
id: string;
|
package/dist-cjs/index.js
CHANGED
|
@@ -178,11 +178,14 @@ __export(index_exports, {
|
|
|
178
178
|
StylePanelArrowKindPicker: () => import_DefaultStylePanelContent.StylePanelArrowKindPicker,
|
|
179
179
|
StylePanelArrowheadPicker: () => import_DefaultStylePanelContent.StylePanelArrowheadPicker,
|
|
180
180
|
StylePanelButtonPicker: () => import_StylePanelButtonPicker.StylePanelButtonPicker,
|
|
181
|
+
StylePanelButtonPickerInline: () => import_StylePanelButtonPicker.StylePanelButtonPickerInline,
|
|
181
182
|
StylePanelColorPicker: () => import_DefaultStylePanelContent.StylePanelColorPicker,
|
|
182
183
|
StylePanelContextProvider: () => import_StylePanelContext.StylePanelContextProvider,
|
|
183
184
|
StylePanelDashPicker: () => import_DefaultStylePanelContent.StylePanelDashPicker,
|
|
184
185
|
StylePanelDoubleDropdownPicker: () => import_StylePanelDoubleDropdownPicker.StylePanelDoubleDropdownPicker,
|
|
186
|
+
StylePanelDoubleDropdownPickerInline: () => import_StylePanelDoubleDropdownPicker.StylePanelDoubleDropdownPickerInline,
|
|
185
187
|
StylePanelDropdownPicker: () => import_StylePanelDropdownPicker.StylePanelDropdownPicker,
|
|
188
|
+
StylePanelDropdownPickerInline: () => import_StylePanelDropdownPicker.StylePanelDropdownPickerInline,
|
|
186
189
|
StylePanelFillPicker: () => import_DefaultStylePanelContent.StylePanelFillPicker,
|
|
187
190
|
StylePanelFontPicker: () => import_DefaultStylePanelContent.StylePanelFontPicker,
|
|
188
191
|
StylePanelGeoShapePicker: () => import_DefaultStylePanelContent.StylePanelGeoShapePicker,
|
|
@@ -579,7 +582,7 @@ var import_buildFromV1Document = require("./lib/utils/tldr/buildFromV1Document")
|
|
|
579
582
|
var import_file = require("./lib/utils/tldr/file");
|
|
580
583
|
(0, import_editor.registerTldrawLibraryVersion)(
|
|
581
584
|
"tldraw",
|
|
582
|
-
"4.1.0-next.
|
|
585
|
+
"4.1.0-next.58b63dd1ac80",
|
|
583
586
|
"cjs"
|
|
584
587
|
);
|
|
585
588
|
//# sourceMappingURL=index.js.map
|
package/dist-cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["/// <reference types=\"react\" />\n\nimport { registerTldrawLibraryVersion } from '@tldraw/editor'\nexport {\n\tPathBuilder,\n\tPathBuilderGeometry2d,\n\ttype BasePathBuilderOpts,\n\ttype CubicBezierToPathBuilderCommand,\n\ttype DashedPathBuilderOpts,\n\ttype DrawPathBuilderDOpts,\n\ttype DrawPathBuilderOpts,\n\ttype LineToPathBuilderCommand,\n\ttype MoveToPathBuilderCommand,\n\ttype PathBuilderCommand,\n\ttype PathBuilderCommandBase,\n\ttype PathBuilderCommandInfo,\n\ttype PathBuilderCommandOpts,\n\ttype PathBuilderLineOpts,\n\ttype PathBuilderOpts,\n\ttype PathBuilderToDOpts,\n\ttype SolidPathBuilderOpts,\n} from './lib/shapes/shared/PathBuilder'\nexport { usePrefersReducedMotion } from './lib/shapes/shared/usePrefersReducedMotion'\nexport { DefaultA11yAnnouncer, useSelectedShapesAnnouncer } from './lib/ui/components/A11y'\nexport { AccessibilityMenu } from './lib/ui/components/AccessibilityMenu'\nexport { ColorSchemeMenu } from './lib/ui/components/ColorSchemeMenu'\nexport { DefaultFollowingIndicator } from './lib/ui/components/DefaultFollowingIndicator'\nexport { DefaultDialogs } from './lib/ui/components/Dialogs'\nexport {\n\tTldrawUiColumn,\n\tTldrawUiGrid,\n\tTldrawUiOrientationProvider,\n\tTldrawUiRow,\n\tuseTldrawUiOrientation,\n\ttype TldrawUiOrientationContext,\n\ttype TldrawUiOrientationProviderProps,\n\ttype TLUiLayoutProps,\n} from './lib/ui/components/primitives/layout'\nexport {\n\tTldrawUiMenuActionCheckboxItem,\n\ttype TLUiMenuActionCheckboxItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem'\nexport {\n\tTldrawUiMenuActionItem,\n\ttype TLUiMenuActionItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuActionItem'\nexport {\n\tTldrawUiMenuToolItem,\n\ttype TLUiMenuToolItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuToolItem'\nexport { DefaultToasts } from './lib/ui/components/Toasts'\nexport { TldrawUiTranslationProvider } from './lib/ui/hooks/useTranslation/useTranslation'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/editor'\nexport { ArrowBindingUtil } from './lib/bindings/arrow/ArrowBindingUtil'\nexport { TldrawCropHandles, type TldrawCropHandlesProps } from './lib/canvas/TldrawCropHandles'\nexport { TldrawHandles } from './lib/canvas/TldrawHandles'\nexport { TldrawArrowHints, TldrawOverlays } from './lib/canvas/TldrawOverlays'\nexport { TldrawScribble } from './lib/canvas/TldrawScribble'\nexport { TldrawSelectionForeground } from './lib/canvas/TldrawSelectionForeground'\nexport { TldrawShapeIndicators } from './lib/canvas/TldrawShapeIndicators'\nexport { defaultBindingUtils } from './lib/defaultBindingUtils'\nexport {\n\tDEFAULT_EMBED_DEFINITIONS,\n\tembedShapePermissionDefaults,\n\ttype CustomEmbedDefinition,\n\ttype DefaultEmbedDefinitionType,\n\ttype EmbedDefinition,\n\ttype TLEmbedDefinition,\n\ttype TLEmbedShapePermissions,\n} from './lib/defaultEmbedDefinitions'\nexport {\n\tcenterSelectionAroundPoint,\n\tcreateEmptyBookmarkShape,\n\tcreateShapesForAssets,\n\tDEFAULT_MAX_ASSET_SIZE,\n\tDEFAULT_MAX_IMAGE_DIMENSION,\n\tdefaultHandleExternalEmbedContent,\n\tdefaultHandleExternalExcalidrawContent,\n\tdefaultHandleExternalFileAsset,\n\tdefaultHandleExternalFileContent,\n\tdefaultHandleExternalSvgTextContent,\n\tdefaultHandleExternalTextContent,\n\tdefaultHandleExternalTldrawContent,\n\tdefaultHandleExternalUrlAsset,\n\tdefaultHandleExternalUrlContent,\n\tgetAssetInfo,\n\tgetMediaAssetInfoPartial,\n\tnotifyIfFileNotAllowed,\n\tregisterDefaultExternalContentHandlers,\n\ttype TLDefaultExternalContentHandlerOpts,\n\ttype TLExternalContentProps,\n} from './lib/defaultExternalContentHandlers'\nexport { defaultShapeTools } from './lib/defaultShapeTools'\nexport { defaultShapeUtils } from './lib/defaultShapeUtils'\nexport { registerDefaultSideEffects } from './lib/defaultSideEffects'\nexport { defaultTools } from './lib/defaultTools'\nexport {\n\ttype ArrowShapeOptions,\n\ttype TLArcArrowInfo,\n\ttype TLArcInfo,\n\ttype TLArrowInfo,\n\ttype TLArrowPoint,\n\ttype TLElbowArrowInfo,\n\ttype TLStraightArrowInfo,\n} from './lib/shapes/arrow/arrow-types'\nexport { ArrowShapeTool } from './lib/shapes/arrow/ArrowShapeTool'\nexport { ArrowShapeUtil } from './lib/shapes/arrow/ArrowShapeUtil'\nexport {\n\tclearArrowTargetState,\n\tgetArrowTargetState,\n\tupdateArrowTargetState,\n\ttype ArrowTargetState,\n\ttype UpdateArrowTargetStateOpts,\n} from './lib/shapes/arrow/arrowTargetState'\nexport {\n\ttype ElbowArrowBox,\n\ttype ElbowArrowBoxEdges,\n\ttype ElbowArrowBoxes,\n\ttype ElbowArrowEdge,\n\ttype ElbowArrowInfo,\n\ttype ElbowArrowInfoWithoutRoute,\n\ttype ElbowArrowMidpointHandle,\n\ttype ElbowArrowOptions,\n\ttype ElbowArrowRange,\n\ttype ElbowArrowRoute,\n\ttype ElbowArrowSide,\n\ttype ElbowArrowSideReason,\n\ttype ElbowArrowTargetBox,\n} from './lib/shapes/arrow/elbow/definitions'\nexport {\n\tgetArrowBindings,\n\tgetArrowInfo,\n\tgetArrowTerminalsInArrowSpace,\n\ttype TLArrowBindings,\n} from './lib/shapes/arrow/shared'\nexport { BookmarkShapeUtil } from './lib/shapes/bookmark/BookmarkShapeUtil'\nexport { DrawShapeTool } from './lib/shapes/draw/DrawShapeTool'\nexport { DrawShapeUtil, type DrawShapeOptions } from './lib/shapes/draw/DrawShapeUtil'\nexport { EmbedShapeUtil } from './lib/shapes/embed/EmbedShapeUtil'\nexport { FrameShapeTool } from './lib/shapes/frame/FrameShapeTool'\nexport { FrameShapeUtil, type FrameShapeOptions } from './lib/shapes/frame/FrameShapeUtil'\nexport { GeoShapeTool } from './lib/shapes/geo/GeoShapeTool'\nexport { GeoShapeUtil } from './lib/shapes/geo/GeoShapeUtil'\nexport { HighlightShapeTool } from './lib/shapes/highlight/HighlightShapeTool'\nexport {\n\tHighlightShapeUtil,\n\ttype HighlightShapeOptions,\n} from './lib/shapes/highlight/HighlightShapeUtil'\nexport { ImageShapeUtil } from './lib/shapes/image/ImageShapeUtil'\nexport { LineShapeTool } from './lib/shapes/line/LineShapeTool'\nexport { LineShapeUtil } from './lib/shapes/line/LineShapeUtil'\nexport { NoteShapeTool } from './lib/shapes/note/NoteShapeTool'\nexport { NoteShapeUtil, type NoteShapeOptions } from './lib/shapes/note/NoteShapeUtil'\nexport {\n\tASPECT_RATIO_OPTIONS,\n\tASPECT_RATIO_TO_VALUE,\n\tgetCropBox,\n\tgetDefaultCrop,\n\tgetUncroppedSize,\n\ttype ASPECT_RATIO_OPTION,\n\ttype CropBoxOptions,\n} from './lib/shapes/shared/crop'\nexport {\n\tARROW_LABEL_FONT_SIZES,\n\tFONT_FAMILIES,\n\tFONT_SIZES,\n\tLABEL_FONT_SIZES,\n\tSTROKE_SIZES,\n\tTEXT_PROPS,\n} from './lib/shapes/shared/default-shape-constants'\nexport {\n\tallDefaultFontFaces,\n\tDefaultFontFaces,\n\ttype TLDefaultFont,\n\ttype TLDefaultFonts,\n} from './lib/shapes/shared/defaultFonts'\nexport { getStrokePoints } from './lib/shapes/shared/freehand/getStrokePoints'\nexport { getSvgPathFromStrokePoints } from './lib/shapes/shared/freehand/svg'\nexport { type StrokeOptions, type StrokePoint } from './lib/shapes/shared/freehand/types'\nexport { PlainTextLabel, type PlainTextLabelProps } from './lib/shapes/shared/PlainTextLabel'\nexport {\n\tRichTextLabel,\n\tRichTextSVG,\n\ttype RichTextLabelProps,\n\ttype RichTextSVGProps,\n} from './lib/shapes/shared/RichTextLabel'\nexport { useDefaultColorTheme } from './lib/shapes/shared/useDefaultColorTheme'\nexport { useEditablePlainText } from './lib/shapes/shared/useEditablePlainText'\nexport { useEditableRichText } from './lib/shapes/shared/useEditableRichText'\nexport {\n\tuseImageOrVideoAsset,\n\ttype UseImageOrVideoAssetOptions,\n} from './lib/shapes/shared/useImageOrVideoAsset'\nexport { PlainTextArea } from './lib/shapes/text/PlainTextArea'\nexport { RichTextArea, type TextAreaProps } from './lib/shapes/text/RichTextArea'\nexport { TextShapeTool } from './lib/shapes/text/TextShapeTool'\nexport { TextShapeUtil, type TextShapeOptions } from './lib/shapes/text/TextShapeUtil'\nexport { VideoShapeUtil, type VideoShapeOptions } from './lib/shapes/video/VideoShapeUtil'\nexport { type StyleValuesForUi } from './lib/styles'\nexport { Tldraw, type TLComponents, type TldrawBaseProps, type TldrawProps } from './lib/Tldraw'\nexport { TldrawImage, type TldrawImageProps } from './lib/TldrawImage'\nexport { EraserTool } from './lib/tools/EraserTool/EraserTool'\nexport { HandTool } from './lib/tools/HandTool/HandTool'\nexport { LaserTool } from './lib/tools/LaserTool/LaserTool'\nexport { getHitShapeOnCanvasPointerDown } from './lib/tools/selection-logic/getHitShapeOnCanvasPointerDown'\nexport { SelectTool } from './lib/tools/SelectTool/SelectTool'\nexport { ZoomTool } from './lib/tools/ZoomTool/ZoomTool'\nexport {\n\tsetDefaultUiAssetUrls,\n\ttype TLUiAssetUrlOverrides,\n\ttype TLUiAssetUrls,\n} from './lib/ui/assetUrls'\nexport {\n\tDefaultActionsMenu,\n\ttype TLUiActionsMenuProps,\n} from './lib/ui/components/ActionsMenu/DefaultActionsMenu'\nexport {\n\tAlignMenuItems,\n\tDefaultActionsMenuContent,\n\tDistributeMenuItems,\n\tGroupOrUngroupMenuItem,\n\tReorderMenuItems,\n\tRotateCWMenuItem,\n\tStackMenuItems,\n\tZoomOrRotateMenuItem,\n} from './lib/ui/components/ActionsMenu/DefaultActionsMenuContent'\nexport {\n\tDefaultContextMenu as ContextMenu,\n\tDefaultContextMenu,\n\ttype TLUiContextMenuProps,\n} from './lib/ui/components/ContextMenu/DefaultContextMenu'\nexport { DefaultContextMenuContent } from './lib/ui/components/ContextMenu/DefaultContextMenuContent'\nexport {\n\tDefaultDebugMenu,\n\ttype TLUiDebugMenuProps,\n} from './lib/ui/components/DebugMenu/DefaultDebugMenu'\nexport {\n\tDebugFlags,\n\tDefaultDebugMenuContent,\n\tExampleDialog,\n\tFeatureFlags,\n\ttype ExampleDialogProps,\n} from './lib/ui/components/DebugMenu/DefaultDebugMenuContent'\nexport { DefaultMenuPanel } from './lib/ui/components/DefaultMenuPanel'\nexport {\n\tDefaultHelperButtons,\n\ttype TLUiHelperButtonsProps,\n} from './lib/ui/components/HelperButtons/DefaultHelperButtons'\nexport { DefaultHelperButtonsContent } from './lib/ui/components/HelperButtons/DefaultHelperButtonsContent'\nexport {\n\tDefaultHelpMenu,\n\ttype TLUiHelpMenuProps,\n} from './lib/ui/components/HelpMenu/DefaultHelpMenu'\nexport {\n\tDefaultHelpMenuContent,\n\tKeyboardShortcutsMenuItem,\n} from './lib/ui/components/HelpMenu/DefaultHelpMenuContent'\nexport {\n\tDefaultKeyboardShortcutsDialog,\n\ttype TLUiKeyboardShortcutsDialogProps,\n} from './lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog'\nexport { DefaultKeyboardShortcutsDialogContent } from './lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent'\nexport { LanguageMenu } from './lib/ui/components/LanguageMenu'\nexport {\n\tDefaultMainMenu,\n\ttype TLUiMainMenuProps,\n} from './lib/ui/components/MainMenu/DefaultMainMenu'\nexport {\n\tDefaultMainMenuContent,\n\tEditSubmenu,\n\tExportFileContentSubMenu,\n\tExtrasGroup,\n\tLockGroup,\n\tMiscMenuGroup,\n\tPreferencesGroup,\n\tUndoRedoGroup,\n\tViewSubmenu,\n} from './lib/ui/components/MainMenu/DefaultMainMenuContent'\nexport {\n\tArrangeMenuSubmenu,\n\tClipboardMenuGroup,\n\tConversionsMenuGroup,\n\tConvertToBookmarkMenuItem,\n\tConvertToEmbedMenuItem,\n\tCopyAsMenuGroup,\n\tCopyMenuItem,\n\tCursorChatItem,\n\tCutMenuItem,\n\tDeleteMenuItem,\n\tDuplicateMenuItem,\n\tEditLinkMenuItem,\n\tEditMenuSubmenu,\n\tFitFrameToContentMenuItem,\n\tGroupMenuItem,\n\tMoveToPageMenu,\n\tPasteMenuItem,\n\tPrintItem,\n\tRemoveFrameMenuItem,\n\tReorderMenuSubmenu,\n\tSelectAllMenuItem,\n\tToggleAutoSizeMenuItem,\n\tToggleDebugModeItem,\n\tToggleDynamicSizeModeItem,\n\tToggleEdgeScrollingItem,\n\tToggleEnhancedA11yModeItem,\n\tToggleFocusModeItem,\n\tToggleGridItem,\n\tToggleKeyboardShortcutsItem,\n\tToggleLockMenuItem,\n\tTogglePasteAtCursorItem,\n\tToggleReduceMotionItem,\n\tToggleSnapModeItem,\n\tToggleToolLockItem,\n\tToggleTransparentBgMenuItem,\n\tToggleWrapModeItem,\n\tUngroupMenuItem,\n\tUnlockAllMenuItem,\n\tZoomTo100MenuItem,\n\tZoomToFitMenuItem,\n\tZoomToSelectionMenuItem,\n} from './lib/ui/components/menu-items'\nexport { DefaultMinimap } from './lib/ui/components/Minimap/DefaultMinimap'\nexport { MobileStylePanel } from './lib/ui/components/MobileStylePanel'\nexport { DefaultNavigationPanel } from './lib/ui/components/NavigationPanel/DefaultNavigationPanel'\nexport { OfflineIndicator } from './lib/ui/components/OfflineIndicator/OfflineIndicator'\nexport { DefaultPageMenu } from './lib/ui/components/PageMenu/DefaultPageMenu'\nexport { PageItemInput, type PageItemInputProps } from './lib/ui/components/PageMenu/PageItemInput'\nexport {\n\tPageItemSubmenu,\n\ttype PageItemSubmenuProps,\n} from './lib/ui/components/PageMenu/PageItemSubmenu'\nexport {\n\tTldrawUiButton,\n\ttype TLUiButtonProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButton'\nexport {\n\tTldrawUiButtonCheck,\n\ttype TLUiButtonCheckProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonCheck'\nexport {\n\tTldrawUiButtonIcon,\n\ttype TLUiButtonIconProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonIcon'\nexport {\n\tTldrawUiButtonLabel,\n\ttype TLUiButtonLabelProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonLabel'\nexport {\n\tTldrawUiMenuCheckboxItem,\n\ttype TLUiMenuCheckboxItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem'\nexport {\n\tTldrawUiMenuContextProvider,\n\ttype TLUiMenuContextProviderProps,\n\ttype TLUiMenuContextType,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuContext'\nexport {\n\tTldrawUiMenuGroup,\n\ttype TLUiMenuGroupProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuGroup'\nexport {\n\tTldrawUiMenuItem,\n\ttype TLUiMenuItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuItem'\nexport {\n\tTldrawUiMenuSubmenu,\n\ttype TLUiMenuSubmenuProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuSubmenu'\nexport {\n\tTldrawUiContextualToolbar,\n\ttype TLUiContextualToolbarProps,\n} from './lib/ui/components/primitives/TldrawUiContextualToolbar'\nexport {\n\tTldrawUiDialogBody,\n\tTldrawUiDialogCloseButton,\n\tTldrawUiDialogFooter,\n\tTldrawUiDialogHeader,\n\tTldrawUiDialogTitle,\n\ttype TLUiDialogBodyProps,\n\ttype TLUiDialogFooterProps,\n\ttype TLUiDialogHeaderProps,\n\ttype TLUiDialogTitleProps,\n} from './lib/ui/components/primitives/TldrawUiDialog'\nexport {\n\tTldrawUiDropdownMenuCheckboxItem,\n\tTldrawUiDropdownMenuContent,\n\tTldrawUiDropdownMenuGroup,\n\tTldrawUiDropdownMenuIndicator,\n\tTldrawUiDropdownMenuItem,\n\tTldrawUiDropdownMenuRoot,\n\tTldrawUiDropdownMenuSub,\n\tTldrawUiDropdownMenuSubTrigger,\n\tTldrawUiDropdownMenuTrigger,\n\ttype TLUiDropdownMenuCheckboxItemProps,\n\ttype TLUiDropdownMenuContentProps,\n\ttype TLUiDropdownMenuGroupProps,\n\ttype TLUiDropdownMenuItemProps,\n\ttype TLUiDropdownMenuRootProps,\n\ttype TLUiDropdownMenuSubProps,\n\ttype TLUiDropdownMenuSubTriggerProps,\n\ttype TLUiDropdownMenuTriggerProps,\n} from './lib/ui/components/primitives/TldrawUiDropdownMenu'\nexport {\n\tTldrawUiIcon,\n\ttype TLUiIconJsx,\n\ttype TLUiIconProps,\n} from './lib/ui/components/primitives/TldrawUiIcon'\nexport { TldrawUiInput, type TLUiInputProps } from './lib/ui/components/primitives/TldrawUiInput'\nexport { TldrawUiKbd, type TLUiKbdProps } from './lib/ui/components/primitives/TldrawUiKbd'\nexport {\n\tTldrawUiPopover,\n\tTldrawUiPopoverContent,\n\tTldrawUiPopoverTrigger,\n\ttype TLUiPopoverContentProps,\n\ttype TLUiPopoverProps,\n\ttype TLUiPopoverTriggerProps,\n} from './lib/ui/components/primitives/TldrawUiPopover'\nexport { TldrawUiSlider, type TLUiSliderProps } from './lib/ui/components/primitives/TldrawUiSlider'\nexport {\n\tTldrawUiToolbar,\n\tTldrawUiToolbarButton,\n\tTldrawUiToolbarToggleGroup,\n\tTldrawUiToolbarToggleItem,\n\ttype TLUiToolbarButtonProps,\n\ttype TLUiToolbarProps,\n\ttype TLUiToolbarToggleGroupProps,\n\ttype TLUiToolbarToggleItemProps,\n} from './lib/ui/components/primitives/TldrawUiToolbar'\nexport {\n\tTldrawUiTooltip,\n\tTldrawUiTooltipProvider,\n\ttype TldrawUiTooltipProps,\n\ttype TldrawUiTooltipProviderProps,\n} from './lib/ui/components/primitives/TldrawUiTooltip'\nexport {\n\tDefaultQuickActions,\n\ttype TLUiQuickActionsProps,\n} from './lib/ui/components/QuickActions/DefaultQuickActions'\nexport { DefaultQuickActionsContent } from './lib/ui/components/QuickActions/DefaultQuickActionsContent'\nexport { DefaultSharePanel } from './lib/ui/components/SharePanel/DefaultSharePanel'\nexport { PeopleMenu, type PeopleMenuProps } from './lib/ui/components/SharePanel/PeopleMenu'\nexport { Spinner } from './lib/ui/components/Spinner'\nexport {\n\tDefaultStylePanel,\n\ttype TLUiStylePanelProps,\n} from './lib/ui/components/StylePanel/DefaultStylePanel'\nexport {\n\tDefaultStylePanelContent,\n\tStylePanelArrowheadPicker,\n\tStylePanelArrowKindPicker,\n\tStylePanelColorPicker,\n\tStylePanelDashPicker,\n\tStylePanelFillPicker,\n\tStylePanelFontPicker,\n\tStylePanelGeoShapePicker,\n\tStylePanelLabelAlignPicker,\n\tStylePanelOpacityPicker,\n\tStylePanelSection,\n\tStylePanelSizePicker,\n\tStylePanelSplinePicker,\n\tStylePanelTextAlignPicker,\n\ttype StylePanelSectionProps,\n} from './lib/ui/components/StylePanel/DefaultStylePanelContent'\nexport {\n\tStylePanelButtonPicker,\n\ttype StylePanelButtonPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelButtonPicker'\nexport {\n\tStylePanelContextProvider,\n\tuseStylePanelContext,\n\ttype StylePanelContext,\n\ttype StylePanelContextProviderProps,\n} from './lib/ui/components/StylePanel/StylePanelContext'\nexport {\n\tStylePanelDoubleDropdownPicker,\n\ttype StylePanelDoubleDropdownPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker'\nexport {\n\tStylePanelDropdownPicker,\n\ttype StylePanelDropdownPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelDropdownPicker'\nexport {\n\tStylePanelSubheading,\n\ttype StylePanelSubheadingProps,\n} from './lib/ui/components/StylePanel/StylePanelSubheading'\nexport {\n\tDefaultImageToolbar,\n\ttype TLUiImageToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultImageToolbar'\nexport {\n\tDefaultImageToolbarContent,\n\ttype DefaultImageToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultImageToolbarContent'\nexport {\n\tDefaultRichTextToolbar,\n\ttype TLUiRichTextToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultRichTextToolbar'\nexport {\n\tDefaultRichTextToolbarContent,\n\ttype DefaultRichTextToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultRichTextToolbarContent'\nexport {\n\tDefaultToolbar,\n\ttype DefaultToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultToolbar'\nexport {\n\tArrowDownToolbarItem,\n\tArrowLeftToolbarItem,\n\tArrowRightToolbarItem,\n\tArrowToolbarItem,\n\tArrowUpToolbarItem,\n\tAssetToolbarItem,\n\tCheckBoxToolbarItem,\n\tCloudToolbarItem,\n\tDefaultToolbarContent,\n\tDiamondToolbarItem,\n\tDrawToolbarItem,\n\tEllipseToolbarItem,\n\tEraserToolbarItem,\n\tFrameToolbarItem,\n\tHandToolbarItem,\n\tHeartToolbarItem,\n\tHexagonToolbarItem,\n\tHighlightToolbarItem,\n\tLaserToolbarItem,\n\tLineToolbarItem,\n\tNoteToolbarItem,\n\tOvalToolbarItem,\n\tRectangleToolbarItem,\n\tRhombusToolbarItem,\n\tSelectToolbarItem,\n\tStarToolbarItem,\n\tTextToolbarItem,\n\tToolbarItem,\n\tTrapezoidToolbarItem,\n\tTriangleToolbarItem,\n\tuseIsToolSelected,\n\tXBoxToolbarItem,\n\ttype ToolbarItemProps,\n} from './lib/ui/components/Toolbar/DefaultToolbarContent'\nexport {\n\tDefaultVideoToolbar,\n\ttype TLUiVideoToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultVideoToolbar'\nexport {\n\tDefaultVideoToolbarContent,\n\ttype DefaultVideoToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultVideoToolbarContent'\nexport {\n\tOverflowingToolbar,\n\ttype OverflowingToolbarProps,\n} from './lib/ui/components/Toolbar/OverflowingToolbar'\nexport {\n\tToggleToolLockedButton,\n\ttype ToggleToolLockedButtonProps,\n} from './lib/ui/components/Toolbar/ToggleToolLockedButton'\nexport {\n\tCenteredTopPanelContainer,\n\ttype CenteredTopPanelContainerProps,\n} from './lib/ui/components/TopPanel/CenteredTopPanelContainer'\nexport { DefaultTopPanel } from './lib/ui/components/TopPanel/DefaultTopPanel'\nexport {\n\tDefaultZoomMenu,\n\ttype TLUiZoomMenuProps,\n} from './lib/ui/components/ZoomMenu/DefaultZoomMenu'\nexport { DefaultZoomMenuContent } from './lib/ui/components/ZoomMenu/DefaultZoomMenuContent'\nexport { PORTRAIT_BREAKPOINT } from './lib/ui/constants'\nexport {\n\tTldrawUiA11yProvider,\n\tuseA11y,\n\ttype A11yPriority,\n\ttype A11yProviderProps,\n\ttype TLUiA11y,\n\ttype TLUiA11yContextType,\n} from './lib/ui/context/a11y'\nexport {\n\tunwrapLabel,\n\tuseActions,\n\ttype ActionsProviderProps,\n\ttype TLUiActionItem,\n\ttype TLUiActionsContextType,\n} from './lib/ui/context/actions'\nexport { AssetUrlsProvider, useAssetUrls } from './lib/ui/context/asset-urls'\nexport {\n\tBreakPointProvider,\n\tuseBreakpoint,\n\ttype BreakPointProviderProps,\n} from './lib/ui/context/breakpoints'\nexport {\n\tTldrawUiComponentsProvider,\n\tuseTldrawUiComponents,\n\ttype TLUiComponents,\n\ttype TLUiComponentsProviderProps,\n} from './lib/ui/context/components'\nexport {\n\tTldrawUiDialogsProvider,\n\tuseDialogs,\n\ttype TLUiDialog,\n\ttype TLUiDialogProps,\n\ttype TLUiDialogsContextType,\n\ttype TLUiDialogsProviderProps,\n} from './lib/ui/context/dialogs'\nexport {\n\tTldrawUiEventsProvider,\n\tuseUiEvents,\n\ttype EventsProviderProps,\n\ttype TLUiEventContextType,\n\ttype TLUiEventData,\n\ttype TLUiEventHandler,\n\ttype TLUiEventMap,\n\ttype TLUiEventSource,\n} from './lib/ui/context/events'\nexport {\n\tTldrawUiContextProvider,\n\ttype TLUiContextProviderProps,\n} from './lib/ui/context/TldrawUiContextProvider'\nexport {\n\tTldrawUiToastsProvider,\n\tuseToasts,\n\ttype AlertSeverity,\n\ttype TLUiToast,\n\ttype TLUiToastAction,\n\ttype TLUiToastsContextType,\n\ttype TLUiToastsProviderProps,\n} from './lib/ui/context/toasts'\nexport { useCanRedo, useCanUndo, useUnlockedSelectedShapesCount } from './lib/ui/hooks/menu-hooks'\nexport { useMenuClipboardEvents, useNativeClipboardEvents } from './lib/ui/hooks/useClipboardEvents'\nexport {\n\tuseCollaborationStatus,\n\tuseShowCollaborationUi,\n} from './lib/ui/hooks/useCollaborationStatus'\nexport { useCopyAs } from './lib/ui/hooks/useCopyAs'\nexport { useExportAs } from './lib/ui/hooks/useExportAs'\nexport { useKeyboardShortcuts } from './lib/ui/hooks/useKeyboardShortcuts'\nexport { useLocalStorageState } from './lib/ui/hooks/useLocalStorageState'\nexport { useMenuIsOpen } from './lib/ui/hooks/useMenuIsOpen'\nexport { useReadonly } from './lib/ui/hooks/useReadonly'\nexport { useRelevantStyles } from './lib/ui/hooks/useRelevantStyles'\nexport {\n\tonDragFromToolbarToCreateShape,\n\tuseTools,\n\ttype OnDragFromToolbarToCreateShapesOpts,\n\ttype TLUiToolItem,\n\ttype TLUiToolsContextType,\n\ttype TLUiToolsProviderProps,\n} from './lib/ui/hooks/useTools'\nexport { type TLUiTranslationKey } from './lib/ui/hooks/useTranslation/TLUiTranslationKey'\nexport { type TLUiTranslation } from './lib/ui/hooks/useTranslation/translations'\nexport {\n\tuseCurrentTranslation,\n\tuseTranslation,\n\ttype TLUiTranslationContextType,\n\ttype TLUiTranslationProviderProps,\n} from './lib/ui/hooks/useTranslation/useTranslation'\nexport { type TLUiIconType } from './lib/ui/icon-types'\nexport { useDefaultHelpers, type TLUiOverrideHelpers, type TLUiOverrides } from './lib/ui/overrides'\nexport { TldrawUi, TldrawUiInFrontOfTheCanvas, type TldrawUiProps } from './lib/ui/TldrawUi'\nexport { containBoxSize, downsizeImage, type BoxWidthHeight } from './lib/utils/assets/assets'\nexport { preloadFont, type TLTypeFace } from './lib/utils/assets/preload-font'\nexport { getEmbedInfo, type TLEmbedResult } from './lib/utils/embeds/embeds'\nexport { putExcalidrawContent } from './lib/utils/excalidraw/putExcalidrawContent'\nexport { copyAs, type CopyAsOptions, type TLCopyType } from './lib/utils/export/copyAs'\nexport { downloadFile, exportAs, type ExportAsOptions } from './lib/utils/export/exportAs'\nexport { fitFrameToContent, removeFrame } from './lib/utils/frames/frames'\nexport {\n\tdefaultEditorAssetUrls,\n\tsetDefaultEditorAssetUrls,\n\ttype TLEditorAssetUrls,\n} from './lib/utils/static-assets/assetUrls'\nexport {\n\tdefaultAddFontsFromNode,\n\tKeyboardShiftEnterTweakExtension,\n\trenderHtmlFromRichText,\n\trenderHtmlFromRichTextForMeasurement,\n\trenderPlaintextFromRichText,\n\trenderRichTextFromHTML,\n\ttipTapDefaultExtensions,\n} from './lib/utils/text/richText'\nexport { truncateStringWithEllipsis } from './lib/utils/text/text'\nexport { TextDirection } from './lib/utils/text/textDirection'\nexport {\n\tbuildFromV1Document,\n\tTLV1AlignStyle,\n\tTLV1AssetType,\n\tTLV1ColorStyle,\n\tTLV1DashStyle,\n\tTLV1Decoration,\n\tTLV1FontStyle,\n\tTLV1ShapeType,\n\tTLV1SizeStyle,\n\ttype TLV1ArrowBinding,\n\ttype TLV1ArrowShape,\n\ttype TLV1Asset,\n\ttype TLV1BaseAsset,\n\ttype TLV1BaseBinding,\n\ttype TLV1BaseShape,\n\ttype TLV1Binding,\n\ttype TLV1Bounds,\n\ttype TLV1Document,\n\ttype TLV1DrawShape,\n\ttype TLV1EllipseShape,\n\ttype TLV1GroupShape,\n\ttype TLV1Handle,\n\ttype TLV1ImageAsset,\n\ttype TLV1ImageShape,\n\ttype TLV1Page,\n\ttype TLV1PageState,\n\ttype TLV1RectangleShape,\n\ttype TLV1Shape,\n\ttype TLV1ShapeStyles,\n\ttype TLV1StickyShape,\n\ttype TLV1TextShape,\n\ttype TLV1TriangleShape,\n\ttype TLV1VideoAsset,\n\ttype TLV1VideoShape,\n} from './lib/utils/tldr/buildFromV1Document'\nexport {\n\tparseAndLoadDocument,\n\tparseTldrawJsonFile,\n\tserializeTldrawJson,\n\tserializeTldrawJsonBlob,\n\tTLDRAW_FILE_EXTENSION,\n\ttype TldrawFile,\n\ttype TldrawFileParseError,\n} from './lib/utils/tldr/file'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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
|
+
"sourcesContent": ["/// <reference types=\"react\" />\n\nimport { registerTldrawLibraryVersion } from '@tldraw/editor'\nexport {\n\tPathBuilder,\n\tPathBuilderGeometry2d,\n\ttype BasePathBuilderOpts,\n\ttype CubicBezierToPathBuilderCommand,\n\ttype DashedPathBuilderOpts,\n\ttype DrawPathBuilderDOpts,\n\ttype DrawPathBuilderOpts,\n\ttype LineToPathBuilderCommand,\n\ttype MoveToPathBuilderCommand,\n\ttype PathBuilderCommand,\n\ttype PathBuilderCommandBase,\n\ttype PathBuilderCommandInfo,\n\ttype PathBuilderCommandOpts,\n\ttype PathBuilderLineOpts,\n\ttype PathBuilderOpts,\n\ttype PathBuilderToDOpts,\n\ttype SolidPathBuilderOpts,\n} from './lib/shapes/shared/PathBuilder'\nexport { usePrefersReducedMotion } from './lib/shapes/shared/usePrefersReducedMotion'\nexport { DefaultA11yAnnouncer, useSelectedShapesAnnouncer } from './lib/ui/components/A11y'\nexport { AccessibilityMenu } from './lib/ui/components/AccessibilityMenu'\nexport { ColorSchemeMenu } from './lib/ui/components/ColorSchemeMenu'\nexport { DefaultFollowingIndicator } from './lib/ui/components/DefaultFollowingIndicator'\nexport { DefaultDialogs } from './lib/ui/components/Dialogs'\nexport {\n\tTldrawUiColumn,\n\tTldrawUiGrid,\n\tTldrawUiOrientationProvider,\n\tTldrawUiRow,\n\tuseTldrawUiOrientation,\n\ttype TldrawUiOrientationContext,\n\ttype TldrawUiOrientationProviderProps,\n\ttype TLUiLayoutProps,\n} from './lib/ui/components/primitives/layout'\nexport {\n\tTldrawUiMenuActionCheckboxItem,\n\ttype TLUiMenuActionCheckboxItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem'\nexport {\n\tTldrawUiMenuActionItem,\n\ttype TLUiMenuActionItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuActionItem'\nexport {\n\tTldrawUiMenuToolItem,\n\ttype TLUiMenuToolItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuToolItem'\nexport { DefaultToasts } from './lib/ui/components/Toasts'\nexport { TldrawUiTranslationProvider } from './lib/ui/hooks/useTranslation/useTranslation'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/editor'\nexport { ArrowBindingUtil } from './lib/bindings/arrow/ArrowBindingUtil'\nexport { TldrawCropHandles, type TldrawCropHandlesProps } from './lib/canvas/TldrawCropHandles'\nexport { TldrawHandles } from './lib/canvas/TldrawHandles'\nexport { TldrawArrowHints, TldrawOverlays } from './lib/canvas/TldrawOverlays'\nexport { TldrawScribble } from './lib/canvas/TldrawScribble'\nexport { TldrawSelectionForeground } from './lib/canvas/TldrawSelectionForeground'\nexport { TldrawShapeIndicators } from './lib/canvas/TldrawShapeIndicators'\nexport { defaultBindingUtils } from './lib/defaultBindingUtils'\nexport {\n\tDEFAULT_EMBED_DEFINITIONS,\n\tembedShapePermissionDefaults,\n\ttype CustomEmbedDefinition,\n\ttype DefaultEmbedDefinitionType,\n\ttype EmbedDefinition,\n\ttype TLEmbedDefinition,\n\ttype TLEmbedShapePermissions,\n} from './lib/defaultEmbedDefinitions'\nexport {\n\tcenterSelectionAroundPoint,\n\tcreateEmptyBookmarkShape,\n\tcreateShapesForAssets,\n\tDEFAULT_MAX_ASSET_SIZE,\n\tDEFAULT_MAX_IMAGE_DIMENSION,\n\tdefaultHandleExternalEmbedContent,\n\tdefaultHandleExternalExcalidrawContent,\n\tdefaultHandleExternalFileAsset,\n\tdefaultHandleExternalFileContent,\n\tdefaultHandleExternalSvgTextContent,\n\tdefaultHandleExternalTextContent,\n\tdefaultHandleExternalTldrawContent,\n\tdefaultHandleExternalUrlAsset,\n\tdefaultHandleExternalUrlContent,\n\tgetAssetInfo,\n\tgetMediaAssetInfoPartial,\n\tnotifyIfFileNotAllowed,\n\tregisterDefaultExternalContentHandlers,\n\ttype TLDefaultExternalContentHandlerOpts,\n\ttype TLExternalContentProps,\n} from './lib/defaultExternalContentHandlers'\nexport { defaultShapeTools } from './lib/defaultShapeTools'\nexport { defaultShapeUtils } from './lib/defaultShapeUtils'\nexport { registerDefaultSideEffects } from './lib/defaultSideEffects'\nexport { defaultTools } from './lib/defaultTools'\nexport {\n\ttype ArrowShapeOptions,\n\ttype TLArcArrowInfo,\n\ttype TLArcInfo,\n\ttype TLArrowInfo,\n\ttype TLArrowPoint,\n\ttype TLElbowArrowInfo,\n\ttype TLStraightArrowInfo,\n} from './lib/shapes/arrow/arrow-types'\nexport { ArrowShapeTool } from './lib/shapes/arrow/ArrowShapeTool'\nexport { ArrowShapeUtil } from './lib/shapes/arrow/ArrowShapeUtil'\nexport {\n\tclearArrowTargetState,\n\tgetArrowTargetState,\n\tupdateArrowTargetState,\n\ttype ArrowTargetState,\n\ttype UpdateArrowTargetStateOpts,\n} from './lib/shapes/arrow/arrowTargetState'\nexport {\n\ttype ElbowArrowBox,\n\ttype ElbowArrowBoxEdges,\n\ttype ElbowArrowBoxes,\n\ttype ElbowArrowEdge,\n\ttype ElbowArrowInfo,\n\ttype ElbowArrowInfoWithoutRoute,\n\ttype ElbowArrowMidpointHandle,\n\ttype ElbowArrowOptions,\n\ttype ElbowArrowRange,\n\ttype ElbowArrowRoute,\n\ttype ElbowArrowSide,\n\ttype ElbowArrowSideReason,\n\ttype ElbowArrowTargetBox,\n} from './lib/shapes/arrow/elbow/definitions'\nexport {\n\tgetArrowBindings,\n\tgetArrowInfo,\n\tgetArrowTerminalsInArrowSpace,\n\ttype TLArrowBindings,\n} from './lib/shapes/arrow/shared'\nexport { BookmarkShapeUtil } from './lib/shapes/bookmark/BookmarkShapeUtil'\nexport { DrawShapeTool } from './lib/shapes/draw/DrawShapeTool'\nexport { DrawShapeUtil, type DrawShapeOptions } from './lib/shapes/draw/DrawShapeUtil'\nexport { EmbedShapeUtil } from './lib/shapes/embed/EmbedShapeUtil'\nexport { FrameShapeTool } from './lib/shapes/frame/FrameShapeTool'\nexport { FrameShapeUtil, type FrameShapeOptions } from './lib/shapes/frame/FrameShapeUtil'\nexport { GeoShapeTool } from './lib/shapes/geo/GeoShapeTool'\nexport { GeoShapeUtil } from './lib/shapes/geo/GeoShapeUtil'\nexport { HighlightShapeTool } from './lib/shapes/highlight/HighlightShapeTool'\nexport {\n\tHighlightShapeUtil,\n\ttype HighlightShapeOptions,\n} from './lib/shapes/highlight/HighlightShapeUtil'\nexport { ImageShapeUtil } from './lib/shapes/image/ImageShapeUtil'\nexport { LineShapeTool } from './lib/shapes/line/LineShapeTool'\nexport { LineShapeUtil } from './lib/shapes/line/LineShapeUtil'\nexport { NoteShapeTool } from './lib/shapes/note/NoteShapeTool'\nexport { NoteShapeUtil, type NoteShapeOptions } from './lib/shapes/note/NoteShapeUtil'\nexport {\n\tASPECT_RATIO_OPTIONS,\n\tASPECT_RATIO_TO_VALUE,\n\tgetCropBox,\n\tgetDefaultCrop,\n\tgetUncroppedSize,\n\ttype ASPECT_RATIO_OPTION,\n\ttype CropBoxOptions,\n} from './lib/shapes/shared/crop'\nexport {\n\tARROW_LABEL_FONT_SIZES,\n\tFONT_FAMILIES,\n\tFONT_SIZES,\n\tLABEL_FONT_SIZES,\n\tSTROKE_SIZES,\n\tTEXT_PROPS,\n} from './lib/shapes/shared/default-shape-constants'\nexport {\n\tallDefaultFontFaces,\n\tDefaultFontFaces,\n\ttype TLDefaultFont,\n\ttype TLDefaultFonts,\n} from './lib/shapes/shared/defaultFonts'\nexport { getStrokePoints } from './lib/shapes/shared/freehand/getStrokePoints'\nexport { getSvgPathFromStrokePoints } from './lib/shapes/shared/freehand/svg'\nexport { type StrokeOptions, type StrokePoint } from './lib/shapes/shared/freehand/types'\nexport { PlainTextLabel, type PlainTextLabelProps } from './lib/shapes/shared/PlainTextLabel'\nexport {\n\tRichTextLabel,\n\tRichTextSVG,\n\ttype RichTextLabelProps,\n\ttype RichTextSVGProps,\n} from './lib/shapes/shared/RichTextLabel'\nexport { useDefaultColorTheme } from './lib/shapes/shared/useDefaultColorTheme'\nexport { useEditablePlainText } from './lib/shapes/shared/useEditablePlainText'\nexport { useEditableRichText } from './lib/shapes/shared/useEditableRichText'\nexport {\n\tuseImageOrVideoAsset,\n\ttype UseImageOrVideoAssetOptions,\n} from './lib/shapes/shared/useImageOrVideoAsset'\nexport { PlainTextArea } from './lib/shapes/text/PlainTextArea'\nexport { RichTextArea, type TextAreaProps } from './lib/shapes/text/RichTextArea'\nexport { TextShapeTool } from './lib/shapes/text/TextShapeTool'\nexport { TextShapeUtil, type TextShapeOptions } from './lib/shapes/text/TextShapeUtil'\nexport { VideoShapeUtil, type VideoShapeOptions } from './lib/shapes/video/VideoShapeUtil'\nexport { type StyleValuesForUi } from './lib/styles'\nexport { Tldraw, type TLComponents, type TldrawBaseProps, type TldrawProps } from './lib/Tldraw'\nexport { TldrawImage, type TldrawImageProps } from './lib/TldrawImage'\nexport { EraserTool } from './lib/tools/EraserTool/EraserTool'\nexport { HandTool } from './lib/tools/HandTool/HandTool'\nexport { LaserTool } from './lib/tools/LaserTool/LaserTool'\nexport { getHitShapeOnCanvasPointerDown } from './lib/tools/selection-logic/getHitShapeOnCanvasPointerDown'\nexport { SelectTool } from './lib/tools/SelectTool/SelectTool'\nexport { ZoomTool } from './lib/tools/ZoomTool/ZoomTool'\nexport {\n\tsetDefaultUiAssetUrls,\n\ttype TLUiAssetUrlOverrides,\n\ttype TLUiAssetUrls,\n} from './lib/ui/assetUrls'\nexport {\n\tDefaultActionsMenu,\n\ttype TLUiActionsMenuProps,\n} from './lib/ui/components/ActionsMenu/DefaultActionsMenu'\nexport {\n\tAlignMenuItems,\n\tDefaultActionsMenuContent,\n\tDistributeMenuItems,\n\tGroupOrUngroupMenuItem,\n\tReorderMenuItems,\n\tRotateCWMenuItem,\n\tStackMenuItems,\n\tZoomOrRotateMenuItem,\n} from './lib/ui/components/ActionsMenu/DefaultActionsMenuContent'\nexport {\n\tDefaultContextMenu as ContextMenu,\n\tDefaultContextMenu,\n\ttype TLUiContextMenuProps,\n} from './lib/ui/components/ContextMenu/DefaultContextMenu'\nexport { DefaultContextMenuContent } from './lib/ui/components/ContextMenu/DefaultContextMenuContent'\nexport {\n\tDefaultDebugMenu,\n\ttype TLUiDebugMenuProps,\n} from './lib/ui/components/DebugMenu/DefaultDebugMenu'\nexport {\n\tDebugFlags,\n\tDefaultDebugMenuContent,\n\tExampleDialog,\n\tFeatureFlags,\n\ttype ExampleDialogProps,\n} from './lib/ui/components/DebugMenu/DefaultDebugMenuContent'\nexport { DefaultMenuPanel } from './lib/ui/components/DefaultMenuPanel'\nexport {\n\tDefaultHelperButtons,\n\ttype TLUiHelperButtonsProps,\n} from './lib/ui/components/HelperButtons/DefaultHelperButtons'\nexport { DefaultHelperButtonsContent } from './lib/ui/components/HelperButtons/DefaultHelperButtonsContent'\nexport {\n\tDefaultHelpMenu,\n\ttype TLUiHelpMenuProps,\n} from './lib/ui/components/HelpMenu/DefaultHelpMenu'\nexport {\n\tDefaultHelpMenuContent,\n\tKeyboardShortcutsMenuItem,\n} from './lib/ui/components/HelpMenu/DefaultHelpMenuContent'\nexport {\n\tDefaultKeyboardShortcutsDialog,\n\ttype TLUiKeyboardShortcutsDialogProps,\n} from './lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog'\nexport { DefaultKeyboardShortcutsDialogContent } from './lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent'\nexport { LanguageMenu } from './lib/ui/components/LanguageMenu'\nexport {\n\tDefaultMainMenu,\n\ttype TLUiMainMenuProps,\n} from './lib/ui/components/MainMenu/DefaultMainMenu'\nexport {\n\tDefaultMainMenuContent,\n\tEditSubmenu,\n\tExportFileContentSubMenu,\n\tExtrasGroup,\n\tLockGroup,\n\tMiscMenuGroup,\n\tPreferencesGroup,\n\tUndoRedoGroup,\n\tViewSubmenu,\n} from './lib/ui/components/MainMenu/DefaultMainMenuContent'\nexport {\n\tArrangeMenuSubmenu,\n\tClipboardMenuGroup,\n\tConversionsMenuGroup,\n\tConvertToBookmarkMenuItem,\n\tConvertToEmbedMenuItem,\n\tCopyAsMenuGroup,\n\tCopyMenuItem,\n\tCursorChatItem,\n\tCutMenuItem,\n\tDeleteMenuItem,\n\tDuplicateMenuItem,\n\tEditLinkMenuItem,\n\tEditMenuSubmenu,\n\tFitFrameToContentMenuItem,\n\tGroupMenuItem,\n\tMoveToPageMenu,\n\tPasteMenuItem,\n\tPrintItem,\n\tRemoveFrameMenuItem,\n\tReorderMenuSubmenu,\n\tSelectAllMenuItem,\n\tToggleAutoSizeMenuItem,\n\tToggleDebugModeItem,\n\tToggleDynamicSizeModeItem,\n\tToggleEdgeScrollingItem,\n\tToggleEnhancedA11yModeItem,\n\tToggleFocusModeItem,\n\tToggleGridItem,\n\tToggleKeyboardShortcutsItem,\n\tToggleLockMenuItem,\n\tTogglePasteAtCursorItem,\n\tToggleReduceMotionItem,\n\tToggleSnapModeItem,\n\tToggleToolLockItem,\n\tToggleTransparentBgMenuItem,\n\tToggleWrapModeItem,\n\tUngroupMenuItem,\n\tUnlockAllMenuItem,\n\tZoomTo100MenuItem,\n\tZoomToFitMenuItem,\n\tZoomToSelectionMenuItem,\n} from './lib/ui/components/menu-items'\nexport { DefaultMinimap } from './lib/ui/components/Minimap/DefaultMinimap'\nexport { MobileStylePanel } from './lib/ui/components/MobileStylePanel'\nexport { DefaultNavigationPanel } from './lib/ui/components/NavigationPanel/DefaultNavigationPanel'\nexport { OfflineIndicator } from './lib/ui/components/OfflineIndicator/OfflineIndicator'\nexport { DefaultPageMenu } from './lib/ui/components/PageMenu/DefaultPageMenu'\nexport { PageItemInput, type PageItemInputProps } from './lib/ui/components/PageMenu/PageItemInput'\nexport {\n\tPageItemSubmenu,\n\ttype PageItemSubmenuProps,\n} from './lib/ui/components/PageMenu/PageItemSubmenu'\nexport {\n\tTldrawUiButton,\n\ttype TLUiButtonProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButton'\nexport {\n\tTldrawUiButtonCheck,\n\ttype TLUiButtonCheckProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonCheck'\nexport {\n\tTldrawUiButtonIcon,\n\ttype TLUiButtonIconProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonIcon'\nexport {\n\tTldrawUiButtonLabel,\n\ttype TLUiButtonLabelProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonLabel'\nexport {\n\tTldrawUiMenuCheckboxItem,\n\ttype TLUiMenuCheckboxItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem'\nexport {\n\tTldrawUiMenuContextProvider,\n\ttype TLUiMenuContextProviderProps,\n\ttype TLUiMenuContextType,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuContext'\nexport {\n\tTldrawUiMenuGroup,\n\ttype TLUiMenuGroupProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuGroup'\nexport {\n\tTldrawUiMenuItem,\n\ttype TLUiMenuItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuItem'\nexport {\n\tTldrawUiMenuSubmenu,\n\ttype TLUiMenuSubmenuProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuSubmenu'\nexport {\n\tTldrawUiContextualToolbar,\n\ttype TLUiContextualToolbarProps,\n} from './lib/ui/components/primitives/TldrawUiContextualToolbar'\nexport {\n\tTldrawUiDialogBody,\n\tTldrawUiDialogCloseButton,\n\tTldrawUiDialogFooter,\n\tTldrawUiDialogHeader,\n\tTldrawUiDialogTitle,\n\ttype TLUiDialogBodyProps,\n\ttype TLUiDialogFooterProps,\n\ttype TLUiDialogHeaderProps,\n\ttype TLUiDialogTitleProps,\n} from './lib/ui/components/primitives/TldrawUiDialog'\nexport {\n\tTldrawUiDropdownMenuCheckboxItem,\n\tTldrawUiDropdownMenuContent,\n\tTldrawUiDropdownMenuGroup,\n\tTldrawUiDropdownMenuIndicator,\n\tTldrawUiDropdownMenuItem,\n\tTldrawUiDropdownMenuRoot,\n\tTldrawUiDropdownMenuSub,\n\tTldrawUiDropdownMenuSubTrigger,\n\tTldrawUiDropdownMenuTrigger,\n\ttype TLUiDropdownMenuCheckboxItemProps,\n\ttype TLUiDropdownMenuContentProps,\n\ttype TLUiDropdownMenuGroupProps,\n\ttype TLUiDropdownMenuItemProps,\n\ttype TLUiDropdownMenuRootProps,\n\ttype TLUiDropdownMenuSubProps,\n\ttype TLUiDropdownMenuSubTriggerProps,\n\ttype TLUiDropdownMenuTriggerProps,\n} from './lib/ui/components/primitives/TldrawUiDropdownMenu'\nexport {\n\tTldrawUiIcon,\n\ttype TLUiIconJsx,\n\ttype TLUiIconProps,\n} from './lib/ui/components/primitives/TldrawUiIcon'\nexport { TldrawUiInput, type TLUiInputProps } from './lib/ui/components/primitives/TldrawUiInput'\nexport { TldrawUiKbd, type TLUiKbdProps } from './lib/ui/components/primitives/TldrawUiKbd'\nexport {\n\tTldrawUiPopover,\n\tTldrawUiPopoverContent,\n\tTldrawUiPopoverTrigger,\n\ttype TLUiPopoverContentProps,\n\ttype TLUiPopoverProps,\n\ttype TLUiPopoverTriggerProps,\n} from './lib/ui/components/primitives/TldrawUiPopover'\nexport { TldrawUiSlider, type TLUiSliderProps } from './lib/ui/components/primitives/TldrawUiSlider'\nexport {\n\tTldrawUiToolbar,\n\tTldrawUiToolbarButton,\n\tTldrawUiToolbarToggleGroup,\n\tTldrawUiToolbarToggleItem,\n\ttype TLUiToolbarButtonProps,\n\ttype TLUiToolbarProps,\n\ttype TLUiToolbarToggleGroupProps,\n\ttype TLUiToolbarToggleItemProps,\n} from './lib/ui/components/primitives/TldrawUiToolbar'\nexport {\n\tTldrawUiTooltip,\n\tTldrawUiTooltipProvider,\n\ttype TldrawUiTooltipProps,\n\ttype TldrawUiTooltipProviderProps,\n} from './lib/ui/components/primitives/TldrawUiTooltip'\nexport {\n\tDefaultQuickActions,\n\ttype TLUiQuickActionsProps,\n} from './lib/ui/components/QuickActions/DefaultQuickActions'\nexport { DefaultQuickActionsContent } from './lib/ui/components/QuickActions/DefaultQuickActionsContent'\nexport { DefaultSharePanel } from './lib/ui/components/SharePanel/DefaultSharePanel'\nexport { PeopleMenu, type PeopleMenuProps } from './lib/ui/components/SharePanel/PeopleMenu'\nexport { Spinner } from './lib/ui/components/Spinner'\nexport {\n\tDefaultStylePanel,\n\ttype TLUiStylePanelProps,\n} from './lib/ui/components/StylePanel/DefaultStylePanel'\nexport {\n\tDefaultStylePanelContent,\n\tStylePanelArrowheadPicker,\n\tStylePanelArrowKindPicker,\n\tStylePanelColorPicker,\n\tStylePanelDashPicker,\n\tStylePanelFillPicker,\n\tStylePanelFontPicker,\n\tStylePanelGeoShapePicker,\n\tStylePanelLabelAlignPicker,\n\tStylePanelOpacityPicker,\n\tStylePanelSection,\n\tStylePanelSizePicker,\n\tStylePanelSplinePicker,\n\tStylePanelTextAlignPicker,\n\ttype StylePanelSectionProps,\n} from './lib/ui/components/StylePanel/DefaultStylePanelContent'\nexport {\n\tStylePanelButtonPicker,\n\tStylePanelButtonPickerInline,\n\ttype StylePanelButtonPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelButtonPicker'\nexport {\n\tStylePanelContextProvider,\n\tuseStylePanelContext,\n\ttype StylePanelContext,\n\ttype StylePanelContextProviderProps,\n} from './lib/ui/components/StylePanel/StylePanelContext'\nexport {\n\tStylePanelDoubleDropdownPicker,\n\tStylePanelDoubleDropdownPickerInline,\n\ttype StylePanelDoubleDropdownPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker'\nexport {\n\tStylePanelDropdownPicker,\n\tStylePanelDropdownPickerInline,\n\ttype StylePanelDropdownPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelDropdownPicker'\nexport {\n\tStylePanelSubheading,\n\ttype StylePanelSubheadingProps,\n} from './lib/ui/components/StylePanel/StylePanelSubheading'\nexport {\n\tDefaultImageToolbar,\n\ttype TLUiImageToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultImageToolbar'\nexport {\n\tDefaultImageToolbarContent,\n\ttype DefaultImageToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultImageToolbarContent'\nexport {\n\tDefaultRichTextToolbar,\n\ttype TLUiRichTextToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultRichTextToolbar'\nexport {\n\tDefaultRichTextToolbarContent,\n\ttype DefaultRichTextToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultRichTextToolbarContent'\nexport {\n\tDefaultToolbar,\n\ttype DefaultToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultToolbar'\nexport {\n\tArrowDownToolbarItem,\n\tArrowLeftToolbarItem,\n\tArrowRightToolbarItem,\n\tArrowToolbarItem,\n\tArrowUpToolbarItem,\n\tAssetToolbarItem,\n\tCheckBoxToolbarItem,\n\tCloudToolbarItem,\n\tDefaultToolbarContent,\n\tDiamondToolbarItem,\n\tDrawToolbarItem,\n\tEllipseToolbarItem,\n\tEraserToolbarItem,\n\tFrameToolbarItem,\n\tHandToolbarItem,\n\tHeartToolbarItem,\n\tHexagonToolbarItem,\n\tHighlightToolbarItem,\n\tLaserToolbarItem,\n\tLineToolbarItem,\n\tNoteToolbarItem,\n\tOvalToolbarItem,\n\tRectangleToolbarItem,\n\tRhombusToolbarItem,\n\tSelectToolbarItem,\n\tStarToolbarItem,\n\tTextToolbarItem,\n\tToolbarItem,\n\tTrapezoidToolbarItem,\n\tTriangleToolbarItem,\n\tuseIsToolSelected,\n\tXBoxToolbarItem,\n\ttype ToolbarItemProps,\n} from './lib/ui/components/Toolbar/DefaultToolbarContent'\nexport {\n\tDefaultVideoToolbar,\n\ttype TLUiVideoToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultVideoToolbar'\nexport {\n\tDefaultVideoToolbarContent,\n\ttype DefaultVideoToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultVideoToolbarContent'\nexport {\n\tOverflowingToolbar,\n\ttype OverflowingToolbarProps,\n} from './lib/ui/components/Toolbar/OverflowingToolbar'\nexport {\n\tToggleToolLockedButton,\n\ttype ToggleToolLockedButtonProps,\n} from './lib/ui/components/Toolbar/ToggleToolLockedButton'\nexport {\n\tCenteredTopPanelContainer,\n\ttype CenteredTopPanelContainerProps,\n} from './lib/ui/components/TopPanel/CenteredTopPanelContainer'\nexport { DefaultTopPanel } from './lib/ui/components/TopPanel/DefaultTopPanel'\nexport {\n\tDefaultZoomMenu,\n\ttype TLUiZoomMenuProps,\n} from './lib/ui/components/ZoomMenu/DefaultZoomMenu'\nexport { DefaultZoomMenuContent } from './lib/ui/components/ZoomMenu/DefaultZoomMenuContent'\nexport { PORTRAIT_BREAKPOINT } from './lib/ui/constants'\nexport {\n\tTldrawUiA11yProvider,\n\tuseA11y,\n\ttype A11yPriority,\n\ttype A11yProviderProps,\n\ttype TLUiA11y,\n\ttype TLUiA11yContextType,\n} from './lib/ui/context/a11y'\nexport {\n\tunwrapLabel,\n\tuseActions,\n\ttype ActionsProviderProps,\n\ttype TLUiActionItem,\n\ttype TLUiActionsContextType,\n} from './lib/ui/context/actions'\nexport { AssetUrlsProvider, useAssetUrls } from './lib/ui/context/asset-urls'\nexport {\n\tBreakPointProvider,\n\tuseBreakpoint,\n\ttype BreakPointProviderProps,\n} from './lib/ui/context/breakpoints'\nexport {\n\tTldrawUiComponentsProvider,\n\tuseTldrawUiComponents,\n\ttype TLUiComponents,\n\ttype TLUiComponentsProviderProps,\n} from './lib/ui/context/components'\nexport {\n\tTldrawUiDialogsProvider,\n\tuseDialogs,\n\ttype TLUiDialog,\n\ttype TLUiDialogProps,\n\ttype TLUiDialogsContextType,\n\ttype TLUiDialogsProviderProps,\n} from './lib/ui/context/dialogs'\nexport {\n\tTldrawUiEventsProvider,\n\tuseUiEvents,\n\ttype EventsProviderProps,\n\ttype TLUiEventContextType,\n\ttype TLUiEventData,\n\ttype TLUiEventHandler,\n\ttype TLUiEventMap,\n\ttype TLUiEventSource,\n} from './lib/ui/context/events'\nexport {\n\tTldrawUiContextProvider,\n\ttype TLUiContextProviderProps,\n} from './lib/ui/context/TldrawUiContextProvider'\nexport {\n\tTldrawUiToastsProvider,\n\tuseToasts,\n\ttype AlertSeverity,\n\ttype TLUiToast,\n\ttype TLUiToastAction,\n\ttype TLUiToastsContextType,\n\ttype TLUiToastsProviderProps,\n} from './lib/ui/context/toasts'\nexport { useCanRedo, useCanUndo, useUnlockedSelectedShapesCount } from './lib/ui/hooks/menu-hooks'\nexport { useMenuClipboardEvents, useNativeClipboardEvents } from './lib/ui/hooks/useClipboardEvents'\nexport {\n\tuseCollaborationStatus,\n\tuseShowCollaborationUi,\n} from './lib/ui/hooks/useCollaborationStatus'\nexport { useCopyAs } from './lib/ui/hooks/useCopyAs'\nexport { useExportAs } from './lib/ui/hooks/useExportAs'\nexport { useKeyboardShortcuts } from './lib/ui/hooks/useKeyboardShortcuts'\nexport { useLocalStorageState } from './lib/ui/hooks/useLocalStorageState'\nexport { useMenuIsOpen } from './lib/ui/hooks/useMenuIsOpen'\nexport { useReadonly } from './lib/ui/hooks/useReadonly'\nexport { useRelevantStyles } from './lib/ui/hooks/useRelevantStyles'\nexport {\n\tonDragFromToolbarToCreateShape,\n\tuseTools,\n\ttype OnDragFromToolbarToCreateShapesOpts,\n\ttype TLUiToolItem,\n\ttype TLUiToolsContextType,\n\ttype TLUiToolsProviderProps,\n} from './lib/ui/hooks/useTools'\nexport { type TLUiTranslationKey } from './lib/ui/hooks/useTranslation/TLUiTranslationKey'\nexport { type TLUiTranslation } from './lib/ui/hooks/useTranslation/translations'\nexport {\n\tuseCurrentTranslation,\n\tuseTranslation,\n\ttype TLUiTranslationContextType,\n\ttype TLUiTranslationProviderProps,\n} from './lib/ui/hooks/useTranslation/useTranslation'\nexport { type TLUiIconType } from './lib/ui/icon-types'\nexport { useDefaultHelpers, type TLUiOverrideHelpers, type TLUiOverrides } from './lib/ui/overrides'\nexport { TldrawUi, TldrawUiInFrontOfTheCanvas, type TldrawUiProps } from './lib/ui/TldrawUi'\nexport { containBoxSize, downsizeImage, type BoxWidthHeight } from './lib/utils/assets/assets'\nexport { preloadFont, type TLTypeFace } from './lib/utils/assets/preload-font'\nexport { getEmbedInfo, type TLEmbedResult } from './lib/utils/embeds/embeds'\nexport { putExcalidrawContent } from './lib/utils/excalidraw/putExcalidrawContent'\nexport { copyAs, type CopyAsOptions, type TLCopyType } from './lib/utils/export/copyAs'\nexport { downloadFile, exportAs, type ExportAsOptions } from './lib/utils/export/exportAs'\nexport { fitFrameToContent, removeFrame } from './lib/utils/frames/frames'\nexport {\n\tdefaultEditorAssetUrls,\n\tsetDefaultEditorAssetUrls,\n\ttype TLEditorAssetUrls,\n} from './lib/utils/static-assets/assetUrls'\nexport {\n\tdefaultAddFontsFromNode,\n\tKeyboardShiftEnterTweakExtension,\n\trenderHtmlFromRichText,\n\trenderHtmlFromRichTextForMeasurement,\n\trenderPlaintextFromRichText,\n\trenderRichTextFromHTML,\n\ttipTapDefaultExtensions,\n} from './lib/utils/text/richText'\nexport { truncateStringWithEllipsis } from './lib/utils/text/text'\nexport { TextDirection } from './lib/utils/text/textDirection'\nexport {\n\tbuildFromV1Document,\n\tTLV1AlignStyle,\n\tTLV1AssetType,\n\tTLV1ColorStyle,\n\tTLV1DashStyle,\n\tTLV1Decoration,\n\tTLV1FontStyle,\n\tTLV1ShapeType,\n\tTLV1SizeStyle,\n\ttype TLV1ArrowBinding,\n\ttype TLV1ArrowShape,\n\ttype TLV1Asset,\n\ttype TLV1BaseAsset,\n\ttype TLV1BaseBinding,\n\ttype TLV1BaseShape,\n\ttype TLV1Binding,\n\ttype TLV1Bounds,\n\ttype TLV1Document,\n\ttype TLV1DrawShape,\n\ttype TLV1EllipseShape,\n\ttype TLV1GroupShape,\n\ttype TLV1Handle,\n\ttype TLV1ImageAsset,\n\ttype TLV1ImageShape,\n\ttype TLV1Page,\n\ttype TLV1PageState,\n\ttype TLV1RectangleShape,\n\ttype TLV1Shape,\n\ttype TLV1ShapeStyles,\n\ttype TLV1StickyShape,\n\ttype TLV1TextShape,\n\ttype TLV1TriangleShape,\n\ttype TLV1VideoAsset,\n\ttype TLV1VideoShape,\n} from './lib/utils/tldr/buildFromV1Document'\nexport {\n\tparseAndLoadDocument,\n\tparseTldrawJsonFile,\n\tserializeTldrawJson,\n\tserializeTldrawJsonBlob,\n\tTLDRAW_FILE_EXTENSION,\n\ttype TldrawFile,\n\ttype TldrawFileParseError,\n} from './lib/utils/tldr/file'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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sBAAyE;AACzE,oBAAmE;AACnE,0BAA6C;AAC7C,oBAAiD;AACjD,kCAAqC;AACrC,oBAA4D;AAC5D,sBAA6D;AAC7D,oBAA+C;AAC/C,IAAAC,oBAIO;AACP,sBAQO;AACP,kBAA2C;AAC3C,2BAA8B;AAC9B,iCAmCO;AACP,kBAQO;AAAA,IAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": ["import_useTranslation", "import_assetUrls"]
|
|
7
7
|
}
|
|
@@ -219,71 +219,79 @@ function StylePanelFontPicker() {
|
|
|
219
219
|
);
|
|
220
220
|
}
|
|
221
221
|
function StylePanelTextAlignPicker() {
|
|
222
|
-
const { styles } = (0, import_StylePanelContext.useStylePanelContext)();
|
|
222
|
+
const { styles, enhancedA11yMode } = (0, import_StylePanelContext.useStylePanelContext)();
|
|
223
223
|
const msg = (0, import_useTranslation.useTranslation)();
|
|
224
224
|
const textAlign = styles.get(import_editor.DefaultTextAlignStyle);
|
|
225
225
|
if (textAlign === void 0) return null;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
226
|
+
const title = msg("style-panel.align");
|
|
227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
228
|
+
enhancedA11yMode && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StylePanelSubheading.StylePanelSubheading, { children: title }),
|
|
229
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_TldrawUiToolbar.TldrawUiToolbar, { orientation: "horizontal", label: title, children: [
|
|
230
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
231
|
+
import_StylePanelButtonPicker.StylePanelButtonPickerInline,
|
|
232
|
+
{
|
|
233
|
+
title,
|
|
234
|
+
uiType: "align",
|
|
235
|
+
style: import_editor.DefaultTextAlignStyle,
|
|
236
|
+
items: import_styles.STYLES.textAlign,
|
|
237
|
+
value: textAlign
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
241
|
+
import_TldrawUiToolbar.TldrawUiToolbarButton,
|
|
242
|
+
{
|
|
243
|
+
type: "icon",
|
|
244
|
+
title: msg("style-panel.vertical-align"),
|
|
245
|
+
"data-testid": "vertical-align",
|
|
246
|
+
disabled: true,
|
|
247
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiButtonIcon.TldrawUiButtonIcon, { icon: "vertical-align-middle" })
|
|
248
|
+
}
|
|
249
|
+
)
|
|
250
|
+
] })
|
|
247
251
|
] });
|
|
248
252
|
}
|
|
249
253
|
function StylePanelLabelAlignPicker() {
|
|
250
|
-
const { styles } = (0, import_StylePanelContext.useStylePanelContext)();
|
|
254
|
+
const { styles, enhancedA11yMode } = (0, import_StylePanelContext.useStylePanelContext)();
|
|
251
255
|
const msg = (0, import_useTranslation.useTranslation)();
|
|
252
256
|
const labelAlign = styles.get(import_editor.DefaultHorizontalAlignStyle);
|
|
253
257
|
const verticalLabelAlign = styles.get(import_editor.DefaultVerticalAlignStyle);
|
|
254
258
|
if (labelAlign === void 0) return null;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
259
|
+
const title = msg("style-panel.label-align");
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
261
|
+
enhancedA11yMode && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StylePanelSubheading.StylePanelSubheading, { children: title }),
|
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_TldrawUiToolbar.TldrawUiToolbar, { orientation: "horizontal", label: title, children: [
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
264
|
+
import_StylePanelButtonPicker.StylePanelButtonPickerInline,
|
|
265
|
+
{
|
|
266
|
+
title,
|
|
267
|
+
uiType: "align",
|
|
268
|
+
style: import_editor.DefaultHorizontalAlignStyle,
|
|
269
|
+
items: import_styles.STYLES.horizontalAlign,
|
|
270
|
+
value: labelAlign
|
|
271
|
+
}
|
|
272
|
+
),
|
|
273
|
+
verticalLabelAlign === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
274
|
+
import_TldrawUiToolbar.TldrawUiToolbarButton,
|
|
275
|
+
{
|
|
276
|
+
type: "icon",
|
|
277
|
+
title: msg("style-panel.vertical-align"),
|
|
278
|
+
"data-testid": "vertical-align",
|
|
279
|
+
disabled: true,
|
|
280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiButtonIcon.TldrawUiButtonIcon, { icon: "vertical-align-middle" })
|
|
281
|
+
}
|
|
282
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
283
|
+
import_StylePanelDropdownPicker.StylePanelDropdownPickerInline,
|
|
284
|
+
{
|
|
285
|
+
type: "icon",
|
|
286
|
+
id: "geo-vertical-alignment",
|
|
287
|
+
uiType: "verticalAlign",
|
|
288
|
+
stylePanelType: "vertical-align",
|
|
289
|
+
style: import_editor.DefaultVerticalAlignStyle,
|
|
290
|
+
items: import_styles.STYLES.verticalAlign,
|
|
291
|
+
value: verticalLabelAlign
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
] })
|
|
287
295
|
] });
|
|
288
296
|
}
|
|
289
297
|
function StylePanelGeoShapePicker() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n\tArrowShapeArrowheadEndStyle,\n\tArrowShapeArrowheadStartStyle,\n\tArrowShapeKindStyle,\n\tDefaultColorStyle,\n\tDefaultDashStyle,\n\tDefaultFillStyle,\n\tDefaultFontStyle,\n\tDefaultHorizontalAlignStyle,\n\tDefaultSizeStyle,\n\tDefaultTextAlignStyle,\n\tDefaultVerticalAlignStyle,\n\tGeoShapeGeoStyle,\n\tLineShapeSplineStyle,\n\tTLArrowShapeArrowheadStyle,\n\tkickoutOccludedShapes,\n\tminBy,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport React from 'react'\nimport { STYLES } from '../../../styles'\nimport { useUiEvents } from '../../context/events'\nimport { useTranslation } from '../../hooks/useTranslation/useTranslation'\nimport { TldrawUiButtonIcon } from '../primitives/Button/TldrawUiButtonIcon'\nimport { TldrawUiSlider } from '../primitives/TldrawUiSlider'\nimport { TldrawUiToolbar, TldrawUiToolbarButton } from '../primitives/TldrawUiToolbar'\nimport { StylePanelButtonPicker } from './StylePanelButtonPicker'\nimport { useStylePanelContext } from './StylePanelContext'\nimport { StylePanelDoubleDropdownPicker } from './StylePanelDoubleDropdownPicker'\nimport { StylePanelDropdownPicker } from './StylePanelDropdownPicker'\nimport { StylePanelSubheading } from './StylePanelSubheading'\n\n/** @public @react */\nexport function DefaultStylePanelContent() {\n\treturn (\n\t\t<>\n\t\t\t<StylePanelSection>\n\t\t\t\t<StylePanelColorPicker />\n\t\t\t\t<StylePanelOpacityPicker />\n\t\t\t</StylePanelSection>\n\t\t\t<StylePanelSection>\n\t\t\t\t<StylePanelFillPicker />\n\t\t\t\t<StylePanelDashPicker />\n\t\t\t\t<StylePanelSizePicker />\n\t\t\t</StylePanelSection>\n\t\t\t<StylePanelSection>\n\t\t\t\t<StylePanelFontPicker />\n\t\t\t\t<StylePanelTextAlignPicker />\n\t\t\t\t<StylePanelLabelAlignPicker />\n\t\t\t</StylePanelSection>\n\t\t\t<StylePanelSection>\n\t\t\t\t<StylePanelGeoShapePicker />\n\t\t\t\t<StylePanelArrowKindPicker />\n\t\t\t\t<StylePanelArrowheadPicker />\n\t\t\t\t<StylePanelSplinePicker />\n\t\t\t</StylePanelSection>\n\t\t</>\n\t)\n}\n\n/** @public */\nexport interface StylePanelSectionProps {\n\tchildren: React.ReactNode\n}\n\n/** @public @react */\nexport function StylePanelSection({ children }: StylePanelSectionProps) {\n\treturn <div className=\"tlui-style-panel__section\">{children}</div>\n}\n\n/** @public @react */\nexport function StylePanelColorPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst color = styles.get(DefaultColorStyle)\n\tif (color === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.color')}\n\t\t\tuiType=\"color\"\n\t\t\tstyle={DefaultColorStyle}\n\t\t\titems={STYLES.color}\n\t\t\tvalue={color}\n\t\t/>\n\t)\n}\n\nconst tldrawSupportedOpacities = [0.1, 0.25, 0.5, 0.75, 1] as const\n/** @public @react */\nexport function StylePanelOpacityPicker() {\n\tconst editor = useEditor()\n\tconst { onHistoryMark, enhancedA11yMode } = useStylePanelContext()\n\n\tconst opacity = useValue('opacity', () => editor.getSharedOpacity(), [editor])\n\tconst trackEvent = useUiEvents()\n\tconst msg = useTranslation()\n\n\tconst handleOpacityValueChange = React.useCallback(\n\t\t(value: number) => {\n\t\t\tconst item = tldrawSupportedOpacities[value]\n\t\t\teditor.run(() => {\n\t\t\t\tif (editor.isIn('select')) {\n\t\t\t\t\teditor.setOpacityForSelectedShapes(item)\n\t\t\t\t}\n\t\t\t\teditor.setOpacityForNextShapes(item)\n\t\t\t\teditor.updateInstanceState({ isChangingStyle: true })\n\t\t\t})\n\n\t\t\ttrackEvent('set-style', { source: 'style-panel', id: 'opacity', value })\n\t\t},\n\t\t[editor, trackEvent]\n\t)\n\n\tif (opacity === undefined) return null\n\n\tconst opacityIndex =\n\t\topacity.type === 'mixed'\n\t\t\t? -1\n\t\t\t: tldrawSupportedOpacities.indexOf(\n\t\t\t\t\tminBy(tldrawSupportedOpacities, (supportedOpacity) =>\n\t\t\t\t\t\tMath.abs(supportedOpacity - opacity.value)\n\t\t\t\t\t)!\n\t\t\t\t)\n\n\treturn (\n\t\t<>\n\t\t\t{enhancedA11yMode && (\n\t\t\t\t<StylePanelSubheading>{msg('style-panel.opacity')}</StylePanelSubheading>\n\t\t\t)}\n\t\t\t<TldrawUiSlider\n\t\t\t\tdata-testid=\"style.opacity\"\n\t\t\t\tvalue={opacityIndex >= 0 ? opacityIndex : tldrawSupportedOpacities.length - 1}\n\t\t\t\tlabel={opacity.type === 'mixed' ? 'style-panel.mixed' : `opacity-style.${opacity.value}`}\n\t\t\t\tonValueChange={handleOpacityValueChange}\n\t\t\t\tsteps={tldrawSupportedOpacities.length - 1}\n\t\t\t\ttitle={msg('style-panel.opacity')}\n\t\t\t\tonHistoryMark={onHistoryMark}\n\t\t\t\tariaValueModifier={25}\n\t\t\t/>\n\t\t</>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelFillPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst fill = styles.get(DefaultFillStyle)\n\tif (fill === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.fill')}\n\t\t\tuiType=\"fill\"\n\t\t\tstyle={DefaultFillStyle}\n\t\t\titems={STYLES.fill}\n\t\t\tvalue={fill}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelDashPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst dash = styles.get(DefaultDashStyle)\n\tif (dash === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.dash')}\n\t\t\tuiType=\"dash\"\n\t\t\tstyle={DefaultDashStyle}\n\t\t\titems={STYLES.dash}\n\t\t\tvalue={dash}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelSizePicker() {\n\tconst editor = useEditor()\n\tconst { styles, onValueChange } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst size = styles.get(DefaultSizeStyle)\n\tif (size === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.size')}\n\t\t\tuiType=\"size\"\n\t\t\tstyle={DefaultSizeStyle}\n\t\t\titems={STYLES.size}\n\t\t\tvalue={size}\n\t\t\tonValueChange={(style, value) => {\n\t\t\t\tonValueChange(style, value)\n\t\t\t\tconst selectedShapeIds = editor.getSelectedShapeIds()\n\t\t\t\tif (selectedShapeIds.length > 0) {\n\t\t\t\t\tkickoutOccludedShapes(editor, selectedShapeIds)\n\t\t\t\t}\n\t\t\t}}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelFontPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst font = styles.get(DefaultFontStyle)\n\tif (font === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.font')}\n\t\t\tuiType=\"font\"\n\t\t\tstyle={DefaultFontStyle}\n\t\t\titems={STYLES.font}\n\t\t\tvalue={font}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelTextAlignPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst textAlign = styles.get(DefaultTextAlignStyle)\n\tif (textAlign === undefined) return null\n\n\treturn (\n\t\t<TldrawUiToolbar orientation=\"horizontal\" label={msg('style-panel.align')}>\n\t\t\t<StylePanelButtonPicker\n\t\t\t\ttitle={msg('style-panel.align')}\n\t\t\t\tuiType=\"align\"\n\t\t\t\tstyle={DefaultTextAlignStyle}\n\t\t\t\titems={STYLES.textAlign}\n\t\t\t\tvalue={textAlign}\n\t\t\t/>\n\t\t\t<TldrawUiToolbarButton\n\t\t\t\ttype=\"icon\"\n\t\t\t\ttitle={msg('style-panel.vertical-align')}\n\t\t\t\tdata-testid=\"vertical-align\"\n\t\t\t\tdisabled\n\t\t\t>\n\t\t\t\t<TldrawUiButtonIcon icon=\"vertical-align-middle\" />\n\t\t\t</TldrawUiToolbarButton>\n\t\t</TldrawUiToolbar>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelLabelAlignPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst labelAlign = styles.get(DefaultHorizontalAlignStyle)\n\tconst verticalLabelAlign = styles.get(DefaultVerticalAlignStyle)\n\tif (labelAlign === undefined) return null\n\n\treturn (\n\t\t<TldrawUiToolbar orientation=\"horizontal\" label={msg('style-panel.label-align')}>\n\t\t\t<StylePanelButtonPicker\n\t\t\t\ttitle={msg('style-panel.label-align')}\n\t\t\t\tuiType=\"align\"\n\t\t\t\tstyle={DefaultHorizontalAlignStyle}\n\t\t\t\titems={STYLES.horizontalAlign}\n\t\t\t\tvalue={labelAlign}\n\t\t\t/>\n\t\t\t{verticalLabelAlign === undefined ? (\n\t\t\t\t<TldrawUiToolbarButton\n\t\t\t\t\ttype=\"icon\"\n\t\t\t\t\ttitle={msg('style-panel.vertical-align')}\n\t\t\t\t\tdata-testid=\"vertical-align\"\n\t\t\t\t\tdisabled\n\t\t\t\t>\n\t\t\t\t\t<TldrawUiButtonIcon icon=\"vertical-align-middle\" />\n\t\t\t\t</TldrawUiToolbarButton>\n\t\t\t) : (\n\t\t\t\t<StylePanelDropdownPicker\n\t\t\t\t\ttype=\"icon\"\n\t\t\t\t\tid=\"geo-vertical-alignment\"\n\t\t\t\t\tuiType=\"verticalAlign\"\n\t\t\t\t\tstylePanelType=\"vertical-align\"\n\t\t\t\t\tstyle={DefaultVerticalAlignStyle}\n\t\t\t\t\titems={STYLES.verticalAlign}\n\t\t\t\t\tvalue={verticalLabelAlign}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</TldrawUiToolbar>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelGeoShapePicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst geo = styles.get(GeoShapeGeoStyle)\n\tif (geo === undefined) return null\n\n\treturn (\n\t\t<StylePanelDropdownPicker\n\t\t\tlabel=\"style-panel.geo\"\n\t\t\ttype=\"menu\"\n\t\t\tid=\"geo\"\n\t\t\tuiType=\"geo\"\n\t\t\tstylePanelType=\"geo\"\n\t\t\tstyle={GeoShapeGeoStyle}\n\t\t\titems={STYLES.geo}\n\t\t\tvalue={geo}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelArrowKindPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst arrowKind = styles.get(ArrowShapeKindStyle)\n\tif (arrowKind === undefined) return null\n\n\treturn (\n\t\t<StylePanelDropdownPicker\n\t\t\tid=\"arrow-kind\"\n\t\t\ttype=\"menu\"\n\t\t\tlabel={'style-panel.arrow-kind'}\n\t\t\tuiType=\"arrow-kind\"\n\t\t\tstylePanelType=\"arrow-kind\"\n\t\t\tstyle={ArrowShapeKindStyle}\n\t\t\titems={STYLES.arrowKind}\n\t\t\tvalue={arrowKind}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelArrowheadPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst arrowheadEnd = styles.get(ArrowShapeArrowheadEndStyle)\n\tconst arrowheadStart = styles.get(ArrowShapeArrowheadStartStyle)\n\tif (arrowheadEnd === undefined || arrowheadStart === undefined) return null\n\n\treturn (\n\t\t<StylePanelDoubleDropdownPicker<TLArrowShapeArrowheadStyle>\n\t\t\tlabel={'style-panel.arrowheads'}\n\t\t\tuiTypeA=\"arrowheadStart\"\n\t\t\tstyleA={ArrowShapeArrowheadStartStyle}\n\t\t\titemsA={STYLES.arrowheadStart}\n\t\t\tvalueA={arrowheadStart}\n\t\t\tuiTypeB=\"arrowheadEnd\"\n\t\t\tstyleB={ArrowShapeArrowheadEndStyle}\n\t\t\titemsB={STYLES.arrowheadEnd}\n\t\t\tvalueB={arrowheadEnd}\n\t\t\tlabelA=\"style-panel.arrowhead-start\"\n\t\t\tlabelB=\"style-panel.arrowhead-end\"\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelSplinePicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst spline = styles.get(LineShapeSplineStyle)\n\tif (spline === undefined) return null\n\n\treturn (\n\t\t<StylePanelDropdownPicker\n\t\t\ttype=\"menu\"\n\t\t\tid=\"spline\"\n\t\t\tuiType=\"spline\"\n\t\t\tstylePanelType=\"spline\"\n\t\t\tlabel=\"style-panel.spline\"\n\t\t\tstyle={LineShapeSplineStyle}\n\t\t\titems={STYLES.spline}\n\t\t\tvalue={spline}\n\t\t/>\n\t)\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import {\n\tArrowShapeArrowheadEndStyle,\n\tArrowShapeArrowheadStartStyle,\n\tArrowShapeKindStyle,\n\tDefaultColorStyle,\n\tDefaultDashStyle,\n\tDefaultFillStyle,\n\tDefaultFontStyle,\n\tDefaultHorizontalAlignStyle,\n\tDefaultSizeStyle,\n\tDefaultTextAlignStyle,\n\tDefaultVerticalAlignStyle,\n\tGeoShapeGeoStyle,\n\tLineShapeSplineStyle,\n\tTLArrowShapeArrowheadStyle,\n\tkickoutOccludedShapes,\n\tminBy,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport React from 'react'\nimport { STYLES } from '../../../styles'\nimport { useUiEvents } from '../../context/events'\nimport { useTranslation } from '../../hooks/useTranslation/useTranslation'\nimport { TldrawUiButtonIcon } from '../primitives/Button/TldrawUiButtonIcon'\nimport { TldrawUiSlider } from '../primitives/TldrawUiSlider'\nimport { TldrawUiToolbar, TldrawUiToolbarButton } from '../primitives/TldrawUiToolbar'\nimport { StylePanelButtonPicker, StylePanelButtonPickerInline } from './StylePanelButtonPicker'\nimport { useStylePanelContext } from './StylePanelContext'\nimport { StylePanelDoubleDropdownPicker } from './StylePanelDoubleDropdownPicker'\nimport {\n\tStylePanelDropdownPicker,\n\tStylePanelDropdownPickerInline,\n} from './StylePanelDropdownPicker'\nimport { StylePanelSubheading } from './StylePanelSubheading'\n\n/** @public @react */\nexport function DefaultStylePanelContent() {\n\treturn (\n\t\t<>\n\t\t\t<StylePanelSection>\n\t\t\t\t<StylePanelColorPicker />\n\t\t\t\t<StylePanelOpacityPicker />\n\t\t\t</StylePanelSection>\n\t\t\t<StylePanelSection>\n\t\t\t\t<StylePanelFillPicker />\n\t\t\t\t<StylePanelDashPicker />\n\t\t\t\t<StylePanelSizePicker />\n\t\t\t</StylePanelSection>\n\t\t\t<StylePanelSection>\n\t\t\t\t<StylePanelFontPicker />\n\t\t\t\t<StylePanelTextAlignPicker />\n\t\t\t\t<StylePanelLabelAlignPicker />\n\t\t\t</StylePanelSection>\n\t\t\t<StylePanelSection>\n\t\t\t\t<StylePanelGeoShapePicker />\n\t\t\t\t<StylePanelArrowKindPicker />\n\t\t\t\t<StylePanelArrowheadPicker />\n\t\t\t\t<StylePanelSplinePicker />\n\t\t\t</StylePanelSection>\n\t\t</>\n\t)\n}\n\n/** @public */\nexport interface StylePanelSectionProps {\n\tchildren: React.ReactNode\n}\n\n/** @public @react */\nexport function StylePanelSection({ children }: StylePanelSectionProps) {\n\treturn <div className=\"tlui-style-panel__section\">{children}</div>\n}\n\n/** @public @react */\nexport function StylePanelColorPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst color = styles.get(DefaultColorStyle)\n\tif (color === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.color')}\n\t\t\tuiType=\"color\"\n\t\t\tstyle={DefaultColorStyle}\n\t\t\titems={STYLES.color}\n\t\t\tvalue={color}\n\t\t/>\n\t)\n}\n\nconst tldrawSupportedOpacities = [0.1, 0.25, 0.5, 0.75, 1] as const\n/** @public @react */\nexport function StylePanelOpacityPicker() {\n\tconst editor = useEditor()\n\tconst { onHistoryMark, enhancedA11yMode } = useStylePanelContext()\n\n\tconst opacity = useValue('opacity', () => editor.getSharedOpacity(), [editor])\n\tconst trackEvent = useUiEvents()\n\tconst msg = useTranslation()\n\n\tconst handleOpacityValueChange = React.useCallback(\n\t\t(value: number) => {\n\t\t\tconst item = tldrawSupportedOpacities[value]\n\t\t\teditor.run(() => {\n\t\t\t\tif (editor.isIn('select')) {\n\t\t\t\t\teditor.setOpacityForSelectedShapes(item)\n\t\t\t\t}\n\t\t\t\teditor.setOpacityForNextShapes(item)\n\t\t\t\teditor.updateInstanceState({ isChangingStyle: true })\n\t\t\t})\n\n\t\t\ttrackEvent('set-style', { source: 'style-panel', id: 'opacity', value })\n\t\t},\n\t\t[editor, trackEvent]\n\t)\n\n\tif (opacity === undefined) return null\n\n\tconst opacityIndex =\n\t\topacity.type === 'mixed'\n\t\t\t? -1\n\t\t\t: tldrawSupportedOpacities.indexOf(\n\t\t\t\t\tminBy(tldrawSupportedOpacities, (supportedOpacity) =>\n\t\t\t\t\t\tMath.abs(supportedOpacity - opacity.value)\n\t\t\t\t\t)!\n\t\t\t\t)\n\n\treturn (\n\t\t<>\n\t\t\t{enhancedA11yMode && (\n\t\t\t\t<StylePanelSubheading>{msg('style-panel.opacity')}</StylePanelSubheading>\n\t\t\t)}\n\t\t\t<TldrawUiSlider\n\t\t\t\tdata-testid=\"style.opacity\"\n\t\t\t\tvalue={opacityIndex >= 0 ? opacityIndex : tldrawSupportedOpacities.length - 1}\n\t\t\t\tlabel={opacity.type === 'mixed' ? 'style-panel.mixed' : `opacity-style.${opacity.value}`}\n\t\t\t\tonValueChange={handleOpacityValueChange}\n\t\t\t\tsteps={tldrawSupportedOpacities.length - 1}\n\t\t\t\ttitle={msg('style-panel.opacity')}\n\t\t\t\tonHistoryMark={onHistoryMark}\n\t\t\t\tariaValueModifier={25}\n\t\t\t/>\n\t\t</>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelFillPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst fill = styles.get(DefaultFillStyle)\n\tif (fill === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.fill')}\n\t\t\tuiType=\"fill\"\n\t\t\tstyle={DefaultFillStyle}\n\t\t\titems={STYLES.fill}\n\t\t\tvalue={fill}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelDashPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst dash = styles.get(DefaultDashStyle)\n\tif (dash === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.dash')}\n\t\t\tuiType=\"dash\"\n\t\t\tstyle={DefaultDashStyle}\n\t\t\titems={STYLES.dash}\n\t\t\tvalue={dash}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelSizePicker() {\n\tconst editor = useEditor()\n\tconst { styles, onValueChange } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst size = styles.get(DefaultSizeStyle)\n\tif (size === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.size')}\n\t\t\tuiType=\"size\"\n\t\t\tstyle={DefaultSizeStyle}\n\t\t\titems={STYLES.size}\n\t\t\tvalue={size}\n\t\t\tonValueChange={(style, value) => {\n\t\t\t\tonValueChange(style, value)\n\t\t\t\tconst selectedShapeIds = editor.getSelectedShapeIds()\n\t\t\t\tif (selectedShapeIds.length > 0) {\n\t\t\t\t\tkickoutOccludedShapes(editor, selectedShapeIds)\n\t\t\t\t}\n\t\t\t}}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelFontPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst font = styles.get(DefaultFontStyle)\n\tif (font === undefined) return null\n\n\treturn (\n\t\t<StylePanelButtonPicker\n\t\t\ttitle={msg('style-panel.font')}\n\t\t\tuiType=\"font\"\n\t\t\tstyle={DefaultFontStyle}\n\t\t\titems={STYLES.font}\n\t\t\tvalue={font}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelTextAlignPicker() {\n\tconst { styles, enhancedA11yMode } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst textAlign = styles.get(DefaultTextAlignStyle)\n\tif (textAlign === undefined) return null\n\tconst title = msg('style-panel.align')\n\n\treturn (\n\t\t<>\n\t\t\t{enhancedA11yMode && <StylePanelSubheading>{title}</StylePanelSubheading>}\n\t\t\t<TldrawUiToolbar orientation=\"horizontal\" label={title}>\n\t\t\t\t<StylePanelButtonPickerInline\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tuiType=\"align\"\n\t\t\t\t\tstyle={DefaultTextAlignStyle}\n\t\t\t\t\titems={STYLES.textAlign}\n\t\t\t\t\tvalue={textAlign}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiToolbarButton\n\t\t\t\t\ttype=\"icon\"\n\t\t\t\t\ttitle={msg('style-panel.vertical-align')}\n\t\t\t\t\tdata-testid=\"vertical-align\"\n\t\t\t\t\tdisabled\n\t\t\t\t>\n\t\t\t\t\t<TldrawUiButtonIcon icon=\"vertical-align-middle\" />\n\t\t\t\t</TldrawUiToolbarButton>\n\t\t\t</TldrawUiToolbar>\n\t\t</>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelLabelAlignPicker() {\n\tconst { styles, enhancedA11yMode } = useStylePanelContext()\n\tconst msg = useTranslation()\n\tconst labelAlign = styles.get(DefaultHorizontalAlignStyle)\n\tconst verticalLabelAlign = styles.get(DefaultVerticalAlignStyle)\n\tif (labelAlign === undefined) return null\n\tconst title = msg('style-panel.label-align')\n\n\treturn (\n\t\t<>\n\t\t\t{enhancedA11yMode && <StylePanelSubheading>{title}</StylePanelSubheading>}\n\t\t\t<TldrawUiToolbar orientation=\"horizontal\" label={title}>\n\t\t\t\t<StylePanelButtonPickerInline\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tuiType=\"align\"\n\t\t\t\t\tstyle={DefaultHorizontalAlignStyle}\n\t\t\t\t\titems={STYLES.horizontalAlign}\n\t\t\t\t\tvalue={labelAlign}\n\t\t\t\t/>\n\t\t\t\t{verticalLabelAlign === undefined ? (\n\t\t\t\t\t<TldrawUiToolbarButton\n\t\t\t\t\t\ttype=\"icon\"\n\t\t\t\t\t\ttitle={msg('style-panel.vertical-align')}\n\t\t\t\t\t\tdata-testid=\"vertical-align\"\n\t\t\t\t\t\tdisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t<TldrawUiButtonIcon icon=\"vertical-align-middle\" />\n\t\t\t\t\t</TldrawUiToolbarButton>\n\t\t\t\t) : (\n\t\t\t\t\t<StylePanelDropdownPickerInline\n\t\t\t\t\t\ttype=\"icon\"\n\t\t\t\t\t\tid=\"geo-vertical-alignment\"\n\t\t\t\t\t\tuiType=\"verticalAlign\"\n\t\t\t\t\t\tstylePanelType=\"vertical-align\"\n\t\t\t\t\t\tstyle={DefaultVerticalAlignStyle}\n\t\t\t\t\t\titems={STYLES.verticalAlign}\n\t\t\t\t\t\tvalue={verticalLabelAlign}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</TldrawUiToolbar>\n\t\t</>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelGeoShapePicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst geo = styles.get(GeoShapeGeoStyle)\n\tif (geo === undefined) return null\n\n\treturn (\n\t\t<StylePanelDropdownPicker\n\t\t\tlabel=\"style-panel.geo\"\n\t\t\ttype=\"menu\"\n\t\t\tid=\"geo\"\n\t\t\tuiType=\"geo\"\n\t\t\tstylePanelType=\"geo\"\n\t\t\tstyle={GeoShapeGeoStyle}\n\t\t\titems={STYLES.geo}\n\t\t\tvalue={geo}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelArrowKindPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst arrowKind = styles.get(ArrowShapeKindStyle)\n\tif (arrowKind === undefined) return null\n\n\treturn (\n\t\t<StylePanelDropdownPicker\n\t\t\tid=\"arrow-kind\"\n\t\t\ttype=\"menu\"\n\t\t\tlabel={'style-panel.arrow-kind'}\n\t\t\tuiType=\"arrow-kind\"\n\t\t\tstylePanelType=\"arrow-kind\"\n\t\t\tstyle={ArrowShapeKindStyle}\n\t\t\titems={STYLES.arrowKind}\n\t\t\tvalue={arrowKind}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelArrowheadPicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst arrowheadEnd = styles.get(ArrowShapeArrowheadEndStyle)\n\tconst arrowheadStart = styles.get(ArrowShapeArrowheadStartStyle)\n\tif (arrowheadEnd === undefined || arrowheadStart === undefined) return null\n\n\treturn (\n\t\t<StylePanelDoubleDropdownPicker<TLArrowShapeArrowheadStyle>\n\t\t\tlabel={'style-panel.arrowheads'}\n\t\t\tuiTypeA=\"arrowheadStart\"\n\t\t\tstyleA={ArrowShapeArrowheadStartStyle}\n\t\t\titemsA={STYLES.arrowheadStart}\n\t\t\tvalueA={arrowheadStart}\n\t\t\tuiTypeB=\"arrowheadEnd\"\n\t\t\tstyleB={ArrowShapeArrowheadEndStyle}\n\t\t\titemsB={STYLES.arrowheadEnd}\n\t\t\tvalueB={arrowheadEnd}\n\t\t\tlabelA=\"style-panel.arrowhead-start\"\n\t\t\tlabelB=\"style-panel.arrowhead-end\"\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function StylePanelSplinePicker() {\n\tconst { styles } = useStylePanelContext()\n\tconst spline = styles.get(LineShapeSplineStyle)\n\tif (spline === undefined) return null\n\n\treturn (\n\t\t<StylePanelDropdownPicker\n\t\t\ttype=\"menu\"\n\t\t\tid=\"spline\"\n\t\t\tuiType=\"spline\"\n\t\t\tstylePanelType=\"spline\"\n\t\t\tlabel=\"style-panel.spline\"\n\t\t\tstyle={LineShapeSplineStyle}\n\t\t\titems={STYLES.spline}\n\t\t\tvalue={spline}\n\t\t/>\n\t)\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCE;AAvCF,oBAmBO;AACP,mBAAkB;AAClB,oBAAuB;AACvB,oBAA4B;AAC5B,4BAA+B;AAC/B,gCAAmC;AACnC,4BAA+B;AAC/B,6BAAuD;AACvD,oCAAqE;AACrE,+BAAqC;AACrC,4CAA+C;AAC/C,sCAGO;AACP,kCAAqC;AAG9B,SAAS,2BAA2B;AAC1C,SACC,4EACC;AAAA,iDAAC,qBACA;AAAA,kDAAC,yBAAsB;AAAA,MACvB,4CAAC,2BAAwB;AAAA,OAC1B;AAAA,IACA,6CAAC,qBACA;AAAA,kDAAC,wBAAqB;AAAA,MACtB,4CAAC,wBAAqB;AAAA,MACtB,4CAAC,wBAAqB;AAAA,OACvB;AAAA,IACA,6CAAC,qBACA;AAAA,kDAAC,wBAAqB;AAAA,MACtB,4CAAC,6BAA0B;AAAA,MAC3B,4CAAC,8BAA2B;AAAA,OAC7B;AAAA,IACA,6CAAC,qBACA;AAAA,kDAAC,4BAAyB;AAAA,MAC1B,4CAAC,6BAA0B;AAAA,MAC3B,4CAAC,6BAA0B;AAAA,MA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+18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var StylePanelButtonPicker_exports = {};
|
|
20
20
|
__export(StylePanelButtonPicker_exports, {
|
|
21
|
-
StylePanelButtonPicker: () => StylePanelButtonPicker
|
|
21
|
+
StylePanelButtonPicker: () => StylePanelButtonPicker,
|
|
22
|
+
StylePanelButtonPickerInline: () => StylePanelButtonPickerInline
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(StylePanelButtonPicker_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -33,7 +34,14 @@ var import_TldrawUiToolbar = require("../primitives/TldrawUiToolbar");
|
|
|
33
34
|
var import_layout = require("../primitives/layout");
|
|
34
35
|
var import_StylePanelContext = require("./StylePanelContext");
|
|
35
36
|
var import_StylePanelSubheading = require("./StylePanelSubheading");
|
|
36
|
-
|
|
37
|
+
function StylePanelButtonPickerInner(props) {
|
|
38
|
+
const { enhancedA11yMode } = (0, import_StylePanelContext.useStylePanelContext)();
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
40
|
+
enhancedA11yMode && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StylePanelSubheading.StylePanelSubheading, { children: props.title }),
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiToolbar.TldrawUiToolbar, { label: props.title, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StylePanelButtonPickerInline, { ...props }) })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
function StylePanelButtonPickerInlineInner(props) {
|
|
37
45
|
const ctx = (0, import_StylePanelContext.useStylePanelContext)();
|
|
38
46
|
const {
|
|
39
47
|
uiType,
|
|
@@ -99,49 +107,48 @@ const StylePanelButtonPicker = (0, import_react.memo)(function StylePanelButtonP
|
|
|
99
107
|
};
|
|
100
108
|
}, [editor, breakpoint, value, onHistoryMark, onValueChange, style]);
|
|
101
109
|
const Layout = items.length > 4 ? import_layout.TldrawUiGrid : import_layout.TldrawUiRow;
|
|
102
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
111
|
+
import_TldrawUiToolbar.TldrawUiToolbarToggleGroup,
|
|
112
|
+
{
|
|
113
|
+
"data-testid": `style.${uiType}`,
|
|
114
|
+
type: "single",
|
|
115
|
+
value: value.type === "shared" ? value.value : null,
|
|
116
|
+
asChild: true,
|
|
117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Layout, { children: items.map((item) => {
|
|
118
|
+
const isActive = value.type === "shared" && value.value === item.value;
|
|
119
|
+
const label = title + " \u2014 " + msg(`${uiType}-style.${item.value}`);
|
|
120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
|
+
import_TldrawUiToolbar.TldrawUiToolbarToggleItem,
|
|
122
|
+
{
|
|
123
|
+
type: "icon",
|
|
124
|
+
"data-id": item.value,
|
|
125
|
+
"data-testid": `style.${uiType}.${item.value}`,
|
|
126
|
+
"aria-label": label + (isActive ? ` (${msg("style-panel.selected")})` : ""),
|
|
127
|
+
tooltip: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: label }),
|
|
129
|
+
isActive ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
130
|
+
"(",
|
|
131
|
+
msg("style-panel.selected"),
|
|
132
|
+
")"
|
|
133
|
+
] }) : null
|
|
134
|
+
] }),
|
|
135
|
+
value: item.value,
|
|
136
|
+
"data-state": value.type === "shared" && value.value === item.value ? "on" : "off",
|
|
137
|
+
"data-isactive": isActive,
|
|
138
|
+
title: label,
|
|
139
|
+
style: style === import_editor.DefaultColorStyle ? { color: (0, import_editor.getColorValue)(theme, item.value, "solid") } : void 0,
|
|
140
|
+
onPointerEnter: handleButtonPointerEnter,
|
|
141
|
+
onPointerDown: handleButtonPointerDown,
|
|
142
|
+
onPointerUp: handleButtonPointerUp,
|
|
143
|
+
onClick: handleButtonClick,
|
|
144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiButtonIcon.TldrawUiButtonIcon, { icon: item.icon })
|
|
145
|
+
},
|
|
146
|
+
item.value
|
|
147
|
+
);
|
|
148
|
+
}) })
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
const StylePanelButtonPicker = (0, import_react.memo)(StylePanelButtonPickerInner);
|
|
153
|
+
const StylePanelButtonPickerInline = (0, import_react.memo)(StylePanelButtonPickerInlineInner);
|
|
147
154
|
//# sourceMappingURL=StylePanelButtonPicker.js.map
|