@manifest-editor/components 1.2.0 → 1.3.1
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 +746 -271
- package/dist/index.css +906 -5
- package/dist/index.d.cts +80 -13
- package/dist/index.d.ts +80 -13
- package/dist/index.js +799 -274
- package/package.json +18 -8
package/dist/index.cjs
CHANGED
|
@@ -43,21 +43,31 @@ __export(src_exports, {
|
|
|
43
43
|
CreateCanvasIcon: () => CreateCanvasIcon,
|
|
44
44
|
CreatorGrid: () => CreatorGrid,
|
|
45
45
|
DefaultTooltipContent: () => DefaultTooltipContent,
|
|
46
|
+
DeleteForeverIcon: () => DeleteForeverIcon,
|
|
46
47
|
DownloadButton: () => DownloadButton,
|
|
47
48
|
DownloadIcon: () => DownloadIcon,
|
|
48
49
|
EmptyCanvasIcon: () => EmptyCanvasIcon,
|
|
49
50
|
EmptyState: () => EmptyState,
|
|
51
|
+
ErrorMessage: () => ErrorMessage,
|
|
50
52
|
Form: () => Form,
|
|
53
|
+
HTMLEditor: () => HTMLEditor,
|
|
51
54
|
HTMLIcon: () => HTMLIcon,
|
|
55
|
+
HandleContainer: () => HandleContainer,
|
|
52
56
|
IIIFBrowserIcon: () => IIIFBrowserIcon,
|
|
53
57
|
IIIFLogo: () => IIIFLogo,
|
|
58
|
+
IIIFMediaPlayer: () => IIIFMediaPlayer,
|
|
59
|
+
IconButton: () => IconButton,
|
|
60
|
+
ItemWithHandle: () => ItemWithHandle,
|
|
54
61
|
LazyThumbnail: () => LazyThumbnail,
|
|
62
|
+
MDXEditor: () => MDXEditor,
|
|
55
63
|
ManifestEditorLogo: () => ManifestEditorLogo,
|
|
56
64
|
ManifestOverviewEmptyState: () => ManifestOverviewEmptyState,
|
|
57
65
|
MetadataContainer: () => MetadataContainer,
|
|
58
66
|
Modal: () => Modal,
|
|
67
|
+
MoreMenu: () => MoreMenu2,
|
|
59
68
|
OpaqueControls: () => OpaqueControls,
|
|
60
69
|
PanelSideMenu: () => PanelSideMenu,
|
|
70
|
+
RenderTextualContent: () => RenderTextualContent,
|
|
61
71
|
Sidebar: () => Sidebar,
|
|
62
72
|
SidebarContent: () => SidebarContent,
|
|
63
73
|
SidebarHeader: () => SidebarHeader,
|
|
@@ -67,6 +77,7 @@ __export(src_exports, {
|
|
|
67
77
|
TabList: () => TabList,
|
|
68
78
|
TabPanel: () => TabPanel,
|
|
69
79
|
Tabs: () => Tabs,
|
|
80
|
+
TextIcon: () => TextIcon,
|
|
70
81
|
ThumbnailGridContainer: () => ThumbnailGridContainer,
|
|
71
82
|
Tooltip: () => Tooltip,
|
|
72
83
|
TooltipContent: () => TooltipContent,
|
|
@@ -79,6 +90,7 @@ __export(src_exports, {
|
|
|
79
90
|
useTooltipContext: () => useTooltipContext
|
|
80
91
|
});
|
|
81
92
|
module.exports = __toCommonJS(src_exports);
|
|
93
|
+
var import_dist = require("iiif-browser/dist/index.css");
|
|
82
94
|
|
|
83
95
|
// src/ActionButton.tsx
|
|
84
96
|
var import_react_aria_components = require("react-aria-components");
|
|
@@ -119,6 +131,7 @@ function ActionButton({
|
|
|
119
131
|
var React = __toESM(require("react"), 1);
|
|
120
132
|
var import_react = require("@floating-ui/react");
|
|
121
133
|
var import_react_aria_components2 = require("react-aria-components");
|
|
134
|
+
var import_tailwind_merge2 = require("tailwind-merge");
|
|
122
135
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
123
136
|
function useTooltip({
|
|
124
137
|
initialOpen = false,
|
|
@@ -173,7 +186,10 @@ var useTooltipContext = () => {
|
|
|
173
186
|
}
|
|
174
187
|
return context;
|
|
175
188
|
};
|
|
176
|
-
function Tooltip({
|
|
189
|
+
function Tooltip({
|
|
190
|
+
children,
|
|
191
|
+
...options
|
|
192
|
+
}) {
|
|
177
193
|
const tooltip = useTooltip(options);
|
|
178
194
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TooltipContext.Provider, { value: tooltip, children });
|
|
179
195
|
}
|
|
@@ -220,7 +236,16 @@ var TooltipContent = React.forwardRef(function TooltipContent2({ style, ...props
|
|
|
220
236
|
) });
|
|
221
237
|
});
|
|
222
238
|
function DefaultTooltipContent(props) {
|
|
223
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
240
|
+
TooltipContent,
|
|
241
|
+
{
|
|
242
|
+
className: (0, import_tailwind_merge2.twMerge)(
|
|
243
|
+
"bg-me-gray-900 text-white text-sm px-3 py-2 rounded-lg opacity-90 z-50",
|
|
244
|
+
props.className
|
|
245
|
+
),
|
|
246
|
+
children: props.children
|
|
247
|
+
}
|
|
248
|
+
);
|
|
224
249
|
}
|
|
225
250
|
|
|
226
251
|
// src/Sidebar.tsx
|
|
@@ -233,11 +258,11 @@ function SidebarContent({
|
|
|
233
258
|
className: className2,
|
|
234
259
|
padding
|
|
235
260
|
}) {
|
|
236
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("flex-1 min-h-0 overflow-y-auto", className2, padding && "
|
|
261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("flex-1 min-h-0 overflow-y-auto pb-64", className2, padding && "px-3 pt-3"), children });
|
|
237
262
|
}
|
|
238
263
|
function SidebarHeader(props) {
|
|
239
264
|
const { actions, title } = props;
|
|
240
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.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", children: [
|
|
265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.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: [
|
|
241
266
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex-1", children: title }),
|
|
242
267
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ml-auto flex gap-2 items-center", children: actions?.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Tooltip, { placement: "bottom", children: [
|
|
243
268
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -274,6 +299,7 @@ function PanelSideMenuItem(props) {
|
|
|
274
299
|
"border-none aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default",
|
|
275
300
|
props.selected ? "bg-me-primary-500 hover:bg-me-primary-600 hover:text-white text-white" : "text-me-gray-700"
|
|
276
301
|
),
|
|
302
|
+
"aria-label": props.label,
|
|
277
303
|
onMouseDown: props.onClick,
|
|
278
304
|
children: [
|
|
279
305
|
props.icon,
|
|
@@ -311,9 +337,10 @@ function ThumbnailGridContainer(props) {
|
|
|
311
337
|
}
|
|
312
338
|
|
|
313
339
|
// src/LazyThumbnail.tsx
|
|
314
|
-
var import_react_lazy_load_image_component = require("react-lazy-load-image-component");
|
|
315
|
-
var import_react_iiif_vault = require("react-iiif-vault");
|
|
316
340
|
var import_react2 = require("react");
|
|
341
|
+
var import_react_iiif_vault = require("react-iiif-vault");
|
|
342
|
+
var import_react_lazy_load_image_component = require("react-lazy-load-image-component");
|
|
343
|
+
var import_tailwind_merge3 = require("tailwind-merge");
|
|
317
344
|
|
|
318
345
|
// src/Spinner.tsx
|
|
319
346
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
@@ -345,59 +372,118 @@ function Spinner(props) {
|
|
|
345
372
|
);
|
|
346
373
|
}
|
|
347
374
|
|
|
348
|
-
// src/
|
|
375
|
+
// src/icons/TextIcon.tsx
|
|
349
376
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
350
|
-
function
|
|
351
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.
|
|
377
|
+
function TextIcon(props) {
|
|
378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
379
|
+
"svg",
|
|
380
|
+
{
|
|
381
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
382
|
+
width: "1em",
|
|
383
|
+
height: "1em",
|
|
384
|
+
viewBox: "0 0 24 24",
|
|
385
|
+
...props,
|
|
386
|
+
children: [
|
|
387
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("title", { children: "Text" }),
|
|
388
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
389
|
+
"path",
|
|
390
|
+
{
|
|
391
|
+
fill: "currentColor",
|
|
392
|
+
d: "M3 21v-2h18v2zm0-4v-2h12v2zm0-4v-2h18v2zm0-4V7h12v2zm0-4V3h18v2z"
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
]
|
|
396
|
+
}
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// src/LazyThumbnail.tsx
|
|
401
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
402
|
+
function LazyThumbnail({
|
|
403
|
+
cover,
|
|
404
|
+
fade = true
|
|
405
|
+
}) {
|
|
406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_lazy_load_image_component.LazyLoadComponent, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(LazyThumbnailInner, { cover, fade }) });
|
|
352
407
|
}
|
|
353
|
-
|
|
408
|
+
var renderCache = /* @__PURE__ */ new Map();
|
|
409
|
+
function LazyThumbnailInner({
|
|
410
|
+
cover,
|
|
411
|
+
fade = true
|
|
412
|
+
}) {
|
|
354
413
|
const img = (0, import_react2.useRef)(null);
|
|
355
|
-
const
|
|
414
|
+
const canvas = (0, import_react_iiif_vault.useCanvas)();
|
|
415
|
+
const isCached = canvas ? !!renderCache.get(canvas?.id) : false;
|
|
416
|
+
const [isLoading, setIsLoading] = (0, import_react2.useState)(!isCached);
|
|
356
417
|
const thumbnail = (0, import_react_iiif_vault.useThumbnail)({ height: 256, width: 256 }, true);
|
|
418
|
+
let thumbnailId = thumbnail?.id;
|
|
419
|
+
if (canvas?.id && thumbnailId) {
|
|
420
|
+
renderCache.set(canvas.id, thumbnailId);
|
|
421
|
+
} else if (canvas?.id && renderCache.get(canvas.id)) {
|
|
422
|
+
thumbnailId = renderCache.get(canvas?.id);
|
|
423
|
+
}
|
|
357
424
|
(0, import_react2.useEffect)(() => {
|
|
358
|
-
if (
|
|
425
|
+
if (thumbnailId && !isCached) {
|
|
359
426
|
setIsLoading(true);
|
|
360
427
|
}
|
|
361
|
-
}, [
|
|
362
|
-
(0, import_react2.
|
|
363
|
-
|
|
364
|
-
if (
|
|
365
|
-
|
|
428
|
+
}, [thumbnailId, isCached]);
|
|
429
|
+
const checkImage = (0, import_react2.useCallback)(
|
|
430
|
+
(node) => {
|
|
431
|
+
if (node && !isCached) {
|
|
432
|
+
if (node.complete || node.naturalWidth > 0) {
|
|
433
|
+
setIsLoading(false);
|
|
434
|
+
}
|
|
366
435
|
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
436
|
+
},
|
|
437
|
+
[isCached]
|
|
438
|
+
);
|
|
439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: `w-full h-full relative`, children: [
|
|
440
|
+
thumbnail?.id ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
371
441
|
"img",
|
|
372
442
|
{
|
|
373
443
|
onLoad: () => setIsLoading(false),
|
|
374
|
-
ref:
|
|
444
|
+
ref: checkImage,
|
|
375
445
|
src: thumbnail?.id,
|
|
376
446
|
alt: "",
|
|
377
|
-
className: `w-full h-full object-contain ${!isLoading ? "animate-fadeIn" : "opacity-0"}`
|
|
447
|
+
className: `w-full h-full ${cover ? "object-cover" : "object-contain"} ${!isLoading ? isCached ? "" : "animate-fadeIn" : "opacity-0"}`
|
|
448
|
+
}
|
|
449
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ThumbnailFallback, {}),
|
|
450
|
+
!thumbnail?.id || isLoading ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
451
|
+
"div",
|
|
452
|
+
{
|
|
453
|
+
className: (0, import_tailwind_merge3.twMerge)(
|
|
454
|
+
"absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10",
|
|
455
|
+
fade && "animate-fadeIn"
|
|
456
|
+
),
|
|
457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Spinner, {})
|
|
378
458
|
}
|
|
379
|
-
) :
|
|
380
|
-
!thumbnail?.id || isLoading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl animate-fadeIn z-10", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, {}) }) : null
|
|
459
|
+
) : null
|
|
381
460
|
] });
|
|
382
461
|
}
|
|
462
|
+
function ThumbnailFallback() {
|
|
463
|
+
const [strategy] = (0, import_react_iiif_vault.useRenderingStrategy)();
|
|
464
|
+
if (strategy.type === "textual-content") {
|
|
465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.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_runtime10.jsx)(TextIcon, { className: "w-16 h-16" }) });
|
|
466
|
+
}
|
|
467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.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" });
|
|
468
|
+
}
|
|
383
469
|
|
|
384
470
|
// src/CanvasThumbnailGridItem.tsx
|
|
385
471
|
var import_react_iiif_vault3 = require("react-iiif-vault");
|
|
386
472
|
|
|
387
473
|
// src/CanvasLabel.tsx
|
|
388
474
|
var import_react_iiif_vault2 = require("react-iiif-vault");
|
|
389
|
-
var
|
|
475
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
390
476
|
function CanvasLabel(props) {
|
|
391
477
|
const canvas = (0, import_react_iiif_vault2.useCanvas)();
|
|
392
478
|
if (!canvas)
|
|
393
479
|
return null;
|
|
394
|
-
return /* @__PURE__ */ (0,
|
|
480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_iiif_vault2.LocaleString, { className: props.className, as: props.as, children: canvas.label });
|
|
395
481
|
}
|
|
396
482
|
|
|
397
483
|
// src/Card3D.tsx
|
|
398
484
|
var import_react3 = require("react");
|
|
399
|
-
var
|
|
400
|
-
var
|
|
485
|
+
var import_tailwind_merge4 = require("tailwind-merge");
|
|
486
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
401
487
|
function Card3D({
|
|
402
488
|
className: className2,
|
|
403
489
|
shouldTranslate,
|
|
@@ -468,11 +554,11 @@ function Card3D({
|
|
|
468
554
|
outer.current.removeEventListener("mousemove", mousemove);
|
|
469
555
|
};
|
|
470
556
|
}, []);
|
|
471
|
-
return /* @__PURE__ */ (0,
|
|
557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
472
558
|
"div",
|
|
473
559
|
{
|
|
474
560
|
ref: outer,
|
|
475
|
-
className: (0,
|
|
561
|
+
className: (0, import_tailwind_merge4.twMerge)(
|
|
476
562
|
//
|
|
477
563
|
"relative transition-all hover:duration-50",
|
|
478
564
|
shouldTranslate && "hover:shadow-xl",
|
|
@@ -481,7 +567,7 @@ function Card3D({
|
|
|
481
567
|
...props,
|
|
482
568
|
children: [
|
|
483
569
|
children,
|
|
484
|
-
/* @__PURE__ */ (0,
|
|
570
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
485
571
|
"div",
|
|
486
572
|
{
|
|
487
573
|
className: "pointer-events-none absolute inset-0 transition-all",
|
|
@@ -497,70 +583,94 @@ function Card3D({
|
|
|
497
583
|
}
|
|
498
584
|
|
|
499
585
|
// src/CanvasThumbnailGridItem.tsx
|
|
500
|
-
var
|
|
586
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
501
587
|
function CanvasThumbnailGridItem(props) {
|
|
502
|
-
return /* @__PURE__ */ (0,
|
|
503
|
-
/* @__PURE__ */ (0,
|
|
588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_iiif_vault3.CanvasContext, { canvas: props.id, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { onMouseDown: props.onClick, className: "flex flex-col", "data-canvas-selected": props.selected, children: [
|
|
589
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "bg-me-gray-100 w-full aspect-square flex-1 overflow-hidden rounded", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
504
590
|
Card3D,
|
|
505
591
|
{
|
|
592
|
+
"data-canvas-selected": props.active,
|
|
593
|
+
"aria-selected": props.active,
|
|
506
594
|
className: cn(
|
|
507
595
|
"border-2 border-transparent p-1 w-full h-full rounded",
|
|
508
596
|
props.selected && "border-me-primary-500"
|
|
509
597
|
),
|
|
510
|
-
children: /* @__PURE__ */ (0,
|
|
598
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LazyThumbnail, {})
|
|
511
599
|
}
|
|
512
600
|
) }),
|
|
513
|
-
/* @__PURE__ */ (0,
|
|
601
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CanvasLabel, { className: "text-sm text-center truncate mt-1", as: "div" })
|
|
514
602
|
] }) });
|
|
515
603
|
}
|
|
516
604
|
|
|
517
605
|
// src/Modal.tsx
|
|
518
606
|
var import_react4 = require("@headlessui/react");
|
|
519
|
-
var
|
|
520
|
-
function Modal({
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
607
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
608
|
+
function Modal({
|
|
609
|
+
id,
|
|
610
|
+
title,
|
|
611
|
+
open = true,
|
|
612
|
+
onClose,
|
|
613
|
+
actions,
|
|
614
|
+
children
|
|
615
|
+
}) {
|
|
616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
617
|
+
import_react4.Dialog,
|
|
618
|
+
{
|
|
619
|
+
open,
|
|
620
|
+
onClose,
|
|
621
|
+
id,
|
|
622
|
+
className: "relative z-[500]",
|
|
623
|
+
children: [
|
|
624
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
625
|
+
"div",
|
|
626
|
+
{
|
|
627
|
+
className: `fixed inset-0 bg-black/30 animate-fadeIn z-[501]`,
|
|
628
|
+
"aria-hidden": "true"
|
|
629
|
+
}
|
|
630
|
+
),
|
|
631
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "fixed inset-0 flex w-screen items-center justify-center p-4 z-[502]", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "relative p-4 w-full max-w-4xl max-h-full", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react4.DialogPanel, { className: "relative bg-white rounded-lg overflow-hidden shadow-2xl max-h-[80vh] flex flex-col", children: [
|
|
632
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between p-4 md:p-5 rounded-t-lg sticky top-0 bg-white", children: [
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react4.DialogTitle, { className: "text-xl font-semibold text-gray-900 ", children: title }),
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.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: [
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
636
|
+
"svg",
|
|
537
637
|
{
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
638
|
+
className: "w-3 h-3",
|
|
639
|
+
"aria-hidden": "true",
|
|
640
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
641
|
+
fill: "none",
|
|
642
|
+
viewBox: "0 0 14 14",
|
|
643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
644
|
+
"path",
|
|
645
|
+
{
|
|
646
|
+
stroke: "currentColor",
|
|
647
|
+
strokeLinecap: "round",
|
|
648
|
+
strokeLinejoin: "round",
|
|
649
|
+
strokeWidth: "2",
|
|
650
|
+
d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
651
|
+
}
|
|
652
|
+
)
|
|
543
653
|
}
|
|
544
|
-
)
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
654
|
+
),
|
|
655
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sr-only", children: "Close" })
|
|
656
|
+
] })
|
|
657
|
+
] }),
|
|
658
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto flex flex-col", children }),
|
|
659
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b justify-end", children: actions }) : null
|
|
660
|
+
] }) }) })
|
|
661
|
+
]
|
|
662
|
+
}
|
|
663
|
+
) });
|
|
554
664
|
}
|
|
555
665
|
|
|
556
666
|
// src/ControlButton.tsx
|
|
557
|
-
var
|
|
667
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
558
668
|
function ControlButton({
|
|
559
669
|
children,
|
|
560
670
|
className: className2,
|
|
561
671
|
...props
|
|
562
672
|
}) {
|
|
563
|
-
return /* @__PURE__ */ (0,
|
|
673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
564
674
|
"button",
|
|
565
675
|
{
|
|
566
676
|
className: cn(
|
|
@@ -574,9 +684,9 @@ function ControlButton({
|
|
|
574
684
|
}
|
|
575
685
|
|
|
576
686
|
// src/OpaqueControls.tsx
|
|
577
|
-
var
|
|
687
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
578
688
|
function OpaqueControls(props) {
|
|
579
|
-
return /* @__PURE__ */ (0,
|
|
689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
580
690
|
"div",
|
|
581
691
|
{
|
|
582
692
|
className: cn("flex w-full p-0.5 opacity-0 transition-opacity duration-300 gap-2", props.active && "opacity-1"),
|
|
@@ -587,9 +697,9 @@ function OpaqueControls(props) {
|
|
|
587
697
|
|
|
588
698
|
// src/Tabs.tsx
|
|
589
699
|
var import_react_aria_components3 = require("react-aria-components");
|
|
590
|
-
var
|
|
700
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
591
701
|
function Tabs({ className: className2, children, ...props }) {
|
|
592
|
-
return /* @__PURE__ */ (0,
|
|
702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
593
703
|
import_react_aria_components3.Tabs,
|
|
594
704
|
{
|
|
595
705
|
className: (state) => {
|
|
@@ -606,7 +716,7 @@ function TabList({
|
|
|
606
716
|
children,
|
|
607
717
|
...props
|
|
608
718
|
}) {
|
|
609
|
-
return /* @__PURE__ */ (0,
|
|
719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
610
720
|
import_react_aria_components3.TabList,
|
|
611
721
|
{
|
|
612
722
|
className: (state) => {
|
|
@@ -619,7 +729,7 @@ function TabList({
|
|
|
619
729
|
);
|
|
620
730
|
}
|
|
621
731
|
function Tab({ className: className2, children, ...props }) {
|
|
622
|
-
return /* @__PURE__ */ (0,
|
|
732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
623
733
|
import_react_aria_components3.Tab,
|
|
624
734
|
{
|
|
625
735
|
className: (state) => {
|
|
@@ -637,7 +747,7 @@ function Tab({ className: className2, children, ...props }) {
|
|
|
637
747
|
);
|
|
638
748
|
}
|
|
639
749
|
function TabPanel({ className: className2, children, ...props }) {
|
|
640
|
-
return /* @__PURE__ */ (0,
|
|
750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
641
751
|
import_react_aria_components3.TabPanel,
|
|
642
752
|
{
|
|
643
753
|
className: (state) => {
|
|
@@ -652,43 +762,43 @@ function TabPanel({ className: className2, children, ...props }) {
|
|
|
652
762
|
|
|
653
763
|
// src/CreatorGrid.tsx
|
|
654
764
|
var import_react_aria_components4 = require("react-aria-components");
|
|
655
|
-
var
|
|
656
|
-
var
|
|
765
|
+
var import_tailwind_merge5 = require("tailwind-merge");
|
|
766
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
657
767
|
function CreatorGrid(props) {
|
|
658
|
-
return /* @__PURE__ */ (0,
|
|
768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
659
769
|
import_react_aria_components4.ListBox,
|
|
660
770
|
{
|
|
661
771
|
orientation: "horizontal",
|
|
662
772
|
"aria-label": props.label,
|
|
663
773
|
selectionMode: "single",
|
|
664
774
|
items: props.items,
|
|
665
|
-
className: "grid grid-sm gap-4 p-4",
|
|
666
|
-
children: (item) => /* @__PURE__ */ (0,
|
|
775
|
+
className: "grid grid-sm gap-4 p-4 mb-8",
|
|
776
|
+
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CreatorGridItem, { ...item })
|
|
667
777
|
}
|
|
668
778
|
);
|
|
669
779
|
}
|
|
670
780
|
function CreatorGridItem(props) {
|
|
671
|
-
return /* @__PURE__ */ (0,
|
|
781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
672
782
|
import_react_aria_components4.ListBoxItem,
|
|
673
783
|
{
|
|
674
784
|
id: props.id,
|
|
675
785
|
onAction: props.onClick,
|
|
676
|
-
className: ($s) => (0,
|
|
786
|
+
className: ($s) => (0, import_tailwind_merge5.twMerge)(
|
|
677
787
|
"bg-white p-2 border-me-gray-300 rounded-md border hover:border-me-primary-500",
|
|
678
788
|
$s.isFocused && "border-me-primary-500 outline-me-primary-500 outline-2"
|
|
679
789
|
),
|
|
680
790
|
children: [
|
|
681
|
-
/* @__PURE__ */ (0,
|
|
682
|
-
/* @__PURE__ */ (0,
|
|
683
|
-
/* @__PURE__ */ (0,
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "rounded bg-me-gray-300 mb-2 flex items-center justify-center py-1 aspect-square", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-center [&>svg]:w-16 [&>svg]:h-16", children: props.icon }) }),
|
|
792
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-center font-semibold text-sm", children: props.title }),
|
|
793
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-sm text-center text-black/50", children: props.description })
|
|
684
794
|
]
|
|
685
795
|
}
|
|
686
796
|
);
|
|
687
797
|
}
|
|
688
798
|
|
|
689
799
|
// src/icons/DownloadIcon.tsx
|
|
690
|
-
var
|
|
691
|
-
var DownloadIcon = (props) => /* @__PURE__ */ (0,
|
|
800
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
801
|
+
var DownloadIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)(
|
|
692
802
|
"path",
|
|
693
803
|
{
|
|
694
804
|
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",
|
|
@@ -698,10 +808,10 @@ var DownloadIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg
|
|
|
698
808
|
|
|
699
809
|
// src/DownloadButton.tsx
|
|
700
810
|
var import_react_aria = require("react-aria");
|
|
701
|
-
var
|
|
811
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
702
812
|
function DownloadButton({ label, id: _id, getData, fileName, fileType }) {
|
|
703
813
|
const id = (0, import_react_aria.useId)(_id);
|
|
704
|
-
return /* @__PURE__ */ (0,
|
|
814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Tooltip, { placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
705
815
|
TooltipTrigger,
|
|
706
816
|
{
|
|
707
817
|
className: "bg-me-gray-100 hover:bg-me-primary-500 hover:text-white p-1 rounded-md text-me-primary-500 text-2xl",
|
|
@@ -709,8 +819,8 @@ function DownloadButton({ label, id: _id, getData, fileName, fileType }) {
|
|
|
709
819
|
id,
|
|
710
820
|
onPress: () => createDownload(getData(), fileName, fileType),
|
|
711
821
|
children: [
|
|
712
|
-
/* @__PURE__ */ (0,
|
|
713
|
-
/* @__PURE__ */ (0,
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DownloadIcon, { "aria-labelledby": _id }),
|
|
823
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DefaultTooltipContent, { children: label })
|
|
714
824
|
]
|
|
715
825
|
}
|
|
716
826
|
) });
|
|
@@ -730,11 +840,11 @@ function createDownload(data, fileName, fileType = "text/json") {
|
|
|
730
840
|
}
|
|
731
841
|
|
|
732
842
|
// src/AtlasBanner.tsx
|
|
733
|
-
var
|
|
843
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
734
844
|
function AtlasBanner({ children, controlsId }) {
|
|
735
|
-
return /* @__PURE__ */ (0,
|
|
736
|
-
/* @__PURE__ */ (0,
|
|
737
|
-
/* @__PURE__ */ (0,
|
|
845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "bg-me-gray-100 border-b text-black p-1 flex gap-4 items-center h-12", children: [
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "px-4", children }),
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { id: controlsId || "atlas-controls", className: "flex gap-2" })
|
|
738
848
|
] });
|
|
739
849
|
}
|
|
740
850
|
|
|
@@ -742,8 +852,8 @@ function AtlasBanner({ children, controlsId }) {
|
|
|
742
852
|
var import_react_iiif_vault4 = require("react-iiif-vault");
|
|
743
853
|
|
|
744
854
|
// src/icons/DrawIcon.tsx
|
|
745
|
-
var
|
|
746
|
-
var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
855
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
856
|
+
var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
747
857
|
"svg",
|
|
748
858
|
{
|
|
749
859
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -753,8 +863,8 @@ var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
753
863
|
"aria-labelledby": titleId,
|
|
754
864
|
...props,
|
|
755
865
|
children: [
|
|
756
|
-
title ? /* @__PURE__ */ (0,
|
|
757
|
-
/* @__PURE__ */ (0,
|
|
866
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("title", { id: titleId, children: title }) : null,
|
|
867
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
758
868
|
"path",
|
|
759
869
|
{
|
|
760
870
|
fill: "currentColor",
|
|
@@ -766,8 +876,8 @@ var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
766
876
|
);
|
|
767
877
|
|
|
768
878
|
// src/icons/PolygonIcon.tsx
|
|
769
|
-
var
|
|
770
|
-
var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
879
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
880
|
+
var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
771
881
|
"svg",
|
|
772
882
|
{
|
|
773
883
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -777,8 +887,8 @@ var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_j
|
|
|
777
887
|
"aria-labelledby": titleId,
|
|
778
888
|
...props,
|
|
779
889
|
children: [
|
|
780
|
-
title ? /* @__PURE__ */ (0,
|
|
781
|
-
/* @__PURE__ */ (0,
|
|
890
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("title", { id: titleId, children: title }) : null,
|
|
891
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
782
892
|
"path",
|
|
783
893
|
{
|
|
784
894
|
fill: "currentColor",
|
|
@@ -790,34 +900,34 @@ var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_j
|
|
|
790
900
|
);
|
|
791
901
|
|
|
792
902
|
// src/icons/LineIcon.tsx
|
|
793
|
-
var
|
|
903
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
794
904
|
function LineIcon({ title, titleId, ...props }) {
|
|
795
|
-
return /* @__PURE__ */ (0,
|
|
796
|
-
title ? /* @__PURE__ */ (0,
|
|
797
|
-
/* @__PURE__ */ (0,
|
|
798
|
-
/* @__PURE__ */ (0,
|
|
799
|
-
/* @__PURE__ */ (0,
|
|
800
|
-
/* @__PURE__ */ (0,
|
|
905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
906
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("title", { id: titleId, children: title }) : null,
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("g", { fill: "none", fillRule: "evenodd", children: [
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx: 4.5, cy: 4.5, r: 2.5, fill: "currentColor" }),
|
|
909
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx: 15.5, cy: 15.5, r: 2.5, fill: "currentColor" }),
|
|
910
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { stroke: "currentColor", strokeLinecap: "square", strokeWidth: 2, d: "m13.5 13.5-9-9" })
|
|
801
911
|
] })
|
|
802
912
|
] });
|
|
803
913
|
}
|
|
804
914
|
|
|
805
915
|
// src/icons/LineBoxIcon.tsx
|
|
806
|
-
var
|
|
916
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
807
917
|
function LineBoxIcon({ title, titleId, ...props }) {
|
|
808
|
-
return /* @__PURE__ */ (0,
|
|
809
|
-
title ? /* @__PURE__ */ (0,
|
|
810
|
-
/* @__PURE__ */ (0,
|
|
811
|
-
/* @__PURE__ */ (0,
|
|
812
|
-
/* @__PURE__ */ (0,
|
|
813
|
-
/* @__PURE__ */ (0,
|
|
918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
919
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("title", { id: titleId, children: title }) : null,
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { fill: "none", fillRule: "evenodd", children: [
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M0 0h20v20H0z" }),
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { stroke: "currentColor", strokeLinecap: "square", strokeWidth: 2, d: "m8.5 11.5 6-6M16 4v3m0-3h-3m0 14L2 7" }),
|
|
923
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { stroke: "currentColor", strokeOpacity: 0.407, strokeWidth: 2, d: "m2 7 5-5 11 11-5 5z" })
|
|
814
924
|
] })
|
|
815
925
|
] });
|
|
816
926
|
}
|
|
817
927
|
|
|
818
928
|
// src/icons/ShapesIcon.tsx
|
|
819
|
-
var
|
|
820
|
-
var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
929
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
930
|
+
var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
821
931
|
"svg",
|
|
822
932
|
{
|
|
823
933
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -827,8 +937,8 @@ var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_js
|
|
|
827
937
|
"aria-labelledby": titleId,
|
|
828
938
|
...props,
|
|
829
939
|
children: [
|
|
830
|
-
title ? /* @__PURE__ */ (0,
|
|
831
|
-
/* @__PURE__ */ (0,
|
|
940
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("title", { id: titleId, children: title }) : null,
|
|
941
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
832
942
|
"path",
|
|
833
943
|
{
|
|
834
944
|
fill: "currentColor",
|
|
@@ -840,8 +950,8 @@ var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_js
|
|
|
840
950
|
);
|
|
841
951
|
|
|
842
952
|
// src/icons/SquareIcon.tsx
|
|
843
|
-
var
|
|
844
|
-
var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
953
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
954
|
+
var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
845
955
|
"svg",
|
|
846
956
|
{
|
|
847
957
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -851,8 +961,8 @@ var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_js
|
|
|
851
961
|
"aria-labelledby": titleId,
|
|
852
962
|
...props,
|
|
853
963
|
children: [
|
|
854
|
-
title ? /* @__PURE__ */ (0,
|
|
855
|
-
/* @__PURE__ */ (0,
|
|
964
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("title", { id: titleId, children: title }) : null,
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
856
966
|
"path",
|
|
857
967
|
{
|
|
858
968
|
fill: "currentColor",
|
|
@@ -864,8 +974,8 @@ var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_js
|
|
|
864
974
|
);
|
|
865
975
|
|
|
866
976
|
// src/icons/TriangleIcon.tsx
|
|
867
|
-
var
|
|
868
|
-
var TriangleIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
977
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
978
|
+
var TriangleIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
869
979
|
"svg",
|
|
870
980
|
{
|
|
871
981
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -875,15 +985,15 @@ var TriangleIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_
|
|
|
875
985
|
"aria-labelledby": titleId,
|
|
876
986
|
...props,
|
|
877
987
|
children: [
|
|
878
|
-
title ? /* @__PURE__ */ (0,
|
|
879
|
-
/* @__PURE__ */ (0,
|
|
988
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("title", { id: titleId, children: title }) : null,
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { d: "m80-160 400-640 400 640H80Zm144-80h512L480-650 224-240Zm256-205Z", fill: "currentColor" })
|
|
880
990
|
]
|
|
881
991
|
}
|
|
882
992
|
);
|
|
883
993
|
|
|
884
994
|
// src/icons/HexagonIcon.tsx
|
|
885
|
-
var
|
|
886
|
-
var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0,
|
|
995
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
996
|
+
var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
887
997
|
"svg",
|
|
888
998
|
{
|
|
889
999
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -893,8 +1003,8 @@ var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_j
|
|
|
893
1003
|
"aria-labelledby": titleId,
|
|
894
1004
|
...props,
|
|
895
1005
|
children: [
|
|
896
|
-
title ? /* @__PURE__ */ (0,
|
|
897
|
-
/* @__PURE__ */ (0,
|
|
1006
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("title", { id: titleId, children: title }) : null,
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
898
1008
|
"path",
|
|
899
1009
|
{
|
|
900
1010
|
fill: "currentColor",
|
|
@@ -906,12 +1016,12 @@ var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_j
|
|
|
906
1016
|
);
|
|
907
1017
|
|
|
908
1018
|
// src/icons/DeleteForeverIcon.tsx
|
|
909
|
-
var
|
|
1019
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
910
1020
|
function DeleteForeverIcon(props) {
|
|
911
|
-
return /* @__PURE__ */ (0,
|
|
912
|
-
/* @__PURE__ */ (0,
|
|
913
|
-
/* @__PURE__ */ (0,
|
|
914
|
-
/* @__PURE__ */ (0,
|
|
1021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("svg", { height: "1em", width: "1em", viewBox: "0 0 24 24", ...props, children: [
|
|
1022
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
915
1025
|
"path",
|
|
916
1026
|
{
|
|
917
1027
|
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",
|
|
@@ -923,18 +1033,18 @@ function DeleteForeverIcon(props) {
|
|
|
923
1033
|
|
|
924
1034
|
// src/SvgControlBar.tsx
|
|
925
1035
|
var import_react5 = require("react");
|
|
926
|
-
var
|
|
1036
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
927
1037
|
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';
|
|
928
1038
|
var icons = {
|
|
929
|
-
DrawIcon: /* @__PURE__ */ (0,
|
|
930
|
-
PolygonIcon: /* @__PURE__ */ (0,
|
|
931
|
-
LineIcon: /* @__PURE__ */ (0,
|
|
932
|
-
LineBoxIcon: /* @__PURE__ */ (0,
|
|
933
|
-
ShapesIcon: /* @__PURE__ */ (0,
|
|
934
|
-
SquareIcon: /* @__PURE__ */ (0,
|
|
935
|
-
TriangleIcon: /* @__PURE__ */ (0,
|
|
936
|
-
HexagonIcon: /* @__PURE__ */ (0,
|
|
937
|
-
DeleteForeverIcon: /* @__PURE__ */ (0,
|
|
1039
|
+
DrawIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DrawIcon, {}),
|
|
1040
|
+
PolygonIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PolygonIcon, {}),
|
|
1041
|
+
LineIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LineIcon, {}),
|
|
1042
|
+
LineBoxIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LineBoxIcon, {}),
|
|
1043
|
+
ShapesIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ShapesIcon, {}),
|
|
1044
|
+
SquareIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SquareIcon, {}),
|
|
1045
|
+
TriangleIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TriangleIcon, {}),
|
|
1046
|
+
HexagonIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HexagonIcon, {}),
|
|
1047
|
+
DeleteForeverIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DeleteForeverIcon, {})
|
|
938
1048
|
};
|
|
939
1049
|
function SvgControlBar({
|
|
940
1050
|
helper,
|
|
@@ -944,7 +1054,7 @@ function SvgControlBar({
|
|
|
944
1054
|
(0, import_react5.useEffect)(() => {
|
|
945
1055
|
helper.stamps.square();
|
|
946
1056
|
}, []);
|
|
947
|
-
return /* @__PURE__ */ (0,
|
|
1057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
948
1058
|
import_react_iiif_vault4.RenderSvgEditorControls,
|
|
949
1059
|
{
|
|
950
1060
|
icons,
|
|
@@ -960,17 +1070,17 @@ function SvgControlBar({
|
|
|
960
1070
|
|
|
961
1071
|
// src/ConfirmSelectionButton.tsx
|
|
962
1072
|
var import_react_aria_components5 = require("react-aria-components");
|
|
963
|
-
var
|
|
1073
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
964
1074
|
function ConfirmSelectionButton({ onPress, children }) {
|
|
965
|
-
return /* @__PURE__ */ (0,
|
|
1075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components5.Button, { className: "bg-me-primary-500 px-3 py-1 hover:bg-me-primary-600 text-white rounded", onPress, children });
|
|
966
1076
|
}
|
|
967
1077
|
|
|
968
1078
|
// src/ManifestOverviewEmptyState.tsx
|
|
969
1079
|
var import_react_aria_components6 = require("react-aria-components");
|
|
970
|
-
var
|
|
1080
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
971
1081
|
function ManifestOverviewEmptyState({ onCreate, canCreate }) {
|
|
972
|
-
return /* @__PURE__ */ (0,
|
|
973
|
-
/* @__PURE__ */ (0,
|
|
1082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center flex-col gap-5 py-16", children: [
|
|
1083
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
974
1084
|
Card3D,
|
|
975
1085
|
{
|
|
976
1086
|
shouldTranslate: true,
|
|
@@ -978,9 +1088,9 @@ function ManifestOverviewEmptyState({ onCreate, canCreate }) {
|
|
|
978
1088
|
className: "border-2 border-dotted bg-black/5 aspect-[3/4] rounded w-32 border-black"
|
|
979
1089
|
}
|
|
980
1090
|
),
|
|
981
|
-
/* @__PURE__ */ (0,
|
|
982
|
-
/* @__PURE__ */ (0,
|
|
983
|
-
canCreate ? /* @__PURE__ */ (0,
|
|
1091
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "font-bold text-lg", children: "Let's get started!" }),
|
|
1092
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.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." }),
|
|
1093
|
+
canCreate ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
984
1094
|
import_react_aria_components6.Button,
|
|
985
1095
|
{
|
|
986
1096
|
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",
|
|
@@ -995,13 +1105,23 @@ function ManifestOverviewEmptyState({ onCreate, canCreate }) {
|
|
|
995
1105
|
var import_react6 = require("react");
|
|
996
1106
|
var import_react_aria_components7 = require("react-aria-components");
|
|
997
1107
|
var import_collections = require("@react-aria/collections");
|
|
998
|
-
var
|
|
999
|
-
|
|
1108
|
+
var import_react_dom = require("react-dom");
|
|
1109
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1110
|
+
function SidebarTabs({
|
|
1111
|
+
menu,
|
|
1112
|
+
menuId,
|
|
1113
|
+
selectedKey,
|
|
1114
|
+
onSelectionChange
|
|
1115
|
+
}) {
|
|
1000
1116
|
const ref = (0, import_react6.useRef)(null);
|
|
1001
1117
|
const [hidden, setHidden] = (0, import_react6.useState)(0);
|
|
1118
|
+
const [hiddenMenu, setHiddenMenu] = (0, import_react6.useState)(null);
|
|
1002
1119
|
const widths = (0, import_react6.useRef)([]);
|
|
1003
1120
|
const itemsRef = (0, import_react6.useRef)([]);
|
|
1004
|
-
const selectedIndex = (0, import_react6.useMemo)(
|
|
1121
|
+
const selectedIndex = (0, import_react6.useMemo)(
|
|
1122
|
+
() => menu.findIndex((item) => item.id === selectedKey),
|
|
1123
|
+
[menu, selectedKey]
|
|
1124
|
+
);
|
|
1005
1125
|
(0, import_react6.useLayoutEffect)(() => {
|
|
1006
1126
|
const cb = () => {
|
|
1007
1127
|
if (widths.current.length === 0) {
|
|
@@ -1035,53 +1155,74 @@ function SidebarTabs({ menu, menuId, selectedKey, onSelectionChange }) {
|
|
|
1035
1155
|
};
|
|
1036
1156
|
}, []);
|
|
1037
1157
|
const menuHidden = menu.filter((item, idx) => hidden >= menu.length - idx);
|
|
1038
|
-
return /* @__PURE__ */ (0,
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
/* @__PURE__ */ (0,
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
import_react_aria_components7.Tab,
|
|
1158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
1159
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1160
|
+
import_react_aria_components7.Tabs,
|
|
1161
|
+
{
|
|
1162
|
+
className: "w-full flex-1 overflow-hidden flex flex-col",
|
|
1163
|
+
selectedKey,
|
|
1164
|
+
onSelectionChange,
|
|
1165
|
+
children: [
|
|
1166
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center w-full tab-shadow", children: [
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1168
|
+
import_react_aria_components7.TabList,
|
|
1050
1169
|
{
|
|
1051
|
-
ref
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1170
|
+
ref,
|
|
1171
|
+
className: "flex-1 overflow-hidden w-full flex text-sm whitespace-nowrap",
|
|
1172
|
+
children: menu.map((item, idx) => {
|
|
1173
|
+
const isHidden = hidden >= menu.length - idx;
|
|
1174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1175
|
+
import_react_aria_components7.Tab,
|
|
1176
|
+
{
|
|
1177
|
+
ref: (el) => itemsRef.current[idx] = el,
|
|
1178
|
+
id: item.id,
|
|
1179
|
+
className: (state) => cn(
|
|
1180
|
+
//
|
|
1181
|
+
"border-b-2 px-2 py-1 text-sm text-gray-400 select-none hover:text-black focus:ring-0 focus:outline-none",
|
|
1182
|
+
state.isSelected && "border-me-primary-500 text-black",
|
|
1183
|
+
state.isFocusVisible && "ring-0 bg-me-gray-100",
|
|
1184
|
+
isHidden && "hidden"
|
|
1185
|
+
),
|
|
1186
|
+
children: item.label
|
|
1187
|
+
},
|
|
1188
|
+
item.id
|
|
1189
|
+
);
|
|
1190
|
+
})
|
|
1191
|
+
}
|
|
1192
|
+
),
|
|
1193
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref: setHiddenMenu, id: "hidden-menu" })
|
|
1194
|
+
] }),
|
|
1195
|
+
menu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1196
|
+
import_react_aria_components7.TabPanel,
|
|
1067
1197
|
{
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1198
|
+
id: item.id,
|
|
1199
|
+
className: "flex-1 overflow-y-auto h-full",
|
|
1200
|
+
children: item.renderComponent
|
|
1201
|
+
},
|
|
1202
|
+
item.id
|
|
1203
|
+
))
|
|
1204
|
+
]
|
|
1205
|
+
},
|
|
1206
|
+
menuId
|
|
1207
|
+
),
|
|
1208
|
+
hiddenMenu && hidden > 0 ? (0, import_react_dom.createPortal)(
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1210
|
+
MoreMenu,
|
|
1211
|
+
{
|
|
1212
|
+
hidden,
|
|
1213
|
+
menuHidden,
|
|
1214
|
+
selectedIndex,
|
|
1215
|
+
selectedKey,
|
|
1216
|
+
onSelectionChange
|
|
1217
|
+
}
|
|
1218
|
+
),
|
|
1219
|
+
hiddenMenu
|
|
1220
|
+
) : null
|
|
1221
|
+
] });
|
|
1081
1222
|
}
|
|
1082
1223
|
var MoreMenu = (0, import_collections.createHideableComponent)(({ selectedIndex, hidden, menuHidden, selectedKey, onSelectionChange }) => {
|
|
1083
|
-
return /* @__PURE__ */ (0,
|
|
1084
|
-
/* @__PURE__ */ (0,
|
|
1224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_aria_components7.MenuTrigger, { children: [
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1085
1226
|
import_react_aria_components7.Button,
|
|
1086
1227
|
{
|
|
1087
1228
|
className: cn(
|
|
@@ -1091,33 +1232,39 @@ var MoreMenu = (0, import_collections.createHideableComponent)(({ selectedIndex,
|
|
|
1091
1232
|
children: "MORE"
|
|
1092
1233
|
}
|
|
1093
1234
|
),
|
|
1094
|
-
/* @__PURE__ */ (0,
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1235
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_aria_components7.Popover, { children: menuHidden.length ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1236
|
+
import_react_aria_components7.Menu,
|
|
1237
|
+
{
|
|
1238
|
+
className: "bg-white rounded shadow-lg flex flex-col gap-0.5 p-0.5 min-w-28",
|
|
1239
|
+
children: menuHidden.map((item) => {
|
|
1240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1241
|
+
import_react_aria_components7.MenuItem,
|
|
1242
|
+
{
|
|
1243
|
+
className: (state) => cn(
|
|
1244
|
+
"hover:bg-me-gray-100 p-1 rounded-sm text-sm",
|
|
1245
|
+
selectedKey === item.id && "ring ring-me-primary-500"
|
|
1246
|
+
),
|
|
1247
|
+
onAction: () => onSelectionChange?.(item.id),
|
|
1248
|
+
children: item.label
|
|
1249
|
+
},
|
|
1250
|
+
item.id
|
|
1251
|
+
);
|
|
1252
|
+
})
|
|
1253
|
+
}
|
|
1254
|
+
) : null })
|
|
1108
1255
|
] });
|
|
1109
1256
|
});
|
|
1110
1257
|
|
|
1111
1258
|
// src/MetadataContainer.tsx
|
|
1112
1259
|
var import_react_iiif_vault5 = require("react-iiif-vault");
|
|
1113
|
-
var
|
|
1260
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1114
1261
|
function MetadataContainer({
|
|
1115
1262
|
className: className2,
|
|
1116
1263
|
label,
|
|
1117
1264
|
children,
|
|
1118
1265
|
...props
|
|
1119
1266
|
}) {
|
|
1120
|
-
return /* @__PURE__ */ (0,
|
|
1267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1121
1268
|
"div",
|
|
1122
1269
|
{
|
|
1123
1270
|
className: cn(
|
|
@@ -1126,7 +1273,7 @@ function MetadataContainer({
|
|
|
1126
1273
|
),
|
|
1127
1274
|
...props,
|
|
1128
1275
|
children: [
|
|
1129
|
-
/* @__PURE__ */ (0,
|
|
1276
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_iiif_vault5.LocaleString, { className: "text-lg font-bold text-[#333] mb-2", as: "h3", children: label }),
|
|
1130
1277
|
children
|
|
1131
1278
|
]
|
|
1132
1279
|
}
|
|
@@ -1134,9 +1281,9 @@ function MetadataContainer({
|
|
|
1134
1281
|
}
|
|
1135
1282
|
|
|
1136
1283
|
// src/EmptyState.tsx
|
|
1137
|
-
var
|
|
1284
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1138
1285
|
function EmptyState(props) {
|
|
1139
|
-
return /* @__PURE__ */ (0,
|
|
1286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1140
1287
|
"div",
|
|
1141
1288
|
{
|
|
1142
1289
|
className: cn(
|
|
@@ -1150,9 +1297,9 @@ function EmptyState(props) {
|
|
|
1150
1297
|
}
|
|
1151
1298
|
|
|
1152
1299
|
// src/ManifestEditorLogo.tsx
|
|
1153
|
-
var
|
|
1300
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1154
1301
|
function ManifestEditorLogo(props) {
|
|
1155
|
-
return /* @__PURE__ */ (0,
|
|
1302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1156
1303
|
"svg",
|
|
1157
1304
|
{
|
|
1158
1305
|
width: "1em",
|
|
@@ -1161,17 +1308,17 @@ function ManifestEditorLogo(props) {
|
|
|
1161
1308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1162
1309
|
className: "me-logo h-[23px] w-[176px]",
|
|
1163
1310
|
...props,
|
|
1164
|
-
children: /* @__PURE__ */ (0,
|
|
1165
|
-
/* @__PURE__ */ (0,
|
|
1311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("g", { fill: "none", children: [
|
|
1312
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1166
1313
|
"path",
|
|
1167
1314
|
{
|
|
1168
1315
|
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",
|
|
1169
1316
|
fill: "#000"
|
|
1170
1317
|
}
|
|
1171
1318
|
),
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1173
|
-
/* @__PURE__ */ (0,
|
|
1174
|
-
/* @__PURE__ */ (0,
|
|
1319
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { fill: "#E94581", className: "me-logo-1", d: "M0 13.343 13.343 0l13.343 13.343-13.343 13.343z" }),
|
|
1320
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { fill: "#E94581", className: "me-logo-2", d: "M12.137 13.346 25.48.003l13.343 13.343L25.48 26.69z" }),
|
|
1321
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.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" })
|
|
1175
1322
|
] })
|
|
1176
1323
|
}
|
|
1177
1324
|
);
|
|
@@ -1179,9 +1326,9 @@ function ManifestEditorLogo(props) {
|
|
|
1179
1326
|
|
|
1180
1327
|
// src/Forms.tsx
|
|
1181
1328
|
var import_react_aria_components8 = require("react-aria-components");
|
|
1182
|
-
var
|
|
1329
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1183
1330
|
function MeLabel({ className: className2, ...props }) {
|
|
1184
|
-
return /* @__PURE__ */ (0,
|
|
1331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1185
1332
|
import_react_aria_components8.Label,
|
|
1186
1333
|
{
|
|
1187
1334
|
className: cn(
|
|
@@ -1194,7 +1341,7 @@ function MeLabel({ className: className2, ...props }) {
|
|
|
1194
1341
|
);
|
|
1195
1342
|
}
|
|
1196
1343
|
function MeRadioGroup({ className: className2, ...props }) {
|
|
1197
|
-
return /* @__PURE__ */ (0,
|
|
1344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1198
1345
|
import_react_aria_components8.RadioGroup,
|
|
1199
1346
|
{
|
|
1200
1347
|
className: cn(
|
|
@@ -1207,7 +1354,7 @@ function MeRadioGroup({ className: className2, ...props }) {
|
|
|
1207
1354
|
);
|
|
1208
1355
|
}
|
|
1209
1356
|
function MeRadio({ className: className2, ...props }) {
|
|
1210
|
-
return /* @__PURE__ */ (0,
|
|
1357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1211
1358
|
import_react_aria_components8.Radio,
|
|
1212
1359
|
{
|
|
1213
1360
|
className: (state) => cn(
|
|
@@ -1220,7 +1367,7 @@ function MeRadio({ className: className2, ...props }) {
|
|
|
1220
1367
|
);
|
|
1221
1368
|
}
|
|
1222
1369
|
function MeForm({ className: className2, ...props }) {
|
|
1223
|
-
return /* @__PURE__ */ (0,
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1224
1371
|
import_react_aria_components8.Form,
|
|
1225
1372
|
{
|
|
1226
1373
|
className: cn(
|
|
@@ -1233,7 +1380,7 @@ function MeForm({ className: className2, ...props }) {
|
|
|
1233
1380
|
);
|
|
1234
1381
|
}
|
|
1235
1382
|
function MeInput({ className: className2, ...props }) {
|
|
1236
|
-
return /* @__PURE__ */ (0,
|
|
1383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1237
1384
|
import_react_aria_components8.Input,
|
|
1238
1385
|
{
|
|
1239
1386
|
className: cn(
|
|
@@ -1251,7 +1398,7 @@ function MeInputContainer({
|
|
|
1251
1398
|
className: className2,
|
|
1252
1399
|
...props
|
|
1253
1400
|
}) {
|
|
1254
|
-
return /* @__PURE__ */ (0,
|
|
1401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1255
1402
|
"div",
|
|
1256
1403
|
{
|
|
1257
1404
|
className: cn(
|
|
@@ -1273,12 +1420,177 @@ var Form = {
|
|
|
1273
1420
|
Radio: MeRadio
|
|
1274
1421
|
};
|
|
1275
1422
|
|
|
1423
|
+
// src/HTMLEditor.tsx
|
|
1424
|
+
var import_react8 = require("react");
|
|
1425
|
+
var import_showdown = require("showdown");
|
|
1426
|
+
var import_tiny_use_debounce = require("tiny-use-debounce");
|
|
1427
|
+
var import_turndown = __toESM(require("turndown"), 1);
|
|
1428
|
+
|
|
1429
|
+
// src/MDXEditor.tsx
|
|
1430
|
+
var import_style = require("@mdxeditor/editor/style.css");
|
|
1431
|
+
var import_editor = require("@mdxeditor/editor");
|
|
1432
|
+
var import_react7 = require("react");
|
|
1433
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1434
|
+
function MDXEditor({
|
|
1435
|
+
editorRef,
|
|
1436
|
+
...props
|
|
1437
|
+
}) {
|
|
1438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1439
|
+
import_editor.MDXEditor,
|
|
1440
|
+
{
|
|
1441
|
+
plugins: (0, import_react7.useMemo)(
|
|
1442
|
+
() => [
|
|
1443
|
+
// Example Plugin Usage
|
|
1444
|
+
(0, import_editor.headingsPlugin)({ allowedHeadingLevels: [2, 3] }),
|
|
1445
|
+
(0, import_editor.listsPlugin)(),
|
|
1446
|
+
(0, import_editor.linkPlugin)(),
|
|
1447
|
+
(0, import_editor.quotePlugin)(),
|
|
1448
|
+
(0, import_editor.thematicBreakPlugin)(),
|
|
1449
|
+
(0, import_editor.linkDialogPlugin)(),
|
|
1450
|
+
(0, import_editor.imagePlugin)(),
|
|
1451
|
+
(0, import_editor.diffSourcePlugin)(),
|
|
1452
|
+
(0, import_editor.toolbarPlugin)({
|
|
1453
|
+
toolbarClassName: "mdx-toolbar",
|
|
1454
|
+
toolbarContents: () => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
1455
|
+
" ",
|
|
1456
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.UndoRedo, {}),
|
|
1457
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.BoldItalicUnderlineToggles, {}),
|
|
1458
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.BlockTypeSelect, {}),
|
|
1459
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.ListsToggle, { options: ["bullet", "number"] }),
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.CreateLink, {}),
|
|
1461
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.InsertImage, {})
|
|
1462
|
+
] })
|
|
1463
|
+
})
|
|
1464
|
+
],
|
|
1465
|
+
[]
|
|
1466
|
+
),
|
|
1467
|
+
...props,
|
|
1468
|
+
ref: editorRef
|
|
1469
|
+
}
|
|
1470
|
+
);
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
// src/HTMLEditor.tsx
|
|
1474
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1475
|
+
var converter = new import_showdown.Converter();
|
|
1476
|
+
converter.setFlavor("github");
|
|
1477
|
+
var turndownService = new import_turndown.default();
|
|
1478
|
+
function HTMLEditor({
|
|
1479
|
+
value,
|
|
1480
|
+
onChange,
|
|
1481
|
+
disabled
|
|
1482
|
+
}) {
|
|
1483
|
+
const editorRef = (0, import_react8.useRef)(null);
|
|
1484
|
+
const [_value, _setValue] = (0, import_react8.useState)(void 0);
|
|
1485
|
+
const internalOnChange = (0, import_react8.useCallback)(() => {
|
|
1486
|
+
if (editorRef.current) {
|
|
1487
|
+
onChange(converter.makeHtml(editorRef.current.getMarkdown()));
|
|
1488
|
+
}
|
|
1489
|
+
}, []);
|
|
1490
|
+
const debounceSave = (0, import_tiny_use_debounce.useDebounce)(internalOnChange, 400);
|
|
1491
|
+
const memoState = (0, import_react8.useMemo)(() => {
|
|
1492
|
+
return turndownService.turndown(value);
|
|
1493
|
+
}, []);
|
|
1494
|
+
(0, import_react8.useEffect)(() => {
|
|
1495
|
+
const ref = editorRef.current;
|
|
1496
|
+
return () => {
|
|
1497
|
+
if (ref) {
|
|
1498
|
+
onChange(converter.makeHtml(ref.getMarkdown()));
|
|
1499
|
+
}
|
|
1500
|
+
};
|
|
1501
|
+
}, []);
|
|
1502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1503
|
+
MDXEditor,
|
|
1504
|
+
{
|
|
1505
|
+
editorRef,
|
|
1506
|
+
onBlur: internalOnChange,
|
|
1507
|
+
readOnly: disabled,
|
|
1508
|
+
className: [
|
|
1509
|
+
"bg-white prose-sm text-sm border rounded-lg prose-a:text-me-primary-500 prose-a:underline prose-ul:list-disc p-0.5",
|
|
1510
|
+
"prose-ol:list-decimal",
|
|
1511
|
+
"focus-within:outline-none focus-within:border-me-primary-500 z-50 relative"
|
|
1512
|
+
].join(" "),
|
|
1513
|
+
markdown: memoState,
|
|
1514
|
+
suppressHtmlProcessing: true,
|
|
1515
|
+
onError: (err) => {
|
|
1516
|
+
console.log("err", err);
|
|
1517
|
+
},
|
|
1518
|
+
onChange: (value2) => {
|
|
1519
|
+
_setValue(value2);
|
|
1520
|
+
debounceSave();
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
);
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
// src/IconButton.tsx
|
|
1527
|
+
var import_tailwind_merge6 = require("tailwind-merge");
|
|
1528
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1529
|
+
function IconButton({
|
|
1530
|
+
children,
|
|
1531
|
+
active,
|
|
1532
|
+
label,
|
|
1533
|
+
disabled,
|
|
1534
|
+
onPress
|
|
1535
|
+
}) {
|
|
1536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Tooltip, { placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
1537
|
+
TooltipTrigger,
|
|
1538
|
+
{
|
|
1539
|
+
onClick: onPress,
|
|
1540
|
+
className: (0, import_tailwind_merge6.twMerge)(
|
|
1541
|
+
"rounded flex items-center bg-white justify-center p-2 hover:bg-gray-100 text-2xl",
|
|
1542
|
+
active ? "bg-me-primary-500 bg-opacity-40 hover:bg-opacity-70 hover:bg-me-primary-500" : "",
|
|
1543
|
+
disabled ? "opacity-50 pointer-events-none" : ""
|
|
1544
|
+
),
|
|
1545
|
+
children: [
|
|
1546
|
+
children,
|
|
1547
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DefaultTooltipContent, { className: "translate-x-3", children: label })
|
|
1548
|
+
]
|
|
1549
|
+
}
|
|
1550
|
+
) });
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
// src/ItemWithHandle.tsx
|
|
1554
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1555
|
+
function ItemWithHandle({
|
|
1556
|
+
children,
|
|
1557
|
+
handle,
|
|
1558
|
+
actions,
|
|
1559
|
+
grid
|
|
1560
|
+
}) {
|
|
1561
|
+
const gridStyleClassName = grid ? (
|
|
1562
|
+
// Tailwind
|
|
1563
|
+
"absolute flex p-1 gap-1 bg-white z-1 right-1 top-1 rounded"
|
|
1564
|
+
) : "flex-shrink-0 flex items-center gap-1 px-1";
|
|
1565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: grid ? "relative flex flex-col" : "flex items-center", children: [
|
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1 min-w-0", style: { flex: 1, minWidth: 0 }, children }),
|
|
1567
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: gridStyleClassName, children: [
|
|
1568
|
+
actions,
|
|
1569
|
+
handle
|
|
1570
|
+
] })
|
|
1571
|
+
] });
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
// src/HandleContainer.tsx
|
|
1575
|
+
var import_react9 = require("react");
|
|
1576
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1577
|
+
var HandleContainer = (0, import_react9.forwardRef)(function HandleContainer2({ className: className2, ...props }, ref) {
|
|
1578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1579
|
+
"div",
|
|
1580
|
+
{
|
|
1581
|
+
ref,
|
|
1582
|
+
className: `relative text-2xl flex p-0.5 rounded-sm aspect-square hover:bg-me-primary-100 aria-expanded:bg-me-primary-500 aria-expanded:text-white ${className2 || ""}`,
|
|
1583
|
+
...props
|
|
1584
|
+
}
|
|
1585
|
+
);
|
|
1586
|
+
});
|
|
1587
|
+
|
|
1276
1588
|
// src/icons/CreateCanvasIcon.tsx
|
|
1277
|
-
var
|
|
1589
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1278
1590
|
function CreateCanvasIcon() {
|
|
1279
|
-
return /* @__PURE__ */ (0,
|
|
1280
|
-
/* @__PURE__ */ (0,
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 0 24 24", width: "24", children: [
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1593
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1282
1594
|
"path",
|
|
1283
1595
|
{
|
|
1284
1596
|
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",
|
|
@@ -1289,8 +1601,8 @@ function CreateCanvasIcon() {
|
|
|
1289
1601
|
}
|
|
1290
1602
|
|
|
1291
1603
|
// src/icons/AddImageIcon.tsx
|
|
1292
|
-
var
|
|
1293
|
-
var AddImageIcon = (props) => /* @__PURE__ */ (0,
|
|
1604
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1605
|
+
var AddImageIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime45.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_runtime45.jsx)(
|
|
1294
1606
|
"path",
|
|
1295
1607
|
{
|
|
1296
1608
|
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",
|
|
@@ -1299,8 +1611,8 @@ var AddImageIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg
|
|
|
1299
1611
|
) });
|
|
1300
1612
|
|
|
1301
1613
|
// src/icons/IIIFLogo.tsx
|
|
1302
|
-
var
|
|
1303
|
-
var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0,
|
|
1614
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1615
|
+
var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
1304
1616
|
"svg",
|
|
1305
1617
|
{
|
|
1306
1618
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1310,7 +1622,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1310
1622
|
...props,
|
|
1311
1623
|
viewBox: "0 0 493.36 441.333",
|
|
1312
1624
|
children: [
|
|
1313
|
-
/* @__PURE__ */ (0,
|
|
1625
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1314
1626
|
"path",
|
|
1315
1627
|
{
|
|
1316
1628
|
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",
|
|
@@ -1323,7 +1635,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1323
1635
|
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1324
1636
|
}
|
|
1325
1637
|
),
|
|
1326
|
-
/* @__PURE__ */ (0,
|
|
1638
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1327
1639
|
"path",
|
|
1328
1640
|
{
|
|
1329
1641
|
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",
|
|
@@ -1336,7 +1648,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1336
1648
|
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1337
1649
|
}
|
|
1338
1650
|
),
|
|
1339
|
-
/* @__PURE__ */ (0,
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1340
1652
|
"path",
|
|
1341
1653
|
{
|
|
1342
1654
|
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",
|
|
@@ -1349,7 +1661,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1349
1661
|
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1350
1662
|
}
|
|
1351
1663
|
),
|
|
1352
|
-
/* @__PURE__ */ (0,
|
|
1664
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1353
1665
|
"path",
|
|
1354
1666
|
{
|
|
1355
1667
|
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",
|
|
@@ -1367,8 +1679,8 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
1367
1679
|
);
|
|
1368
1680
|
|
|
1369
1681
|
// src/icons/HTMLIcon.tsx
|
|
1370
|
-
var
|
|
1371
|
-
var HTMLIcon = (props) => /* @__PURE__ */ (0,
|
|
1682
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1683
|
+
var HTMLIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime47.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_runtime47.jsx)(
|
|
1372
1684
|
"path",
|
|
1373
1685
|
{
|
|
1374
1686
|
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",
|
|
@@ -1377,8 +1689,8 @@ var HTMLIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", {
|
|
|
1377
1689
|
) });
|
|
1378
1690
|
|
|
1379
1691
|
// src/icons/IIIFBrowserIcon.tsx
|
|
1380
|
-
var
|
|
1381
|
-
var IIIFBrowserIcon = (props) => /* @__PURE__ */ (0,
|
|
1692
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1693
|
+
var IIIFBrowserIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime48.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_runtime48.jsx)(
|
|
1382
1694
|
"path",
|
|
1383
1695
|
{
|
|
1384
1696
|
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",
|
|
@@ -1387,8 +1699,8 @@ var IIIFBrowserIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("
|
|
|
1387
1699
|
) });
|
|
1388
1700
|
|
|
1389
1701
|
// src/icons/YouTubeIcon.tsx
|
|
1390
|
-
var
|
|
1391
|
-
var YouTubeIcon = (props) => /* @__PURE__ */ (0,
|
|
1702
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1703
|
+
var YouTubeIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime49.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_runtime49.jsx)(
|
|
1392
1704
|
"path",
|
|
1393
1705
|
{
|
|
1394
1706
|
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",
|
|
@@ -1397,8 +1709,8 @@ var YouTubeIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg"
|
|
|
1397
1709
|
) });
|
|
1398
1710
|
|
|
1399
1711
|
// src/icons/VideoIcon.tsx
|
|
1400
|
-
var
|
|
1401
|
-
var VideoIcon = (props) => /* @__PURE__ */ (0,
|
|
1712
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1713
|
+
var VideoIcon = (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)(
|
|
1402
1714
|
"path",
|
|
1403
1715
|
{
|
|
1404
1716
|
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",
|
|
@@ -1407,8 +1719,8 @@ var VideoIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("svg",
|
|
|
1407
1719
|
) });
|
|
1408
1720
|
|
|
1409
1721
|
// src/icons/AudioIcon.tsx
|
|
1410
|
-
var
|
|
1411
|
-
var AudioIcon = (props) => /* @__PURE__ */ (0,
|
|
1722
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1723
|
+
var AudioIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime51.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_runtime51.jsx)(
|
|
1412
1724
|
"path",
|
|
1413
1725
|
{
|
|
1414
1726
|
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",
|
|
@@ -1417,8 +1729,8 @@ var AudioIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("svg",
|
|
|
1417
1729
|
) });
|
|
1418
1730
|
|
|
1419
1731
|
// src/icons/EmptyCanvasIcon.tsx
|
|
1420
|
-
var
|
|
1421
|
-
var EmptyCanvasIcon = (props) => /* @__PURE__ */ (0,
|
|
1732
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1733
|
+
var EmptyCanvasIcon = (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)(
|
|
1422
1734
|
"path",
|
|
1423
1735
|
{
|
|
1424
1736
|
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",
|
|
@@ -1427,14 +1739,14 @@ var EmptyCanvasIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("
|
|
|
1427
1739
|
) });
|
|
1428
1740
|
|
|
1429
1741
|
// src/icons/AddIcon.tsx
|
|
1430
|
-
var
|
|
1742
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1431
1743
|
function AddIcon({
|
|
1432
1744
|
className: className2,
|
|
1433
1745
|
inline,
|
|
1434
1746
|
height = 16,
|
|
1435
1747
|
color = "black"
|
|
1436
1748
|
}) {
|
|
1437
|
-
return /* @__PURE__ */ (0,
|
|
1749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
1438
1750
|
"svg",
|
|
1439
1751
|
{
|
|
1440
1752
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1445,18 +1757,61 @@ function AddIcon({
|
|
|
1445
1757
|
style: { verticalAlign: inline ? "bottom" : void 0 },
|
|
1446
1758
|
className: className2,
|
|
1447
1759
|
children: [
|
|
1448
|
-
/* @__PURE__ */ (0,
|
|
1449
|
-
/* @__PURE__ */ (0,
|
|
1760
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", fill: "currentColor" })
|
|
1762
|
+
]
|
|
1763
|
+
}
|
|
1764
|
+
);
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
// src/icons/MoreMenu.tsx
|
|
1768
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1769
|
+
function MoreMenu2() {
|
|
1770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
1771
|
+
"svg",
|
|
1772
|
+
{
|
|
1773
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1774
|
+
height: "1em",
|
|
1775
|
+
viewBox: "0 0 24 24",
|
|
1776
|
+
width: "1em",
|
|
1777
|
+
children: [
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1780
|
+
"path",
|
|
1781
|
+
{
|
|
1782
|
+
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",
|
|
1783
|
+
fill: "currentColor"
|
|
1784
|
+
}
|
|
1785
|
+
)
|
|
1450
1786
|
]
|
|
1451
1787
|
}
|
|
1452
1788
|
);
|
|
1453
1789
|
}
|
|
1454
1790
|
|
|
1791
|
+
// src/ErrorMessage.tsx
|
|
1792
|
+
var import_tailwind_merge7 = require("tailwind-merge");
|
|
1793
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1794
|
+
function ErrorMessage({ children, small = false, className: className2 }) {
|
|
1795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1796
|
+
"div",
|
|
1797
|
+
{
|
|
1798
|
+
className: (0, import_tailwind_merge7.twMerge)(
|
|
1799
|
+
"bg-red-500 text-white",
|
|
1800
|
+
"border-1 drop-shadow border-red-700 w-full rounded-md py-2 px-4 leading-[1.9em] flex items-center",
|
|
1801
|
+
"has-[a]:text-white",
|
|
1802
|
+
small && "text-xs whitespace-nowrap py-1 px-2 leading-[1.6em] w-fit",
|
|
1803
|
+
className2
|
|
1804
|
+
),
|
|
1805
|
+
children
|
|
1806
|
+
}
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1455
1810
|
// src/hooks.ts
|
|
1456
|
-
var
|
|
1811
|
+
var import_react10 = require("react");
|
|
1457
1812
|
function useFastList(list, firstRender = 24) {
|
|
1458
|
-
const [isMounted, setIsMounted] = (0,
|
|
1459
|
-
(0,
|
|
1813
|
+
const [isMounted, setIsMounted] = (0, import_react10.useState)(false);
|
|
1814
|
+
(0, import_react10.useLayoutEffect)(() => {
|
|
1460
1815
|
if (list) {
|
|
1461
1816
|
setTimeout(() => {
|
|
1462
1817
|
setIsMounted(true);
|
|
@@ -1471,3 +1826,123 @@ function useFastList(list, firstRender = 24) {
|
|
|
1471
1826
|
}
|
|
1472
1827
|
return list.slice(0, firstRender);
|
|
1473
1828
|
}
|
|
1829
|
+
|
|
1830
|
+
// src/RenderTextualContent.tsx
|
|
1831
|
+
var import_react11 = require("react");
|
|
1832
|
+
var import_react_aria_components9 = require("react-aria-components");
|
|
1833
|
+
var import_react_iiif_vault6 = require("react-iiif-vault");
|
|
1834
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1835
|
+
function RenderTextualContent(props) {
|
|
1836
|
+
const languages = props.strategy.items.map(
|
|
1837
|
+
(item) => Object.keys(item.text)[0]
|
|
1838
|
+
);
|
|
1839
|
+
const [langauge, setLanguage] = (0, import_react11.useState)(languages[0]);
|
|
1840
|
+
const selected = props.strategy.items.find(
|
|
1841
|
+
(item) => Object.keys(item.text)[0] === langauge
|
|
1842
|
+
);
|
|
1843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "overflow-y-auto bg-white shadow", children: [
|
|
1844
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex gap-2 border-b", children: languages.map((language) => {
|
|
1845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
1846
|
+
import_react_aria_components9.Button,
|
|
1847
|
+
{
|
|
1848
|
+
className: `py-1 px-3 ${langauge === language ? "bg-me-500 text-white" : "bg-white text-black"}`,
|
|
1849
|
+
onPress: () => setLanguage(language),
|
|
1850
|
+
children: language
|
|
1851
|
+
},
|
|
1852
|
+
language
|
|
1853
|
+
);
|
|
1854
|
+
}) }),
|
|
1855
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "p-4 prose", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
1856
|
+
import_react_iiif_vault6.LocaleString,
|
|
1857
|
+
{
|
|
1858
|
+
enableDangerouslySetInnerHTML: true,
|
|
1859
|
+
defaultText: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-gray-500 my-8", children: "No content available" }),
|
|
1860
|
+
children: selected?.text
|
|
1861
|
+
}
|
|
1862
|
+
) })
|
|
1863
|
+
] });
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
// src/IIIFMediaPlayer.tsx
|
|
1867
|
+
var import_base = require("@vidstack/react/player/styles/base.css");
|
|
1868
|
+
var import_theme = require("@vidstack/react/player/styles/default/theme.css");
|
|
1869
|
+
var import_captions = require("@vidstack/react/player/styles/default/captions.css");
|
|
1870
|
+
var import_video = require("@vidstack/react/player/styles/default/layouts/video.css");
|
|
1871
|
+
var import_react12 = require("@vidstack/react");
|
|
1872
|
+
var import_default = require("@vidstack/react/player/layouts/default");
|
|
1873
|
+
var import_helpers = require("@iiif/helpers");
|
|
1874
|
+
var import_react13 = require("react");
|
|
1875
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1876
|
+
function IIIFMediaPlayer(props) {
|
|
1877
|
+
const mediaPlayer = (0, import_react13.useRef)(null);
|
|
1878
|
+
const captions = props.captions || [];
|
|
1879
|
+
const language = props.language;
|
|
1880
|
+
const timeRef = (0, import_react13.useRef)(props.startTime || 0);
|
|
1881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1882
|
+
import_react12.MediaPlayer,
|
|
1883
|
+
{
|
|
1884
|
+
onTimeUpdate: (time) => {
|
|
1885
|
+
const newT = Math.round(time.currentTime);
|
|
1886
|
+
if (timeRef.current === newT)
|
|
1887
|
+
return;
|
|
1888
|
+
timeRef.current = newT;
|
|
1889
|
+
},
|
|
1890
|
+
ref: mediaPlayer,
|
|
1891
|
+
lang: language,
|
|
1892
|
+
className: "h-full w-full min-w-[275px] flex radius-0",
|
|
1893
|
+
playsInline: true,
|
|
1894
|
+
currentTime: props.startTime,
|
|
1895
|
+
duration: props.media.duration,
|
|
1896
|
+
src: [
|
|
1897
|
+
{
|
|
1898
|
+
src: props.media.url,
|
|
1899
|
+
type: props.media.format
|
|
1900
|
+
}
|
|
1901
|
+
],
|
|
1902
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react12.MediaProvider, { className: "w-full h-full [&>video]:w-full [&>video]:h-full [&>video]:object-contain", children: [
|
|
1903
|
+
captions.map((caption) => {
|
|
1904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1905
|
+
import_react12.Track,
|
|
1906
|
+
{
|
|
1907
|
+
src: caption.id,
|
|
1908
|
+
kind: "subtitles",
|
|
1909
|
+
label: (0, import_helpers.getValue)(caption.label),
|
|
1910
|
+
default: caption.language === language,
|
|
1911
|
+
language: caption.language
|
|
1912
|
+
},
|
|
1913
|
+
caption.id
|
|
1914
|
+
);
|
|
1915
|
+
}),
|
|
1916
|
+
props.poster ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1917
|
+
import_react12.Poster,
|
|
1918
|
+
{
|
|
1919
|
+
className: "absolute inset-0 bg-black block h-full w-full opacity-0 transition-opacity data-[visible]:opacity-100 object-contain",
|
|
1920
|
+
src: props.poster
|
|
1921
|
+
}
|
|
1922
|
+
) : null,
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Gestures, {}),
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1925
|
+
import_default.DefaultVideoLayout,
|
|
1926
|
+
{
|
|
1927
|
+
className: "z-1",
|
|
1928
|
+
noGestures: true,
|
|
1929
|
+
icons: import_default.defaultLayoutIcons
|
|
1930
|
+
}
|
|
1931
|
+
)
|
|
1932
|
+
] })
|
|
1933
|
+
}
|
|
1934
|
+
);
|
|
1935
|
+
}
|
|
1936
|
+
function Gestures() {
|
|
1937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1939
|
+
import_react12.Gesture,
|
|
1940
|
+
{
|
|
1941
|
+
className: "pointer-coarse:hidden absolute top-0 start-12 bottom-20 right-0 -z-1 block",
|
|
1942
|
+
event: "pointerup",
|
|
1943
|
+
action: "toggle:paused"
|
|
1944
|
+
}
|
|
1945
|
+
),
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react12.Gesture, { className: "absolute inset-0 z-0 block h-full w-full", event: "dblpointerup", action: "toggle:fullscreen" })
|
|
1947
|
+
] });
|
|
1948
|
+
}
|