rita-workspace 0.5.34 → 0.5.35

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.mts CHANGED
@@ -131,6 +131,8 @@ interface Translations {
131
131
  newFolderName: string;
132
132
  backupReminder: string;
133
133
  days: string;
134
+ autoStartLabel: string;
135
+ autoStartDesc: string;
134
136
  shortcutNewDrawing: string;
135
137
  }
136
138
  declare function getTranslations(langCode?: string): Translations;
package/dist/index.d.ts CHANGED
@@ -131,6 +131,8 @@ interface Translations {
131
131
  newFolderName: string;
132
132
  backupReminder: string;
133
133
  days: string;
134
+ autoStartLabel: string;
135
+ autoStartDesc: string;
134
136
  shortcutNewDrawing: string;
135
137
  }
136
138
  declare function getTranslations(langCode?: string): Translations;
package/dist/index.js CHANGED
@@ -354,6 +354,9 @@ var sv = {
354
354
  // Backup reminder
355
355
  backupReminder: "Senaste backup:",
356
356
  days: "dagar sedan",
357
+ // Auto-start
358
+ autoStartLabel: "Starta Rita i arbetsl\xE4ge",
359
+ autoStartDesc: "Aktivera arbetsl\xE4ge automatiskt n\xE4r Rita \xF6ppnas",
357
360
  // Shortcuts
358
361
  shortcutNewDrawing: "Ctrl+Alt+N"
359
362
  };
@@ -404,6 +407,9 @@ var en = {
404
407
  // Backup reminder
405
408
  backupReminder: "Last backup:",
406
409
  days: "days ago",
410
+ // Auto-start
411
+ autoStartLabel: "Start Rita in workspace mode",
412
+ autoStartDesc: "Automatically enable workspace mode when Rita opens",
407
413
  // Shortcuts
408
414
  shortcutNewDrawing: "Ctrl+Alt+N"
409
415
  };
@@ -1691,6 +1697,27 @@ var DrawingsDialog = ({
1691
1697
  const [movingDrawingId, setMovingDrawingId] = (0, import_react5.useState)(null);
1692
1698
  const [searchQuery, setSearchQuery] = (0, import_react5.useState)("");
1693
1699
  const [isRefreshing, setIsRefreshing] = (0, import_react5.useState)(false);
1700
+ const [autoStart, setAutoStart] = (0, import_react5.useState)(() => {
1701
+ try {
1702
+ return localStorage.getItem("rita-workspace-auto-start") === "true";
1703
+ } catch {
1704
+ return false;
1705
+ }
1706
+ });
1707
+ const handleToggleAutoStart = (0, import_react5.useCallback)(() => {
1708
+ setAutoStart((prev) => {
1709
+ const next = !prev;
1710
+ try {
1711
+ if (next) {
1712
+ localStorage.setItem("rita-workspace-auto-start", "true");
1713
+ } else {
1714
+ localStorage.removeItem("rita-workspace-auto-start");
1715
+ }
1716
+ } catch {
1717
+ }
1718
+ return next;
1719
+ });
1720
+ }, []);
1694
1721
  const [draggingDrawingId, setDraggingDrawingId] = (0, import_react5.useState)(null);
1695
1722
  const [dropTargetFolderId, setDropTargetFolderId] = (0, import_react5.useState)(null);
1696
1723
  const [dropTargetDrawingId, setDropTargetDrawingId] = (0, import_react5.useState)(null);
@@ -2573,7 +2600,37 @@ var DrawingsDialog = ({
2573
2600
  onClick: importWorkspace
2574
2601
  }
2575
2602
  )
2576
- ] })
2603
+ ] }),
2604
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { padding: "0 20px 16px" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
2605
+ "label",
2606
+ {
2607
+ style: {
2608
+ display: "flex",
2609
+ alignItems: "center",
2610
+ gap: "10px",
2611
+ padding: "10px 12px",
2612
+ border: "1px solid var(--default-border-color, #e0e0e0)",
2613
+ borderRadius: "8px",
2614
+ cursor: "pointer",
2615
+ userSelect: "none"
2616
+ },
2617
+ children: [
2618
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2619
+ "input",
2620
+ {
2621
+ type: "checkbox",
2622
+ checked: autoStart,
2623
+ onChange: handleToggleAutoStart,
2624
+ style: { width: "16px", height: "16px", cursor: "pointer", flexShrink: 0 }
2625
+ }
2626
+ ),
2627
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
2628
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { fontSize: "14px", fontWeight: 500 }, children: t.autoStartLabel }),
2629
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { fontSize: "12px", color: "var(--text-secondary-color, #888)", marginTop: "2px" }, children: t.autoStartDesc })
2630
+ ] })
2631
+ ]
2632
+ }
2633
+ ) })
2577
2634
  ]
2578
2635
  }
2579
2636
  )
package/dist/index.mjs CHANGED
@@ -282,6 +282,9 @@ var sv = {
282
282
  // Backup reminder
283
283
  backupReminder: "Senaste backup:",
284
284
  days: "dagar sedan",
285
+ // Auto-start
286
+ autoStartLabel: "Starta Rita i arbetsl\xE4ge",
287
+ autoStartDesc: "Aktivera arbetsl\xE4ge automatiskt n\xE4r Rita \xF6ppnas",
285
288
  // Shortcuts
286
289
  shortcutNewDrawing: "Ctrl+Alt+N"
287
290
  };
@@ -332,6 +335,9 @@ var en = {
332
335
  // Backup reminder
333
336
  backupReminder: "Last backup:",
334
337
  days: "days ago",
338
+ // Auto-start
339
+ autoStartLabel: "Start Rita in workspace mode",
340
+ autoStartDesc: "Automatically enable workspace mode when Rita opens",
335
341
  // Shortcuts
336
342
  shortcutNewDrawing: "Ctrl+Alt+N"
337
343
  };
@@ -1619,6 +1625,27 @@ var DrawingsDialog = ({
1619
1625
  const [movingDrawingId, setMovingDrawingId] = useState4(null);
1620
1626
  const [searchQuery, setSearchQuery] = useState4("");
1621
1627
  const [isRefreshing, setIsRefreshing] = useState4(false);
1628
+ const [autoStart, setAutoStart] = useState4(() => {
1629
+ try {
1630
+ return localStorage.getItem("rita-workspace-auto-start") === "true";
1631
+ } catch {
1632
+ return false;
1633
+ }
1634
+ });
1635
+ const handleToggleAutoStart = useCallback2(() => {
1636
+ setAutoStart((prev) => {
1637
+ const next = !prev;
1638
+ try {
1639
+ if (next) {
1640
+ localStorage.setItem("rita-workspace-auto-start", "true");
1641
+ } else {
1642
+ localStorage.removeItem("rita-workspace-auto-start");
1643
+ }
1644
+ } catch {
1645
+ }
1646
+ return next;
1647
+ });
1648
+ }, []);
1622
1649
  const [draggingDrawingId, setDraggingDrawingId] = useState4(null);
1623
1650
  const [dropTargetFolderId, setDropTargetFolderId] = useState4(null);
1624
1651
  const [dropTargetDrawingId, setDropTargetDrawingId] = useState4(null);
@@ -2501,7 +2528,37 @@ var DrawingsDialog = ({
2501
2528
  onClick: importWorkspace
2502
2529
  }
2503
2530
  )
2504
- ] })
2531
+ ] }),
2532
+ /* @__PURE__ */ jsx6("div", { style: { padding: "0 20px 16px" }, children: /* @__PURE__ */ jsxs4(
2533
+ "label",
2534
+ {
2535
+ style: {
2536
+ display: "flex",
2537
+ alignItems: "center",
2538
+ gap: "10px",
2539
+ padding: "10px 12px",
2540
+ border: "1px solid var(--default-border-color, #e0e0e0)",
2541
+ borderRadius: "8px",
2542
+ cursor: "pointer",
2543
+ userSelect: "none"
2544
+ },
2545
+ children: [
2546
+ /* @__PURE__ */ jsx6(
2547
+ "input",
2548
+ {
2549
+ type: "checkbox",
2550
+ checked: autoStart,
2551
+ onChange: handleToggleAutoStart,
2552
+ style: { width: "16px", height: "16px", cursor: "pointer", flexShrink: 0 }
2553
+ }
2554
+ ),
2555
+ /* @__PURE__ */ jsxs4("div", { style: { flex: 1, minWidth: 0 }, children: [
2556
+ /* @__PURE__ */ jsx6("div", { style: { fontSize: "14px", fontWeight: 500 }, children: t.autoStartLabel }),
2557
+ /* @__PURE__ */ jsx6("div", { style: { fontSize: "12px", color: "var(--text-secondary-color, #888)", marginTop: "2px" }, children: t.autoStartDesc })
2558
+ ] })
2559
+ ]
2560
+ }
2561
+ ) })
2505
2562
  ]
2506
2563
  }
2507
2564
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rita-workspace",
3
- "version": "0.5.34",
3
+ "version": "0.5.35",
4
4
  "description": "Multi-drawing workspace feature for Rita (Excalidraw fork)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",