rita-workspace 0.4.4 → 0.4.5

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
@@ -1056,12 +1056,17 @@ var DrawingsDialog = ({
1056
1056
  "div",
1057
1057
  {
1058
1058
  className: "rita-workspace-dialog-item",
1059
+ onClick: () => {
1060
+ if (editingId || confirmDeleteId) return;
1061
+ if (activeDrawing?.id !== drawing.id) handleSelect(drawing);
1062
+ },
1059
1063
  style: {
1060
1064
  padding: "12px 20px",
1061
1065
  display: "flex",
1062
1066
  alignItems: "center",
1063
1067
  gap: "12px",
1064
1068
  borderBottom: "1px solid var(--default-border-color, #f0f0f0)",
1069
+ cursor: editingId || confirmDeleteId ? "default" : "pointer",
1065
1070
  backgroundColor: activeDrawing?.id === drawing.id ? "var(--color-primary-light, rgba(108, 99, 255, 0.1))" : "transparent"
1066
1071
  },
1067
1072
  children: [
@@ -1200,24 +1205,10 @@ var DrawingsDialog = ({
1200
1205
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1201
1206
  "button",
1202
1207
  {
1203
- onClick: () => handleSelect(drawing),
1204
- style: {
1205
- padding: "6px 12px",
1206
- fontSize: "12px",
1207
- backgroundColor: "var(--color-primary, #6c63ff)",
1208
- color: "#fff",
1209
- border: "none",
1210
- borderRadius: "4px",
1211
- cursor: "pointer"
1208
+ onClick: (e) => {
1209
+ e.stopPropagation();
1210
+ exportDrawingAsExcalidraw(drawing.id);
1212
1211
  },
1213
- disabled: activeDrawing?.id === drawing.id,
1214
- children: t.open
1215
- }
1216
- ),
1217
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1218
- "button",
1219
- {
1220
- onClick: () => exportDrawingAsExcalidraw(drawing.id),
1221
1212
  style: {
1222
1213
  padding: "6px 12px",
1223
1214
  fontSize: "12px",
@@ -1234,7 +1225,10 @@ var DrawingsDialog = ({
1234
1225
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1235
1226
  "button",
1236
1227
  {
1237
- onClick: () => handleStartEdit(drawing),
1228
+ onClick: (e) => {
1229
+ e.stopPropagation();
1230
+ handleStartEdit(drawing);
1231
+ },
1238
1232
  style: {
1239
1233
  padding: "6px 12px",
1240
1234
  fontSize: "12px",
@@ -1251,7 +1245,10 @@ var DrawingsDialog = ({
1251
1245
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1252
1246
  "button",
1253
1247
  {
1254
- onClick: () => setConfirmDeleteId(drawing.id),
1248
+ onClick: (e) => {
1249
+ e.stopPropagation();
1250
+ setConfirmDeleteId(drawing.id);
1251
+ },
1255
1252
  style: {
1256
1253
  padding: "6px 12px",
1257
1254
  fontSize: "12px",
package/dist/index.mjs CHANGED
@@ -994,12 +994,17 @@ var DrawingsDialog = ({
994
994
  "div",
995
995
  {
996
996
  className: "rita-workspace-dialog-item",
997
+ onClick: () => {
998
+ if (editingId || confirmDeleteId) return;
999
+ if (activeDrawing?.id !== drawing.id) handleSelect(drawing);
1000
+ },
997
1001
  style: {
998
1002
  padding: "12px 20px",
999
1003
  display: "flex",
1000
1004
  alignItems: "center",
1001
1005
  gap: "12px",
1002
1006
  borderBottom: "1px solid var(--default-border-color, #f0f0f0)",
1007
+ cursor: editingId || confirmDeleteId ? "default" : "pointer",
1003
1008
  backgroundColor: activeDrawing?.id === drawing.id ? "var(--color-primary-light, rgba(108, 99, 255, 0.1))" : "transparent"
1004
1009
  },
1005
1010
  children: [
@@ -1138,24 +1143,10 @@ var DrawingsDialog = ({
1138
1143
  /* @__PURE__ */ jsx6(
1139
1144
  "button",
1140
1145
  {
1141
- onClick: () => handleSelect(drawing),
1142
- style: {
1143
- padding: "6px 12px",
1144
- fontSize: "12px",
1145
- backgroundColor: "var(--color-primary, #6c63ff)",
1146
- color: "#fff",
1147
- border: "none",
1148
- borderRadius: "4px",
1149
- cursor: "pointer"
1146
+ onClick: (e) => {
1147
+ e.stopPropagation();
1148
+ exportDrawingAsExcalidraw(drawing.id);
1150
1149
  },
1151
- disabled: activeDrawing?.id === drawing.id,
1152
- children: t.open
1153
- }
1154
- ),
1155
- /* @__PURE__ */ jsx6(
1156
- "button",
1157
- {
1158
- onClick: () => exportDrawingAsExcalidraw(drawing.id),
1159
1150
  style: {
1160
1151
  padding: "6px 12px",
1161
1152
  fontSize: "12px",
@@ -1172,7 +1163,10 @@ var DrawingsDialog = ({
1172
1163
  /* @__PURE__ */ jsx6(
1173
1164
  "button",
1174
1165
  {
1175
- onClick: () => handleStartEdit(drawing),
1166
+ onClick: (e) => {
1167
+ e.stopPropagation();
1168
+ handleStartEdit(drawing);
1169
+ },
1176
1170
  style: {
1177
1171
  padding: "6px 12px",
1178
1172
  fontSize: "12px",
@@ -1189,7 +1183,10 @@ var DrawingsDialog = ({
1189
1183
  /* @__PURE__ */ jsx6(
1190
1184
  "button",
1191
1185
  {
1192
- onClick: () => setConfirmDeleteId(drawing.id),
1186
+ onClick: (e) => {
1187
+ e.stopPropagation();
1188
+ setConfirmDeleteId(drawing.id);
1189
+ },
1193
1190
  style: {
1194
1191
  padding: "6px 12px",
1195
1192
  fontSize: "12px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rita-workspace",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Multi-drawing workspace feature for Rita (Excalidraw fork)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",