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 +6 -0
- package/dist/index.css +9 -0
- package/dist/index.js +20 -12
- package/dist/index.mjs +20 -12
- package/package.json +1 -1
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)(
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
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(
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
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",
|