@manifest-editor/components 1.4.0 → 1.4.2
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.cjs +383 -393
- package/dist/index.css +10 -0
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +322 -347
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
// src/index.tsx
|
|
32
32
|
var src_exports = {};
|
|
33
33
|
__export(src_exports, {
|
|
34
|
+
AccessibilityButton: () => AccessibilityButton,
|
|
34
35
|
ActionButton: () => ActionButton,
|
|
35
36
|
AddIcon: () => AddIcon,
|
|
36
37
|
AddImageIcon: () => AddImageIcon,
|
|
@@ -136,6 +137,13 @@ function ActionButton({
|
|
|
136
137
|
);
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
// src/AccessibilityButton.tsx
|
|
141
|
+
var import_react_aria_components2 = require("react-aria-components");
|
|
142
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
143
|
+
function AccessibilityButton({ className: className2, children, ...props }) {
|
|
144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_aria_components2.Button, { className: ["sr-only focus:not-sr-only p-2 bg-white text-black", className2].join(" "), ...props, children });
|
|
145
|
+
}
|
|
146
|
+
|
|
139
147
|
// src/utils.ts
|
|
140
148
|
var import_clsx = require("clsx");
|
|
141
149
|
var import_tailwind_merge2 = require("tailwind-merge");
|
|
@@ -146,9 +154,9 @@ var cn = (...inputs) => {
|
|
|
146
154
|
// src/Tooltip.tsx
|
|
147
155
|
var import_react = require("@floating-ui/react");
|
|
148
156
|
var React = __toESM(require("react"), 1);
|
|
149
|
-
var
|
|
157
|
+
var import_react_aria_components3 = require("react-aria-components");
|
|
150
158
|
var import_tailwind_merge3 = require("tailwind-merge");
|
|
151
|
-
var
|
|
159
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
152
160
|
function useTooltip({
|
|
153
161
|
initialOpen = false,
|
|
154
162
|
placement = "top",
|
|
@@ -204,7 +212,7 @@ var useTooltipContext = () => {
|
|
|
204
212
|
};
|
|
205
213
|
function Tooltip({ children, ...options }) {
|
|
206
214
|
const tooltip = useTooltip(options);
|
|
207
|
-
return /* @__PURE__ */ (0,
|
|
215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipContext.Provider, { value: tooltip, children });
|
|
208
216
|
}
|
|
209
217
|
var TooltipTrigger = React.forwardRef(function TooltipTrigger2({ children, asChild = false, ...props }, propRef) {
|
|
210
218
|
const context = useTooltipContext();
|
|
@@ -221,8 +229,8 @@ var TooltipTrigger = React.forwardRef(function TooltipTrigger2({ children, asChi
|
|
|
221
229
|
})
|
|
222
230
|
);
|
|
223
231
|
}
|
|
224
|
-
return /* @__PURE__ */ (0,
|
|
225
|
-
|
|
232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
233
|
+
import_react_aria_components3.Button,
|
|
226
234
|
{
|
|
227
235
|
ref,
|
|
228
236
|
"data-state": context.open ? "open" : "closed",
|
|
@@ -236,7 +244,7 @@ var TooltipContent = React.forwardRef(function TooltipContent2({ style, root, ..
|
|
|
236
244
|
const ref = (0, import_react.useMergeRefs)([context.refs.setFloating, propRef]);
|
|
237
245
|
if (!context.open)
|
|
238
246
|
return null;
|
|
239
|
-
return /* @__PURE__ */ (0,
|
|
247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react.FloatingPortal, { root, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
240
248
|
"div",
|
|
241
249
|
{
|
|
242
250
|
ref,
|
|
@@ -249,7 +257,7 @@ var TooltipContent = React.forwardRef(function TooltipContent2({ style, root, ..
|
|
|
249
257
|
) });
|
|
250
258
|
});
|
|
251
259
|
function DefaultTooltipContent(props) {
|
|
252
|
-
return /* @__PURE__ */ (0,
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
253
261
|
TooltipContent,
|
|
254
262
|
{
|
|
255
263
|
root: props.root,
|
|
@@ -260,23 +268,23 @@ function DefaultTooltipContent(props) {
|
|
|
260
268
|
}
|
|
261
269
|
|
|
262
270
|
// src/Sidebar.tsx
|
|
263
|
-
var
|
|
271
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
264
272
|
function Sidebar({ children }) {
|
|
265
|
-
return /* @__PURE__ */ (0,
|
|
273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-full h-full flex flex-col overflow-hidden", children });
|
|
266
274
|
}
|
|
267
275
|
function SidebarContent({
|
|
268
276
|
children,
|
|
269
277
|
className: className2,
|
|
270
278
|
padding
|
|
271
279
|
}) {
|
|
272
|
-
return /* @__PURE__ */ (0,
|
|
280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn("flex-1 min-h-0 overflow-y-auto pb-64", className2, padding && "px-3 pt-3"), children });
|
|
273
281
|
}
|
|
274
282
|
function SidebarHeader(props) {
|
|
275
283
|
const { actions, title } = props;
|
|
276
|
-
return /* @__PURE__ */ (0,
|
|
277
|
-
/* @__PURE__ */ (0,
|
|
278
|
-
/* @__PURE__ */ (0,
|
|
279
|
-
/* @__PURE__ */ (0,
|
|
284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "bg-me-gray-100 h-12 flex items-center px-3 z-10 text-black border-b-me-gray-300 border-b flex-shrink-0", children: [
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1", children: title }),
|
|
286
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "ml-auto flex gap-2 items-center", children: actions?.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Tooltip, { placement: "bottom", children: [
|
|
287
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
280
288
|
"button",
|
|
281
289
|
{
|
|
282
290
|
className: cn(
|
|
@@ -292,18 +300,18 @@ function SidebarHeader(props) {
|
|
|
292
300
|
},
|
|
293
301
|
index
|
|
294
302
|
) }),
|
|
295
|
-
!action.disabled ? /* @__PURE__ */ (0,
|
|
303
|
+
!action.disabled ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DefaultTooltipContent, { children: action.title }) : null
|
|
296
304
|
] }, index)) })
|
|
297
305
|
] });
|
|
298
306
|
}
|
|
299
307
|
|
|
300
308
|
// src/PanelSideMenu.tsx
|
|
301
|
-
var
|
|
309
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
302
310
|
|
|
303
311
|
// src/PanelSideMenuItem.tsx
|
|
304
|
-
var
|
|
312
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
305
313
|
function PanelSideMenuItem(props) {
|
|
306
|
-
return /* @__PURE__ */ (0,
|
|
314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Tooltip, { placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
307
315
|
"button",
|
|
308
316
|
{
|
|
309
317
|
className: cn(
|
|
@@ -314,18 +322,18 @@ function PanelSideMenuItem(props) {
|
|
|
314
322
|
onMouseDown: props.onClick,
|
|
315
323
|
children: [
|
|
316
324
|
props.icon,
|
|
317
|
-
/* @__PURE__ */ (0,
|
|
325
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TooltipContent, { className: "bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50", children: props.label })
|
|
318
326
|
]
|
|
319
327
|
}
|
|
320
328
|
) }) });
|
|
321
329
|
}
|
|
322
330
|
|
|
323
331
|
// src/PanelSideMenu.tsx
|
|
324
|
-
var
|
|
332
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
325
333
|
function PanelSideMenu(props) {
|
|
326
|
-
return /* @__PURE__ */ (0,
|
|
327
|
-
panel.divide ? /* @__PURE__ */ (0,
|
|
328
|
-
/* @__PURE__ */ (0,
|
|
334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "bg-white border-me-gray-300 border-t border-r flex flex-col w-12 pb-2", "data-open": props.open, children: props.items.map((panel) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
335
|
+
panel.divide ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-1 block w-2 min-h-1" }) : null,
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
329
337
|
PanelSideMenuItem,
|
|
330
338
|
{
|
|
331
339
|
label: panel.label,
|
|
@@ -339,12 +347,12 @@ function PanelSideMenu(props) {
|
|
|
339
347
|
}
|
|
340
348
|
|
|
341
349
|
// src/ThumbnailGridContainer.tsx
|
|
342
|
-
var
|
|
350
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
343
351
|
function ThumbnailGridContainer(props) {
|
|
344
352
|
if (props.wide) {
|
|
345
|
-
return /* @__PURE__ */ (0,
|
|
353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-md gap-4 p-4 overflow-y-auto", children: props.children });
|
|
346
354
|
}
|
|
347
|
-
return /* @__PURE__ */ (0,
|
|
355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-2 gap-4 p-4", children: props.children });
|
|
348
356
|
}
|
|
349
357
|
|
|
350
358
|
// src/LazyThumbnail.tsx
|
|
@@ -354,9 +362,9 @@ var import_react_lazy_load_image_component = require("react-lazy-load-image-comp
|
|
|
354
362
|
var import_tailwind_merge4 = require("tailwind-merge");
|
|
355
363
|
|
|
356
364
|
// src/Spinner.tsx
|
|
357
|
-
var
|
|
365
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
358
366
|
function Spinner(props) {
|
|
359
|
-
return /* @__PURE__ */ (0,
|
|
367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
360
368
|
"svg",
|
|
361
369
|
{
|
|
362
370
|
width: "1em",
|
|
@@ -365,9 +373,9 @@ function Spinner(props) {
|
|
|
365
373
|
xmlns: "http://www.w3.org/2000/svg",
|
|
366
374
|
stroke: "currentColor",
|
|
367
375
|
...props,
|
|
368
|
-
children: /* @__PURE__ */ (0,
|
|
369
|
-
/* @__PURE__ */ (0,
|
|
370
|
-
/* @__PURE__ */ (0,
|
|
376
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("g", { transform: "translate(2 2)", strokeWidth: 5, fill: "none", fillRule: "evenodd", children: [
|
|
377
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { strokeOpacity: 0.5, cx: 18, cy: 18, r: 18 }),
|
|
378
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M36 18c0-9.94-8.06-18-18-18", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
371
379
|
"animateTransform",
|
|
372
380
|
{
|
|
373
381
|
attributeName: "transform",
|
|
@@ -384,9 +392,9 @@ function Spinner(props) {
|
|
|
384
392
|
}
|
|
385
393
|
|
|
386
394
|
// src/icons/TextIcon.tsx
|
|
387
|
-
var
|
|
395
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
388
396
|
function TextIcon(props) {
|
|
389
|
-
return /* @__PURE__ */ (0,
|
|
397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
390
398
|
"svg",
|
|
391
399
|
{
|
|
392
400
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -395,8 +403,8 @@ function TextIcon(props) {
|
|
|
395
403
|
viewBox: "0 0 24 24",
|
|
396
404
|
...props,
|
|
397
405
|
children: [
|
|
398
|
-
/* @__PURE__ */ (0,
|
|
399
|
-
/* @__PURE__ */ (0,
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("title", { children: "Text" }),
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
400
408
|
"path",
|
|
401
409
|
{
|
|
402
410
|
fill: "currentColor",
|
|
@@ -409,12 +417,12 @@ function TextIcon(props) {
|
|
|
409
417
|
}
|
|
410
418
|
|
|
411
419
|
// src/LazyThumbnail.tsx
|
|
412
|
-
var
|
|
420
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
413
421
|
function LazyThumbnail({
|
|
414
422
|
cover,
|
|
415
423
|
fade = true
|
|
416
424
|
}) {
|
|
417
|
-
return /* @__PURE__ */ (0,
|
|
425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_lazy_load_image_component.LazyLoadComponent, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LazyThumbnailInner, { cover, fade }) });
|
|
418
426
|
}
|
|
419
427
|
var renderCache = /* @__PURE__ */ new Map();
|
|
420
428
|
function LazyThumbnailInner({
|
|
@@ -447,8 +455,8 @@ function LazyThumbnailInner({
|
|
|
447
455
|
},
|
|
448
456
|
[isCached]
|
|
449
457
|
);
|
|
450
|
-
return /* @__PURE__ */ (0,
|
|
451
|
-
thumbnail?.id ? /* @__PURE__ */ (0,
|
|
458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `w-full h-full relative`, children: [
|
|
459
|
+
thumbnail?.id ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
452
460
|
"img",
|
|
453
461
|
{
|
|
454
462
|
onLoad: () => setIsLoading(false),
|
|
@@ -457,15 +465,15 @@ function LazyThumbnailInner({
|
|
|
457
465
|
alt: "",
|
|
458
466
|
className: `w-full h-full ${cover ? "object-cover" : "object-contain"} ${!isLoading ? isCached ? "" : "animate-fadeIn" : "opacity-0"}`
|
|
459
467
|
}
|
|
460
|
-
) : /* @__PURE__ */ (0,
|
|
461
|
-
!thumbnail?.id || isLoading ? /* @__PURE__ */ (0,
|
|
468
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ThumbnailFallback, {}),
|
|
469
|
+
!thumbnail?.id || isLoading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
462
470
|
"div",
|
|
463
471
|
{
|
|
464
472
|
className: (0, import_tailwind_merge4.twMerge)(
|
|
465
473
|
"absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10",
|
|
466
474
|
fade && "animate-fadeIn"
|
|
467
475
|
),
|
|
468
|
-
children: /* @__PURE__ */ (0,
|
|
476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Spinner, {})
|
|
469
477
|
}
|
|
470
478
|
) : null
|
|
471
479
|
] });
|
|
@@ -473,9 +481,9 @@ function LazyThumbnailInner({
|
|
|
473
481
|
function ThumbnailFallback() {
|
|
474
482
|
const [strategy] = (0, import_react_iiif_vault.useRenderingStrategy)();
|
|
475
483
|
if (strategy.type === "textual-content") {
|
|
476
|
-
return /* @__PURE__ */ (0,
|
|
484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0 z-20", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TextIcon, { className: "w-16 h-16" }) });
|
|
477
485
|
}
|
|
478
|
-
return /* @__PURE__ */ (0,
|
|
486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0 z-20", children: "No thumbnail" });
|
|
479
487
|
}
|
|
480
488
|
|
|
481
489
|
// src/CanvasThumbnailGridItem.tsx
|
|
@@ -483,18 +491,18 @@ var import_react_iiif_vault3 = require("react-iiif-vault");
|
|
|
483
491
|
|
|
484
492
|
// src/CanvasLabel.tsx
|
|
485
493
|
var import_react_iiif_vault2 = require("react-iiif-vault");
|
|
486
|
-
var
|
|
494
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
487
495
|
function CanvasLabel(props) {
|
|
488
496
|
const canvas = (0, import_react_iiif_vault2.useCanvas)();
|
|
489
497
|
if (!canvas)
|
|
490
498
|
return null;
|
|
491
|
-
return /* @__PURE__ */ (0,
|
|
499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_iiif_vault2.LocaleString, { className: props.className, as: props.as, children: canvas.label });
|
|
492
500
|
}
|
|
493
501
|
|
|
494
502
|
// src/Card3D.tsx
|
|
495
503
|
var import_react3 = require("react");
|
|
496
504
|
var import_tailwind_merge5 = require("tailwind-merge");
|
|
497
|
-
var
|
|
505
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
498
506
|
function Card3D({
|
|
499
507
|
className: className2,
|
|
500
508
|
shouldTranslate,
|
|
@@ -565,7 +573,7 @@ function Card3D({
|
|
|
565
573
|
outer.current.removeEventListener("mousemove", mousemove);
|
|
566
574
|
};
|
|
567
575
|
}, []);
|
|
568
|
-
return /* @__PURE__ */ (0,
|
|
576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
569
577
|
"div",
|
|
570
578
|
{
|
|
571
579
|
ref: outer,
|
|
@@ -578,7 +586,7 @@ function Card3D({
|
|
|
578
586
|
...props,
|
|
579
587
|
children: [
|
|
580
588
|
children,
|
|
581
|
-
/* @__PURE__ */ (0,
|
|
589
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
582
590
|
"div",
|
|
583
591
|
{
|
|
584
592
|
className: "pointer-events-none absolute inset-0 transition-all",
|
|
@@ -594,10 +602,10 @@ function Card3D({
|
|
|
594
602
|
}
|
|
595
603
|
|
|
596
604
|
// src/CanvasThumbnailGridItem.tsx
|
|
597
|
-
var
|
|
605
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
598
606
|
function CanvasThumbnailGridItem(props) {
|
|
599
|
-
return /* @__PURE__ */ (0,
|
|
600
|
-
/* @__PURE__ */ (0,
|
|
607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_iiif_vault3.CanvasContext, { canvas: props.id, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { onMouseDown: props.onClick, className: "flex flex-col", "data-canvas-selected": props.selected, children: [
|
|
608
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "bg-me-gray-100 w-full aspect-square flex-1 overflow-hidden rounded", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
601
609
|
Card3D,
|
|
602
610
|
{
|
|
603
611
|
"data-canvas-selected": props.active,
|
|
@@ -606,17 +614,17 @@ function CanvasThumbnailGridItem(props) {
|
|
|
606
614
|
"border-2 border-transparent p-1 w-full h-full rounded",
|
|
607
615
|
props.selected && "border-me-primary-500"
|
|
608
616
|
),
|
|
609
|
-
children: /* @__PURE__ */ (0,
|
|
617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LazyThumbnail, {})
|
|
610
618
|
}
|
|
611
619
|
) }),
|
|
612
|
-
/* @__PURE__ */ (0,
|
|
620
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CanvasLabel, { className: "text-sm text-center truncate mt-1", as: "div" })
|
|
613
621
|
] }) });
|
|
614
622
|
}
|
|
615
623
|
|
|
616
624
|
// src/Modal.tsx
|
|
617
625
|
var import_react4 = require("@headlessui/react");
|
|
618
626
|
var import_react_dom = require("react-dom");
|
|
619
|
-
var
|
|
627
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
620
628
|
function ModalBackSlot({ children }) {
|
|
621
629
|
const element = document.getElementById("modal-back-slot");
|
|
622
630
|
if (!element)
|
|
@@ -624,14 +632,14 @@ function ModalBackSlot({ children }) {
|
|
|
624
632
|
return (0, import_react_dom.createPortal)(children, element);
|
|
625
633
|
}
|
|
626
634
|
function Modal({ id, title, open = true, onClose, actions, children }) {
|
|
627
|
-
return /* @__PURE__ */ (0,
|
|
628
|
-
/* @__PURE__ */ (0,
|
|
629
|
-
/* @__PURE__ */ (0,
|
|
630
|
-
/* @__PURE__ */ (0,
|
|
631
|
-
/* @__PURE__ */ (0,
|
|
632
|
-
/* @__PURE__ */ (0,
|
|
633
|
-
/* @__PURE__ */ (0,
|
|
634
|
-
/* @__PURE__ */ (0,
|
|
635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react4.Dialog, { open, onClose, id, className: "relative z-[500]", children: [
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `fixed inset-0 bg-black/30 animate-fadeIn z-[501]`, "aria-hidden": "true" }),
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "fixed inset-0 flex w-screen items-center justify-center p-4 z-[502]", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "relative p-4 w-full max-w-4xl max-h-full", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react4.DialogPanel, { className: "relative bg-white rounded-lg overflow-hidden shadow-2xl max-h-[80vh] flex flex-col", children: [
|
|
638
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between gap-3 p-4 rounded-t-lg sticky top-0 bg-white", children: [
|
|
639
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id: "modal-back-slot" }),
|
|
640
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react4.DialogTitle, { className: "text-xl font-semibold text-gray-900 ", children: title }),
|
|
641
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react4.CloseButton, { className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center", children: [
|
|
642
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
635
643
|
"svg",
|
|
636
644
|
{
|
|
637
645
|
className: "w-3 h-3",
|
|
@@ -639,7 +647,7 @@ function Modal({ id, title, open = true, onClose, actions, children }) {
|
|
|
639
647
|
xmlns: "http://www.w3.org/2000/svg",
|
|
640
648
|
fill: "none",
|
|
641
649
|
viewBox: "0 0 14 14",
|
|
642
|
-
children: /* @__PURE__ */ (0,
|
|
650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
643
651
|
"path",
|
|
644
652
|
{
|
|
645
653
|
stroke: "currentColor",
|
|
@@ -651,23 +659,23 @@ function Modal({ id, title, open = true, onClose, actions, children }) {
|
|
|
651
659
|
)
|
|
652
660
|
}
|
|
653
661
|
),
|
|
654
|
-
/* @__PURE__ */ (0,
|
|
662
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: "Close" })
|
|
655
663
|
] })
|
|
656
664
|
] }),
|
|
657
|
-
/* @__PURE__ */ (0,
|
|
658
|
-
actions ? /* @__PURE__ */ (0,
|
|
665
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto flex flex-col", children }),
|
|
666
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center p-4 border-t border-gray-200 rounded-b justify-end", children: actions }) : null
|
|
659
667
|
] }) }) })
|
|
660
668
|
] }) });
|
|
661
669
|
}
|
|
662
670
|
|
|
663
671
|
// src/ControlButton.tsx
|
|
664
|
-
var
|
|
672
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
665
673
|
function ControlButton({
|
|
666
674
|
children,
|
|
667
675
|
className: className2,
|
|
668
676
|
...props
|
|
669
677
|
}) {
|
|
670
|
-
return /* @__PURE__ */ (0,
|
|
678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
671
679
|
"button",
|
|
672
680
|
{
|
|
673
681
|
className: cn(
|
|
@@ -681,9 +689,9 @@ function ControlButton({
|
|
|
681
689
|
}
|
|
682
690
|
|
|
683
691
|
// src/OpaqueControls.tsx
|
|
684
|
-
var
|
|
692
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
685
693
|
function OpaqueControls(props) {
|
|
686
|
-
return /* @__PURE__ */ (0,
|
|
694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
687
695
|
"div",
|
|
688
696
|
{
|
|
689
697
|
className: cn("flex w-full p-0.5 opacity-0 transition-opacity duration-300 gap-2", props.active && "opacity-1"),
|
|
@@ -693,11 +701,11 @@ function OpaqueControls(props) {
|
|
|
693
701
|
}
|
|
694
702
|
|
|
695
703
|
// src/Tabs.tsx
|
|
696
|
-
var
|
|
697
|
-
var
|
|
704
|
+
var import_react_aria_components4 = require("react-aria-components");
|
|
705
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
698
706
|
function Tabs({ className: className2, children, ...props }) {
|
|
699
|
-
return /* @__PURE__ */ (0,
|
|
700
|
-
|
|
707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
708
|
+
import_react_aria_components4.Tabs,
|
|
701
709
|
{
|
|
702
710
|
className: (state) => {
|
|
703
711
|
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
@@ -713,8 +721,8 @@ function TabList({
|
|
|
713
721
|
children,
|
|
714
722
|
...props
|
|
715
723
|
}) {
|
|
716
|
-
return /* @__PURE__ */ (0,
|
|
717
|
-
|
|
724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
725
|
+
import_react_aria_components4.TabList,
|
|
718
726
|
{
|
|
719
727
|
className: (state) => {
|
|
720
728
|
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
@@ -726,8 +734,8 @@ function TabList({
|
|
|
726
734
|
);
|
|
727
735
|
}
|
|
728
736
|
function Tab({ className: className2, children, ...props }) {
|
|
729
|
-
return /* @__PURE__ */ (0,
|
|
730
|
-
|
|
737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
738
|
+
import_react_aria_components4.Tab,
|
|
731
739
|
{
|
|
732
740
|
className: (state) => {
|
|
733
741
|
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
@@ -744,8 +752,8 @@ function Tab({ className: className2, children, ...props }) {
|
|
|
744
752
|
);
|
|
745
753
|
}
|
|
746
754
|
function TabPanel({ className: className2, children, ...props }) {
|
|
747
|
-
return /* @__PURE__ */ (0,
|
|
748
|
-
|
|
755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
756
|
+
import_react_aria_components4.TabPanel,
|
|
749
757
|
{
|
|
750
758
|
className: (state) => {
|
|
751
759
|
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
@@ -758,25 +766,25 @@ function TabPanel({ className: className2, children, ...props }) {
|
|
|
758
766
|
}
|
|
759
767
|
|
|
760
768
|
// src/CreatorGrid.tsx
|
|
761
|
-
var
|
|
769
|
+
var import_react_aria_components5 = require("react-aria-components");
|
|
762
770
|
var import_tailwind_merge6 = require("tailwind-merge");
|
|
763
|
-
var
|
|
771
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
764
772
|
function CreatorGrid(props) {
|
|
765
|
-
return /* @__PURE__ */ (0,
|
|
766
|
-
|
|
773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
774
|
+
import_react_aria_components5.ListBox,
|
|
767
775
|
{
|
|
768
776
|
orientation: "horizontal",
|
|
769
777
|
"aria-label": props.label,
|
|
770
778
|
selectionMode: "single",
|
|
771
779
|
items: props.items,
|
|
772
780
|
className: "grid grid-sm gap-4 p-4 mb-8",
|
|
773
|
-
children: (item) => /* @__PURE__ */ (0,
|
|
781
|
+
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CreatorGridItem, { ...item })
|
|
774
782
|
}
|
|
775
783
|
);
|
|
776
784
|
}
|
|
777
785
|
function CreatorGridItem(props) {
|
|
778
|
-
return /* @__PURE__ */ (0,
|
|
779
|
-
|
|
786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
787
|
+
import_react_aria_components5.ListBoxItem,
|
|
780
788
|
{
|
|
781
789
|
id: props.id,
|
|
782
790
|
onAction: props.onClick,
|
|
@@ -785,17 +793,17 @@ function CreatorGridItem(props) {
|
|
|
785
793
|
$s.isFocused && "border-me-primary-500 outline-me-primary-500 outline-2"
|
|
786
794
|
),
|
|
787
795
|
children: [
|
|
788
|
-
/* @__PURE__ */ (0,
|
|
789
|
-
/* @__PURE__ */ (0,
|
|
790
|
-
/* @__PURE__ */ (0,
|
|
796
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "rounded bg-me-gray-300 mb-2 flex items-center justify-center py-1 aspect-square", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-center [&>svg]:w-16 [&>svg]:h-16", children: props.icon }) }),
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-center font-semibold text-sm", children: props.title }),
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-sm text-center text-black/50", children: props.description })
|
|
791
799
|
]
|
|
792
800
|
}
|
|
793
801
|
);
|
|
794
802
|
}
|
|
795
803
|
|
|
796
804
|
// src/icons/DownloadIcon.tsx
|
|
797
|
-
var
|
|
798
|
-
var DownloadIcon = (props) => /* @__PURE__ */ (0,
|
|
805
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
806
|
+
var DownloadIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
799
807
|
"path",
|
|
800
808
|
{
|
|
801
809
|
d: "M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z",
|
|
@@ -805,10 +813,10 @@ var DownloadIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg
|
|
|
805
813
|
|
|
806
814
|
// src/DownloadButton.tsx
|
|
807
815
|
var import_react_aria = require("react-aria");
|
|
808
|
-
var
|
|
816
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
809
817
|
function DownloadButton({ label, id: _id, getData, fileName, fileType }) {
|
|
810
818
|
const id = (0, import_react_aria.useId)(_id);
|
|
811
|
-
return /* @__PURE__ */ (0,
|
|
819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Tooltip, { placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
812
820
|
TooltipTrigger,
|
|
813
821
|
{
|
|
814
822
|
className: "bg-me-gray-100 hover:bg-me-primary-500 hover:text-white p-1 rounded-md text-me-primary-500 text-2xl",
|
|
@@ -816,8 +824,8 @@ function DownloadButton({ label, id: _id, getData, fileName, fileType }) {
|
|
|
816
824
|
id,
|
|
817
825
|
onPress: () => createDownload(getData(), fileName, fileType),
|
|
818
826
|
children: [
|
|
819
|
-
/* @__PURE__ */ (0,
|
|
820
|
-
/* @__PURE__ */ (0,
|
|
827
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DownloadIcon, { "aria-labelledby": _id }),
|
|
828
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DefaultTooltipContent, { children: label })
|
|
821
829
|
]
|
|
822
830
|
}
|
|
823
831
|
) });
|
|
@@ -837,11 +845,11 @@ function createDownload(data, fileName, fileType = "text/json") {
|
|
|
837
845
|
}
|
|
838
846
|
|
|
839
847
|
// src/AtlasBanner.tsx
|
|
840
|
-
var
|
|
848
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
841
849
|
function AtlasBanner({ children, controlsId }) {
|
|
842
|
-
return /* @__PURE__ */ (0,
|
|
843
|
-
/* @__PURE__ */ (0,
|
|
844
|
-
/* @__PURE__ */ (0,
|
|
850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "bg-me-gray-100 border-b text-black p-1 flex gap-4 items-center h-12", children: [
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-4", children }),
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { id: controlsId || "atlas-controls", className: "flex gap-2" })
|
|
845
853
|
] });
|
|
846
854
|
}
|
|
847
855
|
|
|
@@ -849,8 +857,8 @@ function AtlasBanner({ children, controlsId }) {
|
|
|
849
857
|
var import_react_iiif_vault4 = require("react-iiif-vault");
|
|
850
858
|
|
|
851
859
|
// src/icons/DrawIcon.tsx
|
|
852
|
-
var
|
|
853
|
-
var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
860
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
861
|
+
var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
854
862
|
"svg",
|
|
855
863
|
{
|
|
856
864
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -860,8 +868,8 @@ var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
860
868
|
"aria-labelledby": titleId,
|
|
861
869
|
...props,
|
|
862
870
|
children: [
|
|
863
|
-
title ? /* @__PURE__ */ (0,
|
|
864
|
-
/* @__PURE__ */ (0,
|
|
871
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("title", { id: titleId, children: title }) : null,
|
|
872
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
865
873
|
"path",
|
|
866
874
|
{
|
|
867
875
|
fill: "currentColor",
|
|
@@ -873,8 +881,8 @@ var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
873
881
|
);
|
|
874
882
|
|
|
875
883
|
// src/icons/PolygonIcon.tsx
|
|
876
|
-
var
|
|
877
|
-
var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
884
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
885
|
+
var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
878
886
|
"svg",
|
|
879
887
|
{
|
|
880
888
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -884,8 +892,8 @@ var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_j
|
|
|
884
892
|
"aria-labelledby": titleId,
|
|
885
893
|
...props,
|
|
886
894
|
children: [
|
|
887
|
-
title ? /* @__PURE__ */ (0,
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
895
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("title", { id: titleId, children: title }) : null,
|
|
896
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
889
897
|
"path",
|
|
890
898
|
{
|
|
891
899
|
fill: "currentColor",
|
|
@@ -897,34 +905,34 @@ var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_j
|
|
|
897
905
|
);
|
|
898
906
|
|
|
899
907
|
// src/icons/LineIcon.tsx
|
|
900
|
-
var
|
|
908
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
901
909
|
function LineIcon({ title, titleId, ...props }) {
|
|
902
|
-
return /* @__PURE__ */ (0,
|
|
903
|
-
title ? /* @__PURE__ */ (0,
|
|
904
|
-
/* @__PURE__ */ (0,
|
|
905
|
-
/* @__PURE__ */ (0,
|
|
906
|
-
/* @__PURE__ */ (0,
|
|
907
|
-
/* @__PURE__ */ (0,
|
|
910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
911
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("title", { id: titleId, children: title }) : null,
|
|
912
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { fill: "none", fillRule: "evenodd", children: [
|
|
913
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("circle", { cx: 4.5, cy: 4.5, r: 2.5, fill: "currentColor" }),
|
|
914
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("circle", { cx: 15.5, cy: 15.5, r: 2.5, fill: "currentColor" }),
|
|
915
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { stroke: "currentColor", strokeLinecap: "square", strokeWidth: 2, d: "m13.5 13.5-9-9" })
|
|
908
916
|
] })
|
|
909
917
|
] });
|
|
910
918
|
}
|
|
911
919
|
|
|
912
920
|
// src/icons/LineBoxIcon.tsx
|
|
913
|
-
var
|
|
921
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
914
922
|
function LineBoxIcon({ title, titleId, ...props }) {
|
|
915
|
-
return /* @__PURE__ */ (0,
|
|
916
|
-
title ? /* @__PURE__ */ (0,
|
|
917
|
-
/* @__PURE__ */ (0,
|
|
918
|
-
/* @__PURE__ */ (0,
|
|
919
|
-
/* @__PURE__ */ (0,
|
|
920
|
-
/* @__PURE__ */ (0,
|
|
923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
924
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("title", { id: titleId, children: title }) : null,
|
|
925
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("g", { fill: "none", fillRule: "evenodd", children: [
|
|
926
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M0 0h20v20H0z" }),
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { stroke: "currentColor", strokeLinecap: "square", strokeWidth: 2, d: "m8.5 11.5 6-6M16 4v3m0-3h-3m0 14L2 7" }),
|
|
928
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { stroke: "currentColor", strokeOpacity: 0.407, strokeWidth: 2, d: "m2 7 5-5 11 11-5 5z" })
|
|
921
929
|
] })
|
|
922
930
|
] });
|
|
923
931
|
}
|
|
924
932
|
|
|
925
933
|
// src/icons/ShapesIcon.tsx
|
|
926
|
-
var
|
|
927
|
-
var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
934
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
935
|
+
var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
928
936
|
"svg",
|
|
929
937
|
{
|
|
930
938
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -934,8 +942,8 @@ var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_js
|
|
|
934
942
|
"aria-labelledby": titleId,
|
|
935
943
|
...props,
|
|
936
944
|
children: [
|
|
937
|
-
title ? /* @__PURE__ */ (0,
|
|
938
|
-
/* @__PURE__ */ (0,
|
|
945
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("title", { id: titleId, children: title }) : null,
|
|
946
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
939
947
|
"path",
|
|
940
948
|
{
|
|
941
949
|
fill: "currentColor",
|
|
@@ -947,8 +955,8 @@ var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_js
|
|
|
947
955
|
);
|
|
948
956
|
|
|
949
957
|
// src/icons/SquareIcon.tsx
|
|
950
|
-
var
|
|
951
|
-
var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
958
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
959
|
+
var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
952
960
|
"svg",
|
|
953
961
|
{
|
|
954
962
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -958,8 +966,8 @@ var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_js
|
|
|
958
966
|
"aria-labelledby": titleId,
|
|
959
967
|
...props,
|
|
960
968
|
children: [
|
|
961
|
-
title ? /* @__PURE__ */ (0,
|
|
962
|
-
/* @__PURE__ */ (0,
|
|
969
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("title", { id: titleId, children: title }) : null,
|
|
970
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
963
971
|
"path",
|
|
964
972
|
{
|
|
965
973
|
fill: "currentColor",
|
|
@@ -971,8 +979,8 @@ var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_js
|
|
|
971
979
|
);
|
|
972
980
|
|
|
973
981
|
// src/icons/TriangleIcon.tsx
|
|
974
|
-
var
|
|
975
|
-
var TriangleIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
982
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
983
|
+
var TriangleIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
976
984
|
"svg",
|
|
977
985
|
{
|
|
978
986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -982,15 +990,15 @@ var TriangleIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_
|
|
|
982
990
|
"aria-labelledby": titleId,
|
|
983
991
|
...props,
|
|
984
992
|
children: [
|
|
985
|
-
title ? /* @__PURE__ */ (0,
|
|
986
|
-
/* @__PURE__ */ (0,
|
|
993
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("title", { id: titleId, children: title }) : null,
|
|
994
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { d: "m80-160 400-640 400 640H80Zm144-80h512L480-650 224-240Zm256-205Z", fill: "currentColor" })
|
|
987
995
|
]
|
|
988
996
|
}
|
|
989
997
|
);
|
|
990
998
|
|
|
991
999
|
// src/icons/HexagonIcon.tsx
|
|
992
|
-
var
|
|
993
|
-
var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
1000
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1001
|
+
var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
994
1002
|
"svg",
|
|
995
1003
|
{
|
|
996
1004
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1000,8 +1008,8 @@ var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_j
|
|
|
1000
1008
|
"aria-labelledby": titleId,
|
|
1001
1009
|
...props,
|
|
1002
1010
|
children: [
|
|
1003
|
-
title ? /* @__PURE__ */ (0,
|
|
1004
|
-
/* @__PURE__ */ (0,
|
|
1011
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("title", { id: titleId, children: title }) : null,
|
|
1012
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1005
1013
|
"path",
|
|
1006
1014
|
{
|
|
1007
1015
|
fill: "currentColor",
|
|
@@ -1013,12 +1021,12 @@ var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_j
|
|
|
1013
1021
|
);
|
|
1014
1022
|
|
|
1015
1023
|
// src/icons/DeleteForeverIcon.tsx
|
|
1016
|
-
var
|
|
1024
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1017
1025
|
function DeleteForeverIcon(props) {
|
|
1018
|
-
return /* @__PURE__ */ (0,
|
|
1019
|
-
/* @__PURE__ */ (0,
|
|
1020
|
-
/* @__PURE__ */ (0,
|
|
1021
|
-
/* @__PURE__ */ (0,
|
|
1026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("svg", { height: "1em", width: "1em", viewBox: "0 0 24 24", ...props, children: [
|
|
1027
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1028
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1029
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1022
1030
|
"path",
|
|
1023
1031
|
{
|
|
1024
1032
|
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z",
|
|
@@ -1030,18 +1038,18 @@ function DeleteForeverIcon(props) {
|
|
|
1030
1038
|
|
|
1031
1039
|
// src/SvgControlBar.tsx
|
|
1032
1040
|
var import_react5 = require("react");
|
|
1033
|
-
var
|
|
1041
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1034
1042
|
var className = 'bg-me-gray-100 border hover:bg-me-gray-300 rounded p-1 text-2xl text-me-primary-500 data-[active="true"]:border-me-primary-600';
|
|
1035
1043
|
var icons = {
|
|
1036
|
-
DrawIcon: /* @__PURE__ */ (0,
|
|
1037
|
-
PolygonIcon: /* @__PURE__ */ (0,
|
|
1038
|
-
LineIcon: /* @__PURE__ */ (0,
|
|
1039
|
-
LineBoxIcon: /* @__PURE__ */ (0,
|
|
1040
|
-
ShapesIcon: /* @__PURE__ */ (0,
|
|
1041
|
-
SquareIcon: /* @__PURE__ */ (0,
|
|
1042
|
-
TriangleIcon: /* @__PURE__ */ (0,
|
|
1043
|
-
HexagonIcon: /* @__PURE__ */ (0,
|
|
1044
|
-
DeleteForeverIcon: /* @__PURE__ */ (0,
|
|
1044
|
+
DrawIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DrawIcon, {}),
|
|
1045
|
+
PolygonIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PolygonIcon, {}),
|
|
1046
|
+
LineIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LineIcon, {}),
|
|
1047
|
+
LineBoxIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LineBoxIcon, {}),
|
|
1048
|
+
ShapesIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ShapesIcon, {}),
|
|
1049
|
+
SquareIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SquareIcon, {}),
|
|
1050
|
+
TriangleIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TriangleIcon, {}),
|
|
1051
|
+
HexagonIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HexagonIcon, {}),
|
|
1052
|
+
DeleteForeverIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DeleteForeverIcon, {})
|
|
1045
1053
|
};
|
|
1046
1054
|
function SvgControlBar({
|
|
1047
1055
|
helper,
|
|
@@ -1051,7 +1059,7 @@ function SvgControlBar({
|
|
|
1051
1059
|
(0, import_react5.useEffect)(() => {
|
|
1052
1060
|
helper.stamps.square();
|
|
1053
1061
|
}, []);
|
|
1054
|
-
return /* @__PURE__ */ (0,
|
|
1062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1055
1063
|
import_react_iiif_vault4.RenderSvgEditorControls,
|
|
1056
1064
|
{
|
|
1057
1065
|
icons,
|
|
@@ -1066,18 +1074,18 @@ function SvgControlBar({
|
|
|
1066
1074
|
}
|
|
1067
1075
|
|
|
1068
1076
|
// src/ConfirmSelectionButton.tsx
|
|
1069
|
-
var
|
|
1070
|
-
var
|
|
1077
|
+
var import_react_aria_components6 = require("react-aria-components");
|
|
1078
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1071
1079
|
function ConfirmSelectionButton({ onPress, children }) {
|
|
1072
|
-
return /* @__PURE__ */ (0,
|
|
1080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components6.Button, { className: "bg-me-primary-500 px-3 py-1 hover:bg-me-primary-600 text-white rounded", onPress, children });
|
|
1073
1081
|
}
|
|
1074
1082
|
|
|
1075
1083
|
// src/ManifestOverviewEmptyState.tsx
|
|
1076
|
-
var
|
|
1077
|
-
var
|
|
1084
|
+
var import_react_aria_components7 = require("react-aria-components");
|
|
1085
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1078
1086
|
function ManifestOverviewEmptyState({ onCreate, canCreate }) {
|
|
1079
|
-
return /* @__PURE__ */ (0,
|
|
1080
|
-
/* @__PURE__ */ (0,
|
|
1087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center flex-col gap-5 py-16", children: [
|
|
1088
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1081
1089
|
Card3D,
|
|
1082
1090
|
{
|
|
1083
1091
|
shouldTranslate: true,
|
|
@@ -1085,10 +1093,10 @@ function ManifestOverviewEmptyState({ onCreate, canCreate }) {
|
|
|
1085
1093
|
className: "border-2 border-dotted bg-black/5 aspect-[3/4] rounded w-32 border-black"
|
|
1086
1094
|
}
|
|
1087
1095
|
),
|
|
1088
|
-
/* @__PURE__ */ (0,
|
|
1089
|
-
/* @__PURE__ */ (0,
|
|
1090
|
-
canCreate ? /* @__PURE__ */ (0,
|
|
1091
|
-
|
|
1096
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "font-bold text-lg", children: "Let's get started!" }),
|
|
1097
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "max-w-xl px-5 my-4", children: "Add a title and top level information for this manifest using the editing panel on the right, and then add some canvases and content." }),
|
|
1098
|
+
canCreate ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1099
|
+
import_react_aria_components7.Button,
|
|
1092
1100
|
{
|
|
1093
1101
|
className: "px-8 font-bold py-2 border rounded-lg border-me-primary-500 text-me-primary-500 hover:border-me-primary-600 hover:text-me-primary-600",
|
|
1094
1102
|
onPress: onCreate,
|
|
@@ -1099,26 +1107,18 @@ function ManifestOverviewEmptyState({ onCreate, canCreate }) {
|
|
|
1099
1107
|
}
|
|
1100
1108
|
|
|
1101
1109
|
// src/SidebarTabs.tsx
|
|
1102
|
-
var import_react6 = require("react");
|
|
1103
|
-
var import_react_aria_components7 = require("react-aria-components");
|
|
1104
1110
|
var import_collections = require("@react-aria/collections");
|
|
1111
|
+
var import_react6 = require("react");
|
|
1112
|
+
var import_react_aria_components8 = require("react-aria-components");
|
|
1105
1113
|
var import_react_dom2 = require("react-dom");
|
|
1106
|
-
var
|
|
1107
|
-
function SidebarTabs({
|
|
1108
|
-
menu,
|
|
1109
|
-
menuId,
|
|
1110
|
-
selectedKey,
|
|
1111
|
-
onSelectionChange
|
|
1112
|
-
}) {
|
|
1114
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1115
|
+
function SidebarTabs({ menu, menuId, selectedKey, onSelectionChange }) {
|
|
1113
1116
|
const ref = (0, import_react6.useRef)(null);
|
|
1114
1117
|
const [hidden, setHidden] = (0, import_react6.useState)(0);
|
|
1115
1118
|
const [hiddenMenu, setHiddenMenu] = (0, import_react6.useState)(null);
|
|
1116
1119
|
const widths = (0, import_react6.useRef)([]);
|
|
1117
1120
|
const itemsRef = (0, import_react6.useRef)([]);
|
|
1118
|
-
const selectedIndex = (0, import_react6.useMemo)(
|
|
1119
|
-
() => menu.findIndex((item) => item.id === selectedKey),
|
|
1120
|
-
[menu, selectedKey]
|
|
1121
|
-
);
|
|
1121
|
+
const selectedIndex = (0, import_react6.useMemo)(() => menu.findIndex((item) => item.id === selectedKey), [menu, selectedKey]);
|
|
1122
1122
|
(0, import_react6.useLayoutEffect)(() => {
|
|
1123
1123
|
const cb = () => {
|
|
1124
1124
|
if (widths.current.length === 0) {
|
|
@@ -1152,58 +1152,43 @@ function SidebarTabs({
|
|
|
1152
1152
|
};
|
|
1153
1153
|
}, []);
|
|
1154
1154
|
const menuHidden = menu.filter((item, idx) => hidden >= menu.length - idx);
|
|
1155
|
-
return /* @__PURE__ */ (0,
|
|
1156
|
-
/* @__PURE__ */ (0,
|
|
1157
|
-
|
|
1155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
1156
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1157
|
+
import_react_aria_components8.Tabs,
|
|
1158
1158
|
{
|
|
1159
1159
|
className: "w-full flex-1 overflow-hidden flex flex-col",
|
|
1160
1160
|
selectedKey,
|
|
1161
1161
|
onSelectionChange,
|
|
1162
1162
|
children: [
|
|
1163
|
-
/* @__PURE__ */ (0,
|
|
1164
|
-
/* @__PURE__ */ (0,
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
},
|
|
1185
|
-
item.id
|
|
1186
|
-
);
|
|
1187
|
-
})
|
|
1188
|
-
}
|
|
1189
|
-
),
|
|
1190
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref: setHiddenMenu, id: "hidden-menu" })
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center w-full tab-shadow", children: [
|
|
1164
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components8.TabList, { ref, className: "flex-1 overflow-hidden w-full flex text-sm whitespace-nowrap", children: menu.map((item, idx) => {
|
|
1165
|
+
const isHidden = hidden >= menu.length - idx;
|
|
1166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1167
|
+
import_react_aria_components8.Tab,
|
|
1168
|
+
{
|
|
1169
|
+
ref: (el) => itemsRef.current[idx] = el,
|
|
1170
|
+
id: item.id,
|
|
1171
|
+
className: (state) => cn(
|
|
1172
|
+
//
|
|
1173
|
+
"border-b-2 px-2 py-1 text-sm text-gray-400 select-none hover:text-black focus:ring-0 focus:outline-none",
|
|
1174
|
+
state.isSelected && "border-me-primary-500 text-black",
|
|
1175
|
+
state.isFocusVisible && "ring-0 bg-me-gray-100",
|
|
1176
|
+
isHidden && "hidden"
|
|
1177
|
+
),
|
|
1178
|
+
children: item.label
|
|
1179
|
+
},
|
|
1180
|
+
item.id
|
|
1181
|
+
);
|
|
1182
|
+
}) }),
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: setHiddenMenu, id: "hidden-menu" })
|
|
1191
1184
|
] }),
|
|
1192
|
-
menu.map((item) => /* @__PURE__ */ (0,
|
|
1193
|
-
import_react_aria_components7.TabPanel,
|
|
1194
|
-
{
|
|
1195
|
-
id: item.id,
|
|
1196
|
-
className: "flex-1 overflow-y-auto h-full",
|
|
1197
|
-
children: item.renderComponent
|
|
1198
|
-
},
|
|
1199
|
-
item.id
|
|
1200
|
-
))
|
|
1185
|
+
menu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components8.TabPanel, { id: item.id, className: "flex-1 overflow-y-auto h-full", children: item.renderComponent }, item.id))
|
|
1201
1186
|
]
|
|
1202
1187
|
},
|
|
1203
1188
|
menuId
|
|
1204
1189
|
),
|
|
1205
1190
|
hiddenMenu && hidden > 0 ? (0, import_react_dom2.createPortal)(
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1207
1192
|
MoreMenu,
|
|
1208
1193
|
{
|
|
1209
1194
|
hidden,
|
|
@@ -1218,9 +1203,9 @@ function SidebarTabs({
|
|
|
1218
1203
|
] });
|
|
1219
1204
|
}
|
|
1220
1205
|
var MoreMenu = (0, import_collections.createHideableComponent)(({ selectedIndex, hidden, menuHidden, selectedKey, onSelectionChange }) => {
|
|
1221
|
-
return /* @__PURE__ */ (0,
|
|
1222
|
-
/* @__PURE__ */ (0,
|
|
1223
|
-
|
|
1206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_aria_components8.MenuTrigger, { children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1208
|
+
import_react_aria_components8.Button,
|
|
1224
1209
|
{
|
|
1225
1210
|
className: cn(
|
|
1226
1211
|
"border-none rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]",
|
|
@@ -1229,39 +1214,33 @@ var MoreMenu = (0, import_collections.createHideableComponent)(({ selectedIndex,
|
|
|
1229
1214
|
children: "MORE"
|
|
1230
1215
|
}
|
|
1231
1216
|
),
|
|
1232
|
-
/* @__PURE__ */ (0,
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
},
|
|
1247
|
-
item.id
|
|
1248
|
-
);
|
|
1249
|
-
})
|
|
1250
|
-
}
|
|
1251
|
-
) : null })
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components8.Popover, { children: menuHidden.length ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components8.Menu, { className: "bg-white rounded shadow-lg flex flex-col gap-0.5 p-0.5 min-w-28", children: menuHidden.map((item) => {
|
|
1218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1219
|
+
import_react_aria_components8.MenuItem,
|
|
1220
|
+
{
|
|
1221
|
+
className: (state) => cn(
|
|
1222
|
+
"hover:bg-me-gray-100 p-1 rounded-sm text-sm",
|
|
1223
|
+
selectedKey === item.id && "ring ring-me-primary-500"
|
|
1224
|
+
),
|
|
1225
|
+
onAction: () => onSelectionChange?.(item.id),
|
|
1226
|
+
children: item.label
|
|
1227
|
+
},
|
|
1228
|
+
item.id
|
|
1229
|
+
);
|
|
1230
|
+
}) }) : null })
|
|
1252
1231
|
] });
|
|
1253
1232
|
});
|
|
1254
1233
|
|
|
1255
1234
|
// src/MetadataContainer.tsx
|
|
1256
1235
|
var import_react_iiif_vault5 = require("react-iiif-vault");
|
|
1257
|
-
var
|
|
1236
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1258
1237
|
function MetadataContainer({
|
|
1259
1238
|
className: className2,
|
|
1260
1239
|
label,
|
|
1261
1240
|
children,
|
|
1262
1241
|
...props
|
|
1263
1242
|
}) {
|
|
1264
|
-
return /* @__PURE__ */ (0,
|
|
1243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1265
1244
|
"fieldset",
|
|
1266
1245
|
{
|
|
1267
1246
|
className: cn(
|
|
@@ -1270,7 +1249,7 @@ function MetadataContainer({
|
|
|
1270
1249
|
),
|
|
1271
1250
|
...props,
|
|
1272
1251
|
children: [
|
|
1273
|
-
/* @__PURE__ */ (0,
|
|
1252
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_iiif_vault5.LocaleString, { className: "text-lg font-bold text-[#333] mb-2", as: "h3", children: label }),
|
|
1274
1253
|
children
|
|
1275
1254
|
]
|
|
1276
1255
|
}
|
|
@@ -1278,9 +1257,9 @@ function MetadataContainer({
|
|
|
1278
1257
|
}
|
|
1279
1258
|
|
|
1280
1259
|
// src/EmptyState.tsx
|
|
1281
|
-
var
|
|
1260
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1282
1261
|
function EmptyState(props) {
|
|
1283
|
-
return /* @__PURE__ */ (0,
|
|
1262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1284
1263
|
"div",
|
|
1285
1264
|
{
|
|
1286
1265
|
className: cn(
|
|
@@ -1294,9 +1273,9 @@ function EmptyState(props) {
|
|
|
1294
1273
|
}
|
|
1295
1274
|
|
|
1296
1275
|
// src/ManifestEditorLogo.tsx
|
|
1297
|
-
var
|
|
1276
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1298
1277
|
function ManifestEditorLogo(props) {
|
|
1299
|
-
return /* @__PURE__ */ (0,
|
|
1278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1300
1279
|
"svg",
|
|
1301
1280
|
{
|
|
1302
1281
|
width: "1em",
|
|
@@ -1305,28 +1284,28 @@ function ManifestEditorLogo(props) {
|
|
|
1305
1284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1306
1285
|
className: "me-logo h-[23px] w-[176px]",
|
|
1307
1286
|
...props,
|
|
1308
|
-
children: /* @__PURE__ */ (0,
|
|
1309
|
-
/* @__PURE__ */ (0,
|
|
1287
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("g", { fill: "none", children: [
|
|
1288
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1310
1289
|
"path",
|
|
1311
1290
|
{
|
|
1312
1291
|
d: "M62.558 5.41v14.873h-2.983v-9.675l-3.985 9.675h-2.26l-4.006-9.675v9.675H46.34V5.41h3.388l4.73 11.06L59.19 5.41zm2.173 8.928c0-1.194.238-2.252.714-3.176.476-.923 1.123-1.633 1.94-2.13.816-.498 1.73-.746 2.738-.746.88 0 1.651.177 2.312.532.66.355 1.19.803 1.588 1.343V8.477h3.004v11.806h-3.004v-1.726c-.384.554-.913 1.012-1.588 1.374-.675.363-1.453.544-2.334.544-.994 0-1.9-.256-2.717-.767-.816-.512-1.463-1.233-1.939-2.163-.476-.93-.714-2-.714-3.207Zm9.292.042c0-.724-.143-1.346-.427-1.864a3.005 3.005 0 0 0-1.15-1.194 3.076 3.076 0 0 0-1.556-.415c-.554 0-1.066.135-1.534.405-.47.27-.85.664-1.14 1.182-.292.519-.437 1.133-.437 1.844 0 .71.145 1.331.437 1.864.29.533.674.941 1.15 1.226.476.284.984.426 1.524.426.554 0 1.073-.139 1.556-.416a3.005 3.005 0 0 0 1.15-1.193c.284-.519.427-1.14.427-1.865Zm12.466-6.073c1.406 0 2.543.444 3.41 1.332.866.888 1.3 2.127 1.3 3.718v6.926h-2.984v-6.52c0-.938-.234-1.66-.703-2.164-.47-.504-1.108-.756-1.918-.756-.824 0-1.474.252-1.95.756-.476.505-.714 1.226-.714 2.163v6.521h-2.983V8.477h2.983v1.47a4.121 4.121 0 0 1 1.524-1.203 4.713 4.713 0 0 1 2.035-.437Zm9.057-1.237c-.526 0-.963-.166-1.311-.5a1.657 1.657 0 0 1-.522-1.247c0-.497.174-.912.522-1.246.348-.334.785-.5 1.31-.5.526 0 .963.166 1.311.5.348.334.522.75.522 1.246 0 .498-.174.913-.522 1.247-.348.334-.785.5-1.31.5Zm1.47 1.407v11.806h-2.983V8.477h2.983Zm8.354 2.451h-2.068v9.355h-3.026v-9.355h-1.342v-2.45h1.342V7.88c0-1.45.412-2.515 1.236-3.197.824-.682 2.067-1.001 3.73-.959V6.24c-.725-.014-1.23.106-1.513.362-.284.256-.427.718-.427 1.385v.49h2.068v2.451Zm12.913 3.197c0 .426-.028.81-.085 1.15h-8.63c.07.853.369 1.52.895 2.003.525.483 1.172.725 1.939.725 1.108 0 1.896-.476 2.365-1.428h3.218c-.34 1.137-.994 2.07-1.96 2.802-.967.732-2.153 1.098-3.56 1.098-1.136 0-2.155-.252-3.057-.757a5.325 5.325 0 0 1-2.11-2.141c-.504-.924-.756-1.99-.756-3.197 0-1.222.248-2.294.745-3.218a5.204 5.204 0 0 1 2.089-2.13c.895-.498 1.925-.746 3.09-.746 1.122 0 2.127.241 3.015.724a5.1 5.1 0 0 1 2.067 2.057c.49.887.735 1.907.735 3.058Zm-3.09-.853c-.014-.767-.29-1.381-.83-1.843-.54-.462-1.201-.693-1.982-.693-.74 0-1.36.224-1.865.671-.504.448-.813 1.07-.927 1.865h5.604Zm9.782 7.203c-.966 0-1.833-.174-2.6-.522-.767-.348-1.375-.82-1.822-1.417a3.591 3.591 0 0 1-.735-1.982h3.004c.057.454.281.83.672 1.13.39.298.877.447 1.46.447.568 0 1.012-.114 1.331-.341.32-.227.48-.519.48-.874 0-.383-.196-.671-.586-.863-.391-.192-1.012-.401-1.865-.629-.88-.213-1.602-.433-2.163-.66a3.755 3.755 0 0 1-1.449-1.044c-.405-.47-.607-1.101-.607-1.897 0-.653.188-1.25.564-1.79.377-.54.917-.966 1.62-1.279.703-.312 1.53-.468 2.483-.468 1.406 0 2.528.351 3.367 1.054.838.704 1.3 1.652 1.385 2.845h-2.856c-.042-.469-.238-.841-.586-1.118-.348-.277-.813-.416-1.396-.416-.54 0-.955.1-1.246.298a.951.951 0 0 0-.437.831c0 .398.199.7.597.906.397.206 1.015.416 1.854.629.852.213 1.555.433 2.11.66a3.727 3.727 0 0 1 1.438 1.055c.405.476.614 1.105.628 1.886 0 .682-.188 1.293-.564 1.833-.377.54-.917.962-1.62 1.268-.703.305-1.524.458-2.461.458Zm10.569-9.547v5.711c0 .398.096.686.288.863.192.178.515.267.97.267h1.385v2.514h-1.875c-2.515 0-3.772-1.222-3.772-3.665v-5.69h-1.407v-2.45h1.407v-2.92h3.004v2.92h2.643v2.45h-2.643Zm12.851-3.111v3.73h5.007v2.364h-5.007v3.943h5.647v2.43h-8.631V5.386h8.63v2.43zm7.585 6.521c0-1.194.239-2.252.715-3.176.476-.923 1.126-1.633 1.95-2.13.824-.498 1.74-.746 2.749-.746.767 0 1.498.167 2.194.5.697.334 1.25.778 1.663 1.332V4.514h3.026v15.77h-3.026v-1.748c-.37.582-.888 1.051-1.556 1.406s-1.442.533-2.323.533a5.07 5.07 0 0 1-2.727-.767c-.824-.512-1.474-1.233-1.95-2.163-.476-.93-.714-2-.714-3.207Zm9.292.042c0-.724-.142-1.346-.426-1.864a3.005 3.005 0 0 0-1.151-1.194 3.076 3.076 0 0 0-1.556-.415 3.02 3.02 0 0 0-1.534.405c-.469.27-.849.664-1.14 1.182-.291.519-.437 1.133-.437 1.844 0 .71.146 1.331.437 1.864.291.533.675.941 1.15 1.226a2.93 2.93 0 0 0 1.524.426c.554 0 1.073-.139 1.556-.416a3.005 3.005 0 0 0 1.15-1.193c.285-.519.427-1.14.427-1.865Zm7.438-7.31c-.527 0-.963-.166-1.311-.5a1.657 1.657 0 0 1-.523-1.247c0-.497.174-.912.523-1.246.348-.334.784-.5 1.31-.5s.963.166 1.31.5c.349.334.523.75.523 1.246 0 .498-.174.913-.522 1.247-.348.334-.785.5-1.31.5Zm1.47 1.407v11.806h-2.984V8.477h2.984Zm6.414 2.451v5.711c0 .398.096.686.287.863.192.178.515.267.97.267h1.385v2.514h-1.875c-2.515 0-3.772-1.222-3.772-3.665v-5.69h-1.406v-2.45h1.406v-2.92h3.005v2.92h2.642v2.45h-2.642Zm10.036 9.547c-1.136 0-2.159-.252-3.068-.757a5.447 5.447 0 0 1-2.141-2.141c-.519-.924-.778-1.99-.778-3.197s.266-2.273.799-3.196a5.553 5.553 0 0 1 2.184-2.142c.924-.504 1.954-.756 3.09-.756 1.137 0 2.167.252 3.09.756a5.553 5.553 0 0 1 2.184 2.142c.533.923.8 1.989.8 3.196 0 1.208-.274 2.273-.821 3.197a5.681 5.681 0 0 1-2.216 2.141c-.93.505-1.971.757-3.122.757Zm0-2.6a3.1 3.1 0 0 0 1.524-.394c.476-.263.856-.657 1.14-1.183.285-.526.427-1.165.427-1.918 0-1.122-.295-1.985-.885-2.589a2.907 2.907 0 0 0-2.163-.906c-.852 0-1.566.302-2.141.906-.576.604-.863 1.467-.863 2.59 0 1.122.28 1.985.841 2.588.562.604 1.268.906 2.12.906Zm11.338-7.565a4.194 4.194 0 0 1 1.502-1.47c.618-.356 1.325-.533 2.12-.533v3.132h-.788c-.938 0-1.644.22-2.12.661-.476.44-.714 1.208-.714 2.302v5.881h-2.984V8.477h2.984v1.833Z",
|
|
1313
1292
|
fill: "#000"
|
|
1314
1293
|
}
|
|
1315
1294
|
),
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1317
|
-
/* @__PURE__ */ (0,
|
|
1318
|
-
/* @__PURE__ */ (0,
|
|
1295
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#E94581", className: "me-logo-1", d: "M0 13.343 13.343 0l13.343 13.343-13.343 13.343z" }),
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#E94581", className: "me-logo-2", d: "M12.137 13.346 25.48.003l13.343 13.343L25.48 26.69z" }),
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#C63E75", className: "me-logo-3", d: "m12.104 13.348 7.311-7.311 7.312 7.311-7.312 7.312z" })
|
|
1319
1298
|
] })
|
|
1320
1299
|
}
|
|
1321
1300
|
);
|
|
1322
1301
|
}
|
|
1323
1302
|
|
|
1324
1303
|
// src/Forms.tsx
|
|
1325
|
-
var
|
|
1326
|
-
var
|
|
1304
|
+
var import_react_aria_components9 = require("react-aria-components");
|
|
1305
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1327
1306
|
function MeLabel({ className: className2, ...props }) {
|
|
1328
|
-
return /* @__PURE__ */ (0,
|
|
1329
|
-
|
|
1307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1308
|
+
import_react_aria_components9.Label,
|
|
1330
1309
|
{
|
|
1331
1310
|
className: cn(
|
|
1332
1311
|
//
|
|
@@ -1338,8 +1317,8 @@ function MeLabel({ className: className2, ...props }) {
|
|
|
1338
1317
|
);
|
|
1339
1318
|
}
|
|
1340
1319
|
function MeRadioGroup({ className: className2, ...props }) {
|
|
1341
|
-
return /* @__PURE__ */ (0,
|
|
1342
|
-
|
|
1320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1321
|
+
import_react_aria_components9.RadioGroup,
|
|
1343
1322
|
{
|
|
1344
1323
|
className: cn(
|
|
1345
1324
|
//
|
|
@@ -1351,8 +1330,8 @@ function MeRadioGroup({ className: className2, ...props }) {
|
|
|
1351
1330
|
);
|
|
1352
1331
|
}
|
|
1353
1332
|
function MeRadio({ className: className2, ...props }) {
|
|
1354
|
-
return /* @__PURE__ */ (0,
|
|
1355
|
-
|
|
1333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1334
|
+
import_react_aria_components9.Radio,
|
|
1356
1335
|
{
|
|
1357
1336
|
className: (state) => cn(
|
|
1358
1337
|
//
|
|
@@ -1364,8 +1343,8 @@ function MeRadio({ className: className2, ...props }) {
|
|
|
1364
1343
|
);
|
|
1365
1344
|
}
|
|
1366
1345
|
function MeForm({ className: className2, ...props }) {
|
|
1367
|
-
return /* @__PURE__ */ (0,
|
|
1368
|
-
|
|
1346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1347
|
+
import_react_aria_components9.Form,
|
|
1369
1348
|
{
|
|
1370
1349
|
className: cn(
|
|
1371
1350
|
//
|
|
@@ -1377,8 +1356,8 @@ function MeForm({ className: className2, ...props }) {
|
|
|
1377
1356
|
);
|
|
1378
1357
|
}
|
|
1379
1358
|
function MeInput({ className: className2, ...props }) {
|
|
1380
|
-
return /* @__PURE__ */ (0,
|
|
1381
|
-
|
|
1359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1360
|
+
import_react_aria_components9.Input,
|
|
1382
1361
|
{
|
|
1383
1362
|
className: cn(
|
|
1384
1363
|
//
|
|
@@ -1391,8 +1370,8 @@ function MeInput({ className: className2, ...props }) {
|
|
|
1391
1370
|
);
|
|
1392
1371
|
}
|
|
1393
1372
|
function MeTextArea({ className: className2, ...props }) {
|
|
1394
|
-
return /* @__PURE__ */ (0,
|
|
1395
|
-
|
|
1373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1374
|
+
import_react_aria_components9.TextArea,
|
|
1396
1375
|
{
|
|
1397
1376
|
className: cn(
|
|
1398
1377
|
//
|
|
@@ -1409,7 +1388,7 @@ function MeInputContainer({
|
|
|
1409
1388
|
className: className2,
|
|
1410
1389
|
...props
|
|
1411
1390
|
}) {
|
|
1412
|
-
return /* @__PURE__ */ (0,
|
|
1391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1413
1392
|
"div",
|
|
1414
1393
|
{
|
|
1415
1394
|
className: cn(
|
|
@@ -1442,12 +1421,12 @@ var import_turndown = __toESM(require("turndown"), 1);
|
|
|
1442
1421
|
var import_style = require("@mdxeditor/editor/style.css");
|
|
1443
1422
|
var import_editor = require("@mdxeditor/editor");
|
|
1444
1423
|
var import_react7 = require("react");
|
|
1445
|
-
var
|
|
1424
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1446
1425
|
function MDXEditor({
|
|
1447
1426
|
editorRef,
|
|
1448
1427
|
...props
|
|
1449
1428
|
}) {
|
|
1450
|
-
return /* @__PURE__ */ (0,
|
|
1429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1451
1430
|
import_editor.MDXEditor,
|
|
1452
1431
|
{
|
|
1453
1432
|
plugins: (0, import_react7.useMemo)(
|
|
@@ -1463,14 +1442,14 @@ function MDXEditor({
|
|
|
1463
1442
|
(0, import_editor.diffSourcePlugin)(),
|
|
1464
1443
|
(0, import_editor.toolbarPlugin)({
|
|
1465
1444
|
toolbarClassName: "mdx-toolbar",
|
|
1466
|
-
toolbarContents: () => /* @__PURE__ */ (0,
|
|
1445
|
+
toolbarContents: () => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
1467
1446
|
" ",
|
|
1468
|
-
/* @__PURE__ */ (0,
|
|
1469
|
-
/* @__PURE__ */ (0,
|
|
1470
|
-
/* @__PURE__ */ (0,
|
|
1471
|
-
/* @__PURE__ */ (0,
|
|
1472
|
-
/* @__PURE__ */ (0,
|
|
1473
|
-
/* @__PURE__ */ (0,
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.UndoRedo, {}),
|
|
1448
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.BoldItalicUnderlineToggles, {}),
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.BlockTypeSelect, {}),
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.ListsToggle, { options: ["bullet", "number"] }),
|
|
1451
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.CreateLink, {}),
|
|
1452
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.InsertImage, {})
|
|
1474
1453
|
] })
|
|
1475
1454
|
})
|
|
1476
1455
|
],
|
|
@@ -1483,7 +1462,7 @@ function MDXEditor({
|
|
|
1483
1462
|
}
|
|
1484
1463
|
|
|
1485
1464
|
// src/HTMLEditor.tsx
|
|
1486
|
-
var
|
|
1465
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1487
1466
|
var converter = new import_showdown.Converter();
|
|
1488
1467
|
converter.setFlavor("github");
|
|
1489
1468
|
var turndownService = new import_turndown.default();
|
|
@@ -1511,7 +1490,7 @@ function HTMLEditor({
|
|
|
1511
1490
|
}
|
|
1512
1491
|
};
|
|
1513
1492
|
}, []);
|
|
1514
|
-
return /* @__PURE__ */ (0,
|
|
1493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1515
1494
|
MDXEditor,
|
|
1516
1495
|
{
|
|
1517
1496
|
editorRef,
|
|
@@ -1537,7 +1516,7 @@ function HTMLEditor({
|
|
|
1537
1516
|
|
|
1538
1517
|
// src/IconButton.tsx
|
|
1539
1518
|
var import_tailwind_merge7 = require("tailwind-merge");
|
|
1540
|
-
var
|
|
1519
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1541
1520
|
function IconButton({
|
|
1542
1521
|
children,
|
|
1543
1522
|
active,
|
|
@@ -1548,9 +1527,10 @@ function IconButton({
|
|
|
1548
1527
|
className: className2,
|
|
1549
1528
|
placement = "top"
|
|
1550
1529
|
}) {
|
|
1551
|
-
return /* @__PURE__ */ (0,
|
|
1530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Tooltip, { placement, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
1552
1531
|
TooltipTrigger,
|
|
1553
1532
|
{
|
|
1533
|
+
"aria-label": label,
|
|
1554
1534
|
onClick: onPress,
|
|
1555
1535
|
className: (0, import_tailwind_merge7.twMerge)(
|
|
1556
1536
|
"rounded flex items-center bg-white justify-center p-2 hover:bg-gray-100 text-2xl",
|
|
@@ -1560,14 +1540,14 @@ function IconButton({
|
|
|
1560
1540
|
),
|
|
1561
1541
|
children: [
|
|
1562
1542
|
children,
|
|
1563
|
-
/* @__PURE__ */ (0,
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DefaultTooltipContent, { root, className: "translate-x-3 z-50", children: label })
|
|
1564
1544
|
]
|
|
1565
1545
|
}
|
|
1566
1546
|
) });
|
|
1567
1547
|
}
|
|
1568
1548
|
|
|
1569
1549
|
// src/ItemWithHandle.tsx
|
|
1570
|
-
var
|
|
1550
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1571
1551
|
function ItemWithHandle({
|
|
1572
1552
|
children,
|
|
1573
1553
|
handle,
|
|
@@ -1578,9 +1558,9 @@ function ItemWithHandle({
|
|
|
1578
1558
|
// Tailwind
|
|
1579
1559
|
"absolute flex p-1 gap-1 bg-white z-1 right-1 top-1 rounded"
|
|
1580
1560
|
) : "flex-shrink-0 flex items-center gap-1 px-1";
|
|
1581
|
-
return /* @__PURE__ */ (0,
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1583
|
-
/* @__PURE__ */ (0,
|
|
1561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: grid ? "relative flex flex-col" : "flex items-center", children: [
|
|
1562
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1 min-w-0", style: { flex: 1, minWidth: 0 }, children }),
|
|
1563
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: gridStyleClassName, children: [
|
|
1584
1564
|
actions,
|
|
1585
1565
|
handle
|
|
1586
1566
|
] })
|
|
@@ -1589,9 +1569,9 @@ function ItemWithHandle({
|
|
|
1589
1569
|
|
|
1590
1570
|
// src/HandleContainer.tsx
|
|
1591
1571
|
var import_react9 = require("react");
|
|
1592
|
-
var
|
|
1572
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1593
1573
|
var HandleContainer = (0, import_react9.forwardRef)(function HandleContainer2({ className: className2, ...props }, ref) {
|
|
1594
|
-
return /* @__PURE__ */ (0,
|
|
1574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1595
1575
|
"div",
|
|
1596
1576
|
{
|
|
1597
1577
|
ref,
|
|
@@ -1602,13 +1582,12 @@ var HandleContainer = (0, import_react9.forwardRef)(function HandleContainer2({
|
|
|
1602
1582
|
});
|
|
1603
1583
|
|
|
1604
1584
|
// src/CollectionListItem.tsx
|
|
1605
|
-
var import_react_aria_components9 = require("react-aria-components");
|
|
1606
1585
|
var import_react_iiif_vault6 = require("react-iiif-vault");
|
|
1607
1586
|
|
|
1608
1587
|
// src/icons/CollectionIcon.tsx
|
|
1609
|
-
var
|
|
1588
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1610
1589
|
function CollectionIcon(props) {
|
|
1611
|
-
return /* @__PURE__ */ (0,
|
|
1590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1612
1591
|
"svg",
|
|
1613
1592
|
{
|
|
1614
1593
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1618,7 +1597,7 @@ function CollectionIcon(props) {
|
|
|
1618
1597
|
"aria-label": "collection",
|
|
1619
1598
|
role: "img",
|
|
1620
1599
|
...props,
|
|
1621
|
-
children: /* @__PURE__ */ (0,
|
|
1600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1622
1601
|
"path",
|
|
1623
1602
|
{
|
|
1624
1603
|
d: "M320-320h480v-480h-80v280l-100-60-100 60v-280H320v480Zm0 80q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Zm360-720h200-200Zm-200 0h480-480Z",
|
|
@@ -1630,37 +1609,42 @@ function CollectionIcon(props) {
|
|
|
1630
1609
|
}
|
|
1631
1610
|
|
|
1632
1611
|
// src/CollectionListItem.tsx
|
|
1633
|
-
var
|
|
1612
|
+
var import_react_aria2 = require("react-aria");
|
|
1613
|
+
var import_i18n = require("@iiif/helpers/i18n");
|
|
1614
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1634
1615
|
function CollectionListItem({ isActive, onAction }) {
|
|
1635
1616
|
const collection = (0, import_react_iiif_vault6.useCollection)({});
|
|
1636
|
-
|
|
1637
|
-
|
|
1617
|
+
const { pressProps } = (0, import_react_aria2.usePress)({
|
|
1618
|
+
onPress: onAction
|
|
1619
|
+
});
|
|
1620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
1621
|
+
"li",
|
|
1638
1622
|
{
|
|
1623
|
+
"aria-label": (0, import_i18n.getValue)(collection?.label),
|
|
1639
1624
|
className: "border-b-2 border-b-gray-200 flex p-2 gap-3 text-left truncate items-center w-full hover:bg-gray-100 data-[active]:bg-gray-200 data-[active]:border-b-me-primary-500",
|
|
1640
|
-
onPress: onAction,
|
|
1641
1625
|
"data-active": isActive || void 0,
|
|
1626
|
+
...pressProps,
|
|
1642
1627
|
children: [
|
|
1643
|
-
/* @__PURE__ */ (0,
|
|
1628
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1644
1629
|
CollectionIcon,
|
|
1645
1630
|
{
|
|
1646
1631
|
"data-active": isActive || void 0,
|
|
1647
1632
|
className: "flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400"
|
|
1648
1633
|
}
|
|
1649
1634
|
),
|
|
1650
|
-
/* @__PURE__ */ (0,
|
|
1635
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_iiif_vault6.LocaleString, { children: collection?.label })
|
|
1651
1636
|
]
|
|
1652
1637
|
}
|
|
1653
1638
|
);
|
|
1654
1639
|
}
|
|
1655
1640
|
|
|
1656
1641
|
// src/ManifestListItem.tsx
|
|
1657
|
-
var import_react_aria_components10 = require("react-aria-components");
|
|
1658
1642
|
var import_react_iiif_vault7 = require("react-iiif-vault");
|
|
1659
1643
|
|
|
1660
1644
|
// src/icons/ManifestIcon.tsx
|
|
1661
|
-
var
|
|
1645
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1662
1646
|
function ManifestIcon(props) {
|
|
1663
|
-
return /* @__PURE__ */ (0,
|
|
1647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1664
1648
|
"svg",
|
|
1665
1649
|
{
|
|
1666
1650
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1670,7 +1654,7 @@ function ManifestIcon(props) {
|
|
|
1670
1654
|
"aria-label": "manifest",
|
|
1671
1655
|
role: "img",
|
|
1672
1656
|
...props,
|
|
1673
|
-
children: /* @__PURE__ */ (0,
|
|
1657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1674
1658
|
"path",
|
|
1675
1659
|
{
|
|
1676
1660
|
d: "M480-160q-48-38-104-59t-116-21q-42 0-82.5 11T100-198q-21 11-40.5-1T40-234v-482q0-11 5.5-21T62-752q46-24 96-36t102-12q58 0 113.5 15T480-740v484q51-32 107-48t113-16q36 0 70.5 6t69.5 18v-480q15 5 29.5 10.5T898-752q11 5 16.5 15t5.5 21v482q0 23-19.5 35t-40.5 1q-37-20-77.5-31T700-240q-60 0-116 21t-104 59Zm80-200v-380l200-200v400L560-360Zm-160 65v-396q-33-14-68.5-21.5T260-720q-37 0-72 7t-68 21v397q35-13 69.5-19t70.5-6q36 0 70.5 6t69.5 19Zm0 0v-396 396Z",
|
|
@@ -1682,35 +1666,41 @@ function ManifestIcon(props) {
|
|
|
1682
1666
|
}
|
|
1683
1667
|
|
|
1684
1668
|
// src/ManifestListItem.tsx
|
|
1685
|
-
var
|
|
1669
|
+
var import_react_aria3 = require("react-aria");
|
|
1670
|
+
var import_helpers = require("@iiif/helpers");
|
|
1671
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1686
1672
|
function ManifestListItem({ isActive, onAction }) {
|
|
1687
1673
|
const manifest = (0, import_react_iiif_vault7.useManifest)();
|
|
1688
|
-
|
|
1689
|
-
|
|
1674
|
+
const { pressProps } = (0, import_react_aria3.usePress)({
|
|
1675
|
+
onPress: onAction
|
|
1676
|
+
});
|
|
1677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
1678
|
+
"li",
|
|
1690
1679
|
{
|
|
1680
|
+
"aria-label": (0, import_helpers.getValue)(manifest?.label),
|
|
1691
1681
|
className: "border-b-2 border-b-gray-200 flex p-2 gap-3 text-left truncate items-center w-full hover:bg-gray-100 data-[active]:bg-gray-200 data-[active]:border-b-me-primary-500",
|
|
1692
|
-
onPress: onAction,
|
|
1693
1682
|
"data-active": isActive || void 0,
|
|
1683
|
+
...pressProps,
|
|
1694
1684
|
children: [
|
|
1695
|
-
/* @__PURE__ */ (0,
|
|
1685
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1696
1686
|
ManifestIcon,
|
|
1697
1687
|
{
|
|
1698
1688
|
"data-active": isActive || void 0,
|
|
1699
1689
|
className: "flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400"
|
|
1700
1690
|
}
|
|
1701
1691
|
),
|
|
1702
|
-
/* @__PURE__ */ (0,
|
|
1692
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_iiif_vault7.LocaleString, { children: manifest?.label })
|
|
1703
1693
|
]
|
|
1704
1694
|
}
|
|
1705
1695
|
);
|
|
1706
1696
|
}
|
|
1707
1697
|
|
|
1708
1698
|
// src/icons/CreateCanvasIcon.tsx
|
|
1709
|
-
var
|
|
1699
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1710
1700
|
function CreateCanvasIcon() {
|
|
1711
|
-
return /* @__PURE__ */ (0,
|
|
1712
|
-
/* @__PURE__ */ (0,
|
|
1713
|
-
/* @__PURE__ */ (0,
|
|
1701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 0 24 24", width: "24", children: [
|
|
1702
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1714
1704
|
"path",
|
|
1715
1705
|
{
|
|
1716
1706
|
d: "M13 11h-2v3H8v2h3v3h2v-3h3v-2h-3zm1-9H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",
|
|
@@ -1721,8 +1711,8 @@ function CreateCanvasIcon() {
|
|
|
1721
1711
|
}
|
|
1722
1712
|
|
|
1723
1713
|
// src/icons/AddImageIcon.tsx
|
|
1724
|
-
var
|
|
1725
|
-
var AddImageIcon = (props) => /* @__PURE__ */ (0,
|
|
1714
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1715
|
+
var AddImageIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1726
1716
|
"path",
|
|
1727
1717
|
{
|
|
1728
1718
|
d: "M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h360v80H200v560h560v-360h80v360q0 33-23.5 56.5T760-120H200Zm480-480v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM240-280h480L570-480 450-320l-90-120-120 160Zm-40-480v560-560Z",
|
|
@@ -1731,8 +1721,8 @@ var AddImageIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("svg
|
|
|
1731
1721
|
) });
|
|
1732
1722
|
|
|
1733
1723
|
// src/icons/IIIFLogo.tsx
|
|
1734
|
-
var
|
|
1735
|
-
var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0,
|
|
1724
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1725
|
+
var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
1736
1726
|
"svg",
|
|
1737
1727
|
{
|
|
1738
1728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1742,7 +1732,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1742
1732
|
...props,
|
|
1743
1733
|
viewBox: "0 0 493.36 441.333",
|
|
1744
1734
|
children: [
|
|
1745
|
-
/* @__PURE__ */ (0,
|
|
1735
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1746
1736
|
"path",
|
|
1747
1737
|
{
|
|
1748
1738
|
d: "m65.242 2178.75 710-263.75-1.25-1900-708.75 261.25v1902.5m738.903 461.34c81.441-240.91-26.473-436.2-241.04-436.2-214.558 0-454.511 195.29-535.953 436.2-81.433 240.89 26.48 436.18 241.039 436.18 214.567 0 454.512-195.29 535.954-436.18",
|
|
@@ -1755,7 +1745,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1755
1745
|
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1756
1746
|
}
|
|
1757
1747
|
),
|
|
1758
|
-
/* @__PURE__ */ (0,
|
|
1748
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1759
1749
|
"path",
|
|
1760
1750
|
{
|
|
1761
1751
|
d: "M1678.58 2178.75 968.578 1915l1.25-1900 708.752 261.25v1902.5m-743.498 461.34c-81.437-240.91 26.477-436.2 241.038-436.2 214.56 0 454.51 195.29 535.96 436.2 81.43 240.89-26.48 436.18-241.04 436.18-214.57 0-454.52-195.29-535.958-436.18",
|
|
@@ -1768,7 +1758,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1768
1758
|
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1769
1759
|
}
|
|
1770
1760
|
),
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1772
1762
|
"path",
|
|
1773
1763
|
{
|
|
1774
1764
|
d: "m1860.24 2178.75 710-263.75-1.25-1900-708.75 261.25v1902.5m743.5 461.34c81.45-240.91-26.47-436.2-241.03-436.2-214.58 0-454.52 195.29-535.96 436.2-81.44 240.89 26.48 436.18 241.03 436.18 214.57 0 454.51-195.29 535.96-436.18",
|
|
@@ -1781,7 +1771,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1781
1771
|
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1782
1772
|
}
|
|
1783
1773
|
),
|
|
1784
|
-
/* @__PURE__ */ (0,
|
|
1774
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1785
1775
|
"path",
|
|
1786
1776
|
{
|
|
1787
1777
|
d: "M3700.24 3310v-652.5s-230 90-257.5-142.5c-2.5-247.5 0-336.25 0-336.25l257.5 83.75V1690l-258.61-92.5v-1335L2735.24 0v2360s-15 850 965 950",
|
|
@@ -1799,8 +1789,8 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1799
1789
|
);
|
|
1800
1790
|
|
|
1801
1791
|
// src/icons/HTMLIcon.tsx
|
|
1802
|
-
var
|
|
1803
|
-
var HTMLIcon = (props) => /* @__PURE__ */ (0,
|
|
1792
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1793
|
+
var HTMLIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1804
1794
|
"path",
|
|
1805
1795
|
{
|
|
1806
1796
|
d: "M0-360v-240h60v80h80v-80h60v240h-60v-100H60v100H0Zm310 0v-180h-70v-60h200v60h-70v180h-60Zm170 0v-200q0-17 11.5-28.5T520-600h180q17 0 28.5 11.5T740-560v200h-60v-180h-40v140h-60v-140h-40v180h-60Zm320 0v-240h60v180h100v60H800Z",
|
|
@@ -1809,8 +1799,8 @@ var HTMLIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("svg", {
|
|
|
1809
1799
|
) });
|
|
1810
1800
|
|
|
1811
1801
|
// src/icons/IIIFBrowserIcon.tsx
|
|
1812
|
-
var
|
|
1813
|
-
var IIIFBrowserIcon = (props) => /* @__PURE__ */ (0,
|
|
1802
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1803
|
+
var IIIFBrowserIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1814
1804
|
"path",
|
|
1815
1805
|
{
|
|
1816
1806
|
d: "M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h200v80H200v560h560v-214l80 80v134q0 33-23.5 56.5T760-120H200Zm40-160 120-160 90 120 120-160 150 200H240Zm622-144L738-548q-21 14-45 21t-51 7q-74 0-126-52.5T464-700q0-75 52.5-127.5T644-880q75 0 127.5 52.5T824-700q0 27-8 52t-20 46l122 122-56 56ZM644-600q42 0 71-29t29-71q0-42-29-71t-71-29q-42 0-71 29t-29 71q0 42 29 71t71 29Z",
|
|
@@ -1819,12 +1809,12 @@ var IIIFBrowserIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("
|
|
|
1819
1809
|
) });
|
|
1820
1810
|
|
|
1821
1811
|
// src/icons/InfoIcon.tsx
|
|
1822
|
-
var
|
|
1812
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1823
1813
|
function InfoIcon({ title, titleId, ...props }) {
|
|
1824
|
-
return /* @__PURE__ */ (0,
|
|
1825
|
-
title ? /* @__PURE__ */ (0,
|
|
1826
|
-
/* @__PURE__ */ (0,
|
|
1827
|
-
/* @__PURE__ */ (0,
|
|
1814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
1815
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("title", { id: titleId, children: title }) : null,
|
|
1816
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1817
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1828
1818
|
"path",
|
|
1829
1819
|
{
|
|
1830
1820
|
d: "M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z",
|
|
@@ -1835,13 +1825,13 @@ function InfoIcon({ title, titleId, ...props }) {
|
|
|
1835
1825
|
}
|
|
1836
1826
|
|
|
1837
1827
|
// src/icons/ListingIcon.tsx
|
|
1838
|
-
var
|
|
1828
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1839
1829
|
function ListingIcon({
|
|
1840
1830
|
title,
|
|
1841
1831
|
titleId,
|
|
1842
1832
|
...props
|
|
1843
1833
|
}) {
|
|
1844
|
-
return /* @__PURE__ */ (0,
|
|
1834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
1845
1835
|
"svg",
|
|
1846
1836
|
{
|
|
1847
1837
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1851,12 +1841,12 @@ function ListingIcon({
|
|
|
1851
1841
|
"aria-labelledby": titleId,
|
|
1852
1842
|
...props,
|
|
1853
1843
|
children: [
|
|
1854
|
-
title ? /* @__PURE__ */ (0,
|
|
1855
|
-
/* @__PURE__ */ (0,
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
1857
|
-
/* @__PURE__ */ (0,
|
|
1844
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("title", { id: titleId, children: title }) : null,
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("g", { fill: "none", children: [
|
|
1846
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M0 0h24v24H0V0z" }),
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M0 0h24v24H0V0z", opacity: ".87" })
|
|
1858
1848
|
] }),
|
|
1859
|
-
/* @__PURE__ */ (0,
|
|
1849
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1860
1850
|
"path",
|
|
1861
1851
|
{
|
|
1862
1852
|
d: "M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z",
|
|
@@ -1869,8 +1859,8 @@ function ListingIcon({
|
|
|
1869
1859
|
}
|
|
1870
1860
|
|
|
1871
1861
|
// src/icons/YouTubeIcon.tsx
|
|
1872
|
-
var
|
|
1873
|
-
var YouTubeIcon = (props) => /* @__PURE__ */ (0,
|
|
1862
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1863
|
+
var YouTubeIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
1874
1864
|
"path",
|
|
1875
1865
|
{
|
|
1876
1866
|
d: "M616-242q-27 1-51.5 1.5t-43.5.5h-41q-71 0-133-2-53-2-104.5-5.5T168-257q-26-7-45-26t-26-45q-6-23-9.5-56T82-447q-2-36-2-73t2-73q2-30 5.5-63t9.5-56q7-26 26-45t45-26q23-6 74.5-9.5T347-798q62-2 133-2t133 2q53 2 104.5 5.5T792-783q26 7 45 26t26 45q6 23 9.5 56t5.5 63q2 36 2 73v17q-19-8-39-12.5t-41-4.5q-83 0-141.5 58.5T600-320q0 21 4 40.5t12 37.5ZM400-400l208-120-208-120v240Zm360 200v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80Z",
|
|
@@ -1879,13 +1869,13 @@ var YouTubeIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("svg"
|
|
|
1879
1869
|
) });
|
|
1880
1870
|
|
|
1881
1871
|
// src/icons/ListEditIcon.tsx
|
|
1882
|
-
var
|
|
1872
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1883
1873
|
function ListEditIcon({
|
|
1884
1874
|
title,
|
|
1885
1875
|
titleId,
|
|
1886
1876
|
...props
|
|
1887
1877
|
}) {
|
|
1888
|
-
return /* @__PURE__ */ (0,
|
|
1878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
1889
1879
|
"svg",
|
|
1890
1880
|
{
|
|
1891
1881
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1895,17 +1885,17 @@ function ListEditIcon({
|
|
|
1895
1885
|
"aria-labelledby": titleId,
|
|
1896
1886
|
...props,
|
|
1897
1887
|
children: [
|
|
1898
|
-
title ? /* @__PURE__ */ (0,
|
|
1899
|
-
/* @__PURE__ */ (0,
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
1888
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("title", { id: titleId, children: title }) : null,
|
|
1889
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1890
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z" })
|
|
1901
1891
|
]
|
|
1902
1892
|
}
|
|
1903
1893
|
);
|
|
1904
1894
|
}
|
|
1905
1895
|
|
|
1906
1896
|
// src/icons/VideoIcon.tsx
|
|
1907
|
-
var
|
|
1908
|
-
var VideoIcon = (props) => /* @__PURE__ */ (0,
|
|
1897
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1898
|
+
var VideoIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
1909
1899
|
"path",
|
|
1910
1900
|
{
|
|
1911
1901
|
d: "M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h480q33 0 56.5 23.5T720-720v180l160-160v440L720-420v180q0 33-23.5 56.5T640-160H160Zm0-80h480v-480H160v480Zm0 0v-480 480Z",
|
|
@@ -1914,8 +1904,8 @@ var VideoIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg",
|
|
|
1914
1904
|
) });
|
|
1915
1905
|
|
|
1916
1906
|
// src/icons/AudioIcon.tsx
|
|
1917
|
-
var
|
|
1918
|
-
var AudioIcon = (props) => /* @__PURE__ */ (0,
|
|
1907
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1908
|
+
var AudioIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1919
1909
|
"path",
|
|
1920
1910
|
{
|
|
1921
1911
|
d: "M480-400q-50 0-85-35t-35-85v-240q0-50 35-85t85-35q50 0 85 35t35 85v240q0 50-35 85t-85 35Zm0-240Zm-40 520v-123q-104-14-172-93t-68-184h80q0 83 58.5 141.5T480-320q83 0 141.5-58.5T680-520h80q0 105-68 184t-172 93v123h-80Zm40-360q17 0 28.5-11.5T520-520v-240q0-17-11.5-28.5T480-800q-17 0-28.5 11.5T440-760v240q0 17 11.5 28.5T480-480Z",
|
|
@@ -1924,8 +1914,8 @@ var AudioIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg",
|
|
|
1924
1914
|
) });
|
|
1925
1915
|
|
|
1926
1916
|
// src/icons/EmptyCanvasIcon.tsx
|
|
1927
|
-
var
|
|
1928
|
-
var EmptyCanvasIcon = (props) => /* @__PURE__ */ (0,
|
|
1917
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1918
|
+
var EmptyCanvasIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1929
1919
|
"path",
|
|
1930
1920
|
{
|
|
1931
1921
|
d: "M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z",
|
|
@@ -1934,14 +1924,14 @@ var EmptyCanvasIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("
|
|
|
1934
1924
|
) });
|
|
1935
1925
|
|
|
1936
1926
|
// src/icons/AddIcon.tsx
|
|
1937
|
-
var
|
|
1927
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1938
1928
|
function AddIcon({
|
|
1939
1929
|
className: className2,
|
|
1940
1930
|
inline,
|
|
1941
1931
|
height = 16,
|
|
1942
1932
|
color = "black"
|
|
1943
1933
|
}) {
|
|
1944
|
-
return /* @__PURE__ */ (0,
|
|
1934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
1945
1935
|
"svg",
|
|
1946
1936
|
{
|
|
1947
1937
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1952,17 +1942,17 @@ function AddIcon({
|
|
|
1952
1942
|
style: { verticalAlign: inline ? "bottom" : void 0 },
|
|
1953
1943
|
className: className2,
|
|
1954
1944
|
children: [
|
|
1955
|
-
/* @__PURE__ */ (0,
|
|
1956
|
-
/* @__PURE__ */ (0,
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", fill: "currentColor" })
|
|
1957
1947
|
]
|
|
1958
1948
|
}
|
|
1959
1949
|
);
|
|
1960
1950
|
}
|
|
1961
1951
|
|
|
1962
1952
|
// src/icons/MoreMenu.tsx
|
|
1963
|
-
var
|
|
1953
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
1964
1954
|
function MoreMenu2() {
|
|
1965
|
-
return /* @__PURE__ */ (0,
|
|
1955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
1966
1956
|
"svg",
|
|
1967
1957
|
{
|
|
1968
1958
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1970,8 +1960,8 @@ function MoreMenu2() {
|
|
|
1970
1960
|
viewBox: "0 0 24 24",
|
|
1971
1961
|
width: "1em",
|
|
1972
1962
|
children: [
|
|
1973
|
-
/* @__PURE__ */ (0,
|
|
1974
|
-
/* @__PURE__ */ (0,
|
|
1963
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1964
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
1975
1965
|
"path",
|
|
1976
1966
|
{
|
|
1977
1967
|
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z",
|
|
@@ -1984,9 +1974,9 @@ function MoreMenu2() {
|
|
|
1984
1974
|
}
|
|
1985
1975
|
|
|
1986
1976
|
// src/icons/PreviewIcon.tsx
|
|
1987
|
-
var
|
|
1977
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
1988
1978
|
function PreviewIcon(props) {
|
|
1989
|
-
return /* @__PURE__ */ (0,
|
|
1979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
1990
1980
|
"path",
|
|
1991
1981
|
{
|
|
1992
1982
|
fill: "currentColor",
|
|
@@ -1996,9 +1986,9 @@ function PreviewIcon(props) {
|
|
|
1996
1986
|
}
|
|
1997
1987
|
|
|
1998
1988
|
// src/icons/ImageListIcon.tsx
|
|
1999
|
-
var
|
|
1989
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2000
1990
|
function ImageListIcon(props) {
|
|
2001
|
-
return /* @__PURE__ */ (0,
|
|
1991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2002
1992
|
"path",
|
|
2003
1993
|
{
|
|
2004
1994
|
fill: "currentColor",
|
|
@@ -2008,16 +1998,16 @@ function ImageListIcon(props) {
|
|
|
2008
1998
|
}
|
|
2009
1999
|
|
|
2010
2000
|
// src/icons/BackIcon.tsx
|
|
2011
|
-
var
|
|
2001
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2012
2002
|
function BackIcon(props) {
|
|
2013
|
-
return /* @__PURE__ */ (0,
|
|
2003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("path", { fill: "currentColor", d: "M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20z" }) });
|
|
2014
2004
|
}
|
|
2015
2005
|
|
|
2016
2006
|
// src/icons/GridIcon.tsx
|
|
2017
|
-
var
|
|
2007
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2018
2008
|
function GridIcon(props) {
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: [
|
|
2010
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2021
2011
|
"path",
|
|
2022
2012
|
{
|
|
2023
2013
|
fill: "currentColor",
|
|
@@ -2025,7 +2015,7 @@ function GridIcon(props) {
|
|
|
2025
2015
|
opacity: ".3"
|
|
2026
2016
|
}
|
|
2027
2017
|
),
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2018
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2029
2019
|
"path",
|
|
2030
2020
|
{
|
|
2031
2021
|
fill: "currentColor",
|
|
@@ -2036,9 +2026,9 @@ function GridIcon(props) {
|
|
|
2036
2026
|
}
|
|
2037
2027
|
|
|
2038
2028
|
// src/icons/ScaledImageIcon.tsx
|
|
2039
|
-
var
|
|
2029
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2040
2030
|
function ScaledImageIcon(props) {
|
|
2041
|
-
return /* @__PURE__ */ (0,
|
|
2031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2042
2032
|
"path",
|
|
2043
2033
|
{
|
|
2044
2034
|
fill: "currentColor",
|
|
@@ -2049,9 +2039,9 @@ function ScaledImageIcon(props) {
|
|
|
2049
2039
|
|
|
2050
2040
|
// src/ErrorMessage.tsx
|
|
2051
2041
|
var import_tailwind_merge8 = require("tailwind-merge");
|
|
2052
|
-
var
|
|
2042
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2053
2043
|
function ErrorMessage({ children, small = false, className: className2 }) {
|
|
2054
|
-
return /* @__PURE__ */ (0,
|
|
2044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
2055
2045
|
"div",
|
|
2056
2046
|
{
|
|
2057
2047
|
className: (0, import_tailwind_merge8.twMerge)(
|
|
@@ -2088,9 +2078,9 @@ function useFastList(list, firstRender = 24) {
|
|
|
2088
2078
|
|
|
2089
2079
|
// src/RenderTextualContent.tsx
|
|
2090
2080
|
var import_react11 = require("react");
|
|
2091
|
-
var
|
|
2081
|
+
var import_react_aria_components10 = require("react-aria-components");
|
|
2092
2082
|
var import_react_iiif_vault8 = require("react-iiif-vault");
|
|
2093
|
-
var
|
|
2083
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2094
2084
|
function RenderTextualContent(props) {
|
|
2095
2085
|
const languages = props.strategy.items.map(
|
|
2096
2086
|
(item) => Object.keys(item.text)[0]
|
|
@@ -2099,10 +2089,10 @@ function RenderTextualContent(props) {
|
|
|
2099
2089
|
const selected = props.strategy.items.find(
|
|
2100
2090
|
(item) => Object.keys(item.text)[0] === langauge
|
|
2101
2091
|
);
|
|
2102
|
-
return /* @__PURE__ */ (0,
|
|
2103
|
-
/* @__PURE__ */ (0,
|
|
2104
|
-
return /* @__PURE__ */ (0,
|
|
2105
|
-
|
|
2092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "overflow-y-auto bg-white shadow", children: [
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex gap-2 border-b", children: languages.map((language) => {
|
|
2094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
2095
|
+
import_react_aria_components10.Button,
|
|
2106
2096
|
{
|
|
2107
2097
|
className: `py-1 px-3 ${langauge === language ? "bg-me-500 text-white" : "bg-white text-black"}`,
|
|
2108
2098
|
onPress: () => setLanguage(language),
|
|
@@ -2111,11 +2101,11 @@ function RenderTextualContent(props) {
|
|
|
2111
2101
|
language
|
|
2112
2102
|
);
|
|
2113
2103
|
}) }),
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2104
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "p-4 prose", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
2115
2105
|
import_react_iiif_vault8.LocaleString,
|
|
2116
2106
|
{
|
|
2117
2107
|
enableDangerouslySetInnerHTML: true,
|
|
2118
|
-
defaultText: /* @__PURE__ */ (0,
|
|
2108
|
+
defaultText: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-gray-500 my-8", children: "No content available" }),
|
|
2119
2109
|
children: selected?.text
|
|
2120
2110
|
}
|
|
2121
2111
|
) })
|
|
@@ -2129,15 +2119,15 @@ var import_captions = require("@vidstack/react/player/styles/default/captions.cs
|
|
|
2129
2119
|
var import_video = require("@vidstack/react/player/styles/default/layouts/video.css");
|
|
2130
2120
|
var import_react12 = require("@vidstack/react");
|
|
2131
2121
|
var import_default = require("@vidstack/react/player/layouts/default");
|
|
2132
|
-
var
|
|
2122
|
+
var import_helpers2 = require("@iiif/helpers");
|
|
2133
2123
|
var import_react13 = require("react");
|
|
2134
|
-
var
|
|
2124
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2135
2125
|
function IIIFMediaPlayer(props) {
|
|
2136
2126
|
const mediaPlayer = (0, import_react13.useRef)(null);
|
|
2137
2127
|
const captions = props.captions || [];
|
|
2138
2128
|
const language = props.language;
|
|
2139
2129
|
const timeRef = (0, import_react13.useRef)(props.startTime || 0);
|
|
2140
|
-
return /* @__PURE__ */ (0,
|
|
2130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2141
2131
|
import_react12.MediaPlayer,
|
|
2142
2132
|
{
|
|
2143
2133
|
onTimeUpdate: (time) => {
|
|
@@ -2158,29 +2148,29 @@ function IIIFMediaPlayer(props) {
|
|
|
2158
2148
|
type: props.media.format
|
|
2159
2149
|
}
|
|
2160
2150
|
],
|
|
2161
|
-
children: /* @__PURE__ */ (0,
|
|
2151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_react12.MediaProvider, { className: "w-full h-full [&>video]:w-full [&>video]:h-full [&>video]:object-contain", children: [
|
|
2162
2152
|
captions.map((caption) => {
|
|
2163
|
-
return /* @__PURE__ */ (0,
|
|
2153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2164
2154
|
import_react12.Track,
|
|
2165
2155
|
{
|
|
2166
2156
|
src: caption.id,
|
|
2167
2157
|
kind: "subtitles",
|
|
2168
|
-
label: (0,
|
|
2158
|
+
label: (0, import_helpers2.getValue)(caption.label),
|
|
2169
2159
|
default: caption.language === language,
|
|
2170
2160
|
language: caption.language
|
|
2171
2161
|
},
|
|
2172
2162
|
caption.id
|
|
2173
2163
|
);
|
|
2174
2164
|
}),
|
|
2175
|
-
props.poster ? /* @__PURE__ */ (0,
|
|
2165
|
+
props.poster ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2176
2166
|
import_react12.Poster,
|
|
2177
2167
|
{
|
|
2178
2168
|
className: "absolute inset-0 bg-black block h-full w-full opacity-0 transition-opacity data-[visible]:opacity-100 object-contain",
|
|
2179
2169
|
src: props.poster
|
|
2180
2170
|
}
|
|
2181
2171
|
) : null,
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2183
|
-
/* @__PURE__ */ (0,
|
|
2172
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Gestures, {}),
|
|
2173
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2184
2174
|
import_default.DefaultVideoLayout,
|
|
2185
2175
|
{
|
|
2186
2176
|
className: "z-1",
|
|
@@ -2193,8 +2183,8 @@ function IIIFMediaPlayer(props) {
|
|
|
2193
2183
|
);
|
|
2194
2184
|
}
|
|
2195
2185
|
function Gestures() {
|
|
2196
|
-
return /* @__PURE__ */ (0,
|
|
2197
|
-
/* @__PURE__ */ (0,
|
|
2186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
|
|
2187
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2198
2188
|
import_react12.Gesture,
|
|
2199
2189
|
{
|
|
2200
2190
|
className: "pointer-coarse:hidden absolute top-0 start-12 bottom-20 right-0 -z-1 block",
|
|
@@ -2202,6 +2192,6 @@ function Gestures() {
|
|
|
2202
2192
|
action: "toggle:paused"
|
|
2203
2193
|
}
|
|
2204
2194
|
),
|
|
2205
|
-
/* @__PURE__ */ (0,
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react12.Gesture, { className: "absolute inset-0 z-0 block h-full w-full", event: "dblpointerup", action: "toggle:fullscreen" })
|
|
2206
2196
|
] });
|
|
2207
2197
|
}
|