@manifest-editor/shell 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
@@ -602,6 +602,7 @@ var import_react7 = require("react");
602
602
 
603
603
  // src/PreviewContext/PreviewContext.hooks.ts
604
604
  var import_react6 = require("react");
605
+ var import_react_iiif_vault2 = require("react-iiif-vault");
605
606
 
606
607
  // src/PreviewContext/previews/ExternalManifestUrlPreview.ts
607
608
  var ExternalManifestUrlPreview = class {
@@ -775,7 +776,6 @@ var IIIFPreviewService = class {
775
776
  };
776
777
 
777
778
  // src/PreviewContext/PreviewContext.hooks.ts
778
- var import_react_iiif_vault2 = require("react-iiif-vault");
779
779
  function usePreviewActions(state, dispatch, handlers, previews, setPreviews) {
780
780
  const resource = useAppResource();
781
781
  const instanceId = useAppResourceInstance();
@@ -847,8 +847,8 @@ function usePreviewActions(state, dispatch, handlers, previews, setPreviews) {
847
847
  async function selectPreview(id) {
848
848
  const selectedHandler = handlerMap[id];
849
849
  if (selectedHandler && instanceId) {
850
- await activatePreview(id);
851
850
  dispatch({ type: "selectPreview", payload: id });
851
+ await activatePreview(id);
852
852
  }
853
853
  }
854
854
  async function getPreviewLink() {
@@ -900,13 +900,13 @@ function usePreviewActions(state, dispatch, handlers, previews, setPreviews) {
900
900
  dispatch({ type: "activatePreview", payload: contextualPreview.id });
901
901
  } else {
902
902
  Object.assign(context, existing?.data || {});
903
- dispatch({ type: "activatePreview", payload: id });
903
+ dispatch({ type: "activatePreview", payload: existing.id });
904
904
  }
905
905
  }
906
906
  const created = await selectedHandler.createPreview(instanceId, resource, vault, context);
907
907
  if (created) {
908
908
  previewActions.setPreview(created);
909
- dispatch({ type: "activatePreview", payload: id });
909
+ dispatch({ type: "activatePreview", payload: created.id });
910
910
  }
911
911
  }
912
912
  }
@@ -1221,20 +1221,13 @@ var ButtonEmpty = import_styled_components3.default.div`
1221
1221
 
1222
1222
  // src/PreviewButton/PreviewButton.tsx
1223
1223
  var import_jsx_runtime8 = require("react/jsx-runtime");
1224
- function PreviewButton({
1225
- downloadEnabled,
1226
- fileName
1227
- }) {
1224
+ function PreviewButton({ downloadEnabled, fileName }) {
1228
1225
  const { active, configs, actions, selected } = usePreviewContext();
1229
1226
  const vault = (0, import_react_iiif_vault3.useVault)();
1230
1227
  const config = useConfig();
1231
1228
  const resource = useAppResource();
1232
- const configsToShow = configs.filter(
1233
- (c) => c.type === "external-manifest-preview"
1234
- );
1235
- const { isOpen, buttonProps, itemProps } = (0, import_react_accessible_dropdown_menu_hook.default)(
1236
- configsToShow.length
1237
- );
1229
+ const configsToShow = configs.filter((c) => c.type === "external-manifest-preview");
1230
+ const { isOpen, buttonProps, itemProps } = (0, import_react_accessible_dropdown_menu_hook.default)(configsToShow.length);
1238
1231
  if (configsToShow.length === 0) {
1239
1232
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ButtonEmpty, { children: "Preview not available" });
1240
1233
  }
@@ -1246,17 +1239,9 @@ function PreviewButton({
1246
1239
  label: "Download manifest",
1247
1240
  getData: () => {
1248
1241
  if (config.export && config.export.version === 2) {
1249
- return JSON.stringify(
1250
- vault.toPresentation2(resource),
1251
- null,
1252
- 2
1253
- );
1242
+ return JSON.stringify(vault.toPresentation2(resource), null, 2);
1254
1243
  }
1255
- return JSON.stringify(
1256
- vault.toPresentation3(resource),
1257
- null,
1258
- 2
1259
- );
1244
+ return JSON.stringify(vault.toPresentation3(resource), null, 2);
1260
1245
  }
1261
1246
  }
1262
1247
  ) }) : null,
@@ -1271,7 +1256,6 @@ function PreviewButton({
1271
1256
  const found = configs.find((c) => c.id === defaultPreviewId);
1272
1257
  if (found) {
1273
1258
  actions.selectPreview(found.id);
1274
- actions.updatePreviews();
1275
1259
  return;
1276
1260
  }
1277
1261
  }
@@ -1286,29 +1270,17 @@ function PreviewButton({
1286
1270
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MenuContainer, { $open: isOpen, children: configsToShow.map((config2, key) => {
1287
1271
  const inactive = active.indexOf(config2.id) === -1;
1288
1272
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(MenuItem, { ...itemProps[key], children: [
1289
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1290
- MenuItemStatus,
1291
- {
1292
- $status: inactive ? "available" : config2.id === selected ? "active" : "configured"
1293
- }
1294
- ),
1273
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MenuItemStatus, { $status: inactive ? "available" : config2.id === selected ? "active" : "configured" }),
1295
1274
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1296
1275
  MenuItemLabel,
1297
1276
  {
1298
1277
  onClick: () => {
1299
1278
  actions.selectPreview(config2.id);
1300
- actions.updatePreviews();
1301
1279
  },
1302
1280
  children: config2.label
1303
1281
  }
1304
1282
  ),
1305
- !inactive ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1306
- MenuItemClose,
1307
- {
1308
- onClick: () => actions.deletePreview(config2.id),
1309
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CloseIcon, {})
1310
- }
1311
- ) : null
1283
+ !inactive ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MenuItemClose, { onClick: () => actions.deletePreview(config2.id), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CloseIcon, {}) }) : null
1312
1284
  ] }, config2.id);
1313
1285
  }) })
1314
1286
  ] })
@@ -1766,27 +1738,6 @@ function AtlasStoreProvider({
1766
1738
  var import_parser3 = require("@iiif/parser");
1767
1739
  var import_components4 = require("@manifest-editor/components");
1768
1740
  var import_creator_api2 = require("@manifest-editor/creator-api");
1769
-
1770
- // ../ui/madoc/components/icons/Spinner.tsx
1771
- var import_jsx_runtime13 = require("react/jsx-runtime");
1772
- function Spinner(props) {
1773
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { width: "1em", height: "1em", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg", stroke: "#fff", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("g", { transform: "translate(2 2)", strokeWidth: 5, fill: "none", fillRule: "evenodd", children: [
1774
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("circle", { strokeOpacity: 0.5, cx: 18, cy: 18, r: 18 }),
1775
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M36 18c0-9.94-8.06-18-18-18", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1776
- "animateTransform",
1777
- {
1778
- attributeName: "transform",
1779
- type: "rotate",
1780
- from: "0 18 18",
1781
- to: "360 18 18",
1782
- dur: "1s",
1783
- repeatCount: "indefinite"
1784
- }
1785
- ) })
1786
- ] }) });
1787
- }
1788
-
1789
- // src/BaseCreator/BaseCreator.tsx
1790
1741
  var import_react19 = require("react");
1791
1742
  var import_react_iiif_vault7 = require("react-iiif-vault");
1792
1743
 
@@ -1818,11 +1769,11 @@ function useLayoutProvider() {
1818
1769
  var import_styled_components6 = __toESM(require("styled-components"), 1);
1819
1770
 
1820
1771
  // ../ui/icons/StarIcon.tsx
1821
- var import_jsx_runtime14 = require("react/jsx-runtime");
1822
- var StarIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "1em", width: "1em", viewBox: "0 0 24 24", ...props, children: [
1823
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1824
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1825
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1772
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1773
+ var StarIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "1em", width: "1em", viewBox: "0 0 24 24", ...props, children: [
1774
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1775
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1776
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1826
1777
  "path",
1827
1778
  {
1828
1779
  d: "M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",
@@ -1832,10 +1783,10 @@ var StarIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("svg",
1832
1783
  ] });
1833
1784
 
1834
1785
  // ../ui/icons/BackIcon.tsx
1835
- var import_jsx_runtime15 = require("react/jsx-runtime");
1836
- var BackIcon = ({ style }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "1rem", viewBox: "0 0 24 24", width: "1rem", fill: "#000000", style, children: [
1837
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1838
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" })
1786
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1787
+ var BackIcon = ({ style }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "1rem", viewBox: "0 0 24 24", width: "1rem", fill: "#000000", style, children: [
1788
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
1789
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" })
1839
1790
  ] });
1840
1791
 
1841
1792
  // src/Layout/components/ModularPanel.tsx
@@ -1854,13 +1805,13 @@ var PaddedSidebarContainer = import_styled_components4.default.div`
1854
1805
  // src/Layout/components/PanelError.tsx
1855
1806
  var import_components3 = require("@manifest-editor/components");
1856
1807
  var import_react13 = require("react");
1857
- var import_jsx_runtime16 = require("react/jsx-runtime");
1808
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1858
1809
  function PanelError(props) {
1859
1810
  let error = props.error.toString();
1860
1811
  const [isFixing, setIsFixing] = (0, import_react13.useState)(false);
1861
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(PaddedSidebarContainer, { children: [
1862
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components3.ErrorMessage, { className: "mb-2", children: error }),
1863
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CalltoButton, { onClick: props.resetErrorBoundary, children: "Try again" })
1812
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PaddedSidebarContainer, { children: [
1813
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components3.ErrorMessage, { className: "mb-2", children: error }),
1814
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CalltoButton, { onClick: props.resetErrorBoundary, children: "Try again" })
1864
1815
  ] });
1865
1816
  }
1866
1817
 
@@ -1984,7 +1935,7 @@ var import_react_accessible_dropdown_menu_hook2 = __toESM(require("react-accessi
1984
1935
  var OverrideScrollbar = "ModularPanel_OverrideScrollbar";
1985
1936
 
1986
1937
  // src/Layout/components/ModularPanel.tsx
1987
- var import_jsx_runtime17 = require("react/jsx-runtime");
1938
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1988
1939
  var LayoutTitleReactContext = (0, import_react15.createContext)(null);
1989
1940
  function useSetCustomTitle() {
1990
1941
  return (0, import_react15.useContext)(LayoutTitleReactContext);
@@ -2081,7 +2032,7 @@ var ModulePanelButton = import_styled_components6.default.button`
2081
2032
  var ModulePanelSpacer = import_styled_components6.default.div`
2082
2033
  flex: 1 1 0px;
2083
2034
  `;
2084
- var ModularPanelLabel = import_styled_components6.default.h2`
2035
+ var ModularPanelLabel = import_styled_components6.default.div`
2085
2036
  font-size: 0.875em;
2086
2037
  flex: 1 1 0px;
2087
2038
  padding-left: 1em;
@@ -2159,16 +2110,16 @@ function ModularPanel({
2159
2110
  if (!panel || !state.current) {
2160
2111
  return null;
2161
2112
  }
2162
- const backButton = panel.backAction || state.stack.length ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModulePanelButton, { onClick: backAction, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BackIcon, {}) }) : null;
2163
- const closeButton = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModulePanelButton, { onClick: close || actions.close, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CloseIcon, {}) });
2164
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LayoutTitleReactContext.Provider, { value: _setCustomTitle, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(ModularPanelWrapper, { "data-state": transition, "data-flipped": isLeft, style, "data-header": !noHeader, children: [
2165
- noHeader ? null : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(ModularPanelHeader, { "data-tabs": !!tabs, "data-error": didError, children: [
2166
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Dropdown, { style: { display: "flex", height: "100%" }, children: [
2113
+ const backButton = panel.backAction || state.stack.length ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModulePanelButton, { onClick: backAction, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BackIcon, {}) }) : null;
2114
+ const closeButton = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModulePanelButton, { onClick: close || actions.close, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CloseIcon, {}) });
2115
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LayoutTitleReactContext.Provider, { value: _setCustomTitle, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ModularPanelWrapper, { "data-state": transition, "data-flipped": isLeft, style, "data-header": !noHeader, children: [
2116
+ noHeader ? null : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ModularPanelHeader, { "data-tabs": !!tabs, "data-error": didError, children: [
2117
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Dropdown, { style: { display: "flex", height: "100%" }, children: [
2167
2118
  panel.renderBackAction ? panel.renderBackAction({ backAction, fallback: backButton }) : backButton,
2168
- switchablePanels.length ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DropdownMenu, { $open: isOpen, style: { left: "0.5em" }, children: [
2169
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownLabel, { children: "All panels" }),
2170
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownDivider, {}),
2171
- switchablePanels.map((newPanel, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2119
+ switchablePanels.length ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DropdownMenu, { $open: isOpen, style: { left: "0.5em" }, children: [
2120
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownLabel, { children: "All panels" }),
2121
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownDivider, {}),
2122
+ switchablePanels.map((newPanel, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2172
2123
  DropdownItem,
2173
2124
  {
2174
2125
  ...itemProps[i],
@@ -2180,11 +2131,11 @@ function ModularPanel({
2180
2131
  ))
2181
2132
  ] }) : null
2182
2133
  ] }),
2183
- customTitle ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModularPanelLabel, { children: customTitle }) : hideHeader ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModulePanelSpacer, {}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModularPanelLabel, { children: panel.label }),
2184
- pinnable ? state.pinned ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModulePanelButton, { onClick: pinActions.unpin, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StarIcon, { fill: "orange" }) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModulePanelButton, { onClick: () => pinActions.pin({ id: panel.id, state: state.state }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StarIcon, { fill: "#ddd" }) }) : null,
2134
+ customTitle ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModularPanelLabel, { children: customTitle }) : hideHeader ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModulePanelSpacer, {}) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModularPanelLabel, { children: panel.label }),
2135
+ pinnable ? state.pinned ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModulePanelButton, { onClick: pinActions.unpin, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StarIcon, { fill: "orange" }) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModulePanelButton, { onClick: () => pinActions.pin({ id: panel.id, state: state.state }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StarIcon, { fill: "#ddd" }) }) : null,
2185
2136
  panel.renderCloseAction ? panel.renderCloseAction({ closeAction: close || actions.close, fallback: closeButton }) : closeButton
2186
2137
  ] }),
2187
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModularPanelContent, { className: OverrideScrollbar, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2138
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModularPanelContent, { className: OverrideScrollbar, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2188
2139
  import_react_error_boundary.ErrorBoundary,
2189
2140
  {
2190
2141
  onError: () => setDidError(true),
@@ -2241,15 +2192,13 @@ function createDownload(data, fileName, fileType = "text/json") {
2241
2192
  a.remove();
2242
2193
  }
2243
2194
  async function copyToClipboard(json) {
2244
- return navigator.clipboard.writeText(
2245
- typeof json === "string" ? json : JSON.stringify(json, null, 2)
2246
- );
2195
+ return navigator.clipboard.writeText(typeof json === "string" ? json : JSON.stringify(json, null, 2));
2247
2196
  }
2248
2197
  function randomId() {
2249
2198
  return `${Math.random().toString(36).substr(2)}-${Date.now().toString(36)}`;
2250
2199
  }
2251
2200
  function mapApp(input, map) {
2252
- const { default: metadata, ...props } = input;
2201
+ const { default: metadata, config, ...props } = input;
2253
2202
  const app = {
2254
2203
  metadata,
2255
2204
  layout: {
@@ -2257,7 +2206,8 @@ function mapApp(input, map) {
2257
2206
  rightPanels: [],
2258
2207
  centerPanels: [],
2259
2208
  ...props
2260
- }
2209
+ },
2210
+ config
2261
2211
  };
2262
2212
  return map ? map(app) : app;
2263
2213
  }
@@ -2280,35 +2230,17 @@ function extendApp(app, metadata, extensions) {
2280
2230
  }),
2281
2231
  ...extensions?.leftPanels || []
2282
2232
  ],
2283
- annotations: [
2284
- ...extensions?.annotations || [],
2285
- ...app.layout.annotations || []
2286
- ],
2287
- canvasEditors: [
2288
- ...extensions?.canvasEditors || [],
2289
- ...app.layout.canvasEditors || []
2290
- ],
2291
- creators: [
2292
- ...extensions?.creators || [],
2293
- ...app.layout.creators || []
2294
- ],
2233
+ annotations: [...extensions?.annotations || [], ...app.layout.annotations || []],
2234
+ canvasEditors: [...extensions?.canvasEditors || [], ...app.layout.canvasEditors || []],
2235
+ creators: [...extensions?.creators || [], ...app.layout.creators || []],
2295
2236
  editors: [
2296
2237
  //
2297
2238
  ...extensions?.editors || [],
2298
2239
  ...app.layout.editors || []
2299
2240
  ],
2300
- rightPanels: [
2301
- ...app.layout.rightPanels || [],
2302
- ...extensions?.rightPanels || []
2303
- ],
2304
- centerPanels: [
2305
- ...app.layout.centerPanels || [],
2306
- ...extensions?.centerPanels || []
2307
- ],
2308
- modals: [
2309
- ...app.layout.modals || [],
2310
- ...extensions?.modalPanels || []
2311
- ]
2241
+ rightPanels: [...app.layout.rightPanels || [], ...extensions?.rightPanels || []],
2242
+ centerPanels: [...app.layout.centerPanels || [], ...extensions?.centerPanels || []],
2243
+ modals: [...app.layout.modals || [], ...extensions?.modalPanels || []]
2312
2244
  }
2313
2245
  };
2314
2246
  }
@@ -2475,7 +2407,7 @@ function createPreviewVault(homepageCollectionId = "vault://homepage-collection.
2475
2407
  }
2476
2408
 
2477
2409
  // src/PreviewVault/PreviewVault.tsx
2478
- var import_jsx_runtime18 = require("react/jsx-runtime");
2410
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2479
2411
  function usePreviewVault() {
2480
2412
  return (0, import_react17.useContext)(PreviewVaultReactContext);
2481
2413
  }
@@ -2497,11 +2429,11 @@ function PreviewVaultContext(props) {
2497
2429
  (0, import_react17.useEffect)(() => {
2498
2430
  return unsubscribe;
2499
2431
  }, []);
2500
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PreviewVaultAddHistory.Provider, { value: { addHistory, clearHistory }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PreviewVaultReactContext.Provider, { value: vault, children: props.children }) });
2432
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PreviewVaultAddHistory.Provider, { value: { addHistory, clearHistory }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PreviewVaultReactContext.Provider, { value: vault, children: props.children }) });
2501
2433
  }
2502
2434
  function PreviewVaultBoundary({ children }) {
2503
2435
  const vault = usePreviewVault();
2504
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_iiif_vault5.VaultProvider, { vault, children });
2436
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_iiif_vault5.VaultProvider, { vault, children });
2505
2437
  }
2506
2438
 
2507
2439
  // src/BaseCreator/BaseCreator.hooks.tsx
@@ -2602,11 +2534,12 @@ function useInlineCreator() {
2602
2534
  }
2603
2535
 
2604
2536
  // src/BaseCreator/BaseCreator.tsx
2605
- var import_jsx_runtime19 = require("react/jsx-runtime");
2537
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2606
2538
  var RenderCreator = (0, import_react19.memo)(function RenderCreator2(props) {
2607
2539
  const vault = (0, import_react_iiif_vault7.useVault)();
2608
2540
  const { edit, modal } = useLayoutActions();
2609
2541
  const [isCreating, setIsCreating] = (0, import_react19.useState)(false);
2542
+ const [error, setError] = (0, import_react19.useState)(null);
2610
2543
  const creator = useInlineCreator();
2611
2544
  const isCreatingRef = (0, import_react19.useRef)(false);
2612
2545
  const canvasSelector = props.resource.initialData?.selector;
@@ -2622,18 +2555,32 @@ var RenderCreator = (0, import_react19.memo)(function RenderCreator2(props) {
2622
2555
  initialData: props.resource.initialData
2623
2556
  };
2624
2557
  const runCreate = (payload) => {
2625
- if (isCreating || isCreatingRef.current)
2626
- return;
2627
- setIsCreating(true);
2628
- isCreatingRef.current = true;
2629
- creator.create(props.creator.id, payload, options).then((ref) => {
2630
- modal.popStack();
2631
- edit(ref, {
2632
- parent: (0, import_parser3.toRef)(props.resource.parent),
2633
- property: props.resource.property,
2634
- index: props.resource.index
2558
+ try {
2559
+ if (isCreating || isCreatingRef.current)
2560
+ return;
2561
+ setIsCreating(true);
2562
+ isCreatingRef.current = true;
2563
+ creator.create(props.creator.id, payload, options).catch((err) => {
2564
+ setError(err?.message || "Unknown error");
2565
+ return null;
2566
+ }).then(async (ref) => {
2567
+ if (!ref)
2568
+ return;
2569
+ const singleRef = Array.isArray(ref) ? ref[0] : ref;
2570
+ setIsCreating(false);
2571
+ modal.popStack();
2572
+ modal.close();
2573
+ if (singleRef) {
2574
+ edit(singleRef, {
2575
+ parent: (0, import_parser3.toRef)(props.resource.parent),
2576
+ property: props.resource.property,
2577
+ index: props.resource.index
2578
+ });
2579
+ }
2635
2580
  });
2636
- });
2581
+ } catch (err) {
2582
+ setError(err?.message || "Unknown error");
2583
+ }
2637
2584
  };
2638
2585
  const validate = async () => {
2639
2586
  return true;
@@ -2643,19 +2590,21 @@ var RenderCreator = (0, import_react19.memo)(function RenderCreator2(props) {
2643
2590
  runCreate({});
2644
2591
  }
2645
2592
  }, [props.creator]);
2646
- (0, import_react19.useEffect)(() => {
2647
- if (isCreating) {
2648
- modal.popStack();
2649
- modal.close();
2650
- }
2651
- });
2593
+ if (error) {
2594
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-col items-center p-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components4.ErrorMessage, { children: error }) });
2595
+ }
2596
+ const spinner = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-col items-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-2 items-center", children: [
2597
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components4.Spinner, {}),
2598
+ " ",
2599
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Loading" })
2600
+ ] }) });
2652
2601
  if (isCreating) {
2653
- return null;
2602
+ return spinner;
2654
2603
  }
2655
2604
  if (!props.creator.render) {
2656
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { onClick: () => runCreate({}), children: "Create" }) });
2605
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onClick: () => runCreate({}), children: "Create" }) });
2657
2606
  }
2658
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Spinner, {}), children: props.creator.render({
2607
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react19.Suspense, { fallback: spinner, children: props.creator.render({
2659
2608
  vault,
2660
2609
  runCreate,
2661
2610
  validate,
@@ -2665,9 +2614,7 @@ var RenderCreator = (0, import_react19.memo)(function RenderCreator2(props) {
2665
2614
  function BaseCreator(props) {
2666
2615
  const app = useApp();
2667
2616
  const vault = (0, import_react_iiif_vault7.useVault)();
2668
- const [currentId, setCurrentId] = (0, import_react19.useState)(
2669
- props.resource.initialCreator || ""
2670
- );
2617
+ const [currentId, setCurrentId] = (0, import_react19.useState)(props.resource.initialCreator || "");
2671
2618
  const set = useSetCustomTitle();
2672
2619
  const supported = (0, import_react19.useMemo)(
2673
2620
  () => (0, import_creator_api2.matchBasedOnResource)(props.resource, app.layout.creators || [], {
@@ -2685,19 +2632,33 @@ function BaseCreator(props) {
2685
2632
  }
2686
2633
  });
2687
2634
  if (supported.length === 0) {
2688
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: "Not currently supported" });
2635
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: "Not currently supported" });
2689
2636
  }
2637
+ const backButton = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components4.ModalBackSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2638
+ import_components4.IconButton,
2639
+ {
2640
+ root: document.getElementById("headlessui-portal-root") || void 0,
2641
+ label: "Back to Add content options",
2642
+ className: "group",
2643
+ placement: "right",
2644
+ onPress: () => setCurrentId(""),
2645
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components4.GridIcon, { className: "text-2xl opacity-50 group-hover:opacity-70" })
2646
+ }
2647
+ ) });
2690
2648
  if (current) {
2691
2649
  const shouldHideModal = current.hiddenModal;
2692
2650
  if (shouldHideModal) {
2693
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RenderCreator, { creator: current, resource: props.resource });
2694
- }
2695
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
2696
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "bg-me-gray-100 p-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { onClick: () => setCurrentId(""), children: "Back" }) }),
2697
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "p-2 py-6", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RenderCreator, { creator: current, resource: props.resource }) })
2651
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
2652
+ backButton,
2653
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RenderCreator, { creator: current, resource: props.resource })
2654
+ ] });
2655
+ }
2656
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
2657
+ backButton,
2658
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "p-2 py-6", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RenderCreator, { creator: current, resource: props.resource }) })
2698
2659
  ] });
2699
2660
  }
2700
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2661
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2701
2662
  import_components4.CreatorGrid,
2702
2663
  {
2703
2664
  label: "Select a type",
@@ -2713,13 +2674,13 @@ function BaseCreator(props) {
2713
2674
  }
2714
2675
 
2715
2676
  // src/BaseCreator/index.tsx
2716
- var import_jsx_runtime20 = require("react/jsx-runtime");
2677
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2717
2678
  var baseCreator = {
2718
2679
  id: "@manifest-editor/creator",
2719
2680
  label: "Add content",
2720
2681
  options: { hideHeader: true, tabs: false },
2721
2682
  render(state) {
2722
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BaseCreator, { resource: state });
2683
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BaseCreator, { resource: state });
2723
2684
  }
2724
2685
  };
2725
2686
 
@@ -2826,7 +2787,7 @@ function filterStack(newStackWithDuplicates, current) {
2826
2787
  var import_editor_api = require("@manifest-editor/editor-api");
2827
2788
  var import_react_iiif_vault8 = require("react-iiif-vault");
2828
2789
  var import_parser5 = require("@iiif/parser");
2829
- var import_jsx_runtime21 = require("react/jsx-runtime");
2790
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2830
2791
  var defaultState = { stack: [], current: null, create: null };
2831
2792
  var EditingStackContext = (0, import_react20.createContext)(defaultState);
2832
2793
  var EditingStackActionsContext = (0, import_react20.createContext)({
@@ -2966,16 +2927,16 @@ function EditingStack(props) {
2966
2927
  return { edit, updateCurrent, close, back, create: create2 };
2967
2928
  }, []);
2968
2929
  const { instanceId } = useAppInstance();
2969
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(EditingStackActionsContext.Provider, { value: actions, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(EditingStackContext.Provider, { value: state, children: props.children }) }, instanceId);
2930
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EditingStackActionsContext.Provider, { value: actions, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EditingStackContext.Provider, { value: state, children: props.children }) }, instanceId);
2970
2931
  }
2971
2932
 
2972
2933
  // src/BaseEditor/BaseEditor.tsx
2973
- var import_jsx_runtime22 = require("react/jsx-runtime");
2934
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2974
2935
  function BaseEditorBackButton({ fallback, backAction }) {
2975
2936
  const stack = useEditingResourceStack();
2976
2937
  const { back } = useEditingStack();
2977
2938
  if (stack.length) {
2978
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ModulePanelButton, { onClick: back, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BackIcon, {}) });
2939
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ModulePanelButton, { onClick: back, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(BackIcon, {}) });
2979
2940
  }
2980
2941
  return fallback;
2981
2942
  }
@@ -2983,22 +2944,20 @@ function BaseEditorCloseButton({ closeAction, fallback }) {
2983
2944
  const stack = useEditingResourceStack();
2984
2945
  const current = useEditingResource();
2985
2946
  if (current || stack.length) {
2986
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2947
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2987
2948
  ModulePanelButton,
2988
2949
  {
2989
2950
  onClick: () => {
2990
2951
  closeAction();
2991
2952
  },
2992
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CloseIcon, {})
2953
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CloseIcon, {})
2993
2954
  }
2994
2955
  );
2995
2956
  }
2996
2957
  return fallback;
2997
2958
  }
2998
2959
  function editBasedOnResource(resource, list, options, config) {
2999
- const filteredList = list.filter(
3000
- (l) => l.resourceType === resource.resource.source.type
3001
- );
2960
+ const filteredList = list.filter((l) => l.resourceType === resource.resource.source.type);
3002
2961
  if (filteredList.length === 0) {
3003
2962
  return null;
3004
2963
  }
@@ -3046,9 +3005,7 @@ function editBasedOnResource(resource, list, options, config) {
3046
3005
  }
3047
3006
  return null;
3048
3007
  }
3049
- function BaseEditor({
3050
- currentTab = void 0
3051
- }) {
3008
+ function BaseEditor({ currentTab = void 0 }) {
3052
3009
  const resource = useEditingResource();
3053
3010
  const currentResourceContext = (0, import_react21.useContext)(import_react_iiif_vault9.ResourceReactContext);
3054
3011
  const app = useApp();
@@ -3078,7 +3035,7 @@ function BaseEditor({
3078
3035
  if (!resource) {
3079
3036
  return children;
3080
3037
  }
3081
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_iiif_vault9.ResourceReactContext.Provider, { value: newResourceContext, children });
3038
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_iiif_vault9.ResourceReactContext.Provider, { value: newResourceContext, children });
3082
3039
  }
3083
3040
  const match = (0, import_react21.useMemo)(() => {
3084
3041
  if (!resource) {
@@ -3086,28 +3043,19 @@ function BaseEditor({
3086
3043
  }
3087
3044
  const editors = app.layout.editors || [];
3088
3045
  const resources = app.layout.resources || [];
3089
- const mappedResources = resources.map(
3090
- (resource2) => {
3091
- if (typeof resource2 === "string") {
3092
- return {
3093
- id: "@default/" + resource2,
3094
- label: resource2,
3095
- resourceType: resource2,
3096
- auto: true,
3097
- editors: editors.filter(
3098
- (e) => e.supports.resourceTypes.includes(resource2)
3099
- )
3100
- };
3101
- }
3102
- return resource2;
3046
+ const mappedResources = resources.map((resource2) => {
3047
+ if (typeof resource2 === "string") {
3048
+ return {
3049
+ id: "@default/" + resource2,
3050
+ label: resource2,
3051
+ resourceType: resource2,
3052
+ auto: true,
3053
+ editors: editors.filter((e) => e.supports.resourceTypes.includes(resource2))
3054
+ };
3103
3055
  }
3104
- );
3105
- return editBasedOnResource(
3106
- resource,
3107
- mappedResources,
3108
- { edit: true, vault },
3109
- resourceConfig
3110
- );
3056
+ return resource2;
3057
+ });
3058
+ return editBasedOnResource(resource, mappedResources, { edit: true, vault }, resourceConfig);
3111
3059
  }, [resource, app]);
3112
3060
  (0, import_react21.useEffect)(() => {
3113
3061
  set(match?.label || "");
@@ -3123,17 +3071,15 @@ function BaseEditor({
3123
3071
  return null;
3124
3072
  }
3125
3073
  if (resourceConfig.singleTab) {
3126
- const first = (match?.editors || []).find(
3127
- (editor) => editor.id === resourceConfig.singleTab
3128
- );
3074
+ const first = (match?.editors || []).find((editor) => editor.id === resourceConfig.singleTab);
3129
3075
  if (first) {
3130
3076
  return wrap(
3131
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "w-full", children: first.component(resourceConfig) })
3077
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-full", children: first.component(resourceConfig) }, resource.resource.source?.id)
3132
3078
  );
3133
3079
  }
3134
3080
  }
3135
3081
  return wrap(
3136
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3082
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3137
3083
  import_components5.SidebarTabs,
3138
3084
  {
3139
3085
  menuId: resource.resource.source.id,
@@ -3155,15 +3101,15 @@ function BaseEditor({
3155
3101
  }
3156
3102
 
3157
3103
  // src/BaseEditor/index.tsx
3158
- var import_jsx_runtime23 = require("react/jsx-runtime");
3104
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3159
3105
  var baseEditor = {
3160
3106
  id: "@manifest-editor/editor",
3161
3107
  label: "Editor",
3162
3108
  options: { hideHeader: true, tabs: true, minWidth: 400 },
3163
- renderBackAction: ({ backAction, fallback }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BaseEditorBackButton, { backAction, fallback }),
3164
- renderCloseAction: ({ closeAction, fallback }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BaseEditorCloseButton, { closeAction, fallback }),
3109
+ renderBackAction: ({ backAction, fallback }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BaseEditorBackButton, { backAction, fallback }),
3110
+ renderCloseAction: ({ closeAction, fallback }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BaseEditorCloseButton, { closeAction, fallback }),
3165
3111
  render({ currentTab }) {
3166
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BaseEditor, { currentTab });
3112
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BaseEditor, { currentTab });
3167
3113
  }
3168
3114
  };
3169
3115
 
@@ -3200,9 +3146,10 @@ function useDecayState(time) {
3200
3146
  }
3201
3147
 
3202
3148
  // src/ConfigContext/ConfigEditor.tsx
3203
- var import_jsx_runtime24 = require("react/jsx-runtime");
3149
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3204
3150
  function ConfigEditor() {
3205
3151
  const previews = usePreviewContext();
3152
+ const resource = useAppResource();
3206
3153
  const config = useConfig();
3207
3154
  const setConfig = useSaveConfig();
3208
3155
  const [isSaved, saveState] = useDecayState(2e3);
@@ -3227,13 +3174,13 @@ function ConfigEditor() {
3227
3174
  saveState.set();
3228
3175
  saveState.clear();
3229
3176
  }
3230
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Sidebar, { children: [
3231
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.SidebarHeader, { title: "Workspace configuration" }),
3232
- isSaved ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "bg-me-primary-500 text-white p-3 text-sm", children: "Changes saved" }) : null,
3233
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.SidebarContent, { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Form.Form, { onSubmit, className: "flex flex-col gap-3", children: [
3234
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Form.InputContainer, { children: [
3235
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.Form.Label, { htmlFor: "defaultLanguage", children: "Default Language" }),
3236
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3177
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Sidebar, { children: [
3178
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components6.SidebarHeader, { title: "Workspace configuration" }),
3179
+ isSaved ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "bg-me-primary-500 text-white p-3 text-sm", children: "Changes saved" }) : null,
3180
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components6.SidebarContent, { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.Form, { onSubmit, className: "flex flex-col gap-3", children: [
3181
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.InputContainer, { children: [
3182
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components6.Form.Label, { htmlFor: "defaultLanguage", children: "Default Language" }),
3183
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3237
3184
  import_components6.Form.Input,
3238
3185
  {
3239
3186
  type: "text",
@@ -3243,9 +3190,9 @@ function ConfigEditor() {
3243
3190
  }
3244
3191
  )
3245
3192
  ] }),
3246
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Form.InputContainer, { children: [
3247
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.Form.Label, { htmlFor: "availableLanguages", children: "Available Languages" }),
3248
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3193
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.InputContainer, { children: [
3194
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components6.Form.Label, { htmlFor: "availableLanguages", children: "Available Languages" }),
3195
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3249
3196
  import_components6.Form.Input,
3250
3197
  {
3251
3198
  type: "text",
@@ -3255,8 +3202,8 @@ function ConfigEditor() {
3255
3202
  }
3256
3203
  )
3257
3204
  ] }),
3258
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Form.InputContainer, { horizontal: true, className: "my-3", children: [
3259
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3205
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.InputContainer, { horizontal: true, className: "my-3", children: [
3206
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3260
3207
  import_components6.Form.Input,
3261
3208
  {
3262
3209
  type: "checkbox",
@@ -3265,10 +3212,10 @@ function ConfigEditor() {
3265
3212
  defaultChecked: config.i18n?.advancedLanguageMode || false
3266
3213
  }
3267
3214
  ),
3268
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.Form.Label, { htmlFor: "advancedLanguageMode", children: "Advanced Language Mode" })
3215
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components6.Form.Label, { htmlFor: "advancedLanguageMode", children: "Advanced Language Mode" })
3269
3216
  ] }),
3270
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Form.InputContainer, { horizontal: true, className: "my-3", children: [
3271
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3217
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.InputContainer, { horizontal: true, className: "my-3", children: [
3218
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3272
3219
  import_components6.Form.Input,
3273
3220
  {
3274
3221
  type: "checkbox",
@@ -3277,10 +3224,10 @@ function ConfigEditor() {
3277
3224
  defaultChecked: config.i18n?.textGranularityEnabled || false
3278
3225
  }
3279
3226
  ),
3280
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.Form.Label, { htmlFor: "textGranularityEnabled", children: "Enable text granularity" })
3227
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components6.Form.Label, { htmlFor: "textGranularityEnabled", children: "Enable text granularity" })
3281
3228
  ] }),
3282
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Form.InputContainer, { horizontal: true, className: "my-3", children: [
3283
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3229
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.InputContainer, { horizontal: true, className: "my-3", children: [
3230
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3284
3231
  import_components6.Form.Input,
3285
3232
  {
3286
3233
  type: "checkbox",
@@ -3289,16 +3236,20 @@ function ConfigEditor() {
3289
3236
  defaultChecked: config.export?.version === 2
3290
3237
  }
3291
3238
  ),
3292
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.Form.Label, { htmlFor: "isVersion2", children: "Export Presentation 2 Manifests" })
3239
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.Label, { htmlFor: "isVersion2", children: [
3240
+ "Export Presentation 2 ",
3241
+ resource.type,
3242
+ "s"
3243
+ ] })
3293
3244
  ] }),
3294
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Form.InputContainer, { children: [
3295
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.Form.Label, { htmlFor: "defaultPreview", children: "Default preview" }),
3296
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: previews.configs.map((preview, key) => {
3245
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.InputContainer, { children: [
3246
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components6.Form.Label, { htmlFor: "defaultPreview", children: "Default preview" }),
3247
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: previews.configs.map((preview, key) => {
3297
3248
  if (preview.type === "iiif-preview-service") {
3298
3249
  return null;
3299
3250
  }
3300
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components6.Form.InputContainer, { horizontal: true, children: [
3301
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3251
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_components6.Form.InputContainer, { horizontal: true, children: [
3252
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3302
3253
  import_components6.Form.Input,
3303
3254
  {
3304
3255
  type: "radio",
@@ -3308,19 +3259,19 @@ function ConfigEditor() {
3308
3259
  defaultChecked: !config.defaultPreview ? key === 0 : config.defaultPreview === preview.id
3309
3260
  }
3310
3261
  ),
3311
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("label", { htmlFor: preview.id, children: preview.label })
3262
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: preview.id, children: preview.label })
3312
3263
  ] }, preview.id);
3313
3264
  }) })
3314
3265
  ] }),
3315
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3266
+ resource.type === "Manifest" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3316
3267
  "a",
3317
3268
  {
3318
3269
  className: "text-sm text-me-primary-500 hover:underline hover:text-me-primary-600",
3319
3270
  href: window.location.pathname.includes("/exhibition") ? window.location.pathname.replace("/exhibition", "") || "/" : `${window.location.pathname}/exhibition`,
3320
3271
  children: window.location.pathname.includes("/exhibition") ? "Return to Manifest Editor" : "Go to Exhibition Editor"
3321
3272
  }
3322
- ),
3323
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mt-5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components6.ActionButton, { type: "submit", children: "Save changes" }) })
3273
+ ) : null,
3274
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mt-5", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components6.ActionButton, { type: "submit", children: "Save changes" }) })
3324
3275
  ] }) })
3325
3276
  ] });
3326
3277
  }
@@ -3338,12 +3289,12 @@ var CenterPanelContainer_default = {
3338
3289
  };
3339
3290
 
3340
3291
  // ../ui/ui/CenterPanelContainer/CenterPanelContainer.tsx
3341
- var import_jsx_runtime25 = require("react/jsx-runtime");
3292
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3342
3293
  function CenterPanelContainer(props) {
3343
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: CenterPanelContainer_default.CenterPanelContainer, children: [
3344
- props.title || props.close ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: CenterPanelContainer_default.CenterPanelHeader, children: [
3345
- props.title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: CenterPanelContainer_default.CenterPanelTitle, children: props.title }) : null,
3346
- props.close ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button, { className: CenterPanelContainer_default.CenterPanelClose, onClick: props.close, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CloseIcon, {}) }) : null
3294
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: CenterPanelContainer_default.CenterPanelContainer, children: [
3295
+ props.title || props.close ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: CenterPanelContainer_default.CenterPanelHeader, children: [
3296
+ props.title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: CenterPanelContainer_default.CenterPanelTitle, children: props.title }) : null,
3297
+ props.close ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { className: CenterPanelContainer_default.CenterPanelClose, onClick: props.close, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CloseIcon, {}) }) : null
3347
3298
  ] }) : null,
3348
3299
  props.children
3349
3300
  ] });
@@ -3352,7 +3303,7 @@ function CenterPanelContainer(props) {
3352
3303
  // ../ui/atoms/Accordion.tsx
3353
3304
  var import_styled_components7 = __toESM(require("styled-components"), 1);
3354
3305
  var import_react23 = require("react");
3355
- var import_jsx_runtime26 = require("react/jsx-runtime");
3306
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3356
3307
  var AccordionContainer = import_styled_components7.default.div`
3357
3308
  flex: 1;
3358
3309
  display: flex;
@@ -3707,16 +3658,16 @@ var AccordionItem = (0, import_react23.forwardRef)(function AccordionItem2(props
3707
3658
  setScrolled(false);
3708
3659
  }
3709
3660
  };
3710
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ItemRow, { "data-large": props.large, "data-open": open, children: [
3711
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ItemHeading, { "data-open": open, children: [
3712
- props.icon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ItemIcon, { onClick: toggle, children: props.icon }) : null,
3713
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ItemLabel, { ref: btn, onClick: toggle, "aria-expanded": open, "aria-controls": `accordion-${id}`, children: [
3661
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ItemRow, { "data-large": props.large, "data-open": open, children: [
3662
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ItemHeading, { "data-open": open, children: [
3663
+ props.icon ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ItemIcon, { onClick: toggle, children: props.icon }) : null,
3664
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ItemLabel, { ref: btn, onClick: toggle, "aria-expanded": open, "aria-controls": `accordion-${id}`, children: [
3714
3665
  props.label,
3715
- props.description ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ItemDescription, { children: props.description }) : null
3666
+ props.description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ItemDescription, { children: props.description }) : null
3716
3667
  ] }),
3717
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ItemCollapse, { onClick: toggle, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DownIcon, { width: "1em", height: "1em", rotate: open ? 0 : 180 }) })
3668
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ItemCollapse, { onClick: toggle, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DownIcon, { width: "1em", height: "1em", rotate: open ? 0 : 180 }) })
3718
3669
  ] }),
3719
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3670
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3720
3671
  ItemBody,
3721
3672
  {
3722
3673
  "aria-labelledby": `accordion-${id}`,
@@ -3728,7 +3679,7 @@ var AccordionItem = (0, import_react23.forwardRef)(function AccordionItem2(props
3728
3679
  $initial: !open,
3729
3680
  "data-scrolled": scrolled,
3730
3681
  hidden: !open,
3731
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ItemBodyInner, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3682
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ItemBodyInner, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3732
3683
  ItemBodyPadding,
3733
3684
  {
3734
3685
  "data-max-height": !!maxHeight,
@@ -3743,13 +3694,13 @@ var AccordionItem = (0, import_react23.forwardRef)(function AccordionItem2(props
3743
3694
  });
3744
3695
  function Accordion(props) {
3745
3696
  const { getItemProps, onKeyDown } = useAccordionItems(props.items.length, props.singleMode);
3746
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AccordionContainer, { onKeyDown, children: props.items.map((item, key) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AccordionItem, { overflow: props.overflow, maxHeight: props.maxHeight, ...item, ...getItemProps(key), children: item.children }, key)) });
3697
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AccordionContainer, { onKeyDown, children: props.items.map((item, key) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AccordionItem, { overflow: props.overflow, maxHeight: props.maxHeight, ...item, ...getItemProps(key), children: item.children }, key)) });
3747
3698
  }
3748
3699
 
3749
3700
  // ../ui/icons/DownloadIcon.tsx
3750
- var import_jsx_runtime27 = require("react/jsx-runtime");
3701
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3751
3702
  function DownloadIcon() {
3752
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "48", viewBox: "0 -960 960 960", width: "48", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { d: "M220-160q-24 0-42-18t-18-42v-143h60v143h520v-143h60v143q0 24-18 42t-42 18H220Zm260-153L287-506l43-43 120 120v-371h60v371l120-120 43 43-193 193Z" }) });
3703
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "48", viewBox: "0 -960 960 960", width: "48", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M220-160q-24 0-42-18t-18-42v-143h60v143h520v-143h60v143q0 24-18 42t-42 18H220Zm260-153L287-506l43-43 120 120v-371h60v371l120-120 43 43-193 193Z" }) });
3753
3704
  }
3754
3705
 
3755
3706
  // ../ui/atoms/ButtonRow.tsx
@@ -3779,7 +3730,7 @@ var ButtonRow = import_styled_components8.default.div`
3779
3730
  `;
3780
3731
 
3781
3732
  // src/ExportPanel/ExportPanel.tsx
3782
- var import_jsx_runtime28 = require("react/jsx-runtime");
3733
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3783
3734
  function ExportPanel(props) {
3784
3735
  const manifest = (0, import_react_iiif_vault10.useManifest)();
3785
3736
  const vault = (0, import_react_iiif_vault10.useVault)();
@@ -3790,7 +3741,7 @@ function ExportPanel(props) {
3790
3741
  const version2 = (0, import_react24.useMemo)(() => {
3791
3742
  return JSON.stringify(vault.toPresentation2(manifest), null, 2);
3792
3743
  }, [manifest, vault]);
3793
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CenterPanelContainer, { title: "Export manifest", close: actions.centerPanel.popStack, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { flex: 1, overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3744
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CenterPanelContainer, { title: "Export manifest", close: actions.centerPanel.popStack, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { flex: 1, overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3794
3745
  Accordion,
3795
3746
  {
3796
3747
  items: [
@@ -3801,12 +3752,12 @@ function ExportPanel(props) {
3801
3752
  large: true,
3802
3753
  initialOpen: true,
3803
3754
  overflow: true,
3804
- icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { onClick: () => createDownload(version3, "manifest.json"), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DownloadIcon, {}) }),
3805
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { maxWidth: "100%" }, children: [
3806
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("pre", { style: { whiteSpace: "pre-wrap" }, children: JSON.stringify(vault.toPresentation3(manifest), null, 2) }),
3807
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ButtonRow, { "data-sticky": "true", children: [
3808
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { onClick: () => copyToClipboard(version3), children: "Copy to clipboard" }),
3809
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { onClick: () => createDownload(version3, "manifest.json"), children: "Download" })
3755
+ icon: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { onClick: () => createDownload(version3, "manifest.json"), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DownloadIcon, {}) }),
3756
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { maxWidth: "100%" }, children: [
3757
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("pre", { style: { whiteSpace: "pre-wrap" }, children: JSON.stringify(vault.toPresentation3(manifest), null, 2) }),
3758
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ButtonRow, { "data-sticky": "true", children: [
3759
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { onClick: () => copyToClipboard(version3), children: "Copy to clipboard" }),
3760
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { onClick: () => createDownload(version3, "manifest.json"), children: "Download" })
3810
3761
  ] })
3811
3762
  ] })
3812
3763
  },
@@ -3815,12 +3766,12 @@ function ExportPanel(props) {
3815
3766
  description: 'Download this version by clicking the "Download" button.',
3816
3767
  maxHeight: 400,
3817
3768
  large: true,
3818
- icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { onClick: () => createDownload(version2, "manifest.json"), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DownloadIcon, {}) }),
3819
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { maxWidth: "100%" }, children: [
3820
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("pre", { style: { whiteSpace: "pre-wrap" }, children: JSON.stringify(vault.toPresentation2(manifest), null, 2) }),
3821
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ButtonRow, { "data-sticky": "true", children: [
3822
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { onClick: () => copyToClipboard(version2), children: "Copy to clipboard" }),
3823
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { onClick: () => createDownload(version2, "manifest.json"), children: "Download" })
3769
+ icon: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { onClick: () => createDownload(version2, "manifest.json"), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DownloadIcon, {}) }),
3770
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { maxWidth: "100%" }, children: [
3771
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("pre", { style: { whiteSpace: "pre-wrap" }, children: JSON.stringify(vault.toPresentation2(manifest), null, 2) }),
3772
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ButtonRow, { "data-sticky": "true", children: [
3773
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { onClick: () => copyToClipboard(version2), children: "Copy to clipboard" }),
3774
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { onClick: () => createDownload(version2, "manifest.json"), children: "Download" })
3824
3775
  ] })
3825
3776
  ] })
3826
3777
  }
@@ -3832,6 +3783,36 @@ function ExportPanel(props) {
3832
3783
  // src/Layout/Layout.tsx
3833
3784
  var import_components7 = require("@manifest-editor/components");
3834
3785
 
3786
+ // ../ui/madoc/components/icons/Spinner.tsx
3787
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3788
+ function Spinner2(props) {
3789
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3790
+ "svg",
3791
+ {
3792
+ width: "1em",
3793
+ height: "1em",
3794
+ viewBox: "0 0 42 42",
3795
+ xmlns: "http://www.w3.org/2000/svg",
3796
+ stroke: "currentColor",
3797
+ ...props,
3798
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { transform: "translate(2 2)", strokeWidth: 5, fill: "none", fillRule: "evenodd", children: [
3799
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("circle", { strokeOpacity: 0.5, cx: 18, cy: 18, r: 18 }),
3800
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { d: "M36 18c0-9.94-8.06-18-18-18", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3801
+ "animateTransform",
3802
+ {
3803
+ attributeName: "transform",
3804
+ type: "rotate",
3805
+ from: "0 18 18",
3806
+ to: "360 18 18",
3807
+ dur: "1s",
3808
+ repeatCount: "indefinite"
3809
+ }
3810
+ ) })
3811
+ ] })
3812
+ }
3813
+ );
3814
+ }
3815
+
3835
3816
  // ../ui/ui/GhostBlocks/GhostBlocks.module.css
3836
3817
  var GhostBlocks_default = {
3837
3818
  ghostLoadingBlock: "GhostBlocks_ghostLoadingBlock",
@@ -4661,7 +4642,7 @@ var Layout = (0, import_react29.memo)(function Layout2(props) {
4661
4642
  justifyContent: "center",
4662
4643
  alignItems: "center"
4663
4644
  },
4664
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Spinner, { stroke: "rgba(0,0,0,.3)", fontSize: "2em" })
4645
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Spinner2, { stroke: "rgba(0,0,0,.3)", fontSize: "2em" })
4665
4646
  }
4666
4647
  ) : state.centerPanel.open ? centerPanel ? renderHelper(
4667
4648
  centerPanel.render(