rita-workspace 0.5.38 → 0.5.39

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/README.md CHANGED
@@ -139,6 +139,12 @@ const [workspaceEnabled] = useState(() => {
139
139
  });
140
140
  ```
141
141
 
142
+ ### Cross-tab "last active drawing" memory
143
+
144
+ The library writes `localStorage['rita-workspace-last-active-drawing']` whenever the active drawing changes. On mount in a tab without a session-pinned drawing (e.g. auto-start in a fresh tab), the active-drawing resolution falls back to this id before defaulting to the first drawing in the list. Users see the drawing they last edited rather than an arbitrary one.
145
+
146
+ Resolution order: `sessionStorage['rita-workspace-tab-drawing']` → `localStorage['rita-workspace-last-active-drawing']` → `wsDrawings[0]`.
147
+
142
148
  ## API Reference
143
149
 
144
150
  ### Components
package/dist/index.css CHANGED
@@ -166,3 +166,12 @@
166
166
  .toggleButton:hover {
167
167
  background: #e9ecef;
168
168
  }
169
+
170
+ /* src/ui/Dialog/Dialog.css */
171
+ .theme--dark .rita-thumbnail-wrapper {
172
+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
173
+ border-color: rgba(255, 255, 255, 0.12);
174
+ }
175
+ .theme--dark .rita-thumbnail-wrapper img {
176
+ opacity: 0.88;
177
+ }
package/dist/index.js CHANGED
@@ -2027,18 +2027,26 @@ var DrawingsDialog = ({
2027
2027
  borderRadius: "2px",
2028
2028
  pointerEvents: "none"
2029
2029
  } }),
2030
- renderThumbnail && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: {
2031
- width: "64px",
2032
- height: "48px",
2033
- flexShrink: 0,
2034
- borderRadius: "4px",
2035
- overflow: "hidden",
2036
- border: "1px solid var(--default-border-color, #e0e0e0)",
2037
- backgroundColor: "#fff",
2038
- display: "flex",
2039
- alignItems: "center",
2040
- justifyContent: "center"
2041
- }, children: renderThumbnail(drawing) }),
2030
+ renderThumbnail && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2031
+ "div",
2032
+ {
2033
+ className: "rita-thumbnail-wrapper",
2034
+ style: {
2035
+ width: "64px",
2036
+ height: "48px",
2037
+ flexShrink: 0,
2038
+ borderRadius: "4px",
2039
+ overflow: "hidden",
2040
+ border: "1px solid var(--default-border-color, #e0e0e0)",
2041
+ backgroundColor: "var(--island-bg-color, #fff)",
2042
+ display: "flex",
2043
+ alignItems: "center",
2044
+ justifyContent: "center",
2045
+ boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.04)"
2046
+ },
2047
+ children: renderThumbnail(drawing)
2048
+ }
2049
+ ),
2042
2050
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { flex: 1, minWidth: 0 }, children: editingId === drawing.id ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center" }, children: [
2043
2051
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2044
2052
  "input",
package/dist/index.mjs CHANGED
@@ -1955,18 +1955,26 @@ var DrawingsDialog = ({
1955
1955
  borderRadius: "2px",
1956
1956
  pointerEvents: "none"
1957
1957
  } }),
1958
- renderThumbnail && /* @__PURE__ */ jsx6("div", { style: {
1959
- width: "64px",
1960
- height: "48px",
1961
- flexShrink: 0,
1962
- borderRadius: "4px",
1963
- overflow: "hidden",
1964
- border: "1px solid var(--default-border-color, #e0e0e0)",
1965
- backgroundColor: "#fff",
1966
- display: "flex",
1967
- alignItems: "center",
1968
- justifyContent: "center"
1969
- }, children: renderThumbnail(drawing) }),
1958
+ renderThumbnail && /* @__PURE__ */ jsx6(
1959
+ "div",
1960
+ {
1961
+ className: "rita-thumbnail-wrapper",
1962
+ style: {
1963
+ width: "64px",
1964
+ height: "48px",
1965
+ flexShrink: 0,
1966
+ borderRadius: "4px",
1967
+ overflow: "hidden",
1968
+ border: "1px solid var(--default-border-color, #e0e0e0)",
1969
+ backgroundColor: "var(--island-bg-color, #fff)",
1970
+ display: "flex",
1971
+ alignItems: "center",
1972
+ justifyContent: "center",
1973
+ boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.04)"
1974
+ },
1975
+ children: renderThumbnail(drawing)
1976
+ }
1977
+ ),
1970
1978
  /* @__PURE__ */ jsx6("div", { style: { flex: 1, minWidth: 0 }, children: editingId === drawing.id ? /* @__PURE__ */ jsxs4("div", { style: { display: "flex", gap: "6px", alignItems: "center" }, children: [
1971
1979
  /* @__PURE__ */ jsx6(
1972
1980
  "input",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rita-workspace",
3
- "version": "0.5.38",
3
+ "version": "0.5.39",
4
4
  "description": "Multi-drawing workspace feature for Rita (Excalidraw fork)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",