@ibodr/draw 0.2.12 → 0.2.13
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.mjs +1 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -38249,23 +38249,6 @@ function InternalProviders({
|
|
|
38249
38249
|
const mergedOverrides = useMergedOverrides(overrides);
|
|
38250
38250
|
return /* @__PURE__ */ jsx(ActionsProvider, { overrides: mergedOverrides.actions, children: /* @__PURE__ */ jsx(ToolsProvider, { overrides: mergedOverrides.tools, children }) });
|
|
38251
38251
|
}
|
|
38252
|
-
function useEditorEvents() {
|
|
38253
|
-
const editor = useEditor();
|
|
38254
|
-
const { addToast } = useToasts();
|
|
38255
|
-
useEffect(() => {
|
|
38256
|
-
function handleMaxShapes({ name, count }) {
|
|
38257
|
-
addToast({
|
|
38258
|
-
title: "Maximum shapes reached",
|
|
38259
|
-
description: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,
|
|
38260
|
-
severity: "warning"
|
|
38261
|
-
});
|
|
38262
|
-
}
|
|
38263
|
-
editor.addListener("max-shapes", handleMaxShapes);
|
|
38264
|
-
return () => {
|
|
38265
|
-
editor.removeListener("max-shapes", handleMaxShapes);
|
|
38266
|
-
};
|
|
38267
|
-
}, [editor, addToast]);
|
|
38268
|
-
}
|
|
38269
38252
|
var DrawUi = React4__default.memo(function DrawUi2({
|
|
38270
38253
|
renderDebugMenuItems,
|
|
38271
38254
|
children,
|
|
@@ -38315,7 +38298,6 @@ var DrawUiContent = React4__default.memo(function DrawUI() {
|
|
|
38315
38298
|
A11y,
|
|
38316
38299
|
FollowingIndicator
|
|
38317
38300
|
} = useDrawUiComponents();
|
|
38318
|
-
useEditorEvents();
|
|
38319
38301
|
const rIsEditingAnything = useRef(false);
|
|
38320
38302
|
const rHidingTimeout = useRef(-1);
|
|
38321
38303
|
const [hideToolbarWhileEditing, setHideToolbarWhileEditing] = useState(false);
|
|
@@ -40294,7 +40276,7 @@ init_sanitizeSvg();
|
|
|
40294
40276
|
// src/index.ts
|
|
40295
40277
|
registerDrawLibraryVersion(
|
|
40296
40278
|
"@ibodr/draw",
|
|
40297
|
-
"0.2.
|
|
40279
|
+
"0.2.13",
|
|
40298
40280
|
"esm"
|
|
40299
40281
|
);
|
|
40300
40282
|
/*!
|