@ibodr/draw 0.1.1 → 0.1.4
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/index.d.ts +24 -3
- package/dist/index.mjs +399 -213
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useMaybeEditor, uniqueId, useValue, assert, useReactor, unsafe__withoutCapture, useContainer, debugFlags, objectMapValues, WeakCache, tltime, tlenv, track, useEditor, usePassThroughWheelEvents, useEditorComponents, preventDefault, PageRecordType, setPointerCapture, releasePointerCapture, usePresence, USER_COLORS, modulate, isEqual, approximately, Box, debounce, isEqualAllowingForFloatingPointErrors, createComputedCache as createComputedCache$1, useUniqueSafeId, useEvent, toRichText, Vec, getChangedKeys, useSharedSafeId, useIsEditing, toDomPrecision, LruCache, HTMLContainer, MediaHelpers, Image, getGlobalDocument,
|
|
1
|
+
import { useMaybeEditor, uniqueId, useValue, assert, useReactor, unsafe__withoutCapture, useContainer, debugFlags, objectMapValues, WeakCache, tltime, tlenv, track, useEditor, usePassThroughWheelEvents, useEditorComponents, preventDefault, PageRecordType, setPointerCapture, releasePointerCapture, usePresence, USER_COLORS, modulate, isEqual, approximately, Box, debounce, isEqualAllowingForFloatingPointErrors, createComputedCache as createComputedCache$1, useUniqueSafeId, useEvent, toRichText, Vec, getChangedKeys, useSharedSafeId, useIsEditing, toDomPrecision, LruCache, HTMLContainer, MediaHelpers, Image, getGlobalDocument, defaultUserPreferences, useShallowArrayIdentity, mergeArraysAndReplaceDefaults, useDrStore, Editor as Editor$1, T, registerDrawLibraryVersion, safeParseUrl, useGlobalMenuIsOpen, getFromLocalStorage, setInLocalStorage, getIndexAbove, getIndexBelow, getIndexBetween, exhaustiveSwitchError, getOwnerWindow, DefaultColorStyle, getColorValue, tlmenus, SharedStyleMap, DefaultDashStyle, DefaultFillStyle, DefaultSizeStyle, kickoutOccludedShapes, usePassThroughMouseOverEvents, useAtom, react, lerp, isSafeFloat, Mat, isAccelKey, openWindow, Polyline2d, Arc2d, Edge2d, useSvgExportContext, useColorMode, getVerticesCountForArcLength, Group2d, assertExists, clamp, rng, canonicalizeRotation, getPolygonVertices, useDelaySvgExport, noop, getGlobalWindow, useShallowObjectIdentity, objectMapEntries, GeoShapeGeoStyle, ShapeUtil, textShapeProps, textShapeMigrations, Rectangle2d, getFontsFromRichText, resizeScaled, BaseBoxShapeUtil, bookmarkShapeProps, bookmarkShapeMigrations, drawShapeProps, drawShapeMigrations, Circle2d, Polygon2d, SVGContainer, last, geoShapeProps, geoShapeMigrations, EMPTY_ARRAY, noteShapeProps, noteShapeMigrations, DefaultFontFamilies, lineShapeProps, lineShapeMigrations, getIndices, sortByIndex, mapObjectMapValues, maybeSnapToGrid, ZERO_INDEX_KEY, BaseFrameLikeShapeUtil, frameShapeProps, frameShapeMigrations, compact, arrowShapeProps, arrowShapeMigrations, invLerp, structuredClone, highlightShapeProps, highlightShapeMigrations, tlenvReactive, embedShapeProps, embedShapeMigrations, resizeBox, imageShapeProps, imageShapeMigrations, createShapeId, Ellipse2d, videoShapeProps, videoShapeMigrations, BindingUtil, arrowBindingProps, arrowBindingMigrations, getOwnProperty, atom, DefaultSpinner, elementShouldCaptureKeys, minBy, DefaultFontStyle, DefaultTextAlignStyle, DefaultHorizontalAlignStyle, DefaultVerticalAlignStyle, ArrowShapeKindStyle, ArrowShapeArrowheadEndStyle, ArrowShapeArrowheadStartStyle, LineShapeSplineStyle, activeElementShouldCaptureKeys, Geometry2dFilters, pointInPolygon, intersectLineSegmentPolygon, centerOfCircleFromThreePoints, clockwiseAngleDist, counterClockwiseAngleDist, PI, getPointerInfo, intersectCircleCircle, HALF_PI, suffixSafeId, getPerfectDashProps, Geometry2d, CubicBezier2d, LANGUAGES, usePeerIds, normalizeWheel, getIndicesBetween, AssetRecordType, getHashForString, precise, average, b64Vecs, computed, objectMapKeys, intersectLineSegmentCircle, EASINGS, fetch, FileHelpers, isFontEntry, PI2, isDefined, hardResetEditor, sanitizeId, Result, transact, isShapeId, richTextValidator, featureFlags, useQuickReactor, objectMapFromEntries, uniq, ShapeIndicatorOverlayUtil, createBindingId, getHashForBuffer, bind, getPointOnCircle, AssetUtil, bookmarkAssetProps, bookmarkAssetMigrations, clampToBrowserMaxCanvasSize, imageAssetProps, imageAssetMigrations, DEFAULT_SUPPORTED_IMAGE_TYPES, videoAssetProps, videoAssetMigrations, DEFAULT_SUPPORT_VIDEO_TYPES, OverlayUtil, getOverlayDisplayValues, getSvgPathFromPoints, strokeShapeIndicators, SIDES, rangeIntersection, StateNode, BaseBoxShapeTool, DrawEditor, useOnMount, createDrStore, MigrationFailureReason, toFixed, snapAngle, isPageId, polygonsIntersect, areAnglesCompatible, getRotationSnapshot, applyRotationToSnapshotShapes, shortAngleDist, degreesToRadians, warnOnce, LoadingScreen as LoadingScreen$1, SIN, throttle } from '@ibodr/editor';
|
|
2
2
|
export * from '@ibodr/editor';
|
|
3
3
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import * as React4 from 'react';
|
|
@@ -20922,6 +20922,18 @@ var CollaboratorHintOverlayUtil = class extends OverlayUtil {
|
|
|
20922
20922
|
return !(cursor.x < viewport.minX - 12 / zoom || cursor.y < viewport.minY - 16 / zoom || cursor.x > viewport.maxX - 12 / zoom || cursor.y > viewport.maxY - 16 / zoom);
|
|
20923
20923
|
}
|
|
20924
20924
|
};
|
|
20925
|
+
|
|
20926
|
+
// src/lib/components/collaborator-cursors/getCollaboratorCursorScale.ts
|
|
20927
|
+
var DEFAULT_MIN_CURSOR_SCALE = 0.85;
|
|
20928
|
+
var DEFAULT_MAX_CURSOR_SCALE = 12;
|
|
20929
|
+
function getCollaboratorCursorScale(zoom, options = {}) {
|
|
20930
|
+
const minScale = options.minScale ?? DEFAULT_MIN_CURSOR_SCALE;
|
|
20931
|
+
const maxScale = options.maxScale ?? DEFAULT_MAX_CURSOR_SCALE;
|
|
20932
|
+
if (!Number.isFinite(zoom) || zoom <= 0) return 1;
|
|
20933
|
+
return Math.min(Math.max(1 / zoom, minScale), maxScale);
|
|
20934
|
+
}
|
|
20935
|
+
|
|
20936
|
+
// src/lib/overlays/CollaboratorCursorOverlayUtil.ts
|
|
20925
20937
|
var _shadowHead = null;
|
|
20926
20938
|
var _shadowTail = null;
|
|
20927
20939
|
var _whiteHead = null;
|
|
@@ -20954,7 +20966,14 @@ function getLabelFontFamily(editorContainer, editorWindow) {
|
|
|
20954
20966
|
}
|
|
20955
20967
|
var CollaboratorCursorOverlayUtil = class extends OverlayUtil {
|
|
20956
20968
|
static type = "collaborator_cursor";
|
|
20957
|
-
options = {
|
|
20969
|
+
options = {
|
|
20970
|
+
zIndex: 1100,
|
|
20971
|
+
fontSize: 12,
|
|
20972
|
+
nameMaxWidth: 120,
|
|
20973
|
+
chatMaxWidth: 200,
|
|
20974
|
+
minCursorScale: 0.85,
|
|
20975
|
+
maxCursorScale: 12
|
|
20976
|
+
};
|
|
20958
20977
|
// Cache truncated text results to avoid repeated measureText loops.
|
|
20959
20978
|
// Key format: `${maxWidth}|${text}` with an upper bound on cache size.
|
|
20960
20979
|
// Per-editor so multiple <Draw /> instances on one page don't trample
|
|
@@ -20984,7 +21003,10 @@ var CollaboratorCursorOverlayUtil = class extends OverlayUtil {
|
|
|
20984
21003
|
}
|
|
20985
21004
|
render(ctx, overlays) {
|
|
20986
21005
|
const zoom = this.editor.getZoomLevel();
|
|
20987
|
-
const scale =
|
|
21006
|
+
const scale = getCollaboratorCursorScale(zoom, {
|
|
21007
|
+
minScale: this.options.minCursorScale,
|
|
21008
|
+
maxScale: this.options.maxCursorScale
|
|
21009
|
+
});
|
|
20988
21010
|
const viewport = this.editor.getViewportPageBounds();
|
|
20989
21011
|
const viewportMarginX = 12 / zoom;
|
|
20990
21012
|
const viewportMarginY = 16 / zoom;
|
|
@@ -21115,6 +21137,168 @@ var CollaboratorCursorOverlayUtil = class extends OverlayUtil {
|
|
|
21115
21137
|
return result;
|
|
21116
21138
|
}
|
|
21117
21139
|
};
|
|
21140
|
+
function DefaultCollaboratorCursor({
|
|
21141
|
+
point,
|
|
21142
|
+
color,
|
|
21143
|
+
name,
|
|
21144
|
+
chatMessage,
|
|
21145
|
+
scale
|
|
21146
|
+
}) {
|
|
21147
|
+
return /* @__PURE__ */ jsxs(
|
|
21148
|
+
"div",
|
|
21149
|
+
{
|
|
21150
|
+
style: {
|
|
21151
|
+
position: "absolute",
|
|
21152
|
+
left: point.x,
|
|
21153
|
+
top: point.y,
|
|
21154
|
+
pointerEvents: "none",
|
|
21155
|
+
transform: `scale(${scale})`,
|
|
21156
|
+
transformOrigin: "0 0",
|
|
21157
|
+
display: "flex",
|
|
21158
|
+
flexDirection: "column",
|
|
21159
|
+
alignItems: "flex-start",
|
|
21160
|
+
zIndex: 1100
|
|
21161
|
+
},
|
|
21162
|
+
children: [
|
|
21163
|
+
/* @__PURE__ */ jsxs(
|
|
21164
|
+
"svg",
|
|
21165
|
+
{
|
|
21166
|
+
width: "20",
|
|
21167
|
+
height: "20",
|
|
21168
|
+
viewBox: "0 0 20 20",
|
|
21169
|
+
style: {
|
|
21170
|
+
overflow: "visible",
|
|
21171
|
+
transform: "translate(-12px, -12px)",
|
|
21172
|
+
filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"
|
|
21173
|
+
},
|
|
21174
|
+
"aria-hidden": true,
|
|
21175
|
+
children: [
|
|
21176
|
+
/* @__PURE__ */ jsx(
|
|
21177
|
+
"path",
|
|
21178
|
+
{
|
|
21179
|
+
d: "M 1 13.4219 V -2.593 L 12.591 9.026 H 5.81 L 5.399 9.15 Z",
|
|
21180
|
+
fill: "rgba(0,0,0,0.2)"
|
|
21181
|
+
}
|
|
21182
|
+
),
|
|
21183
|
+
/* @__PURE__ */ jsx(
|
|
21184
|
+
"path",
|
|
21185
|
+
{
|
|
21186
|
+
d: "M 10.0595 13.9498 L 6.3715 15.4978 L 2.4965 6.2803 L 6.1845 4.7323 Z",
|
|
21187
|
+
fill: "rgba(0,0,0,0.2)"
|
|
21188
|
+
}
|
|
21189
|
+
),
|
|
21190
|
+
/* @__PURE__ */ jsx(
|
|
21191
|
+
"path",
|
|
21192
|
+
{
|
|
21193
|
+
d: "M 0 12.4219 V -3.593 L 11.591 8.026 H 4.81 L 4.399 8.15 Z",
|
|
21194
|
+
fill: "#ffffff"
|
|
21195
|
+
}
|
|
21196
|
+
),
|
|
21197
|
+
/* @__PURE__ */ jsx(
|
|
21198
|
+
"path",
|
|
21199
|
+
{
|
|
21200
|
+
d: "M 9.0595 12.9498 L 5.3715 14.4978 L 1.4965 5.2803 L 5.1845 3.7323 Z",
|
|
21201
|
+
fill: "#ffffff"
|
|
21202
|
+
}
|
|
21203
|
+
),
|
|
21204
|
+
/* @__PURE__ */ jsx("path", { d: "M 1 -1.186 V 10.002 L 3.969 7.136 L 4.397 6.997 H 9.165 Z", fill: color }),
|
|
21205
|
+
/* @__PURE__ */ jsx("path", { d: "M 7.751 12.4155 L 5.907 13.1895 L 2.807 5.8155 L 4.648 5.0405 Z", fill: color })
|
|
21206
|
+
]
|
|
21207
|
+
}
|
|
21208
|
+
),
|
|
21209
|
+
chatMessage ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21210
|
+
name ? /* @__PURE__ */ jsx(
|
|
21211
|
+
"div",
|
|
21212
|
+
{
|
|
21213
|
+
style: {
|
|
21214
|
+
marginLeft: 13,
|
|
21215
|
+
marginTop: -2,
|
|
21216
|
+
color,
|
|
21217
|
+
fontSize: 12,
|
|
21218
|
+
fontWeight: 600,
|
|
21219
|
+
textShadow: "0 0 3px #fff, 0 0 3px #fff",
|
|
21220
|
+
maxWidth: 120,
|
|
21221
|
+
overflow: "hidden",
|
|
21222
|
+
textOverflow: "ellipsis",
|
|
21223
|
+
whiteSpace: "nowrap"
|
|
21224
|
+
},
|
|
21225
|
+
children: name
|
|
21226
|
+
}
|
|
21227
|
+
) : null,
|
|
21228
|
+
/* @__PURE__ */ jsx(
|
|
21229
|
+
"div",
|
|
21230
|
+
{
|
|
21231
|
+
style: {
|
|
21232
|
+
marginLeft: 13,
|
|
21233
|
+
marginTop: 4,
|
|
21234
|
+
padding: "3px 6px",
|
|
21235
|
+
backgroundColor: color,
|
|
21236
|
+
color: "#fff",
|
|
21237
|
+
fontSize: 12,
|
|
21238
|
+
fontWeight: 600,
|
|
21239
|
+
borderRadius: 4,
|
|
21240
|
+
maxWidth: 200,
|
|
21241
|
+
overflow: "hidden",
|
|
21242
|
+
textOverflow: "ellipsis",
|
|
21243
|
+
whiteSpace: "nowrap"
|
|
21244
|
+
},
|
|
21245
|
+
children: chatMessage
|
|
21246
|
+
}
|
|
21247
|
+
)
|
|
21248
|
+
] }) : name ? /* @__PURE__ */ jsx(
|
|
21249
|
+
"div",
|
|
21250
|
+
{
|
|
21251
|
+
style: {
|
|
21252
|
+
marginLeft: 13,
|
|
21253
|
+
marginTop: 4,
|
|
21254
|
+
padding: "3px 6px",
|
|
21255
|
+
backgroundColor: color,
|
|
21256
|
+
color: "#fff",
|
|
21257
|
+
fontSize: 12,
|
|
21258
|
+
fontWeight: 600,
|
|
21259
|
+
borderRadius: 4,
|
|
21260
|
+
maxWidth: 120,
|
|
21261
|
+
overflow: "hidden",
|
|
21262
|
+
textOverflow: "ellipsis",
|
|
21263
|
+
whiteSpace: "nowrap"
|
|
21264
|
+
},
|
|
21265
|
+
children: name
|
|
21266
|
+
}
|
|
21267
|
+
) : null
|
|
21268
|
+
]
|
|
21269
|
+
}
|
|
21270
|
+
);
|
|
21271
|
+
}
|
|
21272
|
+
var CollaboratorCursors = track(function CollaboratorCursors2() {
|
|
21273
|
+
const editor = useEditor();
|
|
21274
|
+
const { CollaboratorCursor: CursorComponent = DefaultCollaboratorCursor } = useEditorComponents();
|
|
21275
|
+
if (!CursorComponent) return null;
|
|
21276
|
+
const zoom = editor.getZoomLevel();
|
|
21277
|
+
const scale = getCollaboratorCursorScale(zoom);
|
|
21278
|
+
const container = editor.getContainer();
|
|
21279
|
+
const containerRect = container.getBoundingClientRect();
|
|
21280
|
+
return /* @__PURE__ */ jsx(Fragment, { children: editor.getVisibleCollaboratorsOnCurrentPage().map((presence) => {
|
|
21281
|
+
const { cursor, color, userName, chatMessage, userId } = presence;
|
|
21282
|
+
if (!cursor) return null;
|
|
21283
|
+
const screenPoint = editor.pageToScreen({ x: cursor.x, y: cursor.y });
|
|
21284
|
+
const point = {
|
|
21285
|
+
x: screenPoint.x - containerRect.left,
|
|
21286
|
+
y: screenPoint.y - containerRect.top
|
|
21287
|
+
};
|
|
21288
|
+
const name = userName && userName !== "New User" ? userName : null;
|
|
21289
|
+
return /* @__PURE__ */ jsx(
|
|
21290
|
+
CursorComponent,
|
|
21291
|
+
{
|
|
21292
|
+
point,
|
|
21293
|
+
color,
|
|
21294
|
+
name,
|
|
21295
|
+
chatMessage: chatMessage ?? void 0,
|
|
21296
|
+
scale
|
|
21297
|
+
},
|
|
21298
|
+
userId
|
|
21299
|
+
);
|
|
21300
|
+
}) });
|
|
21301
|
+
});
|
|
21118
21302
|
var CollaboratorShapeIndicatorOverlayUtil = class extends OverlayUtil {
|
|
21119
21303
|
static type = "collaborator_shape_indicator";
|
|
21120
21304
|
options = { zIndex: 49, lineWidth: 1.5, alpha: 0.7 };
|
|
@@ -21874,8 +22058,7 @@ var defaultOverlayUtils = [
|
|
|
21874
22058
|
CollaboratorScribbleOverlayUtil,
|
|
21875
22059
|
CollaboratorHintOverlayUtil,
|
|
21876
22060
|
ArrowHintOverlayUtil,
|
|
21877
|
-
ArrowBindingHintOverlayUtil
|
|
21878
|
-
CollaboratorCursorOverlayUtil
|
|
22061
|
+
ArrowBindingHintOverlayUtil
|
|
21879
22062
|
];
|
|
21880
22063
|
var Idle = class extends StateNode {
|
|
21881
22064
|
static id = "idle";
|
|
@@ -34998,25 +35181,13 @@ var PlainTextLabel = React4__default.memo(function PlainTextLabel2({
|
|
|
34998
35181
|
);
|
|
34999
35182
|
});
|
|
35000
35183
|
var defaultEditorAssetUrls = {
|
|
35001
|
-
fonts: {
|
|
35002
|
-
draw_mono: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexMono-Medium.woff2`,
|
|
35003
|
-
draw_mono_italic: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexMono-MediumItalic.woff2`,
|
|
35004
|
-
draw_mono_bold: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexMono-Bold.woff2`,
|
|
35005
|
-
draw_mono_italic_bold: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexMono-BoldItalic.woff2`,
|
|
35006
|
-
draw_serif: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexSerif-Medium.woff2`,
|
|
35007
|
-
draw_serif_italic: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexSerif-MediumItalic.woff2`,
|
|
35008
|
-
draw_serif_bold: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexSerif-Bold.woff2`,
|
|
35009
|
-
draw_serif_italic_bold: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexSerif-BoldItalic.woff2`,
|
|
35010
|
-
draw_sans: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexSans-Medium.woff2`,
|
|
35011
|
-
draw_sans_italic: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexSans-MediumItalic.woff2`,
|
|
35012
|
-
draw_sans_bold: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexSans-Bold.woff2`,
|
|
35013
|
-
draw_sans_italic_bold: `${getDefaultCdnBaseUrl()}/fonts/IBMPlexSans-BoldItalic.woff2`,
|
|
35014
|
-
draw_draw: `${getDefaultCdnBaseUrl()}/fonts/Shantell_Sans-Informal_Regular.woff2`,
|
|
35015
|
-
draw_draw_italic: `${getDefaultCdnBaseUrl()}/fonts/Shantell_Sans-Informal_Regular_Italic.woff2`,
|
|
35016
|
-
draw_draw_bold: `${getDefaultCdnBaseUrl()}/fonts/Shantell_Sans-Informal_Bold.woff2`,
|
|
35017
|
-
draw_draw_italic_bold: `${getDefaultCdnBaseUrl()}/fonts/Shantell_Sans-Informal_Bold_Italic.woff2`
|
|
35018
|
-
}
|
|
35184
|
+
fonts: {}
|
|
35019
35185
|
};
|
|
35186
|
+
function hasExternalFontUrls(fonts) {
|
|
35187
|
+
return Object.values(fonts ?? {}).some(
|
|
35188
|
+
(url) => typeof url === "string" && (url.startsWith("http://") || url.startsWith("https://"))
|
|
35189
|
+
);
|
|
35190
|
+
}
|
|
35020
35191
|
function setDefaultEditorAssetUrls(assetUrls) {
|
|
35021
35192
|
defaultEditorAssetUrls = assetUrls;
|
|
35022
35193
|
}
|
|
@@ -35029,185 +35200,12 @@ function useDefaultEditorAssetsWithOverrides(overrides) {
|
|
|
35029
35200
|
}, [overrides]);
|
|
35030
35201
|
}
|
|
35031
35202
|
|
|
35032
|
-
// src/lib/ui/icon-types.ts
|
|
35033
|
-
var iconTypes = [
|
|
35034
|
-
"align-bottom",
|
|
35035
|
-
"align-center-horizontal",
|
|
35036
|
-
"align-center-vertical",
|
|
35037
|
-
"align-left",
|
|
35038
|
-
"align-right",
|
|
35039
|
-
"align-top",
|
|
35040
|
-
"alt",
|
|
35041
|
-
"arrow-arc",
|
|
35042
|
-
"arrow-cycle",
|
|
35043
|
-
"arrow-elbow",
|
|
35044
|
-
"arrow-left",
|
|
35045
|
-
"arrowhead-arrow",
|
|
35046
|
-
"arrowhead-bar",
|
|
35047
|
-
"arrowhead-diamond",
|
|
35048
|
-
"arrowhead-dot",
|
|
35049
|
-
"arrowhead-none",
|
|
35050
|
-
"arrowhead-square",
|
|
35051
|
-
"arrowhead-triangle-inverted",
|
|
35052
|
-
"arrowhead-triangle",
|
|
35053
|
-
"blob",
|
|
35054
|
-
"bold",
|
|
35055
|
-
"bookmark",
|
|
35056
|
-
"bring-forward",
|
|
35057
|
-
"bring-to-front",
|
|
35058
|
-
"broken",
|
|
35059
|
-
"bulletList",
|
|
35060
|
-
"check-circle",
|
|
35061
|
-
"check",
|
|
35062
|
-
"chevron-down",
|
|
35063
|
-
"chevron-left",
|
|
35064
|
-
"chevron-right",
|
|
35065
|
-
"chevron-up",
|
|
35066
|
-
"chevrons-ne",
|
|
35067
|
-
"chevrons-sw",
|
|
35068
|
-
"clipboard-copied",
|
|
35069
|
-
"clipboard-copy",
|
|
35070
|
-
"code",
|
|
35071
|
-
"color",
|
|
35072
|
-
"comment",
|
|
35073
|
-
"corners",
|
|
35074
|
-
"crop",
|
|
35075
|
-
"cross-2",
|
|
35076
|
-
"cross-circle",
|
|
35077
|
-
"dash-dashed",
|
|
35078
|
-
"dash-dotted",
|
|
35079
|
-
"dash-draw",
|
|
35080
|
-
"dash-solid",
|
|
35081
|
-
"disconnected",
|
|
35082
|
-
"discord",
|
|
35083
|
-
"distribute-horizontal",
|
|
35084
|
-
"distribute-vertical",
|
|
35085
|
-
"dot",
|
|
35086
|
-
"dots-horizontal",
|
|
35087
|
-
"dots-vertical",
|
|
35088
|
-
"download",
|
|
35089
|
-
"drag-handle-dots",
|
|
35090
|
-
"duplicate",
|
|
35091
|
-
"edit",
|
|
35092
|
-
"external-link",
|
|
35093
|
-
"fill-fill",
|
|
35094
|
-
"fill-lined-fill",
|
|
35095
|
-
"fill-none",
|
|
35096
|
-
"fill-pattern",
|
|
35097
|
-
"fill-semi",
|
|
35098
|
-
"fill-solid",
|
|
35099
|
-
"follow",
|
|
35100
|
-
"following",
|
|
35101
|
-
"font-draw",
|
|
35102
|
-
"font-mono",
|
|
35103
|
-
"font-sans",
|
|
35104
|
-
"font-serif",
|
|
35105
|
-
"geo-arrow-down",
|
|
35106
|
-
"geo-arrow-left",
|
|
35107
|
-
"geo-arrow-right",
|
|
35108
|
-
"geo-arrow-up",
|
|
35109
|
-
"geo-check-box",
|
|
35110
|
-
"geo-cloud",
|
|
35111
|
-
"geo-diamond",
|
|
35112
|
-
"geo-ellipse",
|
|
35113
|
-
"geo-heart",
|
|
35114
|
-
"geo-hexagon",
|
|
35115
|
-
"geo-octagon",
|
|
35116
|
-
"geo-oval",
|
|
35117
|
-
"geo-pentagon",
|
|
35118
|
-
"geo-rectangle",
|
|
35119
|
-
"geo-rhombus-2",
|
|
35120
|
-
"geo-rhombus",
|
|
35121
|
-
"geo-star",
|
|
35122
|
-
"geo-trapezoid",
|
|
35123
|
-
"geo-triangle",
|
|
35124
|
-
"geo-x-box",
|
|
35125
|
-
"github",
|
|
35126
|
-
"group",
|
|
35127
|
-
"heading",
|
|
35128
|
-
"help-circle",
|
|
35129
|
-
"highlight",
|
|
35130
|
-
"horizontal-align-end",
|
|
35131
|
-
"horizontal-align-middle",
|
|
35132
|
-
"horizontal-align-start",
|
|
35133
|
-
"info-circle",
|
|
35134
|
-
"italic",
|
|
35135
|
-
"leading",
|
|
35136
|
-
"link",
|
|
35137
|
-
"list",
|
|
35138
|
-
"lock",
|
|
35139
|
-
"manual",
|
|
35140
|
-
"menu",
|
|
35141
|
-
"minus",
|
|
35142
|
-
"mixed",
|
|
35143
|
-
"pack",
|
|
35144
|
-
"plus",
|
|
35145
|
-
"question-mark-circle",
|
|
35146
|
-
"question-mark",
|
|
35147
|
-
"redo",
|
|
35148
|
-
"reset-zoom",
|
|
35149
|
-
"rotate-ccw",
|
|
35150
|
-
"rotate-cw",
|
|
35151
|
-
"send-backward",
|
|
35152
|
-
"send-to-back",
|
|
35153
|
-
"share-1",
|
|
35154
|
-
"size-extra-large",
|
|
35155
|
-
"size-large",
|
|
35156
|
-
"size-medium",
|
|
35157
|
-
"size-small",
|
|
35158
|
-
"spline-cubic",
|
|
35159
|
-
"spline-line",
|
|
35160
|
-
"stack-horizontal",
|
|
35161
|
-
"stack-vertical",
|
|
35162
|
-
"status-offline",
|
|
35163
|
-
"stretch-horizontal",
|
|
35164
|
-
"stretch-vertical",
|
|
35165
|
-
"strike",
|
|
35166
|
-
"text-align-center",
|
|
35167
|
-
"text-align-left",
|
|
35168
|
-
"text-align-right",
|
|
35169
|
-
"toggle-off",
|
|
35170
|
-
"toggle-on",
|
|
35171
|
-
"tool-arrow",
|
|
35172
|
-
"tool-eraser",
|
|
35173
|
-
"tool-frame",
|
|
35174
|
-
"tool-hand",
|
|
35175
|
-
"tool-highlight",
|
|
35176
|
-
"tool-laser",
|
|
35177
|
-
"tool-line",
|
|
35178
|
-
"tool-media",
|
|
35179
|
-
"tool-note",
|
|
35180
|
-
"tool-pencil",
|
|
35181
|
-
"tool-pointer",
|
|
35182
|
-
"tool-screenshot",
|
|
35183
|
-
"tool-text",
|
|
35184
|
-
"trash",
|
|
35185
|
-
"twitter",
|
|
35186
|
-
"underline",
|
|
35187
|
-
"undo",
|
|
35188
|
-
"ungroup",
|
|
35189
|
-
"unlock",
|
|
35190
|
-
"vertical-align-end",
|
|
35191
|
-
"vertical-align-middle",
|
|
35192
|
-
"vertical-align-start",
|
|
35193
|
-
"warning-triangle",
|
|
35194
|
-
"zoom-in",
|
|
35195
|
-
"zoom-out"
|
|
35196
|
-
];
|
|
35197
|
-
|
|
35198
35203
|
// src/lib/ui/assetUrls.ts
|
|
35199
35204
|
var defaultUiAssetUrls = {
|
|
35200
35205
|
...defaultEditorAssetUrls,
|
|
35201
|
-
icons:
|
|
35202
|
-
iconTypes.map((name) => [name, `${getDefaultCdnBaseUrl()}/icons/icon/0_merged.svg#${name}`])
|
|
35203
|
-
),
|
|
35206
|
+
icons: {},
|
|
35204
35207
|
translations: {},
|
|
35205
|
-
embedIcons:
|
|
35206
|
-
DEFAULT_EMBED_DEFINITIONS.map((def) => [
|
|
35207
|
-
def.type,
|
|
35208
|
-
`${getDefaultCdnBaseUrl()}/embed-icons/${def.type}.png`
|
|
35209
|
-
])
|
|
35210
|
-
)
|
|
35208
|
+
embedIcons: {}
|
|
35211
35209
|
};
|
|
35212
35210
|
function setDefaultUiAssetUrls(urls) {
|
|
35213
35211
|
defaultUiAssetUrls = urls;
|
|
@@ -35427,6 +35425,19 @@ function DrawUiInFrontOfTheCanvas() {
|
|
|
35427
35425
|
CursorChatBubble3 && /* @__PURE__ */ jsx(CursorChatBubble3, {})
|
|
35428
35426
|
] });
|
|
35429
35427
|
}
|
|
35428
|
+
function DrawInFrontOfTheCanvas({
|
|
35429
|
+
hideUi,
|
|
35430
|
+
CustomInFrontOfTheCanvas
|
|
35431
|
+
}) {
|
|
35432
|
+
const { CollaboratorCursors: Cursors } = useEditorComponents();
|
|
35433
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35434
|
+
Cursors ? /* @__PURE__ */ jsx(Cursors, {}) : null,
|
|
35435
|
+
hideUi ? CustomInFrontOfTheCanvas ? /* @__PURE__ */ jsx(CustomInFrontOfTheCanvas, {}) : null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35436
|
+
/* @__PURE__ */ jsx(DrawUiInFrontOfTheCanvas, {}),
|
|
35437
|
+
CustomInFrontOfTheCanvas ? /* @__PURE__ */ jsx(CustomInFrontOfTheCanvas, {}) : null
|
|
35438
|
+
] })
|
|
35439
|
+
] });
|
|
35440
|
+
}
|
|
35430
35441
|
var allDefaultTools = [...defaultTools, ...defaultShapeTools];
|
|
35431
35442
|
function configureDefaultAssetUtils(assetUtils, overrides) {
|
|
35432
35443
|
const { maxImageDimension, acceptedImageMimeTypes, acceptedVideoMimeTypes } = overrides;
|
|
@@ -35475,17 +35486,21 @@ function Draw(props) {
|
|
|
35475
35486
|
const _components = useShallowObjectIdentity(components);
|
|
35476
35487
|
const CustomInFrontOfTheCanvas = components?.InFrontOfTheCanvas;
|
|
35477
35488
|
const InFrontOfTheCanvas = useMemo(() => {
|
|
35478
|
-
|
|
35479
|
-
|
|
35480
|
-
|
|
35481
|
-
|
|
35482
|
-
|
|
35483
|
-
|
|
35489
|
+
return function CombinedInFrontOfTheCanvas() {
|
|
35490
|
+
return /* @__PURE__ */ jsx(
|
|
35491
|
+
DrawInFrontOfTheCanvas,
|
|
35492
|
+
{
|
|
35493
|
+
hideUi: rest.hideUi,
|
|
35494
|
+
CustomInFrontOfTheCanvas
|
|
35495
|
+
}
|
|
35496
|
+
);
|
|
35497
|
+
};
|
|
35484
35498
|
}, [rest.hideUi, CustomInFrontOfTheCanvas]);
|
|
35485
35499
|
const componentsWithDefault = useMemo(
|
|
35486
35500
|
() => ({
|
|
35487
35501
|
Spinner,
|
|
35488
35502
|
LoadingScreen,
|
|
35503
|
+
CollaboratorCursors: _components.CollaboratorCursors === void 0 ? CollaboratorCursors : _components.CollaboratorCursors,
|
|
35489
35504
|
..._components,
|
|
35490
35505
|
InFrontOfTheCanvas
|
|
35491
35506
|
}),
|
|
@@ -35548,6 +35563,7 @@ function Draw(props) {
|
|
|
35548
35563
|
[_imageMimeTypes, _videoMimeTypes]
|
|
35549
35564
|
);
|
|
35550
35565
|
const assets = useDefaultEditorAssetsWithOverrides(rest.assetUrls);
|
|
35566
|
+
const preloadDefaultFonts = hasExternalFontUrls(assets.fonts);
|
|
35551
35567
|
const embedShapeUtil = shapeUtilsWithDefaults.find((util) => util.type === "embed");
|
|
35552
35568
|
if (embedShapeUtil && embeds) {
|
|
35553
35569
|
EmbedShapeUtil.setEmbedDefinitions(embeds);
|
|
@@ -35582,6 +35598,7 @@ function Draw(props) {
|
|
|
35582
35598
|
maxAssetSize,
|
|
35583
35599
|
acceptedImageMimeTypes: _imageMimeTypes,
|
|
35584
35600
|
acceptedVideoMimeTypes: _videoMimeTypes,
|
|
35601
|
+
preloadDefaultFonts,
|
|
35585
35602
|
onMount
|
|
35586
35603
|
}
|
|
35587
35604
|
),
|
|
@@ -35598,6 +35615,7 @@ function InsideOfEditorAndUiContext({
|
|
|
35598
35615
|
maxAssetSize,
|
|
35599
35616
|
acceptedImageMimeTypes,
|
|
35600
35617
|
acceptedVideoMimeTypes,
|
|
35618
|
+
preloadDefaultFonts,
|
|
35601
35619
|
onMount
|
|
35602
35620
|
}) {
|
|
35603
35621
|
const editor = useEditor();
|
|
@@ -35607,13 +35625,15 @@ function InsideOfEditorAndUiContext({
|
|
|
35607
35625
|
useOnMount(() => {
|
|
35608
35626
|
const unsubs = [];
|
|
35609
35627
|
unsubs.push(registerDefaultSideEffects(editor));
|
|
35610
|
-
|
|
35611
|
-
|
|
35612
|
-
|
|
35613
|
-
for (const
|
|
35614
|
-
const
|
|
35615
|
-
|
|
35616
|
-
|
|
35628
|
+
if (preloadDefaultFonts) {
|
|
35629
|
+
editor.fonts.requestFonts(allDefaultFontFaces);
|
|
35630
|
+
const themes = editor.getThemes();
|
|
35631
|
+
for (const theme of Object.values(themes)) {
|
|
35632
|
+
for (const key of Object.keys(theme.fonts)) {
|
|
35633
|
+
const font = theme.fonts[key];
|
|
35634
|
+
if (font.faces?.length) {
|
|
35635
|
+
editor.fonts.requestFonts(font.faces);
|
|
35636
|
+
}
|
|
35617
35637
|
}
|
|
35618
35638
|
}
|
|
35619
35639
|
}
|
|
@@ -35930,6 +35950,172 @@ function CenteredTopPanelContainer({
|
|
|
35930
35950
|
});
|
|
35931
35951
|
return /* @__PURE__ */ jsx("div", { ref, className: "tlui-top-panel__container", children });
|
|
35932
35952
|
}
|
|
35953
|
+
|
|
35954
|
+
// src/lib/ui/icon-types.ts
|
|
35955
|
+
var iconTypes = [
|
|
35956
|
+
"align-bottom",
|
|
35957
|
+
"align-center-horizontal",
|
|
35958
|
+
"align-center-vertical",
|
|
35959
|
+
"align-left",
|
|
35960
|
+
"align-right",
|
|
35961
|
+
"align-top",
|
|
35962
|
+
"alt",
|
|
35963
|
+
"arrow-arc",
|
|
35964
|
+
"arrow-cycle",
|
|
35965
|
+
"arrow-elbow",
|
|
35966
|
+
"arrow-left",
|
|
35967
|
+
"arrowhead-arrow",
|
|
35968
|
+
"arrowhead-bar",
|
|
35969
|
+
"arrowhead-diamond",
|
|
35970
|
+
"arrowhead-dot",
|
|
35971
|
+
"arrowhead-none",
|
|
35972
|
+
"arrowhead-square",
|
|
35973
|
+
"arrowhead-triangle-inverted",
|
|
35974
|
+
"arrowhead-triangle",
|
|
35975
|
+
"blob",
|
|
35976
|
+
"bold",
|
|
35977
|
+
"bookmark",
|
|
35978
|
+
"bring-forward",
|
|
35979
|
+
"bring-to-front",
|
|
35980
|
+
"broken",
|
|
35981
|
+
"bulletList",
|
|
35982
|
+
"check-circle",
|
|
35983
|
+
"check",
|
|
35984
|
+
"chevron-down",
|
|
35985
|
+
"chevron-left",
|
|
35986
|
+
"chevron-right",
|
|
35987
|
+
"chevron-up",
|
|
35988
|
+
"chevrons-ne",
|
|
35989
|
+
"chevrons-sw",
|
|
35990
|
+
"clipboard-copied",
|
|
35991
|
+
"clipboard-copy",
|
|
35992
|
+
"code",
|
|
35993
|
+
"color",
|
|
35994
|
+
"comment",
|
|
35995
|
+
"corners",
|
|
35996
|
+
"crop",
|
|
35997
|
+
"cross-2",
|
|
35998
|
+
"cross-circle",
|
|
35999
|
+
"dash-dashed",
|
|
36000
|
+
"dash-dotted",
|
|
36001
|
+
"dash-draw",
|
|
36002
|
+
"dash-solid",
|
|
36003
|
+
"disconnected",
|
|
36004
|
+
"discord",
|
|
36005
|
+
"distribute-horizontal",
|
|
36006
|
+
"distribute-vertical",
|
|
36007
|
+
"dot",
|
|
36008
|
+
"dots-horizontal",
|
|
36009
|
+
"dots-vertical",
|
|
36010
|
+
"download",
|
|
36011
|
+
"drag-handle-dots",
|
|
36012
|
+
"duplicate",
|
|
36013
|
+
"edit",
|
|
36014
|
+
"external-link",
|
|
36015
|
+
"fill-fill",
|
|
36016
|
+
"fill-lined-fill",
|
|
36017
|
+
"fill-none",
|
|
36018
|
+
"fill-pattern",
|
|
36019
|
+
"fill-semi",
|
|
36020
|
+
"fill-solid",
|
|
36021
|
+
"follow",
|
|
36022
|
+
"following",
|
|
36023
|
+
"font-draw",
|
|
36024
|
+
"font-mono",
|
|
36025
|
+
"font-sans",
|
|
36026
|
+
"font-serif",
|
|
36027
|
+
"geo-arrow-down",
|
|
36028
|
+
"geo-arrow-left",
|
|
36029
|
+
"geo-arrow-right",
|
|
36030
|
+
"geo-arrow-up",
|
|
36031
|
+
"geo-check-box",
|
|
36032
|
+
"geo-cloud",
|
|
36033
|
+
"geo-diamond",
|
|
36034
|
+
"geo-ellipse",
|
|
36035
|
+
"geo-heart",
|
|
36036
|
+
"geo-hexagon",
|
|
36037
|
+
"geo-octagon",
|
|
36038
|
+
"geo-oval",
|
|
36039
|
+
"geo-pentagon",
|
|
36040
|
+
"geo-rectangle",
|
|
36041
|
+
"geo-rhombus-2",
|
|
36042
|
+
"geo-rhombus",
|
|
36043
|
+
"geo-star",
|
|
36044
|
+
"geo-trapezoid",
|
|
36045
|
+
"geo-triangle",
|
|
36046
|
+
"geo-x-box",
|
|
36047
|
+
"github",
|
|
36048
|
+
"group",
|
|
36049
|
+
"heading",
|
|
36050
|
+
"help-circle",
|
|
36051
|
+
"highlight",
|
|
36052
|
+
"horizontal-align-end",
|
|
36053
|
+
"horizontal-align-middle",
|
|
36054
|
+
"horizontal-align-start",
|
|
36055
|
+
"info-circle",
|
|
36056
|
+
"italic",
|
|
36057
|
+
"leading",
|
|
36058
|
+
"link",
|
|
36059
|
+
"list",
|
|
36060
|
+
"lock",
|
|
36061
|
+
"manual",
|
|
36062
|
+
"menu",
|
|
36063
|
+
"minus",
|
|
36064
|
+
"mixed",
|
|
36065
|
+
"pack",
|
|
36066
|
+
"plus",
|
|
36067
|
+
"question-mark-circle",
|
|
36068
|
+
"question-mark",
|
|
36069
|
+
"redo",
|
|
36070
|
+
"reset-zoom",
|
|
36071
|
+
"rotate-ccw",
|
|
36072
|
+
"rotate-cw",
|
|
36073
|
+
"send-backward",
|
|
36074
|
+
"send-to-back",
|
|
36075
|
+
"share-1",
|
|
36076
|
+
"size-extra-large",
|
|
36077
|
+
"size-large",
|
|
36078
|
+
"size-medium",
|
|
36079
|
+
"size-small",
|
|
36080
|
+
"spline-cubic",
|
|
36081
|
+
"spline-line",
|
|
36082
|
+
"stack-horizontal",
|
|
36083
|
+
"stack-vertical",
|
|
36084
|
+
"status-offline",
|
|
36085
|
+
"stretch-horizontal",
|
|
36086
|
+
"stretch-vertical",
|
|
36087
|
+
"strike",
|
|
36088
|
+
"text-align-center",
|
|
36089
|
+
"text-align-left",
|
|
36090
|
+
"text-align-right",
|
|
36091
|
+
"toggle-off",
|
|
36092
|
+
"toggle-on",
|
|
36093
|
+
"tool-arrow",
|
|
36094
|
+
"tool-eraser",
|
|
36095
|
+
"tool-frame",
|
|
36096
|
+
"tool-hand",
|
|
36097
|
+
"tool-highlight",
|
|
36098
|
+
"tool-laser",
|
|
36099
|
+
"tool-line",
|
|
36100
|
+
"tool-media",
|
|
36101
|
+
"tool-note",
|
|
36102
|
+
"tool-pencil",
|
|
36103
|
+
"tool-pointer",
|
|
36104
|
+
"tool-screenshot",
|
|
36105
|
+
"tool-text",
|
|
36106
|
+
"trash",
|
|
36107
|
+
"twitter",
|
|
36108
|
+
"underline",
|
|
36109
|
+
"undo",
|
|
36110
|
+
"ungroup",
|
|
36111
|
+
"unlock",
|
|
36112
|
+
"vertical-align-end",
|
|
36113
|
+
"vertical-align-middle",
|
|
36114
|
+
"vertical-align-start",
|
|
36115
|
+
"warning-triangle",
|
|
36116
|
+
"zoom-in",
|
|
36117
|
+
"zoom-out"
|
|
36118
|
+
];
|
|
35933
36119
|
async function preloadFont(id, font, targetDocument) {
|
|
35934
36120
|
const {
|
|
35935
36121
|
url,
|
|
@@ -36972,7 +37158,7 @@ async function extractAssets(editor, snapshot, msg, addToast) {
|
|
|
36972
37158
|
// src/index.ts
|
|
36973
37159
|
registerDrawLibraryVersion(
|
|
36974
37160
|
"@ibodr/draw",
|
|
36975
|
-
"0.1.
|
|
37161
|
+
"0.1.4",
|
|
36976
37162
|
"esm"
|
|
36977
37163
|
);
|
|
36978
37164
|
/*!
|
|
@@ -36996,6 +37182,6 @@ registerDrawLibraryVersion(
|
|
|
36996
37182
|
* Source: https://github.com/jaywcjlove/hotkeys-js
|
|
36997
37183
|
*/
|
|
36998
37184
|
|
|
36999
|
-
export { ASPECT_RATIO_OPTIONS, ASPECT_RATIO_TO_VALUE, AccessibilityMenu, AlignMenuItems, ArrangeMenuSubmenu, ArrowBindingHintOverlayUtil, ArrowBindingUtil, ArrowDownToolbarItem, ArrowHintOverlayUtil, ArrowLeftToolbarItem, ArrowRightToolbarItem, ArrowShapeTool, ArrowShapeUtil, ArrowToolbarItem, ArrowUpToolbarItem, AssetToolbarItem, AssetUrlsProvider, BookmarkAssetUtil, BookmarkShapeUtil, BreakPointProvider, BrushOverlayUtil, CenteredTopPanelContainer, CheckBoxToolbarItem, ClipboardMenuGroup, CloudToolbarItem, CollaboratorBrushOverlayUtil, CollaboratorCursorOverlayUtil, CollaboratorHintOverlayUtil, CollaboratorScribbleOverlayUtil, CollaboratorShapeIndicatorOverlayUtil, ColorSchemeMenu, DefaultContextMenu as ContextMenu, ConversionsMenuGroup, ConvertToBookmarkMenuItem, ConvertToEmbedMenuItem, CopyAsMenuGroup, CopyMenuItem, CursorChatItem, CutMenuItem, DEFAULT_EMBED_DEFINITIONS, DEFAULT_MAX_ASSET_SIZE, DEFAULT_MAX_IMAGE_DIMENSION, DRAW_FILE_EXTENSION, DebugFlags, DefaultA11yAnnouncer, DefaultActionsMenu, DefaultActionsMenuContent, DefaultContextMenu, DefaultContextMenuContent, DefaultDebugMenu, DefaultDebugMenuContent, DefaultDialogs, DefaultFollowingIndicator, DefaultFontFaces, DefaultHelpMenu, DefaultHelpMenuContent, DefaultHelperButtons, DefaultHelperButtonsContent, DefaultImageToolbar, DefaultImageToolbarContent, DefaultKeyboardShortcutsDialog, DefaultKeyboardShortcutsDialogContent, DefaultMainMenu, DefaultMainMenuContent, DefaultMenuPanel, DefaultMinimap, DefaultNavigationPanel, DefaultPageMenu, DefaultPeopleMenu, DefaultPeopleMenuAvatar, DefaultPeopleMenuContent, DefaultPeopleMenuFacePile, DefaultPeopleMenuItem, DefaultQuickActions, DefaultQuickActionsContent, DefaultRichTextToolbar, DefaultRichTextToolbarContent, DefaultSharePanel, DefaultStylePanel, DefaultStylePanelContent, DefaultToasts, DefaultToolbar, DefaultToolbarContent, DefaultUserPresenceEditor, DefaultVideoToolbar, DefaultVideoToolbarContent, DefaultZoomMenu, DefaultZoomMenuContent, DeleteMenuItem, DiamondToolbarItem, DistributeMenuItems, DrV1AlignStyle, DrV1AssetType, DrV1ColorStyle, DrV1DashStyle, DrV1Decoration, DrV1FontStyle, DrV1ShapeType, DrV1SizeStyle, Draw, DrawImage, DrawShapeTool, DrawShapeUtil, DrawToolbarItem, DrawUi, DrawUiA11yProvider, DrawUiButton, DrawUiButtonCheck, DrawUiButtonIcon, DrawUiButtonLabel, DrawUiColumn, DrawUiComponentsProvider, DrawUiContextProvider, DrawUiContextualToolbar, DrawUiDialogBody, DrawUiDialogCloseButton, DrawUiDialogFooter, DrawUiDialogHeader, DrawUiDialogTitle, DrawUiDialogsProvider, DrawUiDropdownMenuCheckboxItem, DrawUiDropdownMenuContent, DrawUiDropdownMenuGroup, DrawUiDropdownMenuIndicator, DrawUiDropdownMenuItem, DrawUiDropdownMenuRoot, DrawUiDropdownMenuSub, DrawUiDropdownMenuSubContent, DrawUiDropdownMenuSubTrigger, DrawUiDropdownMenuTrigger, DrawUiEventsProvider, DrawUiGrid, DrawUiIcon, DrawUiInFrontOfTheCanvas, DrawUiInput, DrawUiKbd, DrawUiMenuActionCheckboxItem, DrawUiMenuActionItem, DrawUiMenuCheckboxItem, DrawUiMenuContextProvider, DrawUiMenuGroup, DrawUiMenuItem, DrawUiMenuSubmenu, DrawUiMenuToolItem, DrawUiOrientationProvider, DrawUiPopover, DrawUiPopoverContent, DrawUiPopoverTrigger, DrawUiRow, DrawUiSelect, DrawUiSelectContent, DrawUiSelectItem, DrawUiSelectTrigger, DrawUiSelectValue, DrawUiSlider, DrawUiToastsProvider, DrawUiToolbar, DrawUiToolbarButton, DrawUiToolbarToggleGroup, DrawUiToolbarToggleItem, DrawUiTooltip, DrawUiTooltipProvider, DrawUiTranslationProvider, DuplicateMenuItem, EditLinkMenuItem2 as EditLinkMenuItem, EditMenuSubmenu, EditSubmenu, EllipseToolbarItem, EmbedShapeUtil, EraserTool, EraserToolbarItem, ExampleDialog, ExportFileContentSubMenu, ExtrasGroup, FeatureFlags, FitFrameToContentMenuItem, FrameShapeTool, FrameShapeUtil, FrameToolbarItem, GeoShapeTool, GeoShapeUtil, GroupMenuItem2 as GroupMenuItem, GroupOrUngroupMenuItem, HandTool, HandToolbarItem, HeartToolbarItem, HexagonToolbarItem, HighlightShapeTool, HighlightShapeUtil, HighlightToolbarItem, ImageAssetUtil, ImageShapeUtil, InputModeMenu, KeyboardShiftEnterTweakExtension, KeyboardShortcutsMenuItem, LanguageMenu, LaserTool, LaserToolbarItem, LineShapeTool, LineShapeUtil, LineToolbarItem, LockGroup, MiscMenuGroup, MobileStylePanel, MoveToPageMenu, NoteShapeTool, NoteShapeUtil, NoteToolbarItem, OfflineIndicator, OvalToolbarItem, OverflowingToolbar, PORTRAIT_BREAKPOINT, PageItemInput, PageItemSubmenu, PasteMenuItem, PathBuilder, PathBuilderGeometry2d, DefaultPeopleMenu as PeopleMenu, PlainTextArea, PlainTextLabel, PreferencesGroup, PrintItem, RTL_LANGUAGES, RectangleToolbarItem, RemoveFrameMenuItem, ReorderMenuItems, ReorderMenuSubmenu, RhombusToolbarItem, RichTextArea, RichTextLabel, RichTextSVG, RotateCWMenuItem, STROKE_SIZES, ScribbleOverlayUtil, SelectAllMenuItem, SelectTool, SelectToolbarItem, SelectionForegroundOverlayUtil, ShapeHandleOverlayUtil, SnapIndicatorOverlayUtil, Spinner, StackMenuItems, StarToolbarItem, StylePanelArrowKindPicker, StylePanelArrowheadPicker, StylePanelButtonPicker, StylePanelButtonPickerInline, StylePanelColorPicker, StylePanelContextProvider, StylePanelDashPicker, StylePanelDoubleDropdownPicker, StylePanelDoubleDropdownPickerInline, StylePanelDropdownPicker, StylePanelDropdownPickerInline, StylePanelFillPicker, StylePanelFontPicker, StylePanelGeoShapePicker, StylePanelLabelAlignPicker, StylePanelOpacityPicker, StylePanelSection, StylePanelSizePicker, StylePanelSplinePicker, StylePanelSubheading, StylePanelTextAlignPicker, TextShapeTool, TextShapeUtil, TextToolbarItem, ToggleAutoSizeMenuItem, ToggleDebugModeItem, ToggleDynamicSizeModeItem, ToggleEdgeScrollingItem, ToggleEnhancedA11yModeItem, ToggleFocusModeItem, ToggleGridItem, ToggleInvertZoomItem, ToggleKeyboardShortcutsItem, ToggleLockMenuItem, TogglePasteAtCursorItem, ToggleReduceMotionItem, ToggleSnapModeItem, ToggleToolLockItem, ToggleToolLockedButton, ToggleTransparentBgMenuItem, ToggleWrapModeItem, ToolbarItem, TrapezoidToolbarItem, TriangleToolbarItem, UndoRedoGroup, UngroupMenuItem2 as UngroupMenuItem, UnlockAllMenuItem, VideoAssetUtil, VideoShapeUtil, ViewSubmenu, XBoxToolbarItem, ZoomBrushOverlayUtil, ZoomOrRotateMenuItem, ZoomTo100MenuItem, ZoomToFitMenuItem, ZoomToSelectionMenuItem, ZoomTool, allDefaultFontFaces, buildFromV1Document, centerSelectionAroundPoint, clearArrowTargetState, containBoxSize, copyAs, createBookmarkFromUrl, createEmptyBookmarkShape, createShapesForAssets, defaultAddFontsFromNode, defaultAssetUtils, defaultBindingUtils, defaultEditorAssetUrls, defaultGeoTypeDefinitions, defaultHandleExternalDrawContent, defaultHandleExternalEmbedContent, defaultHandleExternalExcalidrawContent, defaultHandleExternalFileAsset, defaultHandleExternalFileContent, defaultHandleExternalFileReplaceContent, defaultHandleExternalSvgTextContent, defaultHandleExternalTextContent, defaultHandleExternalUrlAsset, defaultHandleExternalUrlContent, defaultOverlayUtils, defaultShapeTools, defaultShapeUtils, defaultTools, downloadFile, downsizeImage, embedShapePermissionDefaults, exportAs, fitFrameToContent, getArrowBindings, getArrowInfo, getArrowTargetState, getArrowTerminalsInArrowSpace, getAssetInfo, getColorStyleItems, getCropBox, getDefaultCrop, getDisplayValues, getEmbedInfo, getFontFamily, getFontStyleItems, getGeoTypeDefinition, getHitShapeOnCanvasPointerDown, getPointsFromDrawSegment, getPointsFromDrawSegments, getStroke, getStrokeOutlinePoints, getStrokePoints, getSvgPathFromStrokePoints, getUncroppedSize, handleNativeOrMenuCopy, hideAllTooltips, iconTypes, notifyIfFileNotAllowed, onDragFromToolbarToCreateShape, parseAndLoadDocument, parseDrawJsonFile, preloadFont, putExcalidrawContent, registerDefaultExternalContentHandlers, registerDefaultSideEffects, removeFrame, renderHtmlFromRichText, renderHtmlFromRichTextForMeasurement, renderPlaintextFromRichText, renderRichTextFromHTML, sanitizeSvg, serializeDrawJson, serializeDrawJsonBlob, setDefaultEditorAssetUrls, setDefaultUiAssetUrls, setStrokePointRadii, startEditingShapeWithRichText, tipTapDefaultExtensions, truncateStringWithEllipsis, unknownEmbedShapePermissionOverrides, unwrapLabel, updateArrowTargetState, useA11y, useActions, useAssetUrls, useBreakpoint, useCanApplySelectionAction, useCanRedo, useCanUndo, useCollaborationStatus, useCopyAs, useCurrentTranslation, useDefaultHelpers, useDialogs, useDirection, useDrawUiComponents, useDrawUiOrientation, useEditablePlainText, useEditableRichText, useExportAs, useImageOrVideoAsset, useIsToolSelected, useKeyboardShortcuts, useLocalStorageState, useMenuClipboardEvents, useMenuIsOpen, useNativeClipboardEvents, usePrefersReducedMotion, useReadonly, useRelevantStyles, useSelectedShapesAnnouncer, useShowCollaborationUi, useStylePanelContext, useToasts, useTools, useTranslation, useUiEvents, useUnlockedSelectedShapesCount };
|
|
37185
|
+
export { ASPECT_RATIO_OPTIONS, ASPECT_RATIO_TO_VALUE, AccessibilityMenu, AlignMenuItems, ArrangeMenuSubmenu, ArrowBindingHintOverlayUtil, ArrowBindingUtil, ArrowDownToolbarItem, ArrowHintOverlayUtil, ArrowLeftToolbarItem, ArrowRightToolbarItem, ArrowShapeTool, ArrowShapeUtil, ArrowToolbarItem, ArrowUpToolbarItem, AssetToolbarItem, AssetUrlsProvider, BookmarkAssetUtil, BookmarkShapeUtil, BreakPointProvider, BrushOverlayUtil, CenteredTopPanelContainer, CheckBoxToolbarItem, ClipboardMenuGroup, CloudToolbarItem, CollaboratorBrushOverlayUtil, CollaboratorCursorOverlayUtil, CollaboratorCursors, CollaboratorHintOverlayUtil, CollaboratorScribbleOverlayUtil, CollaboratorShapeIndicatorOverlayUtil, ColorSchemeMenu, DefaultContextMenu as ContextMenu, ConversionsMenuGroup, ConvertToBookmarkMenuItem, ConvertToEmbedMenuItem, CopyAsMenuGroup, CopyMenuItem, CursorChatItem, CutMenuItem, DEFAULT_EMBED_DEFINITIONS, DEFAULT_MAX_ASSET_SIZE, DEFAULT_MAX_IMAGE_DIMENSION, DRAW_FILE_EXTENSION, DebugFlags, DefaultA11yAnnouncer, DefaultActionsMenu, DefaultActionsMenuContent, DefaultCollaboratorCursor, DefaultContextMenu, DefaultContextMenuContent, DefaultDebugMenu, DefaultDebugMenuContent, DefaultDialogs, DefaultFollowingIndicator, DefaultFontFaces, DefaultHelpMenu, DefaultHelpMenuContent, DefaultHelperButtons, DefaultHelperButtonsContent, DefaultImageToolbar, DefaultImageToolbarContent, DefaultKeyboardShortcutsDialog, DefaultKeyboardShortcutsDialogContent, DefaultMainMenu, DefaultMainMenuContent, DefaultMenuPanel, DefaultMinimap, DefaultNavigationPanel, DefaultPageMenu, DefaultPeopleMenu, DefaultPeopleMenuAvatar, DefaultPeopleMenuContent, DefaultPeopleMenuFacePile, DefaultPeopleMenuItem, DefaultQuickActions, DefaultQuickActionsContent, DefaultRichTextToolbar, DefaultRichTextToolbarContent, DefaultSharePanel, DefaultStylePanel, DefaultStylePanelContent, DefaultToasts, DefaultToolbar, DefaultToolbarContent, DefaultUserPresenceEditor, DefaultVideoToolbar, DefaultVideoToolbarContent, DefaultZoomMenu, DefaultZoomMenuContent, DeleteMenuItem, DiamondToolbarItem, DistributeMenuItems, DrV1AlignStyle, DrV1AssetType, DrV1ColorStyle, DrV1DashStyle, DrV1Decoration, DrV1FontStyle, DrV1ShapeType, DrV1SizeStyle, Draw, DrawImage, DrawShapeTool, DrawShapeUtil, DrawToolbarItem, DrawUi, DrawUiA11yProvider, DrawUiButton, DrawUiButtonCheck, DrawUiButtonIcon, DrawUiButtonLabel, DrawUiColumn, DrawUiComponentsProvider, DrawUiContextProvider, DrawUiContextualToolbar, DrawUiDialogBody, DrawUiDialogCloseButton, DrawUiDialogFooter, DrawUiDialogHeader, DrawUiDialogTitle, DrawUiDialogsProvider, DrawUiDropdownMenuCheckboxItem, DrawUiDropdownMenuContent, DrawUiDropdownMenuGroup, DrawUiDropdownMenuIndicator, DrawUiDropdownMenuItem, DrawUiDropdownMenuRoot, DrawUiDropdownMenuSub, DrawUiDropdownMenuSubContent, DrawUiDropdownMenuSubTrigger, DrawUiDropdownMenuTrigger, DrawUiEventsProvider, DrawUiGrid, DrawUiIcon, DrawUiInFrontOfTheCanvas, DrawUiInput, DrawUiKbd, DrawUiMenuActionCheckboxItem, DrawUiMenuActionItem, DrawUiMenuCheckboxItem, DrawUiMenuContextProvider, DrawUiMenuGroup, DrawUiMenuItem, DrawUiMenuSubmenu, DrawUiMenuToolItem, DrawUiOrientationProvider, DrawUiPopover, DrawUiPopoverContent, DrawUiPopoverTrigger, DrawUiRow, DrawUiSelect, DrawUiSelectContent, DrawUiSelectItem, DrawUiSelectTrigger, DrawUiSelectValue, DrawUiSlider, DrawUiToastsProvider, DrawUiToolbar, DrawUiToolbarButton, DrawUiToolbarToggleGroup, DrawUiToolbarToggleItem, DrawUiTooltip, DrawUiTooltipProvider, DrawUiTranslationProvider, DuplicateMenuItem, EditLinkMenuItem2 as EditLinkMenuItem, EditMenuSubmenu, EditSubmenu, EllipseToolbarItem, EmbedShapeUtil, EraserTool, EraserToolbarItem, ExampleDialog, ExportFileContentSubMenu, ExtrasGroup, FeatureFlags, FitFrameToContentMenuItem, FrameShapeTool, FrameShapeUtil, FrameToolbarItem, GeoShapeTool, GeoShapeUtil, GroupMenuItem2 as GroupMenuItem, GroupOrUngroupMenuItem, HandTool, HandToolbarItem, HeartToolbarItem, HexagonToolbarItem, HighlightShapeTool, HighlightShapeUtil, HighlightToolbarItem, ImageAssetUtil, ImageShapeUtil, InputModeMenu, KeyboardShiftEnterTweakExtension, KeyboardShortcutsMenuItem, LanguageMenu, LaserTool, LaserToolbarItem, LineShapeTool, LineShapeUtil, LineToolbarItem, LockGroup, MiscMenuGroup, MobileStylePanel, MoveToPageMenu, NoteShapeTool, NoteShapeUtil, NoteToolbarItem, OfflineIndicator, OvalToolbarItem, OverflowingToolbar, PORTRAIT_BREAKPOINT, PageItemInput, PageItemSubmenu, PasteMenuItem, PathBuilder, PathBuilderGeometry2d, DefaultPeopleMenu as PeopleMenu, PlainTextArea, PlainTextLabel, PreferencesGroup, PrintItem, RTL_LANGUAGES, RectangleToolbarItem, RemoveFrameMenuItem, ReorderMenuItems, ReorderMenuSubmenu, RhombusToolbarItem, RichTextArea, RichTextLabel, RichTextSVG, RotateCWMenuItem, STROKE_SIZES, ScribbleOverlayUtil, SelectAllMenuItem, SelectTool, SelectToolbarItem, SelectionForegroundOverlayUtil, ShapeHandleOverlayUtil, SnapIndicatorOverlayUtil, Spinner, StackMenuItems, StarToolbarItem, StylePanelArrowKindPicker, StylePanelArrowheadPicker, StylePanelButtonPicker, StylePanelButtonPickerInline, StylePanelColorPicker, StylePanelContextProvider, StylePanelDashPicker, StylePanelDoubleDropdownPicker, StylePanelDoubleDropdownPickerInline, StylePanelDropdownPicker, StylePanelDropdownPickerInline, StylePanelFillPicker, StylePanelFontPicker, StylePanelGeoShapePicker, StylePanelLabelAlignPicker, StylePanelOpacityPicker, StylePanelSection, StylePanelSizePicker, StylePanelSplinePicker, StylePanelSubheading, StylePanelTextAlignPicker, TextShapeTool, TextShapeUtil, TextToolbarItem, ToggleAutoSizeMenuItem, ToggleDebugModeItem, ToggleDynamicSizeModeItem, ToggleEdgeScrollingItem, ToggleEnhancedA11yModeItem, ToggleFocusModeItem, ToggleGridItem, ToggleInvertZoomItem, ToggleKeyboardShortcutsItem, ToggleLockMenuItem, TogglePasteAtCursorItem, ToggleReduceMotionItem, ToggleSnapModeItem, ToggleToolLockItem, ToggleToolLockedButton, ToggleTransparentBgMenuItem, ToggleWrapModeItem, ToolbarItem, TrapezoidToolbarItem, TriangleToolbarItem, UndoRedoGroup, UngroupMenuItem2 as UngroupMenuItem, UnlockAllMenuItem, VideoAssetUtil, VideoShapeUtil, ViewSubmenu, XBoxToolbarItem, ZoomBrushOverlayUtil, ZoomOrRotateMenuItem, ZoomTo100MenuItem, ZoomToFitMenuItem, ZoomToSelectionMenuItem, ZoomTool, allDefaultFontFaces, buildFromV1Document, centerSelectionAroundPoint, clearArrowTargetState, containBoxSize, copyAs, createBookmarkFromUrl, createEmptyBookmarkShape, createShapesForAssets, defaultAddFontsFromNode, defaultAssetUtils, defaultBindingUtils, defaultEditorAssetUrls, defaultGeoTypeDefinitions, defaultHandleExternalDrawContent, defaultHandleExternalEmbedContent, defaultHandleExternalExcalidrawContent, defaultHandleExternalFileAsset, defaultHandleExternalFileContent, defaultHandleExternalFileReplaceContent, defaultHandleExternalSvgTextContent, defaultHandleExternalTextContent, defaultHandleExternalUrlAsset, defaultHandleExternalUrlContent, defaultOverlayUtils, defaultShapeTools, defaultShapeUtils, defaultTools, downloadFile, downsizeImage, embedShapePermissionDefaults, exportAs, fitFrameToContent, getArrowBindings, getArrowInfo, getArrowTargetState, getArrowTerminalsInArrowSpace, getAssetInfo, getCollaboratorCursorScale, getColorStyleItems, getCropBox, getDefaultCrop, getDisplayValues, getEmbedInfo, getFontFamily, getFontStyleItems, getGeoTypeDefinition, getHitShapeOnCanvasPointerDown, getPointsFromDrawSegment, getPointsFromDrawSegments, getStroke, getStrokeOutlinePoints, getStrokePoints, getSvgPathFromStrokePoints, getUncroppedSize, handleNativeOrMenuCopy, hideAllTooltips, iconTypes, notifyIfFileNotAllowed, onDragFromToolbarToCreateShape, parseAndLoadDocument, parseDrawJsonFile, preloadFont, putExcalidrawContent, registerDefaultExternalContentHandlers, registerDefaultSideEffects, removeFrame, renderHtmlFromRichText, renderHtmlFromRichTextForMeasurement, renderPlaintextFromRichText, renderRichTextFromHTML, sanitizeSvg, serializeDrawJson, serializeDrawJsonBlob, setDefaultEditorAssetUrls, setDefaultUiAssetUrls, setStrokePointRadii, startEditingShapeWithRichText, tipTapDefaultExtensions, truncateStringWithEllipsis, unknownEmbedShapePermissionOverrides, unwrapLabel, updateArrowTargetState, useA11y, useActions, useAssetUrls, useBreakpoint, useCanApplySelectionAction, useCanRedo, useCanUndo, useCollaborationStatus, useCopyAs, useCurrentTranslation, useDefaultHelpers, useDialogs, useDirection, useDrawUiComponents, useDrawUiOrientation, useEditablePlainText, useEditableRichText, useExportAs, useImageOrVideoAsset, useIsToolSelected, useKeyboardShortcuts, useLocalStorageState, useMenuClipboardEvents, useMenuIsOpen, useNativeClipboardEvents, usePrefersReducedMotion, useReadonly, useRelevantStyles, useSelectedShapesAnnouncer, useShowCollaborationUi, useStylePanelContext, useToasts, useTools, useTranslation, useUiEvents, useUnlockedSelectedShapesCount };
|
|
37000
37186
|
//# sourceMappingURL=index.mjs.map
|
|
37001
37187
|
//# sourceMappingURL=index.mjs.map
|