@manifest-editor/components 1.3.0 → 1.4.0

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 CHANGED
@@ -36,8 +36,11 @@ __export(src_exports, {
36
36
  AddImageIcon: () => AddImageIcon,
37
37
  AtlasBanner: () => AtlasBanner,
38
38
  AudioIcon: () => AudioIcon,
39
+ BackIcon: () => BackIcon,
39
40
  CanvasThumbnailGridItem: () => CanvasThumbnailGridItem,
40
41
  Card3D: () => Card3D,
42
+ CollectionIcon: () => CollectionIcon,
43
+ CollectionListItem: () => CollectionListItem,
41
44
  ConfirmSelectionButton: () => ConfirmSelectionButton,
42
45
  ControlButton: () => ControlButton,
43
46
  CreateCanvasIcon: () => CreateCanvasIcon,
@@ -50,6 +53,7 @@ __export(src_exports, {
50
53
  EmptyState: () => EmptyState,
51
54
  ErrorMessage: () => ErrorMessage,
52
55
  Form: () => Form,
56
+ GridIcon: () => GridIcon,
53
57
  HTMLEditor: () => HTMLEditor,
54
58
  HTMLIcon: () => HTMLIcon,
55
59
  HandleContainer: () => HandleContainer,
@@ -57,21 +61,31 @@ __export(src_exports, {
57
61
  IIIFLogo: () => IIIFLogo,
58
62
  IIIFMediaPlayer: () => IIIFMediaPlayer,
59
63
  IconButton: () => IconButton,
64
+ ImageListIcon: () => ImageListIcon,
65
+ InfoIcon: () => InfoIcon,
60
66
  ItemWithHandle: () => ItemWithHandle,
61
67
  LazyThumbnail: () => LazyThumbnail,
68
+ ListEditIcon: () => ListEditIcon,
69
+ ListingIcon: () => ListingIcon,
62
70
  MDXEditor: () => MDXEditor,
63
71
  ManifestEditorLogo: () => ManifestEditorLogo,
72
+ ManifestIcon: () => ManifestIcon,
73
+ ManifestListItem: () => ManifestListItem,
64
74
  ManifestOverviewEmptyState: () => ManifestOverviewEmptyState,
65
75
  MetadataContainer: () => MetadataContainer,
66
76
  Modal: () => Modal,
77
+ ModalBackSlot: () => ModalBackSlot,
67
78
  MoreMenu: () => MoreMenu2,
68
79
  OpaqueControls: () => OpaqueControls,
69
80
  PanelSideMenu: () => PanelSideMenu,
81
+ PreviewIcon: () => PreviewIcon,
70
82
  RenderTextualContent: () => RenderTextualContent,
83
+ ScaledImageIcon: () => ScaledImageIcon,
71
84
  Sidebar: () => Sidebar,
72
85
  SidebarContent: () => SidebarContent,
73
86
  SidebarHeader: () => SidebarHeader,
74
87
  SidebarTabs: () => SidebarTabs,
88
+ Spinner: () => Spinner,
75
89
  SvgControlBar: () => SvgControlBar,
76
90
  Tab: () => Tab,
77
91
  TabList: () => TabList,
@@ -94,32 +108,27 @@ var import_dist = require("iiif-browser/dist/index.css");
94
108
 
95
109
  // src/ActionButton.tsx
96
110
  var import_react_aria_components = require("react-aria-components");
97
-
98
- // src/utils.ts
99
- var import_clsx = require("clsx");
100
111
  var import_tailwind_merge = require("tailwind-merge");
101
- var cn = (...inputs) => {
102
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
103
- };
104
-
105
- // src/ActionButton.tsx
106
112
  var import_jsx_runtime = require("react/jsx-runtime");
107
113
  function ActionButton({
108
114
  className: className2,
109
115
  primary,
110
116
  center,
117
+ large,
111
118
  children,
112
119
  ...props
113
120
  }) {
114
121
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
115
122
  import_react_aria_components.Button,
116
123
  {
117
- className: cn(
124
+ className: (t) => (0, import_tailwind_merge.twMerge)(
118
125
  //
119
- "border-none flex gap-1 items-center px-2 py-1 bg-gray-100 text-me-primary-500 text-sm rounded hover:bg-gray-200",
126
+ "border-none flex gap-1 items-center bg-gray-100 text-me-primary-500 text-sm rounded hover:bg-gray-200",
120
127
  primary ? "bg-me-primary-500 text-white hover:bg-me-primary-600" : "",
121
128
  center ? "place-content-center" : "",
122
- className2
129
+ large ? "px-4 py-2" : "px-2 py-1",
130
+ t.isDisabled ? "opacity-70 cursor-not-allowed pointer-events-none" : "",
131
+ typeof className2 === "string" ? className2 : className2?.(t)
123
132
  ),
124
133
  ...props,
125
134
  children
@@ -127,11 +136,18 @@ function ActionButton({
127
136
  );
128
137
  }
129
138
 
139
+ // src/utils.ts
140
+ var import_clsx = require("clsx");
141
+ var import_tailwind_merge2 = require("tailwind-merge");
142
+ var cn = (...inputs) => {
143
+ return (0, import_tailwind_merge2.twMerge)((0, import_clsx.clsx)(inputs));
144
+ };
145
+
130
146
  // src/Tooltip.tsx
131
- var React = __toESM(require("react"), 1);
132
147
  var import_react = require("@floating-ui/react");
148
+ var React = __toESM(require("react"), 1);
133
149
  var import_react_aria_components2 = require("react-aria-components");
134
- var import_tailwind_merge2 = require("tailwind-merge");
150
+ var import_tailwind_merge3 = require("tailwind-merge");
135
151
  var import_jsx_runtime2 = require("react/jsx-runtime");
136
152
  function useTooltip({
137
153
  initialOpen = false,
@@ -186,10 +202,7 @@ var useTooltipContext = () => {
186
202
  }
187
203
  return context;
188
204
  };
189
- function Tooltip({
190
- children,
191
- ...options
192
- }) {
205
+ function Tooltip({ children, ...options }) {
193
206
  const tooltip = useTooltip(options);
194
207
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TooltipContext.Provider, { value: tooltip, children });
195
208
  }
@@ -218,12 +231,12 @@ var TooltipTrigger = React.forwardRef(function TooltipTrigger2({ children, asChi
218
231
  }
219
232
  );
220
233
  });
221
- var TooltipContent = React.forwardRef(function TooltipContent2({ style, ...props }, propRef) {
234
+ var TooltipContent = React.forwardRef(function TooltipContent2({ style, root, ...props }, propRef) {
222
235
  const context = useTooltipContext();
223
236
  const ref = (0, import_react.useMergeRefs)([context.refs.setFloating, propRef]);
224
237
  if (!context.open)
225
238
  return null;
226
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
239
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react.FloatingPortal, { root, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
227
240
  "div",
228
241
  {
229
242
  ref,
@@ -239,10 +252,8 @@ function DefaultTooltipContent(props) {
239
252
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
240
253
  TooltipContent,
241
254
  {
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
- ),
255
+ root: props.root,
256
+ className: (0, import_tailwind_merge3.twMerge)("bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50", props.className),
246
257
  children: props.children
247
258
  }
248
259
  );
@@ -299,10 +310,11 @@ function PanelSideMenuItem(props) {
299
310
  "border-none aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default",
300
311
  props.selected ? "bg-me-primary-500 hover:bg-me-primary-600 hover:text-white text-white" : "text-me-gray-700"
301
312
  ),
313
+ "aria-label": props.label,
302
314
  onMouseDown: props.onClick,
303
315
  children: [
304
316
  props.icon,
305
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipContent, { className: "bg-me-gray-900 text-white text-sm px-3 py-2 rounded-lg opacity-90 z-50", children: props.label })
317
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipContent, { className: "bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50", children: props.label })
306
318
  ]
307
319
  }
308
320
  ) }) });
@@ -339,7 +351,7 @@ function ThumbnailGridContainer(props) {
339
351
  var import_react2 = require("react");
340
352
  var import_react_iiif_vault = require("react-iiif-vault");
341
353
  var import_react_lazy_load_image_component = require("react-lazy-load-image-component");
342
- var import_tailwind_merge3 = require("tailwind-merge");
354
+ var import_tailwind_merge4 = require("tailwind-merge");
343
355
 
344
356
  // src/Spinner.tsx
345
357
  var import_jsx_runtime8 = require("react/jsx-runtime");
@@ -449,7 +461,7 @@ function LazyThumbnailInner({
449
461
  !thumbnail?.id || isLoading ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
450
462
  "div",
451
463
  {
452
- className: (0, import_tailwind_merge3.twMerge)(
464
+ className: (0, import_tailwind_merge4.twMerge)(
453
465
  "absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10",
454
466
  fade && "animate-fadeIn"
455
467
  ),
@@ -481,7 +493,7 @@ function CanvasLabel(props) {
481
493
 
482
494
  // src/Card3D.tsx
483
495
  var import_react3 = require("react");
484
- var import_tailwind_merge4 = require("tailwind-merge");
496
+ var import_tailwind_merge5 = require("tailwind-merge");
485
497
  var import_jsx_runtime12 = require("react/jsx-runtime");
486
498
  function Card3D({
487
499
  className: className2,
@@ -557,7 +569,7 @@ function Card3D({
557
569
  "div",
558
570
  {
559
571
  ref: outer,
560
- className: (0, import_tailwind_merge4.twMerge)(
572
+ className: (0, import_tailwind_merge5.twMerge)(
561
573
  //
562
574
  "relative transition-all hover:duration-50",
563
575
  shouldTranslate && "hover:shadow-xl",
@@ -603,63 +615,49 @@ function CanvasThumbnailGridItem(props) {
603
615
 
604
616
  // src/Modal.tsx
605
617
  var import_react4 = require("@headlessui/react");
618
+ var import_react_dom = require("react-dom");
606
619
  var import_jsx_runtime14 = require("react/jsx-runtime");
607
- function Modal({
608
- id,
609
- title,
610
- open = true,
611
- onClose,
612
- actions,
613
- children
614
- }) {
615
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
616
- import_react4.Dialog,
617
- {
618
- open,
619
- onClose,
620
- id,
621
- className: "relative z-[500]",
622
- children: [
623
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
624
- "div",
625
- {
626
- className: `fixed inset-0 bg-black/30 animate-fadeIn z-[501]`,
627
- "aria-hidden": "true"
628
- }
629
- ),
630
- /* @__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: [
631
- /* @__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: [
632
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react4.DialogTitle, { className: "text-xl font-semibold text-gray-900 ", children: title }),
633
- /* @__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: [
634
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
635
- "svg",
620
+ function ModalBackSlot({ children }) {
621
+ const element = document.getElementById("modal-back-slot");
622
+ if (!element)
623
+ return null;
624
+ return (0, import_react_dom.createPortal)(children, element);
625
+ }
626
+ function Modal({ id, title, open = true, onClose, actions, children }) {
627
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react4.Dialog, { open, onClose, id, className: "relative z-[500]", children: [
628
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: `fixed inset-0 bg-black/30 animate-fadeIn z-[501]`, "aria-hidden": "true" }),
629
+ /* @__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: [
630
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between gap-3 p-4 rounded-t-lg sticky top-0 bg-white", children: [
631
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id: "modal-back-slot" }),
632
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react4.DialogTitle, { className: "text-xl font-semibold text-gray-900 ", children: title }),
633
+ /* @__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: [
634
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
635
+ "svg",
636
+ {
637
+ className: "w-3 h-3",
638
+ "aria-hidden": "true",
639
+ xmlns: "http://www.w3.org/2000/svg",
640
+ fill: "none",
641
+ viewBox: "0 0 14 14",
642
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
643
+ "path",
636
644
  {
637
- className: "w-3 h-3",
638
- "aria-hidden": "true",
639
- xmlns: "http://www.w3.org/2000/svg",
640
- fill: "none",
641
- viewBox: "0 0 14 14",
642
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
643
- "path",
644
- {
645
- stroke: "currentColor",
646
- strokeLinecap: "round",
647
- strokeLinejoin: "round",
648
- strokeWidth: "2",
649
- d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
650
- }
651
- )
645
+ stroke: "currentColor",
646
+ strokeLinecap: "round",
647
+ strokeLinejoin: "round",
648
+ strokeWidth: "2",
649
+ d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
652
650
  }
653
- ),
654
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sr-only", children: "Close" })
655
- ] })
656
- ] }),
657
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto flex flex-col", children }),
658
- 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
659
- ] }) }) })
660
- ]
661
- }
662
- ) });
651
+ )
652
+ }
653
+ ),
654
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sr-only", children: "Close" })
655
+ ] })
656
+ ] }),
657
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto flex flex-col", children }),
658
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex items-center p-4 border-t border-gray-200 rounded-b justify-end", children: actions }) : null
659
+ ] }) }) })
660
+ ] }) });
663
661
  }
664
662
 
665
663
  // src/ControlButton.tsx
@@ -761,7 +759,7 @@ function TabPanel({ className: className2, children, ...props }) {
761
759
 
762
760
  // src/CreatorGrid.tsx
763
761
  var import_react_aria_components4 = require("react-aria-components");
764
- var import_tailwind_merge5 = require("tailwind-merge");
762
+ var import_tailwind_merge6 = require("tailwind-merge");
765
763
  var import_jsx_runtime18 = require("react/jsx-runtime");
766
764
  function CreatorGrid(props) {
767
765
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -782,7 +780,7 @@ function CreatorGridItem(props) {
782
780
  {
783
781
  id: props.id,
784
782
  onAction: props.onClick,
785
- className: ($s) => (0, import_tailwind_merge5.twMerge)(
783
+ className: ($s) => (0, import_tailwind_merge6.twMerge)(
786
784
  "bg-white p-2 border-me-gray-300 rounded-md border hover:border-me-primary-500",
787
785
  $s.isFocused && "border-me-primary-500 outline-me-primary-500 outline-2"
788
786
  ),
@@ -1104,7 +1102,7 @@ function ManifestOverviewEmptyState({ onCreate, canCreate }) {
1104
1102
  var import_react6 = require("react");
1105
1103
  var import_react_aria_components7 = require("react-aria-components");
1106
1104
  var import_collections = require("@react-aria/collections");
1107
- var import_react_dom = require("react-dom");
1105
+ var import_react_dom2 = require("react-dom");
1108
1106
  var import_jsx_runtime34 = require("react/jsx-runtime");
1109
1107
  function SidebarTabs({
1110
1108
  menu,
@@ -1204,7 +1202,7 @@ function SidebarTabs({
1204
1202
  },
1205
1203
  menuId
1206
1204
  ),
1207
- hiddenMenu && hidden > 0 ? (0, import_react_dom.createPortal)(
1205
+ hiddenMenu && hidden > 0 ? (0, import_react_dom2.createPortal)(
1208
1206
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1209
1207
  MoreMenu,
1210
1208
  {
@@ -1264,7 +1262,7 @@ function MetadataContainer({
1264
1262
  ...props
1265
1263
  }) {
1266
1264
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1267
- "div",
1265
+ "fieldset",
1268
1266
  {
1269
1267
  className: cn(
1270
1268
  "hover:ring ring-gray-200 focus-within:ring-me-primary-500 focus-within:ring p-2 rounded mb-2",
@@ -1392,6 +1390,20 @@ function MeInput({ className: className2, ...props }) {
1392
1390
  }
1393
1391
  );
1394
1392
  }
1393
+ function MeTextArea({ className: className2, ...props }) {
1394
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1395
+ import_react_aria_components8.TextArea,
1396
+ {
1397
+ className: cn(
1398
+ //
1399
+ "p-2 bg-me-gray-100 border-b border-b-me-gray-500",
1400
+ "focus:ring-0 outline-0 focus:border-me-primary-500 focus:bg-[#ECEEF5]",
1401
+ className2
1402
+ ),
1403
+ ...props
1404
+ }
1405
+ );
1406
+ }
1395
1407
  function MeInputContainer({
1396
1408
  horizontal,
1397
1409
  className: className2,
@@ -1416,7 +1428,8 @@ var Form = {
1416
1428
  Label: MeLabel,
1417
1429
  InputContainer: MeInputContainer,
1418
1430
  RadioGroup: MeRadioGroup,
1419
- Radio: MeRadio
1431
+ Radio: MeRadio,
1432
+ TextArea: MeTextArea
1420
1433
  };
1421
1434
 
1422
1435
  // src/HTMLEditor.tsx
@@ -1440,22 +1453,23 @@ function MDXEditor({
1440
1453
  plugins: (0, import_react7.useMemo)(
1441
1454
  () => [
1442
1455
  // Example Plugin Usage
1443
- (0, import_editor.headingsPlugin)(),
1456
+ (0, import_editor.headingsPlugin)({ allowedHeadingLevels: [2, 3] }),
1444
1457
  (0, import_editor.listsPlugin)(),
1445
1458
  (0, import_editor.linkPlugin)(),
1446
1459
  (0, import_editor.quotePlugin)(),
1447
1460
  (0, import_editor.thematicBreakPlugin)(),
1448
- (0, import_editor.headingsPlugin)(),
1449
- // linkDialogPlugin(),
1450
- (0, import_editor.markdownShortcutPlugin)(),
1461
+ (0, import_editor.linkDialogPlugin)(),
1451
1462
  (0, import_editor.imagePlugin)(),
1463
+ (0, import_editor.diffSourcePlugin)(),
1452
1464
  (0, import_editor.toolbarPlugin)({
1453
1465
  toolbarClassName: "mdx-toolbar",
1454
1466
  toolbarContents: () => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
1455
1467
  " ",
1456
1468
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.UndoRedo, {}),
1469
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.BoldItalicUnderlineToggles, {}),
1457
1470
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.BlockTypeSelect, {}),
1458
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.ListsToggle, {}),
1471
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.ListsToggle, { options: ["bullet", "number"] }),
1472
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.CreateLink, {}),
1459
1473
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_editor.InsertImage, {})
1460
1474
  ] })
1461
1475
  })
@@ -1503,7 +1517,11 @@ function HTMLEditor({
1503
1517
  editorRef,
1504
1518
  onBlur: internalOnChange,
1505
1519
  readOnly: disabled,
1506
- className: "bg-white prose-sm text-sm border rounded-lg p-0.5 focus-within:outline-none focus-within:border-me-primary-500",
1520
+ className: [
1521
+ "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",
1522
+ "prose-ol:list-decimal",
1523
+ "focus-within:outline-none focus-within:border-me-primary-500 z-50 relative"
1524
+ ].join(" "),
1507
1525
  markdown: memoState,
1508
1526
  suppressHtmlProcessing: true,
1509
1527
  onError: (err) => {
@@ -1518,27 +1536,31 @@ function HTMLEditor({
1518
1536
  }
1519
1537
 
1520
1538
  // src/IconButton.tsx
1521
- var import_tailwind_merge6 = require("tailwind-merge");
1539
+ var import_tailwind_merge7 = require("tailwind-merge");
1522
1540
  var import_jsx_runtime41 = require("react/jsx-runtime");
1523
1541
  function IconButton({
1524
1542
  children,
1525
1543
  active,
1526
1544
  label,
1527
1545
  disabled,
1528
- onPress
1546
+ onPress,
1547
+ root,
1548
+ className: className2,
1549
+ placement = "top"
1529
1550
  }) {
1530
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Tooltip, { placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
1551
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Tooltip, { placement, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
1531
1552
  TooltipTrigger,
1532
1553
  {
1533
1554
  onClick: onPress,
1534
- className: (0, import_tailwind_merge6.twMerge)(
1555
+ className: (0, import_tailwind_merge7.twMerge)(
1535
1556
  "rounded flex items-center bg-white justify-center p-2 hover:bg-gray-100 text-2xl",
1536
1557
  active ? "bg-me-primary-500 bg-opacity-40 hover:bg-opacity-70 hover:bg-me-primary-500" : "",
1537
- disabled ? "opacity-50 pointer-events-none" : ""
1558
+ disabled ? "opacity-50 pointer-events-none" : "",
1559
+ className2
1538
1560
  ),
1539
1561
  children: [
1540
1562
  children,
1541
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DefaultTooltipContent, { className: "translate-x-3", children: label })
1563
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DefaultTooltipContent, { root, className: "translate-x-3 z-50", children: label })
1542
1564
  ]
1543
1565
  }
1544
1566
  ) });
@@ -1579,12 +1601,116 @@ var HandleContainer = (0, import_react9.forwardRef)(function HandleContainer2({
1579
1601
  );
1580
1602
  });
1581
1603
 
1582
- // src/icons/CreateCanvasIcon.tsx
1604
+ // src/CollectionListItem.tsx
1605
+ var import_react_aria_components9 = require("react-aria-components");
1606
+ var import_react_iiif_vault6 = require("react-iiif-vault");
1607
+
1608
+ // src/icons/CollectionIcon.tsx
1583
1609
  var import_jsx_runtime44 = require("react/jsx-runtime");
1610
+ function CollectionIcon(props) {
1611
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
1612
+ "svg",
1613
+ {
1614
+ xmlns: "http://www.w3.org/2000/svg",
1615
+ width: "1em",
1616
+ height: "1em",
1617
+ viewBox: "0 -960 960 960",
1618
+ "aria-label": "collection",
1619
+ role: "img",
1620
+ ...props,
1621
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
1622
+ "path",
1623
+ {
1624
+ 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",
1625
+ fill: "currentColor"
1626
+ }
1627
+ )
1628
+ }
1629
+ );
1630
+ }
1631
+
1632
+ // src/CollectionListItem.tsx
1633
+ var import_jsx_runtime45 = require("react/jsx-runtime");
1634
+ function CollectionListItem({ isActive, onAction }) {
1635
+ const collection = (0, import_react_iiif_vault6.useCollection)({});
1636
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
1637
+ import_react_aria_components9.Button,
1638
+ {
1639
+ 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
+ "data-active": isActive || void 0,
1642
+ children: [
1643
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1644
+ CollectionIcon,
1645
+ {
1646
+ "data-active": isActive || void 0,
1647
+ className: "flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400"
1648
+ }
1649
+ ),
1650
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_iiif_vault6.LocaleString, { children: collection?.label })
1651
+ ]
1652
+ }
1653
+ );
1654
+ }
1655
+
1656
+ // src/ManifestListItem.tsx
1657
+ var import_react_aria_components10 = require("react-aria-components");
1658
+ var import_react_iiif_vault7 = require("react-iiif-vault");
1659
+
1660
+ // src/icons/ManifestIcon.tsx
1661
+ var import_jsx_runtime46 = require("react/jsx-runtime");
1662
+ function ManifestIcon(props) {
1663
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1664
+ "svg",
1665
+ {
1666
+ xmlns: "http://www.w3.org/2000/svg",
1667
+ width: "1em",
1668
+ height: "1em",
1669
+ viewBox: "20 -910 960 960",
1670
+ "aria-label": "manifest",
1671
+ role: "img",
1672
+ ...props,
1673
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1674
+ "path",
1675
+ {
1676
+ 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",
1677
+ fill: "currentColor"
1678
+ }
1679
+ )
1680
+ }
1681
+ );
1682
+ }
1683
+
1684
+ // src/ManifestListItem.tsx
1685
+ var import_jsx_runtime47 = require("react/jsx-runtime");
1686
+ function ManifestListItem({ isActive, onAction }) {
1687
+ const manifest = (0, import_react_iiif_vault7.useManifest)();
1688
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
1689
+ import_react_aria_components10.Button,
1690
+ {
1691
+ 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
+ "data-active": isActive || void 0,
1694
+ children: [
1695
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
1696
+ ManifestIcon,
1697
+ {
1698
+ "data-active": isActive || void 0,
1699
+ className: "flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400"
1700
+ }
1701
+ ),
1702
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_iiif_vault7.LocaleString, { children: manifest?.label })
1703
+ ]
1704
+ }
1705
+ );
1706
+ }
1707
+
1708
+ // src/icons/CreateCanvasIcon.tsx
1709
+ var import_jsx_runtime48 = require("react/jsx-runtime");
1584
1710
  function CreateCanvasIcon() {
1585
- 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: [
1586
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
1587
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
1711
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 0 24 24", width: "24", children: [
1712
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
1713
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1588
1714
  "path",
1589
1715
  {
1590
1716
  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",
@@ -1595,8 +1721,8 @@ function CreateCanvasIcon() {
1595
1721
  }
1596
1722
 
1597
1723
  // src/icons/AddImageIcon.tsx
1598
- var import_jsx_runtime45 = require("react/jsx-runtime");
1599
- 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)(
1724
+ var import_jsx_runtime49 = require("react/jsx-runtime");
1725
+ var AddImageIcon = (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)(
1600
1726
  "path",
1601
1727
  {
1602
1728
  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",
@@ -1605,8 +1731,8 @@ var AddImageIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("svg
1605
1731
  ) });
1606
1732
 
1607
1733
  // src/icons/IIIFLogo.tsx
1608
- var import_jsx_runtime46 = require("react/jsx-runtime");
1609
- var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
1734
+ var import_jsx_runtime50 = require("react/jsx-runtime");
1735
+ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
1610
1736
  "svg",
1611
1737
  {
1612
1738
  xmlns: "http://www.w3.org/2000/svg",
@@ -1616,7 +1742,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
1616
1742
  ...props,
1617
1743
  viewBox: "0 0 493.36 441.333",
1618
1744
  children: [
1619
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1745
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1620
1746
  "path",
1621
1747
  {
1622
1748
  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",
@@ -1629,7 +1755,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
1629
1755
  transform: "matrix(.13333 0 0 -.13333 0 441.333)"
1630
1756
  }
1631
1757
  ),
1632
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1758
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1633
1759
  "path",
1634
1760
  {
1635
1761
  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",
@@ -1642,7 +1768,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
1642
1768
  transform: "matrix(.13333 0 0 -.13333 0 441.333)"
1643
1769
  }
1644
1770
  ),
1645
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1771
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1646
1772
  "path",
1647
1773
  {
1648
1774
  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",
@@ -1655,7 +1781,7 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
1655
1781
  transform: "matrix(.13333 0 0 -.13333 0 441.333)"
1656
1782
  }
1657
1783
  ),
1658
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1784
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1659
1785
  "path",
1660
1786
  {
1661
1787
  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",
@@ -1673,8 +1799,8 @@ var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_run
1673
1799
  );
1674
1800
 
1675
1801
  // src/icons/HTMLIcon.tsx
1676
- var import_jsx_runtime47 = require("react/jsx-runtime");
1677
- 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)(
1802
+ var import_jsx_runtime51 = require("react/jsx-runtime");
1803
+ var HTMLIcon = (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)(
1678
1804
  "path",
1679
1805
  {
1680
1806
  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",
@@ -1683,8 +1809,8 @@ var HTMLIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("svg", {
1683
1809
  ) });
1684
1810
 
1685
1811
  // src/icons/IIIFBrowserIcon.tsx
1686
- var import_jsx_runtime48 = require("react/jsx-runtime");
1687
- 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)(
1812
+ var import_jsx_runtime52 = require("react/jsx-runtime");
1813
+ var IIIFBrowserIcon = (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)(
1688
1814
  "path",
1689
1815
  {
1690
1816
  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",
@@ -1692,9 +1818,59 @@ var IIIFBrowserIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("
1692
1818
  }
1693
1819
  ) });
1694
1820
 
1821
+ // src/icons/InfoIcon.tsx
1822
+ var import_jsx_runtime53 = require("react/jsx-runtime");
1823
+ function InfoIcon({ title, titleId, ...props }) {
1824
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
1825
+ title ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("title", { id: titleId, children: title }) : null,
1826
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
1827
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
1828
+ "path",
1829
+ {
1830
+ 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",
1831
+ fill: "currentColor"
1832
+ }
1833
+ )
1834
+ ] });
1835
+ }
1836
+
1837
+ // src/icons/ListingIcon.tsx
1838
+ var import_jsx_runtime54 = require("react/jsx-runtime");
1839
+ function ListingIcon({
1840
+ title,
1841
+ titleId,
1842
+ ...props
1843
+ }) {
1844
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
1845
+ "svg",
1846
+ {
1847
+ xmlns: "http://www.w3.org/2000/svg",
1848
+ viewBox: "0 0 24 24",
1849
+ width: "1em",
1850
+ height: "1em",
1851
+ "aria-labelledby": titleId,
1852
+ ...props,
1853
+ children: [
1854
+ title ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("title", { id: titleId, children: title }) : null,
1855
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("g", { fill: "none", children: [
1856
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M0 0h24v24H0V0z" }),
1857
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M0 0h24v24H0V0z", opacity: ".87" })
1858
+ ] }),
1859
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
1860
+ "path",
1861
+ {
1862
+ d: "M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z",
1863
+ fill: "currentColor"
1864
+ }
1865
+ )
1866
+ ]
1867
+ }
1868
+ );
1869
+ }
1870
+
1695
1871
  // src/icons/YouTubeIcon.tsx
1696
- var import_jsx_runtime49 = require("react/jsx-runtime");
1697
- 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)(
1872
+ var import_jsx_runtime55 = require("react/jsx-runtime");
1873
+ var YouTubeIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime55.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_runtime55.jsx)(
1698
1874
  "path",
1699
1875
  {
1700
1876
  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",
@@ -1702,9 +1878,34 @@ var YouTubeIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("svg"
1702
1878
  }
1703
1879
  ) });
1704
1880
 
1881
+ // src/icons/ListEditIcon.tsx
1882
+ var import_jsx_runtime56 = require("react/jsx-runtime");
1883
+ function ListEditIcon({
1884
+ title,
1885
+ titleId,
1886
+ ...props
1887
+ }) {
1888
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
1889
+ "svg",
1890
+ {
1891
+ xmlns: "http://www.w3.org/2000/svg",
1892
+ height: "24",
1893
+ viewBox: "0 0 24 24",
1894
+ width: "24",
1895
+ "aria-labelledby": titleId,
1896
+ ...props,
1897
+ children: [
1898
+ title ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("title", { id: titleId, children: title }) : null,
1899
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
1900
+ /* @__PURE__ */ (0, import_jsx_runtime56.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
+ ]
1902
+ }
1903
+ );
1904
+ }
1905
+
1705
1906
  // src/icons/VideoIcon.tsx
1706
- var import_jsx_runtime50 = require("react/jsx-runtime");
1707
- 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)(
1907
+ var import_jsx_runtime57 = require("react/jsx-runtime");
1908
+ var VideoIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime57.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_runtime57.jsx)(
1708
1909
  "path",
1709
1910
  {
1710
1911
  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",
@@ -1713,8 +1914,8 @@ var VideoIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg",
1713
1914
  ) });
1714
1915
 
1715
1916
  // src/icons/AudioIcon.tsx
1716
- var import_jsx_runtime51 = require("react/jsx-runtime");
1717
- 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)(
1917
+ var import_jsx_runtime58 = require("react/jsx-runtime");
1918
+ var AudioIcon = (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)(
1718
1919
  "path",
1719
1920
  {
1720
1921
  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",
@@ -1723,8 +1924,8 @@ var AudioIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("svg",
1723
1924
  ) });
1724
1925
 
1725
1926
  // src/icons/EmptyCanvasIcon.tsx
1726
- var import_jsx_runtime52 = require("react/jsx-runtime");
1727
- 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)(
1927
+ var import_jsx_runtime59 = require("react/jsx-runtime");
1928
+ var EmptyCanvasIcon = (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)(
1728
1929
  "path",
1729
1930
  {
1730
1931
  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",
@@ -1733,14 +1934,14 @@ var EmptyCanvasIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("
1733
1934
  ) });
1734
1935
 
1735
1936
  // src/icons/AddIcon.tsx
1736
- var import_jsx_runtime53 = require("react/jsx-runtime");
1937
+ var import_jsx_runtime60 = require("react/jsx-runtime");
1737
1938
  function AddIcon({
1738
1939
  className: className2,
1739
1940
  inline,
1740
1941
  height = 16,
1741
1942
  color = "black"
1742
1943
  }) {
1743
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
1944
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
1744
1945
  "svg",
1745
1946
  {
1746
1947
  xmlns: "http://www.w3.org/2000/svg",
@@ -1751,17 +1952,17 @@ function AddIcon({
1751
1952
  style: { verticalAlign: inline ? "bottom" : void 0 },
1752
1953
  className: className2,
1753
1954
  children: [
1754
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1755
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", fill: "currentColor" })
1955
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1956
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", fill: "currentColor" })
1756
1957
  ]
1757
1958
  }
1758
1959
  );
1759
1960
  }
1760
1961
 
1761
1962
  // src/icons/MoreMenu.tsx
1762
- var import_jsx_runtime54 = require("react/jsx-runtime");
1963
+ var import_jsx_runtime61 = require("react/jsx-runtime");
1763
1964
  function MoreMenu2() {
1764
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
1965
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
1765
1966
  "svg",
1766
1967
  {
1767
1968
  xmlns: "http://www.w3.org/2000/svg",
@@ -1769,8 +1970,8 @@ function MoreMenu2() {
1769
1970
  viewBox: "0 0 24 24",
1770
1971
  width: "1em",
1771
1972
  children: [
1772
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1773
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
1973
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1974
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
1774
1975
  "path",
1775
1976
  {
1776
1977
  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",
@@ -1782,14 +1983,78 @@ function MoreMenu2() {
1782
1983
  );
1783
1984
  }
1784
1985
 
1986
+ // src/icons/PreviewIcon.tsx
1987
+ var import_jsx_runtime62 = require("react/jsx-runtime");
1988
+ function PreviewIcon(props) {
1989
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
1990
+ "path",
1991
+ {
1992
+ fill: "currentColor",
1993
+ d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5s5 2.24 5 5s-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3s3-1.34 3-3s-1.34-3-3-3"
1994
+ }
1995
+ ) });
1996
+ }
1997
+
1998
+ // src/icons/ImageListIcon.tsx
1999
+ var import_jsx_runtime63 = require("react/jsx-runtime");
2000
+ function ImageListIcon(props) {
2001
+ 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)(
2002
+ "path",
2003
+ {
2004
+ fill: "currentColor",
2005
+ d: "M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1M11 17l2.5-3.15L15.29 16l2.5-3.22L21 17z"
2006
+ }
2007
+ ) });
2008
+ }
2009
+
2010
+ // src/icons/BackIcon.tsx
2011
+ var import_jsx_runtime64 = require("react/jsx-runtime");
2012
+ function BackIcon(props) {
2013
+ 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)("path", { fill: "currentColor", d: "M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20z" }) });
2014
+ }
2015
+
2016
+ // src/icons/GridIcon.tsx
2017
+ var import_jsx_runtime65 = require("react/jsx-runtime");
2018
+ function GridIcon(props) {
2019
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: [
2020
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2021
+ "path",
2022
+ {
2023
+ fill: "currentColor",
2024
+ d: "M10 10h4v4h-4zm0 6h4v4h-4zM4 4h4v4H4zm0 6h4v4H4zm0 6h4v4H4zM16 4h4v4h-4zm0 6h4v4h-4zm0 6h4v4h-4zM10 4h4v4h-4z",
2025
+ opacity: ".3"
2026
+ }
2027
+ ),
2028
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2029
+ "path",
2030
+ {
2031
+ fill: "currentColor",
2032
+ d: "M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"
2033
+ }
2034
+ )
2035
+ ] });
2036
+ }
2037
+
2038
+ // src/icons/ScaledImageIcon.tsx
2039
+ var import_jsx_runtime66 = require("react/jsx-runtime");
2040
+ function ScaledImageIcon(props) {
2041
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2042
+ "path",
2043
+ {
2044
+ fill: "currentColor",
2045
+ d: "M21 15h2v2h-2zm0-4h2v2h-2zm2 8h-2v2c1 0 2-1 2-2M13 3h2v2h-2zm8 4h2v2h-2zm0-4v2h2c0-1-1-2-2-2M1 7h2v2H1zm16-4h2v2h-2zm0 16h2v2h-2zM3 3C2 3 1 4 1 5h2zm6 0h2v2H9zM5 3h2v2H5zm-4 8v8c0 1.1.9 2 2 2h12V11zm2 8l2.5-3.21l1.79 2.15l2.5-3.22L13 19z"
2046
+ }
2047
+ ) });
2048
+ }
2049
+
1785
2050
  // src/ErrorMessage.tsx
1786
- var import_tailwind_merge7 = require("tailwind-merge");
1787
- var import_jsx_runtime55 = require("react/jsx-runtime");
2051
+ var import_tailwind_merge8 = require("tailwind-merge");
2052
+ var import_jsx_runtime67 = require("react/jsx-runtime");
1788
2053
  function ErrorMessage({ children, small = false, className: className2 }) {
1789
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
2054
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
1790
2055
  "div",
1791
2056
  {
1792
- className: (0, import_tailwind_merge7.twMerge)(
2057
+ className: (0, import_tailwind_merge8.twMerge)(
1793
2058
  "bg-red-500 text-white",
1794
2059
  "border-1 drop-shadow border-red-700 w-full rounded-md py-2 px-4 leading-[1.9em] flex items-center",
1795
2060
  "has-[a]:text-white",
@@ -1823,9 +2088,9 @@ function useFastList(list, firstRender = 24) {
1823
2088
 
1824
2089
  // src/RenderTextualContent.tsx
1825
2090
  var import_react11 = require("react");
1826
- var import_react_aria_components9 = require("react-aria-components");
1827
- var import_react_iiif_vault6 = require("react-iiif-vault");
1828
- var import_jsx_runtime56 = require("react/jsx-runtime");
2091
+ var import_react_aria_components11 = require("react-aria-components");
2092
+ var import_react_iiif_vault8 = require("react-iiif-vault");
2093
+ var import_jsx_runtime68 = require("react/jsx-runtime");
1829
2094
  function RenderTextualContent(props) {
1830
2095
  const languages = props.strategy.items.map(
1831
2096
  (item) => Object.keys(item.text)[0]
@@ -1834,10 +2099,10 @@ function RenderTextualContent(props) {
1834
2099
  const selected = props.strategy.items.find(
1835
2100
  (item) => Object.keys(item.text)[0] === langauge
1836
2101
  );
1837
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "overflow-y-auto bg-white shadow", children: [
1838
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex gap-2 border-b", children: languages.map((language) => {
1839
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
1840
- import_react_aria_components9.Button,
2102
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "overflow-y-auto bg-white shadow", children: [
2103
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex gap-2 border-b", children: languages.map((language) => {
2104
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2105
+ import_react_aria_components11.Button,
1841
2106
  {
1842
2107
  className: `py-1 px-3 ${langauge === language ? "bg-me-500 text-white" : "bg-white text-black"}`,
1843
2108
  onPress: () => setLanguage(language),
@@ -1846,11 +2111,11 @@ function RenderTextualContent(props) {
1846
2111
  language
1847
2112
  );
1848
2113
  }) }),
1849
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "p-4 prose", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
1850
- import_react_iiif_vault6.LocaleString,
2114
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "p-4 prose", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2115
+ import_react_iiif_vault8.LocaleString,
1851
2116
  {
1852
2117
  enableDangerouslySetInnerHTML: true,
1853
- defaultText: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-gray-500 my-8", children: "No content available" }),
2118
+ defaultText: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-gray-500 my-8", children: "No content available" }),
1854
2119
  children: selected?.text
1855
2120
  }
1856
2121
  ) })
@@ -1866,13 +2131,13 @@ var import_react12 = require("@vidstack/react");
1866
2131
  var import_default = require("@vidstack/react/player/layouts/default");
1867
2132
  var import_helpers = require("@iiif/helpers");
1868
2133
  var import_react13 = require("react");
1869
- var import_jsx_runtime57 = require("react/jsx-runtime");
2134
+ var import_jsx_runtime69 = require("react/jsx-runtime");
1870
2135
  function IIIFMediaPlayer(props) {
1871
2136
  const mediaPlayer = (0, import_react13.useRef)(null);
1872
2137
  const captions = props.captions || [];
1873
2138
  const language = props.language;
1874
2139
  const timeRef = (0, import_react13.useRef)(props.startTime || 0);
1875
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2140
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
1876
2141
  import_react12.MediaPlayer,
1877
2142
  {
1878
2143
  onTimeUpdate: (time) => {
@@ -1893,9 +2158,9 @@ function IIIFMediaPlayer(props) {
1893
2158
  type: props.media.format
1894
2159
  }
1895
2160
  ],
1896
- 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: [
2161
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react12.MediaProvider, { className: "w-full h-full [&>video]:w-full [&>video]:h-full [&>video]:object-contain", children: [
1897
2162
  captions.map((caption) => {
1898
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2163
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
1899
2164
  import_react12.Track,
1900
2165
  {
1901
2166
  src: caption.id,
@@ -1907,15 +2172,15 @@ function IIIFMediaPlayer(props) {
1907
2172
  caption.id
1908
2173
  );
1909
2174
  }),
1910
- props.poster ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2175
+ props.poster ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
1911
2176
  import_react12.Poster,
1912
2177
  {
1913
2178
  className: "absolute inset-0 bg-black block h-full w-full opacity-0 transition-opacity data-[visible]:opacity-100 object-contain",
1914
2179
  src: props.poster
1915
2180
  }
1916
2181
  ) : null,
1917
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Gestures, {}),
1918
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2182
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Gestures, {}),
2183
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
1919
2184
  import_default.DefaultVideoLayout,
1920
2185
  {
1921
2186
  className: "z-1",
@@ -1928,8 +2193,8 @@ function IIIFMediaPlayer(props) {
1928
2193
  );
1929
2194
  }
1930
2195
  function Gestures() {
1931
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
1932
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2196
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
2197
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
1933
2198
  import_react12.Gesture,
1934
2199
  {
1935
2200
  className: "pointer-coarse:hidden absolute top-0 start-12 bottom-20 right-0 -z-1 block",
@@ -1937,6 +2202,6 @@ function Gestures() {
1937
2202
  action: "toggle:paused"
1938
2203
  }
1939
2204
  ),
1940
- /* @__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" })
2205
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react12.Gesture, { className: "absolute inset-0 z-0 block h-full w-full", event: "dblpointerup", action: "toggle:fullscreen" })
1941
2206
  ] });
1942
2207
  }