tldraw 4.1.0-canary.9c36de6e611c → 4.1.0-canary.a152954244d2
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 +46 -12
- package/dist-cjs/index.js +6 -1
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/canvas/TldrawCropHandles.js +1 -1
- package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
- package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +1 -1
- package/dist-cjs/lib/defaultEmbedDefinitions.js +25 -30
- package/dist-cjs/lib/defaultEmbedDefinitions.js.map +2 -2
- package/dist-cjs/lib/defaultExternalContentHandlers.js +10 -33
- package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +3 -0
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/curved-arrow.js +8 -2
- package/dist-cjs/lib/shapes/arrow/curved-arrow.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/straight-arrow.js +4 -1
- package/dist-cjs/lib/shapes/arrow/straight-arrow.js.map +2 -2
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +44 -102
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/bookmark/bookmarks.js +138 -0
- package/dist-cjs/lib/shapes/bookmark/bookmarks.js.map +7 -0
- package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +25 -3
- package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +1 -1
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +1 -1
- package/dist-cjs/lib/shapes/line/LineShapeUtil.js +3 -0
- package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +1 -1
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +1 -1
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js +2 -2
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/ShapeFill.js +1 -1
- package/dist-cjs/lib/shapes/text/PlainTextArea.js +1 -1
- package/dist-cjs/lib/shapes/text/RichTextArea.js +1 -1
- package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js +20 -4
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js +23 -11
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +27 -6
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js +21 -9
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js +24 -8
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js +21 -9
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +23 -8
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +21 -9
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +26 -11
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
- package/dist-cjs/lib/ui/TldrawUi.js +2 -2
- package/dist-cjs/lib/ui/components/DebugMenu/DefaultDebugMenuContent.js +3 -3
- package/dist-cjs/lib/ui/components/DebugMenu/DefaultDebugMenuContent.js.map +1 -1
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog.js +1 -1
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +1 -1
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +1 -1
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +1 -1
- package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +5 -0
- package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
- package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js +1 -1
- package/dist-cjs/lib/ui/components/SharePanel/PeopleMenu.js +6 -2
- package/dist-cjs/lib/ui/components/SharePanel/PeopleMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +1 -1
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +1 -1
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +64 -56
- 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 +63 -56
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js +13 -6
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +1 -1
- package/dist-cjs/lib/ui/components/menu-items.js +2 -2
- package/dist-cjs/lib/ui/components/menu-items.js.map +1 -1
- package/dist-cjs/lib/ui/components/primitives/Button/TldrawUiButton.js +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiDropdownMenu.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/layout.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +1 -1
- package/dist-cjs/lib/ui/context/actions.js +44 -30
- package/dist-cjs/lib/ui/context/actions.js.map +2 -2
- package/dist-cjs/lib/ui/context/breakpoints.js +1 -1
- package/dist-cjs/lib/ui/context/events.js +1 -1
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +1 -1
- package/dist-cjs/lib/ui/hooks/useEditorEvents.js +1 -1
- package/dist-cjs/lib/ui/hooks/useEditorEvents.js.map +1 -1
- package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +1 -1
- package/dist-cjs/lib/ui/hooks/useLocalStorageState.js +1 -1
- package/dist-cjs/lib/ui/hooks/useTools.js +1 -1
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +4 -4
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +1 -1
- package/dist-cjs/lib/ui/hooks/useTranslation/useTranslation.js +1 -1
- package/dist-cjs/lib/ui/version.js +3 -3
- package/dist-cjs/lib/ui/version.js.map +1 -1
- package/dist-cjs/lib/utils/text/richText.js +4 -4
- package/dist-esm/index.d.mts +46 -12
- package/dist-esm/index.mjs +12 -4
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/defaultEmbedDefinitions.mjs +25 -30
- package/dist-esm/lib/defaultEmbedDefinitions.mjs.map +2 -2
- package/dist-esm/lib/defaultExternalContentHandlers.mjs +10 -33
- package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +3 -0
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/curved-arrow.mjs +8 -2
- package/dist-esm/lib/shapes/arrow/curved-arrow.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/straight-arrow.mjs +4 -1
- package/dist-esm/lib/shapes/arrow/straight-arrow.mjs.map +2 -2
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +46 -101
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/bookmark/bookmarks.mjs +124 -0
- package/dist-esm/lib/shapes/bookmark/bookmarks.mjs.map +7 -0
- package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +26 -3
- package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +3 -0
- package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +1 -1
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs +20 -4
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs +23 -11
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +29 -7
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs +21 -9
- package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs +24 -8
- package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs +21 -9
- package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +23 -8
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +21 -9
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +26 -11
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
- package/dist-esm/lib/ui/components/DebugMenu/DefaultDebugMenuContent.mjs +2 -2
- package/dist-esm/lib/ui/components/DebugMenu/DefaultDebugMenuContent.mjs.map +1 -1
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +1 -1
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +1 -1
- package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +5 -0
- package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
- package/dist-esm/lib/ui/components/SharePanel/PeopleMenu.mjs +6 -2
- package/dist-esm/lib/ui/components/SharePanel/PeopleMenu.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/components/menu-items.mjs +2 -2
- package/dist-esm/lib/ui/components/menu-items.mjs.map +1 -1
- package/dist-esm/lib/ui/context/actions.mjs +43 -29
- package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useEditorEvents.mjs +1 -1
- package/dist-esm/lib/ui/hooks/useEditorEvents.mjs.map +1 -1
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +4 -4
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +1 -1
- package/dist-esm/lib/ui/version.mjs +3 -3
- package/dist-esm/lib/ui/version.mjs.map +1 -1
- package/package.json +11 -11
- package/src/index.ts +4 -0
- package/src/lib/defaultEmbedDefinitions.ts +20 -24
- package/src/lib/defaultExternalContentHandlers.ts +12 -37
- package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +211 -1
- package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +3 -0
- package/src/lib/shapes/arrow/curved-arrow.ts +8 -2
- package/src/lib/shapes/arrow/straight-arrow.ts +5 -1
- package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +51 -135
- package/src/lib/shapes/bookmark/bookmarks.ts +170 -0
- package/src/lib/shapes/embed/EmbedShapeUtil.tsx +28 -2
- package/src/lib/shapes/line/LineShapeUtil.tsx +3 -0
- package/src/lib/shapes/shared/RichTextLabel.tsx +1 -1
- package/src/lib/shapes/text/TextShapeTool.test.ts +74 -0
- package/src/lib/tools/SelectTool/childStates/Crop/children/Cropping.ts +23 -6
- package/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.ts +24 -12
- package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +34 -11
- package/src/lib/tools/SelectTool/childStates/Idle.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts +23 -11
- package/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +26 -9
- package/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts +23 -10
- package/src/lib/tools/SelectTool/childStates/Resizing.ts +24 -9
- package/src/lib/tools/SelectTool/childStates/Rotating.ts +27 -11
- package/src/lib/tools/SelectTool/childStates/Translating.ts +28 -12
- package/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx +2 -2
- package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +1 -1
- package/src/lib/ui/components/Minimap/MinimapManager.ts +6 -0
- package/src/lib/ui/components/SharePanel/PeopleMenu.tsx +6 -2
- 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/components/menu-items.tsx +2 -2
- package/src/lib/ui/context/actions.tsx +49 -31
- package/src/lib/ui/hooks/useEditorEvents.ts +1 -1
- package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +4 -4
- package/src/lib/ui/version.ts +3 -3
- package/src/lib/utils/embeds/embeds.test.ts +16 -34
- package/src/test/SelectTool.test.ts +251 -0
- package/src/test/bookmark-shapes.test.ts +129 -7
- package/src/test/customSnapping.test.tsx +55 -11
- package/tldraw.css +7 -2
|
@@ -29,12 +29,27 @@ export interface StylePanelDoubleDropdownPickerProps<T extends string> {
|
|
|
29
29
|
onValueChange?(style: StyleProp<T>, value: T): void
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function
|
|
32
|
+
function StylePanelDoubleDropdownPickerInner<T extends string>(
|
|
33
|
+
props: StylePanelDoubleDropdownPickerProps<T>
|
|
34
|
+
) {
|
|
35
|
+
const msg = useTranslation()
|
|
36
|
+
return (
|
|
37
|
+
<div className="tlui-style-panel__double-select-picker">
|
|
38
|
+
<div title={msg(props.label)} className="tlui-style-panel__double-select-picker-label">
|
|
39
|
+
{msg(props.label)}
|
|
40
|
+
</div>
|
|
41
|
+
<TldrawUiToolbar orientation="horizontal" label={msg(props.label)}>
|
|
42
|
+
<StylePanelDoubleDropdownPickerInline {...props} />
|
|
43
|
+
</TldrawUiToolbar>
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function StylePanelDoubleDropdownPickerInlineInner<T extends string>(
|
|
33
49
|
props: StylePanelDoubleDropdownPickerProps<T>
|
|
34
50
|
) {
|
|
35
51
|
const ctx = useStylePanelContext()
|
|
36
52
|
const {
|
|
37
|
-
label,
|
|
38
53
|
uiTypeA,
|
|
39
54
|
uiTypeB,
|
|
40
55
|
labelA,
|
|
@@ -70,100 +85,100 @@ function DoubleDropdownPickerInner<T extends string>(
|
|
|
70
85
|
const idA = `style panel ${uiTypeA} A`
|
|
71
86
|
const idB = `style panel ${uiTypeB} B`
|
|
72
87
|
return (
|
|
73
|
-
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
msg(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
msg(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
</TldrawUiToolbar>
|
|
156
|
-
</TldrawUiPopoverContent>
|
|
157
|
-
</TldrawUiPopover>
|
|
158
|
-
</TldrawUiToolbar>
|
|
159
|
-
</div>
|
|
88
|
+
<>
|
|
89
|
+
<TldrawUiPopover id={idA} open={isOpenA} onOpenChange={setIsOpenA}>
|
|
90
|
+
<TldrawUiPopoverTrigger>
|
|
91
|
+
<TldrawUiToolbarButton
|
|
92
|
+
type="icon"
|
|
93
|
+
data-testid={`style.${uiTypeA}`}
|
|
94
|
+
title={
|
|
95
|
+
msg(labelA) +
|
|
96
|
+
' — ' +
|
|
97
|
+
(valueA === null || valueA.type === 'mixed'
|
|
98
|
+
? msg('style-panel.mixed')
|
|
99
|
+
: msg(`${uiTypeA}-style.${valueA.value}` as TLUiTranslationKey))
|
|
100
|
+
}
|
|
101
|
+
>
|
|
102
|
+
<TldrawUiButtonIcon icon={iconA} small invertIcon />
|
|
103
|
+
</TldrawUiToolbarButton>
|
|
104
|
+
</TldrawUiPopoverTrigger>
|
|
105
|
+
<TldrawUiPopoverContent side="left" align="center" sideOffset={80} alignOffset={0}>
|
|
106
|
+
<TldrawUiToolbar orientation="grid" label={msg(labelA)}>
|
|
107
|
+
<TldrawUiMenuContextProvider type="icons" sourceId="style-panel">
|
|
108
|
+
{itemsA.map((item) => {
|
|
109
|
+
return (
|
|
110
|
+
<TldrawUiToolbarButton
|
|
111
|
+
data-testid={`style.${uiTypeA}.${item.value}`}
|
|
112
|
+
type="icon"
|
|
113
|
+
key={item.value}
|
|
114
|
+
onClick={() => {
|
|
115
|
+
onValueChange(styleA, item.value)
|
|
116
|
+
tlmenus.deleteOpenMenu(idA, editor.contextId)
|
|
117
|
+
setIsOpenA(false)
|
|
118
|
+
}}
|
|
119
|
+
title={`${msg(labelA)} — ${msg(`${uiTypeA}-style.${item.value}`)}`}
|
|
120
|
+
>
|
|
121
|
+
<TldrawUiButtonIcon icon={item.icon} invertIcon />
|
|
122
|
+
</TldrawUiToolbarButton>
|
|
123
|
+
)
|
|
124
|
+
})}
|
|
125
|
+
</TldrawUiMenuContextProvider>
|
|
126
|
+
</TldrawUiToolbar>
|
|
127
|
+
</TldrawUiPopoverContent>
|
|
128
|
+
</TldrawUiPopover>
|
|
129
|
+
<TldrawUiPopover id={idB} open={isOpenB} onOpenChange={setIsOpenB}>
|
|
130
|
+
<TldrawUiPopoverTrigger>
|
|
131
|
+
<TldrawUiToolbarButton
|
|
132
|
+
type="icon"
|
|
133
|
+
data-testid={`style.${uiTypeB}`}
|
|
134
|
+
title={
|
|
135
|
+
msg(labelB) +
|
|
136
|
+
' — ' +
|
|
137
|
+
(valueB === null || valueB.type === 'mixed'
|
|
138
|
+
? msg('style-panel.mixed')
|
|
139
|
+
: msg(`${uiTypeB}-style.${valueB.value}` as TLUiTranslationKey))
|
|
140
|
+
}
|
|
141
|
+
>
|
|
142
|
+
<TldrawUiButtonIcon icon={iconB} small />
|
|
143
|
+
</TldrawUiToolbarButton>
|
|
144
|
+
</TldrawUiPopoverTrigger>
|
|
145
|
+
<TldrawUiPopoverContent side="left" align="center" sideOffset={116} alignOffset={0}>
|
|
146
|
+
<TldrawUiToolbar orientation="grid" label={msg(labelB)}>
|
|
147
|
+
<TldrawUiMenuContextProvider type="icons" sourceId="style-panel">
|
|
148
|
+
{itemsB.map((item) => {
|
|
149
|
+
return (
|
|
150
|
+
<TldrawUiToolbarButton
|
|
151
|
+
key={item.value}
|
|
152
|
+
type="icon"
|
|
153
|
+
title={`${msg(labelB)} — ${msg(`${uiTypeB}-style.${item.value}` as TLUiTranslationKey)}`}
|
|
154
|
+
data-testid={`style.${uiTypeB}.${item.value}`}
|
|
155
|
+
onClick={() => {
|
|
156
|
+
onValueChange(styleB, item.value)
|
|
157
|
+
tlmenus.deleteOpenMenu(idB, editor.contextId)
|
|
158
|
+
setIsOpenB(false)
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
161
|
+
<TldrawUiButtonIcon icon={item.icon} />
|
|
162
|
+
</TldrawUiToolbarButton>
|
|
163
|
+
)
|
|
164
|
+
})}
|
|
165
|
+
</TldrawUiMenuContextProvider>
|
|
166
|
+
</TldrawUiToolbar>
|
|
167
|
+
</TldrawUiPopoverContent>
|
|
168
|
+
</TldrawUiPopover>
|
|
169
|
+
</>
|
|
160
170
|
)
|
|
161
171
|
}
|
|
162
172
|
|
|
163
173
|
// need to memo like this to get generics
|
|
164
174
|
/** @public @react */
|
|
165
|
-
export const StylePanelDoubleDropdownPicker = React.memo(
|
|
175
|
+
export const StylePanelDoubleDropdownPicker = React.memo(StylePanelDoubleDropdownPickerInner) as <
|
|
166
176
|
T extends string,
|
|
167
177
|
>(
|
|
168
178
|
props: StylePanelDoubleDropdownPickerProps<T>
|
|
169
179
|
) => React.JSX.Element
|
|
180
|
+
|
|
181
|
+
/** @public @react */
|
|
182
|
+
export const StylePanelDoubleDropdownPickerInline = React.memo(
|
|
183
|
+
StylePanelDoubleDropdownPickerInlineInner
|
|
184
|
+
) as <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React.JSX.Element
|
|
@@ -28,7 +28,21 @@ export interface StylePanelDropdownPickerProps<T extends string> {
|
|
|
28
28
|
onValueChange?(style: StyleProp<T>, value: T): void
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function
|
|
31
|
+
function StylePanelDropdownPickerInner<T extends string>(props: StylePanelDropdownPickerProps<T>) {
|
|
32
|
+
const msg = useTranslation()
|
|
33
|
+
const toolbarLabel = props.label
|
|
34
|
+
? msg(props.label)
|
|
35
|
+
: msg(`style-panel.${props.stylePanelType}` as TLUiTranslationKey)
|
|
36
|
+
return (
|
|
37
|
+
<TldrawUiToolbar label={toolbarLabel}>
|
|
38
|
+
<StylePanelDropdownPickerInline {...props} />
|
|
39
|
+
</TldrawUiToolbar>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function StylePanelDropdownPickerInlineInner<T extends string>(
|
|
44
|
+
props: StylePanelDropdownPickerProps<T>
|
|
45
|
+
) {
|
|
32
46
|
const ctx = useStylePanelContext()
|
|
33
47
|
const {
|
|
34
48
|
id,
|
|
@@ -60,60 +74,67 @@ function DropdownPickerInner<T extends string>(props: StylePanelDropdownPickerPr
|
|
|
60
74
|
|
|
61
75
|
const popoverId = `style panel ${id}`
|
|
62
76
|
return (
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
>
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
</TldrawUiPopover>
|
|
111
|
-
</TldrawUiToolbar>
|
|
77
|
+
<TldrawUiPopover
|
|
78
|
+
id={popoverId}
|
|
79
|
+
open={isOpen}
|
|
80
|
+
onOpenChange={setIsOpen}
|
|
81
|
+
className="tlui-style-panel__dropdown-picker"
|
|
82
|
+
>
|
|
83
|
+
<TldrawUiPopoverTrigger>
|
|
84
|
+
<TldrawUiToolbarButton
|
|
85
|
+
type={type}
|
|
86
|
+
data-testid={`style.${uiType}`}
|
|
87
|
+
data-direction="left"
|
|
88
|
+
title={titleStr}
|
|
89
|
+
>
|
|
90
|
+
{labelStr && <TldrawUiButtonLabel>{labelStr}</TldrawUiButtonLabel>}
|
|
91
|
+
<TldrawUiButtonIcon icon={(icon as TLUiIconType) ?? 'mixed'} />
|
|
92
|
+
</TldrawUiToolbarButton>
|
|
93
|
+
</TldrawUiPopoverTrigger>
|
|
94
|
+
<TldrawUiPopoverContent side="left" align="center">
|
|
95
|
+
<TldrawUiToolbar orientation={items.length > 4 ? 'grid' : 'horizontal'} label={labelStr}>
|
|
96
|
+
<TldrawUiMenuContextProvider type="icons" sourceId="style-panel">
|
|
97
|
+
{items.map((item) => {
|
|
98
|
+
return (
|
|
99
|
+
<TldrawUiToolbarButton
|
|
100
|
+
key={item.value}
|
|
101
|
+
type="icon"
|
|
102
|
+
data-testid={`style.${uiType}.${item.value}`}
|
|
103
|
+
title={
|
|
104
|
+
stylePanelName +
|
|
105
|
+
' — ' +
|
|
106
|
+
msg(`${uiType}-style.${item.value}` as TLUiTranslationKey)
|
|
107
|
+
}
|
|
108
|
+
isActive={icon === item.icon}
|
|
109
|
+
onClick={() => {
|
|
110
|
+
ctx.onHistoryMark('select style dropdown item')
|
|
111
|
+
onValueChange(style, item.value)
|
|
112
|
+
tlmenus.deleteOpenMenu(popoverId, editor.contextId)
|
|
113
|
+
setIsOpen(false)
|
|
114
|
+
}}
|
|
115
|
+
>
|
|
116
|
+
<TldrawUiButtonIcon icon={item.icon} />
|
|
117
|
+
</TldrawUiToolbarButton>
|
|
118
|
+
)
|
|
119
|
+
})}
|
|
120
|
+
</TldrawUiMenuContextProvider>
|
|
121
|
+
</TldrawUiToolbar>
|
|
122
|
+
</TldrawUiPopoverContent>
|
|
123
|
+
</TldrawUiPopover>
|
|
112
124
|
)
|
|
113
125
|
}
|
|
114
126
|
|
|
115
127
|
// need to export like this to get generics
|
|
116
128
|
/** @public @react */
|
|
117
|
-
export const StylePanelDropdownPicker = React.memo(
|
|
129
|
+
export const StylePanelDropdownPicker = React.memo(StylePanelDropdownPickerInner) as <
|
|
130
|
+
T extends string,
|
|
131
|
+
>(
|
|
132
|
+
props: StylePanelDropdownPickerProps<T>
|
|
133
|
+
) => React.JSX.Element
|
|
134
|
+
|
|
135
|
+
/** @public @react */
|
|
136
|
+
export const StylePanelDropdownPickerInline = React.memo(StylePanelDropdownPickerInlineInner) as <
|
|
137
|
+
T extends string,
|
|
138
|
+
>(
|
|
118
139
|
props: StylePanelDropdownPickerProps<T>
|
|
119
140
|
) => React.JSX.Element
|
|
@@ -482,11 +482,11 @@ export function MoveToPageMenu() {
|
|
|
482
482
|
|
|
483
483
|
if (toPage) {
|
|
484
484
|
addToast({
|
|
485
|
-
title: 'Changed
|
|
485
|
+
title: 'Changed page',
|
|
486
486
|
description: `Moved to ${toPage.name}.`,
|
|
487
487
|
actions: [
|
|
488
488
|
{
|
|
489
|
-
label: 'Go
|
|
489
|
+
label: 'Go back',
|
|
490
490
|
type: 'primary',
|
|
491
491
|
onClick: () => {
|
|
492
492
|
editor.markHistoryStoppingPoint('change-page')
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
Editor,
|
|
6
6
|
HALF_PI,
|
|
7
7
|
PageRecordType,
|
|
8
|
+
Result,
|
|
8
9
|
TLBookmarkShape,
|
|
9
10
|
TLEmbedShape,
|
|
10
11
|
TLFrameShape,
|
|
@@ -24,6 +25,7 @@ import {
|
|
|
24
25
|
useMaybeEditor,
|
|
25
26
|
} from '@tldraw/editor'
|
|
26
27
|
import * as React from 'react'
|
|
28
|
+
import { createBookmarkFromUrl } from '../../shapes/bookmark/bookmarks'
|
|
27
29
|
import { fitFrameToContent, removeFrame } from '../../utils/frames/frames'
|
|
28
30
|
import { generateShapeAnnouncementMessage } from '../components/A11y'
|
|
29
31
|
import { EditLinkDialog } from '../components/EditLinkDialog'
|
|
@@ -387,45 +389,39 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) {
|
|
|
387
389
|
{
|
|
388
390
|
id: 'convert-to-bookmark',
|
|
389
391
|
label: 'action.convert-to-bookmark',
|
|
390
|
-
onSelect(source) {
|
|
392
|
+
async onSelect(source) {
|
|
391
393
|
if (!canApplySelectionAction()) return
|
|
392
394
|
if (mustGoBackToSelectToolFirst()) return
|
|
393
395
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
const shapes = editor.getSelectedShapes()
|
|
396
|
+
trackEvent('convert-to-bookmark', { source })
|
|
397
|
+
const shapes = editor.getSelectedShapes()
|
|
397
398
|
|
|
398
|
-
|
|
399
|
-
const deleteList: TLShapeId[] = []
|
|
400
|
-
for (const shape of shapes) {
|
|
401
|
-
if (!shape || !editor.isShapeOfType<TLEmbedShape>(shape, 'embed') || !shape.props.url)
|
|
402
|
-
continue
|
|
399
|
+
const markId = editor.markHistoryStoppingPoint('convert shapes to bookmark')
|
|
403
400
|
|
|
404
|
-
|
|
405
|
-
newPos.rot(-shape.rotation)
|
|
406
|
-
newPos.add(new Vec(shape.props.w / 2 - 300 / 2, shape.props.h / 2 - 320 / 2)) // see bookmark shape util
|
|
407
|
-
newPos.rot(shape.rotation)
|
|
408
|
-
const partial: TLShapePartial<TLBookmarkShape> = {
|
|
409
|
-
id: createShapeId(),
|
|
410
|
-
type: 'bookmark',
|
|
411
|
-
rotation: shape.rotation,
|
|
412
|
-
x: newPos.x,
|
|
413
|
-
y: newPos.y,
|
|
414
|
-
opacity: 1,
|
|
415
|
-
props: {
|
|
416
|
-
url: shape.props.url,
|
|
417
|
-
},
|
|
418
|
-
}
|
|
401
|
+
const creationPromises: Promise<Result<any, any>>[] = []
|
|
419
402
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
403
|
+
for (const shape of shapes) {
|
|
404
|
+
if (!shape || !editor.isShapeOfType<TLEmbedShape>(shape, 'embed') || !shape.props.url)
|
|
405
|
+
continue
|
|
423
406
|
|
|
424
|
-
editor.
|
|
407
|
+
const center = editor.getShapePageBounds(shape)?.center
|
|
425
408
|
|
|
426
|
-
|
|
427
|
-
editor.deleteShapes(
|
|
428
|
-
|
|
409
|
+
if (!center) continue
|
|
410
|
+
editor.deleteShapes([shape.id])
|
|
411
|
+
|
|
412
|
+
creationPromises.push(
|
|
413
|
+
createBookmarkFromUrl(editor, { url: shape.props.url, center }).then((res) => {
|
|
414
|
+
if (!res.ok) {
|
|
415
|
+
throw new Error(res.error)
|
|
416
|
+
}
|
|
417
|
+
return res
|
|
418
|
+
})
|
|
419
|
+
)
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
await Promise.all(creationPromises).catch((error) => {
|
|
423
|
+
editor.bailToMark(markId)
|
|
424
|
+
console.error(error)
|
|
429
425
|
})
|
|
430
426
|
},
|
|
431
427
|
},
|
|
@@ -1344,6 +1340,28 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) {
|
|
|
1344
1340
|
}
|
|
1345
1341
|
},
|
|
1346
1342
|
},
|
|
1343
|
+
{
|
|
1344
|
+
id: 'toggle-focus-mode',
|
|
1345
|
+
label: {
|
|
1346
|
+
default: 'action.toggle-focus-mode',
|
|
1347
|
+
menu: 'action.toggle-focus-mode.menu',
|
|
1348
|
+
},
|
|
1349
|
+
readonlyOk: true,
|
|
1350
|
+
kbd: 'cmd+.,ctrl+.',
|
|
1351
|
+
checkbox: true,
|
|
1352
|
+
onSelect(source) {
|
|
1353
|
+
// this needs to be deferred because it causes the menu
|
|
1354
|
+
// UI to unmount which puts us in a dodgy state
|
|
1355
|
+
editor.timers.requestAnimationFrame(() => {
|
|
1356
|
+
editor.run(() => {
|
|
1357
|
+
trackEvent('toggle-focus-mode', { source })
|
|
1358
|
+
helpers.clearDialogs()
|
|
1359
|
+
helpers.clearToasts()
|
|
1360
|
+
editor.updateInstanceState({ isFocusMode: !editor.getInstanceState().isFocusMode })
|
|
1361
|
+
})
|
|
1362
|
+
})
|
|
1363
|
+
},
|
|
1364
|
+
},
|
|
1347
1365
|
{
|
|
1348
1366
|
id: 'toggle-grid',
|
|
1349
1367
|
label: {
|
|
@@ -10,7 +10,7 @@ export function useEditorEvents() {
|
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
function handleMaxShapes({ name, count }: { name: string; pageId: string; count: number }) {
|
|
12
12
|
addToast({
|
|
13
|
-
title: 'Maximum
|
|
13
|
+
title: 'Maximum shapes reached',
|
|
14
14
|
description: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,
|
|
15
15
|
severity: 'warning',
|
|
16
16
|
})
|
|
@@ -8,8 +8,8 @@ export const DEFAULT_TRANSLATION = {
|
|
|
8
8
|
'action.toggle-auto-none': 'Auto',
|
|
9
9
|
'action.toggle-mouse': 'Mouse',
|
|
10
10
|
'action.toggle-trackpad': 'Trackpad',
|
|
11
|
-
'action.convert-to-bookmark': 'Convert to
|
|
12
|
-
'action.convert-to-embed': 'Convert to
|
|
11
|
+
'action.convert-to-bookmark': 'Convert to bookmark',
|
|
12
|
+
'action.convert-to-embed': 'Convert to embed',
|
|
13
13
|
'action.open-embed-link': 'Open link',
|
|
14
14
|
'action.align-bottom': 'Align bottom',
|
|
15
15
|
'action.align-center-horizontal': 'Align horizontally',
|
|
@@ -94,7 +94,7 @@ export const DEFAULT_TRANSLATION = {
|
|
|
94
94
|
'action.toggle-paste-at-cursor.menu': 'Paste at cursor',
|
|
95
95
|
'action.toggle-paste-at-cursor': 'Toggle paste at cursor',
|
|
96
96
|
'action.toggle-wrap-mode.menu': 'Select on wrap',
|
|
97
|
-
'action.toggle-wrap-mode': 'Toggle
|
|
97
|
+
'action.toggle-wrap-mode': 'Toggle select on wrap',
|
|
98
98
|
'action.toggle-reduce-motion.menu': 'Reduce motion',
|
|
99
99
|
'action.toggle-reduce-motion': 'Toggle reduce motion',
|
|
100
100
|
'action.toggle-keyboard-shortcuts.menu': 'Enable keyboard shortcuts',
|
|
@@ -364,7 +364,7 @@ export const DEFAULT_TRANSLATION = {
|
|
|
364
364
|
'people-menu.change-color': 'Change color',
|
|
365
365
|
'people-menu.follow': 'Following',
|
|
366
366
|
'people-menu.following': 'Following',
|
|
367
|
-
'people-menu.leading': 'Following
|
|
367
|
+
'people-menu.leading': 'Following you',
|
|
368
368
|
'people-menu.user': '(You)',
|
|
369
369
|
'people-menu.invite': 'Invite others',
|
|
370
370
|
'people-menu.anonymous-user': 'New user',
|
package/src/lib/ui/version.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// This file is automatically generated by internal/scripts/refresh-assets.ts.
|
|
2
2
|
// Do not edit manually. Or do, I'm a comment, not a cop.
|
|
3
3
|
|
|
4
|
-
export const version = '4.1.0-canary.
|
|
4
|
+
export const version = '4.1.0-canary.a152954244d2'
|
|
5
5
|
export const publishDates = {
|
|
6
6
|
major: '2025-09-18T14:39:22.803Z',
|
|
7
|
-
minor: '2025-
|
|
8
|
-
patch: '2025-
|
|
7
|
+
minor: '2025-10-15T10:12:21.273Z',
|
|
8
|
+
patch: '2025-10-15T10:12:21.273Z',
|
|
9
9
|
}
|
|
@@ -275,6 +275,14 @@ const MATCH_URL_TEST_URLS: (MatchUrlTestNoMatchDef | MatchUrlTestMatchDef)[] = [
|
|
|
275
275
|
embedUrl: `https://replit.com/@omar/Blob-Generator?embed=true`,
|
|
276
276
|
},
|
|
277
277
|
},
|
|
278
|
+
{
|
|
279
|
+
url: 'https://replit.com/@omar/Blob-Generator#index.html',
|
|
280
|
+
match: true,
|
|
281
|
+
output: {
|
|
282
|
+
type: 'replit',
|
|
283
|
+
embedUrl: `https://replit.com/@omar/Blob-Generator?embed=true#index.html`,
|
|
284
|
+
},
|
|
285
|
+
},
|
|
278
286
|
{
|
|
279
287
|
url: 'https://replit.com/foobar',
|
|
280
288
|
match: false,
|
|
@@ -347,23 +355,6 @@ const MATCH_URL_TEST_URLS: (MatchUrlTestNoMatchDef | MatchUrlTestMatchDef)[] = [
|
|
|
347
355
|
url: 'https://vimeo.com/foobar',
|
|
348
356
|
match: false,
|
|
349
357
|
},
|
|
350
|
-
// excalidraw
|
|
351
|
-
{
|
|
352
|
-
url: 'https://excalidraw.com/#room=asdkjashdkjhaskdjh,sadkjhakjshdkjahd',
|
|
353
|
-
match: true,
|
|
354
|
-
output: {
|
|
355
|
-
type: 'excalidraw',
|
|
356
|
-
embedUrl: `https://excalidraw.com/#room=asdkjashdkjhaskdjh,sadkjhakjshdkjahd`,
|
|
357
|
-
},
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
url: 'https://excalidraw.com',
|
|
361
|
-
match: false,
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
url: 'https://excalidraw.com/help',
|
|
365
|
-
match: false,
|
|
366
|
-
},
|
|
367
358
|
//desmos
|
|
368
359
|
{
|
|
369
360
|
url: 'https://www.desmos.com/calculator/js9hryvejc',
|
|
@@ -599,6 +590,14 @@ const MATCH_EMBED_TEST_URLS: (MatchEmbedTestMatchDef | MatchEmbedTestNoMatchDef)
|
|
|
599
590
|
url: `https://replit.com/@omar/Blob-Generator`,
|
|
600
591
|
},
|
|
601
592
|
},
|
|
593
|
+
{
|
|
594
|
+
embedUrl: 'https://replit.com/@omar/Blob-Generator?embed=true#index.html',
|
|
595
|
+
match: true,
|
|
596
|
+
output: {
|
|
597
|
+
type: 'replit',
|
|
598
|
+
url: `https://replit.com/@omar/Blob-Generator#index.html`,
|
|
599
|
+
},
|
|
600
|
+
},
|
|
602
601
|
{
|
|
603
602
|
embedUrl: 'https://replit.com/@omar/Blob-Generator',
|
|
604
603
|
match: false,
|
|
@@ -671,23 +670,6 @@ const MATCH_EMBED_TEST_URLS: (MatchEmbedTestMatchDef | MatchEmbedTestNoMatchDef)
|
|
|
671
670
|
embedUrl: 'https://vimeo.com/foobar',
|
|
672
671
|
match: false,
|
|
673
672
|
},
|
|
674
|
-
// excalidraw
|
|
675
|
-
{
|
|
676
|
-
embedUrl: 'https://excalidraw.com/#room=asdkjashdkjhaskdjh,sadkjhakjshdkjahd',
|
|
677
|
-
match: true,
|
|
678
|
-
output: {
|
|
679
|
-
type: 'excalidraw',
|
|
680
|
-
url: `https://excalidraw.com/#room=asdkjashdkjhaskdjh,sadkjhakjshdkjahd`,
|
|
681
|
-
},
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
embedUrl: 'https://excalidraw.com',
|
|
685
|
-
match: false,
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
embedUrl: 'https://excalidraw.com/help',
|
|
689
|
-
match: false,
|
|
690
|
-
},
|
|
691
673
|
// desmos
|
|
692
674
|
{
|
|
693
675
|
embedUrl: 'https://www.desmos.com/calculator/js9hryvejc?embed',
|