@semiont/react-ui 0.5.28 → 0.5.30

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.
Files changed (113) hide show
  1. package/README.md +3 -3
  2. package/dist/{PdfAnnotationCanvas.client-C2IGG4SW.js → PdfAnnotationCanvas.client-LSH3PZPY.js} +4 -4
  3. package/dist/{ar-FABPTJVB.js → ar-AZBRADEB.js} +5 -1
  4. package/dist/{bn-LKP6BDMH.js → bn-CCEW6AOS.js} +5 -1
  5. package/dist/{chunk-VXASXU4K.js → chunk-3ZBKCWUZ.js} +1 -1
  6. package/dist/{chunk-2YHEE63S.js → chunk-G4VHL4UA.js} +31 -31
  7. package/dist/{chunk-2GOHTTHW.js → chunk-SDKFZLEX.js} +5 -1
  8. package/dist/{cs-YQYNWHRG.js → cs-HXPF2CTE.js} +5 -1
  9. package/dist/{da-QHZOYKRY.js → da-K5NTK7LH.js} +5 -1
  10. package/dist/{de-GKA7RD7J.js → de-GMRQEDZI.js} +5 -1
  11. package/dist/{el-45T257AL.js → el-EUB4CI4G.js} +5 -1
  12. package/dist/{en-RVW5EQ66.js → en-R5XA26NF.js} +2 -2
  13. package/dist/{es-AVER7RU4.js → es-Z32DAZ6W.js} +5 -1
  14. package/dist/{fa-K3VPK3O2.js → fa-G7HN6B32.js} +5 -1
  15. package/dist/{fi-5NEKF7EB.js → fi-3YBLZO7I.js} +5 -1
  16. package/dist/{fr-FUMNDLBZ.js → fr-VUBH7BBS.js} +5 -1
  17. package/dist/{he-3JGNA3PR.js → he-WQQEY26B.js} +5 -1
  18. package/dist/{hi-IJY375DF.js → hi-HJZ6W4JB.js} +5 -1
  19. package/dist/{id-LWHKJ7ZD.js → id-ZOGZ37MI.js} +5 -1
  20. package/dist/index.d.ts +157 -257
  21. package/dist/index.js +763 -1209
  22. package/dist/{it-EBVOV4RW.js → it-DT6UW66F.js} +5 -1
  23. package/dist/{ja-KWRIX2NF.js → ja-RUKQCOLO.js} +5 -1
  24. package/dist/{ko-L5CJMFDS.js → ko-ZH5ADKZM.js} +5 -1
  25. package/dist/{ms-LSNMJDR2.js → ms-Y2AFPZTU.js} +5 -1
  26. package/dist/{nl-ZB32MB7U.js → nl-OQEWIXNA.js} +5 -1
  27. package/dist/{no-4GTNY7M5.js → no-KPAYJZWY.js} +5 -1
  28. package/dist/{pl-LUHBLTHB.js → pl-WSXK2UUD.js} +5 -1
  29. package/dist/{pt-C4H3UNQ6.js → pt-NWRJRUCK.js} +5 -1
  30. package/dist/{ro-GGITS5V4.js → ro-3CGVMOC6.js} +5 -1
  31. package/dist/{sv-T56RTLBP.js → sv-HGSEBA7S.js} +5 -1
  32. package/dist/test-utils.js +16 -7
  33. package/dist/{th-22X2IWCB.js → th-NZ4G352Z.js} +5 -1
  34. package/dist/{tr-77TFG62H.js → tr-LGGS4DLW.js} +5 -1
  35. package/dist/{uk-MIIL6NXT.js → uk-AIX536L4.js} +5 -1
  36. package/dist/{vi-7JYOIGNV.js → vi-V6CVQZLQ.js} +5 -1
  37. package/dist/{zh-ID6DRYU4.js → zh-AGKPGI3L.js} +5 -1
  38. package/package.json +13 -13
  39. package/src/components/StatusDisplay.tsx +13 -13
  40. package/src/components/__tests__/StatusDisplay.test.tsx +9 -9
  41. package/src/components/modals/ComposeStep.tsx +19 -4
  42. package/src/components/modals/ConfigureGenerationStep.tsx +143 -15
  43. package/src/components/modals/ReferenceWizardModal.tsx +14 -9
  44. package/src/components/modals/ResourceGenerateModal.tsx +10 -5
  45. package/src/components/modals/__tests__/ConfigureGenerationStep.test.tsx +171 -8
  46. package/src/components/modals/__tests__/ReferenceWizardModal.test.tsx +25 -1
  47. package/src/components/modals/__tests__/ResourceGenerateModal.test.tsx +24 -1
  48. package/src/components/modals/__tests__/WizardFooter.test.tsx +3 -5
  49. package/src/components/resource/BrowseView.tsx +3 -3
  50. package/src/components/resource/DownloadFileLink.tsx +1 -1
  51. package/src/components/resource/__tests__/BrowseView.reference-hover.test.tsx +1 -1
  52. package/src/components/resource/__tests__/BrowseView.test.tsx +2 -2
  53. package/src/components/resource/__tests__/download-link.test.tsx +6 -6
  54. package/src/components/resource/panels/ReferenceEntry.tsx +2 -2
  55. package/src/components/resource/panels/ReferencesPanel.tsx +5 -1
  56. package/src/components/resource/panels/__tests__/ReferencesPanel.observable-flow.test.tsx +1 -1
  57. package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +51 -2
  58. package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +1 -1
  59. package/src/features/auth/__tests__/SignInForm.a11y.test.tsx +12 -12
  60. package/src/features/auth/components/SignInForm.tsx +53 -53
  61. package/src/features/auth-welcome/state/__tests__/welcome-state-unit.test.ts +2 -2
  62. package/src/features/moderate-recent/__tests__/RecentDocumentsPage.test.tsx +2 -2
  63. package/src/features/resource-compose/components/ResourceComposePage.tsx +18 -3
  64. package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +1 -1
  65. package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +2 -2
  66. package/src/features/resource-discovery/state/discover-state-unit.ts +1 -1
  67. package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +2 -2
  68. package/src/features/resource-viewer/__tests__/generation-options.test.ts +53 -0
  69. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +16 -25
  70. package/src/features/resource-viewer/generation-options.ts +29 -0
  71. package/src/styles/index.css +0 -1
  72. package/translations/ar.json +4 -0
  73. package/translations/bn.json +4 -0
  74. package/translations/cs.json +4 -0
  75. package/translations/da.json +4 -0
  76. package/translations/de.json +4 -0
  77. package/translations/el.json +4 -0
  78. package/translations/en.json +4 -0
  79. package/translations/es.json +4 -0
  80. package/translations/fa.json +4 -0
  81. package/translations/fi.json +4 -0
  82. package/translations/fr.json +4 -0
  83. package/translations/he.json +4 -0
  84. package/translations/hi.json +4 -0
  85. package/translations/id.json +4 -0
  86. package/translations/it.json +4 -0
  87. package/translations/ja.json +4 -0
  88. package/translations/ko.json +4 -0
  89. package/translations/ms.json +4 -0
  90. package/translations/nl.json +4 -0
  91. package/translations/no.json +4 -0
  92. package/translations/pl.json +4 -0
  93. package/translations/pt.json +4 -0
  94. package/translations/ro.json +4 -0
  95. package/translations/sv.json +4 -0
  96. package/translations/th.json +4 -0
  97. package/translations/tr.json +4 -0
  98. package/translations/uk.json +4 -0
  99. package/translations/vi.json +4 -0
  100. package/translations/zh.json +4 -0
  101. package/src/features/admin-exchange/__tests__/AdminExchangePage.test.tsx +0 -137
  102. package/src/features/admin-exchange/__tests__/ExportCard.test.tsx +0 -41
  103. package/src/features/admin-exchange/__tests__/ImportCard.test.tsx +0 -148
  104. package/src/features/admin-exchange/__tests__/ImportProgress.test.tsx +0 -117
  105. package/src/features/admin-exchange/components/AdminExchangePage.tsx +0 -117
  106. package/src/features/admin-exchange/components/ExportCard.tsx +0 -35
  107. package/src/features/admin-exchange/components/ImportCard.tsx +0 -183
  108. package/src/features/admin-exchange/components/ImportProgress.tsx +0 -80
  109. package/src/features/admin-exchange/state/__tests__/exchange-state-unit.test.ts +0 -185
  110. package/src/features/admin-exchange/state/exchange-state-unit.ts +0 -133
  111. package/src/features/moderation-linked-data/__tests__/LinkedDataPage.test.tsx +0 -118
  112. package/src/features/moderation-linked-data/components/LinkedDataPage.tsx +0 -118
  113. package/src/styles/features/exchange.css +0 -374
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  setPdfWorkerSrc,
4
4
  toViewportAnchorRect
5
- } from "./chunk-VXASXU4K.js";
5
+ } from "./chunk-3ZBKCWUZ.js";
6
6
  import {
7
7
  LineNumbersProvider,
8
8
  SemiontProvider,
@@ -132,13 +132,13 @@ import {
132
132
  TranslationProvider,
133
133
  usePreloadTranslations,
134
134
  useTranslations
135
- } from "./chunk-2YHEE63S.js";
135
+ } from "./chunk-G4VHL4UA.js";
136
136
  import {
137
137
  cssVariables,
138
138
  generateCSSVariables,
139
139
  tokens
140
140
  } from "./chunk-QT7LYM72.js";
141
- import "./chunk-2GOHTTHW.js";
141
+ import "./chunk-SDKFZLEX.js";
142
142
  import {
143
143
  __commonJS,
144
144
  __toESM
@@ -12107,10 +12107,12 @@ var EditorView = class _EditorView {
12107
12107
  let diff = (newAnchorHeight - scrollAnchorHeight) / this.scaleY;
12108
12108
  if ((diff > 1 || diff < -1) && !(browser.ios && this.inputState.lastIOSMomentumScroll > Date.now() - 100) && (scroll == this.scrollDOM || this.hasFocus || Math.max(this.inputState.lastWheelEvent, this.inputState.lastTouchTime) > Date.now() - 100)) {
12109
12109
  scrollOffset = scrollOffset + diff;
12110
- if (scroll)
12111
- scroll.scrollTop += diff;
12112
- else
12110
+ if (!scroll)
12113
12111
  this.win.scrollBy(0, diff);
12112
+ else if (scrollAnchorPos < 0)
12113
+ scroll.scrollTop = scroll.scrollHeight;
12114
+ else
12115
+ scroll.scrollTop += diff;
12114
12116
  scrollAnchorHeight = -1;
12115
12117
  continue;
12116
12118
  }
@@ -17289,11 +17291,10 @@ function getSupportedShapes(mediaType) {
17289
17291
  if (!mediaType) {
17290
17292
  return [];
17291
17293
  }
17292
- if (capabilitiesOf(mediaType)?.render === "pdf") {
17293
- return ["rectangle"];
17294
- }
17295
- if (mediaType.startsWith("image/")) {
17296
- return ["rectangle", "circle", "polygon"];
17294
+ const caps = capabilitiesOf(mediaType);
17295
+ if (caps?.anchoring === "spatial") {
17296
+ if (caps.render === "pdf") return ["rectangle"];
17297
+ if (caps.render === "image") return ["rectangle", "circle", "polygon"];
17297
17298
  }
17298
17299
  return [];
17299
17300
  }
@@ -17304,11 +17305,10 @@ function getSelectorType(mediaType) {
17304
17305
  if (!mediaType) {
17305
17306
  return "text";
17306
17307
  }
17307
- if (capabilitiesOf(mediaType)?.render === "pdf") {
17308
- return "fragment";
17309
- }
17310
- if (mediaType.startsWith("image/")) {
17311
- return "svg";
17308
+ const caps = capabilitiesOf(mediaType);
17309
+ if (caps?.anchoring === "spatial") {
17310
+ if (caps.render === "pdf") return "fragment";
17311
+ if (caps.render === "image") return "svg";
17312
17312
  }
17313
17313
  return "text";
17314
17314
  }
@@ -17380,86 +17380,47 @@ function buildTextNodeIndex(container) {
17380
17380
  }
17381
17381
  return entries;
17382
17382
  }
17383
- function findTextNode(entries, renderedOffset) {
17384
- let lo = 0;
17385
- let hi = entries.length - 1;
17386
- while (lo <= hi) {
17387
- const mid = lo + hi >>> 1;
17388
- const entry = entries[mid];
17389
- if (renderedOffset < entry.start) {
17390
- hi = mid - 1;
17391
- } else if (renderedOffset >= entry.end) {
17392
- lo = mid + 1;
17393
- } else {
17394
- return { node: entry.node, localOffset: renderedOffset - entry.start };
17395
- }
17396
- }
17397
- return null;
17398
- }
17399
- function resolveAnnotationRanges(annotations, offsetMap, textNodeIndex) {
17400
- const ranges = /* @__PURE__ */ new Map();
17401
- for (const ann of annotations) {
17402
- const renderedStart = offsetMap.get(ann.offset);
17403
- const renderedEnd = offsetMap.get(ann.offset + ann.length - 1);
17404
- if (renderedStart === void 0 || renderedEnd === void 0) continue;
17405
- const startInfo = findTextNode(textNodeIndex, renderedStart);
17406
- const endInfo = findTextNode(textNodeIndex, renderedEnd + 1);
17407
- if (!startInfo || !endInfo) continue;
17408
- const range = document.createRange();
17409
- range.setStart(startInfo.node, startInfo.localOffset);
17410
- range.setEnd(endInfo.node, endInfo.localOffset);
17411
- ranges.set(ann.id, { range, annotation: ann });
17412
- }
17413
- return ranges;
17414
- }
17415
- function applyHighlights(ranges) {
17416
- for (const [id2, { range, annotation }] of ranges) {
17417
- const className = `annotation-${annotation.type}`;
17418
- if (range.startContainer === range.endContainer) {
17419
- const span = document.createElement("span");
17420
- span.className = className;
17421
- span.dataset.annotationId = id2;
17422
- span.dataset.annotationType = annotation.type;
17423
- try {
17424
- range.surroundContents(span);
17425
- } catch {
17426
- wrapRangeTextNodes(range, id2, annotation);
17427
- }
17428
- continue;
17429
- }
17430
- wrapRangeTextNodes(range, id2, annotation);
17431
- }
17432
- }
17433
- function wrapRangeTextNodes(range, id2, annotation) {
17434
- const className = `annotation-${annotation.type}`;
17435
- const walker = document.createTreeWalker(
17436
- range.commonAncestorContainer,
17437
- NodeFilter.SHOW_TEXT
17438
- );
17439
- const textNodes = [];
17440
- while (walker.nextNode()) {
17441
- const node = walker.currentNode;
17442
- if (range.intersectsNode(node)) {
17443
- textNodes.push(node);
17444
- }
17445
- }
17446
- for (const textNode of textNodes) {
17447
- const nodeRange = document.createRange();
17448
- nodeRange.selectNodeContents(textNode);
17449
- if (textNode === range.startContainer) {
17450
- nodeRange.setStart(textNode, range.startOffset);
17451
- }
17452
- if (textNode === range.endContainer) {
17453
- nodeRange.setEnd(textNode, range.endOffset);
17454
- }
17455
- const span = document.createElement("span");
17456
- span.className = className;
17457
- span.dataset.annotationId = id2;
17458
- span.dataset.annotationType = annotation.type;
17459
- try {
17460
- nodeRange.surroundContents(span);
17461
- } catch {
17462
- }
17383
+ function resolveAnnotationSpans(annotations, offsetMap) {
17384
+ const spans = [];
17385
+ for (const annotation of annotations) {
17386
+ if (annotation.length <= 0) continue;
17387
+ const start = offsetMap.get(annotation.offset);
17388
+ const last = offsetMap.get(annotation.offset + annotation.length - 1);
17389
+ if (start === void 0 || last === void 0 || last < start) continue;
17390
+ spans.push({ annotation, start, end: last + 1 });
17391
+ }
17392
+ return spans;
17393
+ }
17394
+ function applyHighlights(spans, textNodeIndex) {
17395
+ if (spans.length === 0) return;
17396
+ for (const entry of textNodeIndex) {
17397
+ const covering = spans.filter((s11) => s11.start < entry.end && s11.end > entry.start);
17398
+ if (covering.length === 0) continue;
17399
+ const cuts = /* @__PURE__ */ new Set([entry.start, entry.end]);
17400
+ for (const s11 of covering) {
17401
+ cuts.add(Math.max(s11.start, entry.start));
17402
+ cuts.add(Math.min(s11.end, entry.end));
17403
+ }
17404
+ const bounds = [...cuts].sort((a15, b8) => a15 - b8);
17405
+ const text = entry.node.textContent ?? "";
17406
+ const fragment = document.createDocumentFragment();
17407
+ for (let i13 = 0; i13 < bounds.length - 1; i13++) {
17408
+ const segStart = bounds[i13];
17409
+ const segEnd = bounds[i13 + 1];
17410
+ let segment = document.createTextNode(text.slice(segStart - entry.start, segEnd - entry.start));
17411
+ for (let k6 = covering.length - 1; k6 >= 0; k6--) {
17412
+ const s11 = covering[k6];
17413
+ if (s11.start > segStart || s11.end < segEnd) continue;
17414
+ const span = document.createElement("span");
17415
+ span.className = `annotation-${s11.annotation.type}`;
17416
+ span.dataset.annotationId = s11.annotation.id;
17417
+ span.dataset.annotationType = s11.annotation.type;
17418
+ span.appendChild(segment);
17419
+ segment = span;
17420
+ }
17421
+ fragment.appendChild(segment);
17422
+ }
17423
+ entry.node.parentNode?.replaceChild(fragment, entry.node);
17463
17424
  }
17464
17425
  }
17465
17426
  function clearHighlights(container) {
@@ -17471,8 +17432,8 @@ function clearHighlights(container) {
17471
17432
  parent.insertBefore(span.firstChild, span);
17472
17433
  }
17473
17434
  parent.removeChild(span);
17474
- parent.normalize();
17475
17435
  }
17436
+ container.normalize();
17476
17437
  }
17477
17438
  function toOverlayAnnotations(annotations) {
17478
17439
  return annotations.map((ann) => {
@@ -30625,7 +30586,7 @@ function PdfViewerLoading() {
30625
30586
  return /* @__PURE__ */ jsx24(Fragment4, { children: t12("viewerLoading") });
30626
30587
  }
30627
30588
  var PdfAnnotationCanvas = lazy(
30628
- () => import("./PdfAnnotationCanvas.client-C2IGG4SW.js").then((mod) => ({ default: mod.PdfAnnotationCanvas }))
30589
+ () => import("./PdfAnnotationCanvas.client-LSH3PZPY.js").then((mod) => ({ default: mod.PdfAnnotationCanvas }))
30629
30590
  );
30630
30591
  function TextAnnotateRenderer({
30631
30592
  content: content2,
@@ -31347,7 +31308,7 @@ function PdfViewerLoading2() {
31347
31308
  const t12 = useTranslations("PdfViewer");
31348
31309
  return /* @__PURE__ */ jsx29(Fragment6, { children: t12("viewerLoading") });
31349
31310
  }
31350
- var PdfAnnotationCanvas2 = lazy2(() => import("./PdfAnnotationCanvas.client-C2IGG4SW.js").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
31311
+ var PdfAnnotationCanvas2 = lazy2(() => import("./PdfAnnotationCanvas.client-LSH3PZPY.js").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
31351
31312
  var MemoizedMarkdown = memo(function MemoizedMarkdown2({ content: content2 }) {
31352
31313
  return /* @__PURE__ */ jsx29(ReactMarkdown, { remarkPlugins: [remarkGfm], children: content2 });
31353
31314
  });
@@ -31424,8 +31385,8 @@ var BrowseView = memo2(function BrowseView2({
31424
31385
  const container = containerRef.current;
31425
31386
  const offsetMap = buildSourceToRenderedMap(content2, container);
31426
31387
  const textNodeIndex = buildTextNodeIndex(container);
31427
- const ranges = resolveAnnotationRanges(overlayAnnotations, offsetMap, textNodeIndex);
31428
- applyHighlights(ranges);
31388
+ const spans = resolveAnnotationSpans(overlayAnnotations, offsetMap);
31389
+ applyHighlights(spans, textNodeIndex);
31429
31390
  return () => clearHighlights(container);
31430
31391
  }, [content2, overlayAnnotations]);
31431
31392
  useEffect31(() => {
@@ -33429,7 +33390,9 @@ function ReferencesPanel({
33429
33390
  source: resourceId2,
33430
33391
  motivation: "linking",
33431
33392
  selector: pendingAnnotation.selector,
33432
- body: entityType ? [{ type: "TextualBody", value: entityType, purpose: "tagging" }] : []
33393
+ // Entity types are optional, and MarkSubmitEvent.body is minItems:1
33394
+ // an empty array is a 400, not an empty annotation.
33395
+ ...entityType ? { body: [{ type: "TextualBody", value: entityType, purpose: "tagging" }] } : {}
33433
33396
  });
33434
33397
  setPendingEntityTypes([]);
33435
33398
  }
@@ -39557,10 +39520,22 @@ function WizardFooter({ backLabel, onBack, primary }) {
39557
39520
  }
39558
39521
 
39559
39522
  // src/components/modals/ConfigureGenerationStep.tsx
39560
- import { LOCALES as LOCALES2 } from "@semiont/core";
39523
+ import { LOCALES as LOCALES2, GENERATABLE_MEDIA_TYPES, capabilitiesOf as capabilitiesOf5, proposeStoragePath } from "@semiont/core";
39561
39524
  import { jsx as jsx59, jsxs as jsxs49 } from "react/jsx-runtime";
39562
39525
  var MIN_MAX_TOKENS = 100;
39563
39526
  var DEFAULT_MAX_TOKENS_CEILING = 4e3;
39527
+ var extensionFor = (format) => capabilitiesOf5(format)?.extension ?? "";
39528
+ var freshGenerationDraft = (title, locale) => ({
39529
+ title,
39530
+ storagePath: "",
39531
+ prompt: "",
39532
+ language: locale,
39533
+ temperature: 0.7,
39534
+ maxTokensText: "500",
39535
+ // D2: markdown is the DEFAULT, not an assumption — the worker would also
39536
+ // default to it, but a control must send what it shows.
39537
+ outputMediaType: "text/markdown"
39538
+ });
39564
39539
  function ConfigureGenerationStep({
39565
39540
  context,
39566
39541
  hintEcho,
@@ -39568,11 +39543,17 @@ function ConfigureGenerationStep({
39568
39543
  onConfigChange,
39569
39544
  onBack,
39570
39545
  onGenerate,
39546
+ defaultFolder = "",
39571
39547
  translations: t12,
39572
39548
  generationAgent
39573
39549
  }) {
39574
- const { title, storagePath, prompt, language: language2, temperature, maxTokensText } = config;
39550
+ const { title, storagePath, prompt, language: language2, temperature, maxTokensText, outputMediaType } = config;
39575
39551
  const set = (patch) => onConfigChange({ ...config, ...patch });
39552
+ const pathTouched = storagePath !== "";
39553
+ const proposedPath = proposeStoragePath(defaultFolder, title, outputMediaType);
39554
+ const effectivePath = pathTouched ? storagePath : proposedPath;
39555
+ const requiredExtension = extensionFor(outputMediaType);
39556
+ const extensionMismatch = effectivePath !== "" && !effectivePath.toLowerCase().endsWith(requiredExtension.toLowerCase());
39576
39557
  const ceiling = generationAgent?.limits?.maxOutputTokens ?? DEFAULT_MAX_TOKENS_CEILING;
39577
39558
  const clamp = (n12) => Math.min(Math.max(Number.isFinite(n12) ? n12 : MIN_MAX_TOKENS, MIN_MAX_TOKENS), ceiling);
39578
39559
  const submittedMaxTokens = clamp(parseInt(maxTokensText, 10));
@@ -39582,14 +39563,16 @@ function ConfigureGenerationStep({
39582
39563
  }, [ceiling]);
39583
39564
  const handleSubmit = (e6) => {
39584
39565
  e6.preventDefault();
39566
+ if (extensionMismatch) return;
39585
39567
  const trimmedPrompt = prompt.trim();
39586
39568
  onGenerate({
39587
39569
  title,
39588
- storagePath: `file://${storagePath}`,
39570
+ storageUri: `file://${effectivePath}`,
39589
39571
  ...trimmedPrompt ? { prompt: trimmedPrompt } : {},
39590
39572
  language: language2,
39591
39573
  temperature,
39592
39574
  maxTokens: submittedMaxTokens,
39575
+ outputMediaType,
39593
39576
  context
39594
39577
  });
39595
39578
  };
@@ -39627,14 +39610,30 @@ function ConfigureGenerationStep({
39627
39610
  {
39628
39611
  id: "wizard-storagePath",
39629
39612
  type: "text",
39630
- value: storagePath,
39613
+ value: effectivePath,
39631
39614
  onChange: (e6) => set({ storagePath: e6.target.value }),
39632
39615
  required: true,
39616
+ "aria-invalid": extensionMismatch,
39617
+ ...extensionMismatch ? { "aria-describedby": "wizard-format-mismatch" } : {},
39633
39618
  className: "semiont-input semiont-input--addon",
39634
39619
  placeholder: "generated/my-resource.md"
39635
39620
  }
39636
39621
  )
39637
- ] })
39622
+ ] }),
39623
+ extensionMismatch && /* @__PURE__ */ jsx59("p", { id: "wizard-format-mismatch", className: "semiont-form__error", role: "alert", children: t12.formatExtensionMismatch.replace("{{extension}}", requiredExtension) })
39624
+ ] }),
39625
+ /* @__PURE__ */ jsxs49("div", { className: "semiont-form__field", children: [
39626
+ /* @__PURE__ */ jsx59("label", { htmlFor: "wizard-outputFormat", className: "semiont-form__label", children: t12.outputFormat }),
39627
+ /* @__PURE__ */ jsx59(
39628
+ "select",
39629
+ {
39630
+ id: "wizard-outputFormat",
39631
+ value: outputMediaType,
39632
+ onChange: (e6) => set({ outputMediaType: e6.target.value }),
39633
+ className: "semiont-select",
39634
+ children: GENERATABLE_MEDIA_TYPES.map((format) => /* @__PURE__ */ jsx59("option", { value: format, children: capabilitiesOf5(format)?.label ?? format }, format))
39635
+ }
39636
+ )
39638
39637
  ] }),
39639
39638
  /* @__PURE__ */ jsxs49("div", { className: "semiont-form__field", children: [
39640
39639
  /* @__PURE__ */ jsx59("label", { htmlFor: "wizard-prompt", className: "semiont-form__label", children: t12.additionalInstructions }),
@@ -39723,7 +39722,7 @@ function ConfigureGenerationStep({
39723
39722
  WizardFooter,
39724
39723
  {
39725
39724
  ...onBack && t12.back ? { backLabel: t12.back, onBack } : {},
39726
- primary: { label: t12.generate, type: "submit" }
39725
+ primary: { label: t12.generate, type: "submit", disabled: extensionMismatch }
39727
39726
  }
39728
39727
  )
39729
39728
  ] })
@@ -39866,11 +39865,12 @@ function SearchResultsStep({
39866
39865
 
39867
39866
  // src/components/modals/ComposeStep.tsx
39868
39867
  import { useState as useState42 } from "react";
39869
- import { LOCALES as LOCALES3 } from "@semiont/core";
39868
+ import { LOCALES as LOCALES3, proposeStoragePath as proposeStoragePath2 } from "@semiont/core";
39870
39869
  import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
39871
39870
  function ComposeStep({
39872
39871
  draft,
39873
39872
  onDraftChange,
39873
+ defaultFolder = "",
39874
39874
  referenceEntityTypes,
39875
39875
  entityTypeOptions,
39876
39876
  showLineNumbers,
@@ -39879,16 +39879,18 @@ function ComposeStep({
39879
39879
  onCompose,
39880
39880
  translations: t12
39881
39881
  }) {
39882
+ const pathTouched = draft.storagePath !== "";
39883
+ const effectivePath = pathTouched ? draft.storagePath : proposeStoragePath2(defaultFolder, draft.name, "text/markdown");
39882
39884
  const [isCreating, setIsCreating] = useState42(false);
39883
39885
  const fixedTypes = referenceEntityTypes.length > 0;
39884
39886
  const handleSubmit = async (e6) => {
39885
39887
  e6.preventDefault();
39886
- if (!draft.name.trim() || !draft.storagePath.trim()) return;
39888
+ if (!draft.name.trim() || !effectivePath.trim()) return;
39887
39889
  setIsCreating(true);
39888
39890
  try {
39889
39891
  await onCompose({
39890
39892
  name: draft.name,
39891
- storagePath: `file://${draft.storagePath}`,
39893
+ storagePath: `file://${effectivePath}`,
39892
39894
  content: draft.content,
39893
39895
  entityTypes: fixedTypes ? referenceEntityTypes : draft.entityTypes,
39894
39896
  language: draft.language
@@ -39924,7 +39926,7 @@ function ComposeStep({
39924
39926
  {
39925
39927
  id: "compose-storagePath",
39926
39928
  type: "text",
39927
- value: draft.storagePath,
39929
+ value: effectivePath,
39928
39930
  onChange: (e6) => onDraftChange({ storagePath: e6.target.value }),
39929
39931
  placeholder: "people/my-resource.md",
39930
39932
  required: true,
@@ -40028,6 +40030,7 @@ function ReferenceWizardModal({
40028
40030
  annotationId: annotationId2,
40029
40031
  resourceId: resourceId2,
40030
40032
  defaultTitle,
40033
+ defaultFolder,
40031
40034
  entityTypes,
40032
40035
  resourceName,
40033
40036
  locale,
@@ -40045,14 +40048,9 @@ function ReferenceWizardModal({
40045
40048
  const session = useObservable(useSemiont().activeSession$);
40046
40049
  const [wizardStep, setWizardStep] = useState43({ step: "gather" });
40047
40050
  const [searchConfig, setSearchConfig] = useState43({ limit: 10, useSemanticScoring: true });
40048
- const [generationDraft, setGenerationDraft] = useState43({
40049
- title: defaultTitle,
40050
- storagePath: "",
40051
- prompt: "",
40052
- language: locale,
40053
- temperature: 0.7,
40054
- maxTokensText: "500"
40055
- });
40051
+ const [generationDraft, setGenerationDraft] = useState43(
40052
+ () => freshGenerationDraft(defaultTitle, locale)
40053
+ );
40056
40054
  const [isSearching, setIsSearching] = useState43(false);
40057
40055
  const [searchError, setSearchError] = useState43(null);
40058
40056
  const [userHint, setUserHint] = useState43("");
@@ -40072,14 +40070,7 @@ function ReferenceWizardModal({
40072
40070
  seededTitle.current = defaultTitle;
40073
40071
  setWizardStep({ step: "gather" });
40074
40072
  setSearchConfig({ limit: 10, useSemanticScoring: true });
40075
- setGenerationDraft({
40076
- title: defaultTitle,
40077
- storagePath: "",
40078
- prompt: "",
40079
- language: locale,
40080
- temperature: 0.7,
40081
- maxTokensText: "500"
40082
- });
40073
+ setGenerationDraft(freshGenerationDraft(defaultTitle, locale));
40083
40074
  setIsSearching(false);
40084
40075
  setSearchError(null);
40085
40076
  setUserHint("");
@@ -40261,6 +40252,7 @@ function ReferenceWizardModal({
40261
40252
  {
40262
40253
  draft: composeDraft,
40263
40254
  onDraftChange: (patch) => setComposeDraft((d8) => ({ ...d8, ...patch })),
40255
+ defaultFolder,
40264
40256
  referenceEntityTypes: entityTypes,
40265
40257
  entityTypeOptions,
40266
40258
  showLineNumbers,
@@ -40300,6 +40292,7 @@ function ReferenceWizardModal({
40300
40292
  context: contextWithHint ?? context,
40301
40293
  config: generationDraft,
40302
40294
  onConfigChange: setGenerationDraft,
40295
+ defaultFolder,
40303
40296
  onBack: handleBackToGather,
40304
40297
  onGenerate: handleGenerateSubmit,
40305
40298
  translations: {
@@ -40316,6 +40309,8 @@ function ReferenceWizardModal({
40316
40309
  maxLength: t12.maxLength,
40317
40310
  maxLengthHelp: t12.maxLengthHelp,
40318
40311
  maxLengthCeiling: t12.maxLengthCeiling,
40312
+ outputFormat: t12.outputFormat,
40313
+ formatExtensionMismatch: t12.formatExtensionMismatch,
40319
40314
  back: t12.back,
40320
40315
  generate: t12.generate
40321
40316
  }
@@ -40456,6 +40451,7 @@ function ResourceGenerateModal({
40456
40451
  onClose,
40457
40452
  resourceId: resourceId2,
40458
40453
  defaultTitle,
40454
+ defaultFolder,
40459
40455
  locale,
40460
40456
  entityTypeOptions = [],
40461
40457
  onGenerateSubmit,
@@ -40466,14 +40462,7 @@ function ResourceGenerateModal({
40466
40462
  translations: t12,
40467
40463
  generationAgent
40468
40464
  }) {
40469
- const freshDraft = () => ({
40470
- title: defaultTitle,
40471
- storagePath: "",
40472
- prompt: "",
40473
- language: locale,
40474
- temperature: 0.7,
40475
- maxTokensText: "500"
40476
- });
40465
+ const freshDraft = () => freshGenerationDraft(defaultTitle, locale);
40477
40466
  const [generationDraft, setGenerationDraft] = useState45(freshDraft);
40478
40467
  const [gatherFired, setGatherFired] = useState45(false);
40479
40468
  const [lastGather, setLastGather] = useState45(null);
@@ -40643,6 +40632,7 @@ function ResourceGenerateModal({
40643
40632
  context: gatherContext,
40644
40633
  config: generationDraft,
40645
40634
  onConfigChange: setGenerationDraft,
40635
+ defaultFolder,
40646
40636
  onGenerate: handleGenerate,
40647
40637
  translations: {
40648
40638
  resourceTitle: t12.resourceTitle,
@@ -40658,6 +40648,8 @@ function ResourceGenerateModal({
40658
40648
  maxLength: t12.maxLength,
40659
40649
  maxLengthHelp: t12.maxLengthHelp,
40660
40650
  maxLengthCeiling: t12.maxLengthCeiling,
40651
+ outputFormat: t12.outputFormat,
40652
+ formatExtensionMismatch: t12.formatExtensionMismatch,
40661
40653
  generate: t12.generate
40662
40654
  }
40663
40655
  }
@@ -40919,7 +40911,7 @@ import { jsx as jsx69, jsxs as jsxs59 } from "react/jsx-runtime";
40919
40911
  function StatusDisplay({
40920
40912
  isFullyAuthenticated = false,
40921
40913
  isAuthenticated = false,
40922
- hasValidBackendToken = false
40914
+ hasValidGatewayToken = false
40923
40915
  }) {
40924
40916
  const semiont = useObservable(useSemiont().activeSession$)?.client;
40925
40917
  const [data2, setData] = useState47(null);
@@ -40945,29 +40937,29 @@ function StatusDisplay({
40945
40937
  return () => clearInterval(interval);
40946
40938
  }, [semiont]);
40947
40939
  const getStatusContent = () => {
40948
- if (isAuthenticated && !hasValidBackendToken) {
40949
- return "\u{1F680} Frontend Status: Ready \u2022 Backend: Please sign out and sign in again to reconnect";
40940
+ if (isAuthenticated && !hasValidGatewayToken) {
40941
+ return "\u{1F680} Frontend Status: Ready \u2022 Gateway: Please sign out and sign in again to reconnect";
40950
40942
  }
40951
40943
  if (!isFullyAuthenticated) {
40952
- return "\u{1F680} Frontend Status: Ready \u2022 Backend: Authentication required";
40944
+ return "\u{1F680} Frontend Status: Ready \u2022 Gateway: Authentication required";
40953
40945
  }
40954
40946
  if (data2) {
40955
- return `\u{1F680} Frontend Status: Ready \u2022 Backend: ${data2.status} (v${data2.version})`;
40947
+ return `\u{1F680} Frontend Status: Ready \u2022 Gateway: ${data2.status} (v${data2.version})`;
40956
40948
  }
40957
40949
  if (loading) {
40958
- return "\u{1F680} Frontend Status: Ready \u2022 Backend: Connecting...";
40950
+ return "\u{1F680} Frontend Status: Ready \u2022 Gateway: Connecting...";
40959
40951
  }
40960
40952
  if (error) {
40961
40953
  const errorMessage = error.message;
40962
40954
  if (errorMessage.includes("401") || errorMessage.includes("Unauthorized")) {
40963
- return "\u{1F680} Frontend Status: Ready \u2022 Backend: Please sign out and sign in again";
40955
+ return "\u{1F680} Frontend Status: Ready \u2022 Gateway: Please sign out and sign in again";
40964
40956
  }
40965
- return "\u{1F680} Frontend Status: Ready \u2022 Backend: Connection failed";
40957
+ return "\u{1F680} Frontend Status: Ready \u2022 Gateway: Connection failed";
40966
40958
  }
40967
- return "\u{1F680} Frontend Status: Ready \u2022 Backend: Unknown";
40959
+ return "\u{1F680} Frontend Status: Ready \u2022 Gateway: Unknown";
40968
40960
  };
40969
40961
  const getStatusType = () => {
40970
- if (isAuthenticated && !hasValidBackendToken) {
40962
+ if (isAuthenticated && !hasValidGatewayToken) {
40971
40963
  return "warning";
40972
40964
  }
40973
40965
  if (!isFullyAuthenticated) {
@@ -40994,9 +40986,9 @@ function StatusDisplay({
40994
40986
  /* @__PURE__ */ jsx69("span", { className: "sr-only", children: "System status: " }),
40995
40987
  getStatusContent()
40996
40988
  ] }),
40997
- !isFullyAuthenticated ? /* @__PURE__ */ jsx69("p", { className: "semiont-status-hint", children: "Sign in to view backend status" }) : error ? /* @__PURE__ */ jsxs59("p", { className: "semiont-status-hint semiont-status-error-hint", role: "alert", children: [
40989
+ !isFullyAuthenticated ? /* @__PURE__ */ jsx69("p", { className: "semiont-status-hint", children: "Sign in to view gateway status" }) : error ? /* @__PURE__ */ jsxs59("p", { className: "semiont-status-hint semiont-status-error-hint", role: "alert", children: [
40998
40990
  /* @__PURE__ */ jsx69("span", { className: "sr-only", children: "Error: " }),
40999
- "Check that the backend server is running and accessible"
40991
+ "Check that the gateway server is running and accessible"
41000
40992
  ] }) : null
41001
40993
  ]
41002
40994
  }
@@ -42203,276 +42195,8 @@ function AdminDevOpsPage({
42203
42195
  ] });
42204
42196
  }
42205
42197
 
42206
- // src/features/admin-exchange/components/ExportCard.tsx
42207
- import { jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
42208
- function ExportCard({ onExport, isExporting, translations: t12 }) {
42209
- return /* @__PURE__ */ jsxs70("div", { className: "semiont-admin__card", children: [
42210
- /* @__PURE__ */ jsx82("h2", { className: "semiont-admin__section-title", children: t12.title }),
42211
- /* @__PURE__ */ jsx82("p", { className: "semiont-admin__section-description", children: t12.description }),
42212
- /* @__PURE__ */ jsx82(
42213
- "button",
42214
- {
42215
- className: "semiont-exchange__button semiont-exchange__button--primary",
42216
- onClick: onExport,
42217
- disabled: isExporting,
42218
- children: isExporting ? t12.exporting : t12.exportButton
42219
- }
42220
- )
42221
- ] });
42222
- }
42223
-
42224
- // src/features/admin-exchange/components/ImportCard.tsx
42225
- import { useRef as useRef38, useState as useState50, useCallback as useCallback34 } from "react";
42226
- import { jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
42227
- function ImportCard({
42228
- onFileSelected,
42229
- onImport,
42230
- onCancel,
42231
- selectedFile,
42232
- preview,
42233
- isImporting,
42234
- translations: t12
42235
- }) {
42236
- const fileInputRef = useRef38(null);
42237
- const [isDragActive, setIsDragActive] = useState50(false);
42238
- const [showConfirm, setShowConfirm] = useState50(false);
42239
- const handleDragOver = useCallback34((e6) => {
42240
- e6.preventDefault();
42241
- setIsDragActive(true);
42242
- }, []);
42243
- const handleDragLeave = useCallback34(() => {
42244
- setIsDragActive(false);
42245
- }, []);
42246
- const handleDrop = useCallback34((e6) => {
42247
- e6.preventDefault();
42248
- setIsDragActive(false);
42249
- setShowConfirm(false);
42250
- const file = e6.dataTransfer.files[0];
42251
- if (file) onFileSelected(file);
42252
- }, [onFileSelected]);
42253
- const handleFileChange = useCallback34((e6) => {
42254
- setShowConfirm(false);
42255
- const file = e6.target.files?.[0];
42256
- if (file) onFileSelected(file);
42257
- }, [onFileSelected]);
42258
- const handleImportClick = () => {
42259
- setShowConfirm(true);
42260
- };
42261
- const handleConfirm = () => {
42262
- setShowConfirm(false);
42263
- onImport();
42264
- };
42265
- const handleCancelConfirm = () => {
42266
- setShowConfirm(false);
42267
- };
42268
- return /* @__PURE__ */ jsxs71("div", { className: "semiont-admin__card", children: [
42269
- /* @__PURE__ */ jsx83("h2", { className: "semiont-admin__section-title", children: t12.title }),
42270
- /* @__PURE__ */ jsx83("p", { className: "semiont-admin__section-description", children: t12.description }),
42271
- /* @__PURE__ */ jsxs71(
42272
- "div",
42273
- {
42274
- className: `semiont-exchange__dropzone${isDragActive ? " semiont-exchange__dropzone--active" : ""}`,
42275
- onDragOver: handleDragOver,
42276
- onDragLeave: handleDragLeave,
42277
- onDrop: handleDrop,
42278
- onClick: () => fileInputRef.current?.click(),
42279
- children: [
42280
- /* @__PURE__ */ jsx83("p", { className: "semiont-exchange__dropzone-text", children: isDragActive ? t12.dropzoneActive : t12.dropzoneLabel }),
42281
- selectedFile && /* @__PURE__ */ jsxs71("p", { className: "semiont-exchange__file-info", children: [
42282
- selectedFile.name,
42283
- " (",
42284
- (selectedFile.size / 1024).toFixed(1),
42285
- " KB)"
42286
- ] })
42287
- ]
42288
- }
42289
- ),
42290
- /* @__PURE__ */ jsx83(
42291
- "input",
42292
- {
42293
- ref: fileInputRef,
42294
- type: "file",
42295
- accept: ".tar.gz,.jsonl,.gz",
42296
- onChange: handleFileChange,
42297
- style: { display: "none" }
42298
- }
42299
- ),
42300
- preview && /* @__PURE__ */ jsxs71("div", { className: "semiont-exchange__preview", children: [
42301
- /* @__PURE__ */ jsxs71("div", { className: "semiont-exchange__preview-row", children: [
42302
- /* @__PURE__ */ jsx83("span", { className: "semiont-exchange__preview-label", children: t12.detectedFormat }),
42303
- /* @__PURE__ */ jsxs71("span", { className: "semiont-exchange__preview-value", children: [
42304
- preview.format,
42305
- " v",
42306
- preview.version
42307
- ] })
42308
- ] }),
42309
- preview.sourceUrl && /* @__PURE__ */ jsxs71("div", { className: "semiont-exchange__preview-row", children: [
42310
- /* @__PURE__ */ jsx83("span", { className: "semiont-exchange__preview-label", children: "Source" }),
42311
- /* @__PURE__ */ jsx83("span", { className: "semiont-exchange__preview-value", children: preview.sourceUrl })
42312
- ] }),
42313
- Object.keys(preview.stats).length > 0 && /* @__PURE__ */ jsxs71("div", { className: "semiont-exchange__preview-row", children: [
42314
- /* @__PURE__ */ jsx83("span", { className: "semiont-exchange__preview-label", children: t12.statsPreview }),
42315
- /* @__PURE__ */ jsx83("span", { className: "semiont-exchange__preview-value", children: Object.entries(preview.stats).map(([k6, v4]) => `${v4} ${k6}`).join(", ") })
42316
- ] })
42317
- ] }),
42318
- showConfirm && /* @__PURE__ */ jsxs71("div", { className: "semiont-exchange__confirm", children: [
42319
- /* @__PURE__ */ jsx83("p", { className: "semiont-exchange__confirm-title", children: t12.importConfirmTitle }),
42320
- /* @__PURE__ */ jsx83("p", { className: "semiont-exchange__confirm-message", children: t12.importConfirmMessage }),
42321
- /* @__PURE__ */ jsxs71("div", { className: "semiont-exchange__confirm-actions", children: [
42322
- /* @__PURE__ */ jsx83(
42323
- "button",
42324
- {
42325
- className: "semiont-exchange__button semiont-exchange__button--primary",
42326
- onClick: handleConfirm,
42327
- children: t12.confirmImport
42328
- }
42329
- ),
42330
- /* @__PURE__ */ jsx83(
42331
- "button",
42332
- {
42333
- className: "semiont-exchange__button semiont-exchange__button--secondary",
42334
- onClick: handleCancelConfirm,
42335
- children: t12.cancelImport
42336
- }
42337
- )
42338
- ] })
42339
- ] }),
42340
- !showConfirm && /* @__PURE__ */ jsxs71("div", { className: "semiont-exchange__actions", children: [
42341
- /* @__PURE__ */ jsx83(
42342
- "button",
42343
- {
42344
- className: "semiont-exchange__button semiont-exchange__button--primary",
42345
- onClick: handleImportClick,
42346
- disabled: !preview || isImporting,
42347
- children: isImporting ? t12.importing : t12.importButton
42348
- }
42349
- ),
42350
- selectedFile && /* @__PURE__ */ jsx83(
42351
- "button",
42352
- {
42353
- className: "semiont-exchange__button semiont-exchange__button--secondary",
42354
- onClick: onCancel,
42355
- disabled: isImporting,
42356
- children: t12.cancelImport
42357
- }
42358
- )
42359
- ] })
42360
- ] });
42361
- }
42362
-
42363
- // src/features/admin-exchange/components/ImportProgress.tsx
42364
- import { jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
42365
- var PHASE_LABELS = {
42366
- started: "phaseStarted",
42367
- complete: "phaseComplete",
42368
- error: "phaseError"
42369
- };
42370
- var STAT_LABELS = {
42371
- eventsReplayed: "statsEventsReplayed",
42372
- resourcesCreated: "statsResourcesCreated",
42373
- annotationsCreated: "statsAnnotationsCreated",
42374
- entityTypesAdded: "statsEntityTypesAdded"
42375
- };
42376
- function ImportProgress({ phase, message, result, translations: t12 }) {
42377
- const labelKey = PHASE_LABELS[phase];
42378
- const phaseLabel = labelKey ? t12[labelKey] : phase;
42379
- const isComplete = phase === "complete";
42380
- const isError = phase === "error";
42381
- const stats = result?.stats != null && typeof result.stats === "object" ? result.stats : void 0;
42382
- const statEntries = stats ? Object.entries(stats).filter((entry) => typeof entry[1] === "number") : [];
42383
- return /* @__PURE__ */ jsxs72("div", { className: "semiont-exchange__progress", children: [
42384
- /* @__PURE__ */ jsx84("div", { className: `semiont-exchange__phase-label${isError ? " semiont-exchange__phase-label--error" : isComplete ? " semiont-exchange__phase-label--complete" : ""}`, children: phaseLabel }),
42385
- message && !isComplete && !isError && /* @__PURE__ */ jsx84("p", { className: "semiont-exchange__progress-message", children: message }),
42386
- isComplete && statEntries.length > 0 && /* @__PURE__ */ jsx84("div", { className: "semiont-exchange__result", children: statEntries.map(([key, value]) => {
42387
- const statKey = STAT_LABELS[key];
42388
- return /* @__PURE__ */ jsxs72("div", { className: "semiont-exchange__result-stat", children: [
42389
- /* @__PURE__ */ jsx84("span", { className: "semiont-exchange__result-value", children: value }),
42390
- /* @__PURE__ */ jsx84("span", { className: "semiont-exchange__result-label", children: statKey ? t12[statKey] : key })
42391
- ] }, key);
42392
- }) }),
42393
- isError && message && /* @__PURE__ */ jsx84("p", { className: "semiont-exchange__error-message", children: message })
42394
- ] });
42395
- }
42396
-
42397
- // src/features/admin-exchange/components/AdminExchangePage.tsx
42398
- import { jsx as jsx85, jsxs as jsxs73 } from "react/jsx-runtime";
42399
- function AdminExchangePage({
42400
- onExport,
42401
- isExporting,
42402
- onFileSelected,
42403
- onImport,
42404
- onCancelImport,
42405
- selectedFile,
42406
- preview,
42407
- isImporting,
42408
- importPhase,
42409
- importMessage,
42410
- importResult,
42411
- theme: theme2,
42412
- activePanel,
42413
- translations: t12,
42414
- ToolbarPanels,
42415
- Toolbar: Toolbar2
42416
- }) {
42417
- return /* @__PURE__ */ jsxs73("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
42418
- /* @__PURE__ */ jsxs73("div", { className: "semiont-page__content", children: [
42419
- /* @__PURE__ */ jsxs73("div", { className: "semiont-page__header", children: [
42420
- /* @__PURE__ */ jsx85("h1", { className: "semiont-page__title", children: t12.title }),
42421
- /* @__PURE__ */ jsx85("p", { className: "semiont-page__subtitle", children: t12.subtitle })
42422
- ] }),
42423
- /* @__PURE__ */ jsxs73("div", { className: "semiont-exchange__cards", children: [
42424
- /* @__PURE__ */ jsx85(
42425
- ExportCard,
42426
- {
42427
- onExport,
42428
- isExporting,
42429
- translations: t12.export
42430
- }
42431
- ),
42432
- /* @__PURE__ */ jsx85(
42433
- ImportCard,
42434
- {
42435
- onFileSelected,
42436
- onImport,
42437
- onCancel: onCancelImport,
42438
- selectedFile,
42439
- preview,
42440
- isImporting,
42441
- translations: t12.import
42442
- }
42443
- )
42444
- ] }),
42445
- importPhase && /* @__PURE__ */ jsx85(
42446
- ImportProgress,
42447
- {
42448
- phase: importPhase,
42449
- message: importMessage,
42450
- result: importResult,
42451
- translations: t12.progress
42452
- }
42453
- )
42454
- ] }),
42455
- /* @__PURE__ */ jsxs73("div", { className: "semiont-page__sidebar", children: [
42456
- /* @__PURE__ */ jsx85(
42457
- ToolbarPanels,
42458
- {
42459
- activePanel,
42460
- theme: theme2
42461
- }
42462
- ),
42463
- /* @__PURE__ */ jsx85(
42464
- Toolbar2,
42465
- {
42466
- context: "simple",
42467
- activePanel
42468
- }
42469
- )
42470
- ] })
42471
- ] });
42472
- }
42473
-
42474
42198
  // src/features/admin-security/components/AdminSecurityPage.tsx
42475
- import { jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
42199
+ import { jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
42476
42200
  function AdminSecurityPage({
42477
42201
  providers,
42478
42202
  allowedDomains,
@@ -42483,154 +42207,77 @@ function AdminSecurityPage({
42483
42207
  ToolbarPanels,
42484
42208
  Toolbar: Toolbar2
42485
42209
  }) {
42486
- return /* @__PURE__ */ jsxs74("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
42487
- /* @__PURE__ */ jsx86("div", { className: "semiont-page__content", children: /* @__PURE__ */ jsxs74("div", { className: "semiont-page__sections", children: [
42488
- /* @__PURE__ */ jsxs74("div", { className: "semiont-page__header", children: [
42489
- /* @__PURE__ */ jsx86("h1", { className: "semiont-page__title", children: t12.title }),
42490
- /* @__PURE__ */ jsx86("p", { className: "semiont-page__subtitle", children: t12.subtitle })
42210
+ return /* @__PURE__ */ jsxs70("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
42211
+ /* @__PURE__ */ jsx82("div", { className: "semiont-page__content", children: /* @__PURE__ */ jsxs70("div", { className: "semiont-page__sections", children: [
42212
+ /* @__PURE__ */ jsxs70("div", { className: "semiont-page__header", children: [
42213
+ /* @__PURE__ */ jsx82("h1", { className: "semiont-page__title", children: t12.title }),
42214
+ /* @__PURE__ */ jsx82("p", { className: "semiont-page__subtitle", children: t12.subtitle })
42491
42215
  ] }),
42492
- /* @__PURE__ */ jsxs74("div", { className: "semiont-admin__card", children: [
42493
- /* @__PURE__ */ jsxs74("div", { className: "semiont-admin__card-header", children: [
42494
- /* @__PURE__ */ jsx86(ShieldCheckIcon_default, { className: "semiont-admin__card-icon semiont-admin__card-icon--primary" }),
42495
- /* @__PURE__ */ jsxs74("div", { children: [
42496
- /* @__PURE__ */ jsx86("h3", { className: "semiont-admin__card-title", children: t12.oauthProviders }),
42497
- /* @__PURE__ */ jsx86("p", { className: "semiont-admin__card-description", children: t12.oauthProvidersDescription })
42216
+ /* @__PURE__ */ jsxs70("div", { className: "semiont-admin__card", children: [
42217
+ /* @__PURE__ */ jsxs70("div", { className: "semiont-admin__card-header", children: [
42218
+ /* @__PURE__ */ jsx82(ShieldCheckIcon_default, { className: "semiont-admin__card-icon semiont-admin__card-icon--primary" }),
42219
+ /* @__PURE__ */ jsxs70("div", { children: [
42220
+ /* @__PURE__ */ jsx82("h3", { className: "semiont-admin__card-title", children: t12.oauthProviders }),
42221
+ /* @__PURE__ */ jsx82("p", { className: "semiont-admin__card-description", children: t12.oauthProvidersDescription })
42498
42222
  ] })
42499
42223
  ] }),
42500
- isLoading ? /* @__PURE__ */ jsx86("div", { className: "semiont-skeleton-group", children: /* @__PURE__ */ jsx86("div", { className: "semiont-skeleton semiont-skeleton--bar" }) }) : providers.length > 0 ? /* @__PURE__ */ jsx86("div", { className: "semiont-provider-list", children: providers.map((provider) => /* @__PURE__ */ jsxs74("div", { className: "semiont-provider-item", children: [
42501
- /* @__PURE__ */ jsxs74("div", { className: "semiont-provider-item__info", children: [
42502
- /* @__PURE__ */ jsx86(CheckCircleIcon_default, { className: "semiont-provider-item__icon semiont-provider-item__icon--success" }),
42503
- /* @__PURE__ */ jsx86("span", { className: "semiont-provider-item__name", children: provider.name }),
42504
- provider.clientId && /* @__PURE__ */ jsxs74("span", { className: "semiont-provider-item__client-id", children: [
42224
+ isLoading ? /* @__PURE__ */ jsx82("div", { className: "semiont-skeleton-group", children: /* @__PURE__ */ jsx82("div", { className: "semiont-skeleton semiont-skeleton--bar" }) }) : providers.length > 0 ? /* @__PURE__ */ jsx82("div", { className: "semiont-provider-list", children: providers.map((provider) => /* @__PURE__ */ jsxs70("div", { className: "semiont-provider-item", children: [
42225
+ /* @__PURE__ */ jsxs70("div", { className: "semiont-provider-item__info", children: [
42226
+ /* @__PURE__ */ jsx82(CheckCircleIcon_default, { className: "semiont-provider-item__icon semiont-provider-item__icon--success" }),
42227
+ /* @__PURE__ */ jsx82("span", { className: "semiont-provider-item__name", children: provider.name }),
42228
+ provider.clientId && /* @__PURE__ */ jsxs70("span", { className: "semiont-provider-item__client-id", children: [
42505
42229
  t12.clientId,
42506
42230
  ": ",
42507
42231
  provider.clientId
42508
42232
  ] })
42509
42233
  ] }),
42510
- /* @__PURE__ */ jsx86("span", { className: "semiont-badge semiont-badge--success", children: t12.configured })
42511
- ] }, provider.name)) }) : /* @__PURE__ */ jsx86("div", { className: "semiont-empty-message", children: t12.noProvidersConfigured })
42234
+ /* @__PURE__ */ jsx82("span", { className: "semiont-badge semiont-badge--success", children: t12.configured })
42235
+ ] }, provider.name)) }) : /* @__PURE__ */ jsx82("div", { className: "semiont-empty-message", children: t12.noProvidersConfigured })
42512
42236
  ] }),
42513
- /* @__PURE__ */ jsxs74("div", { className: "semiont-admin__card", children: [
42514
- /* @__PURE__ */ jsxs74("div", { className: "semiont-admin__card-header", children: [
42515
- /* @__PURE__ */ jsx86(GlobeAltIcon_default, { className: "semiont-admin__card-icon semiont-admin__card-icon--primary" }),
42516
- /* @__PURE__ */ jsxs74("div", { children: [
42517
- /* @__PURE__ */ jsx86("h3", { className: "semiont-admin__card-title", children: t12.allowedDomains }),
42518
- /* @__PURE__ */ jsx86("p", { className: "semiont-admin__card-description", children: t12.allowedDomainsDescription })
42237
+ /* @__PURE__ */ jsxs70("div", { className: "semiont-admin__card", children: [
42238
+ /* @__PURE__ */ jsxs70("div", { className: "semiont-admin__card-header", children: [
42239
+ /* @__PURE__ */ jsx82(GlobeAltIcon_default, { className: "semiont-admin__card-icon semiont-admin__card-icon--primary" }),
42240
+ /* @__PURE__ */ jsxs70("div", { children: [
42241
+ /* @__PURE__ */ jsx82("h3", { className: "semiont-admin__card-title", children: t12.allowedDomains }),
42242
+ /* @__PURE__ */ jsx82("p", { className: "semiont-admin__card-description", children: t12.allowedDomainsDescription })
42519
42243
  ] })
42520
42244
  ] }),
42521
- isLoading ? /* @__PURE__ */ jsxs74("div", { className: "semiont-skeleton-group", children: [
42522
- /* @__PURE__ */ jsx86("div", { className: "semiont-skeleton semiont-skeleton--chip" }),
42523
- /* @__PURE__ */ jsx86("div", { className: "semiont-skeleton semiont-skeleton--chip semiont-skeleton--chip-lg" })
42524
- ] }) : allowedDomains.length > 0 ? /* @__PURE__ */ jsx86("div", { className: "semiont-domain-list", children: allowedDomains.map((domain) => /* @__PURE__ */ jsxs74("div", { className: "semiont-chip semiont-chip--primary", children: [
42245
+ isLoading ? /* @__PURE__ */ jsxs70("div", { className: "semiont-skeleton-group", children: [
42246
+ /* @__PURE__ */ jsx82("div", { className: "semiont-skeleton semiont-skeleton--chip" }),
42247
+ /* @__PURE__ */ jsx82("div", { className: "semiont-skeleton semiont-skeleton--chip semiont-skeleton--chip-lg" })
42248
+ ] }) : allowedDomains.length > 0 ? /* @__PURE__ */ jsx82("div", { className: "semiont-domain-list", children: allowedDomains.map((domain) => /* @__PURE__ */ jsxs70("div", { className: "semiont-chip semiont-chip--primary", children: [
42525
42249
  "@",
42526
42250
  domain
42527
- ] }, domain)) }) : /* @__PURE__ */ jsx86("div", { className: "semiont-empty-message", children: t12.noDomainsConfigured })
42251
+ ] }, domain)) }) : /* @__PURE__ */ jsx82("div", { className: "semiont-empty-message", children: t12.noDomainsConfigured })
42528
42252
  ] }),
42529
- /* @__PURE__ */ jsx86("div", { className: "semiont-admin__info-box", children: /* @__PURE__ */ jsxs74("div", { className: "semiont-info-box__content", children: [
42530
- /* @__PURE__ */ jsx86(InformationCircleIcon_default, { className: "semiont-info-box__icon" }),
42531
- /* @__PURE__ */ jsxs74("div", { className: "semiont-info-box__text", children: [
42532
- /* @__PURE__ */ jsx86("p", { className: "semiont-info-box__title", children: t12.configManagementTitle }),
42533
- /* @__PURE__ */ jsx86("p", { className: "semiont-info-box__description", children: t12.configManagementDescription }),
42534
- /* @__PURE__ */ jsxs74("ul", { className: "semiont-info-box__list", children: [
42535
- /* @__PURE__ */ jsx86("li", { children: t12.configLocalDev }),
42536
- /* @__PURE__ */ jsxs74("li", { children: [
42253
+ /* @__PURE__ */ jsx82("div", { className: "semiont-admin__info-box", children: /* @__PURE__ */ jsxs70("div", { className: "semiont-info-box__content", children: [
42254
+ /* @__PURE__ */ jsx82(InformationCircleIcon_default, { className: "semiont-info-box__icon" }),
42255
+ /* @__PURE__ */ jsxs70("div", { className: "semiont-info-box__text", children: [
42256
+ /* @__PURE__ */ jsx82("p", { className: "semiont-info-box__title", children: t12.configManagementTitle }),
42257
+ /* @__PURE__ */ jsx82("p", { className: "semiont-info-box__description", children: t12.configManagementDescription }),
42258
+ /* @__PURE__ */ jsxs70("ul", { className: "semiont-info-box__list", children: [
42259
+ /* @__PURE__ */ jsx82("li", { children: t12.configLocalDev }),
42260
+ /* @__PURE__ */ jsxs70("li", { children: [
42537
42261
  t12.configCloudDeploy,
42538
42262
  " ",
42539
- /* @__PURE__ */ jsx86("code", { className: "semiont-code-inline", children: t12.configCloudDeployCommand }),
42263
+ /* @__PURE__ */ jsx82("code", { className: "semiont-code-inline", children: t12.configCloudDeployCommand }),
42540
42264
  " ",
42541
42265
  t12.configCloudDeployEnd
42542
42266
  ] }),
42543
- /* @__PURE__ */ jsx86("li", { children: t12.configAWS })
42267
+ /* @__PURE__ */ jsx82("li", { children: t12.configAWS })
42544
42268
  ] })
42545
42269
  ] })
42546
42270
  ] }) })
42547
42271
  ] }) }),
42548
- /* @__PURE__ */ jsxs74("div", { className: "semiont-page__sidebar", children: [
42549
- /* @__PURE__ */ jsx86(
42272
+ /* @__PURE__ */ jsxs70("div", { className: "semiont-page__sidebar", children: [
42273
+ /* @__PURE__ */ jsx82(
42550
42274
  ToolbarPanels,
42551
42275
  {
42552
42276
  activePanel,
42553
42277
  theme: theme2
42554
42278
  }
42555
42279
  ),
42556
- /* @__PURE__ */ jsx86(
42557
- Toolbar2,
42558
- {
42559
- context: "simple",
42560
- activePanel
42561
- }
42562
- )
42563
- ] })
42564
- ] });
42565
- }
42566
-
42567
- // src/features/moderation-linked-data/components/LinkedDataPage.tsx
42568
- import { jsx as jsx87, jsxs as jsxs75 } from "react/jsx-runtime";
42569
- function LinkedDataPage({
42570
- onExport,
42571
- isExporting,
42572
- onFileSelected,
42573
- onImport,
42574
- onCancelImport,
42575
- selectedFile,
42576
- preview,
42577
- isImporting,
42578
- importPhase,
42579
- importMessage,
42580
- importResult,
42581
- theme: theme2,
42582
- activePanel,
42583
- translations: t12,
42584
- ToolbarPanels,
42585
- Toolbar: Toolbar2
42586
- }) {
42587
- return /* @__PURE__ */ jsxs75("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
42588
- /* @__PURE__ */ jsxs75("div", { className: "semiont-page__content", children: [
42589
- /* @__PURE__ */ jsxs75("div", { className: "semiont-page__header", children: [
42590
- /* @__PURE__ */ jsx87("h1", { className: "semiont-page__title", children: t12.title }),
42591
- /* @__PURE__ */ jsx87("p", { className: "semiont-page__subtitle", children: t12.subtitle })
42592
- ] }),
42593
- /* @__PURE__ */ jsxs75("div", { className: "semiont-exchange__cards", children: [
42594
- /* @__PURE__ */ jsx87(
42595
- ExportCard,
42596
- {
42597
- onExport,
42598
- isExporting,
42599
- translations: t12.export
42600
- }
42601
- ),
42602
- /* @__PURE__ */ jsx87(
42603
- ImportCard,
42604
- {
42605
- onFileSelected,
42606
- onImport,
42607
- onCancel: onCancelImport,
42608
- selectedFile,
42609
- preview,
42610
- isImporting,
42611
- translations: t12.import
42612
- }
42613
- )
42614
- ] }),
42615
- importPhase && /* @__PURE__ */ jsx87(
42616
- ImportProgress,
42617
- {
42618
- phase: importPhase,
42619
- message: importMessage,
42620
- result: importResult,
42621
- translations: t12.progress
42622
- }
42623
- )
42624
- ] }),
42625
- /* @__PURE__ */ jsxs75("div", { className: "semiont-page__sidebar", children: [
42626
- /* @__PURE__ */ jsx87(
42627
- ToolbarPanels,
42628
- {
42629
- activePanel,
42630
- theme: theme2
42631
- }
42632
- ),
42633
- /* @__PURE__ */ jsx87(
42280
+ /* @__PURE__ */ jsx82(
42634
42281
  Toolbar2,
42635
42282
  {
42636
42283
  context: "simple",
@@ -42642,8 +42289,8 @@ function LinkedDataPage({
42642
42289
  }
42643
42290
 
42644
42291
  // src/features/admin-users/components/AdminUsersPage.tsx
42645
- import { useState as useState51 } from "react";
42646
- import { Fragment as Fragment16, jsx as jsx88, jsxs as jsxs76 } from "react/jsx-runtime";
42292
+ import { useState as useState50 } from "react";
42293
+ import { Fragment as Fragment16, jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
42647
42294
  function UserTableRow({
42648
42295
  user,
42649
42296
  onUpdate,
@@ -42660,48 +42307,48 @@ function UserTableRow({
42660
42307
  };
42661
42308
  const role = user.isAdmin ? "admin" : "user";
42662
42309
  const status = user.isActive ? "active" : "inactive";
42663
- return /* @__PURE__ */ jsxs76("tr", { className: "semiont-table__row", children: [
42664
- /* @__PURE__ */ jsx88("td", { className: "semiont-table__cell", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-user-info", children: [
42665
- /* @__PURE__ */ jsx88(UserCircleIcon_default, { className: "semiont-user-info__avatar" }),
42666
- /* @__PURE__ */ jsxs76("div", { children: [
42667
- /* @__PURE__ */ jsx88("div", { className: "semiont-user-info__name", children: user.name || t12.noName }),
42668
- /* @__PURE__ */ jsx88("div", { className: "semiont-user-info__email", children: user.email })
42310
+ return /* @__PURE__ */ jsxs71("tr", { className: "semiont-table__row", children: [
42311
+ /* @__PURE__ */ jsx83("td", { className: "semiont-table__cell", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-user-info", children: [
42312
+ /* @__PURE__ */ jsx83(UserCircleIcon_default, { className: "semiont-user-info__avatar" }),
42313
+ /* @__PURE__ */ jsxs71("div", { children: [
42314
+ /* @__PURE__ */ jsx83("div", { className: "semiont-user-info__name", children: user.name || t12.noName }),
42315
+ /* @__PURE__ */ jsx83("div", { className: "semiont-user-info__email", children: user.email })
42669
42316
  ] })
42670
42317
  ] }) }),
42671
- /* @__PURE__ */ jsx88("td", { className: "semiont-table__cell", children: /* @__PURE__ */ jsxs76("span", { className: "semiont-table__text--secondary", children: [
42318
+ /* @__PURE__ */ jsx83("td", { className: "semiont-table__cell", children: /* @__PURE__ */ jsxs71("span", { className: "semiont-table__text--secondary", children: [
42672
42319
  "@",
42673
42320
  user.domain
42674
42321
  ] }) }),
42675
- /* @__PURE__ */ jsx88("td", { className: "semiont-table__cell", children: /* @__PURE__ */ jsx88("span", { className: roleClasses[role], children: t12[role] }) }),
42676
- /* @__PURE__ */ jsx88("td", { className: "semiont-table__cell", children: /* @__PURE__ */ jsx88("span", { className: statusClasses[status], children: t12[status] }) }),
42677
- /* @__PURE__ */ jsx88("td", { className: "semiont-table__cell semiont-table__text--secondary", children: user.lastLogin ? new Date(user.lastLogin).toLocaleDateString() : t12.never }),
42678
- /* @__PURE__ */ jsx88("td", { className: "semiont-table__cell semiont-table__text--secondary", children: new Date(user.created).toLocaleDateString() }),
42679
- /* @__PURE__ */ jsx88("td", { className: "semiont-table__cell semiont-table__cell--actions", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-table__actions", children: [
42680
- /* @__PURE__ */ jsx88(
42322
+ /* @__PURE__ */ jsx83("td", { className: "semiont-table__cell", children: /* @__PURE__ */ jsx83("span", { className: roleClasses[role], children: t12[role] }) }),
42323
+ /* @__PURE__ */ jsx83("td", { className: "semiont-table__cell", children: /* @__PURE__ */ jsx83("span", { className: statusClasses[status], children: t12[status] }) }),
42324
+ /* @__PURE__ */ jsx83("td", { className: "semiont-table__cell semiont-table__text--secondary", children: user.lastLogin ? new Date(user.lastLogin).toLocaleDateString() : t12.never }),
42325
+ /* @__PURE__ */ jsx83("td", { className: "semiont-table__cell semiont-table__text--secondary", children: new Date(user.created).toLocaleDateString() }),
42326
+ /* @__PURE__ */ jsx83("td", { className: "semiont-table__cell semiont-table__cell--actions", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-table__actions", children: [
42327
+ /* @__PURE__ */ jsx83(
42681
42328
  "button",
42682
42329
  {
42683
42330
  onClick: () => onUpdate(user.id, { isAdmin: !user.isAdmin }),
42684
42331
  className: "semiont-action-button semiont-action-button--info",
42685
42332
  title: user.isAdmin ? t12.removeAdmin : t12.makeAdmin,
42686
- children: /* @__PURE__ */ jsx88(ShieldCheckIcon_default, { className: "semiont-action-button__icon" })
42333
+ children: /* @__PURE__ */ jsx83(ShieldCheckIcon_default, { className: "semiont-action-button__icon" })
42687
42334
  }
42688
42335
  ),
42689
- /* @__PURE__ */ jsx88(
42336
+ /* @__PURE__ */ jsx83(
42690
42337
  "button",
42691
42338
  {
42692
42339
  onClick: () => onUpdate(user.id, { isActive: !user.isActive }),
42693
42340
  className: "semiont-action-button semiont-action-button--warning",
42694
42341
  title: user.isActive ? t12.deactivateUser : t12.activateUser,
42695
- children: /* @__PURE__ */ jsx88(PencilIcon_default, { className: "semiont-action-button__icon" })
42342
+ children: /* @__PURE__ */ jsx83(PencilIcon_default, { className: "semiont-action-button__icon" })
42696
42343
  }
42697
42344
  ),
42698
- /* @__PURE__ */ jsx88(
42345
+ /* @__PURE__ */ jsx83(
42699
42346
  "button",
42700
42347
  {
42701
42348
  onClick: () => onDelete(user.id),
42702
42349
  className: "semiont-action-button semiont-action-button--danger",
42703
42350
  title: t12.deleteUser,
42704
- children: /* @__PURE__ */ jsx88(TrashIcon_default, { className: "semiont-action-button__icon" })
42351
+ children: /* @__PURE__ */ jsx83(TrashIcon_default, { className: "semiont-action-button__icon" })
42705
42352
  }
42706
42353
  )
42707
42354
  ] }) })
@@ -42723,9 +42370,9 @@ function AdminUsersPage({
42723
42370
  Toolbar: Toolbar2,
42724
42371
  buttonStyles: buttonStyles2
42725
42372
  }) {
42726
- const [searchTerm, setSearchTerm] = useState51("");
42727
- const [selectedRole, setSelectedRole] = useState51("all");
42728
- const [selectedStatus, setSelectedStatus] = useState51("all");
42373
+ const [searchTerm, setSearchTerm] = useState50("");
42374
+ const [selectedRole, setSelectedRole] = useState50("all");
42375
+ const [selectedStatus, setSelectedStatus] = useState50("all");
42729
42376
  const filteredUsers = users.filter((user) => {
42730
42377
  const matchesSearch = (user.name || "").toLowerCase().includes(searchTerm.toLowerCase()) || user.email.toLowerCase().includes(searchTerm.toLowerCase());
42731
42378
  const userRole = user.isAdmin ? "admin" : "user";
@@ -42734,60 +42381,60 @@ function AdminUsersPage({
42734
42381
  const matchesStatus = selectedStatus === "all" || userStatus === selectedStatus;
42735
42382
  return matchesSearch && matchesRole && matchesStatus;
42736
42383
  });
42737
- return /* @__PURE__ */ jsxs76("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
42738
- /* @__PURE__ */ jsx88("div", { className: "semiont-page__content", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-page__sections", children: [
42739
- /* @__PURE__ */ jsxs76("div", { className: "semiont-page__header-with-action", children: [
42740
- /* @__PURE__ */ jsxs76("div", { children: [
42741
- /* @__PURE__ */ jsx88("h1", { className: "semiont-page__title", children: t12.title }),
42742
- /* @__PURE__ */ jsx88("p", { className: "semiont-page__subtitle", children: t12.subtitle })
42384
+ return /* @__PURE__ */ jsxs71("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
42385
+ /* @__PURE__ */ jsx83("div", { className: "semiont-page__content", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-page__sections", children: [
42386
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-page__header-with-action", children: [
42387
+ /* @__PURE__ */ jsxs71("div", { children: [
42388
+ /* @__PURE__ */ jsx83("h1", { className: "semiont-page__title", children: t12.title }),
42389
+ /* @__PURE__ */ jsx83("p", { className: "semiont-page__subtitle", children: t12.subtitle })
42743
42390
  ] }),
42744
- /* @__PURE__ */ jsxs76("button", { onClick: onAddUser, className: buttonStyles2.primary.base, children: [
42745
- /* @__PURE__ */ jsx88(PlusIcon_default, { className: "semiont-button__icon" }),
42391
+ /* @__PURE__ */ jsxs71("button", { onClick: onAddUser, className: buttonStyles2.primary.base, children: [
42392
+ /* @__PURE__ */ jsx83(PlusIcon_default, { className: "semiont-button__icon" }),
42746
42393
  t12.addUser
42747
42394
  ] })
42748
42395
  ] }),
42749
- /* @__PURE__ */ jsx88("div", { className: "semiont-admin__stats-grid", children: isLoadingStats ? Array(4).fill(0).map((_4, i13) => /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card semiont-stat-card--loading", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__content", children: [
42750
- /* @__PURE__ */ jsx88("div", { className: "semiont-skeleton semiont-skeleton--icon" }),
42751
- /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__text", children: [
42752
- /* @__PURE__ */ jsx88("div", { className: "semiont-skeleton semiont-skeleton--text" }),
42753
- /* @__PURE__ */ jsx88("div", { className: "semiont-skeleton semiont-skeleton--number" })
42396
+ /* @__PURE__ */ jsx83("div", { className: "semiont-admin__stats-grid", children: isLoadingStats ? Array(4).fill(0).map((_4, i13) => /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card semiont-stat-card--loading", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__content", children: [
42397
+ /* @__PURE__ */ jsx83("div", { className: "semiont-skeleton semiont-skeleton--icon" }),
42398
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__text", children: [
42399
+ /* @__PURE__ */ jsx83("div", { className: "semiont-skeleton semiont-skeleton--text" }),
42400
+ /* @__PURE__ */ jsx83("div", { className: "semiont-skeleton semiont-skeleton--number" })
42754
42401
  ] })
42755
- ] }) }, i13)) : /* @__PURE__ */ jsxs76(Fragment16, { children: [
42756
- /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__content", children: [
42757
- /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx88(UserCircleIcon_default, { className: "semiont-stat-card__icon semiont-stat-card__icon--primary" }) }),
42758
- /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__text", children: [
42759
- /* @__PURE__ */ jsx88("p", { className: "semiont-stat-card__label", children: t12.totalUsers }),
42760
- /* @__PURE__ */ jsx88("p", { className: "semiont-stat-card__value", children: userStats?.totalUsers ?? 0 })
42402
+ ] }) }, i13)) : /* @__PURE__ */ jsxs71(Fragment16, { children: [
42403
+ /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__content", children: [
42404
+ /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx83(UserCircleIcon_default, { className: "semiont-stat-card__icon semiont-stat-card__icon--primary" }) }),
42405
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__text", children: [
42406
+ /* @__PURE__ */ jsx83("p", { className: "semiont-stat-card__label", children: t12.totalUsers }),
42407
+ /* @__PURE__ */ jsx83("p", { className: "semiont-stat-card__value", children: userStats?.totalUsers ?? 0 })
42761
42408
  ] })
42762
42409
  ] }) }),
42763
- /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__content", children: [
42764
- /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card__status-indicator semiont-stat-card__status-indicator--active", children: /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card__status-dot" }) }) }),
42765
- /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__text", children: [
42766
- /* @__PURE__ */ jsx88("p", { className: "semiont-stat-card__label", children: t12.activeUsers }),
42767
- /* @__PURE__ */ jsx88("p", { className: "semiont-stat-card__value", children: userStats?.activeUsers ?? 0 })
42410
+ /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__content", children: [
42411
+ /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card__status-indicator semiont-stat-card__status-indicator--active", children: /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card__status-dot" }) }) }),
42412
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__text", children: [
42413
+ /* @__PURE__ */ jsx83("p", { className: "semiont-stat-card__label", children: t12.activeUsers }),
42414
+ /* @__PURE__ */ jsx83("p", { className: "semiont-stat-card__value", children: userStats?.activeUsers ?? 0 })
42768
42415
  ] })
42769
42416
  ] }) }),
42770
- /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__content", children: [
42771
- /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx88(ShieldCheckIcon_default, { className: "semiont-stat-card__icon semiont-stat-card__icon--danger" }) }),
42772
- /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__text", children: [
42773
- /* @__PURE__ */ jsx88("p", { className: "semiont-stat-card__label", children: t12.administrators }),
42774
- /* @__PURE__ */ jsx88("p", { className: "semiont-stat-card__value", children: userStats?.adminUsers ?? 0 })
42417
+ /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__content", children: [
42418
+ /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx83(ShieldCheckIcon_default, { className: "semiont-stat-card__icon semiont-stat-card__icon--danger" }) }),
42419
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__text", children: [
42420
+ /* @__PURE__ */ jsx83("p", { className: "semiont-stat-card__label", children: t12.administrators }),
42421
+ /* @__PURE__ */ jsx83("p", { className: "semiont-stat-card__value", children: userStats?.adminUsers ?? 0 })
42775
42422
  ] })
42776
42423
  ] }) }),
42777
- /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__content", children: [
42778
- /* @__PURE__ */ jsx88("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx88(ExclamationTriangleIcon_default, { className: "semiont-stat-card__icon semiont-stat-card__icon--warning" }) }),
42779
- /* @__PURE__ */ jsxs76("div", { className: "semiont-stat-card__text", children: [
42780
- /* @__PURE__ */ jsx88("p", { className: "semiont-stat-card__label", children: t12.recentUsers }),
42781
- /* @__PURE__ */ jsx88("p", { className: "semiont-stat-card__value", children: userStats?.recentSignups?.length ?? 0 })
42424
+ /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__content", children: [
42425
+ /* @__PURE__ */ jsx83("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx83(ExclamationTriangleIcon_default, { className: "semiont-stat-card__icon semiont-stat-card__icon--warning" }) }),
42426
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-stat-card__text", children: [
42427
+ /* @__PURE__ */ jsx83("p", { className: "semiont-stat-card__label", children: t12.recentUsers }),
42428
+ /* @__PURE__ */ jsx83("p", { className: "semiont-stat-card__value", children: userStats?.recentSignups?.length ?? 0 })
42782
42429
  ] })
42783
42430
  ] }) })
42784
42431
  ] }) }),
42785
- /* @__PURE__ */ jsx88("div", { className: "semiont-admin__filters-card", children: /* @__PURE__ */ jsxs76("div", { className: "semiont-admin__filters-grid", children: [
42786
- /* @__PURE__ */ jsxs76("div", { className: "semiont-form__field", children: [
42787
- /* @__PURE__ */ jsx88("label", { htmlFor: "search", className: "semiont-form__label", children: t12.searchUsers }),
42788
- /* @__PURE__ */ jsxs76("div", { className: "semiont-search-input", children: [
42789
- /* @__PURE__ */ jsx88("div", { className: "semiont-search-input__icon", children: /* @__PURE__ */ jsx88(MagnifyingGlassIcon_default, { className: "semiont-icon semiont-icon--small" }) }),
42790
- /* @__PURE__ */ jsx88(
42432
+ /* @__PURE__ */ jsx83("div", { className: "semiont-admin__filters-card", children: /* @__PURE__ */ jsxs71("div", { className: "semiont-admin__filters-grid", children: [
42433
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-form__field", children: [
42434
+ /* @__PURE__ */ jsx83("label", { htmlFor: "search", className: "semiont-form__label", children: t12.searchUsers }),
42435
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-search-input", children: [
42436
+ /* @__PURE__ */ jsx83("div", { className: "semiont-search-input__icon", children: /* @__PURE__ */ jsx83(MagnifyingGlassIcon_default, { className: "semiont-icon semiont-icon--small" }) }),
42437
+ /* @__PURE__ */ jsx83(
42791
42438
  "input",
42792
42439
  {
42793
42440
  type: "text",
@@ -42800,9 +42447,9 @@ function AdminUsersPage({
42800
42447
  )
42801
42448
  ] })
42802
42449
  ] }),
42803
- /* @__PURE__ */ jsxs76("div", { className: "semiont-form__field", children: [
42804
- /* @__PURE__ */ jsx88("label", { htmlFor: "role", className: "semiont-form__label", children: t12.role }),
42805
- /* @__PURE__ */ jsxs76(
42450
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-form__field", children: [
42451
+ /* @__PURE__ */ jsx83("label", { htmlFor: "role", className: "semiont-form__label", children: t12.role }),
42452
+ /* @__PURE__ */ jsxs71(
42806
42453
  "select",
42807
42454
  {
42808
42455
  id: "role",
@@ -42810,16 +42457,16 @@ function AdminUsersPage({
42810
42457
  value: selectedRole,
42811
42458
  onChange: (e6) => setSelectedRole(e6.target.value),
42812
42459
  children: [
42813
- /* @__PURE__ */ jsx88("option", { value: "all", children: t12.allRoles }),
42814
- /* @__PURE__ */ jsx88("option", { value: "admin", children: t12.admin }),
42815
- /* @__PURE__ */ jsx88("option", { value: "user", children: t12.user })
42460
+ /* @__PURE__ */ jsx83("option", { value: "all", children: t12.allRoles }),
42461
+ /* @__PURE__ */ jsx83("option", { value: "admin", children: t12.admin }),
42462
+ /* @__PURE__ */ jsx83("option", { value: "user", children: t12.user })
42816
42463
  ]
42817
42464
  }
42818
42465
  )
42819
42466
  ] }),
42820
- /* @__PURE__ */ jsxs76("div", { className: "semiont-form__field", children: [
42821
- /* @__PURE__ */ jsx88("label", { htmlFor: "status", className: "semiont-form__label", children: t12.status }),
42822
- /* @__PURE__ */ jsxs76(
42467
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-form__field", children: [
42468
+ /* @__PURE__ */ jsx83("label", { htmlFor: "status", className: "semiont-form__label", children: t12.status }),
42469
+ /* @__PURE__ */ jsxs71(
42823
42470
  "select",
42824
42471
  {
42825
42472
  id: "status",
@@ -42827,30 +42474,30 @@ function AdminUsersPage({
42827
42474
  value: selectedStatus,
42828
42475
  onChange: (e6) => setSelectedStatus(e6.target.value),
42829
42476
  children: [
42830
- /* @__PURE__ */ jsx88("option", { value: "all", children: t12.allStatus }),
42831
- /* @__PURE__ */ jsx88("option", { value: "active", children: t12.active }),
42832
- /* @__PURE__ */ jsx88("option", { value: "inactive", children: t12.inactive })
42477
+ /* @__PURE__ */ jsx83("option", { value: "all", children: t12.allStatus }),
42478
+ /* @__PURE__ */ jsx83("option", { value: "active", children: t12.active }),
42479
+ /* @__PURE__ */ jsx83("option", { value: "inactive", children: t12.inactive })
42833
42480
  ]
42834
42481
  }
42835
42482
  )
42836
42483
  ] }),
42837
- /* @__PURE__ */ jsx88("div", { className: "semiont-form__field semiont-form__field--align-end", children: /* @__PURE__ */ jsx88("button", { onClick: onExportUsers, className: `${buttonStyles2.secondary.base} semiont-button--full-width`, children: t12.exportUsers }) })
42484
+ /* @__PURE__ */ jsx83("div", { className: "semiont-form__field semiont-form__field--align-end", children: /* @__PURE__ */ jsx83("button", { onClick: onExportUsers, className: `${buttonStyles2.secondary.base} semiont-button--full-width`, children: t12.exportUsers }) })
42838
42485
  ] }) }),
42839
- /* @__PURE__ */ jsxs76("div", { className: "semiont-admin__table-card", children: [
42840
- /* @__PURE__ */ jsx88("div", { className: "semiont-table-container", children: isLoadingUsers ? /* @__PURE__ */ jsxs76("div", { className: "semiont-loading-state", children: [
42841
- /* @__PURE__ */ jsx88("div", { className: "semiont-spinner" }),
42842
- /* @__PURE__ */ jsx88("p", { className: "semiont-loading-state__text", children: t12.loadingUsers })
42843
- ] }) : /* @__PURE__ */ jsxs76("table", { className: "semiont-table", children: [
42844
- /* @__PURE__ */ jsx88("thead", { className: "semiont-table__head", children: /* @__PURE__ */ jsxs76("tr", { children: [
42845
- /* @__PURE__ */ jsx88("th", { className: "semiont-table__header", children: t12.userColumn }),
42846
- /* @__PURE__ */ jsx88("th", { className: "semiont-table__header", children: t12.domainColumn }),
42847
- /* @__PURE__ */ jsx88("th", { className: "semiont-table__header", children: t12.roleColumn }),
42848
- /* @__PURE__ */ jsx88("th", { className: "semiont-table__header", children: t12.statusColumn }),
42849
- /* @__PURE__ */ jsx88("th", { className: "semiont-table__header", children: t12.lastLoginColumn }),
42850
- /* @__PURE__ */ jsx88("th", { className: "semiont-table__header", children: t12.joinedColumn }),
42851
- /* @__PURE__ */ jsx88("th", { className: "semiont-table__header semiont-table__header--actions", children: t12.actionsColumn })
42486
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-admin__table-card", children: [
42487
+ /* @__PURE__ */ jsx83("div", { className: "semiont-table-container", children: isLoadingUsers ? /* @__PURE__ */ jsxs71("div", { className: "semiont-loading-state", children: [
42488
+ /* @__PURE__ */ jsx83("div", { className: "semiont-spinner" }),
42489
+ /* @__PURE__ */ jsx83("p", { className: "semiont-loading-state__text", children: t12.loadingUsers })
42490
+ ] }) : /* @__PURE__ */ jsxs71("table", { className: "semiont-table", children: [
42491
+ /* @__PURE__ */ jsx83("thead", { className: "semiont-table__head", children: /* @__PURE__ */ jsxs71("tr", { children: [
42492
+ /* @__PURE__ */ jsx83("th", { className: "semiont-table__header", children: t12.userColumn }),
42493
+ /* @__PURE__ */ jsx83("th", { className: "semiont-table__header", children: t12.domainColumn }),
42494
+ /* @__PURE__ */ jsx83("th", { className: "semiont-table__header", children: t12.roleColumn }),
42495
+ /* @__PURE__ */ jsx83("th", { className: "semiont-table__header", children: t12.statusColumn }),
42496
+ /* @__PURE__ */ jsx83("th", { className: "semiont-table__header", children: t12.lastLoginColumn }),
42497
+ /* @__PURE__ */ jsx83("th", { className: "semiont-table__header", children: t12.joinedColumn }),
42498
+ /* @__PURE__ */ jsx83("th", { className: "semiont-table__header semiont-table__header--actions", children: t12.actionsColumn })
42852
42499
  ] }) }),
42853
- /* @__PURE__ */ jsx88("tbody", { className: "semiont-table__body", children: filteredUsers.map((user) => /* @__PURE__ */ jsx88(
42500
+ /* @__PURE__ */ jsx83("tbody", { className: "semiont-table__body", children: filteredUsers.map((user) => /* @__PURE__ */ jsx83(
42854
42501
  UserTableRow,
42855
42502
  {
42856
42503
  user,
@@ -42861,22 +42508,22 @@ function AdminUsersPage({
42861
42508
  user.id
42862
42509
  )) })
42863
42510
  ] }) }),
42864
- !isLoadingUsers && filteredUsers.length === 0 && /* @__PURE__ */ jsxs76("div", { className: "semiont-empty-state", children: [
42865
- /* @__PURE__ */ jsx88(UserCircleIcon_default, { className: "semiont-empty-state__icon" }),
42866
- /* @__PURE__ */ jsx88("h3", { className: "semiont-empty-state__title", children: t12.noUsersFound }),
42867
- /* @__PURE__ */ jsx88("p", { className: "semiont-empty-state__description", children: t12.noUsersFoundDescription })
42511
+ !isLoadingUsers && filteredUsers.length === 0 && /* @__PURE__ */ jsxs71("div", { className: "semiont-empty-state", children: [
42512
+ /* @__PURE__ */ jsx83(UserCircleIcon_default, { className: "semiont-empty-state__icon" }),
42513
+ /* @__PURE__ */ jsx83("h3", { className: "semiont-empty-state__title", children: t12.noUsersFound }),
42514
+ /* @__PURE__ */ jsx83("p", { className: "semiont-empty-state__description", children: t12.noUsersFoundDescription })
42868
42515
  ] })
42869
42516
  ] })
42870
42517
  ] }) }),
42871
- /* @__PURE__ */ jsxs76("div", { className: "semiont-page__sidebar", children: [
42872
- /* @__PURE__ */ jsx88(
42518
+ /* @__PURE__ */ jsxs71("div", { className: "semiont-page__sidebar", children: [
42519
+ /* @__PURE__ */ jsx83(
42873
42520
  ToolbarPanels,
42874
42521
  {
42875
42522
  activePanel,
42876
42523
  theme: theme2
42877
42524
  }
42878
42525
  ),
42879
- /* @__PURE__ */ jsx88(
42526
+ /* @__PURE__ */ jsx83(
42880
42527
  Toolbar2,
42881
42528
  {
42882
42529
  context: "simple",
@@ -42888,32 +42535,32 @@ function AdminUsersPage({
42888
42535
  }
42889
42536
 
42890
42537
  // src/features/auth/components/SignInForm.tsx
42891
- import React46 from "react";
42892
- import { Fragment as Fragment17, jsx as jsx89, jsxs as jsxs77 } from "react/jsx-runtime";
42538
+ import React45 from "react";
42539
+ import { Fragment as Fragment17, jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
42893
42540
  function GoogleIcon() {
42894
- return /* @__PURE__ */ jsxs77("svg", { className: "semiont-icon semiont-icon--small semiont-icon--inline", viewBox: "0 0 24 24", children: [
42895
- /* @__PURE__ */ jsx89(
42541
+ return /* @__PURE__ */ jsxs72("svg", { className: "semiont-icon semiont-icon--small semiont-icon--inline", viewBox: "0 0 24 24", children: [
42542
+ /* @__PURE__ */ jsx84(
42896
42543
  "path",
42897
42544
  {
42898
42545
  fill: "currentColor",
42899
42546
  d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
42900
42547
  }
42901
42548
  ),
42902
- /* @__PURE__ */ jsx89(
42549
+ /* @__PURE__ */ jsx84(
42903
42550
  "path",
42904
42551
  {
42905
42552
  fill: "currentColor",
42906
42553
  d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
42907
42554
  }
42908
42555
  ),
42909
- /* @__PURE__ */ jsx89(
42556
+ /* @__PURE__ */ jsx84(
42910
42557
  "path",
42911
42558
  {
42912
42559
  fill: "currentColor",
42913
42560
  d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
42914
42561
  }
42915
42562
  ),
42916
- /* @__PURE__ */ jsx89(
42563
+ /* @__PURE__ */ jsx84(
42917
42564
  "path",
42918
42565
  {
42919
42566
  fill: "currentColor",
@@ -42929,23 +42576,23 @@ function normalizeUrlForProbe(raw) {
42929
42576
  return `http://${trimmed}`;
42930
42577
  }
42931
42578
  function CredentialsAuthForm({
42932
- lockedBackendUrl,
42579
+ lockedGatewayUrl,
42933
42580
  onSubmit,
42934
42581
  translations: t12
42935
42582
  }) {
42936
- const [backendUrl, setBackendUrl] = React46.useState(lockedBackendUrl ?? "");
42937
- const [email, setEmail] = React46.useState("");
42938
- const [password, setPassword] = React46.useState("");
42939
- const [validationError, setValidationError] = React46.useState(null);
42940
- const [fieldErrors, setFieldErrors] = React46.useState({});
42941
- const [urlProbeStatus, setUrlProbeStatus] = React46.useState("idle");
42583
+ const [gatewayUrl, setGatewayUrl] = React45.useState(lockedGatewayUrl ?? "");
42584
+ const [email, setEmail] = React45.useState("");
42585
+ const [password, setPassword] = React45.useState("");
42586
+ const [validationError, setValidationError] = React45.useState(null);
42587
+ const [fieldErrors, setFieldErrors] = React45.useState({});
42588
+ const [urlProbeStatus, setUrlProbeStatus] = React45.useState("idle");
42942
42589
  const probeUrl = async (raw) => {
42943
42590
  const url = normalizeUrlForProbe(raw);
42944
42591
  if (!url) return;
42945
42592
  try {
42946
42593
  new URL(url);
42947
42594
  } catch {
42948
- setFieldErrors((prev) => ({ ...prev, backendUrl: t12.errorBackendUrlInvalid }));
42595
+ setFieldErrors((prev) => ({ ...prev, gatewayUrl: t12.errorGatewayUrlInvalid }));
42949
42596
  setUrlProbeStatus("error");
42950
42597
  return;
42951
42598
  }
@@ -42954,17 +42601,17 @@ function CredentialsAuthForm({
42954
42601
  const res = await fetch(`${url}/api/health`, { signal: AbortSignal.timeout(5e3) });
42955
42602
  setUrlProbeStatus(res.ok ? "ok" : "error");
42956
42603
  if (!res.ok) {
42957
- setFieldErrors((prev) => ({ ...prev, backendUrl: t12.errorBackendUrlUnreachable }));
42604
+ setFieldErrors((prev) => ({ ...prev, gatewayUrl: t12.errorGatewayUrlUnreachable }));
42958
42605
  }
42959
42606
  } catch {
42960
42607
  setUrlProbeStatus("error");
42961
- setFieldErrors((prev) => ({ ...prev, backendUrl: t12.errorBackendUrlUnreachable }));
42608
+ setFieldErrors((prev) => ({ ...prev, gatewayUrl: t12.errorGatewayUrlUnreachable }));
42962
42609
  }
42963
42610
  };
42964
42611
  const handleSubmit = async (e6) => {
42965
42612
  e6.preventDefault();
42966
42613
  const errors = {};
42967
- if (!backendUrl.trim()) errors.backendUrl = t12.errorBackendUrlRequired;
42614
+ if (!gatewayUrl.trim()) errors.gatewayUrl = t12.errorGatewayUrlRequired;
42968
42615
  if (!email) errors.email = t12.errorEmailRequired;
42969
42616
  if (!password) errors.password = t12.errorPasswordRequired;
42970
42617
  if (Object.keys(errors).length > 0) {
@@ -42974,9 +42621,9 @@ function CredentialsAuthForm({
42974
42621
  }
42975
42622
  setFieldErrors({});
42976
42623
  setValidationError(null);
42977
- await onSubmit(backendUrl.trim(), email, password);
42624
+ await onSubmit(gatewayUrl.trim(), email, password);
42978
42625
  };
42979
- const probeIndicator = !lockedBackendUrl && urlProbeStatus !== "idle" ? /* @__PURE__ */ jsxs77(
42626
+ const probeIndicator = !lockedGatewayUrl && urlProbeStatus !== "idle" ? /* @__PURE__ */ jsxs72(
42980
42627
  "span",
42981
42628
  {
42982
42629
  className: `semiont-form__url-status semiont-form__url-status--${urlProbeStatus}`,
@@ -42988,42 +42635,42 @@ function CredentialsAuthForm({
42988
42635
  ]
42989
42636
  }
42990
42637
  ) : null;
42991
- return /* @__PURE__ */ jsxs77(Fragment17, { children: [
42992
- validationError && /* @__PURE__ */ jsx89("div", { className: "semiont-auth__error", role: "alert", "aria-live": "polite", children: /* @__PURE__ */ jsx89("div", { className: "semiont-auth__error-text", children: validationError }) }),
42993
- /* @__PURE__ */ jsxs77("form", { onSubmit: handleSubmit, className: "semiont-auth__form", noValidate: true, children: [
42994
- /* @__PURE__ */ jsxs77("div", { className: "semiont-form__field", children: [
42995
- /* @__PURE__ */ jsx89("label", { htmlFor: "backend-url", className: "semiont-form__label", children: t12.backendUrlLabel }),
42996
- /* @__PURE__ */ jsxs77("div", { className: "semiont-form__input-row", children: [
42997
- /* @__PURE__ */ jsx89(
42638
+ return /* @__PURE__ */ jsxs72(Fragment17, { children: [
42639
+ validationError && /* @__PURE__ */ jsx84("div", { className: "semiont-auth__error", role: "alert", "aria-live": "polite", children: /* @__PURE__ */ jsx84("div", { className: "semiont-auth__error-text", children: validationError }) }),
42640
+ /* @__PURE__ */ jsxs72("form", { onSubmit: handleSubmit, className: "semiont-auth__form", noValidate: true, children: [
42641
+ /* @__PURE__ */ jsxs72("div", { className: "semiont-form__field", children: [
42642
+ /* @__PURE__ */ jsx84("label", { htmlFor: "gateway-url", className: "semiont-form__label", children: t12.gatewayUrlLabel }),
42643
+ /* @__PURE__ */ jsxs72("div", { className: "semiont-form__input-row", children: [
42644
+ /* @__PURE__ */ jsx84(
42998
42645
  "input",
42999
42646
  {
43000
- id: "backend-url",
42647
+ id: "gateway-url",
43001
42648
  type: "url",
43002
- value: backendUrl,
42649
+ value: gatewayUrl,
43003
42650
  onChange: (e6) => {
43004
- if (lockedBackendUrl) return;
43005
- setBackendUrl(e6.target.value);
42651
+ if (lockedGatewayUrl) return;
42652
+ setGatewayUrl(e6.target.value);
43006
42653
  setUrlProbeStatus("idle");
43007
- if (fieldErrors.backendUrl) setFieldErrors({ ...fieldErrors, backendUrl: void 0 });
42654
+ if (fieldErrors.gatewayUrl) setFieldErrors({ ...fieldErrors, gatewayUrl: void 0 });
43008
42655
  },
43009
42656
  onBlur: () => {
43010
- if (!lockedBackendUrl) probeUrl(backendUrl);
42657
+ if (!lockedGatewayUrl) probeUrl(gatewayUrl);
43011
42658
  },
43012
- readOnly: !!lockedBackendUrl,
43013
- placeholder: t12.backendUrlPlaceholder,
43014
- className: `semiont-input${lockedBackendUrl ? " semiont-input--readonly" : ""}`,
43015
- "aria-invalid": !!fieldErrors.backendUrl,
43016
- "aria-describedby": fieldErrors.backendUrl ? "backend-url-error" : void 0,
42659
+ readOnly: !!lockedGatewayUrl,
42660
+ placeholder: t12.gatewayUrlPlaceholder,
42661
+ className: `semiont-input${lockedGatewayUrl ? " semiont-input--readonly" : ""}`,
42662
+ "aria-invalid": !!fieldErrors.gatewayUrl,
42663
+ "aria-describedby": fieldErrors.gatewayUrl ? "gateway-url-error" : void 0,
43017
42664
  required: true
43018
42665
  }
43019
42666
  ),
43020
42667
  probeIndicator
43021
42668
  ] }),
43022
- fieldErrors.backendUrl && /* @__PURE__ */ jsx89("span", { id: "backend-url-error", className: "semiont-form__error", role: "alert", children: fieldErrors.backendUrl })
42669
+ fieldErrors.gatewayUrl && /* @__PURE__ */ jsx84("span", { id: "gateway-url-error", className: "semiont-form__error", role: "alert", children: fieldErrors.gatewayUrl })
43023
42670
  ] }),
43024
- /* @__PURE__ */ jsxs77("div", { className: "semiont-form__field", children: [
43025
- /* @__PURE__ */ jsx89("label", { htmlFor: "email", className: "semiont-form__label", children: t12.emailLabel }),
43026
- /* @__PURE__ */ jsx89(
42671
+ /* @__PURE__ */ jsxs72("div", { className: "semiont-form__field", children: [
42672
+ /* @__PURE__ */ jsx84("label", { htmlFor: "email", className: "semiont-form__label", children: t12.emailLabel }),
42673
+ /* @__PURE__ */ jsx84(
43027
42674
  "input",
43028
42675
  {
43029
42676
  id: "email",
@@ -43040,11 +42687,11 @@ function CredentialsAuthForm({
43040
42687
  required: true
43041
42688
  }
43042
42689
  ),
43043
- fieldErrors.email && /* @__PURE__ */ jsx89("span", { id: "email-error", className: "semiont-form__error", role: "alert", children: fieldErrors.email })
42690
+ fieldErrors.email && /* @__PURE__ */ jsx84("span", { id: "email-error", className: "semiont-form__error", role: "alert", children: fieldErrors.email })
43044
42691
  ] }),
43045
- /* @__PURE__ */ jsxs77("div", { className: "semiont-form__field", children: [
43046
- /* @__PURE__ */ jsx89("label", { htmlFor: "password", className: "semiont-form__label", children: t12.passwordLabel }),
43047
- /* @__PURE__ */ jsx89(
42692
+ /* @__PURE__ */ jsxs72("div", { className: "semiont-form__field", children: [
42693
+ /* @__PURE__ */ jsx84("label", { htmlFor: "password", className: "semiont-form__label", children: t12.passwordLabel }),
42694
+ /* @__PURE__ */ jsx84(
43048
42695
  "input",
43049
42696
  {
43050
42697
  id: "password",
@@ -43061,83 +42708,83 @@ function CredentialsAuthForm({
43061
42708
  required: true
43062
42709
  }
43063
42710
  ),
43064
- fieldErrors.password && /* @__PURE__ */ jsx89("span", { id: "password-error", className: "semiont-form__error", role: "alert", children: fieldErrors.password })
42711
+ fieldErrors.password && /* @__PURE__ */ jsx84("span", { id: "password-error", className: "semiont-form__error", role: "alert", children: fieldErrors.password })
43065
42712
  ] }),
43066
- /* @__PURE__ */ jsx89("button", { type: "submit", className: `${buttonStyles.primary.base} semiont-button--full-width`, children: t12.signInWithCredentials })
42713
+ /* @__PURE__ */ jsx84("button", { type: "submit", className: `${buttonStyles.primary.base} semiont-button--full-width`, children: t12.signInWithCredentials })
43067
42714
  ] }),
43068
- /* @__PURE__ */ jsxs77("div", { className: "semiont-auth__divider", children: [
43069
- /* @__PURE__ */ jsx89("div", { className: "semiont-auth__divider-line" }),
43070
- /* @__PURE__ */ jsx89("div", { className: "semiont-auth__divider-text", children: t12.or })
42715
+ /* @__PURE__ */ jsxs72("div", { className: "semiont-auth__divider", children: [
42716
+ /* @__PURE__ */ jsx84("div", { className: "semiont-auth__divider-line" }),
42717
+ /* @__PURE__ */ jsx84("div", { className: "semiont-auth__divider-text", children: t12.or })
43071
42718
  ] })
43072
42719
  ] });
43073
42720
  }
43074
42721
  function SignInForm({
43075
42722
  onGoogleSignIn,
43076
42723
  onCredentialsSignIn,
43077
- backendUrl,
42724
+ gatewayUrl,
43078
42725
  error,
43079
42726
  showCredentialsAuth = false,
43080
42727
  isLoading = false,
43081
42728
  translations: t12
43082
42729
  }) {
43083
42730
  const handleGoogleClick = () => {
43084
- if (backendUrl) {
43085
- onGoogleSignIn(backendUrl);
42731
+ if (gatewayUrl) {
42732
+ onGoogleSignIn(gatewayUrl);
43086
42733
  }
43087
42734
  };
43088
- return /* @__PURE__ */ jsx89("main", { className: "semiont-auth__main", role: "main", children: /* @__PURE__ */ jsx89("div", { className: "semiont-auth__container", children: /* @__PURE__ */ jsxs77("div", { className: "semiont-auth__content", children: [
43089
- /* @__PURE__ */ jsxs77("section", { "aria-labelledby": "signin-heading", className: "semiont-auth__branding", children: [
43090
- /* @__PURE__ */ jsx89("h1", { id: "signin-heading", className: "sr-only", children: t12.pageTitle }),
43091
- /* @__PURE__ */ jsx89(SemiontBranding, { t: (key) => t12[key] || key, size: "xl", animated: true, className: "semiont-auth__logo" }),
43092
- /* @__PURE__ */ jsx89("p", { className: "semiont-auth__welcome", children: t12.welcomeBack }),
43093
- /* @__PURE__ */ jsx89("p", { className: "semiont-auth__subtitle", children: t12.signInPrompt })
42735
+ return /* @__PURE__ */ jsx84("main", { className: "semiont-auth__main", role: "main", children: /* @__PURE__ */ jsx84("div", { className: "semiont-auth__container", children: /* @__PURE__ */ jsxs72("div", { className: "semiont-auth__content", children: [
42736
+ /* @__PURE__ */ jsxs72("section", { "aria-labelledby": "signin-heading", className: "semiont-auth__branding", children: [
42737
+ /* @__PURE__ */ jsx84("h1", { id: "signin-heading", className: "sr-only", children: t12.pageTitle }),
42738
+ /* @__PURE__ */ jsx84(SemiontBranding, { t: (key) => t12[key] || key, size: "xl", animated: true, className: "semiont-auth__logo" }),
42739
+ /* @__PURE__ */ jsx84("p", { className: "semiont-auth__welcome", children: t12.welcomeBack }),
42740
+ /* @__PURE__ */ jsx84("p", { className: "semiont-auth__subtitle", children: t12.signInPrompt })
43094
42741
  ] }),
43095
- error && /* @__PURE__ */ jsx89("div", { className: "semiont-auth__error-container", children: /* @__PURE__ */ jsx89("div", { className: "semiont-auth__error", children: /* @__PURE__ */ jsx89("div", { className: "semiont-auth__error-text", children: error }) }) }),
43096
- /* @__PURE__ */ jsx89("div", { className: "semiont-auth__forms", children: !isLoading ? /* @__PURE__ */ jsxs77(Fragment17, { children: [
43097
- showCredentialsAuth && onCredentialsSignIn && /* @__PURE__ */ jsx89(
42742
+ error && /* @__PURE__ */ jsx84("div", { className: "semiont-auth__error-container", children: /* @__PURE__ */ jsx84("div", { className: "semiont-auth__error", children: /* @__PURE__ */ jsx84("div", { className: "semiont-auth__error-text", children: error }) }) }),
42743
+ /* @__PURE__ */ jsx84("div", { className: "semiont-auth__forms", children: !isLoading ? /* @__PURE__ */ jsxs72(Fragment17, { children: [
42744
+ showCredentialsAuth && onCredentialsSignIn && /* @__PURE__ */ jsx84(
43098
42745
  CredentialsAuthForm,
43099
42746
  {
43100
- lockedBackendUrl: backendUrl,
42747
+ lockedGatewayUrl: gatewayUrl,
43101
42748
  onSubmit: onCredentialsSignIn,
43102
42749
  translations: t12
43103
42750
  }
43104
42751
  ),
43105
- backendUrl && /* @__PURE__ */ jsxs77("button", { onClick: handleGoogleClick, className: `${buttonStyles.primary.base} semiont-button--full-width`, children: [
43106
- /* @__PURE__ */ jsx89(GoogleIcon, {}),
42752
+ gatewayUrl && /* @__PURE__ */ jsxs72("button", { onClick: handleGoogleClick, className: `${buttonStyles.primary.base} semiont-button--full-width`, children: [
42753
+ /* @__PURE__ */ jsx84(GoogleIcon, {}),
43107
42754
  t12.continueWithGoogle
43108
42755
  ] }),
43109
- /* @__PURE__ */ jsx89("div", { className: "semiont-auth__info", children: showCredentialsAuth ? t12.credentialsAuthEnabled : t12.approvedDomainsOnly })
43110
- ] }) : /* @__PURE__ */ jsx89("div", { className: "semiont-auth__loading", "aria-busy": "true", "aria-live": "polite", children: /* @__PURE__ */ jsx89("div", { style: { height: "200px" } }) }) })
42756
+ /* @__PURE__ */ jsx84("div", { className: "semiont-auth__info", children: showCredentialsAuth ? t12.credentialsAuthEnabled : t12.approvedDomainsOnly })
42757
+ ] }) : /* @__PURE__ */ jsx84("div", { className: "semiont-auth__loading", "aria-busy": "true", "aria-live": "polite", children: /* @__PURE__ */ jsx84("div", { style: { height: "200px" } }) }) })
43111
42758
  ] }) }) });
43112
42759
  }
43113
42760
 
43114
42761
  // src/features/auth/components/SignUpForm.tsx
43115
- import { useState as useState52 } from "react";
43116
- import { jsx as jsx90, jsxs as jsxs78 } from "react/jsx-runtime";
42762
+ import { useState as useState51 } from "react";
42763
+ import { jsx as jsx85, jsxs as jsxs73 } from "react/jsx-runtime";
43117
42764
  function GoogleIcon2() {
43118
- return /* @__PURE__ */ jsxs78("svg", { className: "semiont-icon semiont-icon--small semiont-icon--inline", viewBox: "0 0 24 24", children: [
43119
- /* @__PURE__ */ jsx90(
42765
+ return /* @__PURE__ */ jsxs73("svg", { className: "semiont-icon semiont-icon--small semiont-icon--inline", viewBox: "0 0 24 24", children: [
42766
+ /* @__PURE__ */ jsx85(
43120
42767
  "path",
43121
42768
  {
43122
42769
  fill: "currentColor",
43123
42770
  d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
43124
42771
  }
43125
42772
  ),
43126
- /* @__PURE__ */ jsx90(
42773
+ /* @__PURE__ */ jsx85(
43127
42774
  "path",
43128
42775
  {
43129
42776
  fill: "currentColor",
43130
42777
  d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
43131
42778
  }
43132
42779
  ),
43133
- /* @__PURE__ */ jsx90(
42780
+ /* @__PURE__ */ jsx85(
43134
42781
  "path",
43135
42782
  {
43136
42783
  fill: "currentColor",
43137
42784
  d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
43138
42785
  }
43139
42786
  ),
43140
- /* @__PURE__ */ jsx90(
42787
+ /* @__PURE__ */ jsx85(
43141
42788
  "path",
43142
42789
  {
43143
42790
  fill: "currentColor",
@@ -43147,7 +42794,7 @@ function GoogleIcon2() {
43147
42794
  ] });
43148
42795
  }
43149
42796
  function SignUpForm({ onSignUp, Link, translations: t12 }) {
43150
- const [isLoading, setIsLoading] = useState52(false);
42797
+ const [isLoading, setIsLoading] = useState51(false);
43151
42798
  const handleSignUp = async () => {
43152
42799
  setIsLoading(true);
43153
42800
  try {
@@ -43157,41 +42804,41 @@ function SignUpForm({ onSignUp, Link, translations: t12 }) {
43157
42804
  setIsLoading(false);
43158
42805
  }
43159
42806
  };
43160
- return /* @__PURE__ */ jsx90("main", { className: "semiont-auth__main", role: "main", children: /* @__PURE__ */ jsx90("div", { className: "semiont-auth__container", children: /* @__PURE__ */ jsxs78("div", { className: "semiont-auth__content", children: [
43161
- /* @__PURE__ */ jsxs78("section", { "aria-labelledby": "signup-heading", className: "semiont-auth__branding", children: [
43162
- /* @__PURE__ */ jsx90("h1", { id: "signup-heading", className: "sr-only", children: t12.pageTitle }),
43163
- /* @__PURE__ */ jsx90(SemiontBranding, { t: (key) => t12[key] || key, size: "xl", animated: true, className: "semiont-auth__logo" }),
43164
- /* @__PURE__ */ jsx90("p", { className: "semiont-auth__welcome", children: t12.pageTitle }),
43165
- /* @__PURE__ */ jsx90("p", { className: "semiont-auth__subtitle", children: t12.signUpPrompt })
42807
+ return /* @__PURE__ */ jsx85("main", { className: "semiont-auth__main", role: "main", children: /* @__PURE__ */ jsx85("div", { className: "semiont-auth__container", children: /* @__PURE__ */ jsxs73("div", { className: "semiont-auth__content", children: [
42808
+ /* @__PURE__ */ jsxs73("section", { "aria-labelledby": "signup-heading", className: "semiont-auth__branding", children: [
42809
+ /* @__PURE__ */ jsx85("h1", { id: "signup-heading", className: "sr-only", children: t12.pageTitle }),
42810
+ /* @__PURE__ */ jsx85(SemiontBranding, { t: (key) => t12[key] || key, size: "xl", animated: true, className: "semiont-auth__logo" }),
42811
+ /* @__PURE__ */ jsx85("p", { className: "semiont-auth__welcome", children: t12.pageTitle }),
42812
+ /* @__PURE__ */ jsx85("p", { className: "semiont-auth__subtitle", children: t12.signUpPrompt })
43166
42813
  ] }),
43167
- /* @__PURE__ */ jsxs78("div", { className: "semiont-auth__forms", children: [
43168
- /* @__PURE__ */ jsxs78(
42814
+ /* @__PURE__ */ jsxs73("div", { className: "semiont-auth__forms", children: [
42815
+ /* @__PURE__ */ jsxs73(
43169
42816
  "button",
43170
42817
  {
43171
42818
  onClick: handleSignUp,
43172
42819
  disabled: isLoading,
43173
42820
  className: `${buttonStyles.primary.base} semiont-button--full-width`,
43174
42821
  children: [
43175
- isLoading ? /* @__PURE__ */ jsx90("div", { className: "semiont-auth__spinner" }) : /* @__PURE__ */ jsx90(GoogleIcon2, {}),
42822
+ isLoading ? /* @__PURE__ */ jsx85("div", { className: "semiont-auth__spinner" }) : /* @__PURE__ */ jsx85(GoogleIcon2, {}),
43176
42823
  isLoading ? t12.creatingAccount : t12.signUpWithGoogle
43177
42824
  ]
43178
42825
  }
43179
42826
  ),
43180
- /* @__PURE__ */ jsxs78("div", { className: "semiont-auth__info", children: [
42827
+ /* @__PURE__ */ jsxs73("div", { className: "semiont-auth__info", children: [
43181
42828
  t12.approvedDomainsInfo,
43182
- /* @__PURE__ */ jsx90("br", {}),
42829
+ /* @__PURE__ */ jsx85("br", {}),
43183
42830
  t12.termsAgreement
43184
42831
  ] })
43185
42832
  ] }),
43186
- /* @__PURE__ */ jsxs78("div", { className: "semiont-auth__links", children: [
43187
- /* @__PURE__ */ jsx90(Link, { href: "/", className: buttonStyles.secondary.base, children: t12.backToHome }),
43188
- /* @__PURE__ */ jsx90(Link, { href: "/auth/signin", className: buttonStyles.primary.base, children: t12.alreadyHaveAccount })
42833
+ /* @__PURE__ */ jsxs73("div", { className: "semiont-auth__links", children: [
42834
+ /* @__PURE__ */ jsx85(Link, { href: "/", className: buttonStyles.secondary.base, children: t12.backToHome }),
42835
+ /* @__PURE__ */ jsx85(Link, { href: "/auth/signin", className: buttonStyles.primary.base, children: t12.alreadyHaveAccount })
43189
42836
  ] })
43190
42837
  ] }) }) });
43191
42838
  }
43192
42839
 
43193
42840
  // src/features/auth/components/AuthErrorDisplay.tsx
43194
- import { jsx as jsx91, jsxs as jsxs79 } from "react/jsx-runtime";
42841
+ import { jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
43195
42842
  function getErrorMessage(errorType, t12) {
43196
42843
  switch (errorType) {
43197
42844
  case "Configuration":
@@ -43206,10 +42853,10 @@ function getErrorMessage(errorType, t12) {
43206
42853
  }
43207
42854
  function AuthErrorDisplay({ errorType, Link, translations: t12 }) {
43208
42855
  const errorMessage = getErrorMessage(errorType, t12);
43209
- return /* @__PURE__ */ jsx91("div", { className: "semiont-auth-error-display", children: /* @__PURE__ */ jsxs79("div", { className: "semiont-auth-error-display__container", children: [
43210
- /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91("h2", { className: "semiont-auth-error-display__title", children: t12.pageTitle }) }),
43211
- /* @__PURE__ */ jsx91("div", { className: "semiont-auth-error-display__error-box", children: /* @__PURE__ */ jsx91("div", { className: "semiont-auth-error-display__error-message", children: errorMessage }) }),
43212
- /* @__PURE__ */ jsx91("div", { className: "semiont-auth-error-display__actions", children: /* @__PURE__ */ jsx91(
42856
+ return /* @__PURE__ */ jsx86("div", { className: "semiont-auth-error-display", children: /* @__PURE__ */ jsxs74("div", { className: "semiont-auth-error-display__container", children: [
42857
+ /* @__PURE__ */ jsx86("div", { children: /* @__PURE__ */ jsx86("h2", { className: "semiont-auth-error-display__title", children: t12.pageTitle }) }),
42858
+ /* @__PURE__ */ jsx86("div", { className: "semiont-auth-error-display__error-box", children: /* @__PURE__ */ jsx86("div", { className: "semiont-auth-error-display__error-message", children: errorMessage }) }),
42859
+ /* @__PURE__ */ jsx86("div", { className: "semiont-auth-error-display__actions", children: /* @__PURE__ */ jsx86(
43213
42860
  Link,
43214
42861
  {
43215
42862
  href: "/auth/signin",
@@ -43221,7 +42868,7 @@ function AuthErrorDisplay({ errorType, Link, translations: t12 }) {
43221
42868
  }
43222
42869
 
43223
42870
  // src/features/auth-welcome/components/WelcomePage.tsx
43224
- import { jsx as jsx92, jsxs as jsxs80 } from "react/jsx-runtime";
42871
+ import { jsx as jsx87, jsxs as jsxs75 } from "react/jsx-runtime";
43225
42872
  function WelcomePage({
43226
42873
  userName,
43227
42874
  status,
@@ -43233,53 +42880,53 @@ function WelcomePage({
43233
42880
  Link
43234
42881
  }) {
43235
42882
  if (status === "loading") {
43236
- return /* @__PURE__ */ jsx92(PageLayout2, { className: "semiont-welcome-page__layout", children: /* @__PURE__ */ jsx92("div", { className: "semiont-welcome-page__loading", children: /* @__PURE__ */ jsxs80("div", { className: "semiont-welcome-page__loading-content", children: [
43237
- /* @__PURE__ */ jsx92("div", { className: "semiont-welcome-page__spinner" }),
43238
- /* @__PURE__ */ jsx92("p", { className: "semiont-welcome-page__loading-text", children: t12.loading })
42883
+ return /* @__PURE__ */ jsx87(PageLayout2, { className: "semiont-welcome-page__layout", children: /* @__PURE__ */ jsx87("div", { className: "semiont-welcome-page__loading", children: /* @__PURE__ */ jsxs75("div", { className: "semiont-welcome-page__loading-content", children: [
42884
+ /* @__PURE__ */ jsx87("div", { className: "semiont-welcome-page__spinner" }),
42885
+ /* @__PURE__ */ jsx87("p", { className: "semiont-welcome-page__loading-text", children: t12.loading })
43239
42886
  ] }) }) });
43240
42887
  }
43241
42888
  if (status === "accepted") {
43242
- return /* @__PURE__ */ jsx92(PageLayout2, { className: "semiont-welcome-page__layout", children: /* @__PURE__ */ jsx92("div", { className: "semiont-welcome-page__accepted", children: /* @__PURE__ */ jsxs80("div", { className: "semiont-welcome-page__accepted-content", children: [
43243
- /* @__PURE__ */ jsx92("div", { className: "semiont-welcome-page__accepted-icon", children: /* @__PURE__ */ jsx92("svg", { className: "semiont-welcome-page__accepted-checkmark", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx92("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }),
43244
- /* @__PURE__ */ jsxs80("div", { children: [
43245
- /* @__PURE__ */ jsx92("h2", { className: "semiont-welcome-page__accepted-title", children: t12.welcomeTitle }),
43246
- /* @__PURE__ */ jsx92("p", { className: "semiont-welcome-page__accepted-subtitle", children: t12.thanksForAccepting })
42889
+ return /* @__PURE__ */ jsx87(PageLayout2, { className: "semiont-welcome-page__layout", children: /* @__PURE__ */ jsx87("div", { className: "semiont-welcome-page__accepted", children: /* @__PURE__ */ jsxs75("div", { className: "semiont-welcome-page__accepted-content", children: [
42890
+ /* @__PURE__ */ jsx87("div", { className: "semiont-welcome-page__accepted-icon", children: /* @__PURE__ */ jsx87("svg", { className: "semiont-welcome-page__accepted-checkmark", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx87("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }),
42891
+ /* @__PURE__ */ jsxs75("div", { children: [
42892
+ /* @__PURE__ */ jsx87("h2", { className: "semiont-welcome-page__accepted-title", children: t12.welcomeTitle }),
42893
+ /* @__PURE__ */ jsx87("p", { className: "semiont-welcome-page__accepted-subtitle", children: t12.thanksForAccepting })
43247
42894
  ] })
43248
42895
  ] }) }) });
43249
42896
  }
43250
- return /* @__PURE__ */ jsx92(PageLayout2, { className: "semiont-welcome-page__layout", children: /* @__PURE__ */ jsx92("div", { className: "semiont-welcome-page__form-wrapper", children: /* @__PURE__ */ jsxs80("div", { className: "semiont-welcome-page__form", children: [
43251
- /* @__PURE__ */ jsxs80("div", { className: "semiont-welcome-page__form-header", children: [
43252
- /* @__PURE__ */ jsx92("div", { className: "semiont-welcome-page__form-icon", children: /* @__PURE__ */ jsx92("svg", { className: "semiont-welcome-page__form-icon-svg", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx92("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }) }),
43253
- /* @__PURE__ */ jsx92("h1", { className: "semiont-welcome-page__form-title", children: t12.welcomeUser.replace("{firstName}", userName || "") }),
43254
- /* @__PURE__ */ jsx92("p", { className: "semiont-welcome-page__form-subtitle", children: t12.reviewTermsPrompt })
42897
+ return /* @__PURE__ */ jsx87(PageLayout2, { className: "semiont-welcome-page__layout", children: /* @__PURE__ */ jsx87("div", { className: "semiont-welcome-page__form-wrapper", children: /* @__PURE__ */ jsxs75("div", { className: "semiont-welcome-page__form", children: [
42898
+ /* @__PURE__ */ jsxs75("div", { className: "semiont-welcome-page__form-header", children: [
42899
+ /* @__PURE__ */ jsx87("div", { className: "semiont-welcome-page__form-icon", children: /* @__PURE__ */ jsx87("svg", { className: "semiont-welcome-page__form-icon-svg", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx87("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }) }),
42900
+ /* @__PURE__ */ jsx87("h1", { className: "semiont-welcome-page__form-title", children: t12.welcomeUser.replace("{firstName}", userName || "") }),
42901
+ /* @__PURE__ */ jsx87("p", { className: "semiont-welcome-page__form-subtitle", children: t12.reviewTermsPrompt })
43255
42902
  ] }),
43256
- /* @__PURE__ */ jsx92("div", { className: "semiont-welcome-page__terms-content", children: /* @__PURE__ */ jsxs80("div", { className: "semiont-welcome-page__prose", children: [
43257
- /* @__PURE__ */ jsx92("h3", { children: t12.termsSummaryTitle }),
43258
- /* @__PURE__ */ jsx92("p", { children: t12.termsSummaryIntro }),
43259
- /* @__PURE__ */ jsx92("h4", { children: t12.acceptableUseTitle }),
43260
- /* @__PURE__ */ jsxs80("ul", { children: [
43261
- /* @__PURE__ */ jsx92("li", { children: t12.acceptableUseResponsible }),
43262
- /* @__PURE__ */ jsx92("li", { children: t12.acceptableUseRespect }),
43263
- /* @__PURE__ */ jsx92("li", { children: t12.acceptableUseConduct })
42903
+ /* @__PURE__ */ jsx87("div", { className: "semiont-welcome-page__terms-content", children: /* @__PURE__ */ jsxs75("div", { className: "semiont-welcome-page__prose", children: [
42904
+ /* @__PURE__ */ jsx87("h3", { children: t12.termsSummaryTitle }),
42905
+ /* @__PURE__ */ jsx87("p", { children: t12.termsSummaryIntro }),
42906
+ /* @__PURE__ */ jsx87("h4", { children: t12.acceptableUseTitle }),
42907
+ /* @__PURE__ */ jsxs75("ul", { children: [
42908
+ /* @__PURE__ */ jsx87("li", { children: t12.acceptableUseResponsible }),
42909
+ /* @__PURE__ */ jsx87("li", { children: t12.acceptableUseRespect }),
42910
+ /* @__PURE__ */ jsx87("li", { children: t12.acceptableUseConduct })
43264
42911
  ] }),
43265
- /* @__PURE__ */ jsx92("h4", { children: t12.prohibitedContentTitle }),
43266
- /* @__PURE__ */ jsx92("p", { children: t12.prohibitedContentIntro }),
43267
- /* @__PURE__ */ jsxs80("ul", { children: [
43268
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedIllegal }),
43269
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedAdult }),
43270
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedHate }),
43271
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedViolence }),
43272
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedMisinformation }),
43273
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedPrivacy }),
43274
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedCopyright }),
43275
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedMalware }),
43276
- /* @__PURE__ */ jsx92("li", { children: t12.prohibitedSpam })
42912
+ /* @__PURE__ */ jsx87("h4", { children: t12.prohibitedContentTitle }),
42913
+ /* @__PURE__ */ jsx87("p", { children: t12.prohibitedContentIntro }),
42914
+ /* @__PURE__ */ jsxs75("ul", { children: [
42915
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedIllegal }),
42916
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedAdult }),
42917
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedHate }),
42918
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedViolence }),
42919
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedMisinformation }),
42920
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedPrivacy }),
42921
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedCopyright }),
42922
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedMalware }),
42923
+ /* @__PURE__ */ jsx87("li", { children: t12.prohibitedSpam })
43277
42924
  ] }),
43278
- /* @__PURE__ */ jsx92("h4", { children: t12.conductTitle }),
43279
- /* @__PURE__ */ jsxs80("p", { children: [
42925
+ /* @__PURE__ */ jsx87("h4", { children: t12.conductTitle }),
42926
+ /* @__PURE__ */ jsxs75("p", { children: [
43280
42927
  t12.conductDescription,
43281
42928
  " ",
43282
- /* @__PURE__ */ jsx92(
42929
+ /* @__PURE__ */ jsx87(
43283
42930
  "a",
43284
42931
  {
43285
42932
  href: "https://ai-alliance.cdn.prismic.io/ai-alliance/Zl-MG5m069VX1dgH_AIAllianceCodeofConduct.pdf",
@@ -43291,20 +42938,20 @@ function WelcomePage({
43291
42938
  ),
43292
42939
  t12.conductPromotion
43293
42940
  ] }),
43294
- /* @__PURE__ */ jsx92("h4", { children: t12.responsibilitiesTitle }),
43295
- /* @__PURE__ */ jsxs80("ul", { children: [
43296
- /* @__PURE__ */ jsx92("li", { children: t12.responsibilitiesSecure }),
43297
- /* @__PURE__ */ jsx92("li", { children: t12.responsibilitiesReport }),
43298
- /* @__PURE__ */ jsx92("li", { children: t12.responsibilitiesAccurate }),
43299
- /* @__PURE__ */ jsx92("li", { children: t12.responsibilitiesComply })
42941
+ /* @__PURE__ */ jsx87("h4", { children: t12.responsibilitiesTitle }),
42942
+ /* @__PURE__ */ jsxs75("ul", { children: [
42943
+ /* @__PURE__ */ jsx87("li", { children: t12.responsibilitiesSecure }),
42944
+ /* @__PURE__ */ jsx87("li", { children: t12.responsibilitiesReport }),
42945
+ /* @__PURE__ */ jsx87("li", { children: t12.responsibilitiesAccurate }),
42946
+ /* @__PURE__ */ jsx87("li", { children: t12.responsibilitiesComply })
43300
42947
  ] }),
43301
- /* @__PURE__ */ jsx92("p", { className: "semiont-welcome-page__warning", children: t12.violationsWarning })
42948
+ /* @__PURE__ */ jsx87("p", { className: "semiont-welcome-page__warning", children: t12.violationsWarning })
43302
42949
  ] }) }),
43303
- /* @__PURE__ */ jsxs80("div", { className: "semiont-welcome-page__actions", children: [
43304
- /* @__PURE__ */ jsxs80("p", { className: "semiont-welcome-page__legal-links", children: [
42950
+ /* @__PURE__ */ jsxs75("div", { className: "semiont-welcome-page__actions", children: [
42951
+ /* @__PURE__ */ jsxs75("p", { className: "semiont-welcome-page__legal-links", children: [
43305
42952
  t12.readFullTerms,
43306
42953
  " ",
43307
- /* @__PURE__ */ jsx92(
42954
+ /* @__PURE__ */ jsx87(
43308
42955
  Link,
43309
42956
  {
43310
42957
  href: "/terms",
@@ -43316,7 +42963,7 @@ function WelcomePage({
43316
42963
  " ",
43317
42964
  t12.and,
43318
42965
  " ",
43319
- /* @__PURE__ */ jsx92(
42966
+ /* @__PURE__ */ jsx87(
43320
42967
  Link,
43321
42968
  {
43322
42969
  href: "/privacy",
@@ -43326,8 +42973,8 @@ function WelcomePage({
43326
42973
  }
43327
42974
  )
43328
42975
  ] }),
43329
- /* @__PURE__ */ jsxs80("div", { className: "semiont-welcome-page__buttons", children: [
43330
- /* @__PURE__ */ jsx92(
42976
+ /* @__PURE__ */ jsxs75("div", { className: "semiont-welcome-page__buttons", children: [
42977
+ /* @__PURE__ */ jsx87(
43331
42978
  "button",
43332
42979
  {
43333
42980
  onClick: onDecline,
@@ -43336,7 +42983,7 @@ function WelcomePage({
43336
42983
  children: t12.declineAndSignOut
43337
42984
  }
43338
42985
  ),
43339
- /* @__PURE__ */ jsx92(
42986
+ /* @__PURE__ */ jsx87(
43340
42987
  "button",
43341
42988
  {
43342
42989
  onClick: onAccept,
@@ -43346,13 +42993,13 @@ function WelcomePage({
43346
42993
  }
43347
42994
  )
43348
42995
  ] }),
43349
- /* @__PURE__ */ jsx92("p", { className: "semiont-welcome-page__legal-notice", children: t12.legallyBound })
42996
+ /* @__PURE__ */ jsx87("p", { className: "semiont-welcome-page__legal-notice", children: t12.legallyBound })
43350
42997
  ] })
43351
42998
  ] }) }) });
43352
42999
  }
43353
43000
 
43354
43001
  // src/features/moderate-entity-tags/components/EntityTagsPage.tsx
43355
- import { Fragment as Fragment18, jsx as jsx93, jsxs as jsxs81 } from "react/jsx-runtime";
43002
+ import { Fragment as Fragment18, jsx as jsx88, jsxs as jsxs76 } from "react/jsx-runtime";
43356
43003
  function EntityTagsPage({
43357
43004
  entityTypes,
43358
43005
  error,
@@ -43371,21 +43018,21 @@ function EntityTagsPage({
43371
43018
  onAddTag();
43372
43019
  }
43373
43020
  };
43374
- return /* @__PURE__ */ jsxs81("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43375
- /* @__PURE__ */ jsxs81("div", { className: "semiont-page__content", children: [
43376
- /* @__PURE__ */ jsxs81("div", { className: "semiont-page__header", children: [
43377
- /* @__PURE__ */ jsx93("h1", { className: "semiont-page__title", children: t12.pageTitle }),
43378
- /* @__PURE__ */ jsx93("p", { className: "semiont-page__subtitle", children: t12.pageDescription })
43021
+ return /* @__PURE__ */ jsxs76("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43022
+ /* @__PURE__ */ jsxs76("div", { className: "semiont-page__content", children: [
43023
+ /* @__PURE__ */ jsxs76("div", { className: "semiont-page__header", children: [
43024
+ /* @__PURE__ */ jsx88("h1", { className: "semiont-page__title", children: t12.pageTitle }),
43025
+ /* @__PURE__ */ jsx88("p", { className: "semiont-page__subtitle", children: t12.pageDescription })
43379
43026
  ] }),
43380
- /* @__PURE__ */ jsxs81("div", { className: "semiont-card", children: [
43381
- /* @__PURE__ */ jsxs81("div", { className: "semiont-entity-tags__header", children: [
43382
- /* @__PURE__ */ jsx93("div", { className: "semiont-entity-tags__icon-box", children: /* @__PURE__ */ jsx93(TagIcon_default, { className: "semiont-entity-tags__icon" }) }),
43383
- /* @__PURE__ */ jsxs81("div", { className: "semiont-entity-tags__content", children: [
43384
- /* @__PURE__ */ jsx93("h3", { className: "semiont-entity-tags__title", children: t12.sectionTitle }),
43385
- /* @__PURE__ */ jsx93("p", { className: "semiont-entity-tags__description", children: t12.sectionDescription })
43027
+ /* @__PURE__ */ jsxs76("div", { className: "semiont-card", children: [
43028
+ /* @__PURE__ */ jsxs76("div", { className: "semiont-entity-tags__header", children: [
43029
+ /* @__PURE__ */ jsx88("div", { className: "semiont-entity-tags__icon-box", children: /* @__PURE__ */ jsx88(TagIcon_default, { className: "semiont-entity-tags__icon" }) }),
43030
+ /* @__PURE__ */ jsxs76("div", { className: "semiont-entity-tags__content", children: [
43031
+ /* @__PURE__ */ jsx88("h3", { className: "semiont-entity-tags__title", children: t12.sectionTitle }),
43032
+ /* @__PURE__ */ jsx88("p", { className: "semiont-entity-tags__description", children: t12.sectionDescription })
43386
43033
  ] })
43387
43034
  ] }),
43388
- /* @__PURE__ */ jsx93("div", { className: "semiont-entity-tags__tags-section", children: /* @__PURE__ */ jsx93("div", { className: "semiont-tags", children: entityTypes.map((tag) => /* @__PURE__ */ jsx93(
43035
+ /* @__PURE__ */ jsx88("div", { className: "semiont-entity-tags__tags-section", children: /* @__PURE__ */ jsx88("div", { className: "semiont-tags", children: entityTypes.map((tag) => /* @__PURE__ */ jsx88(
43389
43036
  "span",
43390
43037
  {
43391
43038
  className: "semiont-tag semiont-tag--info semiont-tag--rounded-md",
@@ -43393,8 +43040,8 @@ function EntityTagsPage({
43393
43040
  },
43394
43041
  tag
43395
43042
  )) }) }),
43396
- /* @__PURE__ */ jsxs81("div", { className: "semiont-entity-tags__input-group", children: [
43397
- /* @__PURE__ */ jsx93(
43043
+ /* @__PURE__ */ jsxs76("div", { className: "semiont-entity-tags__input-group", children: [
43044
+ /* @__PURE__ */ jsx88(
43398
43045
  "input",
43399
43046
  {
43400
43047
  type: "text",
@@ -43406,34 +43053,34 @@ function EntityTagsPage({
43406
43053
  disabled: isAddingTag
43407
43054
  }
43408
43055
  ),
43409
- /* @__PURE__ */ jsx93(
43056
+ /* @__PURE__ */ jsx88(
43410
43057
  "button",
43411
43058
  {
43412
43059
  onClick: onAddTag,
43413
43060
  disabled: isAddingTag || !newTag.trim(),
43414
43061
  className: "semiont-button semiont-button--primary",
43415
- children: isAddingTag ? t12.adding : /* @__PURE__ */ jsxs81(Fragment18, { children: [
43416
- /* @__PURE__ */ jsx93(PlusIcon_default, { className: "semiont-icon semiont-icon--small semiont-icon--inline" }),
43062
+ children: isAddingTag ? t12.adding : /* @__PURE__ */ jsxs76(Fragment18, { children: [
43063
+ /* @__PURE__ */ jsx88(PlusIcon_default, { className: "semiont-icon semiont-icon--small semiont-icon--inline" }),
43417
43064
  t12.addTag
43418
43065
  ] })
43419
43066
  }
43420
43067
  )
43421
43068
  ] }),
43422
- error && /* @__PURE__ */ jsxs81("div", { className: "semiont-entity-tags__error", children: [
43423
- /* @__PURE__ */ jsx93(ExclamationCircleIcon_default, { className: "semiont-entity-tags__error-icon" }),
43069
+ error && /* @__PURE__ */ jsxs76("div", { className: "semiont-entity-tags__error", children: [
43070
+ /* @__PURE__ */ jsx88(ExclamationCircleIcon_default, { className: "semiont-entity-tags__error-icon" }),
43424
43071
  error
43425
43072
  ] })
43426
43073
  ] })
43427
43074
  ] }),
43428
- /* @__PURE__ */ jsxs81("div", { className: "semiont-page__sidebar", children: [
43429
- /* @__PURE__ */ jsx93(
43075
+ /* @__PURE__ */ jsxs76("div", { className: "semiont-page__sidebar", children: [
43076
+ /* @__PURE__ */ jsx88(
43430
43077
  ToolbarPanels,
43431
43078
  {
43432
43079
  activePanel,
43433
43080
  theme: theme2
43434
43081
  }
43435
43082
  ),
43436
- /* @__PURE__ */ jsx93(
43083
+ /* @__PURE__ */ jsx88(
43437
43084
  Toolbar2,
43438
43085
  {
43439
43086
  context: "simple",
@@ -43445,7 +43092,7 @@ function EntityTagsPage({
43445
43092
  }
43446
43093
 
43447
43094
  // src/features/moderate-recent/components/RecentDocumentsPage.tsx
43448
- import { jsx as jsx94, jsxs as jsxs82 } from "react/jsx-runtime";
43095
+ import { jsx as jsx89, jsxs as jsxs77 } from "react/jsx-runtime";
43449
43096
  function RecentDocumentsPage({
43450
43097
  isLoading,
43451
43098
  theme: theme2,
@@ -43455,38 +43102,38 @@ function RecentDocumentsPage({
43455
43102
  Toolbar: Toolbar2
43456
43103
  }) {
43457
43104
  if (isLoading) {
43458
- return /* @__PURE__ */ jsx94("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx94("p", { className: "semiont-page__loading-text", children: t12.loading }) });
43105
+ return /* @__PURE__ */ jsx89("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx89("p", { className: "semiont-page__loading-text", children: t12.loading }) });
43459
43106
  }
43460
- return /* @__PURE__ */ jsxs82("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43461
- /* @__PURE__ */ jsxs82("div", { className: "semiont-page__content", children: [
43462
- /* @__PURE__ */ jsxs82("div", { className: "semiont-page__header", children: [
43463
- /* @__PURE__ */ jsx94("h1", { className: "semiont-page__title", children: t12.pageTitle }),
43464
- /* @__PURE__ */ jsx94("p", { className: "semiont-page__subtitle", children: t12.pageDescription })
43107
+ return /* @__PURE__ */ jsxs77("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43108
+ /* @__PURE__ */ jsxs77("div", { className: "semiont-page__content", children: [
43109
+ /* @__PURE__ */ jsxs77("div", { className: "semiont-page__header", children: [
43110
+ /* @__PURE__ */ jsx89("h1", { className: "semiont-page__title", children: t12.pageTitle }),
43111
+ /* @__PURE__ */ jsx89("p", { className: "semiont-page__subtitle", children: t12.pageDescription })
43465
43112
  ] }),
43466
- /* @__PURE__ */ jsxs82("div", { className: "semiont-card", children: [
43467
- /* @__PURE__ */ jsxs82("div", { className: "semiont-recent-docs__header", children: [
43468
- /* @__PURE__ */ jsx94("div", { className: "semiont-recent-docs__icon-box", children: /* @__PURE__ */ jsx94(ClockIcon_default, { className: "semiont-recent-docs__icon" }) }),
43469
- /* @__PURE__ */ jsxs82("div", { className: "semiont-recent-docs__content", children: [
43470
- /* @__PURE__ */ jsx94("h3", { className: "semiont-recent-docs__title", children: t12.sectionTitle }),
43471
- /* @__PURE__ */ jsx94("p", { className: "semiont-recent-docs__description", children: t12.sectionDescription })
43113
+ /* @__PURE__ */ jsxs77("div", { className: "semiont-card", children: [
43114
+ /* @__PURE__ */ jsxs77("div", { className: "semiont-recent-docs__header", children: [
43115
+ /* @__PURE__ */ jsx89("div", { className: "semiont-recent-docs__icon-box", children: /* @__PURE__ */ jsx89(ClockIcon_default, { className: "semiont-recent-docs__icon" }) }),
43116
+ /* @__PURE__ */ jsxs77("div", { className: "semiont-recent-docs__content", children: [
43117
+ /* @__PURE__ */ jsx89("h3", { className: "semiont-recent-docs__title", children: t12.sectionTitle }),
43118
+ /* @__PURE__ */ jsx89("p", { className: "semiont-recent-docs__description", children: t12.sectionDescription })
43472
43119
  ] })
43473
43120
  ] }),
43474
- /* @__PURE__ */ jsxs82("div", { className: "semiont-recent-docs__empty-state", children: [
43475
- /* @__PURE__ */ jsx94("svg", { className: "semiont-recent-docs__empty-icon", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx94("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }),
43476
- /* @__PURE__ */ jsx94("p", { className: "semiont-recent-docs__empty-message", children: t12.noDocuments }),
43477
- /* @__PURE__ */ jsx94("p", { className: "semiont-recent-docs__empty-hint", children: t12.activityWillAppear })
43121
+ /* @__PURE__ */ jsxs77("div", { className: "semiont-recent-docs__empty-state", children: [
43122
+ /* @__PURE__ */ jsx89("svg", { className: "semiont-recent-docs__empty-icon", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx89("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }),
43123
+ /* @__PURE__ */ jsx89("p", { className: "semiont-recent-docs__empty-message", children: t12.noDocuments }),
43124
+ /* @__PURE__ */ jsx89("p", { className: "semiont-recent-docs__empty-hint", children: t12.activityWillAppear })
43478
43125
  ] })
43479
43126
  ] })
43480
43127
  ] }),
43481
- /* @__PURE__ */ jsxs82("div", { className: "semiont-page__sidebar", children: [
43482
- /* @__PURE__ */ jsx94(
43128
+ /* @__PURE__ */ jsxs77("div", { className: "semiont-page__sidebar", children: [
43129
+ /* @__PURE__ */ jsx89(
43483
43130
  ToolbarPanels,
43484
43131
  {
43485
43132
  activePanel,
43486
43133
  theme: theme2
43487
43134
  }
43488
43135
  ),
43489
- /* @__PURE__ */ jsx94(
43136
+ /* @__PURE__ */ jsx89(
43490
43137
  Toolbar2,
43491
43138
  {
43492
43139
  context: "simple",
@@ -43498,7 +43145,7 @@ function RecentDocumentsPage({
43498
43145
  }
43499
43146
 
43500
43147
  // src/features/moderate-tag-schemas/components/TagSchemasPage.tsx
43501
- import { jsx as jsx95, jsxs as jsxs83 } from "react/jsx-runtime";
43148
+ import { jsx as jsx90, jsxs as jsxs78 } from "react/jsx-runtime";
43502
43149
  var domainIcons = {
43503
43150
  legal: ScaleIcon_default,
43504
43151
  scientific: AcademicCapIcon_default,
@@ -43519,41 +43166,41 @@ function TagSchemasPage({
43519
43166
  Toolbar: Toolbar2
43520
43167
  }) {
43521
43168
  if (isLoading) {
43522
- return /* @__PURE__ */ jsx95("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx95("p", { className: "semiont-page__loading-text", children: t12.loading }) });
43169
+ return /* @__PURE__ */ jsx90("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx90("p", { className: "semiont-page__loading-text", children: t12.loading }) });
43523
43170
  }
43524
- return /* @__PURE__ */ jsxs83("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43525
- /* @__PURE__ */ jsxs83("div", { className: "semiont-page__content", children: [
43526
- /* @__PURE__ */ jsxs83("div", { className: "semiont-page__header", children: [
43527
- /* @__PURE__ */ jsx95("h1", { className: "semiont-page__title", children: t12.pageTitle }),
43528
- /* @__PURE__ */ jsx95("p", { className: "semiont-page__subtitle", children: t12.pageDescription })
43171
+ return /* @__PURE__ */ jsxs78("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43172
+ /* @__PURE__ */ jsxs78("div", { className: "semiont-page__content", children: [
43173
+ /* @__PURE__ */ jsxs78("div", { className: "semiont-page__header", children: [
43174
+ /* @__PURE__ */ jsx90("h1", { className: "semiont-page__title", children: t12.pageTitle }),
43175
+ /* @__PURE__ */ jsx90("p", { className: "semiont-page__subtitle", children: t12.pageDescription })
43529
43176
  ] }),
43530
- /* @__PURE__ */ jsx95("div", { className: "semiont-card-grid semiont-card-grid--two-columns", children: schemas.map((schema) => {
43177
+ /* @__PURE__ */ jsx90("div", { className: "semiont-card-grid semiont-card-grid--two-columns", children: schemas.map((schema) => {
43531
43178
  const Icon = domainIcons[schema.domain] || LightBulbIcon_default;
43532
43179
  const domainClass = domainClasses[schema.domain] || domainClasses.general;
43533
- return /* @__PURE__ */ jsxs83(
43180
+ return /* @__PURE__ */ jsxs78(
43534
43181
  "div",
43535
43182
  {
43536
43183
  className: "semiont-card",
43537
43184
  children: [
43538
- /* @__PURE__ */ jsxs83("div", { className: "semiont-schema__header", children: [
43539
- /* @__PURE__ */ jsx95("div", { className: `semiont-schema__icon-wrapper ${domainClass}`, children: Icon && /* @__PURE__ */ jsx95(Icon, { className: "semiont-schema__icon" }) }),
43540
- /* @__PURE__ */ jsxs83("div", { className: "semiont-schema__content", children: [
43541
- /* @__PURE__ */ jsx95("h3", { className: "semiont-schema__title", children: schema.name }),
43542
- /* @__PURE__ */ jsx95("p", { className: "semiont-schema__description", children: schema.description }),
43543
- /* @__PURE__ */ jsx95("span", { className: `semiont-schema__badge ${domainClass}`, children: schema.domain })
43185
+ /* @__PURE__ */ jsxs78("div", { className: "semiont-schema__header", children: [
43186
+ /* @__PURE__ */ jsx90("div", { className: `semiont-schema__icon-wrapper ${domainClass}`, children: Icon && /* @__PURE__ */ jsx90(Icon, { className: "semiont-schema__icon" }) }),
43187
+ /* @__PURE__ */ jsxs78("div", { className: "semiont-schema__content", children: [
43188
+ /* @__PURE__ */ jsx90("h3", { className: "semiont-schema__title", children: schema.name }),
43189
+ /* @__PURE__ */ jsx90("p", { className: "semiont-schema__description", children: schema.description }),
43190
+ /* @__PURE__ */ jsx90("span", { className: `semiont-schema__badge ${domainClass}`, children: schema.domain })
43544
43191
  ] })
43545
43192
  ] }),
43546
- /* @__PURE__ */ jsxs83("div", { className: "semiont-schema__categories", children: [
43547
- /* @__PURE__ */ jsx95("h4", { className: "semiont-schema__categories-title", children: t12.categories }),
43548
- schema.tags.map((tag) => /* @__PURE__ */ jsxs83(
43193
+ /* @__PURE__ */ jsxs78("div", { className: "semiont-schema__categories", children: [
43194
+ /* @__PURE__ */ jsx90("h4", { className: "semiont-schema__categories-title", children: t12.categories }),
43195
+ schema.tags.map((tag) => /* @__PURE__ */ jsxs78(
43549
43196
  "div",
43550
43197
  {
43551
43198
  className: "semiont-schema__category",
43552
43199
  children: [
43553
- /* @__PURE__ */ jsx95("div", { className: "semiont-schema__category-name", children: tag.name }),
43554
- /* @__PURE__ */ jsx95("div", { className: "semiont-schema__category-description", children: tag.description }),
43555
- /* @__PURE__ */ jsxs83("div", { className: "semiont-schema__examples", children: [
43556
- tag.examples.slice(0, 2).map((example, idx) => /* @__PURE__ */ jsx95(
43200
+ /* @__PURE__ */ jsx90("div", { className: "semiont-schema__category-name", children: tag.name }),
43201
+ /* @__PURE__ */ jsx90("div", { className: "semiont-schema__category-description", children: tag.description }),
43202
+ /* @__PURE__ */ jsxs78("div", { className: "semiont-schema__examples", children: [
43203
+ tag.examples.slice(0, 2).map((example, idx) => /* @__PURE__ */ jsx90(
43557
43204
  "span",
43558
43205
  {
43559
43206
  className: "semiont-schema__example",
@@ -43561,7 +43208,7 @@ function TagSchemasPage({
43561
43208
  },
43562
43209
  idx
43563
43210
  )),
43564
- tag.examples.length > 2 && /* @__PURE__ */ jsxs83("span", { className: "semiont-schema__example-more", children: [
43211
+ tag.examples.length > 2 && /* @__PURE__ */ jsxs78("span", { className: "semiont-schema__example-more", children: [
43565
43212
  "+",
43566
43213
  tag.examples.length - 2,
43567
43214
  " more"
@@ -43578,15 +43225,15 @@ function TagSchemasPage({
43578
43225
  );
43579
43226
  }) })
43580
43227
  ] }),
43581
- /* @__PURE__ */ jsxs83("div", { className: "semiont-page__sidebar", children: [
43582
- /* @__PURE__ */ jsx95(
43228
+ /* @__PURE__ */ jsxs78("div", { className: "semiont-page__sidebar", children: [
43229
+ /* @__PURE__ */ jsx90(
43583
43230
  ToolbarPanels,
43584
43231
  {
43585
43232
  activePanel,
43586
43233
  theme: theme2
43587
43234
  }
43588
43235
  ),
43589
- /* @__PURE__ */ jsx95(
43236
+ /* @__PURE__ */ jsx90(
43590
43237
  Toolbar2,
43591
43238
  {
43592
43239
  context: "simple",
@@ -43598,11 +43245,11 @@ function TagSchemasPage({
43598
43245
  }
43599
43246
 
43600
43247
  // src/features/resource-compose/components/ResourceComposePage.tsx
43601
- import { useState as useState53, useEffect as useEffect55 } from "react";
43602
- import { capabilitiesOf as capabilitiesOf5, AUTHORABLE_MEDIA_TYPES, MEDIA_TYPES, mediaTypeForExtension, isSupportedMediaType, LOCALES as LOCALES4 } from "@semiont/core";
43248
+ import { useState as useState52, useEffect as useEffect55 } from "react";
43249
+ import { capabilitiesOf as capabilitiesOf6, AUTHORABLE_MEDIA_TYPES, MEDIA_TYPES, mediaTypeForExtension, isSupportedMediaType, LOCALES as LOCALES4, folderOf, proposeStoragePath as proposeStoragePath3, getStorageUri } from "@semiont/core";
43603
43250
 
43604
43251
  // src/features/resource-compose/components/UploadProgressBar.tsx
43605
- import { Fragment as Fragment19, jsx as jsx96, jsxs as jsxs84 } from "react/jsx-runtime";
43252
+ import { Fragment as Fragment19, jsx as jsx91, jsxs as jsxs79 } from "react/jsx-runtime";
43606
43253
  function formatBytes(bytes) {
43607
43254
  if (bytes < 1024) return `${bytes} B`;
43608
43255
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -43612,37 +43259,37 @@ function formatBytes(bytes) {
43612
43259
  function UploadProgressBar({ progress, label = "Upload" }) {
43613
43260
  if (!progress) return null;
43614
43261
  if (progress.phase === "started") {
43615
- return /* @__PURE__ */ jsxs84("div", { className: "semiont-progress-wrapper", role: "status", "aria-live": "polite", children: [
43616
- /* @__PURE__ */ jsx96("div", { className: "semiont-progress__label", children: /* @__PURE__ */ jsxs84("span", { children: [
43262
+ return /* @__PURE__ */ jsxs79("div", { className: "semiont-progress-wrapper", role: "status", "aria-live": "polite", children: [
43263
+ /* @__PURE__ */ jsx91("div", { className: "semiont-progress__label", children: /* @__PURE__ */ jsxs79("span", { children: [
43617
43264
  label,
43618
43265
  ": starting\u2026"
43619
43266
  ] }) }),
43620
- /* @__PURE__ */ jsx96("div", { className: "semiont-progress semiont-progress--indeterminate", children: /* @__PURE__ */ jsx96("div", { className: "semiont-progress__fill" }) })
43267
+ /* @__PURE__ */ jsx91("div", { className: "semiont-progress semiont-progress--indeterminate", children: /* @__PURE__ */ jsx91("div", { className: "semiont-progress__fill" }) })
43621
43268
  ] });
43622
43269
  }
43623
43270
  if (progress.phase === "progress") {
43624
43271
  const indeterminate = progress.totalBytes <= 0;
43625
43272
  const percentage = indeterminate ? 0 : Math.min(100, Math.round(progress.bytesUploaded / progress.totalBytes * 100));
43626
- return /* @__PURE__ */ jsxs84("div", { className: "semiont-progress-wrapper", role: "status", "aria-live": "polite", children: [
43627
- /* @__PURE__ */ jsx96("div", { className: "semiont-progress__label", children: indeterminate ? /* @__PURE__ */ jsxs84("span", { children: [
43273
+ return /* @__PURE__ */ jsxs79("div", { className: "semiont-progress-wrapper", role: "status", "aria-live": "polite", children: [
43274
+ /* @__PURE__ */ jsx91("div", { className: "semiont-progress__label", children: indeterminate ? /* @__PURE__ */ jsxs79("span", { children: [
43628
43275
  label,
43629
43276
  ": ",
43630
43277
  formatBytes(progress.bytesUploaded),
43631
43278
  "\u2026"
43632
- ] }) : /* @__PURE__ */ jsxs84(Fragment19, { children: [
43633
- /* @__PURE__ */ jsxs84("span", { children: [
43279
+ ] }) : /* @__PURE__ */ jsxs79(Fragment19, { children: [
43280
+ /* @__PURE__ */ jsxs79("span", { children: [
43634
43281
  label,
43635
43282
  ": ",
43636
43283
  percentage,
43637
43284
  "%"
43638
43285
  ] }),
43639
- /* @__PURE__ */ jsxs84("span", { children: [
43286
+ /* @__PURE__ */ jsxs79("span", { children: [
43640
43287
  formatBytes(progress.bytesUploaded),
43641
43288
  " / ",
43642
43289
  formatBytes(progress.totalBytes)
43643
43290
  ] })
43644
43291
  ] }) }),
43645
- /* @__PURE__ */ jsx96(
43292
+ /* @__PURE__ */ jsx91(
43646
43293
  "div",
43647
43294
  {
43648
43295
  className: `semiont-progress${indeterminate ? " semiont-progress--indeterminate" : ""}`,
@@ -43650,7 +43297,7 @@ function UploadProgressBar({ progress, label = "Upload" }) {
43650
43297
  "aria-valuemin": 0,
43651
43298
  "aria-valuemax": indeterminate ? void 0 : 100,
43652
43299
  "aria-valuenow": indeterminate ? void 0 : percentage,
43653
- children: /* @__PURE__ */ jsx96(
43300
+ children: /* @__PURE__ */ jsx91(
43654
43301
  "div",
43655
43302
  {
43656
43303
  className: "semiont-progress__fill",
@@ -43661,17 +43308,17 @@ function UploadProgressBar({ progress, label = "Upload" }) {
43661
43308
  )
43662
43309
  ] });
43663
43310
  }
43664
- return /* @__PURE__ */ jsxs84("div", { className: "semiont-progress-wrapper", role: "status", "aria-live": "polite", children: [
43665
- /* @__PURE__ */ jsx96("div", { className: "semiont-progress__label", children: /* @__PURE__ */ jsxs84("span", { children: [
43311
+ return /* @__PURE__ */ jsxs79("div", { className: "semiont-progress-wrapper", role: "status", "aria-live": "polite", children: [
43312
+ /* @__PURE__ */ jsx91("div", { className: "semiont-progress__label", children: /* @__PURE__ */ jsxs79("span", { children: [
43666
43313
  label,
43667
43314
  ": uploaded"
43668
43315
  ] }) }),
43669
- /* @__PURE__ */ jsx96("div", { className: "semiont-progress", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": 100, children: /* @__PURE__ */ jsx96("div", { className: "semiont-progress__fill semiont-progress__fill--success", style: { width: "100%" } }) })
43316
+ /* @__PURE__ */ jsx91("div", { className: "semiont-progress", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": 100, children: /* @__PURE__ */ jsx91("div", { className: "semiont-progress__fill semiont-progress__fill--success", style: { width: "100%" } }) })
43670
43317
  ] });
43671
43318
  }
43672
43319
 
43673
43320
  // src/features/resource-compose/components/ResourceComposePage.tsx
43674
- import { jsx as jsx97, jsxs as jsxs85 } from "react/jsx-runtime";
43321
+ import { jsx as jsx92, jsxs as jsxs80 } from "react/jsx-runtime";
43675
43322
  var UPLOAD_ACCEPT = Object.values(MEDIA_TYPES).map((c12) => c12.extension).join(",");
43676
43323
  function detectUploadMediaType(file) {
43677
43324
  if (file.type && isSupportedMediaType(file.type)) return file.type;
@@ -43698,20 +43345,27 @@ function ResourceComposePage({
43698
43345
  }) {
43699
43346
  const { announceFormSubmitting, announceFormSuccess, announceFormError } = useFormAnnouncements();
43700
43347
  const { showLineNumbers } = useLineNumbers();
43701
- const [newResourceName, setNewResourceName] = useState53("");
43702
- const [newResourceContent, setNewResourceContent] = useState53("");
43703
- const [selectedEntityTypes, setSelectedEntityTypes] = useState53([]);
43704
- const [isCreating, setIsCreating] = useState53(false);
43705
- const [inputMethod, setInputMethod] = useState53("write");
43706
- const [uploadedFile, setUploadedFile] = useState53(null);
43707
- const [fileMimeType, setFileMimeType] = useState53("text/markdown");
43708
- const [filePreviewUrl, setFilePreviewUrl] = useState53(null);
43709
- const [isDragOver, setIsDragOver] = useState53(false);
43710
- const [selectedFormat, setSelectedFormat] = useState53("text/markdown");
43711
- const [selectedLanguage, setSelectedLanguage] = useState53(initialLocale);
43712
- const [selectedCharset, setSelectedCharset] = useState53("");
43713
- const [storagePath, setStoragePath] = useState53("");
43714
- const [archiveOriginal, setArchiveOriginal] = useState53(true);
43348
+ const [newResourceName, setNewResourceName] = useState52("");
43349
+ const [newResourceContent, setNewResourceContent] = useState52("");
43350
+ const [selectedEntityTypes, setSelectedEntityTypes] = useState52([]);
43351
+ const [isCreating, setIsCreating] = useState52(false);
43352
+ const [inputMethod, setInputMethod] = useState52("write");
43353
+ const [uploadedFile, setUploadedFile] = useState52(null);
43354
+ const [fileMimeType, setFileMimeType] = useState52("text/markdown");
43355
+ const [filePreviewUrl, setFilePreviewUrl] = useState52(null);
43356
+ const [isDragOver, setIsDragOver] = useState52(false);
43357
+ const [selectedFormat, setSelectedFormat] = useState52("text/markdown");
43358
+ const [selectedLanguage, setSelectedLanguage] = useState52(initialLocale);
43359
+ const [selectedCharset, setSelectedCharset] = useState52("");
43360
+ const [storagePath, setStoragePath] = useState52("");
43361
+ const [archiveOriginal, setArchiveOriginal] = useState52(true);
43362
+ const composeFormat = isSupportedMediaType(selectedFormat) ? selectedFormat : "text/markdown";
43363
+ const pathTouched = storagePath !== "";
43364
+ const effectivePath = pathTouched ? storagePath : proposeStoragePath3(
43365
+ mode === "clone" && cloneData ? folderOf(getStorageUri(cloneData.sourceResource)) : "",
43366
+ newResourceName,
43367
+ composeFormat
43368
+ );
43715
43369
  useEffect55(() => {
43716
43370
  if (mode === "clone" && cloneData) {
43717
43371
  setNewResourceName(cloneData.sourceResource.name);
@@ -43732,7 +43386,7 @@ function ResourceComposePage({
43732
43386
  const nameWithoutExt = file.name.replace(/\.[^/.]+$/, "");
43733
43387
  setNewResourceName(nameWithoutExt);
43734
43388
  }
43735
- const detectedRender = capabilitiesOf5(detectedMediaType)?.render;
43389
+ const detectedRender = capabilitiesOf6(detectedMediaType)?.render;
43736
43390
  if (detectedRender === "image" || detectedRender === "pdf") {
43737
43391
  const previewUrl = URL.createObjectURL(file);
43738
43392
  setFilePreviewUrl(previewUrl);
@@ -43761,7 +43415,7 @@ function ResourceComposePage({
43761
43415
  const params = {
43762
43416
  mode,
43763
43417
  name: newResourceName,
43764
- storageUri: `file://${storagePath}`,
43418
+ storageUri: `file://${effectivePath}`,
43765
43419
  content: newResourceContent,
43766
43420
  format: uploadedFile ? fileMimeType : selectedFormat,
43767
43421
  entityTypes: selectedEntityTypes,
@@ -43787,17 +43441,17 @@ function ResourceComposePage({
43787
43441
  }
43788
43442
  };
43789
43443
  const isClone = mode === "clone";
43790
- return /* @__PURE__ */ jsxs85("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43791
- /* @__PURE__ */ jsxs85("div", { className: "semiont-page__content semiont-page__compose", children: [
43792
- /* @__PURE__ */ jsxs85("div", { className: "semiont-page__header", children: [
43793
- /* @__PURE__ */ jsx97("h1", { className: "semiont-page__title", children: isClone ? t12.titleEditClone : t12.title }),
43794
- isClone && /* @__PURE__ */ jsx97("p", { className: "semiont-page__subtitle", children: t12.subtitleClone })
43444
+ return /* @__PURE__ */ jsxs80("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43445
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-page__content semiont-page__compose", children: [
43446
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-page__header", children: [
43447
+ /* @__PURE__ */ jsx92("h1", { className: "semiont-page__title", children: isClone ? t12.titleEditClone : t12.title }),
43448
+ isClone && /* @__PURE__ */ jsx92("p", { className: "semiont-page__subtitle", children: t12.subtitleClone })
43795
43449
  ] }),
43796
- /* @__PURE__ */ jsx97("div", { className: "semiont-form", children: /* @__PURE__ */ jsxs85("form", { onSubmit: handleSaveResource, className: "semiont-form__fields semiont-compose-grid", children: [
43797
- /* @__PURE__ */ jsxs85("div", { className: "semiont-compose-grid__meta", children: [
43798
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__field", children: [
43799
- /* @__PURE__ */ jsx97("label", { htmlFor: "docName", className: "semiont-form__label", children: t12.resourceName }),
43800
- /* @__PURE__ */ jsx97(
43450
+ /* @__PURE__ */ jsx92("div", { className: "semiont-form", children: /* @__PURE__ */ jsxs80("form", { onSubmit: handleSaveResource, className: "semiont-form__fields semiont-compose-grid", children: [
43451
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-compose-grid__meta", children: [
43452
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__field", children: [
43453
+ /* @__PURE__ */ jsx92("label", { htmlFor: "docName", className: "semiont-form__label", children: t12.resourceName }),
43454
+ /* @__PURE__ */ jsx92(
43801
43455
  "input",
43802
43456
  {
43803
43457
  id: "docName",
@@ -43811,16 +43465,16 @@ function ResourceComposePage({
43811
43465
  }
43812
43466
  )
43813
43467
  ] }),
43814
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__field", children: [
43815
- /* @__PURE__ */ jsx97("label", { htmlFor: "storagePath", className: "semiont-form__label", children: "Save location" }),
43816
- /* @__PURE__ */ jsxs85("div", { className: "semiont-input-addon", children: [
43817
- /* @__PURE__ */ jsx97("span", { className: "semiont-input-addon__prefix", children: "file://" }),
43818
- /* @__PURE__ */ jsx97(
43468
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__field", children: [
43469
+ /* @__PURE__ */ jsx92("label", { htmlFor: "storagePath", className: "semiont-form__label", children: "Save location" }),
43470
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-input-addon", children: [
43471
+ /* @__PURE__ */ jsx92("span", { className: "semiont-input-addon__prefix", children: "file://" }),
43472
+ /* @__PURE__ */ jsx92(
43819
43473
  "input",
43820
43474
  {
43821
43475
  id: "storagePath",
43822
43476
  type: "text",
43823
- value: storagePath,
43477
+ value: effectivePath,
43824
43478
  onChange: (e6) => setStoragePath(e6.target.value),
43825
43479
  placeholder: "docs/my-resource.md",
43826
43480
  required: true,
@@ -43830,9 +43484,9 @@ function ResourceComposePage({
43830
43484
  )
43831
43485
  ] })
43832
43486
  ] }),
43833
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__field semiont-form__entity-types", children: [
43834
- /* @__PURE__ */ jsx97("div", { className: "semiont-form__label", children: t12.entityTypes }),
43835
- /* @__PURE__ */ jsx97(
43487
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__field semiont-form__entity-types", children: [
43488
+ /* @__PURE__ */ jsx92("div", { className: "semiont-form__label", children: t12.entityTypes }),
43489
+ /* @__PURE__ */ jsx92(
43836
43490
  "div",
43837
43491
  {
43838
43492
  className: "semiont-form__entity-type-buttons",
@@ -43840,7 +43494,7 @@ function ResourceComposePage({
43840
43494
  "aria-describedby": "entity-types-description",
43841
43495
  children: availableEntityTypes.map((type) => {
43842
43496
  const isSelected = selectedEntityTypes.includes(type);
43843
- return /* @__PURE__ */ jsx97(
43497
+ return /* @__PURE__ */ jsx92(
43844
43498
  "button",
43845
43499
  {
43846
43500
  type: "button",
@@ -43861,7 +43515,7 @@ function ResourceComposePage({
43861
43515
  })
43862
43516
  }
43863
43517
  ),
43864
- selectedEntityTypes.length > 0 && /* @__PURE__ */ jsxs85(
43518
+ selectedEntityTypes.length > 0 && /* @__PURE__ */ jsxs80(
43865
43519
  "div",
43866
43520
  {
43867
43521
  className: "sr-only",
@@ -43877,9 +43531,9 @@ function ResourceComposePage({
43877
43531
  }
43878
43532
  )
43879
43533
  ] }),
43880
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__field", children: [
43881
- /* @__PURE__ */ jsx97("label", { htmlFor: "language-select", className: "semiont-form__label", children: t12.language }),
43882
- /* @__PURE__ */ jsx97(
43534
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__field", children: [
43535
+ /* @__PURE__ */ jsx92("label", { htmlFor: "language-select", className: "semiont-form__label", children: t12.language }),
43536
+ /* @__PURE__ */ jsx92(
43883
43537
  "select",
43884
43538
  {
43885
43539
  id: "language-select",
@@ -43887,16 +43541,16 @@ function ResourceComposePage({
43887
43541
  onChange: (e6) => setSelectedLanguage(e6.target.value),
43888
43542
  disabled: isCreating,
43889
43543
  className: "semiont-select",
43890
- children: LOCALES4.map((lang) => /* @__PURE__ */ jsx97("option", { value: lang.code, children: lang.nativeName }, lang.code))
43544
+ children: LOCALES4.map((lang) => /* @__PURE__ */ jsx92("option", { value: lang.code, children: lang.nativeName }, lang.code))
43891
43545
  }
43892
43546
  )
43893
43547
  ] })
43894
43548
  ] }),
43895
- /* @__PURE__ */ jsxs85("div", { className: "semiont-compose-grid__content", children: [
43896
- !isClone && /* @__PURE__ */ jsxs85("div", { className: "semiont-form__field", children: [
43897
- /* @__PURE__ */ jsx97("label", { className: "semiont-form__label", children: t12.contentSource }),
43898
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__content-source-toggle", children: [
43899
- /* @__PURE__ */ jsxs85(
43549
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-compose-grid__content", children: [
43550
+ !isClone && /* @__PURE__ */ jsxs80("div", { className: "semiont-form__field", children: [
43551
+ /* @__PURE__ */ jsx92("label", { className: "semiont-form__label", children: t12.contentSource }),
43552
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__content-source-toggle", children: [
43553
+ /* @__PURE__ */ jsxs80(
43900
43554
  "button",
43901
43555
  {
43902
43556
  type: "button",
@@ -43905,15 +43559,15 @@ function ResourceComposePage({
43905
43559
  className: "semiont-form__content-source-button",
43906
43560
  "data-active": inputMethod === "upload",
43907
43561
  children: [
43908
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__content-source-icon-wrapper", children: [
43909
- /* @__PURE__ */ jsx97("span", { className: "semiont-form__content-source-icon", children: "\u{1F4CE}" }),
43910
- /* @__PURE__ */ jsx97("span", { className: "semiont-form__content-source-label", children: t12.uploadFile })
43562
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__content-source-icon-wrapper", children: [
43563
+ /* @__PURE__ */ jsx92("span", { className: "semiont-form__content-source-icon", children: "\u{1F4CE}" }),
43564
+ /* @__PURE__ */ jsx92("span", { className: "semiont-form__content-source-label", children: t12.uploadFile })
43911
43565
  ] }),
43912
- /* @__PURE__ */ jsx97("div", { className: "semiont-form__content-source-description", children: t12.uploadFileDescription })
43566
+ /* @__PURE__ */ jsx92("div", { className: "semiont-form__content-source-description", children: t12.uploadFileDescription })
43913
43567
  ]
43914
43568
  }
43915
43569
  ),
43916
- /* @__PURE__ */ jsxs85(
43570
+ /* @__PURE__ */ jsxs80(
43917
43571
  "button",
43918
43572
  {
43919
43573
  type: "button",
@@ -43922,19 +43576,19 @@ function ResourceComposePage({
43922
43576
  className: "semiont-form__content-source-button",
43923
43577
  "data-active": inputMethod === "write",
43924
43578
  children: [
43925
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__content-source-icon-wrapper", children: [
43926
- /* @__PURE__ */ jsx97("span", { className: "semiont-form__content-source-icon", children: "\u270D\uFE0F" }),
43927
- /* @__PURE__ */ jsx97("span", { className: "semiont-form__content-source-label", children: t12.writeContent })
43579
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__content-source-icon-wrapper", children: [
43580
+ /* @__PURE__ */ jsx92("span", { className: "semiont-form__content-source-icon", children: "\u270D\uFE0F" }),
43581
+ /* @__PURE__ */ jsx92("span", { className: "semiont-form__content-source-label", children: t12.writeContent })
43928
43582
  ] }),
43929
- /* @__PURE__ */ jsx97("div", { className: "semiont-form__content-source-description", children: t12.writeContentDescription })
43583
+ /* @__PURE__ */ jsx92("div", { className: "semiont-form__content-source-description", children: t12.writeContentDescription })
43930
43584
  ]
43931
43585
  }
43932
43586
  )
43933
43587
  ] })
43934
43588
  ] }),
43935
- !isClone && inputMethod === "upload" && /* @__PURE__ */ jsxs85("div", { className: "semiont-form__upload-section", children: [
43936
- /* @__PURE__ */ jsx97("div", { children: /* @__PURE__ */ jsxs85("div", { className: "semiont-form__upload-container", children: [
43937
- /* @__PURE__ */ jsx97(
43589
+ !isClone && inputMethod === "upload" && /* @__PURE__ */ jsxs80("div", { className: "semiont-form__upload-section", children: [
43590
+ /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsxs80("div", { className: "semiont-form__upload-container", children: [
43591
+ /* @__PURE__ */ jsx92(
43938
43592
  "label",
43939
43593
  {
43940
43594
  className: "semiont-form__upload-dropzone",
@@ -43950,8 +43604,8 @@ function ResourceComposePage({
43950
43604
  const file = e6.dataTransfer.files?.[0];
43951
43605
  if (file && !isCreating) applyUploadedFile(file);
43952
43606
  },
43953
- children: /* @__PURE__ */ jsxs85("div", { className: "semiont-form__upload-area", children: [
43954
- /* @__PURE__ */ jsx97(
43607
+ children: /* @__PURE__ */ jsxs80("div", { className: "semiont-form__upload-area", children: [
43608
+ /* @__PURE__ */ jsx92(
43955
43609
  "input",
43956
43610
  {
43957
43611
  type: "file",
@@ -43961,12 +43615,12 @@ function ResourceComposePage({
43961
43615
  disabled: isCreating
43962
43616
  }
43963
43617
  ),
43964
- /* @__PURE__ */ jsx97("p", { className: "semiont-form__upload-text", children: uploadedFile ? uploadedFile.name : t12.dropFileOrClick }),
43965
- /* @__PURE__ */ jsx97("p", { className: "semiont-form__upload-hint", children: t12.supportedFormats })
43618
+ /* @__PURE__ */ jsx92("p", { className: "semiont-form__upload-text", children: uploadedFile ? uploadedFile.name : t12.dropFileOrClick }),
43619
+ /* @__PURE__ */ jsx92("p", { className: "semiont-form__upload-hint", children: t12.supportedFormats })
43966
43620
  ] })
43967
43621
  }
43968
43622
  ),
43969
- uploadedFile && /* @__PURE__ */ jsx97(
43623
+ uploadedFile && /* @__PURE__ */ jsx92(
43970
43624
  "button",
43971
43625
  {
43972
43626
  type: "button",
@@ -43981,17 +43635,17 @@ function ResourceComposePage({
43981
43635
  }
43982
43636
  )
43983
43637
  ] }) }),
43984
- uploadedFile && /* @__PURE__ */ jsxs85("div", { className: "semiont-form__media-type", children: [
43985
- /* @__PURE__ */ jsxs85("span", { className: "semiont-form__media-type-label", children: [
43638
+ uploadedFile && /* @__PURE__ */ jsxs80("div", { className: "semiont-form__media-type", children: [
43639
+ /* @__PURE__ */ jsxs80("span", { className: "semiont-form__media-type-label", children: [
43986
43640
  t12.mediaType,
43987
43641
  ":"
43988
43642
  ] }),
43989
- /* @__PURE__ */ jsx97("code", { className: "semiont-form__media-type-value", children: fileMimeType }),
43990
- /* @__PURE__ */ jsx97("span", { className: "semiont-form__media-type-lock", title: t12.autoDetected, children: "\u{1F512}" })
43643
+ /* @__PURE__ */ jsx92("code", { className: "semiont-form__media-type-value", children: fileMimeType }),
43644
+ /* @__PURE__ */ jsx92("span", { className: "semiont-form__media-type-lock", title: t12.autoDetected, children: "\u{1F512}" })
43991
43645
  ] }),
43992
- uploadedFile && filePreviewUrl && capabilitiesOf5(fileMimeType)?.render === "image" && /* @__PURE__ */ jsxs85("div", { className: "semiont-form__image-preview", children: [
43993
- /* @__PURE__ */ jsx97("p", { className: "semiont-form__image-preview-label", children: "Preview:" }),
43994
- /* @__PURE__ */ jsx97("div", { className: "semiont-form__image-preview-container", children: /* @__PURE__ */ jsx97(
43646
+ uploadedFile && filePreviewUrl && capabilitiesOf6(fileMimeType)?.render === "image" && /* @__PURE__ */ jsxs80("div", { className: "semiont-form__image-preview", children: [
43647
+ /* @__PURE__ */ jsx92("p", { className: "semiont-form__image-preview-label", children: "Preview:" }),
43648
+ /* @__PURE__ */ jsx92("div", { className: "semiont-form__image-preview-container", children: /* @__PURE__ */ jsx92(
43995
43649
  "img",
43996
43650
  {
43997
43651
  src: filePreviewUrl,
@@ -44001,10 +43655,10 @@ function ResourceComposePage({
44001
43655
  ) })
44002
43656
  ] })
44003
43657
  ] }),
44004
- (isClone || inputMethod === "write") && /* @__PURE__ */ jsxs85("div", { className: "semiont-form__write-section", children: [
44005
- !isClone && /* @__PURE__ */ jsxs85("div", { className: "semiont-form__field", children: [
44006
- /* @__PURE__ */ jsx97("label", { htmlFor: "format-select", className: "semiont-form__label", children: t12.format }),
44007
- /* @__PURE__ */ jsx97(
43658
+ (isClone || inputMethod === "write") && /* @__PURE__ */ jsxs80("div", { className: "semiont-form__write-section", children: [
43659
+ !isClone && /* @__PURE__ */ jsxs80("div", { className: "semiont-form__field", children: [
43660
+ /* @__PURE__ */ jsx92("label", { htmlFor: "format-select", className: "semiont-form__label", children: t12.format }),
43661
+ /* @__PURE__ */ jsx92(
44008
43662
  "select",
44009
43663
  {
44010
43664
  id: "format-select",
@@ -44012,8 +43666,8 @@ function ResourceComposePage({
44012
43666
  onChange: (e6) => setSelectedFormat(e6.target.value),
44013
43667
  disabled: isCreating,
44014
43668
  className: "semiont-select",
44015
- children: AUTHORABLE_MEDIA_TYPES.map((mt) => /* @__PURE__ */ jsxs85("option", { value: mt, children: [
44016
- capabilitiesOf5(mt)?.label ?? mt,
43669
+ children: AUTHORABLE_MEDIA_TYPES.map((mt) => /* @__PURE__ */ jsxs80("option", { value: mt, children: [
43670
+ capabilitiesOf6(mt)?.label ?? mt,
44017
43671
  " (",
44018
43672
  mt,
44019
43673
  ")"
@@ -44021,9 +43675,9 @@ function ResourceComposePage({
44021
43675
  }
44022
43676
  )
44023
43677
  ] }),
44024
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__field semiont-form__editor", children: [
44025
- /* @__PURE__ */ jsx97("label", { className: "semiont-form__label", children: isClone ? t12.resourceContent : t12.content }),
44026
- /* @__PURE__ */ jsx97("div", { className: "semiont-form__editor-wrapper", lang: selectedLanguage, children: /* @__PURE__ */ jsx97(
43678
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__field semiont-form__editor", children: [
43679
+ /* @__PURE__ */ jsx92("label", { className: "semiont-form__label", children: isClone ? t12.resourceContent : t12.content }),
43680
+ /* @__PURE__ */ jsx92("div", { className: "semiont-form__editor-wrapper", lang: selectedLanguage, children: /* @__PURE__ */ jsx92(
44027
43681
  CodeMirrorRenderer,
44028
43682
  {
44029
43683
  content: newResourceContent,
@@ -44035,9 +43689,9 @@ function ResourceComposePage({
44035
43689
  }
44036
43690
  ) })
44037
43691
  ] }),
44038
- !isClone && /* @__PURE__ */ jsxs85("div", { className: "semiont-form__field", children: [
44039
- /* @__PURE__ */ jsx97("label", { htmlFor: "charset-select", className: "semiont-form__label", children: t12.encoding }),
44040
- /* @__PURE__ */ jsxs85(
43692
+ !isClone && /* @__PURE__ */ jsxs80("div", { className: "semiont-form__field", children: [
43693
+ /* @__PURE__ */ jsx92("label", { htmlFor: "charset-select", className: "semiont-form__label", children: t12.encoding }),
43694
+ /* @__PURE__ */ jsxs80(
44041
43695
  "select",
44042
43696
  {
44043
43697
  id: "charset-select",
@@ -44046,18 +43700,18 @@ function ResourceComposePage({
44046
43700
  disabled: isCreating,
44047
43701
  className: "semiont-select",
44048
43702
  children: [
44049
- /* @__PURE__ */ jsx97("option", { value: "", children: "UTF-8 (default)" }),
44050
- /* @__PURE__ */ jsx97("option", { value: "iso-8859-1", children: "ISO-8859-1 (Latin-1)" }),
44051
- /* @__PURE__ */ jsx97("option", { value: "windows-1252", children: "Windows-1252" }),
44052
- /* @__PURE__ */ jsx97("option", { value: "ascii", children: "ASCII" }),
44053
- /* @__PURE__ */ jsx97("option", { value: "utf-16le", children: "UTF-16LE" })
43703
+ /* @__PURE__ */ jsx92("option", { value: "", children: "UTF-8 (default)" }),
43704
+ /* @__PURE__ */ jsx92("option", { value: "iso-8859-1", children: "ISO-8859-1 (Latin-1)" }),
43705
+ /* @__PURE__ */ jsx92("option", { value: "windows-1252", children: "Windows-1252" }),
43706
+ /* @__PURE__ */ jsx92("option", { value: "ascii", children: "ASCII" }),
43707
+ /* @__PURE__ */ jsx92("option", { value: "utf-16le", children: "UTF-16LE" })
44054
43708
  ]
44055
43709
  }
44056
43710
  )
44057
43711
  ] })
44058
43712
  ] }),
44059
- isClone && /* @__PURE__ */ jsxs85("div", { className: "semiont-form__checkbox-field", children: [
44060
- /* @__PURE__ */ jsx97(
43713
+ isClone && /* @__PURE__ */ jsxs80("div", { className: "semiont-form__checkbox-field", children: [
43714
+ /* @__PURE__ */ jsx92(
44061
43715
  "input",
44062
43716
  {
44063
43717
  id: "archiveOriginal",
@@ -44068,11 +43722,11 @@ function ResourceComposePage({
44068
43722
  disabled: isCreating
44069
43723
  }
44070
43724
  ),
44071
- /* @__PURE__ */ jsx97("label", { htmlFor: "archiveOriginal", className: "semiont-form__checkbox-label", children: t12.archiveOriginal })
43725
+ /* @__PURE__ */ jsx92("label", { htmlFor: "archiveOriginal", className: "semiont-form__checkbox-label", children: t12.archiveOriginal })
44072
43726
  ] })
44073
43727
  ] }),
44074
- /* @__PURE__ */ jsxs85("div", { className: "semiont-form__actions", children: [
44075
- /* @__PURE__ */ jsx97(
43728
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-form__actions", children: [
43729
+ /* @__PURE__ */ jsx92(
44076
43730
  "button",
44077
43731
  {
44078
43732
  type: "button",
@@ -44082,7 +43736,7 @@ function ResourceComposePage({
44082
43736
  children: t12.cancel
44083
43737
  }
44084
43738
  ),
44085
- /* @__PURE__ */ jsx97(
43739
+ /* @__PURE__ */ jsx92(
44086
43740
  "button",
44087
43741
  {
44088
43742
  type: "submit",
@@ -44092,18 +43746,18 @@ function ResourceComposePage({
44092
43746
  }
44093
43747
  )
44094
43748
  ] }),
44095
- /* @__PURE__ */ jsx97(UploadProgressBar, { progress: uploadProgress })
43749
+ /* @__PURE__ */ jsx92(UploadProgressBar, { progress: uploadProgress })
44096
43750
  ] }) })
44097
43751
  ] }),
44098
- /* @__PURE__ */ jsxs85("div", { className: "semiont-page__sidebar", children: [
44099
- /* @__PURE__ */ jsx97(
43752
+ /* @__PURE__ */ jsxs80("div", { className: "semiont-page__sidebar", children: [
43753
+ /* @__PURE__ */ jsx92(
44100
43754
  ToolbarPanels,
44101
43755
  {
44102
43756
  activePanel,
44103
43757
  theme: theme2
44104
43758
  }
44105
43759
  ),
44106
- /* @__PURE__ */ jsx97(
43760
+ /* @__PURE__ */ jsx92(
44107
43761
  Toolbar2,
44108
43762
  {
44109
43763
  context: "simple",
@@ -44115,19 +43769,19 @@ function ResourceComposePage({
44115
43769
  }
44116
43770
 
44117
43771
  // src/features/resource-discovery/components/ResourceDiscoveryPage.tsx
44118
- import { useCallback as useCallback35, useRef as useRef39 } from "react";
43772
+ import { useCallback as useCallback34, useRef as useRef38 } from "react";
44119
43773
  import { getResourceId as getResourceId2 } from "@semiont/core";
44120
43774
 
44121
43775
  // src/features/resource-discovery/components/ResourceCard.tsx
44122
- import React49 from "react";
44123
- import { jsx as jsx98, jsxs as jsxs86 } from "react/jsx-runtime";
44124
- var ResourceCard = React49.memo(({
43776
+ import React48 from "react";
43777
+ import { jsx as jsx93, jsxs as jsxs81 } from "react/jsx-runtime";
43778
+ var ResourceCard = React48.memo(({
44125
43779
  resource,
44126
43780
  onOpen,
44127
43781
  tabIndex = 0,
44128
43782
  archivedLabel,
44129
43783
  createdLabel
44130
- }) => /* @__PURE__ */ jsxs86(
43784
+ }) => /* @__PURE__ */ jsxs81(
44131
43785
  "div",
44132
43786
  {
44133
43787
  onClick: () => onOpen(resource),
@@ -44142,18 +43796,18 @@ var ResourceCard = React49.memo(({
44142
43796
  "aria-label": `Open resource: ${resource.name}`,
44143
43797
  className: "semiont-resource-card",
44144
43798
  children: [
44145
- /* @__PURE__ */ jsxs86("div", { className: "semiont-resource-card__header", children: [
44146
- /* @__PURE__ */ jsx98("h4", { className: "semiont-resource-card__title", children: resource.name }),
44147
- resource.archived && /* @__PURE__ */ jsx98("span", { className: "semiont-resource-card__badge", "data-type": "archived", children: archivedLabel })
43799
+ /* @__PURE__ */ jsxs81("div", { className: "semiont-resource-card__header", children: [
43800
+ /* @__PURE__ */ jsx93("h4", { className: "semiont-resource-card__title", children: resource.name }),
43801
+ resource.archived && /* @__PURE__ */ jsx93("span", { className: "semiont-resource-card__badge", "data-type": "archived", children: archivedLabel })
44148
43802
  ] }),
44149
- /* @__PURE__ */ jsxs86("div", { className: "semiont-resource-card__metadata", children: [
44150
- /* @__PURE__ */ jsxs86("span", { className: "semiont-resource-card__date", children: [
43803
+ /* @__PURE__ */ jsxs81("div", { className: "semiont-resource-card__metadata", children: [
43804
+ /* @__PURE__ */ jsxs81("span", { className: "semiont-resource-card__date", children: [
44151
43805
  createdLabel,
44152
43806
  " ",
44153
43807
  resource.dateCreated ? new Date(resource.dateCreated).toLocaleDateString() : "N/A"
44154
43808
  ] }),
44155
- resource.entityTypes && resource.entityTypes.length > 0 && /* @__PURE__ */ jsxs86("div", { className: "semiont-tags", children: [
44156
- resource.entityTypes.slice(0, 2).map((type) => /* @__PURE__ */ jsx98(
43809
+ resource.entityTypes && resource.entityTypes.length > 0 && /* @__PURE__ */ jsxs81("div", { className: "semiont-tags", children: [
43810
+ resource.entityTypes.slice(0, 2).map((type) => /* @__PURE__ */ jsx93(
44157
43811
  "span",
44158
43812
  {
44159
43813
  className: "semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",
@@ -44161,7 +43815,7 @@ var ResourceCard = React49.memo(({
44161
43815
  },
44162
43816
  type
44163
43817
  )),
44164
- resource.entityTypes.length > 2 && /* @__PURE__ */ jsxs86("span", { className: "semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm", children: [
43818
+ resource.entityTypes.length > 2 && /* @__PURE__ */ jsxs81("span", { className: "semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm", children: [
44165
43819
  "+",
44166
43820
  resource.entityTypes.length - 2
44167
43821
  ] })
@@ -44173,7 +43827,7 @@ var ResourceCard = React49.memo(({
44173
43827
  ResourceCard.displayName = "ResourceCard";
44174
43828
 
44175
43829
  // src/features/resource-discovery/components/ResourceDiscoveryPage.tsx
44176
- import { jsx as jsx99, jsxs as jsxs87 } from "react/jsx-runtime";
43830
+ import { jsx as jsx94, jsxs as jsxs82 } from "react/jsx-runtime";
44177
43831
  function ResourceDiscoveryPage({
44178
43832
  recentDocuments,
44179
43833
  searchDocuments,
@@ -44206,36 +43860,36 @@ function ResourceDiscoveryPage({
44206
43860
  { orientation: "grid", cols: 2 }
44207
43861
  // 2 columns on medium+ screens
44208
43862
  );
44209
- const onNavigateToResourceRef = useRef39(onNavigateToResource);
43863
+ const onNavigateToResourceRef = useRef38(onNavigateToResource);
44210
43864
  onNavigateToResourceRef.current = onNavigateToResource;
44211
- const handleEntityTypeFilter = useCallback35((entityType) => {
43865
+ const handleEntityTypeFilter = useCallback34((entityType) => {
44212
43866
  onSelectedEntityTypeChange(entityType);
44213
43867
  }, [onSelectedEntityTypeChange]);
44214
- const openResource = useCallback35((resource) => {
43868
+ const openResource = useCallback34((resource) => {
44215
43869
  const resourceId2 = getResourceId2(resource);
44216
43870
  if (resourceId2) {
44217
43871
  onNavigateToResourceRef.current(resourceId2);
44218
43872
  }
44219
43873
  }, []);
44220
43874
  if (recentError) {
44221
- return /* @__PURE__ */ jsxs87("div", { className: "semiont-page__loading", children: [
44222
- /* @__PURE__ */ jsx99("p", { className: "semiont-page__loading-text", children: t12.recentFailed }),
44223
- onRetryRecent && /* @__PURE__ */ jsx99("button", { type: "button", onClick: onRetryRecent, className: "semiont-button", "data-variant": "secondary", children: t12.retry })
43875
+ return /* @__PURE__ */ jsxs82("div", { className: "semiont-page__loading", children: [
43876
+ /* @__PURE__ */ jsx94("p", { className: "semiont-page__loading-text", children: t12.recentFailed }),
43877
+ onRetryRecent && /* @__PURE__ */ jsx94("button", { type: "button", onClick: onRetryRecent, className: "semiont-button", "data-variant": "secondary", children: t12.retry })
44224
43878
  ] });
44225
43879
  }
44226
43880
  if (isLoadingRecent) {
44227
- return /* @__PURE__ */ jsx99("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx99("p", { className: "semiont-page__loading-text", children: t12.loadingKnowledgeBase }) });
43881
+ return /* @__PURE__ */ jsx94("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx94("p", { className: "semiont-page__loading-text", children: t12.loadingKnowledgeBase }) });
44228
43882
  }
44229
43883
  const showNoResultsWarning = hasSearchQuery && searchDocuments.length === 0 && !isSearching;
44230
- return /* @__PURE__ */ jsxs87("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
44231
- /* @__PURE__ */ jsxs87("div", { className: "semiont-page__content", children: [
44232
- /* @__PURE__ */ jsxs87("div", { className: "semiont-page__header", children: [
44233
- /* @__PURE__ */ jsx99("h1", { className: "semiont-page__title", children: t12.title }),
44234
- /* @__PURE__ */ jsx99("p", { className: "semiont-page__subtitle", children: t12.subtitle })
43884
+ return /* @__PURE__ */ jsxs82("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
43885
+ /* @__PURE__ */ jsxs82("div", { className: "semiont-page__content", children: [
43886
+ /* @__PURE__ */ jsxs82("div", { className: "semiont-page__header", children: [
43887
+ /* @__PURE__ */ jsx94("h1", { className: "semiont-page__title", children: t12.title }),
43888
+ /* @__PURE__ */ jsx94("p", { className: "semiont-page__subtitle", children: t12.subtitle })
44235
43889
  ] }),
44236
- /* @__PURE__ */ jsxs87("div", { className: "semiont-card", children: [
44237
- /* @__PURE__ */ jsx99("div", { className: "semiont-card__search-form", children: /* @__PURE__ */ jsxs87("div", { className: "semiont-card__search-wrapper", children: [
44238
- /* @__PURE__ */ jsx99(
43890
+ /* @__PURE__ */ jsxs82("div", { className: "semiont-card", children: [
43891
+ /* @__PURE__ */ jsx94("div", { className: "semiont-card__search-form", children: /* @__PURE__ */ jsxs82("div", { className: "semiont-card__search-wrapper", children: [
43892
+ /* @__PURE__ */ jsx94(
44239
43893
  "input",
44240
43894
  {
44241
43895
  type: "text",
@@ -44246,11 +43900,11 @@ function ResourceDiscoveryPage({
44246
43900
  "aria-label": t12.searchPlaceholder
44247
43901
  }
44248
43902
  ),
44249
- isSearching && /* @__PURE__ */ jsx99("span", { className: "semiont-card__search-status", "aria-live": "polite", children: t12.searching })
43903
+ isSearching && /* @__PURE__ */ jsx94("span", { className: "semiont-card__search-status", "aria-live": "polite", children: t12.searching })
44250
43904
  ] }) }),
44251
- entityTypes.length > 0 && /* @__PURE__ */ jsxs87("div", { className: "semiont-card__filters", children: [
44252
- /* @__PURE__ */ jsx99("h3", { className: "semiont-card__filters-label", children: t12.filterByEntityType }),
44253
- /* @__PURE__ */ jsxs87(
43905
+ entityTypes.length > 0 && /* @__PURE__ */ jsxs82("div", { className: "semiont-card__filters", children: [
43906
+ /* @__PURE__ */ jsx94("h3", { className: "semiont-card__filters-label", children: t12.filterByEntityType }),
43907
+ /* @__PURE__ */ jsxs82(
44254
43908
  "div",
44255
43909
  {
44256
43910
  ref: entityFilterRoving.containerRef,
@@ -44259,7 +43913,7 @@ function ResourceDiscoveryPage({
44259
43913
  role: "group",
44260
43914
  "aria-label": "Entity type filters",
44261
43915
  children: [
44262
- /* @__PURE__ */ jsx99(
43916
+ /* @__PURE__ */ jsx94(
44263
43917
  "button",
44264
43918
  {
44265
43919
  onClick: () => handleEntityTypeFilter(""),
@@ -44270,7 +43924,7 @@ function ResourceDiscoveryPage({
44270
43924
  children: t12.all
44271
43925
  }
44272
43926
  ),
44273
- entityTypes.map((type) => /* @__PURE__ */ jsx99(
43927
+ entityTypes.map((type) => /* @__PURE__ */ jsx94(
44274
43928
  "button",
44275
43929
  {
44276
43930
  onClick: () => handleEntityTypeFilter(type),
@@ -44286,9 +43940,9 @@ function ResourceDiscoveryPage({
44286
43940
  }
44287
43941
  )
44288
43942
  ] }),
44289
- /* @__PURE__ */ jsxs87("div", { className: "semiont-card__documents", children: [
44290
- /* @__PURE__ */ jsx99("h3", { className: "semiont-card__documents-label", children: hasSearchQuery && searchDocuments.length > 0 ? t12.searchResults(searchDocuments.length) : selectedEntityType ? t12.documentsTaggedWith(selectedEntityType) : t12.recentResources }),
44291
- hasSearchQuery && searchMatchKind === "semantic" && searchDocuments.length > 0 && /* @__PURE__ */ jsx99(
43943
+ /* @__PURE__ */ jsxs82("div", { className: "semiont-card__documents", children: [
43944
+ /* @__PURE__ */ jsx94("h3", { className: "semiont-card__documents-label", children: hasSearchQuery && searchDocuments.length > 0 ? t12.searchResults(searchDocuments.length) : selectedEntityType ? t12.documentsTaggedWith(selectedEntityType) : t12.recentResources }),
43945
+ hasSearchQuery && searchMatchKind === "semantic" && searchDocuments.length > 0 && /* @__PURE__ */ jsx94(
44292
43946
  "p",
44293
43947
  {
44294
43948
  className: "semiont-card__documents-note",
@@ -44297,8 +43951,8 @@ function ResourceDiscoveryPage({
44297
43951
  children: t12.semanticFallbackNotice
44298
43952
  }
44299
43953
  ),
44300
- showNoResultsWarning && /* @__PURE__ */ jsx99("div", { className: "semiont-card__warning", children: /* @__PURE__ */ jsx99("p", { className: "semiont-card__warning-text", children: t12.noResultsFound(searchQuery) }) }),
44301
- filteredResources.length > 0 ? /* @__PURE__ */ jsx99(
43954
+ showNoResultsWarning && /* @__PURE__ */ jsx94("div", { className: "semiont-card__warning", children: /* @__PURE__ */ jsx94("p", { className: "semiont-card__warning-text", children: t12.noResultsFound(searchQuery) }) }),
43955
+ filteredResources.length > 0 ? /* @__PURE__ */ jsx94(
44302
43956
  "div",
44303
43957
  {
44304
43958
  ref: documentGridRoving.containerRef,
@@ -44306,7 +43960,7 @@ function ResourceDiscoveryPage({
44306
43960
  className: "semiont-card-grid",
44307
43961
  role: "group",
44308
43962
  "aria-label": "Document grid",
44309
- children: filteredResources.map((resource, index) => /* @__PURE__ */ jsx99(
43963
+ children: filteredResources.map((resource, index) => /* @__PURE__ */ jsx94(
44310
43964
  ResourceCard,
44311
43965
  {
44312
43966
  resource,
@@ -44318,9 +43972,9 @@ function ResourceDiscoveryPage({
44318
43972
  getResourceId2(resource)
44319
43973
  ))
44320
43974
  }
44321
- ) : /* @__PURE__ */ jsxs87("div", { className: "semiont-card__empty", children: [
44322
- /* @__PURE__ */ jsx99("p", { className: "semiont-card__empty-text", children: t12.noResourcesAvailable }),
44323
- !hasSearchQuery && /* @__PURE__ */ jsx99(
43975
+ ) : /* @__PURE__ */ jsxs82("div", { className: "semiont-card__empty", children: [
43976
+ /* @__PURE__ */ jsx94("p", { className: "semiont-card__empty-text", children: t12.noResourcesAvailable }),
43977
+ !hasSearchQuery && /* @__PURE__ */ jsx94(
44324
43978
  "button",
44325
43979
  {
44326
43980
  onClick: onNavigateToCompose,
@@ -44332,15 +43986,15 @@ function ResourceDiscoveryPage({
44332
43986
  ] })
44333
43987
  ] })
44334
43988
  ] }),
44335
- /* @__PURE__ */ jsxs87("div", { className: "semiont-page__sidebar", children: [
44336
- /* @__PURE__ */ jsx99(
43989
+ /* @__PURE__ */ jsxs82("div", { className: "semiont-page__sidebar", children: [
43990
+ /* @__PURE__ */ jsx94(
44337
43991
  ToolbarPanels,
44338
43992
  {
44339
43993
  activePanel,
44340
43994
  theme: theme2
44341
43995
  }
44342
43996
  ),
44343
- /* @__PURE__ */ jsx99(
43997
+ /* @__PURE__ */ jsx94(
44344
43998
  Toolbar,
44345
43999
  {
44346
44000
  context: "simple",
@@ -44352,14 +44006,14 @@ function ResourceDiscoveryPage({
44352
44006
  }
44353
44007
 
44354
44008
  // src/features/resource-viewer/components/ResourceViewerPage.tsx
44355
- import { useState as useState54, useEffect as useEffect58, useCallback as useCallback36 } from "react";
44009
+ import { useState as useState53, useEffect as useEffect58, useCallback as useCallback35 } from "react";
44356
44010
 
44357
44011
  // src/features/resource-viewer/hooks/useResourceViewedReport.ts
44358
- import { useEffect as useEffect56, useRef as useRef40 } from "react";
44012
+ import { useEffect as useEffect56, useRef as useRef39 } from "react";
44359
44013
  function useResourceViewedReport(rid, loaded) {
44360
44014
  const semiont = useSemiont();
44361
44015
  const session = useObservable(semiont.activeSession$);
44362
- const reported = useRef40(null);
44016
+ const reported = useRef39(null);
44363
44017
  useEffect56(() => {
44364
44018
  if (!loaded || !session) return;
44365
44019
  if (reported.current === rid) return;
@@ -44369,8 +44023,8 @@ function useResourceViewedReport(rid, loaded) {
44369
44023
  }
44370
44024
 
44371
44025
  // src/features/resource-viewer/components/ResourceViewerPage.tsx
44372
- import { annotationId } from "@semiont/core";
44373
- import { getLanguage, getPrimaryRepresentation, getPrimaryMediaType as getPrimaryMediaType3, capabilitiesOf as capabilitiesOf6, extensionForMediaType } from "@semiont/core";
44026
+ import { annotationId, folderOf as folderOf2 } from "@semiont/core";
44027
+ import { getLanguage, getPrimaryRepresentation, getPrimaryMediaType as getPrimaryMediaType3, getStorageUri as getStorageUri2, capabilitiesOf as capabilitiesOf7, extensionForMediaType } from "@semiont/core";
44374
44028
 
44375
44029
  // src/lib/job-outcome.ts
44376
44030
  import { isObject, isString } from "@semiont/core";
@@ -44426,12 +44080,12 @@ function useOutcomeToasts(resourceId2) {
44426
44080
  }
44427
44081
 
44428
44082
  // src/hooks/useGenerationArrival.ts
44429
- import { useEffect as useEffect57, useRef as useRef41 } from "react";
44083
+ import { useEffect as useEffect57, useRef as useRef40 } from "react";
44430
44084
  import { getBodySource as getBodySource8 } from "@semiont/core";
44431
44085
  function useGenerationArrival(outcome, annotations, onReveal) {
44432
- const seen = useRef41(outcome);
44433
- const pending = useRef41(null);
44434
- const onRevealRef = useRef41(onReveal);
44086
+ const seen = useRef40(outcome);
44087
+ const pending = useRef40(null);
44088
+ const onRevealRef = useRef40(onReveal);
44435
44089
  useEffect57(() => {
44436
44090
  onRevealRef.current = onReveal;
44437
44091
  });
@@ -44634,8 +44288,17 @@ function useShellStateUnit() {
44634
44288
  }));
44635
44289
  }
44636
44290
 
44291
+ // src/features/resource-viewer/generation-options.ts
44292
+ function toGenerationOptions(config, sourceLanguage) {
44293
+ const { context: _positional, ...options } = config;
44294
+ return {
44295
+ ...options,
44296
+ ...sourceLanguage ? { sourceLanguage } : {}
44297
+ };
44298
+ }
44299
+
44637
44300
  // src/features/resource-viewer/components/ResourceViewerPage.tsx
44638
- import { jsx as jsx100, jsxs as jsxs88 } from "react/jsx-runtime";
44301
+ import { jsx as jsx95, jsxs as jsxs83 } from "react/jsx-runtime";
44639
44302
  function ResourceViewerPage({
44640
44303
  resource,
44641
44304
  rUri,
@@ -44659,10 +44322,10 @@ function ResourceViewerPage({
44659
44322
  const generationAgent = collaborators.find(
44660
44323
  (entry) => entry.servesJobTypes?.includes("generation")
44661
44324
  );
44662
- const handleViewerOpenResource = useCallback36((id2) => {
44325
+ const handleViewerOpenResource = useCallback35((id2) => {
44663
44326
  navigateExternal(`/know/resource/${id2}`, { resourceId: id2 });
44664
44327
  }, [navigateExternal]);
44665
- const handleViewerOpenPanel = useCallback36((event) => {
44328
+ const handleViewerOpenPanel = useCallback35((event) => {
44666
44329
  browser2.emit("panel:open", event);
44667
44330
  }, [browser2]);
44668
44331
  const { showError, showSuccess } = useToast();
@@ -44673,7 +44336,7 @@ function ResourceViewerPage({
44673
44336
  const resourceMediaType = getPrimaryMediaType3(resource) || "text/plain";
44674
44337
  const toolbarPrefs = useToolbarPrefs(getSelectorType(resourceMediaType));
44675
44338
  const annotateMode = toolbarPrefs.annotateMode;
44676
- const renderMode = capabilitiesOf6(resourceMediaType)?.render;
44339
+ const renderMode = capabilitiesOf7(resourceMediaType)?.render;
44677
44340
  const isBinary = renderMode === "image" || renderMode === "pdf";
44678
44341
  const { content: textContent, loading: textLoading, error: contentError } = useResourceContent(semiont ?? null, rUri, resource, !isBinary);
44679
44342
  useEffect58(() => {
@@ -44710,7 +44373,7 @@ function ResourceViewerPage({
44710
44373
  const generationProgress = useObservable(stateUnit?.yield.progress$) ?? null;
44711
44374
  const isGenerating = useObservable(stateUnit?.yield.isGenerating$) ?? false;
44712
44375
  const generationOutcome = useObservable(stateUnit?.yield.outcome$) ?? null;
44713
- const handleGenerationArrival = useCallback36((annId) => {
44376
+ const handleGenerationArrival = useCallback35((annId) => {
44714
44377
  browser2.emit("panel:open", { panel: "annotations", scrollToAnnotationId: annId, motivation: "linking" });
44715
44378
  triggerSparkleAnimation(annId);
44716
44379
  }, [browser2, triggerSparkleAnimation]);
@@ -44727,37 +44390,18 @@ function ResourceViewerPage({
44727
44390
  const wizardResourceId = wizardState?.resourceId ?? null;
44728
44391
  const wizardDefaultTitle = wizardState?.defaultTitle ?? "";
44729
44392
  const wizardEntityTypes = wizardState?.entityTypes ?? [];
44730
- const [generateOpen, setGenerateOpen] = useState54(false);
44731
- const handleWizardClose = useCallback36(() => {
44393
+ const [generateOpen, setGenerateOpen] = useState53(false);
44394
+ const handleWizardClose = useCallback35(() => {
44732
44395
  stateUnit?.closeWizard();
44733
44396
  }, [stateUnit]);
44734
- const handleWizardGenerateSubmit = useCallback36((referenceId, config) => {
44397
+ const handleWizardGenerateSubmit = useCallback35((referenceId, config) => {
44735
44398
  clearSparkle(annotationId(referenceId));
44736
- stateUnit?.yield.generate(config.context, {
44737
- title: config.title,
44738
- storageUri: config.storagePath,
44739
- prompt: config.prompt,
44740
- language: config.language,
44741
- // The source resource is the one the user is viewing — fed into the
44742
- // prompt so the LLM understands the embedded context (selected
44743
- // passage, surrounding text) regardless of UI/target language.
44744
- sourceLanguage: getLanguage(resource),
44745
- temperature: config.temperature,
44746
- maxTokens: config.maxTokens
44747
- });
44399
+ stateUnit?.yield.generate(config.context, toGenerationOptions(config, getLanguage(resource)));
44748
44400
  }, [stateUnit, clearSparkle, resource]);
44749
- const handleResourceGenerateSubmit = useCallback36((_resourceId, config) => {
44750
- stateUnit?.yield.generate(config.context, {
44751
- title: config.title,
44752
- storageUri: config.storagePath,
44753
- ...config.prompt ? { prompt: config.prompt } : {},
44754
- language: config.language,
44755
- sourceLanguage: getLanguage(resource),
44756
- temperature: config.temperature,
44757
- maxTokens: config.maxTokens
44758
- });
44401
+ const handleResourceGenerateSubmit = useCallback35((_resourceId, config) => {
44402
+ stateUnit?.yield.generate(config.context, toGenerationOptions(config, getLanguage(resource)));
44759
44403
  }, [stateUnit, resource]);
44760
- const handleWizardLinkResource = useCallback36(async (referenceId, targetResourceId) => {
44404
+ const handleWizardLinkResource = useCallback35(async (referenceId, targetResourceId) => {
44761
44405
  if (!semiont) return;
44762
44406
  try {
44763
44407
  await semiont.bind.body(
@@ -44770,7 +44414,7 @@ function ResourceViewerPage({
44770
44414
  showError(`Failed to link reference: ${error instanceof Error ? error.message : String(error)}`);
44771
44415
  }
44772
44416
  }, [rUri, semiont, showSuccess, showError]);
44773
- const handleWizardComposeSubmit = useCallback36(async (referenceId, params) => {
44417
+ const handleWizardComposeSubmit = useCallback35(async (referenceId, params) => {
44774
44418
  if (!semiont) throw new Error("No active session");
44775
44419
  try {
44776
44420
  const format = "text/markdown";
@@ -44808,7 +44452,7 @@ function ResourceViewerPage({
44808
44452
  useEffect58(() => {
44809
44453
  if (resource && rUri) {
44810
44454
  const mediaType = getPrimaryMediaType3(resource);
44811
- browser2.addOpenResource(rUri, resource.name, mediaType || void 0, resource.storageUri);
44455
+ browser2.addOpenResource(rUri, resource.name, mediaType || void 0, getStorageUri2(resource));
44812
44456
  browser2.setLastViewedResource(rUri);
44813
44457
  }
44814
44458
  }, [resource, rUri, browser2]);
@@ -44817,7 +44461,7 @@ function ResourceViewerPage({
44817
44461
  browser2.emit("panel:open", { panel: "annotations" });
44818
44462
  }
44819
44463
  }, [pendingAnnotation, browser2]);
44820
- const handleResourceArchive = useCallback36(async () => {
44464
+ const handleResourceArchive = useCallback35(async () => {
44821
44465
  if (!semiont) return;
44822
44466
  try {
44823
44467
  await semiont.mark.archive(rUri);
@@ -44827,7 +44471,7 @@ function ResourceViewerPage({
44827
44471
  showError("Failed to archive document");
44828
44472
  }
44829
44473
  }, [semiont, rUri, refetchDocument, showError]);
44830
- const handleResourceUnarchive = useCallback36(async () => {
44474
+ const handleResourceUnarchive = useCallback35(async () => {
44831
44475
  if (!semiont) return;
44832
44476
  try {
44833
44477
  await semiont.mark.unarchive(rUri);
@@ -44837,7 +44481,7 @@ function ResourceViewerPage({
44837
44481
  showError("Failed to unarchive document");
44838
44482
  }
44839
44483
  }, [semiont, rUri, refetchDocument, showError]);
44840
- const handleResourceClone = useCallback36(async () => {
44484
+ const handleResourceClone = useCallback35(async () => {
44841
44485
  if (!semiont) return;
44842
44486
  try {
44843
44487
  const result = await semiont.yield.cloneToken(rUri);
@@ -44848,13 +44492,13 @@ function ResourceViewerPage({
44848
44492
  showError("Failed to generate clone link");
44849
44493
  }
44850
44494
  }, [semiont, rUri, showError, browser2]);
44851
- const handleAnnotationSparkle = useCallback36(({ annotationId: annotationId2 }) => {
44495
+ const handleAnnotationSparkle = useCallback35(({ annotationId: annotationId2 }) => {
44852
44496
  triggerSparkleAnimation(annotationId2);
44853
44497
  }, [triggerSparkleAnimation]);
44854
- const handleAnnotationAdded = useCallback36((stored) => {
44498
+ const handleAnnotationAdded = useCallback35((stored) => {
44855
44499
  triggerSparkleAnimation(stored.payload.annotation.id);
44856
44500
  }, [triggerSparkleAnimation]);
44857
- const handleAnnotationBodyUpdated = useCallback36((stored) => {
44501
+ const handleAnnotationBodyUpdated = useCallback35((stored) => {
44858
44502
  const resolves = stored.payload.operations.some(
44859
44503
  (op) => op.op === "add" && op.item.type === "SpecificResource" && op.item.purpose === "linking"
44860
44504
  );
@@ -44862,13 +44506,13 @@ function ResourceViewerPage({
44862
44506
  triggerSparkleAnimation(stored.payload.annotationId);
44863
44507
  }
44864
44508
  }, [triggerSparkleAnimation]);
44865
- const handleResourceOpen = useCallback36(({ resourceId: resourceId2 }) => {
44509
+ const handleResourceOpen = useCallback35(({ resourceId: resourceId2 }) => {
44866
44510
  if (routes.resourceDetail) {
44867
44511
  const path = routes.resourceDetail(resourceId2);
44868
44512
  browser2.emit("nav:push", { path, reason: "reference-link" });
44869
44513
  }
44870
44514
  }, [routes.resourceDetail, browser2]);
44871
- const handleEntityTypeClicked = useCallback36(({ entityType }) => {
44515
+ const handleEntityTypeClicked = useCallback35(({ entityType }) => {
44872
44516
  if (routes.know) {
44873
44517
  const path = `${routes.know}?entityType=${encodeURIComponent(entityType)}`;
44874
44518
  browser2.emit("nav:push", { path, reason: "entity-type-filter" });
@@ -44902,27 +44546,27 @@ function ResourceViewerPage({
44902
44546
  const primaryMediaType = primaryRep?.mediaType;
44903
44547
  const primaryByteSize = primaryRep?.byteSize;
44904
44548
  const resourceWithContent = { ...resource, content: content2 };
44905
- const handleEventHover = useCallback36((id2) => {
44549
+ const handleEventHover = useCallback35((id2) => {
44906
44550
  if (id2) {
44907
44551
  session?.client.beckon.sparkle(annotationId(id2));
44908
44552
  }
44909
44553
  }, [session]);
44910
- const handleEventClick = useCallback36((id2) => {
44554
+ const handleEventClick = useCallback35((id2) => {
44911
44555
  if (id2) {
44912
44556
  stateUnit?.beckon.focus(annotationId(id2));
44913
44557
  }
44914
44558
  }, [stateUnit]);
44915
- return /* @__PURE__ */ jsxs88("div", { className: `semiont-document-viewer${activePanel ? " semiont-document-viewer--panel-open" : ""}`, children: [
44916
- /* @__PURE__ */ jsxs88("div", { className: "semiont-document-viewer__main", children: [
44917
- /* @__PURE__ */ jsxs88("div", { className: "semiont-document-viewer__content", children: [
44918
- /* @__PURE__ */ jsx100("div", { className: "semiont-document-viewer__header", children: /* @__PURE__ */ jsx100("div", { className: "semiont-document-viewer__header-inner", children: /* @__PURE__ */ jsx100("h2", { className: "semiont-document-viewer__title", children: resource.name }) }) }),
44919
- /* @__PURE__ */ jsx100("div", { className: "semiont-document-viewer__scrollable-body", lang: getLanguage(resource) || void 0, children: /* @__PURE__ */ jsx100(
44559
+ return /* @__PURE__ */ jsxs83("div", { className: `semiont-document-viewer${activePanel ? " semiont-document-viewer--panel-open" : ""}`, children: [
44560
+ /* @__PURE__ */ jsxs83("div", { className: "semiont-document-viewer__main", children: [
44561
+ /* @__PURE__ */ jsxs83("div", { className: "semiont-document-viewer__content", children: [
44562
+ /* @__PURE__ */ jsx95("div", { className: "semiont-document-viewer__header", children: /* @__PURE__ */ jsx95("div", { className: "semiont-document-viewer__header-inner", children: /* @__PURE__ */ jsx95("h2", { className: "semiont-document-viewer__title", children: resource.name }) }) }),
44563
+ /* @__PURE__ */ jsx95("div", { className: "semiont-document-viewer__scrollable-body", lang: getLanguage(resource) || void 0, children: /* @__PURE__ */ jsx95(
44920
44564
  ErrorBoundary,
44921
44565
  {
44922
- fallback: (error, reset) => /* @__PURE__ */ jsxs88("div", { className: "semiont-document-viewer__error", children: [
44923
- /* @__PURE__ */ jsx100("h3", { className: "semiont-document-viewer__error-title", children: "Error loading document viewer" }),
44924
- /* @__PURE__ */ jsx100("p", { className: "semiont-document-viewer__error-message", children: error.message }),
44925
- /* @__PURE__ */ jsx100(
44566
+ fallback: (error, reset) => /* @__PURE__ */ jsxs83("div", { className: "semiont-document-viewer__error", children: [
44567
+ /* @__PURE__ */ jsx95("h3", { className: "semiont-document-viewer__error-title", children: "Error loading document viewer" }),
44568
+ /* @__PURE__ */ jsx95("p", { className: "semiont-document-viewer__error-message", children: error.message }),
44569
+ /* @__PURE__ */ jsx95(
44926
44570
  "button",
44927
44571
  {
44928
44572
  onClick: reset,
@@ -44931,7 +44575,7 @@ function ResourceViewerPage({
44931
44575
  }
44932
44576
  )
44933
44577
  ] }),
44934
- children: contentLoading ? /* @__PURE__ */ jsx100("div", { className: "semiont-document-viewer__loading", children: "Loading document content..." }) : /* @__PURE__ */ jsx100(
44578
+ children: contentLoading ? /* @__PURE__ */ jsx95("div", { className: "semiont-document-viewer__loading", children: "Loading document content..." }) : /* @__PURE__ */ jsx95(
44935
44579
  ResourceViewer,
44936
44580
  {
44937
44581
  resource: resourceWithContent,
@@ -44959,16 +44603,16 @@ function ResourceViewerPage({
44959
44603
  }
44960
44604
  ) })
44961
44605
  ] }),
44962
- /* @__PURE__ */ jsxs88("div", { className: "semiont-document-viewer__sidebar", children: [
44963
- /* @__PURE__ */ jsxs88(
44606
+ /* @__PURE__ */ jsxs83("div", { className: "semiont-document-viewer__sidebar", children: [
44607
+ /* @__PURE__ */ jsxs83(
44964
44608
  ToolbarPanels,
44965
44609
  {
44966
44610
  activePanel,
44967
44611
  theme: theme2,
44968
44612
  width: activePanel === "jsonld" ? "w-[600px]" : activePanel === "annotations" ? "w-[400px]" : "w-64",
44969
44613
  children: [
44970
- annotateMode && resource.archived && /* @__PURE__ */ jsx100("div", { className: "semiont-document-viewer__archived-status", children: /* @__PURE__ */ jsx100("div", { className: "semiont-document-viewer__archived-text", children: "\u{1F4E6} Archived" }) }),
44971
- activePanel === "annotations" && !resource.archived && /* @__PURE__ */ jsx100(
44614
+ annotateMode && resource.archived && /* @__PURE__ */ jsx95("div", { className: "semiont-document-viewer__archived-status", children: /* @__PURE__ */ jsx95("div", { className: "semiont-document-viewer__archived-text", children: "\u{1F4E6} Archived" }) }),
44615
+ activePanel === "annotations" && !resource.archived && /* @__PURE__ */ jsx95(
44972
44616
  UnifiedAnnotationsPanel,
44973
44617
  {
44974
44618
  session: session ?? null,
@@ -45001,7 +44645,7 @@ function ResourceViewerPage({
45001
44645
  routes
45002
44646
  }
45003
44647
  ),
45004
- activePanel === "history" && /* @__PURE__ */ jsx100(
44648
+ activePanel === "history" && /* @__PURE__ */ jsx95(
45005
44649
  AnnotationHistory,
45006
44650
  {
45007
44651
  events: events2,
@@ -45016,7 +44660,7 @@ function ResourceViewerPage({
45016
44660
  routes
45017
44661
  }
45018
44662
  ),
45019
- activePanel === "info" && /* @__PURE__ */ jsx100(
44663
+ activePanel === "info" && /* @__PURE__ */ jsx95(
45020
44664
  ResourceInfoPanel,
45021
44665
  {
45022
44666
  session: session ?? null,
@@ -45025,7 +44669,7 @@ function ResourceViewerPage({
45025
44669
  documentLocale: getLanguage(resource),
45026
44670
  primaryMediaType,
45027
44671
  primaryByteSize,
45028
- storageUri: resource.storageUri,
44672
+ storageUri: getStorageUri2(resource),
45029
44673
  isArchived: resource.archived ?? false,
45030
44674
  dateCreated: resource.dateCreated,
45031
44675
  dateModified: resource.dateModified,
@@ -45039,7 +44683,7 @@ function ResourceViewerPage({
45039
44683
  onDismissProgress: () => stateUnit?.yield.dismissProgress()
45040
44684
  }
45041
44685
  ),
45042
- activePanel === "collaboration" && /* @__PURE__ */ jsx100(
44686
+ activePanel === "collaboration" && /* @__PURE__ */ jsx95(
45043
44687
  CollaborationPanel,
45044
44688
  {
45045
44689
  state: streamStatus,
@@ -45048,11 +44692,11 @@ function ResourceViewerPage({
45048
44692
  collaborators
45049
44693
  }
45050
44694
  ),
45051
- activePanel === "jsonld" && /* @__PURE__ */ jsx100(JsonLdPanel, { resourceId: rUri })
44695
+ activePanel === "jsonld" && /* @__PURE__ */ jsx95(JsonLdPanel, { resourceId: rUri })
45052
44696
  ]
45053
44697
  }
45054
44698
  ),
45055
- /* @__PURE__ */ jsx100(
44699
+ /* @__PURE__ */ jsx95(
45056
44700
  Toolbar,
45057
44701
  {
45058
44702
  context: "document",
@@ -45062,7 +44706,7 @@ function ResourceViewerPage({
45062
44706
  )
45063
44707
  ] })
45064
44708
  ] }),
45065
- /* @__PURE__ */ jsx100(
44709
+ /* @__PURE__ */ jsx95(
45066
44710
  ReferenceWizardModal,
45067
44711
  {
45068
44712
  ...generationAgent ? { generationAgent } : {},
@@ -45071,6 +44715,7 @@ function ResourceViewerPage({
45071
44715
  annotationId: wizardAnnotationId,
45072
44716
  resourceId: wizardResourceId,
45073
44717
  defaultTitle: wizardDefaultTitle,
44718
+ defaultFolder: folderOf2(getStorageUri2(resource)),
45074
44719
  entityTypes: wizardEntityTypes,
45075
44720
  resourceName: resource.name,
45076
44721
  locale,
@@ -45121,6 +44766,8 @@ function ResourceViewerPage({
45121
44766
  maxLength: tw("maxLength"),
45122
44767
  maxLengthHelp: tw("maxLengthHelp"),
45123
44768
  maxLengthCeiling: tw("maxLengthCeiling"),
44769
+ outputFormat: tw("outputFormat"),
44770
+ formatExtensionMismatch: tw("formatExtensionMismatch"),
45124
44771
  maxResults: tw("maxResults"),
45125
44772
  semanticScoring: tw("semanticScoring"),
45126
44773
  semanticScoringHelp: tw("semanticScoringHelp"),
@@ -45135,7 +44782,7 @@ function ResourceViewerPage({
45135
44782
  }
45136
44783
  }
45137
44784
  ),
45138
- /* @__PURE__ */ jsx100(
44785
+ /* @__PURE__ */ jsx95(
45139
44786
  ResourceGenerateModal,
45140
44787
  {
45141
44788
  ...generationAgent ? { generationAgent } : {},
@@ -45143,6 +44790,7 @@ function ResourceViewerPage({
45143
44790
  onClose: () => setGenerateOpen(false),
45144
44791
  resourceId: rUri,
45145
44792
  defaultTitle: resource.name,
44793
+ defaultFolder: folderOf2(getStorageUri2(resource)),
45146
44794
  locale,
45147
44795
  entityTypeOptions: allEntityTypes,
45148
44796
  onGenerateSubmit: handleResourceGenerateSubmit,
@@ -45186,6 +44834,8 @@ function ResourceViewerPage({
45186
44834
  maxLength: tg("maxLength"),
45187
44835
  maxLengthHelp: tg("maxLengthHelp"),
45188
44836
  maxLengthCeiling: tg("maxLengthCeiling"),
44837
+ outputFormat: tg("outputFormat"),
44838
+ formatExtensionMismatch: tg("formatExtensionMismatch"),
45189
44839
  generate: tg("generate"),
45190
44840
  discardDraftPrompt: tg("discardDraftPrompt"),
45191
44841
  discardDraft: tg("discardDraft"),
@@ -45447,104 +45097,14 @@ function createAdminSecurityStateUnit(session, browse) {
45447
45097
  };
45448
45098
  }
45449
45099
 
45450
- // src/features/admin-exchange/state/exchange-state-unit.ts
45100
+ // src/features/auth-welcome/state/welcome-state-unit.ts
45451
45101
  var import_rxjs9 = __toESM(require_cjs(), 1);
45452
- var import_operators2 = __toESM(require_operators(), 1);
45453
45102
  import { createDisposer as createDisposer5 } from "@semiont/sdk";
45454
- function createExchangeStateUnit(browse, exportFn, importFn) {
45455
- const disposer = createDisposer5();
45456
- const selectedFile$ = new import_rxjs9.BehaviorSubject(null);
45457
- const preview$ = new import_rxjs9.BehaviorSubject(null);
45458
- const importPhase$ = new import_rxjs9.BehaviorSubject(null);
45459
- const importMessage$ = new import_rxjs9.BehaviorSubject(void 0);
45460
- const importResult$ = new import_rxjs9.BehaviorSubject(void 0);
45461
- const isExporting$ = new import_rxjs9.BehaviorSubject(false);
45462
- const isImporting$ = new import_rxjs9.BehaviorSubject(false);
45463
- const selectFile = (file) => {
45464
- selectedFile$.next(file);
45465
- importPhase$.next(null);
45466
- importMessage$.next(void 0);
45467
- importResult$.next(void 0);
45468
- preview$.next({
45469
- format: file.name.endsWith(".tar.gz") || file.name.endsWith(".gz") ? "semiont-linked-data" : "unknown",
45470
- version: 1,
45471
- sourceUrl: "",
45472
- stats: {}
45473
- });
45474
- };
45475
- const cancelImport = () => {
45476
- selectedFile$.next(null);
45477
- preview$.next(null);
45478
- importPhase$.next(null);
45479
- importMessage$.next(void 0);
45480
- importResult$.next(void 0);
45481
- };
45482
- const doExport = async () => {
45483
- isExporting$.next(true);
45484
- try {
45485
- const download = await exportFn();
45486
- const blob = await new Response(download.stream).blob();
45487
- const filename = download.filename ?? `semiont-export-${Date.now()}.tar.gz`;
45488
- return { blob, filename };
45489
- } finally {
45490
- isExporting$.next(false);
45491
- }
45492
- };
45493
- const doImport = async () => {
45494
- const file = selectedFile$.getValue();
45495
- if (!file) return;
45496
- isImporting$.next(true);
45497
- importPhase$.next("started");
45498
- importMessage$.next(void 0);
45499
- importResult$.next(void 0);
45500
- try {
45501
- await (0, import_rxjs9.lastValueFrom)(
45502
- importFn(file).pipe(
45503
- (0, import_operators2.tap)((event) => {
45504
- importPhase$.next(event.phase);
45505
- importMessage$.next(event.message);
45506
- if (event.result) importResult$.next(event.result);
45507
- })
45508
- )
45509
- );
45510
- } finally {
45511
- isImporting$.next(false);
45512
- }
45513
- };
45514
- return {
45515
- browse,
45516
- selectedFile$: selectedFile$.asObservable(),
45517
- preview$: preview$.asObservable(),
45518
- importPhase$: importPhase$.asObservable(),
45519
- importMessage$: importMessage$.asObservable(),
45520
- importResult$: importResult$.asObservable(),
45521
- isExporting$: isExporting$.asObservable(),
45522
- isImporting$: isImporting$.asObservable(),
45523
- selectFile,
45524
- cancelImport,
45525
- doExport,
45526
- doImport,
45527
- dispose: () => {
45528
- selectedFile$.complete();
45529
- preview$.complete();
45530
- importPhase$.complete();
45531
- importMessage$.complete();
45532
- importResult$.complete();
45533
- isExporting$.complete();
45534
- isImporting$.complete();
45535
- disposer.dispose();
45536
- }
45537
- };
45538
- }
45539
-
45540
- // src/features/auth-welcome/state/welcome-state-unit.ts
45541
- var import_rxjs10 = __toESM(require_cjs(), 1);
45542
- import { createDisposer as createDisposer6 } from "@semiont/sdk";
45543
45103
  function createWelcomeStateUnit(session) {
45544
45104
  const { client } = session;
45545
- const disposer = createDisposer6();
45546
- const userData$ = new import_rxjs10.BehaviorSubject(null);
45547
- const isProcessing$ = new import_rxjs10.BehaviorSubject(false);
45105
+ const disposer = createDisposer5();
45106
+ const userData$ = new import_rxjs9.BehaviorSubject(null);
45107
+ const isProcessing$ = new import_rxjs9.BehaviorSubject(false);
45548
45108
  client.auth.me().then((data2) => userData$.next(data2)).catch(() => {
45549
45109
  });
45550
45110
  const acceptTerms = async () => {
@@ -45569,23 +45129,23 @@ function createWelcomeStateUnit(session) {
45569
45129
  }
45570
45130
 
45571
45131
  // src/features/resource-discovery/state/discover-state-unit.ts
45572
- var import_rxjs11 = __toESM(require_cjs(), 1);
45573
- var import_operators3 = __toESM(require_operators(), 1);
45132
+ var import_rxjs10 = __toESM(require_cjs(), 1);
45133
+ var import_operators2 = __toESM(require_operators(), 1);
45574
45134
  import { readyValue as readyValue5 } from "@semiont/sdk";
45575
- import { createDisposer as createDisposer7 } from "@semiont/sdk";
45135
+ import { createDisposer as createDisposer6 } from "@semiont/sdk";
45576
45136
  var RECENT_LIMIT = 10;
45577
45137
  var SEARCH_LIMIT2 = 20;
45578
45138
  var DEBOUNCE_MS = 250;
45579
45139
  function createDiscoverStateUnit(session, browse) {
45580
45140
  const { client } = session;
45581
- const disposer = createDisposer7();
45582
- const selectedEntityType$ = new import_rxjs11.BehaviorSubject("");
45141
+ const disposer = createDisposer6();
45142
+ const selectedEntityType$ = new import_rxjs10.BehaviorSubject("");
45583
45143
  disposer.add(() => selectedEntityType$.complete());
45584
- const queryInput$ = new import_rxjs11.Subject();
45144
+ const queryInput$ = new import_rxjs10.Subject();
45585
45145
  disposer.add(() => queryInput$.complete());
45586
45146
  const recent = trackList(
45587
45147
  () => selectedEntityType$.pipe(
45588
- (0, import_operators3.switchMap)(
45148
+ (0, import_operators2.switchMap)(
45589
45149
  (et) => client.browse.resources({
45590
45150
  limit: RECENT_LIMIT,
45591
45151
  archived: false,
@@ -45593,7 +45153,7 @@ function createDiscoverStateUnit(session, browse) {
45593
45153
  }).pipe(
45594
45154
  // This unit renders only the page; project it out of the list
45595
45155
  // envelope (`matchKind` rendering is SEMANTIC-FALLBACK P3b's).
45596
- (0, import_operators3.map)((st) => st.status === "ready" ? { status: "ready", value: st.value.resources } : st)
45156
+ (0, import_operators2.map)((st) => st.status === "ready" ? { status: "ready", value: st.value.resources } : st)
45597
45157
  )
45598
45158
  )
45599
45159
  ),
@@ -45603,22 +45163,22 @@ function createDiscoverStateUnit(session, browse) {
45603
45163
  const entityTypes = trackList(() => client.browse.entityTypes(), []);
45604
45164
  disposer.add(entityTypes.dispose);
45605
45165
  const debouncedQuery$ = queryInput$.pipe(
45606
- (0, import_operators3.startWith)(""),
45607
- (0, import_operators3.debounceTime)(DEBOUNCE_MS),
45608
- (0, import_operators3.distinctUntilChanged)()
45166
+ (0, import_operators2.startWith)(""),
45167
+ (0, import_operators2.debounceTime)(DEBOUNCE_MS),
45168
+ (0, import_operators2.distinctUntilChanged)()
45609
45169
  );
45610
- const state$ = (0, import_rxjs11.combineLatest)([debouncedQuery$, selectedEntityType$]).pipe(
45611
- (0, import_operators3.switchMap)(([q2, et]) => {
45170
+ const state$ = (0, import_rxjs10.combineLatest)([debouncedQuery$, selectedEntityType$]).pipe(
45171
+ (0, import_operators2.switchMap)(([q2, et]) => {
45612
45172
  const trimmed = q2.trim();
45613
45173
  if (!trimmed) {
45614
- return (0, import_rxjs11.of)({ results: [], isSearching: false });
45174
+ return (0, import_rxjs10.of)({ results: [], isSearching: false });
45615
45175
  }
45616
45176
  return client.browse.resources({
45617
45177
  search: trimmed,
45618
45178
  limit: SEARCH_LIMIT2,
45619
45179
  ...et ? { entityType: et } : {}
45620
45180
  }).pipe(
45621
- (0, import_operators3.map)((st) => {
45181
+ (0, import_operators2.map)((st) => {
45622
45182
  const ready = readyValue5(st);
45623
45183
  return {
45624
45184
  results: ready?.resources ?? [],
@@ -45626,13 +45186,13 @@ function createDiscoverStateUnit(session, browse) {
45626
45186
  ...ready ? { matchKind: ready.matchKind } : {}
45627
45187
  };
45628
45188
  }),
45629
- (0, import_operators3.startWith)({ results: [], isSearching: true })
45189
+ (0, import_operators2.startWith)({ results: [], isSearching: true })
45630
45190
  );
45631
45191
  }),
45632
- (0, import_operators3.shareReplay)({ bufferSize: 1, refCount: true })
45192
+ (0, import_operators2.shareReplay)({ bufferSize: 1, refCount: true })
45633
45193
  );
45634
45194
  const search = {
45635
- query$: queryInput$.pipe((0, import_operators3.startWith)("")),
45195
+ query$: queryInput$.pipe((0, import_operators2.startWith)("")),
45636
45196
  state$,
45637
45197
  setQuery: (value) => queryInput$.next(value)
45638
45198
  };
@@ -45648,14 +45208,14 @@ function createDiscoverStateUnit(session, browse) {
45648
45208
  }
45649
45209
 
45650
45210
  // src/features/moderate-entity-tags/state/entity-tags-state-unit.ts
45651
- var import_rxjs12 = __toESM(require_cjs(), 1);
45652
- import { createDisposer as createDisposer8 } from "@semiont/sdk";
45211
+ var import_rxjs11 = __toESM(require_cjs(), 1);
45212
+ import { createDisposer as createDisposer7 } from "@semiont/sdk";
45653
45213
  function createEntityTagsStateUnit(session, browse) {
45654
45214
  const { client } = session;
45655
- const disposer = createDisposer8();
45656
- const newTag$ = new import_rxjs12.BehaviorSubject("");
45657
- const error$ = new import_rxjs12.BehaviorSubject("");
45658
- const isAdding$ = new import_rxjs12.BehaviorSubject(false);
45215
+ const disposer = createDisposer7();
45216
+ const newTag$ = new import_rxjs11.BehaviorSubject("");
45217
+ const error$ = new import_rxjs11.BehaviorSubject("");
45218
+ const isAdding$ = new import_rxjs11.BehaviorSubject(false);
45659
45219
  const entityTypes = trackList(() => client.browse.entityTypes(), []);
45660
45220
  disposer.add(entityTypes.dispose);
45661
45221
  const addTag = async () => {
@@ -45692,7 +45252,6 @@ export {
45692
45252
  ANNOTATORS,
45693
45253
  AVAILABLE_LOCALES,
45694
45254
  AdminDevOpsPage,
45695
- AdminExchangePage,
45696
45255
  AdminSecurityPage,
45697
45256
  AdminUsersPage,
45698
45257
  AnnotateToolbar,
@@ -45721,7 +45280,6 @@ export {
45721
45280
  EntityTagsPage,
45722
45281
  EntityTypeBadges,
45723
45282
  ErrorBoundary,
45724
- ExportCard,
45725
45283
  Footer,
45726
45284
  HOVER_DELAY_MS3 as HOVER_DELAY_MS,
45727
45285
  HighlightEntry,
@@ -45731,14 +45289,11 @@ export {
45731
45289
  ImageBrowseRenderer,
45732
45290
  ImageURLSchema,
45733
45291
  ImageViewer,
45734
- ImportCard,
45735
- ImportProgress,
45736
45292
  JsonLdPanel,
45737
45293
  JsonLdView,
45738
45294
  KeyboardShortcutsHelpModal,
45739
45295
  LeftSidebar,
45740
45296
  LineNumbersProvider,
45741
- LinkedDataPage,
45742
45297
  LiveRegionProvider,
45743
45298
  NavigationMenu,
45744
45299
  OAuthUserSchema,
@@ -45814,7 +45369,6 @@ export {
45814
45369
  createComposePageStateUnit,
45815
45370
  createDiscoverStateUnit,
45816
45371
  createEntityTagsStateUnit,
45817
- createExchangeStateUnit,
45818
45372
  createGatherStateUnit2 as createGatherStateUnit,
45819
45373
  createHoverHandlers4 as createHoverHandlers,
45820
45374
  createMarkStateUnit2 as createMarkStateUnit,
@@ -45842,7 +45396,7 @@ export {
45842
45396
  jsonLightHighlightStyle,
45843
45397
  jsonLightTheme,
45844
45398
  mediaUrl,
45845
- resolveAnnotationRanges,
45399
+ resolveAnnotationSpans,
45846
45400
  sanitizeImageURL,
45847
45401
  saveSelectedShapeForSelectorType,
45848
45402
  setPdfWorkerSrc,