rita-workspace 0.4.3 → 0.4.4
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +83 -88
- package/dist/index.mjs +83 -88
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -236,6 +236,10 @@ interface DrawingsDialogProps {
|
|
|
236
236
|
* Falls back to English if not supported
|
|
237
237
|
*/
|
|
238
238
|
lang?: string;
|
|
239
|
+
/**
|
|
240
|
+
* Optional thumbnail renderer for each drawing
|
|
241
|
+
*/
|
|
242
|
+
renderThumbnail?: (drawing: Drawing) => React.ReactNode;
|
|
239
243
|
}
|
|
240
244
|
/**
|
|
241
245
|
* DrawingsDialog - modal for managing workspace drawings
|
package/dist/index.d.ts
CHANGED
|
@@ -236,6 +236,10 @@ interface DrawingsDialogProps {
|
|
|
236
236
|
* Falls back to English if not supported
|
|
237
237
|
*/
|
|
238
238
|
lang?: string;
|
|
239
|
+
/**
|
|
240
|
+
* Optional thumbnail renderer for each drawing
|
|
241
|
+
*/
|
|
242
|
+
renderThumbnail?: (drawing: Drawing) => React.ReactNode;
|
|
239
243
|
}
|
|
240
244
|
/**
|
|
241
245
|
* DrawingsDialog - modal for managing workspace drawings
|
package/dist/index.js
CHANGED
|
@@ -216,7 +216,7 @@ var sv = {
|
|
|
216
216
|
newDrawing: "Ny ritning",
|
|
217
217
|
manageDrawings: "Hantera arbetsyta...",
|
|
218
218
|
// Dialog
|
|
219
|
-
dialogTitle: "Min Arbetsyta",
|
|
219
|
+
dialogTitle: "Min Rita Arbetsyta",
|
|
220
220
|
close: "St\xE4ng",
|
|
221
221
|
open: "\xD6ppna",
|
|
222
222
|
rename: "Byt namn",
|
|
@@ -897,7 +897,8 @@ var DrawingsDialog = ({
|
|
|
897
897
|
open,
|
|
898
898
|
onClose,
|
|
899
899
|
onDrawingSelect,
|
|
900
|
-
lang
|
|
900
|
+
lang,
|
|
901
|
+
renderThumbnail
|
|
901
902
|
}) => {
|
|
902
903
|
const {
|
|
903
904
|
drawings,
|
|
@@ -1064,6 +1065,18 @@ var DrawingsDialog = ({
|
|
|
1064
1065
|
backgroundColor: activeDrawing?.id === drawing.id ? "var(--color-primary-light, rgba(108, 99, 255, 0.1))" : "transparent"
|
|
1065
1066
|
},
|
|
1066
1067
|
children: [
|
|
1068
|
+
renderThumbnail && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: {
|
|
1069
|
+
width: "80px",
|
|
1070
|
+
height: "60px",
|
|
1071
|
+
flexShrink: 0,
|
|
1072
|
+
borderRadius: "4px",
|
|
1073
|
+
overflow: "hidden",
|
|
1074
|
+
border: "1px solid var(--default-border-color, #e0e0e0)",
|
|
1075
|
+
backgroundColor: "#fff",
|
|
1076
|
+
display: "flex",
|
|
1077
|
+
alignItems: "center",
|
|
1078
|
+
justifyContent: "center"
|
|
1079
|
+
}, children: renderThumbnail(drawing) }),
|
|
1067
1080
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { flex: 1, minWidth: 0 }, children: editingId === drawing.id ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1068
1081
|
"input",
|
|
1069
1082
|
{
|
|
@@ -1260,7 +1273,7 @@ var DrawingsDialog = ({
|
|
|
1260
1273
|
))
|
|
1261
1274
|
}
|
|
1262
1275
|
),
|
|
1263
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
1276
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1264
1277
|
"div",
|
|
1265
1278
|
{
|
|
1266
1279
|
style: {
|
|
@@ -1270,91 +1283,31 @@ var DrawingsDialog = ({
|
|
|
1270
1283
|
justifyContent: "space-between",
|
|
1271
1284
|
alignItems: "center"
|
|
1272
1285
|
},
|
|
1273
|
-
children: [
|
|
1274
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1275
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1276
|
-
"button",
|
|
1277
|
-
{
|
|
1278
|
-
onClick: handleCreate,
|
|
1279
|
-
style: {
|
|
1280
|
-
padding: "10px 20px",
|
|
1281
|
-
fontSize: "14px",
|
|
1282
|
-
backgroundColor: "var(--color-primary, #6c63ff)",
|
|
1283
|
-
color: "#fff",
|
|
1284
|
-
border: "none",
|
|
1285
|
-
borderRadius: "6px",
|
|
1286
|
-
cursor: "pointer",
|
|
1287
|
-
fontWeight: 500
|
|
1288
|
-
},
|
|
1289
|
-
children: [
|
|
1290
|
-
"+ ",
|
|
1291
|
-
t.newDrawing
|
|
1292
|
-
]
|
|
1293
|
-
}
|
|
1294
|
-
),
|
|
1295
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1296
|
-
"button",
|
|
1297
|
-
{
|
|
1298
|
-
onClick: importExcalidrawFile,
|
|
1299
|
-
style: {
|
|
1300
|
-
padding: "10px 20px",
|
|
1301
|
-
fontSize: "14px",
|
|
1302
|
-
backgroundColor: "transparent",
|
|
1303
|
-
border: "1px solid var(--default-border-color, #ccc)",
|
|
1304
|
-
borderRadius: "6px",
|
|
1305
|
-
cursor: "pointer",
|
|
1306
|
-
color: "inherit"
|
|
1307
|
-
},
|
|
1308
|
-
children: [
|
|
1309
|
-
"\u{1F4C2} ",
|
|
1310
|
-
t.importDrawing
|
|
1311
|
-
]
|
|
1312
|
-
}
|
|
1313
|
-
),
|
|
1314
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1315
|
-
"button",
|
|
1316
|
-
{
|
|
1317
|
-
onClick: importWorkspace,
|
|
1318
|
-
style: {
|
|
1319
|
-
padding: "10px 20px",
|
|
1320
|
-
fontSize: "14px",
|
|
1321
|
-
backgroundColor: "transparent",
|
|
1322
|
-
border: "1px solid var(--default-border-color, #ccc)",
|
|
1323
|
-
borderRadius: "6px",
|
|
1324
|
-
cursor: "pointer",
|
|
1325
|
-
color: "inherit"
|
|
1326
|
-
},
|
|
1327
|
-
children: [
|
|
1328
|
-
"\u{1F4E5} ",
|
|
1329
|
-
t.importWorkspace
|
|
1330
|
-
]
|
|
1331
|
-
}
|
|
1332
|
-
),
|
|
1333
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1334
|
-
"button",
|
|
1335
|
-
{
|
|
1336
|
-
onClick: exportWorkspace,
|
|
1337
|
-
style: {
|
|
1338
|
-
padding: "10px 20px",
|
|
1339
|
-
fontSize: "14px",
|
|
1340
|
-
backgroundColor: "transparent",
|
|
1341
|
-
border: "1px solid var(--default-border-color, #ccc)",
|
|
1342
|
-
borderRadius: "6px",
|
|
1343
|
-
cursor: "pointer",
|
|
1344
|
-
color: "inherit"
|
|
1345
|
-
},
|
|
1346
|
-
disabled: drawings.length === 0,
|
|
1347
|
-
children: [
|
|
1348
|
-
"\u{1F4E4} ",
|
|
1349
|
-
t.exportWorkspace
|
|
1350
|
-
]
|
|
1351
|
-
}
|
|
1352
|
-
)
|
|
1353
|
-
] }),
|
|
1354
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1286
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
1287
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1355
1288
|
"button",
|
|
1356
1289
|
{
|
|
1357
|
-
onClick:
|
|
1290
|
+
onClick: handleCreate,
|
|
1291
|
+
style: {
|
|
1292
|
+
padding: "10px 20px",
|
|
1293
|
+
fontSize: "14px",
|
|
1294
|
+
backgroundColor: "var(--color-primary, #6c63ff)",
|
|
1295
|
+
color: "#fff",
|
|
1296
|
+
border: "none",
|
|
1297
|
+
borderRadius: "6px",
|
|
1298
|
+
cursor: "pointer",
|
|
1299
|
+
fontWeight: 500
|
|
1300
|
+
},
|
|
1301
|
+
children: [
|
|
1302
|
+
"+ ",
|
|
1303
|
+
t.newDrawing
|
|
1304
|
+
]
|
|
1305
|
+
}
|
|
1306
|
+
),
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1308
|
+
"button",
|
|
1309
|
+
{
|
|
1310
|
+
onClick: importExcalidrawFile,
|
|
1358
1311
|
style: {
|
|
1359
1312
|
padding: "10px 20px",
|
|
1360
1313
|
fontSize: "14px",
|
|
@@ -1364,10 +1317,52 @@ var DrawingsDialog = ({
|
|
|
1364
1317
|
cursor: "pointer",
|
|
1365
1318
|
color: "inherit"
|
|
1366
1319
|
},
|
|
1367
|
-
children:
|
|
1320
|
+
children: [
|
|
1321
|
+
"\u{1F4C2} ",
|
|
1322
|
+
t.importDrawing
|
|
1323
|
+
]
|
|
1324
|
+
}
|
|
1325
|
+
),
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1327
|
+
"button",
|
|
1328
|
+
{
|
|
1329
|
+
onClick: importWorkspace,
|
|
1330
|
+
style: {
|
|
1331
|
+
padding: "10px 20px",
|
|
1332
|
+
fontSize: "14px",
|
|
1333
|
+
backgroundColor: "transparent",
|
|
1334
|
+
border: "1px solid var(--default-border-color, #ccc)",
|
|
1335
|
+
borderRadius: "6px",
|
|
1336
|
+
cursor: "pointer",
|
|
1337
|
+
color: "inherit"
|
|
1338
|
+
},
|
|
1339
|
+
children: [
|
|
1340
|
+
"\u{1F4E5} ",
|
|
1341
|
+
t.importWorkspace
|
|
1342
|
+
]
|
|
1343
|
+
}
|
|
1344
|
+
),
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1346
|
+
"button",
|
|
1347
|
+
{
|
|
1348
|
+
onClick: exportWorkspace,
|
|
1349
|
+
style: {
|
|
1350
|
+
padding: "10px 20px",
|
|
1351
|
+
fontSize: "14px",
|
|
1352
|
+
backgroundColor: "transparent",
|
|
1353
|
+
border: "1px solid var(--default-border-color, #ccc)",
|
|
1354
|
+
borderRadius: "6px",
|
|
1355
|
+
cursor: "pointer",
|
|
1356
|
+
color: "inherit"
|
|
1357
|
+
},
|
|
1358
|
+
disabled: drawings.length === 0,
|
|
1359
|
+
children: [
|
|
1360
|
+
"\u{1F4E4} ",
|
|
1361
|
+
t.exportWorkspace
|
|
1362
|
+
]
|
|
1368
1363
|
}
|
|
1369
1364
|
)
|
|
1370
|
-
]
|
|
1365
|
+
] })
|
|
1371
1366
|
}
|
|
1372
1367
|
)
|
|
1373
1368
|
]
|
package/dist/index.mjs
CHANGED
|
@@ -154,7 +154,7 @@ var sv = {
|
|
|
154
154
|
newDrawing: "Ny ritning",
|
|
155
155
|
manageDrawings: "Hantera arbetsyta...",
|
|
156
156
|
// Dialog
|
|
157
|
-
dialogTitle: "Min Arbetsyta",
|
|
157
|
+
dialogTitle: "Min Rita Arbetsyta",
|
|
158
158
|
close: "St\xE4ng",
|
|
159
159
|
open: "\xD6ppna",
|
|
160
160
|
rename: "Byt namn",
|
|
@@ -835,7 +835,8 @@ var DrawingsDialog = ({
|
|
|
835
835
|
open,
|
|
836
836
|
onClose,
|
|
837
837
|
onDrawingSelect,
|
|
838
|
-
lang
|
|
838
|
+
lang,
|
|
839
|
+
renderThumbnail
|
|
839
840
|
}) => {
|
|
840
841
|
const {
|
|
841
842
|
drawings,
|
|
@@ -1002,6 +1003,18 @@ var DrawingsDialog = ({
|
|
|
1002
1003
|
backgroundColor: activeDrawing?.id === drawing.id ? "var(--color-primary-light, rgba(108, 99, 255, 0.1))" : "transparent"
|
|
1003
1004
|
},
|
|
1004
1005
|
children: [
|
|
1006
|
+
renderThumbnail && /* @__PURE__ */ jsx6("div", { style: {
|
|
1007
|
+
width: "80px",
|
|
1008
|
+
height: "60px",
|
|
1009
|
+
flexShrink: 0,
|
|
1010
|
+
borderRadius: "4px",
|
|
1011
|
+
overflow: "hidden",
|
|
1012
|
+
border: "1px solid var(--default-border-color, #e0e0e0)",
|
|
1013
|
+
backgroundColor: "#fff",
|
|
1014
|
+
display: "flex",
|
|
1015
|
+
alignItems: "center",
|
|
1016
|
+
justifyContent: "center"
|
|
1017
|
+
}, children: renderThumbnail(drawing) }),
|
|
1005
1018
|
/* @__PURE__ */ jsx6("div", { style: { flex: 1, minWidth: 0 }, children: editingId === drawing.id ? /* @__PURE__ */ jsx6(
|
|
1006
1019
|
"input",
|
|
1007
1020
|
{
|
|
@@ -1198,7 +1211,7 @@ var DrawingsDialog = ({
|
|
|
1198
1211
|
))
|
|
1199
1212
|
}
|
|
1200
1213
|
),
|
|
1201
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ jsx6(
|
|
1202
1215
|
"div",
|
|
1203
1216
|
{
|
|
1204
1217
|
style: {
|
|
@@ -1208,91 +1221,31 @@ var DrawingsDialog = ({
|
|
|
1208
1221
|
justifyContent: "space-between",
|
|
1209
1222
|
alignItems: "center"
|
|
1210
1223
|
},
|
|
1211
|
-
children: [
|
|
1212
|
-
/* @__PURE__ */ jsxs4(
|
|
1213
|
-
/* @__PURE__ */ jsxs4(
|
|
1214
|
-
"button",
|
|
1215
|
-
{
|
|
1216
|
-
onClick: handleCreate,
|
|
1217
|
-
style: {
|
|
1218
|
-
padding: "10px 20px",
|
|
1219
|
-
fontSize: "14px",
|
|
1220
|
-
backgroundColor: "var(--color-primary, #6c63ff)",
|
|
1221
|
-
color: "#fff",
|
|
1222
|
-
border: "none",
|
|
1223
|
-
borderRadius: "6px",
|
|
1224
|
-
cursor: "pointer",
|
|
1225
|
-
fontWeight: 500
|
|
1226
|
-
},
|
|
1227
|
-
children: [
|
|
1228
|
-
"+ ",
|
|
1229
|
-
t.newDrawing
|
|
1230
|
-
]
|
|
1231
|
-
}
|
|
1232
|
-
),
|
|
1233
|
-
/* @__PURE__ */ jsxs4(
|
|
1234
|
-
"button",
|
|
1235
|
-
{
|
|
1236
|
-
onClick: importExcalidrawFile,
|
|
1237
|
-
style: {
|
|
1238
|
-
padding: "10px 20px",
|
|
1239
|
-
fontSize: "14px",
|
|
1240
|
-
backgroundColor: "transparent",
|
|
1241
|
-
border: "1px solid var(--default-border-color, #ccc)",
|
|
1242
|
-
borderRadius: "6px",
|
|
1243
|
-
cursor: "pointer",
|
|
1244
|
-
color: "inherit"
|
|
1245
|
-
},
|
|
1246
|
-
children: [
|
|
1247
|
-
"\u{1F4C2} ",
|
|
1248
|
-
t.importDrawing
|
|
1249
|
-
]
|
|
1250
|
-
}
|
|
1251
|
-
),
|
|
1252
|
-
/* @__PURE__ */ jsxs4(
|
|
1253
|
-
"button",
|
|
1254
|
-
{
|
|
1255
|
-
onClick: importWorkspace,
|
|
1256
|
-
style: {
|
|
1257
|
-
padding: "10px 20px",
|
|
1258
|
-
fontSize: "14px",
|
|
1259
|
-
backgroundColor: "transparent",
|
|
1260
|
-
border: "1px solid var(--default-border-color, #ccc)",
|
|
1261
|
-
borderRadius: "6px",
|
|
1262
|
-
cursor: "pointer",
|
|
1263
|
-
color: "inherit"
|
|
1264
|
-
},
|
|
1265
|
-
children: [
|
|
1266
|
-
"\u{1F4E5} ",
|
|
1267
|
-
t.importWorkspace
|
|
1268
|
-
]
|
|
1269
|
-
}
|
|
1270
|
-
),
|
|
1271
|
-
/* @__PURE__ */ jsxs4(
|
|
1272
|
-
"button",
|
|
1273
|
-
{
|
|
1274
|
-
onClick: exportWorkspace,
|
|
1275
|
-
style: {
|
|
1276
|
-
padding: "10px 20px",
|
|
1277
|
-
fontSize: "14px",
|
|
1278
|
-
backgroundColor: "transparent",
|
|
1279
|
-
border: "1px solid var(--default-border-color, #ccc)",
|
|
1280
|
-
borderRadius: "6px",
|
|
1281
|
-
cursor: "pointer",
|
|
1282
|
-
color: "inherit"
|
|
1283
|
-
},
|
|
1284
|
-
disabled: drawings.length === 0,
|
|
1285
|
-
children: [
|
|
1286
|
-
"\u{1F4E4} ",
|
|
1287
|
-
t.exportWorkspace
|
|
1288
|
-
]
|
|
1289
|
-
}
|
|
1290
|
-
)
|
|
1291
|
-
] }),
|
|
1292
|
-
/* @__PURE__ */ jsx6(
|
|
1224
|
+
children: /* @__PURE__ */ jsxs4("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
1225
|
+
/* @__PURE__ */ jsxs4(
|
|
1293
1226
|
"button",
|
|
1294
1227
|
{
|
|
1295
|
-
onClick:
|
|
1228
|
+
onClick: handleCreate,
|
|
1229
|
+
style: {
|
|
1230
|
+
padding: "10px 20px",
|
|
1231
|
+
fontSize: "14px",
|
|
1232
|
+
backgroundColor: "var(--color-primary, #6c63ff)",
|
|
1233
|
+
color: "#fff",
|
|
1234
|
+
border: "none",
|
|
1235
|
+
borderRadius: "6px",
|
|
1236
|
+
cursor: "pointer",
|
|
1237
|
+
fontWeight: 500
|
|
1238
|
+
},
|
|
1239
|
+
children: [
|
|
1240
|
+
"+ ",
|
|
1241
|
+
t.newDrawing
|
|
1242
|
+
]
|
|
1243
|
+
}
|
|
1244
|
+
),
|
|
1245
|
+
/* @__PURE__ */ jsxs4(
|
|
1246
|
+
"button",
|
|
1247
|
+
{
|
|
1248
|
+
onClick: importExcalidrawFile,
|
|
1296
1249
|
style: {
|
|
1297
1250
|
padding: "10px 20px",
|
|
1298
1251
|
fontSize: "14px",
|
|
@@ -1302,10 +1255,52 @@ var DrawingsDialog = ({
|
|
|
1302
1255
|
cursor: "pointer",
|
|
1303
1256
|
color: "inherit"
|
|
1304
1257
|
},
|
|
1305
|
-
children:
|
|
1258
|
+
children: [
|
|
1259
|
+
"\u{1F4C2} ",
|
|
1260
|
+
t.importDrawing
|
|
1261
|
+
]
|
|
1262
|
+
}
|
|
1263
|
+
),
|
|
1264
|
+
/* @__PURE__ */ jsxs4(
|
|
1265
|
+
"button",
|
|
1266
|
+
{
|
|
1267
|
+
onClick: importWorkspace,
|
|
1268
|
+
style: {
|
|
1269
|
+
padding: "10px 20px",
|
|
1270
|
+
fontSize: "14px",
|
|
1271
|
+
backgroundColor: "transparent",
|
|
1272
|
+
border: "1px solid var(--default-border-color, #ccc)",
|
|
1273
|
+
borderRadius: "6px",
|
|
1274
|
+
cursor: "pointer",
|
|
1275
|
+
color: "inherit"
|
|
1276
|
+
},
|
|
1277
|
+
children: [
|
|
1278
|
+
"\u{1F4E5} ",
|
|
1279
|
+
t.importWorkspace
|
|
1280
|
+
]
|
|
1281
|
+
}
|
|
1282
|
+
),
|
|
1283
|
+
/* @__PURE__ */ jsxs4(
|
|
1284
|
+
"button",
|
|
1285
|
+
{
|
|
1286
|
+
onClick: exportWorkspace,
|
|
1287
|
+
style: {
|
|
1288
|
+
padding: "10px 20px",
|
|
1289
|
+
fontSize: "14px",
|
|
1290
|
+
backgroundColor: "transparent",
|
|
1291
|
+
border: "1px solid var(--default-border-color, #ccc)",
|
|
1292
|
+
borderRadius: "6px",
|
|
1293
|
+
cursor: "pointer",
|
|
1294
|
+
color: "inherit"
|
|
1295
|
+
},
|
|
1296
|
+
disabled: drawings.length === 0,
|
|
1297
|
+
children: [
|
|
1298
|
+
"\u{1F4E4} ",
|
|
1299
|
+
t.exportWorkspace
|
|
1300
|
+
]
|
|
1306
1301
|
}
|
|
1307
1302
|
)
|
|
1308
|
-
]
|
|
1303
|
+
] })
|
|
1309
1304
|
}
|
|
1310
1305
|
)
|
|
1311
1306
|
]
|