@semiont/react-ui 0.2.35-build.99 → 0.2.36

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 (210) hide show
  1. package/README.md +1 -0
  2. package/dist/{EventBusContext-DMI4uwYk.d.mts → EventBusContext-CLnb2LmB.d.mts} +5 -5
  3. package/dist/{PdfAnnotationCanvas.client-HNYRKFDS.mjs → PdfAnnotationCanvas.client-COQREPXU.mjs} +7 -7
  4. package/dist/PdfAnnotationCanvas.client-COQREPXU.mjs.map +1 -0
  5. package/dist/ar-7SUXNE34.mjs +376 -0
  6. package/dist/ar-7SUXNE34.mjs.map +1 -0
  7. package/dist/bn-XOET3DOI.mjs +376 -0
  8. package/dist/bn-XOET3DOI.mjs.map +1 -0
  9. package/dist/{chunk-YI5IX5ZA.mjs → chunk-2HGWOLVN.mjs} +1 -1
  10. package/dist/{chunk-YI5IX5ZA.mjs.map → chunk-2HGWOLVN.mjs.map} +1 -1
  11. package/dist/{chunk-3FIQXKQF.mjs → chunk-Q2KV6Y2J.mjs} +28 -28
  12. package/dist/{chunk-MWQ5CNKW.mjs → chunk-ZPV43WN2.mjs} +11 -11
  13. package/dist/chunk-ZPV43WN2.mjs.map +1 -0
  14. package/dist/cs-X63DXX7L.mjs +376 -0
  15. package/dist/cs-X63DXX7L.mjs.map +1 -0
  16. package/dist/da-OWTCV57A.mjs +376 -0
  17. package/dist/da-OWTCV57A.mjs.map +1 -0
  18. package/dist/de-77BMFDVF.mjs +376 -0
  19. package/dist/de-77BMFDVF.mjs.map +1 -0
  20. package/dist/el-FIBNLH2V.mjs +376 -0
  21. package/dist/el-FIBNLH2V.mjs.map +1 -0
  22. package/dist/fa-3N4CIWE6.mjs +376 -0
  23. package/dist/fa-3N4CIWE6.mjs.map +1 -0
  24. package/dist/fi-JOM3M7Z4.mjs +376 -0
  25. package/dist/fi-JOM3M7Z4.mjs.map +1 -0
  26. package/dist/fr-56QSXS7E.mjs +376 -0
  27. package/dist/fr-56QSXS7E.mjs.map +1 -0
  28. package/dist/he-SNAXPJEK.mjs +376 -0
  29. package/dist/he-SNAXPJEK.mjs.map +1 -0
  30. package/dist/hi-CRBRD5TB.mjs +376 -0
  31. package/dist/hi-CRBRD5TB.mjs.map +1 -0
  32. package/dist/id-BRCVLICF.mjs +376 -0
  33. package/dist/id-BRCVLICF.mjs.map +1 -0
  34. package/dist/index.d.mts +169 -165
  35. package/dist/index.mjs +317 -313
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/it-M2Z27BNB.mjs +376 -0
  38. package/dist/it-M2Z27BNB.mjs.map +1 -0
  39. package/dist/ja-TZUKW7HD.mjs +376 -0
  40. package/dist/ja-TZUKW7HD.mjs.map +1 -0
  41. package/dist/ko-NKBGGOL6.mjs +376 -0
  42. package/dist/ko-NKBGGOL6.mjs.map +1 -0
  43. package/dist/ms-XFXPN6RX.mjs +376 -0
  44. package/dist/ms-XFXPN6RX.mjs.map +1 -0
  45. package/dist/nl-MVYXAS5C.mjs +379 -0
  46. package/dist/nl-MVYXAS5C.mjs.map +1 -0
  47. package/dist/no-XOLO4JPV.mjs +376 -0
  48. package/dist/no-XOLO4JPV.mjs.map +1 -0
  49. package/dist/pl-TRWLMMC4.mjs +376 -0
  50. package/dist/pl-TRWLMMC4.mjs.map +1 -0
  51. package/dist/pt-M3TE24UI.mjs +376 -0
  52. package/dist/pt-M3TE24UI.mjs.map +1 -0
  53. package/dist/ro-QBFG2T64.mjs +376 -0
  54. package/dist/ro-QBFG2T64.mjs.map +1 -0
  55. package/dist/sv-IUECBXWX.mjs +376 -0
  56. package/dist/sv-IUECBXWX.mjs.map +1 -0
  57. package/dist/test-utils.d.mts +2 -2
  58. package/dist/test-utils.mjs +2 -2
  59. package/dist/th-US7KIN5Q.mjs +376 -0
  60. package/dist/th-US7KIN5Q.mjs.map +1 -0
  61. package/dist/tr-DWJ2FFUK.mjs +376 -0
  62. package/dist/tr-DWJ2FFUK.mjs.map +1 -0
  63. package/dist/uk-M4ZE4DPZ.mjs +376 -0
  64. package/dist/uk-M4ZE4DPZ.mjs.map +1 -0
  65. package/dist/vi-FERZNPSH.mjs +376 -0
  66. package/dist/vi-FERZNPSH.mjs.map +1 -0
  67. package/dist/zh-3J2I3WYK.mjs +376 -0
  68. package/dist/zh-3J2I3WYK.mjs.map +1 -0
  69. package/package.json +3 -3
  70. package/src/components/AnnotateReferencesProgressWidget.tsx +5 -5
  71. package/src/components/CodeMirrorRenderer.tsx +5 -5
  72. package/src/components/Toolbar.tsx +2 -2
  73. package/src/components/annotation/AnnotateToolbar.tsx +9 -9
  74. package/src/components/annotation/__tests__/AnnotateToolbar.test.tsx +17 -17
  75. package/src/components/image-annotation/AnnotationOverlay.tsx +10 -10
  76. package/src/components/image-annotation/SvgDrawingCanvas.tsx +4 -4
  77. package/src/components/navigation/CollapsibleResourceNavigation.tsx +7 -7
  78. package/src/components/navigation/ObservableLink.tsx +3 -3
  79. package/src/components/navigation/SimpleNavigation.tsx +2 -2
  80. package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +8 -8
  81. package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +2 -0
  82. package/src/components/resource/AnnotateView.tsx +12 -12
  83. package/src/components/resource/BrowseView.tsx +9 -9
  84. package/src/components/resource/ResourceViewer.tsx +23 -23
  85. package/src/components/resource/__tests__/BrowseView.test.tsx +27 -27
  86. package/src/components/resource/__tests__/ResourceViewer.mode-switch.test.tsx +1 -1
  87. package/src/components/resource/panels/AssessmentEntry.tsx +2 -2
  88. package/src/components/resource/panels/AssessmentPanel.tsx +7 -7
  89. package/src/components/resource/panels/AssistSection.tsx +5 -5
  90. package/src/components/resource/panels/CommentEntry.tsx +2 -2
  91. package/src/components/resource/panels/CommentsPanel.tsx +7 -7
  92. package/src/components/resource/panels/HighlightEntry.tsx +2 -2
  93. package/src/components/resource/panels/HighlightPanel.tsx +5 -5
  94. package/src/components/resource/panels/ReferenceEntry.tsx +8 -8
  95. package/src/components/resource/panels/ReferencesPanel.tsx +10 -10
  96. package/src/components/resource/panels/ResourceInfoPanel.tsx +6 -6
  97. package/src/components/resource/panels/TagEntry.tsx +2 -2
  98. package/src/components/resource/panels/TaggingPanel.tsx +8 -8
  99. package/src/components/resource/panels/UnifiedAnnotationsPanel.tsx +2 -2
  100. package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +4 -4
  101. package/src/components/resource/panels/__tests__/AssistSection.test.tsx +4 -4
  102. package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +8 -8
  103. package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +3 -3
  104. package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +1 -1
  105. package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +3 -3
  106. package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +9 -9
  107. package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +5 -5
  108. package/src/features/admin-devops/components/AdminDevOpsPage.tsx +2 -1
  109. package/src/features/admin-security/components/AdminSecurityPage.tsx +2 -1
  110. package/src/features/admin-users/components/AdminUsersPage.tsx +2 -1
  111. package/src/features/moderate-entity-tags/components/EntityTagsPage.tsx +2 -1
  112. package/src/features/moderate-recent/components/RecentDocumentsPage.tsx +2 -1
  113. package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +2 -1
  114. package/src/features/resource-compose/components/ResourceComposePage.tsx +2 -1
  115. package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +2 -1
  116. package/src/features/resource-viewer/__tests__/AnnotationCreationPending.test.tsx +26 -26
  117. package/src/features/resource-viewer/__tests__/AnnotationDeletionIntegration.test.tsx +21 -21
  118. package/src/features/resource-viewer/__tests__/AnnotationProgressDismissal.test.tsx +23 -23
  119. package/src/features/resource-viewer/__tests__/{ResolutionFlowIntegration.test.tsx → BindFlowIntegration.test.tsx} +49 -49
  120. package/src/features/resource-viewer/__tests__/DetectionFlowBug.test.tsx +18 -18
  121. package/src/features/resource-viewer/__tests__/DetectionFlowIntegration.test.tsx +19 -19
  122. package/src/features/resource-viewer/__tests__/ResourceMutations.test.tsx +19 -19
  123. package/src/features/resource-viewer/__tests__/ToastNotifications.test.tsx +13 -13
  124. package/src/features/resource-viewer/__tests__/{GenerationFlowIntegration.test.tsx → YieldFlowIntegration.test.tsx} +34 -34
  125. package/src/features/resource-viewer/__tests__/annotation-progress-flow.test.tsx +11 -11
  126. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +55 -55
  127. package/translations/ar.json +298 -298
  128. package/translations/bn.json +298 -298
  129. package/translations/cs.json +295 -295
  130. package/translations/da.json +282 -282
  131. package/translations/de.json +281 -281
  132. package/translations/el.json +298 -298
  133. package/translations/fa.json +298 -298
  134. package/translations/fi.json +298 -298
  135. package/translations/fr.json +279 -279
  136. package/translations/he.json +298 -298
  137. package/translations/hi.json +298 -298
  138. package/translations/id.json +295 -295
  139. package/translations/it.json +299 -299
  140. package/translations/ja.json +298 -298
  141. package/translations/ko.json +298 -298
  142. package/translations/ms.json +296 -296
  143. package/translations/nl.json +299 -296
  144. package/translations/no.json +292 -292
  145. package/translations/pl.json +297 -297
  146. package/translations/pt.json +294 -294
  147. package/translations/ro.json +298 -298
  148. package/translations/sv.json +293 -293
  149. package/translations/th.json +298 -298
  150. package/translations/tr.json +298 -298
  151. package/translations/uk.json +298 -298
  152. package/translations/vi.json +298 -298
  153. package/translations/zh.json +298 -298
  154. package/dist/PdfAnnotationCanvas.client-HNYRKFDS.mjs.map +0 -1
  155. package/dist/ar-MDB7HC5S.mjs +0 -376
  156. package/dist/ar-MDB7HC5S.mjs.map +0 -1
  157. package/dist/bn-3SAV2ZEM.mjs +0 -376
  158. package/dist/bn-3SAV2ZEM.mjs.map +0 -1
  159. package/dist/chunk-MWQ5CNKW.mjs.map +0 -1
  160. package/dist/cs-AWCETEUV.mjs +0 -376
  161. package/dist/cs-AWCETEUV.mjs.map +0 -1
  162. package/dist/da-UZZHXYLC.mjs +0 -376
  163. package/dist/da-UZZHXYLC.mjs.map +0 -1
  164. package/dist/de-LQFWN6S5.mjs +0 -376
  165. package/dist/de-LQFWN6S5.mjs.map +0 -1
  166. package/dist/el-IWOETBJ7.mjs +0 -376
  167. package/dist/el-IWOETBJ7.mjs.map +0 -1
  168. package/dist/fa-BVEJZT5S.mjs +0 -376
  169. package/dist/fa-BVEJZT5S.mjs.map +0 -1
  170. package/dist/fi-JBNCGGA6.mjs +0 -376
  171. package/dist/fi-JBNCGGA6.mjs.map +0 -1
  172. package/dist/fr-OLH7PNGI.mjs +0 -376
  173. package/dist/fr-OLH7PNGI.mjs.map +0 -1
  174. package/dist/he-KOJQ4HMA.mjs +0 -376
  175. package/dist/he-KOJQ4HMA.mjs.map +0 -1
  176. package/dist/hi-BKJFZXAY.mjs +0 -376
  177. package/dist/hi-BKJFZXAY.mjs.map +0 -1
  178. package/dist/id-DPLHJVNP.mjs +0 -376
  179. package/dist/id-DPLHJVNP.mjs.map +0 -1
  180. package/dist/it-JXHAM7NL.mjs +0 -376
  181. package/dist/it-JXHAM7NL.mjs.map +0 -1
  182. package/dist/ja-DQRAO3PU.mjs +0 -376
  183. package/dist/ja-DQRAO3PU.mjs.map +0 -1
  184. package/dist/ko-6IFCOP6F.mjs +0 -376
  185. package/dist/ko-6IFCOP6F.mjs.map +0 -1
  186. package/dist/ms-KF5S2TLL.mjs +0 -376
  187. package/dist/ms-KF5S2TLL.mjs.map +0 -1
  188. package/dist/nl-2GUUZLQM.mjs +0 -376
  189. package/dist/nl-2GUUZLQM.mjs.map +0 -1
  190. package/dist/no-2IBCZGEF.mjs +0 -376
  191. package/dist/no-2IBCZGEF.mjs.map +0 -1
  192. package/dist/pl-ZEUBJ7YU.mjs +0 -376
  193. package/dist/pl-ZEUBJ7YU.mjs.map +0 -1
  194. package/dist/pt-WLAFIZWQ.mjs +0 -376
  195. package/dist/pt-WLAFIZWQ.mjs.map +0 -1
  196. package/dist/ro-K56IXFGU.mjs +0 -376
  197. package/dist/ro-K56IXFGU.mjs.map +0 -1
  198. package/dist/sv-VFJLMJRY.mjs +0 -376
  199. package/dist/sv-VFJLMJRY.mjs.map +0 -1
  200. package/dist/th-RICLQ2GW.mjs +0 -376
  201. package/dist/th-RICLQ2GW.mjs.map +0 -1
  202. package/dist/tr-SALXWE2M.mjs +0 -376
  203. package/dist/tr-SALXWE2M.mjs.map +0 -1
  204. package/dist/uk-3U3T3O2E.mjs +0 -376
  205. package/dist/uk-3U3T3O2E.mjs.map +0 -1
  206. package/dist/vi-LIVNZXOB.mjs +0 -376
  207. package/dist/vi-LIVNZXOB.mjs.map +0 -1
  208. package/dist/zh-KDUAZPX3.mjs +0 -376
  209. package/dist/zh-KDUAZPX3.mjs.map +0 -1
  210. /package/dist/{chunk-3FIQXKQF.mjs.map → chunk-Q2KV6Y2J.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  HOVER_DELAY_MS,
4
4
  createHoverHandlers,
5
- useAttentionFlow,
5
+ useBeckonFlow,
6
6
  useEventSubscription,
7
7
  useEventSubscriptions,
8
8
  useHoverEmitter
9
- } from "./chunk-MWQ5CNKW.mjs";
9
+ } from "./chunk-ZPV43WN2.mjs";
10
10
  import {
11
11
  AVAILABLE_LOCALES,
12
12
  ApiClientProvider,
@@ -21,12 +21,12 @@ import {
21
21
  useSessionContext,
22
22
  useToast,
23
23
  useTranslations
24
- } from "./chunk-3FIQXKQF.mjs";
24
+ } from "./chunk-Q2KV6Y2J.mjs";
25
25
  import {
26
26
  EventBusProvider,
27
27
  resetEventBusForTesting,
28
28
  useEventBus
29
- } from "./chunk-YI5IX5ZA.mjs";
29
+ } from "./chunk-2HGWOLVN.mjs";
30
30
  import "./chunk-JH7BXE2P.mjs";
31
31
  import {
32
32
  __commonJS,
@@ -17997,12 +17997,12 @@ function useHoverDelay() {
17997
17997
  return { hoverDelayMs, setHoverDelayMs };
17998
17998
  }
17999
17999
 
18000
- // src/hooks/useObservableNavigation.tsx
18000
+ // src/hooks/useObservableBrowse.tsx
18001
18001
  import { useCallback as useCallback5 } from "react";
18002
18002
  function useObservableRouter(baseRouter) {
18003
18003
  const eventBus = useEventBus();
18004
18004
  const push2 = useCallback5((path2, options) => {
18005
- eventBus.get("navigation:router-push").next({
18005
+ eventBus.get("browse:router-push").next({
18006
18006
  path: path2,
18007
18007
  reason: options?.reason
18008
18008
  });
@@ -18010,7 +18010,7 @@ function useObservableRouter(baseRouter) {
18010
18010
  }, []);
18011
18011
  const replace3 = useCallback5((path2, options) => {
18012
18012
  if (!baseRouter.replace) return;
18013
- eventBus.get("navigation:router-push").next({
18013
+ eventBus.get("browse:router-push").next({
18014
18014
  path: path2,
18015
18015
  reason: options?.reason ? `replace:${options.reason}` : "replace"
18016
18016
  });
@@ -18027,11 +18027,11 @@ function useObservableExternalNavigation() {
18027
18027
  return useCallback5((url, metadata) => {
18028
18028
  const fallbackTimer = setTimeout(() => {
18029
18029
  console.warn(
18030
- "[Observable Navigation] No handler cancelled navigation:external-navigate fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing."
18030
+ "[Observable Navigation] No handler cancelled browse:external-navigate fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing."
18031
18031
  );
18032
18032
  window.location.href = url;
18033
18033
  }, 10);
18034
- eventBus.get("navigation:external-navigate").next({
18034
+ eventBus.get("browse:external-navigate").next({
18035
18035
  url,
18036
18036
  resourceId: metadata?.resourceId,
18037
18037
  cancelFallback: () => clearTimeout(fallbackTimer)
@@ -26348,7 +26348,7 @@ function CodeMirrorRenderer({
26348
26348
  const segment = segmentsByIdRef.current.get(annotationId);
26349
26349
  if (segment?.annotation) {
26350
26350
  event.preventDefault();
26351
- eventBusRef.current.get("attend:click").next({
26351
+ eventBusRef.current.get("browse:click").next({
26352
26352
  annotationId,
26353
26353
  motivation: segment.annotation.motivation
26354
26354
  });
@@ -26409,7 +26409,7 @@ function CodeMirrorRenderer({
26409
26409
  containerRef.current.__cmView = view;
26410
26410
  const container = view.dom;
26411
26411
  const { handleMouseEnter, handleMouseLeave, cleanup: cleanupHover } = createHoverHandlers(
26412
- (annotationId) => eventBusRef.current?.get("attend:hover").next({ annotationId }),
26412
+ (annotationId) => eventBusRef.current?.get("beckon:hover").next({ annotationId }),
26413
26413
  hoverDelayMs
26414
26414
  );
26415
26415
  const handleMouseOver = (e6) => {
@@ -26434,10 +26434,10 @@ function CodeMirrorRenderer({
26434
26434
  const isResolved = widget.dataset.widgetResolved === "true";
26435
26435
  if (!annotationId || !eventBusRef.current) return;
26436
26436
  if (isResolved && bodySource) {
26437
- eventBusRef.current.get("navigation:reference-navigate").next({ documentId: bodySource });
26437
+ eventBusRef.current.get("browse:reference-navigate").next({ documentId: bodySource });
26438
26438
  } else {
26439
26439
  const motivation = widget.dataset.widgetMotivation || "linking";
26440
- eventBusRef.current.get("attend:click").next({ annotationId, motivation });
26440
+ eventBusRef.current.get("browse:click").next({ annotationId, motivation });
26441
26441
  }
26442
26442
  };
26443
26443
  const handleWidgetMouseEnter = (e6) => {
@@ -26852,7 +26852,7 @@ function Toolbar({
26852
26852
  const t12 = useTranslations("Toolbar");
26853
26853
  const eventBus = useEventBus();
26854
26854
  const handlePanelToggle = (panel) => {
26855
- eventBus.get("attend:panel-toggle").next({ panel });
26855
+ eventBus.get("browse:panel-toggle").next({ panel });
26856
26856
  };
26857
26857
  return /* @__PURE__ */ jsxs4("div", { className: "semiont-toolbar", "data-context": context, children: [
26858
26858
  context === "document" && /* @__PURE__ */ jsxs4(Fragment, { children: [
@@ -27212,9 +27212,9 @@ function AnnotateToolbar({
27212
27212
  }, []);
27213
27213
  const handleSelectionClick = (motivation) => {
27214
27214
  if (motivation === null) {
27215
- eventBus.get("annotate:selection-changed").next({ motivation: null });
27215
+ eventBus.get("mark:selection-changed").next({ motivation: null });
27216
27216
  } else {
27217
- eventBus.get("annotate:selection-changed").next({
27217
+ eventBus.get("mark:selection-changed").next({
27218
27218
  motivation: selectedMotivation === motivation ? null : motivation
27219
27219
  });
27220
27220
  }
@@ -27222,17 +27222,17 @@ function AnnotateToolbar({
27222
27222
  setSelectionHovered(false);
27223
27223
  };
27224
27224
  const handleClickClick = (action) => {
27225
- eventBus.get("annotate:click-changed").next({ action });
27225
+ eventBus.get("mark:click-changed").next({ action });
27226
27226
  setClickPinned(false);
27227
27227
  setClickHovered(false);
27228
27228
  };
27229
27229
  const handleShapeClick = (shape) => {
27230
- eventBus.get("annotate:shape-changed").next({ shape });
27230
+ eventBus.get("mark:shape-changed").next({ shape });
27231
27231
  setShapePinned(false);
27232
27232
  setShapeHovered(false);
27233
27233
  };
27234
27234
  const handleModeToggle = () => {
27235
- eventBus.get("annotate:mode-toggled").next(void 0);
27235
+ eventBus.get("mark:mode-toggled").next(void 0);
27236
27236
  setModePinned(false);
27237
27237
  setModeHovered(false);
27238
27238
  };
@@ -29318,7 +29318,7 @@ function AnnotationOverlay({
29318
29318
  const scaleX = displayWidth / imageWidth;
29319
29319
  const scaleY = displayHeight / imageHeight;
29320
29320
  const { handleMouseEnter, handleMouseLeave } = useMemo2(
29321
- () => createHoverHandlers((annotationId) => eventBus?.get("attend:hover").next({ annotationId }), hoverDelayMs),
29321
+ () => createHoverHandlers((annotationId) => eventBus?.get("beckon:hover").next({ annotationId }), hoverDelayMs),
29322
29322
  [eventBus, hoverDelayMs]
29323
29323
  );
29324
29324
  return /* @__PURE__ */ jsx18(
@@ -29359,7 +29359,7 @@ function AnnotationOverlay({
29359
29359
  className: "semiont-annotation-overlay__shape",
29360
29360
  "data-hovered": isHovered ? "true" : "false",
29361
29361
  "data-selected": isSelected ? "true" : "false",
29362
- onClick: () => eventBus?.get("attend:click").next({ annotationId: annotation.id, motivation: annotation.motivation }),
29362
+ onClick: () => eventBus?.get("browse:click").next({ annotationId: annotation.id, motivation: annotation.motivation }),
29363
29363
  onMouseEnter: () => handleMouseEnter(annotation.id),
29364
29364
  onMouseLeave: handleMouseLeave
29365
29365
  }
@@ -29374,7 +29374,7 @@ function AnnotationOverlay({
29374
29374
  style: { userSelect: "none" },
29375
29375
  onClick: (e6) => {
29376
29376
  e6.stopPropagation();
29377
- eventBus?.get("attend:click").next({ annotationId: annotation.id, motivation: annotation.motivation });
29377
+ eventBus?.get("browse:click").next({ annotationId: annotation.id, motivation: annotation.motivation });
29378
29378
  },
29379
29379
  onMouseEnter: () => handleMouseEnter(annotation.id),
29380
29380
  onMouseLeave: handleMouseLeave,
@@ -29404,7 +29404,7 @@ function AnnotationOverlay({
29404
29404
  className: "semiont-annotation-overlay__shape",
29405
29405
  "data-hovered": isHovered ? "true" : "false",
29406
29406
  "data-selected": isSelected ? "true" : "false",
29407
- onClick: () => eventBus?.get("attend:click").next({ annotationId: annotation.id, motivation: annotation.motivation }),
29407
+ onClick: () => eventBus?.get("browse:click").next({ annotationId: annotation.id, motivation: annotation.motivation }),
29408
29408
  onMouseEnter: () => handleMouseEnter(annotation.id),
29409
29409
  onMouseLeave: handleMouseLeave
29410
29410
  }
@@ -29419,7 +29419,7 @@ function AnnotationOverlay({
29419
29419
  style: { userSelect: "none" },
29420
29420
  onClick: (e6) => {
29421
29421
  e6.stopPropagation();
29422
- eventBus?.get("attend:click").next({ annotationId: annotation.id, motivation: annotation.motivation });
29422
+ eventBus?.get("browse:click").next({ annotationId: annotation.id, motivation: annotation.motivation });
29423
29423
  },
29424
29424
  onMouseEnter: () => handleMouseEnter(annotation.id),
29425
29425
  onMouseLeave: handleMouseLeave,
@@ -29453,7 +29453,7 @@ function AnnotationOverlay({
29453
29453
  className: "semiont-annotation-overlay__shape",
29454
29454
  "data-hovered": isHovered ? "true" : "false",
29455
29455
  "data-selected": isSelected ? "true" : "false",
29456
- onClick: () => eventBus?.get("attend:click").next({ annotationId: annotation.id, motivation: annotation.motivation }),
29456
+ onClick: () => eventBus?.get("browse:click").next({ annotationId: annotation.id, motivation: annotation.motivation }),
29457
29457
  onMouseEnter: () => handleMouseEnter(annotation.id),
29458
29458
  onMouseLeave: handleMouseLeave
29459
29459
  }
@@ -29468,7 +29468,7 @@ function AnnotationOverlay({
29468
29468
  style: { userSelect: "none" },
29469
29469
  onClick: (e6) => {
29470
29470
  e6.stopPropagation();
29471
- eventBus?.get("attend:click").next({ annotationId: annotation.id, motivation: annotation.motivation });
29471
+ eventBus?.get("browse:click").next({ annotationId: annotation.id, motivation: annotation.motivation });
29472
29472
  },
29473
29473
  onMouseEnter: () => handleMouseEnter(annotation.id),
29474
29474
  onMouseLeave: handleMouseLeave,
@@ -29625,7 +29625,7 @@ function SvgDrawingCanvas({
29625
29625
  return false;
29626
29626
  });
29627
29627
  if (clickedAnnotation) {
29628
- eventBus?.get("attend:click").next({ annotationId: clickedAnnotation.id, motivation: clickedAnnotation.motivation });
29628
+ eventBus?.get("browse:click").next({ annotationId: clickedAnnotation.id, motivation: clickedAnnotation.motivation });
29629
29629
  setIsDrawing(false);
29630
29630
  setStartPoint(null);
29631
29631
  setCurrentPoint(null);
@@ -29677,7 +29677,7 @@ function SvgDrawingCanvas({
29677
29677
  imageDimensions.height
29678
29678
  );
29679
29679
  if (eventBus && selectedMotivation) {
29680
- eventBus.get("annotate:requested").next({
29680
+ eventBus.get("mark:requested").next({
29681
29681
  selector: {
29682
29682
  type: "SvgSelector",
29683
29683
  value: nativeSvg
@@ -30104,7 +30104,7 @@ import { useRef as useRef12, useEffect as useEffect18, useCallback as useCallbac
30104
30104
  import { resourceUri as toResourceUri } from "@semiont/core";
30105
30105
  import { getTextPositionSelector as getTextPositionSelector2, getTextQuoteSelector, getTargetSelector as getTargetSelector2, getMimeCategory, isPdfMimeType as isPdfMimeType2, extractContext, findTextWithContext, buildContentCache } from "@semiont/api-client";
30106
30106
  import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
30107
- var PdfAnnotationCanvas = lazy(() => import("./PdfAnnotationCanvas.client-HNYRKFDS.mjs").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
30107
+ var PdfAnnotationCanvas = lazy(() => import("./PdfAnnotationCanvas.client-COQREPXU.mjs").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
30108
30108
  function segmentTextWithAnnotations(content4, annotations) {
30109
30109
  if (!content4) {
30110
30110
  return [{ exact: "", start: 0, end: 0 }];
@@ -30201,10 +30201,10 @@ function AnnotateView({
30201
30201
  onUIStateChangeRef.current?.({ hoveredAnnotationId: annotationId });
30202
30202
  }, []);
30203
30203
  useEventSubscriptions({
30204
- "annotate:selection-changed": handleToolbarSelectionChanged,
30205
- "annotate:click-changed": handleToolbarClickChanged,
30206
- "annotate:shape-changed": handleToolbarShapeChanged,
30207
- "attend:hover": handleAnnotationHover
30204
+ "mark:selection-changed": handleToolbarSelectionChanged,
30205
+ "mark:click-changed": handleToolbarClickChanged,
30206
+ "mark:shape-changed": handleToolbarShapeChanged,
30207
+ "beckon:hover": handleAnnotationHover
30208
30208
  });
30209
30209
  useEffect18(() => {
30210
30210
  const container = containerRef.current;
@@ -30243,7 +30243,7 @@ function AnnotateView({
30243
30243
  const end2 = start3 + text7.length;
30244
30244
  const context = extractContext(content4, start3, end2);
30245
30245
  if (selectedMotivation) {
30246
- eventBus.get("annotate:requested").next({
30246
+ eventBus.get("mark:requested").next({
30247
30247
  selector: [
30248
30248
  {
30249
30249
  type: "TextPositionSelector",
@@ -30269,7 +30269,7 @@ function AnnotateView({
30269
30269
  if (start2 >= 0) {
30270
30270
  const context = extractContext(content4, start2, end);
30271
30271
  if (selectedMotivation) {
30272
- eventBus.get("annotate:requested").next({
30272
+ eventBus.get("mark:requested").next({
30273
30273
  selector: [
30274
30274
  {
30275
30275
  type: "TextPositionSelector",
@@ -45367,7 +45367,7 @@ function ImageViewer({ resourceUri: resourceUri2, alt = "Resource image" }) {
45367
45367
 
45368
45368
  // src/components/resource/BrowseView.tsx
45369
45369
  import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
45370
- var PdfAnnotationCanvas2 = lazy2(() => import("./PdfAnnotationCanvas.client-HNYRKFDS.mjs").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
45370
+ var PdfAnnotationCanvas2 = lazy2(() => import("./PdfAnnotationCanvas.client-COQREPXU.mjs").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
45371
45371
  var MemoizedMarkdown = memo(function MemoizedMarkdown2({
45372
45372
  content: content4
45373
45373
  }) {
@@ -45426,12 +45426,12 @@ var BrowseView = memo(function BrowseView2({
45426
45426
  if (annotationId && annotationType === "reference") {
45427
45427
  const annotation = allAnnotations.find((a15) => a15.id === annotationId);
45428
45428
  if (annotation) {
45429
- eventBus.get("attend:click").next({ annotationId, motivation: annotation.motivation });
45429
+ eventBus.get("browse:click").next({ annotationId, motivation: annotation.motivation });
45430
45430
  }
45431
45431
  }
45432
45432
  };
45433
45433
  const { handleMouseEnter, handleMouseLeave, cleanup: cleanupHover } = createHoverHandlers(
45434
- (annotationId) => eventBus.get("attend:hover").next({ annotationId }),
45434
+ (annotationId) => eventBus.get("beckon:hover").next({ annotationId }),
45435
45435
  hoverDelayMs
45436
45436
  );
45437
45437
  const handleMouseOver = (e6) => {
@@ -45475,8 +45475,8 @@ var BrowseView = memo(function BrowseView2({
45475
45475
  scrollToAnnotation(annotationId, true);
45476
45476
  }, [scrollToAnnotation]);
45477
45477
  useEventSubscriptions({
45478
- "attend:hover": handleAnnotationHover,
45479
- "attend:focus": handleAnnotationFocus
45478
+ "beckon:hover": handleAnnotationHover,
45479
+ "beckon:focus": handleAnnotationFocus
45480
45480
  });
45481
45481
  switch (category) {
45482
45482
  case "text":
@@ -45692,7 +45692,7 @@ function ResourceViewer({
45692
45692
  };
45693
45693
  };
45694
45694
  const handleDeleteAnnotation = useCallback16((id2) => {
45695
- eventBus.get("annotate:delete").next({ annotationId: id2 });
45695
+ eventBus.get("mark:delete").next({ annotationId: id2 });
45696
45696
  }, []);
45697
45697
  const handleAnnotationClick = useCallback16((annotation, event) => {
45698
45698
  const metadata = Object.values(ANNOTATORS).find((a15) => a15.matchesAnnotation(annotation));
@@ -45746,21 +45746,21 @@ function ResourceViewer({
45746
45746
  }
45747
45747
  return;
45748
45748
  }
45749
- eventBus.get("attend:panel-open").next({ panel: "annotations", scrollToAnnotationId: annotationId, motivation });
45749
+ eventBus.get("browse:panel-open").next({ panel: "annotations", scrollToAnnotationId: annotationId, motivation });
45750
45750
  }, [highlights, references, assessments, comments, tags3, handleAnnotationClick, selectedClick]);
45751
45751
  useEventSubscriptions({
45752
45752
  // View mode
45753
- "annotate:mode-toggled": handleViewModeToggle,
45753
+ "mark:mode-toggled": handleViewModeToggle,
45754
45754
  // Annotation cache invalidation
45755
- "annotate:added": handleAnnotateAdded,
45756
- "annotate:removed": handleAnnotateRemoved,
45757
- "annotate:body-updated": handleAnnotateBodyUpdated,
45755
+ "mark:added": handleAnnotateAdded,
45756
+ "mark:removed": handleAnnotateRemoved,
45757
+ "mark:body-updated": handleAnnotateBodyUpdated,
45758
45758
  // Toolbar state
45759
- "annotate:selection-changed": handleToolbarSelectionChanged,
45760
- "annotate:click-changed": handleToolbarClickChanged,
45761
- "annotate:shape-changed": handleToolbarShapeChanged,
45759
+ "mark:selection-changed": handleToolbarSelectionChanged,
45760
+ "mark:click-changed": handleToolbarClickChanged,
45761
+ "mark:shape-changed": handleToolbarShapeChanged,
45762
45762
  // Annotation clicks
45763
- "attend:click": handleAnnotationClickEvent
45763
+ "browse:click": handleAnnotationClickEvent
45764
45764
  });
45765
45765
  const annotationsCollection = useMemo5(
45766
45766
  () => ({ highlights, references, assessments, comments, tags: tags3 }),
@@ -45930,7 +45930,7 @@ var AssessmentEntry = forwardRef(
45930
45930
  "data-type": "assessment",
45931
45931
  "data-focused": isFocused ? "true" : "false",
45932
45932
  onClick: () => {
45933
- eventBus.get("attend:click").next({ annotationId: assessment.id, motivation: assessment.motivation });
45933
+ eventBus.get("browse:click").next({ annotationId: assessment.id, motivation: assessment.motivation });
45934
45934
  },
45935
45935
  ...hoverProps,
45936
45936
  children: [
@@ -45984,7 +45984,7 @@ function AssistSection({
45984
45984
  }, [isExpanded, annotationType]);
45985
45985
  const handleAssist = useCallback17(() => {
45986
45986
  const motivation = annotationType === "highlight" ? "highlighting" : annotationType === "assessment" ? "assessing" : "commenting";
45987
- eventBus.get("annotate:assist-request").next({
45987
+ eventBus.get("mark:assist-request").next({
45988
45988
  motivation,
45989
45989
  options: {
45990
45990
  instructions: instructions.trim() || void 0,
@@ -45996,7 +45996,7 @@ function AssistSection({
45996
45996
  setTone("");
45997
45997
  }, [annotationType, instructions, tone, useDensity, density]);
45998
45998
  const handleDismissProgress = useCallback17(() => {
45999
- eventBus.get("annotate:progress-dismiss").next(void 0);
45999
+ eventBus.get("mark:progress-dismiss").next(void 0);
46000
46000
  }, []);
46001
46001
  return /* @__PURE__ */ jsxs20("div", { className: "semiont-panel__section", children: [
46002
46002
  /* @__PURE__ */ jsxs20(
@@ -46253,7 +46253,7 @@ function AssessmentPanel({
46253
46253
  const handleSaveNewAssessment = () => {
46254
46254
  if (pendingAnnotation) {
46255
46255
  const body = newAssessmentText.trim() ? [{ type: "TextualBody", value: newAssessmentText, purpose: "assessing" }] : [];
46256
- eventBus.get("annotate:create").next({
46256
+ eventBus.get("mark:create").next({
46257
46257
  motivation: "assessing",
46258
46258
  selector: pendingAnnotation.selector,
46259
46259
  body
@@ -46265,7 +46265,7 @@ function AssessmentPanel({
46265
46265
  if (!pendingAnnotation) return;
46266
46266
  const handleEscape = (e6) => {
46267
46267
  if (e6.key === "Escape") {
46268
- eventBus.get("annotate:cancel-pending").next(void 0);
46268
+ eventBus.get("mark:cancel-pending").next(void 0);
46269
46269
  setNewAssessmentText("");
46270
46270
  }
46271
46271
  };
@@ -46277,7 +46277,7 @@ function AssessmentPanel({
46277
46277
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
46278
46278
  }, []);
46279
46279
  useEventSubscriptions({
46280
- "attend:click": handleAnnotationClick
46280
+ "browse:click": handleAnnotationClick
46281
46281
  });
46282
46282
  return /* @__PURE__ */ jsxs22("div", { className: "semiont-panel", children: [
46283
46283
  /* @__PURE__ */ jsx32(PanelHeader, { annotationType: "assessment", count: annotations.length, title: t12("title") }),
@@ -46311,7 +46311,7 @@ function AssessmentPanel({
46311
46311
  "button",
46312
46312
  {
46313
46313
  onClick: () => {
46314
- eventBus.get("annotate:cancel-pending").next(void 0);
46314
+ eventBus.get("mark:cancel-pending").next(void 0);
46315
46315
  setNewAssessmentText("");
46316
46316
  },
46317
46317
  className: "semiont-button semiont-button--secondary",
@@ -46493,7 +46493,7 @@ var CommentEntry = forwardRef2(
46493
46493
  "data-type": "comment",
46494
46494
  "data-focused": isFocused ? "true" : "false",
46495
46495
  onClick: () => {
46496
- eventBus.get("attend:click").next({ annotationId: comment2.id, motivation: comment2.motivation });
46496
+ eventBus.get("browse:click").next({ annotationId: comment2.id, motivation: comment2.motivation });
46497
46497
  },
46498
46498
  ...hoverProps,
46499
46499
  children: [
@@ -46650,11 +46650,11 @@ function CommentsPanel({
46650
46650
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
46651
46651
  }, []);
46652
46652
  useEventSubscriptions({
46653
- "attend:click": handleAnnotationClick
46653
+ "browse:click": handleAnnotationClick
46654
46654
  });
46655
46655
  const handleSaveNewComment = () => {
46656
46656
  if (newCommentText.trim() && pendingAnnotation) {
46657
- eventBus.get("annotate:create").next({
46657
+ eventBus.get("mark:create").next({
46658
46658
  motivation: "commenting",
46659
46659
  selector: pendingAnnotation.selector,
46660
46660
  body: [{ type: "TextualBody", value: newCommentText, purpose: "commenting" }]
@@ -46666,7 +46666,7 @@ function CommentsPanel({
46666
46666
  if (!pendingAnnotation) return;
46667
46667
  const handleEscape = (e6) => {
46668
46668
  if (e6.key === "Escape") {
46669
- eventBus.get("annotate:cancel-pending").next(void 0);
46669
+ eventBus.get("mark:cancel-pending").next(void 0);
46670
46670
  setNewCommentText("");
46671
46671
  }
46672
46672
  };
@@ -46705,7 +46705,7 @@ function CommentsPanel({
46705
46705
  "button",
46706
46706
  {
46707
46707
  onClick: () => {
46708
- eventBus.get("annotate:cancel-pending").next(void 0);
46708
+ eventBus.get("mark:cancel-pending").next(void 0);
46709
46709
  setNewCommentText("");
46710
46710
  },
46711
46711
  className: "semiont-button semiont-button--secondary",
@@ -46785,7 +46785,7 @@ var HighlightEntry = forwardRef3(
46785
46785
  "data-type": "highlight",
46786
46786
  "data-focused": isFocused ? "true" : "false",
46787
46787
  onClick: () => {
46788
- eventBus.get("attend:click").next({ annotationId: highlight.id, motivation: highlight.motivation });
46788
+ eventBus.get("browse:click").next({ annotationId: highlight.id, motivation: highlight.motivation });
46789
46789
  },
46790
46790
  ...hoverProps,
46791
46791
  children: [
@@ -46877,11 +46877,11 @@ function HighlightPanel({
46877
46877
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
46878
46878
  }, []);
46879
46879
  useEventSubscriptions({
46880
- "attend:click": handleAnnotationClick
46880
+ "browse:click": handleAnnotationClick
46881
46881
  });
46882
46882
  useEffect28(() => {
46883
46883
  if (pendingAnnotation && pendingAnnotation.motivation === "highlighting") {
46884
- eventBus.get("annotate:create").next({
46884
+ eventBus.get("mark:create").next({
46885
46885
  motivation: "highlighting",
46886
46886
  selector: pendingAnnotation.selector,
46887
46887
  body: []
@@ -47020,7 +47020,7 @@ var ReferenceEntry = forwardRef4(
47020
47020
  }
47021
47021
  };
47022
47022
  const handleComposeDocument = () => {
47023
- eventBus.get("resolve:create-manual").next({
47023
+ eventBus.get("bind:create-manual").next({
47024
47024
  annotationUri: reference.id,
47025
47025
  title: selectedText,
47026
47026
  entityTypes
@@ -47029,7 +47029,7 @@ var ReferenceEntry = forwardRef4(
47029
47029
  const handleUnlink = () => {
47030
47030
  const sourceUri = typeof reference.target === "object" && "source" in reference.target ? reference.target.source : "";
47031
47031
  if (sourceUri) {
47032
- eventBus.get("resolve:update-body").next({
47032
+ eventBus.get("bind:update-body").next({
47033
47033
  annotationUri: reference.id,
47034
47034
  resourceId: sourceUri.split("/resources/")[1] || "",
47035
47035
  operations: [{ op: "remove" }]
@@ -47039,14 +47039,14 @@ var ReferenceEntry = forwardRef4(
47039
47039
  };
47040
47040
  const handleGenerate = () => {
47041
47041
  const resourceUri2 = typeof reference.target === "object" && "source" in reference.target ? reference.target.source : "";
47042
- eventBus.get("generate:modal-open").next({
47042
+ eventBus.get("yield:modal-open").next({
47043
47043
  annotationUri: reference.id,
47044
47044
  resourceUri: resourceUri2,
47045
47045
  defaultTitle: selectedText
47046
47046
  });
47047
47047
  };
47048
47048
  const handleSearch = () => {
47049
- eventBus.get("resolve:link").next({
47049
+ eventBus.get("bind:link").next({
47050
47050
  annotationUri: reference.id,
47051
47051
  searchTerm: selectedText
47052
47052
  });
@@ -47059,7 +47059,7 @@ var ReferenceEntry = forwardRef4(
47059
47059
  "data-type": "reference",
47060
47060
  "data-focused": isFocused ? "true" : "false",
47061
47061
  onClick: () => {
47062
- eventBus.get("attend:click").next({ annotationId: reference.id, motivation: reference.motivation });
47062
+ eventBus.get("browse:click").next({ annotationId: reference.id, motivation: reference.motivation });
47063
47063
  },
47064
47064
  ...hoverProps,
47065
47065
  children: [
@@ -47257,11 +47257,11 @@ function ReferencesPanel({
47257
47257
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
47258
47258
  }, []);
47259
47259
  useEventSubscriptions({
47260
- "attend:click": handleAnnotationClick
47260
+ "browse:click": handleAnnotationClick
47261
47261
  });
47262
47262
  const handleAssist = () => {
47263
47263
  setLastDetectionLog(null);
47264
- eventBus.get("annotate:assist-request").next({
47264
+ eventBus.get("mark:assist-request").next({
47265
47265
  motivation: "linking",
47266
47266
  options: {
47267
47267
  entityTypes: selectedEntityTypes,
@@ -47289,7 +47289,7 @@ function ReferencesPanel({
47289
47289
  const handleCreateReference = () => {
47290
47290
  if (pendingAnnotation) {
47291
47291
  const entityType3 = pendingEntityTypes.join(",") || void 0;
47292
- eventBus.get("annotate:create").next({
47292
+ eventBus.get("mark:create").next({
47293
47293
  motivation: "linking",
47294
47294
  selector: pendingAnnotation.selector,
47295
47295
  body: entityType3 ? [{ type: "TextualBody", value: entityType3, purpose: "tagging" }] : []
@@ -47301,7 +47301,7 @@ function ReferencesPanel({
47301
47301
  if (!pendingAnnotation) return;
47302
47302
  const handleEscape = (e6) => {
47303
47303
  if (e6.key === "Escape") {
47304
- eventBus.get("annotate:cancel-pending").next(void 0);
47304
+ eventBus.get("mark:cancel-pending").next(void 0);
47305
47305
  setPendingEntityTypes([]);
47306
47306
  }
47307
47307
  };
@@ -47336,7 +47336,7 @@ function ReferencesPanel({
47336
47336
  "button",
47337
47337
  {
47338
47338
  onClick: () => {
47339
- eventBus.get("annotate:cancel-pending").next(void 0);
47339
+ eventBus.get("mark:cancel-pending").next(void 0);
47340
47340
  setPendingEntityTypes([]);
47341
47341
  },
47342
47342
  className: "semiont-button semiont-button--secondary",
@@ -47553,7 +47553,7 @@ function ResourceInfoPanel({
47553
47553
  /* @__PURE__ */ jsxs31(
47554
47554
  "button",
47555
47555
  {
47556
- onClick: () => eventBus.get("generate:clone").next(void 0),
47556
+ onClick: () => eventBus.get("yield:clone").next(void 0),
47557
47557
  className: "semiont-resource-button semiont-resource-button--secondary",
47558
47558
  children: [
47559
47559
  "\u{1F517} ",
@@ -47567,7 +47567,7 @@ function ResourceInfoPanel({
47567
47567
  /* @__PURE__ */ jsxs31(
47568
47568
  "button",
47569
47569
  {
47570
- onClick: () => eventBus.get("resource:unarchive").next(void 0),
47570
+ onClick: () => eventBus.get("mark:unarchive").next(void 0),
47571
47571
  className: "semiont-resource-button semiont-resource-button--secondary",
47572
47572
  children: [
47573
47573
  "\u{1F4E4} ",
@@ -47580,7 +47580,7 @@ function ResourceInfoPanel({
47580
47580
  /* @__PURE__ */ jsxs31(
47581
47581
  "button",
47582
47582
  {
47583
- onClick: () => eventBus.get("resource:archive").next(void 0),
47583
+ onClick: () => eventBus.get("mark:archive").next(void 0),
47584
47584
  className: "semiont-resource-button semiont-resource-button--archive",
47585
47585
  children: [
47586
47586
  "\u{1F4E6} ",
@@ -47686,7 +47686,7 @@ var TagEntry = forwardRef5(
47686
47686
  {
47687
47687
  ref,
47688
47688
  onClick: () => {
47689
- eventBus.get("attend:click").next({ annotationId: tag.id, motivation: tag.motivation });
47689
+ eventBus.get("browse:click").next({ annotationId: tag.id, motivation: tag.motivation });
47690
47690
  },
47691
47691
  ...hoverProps,
47692
47692
  className: `semiont-annotation-entry${isHovered ? " semiont-annotation-pulse" : ""}`,
@@ -47756,7 +47756,7 @@ function TaggingPanel({
47756
47756
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
47757
47757
  }, []);
47758
47758
  useEventSubscriptions({
47759
- "attend:click": handleAnnotationClick
47759
+ "browse:click": handleAnnotationClick
47760
47760
  });
47761
47761
  const entryRefs = useRef23(/* @__PURE__ */ new Map());
47762
47762
  const sortedAnnotations = useMemo10(() => {
@@ -47830,7 +47830,7 @@ function TaggingPanel({
47830
47830
  };
47831
47831
  const handleAssist = () => {
47832
47832
  if (selectedCategories.size > 0) {
47833
- eventBus.get("annotate:assist-request").next({
47833
+ eventBus.get("mark:assist-request").next({
47834
47834
  motivation: "tagging",
47835
47835
  options: {
47836
47836
  schemaId: selectedSchemaId,
@@ -47844,7 +47844,7 @@ function TaggingPanel({
47844
47844
  if (!pendingAnnotation) return;
47845
47845
  const handleEscape = (e6) => {
47846
47846
  if (e6.key === "Escape") {
47847
- eventBus.get("annotate:cancel-pending").next(void 0);
47847
+ eventBus.get("mark:cancel-pending").next(void 0);
47848
47848
  }
47849
47849
  };
47850
47850
  document.addEventListener("keydown", handleEscape);
@@ -47882,7 +47882,7 @@ function TaggingPanel({
47882
47882
  className: "semiont-select",
47883
47883
  onChange: (e6) => {
47884
47884
  if (e6.target.value && pendingAnnotation) {
47885
- eventBus.get("annotate:create").next({
47885
+ eventBus.get("mark:create").next({
47886
47886
  motivation: "tagging",
47887
47887
  selector: pendingAnnotation.selector,
47888
47888
  body: [
@@ -47911,7 +47911,7 @@ function TaggingPanel({
47911
47911
  /* @__PURE__ */ jsx43("div", { className: "semiont-annotation-prompt__footer", children: /* @__PURE__ */ jsx43(
47912
47912
  "button",
47913
47913
  {
47914
- onClick: () => eventBus.get("annotate:cancel-pending").next(void 0),
47914
+ onClick: () => eventBus.get("mark:cancel-pending").next(void 0),
47915
47915
  className: "semiont-button semiont-button--secondary",
47916
47916
  "data-type": "tag",
47917
47917
  children: t12("cancel")
@@ -48411,7 +48411,7 @@ function ObservableLink({
48411
48411
  onClickRef.current = onClick;
48412
48412
  });
48413
48413
  const handleClick = useCallback23((e6) => {
48414
- eventBus.get("navigation:link-clicked").next({
48414
+ eventBus.get("browse:link-clicked").next({
48415
48415
  href,
48416
48416
  label
48417
48417
  });
@@ -48478,7 +48478,7 @@ function SimpleNavigation({
48478
48478
  /* @__PURE__ */ jsx48(
48479
48479
  "button",
48480
48480
  {
48481
- onClick: () => eventBus.get("navigation:sidebar-toggle").next(void 0),
48481
+ onClick: () => eventBus.get("browse:sidebar-toggle").next(void 0),
48482
48482
  className: "semiont-nav-section__header-icon",
48483
48483
  title: isCollapsed ? expandSidebarLabel : collapseSidebarLabel,
48484
48484
  "aria-label": isCollapsed ? expandSidebarLabel : collapseSidebarLabel,
@@ -52705,14 +52705,14 @@ function CollapsibleResourceNavigation({
52705
52705
  announceCannotMove(direction);
52706
52706
  return;
52707
52707
  }
52708
- eventBus.get("navigation:resource-reorder").next({ oldIndex: currentIndex, newIndex });
52708
+ eventBus.get("browse:resource-reorder").next({ oldIndex: currentIndex, newIndex });
52709
52709
  const resource = resources[currentIndex];
52710
52710
  announceKeyboardReorder(resource.name, direction, newIndex + 1, resources.length);
52711
52711
  }, [resources]);
52712
52712
  const handleResourceClose = (resourceId, e6) => {
52713
52713
  e6.preventDefault();
52714
52714
  e6.stopPropagation();
52715
- eventBus.get("navigation:resource-close").next({ resourceId });
52715
+ eventBus.get("browse:resource-close").next({ resourceId });
52716
52716
  const resourceHref = getResourceHref(resourceId);
52717
52717
  if (currentPath === resourceHref && onNavigate && fixedItems.length > 0) {
52718
52718
  onNavigate(fixedItems[0].href);
@@ -52732,7 +52732,7 @@ function CollapsibleResourceNavigation({
52732
52732
  const oldIndex = resources.findIndex((resource) => resource.id === active.id);
52733
52733
  const newIndex = resources.findIndex((resource) => resource.id === over.id);
52734
52734
  if (oldIndex !== -1 && newIndex !== -1) {
52735
- eventBus.get("navigation:resource-reorder").next({ oldIndex, newIndex });
52735
+ eventBus.get("browse:resource-reorder").next({ oldIndex, newIndex });
52736
52736
  const resource = resources[oldIndex];
52737
52737
  announceDrop(resource.name, newIndex + 1, resources.length);
52738
52738
  }
@@ -52759,7 +52759,7 @@ function CollapsibleResourceNavigation({
52759
52759
  /* @__PURE__ */ jsx50(
52760
52760
  "button",
52761
52761
  {
52762
- onClick: () => eventBus.get("navigation:sidebar-toggle").next(void 0),
52762
+ onClick: () => eventBus.get("browse:sidebar-toggle").next(void 0),
52763
52763
  className: "semiont-nav-section__header-icon",
52764
52764
  title: isCollapsed ? mergedTranslations.expandSidebar : mergedTranslations.collapseSidebar,
52765
52765
  "aria-label": isCollapsed ? mergedTranslations.expandSidebar : mergedTranslations.collapseSidebar,
@@ -54628,6 +54628,68 @@ function UserCircleIcon({
54628
54628
  var ForwardRef17 = /* @__PURE__ */ React44.forwardRef(UserCircleIcon);
54629
54629
  var UserCircleIcon_default = ForwardRef17;
54630
54630
 
54631
+ // src/hooks/usePanelBrowse.ts
54632
+ import { useState as useState36, useCallback as useCallback31, useEffect as useEffect43 } from "react";
54633
+ var COMMON_PANELS = ["user", "settings"];
54634
+ var RESOURCE_PANELS = ["history", "info", "annotations", "collaboration", "jsonld"];
54635
+ var tabGenerationCounter = 0;
54636
+ function usePanelBrowse() {
54637
+ const [activePanel, setActivePanel] = useState36(() => {
54638
+ if (typeof window !== "undefined") {
54639
+ const saved = localStorage.getItem("activeToolbarPanel");
54640
+ return saved || null;
54641
+ }
54642
+ return null;
54643
+ });
54644
+ const [scrollToAnnotationId, setScrollToAnnotationId] = useState36(null);
54645
+ const [panelInitialTab, setPanelInitialTab] = useState36(null);
54646
+ useEffect43(() => {
54647
+ if (typeof window === "undefined") return;
54648
+ if (activePanel) {
54649
+ localStorage.setItem("activeToolbarPanel", activePanel);
54650
+ } else {
54651
+ localStorage.removeItem("activeToolbarPanel");
54652
+ }
54653
+ }, [activePanel]);
54654
+ const handleScrollCompleted = useCallback31(() => {
54655
+ setScrollToAnnotationId(null);
54656
+ }, []);
54657
+ const handlePanelToggle = useCallback31(({ panel }) => {
54658
+ setActivePanel((current) => current === panel ? null : panel);
54659
+ }, []);
54660
+ const handlePanelOpen = useCallback31(({ panel, scrollToAnnotationId: scrollTarget, motivation }) => {
54661
+ if (scrollTarget) {
54662
+ setScrollToAnnotationId(scrollTarget);
54663
+ }
54664
+ if (motivation) {
54665
+ const motivationToTab = {
54666
+ "linking": "reference",
54667
+ "commenting": "comment",
54668
+ "tagging": "tag",
54669
+ "highlighting": "highlight",
54670
+ "assessing": "assessment"
54671
+ };
54672
+ const tab2 = motivationToTab[motivation] || "highlight";
54673
+ setPanelInitialTab({ tab: tab2, generation: ++tabGenerationCounter });
54674
+ }
54675
+ setActivePanel(panel);
54676
+ }, []);
54677
+ const handlePanelClose = useCallback31(() => {
54678
+ setActivePanel(null);
54679
+ }, []);
54680
+ useEventSubscriptions({
54681
+ "browse:panel-toggle": handlePanelToggle,
54682
+ "browse:panel-open": handlePanelOpen,
54683
+ "browse:panel-close": handlePanelClose
54684
+ });
54685
+ return {
54686
+ activePanel,
54687
+ scrollToAnnotationId,
54688
+ panelInitialTab,
54689
+ onScrollCompleted: handleScrollCompleted
54690
+ };
54691
+ }
54692
+
54631
54693
  // src/features/admin-devops/components/AdminDevOpsPage.tsx
54632
54694
  import { jsx as jsx66, jsxs as jsxs54 } from "react/jsx-runtime";
54633
54695
  function AdminDevOpsPage({
@@ -54640,7 +54702,7 @@ function AdminDevOpsPage({
54640
54702
  ToolbarPanels,
54641
54703
  Toolbar: Toolbar2
54642
54704
  }) {
54643
- return /* @__PURE__ */ jsxs54("div", { className: `semiont-page${activePanel ? " semiont-page--panel-open" : ""}`, children: [
54705
+ return /* @__PURE__ */ jsxs54("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
54644
54706
  /* @__PURE__ */ jsxs54("div", { className: "semiont-page__content", children: [
54645
54707
  /* @__PURE__ */ jsxs54("div", { className: "semiont-page__header", children: [
54646
54708
  /* @__PURE__ */ jsx66("h1", { className: "semiont-page__title", children: t12.title }),
@@ -54713,7 +54775,7 @@ function AdminSecurityPage({
54713
54775
  ToolbarPanels,
54714
54776
  Toolbar: Toolbar2
54715
54777
  }) {
54716
- return /* @__PURE__ */ jsxs55("div", { className: `semiont-page${activePanel ? " semiont-page--panel-open" : ""}`, children: [
54778
+ return /* @__PURE__ */ jsxs55("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
54717
54779
  /* @__PURE__ */ jsx67("div", { className: "semiont-page__content", children: /* @__PURE__ */ jsxs55("div", { className: "semiont-page__sections", children: [
54718
54780
  /* @__PURE__ */ jsxs55("div", { className: "semiont-page__header", children: [
54719
54781
  /* @__PURE__ */ jsx67("h1", { className: "semiont-page__title", children: t12.title }),
@@ -54796,7 +54858,7 @@ function AdminSecurityPage({
54796
54858
  }
54797
54859
 
54798
54860
  // src/features/admin-users/components/AdminUsersPage.tsx
54799
- import { useState as useState36 } from "react";
54861
+ import { useState as useState37 } from "react";
54800
54862
  import { Fragment as Fragment15, jsx as jsx68, jsxs as jsxs56 } from "react/jsx-runtime";
54801
54863
  function UserTableRow({
54802
54864
  user,
@@ -54878,9 +54940,9 @@ function AdminUsersPage({
54878
54940
  Toolbar: Toolbar2,
54879
54941
  buttonStyles: buttonStyles2
54880
54942
  }) {
54881
- const [searchTerm, setSearchTerm] = useState36("");
54882
- const [selectedRole, setSelectedRole] = useState36("all");
54883
- const [selectedStatus, setSelectedStatus] = useState36("all");
54943
+ const [searchTerm, setSearchTerm] = useState37("");
54944
+ const [selectedRole, setSelectedRole] = useState37("all");
54945
+ const [selectedStatus, setSelectedStatus] = useState37("all");
54884
54946
  const filteredUsers = users.filter((user) => {
54885
54947
  const matchesSearch = (user.name || "").toLowerCase().includes(searchTerm.toLowerCase()) || user.email.toLowerCase().includes(searchTerm.toLowerCase());
54886
54948
  const userRole = user.isAdmin ? "admin" : "user";
@@ -54889,7 +54951,7 @@ function AdminUsersPage({
54889
54951
  const matchesStatus = selectedStatus === "all" || userStatus === selectedStatus;
54890
54952
  return matchesSearch && matchesRole && matchesStatus;
54891
54953
  });
54892
- return /* @__PURE__ */ jsxs56("div", { className: `semiont-page${activePanel ? " semiont-page--panel-open" : ""}`, children: [
54954
+ return /* @__PURE__ */ jsxs56("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
54893
54955
  /* @__PURE__ */ jsx68("div", { className: "semiont-page__content", children: /* @__PURE__ */ jsxs56("div", { className: "semiont-page__sections", children: [
54894
54956
  /* @__PURE__ */ jsxs56("div", { className: "semiont-page__header-with-action", children: [
54895
54957
  /* @__PURE__ */ jsxs56("div", { children: [
@@ -55195,7 +55257,7 @@ function SignInForm({
55195
55257
  }
55196
55258
 
55197
55259
  // src/features/auth/components/SignUpForm.tsx
55198
- import { useState as useState37 } from "react";
55260
+ import { useState as useState38 } from "react";
55199
55261
  import { jsx as jsx70, jsxs as jsxs58 } from "react/jsx-runtime";
55200
55262
  function GoogleIcon2() {
55201
55263
  return /* @__PURE__ */ jsxs58("svg", { className: "semiont-icon semiont-icon--small semiont-icon--inline", viewBox: "0 0 24 24", children: [
@@ -55230,7 +55292,7 @@ function GoogleIcon2() {
55230
55292
  ] });
55231
55293
  }
55232
55294
  function SignUpForm({ onSignUp, Link, translations: t12 }) {
55233
- const [isLoading, setIsLoading] = useState37(false);
55295
+ const [isLoading, setIsLoading] = useState38(false);
55234
55296
  const handleSignUp = async () => {
55235
55297
  setIsLoading(true);
55236
55298
  try {
@@ -55455,7 +55517,7 @@ function EntityTagsPage({
55455
55517
  onAddTag();
55456
55518
  }
55457
55519
  };
55458
- return /* @__PURE__ */ jsxs61("div", { className: `semiont-page${activePanel ? " semiont-page--panel-open" : ""}`, children: [
55520
+ return /* @__PURE__ */ jsxs61("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
55459
55521
  /* @__PURE__ */ jsxs61("div", { className: "semiont-page__content", children: [
55460
55522
  /* @__PURE__ */ jsxs61("div", { className: "semiont-page__header", children: [
55461
55523
  /* @__PURE__ */ jsx73("h1", { className: "semiont-page__title", children: t12.pageTitle }),
@@ -55543,7 +55605,7 @@ function RecentDocumentsPage({
55543
55605
  if (isLoading) {
55544
55606
  return /* @__PURE__ */ jsx74("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx74("p", { className: "semiont-page__loading-text", children: t12.loading }) });
55545
55607
  }
55546
- return /* @__PURE__ */ jsxs62("div", { className: `semiont-page${activePanel ? " semiont-page--panel-open" : ""}`, children: [
55608
+ return /* @__PURE__ */ jsxs62("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
55547
55609
  /* @__PURE__ */ jsxs62("div", { className: "semiont-page__content", children: [
55548
55610
  /* @__PURE__ */ jsxs62("div", { className: "semiont-page__header", children: [
55549
55611
  /* @__PURE__ */ jsx74("h1", { className: "semiont-page__title", children: t12.pageTitle }),
@@ -55609,7 +55671,7 @@ function TagSchemasPage({
55609
55671
  if (isLoading) {
55610
55672
  return /* @__PURE__ */ jsx75("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx75("p", { className: "semiont-page__loading-text", children: t12.loading }) });
55611
55673
  }
55612
- return /* @__PURE__ */ jsxs63("div", { className: `semiont-page${activePanel ? " semiont-page--panel-open" : ""}`, children: [
55674
+ return /* @__PURE__ */ jsxs63("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
55613
55675
  /* @__PURE__ */ jsxs63("div", { className: "semiont-page__content", children: [
55614
55676
  /* @__PURE__ */ jsxs63("div", { className: "semiont-page__header", children: [
55615
55677
  /* @__PURE__ */ jsx75("h1", { className: "semiont-page__title", children: t12.pageTitle }),
@@ -55687,7 +55749,7 @@ function TagSchemasPage({
55687
55749
  }
55688
55750
 
55689
55751
  // src/features/resource-compose/components/ResourceComposePage.tsx
55690
- import { useState as useState38, useEffect as useEffect43 } from "react";
55752
+ import { useState as useState39, useEffect as useEffect44 } from "react";
55691
55753
  import { isImageMimeType, isPdfMimeType as isPdfMimeType4, LOCALES as LOCALES2 } from "@semiont/api-client";
55692
55754
  import { jsx as jsx76, jsxs as jsxs64 } from "react/jsx-runtime";
55693
55755
  function ResourceComposePage({
@@ -55707,19 +55769,19 @@ function ResourceComposePage({
55707
55769
  Toolbar: Toolbar2
55708
55770
  }) {
55709
55771
  const { announceFormSubmitting, announceFormSuccess, announceFormError } = useFormAnnouncements();
55710
- const [newResourceName, setNewResourceName] = useState38("");
55711
- const [newResourceContent, setNewResourceContent] = useState38("");
55712
- const [selectedEntityTypes, setSelectedEntityTypes] = useState38([]);
55713
- const [isCreating, setIsCreating] = useState38(false);
55714
- const [inputMethod, setInputMethod] = useState38("write");
55715
- const [uploadedFile, setUploadedFile] = useState38(null);
55716
- const [fileMimeType, setFileMimeType] = useState38("text/markdown");
55717
- const [filePreviewUrl, setFilePreviewUrl] = useState38(null);
55718
- const [selectedFormat, setSelectedFormat] = useState38("text/markdown");
55719
- const [selectedLanguage, setSelectedLanguage] = useState38(initialLocale);
55720
- const [selectedCharset, setSelectedCharset] = useState38("");
55721
- const [archiveOriginal, setArchiveOriginal] = useState38(true);
55722
- useEffect43(() => {
55772
+ const [newResourceName, setNewResourceName] = useState39("");
55773
+ const [newResourceContent, setNewResourceContent] = useState39("");
55774
+ const [selectedEntityTypes, setSelectedEntityTypes] = useState39([]);
55775
+ const [isCreating, setIsCreating] = useState39(false);
55776
+ const [inputMethod, setInputMethod] = useState39("write");
55777
+ const [uploadedFile, setUploadedFile] = useState39(null);
55778
+ const [fileMimeType, setFileMimeType] = useState39("text/markdown");
55779
+ const [filePreviewUrl, setFilePreviewUrl] = useState39(null);
55780
+ const [selectedFormat, setSelectedFormat] = useState39("text/markdown");
55781
+ const [selectedLanguage, setSelectedLanguage] = useState39(initialLocale);
55782
+ const [selectedCharset, setSelectedCharset] = useState39("");
55783
+ const [archiveOriginal, setArchiveOriginal] = useState39(true);
55784
+ useEffect44(() => {
55723
55785
  if (mode === "clone" && cloneData) {
55724
55786
  setNewResourceName(cloneData.sourceResource.name);
55725
55787
  setNewResourceContent(cloneData.sourceContent);
@@ -55752,7 +55814,7 @@ function ResourceComposePage({
55752
55814
  reader.readAsText(file);
55753
55815
  }
55754
55816
  };
55755
- useEffect43(() => {
55817
+ useEffect44(() => {
55756
55818
  return () => {
55757
55819
  if (filePreviewUrl) {
55758
55820
  URL.revokeObjectURL(filePreviewUrl);
@@ -55800,7 +55862,7 @@ function ResourceComposePage({
55800
55862
  };
55801
55863
  const isClone = mode === "clone";
55802
55864
  const isReferenceCompletion = mode === "reference";
55803
- return /* @__PURE__ */ jsxs64("div", { className: `semiont-page${activePanel ? " semiont-page--panel-open" : ""}`, children: [
55865
+ return /* @__PURE__ */ jsxs64("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
55804
55866
  /* @__PURE__ */ jsxs64("div", { className: "semiont-page__content semiont-page__compose", children: [
55805
55867
  /* @__PURE__ */ jsxs64("div", { className: "semiont-page__header", children: [
55806
55868
  /* @__PURE__ */ jsx76("h1", { className: "semiont-page__title", children: isClone ? t12.titleEditClone : isReferenceCompletion ? t12.titleCompleteReference : t12.title }),
@@ -56101,7 +56163,7 @@ function ResourceComposePage({
56101
56163
  }
56102
56164
 
56103
56165
  // src/features/resource-discovery/components/ResourceDiscoveryPage.tsx
56104
- import { useState as useState39, useCallback as useCallback31, useRef as useRef31 } from "react";
56166
+ import { useState as useState40, useCallback as useCallback32, useRef as useRef31 } from "react";
56105
56167
  import { getResourceId as getResourceId2 } from "@semiont/api-client";
56106
56168
 
56107
56169
  // src/features/resource-discovery/components/ResourceCard.tsx
@@ -56174,8 +56236,8 @@ function ResourceDiscoveryPage({
56174
56236
  translations: t12,
56175
56237
  ToolbarPanels
56176
56238
  }) {
56177
- const [searchQuery2, setSearchQuery] = useState39("");
56178
- const [selectedEntityType, setSelectedEntityType] = useState39("");
56239
+ const [searchQuery2, setSearchQuery] = useState40("");
56240
+ const [selectedEntityType, setSelectedEntityType] = useState40("");
56179
56241
  const hasSearchQuery = searchQuery2.trim() !== "";
56180
56242
  const hasSearchResults = searchDocuments.length > 0;
56181
56243
  const baseDocuments = hasSearchResults ? searchDocuments : recentDocuments;
@@ -56194,23 +56256,23 @@ function ResourceDiscoveryPage({
56194
56256
  );
56195
56257
  const onNavigateToResourceRef = useRef31(onNavigateToResource);
56196
56258
  onNavigateToResourceRef.current = onNavigateToResource;
56197
- const handleEntityTypeFilter = useCallback31((entityType3) => {
56259
+ const handleEntityTypeFilter = useCallback32((entityType3) => {
56198
56260
  setSelectedEntityType(entityType3);
56199
56261
  }, []);
56200
- const openResource = useCallback31((resource) => {
56262
+ const openResource = useCallback32((resource) => {
56201
56263
  const resourceId = getResourceId2(resource);
56202
56264
  if (resourceId) {
56203
56265
  onNavigateToResourceRef.current(resourceId);
56204
56266
  }
56205
56267
  }, []);
56206
- const handleSearchSubmit = useCallback31((e6) => {
56268
+ const handleSearchSubmit = useCallback32((e6) => {
56207
56269
  e6.preventDefault();
56208
56270
  }, []);
56209
56271
  if (isLoadingRecent) {
56210
56272
  return /* @__PURE__ */ jsx78("div", { className: "semiont-page__loading", children: /* @__PURE__ */ jsx78("p", { className: "semiont-page__loading-text", children: t12.loadingKnowledgeBase }) });
56211
56273
  }
56212
56274
  const showNoResultsWarning = hasSearchQuery && !hasSearchResults && !isSearching;
56213
- return /* @__PURE__ */ jsxs66("div", { className: `semiont-page${activePanel ? " semiont-page--panel-open" : ""}`, children: [
56275
+ return /* @__PURE__ */ jsxs66("div", { className: `semiont-page${activePanel && COMMON_PANELS.includes(activePanel) ? " semiont-page--panel-open" : ""}`, children: [
56214
56276
  /* @__PURE__ */ jsxs66("div", { className: "semiont-page__content", children: [
56215
56277
  /* @__PURE__ */ jsxs66("div", { className: "semiont-page__header", children: [
56216
56278
  /* @__PURE__ */ jsx78("h1", { className: "semiont-page__title", children: t12.title }),
@@ -56341,36 +56403,36 @@ import { resourceAnnotationUri as resourceAnnotationUri3 } from "@semiont/core";
56341
56403
  import { getLanguage, getPrimaryRepresentation, getPrimaryMediaType as getPrimaryMediaType2 } from "@semiont/api-client";
56342
56404
  import { uriToAnnotationId as uriToAnnotationId2 } from "@semiont/core";
56343
56405
 
56344
- // src/hooks/useResolutionFlow.ts
56345
- import { useCallback as useCallback32, useEffect as useEffect44, useRef as useRef32, useState as useState40 } from "react";
56406
+ // src/hooks/useBindFlow.ts
56407
+ import { useCallback as useCallback33, useEffect as useEffect45, useRef as useRef32, useState as useState41 } from "react";
56346
56408
  import { resourceAnnotationUri, accessToken as accessToken3 } from "@semiont/core";
56347
56409
  import { uriToAnnotationIdOrPassthrough } from "@semiont/core";
56348
56410
  function toAccessToken2(token) {
56349
56411
  return token ? accessToken3(token) : void 0;
56350
56412
  }
56351
- function useResolutionFlow(rUri) {
56413
+ function useBindFlow(rUri) {
56352
56414
  const eventBus = useEventBus();
56353
56415
  const client = useApiClient();
56354
56416
  const token = useAuthToken();
56355
56417
  const { showError } = useToast();
56356
- const [searchModalOpen, setSearchModalOpen] = useState40(false);
56357
- const [pendingReferenceId, setPendingReferenceId] = useState40(null);
56358
- const onCloseSearchModal = useCallback32(() => {
56418
+ const [searchModalOpen, setSearchModalOpen] = useState41(false);
56419
+ const [pendingReferenceId, setPendingReferenceId] = useState41(null);
56420
+ const onCloseSearchModal = useCallback33(() => {
56359
56421
  setSearchModalOpen(false);
56360
56422
  }, []);
56361
56423
  const rUriRef = useRef32(rUri);
56362
- useEffect44(() => {
56424
+ useEffect45(() => {
56363
56425
  rUriRef.current = rUri;
56364
56426
  });
56365
56427
  const clientRef = useRef32(client);
56366
- useEffect44(() => {
56428
+ useEffect45(() => {
56367
56429
  clientRef.current = client;
56368
56430
  });
56369
56431
  const tokenRef = useRef32(token);
56370
- useEffect44(() => {
56432
+ useEffect45(() => {
56371
56433
  tokenRef.current = token;
56372
56434
  });
56373
- useEffect44(() => {
56435
+ useEffect45(() => {
56374
56436
  const handleAnnotationUpdateBody = async (event) => {
56375
56437
  try {
56376
56438
  const annotationIdSegment = uriToAnnotationIdOrPassthrough(event.annotationUri);
@@ -56379,47 +56441,47 @@ function useResolutionFlow(rUri) {
56379
56441
  resourceId: event.resourceId,
56380
56442
  operations: event.operations
56381
56443
  }, { auth: toAccessToken2(tokenRef.current) });
56382
- eventBus.get("resolve:body-updated").next({ annotationUri: event.annotationUri });
56444
+ eventBus.get("bind:body-updated").next({ annotationUri: event.annotationUri });
56383
56445
  } catch (error) {
56384
56446
  console.error("Failed to update annotation body:", error);
56385
- eventBus.get("resolve:body-update-failed").next({ error });
56447
+ eventBus.get("bind:body-update-failed").next({ error });
56386
56448
  }
56387
56449
  };
56388
56450
  const handleReferenceLink = (event) => {
56389
- eventBus.get("resolve:search-requested").next({
56451
+ eventBus.get("bind:search-requested").next({
56390
56452
  referenceId: event.annotationUri,
56391
56453
  searchTerm: event.searchTerm
56392
56454
  });
56393
56455
  };
56394
- const subscription1 = eventBus.get("resolve:update-body").subscribe(handleAnnotationUpdateBody);
56395
- const subscription2 = eventBus.get("resolve:link").subscribe(handleReferenceLink);
56456
+ const subscription1 = eventBus.get("bind:update-body").subscribe(handleAnnotationUpdateBody);
56457
+ const subscription2 = eventBus.get("bind:link").subscribe(handleReferenceLink);
56396
56458
  return () => {
56397
56459
  subscription1.unsubscribe();
56398
56460
  subscription2.unsubscribe();
56399
56461
  };
56400
56462
  }, [eventBus]);
56401
- useEffect44(() => {
56463
+ useEffect45(() => {
56402
56464
  const handleResolutionSearchRequested = (event) => {
56403
56465
  setPendingReferenceId(event.referenceId);
56404
56466
  setSearchModalOpen(true);
56405
56467
  };
56406
- const subscription = eventBus.get("resolve:search-requested").subscribe(handleResolutionSearchRequested);
56468
+ const subscription = eventBus.get("bind:search-requested").subscribe(handleResolutionSearchRequested);
56407
56469
  return () => subscription.unsubscribe();
56408
56470
  }, [eventBus]);
56409
56471
  useEventSubscriptions({
56410
- "resolve:body-update-failed": ({ error }) => showError(`Failed to update reference: ${error.message}`)
56472
+ "bind:body-update-failed": ({ error }) => showError(`Failed to update reference: ${error.message}`)
56411
56473
  });
56412
56474
  return { searchModalOpen, pendingReferenceId, onCloseSearchModal };
56413
56475
  }
56414
56476
 
56415
- // src/hooks/useAnnotationFlow.ts
56416
- import { useState as useState41, useRef as useRef33, useEffect as useEffect45, useCallback as useCallback33 } from "react";
56477
+ // src/hooks/useMarkFlow.ts
56478
+ import { useState as useState42, useRef as useRef33, useEffect as useEffect46, useCallback as useCallback34 } from "react";
56417
56479
  import { resourceAnnotationUri as resourceAnnotationUri2, accessToken as accessToken4, entityType as entityType2 } from "@semiont/core";
56418
56480
  import { uriToAnnotationIdOrPassthrough as uriToAnnotationIdOrPassthrough2 } from "@semiont/core";
56419
56481
  function toAccessToken3(token) {
56420
56482
  return token ? accessToken4(token) : void 0;
56421
56483
  }
56422
- function useAnnotationFlow(rUri) {
56484
+ function useMarkFlow(rUri) {
56423
56485
  const eventBus = useEventBus();
56424
56486
  const client = useApiClient();
56425
56487
  const token = useAuthToken();
@@ -56427,17 +56489,17 @@ function useAnnotationFlow(rUri) {
56427
56489
  const clientRef = useRef33(client);
56428
56490
  const rUriRef = useRef33(rUri);
56429
56491
  const tokenRef = useRef33(token);
56430
- useEffect45(() => {
56492
+ useEffect46(() => {
56431
56493
  clientRef.current = client;
56432
56494
  });
56433
- useEffect45(() => {
56495
+ useEffect46(() => {
56434
56496
  rUriRef.current = rUri;
56435
56497
  });
56436
- useEffect45(() => {
56498
+ useEffect46(() => {
56437
56499
  tokenRef.current = token;
56438
56500
  });
56439
- const [pendingAnnotation, setPendingAnnotation] = useState41(null);
56440
- const handleAnnotationRequested = useCallback33((pending) => {
56501
+ const [pendingAnnotation, setPendingAnnotation] = useState42(null);
56502
+ const handleAnnotationRequested = useCallback34((pending) => {
56441
56503
  const MOTIVATION_TO_TAB = {
56442
56504
  highlighting: "annotations",
56443
56505
  commenting: "annotations",
@@ -56453,10 +56515,10 @@ function useAnnotationFlow(rUri) {
56453
56515
  questioning: "annotations",
56454
56516
  replying: "annotations"
56455
56517
  };
56456
- eventBus.get("attend:panel-open").next({ panel: MOTIVATION_TO_TAB[pending.motivation] || "annotations" });
56518
+ eventBus.get("browse:panel-open").next({ panel: MOTIVATION_TO_TAB[pending.motivation] || "annotations" });
56457
56519
  setPendingAnnotation(pending);
56458
56520
  }, []);
56459
- const selectionToSelector = useCallback33((selection2) => {
56521
+ const selectionToSelector = useCallback34((selection2) => {
56460
56522
  if (selection2.svgSelector) {
56461
56523
  return {
56462
56524
  type: "SvgSelector",
@@ -56488,29 +56550,29 @@ function useAnnotationFlow(rUri) {
56488
56550
  ...selection2.suffix && { suffix: selection2.suffix }
56489
56551
  };
56490
56552
  }, []);
56491
- const handleCommentRequested = useCallback33((selection2) => {
56553
+ const handleCommentRequested = useCallback34((selection2) => {
56492
56554
  handleAnnotationRequested({ selector: selectionToSelector(selection2), motivation: "commenting" });
56493
56555
  }, [handleAnnotationRequested, selectionToSelector]);
56494
- const handleTagRequested = useCallback33((selection2) => {
56556
+ const handleTagRequested = useCallback34((selection2) => {
56495
56557
  handleAnnotationRequested({ selector: selectionToSelector(selection2), motivation: "tagging" });
56496
56558
  }, [handleAnnotationRequested, selectionToSelector]);
56497
- const handleAssessmentRequested = useCallback33((selection2) => {
56559
+ const handleAssessmentRequested = useCallback34((selection2) => {
56498
56560
  handleAnnotationRequested({ selector: selectionToSelector(selection2), motivation: "assessing" });
56499
56561
  }, [handleAnnotationRequested, selectionToSelector]);
56500
- const handleReferenceRequested = useCallback33((selection2) => {
56562
+ const handleReferenceRequested = useCallback34((selection2) => {
56501
56563
  handleAnnotationRequested({ selector: selectionToSelector(selection2), motivation: "linking" });
56502
56564
  }, [handleAnnotationRequested, selectionToSelector]);
56503
- const handleAnnotationCancelPending = useCallback33(() => {
56565
+ const handleAnnotationCancelPending = useCallback34(() => {
56504
56566
  setPendingAnnotation(null);
56505
56567
  }, []);
56506
- const [assistingMotivation, setAssistingMotivation] = useState41(null);
56507
- const [progress, setProgress] = useState41(null);
56568
+ const [assistingMotivation, setAssistingMotivation] = useState42(null);
56569
+ const [progress, setProgress] = useState42(null);
56508
56570
  const assistStreamRef = useRef33(null);
56509
56571
  const progressDismissTimeoutRef = useRef33(null);
56510
- const handleAnnotationProgress = useCallback33((chunk) => {
56572
+ const handleMarkProgress = useCallback34((chunk) => {
56511
56573
  setProgress(chunk);
56512
56574
  }, []);
56513
- const handleAnnotationComplete = useCallback33((event) => {
56575
+ const handleAnnotationComplete = useCallback34((event) => {
56514
56576
  setAssistingMotivation((prev) => {
56515
56577
  if (!event.motivation || event.motivation !== prev) return prev;
56516
56578
  return null;
@@ -56524,7 +56586,7 @@ function useAnnotationFlow(rUri) {
56524
56586
  progressDismissTimeoutRef.current = null;
56525
56587
  }, 5e3);
56526
56588
  }, [showSuccess]);
56527
- const handleAnnotationFailed = useCallback33((event) => {
56589
+ const handleAnnotationFailed = useCallback34((event) => {
56528
56590
  if (progressDismissTimeoutRef.current) {
56529
56591
  clearTimeout(progressDismissTimeoutRef.current);
56530
56592
  progressDismissTimeoutRef.current = null;
@@ -56534,14 +56596,14 @@ function useAnnotationFlow(rUri) {
56534
56596
  const errorMessage = event.payload.error || "Annotation failed";
56535
56597
  showError(errorMessage);
56536
56598
  }, [showError]);
56537
- const handleProgressDismiss = useCallback33(() => {
56599
+ const handleProgressDismiss = useCallback34(() => {
56538
56600
  if (progressDismissTimeoutRef.current) {
56539
56601
  clearTimeout(progressDismissTimeoutRef.current);
56540
56602
  progressDismissTimeoutRef.current = null;
56541
56603
  }
56542
56604
  setProgress(null);
56543
56605
  }, []);
56544
- useEffect45(() => {
56606
+ useEffect46(() => {
56545
56607
  const handleAnnotationCreate = async (event) => {
56546
56608
  const currentClient = clientRef.current;
56547
56609
  const currentRUri = rUriRef.current;
@@ -56557,11 +56619,11 @@ function useAnnotationFlow(rUri) {
56557
56619
  }, { auth: toAccessToken3(tokenRef.current) });
56558
56620
  if (result.annotation) {
56559
56621
  setPendingAnnotation(null);
56560
- eventBus.get("annotate:created").next({ annotation: result.annotation });
56622
+ eventBus.get("mark:created").next({ annotation: result.annotation });
56561
56623
  }
56562
56624
  } catch (error) {
56563
56625
  console.error("Failed to create annotation:", error);
56564
- eventBus.get("annotate:create-failed").next({ error });
56626
+ eventBus.get("mark:create-failed").next({ error });
56565
56627
  }
56566
56628
  };
56567
56629
  const handleAnnotationDelete = async (event) => {
@@ -56571,10 +56633,10 @@ function useAnnotationFlow(rUri) {
56571
56633
  const annotationIdSegment = uriToAnnotationIdOrPassthrough2(event.annotationId);
56572
56634
  const annotationUri2 = resourceAnnotationUri2(`${currentRUri}/annotations/${annotationIdSegment}`);
56573
56635
  await currentClient.deleteAnnotation(annotationUri2, { auth: toAccessToken3(tokenRef.current) });
56574
- eventBus.get("annotate:deleted").next({ annotationId: event.annotationId });
56636
+ eventBus.get("mark:deleted").next({ annotationId: event.annotationId });
56575
56637
  } catch (error) {
56576
56638
  console.error("Failed to delete annotation:", error);
56577
- eventBus.get("annotate:delete-failed").next({ error });
56639
+ eventBus.get("mark:delete-failed").next({ error });
56578
56640
  }
56579
56641
  };
56580
56642
  const handleAssistStart = async (event) => {
@@ -56627,7 +56689,7 @@ function useAnnotationFlow(rUri) {
56627
56689
  }
56628
56690
  } catch (error) {
56629
56691
  if (error instanceof Error && error.name === "AbortError") {
56630
- eventBus.get("annotate:assist-cancelled").next(void 0);
56692
+ eventBus.get("mark:assist-cancelled").next(void 0);
56631
56693
  } else {
56632
56694
  console.error("Annotation assist failed:", error);
56633
56695
  setAssistingMotivation(null);
@@ -56641,9 +56703,9 @@ function useAnnotationFlow(rUri) {
56641
56703
  assistStreamRef.current = null;
56642
56704
  }
56643
56705
  };
56644
- const subscription1 = eventBus.get("annotate:create").subscribe(handleAnnotationCreate);
56645
- const subscription2 = eventBus.get("annotate:delete").subscribe(handleAnnotationDelete);
56646
- const subscription3 = eventBus.get("annotate:assist-request").subscribe(handleAssistStart);
56706
+ const subscription1 = eventBus.get("mark:create").subscribe(handleAnnotationCreate);
56707
+ const subscription2 = eventBus.get("mark:delete").subscribe(handleAnnotationDelete);
56708
+ const subscription3 = eventBus.get("mark:assist-request").subscribe(handleAssistStart);
56647
56709
  const subscription4 = eventBus.get("job:cancel-requested").subscribe(handleJobCancelRequested);
56648
56710
  return () => {
56649
56711
  subscription1.unsubscribe();
@@ -56655,23 +56717,23 @@ function useAnnotationFlow(rUri) {
56655
56717
  }, [eventBus]);
56656
56718
  useEventSubscriptions({
56657
56719
  // Manual annotation
56658
- "annotate:requested": handleAnnotationRequested,
56659
- "annotate:select-comment": handleCommentRequested,
56660
- "annotate:select-tag": handleTagRequested,
56661
- "annotate:select-assessment": handleAssessmentRequested,
56662
- "annotate:select-reference": handleReferenceRequested,
56663
- "annotate:cancel-pending": handleAnnotationCancelPending,
56720
+ "mark:requested": handleAnnotationRequested,
56721
+ "mark:select-comment": handleCommentRequested,
56722
+ "mark:select-tag": handleTagRequested,
56723
+ "mark:select-assessment": handleAssessmentRequested,
56724
+ "mark:select-reference": handleReferenceRequested,
56725
+ "mark:cancel-pending": handleAnnotationCancelPending,
56664
56726
  // AI-assisted annotation state updates
56665
- "annotate:progress": handleAnnotationProgress,
56666
- "annotate:assist-finished": handleAnnotationComplete,
56667
- "annotate:assist-failed": handleAnnotationFailed,
56668
- "annotate:progress-dismiss": handleProgressDismiss,
56669
- "annotate:assist-cancelled": () => showInfo("Annotation cancelled"),
56727
+ "mark:progress": handleMarkProgress,
56728
+ "mark:assist-finished": handleAnnotationComplete,
56729
+ "mark:assist-failed": handleAnnotationFailed,
56730
+ "mark:progress-dismiss": handleProgressDismiss,
56731
+ "mark:assist-cancelled": () => showInfo("Annotation cancelled"),
56670
56732
  // CRUD error notifications
56671
- "annotate:create-failed": ({ error }) => showError(`Failed to create annotation: ${error.message}`),
56672
- "annotate:delete-failed": ({ error }) => showError(`Failed to delete annotation: ${error.message}`)
56733
+ "mark:create-failed": ({ error }) => showError(`Failed to create annotation: ${error.message}`),
56734
+ "mark:delete-failed": ({ error }) => showError(`Failed to delete annotation: ${error.message}`)
56673
56735
  });
56674
- useEffect45(() => {
56736
+ useEffect46(() => {
56675
56737
  return () => {
56676
56738
  if (progressDismissTimeoutRef.current) {
56677
56739
  clearTimeout(progressDismissTimeoutRef.current);
@@ -56686,73 +56748,13 @@ function useAnnotationFlow(rUri) {
56686
56748
  };
56687
56749
  }
56688
56750
 
56689
- // src/hooks/usePanelNavigation.ts
56690
- import { useState as useState42, useCallback as useCallback34, useEffect as useEffect46 } from "react";
56691
- var tabGenerationCounter = 0;
56692
- function usePanelNavigation() {
56693
- const [activePanel, setActivePanel] = useState42(() => {
56694
- if (typeof window !== "undefined") {
56695
- const saved = localStorage.getItem("activeToolbarPanel");
56696
- return saved || null;
56697
- }
56698
- return null;
56699
- });
56700
- const [scrollToAnnotationId, setScrollToAnnotationId] = useState42(null);
56701
- const [panelInitialTab, setPanelInitialTab] = useState42(null);
56702
- useEffect46(() => {
56703
- if (typeof window === "undefined") return;
56704
- if (activePanel) {
56705
- localStorage.setItem("activeToolbarPanel", activePanel);
56706
- } else {
56707
- localStorage.removeItem("activeToolbarPanel");
56708
- }
56709
- }, [activePanel]);
56710
- const handleScrollCompleted = useCallback34(() => {
56711
- setScrollToAnnotationId(null);
56712
- }, []);
56713
- const handlePanelToggle = useCallback34(({ panel }) => {
56714
- setActivePanel((current) => current === panel ? null : panel);
56715
- }, []);
56716
- const handlePanelOpen = useCallback34(({ panel, scrollToAnnotationId: scrollTarget, motivation }) => {
56717
- if (scrollTarget) {
56718
- setScrollToAnnotationId(scrollTarget);
56719
- }
56720
- if (motivation) {
56721
- const motivationToTab = {
56722
- "linking": "reference",
56723
- "commenting": "comment",
56724
- "tagging": "tag",
56725
- "highlighting": "highlight",
56726
- "assessing": "assessment"
56727
- };
56728
- const tab2 = motivationToTab[motivation] || "highlight";
56729
- setPanelInitialTab({ tab: tab2, generation: ++tabGenerationCounter });
56730
- }
56731
- setActivePanel(panel);
56732
- }, []);
56733
- const handlePanelClose = useCallback34(() => {
56734
- setActivePanel(null);
56735
- }, []);
56736
- useEventSubscriptions({
56737
- "attend:panel-toggle": handlePanelToggle,
56738
- "attend:panel-open": handlePanelOpen,
56739
- "attend:panel-close": handlePanelClose
56740
- });
56741
- return {
56742
- activePanel,
56743
- scrollToAnnotationId,
56744
- panelInitialTab,
56745
- onScrollCompleted: handleScrollCompleted
56746
- };
56747
- }
56748
-
56749
- // src/hooks/useGenerationFlow.ts
56751
+ // src/hooks/useYieldFlow.ts
56750
56752
  import { useState as useState43, useCallback as useCallback35, useEffect as useEffect47, useRef as useRef34 } from "react";
56751
56753
  import { annotationUri, accessToken as accessToken5 } from "@semiont/core";
56752
56754
  function toAccessToken4(token) {
56753
56755
  return token ? accessToken5(token) : void 0;
56754
56756
  }
56755
- function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56757
+ function useYieldFlow(locale, resourceId, clearNewAnnotationId) {
56756
56758
  const eventBus = useEventBus();
56757
56759
  const client = useApiClient();
56758
56760
  const token = useAuthToken();
@@ -56767,13 +56769,13 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56767
56769
  });
56768
56770
  const generationStreamRef = useRef34(null);
56769
56771
  const [isGenerating, setIsGenerating] = useState43(false);
56770
- const [generationProgress, setGenerationProgress] = useState43(null);
56772
+ const [generationProgress, setYieldProgress] = useState43(null);
56771
56773
  const handleProgressEvent = useCallback35((chunk) => {
56772
- setGenerationProgress(chunk);
56774
+ setYieldProgress(chunk);
56773
56775
  setIsGenerating(true);
56774
56776
  }, []);
56775
56777
  const clearProgress = useCallback35(() => {
56776
- setGenerationProgress(null);
56778
+ setYieldProgress(null);
56777
56779
  }, []);
56778
56780
  const [generationModalOpen, setGenerationModalOpen] = useState43(false);
56779
56781
  const [generationReferenceId, setGenerationReferenceId] = useState43(null);
@@ -56787,7 +56789,7 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56787
56789
  }
56788
56790
  clearNewAnnotationId(annotationUri(referenceId));
56789
56791
  const resourceUriStr = `resource://${resourceId}`;
56790
- eventBus.get("generate:request").next({
56792
+ eventBus.get("yield:request").next({
56791
56793
  annotationUri: referenceId,
56792
56794
  resourceUri: resourceUriStr,
56793
56795
  options: {
@@ -56806,10 +56808,10 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56806
56808
  setGenerationReferenceId(annUri);
56807
56809
  setGenerationDefaultTitle(defaultTitle);
56808
56810
  setGenerationModalOpen(true);
56809
- eventBus.get("correlate:requested").next({ annotationUri: annUri, resourceUri: resourceUri2 });
56811
+ eventBus.get("gather:requested").next({ annotationUri: annUri, resourceUri: resourceUri2 });
56810
56812
  }, []);
56811
56813
  const handleGenerationComplete = useCallback35((progress) => {
56812
- setGenerationProgress(progress);
56814
+ setYieldProgress(progress);
56813
56815
  setIsGenerating(false);
56814
56816
  if (progress.resourceName) {
56815
56817
  showSuccess(`Resource "${progress.resourceName}" created successfully!`);
@@ -56819,7 +56821,7 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56819
56821
  setTimeout(() => clearProgress(), 2e3);
56820
56822
  }, [showSuccess, clearProgress]);
56821
56823
  const handleGenerationFailed = useCallback35(({ error }) => {
56822
- setGenerationProgress(null);
56824
+ setYieldProgress(null);
56823
56825
  setIsGenerating(false);
56824
56826
  showError(`Resource generation failed: ${error.message}`);
56825
56827
  }, [showError]);
@@ -56829,7 +56831,7 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56829
56831
  generationStreamRef.current?.abort();
56830
56832
  generationStreamRef.current = new AbortController();
56831
56833
  const sseOptions = { auth: toAccessToken4(tokenRef.current), eventBus };
56832
- clientRef.current.sse.generateResourceFromAnnotation(
56834
+ clientRef.current.sse.yieldResourceFromAnnotation(
56833
56835
  event.resourceUri,
56834
56836
  event.annotationUri,
56835
56837
  event.options,
@@ -56837,8 +56839,8 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56837
56839
  );
56838
56840
  } catch (error) {
56839
56841
  if (error.name !== "AbortError") {
56840
- console.error("[useGenerationFlow] Generation failed:", error);
56841
- eventBus.get("generate:failed").next({ error });
56842
+ console.error("[useYieldFlow] Generation failed:", error);
56843
+ eventBus.get("yield:failed").next({ error });
56842
56844
  }
56843
56845
  }
56844
56846
  };
@@ -56858,9 +56860,9 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56858
56860
  });
56859
56861
  window.location.href = `${baseUrl}/know/compose?${params.toString()}`;
56860
56862
  };
56861
- const subscription1 = eventBus.get("generate:request").subscribe(handleGenerationStart);
56863
+ const subscription1 = eventBus.get("yield:request").subscribe(handleGenerationStart);
56862
56864
  const subscription2 = eventBus.get("job:cancel-requested").subscribe(handleJobCancelRequested);
56863
- const subscription3 = eventBus.get("resolve:create-manual").subscribe(handleReferenceCreateManual);
56865
+ const subscription3 = eventBus.get("bind:create-manual").subscribe(handleReferenceCreateManual);
56864
56866
  return () => {
56865
56867
  subscription1.unsubscribe();
56866
56868
  subscription2.unsubscribe();
@@ -56869,10 +56871,10 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56869
56871
  };
56870
56872
  }, [eventBus, resourceId]);
56871
56873
  useEventSubscriptions({
56872
- "generate:progress": handleProgressEvent,
56873
- "generate:finished": handleGenerationComplete,
56874
- "generate:failed": handleGenerationFailed,
56875
- "generate:modal-open": handleGenerationModalOpen
56874
+ "yield:progress": handleProgressEvent,
56875
+ "yield:finished": handleGenerationComplete,
56876
+ "yield:failed": handleGenerationFailed,
56877
+ "yield:modal-open": handleGenerationModalOpen
56876
56878
  });
56877
56879
  return {
56878
56880
  isGenerating,
@@ -56885,18 +56887,18 @@ function useGenerationFlow(locale, resourceId, clearNewAnnotationId) {
56885
56887
  };
56886
56888
  }
56887
56889
 
56888
- // src/hooks/useContextCorrelationFlow.ts
56890
+ // src/hooks/useContextGatherFlow.ts
56889
56891
  import { useState as useState44, useEffect as useEffect48, useRef as useRef35 } from "react";
56890
56892
  import { accessToken as accessToken6 } from "@semiont/core";
56891
56893
  function toAccessToken5(token) {
56892
56894
  return token ? accessToken6(token) : void 0;
56893
56895
  }
56894
- function useContextCorrelationFlow(eventBus, config) {
56896
+ function useContextGatherFlow(eventBus, config) {
56895
56897
  const token = useAuthToken();
56896
- const [correlationContext, setCorrelationContext] = useState44(null);
56897
- const [correlationLoading, setCorrelationLoading] = useState44(false);
56898
- const [correlationError, setCorrelationError] = useState44(null);
56899
- const [correlationAnnotationUri, setCorrelationAnnotationUri] = useState44(null);
56898
+ const [gatherContext, setCorrelationContext] = useState44(null);
56899
+ const [gatherLoading, setCorrelationLoading] = useState44(false);
56900
+ const [gatherError, setCorrelationError] = useState44(null);
56901
+ const [gatherAnnotationUri, setCorrelationAnnotationUri] = useState44(null);
56900
56902
  const configRef = useRef35(config);
56901
56903
  const tokenRef = useRef35(token);
56902
56904
  useEffect48(() => {
@@ -56906,7 +56908,7 @@ function useContextCorrelationFlow(eventBus, config) {
56906
56908
  tokenRef.current = token;
56907
56909
  });
56908
56910
  useEffect48(() => {
56909
- const handleContextCorrelationRequested = async (event) => {
56911
+ const handleGatherRequested = async (event) => {
56910
56912
  setCorrelationLoading(true);
56911
56913
  setCorrelationError(null);
56912
56914
  setCorrelationContext(null);
@@ -56923,7 +56925,7 @@ function useContextCorrelationFlow(eventBus, config) {
56923
56925
  setCorrelationContext(context);
56924
56926
  setCorrelationLoading(false);
56925
56927
  if (context) {
56926
- eventBus.get("correlate:complete").next({
56928
+ eventBus.get("gather:complete").next({
56927
56929
  annotationUri: event.annotationUri,
56928
56930
  context
56929
56931
  });
@@ -56932,16 +56934,16 @@ function useContextCorrelationFlow(eventBus, config) {
56932
56934
  const err = error;
56933
56935
  setCorrelationError(err);
56934
56936
  setCorrelationLoading(false);
56935
- eventBus.get("correlate:failed").next({
56937
+ eventBus.get("gather:failed").next({
56936
56938
  annotationUri: event.annotationUri,
56937
56939
  error: err
56938
56940
  });
56939
56941
  }
56940
56942
  };
56941
- const subscription = eventBus.get("correlate:requested").subscribe(handleContextCorrelationRequested);
56943
+ const subscription = eventBus.get("gather:requested").subscribe(handleGatherRequested);
56942
56944
  return () => subscription.unsubscribe();
56943
56945
  }, [eventBus]);
56944
- return { correlationContext, correlationLoading, correlationError, correlationAnnotationUri };
56946
+ return { gatherContext, gatherLoading, gatherError, gatherAnnotationUri };
56945
56947
  }
56946
56948
 
56947
56949
  // src/features/resource-viewer/components/ResourceViewerPage.tsx
@@ -56978,10 +56980,10 @@ function ResourceViewerPage({
56978
56980
  const referencedBy = referencedByData?.referencedBy || [];
56979
56981
  const { data: entityTypesData } = entityTypesAPI.list.useQuery();
56980
56982
  const allEntityTypes = entityTypesData?.entityTypes || [];
56981
- const { hoveredAnnotationId } = useAttentionFlow();
56982
- const { assistingMotivation, progress, pendingAnnotation } = useAnnotationFlow(rUri);
56983
- const { activePanel, scrollToAnnotationId, panelInitialTab, onScrollCompleted } = usePanelNavigation();
56984
- const { searchModalOpen, pendingReferenceId, onCloseSearchModal } = useResolutionFlow(rUri);
56983
+ const { hoveredAnnotationId } = useBeckonFlow();
56984
+ const { assistingMotivation, progress, pendingAnnotation } = useMarkFlow(rUri);
56985
+ const { activePanel, scrollToAnnotationId, panelInitialTab, onScrollCompleted } = usePanelBrowse();
56986
+ const { searchModalOpen, pendingReferenceId, onCloseSearchModal } = useBindFlow(rUri);
56985
56987
  const {
56986
56988
  generationProgress,
56987
56989
  generationModalOpen,
@@ -56989,8 +56991,8 @@ function ResourceViewerPage({
56989
56991
  generationDefaultTitle,
56990
56992
  onGenerateDocument,
56991
56993
  onCloseGenerationModal
56992
- } = useGenerationFlow(locale, rUri.split("/").pop() || "", clearNewAnnotationId);
56993
- const { correlationContext, correlationLoading, correlationError } = useContextCorrelationFlow(eventBus, { client, resourceUri: rUri });
56994
+ } = useYieldFlow(locale, rUri.split("/").pop() || "", clearNewAnnotationId);
56995
+ const { gatherContext, gatherLoading, gatherError } = useContextGatherFlow(eventBus, { client, resourceUri: rUri });
56994
56996
  const debouncedInvalidateAnnotations = useDebouncedCallback(
56995
56997
  () => {
56996
56998
  queryClient.invalidateQueries({ queryKey: QUERY_KEYS.resources.annotations(rUri) });
@@ -57102,7 +57104,7 @@ function ResourceViewerPage({
57102
57104
  try {
57103
57105
  const result = await generateCloneTokenMutation.mutateAsync(rUri);
57104
57106
  const token = result.token;
57105
- eventBus.get("navigation:router-push").next({ path: `/know/compose?mode=clone&token=${token}`, reason: "clone" });
57107
+ eventBus.get("browse:router-push").next({ path: `/know/compose?mode=clone&token=${token}`, reason: "clone" });
57106
57108
  } catch (err) {
57107
57109
  console.error("Failed to generate clone token:", err);
57108
57110
  showError("Failed to generate clone link");
@@ -57136,34 +57138,34 @@ function ResourceViewerPage({
57136
57138
  const handleReferenceNavigate = useCallback36(({ documentId }) => {
57137
57139
  if (routes.resource) {
57138
57140
  const path2 = routes.resource.replace("[resourceId]", encodeURIComponent(documentId));
57139
- eventBus.get("navigation:router-push").next({ path: path2, reason: "reference-link" });
57141
+ eventBus.get("browse:router-push").next({ path: path2, reason: "reference-link" });
57140
57142
  }
57141
57143
  }, [routes.resource]);
57142
57144
  const handleEntityTypeClicked = useCallback36(({ entityType: entityType3 }) => {
57143
57145
  if (routes.know) {
57144
57146
  const path2 = `${routes.know}?entityType=${encodeURIComponent(entityType3)}`;
57145
- eventBus.get("navigation:router-push").next({ path: path2, reason: "entity-type-filter" });
57147
+ eventBus.get("browse:router-push").next({ path: path2, reason: "entity-type-filter" });
57146
57148
  }
57147
57149
  }, [routes.know]);
57148
57150
  useEventSubscriptions({
57149
- "resource:archive": handleResourceArchive,
57150
- "resource:unarchive": handleResourceUnarchive,
57151
- "generate:clone": handleResourceClone,
57152
- "attend:sparkle": handleAnnotationSparkle,
57153
- "annotate:added": handleAnnotationAdded,
57154
- "annotate:removed": debouncedInvalidateAnnotations,
57155
- "annotate:create-failed": handleAnnotationCreateFailed,
57156
- "annotate:delete-failed": handleAnnotationDeleteFailed,
57157
- "annotate:body-updated": handleAnnotateBodyUpdated,
57158
- "resolve:body-update-failed": handleAnnotateBodyUpdateFailed,
57151
+ "mark:archive": handleResourceArchive,
57152
+ "mark:unarchive": handleResourceUnarchive,
57153
+ "yield:clone": handleResourceClone,
57154
+ "beckon:sparkle": handleAnnotationSparkle,
57155
+ "mark:added": handleAnnotationAdded,
57156
+ "mark:removed": debouncedInvalidateAnnotations,
57157
+ "mark:create-failed": handleAnnotationCreateFailed,
57158
+ "mark:delete-failed": handleAnnotationDeleteFailed,
57159
+ "mark:body-updated": handleAnnotateBodyUpdated,
57160
+ "bind:body-update-failed": handleAnnotateBodyUpdateFailed,
57159
57161
  "settings:theme-changed": handleSettingsThemeChanged,
57160
57162
  "settings:line-numbers-toggled": toggleLineNumbers,
57161
- "annotate:assist-finished": handleDetectionComplete,
57162
- "annotate:assist-failed": handleDetectionFailed,
57163
- "generate:finished": handleGenerationComplete,
57164
- "generate:failed": handleGenerationFailed,
57165
- "navigation:reference-navigate": handleReferenceNavigate,
57166
- "navigation:entity-type-clicked": handleEntityTypeClicked
57163
+ "mark:assist-finished": handleDetectionComplete,
57164
+ "mark:assist-failed": handleDetectionFailed,
57165
+ "yield:finished": handleGenerationComplete,
57166
+ "yield:failed": handleGenerationFailed,
57167
+ "browse:reference-navigate": handleReferenceNavigate,
57168
+ "browse:entity-type-clicked": handleEntityTypeClicked
57167
57169
  });
57168
57170
  const {
57169
57171
  announceResourceLoading,
@@ -57208,7 +57210,7 @@ function ResourceViewerPage({
57208
57210
  const resourceWithContent = { ...resource, content: content4 };
57209
57211
  const handleEventHover = useCallback36((annotationId) => {
57210
57212
  if (annotationId) {
57211
- eventBus.get("attend:sparkle").next({ annotationId });
57213
+ eventBus.get("beckon:sparkle").next({ annotationId });
57212
57214
  }
57213
57215
  }, []);
57214
57216
  const handleEventClick = useCallback36((_annotationId) => {
@@ -57335,7 +57337,7 @@ function ResourceViewerPage({
57335
57337
  }
57336
57338
  const resourceIdSegment = rUri.split("/").pop() || "";
57337
57339
  const nestedUri = `${window.location.origin}/resources/${resourceIdSegment}/annotations/${annotationIdShort}`;
57338
- eventBus.get("resolve:update-body").next({
57340
+ eventBus.get("bind:update-body").next({
57339
57341
  annotationUri: resourceAnnotationUri3(nestedUri),
57340
57342
  resourceId: resourceIdSegment,
57341
57343
  operations: [{
@@ -57368,9 +57370,9 @@ function ResourceViewerPage({
57368
57370
  }
57369
57371
  },
57370
57372
  defaultTitle: generationDefaultTitle,
57371
- context: correlationContext,
57372
- contextLoading: correlationLoading,
57373
- contextError: correlationError
57373
+ context: gatherContext,
57374
+ contextLoading: gatherLoading,
57375
+ contextError: gatherError
57374
57376
  }
57375
57377
  )
57376
57378
  ] });
@@ -57398,6 +57400,7 @@ export {
57398
57400
  BrowseView,
57399
57401
  Button,
57400
57402
  ButtonGroup,
57403
+ COMMON_PANELS,
57401
57404
  CacheProvider,
57402
57405
  CodeMirrorRenderer,
57403
57406
  CollaborationPanel,
@@ -57431,6 +57434,7 @@ export {
57431
57434
  PopupHeader,
57432
57435
  ProposeEntitiesModal,
57433
57436
  QUERY_KEYS,
57437
+ RESOURCE_PANELS,
57434
57438
  RecentDocumentsPage,
57435
57439
  ReferenceEntry,
57436
57440
  ReferenceResolutionWidget,
@@ -57513,15 +57517,15 @@ export {
57513
57517
  toOverlayAnnotations,
57514
57518
  tokens,
57515
57519
  useAdmin,
57516
- useAnnotationFlow,
57517
57520
  useAnnotationManager,
57518
57521
  useAnnotations,
57519
57522
  useApiClient,
57520
- useAttentionFlow,
57521
57523
  useAuthApi,
57522
57524
  useAuthToken,
57525
+ useBeckonFlow,
57526
+ useBindFlow,
57523
57527
  useCacheManager,
57524
- useContextCorrelationFlow,
57528
+ useContextGatherFlow,
57525
57529
  useDebounce,
57526
57530
  useDebouncedCallback,
57527
57531
  useDocumentAnnouncements,
@@ -57532,7 +57536,6 @@ export {
57532
57536
  useEventSubscription,
57533
57537
  useEventSubscriptions,
57534
57538
  useFormAnnouncements,
57535
- useGenerationFlow,
57536
57539
  useHealth,
57537
57540
  useHoverDelay,
57538
57541
  useHoverEmitter,
@@ -57543,13 +57546,13 @@ export {
57543
57546
  useLiveRegion,
57544
57547
  useLoadingState,
57545
57548
  useLocalStorage,
57549
+ useMarkFlow,
57546
57550
  useObservableExternalNavigation,
57547
57551
  useObservableRouter,
57548
57552
  useOpenResources,
57549
- usePanelNavigation,
57553
+ usePanelBrowse,
57550
57554
  usePanelWidth,
57551
57555
  usePreloadTranslations,
57552
- useResolutionFlow,
57553
57556
  useResourceAnnotations,
57554
57557
  useResourceContent,
57555
57558
  useResourceEvents,
@@ -57561,6 +57564,7 @@ export {
57561
57564
  useSessionExpiry,
57562
57565
  useTheme,
57563
57566
  useToast,
57564
- useTranslations
57567
+ useTranslations,
57568
+ useYieldFlow
57565
57569
  };
57566
57570
  //# sourceMappingURL=index.mjs.map