rita-workspace 0.5.20 → 0.5.21

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.js CHANGED
@@ -719,7 +719,8 @@ function WorkspaceProvider({ children, lang = "en" }) {
719
719
  if (!workspace) return null;
720
720
  const now = Date.now();
721
721
  const tempId = `temp-${now}`;
722
- const defaultName = `${t.newDrawing} ${drawingsRef.current.length + 1}`;
722
+ const allDrawings = await getAllDrawings();
723
+ const defaultName = `${t.newDrawing} ${allDrawings.length + 1}`;
723
724
  const tempDrawing = {
724
725
  id: tempId,
725
726
  name: name || defaultName,
package/dist/index.mjs CHANGED
@@ -648,7 +648,8 @@ function WorkspaceProvider({ children, lang = "en" }) {
648
648
  if (!workspace) return null;
649
649
  const now = Date.now();
650
650
  const tempId = `temp-${now}`;
651
- const defaultName = `${t.newDrawing} ${drawingsRef.current.length + 1}`;
651
+ const allDrawings = await getAllDrawings();
652
+ const defaultName = `${t.newDrawing} ${allDrawings.length + 1}`;
652
653
  const tempDrawing = {
653
654
  id: tempId,
654
655
  name: name || defaultName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rita-workspace",
3
- "version": "0.5.20",
3
+ "version": "0.5.21",
4
4
  "description": "Multi-drawing workspace feature for Rita (Excalidraw fork)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",