tldraw 3.16.0-canary.c7d3f7d5729d → 3.16.0-canary.ca33603d9bda
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 +131 -100
- package/dist-cjs/index.js +25 -14
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +1 -3
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +0 -2
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +0 -2
- package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +9 -4
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +255 -316
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/{primitives/TldrawUiButtonPicker.js → StylePanel/StylePanelButtonPicker.js} +52 -45
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js +68 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/{DoubleDropdownPicker.js → StylePanelDoubleDropdownPicker.js} +23 -22
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/{DropdownPicker.js → StylePanelDropdownPicker.js} +23 -20
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js +28 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +2 -0
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +7 -4
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
- package/dist-cjs/lib/ui/context/actions.js +7 -8
- package/dist-cjs/lib/ui/context/actions.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useExportAs.js +3 -2
- package/dist-cjs/lib/ui/hooks/useExportAs.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-cjs/lib/utils/export/copyAs.js +1 -2
- package/dist-cjs/lib/utils/export/copyAs.js.map +2 -2
- package/dist-cjs/lib/utils/export/export.js +0 -20
- package/dist-cjs/lib/utils/export/export.js.map +2 -2
- package/dist-cjs/lib/utils/export/exportAs.js +1 -2
- package/dist-cjs/lib/utils/export/exportAs.js.map +2 -2
- package/dist-esm/index.d.mts +131 -100
- package/dist-esm/index.mjs +51 -28
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +1 -3
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +0 -2
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +0 -2
- package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +14 -5
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +257 -320
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/{primitives/TldrawUiButtonPicker.mjs → StylePanel/StylePanelButtonPicker.mjs} +54 -43
- package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs +48 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/{DoubleDropdownPicker.mjs → StylePanelDoubleDropdownPicker.mjs} +20 -19
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/{DropdownPicker.mjs → StylePanelDropdownPicker.mjs} +20 -17
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs +8 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +2 -0
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +7 -4
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
- package/dist-esm/lib/ui/context/actions.mjs +7 -8
- package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useExportAs.mjs +3 -2
- package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +2 -2
- package/dist-esm/lib/ui/version.mjs +3 -3
- package/dist-esm/lib/ui/version.mjs.map +1 -1
- package/dist-esm/lib/utils/export/copyAs.mjs +1 -2
- package/dist-esm/lib/utils/export/copyAs.mjs.map +2 -2
- package/dist-esm/lib/utils/export/export.mjs +0 -20
- package/dist-esm/lib/utils/export/export.mjs.map +2 -2
- package/dist-esm/lib/utils/export/exportAs.mjs +1 -2
- package/dist-esm/lib/utils/export/exportAs.mjs.map +2 -2
- package/package.json +3 -3
- package/src/index.ts +38 -21
- package/src/lib/shapes/shared/PlainTextLabel.tsx +0 -6
- package/src/lib/shapes/shared/useEditablePlainText.ts +0 -6
- package/src/lib/shapes/shared/useImageOrVideoAsset.ts +0 -7
- package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +27 -13
- package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +260 -381
- package/src/lib/ui/components/{primitives/TldrawUiButtonPicker.tsx → StylePanel/StylePanelButtonPicker.tsx} +63 -50
- package/src/lib/ui/components/StylePanel/StylePanelContext.tsx +63 -0
- package/src/lib/ui/components/StylePanel/{DoubleDropdownPicker.tsx → StylePanelDoubleDropdownPicker.tsx} +28 -19
- package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +119 -0
- package/src/lib/ui/components/StylePanel/StylePanelSubheading.tsx +9 -0
- package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +3 -0
- package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +10 -6
- package/src/lib/ui/context/actions.tsx +7 -8
- package/src/lib/ui/hooks/useExportAs.ts +3 -2
- package/src/lib/ui/version.ts +3 -3
- package/src/lib/ui.css +16 -2
- package/src/lib/utils/export/copyAs.ts +1 -24
- package/src/lib/utils/export/export.ts +0 -36
- package/src/lib/utils/export/exportAs.ts +1 -32
- package/tldraw.css +16 -2
- package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +0 -7
- package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +0 -7
- package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +0 -7
- package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +0 -7
- package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +0 -7
- package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +0 -7
- package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +0 -110
|
@@ -18,7 +18,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var export_exports = {};
|
|
20
20
|
__export(export_exports, {
|
|
21
|
-
exportToBlob: () => exportToBlob,
|
|
22
21
|
exportToImagePromiseForClipboard: () => exportToImagePromiseForClipboard,
|
|
23
22
|
exportToString: () => exportToString
|
|
24
23
|
});
|
|
@@ -45,25 +44,6 @@ async function exportToString(editor, ids, format, opts = {}) {
|
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
async function exportToBlob({
|
|
49
|
-
editor,
|
|
50
|
-
ids,
|
|
51
|
-
format,
|
|
52
|
-
opts = {}
|
|
53
|
-
}) {
|
|
54
|
-
const idsToUse = ids?.length ? ids : [...editor.getCurrentPageShapeIds()];
|
|
55
|
-
switch (format) {
|
|
56
|
-
case "jpeg":
|
|
57
|
-
case "png":
|
|
58
|
-
case "webp":
|
|
59
|
-
case "svg": {
|
|
60
|
-
return (await editor.toImage(idsToUse, { ...opts, format })).blob;
|
|
61
|
-
}
|
|
62
|
-
default: {
|
|
63
|
-
(0, import_editor.exhaustiveSwitchError)(format);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
47
|
const clipboardMimeTypesByFormat = {
|
|
68
48
|
jpeg: "image/jpeg",
|
|
69
49
|
png: "image/png",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/lib/utils/export/export.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tEditor,\n\tFileHelpers,\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
4
|
+
"sourcesContent": ["import {\n\tEditor,\n\tFileHelpers,\n\tTLImageExportOptions,\n\tTLShapeId,\n\texhaustiveSwitchError,\n} from '@tldraw/editor'\n\nasync function getSvgString(editor: Editor, ids: TLShapeId[], opts: TLImageExportOptions) {\n\tconst svg = await editor.getSvgString(ids, opts)\n\tif (!svg) {\n\t\tthrow new Error('Could not construct SVG.')\n\t}\n\treturn svg\n}\n\nexport async function exportToString(\n\teditor: Editor,\n\tids: TLShapeId[],\n\tformat: 'svg' | 'json',\n\topts: TLImageExportOptions = {}\n) {\n\tswitch (format) {\n\t\tcase 'svg': {\n\t\t\treturn (await getSvgString(editor, ids, opts))?.svg\n\t\t}\n\t\tcase 'json': {\n\t\t\tconst data = await editor.resolveAssetsInContent(editor.getContentFromCurrentPage(ids))\n\t\t\treturn JSON.stringify(data)\n\t\t}\n\t\tdefault: {\n\t\t\texhaustiveSwitchError(format)\n\t\t}\n\t}\n}\n\nconst clipboardMimeTypesByFormat = {\n\tjpeg: 'image/jpeg',\n\tpng: 'image/png',\n\twebp: 'image/webp',\n\tsvg: 'text/plain',\n}\n\nexport function exportToImagePromiseForClipboard(\n\teditor: Editor,\n\tids: TLShapeId[],\n\topts: TLImageExportOptions = {}\n): { blobPromise: Promise<Blob>; mimeType: string } {\n\tconst idsToUse = ids?.length ? ids : [...editor.getCurrentPageShapeIds()]\n\tconst format = opts.format ?? 'png'\n\treturn {\n\t\tblobPromise: editor\n\t\t\t.toImage(idsToUse, opts)\n\t\t\t.then((result) =>\n\t\t\t\tFileHelpers.rewriteMimeType(result.blob, clipboardMimeTypesByFormat[format])\n\t\t\t),\n\t\tmimeType: clipboardMimeTypesByFormat[format],\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAMO;AAEP,eAAe,aAAa,QAAgB,KAAkB,MAA4B;AACzF,QAAM,MAAM,MAAM,OAAO,aAAa,KAAK,IAAI;AAC/C,MAAI,CAAC,KAAK;AACT,UAAM,IAAI,MAAM,0BAA0B;AAAA,EAC3C;AACA,SAAO;AACR;AAEA,eAAsB,eACrB,QACA,KACA,QACA,OAA6B,CAAC,GAC7B;AACD,UAAQ,QAAQ;AAAA,IACf,KAAK,OAAO;AACX,cAAQ,MAAM,aAAa,QAAQ,KAAK,IAAI,IAAI;AAAA,IACjD;AAAA,IACA,KAAK,QAAQ;AACZ,YAAM,OAAO,MAAM,OAAO,uBAAuB,OAAO,0BAA0B,GAAG,CAAC;AACtF,aAAO,KAAK,UAAU,IAAI;AAAA,IAC3B;AAAA,IACA,SAAS;AACR,+CAAsB,MAAM;AAAA,IAC7B;AAAA,EACD;AACD;AAEA,MAAM,6BAA6B;AAAA,EAClC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AACN;AAEO,SAAS,iCACf,QACA,KACA,OAA6B,CAAC,GACqB;AACnD,QAAM,WAAW,KAAK,SAAS,MAAM,CAAC,GAAG,OAAO,uBAAuB,CAAC;AACxE,QAAM,SAAS,KAAK,UAAU;AAC9B,SAAO;AAAA,IACN,aAAa,OACX,QAAQ,UAAU,IAAI,EACtB;AAAA,MAAK,CAAC,WACN,0BAAY,gBAAgB,OAAO,MAAM,2BAA2B,MAAM,CAAC;AAAA,IAC5E;AAAA,IACD,UAAU,2BAA2B,MAAM;AAAA,EAC5C;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -23,8 +23,7 @@ __export(exportAs_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(exportAs_exports);
|
|
25
25
|
var import_editor = require("@tldraw/editor");
|
|
26
|
-
async function exportAs(
|
|
27
|
-
const [editor, ids, opts] = typeof args[2] === "object" ? args : [args[0], args[1], { ...args[4], format: args[2] ?? "png", name: args[3] }];
|
|
26
|
+
async function exportAs(editor, ids, opts) {
|
|
28
27
|
let name = opts.name;
|
|
29
28
|
if (!name) {
|
|
30
29
|
name = `shapes at ${getTimestamp()}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/lib/utils/export/exportAs.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tEditor,\n\tsanitizeId,\n\tTLExportType,\n\tTLFrameShape,\n\tTLImageExportOptions,\n\tTLShapeId,\n} from '@tldraw/editor'\n\n/** @public */\nexport interface ExportAsOptions extends TLImageExportOptions {\n\t/** {@inheritdoc @tldraw/editor#TLImageExportOptions.format} */\n\tformat: TLExportType\n\t/** Name of the exported file. If undefined a predefined name, based on the selection, will be used. */\n\tname?: string\n}\n\n/**\n * Export the given shapes as files.\n *\n * @param editor - The editor instance.\n * @param ids - The ids of the shapes to export.\n * @param opts - Options for the export.\n *\n * @public\n */\nexport async function exportAs(\n\teditor: Editor,\n\tids: TLShapeId[],\n\topts: ExportAsOptions\n): Promise<void
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAOO;
|
|
4
|
+
"sourcesContent": ["import {\n\tEditor,\n\tsanitizeId,\n\tTLExportType,\n\tTLFrameShape,\n\tTLImageExportOptions,\n\tTLShapeId,\n} from '@tldraw/editor'\n\n/** @public */\nexport interface ExportAsOptions extends TLImageExportOptions {\n\t/** {@inheritdoc @tldraw/editor#TLImageExportOptions.format} */\n\tformat: TLExportType\n\t/** Name of the exported file. If undefined a predefined name, based on the selection, will be used. */\n\tname?: string\n}\n\n/**\n * Export the given shapes as files.\n *\n * @param editor - The editor instance.\n * @param ids - The ids of the shapes to export.\n * @param opts - Options for the export.\n *\n * @public\n */\nexport async function exportAs(\n\teditor: Editor,\n\tids: TLShapeId[],\n\topts: ExportAsOptions\n): Promise<void> {\n\t// If we don't get name then use a predefined one\n\tlet name = opts.name\n\tif (!name) {\n\t\tname = `shapes at ${getTimestamp()}`\n\t\tif (ids.length === 1) {\n\t\t\tconst first = editor.getShape(ids[0])!\n\t\t\tif (editor.isShapeOfType<TLFrameShape>(first, 'frame')) {\n\t\t\t\tname = first.props.name || 'frame'\n\t\t\t} else {\n\t\t\t\tname = `${sanitizeId(first.id)} at ${getTimestamp()}`\n\t\t\t}\n\t\t}\n\t}\n\tname += `.${opts.format}`\n\n\tconst { blob } = await editor.toImage(ids, opts)\n\tconst file = new File([blob], name, { type: blob.type })\n\tdownloadFile(file)\n}\n\nfunction getTimestamp() {\n\tconst now = new Date()\n\n\tconst year = String(now.getFullYear()).slice(2)\n\tconst month = String(now.getMonth() + 1).padStart(2, '0')\n\tconst day = String(now.getDate()).padStart(2, '0')\n\tconst hours = String(now.getHours()).padStart(2, '0')\n\tconst minutes = String(now.getMinutes()).padStart(2, '0')\n\tconst seconds = String(now.getSeconds()).padStart(2, '0')\n\n\treturn `${year}-${month}-${day} ${hours}.${minutes}.${seconds}`\n}\n\n/** @internal */\nexport function downloadFile(file: File) {\n\tconst link = document.createElement('a')\n\tconst url = URL.createObjectURL(file)\n\tlink.href = url\n\tlink.download = file.name\n\tlink.click()\n\tURL.revokeObjectURL(url)\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAOO;AAmBP,eAAsB,SACrB,QACA,KACA,MACgB;AAEhB,MAAI,OAAO,KAAK;AAChB,MAAI,CAAC,MAAM;AACV,WAAO,aAAa,aAAa,CAAC;AAClC,QAAI,IAAI,WAAW,GAAG;AACrB,YAAM,QAAQ,OAAO,SAAS,IAAI,CAAC,CAAC;AACpC,UAAI,OAAO,cAA4B,OAAO,OAAO,GAAG;AACvD,eAAO,MAAM,MAAM,QAAQ;AAAA,MAC5B,OAAO;AACN,eAAO,OAAG,0BAAW,MAAM,EAAE,CAAC,OAAO,aAAa,CAAC;AAAA,MACpD;AAAA,IACD;AAAA,EACD;AACA,UAAQ,IAAI,KAAK,MAAM;AAEvB,QAAM,EAAE,KAAK,IAAI,MAAM,OAAO,QAAQ,KAAK,IAAI;AAC/C,QAAM,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,MAAM,EAAE,MAAM,KAAK,KAAK,CAAC;AACvD,eAAa,IAAI;AAClB;AAEA,SAAS,eAAe;AACvB,QAAM,MAAM,oBAAI,KAAK;AAErB,QAAM,OAAO,OAAO,IAAI,YAAY,CAAC,EAAE,MAAM,CAAC;AAC9C,QAAM,QAAQ,OAAO,IAAI,SAAS,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG;AACxD,QAAM,MAAM,OAAO,IAAI,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG;AACjD,QAAM,QAAQ,OAAO,IAAI,SAAS,CAAC,EAAE,SAAS,GAAG,GAAG;AACpD,QAAM,UAAU,OAAO,IAAI,WAAW,CAAC,EAAE,SAAS,GAAG,GAAG;AACxD,QAAM,UAAU,OAAO,IAAI,WAAW,CAAC,EAAE,SAAS,GAAG,GAAG;AAExD,SAAO,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,OAAO,IAAI,OAAO;AAC9D;AAGO,SAAS,aAAa,MAAY;AACxC,QAAM,OAAO,SAAS,cAAc,GAAG;AACvC,QAAM,MAAM,IAAI,gBAAgB,IAAI;AACpC,OAAK,OAAO;AACZ,OAAK,WAAW,KAAK;AACrB,OAAK,MAAM;AACX,MAAI,gBAAgB,GAAG;AACxB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist-esm/index.d.mts
CHANGED
|
@@ -68,7 +68,6 @@ import { TLClickEventInfo } from '@tldraw/editor';
|
|
|
68
68
|
import { TLContent } from '@tldraw/editor';
|
|
69
69
|
import { TLCropInfo } from '@tldraw/editor';
|
|
70
70
|
import { TLDefaultColorStyle } from '@tldraw/editor';
|
|
71
|
-
import { TLDefaultColorTheme } from '@tldraw/editor';
|
|
72
71
|
import { TLDefaultColorThemeColor } from '@tldraw/editor';
|
|
73
72
|
import { TLDefaultDashStyle } from '@tldraw/editor';
|
|
74
73
|
import { TLDefaultFillStyle } from '@tldraw/editor';
|
|
@@ -193,9 +192,6 @@ export declare class ArrowBindingUtil extends BindingUtil<TLArrowBinding> {
|
|
|
193
192
|
/** @public @react */
|
|
194
193
|
export declare function ArrowDownToolbarItem(): JSX_2.Element;
|
|
195
194
|
|
|
196
|
-
/** @public @react */
|
|
197
|
-
export declare function ArrowheadStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
198
|
-
|
|
199
195
|
/** @public @react */
|
|
200
196
|
export declare function ArrowLeftToolbarItem(): JSX_2.Element;
|
|
201
197
|
|
|
@@ -500,9 +496,6 @@ export declare function CloudToolbarItem(): JSX_2.Element;
|
|
|
500
496
|
/** @public @react */
|
|
501
497
|
export declare function ColorSchemeMenu(): JSX_2.Element;
|
|
502
498
|
|
|
503
|
-
/** @public @react */
|
|
504
|
-
export declare function CommonStylePickerSet({ styles, theme }: ThemeStylePickerSetProps): JSX_2.Element;
|
|
505
|
-
|
|
506
499
|
/**
|
|
507
500
|
* Contains the size within the given box size
|
|
508
501
|
*
|
|
@@ -534,14 +527,6 @@ export declare function ConvertToEmbedMenuItem(): JSX_2.Element | null;
|
|
|
534
527
|
*/
|
|
535
528
|
export declare function copyAs(editor: Editor, ids: TLShapeId[], opts: CopyAsOptions): Promise<void>;
|
|
536
529
|
|
|
537
|
-
/**
|
|
538
|
-
* @deprecated The format parameter is now part of the opts object.
|
|
539
|
-
* @public
|
|
540
|
-
*/
|
|
541
|
-
export declare function copyAs(editor: Editor, ids: TLShapeId[], format: TLCopyType, opts?: TLImageExportOptions & {
|
|
542
|
-
format?: undefined;
|
|
543
|
-
}): Promise<void>;
|
|
544
|
-
|
|
545
530
|
/** @public @react */
|
|
546
531
|
export declare function CopyAsMenuGroup(): JSX_2.Element;
|
|
547
532
|
|
|
@@ -999,7 +984,7 @@ export declare function DefaultSharePanel(): JSX_2.Element;
|
|
|
999
984
|
export declare const DefaultStylePanel: NamedExoticComponent<TLUiStylePanelProps>;
|
|
1000
985
|
|
|
1001
986
|
/** @public @react */
|
|
1002
|
-
export declare function DefaultStylePanelContent(
|
|
987
|
+
export declare function DefaultStylePanelContent(): JSX_2.Element;
|
|
1003
988
|
|
|
1004
989
|
/** @public @react */
|
|
1005
990
|
export declare const DefaultToasts: NamedExoticComponent<object>;
|
|
@@ -1492,12 +1477,6 @@ export declare interface ExampleDialogProps {
|
|
|
1492
1477
|
*/
|
|
1493
1478
|
export declare function exportAs(editor: Editor, ids: TLShapeId[], opts: ExportAsOptions): Promise<void>;
|
|
1494
1479
|
|
|
1495
|
-
/**
|
|
1496
|
-
* @deprecated The format & name parameters are now part of the opts object.
|
|
1497
|
-
* @public
|
|
1498
|
-
*/
|
|
1499
|
-
export declare function exportAs(editor: Editor, ids: TLShapeId[], format?: TLExportType, name?: string, opts?: TLImageExportOptions): Promise<void>;
|
|
1500
|
-
|
|
1501
1480
|
/** @public */
|
|
1502
1481
|
export declare interface ExportAsOptions extends TLImageExportOptions {
|
|
1503
1482
|
/** {@inheritdoc @tldraw/editor#TLImageExportOptions.format} */
|
|
@@ -1509,23 +1488,6 @@ export declare interface ExportAsOptions extends TLImageExportOptions {
|
|
|
1509
1488
|
/** @public @react */
|
|
1510
1489
|
export declare function ExportFileContentSubMenu(): JSX_2.Element;
|
|
1511
1490
|
|
|
1512
|
-
/**
|
|
1513
|
-
* Export the given shapes as a blob.
|
|
1514
|
-
* @param editor - The editor instance.
|
|
1515
|
-
* @param ids - The ids of the shapes to export.
|
|
1516
|
-
* @param format - The format to export as.
|
|
1517
|
-
* @param opts - Rendering options.
|
|
1518
|
-
* @returns A promise that resolves to a blob.
|
|
1519
|
-
* @deprecated Use {@link @tldraw/editor#Editor.toImage} instead.
|
|
1520
|
-
* @public
|
|
1521
|
-
*/
|
|
1522
|
-
export declare function exportToBlob({ editor, ids, format, opts, }: {
|
|
1523
|
-
editor: Editor;
|
|
1524
|
-
format: TLExportType;
|
|
1525
|
-
ids: TLShapeId[];
|
|
1526
|
-
opts?: TLImageExportOptions;
|
|
1527
|
-
}): Promise<Blob>;
|
|
1528
|
-
|
|
1529
1491
|
/** @public @react */
|
|
1530
1492
|
export declare function ExtrasGroup(): JSX_2.Element;
|
|
1531
1493
|
|
|
@@ -1740,9 +1702,6 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
|
1740
1702
|
getInterpolatedProps(startShape: TLGeoShape, endShape: TLGeoShape, t: number): TLGeoShapeProps;
|
|
1741
1703
|
}
|
|
1742
1704
|
|
|
1743
|
-
/** @public @react */
|
|
1744
|
-
export declare function GeoStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
1745
|
-
|
|
1746
1705
|
/** @public */
|
|
1747
1706
|
export declare function getArrowBindings(editor: Editor, shape: TLArrowShape): TLArrowBindings;
|
|
1748
1707
|
|
|
@@ -2190,9 +2149,6 @@ export declare interface OnDragFromToolbarToCreateShapesOpts {
|
|
|
2190
2149
|
onDragEnd?(id: TLShapeId): void;
|
|
2191
2150
|
}
|
|
2192
2151
|
|
|
2193
|
-
/** @public @react */
|
|
2194
|
-
export declare function OpacitySlider(): JSX_2.Element | null;
|
|
2195
|
-
|
|
2196
2152
|
/** @public @react */
|
|
2197
2153
|
export declare function OvalToolbarItem(): JSX_2.Element;
|
|
2198
2154
|
|
|
@@ -2584,9 +2540,6 @@ export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
|
|
|
2584
2540
|
|
|
2585
2541
|
/* Excluded from this release type: Spinner */
|
|
2586
2542
|
|
|
2587
|
-
/** @public @react */
|
|
2588
|
-
export declare function SplineStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
2589
|
-
|
|
2590
2543
|
/** @public @react */
|
|
2591
2544
|
export declare function StackMenuItems(): JSX_2.Element;
|
|
2592
2545
|
|
|
@@ -2644,11 +2597,124 @@ export declare interface StrokePoint {
|
|
|
2644
2597
|
radius: number;
|
|
2645
2598
|
}
|
|
2646
2599
|
|
|
2600
|
+
/** @public @react */
|
|
2601
|
+
export declare function StylePanelArrowheadPicker(): JSX_2.Element | null;
|
|
2602
|
+
|
|
2603
|
+
/** @public @react */
|
|
2604
|
+
export declare function StylePanelArrowKindPicker(): JSX_2.Element | null;
|
|
2605
|
+
|
|
2647
2606
|
/** @public */
|
|
2648
|
-
export declare
|
|
2607
|
+
export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => ReactElement;
|
|
2608
|
+
|
|
2609
|
+
/** @public */
|
|
2610
|
+
export declare interface StylePanelButtonPickerProps<T extends string> {
|
|
2611
|
+
title: string;
|
|
2612
|
+
uiType: string;
|
|
2613
|
+
style: StyleProp<T>;
|
|
2614
|
+
value: SharedStyle<T>;
|
|
2615
|
+
items: StyleValuesForUi<T>;
|
|
2616
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2617
|
+
onHistoryMark?(id: string): void;
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
/** @public @react */
|
|
2621
|
+
export declare function StylePanelColorPicker(): JSX_2.Element | null;
|
|
2622
|
+
|
|
2623
|
+
/** @public */
|
|
2624
|
+
export declare interface StylePanelContext {
|
|
2625
|
+
styles: ReadonlySharedStyleMap;
|
|
2626
|
+
showUiLabels: boolean;
|
|
2627
|
+
onHistoryMark(id: string): void;
|
|
2628
|
+
onValueChange<T>(style: StyleProp<T>, value: T): void;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
/** @public @react */
|
|
2632
|
+
export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps): JSX_2.Element;
|
|
2633
|
+
|
|
2634
|
+
/** @public */
|
|
2635
|
+
export declare interface StylePanelContextProviderProps {
|
|
2636
|
+
children: React.ReactNode;
|
|
2649
2637
|
styles: ReadonlySharedStyleMap;
|
|
2650
2638
|
}
|
|
2651
2639
|
|
|
2640
|
+
/** @public @react */
|
|
2641
|
+
export declare function StylePanelDashPicker(): JSX_2.Element | null;
|
|
2642
|
+
|
|
2643
|
+
/** @public @react */
|
|
2644
|
+
export declare const StylePanelDoubleDropdownPicker: <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2645
|
+
|
|
2646
|
+
/** @public */
|
|
2647
|
+
export declare interface StylePanelDoubleDropdownPickerProps<T extends string> {
|
|
2648
|
+
uiTypeA: string;
|
|
2649
|
+
uiTypeB: string;
|
|
2650
|
+
label: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2651
|
+
labelA: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2652
|
+
labelB: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2653
|
+
itemsA: StyleValuesForUi<T>;
|
|
2654
|
+
itemsB: StyleValuesForUi<T>;
|
|
2655
|
+
styleA: StyleProp<T>;
|
|
2656
|
+
styleB: StyleProp<T>;
|
|
2657
|
+
valueA: SharedStyle<T>;
|
|
2658
|
+
valueB: SharedStyle<T>;
|
|
2659
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
/** @public @react */
|
|
2663
|
+
export declare const StylePanelDropdownPicker: <T extends string>(props: StylePanelDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2664
|
+
|
|
2665
|
+
/** @public */
|
|
2666
|
+
export declare interface StylePanelDropdownPickerProps<T extends string> {
|
|
2667
|
+
id: string;
|
|
2668
|
+
label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2669
|
+
uiType: string;
|
|
2670
|
+
stylePanelType: string;
|
|
2671
|
+
style: StyleProp<T>;
|
|
2672
|
+
value: SharedStyle<T>;
|
|
2673
|
+
items: StyleValuesForUi<T>;
|
|
2674
|
+
type: 'icon' | 'menu' | 'tool';
|
|
2675
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
/** @public @react */
|
|
2679
|
+
export declare function StylePanelFillPicker(): JSX_2.Element | null;
|
|
2680
|
+
|
|
2681
|
+
/** @public @react */
|
|
2682
|
+
export declare function StylePanelFontPicker(): JSX_2.Element | null;
|
|
2683
|
+
|
|
2684
|
+
/** @public @react */
|
|
2685
|
+
export declare function StylePanelGeoShapePicker(): JSX_2.Element | null;
|
|
2686
|
+
|
|
2687
|
+
/** @public @react */
|
|
2688
|
+
export declare function StylePanelLabelAlignPicker(): JSX_2.Element | null;
|
|
2689
|
+
|
|
2690
|
+
/** @public @react */
|
|
2691
|
+
export declare function StylePanelOpacityPicker(): JSX_2.Element | null;
|
|
2692
|
+
|
|
2693
|
+
/** @public @react */
|
|
2694
|
+
export declare function StylePanelSection({ children }: StylePanelSectionProps): JSX_2.Element;
|
|
2695
|
+
|
|
2696
|
+
/** @public */
|
|
2697
|
+
export declare interface StylePanelSectionProps {
|
|
2698
|
+
children: React_3.ReactNode;
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
/** @public @react */
|
|
2702
|
+
export declare function StylePanelSizePicker(): JSX_2.Element | null;
|
|
2703
|
+
|
|
2704
|
+
/** @public @react */
|
|
2705
|
+
export declare function StylePanelSplinePicker(): JSX_2.Element | null;
|
|
2706
|
+
|
|
2707
|
+
/** @public @react */
|
|
2708
|
+
export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps): JSX_2.Element;
|
|
2709
|
+
|
|
2710
|
+
/** @public */
|
|
2711
|
+
export declare interface StylePanelSubheadingProps {
|
|
2712
|
+
children: React.ReactNode;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
/** @public @react */
|
|
2716
|
+
export declare function StylePanelTextAlignPicker(): JSX_2.Element | null;
|
|
2717
|
+
|
|
2652
2718
|
/** @public */
|
|
2653
2719
|
export declare type StyleValuesForUi<T> = readonly {
|
|
2654
2720
|
readonly icon: string | TLUiIconJsx;
|
|
@@ -2688,12 +2754,6 @@ export declare interface TextAreaProps {
|
|
|
2688
2754
|
*/
|
|
2689
2755
|
export declare const TextDirection: Extension<any, any>;
|
|
2690
2756
|
|
|
2691
|
-
/**
|
|
2692
|
-
* @deprecated Use `PlainTextLabel` instead.
|
|
2693
|
-
* @public
|
|
2694
|
-
*/
|
|
2695
|
-
export declare const TextLabel: React_3.NamedExoticComponent<PlainTextLabelProps>;
|
|
2696
|
-
|
|
2697
2757
|
/** @public */
|
|
2698
2758
|
export declare interface TextShapeOptions {
|
|
2699
2759
|
/** How much addition padding should be added to the horizontal geometry of the shape when binding to an arrow? */
|
|
@@ -2771,18 +2831,9 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|
|
2771
2831
|
} | undefined;
|
|
2772
2832
|
}
|
|
2773
2833
|
|
|
2774
|
-
/** @public @react */
|
|
2775
|
-
export declare function TextStylePickerSet({ theme, styles }: ThemeStylePickerSetProps): JSX_2.Element | null;
|
|
2776
|
-
|
|
2777
2834
|
/** @public @react */
|
|
2778
2835
|
export declare function TextToolbarItem(): JSX_2.Element;
|
|
2779
2836
|
|
|
2780
|
-
/** @public */
|
|
2781
|
-
export declare interface ThemeStylePickerSetProps {
|
|
2782
|
-
styles: ReadonlySharedStyleMap;
|
|
2783
|
-
theme: TLDefaultColorTheme;
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
2837
|
/**
|
|
2787
2838
|
* Default extensions for the TipTap editor.
|
|
2788
2839
|
*
|
|
@@ -3039,9 +3090,6 @@ export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButt
|
|
|
3039
3090
|
/** @public @react */
|
|
3040
3091
|
export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps): JSX_2.Element;
|
|
3041
3092
|
|
|
3042
|
-
/** @public */
|
|
3043
|
-
export declare const TldrawUiButtonPicker: <T extends string>(props: TLUiButtonPickerProps<T>) => ReactElement;
|
|
3044
|
-
|
|
3045
3093
|
/**
|
|
3046
3094
|
* A column, usually of UI controls like buttons, select dropdown, checkboxes, etc.
|
|
3047
3095
|
*
|
|
@@ -3221,7 +3269,7 @@ export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiTool
|
|
|
3221
3269
|
export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TLUiToolbarButtonProps & React_3.RefAttributes<HTMLButtonElement>>;
|
|
3222
3270
|
|
|
3223
3271
|
/** @public @react */
|
|
3224
|
-
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
|
|
3272
|
+
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, asChild, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
|
|
3225
3273
|
|
|
3226
3274
|
/** @public @react */
|
|
3227
3275
|
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, tooltip, ...props }: TLUiToolbarToggleItemProps) => JSX_2.Element;
|
|
@@ -3408,18 +3456,6 @@ export declare interface TLUiButtonLabelProps {
|
|
|
3408
3456
|
children?: ReactNode;
|
|
3409
3457
|
}
|
|
3410
3458
|
|
|
3411
|
-
/** @public */
|
|
3412
|
-
export declare interface TLUiButtonPickerProps<T extends string> {
|
|
3413
|
-
title: string;
|
|
3414
|
-
uiType: string;
|
|
3415
|
-
style: StyleProp<T>;
|
|
3416
|
-
value: SharedStyle<T>;
|
|
3417
|
-
items: StyleValuesForUi<T>;
|
|
3418
|
-
theme: TLDefaultColorTheme;
|
|
3419
|
-
onValueChange(style: StyleProp<T>, value: T): void;
|
|
3420
|
-
onHistoryMark?(id: string): void;
|
|
3421
|
-
}
|
|
3422
|
-
|
|
3423
3459
|
/** @public */
|
|
3424
3460
|
export declare interface TLUiButtonProps extends React_2.HTMLAttributes<HTMLButtonElement> {
|
|
3425
3461
|
disabled?: boolean;
|
|
@@ -4060,14 +4096,10 @@ export declare interface TLUiSliderProps {
|
|
|
4060
4096
|
ariaValueModifier?: number;
|
|
4061
4097
|
}
|
|
4062
4098
|
|
|
4063
|
-
/** @public */
|
|
4064
|
-
export declare interface TLUiStylePanelContentProps {
|
|
4065
|
-
styles: ReturnType<typeof useRelevantStyles>;
|
|
4066
|
-
}
|
|
4067
|
-
|
|
4068
4099
|
/** @public */
|
|
4069
4100
|
export declare interface TLUiStylePanelProps {
|
|
4070
4101
|
isMobile?: boolean;
|
|
4102
|
+
styles?: null | ReadonlySharedStyleMap;
|
|
4071
4103
|
children?: ReactNode;
|
|
4072
4104
|
}
|
|
4073
4105
|
|
|
@@ -4136,6 +4168,7 @@ export declare interface TLUiToolbarToggleGroupProps extends React_3.HTMLAttribu
|
|
|
4136
4168
|
value: any;
|
|
4137
4169
|
defaultValue?: any;
|
|
4138
4170
|
type: 'multiple' | 'single';
|
|
4171
|
+
asChild?: boolean;
|
|
4139
4172
|
}
|
|
4140
4173
|
|
|
4141
4174
|
/** @public */
|
|
@@ -4372,13 +4405,6 @@ export declare function useA11y(): TLUiA11yContextType;
|
|
|
4372
4405
|
/** @public */
|
|
4373
4406
|
export declare function useActions(): TLUiActionsContextType;
|
|
4374
4407
|
|
|
4375
|
-
/**
|
|
4376
|
-
* @deprecated Use {@link useImageOrVideoAsset} instead.
|
|
4377
|
-
*
|
|
4378
|
-
* @public
|
|
4379
|
-
*/
|
|
4380
|
-
export declare const useAsset: typeof useImageOrVideoAsset;
|
|
4381
|
-
|
|
4382
4408
|
/* Excluded from this release type: useAssetUrls */
|
|
4383
4409
|
|
|
4384
4410
|
/** @public */
|
|
@@ -4433,7 +4459,11 @@ export declare function useDefaultHelpers(): {
|
|
|
4433
4459
|
copy: (source: TLUiEventSource) => Promise<void>;
|
|
4434
4460
|
copyAs: (ids: TLShapeId[], format?: TLCopyType) => void;
|
|
4435
4461
|
cut: (source: TLUiEventSource) => Promise<void>;
|
|
4436
|
-
exportAs: (ids: TLShapeId[],
|
|
4462
|
+
exportAs: (ids: TLShapeId[], opts?: {
|
|
4463
|
+
format?: TLExportType;
|
|
4464
|
+
name?: string;
|
|
4465
|
+
scale?: number;
|
|
4466
|
+
}) => void;
|
|
4437
4467
|
getEmbedDefinition: (url: string) => TLEmbedResult;
|
|
4438
4468
|
insertMedia: () => Promise<void>;
|
|
4439
4469
|
isMobile: boolean;
|
|
@@ -4483,14 +4513,12 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: string, ri
|
|
|
4483
4513
|
rInput: RefObject<HTMLDivElement>;
|
|
4484
4514
|
};
|
|
4485
4515
|
|
|
4486
|
-
/**
|
|
4487
|
-
* @deprecated Use `useEditablePlainText` instead.
|
|
4488
|
-
* @public
|
|
4489
|
-
*/
|
|
4490
|
-
export declare const useEditableText: typeof useEditablePlainText;
|
|
4491
|
-
|
|
4492
4516
|
/** @public */
|
|
4493
|
-
export declare function useExportAs(): (ids: TLShapeId[],
|
|
4517
|
+
export declare function useExportAs(): (ids: TLShapeId[], opts?: {
|
|
4518
|
+
format?: TLExportType;
|
|
4519
|
+
name?: string;
|
|
4520
|
+
scale?: number;
|
|
4521
|
+
}) => void;
|
|
4494
4522
|
|
|
4495
4523
|
/**
|
|
4496
4524
|
* This is a handy helper hook that resolves an asset to an optimized URL for a given shape, or its
|
|
@@ -4564,6 +4592,9 @@ export declare const useSelectedShapesAnnouncer: () => void;
|
|
|
4564
4592
|
/** @public */
|
|
4565
4593
|
export declare function useShowCollaborationUi(): boolean;
|
|
4566
4594
|
|
|
4595
|
+
/** @public */
|
|
4596
|
+
export declare function useStylePanelContext(): StylePanelContext;
|
|
4597
|
+
|
|
4567
4598
|
/** @public */
|
|
4568
4599
|
export declare function useTldrawUiComponents(): TLUiComponents;
|
|
4569
4600
|
|
package/dist-esm/index.mjs
CHANGED
|
@@ -109,19 +109,15 @@ import {
|
|
|
109
109
|
} from "./lib/shapes/shared/defaultFonts.mjs";
|
|
110
110
|
import { getStrokePoints } from "./lib/shapes/shared/freehand/getStrokePoints.mjs";
|
|
111
111
|
import { getSvgPathFromStrokePoints } from "./lib/shapes/shared/freehand/svg.mjs";
|
|
112
|
-
import {
|
|
113
|
-
PlainTextLabel,
|
|
114
|
-
TextLabel
|
|
115
|
-
} from "./lib/shapes/shared/PlainTextLabel.mjs";
|
|
112
|
+
import { PlainTextLabel } from "./lib/shapes/shared/PlainTextLabel.mjs";
|
|
116
113
|
import {
|
|
117
114
|
RichTextLabel,
|
|
118
115
|
RichTextSVG
|
|
119
116
|
} from "./lib/shapes/shared/RichTextLabel.mjs";
|
|
120
117
|
import { useDefaultColorTheme } from "./lib/shapes/shared/useDefaultColorTheme.mjs";
|
|
121
|
-
import { useEditablePlainText
|
|
118
|
+
import { useEditablePlainText } from "./lib/shapes/shared/useEditablePlainText.mjs";
|
|
122
119
|
import { useEditableRichText } from "./lib/shapes/shared/useEditableRichText.mjs";
|
|
123
120
|
import {
|
|
124
|
-
useAsset,
|
|
125
121
|
useImageOrVideoAsset
|
|
126
122
|
} from "./lib/shapes/shared/useImageOrVideoAsset.mjs";
|
|
127
123
|
import { PlainTextArea } from "./lib/shapes/text/PlainTextArea.mjs";
|
|
@@ -277,9 +273,6 @@ import {
|
|
|
277
273
|
import {
|
|
278
274
|
TldrawUiMenuSubmenu
|
|
279
275
|
} from "./lib/ui/components/primitives/menus/TldrawUiMenuSubmenu.mjs";
|
|
280
|
-
import {
|
|
281
|
-
TldrawUiButtonPicker
|
|
282
|
-
} from "./lib/ui/components/primitives/TldrawUiButtonPicker.mjs";
|
|
283
276
|
import {
|
|
284
277
|
TldrawUiContextualToolbar
|
|
285
278
|
} from "./lib/ui/components/primitives/TldrawUiContextualToolbar.mjs";
|
|
@@ -333,14 +326,37 @@ import {
|
|
|
333
326
|
DefaultStylePanel
|
|
334
327
|
} from "./lib/ui/components/StylePanel/DefaultStylePanel.mjs";
|
|
335
328
|
import {
|
|
336
|
-
ArrowheadStylePickerSet,
|
|
337
|
-
CommonStylePickerSet,
|
|
338
329
|
DefaultStylePanelContent,
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
330
|
+
StylePanelArrowheadPicker,
|
|
331
|
+
StylePanelArrowKindPicker,
|
|
332
|
+
StylePanelColorPicker,
|
|
333
|
+
StylePanelDashPicker,
|
|
334
|
+
StylePanelFillPicker,
|
|
335
|
+
StylePanelFontPicker,
|
|
336
|
+
StylePanelGeoShapePicker,
|
|
337
|
+
StylePanelLabelAlignPicker,
|
|
338
|
+
StylePanelOpacityPicker,
|
|
339
|
+
StylePanelSection,
|
|
340
|
+
StylePanelSizePicker,
|
|
341
|
+
StylePanelSplinePicker,
|
|
342
|
+
StylePanelTextAlignPicker
|
|
343
343
|
} from "./lib/ui/components/StylePanel/DefaultStylePanelContent.mjs";
|
|
344
|
+
import {
|
|
345
|
+
StylePanelButtonPicker
|
|
346
|
+
} from "./lib/ui/components/StylePanel/StylePanelButtonPicker.mjs";
|
|
347
|
+
import {
|
|
348
|
+
StylePanelContextProvider,
|
|
349
|
+
useStylePanelContext
|
|
350
|
+
} from "./lib/ui/components/StylePanel/StylePanelContext.mjs";
|
|
351
|
+
import {
|
|
352
|
+
StylePanelDoubleDropdownPicker
|
|
353
|
+
} from "./lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs";
|
|
354
|
+
import {
|
|
355
|
+
StylePanelDropdownPicker
|
|
356
|
+
} from "./lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs";
|
|
357
|
+
import {
|
|
358
|
+
StylePanelSubheading
|
|
359
|
+
} from "./lib/ui/components/StylePanel/StylePanelSubheading.mjs";
|
|
344
360
|
import {
|
|
345
361
|
DefaultImageToolbar
|
|
346
362
|
} from "./lib/ui/components/Toolbar/DefaultImageToolbar.mjs";
|
|
@@ -471,7 +487,6 @@ import { preloadFont } from "./lib/utils/assets/preload-font.mjs";
|
|
|
471
487
|
import { getEmbedInfo } from "./lib/utils/embeds/embeds.mjs";
|
|
472
488
|
import { putExcalidrawContent } from "./lib/utils/excalidraw/putExcalidrawContent.mjs";
|
|
473
489
|
import { copyAs } from "./lib/utils/export/copyAs.mjs";
|
|
474
|
-
import { exportToBlob } from "./lib/utils/export/export.mjs";
|
|
475
490
|
import { downloadFile, exportAs } from "./lib/utils/export/exportAs.mjs";
|
|
476
491
|
import { fitFrameToContent, removeFrame } from "./lib/utils/frames/frames.mjs";
|
|
477
492
|
import {
|
|
@@ -509,7 +524,7 @@ import {
|
|
|
509
524
|
} from "./lib/utils/tldr/file.mjs";
|
|
510
525
|
registerTldrawLibraryVersion(
|
|
511
526
|
"tldraw",
|
|
512
|
-
"3.16.0-canary.
|
|
527
|
+
"3.16.0-canary.ca33603d9bda",
|
|
513
528
|
"esm"
|
|
514
529
|
);
|
|
515
530
|
export {
|
|
@@ -527,7 +542,6 @@ export {
|
|
|
527
542
|
ArrowShapeUtil,
|
|
528
543
|
ArrowToolbarItem,
|
|
529
544
|
ArrowUpToolbarItem,
|
|
530
|
-
ArrowheadStylePickerSet,
|
|
531
545
|
AssetToolbarItem,
|
|
532
546
|
AssetUrlsProvider,
|
|
533
547
|
BookmarkShapeUtil,
|
|
@@ -537,7 +551,6 @@ export {
|
|
|
537
551
|
ClipboardMenuGroup,
|
|
538
552
|
CloudToolbarItem,
|
|
539
553
|
ColorSchemeMenu,
|
|
540
|
-
CommonStylePickerSet,
|
|
541
554
|
DefaultContextMenu as ContextMenu,
|
|
542
555
|
ConversionsMenuGroup,
|
|
543
556
|
ConvertToBookmarkMenuItem,
|
|
@@ -615,7 +628,6 @@ export {
|
|
|
615
628
|
FrameToolbarItem,
|
|
616
629
|
GeoShapeTool,
|
|
617
630
|
GeoShapeUtil,
|
|
618
|
-
GeoStylePickerSet,
|
|
619
631
|
GroupMenuItem,
|
|
620
632
|
GroupOrUngroupMenuItem,
|
|
621
633
|
HandTool,
|
|
@@ -643,7 +655,6 @@ export {
|
|
|
643
655
|
NoteShapeUtil,
|
|
644
656
|
NoteToolbarItem,
|
|
645
657
|
OfflineIndicator,
|
|
646
|
-
OpacitySlider,
|
|
647
658
|
OvalToolbarItem,
|
|
648
659
|
OverflowingToolbar,
|
|
649
660
|
PORTRAIT_BREAKPOINT,
|
|
@@ -671,9 +682,26 @@ export {
|
|
|
671
682
|
SelectTool,
|
|
672
683
|
SelectToolbarItem,
|
|
673
684
|
Spinner,
|
|
674
|
-
SplineStylePickerSet,
|
|
675
685
|
StackMenuItems,
|
|
676
686
|
StarToolbarItem,
|
|
687
|
+
StylePanelArrowKindPicker,
|
|
688
|
+
StylePanelArrowheadPicker,
|
|
689
|
+
StylePanelButtonPicker,
|
|
690
|
+
StylePanelColorPicker,
|
|
691
|
+
StylePanelContextProvider,
|
|
692
|
+
StylePanelDashPicker,
|
|
693
|
+
StylePanelDoubleDropdownPicker,
|
|
694
|
+
StylePanelDropdownPicker,
|
|
695
|
+
StylePanelFillPicker,
|
|
696
|
+
StylePanelFontPicker,
|
|
697
|
+
StylePanelGeoShapePicker,
|
|
698
|
+
StylePanelLabelAlignPicker,
|
|
699
|
+
StylePanelOpacityPicker,
|
|
700
|
+
StylePanelSection,
|
|
701
|
+
StylePanelSizePicker,
|
|
702
|
+
StylePanelSplinePicker,
|
|
703
|
+
StylePanelSubheading,
|
|
704
|
+
StylePanelTextAlignPicker,
|
|
677
705
|
TEXT_PROPS,
|
|
678
706
|
TLDRAW_FILE_EXTENSION,
|
|
679
707
|
TLV1AlignStyle,
|
|
@@ -685,10 +713,8 @@ export {
|
|
|
685
713
|
TLV1ShapeType,
|
|
686
714
|
TLV1SizeStyle,
|
|
687
715
|
TextDirection,
|
|
688
|
-
TextLabel,
|
|
689
716
|
TextShapeTool,
|
|
690
717
|
TextShapeUtil,
|
|
691
|
-
TextStylePickerSet,
|
|
692
718
|
TextToolbarItem,
|
|
693
719
|
Tldraw,
|
|
694
720
|
TldrawArrowHints,
|
|
@@ -705,7 +731,6 @@ export {
|
|
|
705
731
|
TldrawUiButtonCheck,
|
|
706
732
|
TldrawUiButtonIcon,
|
|
707
733
|
TldrawUiButtonLabel,
|
|
708
|
-
TldrawUiButtonPicker,
|
|
709
734
|
TldrawUiColumn,
|
|
710
735
|
TldrawUiComponentsProvider,
|
|
711
736
|
TldrawUiContextProvider,
|
|
@@ -809,7 +834,6 @@ export {
|
|
|
809
834
|
downsizeImage,
|
|
810
835
|
embedShapePermissionDefaults,
|
|
811
836
|
exportAs,
|
|
812
|
-
exportToBlob,
|
|
813
837
|
fitFrameToContent,
|
|
814
838
|
getArrowBindings,
|
|
815
839
|
getArrowInfo,
|
|
@@ -845,7 +869,6 @@ export {
|
|
|
845
869
|
unwrapLabel,
|
|
846
870
|
useA11y,
|
|
847
871
|
useActions,
|
|
848
|
-
useAsset,
|
|
849
872
|
useAssetUrls,
|
|
850
873
|
useBreakpoint,
|
|
851
874
|
useCanRedo,
|
|
@@ -858,7 +881,6 @@ export {
|
|
|
858
881
|
useDialogs,
|
|
859
882
|
useEditablePlainText,
|
|
860
883
|
useEditableRichText,
|
|
861
|
-
useEditableText,
|
|
862
884
|
useExportAs,
|
|
863
885
|
useImageOrVideoAsset,
|
|
864
886
|
useIsToolSelected,
|
|
@@ -872,6 +894,7 @@ export {
|
|
|
872
894
|
useRelevantStyles,
|
|
873
895
|
useSelectedShapesAnnouncer,
|
|
874
896
|
useShowCollaborationUi,
|
|
897
|
+
useStylePanelContext,
|
|
875
898
|
useTldrawUiComponents,
|
|
876
899
|
useTldrawUiOrientation,
|
|
877
900
|
useToasts,
|