@semiont/react-ui 0.5.23 → 0.5.24

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 (48) hide show
  1. package/dist/{chunk-RO5CRVIA.js → chunk-4QMTEPQ3.js} +62 -30
  2. package/dist/chunk-4QMTEPQ3.js.map +1 -0
  3. package/dist/index.d.ts +18 -30
  4. package/dist/index.js +371 -409
  5. package/dist/index.js.map +1 -1
  6. package/dist/test-utils.js +3 -2
  7. package/dist/test-utils.js.map +1 -1
  8. package/package.json +4 -4
  9. package/src/components/annotation-popups/JsonLdView.tsx +1 -1
  10. package/src/components/annotation-popups/__tests__/JsonLdView.test.tsx +8 -2
  11. package/src/components/modals/ReferenceWizardModal.tsx +2 -1
  12. package/src/components/resource/panels/JsonLdPanel.tsx +1 -1
  13. package/src/components/resource/panels/__tests__/JsonLdPanel.test.tsx +8 -2
  14. package/src/components/settings/SettingsPanel.tsx +6 -2
  15. package/src/components/settings/__tests__/SettingsPanel.test.tsx +28 -3
  16. package/src/features/admin-devops/__tests__/AdminDevOpsPage.test.tsx +3 -11
  17. package/src/features/admin-devops/components/AdminDevOpsPage.tsx +0 -3
  18. package/src/features/admin-exchange/__tests__/AdminExchangePage.test.tsx +0 -1
  19. package/src/features/admin-exchange/components/AdminExchangePage.tsx +0 -3
  20. package/src/features/admin-exchange/state/__tests__/exchange-state-unit.test.ts +1 -1
  21. package/src/features/admin-security/__tests__/AdminSecurityPage.test.tsx +0 -8
  22. package/src/features/admin-security/components/AdminSecurityPage.tsx +0 -3
  23. package/src/features/admin-security/state/__tests__/admin-security-state-unit.test.ts +1 -1
  24. package/src/features/admin-users/__tests__/AdminUsersPage.test.tsx +0 -1
  25. package/src/features/admin-users/components/AdminUsersPage.tsx +0 -3
  26. package/src/features/admin-users/state/__tests__/admin-users-state-unit.test.ts +1 -1
  27. package/src/features/auth-welcome/state/__tests__/welcome-state-unit.test.ts +1 -1
  28. package/src/features/moderate-entity-tags/__tests__/EntityTagsPage.test.tsx +0 -2
  29. package/src/features/moderate-entity-tags/components/EntityTagsPage.tsx +0 -3
  30. package/src/features/moderate-entity-tags/state/__tests__/entity-tags-state-unit.test.ts +1 -1
  31. package/src/features/moderate-recent/__tests__/RecentDocumentsPage.test.tsx +3 -5
  32. package/src/features/moderate-recent/components/RecentDocumentsPage.tsx +0 -3
  33. package/src/features/moderate-tag-schemas/__tests__/TagSchemasPage.test.tsx +3 -5
  34. package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +0 -3
  35. package/src/features/moderation-linked-data/__tests__/LinkedDataPage.test.tsx +0 -1
  36. package/src/features/moderation-linked-data/components/LinkedDataPage.tsx +0 -3
  37. package/src/features/resource-compose/__tests__/ResourceComposePage.test.tsx +17 -7
  38. package/src/features/resource-compose/components/ResourceComposePage.tsx +5 -3
  39. package/src/features/resource-compose/state/__tests__/compose-page-state-unit.test.ts +1 -1
  40. package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +0 -1
  41. package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +0 -3
  42. package/src/features/resource-discovery/state/__tests__/discover-state-unit.test.ts +1 -1
  43. package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +8 -5
  44. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +3 -10
  45. package/src/features/resource-viewer/state/__tests__/resource-loader-state-unit.test.ts +1 -1
  46. package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts +1 -1
  47. package/src/features/resource-viewer/state/resource-viewer-page-state-unit.ts +2 -2
  48. package/dist/chunk-RO5CRVIA.js.map +0 -1
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  } from "./chunk-VXASXU4K.js";
6
6
  import {
7
7
  AVAILABLE_LOCALES,
8
+ LineNumbersProvider,
8
9
  SemiontProvider,
9
10
  ToastContainer,
10
11
  ToastProvider,
@@ -124,11 +125,12 @@ import {
124
125
  require_zip,
125
126
  require_zipAll,
126
127
  require_zipWith,
128
+ useLineNumbers,
127
129
  usePreloadTranslations,
128
130
  useSemiont,
129
131
  useToast,
130
132
  useTranslations
131
- } from "./chunk-RO5CRVIA.js";
133
+ } from "./chunk-4QMTEPQ3.js";
132
134
  import {
133
135
  clsx
134
136
  } from "./chunk-XUDKYAVC.js";
@@ -17773,36 +17775,17 @@ function useIsTyping() {
17773
17775
  return isTypingRef.current;
17774
17776
  }
17775
17777
 
17776
- // src/hooks/useLineNumbers.ts
17777
- import { useState as useState4, useCallback as useCallback3 } from "react";
17778
- function useLineNumbers() {
17779
- const [showLineNumbers, setShowLineNumbers] = useState4(() => {
17780
- if (typeof window !== "undefined") {
17781
- return localStorage.getItem("showLineNumbers") === "true";
17782
- }
17783
- return false;
17784
- });
17785
- const toggleLineNumbers = useCallback3(() => {
17786
- const newMode = !showLineNumbers;
17787
- setShowLineNumbers(newMode);
17788
- if (typeof window !== "undefined") {
17789
- localStorage.setItem("showLineNumbers", newMode.toString());
17790
- }
17791
- }, [showLineNumbers]);
17792
- return { showLineNumbers, toggleLineNumbers };
17793
- }
17794
-
17795
17778
  // src/hooks/useHoverDelay.ts
17796
- import { useState as useState5, useCallback as useCallback5 } from "react";
17779
+ import { useState as useState4, useCallback as useCallback4 } from "react";
17797
17780
 
17798
17781
  // src/hooks/useHoverEmitter.ts
17799
- import { useRef as useRef4, useCallback as useCallback4, useEffect as useEffect5 } from "react";
17782
+ import { useRef as useRef4, useCallback as useCallback3, useEffect as useEffect5 } from "react";
17800
17783
  import { HOVER_DELAY_MS } from "@semiont/sdk";
17801
17784
  import { HOVER_DELAY_MS as HOVER_DELAY_MS2 } from "@semiont/sdk";
17802
17785
  function useHoverEmitter(session, annotationId2, hoverDelayMs = HOVER_DELAY_MS) {
17803
17786
  const currentHoverRef = useRef4(null);
17804
17787
  const timerRef = useRef4(null);
17805
- const onMouseEnter = useCallback4(() => {
17788
+ const onMouseEnter = useCallback3(() => {
17806
17789
  if (currentHoverRef.current === annotationId2) return;
17807
17790
  if (timerRef.current !== null) {
17808
17791
  clearTimeout(timerRef.current);
@@ -17813,7 +17796,7 @@ function useHoverEmitter(session, annotationId2, hoverDelayMs = HOVER_DELAY_MS)
17813
17796
  session?.client.beckon.hover(annotationId2);
17814
17797
  }, hoverDelayMs);
17815
17798
  }, [annotationId2, hoverDelayMs, session]);
17816
- const onMouseLeave = useCallback4(() => {
17799
+ const onMouseLeave = useCallback3(() => {
17817
17800
  if (timerRef.current !== null) {
17818
17801
  clearTimeout(timerRef.current);
17819
17802
  timerRef.current = null;
@@ -17836,14 +17819,14 @@ function useHoverEmitter(session, annotationId2, hoverDelayMs = HOVER_DELAY_MS)
17836
17819
 
17837
17820
  // src/hooks/useHoverDelay.ts
17838
17821
  function useHoverDelay() {
17839
- const [hoverDelayMs, setHoverDelayMsState] = useState5(() => {
17822
+ const [hoverDelayMs, setHoverDelayMsState] = useState4(() => {
17840
17823
  if (typeof window !== "undefined") {
17841
17824
  const stored = localStorage.getItem("hoverDelayMs");
17842
17825
  return stored ? Number(stored) : HOVER_DELAY_MS2;
17843
17826
  }
17844
17827
  return HOVER_DELAY_MS2;
17845
17828
  });
17846
- const setHoverDelayMs = useCallback5((delayMs) => {
17829
+ const setHoverDelayMs = useCallback4((delayMs) => {
17847
17830
  setHoverDelayMsState(delayMs);
17848
17831
  if (typeof window !== "undefined") {
17849
17832
  localStorage.setItem("hoverDelayMs", delayMs.toString());
@@ -17853,17 +17836,17 @@ function useHoverDelay() {
17853
17836
  }
17854
17837
 
17855
17838
  // src/hooks/useObservableBrowse.tsx
17856
- import { useCallback as useCallback6 } from "react";
17839
+ import { useCallback as useCallback5 } from "react";
17857
17840
  function useObservableRouter(baseRouter) {
17858
17841
  const semiont = useSemiont();
17859
- const push = useCallback6((path, options) => {
17842
+ const push = useCallback5((path, options) => {
17860
17843
  semiont.emit("nav:push", {
17861
17844
  path,
17862
17845
  reason: options?.reason
17863
17846
  });
17864
17847
  baseRouter.push(path);
17865
17848
  }, [semiont, baseRouter]);
17866
- const replace2 = useCallback6((path, options) => {
17849
+ const replace2 = useCallback5((path, options) => {
17867
17850
  if (!baseRouter.replace) return;
17868
17851
  semiont.emit("nav:push", {
17869
17852
  path,
@@ -17879,7 +17862,7 @@ function useObservableRouter(baseRouter) {
17879
17862
  }
17880
17863
  function useObservableExternalNavigation() {
17881
17864
  const semiont = useSemiont();
17882
- return useCallback6((url, metadata) => {
17865
+ return useCallback5((url, metadata) => {
17883
17866
  const fallbackTimer = setTimeout(() => {
17884
17867
  console.warn(
17885
17868
  "[Observable Navigation] No handler cancelled nav:external fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing."
@@ -17895,7 +17878,7 @@ function useObservableExternalNavigation() {
17895
17878
  }
17896
17879
 
17897
17880
  // src/hooks/usePanelWidth.ts
17898
- import { useState as useState6, useEffect as useEffect6, useRef as useRef5 } from "react";
17881
+ import { useState as useState5, useEffect as useEffect6, useRef as useRef5 } from "react";
17899
17882
  function usePanelWidth({
17900
17883
  defaultWidth = 384,
17901
17884
  // 24rem
@@ -17905,7 +17888,7 @@ function usePanelWidth({
17905
17888
  // 50rem
17906
17889
  storageKey = "semiont-panel-width"
17907
17890
  } = {}) {
17908
- const [width, setWidthInternal] = useState6(defaultWidth);
17891
+ const [width, setWidthInternal] = useState5(defaultWidth);
17909
17892
  const userChangedRef = useRef5(false);
17910
17893
  useEffect6(() => {
17911
17894
  if (typeof window === "undefined") return;
@@ -17929,12 +17912,12 @@ function usePanelWidth({
17929
17912
  }
17930
17913
 
17931
17914
  // src/hooks/useRovingTabIndex.ts
17932
- import { useRef as useRef6, useEffect as useEffect7, useCallback as useCallback7 } from "react";
17915
+ import { useRef as useRef6, useEffect as useEffect7, useCallback as useCallback6 } from "react";
17933
17916
  function useRovingTabIndex(itemCount, options = {}) {
17934
17917
  const { orientation = "horizontal", loop = true, cols = 1 } = options;
17935
17918
  const containerRef = useRef6(null);
17936
17919
  const currentIndexRef = useRef6(0);
17937
- const getFocusableItems = useCallback7(() => {
17920
+ const getFocusableItems = useCallback6(() => {
17938
17921
  if (!containerRef.current) return [];
17939
17922
  return Array.from(
17940
17923
  containerRef.current.querySelectorAll(
@@ -17942,7 +17925,7 @@ function useRovingTabIndex(itemCount, options = {}) {
17942
17925
  )
17943
17926
  );
17944
17927
  }, []);
17945
- const focusItem = useCallback7((index) => {
17928
+ const focusItem = useCallback6((index) => {
17946
17929
  const items = getFocusableItems();
17947
17930
  if (items.length === 0) return;
17948
17931
  let targetIndex = index;
@@ -17957,7 +17940,7 @@ function useRovingTabIndex(itemCount, options = {}) {
17957
17940
  items[targetIndex]?.focus();
17958
17941
  currentIndexRef.current = targetIndex;
17959
17942
  }, [getFocusableItems, loop]);
17960
- const handleKeyDown = useCallback7(
17943
+ const handleKeyDown = useCallback6(
17961
17944
  (event) => {
17962
17945
  const items = getFocusableItems();
17963
17946
  if (items.length === 0) return;
@@ -18044,12 +18027,12 @@ function useRovingTabIndex(itemCount, options = {}) {
18044
18027
  }
18045
18028
 
18046
18029
  // src/hooks/useSessionExpiry.ts
18047
- import { useEffect as useEffect9, useState as useState8 } from "react";
18030
+ import { useEffect as useEffect9, useState as useState7 } from "react";
18048
18031
 
18049
18032
  // src/hooks/useObservable.ts
18050
- import { useState as useState7, useEffect as useEffect8 } from "react";
18033
+ import { useState as useState6, useEffect as useEffect8 } from "react";
18051
18034
  function useObservable(obs$) {
18052
- const [value, setValue] = useState7(() => {
18035
+ const [value, setValue] = useState6(() => {
18053
18036
  if (!obs$) return void 0;
18054
18037
  const getValue = obs$.getValue;
18055
18038
  return typeof getValue === "function" ? getValue.call(obs$) : void 0;
@@ -18075,8 +18058,8 @@ function useSessionExpiry() {
18075
18058
  const session = useObservable(useSemiont().activeSession$);
18076
18059
  useObservable(session?.token$);
18077
18060
  const expiresAt = session?.expiresAt ?? null;
18078
- const [timeRemaining, setTimeRemaining] = useState8(null);
18079
- const [isExpiringSoon, setIsExpiringSoon] = useState8(false);
18061
+ const [timeRemaining, setTimeRemaining] = useState7(null);
18062
+ const [isExpiringSoon, setIsExpiringSoon] = useState7(false);
18080
18063
  useEffect9(() => {
18081
18064
  if (!expiresAt) {
18082
18065
  setTimeRemaining(null);
@@ -18096,17 +18079,17 @@ function useSessionExpiry() {
18096
18079
  }
18097
18080
 
18098
18081
  // src/contexts/ThemeContext.tsx
18099
- import { createContext, useContext, useEffect as useEffect10, useState as useState9 } from "react";
18082
+ import { createContext, useContext, useEffect as useEffect10, useState as useState8 } from "react";
18100
18083
  import { jsx } from "react/jsx-runtime";
18101
18084
  var ThemeContext = createContext(null);
18102
18085
  function ThemeProvider({ children }) {
18103
- const [theme2, setThemeState] = useState9(() => {
18086
+ const [theme2, setThemeState] = useState8(() => {
18104
18087
  if (typeof window !== "undefined") {
18105
18088
  return localStorage.getItem("theme") || "system";
18106
18089
  }
18107
18090
  return "system";
18108
18091
  });
18109
- const [systemTheme, setSystemTheme] = useState9(() => {
18092
+ const [systemTheme, setSystemTheme] = useState8(() => {
18110
18093
  if (typeof window !== "undefined") {
18111
18094
  return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
18112
18095
  }
@@ -18142,17 +18125,17 @@ function useTheme() {
18142
18125
  }
18143
18126
 
18144
18127
  // src/hooks/useUI.ts
18145
- import { useState as useState10, useEffect as useEffect11, useCallback as useCallback8, useRef as useRef7 } from "react";
18128
+ import { useState as useState9, useEffect as useEffect11, useCallback as useCallback7, useRef as useRef7 } from "react";
18146
18129
  function useDropdown() {
18147
- const [isOpen, setIsOpen] = useState10(false);
18130
+ const [isOpen, setIsOpen] = useState9(false);
18148
18131
  const dropdownRef = useRef7(null);
18149
- const toggle = useCallback8(() => {
18132
+ const toggle = useCallback7(() => {
18150
18133
  setIsOpen((prev) => !prev);
18151
18134
  }, []);
18152
- const open = useCallback8(() => {
18135
+ const open = useCallback7(() => {
18153
18136
  setIsOpen(true);
18154
18137
  }, []);
18155
- const close = useCallback8(() => {
18138
+ const close = useCallback7(() => {
18156
18139
  setIsOpen(false);
18157
18140
  }, []);
18158
18141
  useEffect11(() => {
@@ -18188,14 +18171,14 @@ function useDropdown() {
18188
18171
  };
18189
18172
  }
18190
18173
  function useLoadingState(minLoadingTime = 500) {
18191
- const [isLoading, setIsLoading] = useState10(false);
18192
- const [showLoading, setShowLoading] = useState10(false);
18174
+ const [isLoading, setIsLoading] = useState9(false);
18175
+ const [showLoading, setShowLoading] = useState9(false);
18193
18176
  const timeoutRef = useRef7(null);
18194
- const startLoading = useCallback8(() => {
18177
+ const startLoading = useCallback7(() => {
18195
18178
  setIsLoading(true);
18196
18179
  setShowLoading(true);
18197
18180
  }, []);
18198
- const stopLoading = useCallback8(() => {
18181
+ const stopLoading = useCallback7(() => {
18199
18182
  setIsLoading(false);
18200
18183
  timeoutRef.current = setTimeout(() => {
18201
18184
  setShowLoading(false);
@@ -18216,7 +18199,7 @@ function useLoadingState(minLoadingTime = 500) {
18216
18199
  };
18217
18200
  }
18218
18201
  function useLocalStorage(key, initialValue) {
18219
- const [storedValue, setStoredValue] = useState10(() => {
18202
+ const [storedValue, setStoredValue] = useState9(() => {
18220
18203
  if (typeof window === "undefined") {
18221
18204
  return initialValue;
18222
18205
  }
@@ -18228,7 +18211,7 @@ function useLocalStorage(key, initialValue) {
18228
18211
  return initialValue;
18229
18212
  }
18230
18213
  });
18231
- const setValue = useCallback8((value) => {
18214
+ const setValue = useCallback7((value) => {
18232
18215
  try {
18233
18216
  const valueToStore = value instanceof Function ? value(storedValue) : value;
18234
18217
  setStoredValue(valueToStore);
@@ -18243,13 +18226,13 @@ function useLocalStorage(key, initialValue) {
18243
18226
  }
18244
18227
 
18245
18228
  // src/hooks/useResourceContent.ts
18246
- import { useEffect as useEffect12, useState as useState11 } from "react";
18229
+ import { useEffect as useEffect12, useState as useState10 } from "react";
18247
18230
  import { getPrimaryMediaType, decodeWithCharset } from "@semiont/core";
18248
18231
  function useResourceContent(client, rUri, resource, enabled = true) {
18249
18232
  const mediaType = enabled ? getPrimaryMediaType(resource) || "text/plain" : "";
18250
- const [content2, setContent] = useState11("");
18251
- const [loading, setLoading] = useState11(false);
18252
- const [error, setError] = useState11(null);
18233
+ const [content2, setContent] = useState10("");
18234
+ const [loading, setLoading] = useState10(false);
18235
+ const [error, setError] = useState10(null);
18253
18236
  useEffect12(() => {
18254
18237
  if (!client || !enabled || !mediaType) return;
18255
18238
  let cancelled = false;
@@ -18272,14 +18255,14 @@ function useResourceContent(client, rUri, resource, enabled = true) {
18272
18255
  }
18273
18256
 
18274
18257
  // src/hooks/useResourceGather.ts
18275
- import { useState as useState12, useCallback as useCallback9 } from "react";
18258
+ import { useState as useState11, useCallback as useCallback8 } from "react";
18276
18259
  import { resourceId as toResourceId } from "@semiont/core";
18277
18260
  function useResourceGather() {
18278
18261
  const client = useObservable(useSemiont().activeSession$)?.client;
18279
- const [context, setContext] = useState12(null);
18280
- const [loading, setLoading] = useState12(false);
18281
- const [error, setError] = useState12(null);
18282
- const gather = useCallback9(async (id2, options) => {
18262
+ const [context, setContext] = useState11(null);
18263
+ const [loading, setLoading] = useState11(false);
18264
+ const [error, setError] = useState11(null);
18265
+ const gather = useCallback8(async (id2, options) => {
18283
18266
  if (!client) return;
18284
18267
  setLoading(true);
18285
18268
  setError(null);
@@ -18292,7 +18275,7 @@ function useResourceGather() {
18292
18275
  setLoading(false);
18293
18276
  }
18294
18277
  }, [client]);
18295
- const reset = useCallback9(() => {
18278
+ const reset = useCallback8(() => {
18296
18279
  setContext(null);
18297
18280
  setError(null);
18298
18281
  setLoading(false);
@@ -18301,7 +18284,7 @@ function useResourceGather() {
18301
18284
  }
18302
18285
 
18303
18286
  // src/hooks/useResourceLoader.ts
18304
- import { useState as useState13, useEffect as useEffect13, useMemo } from "react";
18287
+ import { useState as useState12, useEffect as useEffect13, useMemo } from "react";
18305
18288
  import { readyValue } from "@semiont/sdk";
18306
18289
 
18307
18290
  // src/lib/annotation-groups.ts
@@ -18321,9 +18304,9 @@ function groupAnnotations(annotations) {
18321
18304
  // src/hooks/useResourceLoader.ts
18322
18305
  var EMPTY = { highlights: [], references: [], assessments: [], comments: [], tags: [] };
18323
18306
  function useResourceLoader(client, resourceId2) {
18324
- const [resource, setResource] = useState13(void 0);
18325
- const [rawAnnotations, setRawAnnotations] = useState13(void 0);
18326
- const [error, setError] = useState13(null);
18307
+ const [resource, setResource] = useState12(void 0);
18308
+ const [rawAnnotations, setRawAnnotations] = useState12(void 0);
18309
+ const [error, setError] = useState12(null);
18327
18310
  useEffect13(() => {
18328
18311
  if (!client) return;
18329
18312
  setResource(void 0);
@@ -18350,10 +18333,10 @@ function useResourceLoader(client, resourceId2) {
18350
18333
  }
18351
18334
 
18352
18335
  // src/hooks/useMediaToken.ts
18353
- import { useEffect as useEffect14, useState as useState14 } from "react";
18336
+ import { useEffect as useEffect14, useState as useState13 } from "react";
18354
18337
  function useMediaToken(client, id2) {
18355
- const [token, setToken] = useState14(void 0);
18356
- const [loading, setLoading] = useState14(true);
18338
+ const [token, setToken] = useState13(void 0);
18339
+ const [loading, setLoading] = useState13(true);
18357
18340
  useEffect14(() => {
18358
18341
  if (!client || !id2) {
18359
18342
  setLoading(false);
@@ -18413,22 +18396,22 @@ function useSessionEventSubscriptions(session, subscriptions) {
18413
18396
  }
18414
18397
 
18415
18398
  // src/hooks/useToolbarPrefs.ts
18416
- import { useCallback as useCallback10, useEffect as useEffect16, useState as useState15 } from "react";
18399
+ import { useCallback as useCallback9, useEffect as useEffect16, useState as useState14 } from "react";
18417
18400
  var MODE_KEY = "annotateMode";
18418
18401
  var CLICK_KEY = "semiont-toolbar-click";
18419
18402
  var SELECTION_KEY = "semiont-toolbar-selection";
18420
18403
  function useToolbarPrefs(selectorType = "text") {
18421
- const [annotateMode, setAnnotateModeState] = useState15(() => {
18404
+ const [annotateMode, setAnnotateModeState] = useState14(() => {
18422
18405
  if (typeof window !== "undefined") {
18423
18406
  return localStorage.getItem(MODE_KEY) === "true";
18424
18407
  }
18425
18408
  return false;
18426
18409
  });
18427
- const setAnnotateMode = useCallback10((mode) => {
18410
+ const setAnnotateMode = useCallback9((mode) => {
18428
18411
  setAnnotateModeState(mode);
18429
18412
  if (typeof window !== "undefined") localStorage.setItem(MODE_KEY, mode.toString());
18430
18413
  }, []);
18431
- const [clickAction, setClickActionState] = useState15(() => {
18414
+ const [clickAction, setClickActionState] = useState14(() => {
18432
18415
  if (typeof window !== "undefined") {
18433
18416
  const stored = localStorage.getItem(CLICK_KEY);
18434
18417
  if (stored && ["detail", "follow", "jsonld", "deleting"].includes(stored)) {
@@ -18437,11 +18420,11 @@ function useToolbarPrefs(selectorType = "text") {
18437
18420
  }
18438
18421
  return "detail";
18439
18422
  });
18440
- const setClickAction = useCallback10((action) => {
18423
+ const setClickAction = useCallback9((action) => {
18441
18424
  setClickActionState(action);
18442
18425
  if (typeof window !== "undefined") localStorage.setItem(CLICK_KEY, action);
18443
18426
  }, []);
18444
- const [selectionMotivation, setSelectionMotivationState] = useState15(() => {
18427
+ const [selectionMotivation, setSelectionMotivationState] = useState14(() => {
18445
18428
  if (typeof window !== "undefined") {
18446
18429
  const stored = localStorage.getItem(SELECTION_KEY);
18447
18430
  if (stored === "null") return null;
@@ -18451,15 +18434,15 @@ function useToolbarPrefs(selectorType = "text") {
18451
18434
  }
18452
18435
  return "linking";
18453
18436
  });
18454
- const setSelectionMotivation = useCallback10((motivation) => {
18437
+ const setSelectionMotivation = useCallback9((motivation) => {
18455
18438
  setSelectionMotivationState(motivation);
18456
18439
  if (typeof window !== "undefined") localStorage.setItem(SELECTION_KEY, motivation === null ? "null" : motivation);
18457
18440
  }, []);
18458
- const [shape, setShapeState] = useState15(() => getSelectedShapeForSelectorType(selectorType));
18441
+ const [shape, setShapeState] = useState14(() => getSelectedShapeForSelectorType(selectorType));
18459
18442
  useEffect16(() => {
18460
18443
  setShapeState(getSelectedShapeForSelectorType(selectorType));
18461
18444
  }, [selectorType]);
18462
- const setShape = useCallback10((s11) => {
18445
+ const setShape = useCallback9((s11) => {
18463
18446
  setShapeState(s11);
18464
18447
  saveSelectedShapeForSelectorType(selectorType, s11);
18465
18448
  }, [selectorType]);
@@ -18467,9 +18450,9 @@ function useToolbarPrefs(selectorType = "text") {
18467
18450
  }
18468
18451
 
18469
18452
  // src/hooks/usePendingCreation.ts
18470
- import { useState as useState16, useCallback as useCallback11 } from "react";
18453
+ import { useState as useState15, useCallback as useCallback10 } from "react";
18471
18454
  function usePendingCreation(session, resourceId2, enabled) {
18472
- const [pending, setPending] = useState16(null);
18455
+ const [pending, setPending] = useState15(null);
18473
18456
  useSessionEventSubscriptions(session, {
18474
18457
  "mark:requested": (event) => {
18475
18458
  if (!enabled) return;
@@ -18477,12 +18460,12 @@ function usePendingCreation(session, resourceId2, enabled) {
18477
18460
  setPending(event);
18478
18461
  }
18479
18462
  });
18480
- const clearPending = useCallback11(() => setPending(null), []);
18463
+ const clearPending = useCallback10(() => setPending(null), []);
18481
18464
  return { pending, clearPending };
18482
18465
  }
18483
18466
 
18484
18467
  // src/hooks/useKBDiscovery.ts
18485
- import { useEffect as useEffect17, useMemo as useMemo3, useState as useState17 } from "react";
18468
+ import { useEffect as useEffect17, useMemo as useMemo3, useState as useState16 } from "react";
18486
18469
  import { httpDiscovery, subscribeDiscovery } from "@semiont/sdk";
18487
18470
  function useKBDiscovery(options) {
18488
18471
  const enabled = options?.enabled ?? true;
@@ -18492,10 +18475,10 @@ function useKBDiscovery(options) {
18492
18475
  () => externalTransport ?? httpDiscovery(),
18493
18476
  [externalTransport]
18494
18477
  );
18495
- const [visible, setVisible] = useState17(
18478
+ const [visible, setVisible] = useState16(
18496
18479
  () => typeof document === "undefined" || !document.hidden
18497
18480
  );
18498
- const [state, setState] = useState17(null);
18481
+ const [state, setState] = useState16(null);
18499
18482
  useEffect17(() => {
18500
18483
  const onVisibilityChange = () => setVisible(!document.hidden);
18501
18484
  document.addEventListener("visibilitychange", onVisibilityChange);
@@ -18582,10 +18565,10 @@ function useEventSubscriptions(subscriptions) {
18582
18565
  }
18583
18566
 
18584
18567
  // src/contexts/ResourceAnnotationsContext.tsx
18585
- import { createContext as createContext4, useContext as useContext4, useState as useState19, useCallback as useCallback13, useMemo as useMemo5 } from "react";
18568
+ import { createContext as createContext4, useContext as useContext4, useState as useState18, useCallback as useCallback12, useMemo as useMemo5 } from "react";
18586
18569
 
18587
18570
  // src/components/LiveRegion.tsx
18588
- import { useState as useState18, createContext as createContext3, useContext as useContext3, useCallback as useCallback12 } from "react";
18571
+ import { useState as useState17, createContext as createContext3, useContext as useContext3, useCallback as useCallback11 } from "react";
18589
18572
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
18590
18573
  var LiveRegionContext = createContext3(null);
18591
18574
  function useLiveRegion() {
@@ -18597,9 +18580,9 @@ function useLiveRegion() {
18597
18580
  return context;
18598
18581
  }
18599
18582
  function LiveRegionProvider({ children }) {
18600
- const [politeMessage, setPoliteMessage] = useState18("");
18601
- const [assertiveMessage, setAssertiveMessage] = useState18("");
18602
- const announce = useCallback12((message, priority = "polite") => {
18583
+ const [politeMessage, setPoliteMessage] = useState17("");
18584
+ const [assertiveMessage, setAssertiveMessage] = useState17("");
18585
+ const announce = useCallback11((message, priority = "polite") => {
18603
18586
  if (priority === "assertive") {
18604
18587
  setAssertiveMessage(message);
18605
18588
  setTimeout(() => setAssertiveMessage(""), 1e3);
@@ -18634,14 +18617,14 @@ function LiveRegionProvider({ children }) {
18634
18617
  }
18635
18618
  function useSearchAnnouncements() {
18636
18619
  const { announce } = useLiveRegion();
18637
- const announceSearchResults = useCallback12((count2, query) => {
18620
+ const announceSearchResults = useCallback11((count2, query) => {
18638
18621
  if (count2 === 0) {
18639
18622
  announce(`No results found for ${query}`, "polite");
18640
18623
  } else {
18641
18624
  announce(`${count2} result${count2 === 1 ? "" : "s"} found for ${query}`, "polite");
18642
18625
  }
18643
18626
  }, [announce]);
18644
- const announceSearching = useCallback12(() => {
18627
+ const announceSearching = useCallback11(() => {
18645
18628
  announce("Searching...", "polite");
18646
18629
  }, [announce]);
18647
18630
  return {
@@ -18651,26 +18634,26 @@ function useSearchAnnouncements() {
18651
18634
  }
18652
18635
  function useDocumentAnnouncements(annotators) {
18653
18636
  const { announce } = useLiveRegion();
18654
- const announceDocumentSaved = useCallback12(() => {
18637
+ const announceDocumentSaved = useCallback11(() => {
18655
18638
  announce("Document saved successfully", "polite");
18656
18639
  }, [announce]);
18657
- const announceDocumentDeleted = useCallback12(() => {
18640
+ const announceDocumentDeleted = useCallback11(() => {
18658
18641
  announce("Document deleted", "polite");
18659
18642
  }, [announce]);
18660
- const announceAnnotationCreated = useCallback12((annotation) => {
18643
+ const announceAnnotationCreated = useCallback11((annotation) => {
18661
18644
  const metadata = annotators ? Object.values(annotators).find((a15) => a15.matchesAnnotation(annotation)) : null;
18662
18645
  const message = metadata?.announceOnCreate ?? "Annotation created";
18663
18646
  announce(message, "polite");
18664
18647
  }, [announce, annotators]);
18665
- const announceAnnotationDeleted = useCallback12(() => {
18648
+ const announceAnnotationDeleted = useCallback11(() => {
18666
18649
  announce("Annotation deleted", "polite");
18667
18650
  }, [announce]);
18668
- const announceAnnotationUpdated = useCallback12((annotation) => {
18651
+ const announceAnnotationUpdated = useCallback11((annotation) => {
18669
18652
  const metadata = annotators ? Object.values(annotators).find((a15) => a15.matchesAnnotation(annotation)) : null;
18670
18653
  const message = `${metadata?.displayName ?? "Annotation"} updated`;
18671
18654
  announce(message, "polite");
18672
18655
  }, [announce, annotators]);
18673
- const announceError = useCallback12((message) => {
18656
+ const announceError = useCallback11((message) => {
18674
18657
  announce(`Error: ${message}`, "assertive");
18675
18658
  }, [announce]);
18676
18659
  return {
@@ -18684,18 +18667,18 @@ function useDocumentAnnouncements(annotators) {
18684
18667
  }
18685
18668
  function useResourceLoadingAnnouncements() {
18686
18669
  const { announce } = useLiveRegion();
18687
- const announceResourceLoading = useCallback12((resourceName) => {
18670
+ const announceResourceLoading = useCallback11((resourceName) => {
18688
18671
  const message = resourceName ? `Loading ${resourceName}...` : "Loading resource...";
18689
18672
  announce(message, "polite");
18690
18673
  }, [announce]);
18691
- const announceResourceLoaded = useCallback12((resourceName) => {
18674
+ const announceResourceLoaded = useCallback11((resourceName) => {
18692
18675
  announce(`${resourceName} loaded successfully`, "polite");
18693
18676
  }, [announce]);
18694
- const announceResourceLoadError = useCallback12((resourceName) => {
18677
+ const announceResourceLoadError = useCallback11((resourceName) => {
18695
18678
  const message = resourceName ? `Failed to load ${resourceName}` : "Failed to load resource";
18696
18679
  announce(message, "assertive");
18697
18680
  }, [announce]);
18698
- const announceResourceUpdating = useCallback12((resourceName) => {
18681
+ const announceResourceUpdating = useCallback11((resourceName) => {
18699
18682
  announce(`Updating ${resourceName}...`, "polite");
18700
18683
  }, [announce]);
18701
18684
  return {
@@ -18707,16 +18690,16 @@ function useResourceLoadingAnnouncements() {
18707
18690
  }
18708
18691
  function useFormAnnouncements() {
18709
18692
  const { announce } = useLiveRegion();
18710
- const announceFormSubmitting = useCallback12(() => {
18693
+ const announceFormSubmitting = useCallback11(() => {
18711
18694
  announce("Submitting form...", "polite");
18712
18695
  }, [announce]);
18713
- const announceFormSuccess = useCallback12((message) => {
18696
+ const announceFormSuccess = useCallback11((message) => {
18714
18697
  announce(message || "Form submitted successfully", "polite");
18715
18698
  }, [announce]);
18716
- const announceFormError = useCallback12((message) => {
18699
+ const announceFormError = useCallback11((message) => {
18717
18700
  announce(message || "Form submission failed. Please check your entries and try again.", "assertive");
18718
18701
  }, [announce]);
18719
- const announceFormValidationError = useCallback12((fieldCount) => {
18702
+ const announceFormValidationError = useCallback11((fieldCount) => {
18720
18703
  const message = fieldCount === 1 ? "There is 1 field with an error" : `There are ${fieldCount} fields with errors`;
18721
18704
  announce(message, "assertive");
18722
18705
  }, [announce]);
@@ -18729,10 +18712,10 @@ function useFormAnnouncements() {
18729
18712
  }
18730
18713
  function useLanguageChangeAnnouncements() {
18731
18714
  const { announce } = useLiveRegion();
18732
- const announceLanguageChanging = useCallback12((newLanguage) => {
18715
+ const announceLanguageChanging = useCallback11((newLanguage) => {
18733
18716
  announce(`Changing language to ${newLanguage}...`, "polite");
18734
18717
  }, [announce]);
18735
- const announceLanguageChanged = useCallback12((newLanguage) => {
18718
+ const announceLanguageChanged = useCallback11((newLanguage) => {
18736
18719
  announce(`Language changed to ${newLanguage}`, "polite");
18737
18720
  }, [announce]);
18738
18721
  return {
@@ -18745,10 +18728,10 @@ function useLanguageChangeAnnouncements() {
18745
18728
  import { jsx as jsx4 } from "react/jsx-runtime";
18746
18729
  var ResourceAnnotationsContext = createContext4(void 0);
18747
18730
  function ResourceAnnotationsProvider({ children }) {
18748
- const [newAnnotationIds, setNewAnnotationIds] = useState19(/* @__PURE__ */ new Set());
18731
+ const [newAnnotationIds, setNewAnnotationIds] = useState18(/* @__PURE__ */ new Set());
18749
18732
  const { announce } = useLiveRegion();
18750
18733
  const semiont = useObservable(useSemiont().activeSession$)?.client;
18751
- const markAnnotation = useCallback13(async (rUri, motivation, selector, body = []) => {
18734
+ const markAnnotation = useCallback12(async (rUri, motivation, selector, body = []) => {
18752
18735
  if (!semiont) throw new Error("Not authenticated");
18753
18736
  try {
18754
18737
  const createData = {
@@ -18778,14 +18761,14 @@ function ResourceAnnotationsProvider({ children }) {
18778
18761
  throw err;
18779
18762
  }
18780
18763
  }, [semiont, announce]);
18781
- const clearNewAnnotationId = useCallback13((id2) => {
18764
+ const clearNewAnnotationId = useCallback12((id2) => {
18782
18765
  setNewAnnotationIds((prev) => {
18783
18766
  const next = new Set(prev);
18784
18767
  next.delete(id2);
18785
18768
  return next;
18786
18769
  });
18787
18770
  }, []);
18788
- const triggerSparkleAnimation = useCallback13((annotationId2) => {
18771
+ const triggerSparkleAnimation = useCallback12((annotationId2) => {
18789
18772
  setNewAnnotationIds((prev) => new Set(prev).add(annotationId2));
18790
18773
  setTimeout(() => {
18791
18774
  setNewAnnotationIds((prev) => {
@@ -26784,10 +26767,10 @@ function AssistProgress({
26784
26767
  }
26785
26768
 
26786
26769
  // src/components/resource/panels/AssistShell.tsx
26787
- import { useState as useState20, useEffect as useEffect20 } from "react";
26770
+ import { useState as useState19, useEffect as useEffect20 } from "react";
26788
26771
  import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
26789
26772
  function AssistShell({ assistType, title, isAssisting, progress, form, progressProps }) {
26790
- const [isExpanded, setIsExpanded] = useState20(() => {
26773
+ const [isExpanded, setIsExpanded] = useState19(() => {
26791
26774
  if (typeof window === "undefined") return true;
26792
26775
  const stored = localStorage.getItem(`assist-section-expanded-${assistType}`);
26793
26776
  return stored ? stored === "true" : true;
@@ -26994,7 +26977,7 @@ function ProtectedErrorFallback({ error, resetErrorBoundary }) {
26994
26977
  }
26995
26978
 
26996
26979
  // src/components/ResizeHandle.tsx
26997
- import { useRef as useRef11, useCallback as useCallback14, useEffect as useEffect21, useState as useState21 } from "react";
26980
+ import { useRef as useRef11, useCallback as useCallback13, useEffect as useEffect21, useState as useState20 } from "react";
26998
26981
  import { jsx as jsx11 } from "react/jsx-runtime";
26999
26982
  function ResizeHandle({
27000
26983
  onResize,
@@ -27003,14 +26986,14 @@ function ResizeHandle({
27003
26986
  position = "left",
27004
26987
  ariaLabel = "Resize panel"
27005
26988
  }) {
27006
- const [isDragging, setIsDragging] = useState21(false);
26989
+ const [isDragging, setIsDragging] = useState20(false);
27007
26990
  const startXRef = useRef11(0);
27008
26991
  const startWidthRef = useRef11(0);
27009
26992
  const onResizeRef = useRef11(onResize);
27010
26993
  useEffect21(() => {
27011
26994
  onResizeRef.current = onResize;
27012
26995
  });
27013
- const handleMouseDown = useCallback14((e6) => {
26996
+ const handleMouseDown = useCallback13((e6) => {
27014
26997
  e6.preventDefault();
27015
26998
  setIsDragging(true);
27016
26999
  startXRef.current = e6.clientX;
@@ -27019,7 +27002,7 @@ function ResizeHandle({
27019
27002
  startWidthRef.current = parent.offsetWidth;
27020
27003
  }
27021
27004
  }, []);
27022
- const handleMouseMove = useCallback14((e6) => {
27005
+ const handleMouseMove = useCallback13((e6) => {
27023
27006
  if (!isDragging) return;
27024
27007
  const deltaX = e6.clientX - startXRef.current;
27025
27008
  const widthDelta = position === "left" ? -deltaX : deltaX;
@@ -27027,10 +27010,10 @@ function ResizeHandle({
27027
27010
  const constrainedWidth = Math.max(minWidth, Math.min(maxWidth, newWidth));
27028
27011
  onResizeRef.current(constrainedWidth);
27029
27012
  }, [isDragging, minWidth, maxWidth, position]);
27030
- const handleMouseUp = useCallback14(() => {
27013
+ const handleMouseUp = useCallback13(() => {
27031
27014
  setIsDragging(false);
27032
27015
  }, []);
27033
- const handleKeyDown = useCallback14((e6) => {
27016
+ const handleKeyDown = useCallback13((e6) => {
27034
27017
  const parent = e6.target.parentElement;
27035
27018
  if (!parent) return;
27036
27019
  const currentWidth = parent.offsetWidth;
@@ -27089,7 +27072,7 @@ function ResizeHandle({
27089
27072
  }
27090
27073
 
27091
27074
  // src/components/ResourceTagsInline.tsx
27092
- import { useState as useState22 } from "react";
27075
+ import { useState as useState21 } from "react";
27093
27076
  import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
27094
27077
  function ResourceTagsInline({
27095
27078
  tags: tags3,
@@ -27098,8 +27081,8 @@ function ResourceTagsInline({
27098
27081
  disabled = false,
27099
27082
  vocabulary
27100
27083
  }) {
27101
- const [busy, setBusy] = useState22(false);
27102
- const [picking, setPicking] = useState22(false);
27084
+ const [busy, setBusy] = useState21(false);
27085
+ const [picking, setPicking] = useState21(false);
27103
27086
  if (!isEditing) {
27104
27087
  if (tags3.length === 0) {
27105
27088
  return null;
@@ -27288,7 +27271,6 @@ import React5, { useEffect as useEffect22 } from "react";
27288
27271
  import { LOCALES } from "@semiont/core";
27289
27272
  import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
27290
27273
  function SettingsPanel({
27291
- showLineNumbers,
27292
27274
  theme: theme2,
27293
27275
  locale,
27294
27276
  isPendingLocaleChange = false,
@@ -27296,6 +27278,7 @@ function SettingsPanel({
27296
27278
  }) {
27297
27279
  const t12 = useTranslations("Settings");
27298
27280
  const semiont = useSemiont();
27281
+ const { showLineNumbers } = useLineNumbers();
27299
27282
  const { announceLanguageChanging, announceLanguageChanged } = useLanguageChangeAnnouncements();
27300
27283
  const [previousLocale, setPreviousLocale] = React5.useState(locale);
27301
27284
  const handleLocaleChange = (newLocale) => {
@@ -27422,7 +27405,7 @@ function SettingsPanel({
27422
27405
  }
27423
27406
 
27424
27407
  // src/components/annotation/AnnotateToolbar.tsx
27425
- import React6, { useState as useState23, useRef as useRef12, useEffect as useEffect23 } from "react";
27408
+ import React6, { useState as useState22, useRef as useRef12, useEffect as useEffect23 } from "react";
27426
27409
  import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
27427
27410
  function DropdownGroup({
27428
27411
  label,
@@ -27499,14 +27482,14 @@ function AnnotateToolbar({
27499
27482
  const annotator = Object.values(annotators).find((a15) => a15.motivation === motivation);
27500
27483
  return annotator?.iconEmoji || "\u2753";
27501
27484
  };
27502
- const [modeHovered, setModeHovered] = useState23(false);
27503
- const [modePinned, setModePinned] = useState23(false);
27504
- const [clickHovered, setClickHovered] = useState23(false);
27505
- const [clickPinned, setClickPinned] = useState23(false);
27506
- const [selectionHovered, setSelectionHovered] = useState23(false);
27507
- const [selectionPinned, setSelectionPinned] = useState23(false);
27508
- const [shapeHovered, setShapeHovered] = useState23(false);
27509
- const [shapePinned, setShapePinned] = useState23(false);
27485
+ const [modeHovered, setModeHovered] = useState22(false);
27486
+ const [modePinned, setModePinned] = useState22(false);
27487
+ const [clickHovered, setClickHovered] = useState22(false);
27488
+ const [clickPinned, setClickPinned] = useState22(false);
27489
+ const [selectionHovered, setSelectionHovered] = useState22(false);
27490
+ const [selectionPinned, setSelectionPinned] = useState22(false);
27491
+ const [shapeHovered, setShapeHovered] = useState22(false);
27492
+ const [shapePinned, setShapePinned] = useState22(false);
27510
27493
  const modeRef = useRef12(null);
27511
27494
  const clickRef = useRef12(null);
27512
27495
  const selectionRef = useRef12(null);
@@ -29806,7 +29789,7 @@ function AnnotationOverlay({
29806
29789
  }
29807
29790
 
29808
29791
  // src/components/image-annotation/SvgDrawingCanvas.tsx
29809
- import { useRef as useRef14, useState as useState25, useEffect as useEffect26, useCallback as useCallback15 } from "react";
29792
+ import { useRef as useRef14, useState as useState24, useEffect as useEffect26, useCallback as useCallback14 } from "react";
29810
29793
  import { createRectangleSvg, createCircleSvg, createPolygonSvg, scaleSvgToNative, parseSvgSelector as parseSvgSelector2, resourceId as toResourceId3 } from "@semiont/core";
29811
29794
  import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
29812
29795
  function getMotivationColor(motivation) {
@@ -29843,11 +29826,11 @@ function SvgDrawingCanvas({
29843
29826
  const { hoverDelayMs } = useHoverDelay();
29844
29827
  const containerRef = useRef14(null);
29845
29828
  const imageRef = useRef14(null);
29846
- const [imageDimensions, setImageDimensions] = useState25(null);
29847
- const [displayDimensions, setDisplayDimensions] = useState25(null);
29848
- const [isDrawing, setIsDrawing] = useState25(false);
29849
- const [startPoint, setStartPoint] = useState25(null);
29850
- const [currentPoint, setCurrentPoint] = useState25(null);
29829
+ const [imageDimensions, setImageDimensions] = useState24(null);
29830
+ const [displayDimensions, setDisplayDimensions] = useState24(null);
29831
+ const [isDrawing, setIsDrawing] = useState24(false);
29832
+ const [startPoint, setStartPoint] = useState24(null);
29833
+ const [currentPoint, setCurrentPoint] = useState24(null);
29851
29834
  useEffect26(() => {
29852
29835
  const img = new Image();
29853
29836
  img.onload = () => {
@@ -29886,7 +29869,7 @@ function SvgDrawingCanvas({
29886
29869
  }
29887
29870
  };
29888
29871
  }, []);
29889
- const getRelativeCoordinates = useCallback15((e6) => {
29872
+ const getRelativeCoordinates = useCallback14((e6) => {
29890
29873
  if (!imageRef.current) return null;
29891
29874
  const rect = imageRef.current.getBoundingClientRect();
29892
29875
  return {
@@ -29894,7 +29877,7 @@ function SvgDrawingCanvas({
29894
29877
  y: e6.clientY - rect.top
29895
29878
  };
29896
29879
  }, []);
29897
- const handleMouseDown = useCallback15((e6) => {
29880
+ const handleMouseDown = useCallback14((e6) => {
29898
29881
  if (!drawingMode) return;
29899
29882
  const point = getRelativeCoordinates(e6);
29900
29883
  if (point) {
@@ -29903,14 +29886,14 @@ function SvgDrawingCanvas({
29903
29886
  setCurrentPoint(point);
29904
29887
  }
29905
29888
  }, [drawingMode, getRelativeCoordinates]);
29906
- const handleMouseMove = useCallback15((e6) => {
29889
+ const handleMouseMove = useCallback14((e6) => {
29907
29890
  if (!isDrawing || !startPoint) return;
29908
29891
  const point = getRelativeCoordinates(e6);
29909
29892
  if (point) {
29910
29893
  setCurrentPoint(point);
29911
29894
  }
29912
29895
  }, [isDrawing, startPoint, getRelativeCoordinates]);
29913
- const handleMouseUp = useCallback15((e6) => {
29896
+ const handleMouseUp = useCallback14((e6) => {
29914
29897
  if (!isDrawing || !startPoint || !drawingMode) return;
29915
29898
  const endPoint = getRelativeCoordinates(e6);
29916
29899
  if (!endPoint || !displayDimensions || !imageDimensions) return;
@@ -30009,7 +29992,7 @@ function SvgDrawingCanvas({
30009
29992
  setStartPoint(null);
30010
29993
  setCurrentPoint(null);
30011
29994
  }, [isDrawing, startPoint, drawingMode, displayDimensions, imageDimensions, getRelativeCoordinates, selectedMotivation, existingAnnotations]);
30012
- const handleMouseLeave = useCallback15(() => {
29995
+ const handleMouseLeave = useCallback14(() => {
30013
29996
  if (isDrawing) {
30014
29997
  setIsDrawing(false);
30015
29998
  setStartPoint(null);
@@ -30475,7 +30458,7 @@ function SessionExpiredModal() {
30475
30458
  }
30476
30459
 
30477
30460
  // src/components/resource/AnnotateView.tsx
30478
- import { useRef as useRef15, useEffect as useEffect27, useCallback as useCallback16 } from "react";
30461
+ import { useRef as useRef15, useEffect as useEffect27, useCallback as useCallback15 } from "react";
30479
30462
  import { capabilitiesOf as capabilitiesOf3, resourceId as toResourceId4 } from "@semiont/core";
30480
30463
 
30481
30464
  // src/lib/text-selection-handler.ts
@@ -30709,16 +30692,16 @@ function AnnotateView({
30709
30692
  const { selectedMotivation, selectedClick, selectedShape, hoveredAnnotationId, scrollToAnnotationId } = uiState;
30710
30693
  const onUIStateChangeRef = useRef15(onUIStateChange);
30711
30694
  onUIStateChangeRef.current = onUIStateChange;
30712
- const handleToolbarSelectionChange = useCallback16((motivation) => {
30695
+ const handleToolbarSelectionChange = useCallback15((motivation) => {
30713
30696
  onUIStateChangeRef.current?.({ selectedMotivation: motivation });
30714
30697
  }, []);
30715
- const handleToolbarClickActionChange = useCallback16((action) => {
30698
+ const handleToolbarClickActionChange = useCallback15((action) => {
30716
30699
  onUIStateChangeRef.current?.({ selectedClick: action });
30717
30700
  }, []);
30718
- const handleToolbarShapeChange = useCallback16((shape) => {
30701
+ const handleToolbarShapeChange = useCallback15((shape) => {
30719
30702
  onUIStateChangeRef.current?.({ selectedShape: shape });
30720
30703
  }, []);
30721
- const handleAnnotationHover = useCallback16(({ annotationId: annotationId2 }) => {
30704
+ const handleAnnotationHover = useCallback15(({ annotationId: annotationId2 }) => {
30722
30705
  onUIStateChangeRef.current?.({ hoveredAnnotationId: annotationId2 });
30723
30706
  }, []);
30724
30707
  useSessionEventSubscriptions(session, {
@@ -30841,7 +30824,7 @@ import { useEffect as useEffect29, useRef as useRef17 } from "react";
30841
30824
  import { getAnnotationUriFromEvent as getAnnotationUriFromEvent2 } from "@semiont/core";
30842
30825
 
30843
30826
  // src/components/resource/HistoryEvent.tsx
30844
- import { useRef as useRef16, useCallback as useCallback17, useEffect as useEffect28 } from "react";
30827
+ import { useRef as useRef16, useCallback as useCallback16, useEffect as useEffect28 } from "react";
30845
30828
  import { getAnnotationUriFromEvent } from "@semiont/core";
30846
30829
 
30847
30830
  // src/components/resource/event-formatting.ts
@@ -31100,7 +31083,7 @@ function HistoryEvent({
31100
31083
  useEffect28(() => {
31101
31084
  onEventHoverRef.current = onEventHover;
31102
31085
  });
31103
- const handleEmojiMouseEnter = useCallback17(() => {
31086
+ const handleEmojiMouseEnter = useCallback16(() => {
31104
31087
  if (!annotationUri || !onEventHoverRef.current) return;
31105
31088
  if (hoverTimeoutRef.current) {
31106
31089
  clearTimeout(hoverTimeoutRef.current);
@@ -31109,7 +31092,7 @@ function HistoryEvent({
31109
31092
  onEventHoverRef.current?.(annotationUri);
31110
31093
  }, 300);
31111
31094
  }, [annotationUri]);
31112
- const handleEmojiMouseLeave = useCallback17(() => {
31095
+ const handleEmojiMouseLeave = useCallback16(() => {
31113
31096
  if (hoverTimeoutRef.current) {
31114
31097
  clearTimeout(hoverTimeoutRef.current);
31115
31098
  hoverTimeoutRef.current = null;
@@ -31286,7 +31269,7 @@ function AnnotationHistory({
31286
31269
  }
31287
31270
 
31288
31271
  // src/components/resource/BrowseView.tsx
31289
- import { useEffect as useEffect30, useRef as useRef18, useCallback as useCallback18, useMemo as useMemo7, memo as memo2 } from "react";
31272
+ import { useEffect as useEffect30, useRef as useRef18, useCallback as useCallback17, useMemo as useMemo7, memo as memo2 } from "react";
31290
31273
  import { annotationId as toAnnotationId3, resourceId as toResourceId5 } from "@semiont/core";
31291
31274
  import { capabilitiesOf as capabilitiesOf4, getBodySource as getBodySource4, isResolvedReference as isResolvedReference4 } from "@semiont/core";
31292
31275
  import { createHoverHandlers as createHoverHandlers3 } from "@semiont/sdk";
@@ -31470,21 +31453,21 @@ var BrowseView = memo2(function BrowseView2({
31470
31453
  referentSub?.unsubscribe();
31471
31454
  };
31472
31455
  }, [content2, allAnnotations, newAnnotationIds, hoverDelayMs, session, onReferenceHover]);
31473
- const scrollToAnnotation = useCallback18((annotationId2, removePulse = false) => {
31456
+ const scrollToAnnotation = useCallback17((annotationId2, removePulse = false) => {
31474
31457
  if (!containerRef.current) return;
31475
31458
  scrollAnnotationIntoView(annotationId2, containerRef.current, { pulse: removePulse });
31476
31459
  }, []);
31477
- const handleAnnotationHover = useCallback18(({ annotationId: annotationId2 }) => {
31460
+ const handleAnnotationHover = useCallback17(({ annotationId: annotationId2 }) => {
31478
31461
  scrollToAnnotation(annotationId2);
31479
31462
  }, [scrollToAnnotation]);
31480
- const handleAnnotationFocus = useCallback18(({ annotationId: annotationId2 }) => {
31463
+ const handleAnnotationFocus = useCallback17(({ annotationId: annotationId2 }) => {
31481
31464
  scrollToAnnotation(annotationId2 ?? null, true);
31482
31465
  }, [scrollToAnnotation]);
31483
31466
  useSessionEventSubscriptions(session, {
31484
31467
  "beckon:hover": handleAnnotationHover,
31485
31468
  "beckon:focus": handleAnnotationFocus
31486
31469
  });
31487
- const handleContentClick = useCallback18((e6) => {
31470
+ const handleContentClick = useCallback17((e6) => {
31488
31471
  const anchor = e6.target.closest("a[href]");
31489
31472
  if (!anchor) return;
31490
31473
  e6.preventDefault();
@@ -31530,7 +31513,7 @@ var BrowseView = memo2(function BrowseView2({
31530
31513
  });
31531
31514
 
31532
31515
  // src/components/resource/ResourceViewer.tsx
31533
- import { useState as useState26, useCallback as useCallback19, useRef as useRef19, useMemo as useMemo8 } from "react";
31516
+ import { useState as useState25, useCallback as useCallback18, useRef as useRef19, useMemo as useMemo8 } from "react";
31534
31517
  import { getExactText as getExactText3, getTargetSelector as getTargetSelector4, getPrimaryMediaType as getPrimaryMediaType2, isHighlight as isHighlight5, isAssessment as isAssessment4, isReference as isReference6, isComment as isComment5, isTag as isTag5, getBodySource as getBodySource5 } from "@semiont/core";
31535
31518
  import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
31536
31519
  function ResourceViewer({
@@ -31567,34 +31550,34 @@ function ResourceViewer({
31567
31550
  }
31568
31551
  const rUri = resource["@id"];
31569
31552
  const mimeType = getPrimaryMediaType2(resource) || "text/plain";
31570
- const [internalAnnotateMode, setInternalAnnotateMode] = useState26(false);
31553
+ const [internalAnnotateMode, setInternalAnnotateMode] = useState25(false);
31571
31554
  const annotateMode = annotateModeProp ?? internalAnnotateMode;
31572
- const changeAnnotateMode = useCallback19((mode) => {
31555
+ const changeAnnotateMode = useCallback18((mode) => {
31573
31556
  if (annotateModeProp === void 0) setInternalAnnotateMode(mode);
31574
31557
  onAnnotateModeChange?.(mode);
31575
31558
  }, [annotateModeProp, onAnnotateModeChange]);
31576
31559
  const activeView = annotateMode ? "annotate" : "browse";
31577
- const [internalSelectionMotivation, setInternalSelectionMotivation] = useState26("linking");
31560
+ const [internalSelectionMotivation, setInternalSelectionMotivation] = useState25("linking");
31578
31561
  const selectedMotivation = selectionMotivationProp !== void 0 ? selectionMotivationProp : internalSelectionMotivation;
31579
- const changeSelectionMotivation = useCallback19((motivation) => {
31562
+ const changeSelectionMotivation = useCallback18((motivation) => {
31580
31563
  if (selectionMotivationProp === void 0) setInternalSelectionMotivation(motivation);
31581
31564
  onSelectionMotivationChange?.(motivation);
31582
31565
  }, [selectionMotivationProp, onSelectionMotivationChange]);
31583
- const [internalClickAction, setInternalClickAction] = useState26("detail");
31566
+ const [internalClickAction, setInternalClickAction] = useState25("detail");
31584
31567
  const selectedClick = clickActionProp ?? internalClickAction;
31585
- const changeClickAction = useCallback19((action) => {
31568
+ const changeClickAction = useCallback18((action) => {
31586
31569
  if (clickActionProp === void 0) setInternalClickAction(action);
31587
31570
  onClickActionChange?.(action);
31588
31571
  }, [clickActionProp, onClickActionChange]);
31589
- const [internalShape, setInternalShape] = useState26("rectangle");
31572
+ const [internalShape, setInternalShape] = useState25("rectangle");
31590
31573
  const selectedShape = shapeProp ?? internalShape;
31591
- const changeShape = useCallback19((shape) => {
31574
+ const changeShape = useCallback18((shape) => {
31592
31575
  if (shapeProp === void 0) setInternalShape(shape);
31593
31576
  onShapeChange?.(shape);
31594
31577
  }, [shapeProp, onShapeChange]);
31595
- const [showJsonLdView, setShowJsonLdView] = useState26(false);
31596
- const [jsonLdAnnotation, setJsonLdAnnotation] = useState26(null);
31597
- const [deleteConfirmation, setDeleteConfirmation] = useState26(null);
31578
+ const [showJsonLdView, setShowJsonLdView] = useState25(false);
31579
+ const [jsonLdAnnotation, setJsonLdAnnotation] = useState25(null);
31580
+ const [deleteConfirmation, setDeleteConfirmation] = useState25(null);
31598
31581
  const hoveredAnnotationId = hoveredAnnotationIdProp ?? null;
31599
31582
  const getJsonLdModalPosition = () => {
31600
31583
  if (typeof window === "undefined") return { x: 0, y: 0 };
@@ -31605,10 +31588,10 @@ function ResourceViewer({
31605
31588
  y: Math.max(0, (window.innerHeight - popupHeight) / 2)
31606
31589
  };
31607
31590
  };
31608
- const handleDeleteAnnotation = useCallback19((id2) => {
31591
+ const handleDeleteAnnotation = useCallback18((id2) => {
31609
31592
  session?.client.mark.delete(rUri, id2);
31610
31593
  }, [session, rUri]);
31611
- const handleAnnotationClick2 = useCallback19((annotation, event) => {
31594
+ const handleAnnotationClick2 = useCallback18((annotation, event) => {
31612
31595
  const metadata = Object.values(ANNOTATORS).find((a15) => a15.matchesAnnotation(annotation));
31613
31596
  if (metadata?.hasSidePanel && selectedClick !== "deleting" && selectedClick !== "jsonld" && selectedClick !== "follow") {
31614
31597
  return;
@@ -31633,7 +31616,7 @@ function ResourceViewer({
31633
31616
  return;
31634
31617
  }
31635
31618
  }, [annotateMode, selectedClick, onOpenResource]);
31636
- const handleAnnotationClickEvent = useCallback19(({ annotationId: annotationId2, motivation, anchorRect }) => {
31619
+ const handleAnnotationClickEvent = useCallback18(({ annotationId: annotationId2, motivation, anchorRect }) => {
31637
31620
  const metadata = Object.values(ANNOTATORS).find((a15) => a15.matchesAnnotation({ motivation }));
31638
31621
  if (!metadata?.hasSidePanel) {
31639
31622
  const allAnnotations = [...highlights, ...references, ...assessments, ...comments, ...tags3];
@@ -31667,7 +31650,7 @@ function ResourceViewer({
31667
31650
  selectedShape,
31668
31651
  hoveredAnnotationId
31669
31652
  };
31670
- const getTargetResourceName = useCallback19((resourceId2) => {
31653
+ const getTargetResourceName = useCallback18((resourceId2) => {
31671
31654
  const referencedResource = references.find((a15) => getBodySource5(a15.body) === resourceId2);
31672
31655
  return referencedResource ? getExactText3(getTargetSelector4(referencedResource.target)) : void 0;
31673
31656
  }, [references]);
@@ -31878,11 +31861,11 @@ function AssessmentEntry({
31878
31861
  }
31879
31862
 
31880
31863
  // src/components/resource/panels/AssessmentPanel.tsx
31881
- import { useState as useState28, useEffect as useEffect31, useRef as useRef20, useCallback as useCallback21, useMemo as useMemo9 } from "react";
31864
+ import { useState as useState27, useEffect as useEffect31, useRef as useRef20, useCallback as useCallback20, useMemo as useMemo9 } from "react";
31882
31865
  import { getTextPositionSelector as getTextPositionSelector3, getTargetSelector as getTargetSelector5 } from "@semiont/core";
31883
31866
 
31884
31867
  // src/components/resource/panels/AssistSection.tsx
31885
- import { useState as useState27, useCallback as useCallback20 } from "react";
31868
+ import { useState as useState26, useCallback as useCallback19 } from "react";
31886
31869
  import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
31887
31870
  function AssistSection({
31888
31871
  session,
@@ -31894,12 +31877,12 @@ function AssistSection({
31894
31877
  }) {
31895
31878
  const panelName = annotationType === "highlight" ? "HighlightPanel" : annotationType === "assessment" ? "AssessmentPanel" : "CommentsPanel";
31896
31879
  const t12 = useTranslations(panelName);
31897
- const [instructions, setInstructions] = useState27("");
31898
- const [tone, setTone] = useState27("");
31880
+ const [instructions, setInstructions] = useState26("");
31881
+ const [tone, setTone] = useState26("");
31899
31882
  const defaultDensity = annotationType === "assessment" ? 4 : 5;
31900
- const [density, setDensity] = useState27(defaultDensity);
31901
- const [useDensity, setUseDensity] = useState27(true);
31902
- const handleAssist = useCallback20(() => {
31883
+ const [density, setDensity] = useState26(defaultDensity);
31884
+ const [useDensity, setUseDensity] = useState26(true);
31885
+ const handleAssist = useCallback19(() => {
31903
31886
  const motivation = annotationType === "highlight" ? "highlighting" : annotationType === "assessment" ? "assessing" : "commenting";
31904
31887
  session?.client.mark.requestAssist(motivation, {
31905
31888
  instructions: instructions.trim() || void 0,
@@ -31915,7 +31898,7 @@ function AssistSection({
31915
31898
  setInstructions("");
31916
31899
  setTone("");
31917
31900
  }, [annotationType, instructions, tone, useDensity, density, locale, sourceLanguage, session]);
31918
- const handleDismissProgress = useCallback20(() => {
31901
+ const handleDismissProgress = useCallback19(() => {
31919
31902
  session?.client.mark.dismissProgress();
31920
31903
  }, [session]);
31921
31904
  return /* @__PURE__ */ jsx31(
@@ -32081,8 +32064,8 @@ function AssessmentPanel({
32081
32064
  hoveredAnnotationId
32082
32065
  }) {
32083
32066
  const t12 = useTranslations("AssessmentPanel");
32084
- const [newAssessmentText, setNewAssessmentText] = useState28("");
32085
- const [focusedAnnotationId, setFocusedAnnotationId] = useState28(null);
32067
+ const [newAssessmentText, setNewAssessmentText] = useState27("");
32068
+ const [focusedAnnotationId, setFocusedAnnotationId] = useState27(null);
32086
32069
  const containerRef = useRef20(null);
32087
32070
  const entryRefs = useRef20(/* @__PURE__ */ new Map());
32088
32071
  const sortedAnnotations = useMemo9(() => {
@@ -32093,7 +32076,7 @@ function AssessmentPanel({
32093
32076
  return aSelector.start - bSelector.start;
32094
32077
  });
32095
32078
  }, [annotations]);
32096
- const setEntryRef = useCallback21((id2, element) => {
32079
+ const setEntryRef = useCallback20((id2, element) => {
32097
32080
  if (element) {
32098
32081
  entryRefs.current.set(id2, element);
32099
32082
  } else {
@@ -32155,7 +32138,7 @@ function AssessmentPanel({
32155
32138
  document.addEventListener("keydown", handleEscape);
32156
32139
  return () => document.removeEventListener("keydown", handleEscape);
32157
32140
  }, [pendingAnnotation, session]);
32158
- const handleAnnotationClick2 = useCallback21(({ annotationId: annotationId2 }) => {
32141
+ const handleAnnotationClick2 = useCallback20(({ annotationId: annotationId2 }) => {
32159
32142
  setFocusedAnnotationId(annotationId2);
32160
32143
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
32161
32144
  }, []);
@@ -32323,7 +32306,7 @@ function CollaborationPanel({
32323
32306
  }
32324
32307
 
32325
32308
  // src/components/resource/panels/CommentEntry.tsx
32326
- import { useState as useState29, useEffect as useEffect32, useRef as useRef21, useImperativeHandle } from "react";
32309
+ import { useState as useState28, useEffect as useEffect32, useRef as useRef21, useImperativeHandle } from "react";
32327
32310
  import { getAnnotationExactText as getAnnotationExactText2, getCommentText } from "@semiont/core";
32328
32311
  import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
32329
32312
  function formatRelativeTime3(isoString) {
@@ -32350,8 +32333,8 @@ function CommentEntry({
32350
32333
  }) {
32351
32334
  const t12 = useTranslations("CommentsPanel");
32352
32335
  const hoverProps = useHoverEmitter(session, comment2.id);
32353
- const [isEditing, setIsEditing] = useState29(false);
32354
- const [editText, setEditText] = useState29("");
32336
+ const [isEditing, setIsEditing] = useState28(false);
32337
+ const [editText, setEditText] = useState28("");
32355
32338
  const internalRef = useRef21(null);
32356
32339
  useImperativeHandle(ref, () => internalRef.current);
32357
32340
  const commentText = getCommentText(comment2) || "";
@@ -32458,7 +32441,7 @@ function CommentEntry({
32458
32441
  }
32459
32442
 
32460
32443
  // src/components/resource/panels/CommentsPanel.tsx
32461
- import { useState as useState30, useEffect as useEffect33, useRef as useRef22, useCallback as useCallback22, useMemo as useMemo10 } from "react";
32444
+ import { useState as useState29, useEffect as useEffect33, useRef as useRef22, useCallback as useCallback21, useMemo as useMemo10 } from "react";
32462
32445
  import { getTextPositionSelector as getTextPositionSelector4, getTargetSelector as getTargetSelector6 } from "@semiont/core";
32463
32446
  import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
32464
32447
  function getSelectorDisplayText2(selector) {
@@ -32489,8 +32472,8 @@ function CommentsPanel({
32489
32472
  hoveredAnnotationId
32490
32473
  }) {
32491
32474
  const t12 = useTranslations("CommentsPanel");
32492
- const [newCommentText, setNewCommentText] = useState30("");
32493
- const [focusedAnnotationId, setFocusedAnnotationId] = useState30(null);
32475
+ const [newCommentText, setNewCommentText] = useState29("");
32476
+ const [focusedAnnotationId, setFocusedAnnotationId] = useState29(null);
32494
32477
  const containerRef = useRef22(null);
32495
32478
  const entryRefs = useRef22(/* @__PURE__ */ new Map());
32496
32479
  const sortedAnnotations = useMemo10(() => {
@@ -32501,7 +32484,7 @@ function CommentsPanel({
32501
32484
  return aSelector.start - bSelector.start;
32502
32485
  });
32503
32486
  }, [annotations]);
32504
- const setEntryRef = useCallback22((id2, element) => {
32487
+ const setEntryRef = useCallback21((id2, element) => {
32505
32488
  if (element) {
32506
32489
  entryRefs.current.set(id2, element);
32507
32490
  } else {
@@ -32541,7 +32524,7 @@ function CommentsPanel({
32541
32524
  container.scrollTo({ top: scrollTo, behavior: "smooth" });
32542
32525
  }
32543
32526
  }, [hoveredAnnotationId]);
32544
- const handleAnnotationClick2 = useCallback22(({ annotationId: annotationId2 }) => {
32527
+ const handleAnnotationClick2 = useCallback21(({ annotationId: annotationId2 }) => {
32545
32528
  setFocusedAnnotationId(annotationId2);
32546
32529
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
32547
32530
  }, []);
@@ -32711,7 +32694,7 @@ function HighlightEntry({
32711
32694
  }
32712
32695
 
32713
32696
  // src/components/resource/panels/HighlightPanel.tsx
32714
- import { useEffect as useEffect34, useState as useState31, useRef as useRef23, useCallback as useCallback23, useMemo as useMemo11 } from "react";
32697
+ import { useEffect as useEffect34, useState as useState30, useRef as useRef23, useCallback as useCallback22, useMemo as useMemo11 } from "react";
32715
32698
  import { getTextPositionSelector as getTextPositionSelector5, getTargetSelector as getTargetSelector7 } from "@semiont/core";
32716
32699
  import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
32717
32700
  function HighlightPanel({
@@ -32728,7 +32711,7 @@ function HighlightPanel({
32728
32711
  sourceLanguage
32729
32712
  }) {
32730
32713
  const t12 = useTranslations("HighlightPanel");
32731
- const [focusedAnnotationId, setFocusedAnnotationId] = useState31(null);
32714
+ const [focusedAnnotationId, setFocusedAnnotationId] = useState30(null);
32732
32715
  const containerRef = useRef23(null);
32733
32716
  const entryRefs = useRef23(/* @__PURE__ */ new Map());
32734
32717
  const sortedAnnotations = useMemo11(() => {
@@ -32739,7 +32722,7 @@ function HighlightPanel({
32739
32722
  return aSelector.start - bSelector.start;
32740
32723
  });
32741
32724
  }, [annotations]);
32742
- const setEntryRef = useCallback23((id2, element) => {
32725
+ const setEntryRef = useCallback22((id2, element) => {
32743
32726
  if (element) {
32744
32727
  entryRefs.current.set(id2, element);
32745
32728
  } else {
@@ -32777,7 +32760,7 @@ function HighlightPanel({
32777
32760
  container.scrollTo({ top: scrollTo, behavior: "smooth" });
32778
32761
  }
32779
32762
  }, [hoveredAnnotationId]);
32780
- const handleAnnotationClick2 = useCallback23(({ annotationId: annotationId2 }) => {
32763
+ const handleAnnotationClick2 = useCallback22(({ annotationId: annotationId2 }) => {
32781
32764
  setFocusedAnnotationId(annotationId2);
32782
32765
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
32783
32766
  }, []);
@@ -32825,12 +32808,12 @@ function HighlightPanel({
32825
32808
  import { useEffect as useEffect36, useRef as useRef24 } from "react";
32826
32809
 
32827
32810
  // src/hooks/useResourceGraph.ts
32828
- import { useEffect as useEffect35, useState as useState32 } from "react";
32811
+ import { useEffect as useEffect35, useState as useState31 } from "react";
32829
32812
  function useResourceGraph(id2) {
32830
32813
  const semiont = useObservable(useSemiont().activeSession$)?.client;
32831
- const [graph, setGraph] = useState32(null);
32832
- const [loading, setLoading] = useState32(true);
32833
- const [error, setError] = useState32(null);
32814
+ const [graph, setGraph] = useState31(null);
32815
+ const [loading, setLoading] = useState31(true);
32816
+ const [error, setError] = useState31(null);
32834
32817
  useEffect35(() => {
32835
32818
  if (!semiont || !id2) {
32836
32819
  setLoading(false);
@@ -33113,7 +33096,7 @@ function ReferenceEntry({
33113
33096
  }
33114
33097
 
33115
33098
  // src/components/resource/panels/ReferencesPanel.tsx
33116
- import { useState as useState33, useRef as useRef25, useEffect as useEffect37, useCallback as useCallback24, useMemo as useMemo12 } from "react";
33099
+ import { useState as useState32, useRef as useRef25, useEffect as useEffect37, useCallback as useCallback23, useMemo as useMemo12 } from "react";
33117
33100
  import { getTextPositionSelector as getTextPositionSelector6, getTargetSelector as getTargetSelector9 } from "@semiont/core";
33118
33101
  import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs33 } from "react/jsx-runtime";
33119
33102
  function getSelectorDisplayText3(selector) {
@@ -33154,11 +33137,11 @@ function ReferencesPanel({
33154
33137
  sourceLanguage
33155
33138
  }) {
33156
33139
  const t12 = useTranslations("ReferencesPanel");
33157
- const [selectedEntityTypes, setSelectedEntityTypes] = useState33([]);
33158
- const [lastAnnotationLog, setLastDetectionLog] = useState33(null);
33159
- const [pendingEntityTypes, setPendingEntityTypes] = useState33([]);
33160
- const [includeDescriptiveReferences, setIncludeDescriptiveReferences] = useState33(false);
33161
- const [focusedAnnotationId, setFocusedAnnotationId] = useState33(null);
33140
+ const [selectedEntityTypes, setSelectedEntityTypes] = useState32([]);
33141
+ const [lastAnnotationLog, setLastDetectionLog] = useState32(null);
33142
+ const [pendingEntityTypes, setPendingEntityTypes] = useState32([]);
33143
+ const [includeDescriptiveReferences, setIncludeDescriptiveReferences] = useState32(false);
33144
+ const [focusedAnnotationId, setFocusedAnnotationId] = useState32(null);
33162
33145
  const containerRef = useRef25(null);
33163
33146
  const entryRefs = useRef25(/* @__PURE__ */ new Map());
33164
33147
  const sortedAnnotations = useMemo12(() => {
@@ -33169,7 +33152,7 @@ function ReferencesPanel({
33169
33152
  return aSelector.start - bSelector.start;
33170
33153
  });
33171
33154
  }, [annotations]);
33172
- const setEntryRef = useCallback24((id2, element) => {
33155
+ const setEntryRef = useCallback23((id2, element) => {
33173
33156
  if (element) {
33174
33157
  entryRefs.current.set(id2, element);
33175
33158
  } else {
@@ -33211,7 +33194,7 @@ function ReferencesPanel({
33211
33194
  container.scrollTo({ top: scrollTo, behavior: "smooth" });
33212
33195
  }
33213
33196
  }, [hoveredAnnotationId]);
33214
- const handleAnnotationClick2 = useCallback24(({ annotationId: annotationId2 }) => {
33197
+ const handleAnnotationClick2 = useCallback23(({ annotationId: annotationId2 }) => {
33215
33198
  setFocusedAnnotationId(annotationId2);
33216
33199
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
33217
33200
  }, []);
@@ -33754,7 +33737,7 @@ function TagEntry({
33754
33737
  }
33755
33738
 
33756
33739
  // src/components/resource/panels/TaggingPanel.tsx
33757
- import { useState as useState34, useEffect as useEffect38, useRef as useRef26, useCallback as useCallback25, useMemo as useMemo14 } from "react";
33740
+ import { useState as useState33, useEffect as useEffect38, useRef as useRef26, useCallback as useCallback24, useMemo as useMemo14 } from "react";
33758
33741
  import { isReady as isReady2 } from "@semiont/sdk";
33759
33742
  import { getTextPositionSelector as getTextPositionSelector7, getTargetSelector as getTargetSelector10 } from "@semiont/core";
33760
33743
  import { Fragment as Fragment9, jsx as jsx44, jsxs as jsxs37 } from "react/jsx-runtime";
@@ -33794,16 +33777,16 @@ function TaggingPanel({
33794
33777
  const schemasObserved = schemasState && isReady2(schemasState) ? schemasState.value : void 0;
33795
33778
  const schemas = schemasObserved ?? [];
33796
33779
  const noSchemasRegistered = schemasObserved !== void 0 && schemasObserved.length === 0;
33797
- const [selectedSchemaId, setSelectedSchemaId] = useState34("");
33798
- const [selectedCategories, setSelectedCategories] = useState34(/* @__PURE__ */ new Set());
33780
+ const [selectedSchemaId, setSelectedSchemaId] = useState33("");
33781
+ const [selectedCategories, setSelectedCategories] = useState33(/* @__PURE__ */ new Set());
33799
33782
  useEffect38(() => {
33800
33783
  if (!selectedSchemaId && schemas.length > 0) {
33801
33784
  setSelectedSchemaId(schemas[0].id);
33802
33785
  }
33803
33786
  }, [schemas, selectedSchemaId]);
33804
- const [focusedAnnotationId, setFocusedAnnotationId] = useState34(null);
33787
+ const [focusedAnnotationId, setFocusedAnnotationId] = useState33(null);
33805
33788
  const containerRef = useRef26(null);
33806
- const handleAnnotationClick2 = useCallback25(({ annotationId: annotationId2 }) => {
33789
+ const handleAnnotationClick2 = useCallback24(({ annotationId: annotationId2 }) => {
33807
33790
  setFocusedAnnotationId(annotationId2);
33808
33791
  setTimeout(() => setFocusedAnnotationId(null), 3e3);
33809
33792
  }, []);
@@ -33819,7 +33802,7 @@ function TaggingPanel({
33819
33802
  return aSelector.start - bSelector.start;
33820
33803
  });
33821
33804
  }, [annotations]);
33822
- const setEntryRef = useCallback25((id2, element) => {
33805
+ const setEntryRef = useCallback24((id2, element) => {
33823
33806
  if (element) {
33824
33807
  entryRefs.current.set(id2, element);
33825
33808
  } else {
@@ -34078,7 +34061,7 @@ function TaggingPanel({
34078
34061
  }
34079
34062
 
34080
34063
  // src/components/resource/panels/UnifiedAnnotationsPanel.tsx
34081
- import { useState as useState35, useEffect as useEffect39 } from "react";
34064
+ import { useState as useState34, useEffect as useEffect39 } from "react";
34082
34065
  import { Fragment as Fragment10, jsx as jsx45, jsxs as jsxs38 } from "react/jsx-runtime";
34083
34066
  var TAB_ORDER = ["statistics", "reference", "highlight", "assessment", "comment", "tag"];
34084
34067
  function UnifiedAnnotationsPanel(props) {
@@ -34100,7 +34083,7 @@ function UnifiedAnnotationsPanel(props) {
34100
34083
  }
34101
34084
  }
34102
34085
  const grouped = groups;
34103
- const [activeTab, setActiveTab] = useState35(() => {
34086
+ const [activeTab, setActiveTab] = useState34(() => {
34104
34087
  if (typeof window === "undefined") return props.initialTab || "statistics";
34105
34088
  const storageKey = props.resourceId ? `annotations-tab-${props.resourceId}` : "annotations-tab-global";
34106
34089
  const stored = localStorage.getItem(storageKey);
@@ -34295,7 +34278,7 @@ function ImageViewer({ imageUrl, alt = "Resource image" }) {
34295
34278
  }
34296
34279
 
34297
34280
  // src/components/navigation/Footer.tsx
34298
- import { useState as useState36 } from "react";
34281
+ import { useState as useState35 } from "react";
34299
34282
  import { Fragment as Fragment11, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
34300
34283
  function Footer({
34301
34284
  Link,
@@ -34306,7 +34289,7 @@ function Footer({
34306
34289
  sourceCodeUrl = "https://github.com/The-AI-Alliance/semiont",
34307
34290
  showPolicyLinks = true
34308
34291
  }) {
34309
- const [showCookiePreferences, setShowCookiePreferences] = useState36(false);
34292
+ const [showCookiePreferences, setShowCookiePreferences] = useState35(false);
34310
34293
  return /* @__PURE__ */ jsxs39(Fragment11, { children: [
34311
34294
  /* @__PURE__ */ jsx47("footer", { role: "contentinfo", className: "semiont-footer", children: /* @__PURE__ */ jsx47("div", { className: "semiont-footer__container", children: /* @__PURE__ */ jsxs39("div", { className: "semiont-footer__content", children: [
34312
34295
  /* @__PURE__ */ jsx47("div", { className: "semiont-footer__copyright", children: t12("copyright", { year: (/* @__PURE__ */ new Date()).getFullYear() }) }),
@@ -34436,7 +34419,7 @@ function NavigationMenu({
34436
34419
  }
34437
34420
 
34438
34421
  // src/components/navigation/ObservableLink.tsx
34439
- import { useCallback as useCallback26, useRef as useRef27, useEffect as useEffect40 } from "react";
34422
+ import { useCallback as useCallback25, useRef as useRef27, useEffect as useEffect40 } from "react";
34440
34423
  import { jsx as jsx49 } from "react/jsx-runtime";
34441
34424
  function ObservableLink({
34442
34425
  href,
@@ -34450,7 +34433,7 @@ function ObservableLink({
34450
34433
  useEffect40(() => {
34451
34434
  onClickRef.current = onClick;
34452
34435
  });
34453
- const handleClick = useCallback26((e6) => {
34436
+ const handleClick = useCallback25((e6) => {
34454
34437
  semiont.emit("nav:link-clicked", {
34455
34438
  href,
34456
34439
  label
@@ -34469,7 +34452,7 @@ function ObservableLink({
34469
34452
  }
34470
34453
 
34471
34454
  // src/components/navigation/SimpleNavigation.tsx
34472
- import { useState as useState37, useRef as useRef28, useEffect as useEffect41 } from "react";
34455
+ import { useState as useState36, useRef as useRef28, useEffect as useEffect41 } from "react";
34473
34456
  import { jsx as jsx50, jsxs as jsxs41 } from "react/jsx-runtime";
34474
34457
  function SimpleNavigation({
34475
34458
  title,
@@ -34484,7 +34467,7 @@ function SimpleNavigation({
34484
34467
  }) {
34485
34468
  const ChevronLeftIcon = icons.chevronLeft;
34486
34469
  const BarsIcon = icons.bars;
34487
- const [isDropdownOpen, setIsDropdownOpen] = useState37(false);
34470
+ const [isDropdownOpen, setIsDropdownOpen] = useState36(false);
34488
34471
  const dropdownRef = useRef28(null);
34489
34472
  const semiont = useSemiont();
34490
34473
  const toggleDropdown = () => setIsDropdownOpen(!isDropdownOpen);
@@ -34565,14 +34548,14 @@ function SimpleNavigation({
34565
34548
  }
34566
34549
 
34567
34550
  // src/components/navigation/CollapsibleResourceNavigation.tsx
34568
- import { useCallback as useCallback32, useState as useState41, useRef as useRef33, useEffect as useEffect46 } from "react";
34551
+ import { useCallback as useCallback31, useState as useState40, useRef as useRef33, useEffect as useEffect46 } from "react";
34569
34552
 
34570
34553
  // ../../node_modules/@dnd-kit/core/dist/core.esm.js
34571
- import React18, { createContext as createContext5, useContext as useContext5, useEffect as useEffect43, useState as useState39, useCallback as useCallback29, useMemo as useMemo16, useRef as useRef30, memo as memo3, useReducer, cloneElement, forwardRef } from "react";
34554
+ import React18, { createContext as createContext5, useContext as useContext5, useEffect as useEffect43, useState as useState38, useCallback as useCallback28, useMemo as useMemo16, useRef as useRef30, memo as memo3, useReducer, cloneElement, forwardRef } from "react";
34572
34555
  import { createPortal, unstable_batchedUpdates } from "react-dom";
34573
34556
 
34574
34557
  // ../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js
34575
- import { useMemo as useMemo15, useLayoutEffect, useEffect as useEffect42, useRef as useRef29, useCallback as useCallback27 } from "react";
34558
+ import { useMemo as useMemo15, useLayoutEffect, useEffect as useEffect42, useRef as useRef29, useCallback as useCallback26 } from "react";
34576
34559
  function useCombinedRefs() {
34577
34560
  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
34578
34561
  refs[_key] = arguments[_key];
@@ -34646,7 +34629,7 @@ function useEvent(handler) {
34646
34629
  useIsomorphicLayoutEffect(() => {
34647
34630
  handlerRef.current = handler;
34648
34631
  });
34649
- return useCallback27(function() {
34632
+ return useCallback26(function() {
34650
34633
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
34651
34634
  args[_key] = arguments[_key];
34652
34635
  }
@@ -34655,10 +34638,10 @@ function useEvent(handler) {
34655
34638
  }
34656
34639
  function useInterval() {
34657
34640
  const intervalRef = useRef29(null);
34658
- const set = useCallback27((listener, duration) => {
34641
+ const set = useCallback26((listener, duration) => {
34659
34642
  intervalRef.current = setInterval(listener, duration);
34660
34643
  }, []);
34661
- const clear = useCallback27(() => {
34644
+ const clear = useCallback26(() => {
34662
34645
  if (intervalRef.current !== null) {
34663
34646
  clearInterval(intervalRef.current);
34664
34647
  intervalRef.current = null;
@@ -34693,7 +34676,7 @@ function useLazyMemo(callback, dependencies) {
34693
34676
  function useNodeRef(onChange) {
34694
34677
  const onChangeHandler = useEvent(onChange);
34695
34678
  const node = useRef29(null);
34696
- const setNodeRef = useCallback27(
34679
+ const setNodeRef = useCallback26(
34697
34680
  (element) => {
34698
34681
  if (element !== node.current) {
34699
34682
  onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);
@@ -34848,7 +34831,7 @@ function findFirstFocusableNode(element) {
34848
34831
  }
34849
34832
 
34850
34833
  // ../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
34851
- import React17, { useState as useState38, useCallback as useCallback28 } from "react";
34834
+ import React17, { useState as useState37, useCallback as useCallback27 } from "react";
34852
34835
  var hiddenStyles = {
34853
34836
  display: "none"
34854
34837
  };
@@ -34891,8 +34874,8 @@ function LiveRegion(_ref) {
34891
34874
  }, announcement);
34892
34875
  }
34893
34876
  function useAnnouncement() {
34894
- const [announcement, setAnnouncement] = useState38("");
34895
- const announce = useCallback28((value) => {
34877
+ const [announcement, setAnnouncement] = useState37("");
34878
+ const announce = useCallback27((value) => {
34896
34879
  if (value != null) {
34897
34880
  setAnnouncement(value);
34898
34881
  }
@@ -34916,12 +34899,12 @@ function useDndMonitor(listener) {
34916
34899
  }, [listener, registerListener]);
34917
34900
  }
34918
34901
  function useDndMonitorProvider() {
34919
- const [listeners] = useState39(() => /* @__PURE__ */ new Set());
34920
- const registerListener = useCallback29((listener) => {
34902
+ const [listeners] = useState38(() => /* @__PURE__ */ new Set());
34903
+ const registerListener = useCallback28((listener) => {
34921
34904
  listeners.add(listener);
34922
34905
  return () => listeners.delete(listener);
34923
34906
  }, [listeners]);
34924
- const dispatch = useCallback29((_ref) => {
34907
+ const dispatch = useCallback28((_ref) => {
34925
34908
  let {
34926
34909
  type,
34927
34910
  event
@@ -34982,7 +34965,7 @@ function Accessibility(_ref) {
34982
34965
  announcement
34983
34966
  } = useAnnouncement();
34984
34967
  const liveRegionId = useUniqueId("DndLiveRegion");
34985
- const [mounted, setMounted] = useState39(false);
34968
+ const [mounted, setMounted] = useState38(false);
34986
34969
  useEffect43(() => {
34987
34970
  setMounted(true);
34988
34971
  }, []);
@@ -36341,7 +36324,7 @@ function useAutoScroller(_ref) {
36341
36324
  }
36342
36325
  }, [activator, draggingRect, pointerCoordinates]);
36343
36326
  const scrollContainerRef = useRef30(null);
36344
- const autoScroll = useCallback29(() => {
36327
+ const autoScroll = useCallback28(() => {
36345
36328
  const scrollContainer = scrollContainerRef.current;
36346
36329
  if (!scrollContainer) {
36347
36330
  return;
@@ -36492,7 +36475,7 @@ function useDroppableMeasuring(containers, _ref) {
36492
36475
  dependencies,
36493
36476
  config
36494
36477
  } = _ref;
36495
- const [queue, setQueue] = useState39(null);
36478
+ const [queue, setQueue] = useState38(null);
36496
36479
  const {
36497
36480
  frequency,
36498
36481
  measure,
@@ -36501,7 +36484,7 @@ function useDroppableMeasuring(containers, _ref) {
36501
36484
  const containersRef = useRef30(containers);
36502
36485
  const disabled = isDisabled();
36503
36486
  const disabledRef = useLatestValue(disabled);
36504
- const measureDroppableContainers = useCallback29(function(ids2) {
36487
+ const measureDroppableContainers = useCallback28(function(ids2) {
36505
36488
  if (ids2 === void 0) {
36506
36489
  ids2 = [];
36507
36490
  }
@@ -36657,7 +36640,7 @@ function useRect(element, measure, fallbackRect2) {
36657
36640
  if (measure === void 0) {
36658
36641
  measure = defaultMeasure;
36659
36642
  }
36660
- const [rect, setRect] = useState39(null);
36643
+ const [rect, setRect] = useState38(null);
36661
36644
  function measureRect() {
36662
36645
  setRect((currentRect) => {
36663
36646
  if (!element) {
@@ -36731,9 +36714,9 @@ function useScrollableAncestors(node) {
36731
36714
  return ancestors;
36732
36715
  }
36733
36716
  function useScrollOffsets(elements) {
36734
- const [scrollCoordinates, setScrollCoordinates] = useState39(null);
36717
+ const [scrollCoordinates, setScrollCoordinates] = useState38(null);
36735
36718
  const prevElements = useRef30(elements);
36736
- const handleScroll = useCallback29((event) => {
36719
+ const handleScroll = useCallback28((event) => {
36737
36720
  const scrollingElement = getScrollableElement(event.target);
36738
36721
  if (!scrollingElement) {
36739
36722
  return;
@@ -36856,7 +36839,7 @@ function useRects(elements, measure) {
36856
36839
  }
36857
36840
  const [firstElement] = elements;
36858
36841
  const windowRect2 = useWindowRect(firstElement ? getWindow(firstElement) : null);
36859
- const [rects, setRects] = useState39(defaultValue$2);
36842
+ const [rects, setRects] = useState38(defaultValue$2);
36860
36843
  function measureRects() {
36861
36844
  setRects(() => {
36862
36845
  if (!elements.length) {
@@ -36889,8 +36872,8 @@ function useDragOverlayMeasuring(_ref) {
36889
36872
  let {
36890
36873
  measure
36891
36874
  } = _ref;
36892
- const [rect, setRect] = useState39(null);
36893
- const handleResize = useCallback29((entries) => {
36875
+ const [rect, setRect] = useState38(null);
36876
+ const handleResize = useCallback28((entries) => {
36894
36877
  for (const {
36895
36878
  target
36896
36879
  } of entries) {
@@ -36910,7 +36893,7 @@ function useDragOverlayMeasuring(_ref) {
36910
36893
  const resizeObserver = useResizeObserver({
36911
36894
  callback: handleResize
36912
36895
  });
36913
- const handleNodeChange = useCallback29((element) => {
36896
+ const handleNodeChange = useCallback28((element) => {
36914
36897
  const node = getMeasurableNode(element);
36915
36898
  resizeObserver == null ? void 0 : resizeObserver.disconnect();
36916
36899
  if (node) {
@@ -37290,7 +37273,7 @@ var DndContext = /* @__PURE__ */ memo3(function DndContext2(_ref) {
37290
37273
  const store = useReducer(reducer, void 0, getInitialState);
37291
37274
  const [state, dispatch] = store;
37292
37275
  const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();
37293
- const [status, setStatus] = useState39(Status.Uninitialized);
37276
+ const [status, setStatus] = useState38(Status.Uninitialized);
37294
37277
  const isInitialized = status === Status.Initialized;
37295
37278
  const {
37296
37279
  draggable: {
@@ -37317,8 +37300,8 @@ var DndContext = /* @__PURE__ */ memo3(function DndContext2(_ref) {
37317
37300
  } : null;
37318
37301
  }, [activeId, node]);
37319
37302
  const activeRef = useRef30(null);
37320
- const [activeSensor, setActiveSensor] = useState39(null);
37321
- const [activatorEvent, setActivatorEvent] = useState39(null);
37303
+ const [activeSensor, setActiveSensor] = useState38(null);
37304
+ const [activatorEvent, setActivatorEvent] = useState38(null);
37322
37305
  const latestProps = useLatestValue(props, Object.values(props));
37323
37306
  const draggableDescribedById = useUniqueId("DndDescribedBy", id2);
37324
37307
  const enabledDroppableContainers = useMemo16(() => droppableContainers.getEnabled(), [droppableContainers]);
@@ -37402,11 +37385,11 @@ var DndContext = /* @__PURE__ */ memo3(function DndContext2(_ref) {
37402
37385
  pointerCoordinates
37403
37386
  }) : null;
37404
37387
  const overId = getFirstCollision(collisions, "id");
37405
- const [over, setOver] = useState39(null);
37388
+ const [over, setOver] = useState38(null);
37406
37389
  const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);
37407
37390
  const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);
37408
37391
  const activeSensorRef = useRef30(null);
37409
- const instantiateSensor = useCallback29(
37392
+ const instantiateSensor = useCallback28(
37410
37393
  (event, _ref2) => {
37411
37394
  let {
37412
37395
  sensor: Sensor,
@@ -37564,7 +37547,7 @@ var DndContext = /* @__PURE__ */ memo3(function DndContext2(_ref) {
37564
37547
  // eslint-disable-next-line react-hooks/exhaustive-deps
37565
37548
  [draggableNodes]
37566
37549
  );
37567
- const bindActivatorToSensorInstantiator = useCallback29((handler, sensor) => {
37550
+ const bindActivatorToSensorInstantiator = useCallback28((handler, sensor) => {
37568
37551
  return (event, active2) => {
37569
37552
  const nativeEvent = event.nativeEvent;
37570
37553
  const activeDraggableNode = draggableNodes.get(active2);
@@ -37879,7 +37862,7 @@ function useDroppable(_ref) {
37879
37862
  ...resizeObserverConfig
37880
37863
  };
37881
37864
  const ids2 = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id2);
37882
- const handleResize = useCallback29(
37865
+ const handleResize = useCallback28(
37883
37866
  () => {
37884
37867
  if (!resizeObserverConnected.current) {
37885
37868
  resizeObserverConnected.current = true;
@@ -37900,7 +37883,7 @@ function useDroppable(_ref) {
37900
37883
  callback: handleResize,
37901
37884
  disabled: resizeObserverDisabled || !active
37902
37885
  });
37903
- const handleNodeChange = useCallback29((newElement, previousElement) => {
37886
+ const handleNodeChange = useCallback28((newElement, previousElement) => {
37904
37887
  if (!resizeObserver) {
37905
37888
  return;
37906
37889
  }
@@ -37966,7 +37949,7 @@ function useDroppable(_ref) {
37966
37949
  }
37967
37950
 
37968
37951
  // ../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js
37969
- import React19, { useMemo as useMemo17, useRef as useRef31, useEffect as useEffect44, useState as useState40, useContext as useContext6 } from "react";
37952
+ import React19, { useMemo as useMemo17, useRef as useRef31, useEffect as useEffect44, useState as useState39, useContext as useContext6 } from "react";
37970
37953
  function arrayMove(array, from, to) {
37971
37954
  const newArray = array.slice();
37972
37955
  newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);
@@ -38207,7 +38190,7 @@ function useDerivedTransform(_ref) {
38207
38190
  node,
38208
38191
  rect
38209
38192
  } = _ref;
38210
- const [derivedTransform, setDerivedtransform] = useState40(null);
38193
+ const [derivedTransform, setDerivedtransform] = useState39(null);
38211
38194
  const previousIndex = useRef31(index);
38212
38195
  useIsomorphicLayoutEffect(() => {
38213
38196
  if (!disabled && index !== previousIndex.current && node.current) {
@@ -38549,7 +38532,7 @@ function isAfter(a15, b8) {
38549
38532
  }
38550
38533
 
38551
38534
  // src/components/navigation/SortableResourceTab.tsx
38552
- import { useCallback as useCallback30, useRef as useRef32, useEffect as useEffect45 } from "react";
38535
+ import { useCallback as useCallback29, useRef as useRef32, useEffect as useEffect45 } from "react";
38553
38536
  import { jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
38554
38537
  function SortableResourceTab({
38555
38538
  resource,
@@ -38584,7 +38567,7 @@ function SortableResourceTab({
38584
38567
  const iconEmoji = getResourceIcon(resource.mediaType);
38585
38568
  const isCurrentlyDragging = isSortableDragging || isDragging;
38586
38569
  const tooltipText = resource.storageUri ? resource.storageUri.replace(/^file:\/\//, "") : resource.name;
38587
- const handleKeyDown = useCallback30((e6) => {
38570
+ const handleKeyDown = useCallback29((e6) => {
38588
38571
  if (onReorderRef.current && e6.altKey) {
38589
38572
  if (e6.key === "ArrowUp") {
38590
38573
  e6.preventDefault();
@@ -38637,37 +38620,37 @@ function SortableResourceTab({
38637
38620
  }
38638
38621
 
38639
38622
  // src/hooks/useDragAnnouncements.ts
38640
- import { useCallback as useCallback31 } from "react";
38623
+ import { useCallback as useCallback30 } from "react";
38641
38624
  function useDragAnnouncements() {
38642
38625
  const { announce } = useLiveRegion();
38643
- const announceReorder = useCallback31((message) => {
38626
+ const announceReorder = useCallback30((message) => {
38644
38627
  announce(message, "assertive");
38645
38628
  }, [announce]);
38646
- const announcePickup = useCallback31((resourceName, position, total) => {
38629
+ const announcePickup = useCallback30((resourceName, position, total) => {
38647
38630
  announce(
38648
38631
  `Picked up ${resourceName}. Position ${position} of ${total}. Use arrow keys to move, space to drop.`,
38649
38632
  "assertive"
38650
38633
  );
38651
38634
  }, [announce]);
38652
- const announceDrop = useCallback31((resourceName, newPosition, total) => {
38635
+ const announceDrop = useCallback30((resourceName, newPosition, total) => {
38653
38636
  announce(
38654
38637
  `Dropped ${resourceName} at position ${newPosition} of ${total}.`,
38655
38638
  "assertive"
38656
38639
  );
38657
38640
  }, [announce]);
38658
- const announceMove = useCallback31((resourceName, direction, newPosition, total) => {
38641
+ const announceMove = useCallback30((resourceName, direction, newPosition, total) => {
38659
38642
  announce(
38660
38643
  `Moved ${resourceName} ${direction} to position ${newPosition} of ${total}.`,
38661
38644
  "polite"
38662
38645
  );
38663
38646
  }, [announce]);
38664
- const announceKeyboardReorder = useCallback31((resourceName, direction, newPosition, total) => {
38647
+ const announceKeyboardReorder = useCallback30((resourceName, direction, newPosition, total) => {
38665
38648
  announce(
38666
38649
  `${resourceName} moved ${direction} to position ${newPosition} of ${total}.`,
38667
38650
  "assertive"
38668
38651
  );
38669
38652
  }, [announce]);
38670
- const announceCannotMove = useCallback31((direction) => {
38653
+ const announceCannotMove = useCallback30((direction) => {
38671
38654
  announce(
38672
38655
  `Cannot move ${direction}. Already at the ${direction === "up" ? "top" : "bottom"} of the list.`,
38673
38656
  "polite"
@@ -38700,7 +38683,7 @@ function CollapsibleResourceNavigation({
38700
38683
  }) {
38701
38684
  const ChevronLeftIcon = icons.chevronLeft;
38702
38685
  const BarsIcon = icons.bars;
38703
- const [isDropdownOpen, setIsDropdownOpen] = useState41(false);
38686
+ const [isDropdownOpen, setIsDropdownOpen] = useState40(false);
38704
38687
  const dropdownRef = useRef33(null);
38705
38688
  const { announcePickup, announceDrop, announceKeyboardReorder, announceCannotMove } = useDragAnnouncements();
38706
38689
  const t12 = useTranslations("CollapsibleResourceNavigation");
@@ -38738,7 +38721,7 @@ function CollapsibleResourceNavigation({
38738
38721
  coordinateGetter: sortableKeyboardCoordinates
38739
38722
  })
38740
38723
  );
38741
- const handleKeyboardReorder = useCallback32((resourceId2, direction) => {
38724
+ const handleKeyboardReorder = useCallback31((resourceId2, direction) => {
38742
38725
  const currentIndex = resources.findIndex((r13) => r13.id === resourceId2);
38743
38726
  if (currentIndex === -1) return;
38744
38727
  const newIndex = direction === "up" ? currentIndex - 1 : currentIndex + 1;
@@ -38914,10 +38897,11 @@ function CollapsibleResourceNavigation({
38914
38897
  }
38915
38898
 
38916
38899
  // src/components/modals/ReferenceWizardModal.tsx
38917
- import { useState as useState45, useEffect as useEffect48, useCallback as useCallback33 } from "react";
38900
+ import { useState as useState44, useEffect as useEffect48, useCallback as useCallback32 } from "react";
38901
+ import { uuidV4 } from "@semiont/core";
38918
38902
 
38919
38903
  // src/components/modals/GatherContextStep.tsx
38920
- import { useState as useState42, useEffect as useEffect47, useRef as useRef34 } from "react";
38904
+ import { useState as useState41, useEffect as useEffect47, useRef as useRef34 } from "react";
38921
38905
 
38922
38906
  // src/components/modals/ContextSummary.tsx
38923
38907
  import { deriveViews } from "@semiont/core";
@@ -38984,7 +38968,7 @@ function GatherContextStep({
38984
38968
  onCompose,
38985
38969
  translations: t12
38986
38970
  }) {
38987
- const [sourceExpanded, setSourceExpanded] = useState42(false);
38971
+ const [sourceExpanded, setSourceExpanded] = useState41(false);
38988
38972
  const contextReady = !contextLoading && !contextError && !!context;
38989
38973
  const focus = context?.focus.kind === "annotation" ? context.focus : null;
38990
38974
  const resourceFocus = context?.focus.kind === "resource" ? context.focus : null;
@@ -39130,7 +39114,7 @@ function GatherContextStep({
39130
39114
  }
39131
39115
 
39132
39116
  // src/components/modals/ConfigureGenerationStep.tsx
39133
- import { useState as useState43 } from "react";
39117
+ import { useState as useState42 } from "react";
39134
39118
  import { LOCALES as LOCALES2 } from "@semiont/core";
39135
39119
  import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
39136
39120
  function ConfigureGenerationStep({
@@ -39142,12 +39126,12 @@ function ConfigureGenerationStep({
39142
39126
  onGenerate,
39143
39127
  translations: t12
39144
39128
  }) {
39145
- const [title, setTitle] = useState43(defaultTitle);
39146
- const [storagePath, setStoragePath] = useState43("");
39147
- const [prompt, setPrompt] = useState43("");
39148
- const [language2, setLanguage] = useState43(locale);
39149
- const [temperature, setTemperature] = useState43(0.7);
39150
- const [maxTokens, setMaxTokens] = useState43(500);
39129
+ const [title, setTitle] = useState42(defaultTitle);
39130
+ const [storagePath, setStoragePath] = useState42("");
39131
+ const [prompt, setPrompt] = useState42("");
39132
+ const [language2, setLanguage] = useState42(locale);
39133
+ const [temperature, setTemperature] = useState42(0.7);
39134
+ const [maxTokens, setMaxTokens] = useState42(500);
39151
39135
  const handleSubmit = (e6) => {
39152
39136
  e6.preventDefault();
39153
39137
  const trimmedPrompt = prompt.trim();
@@ -39306,7 +39290,7 @@ function ConfigureGenerationStep({
39306
39290
  }
39307
39291
 
39308
39292
  // src/components/modals/ConfigureSearchStep.tsx
39309
- import { useState as useState44 } from "react";
39293
+ import { useState as useState43 } from "react";
39310
39294
  import { jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
39311
39295
  function ConfigureSearchStep({
39312
39296
  isSearching = false,
@@ -39315,8 +39299,8 @@ function ConfigureSearchStep({
39315
39299
  onSearch,
39316
39300
  translations: t12
39317
39301
  }) {
39318
- const [limit, setLimit] = useState44(10);
39319
- const [useSemanticScoring, setUseSemanticScoring] = useState44(true);
39302
+ const [limit, setLimit] = useState43(10);
39303
+ const [useSemanticScoring, setUseSemanticScoring] = useState43(true);
39320
39304
  const handleSubmit = (e6) => {
39321
39305
  e6.preventDefault();
39322
39306
  onSearch({ limit, useSemanticScoring });
@@ -39508,9 +39492,9 @@ function ReferenceWizardModal({
39508
39492
  translations: t12
39509
39493
  }) {
39510
39494
  const session = useObservable(useSemiont().activeSession$);
39511
- const [wizardStep, setWizardStep] = useState45({ step: "gather" });
39512
- const [isSearching, setIsSearching] = useState45(false);
39513
- const [userHint, setUserHint] = useState45("");
39495
+ const [wizardStep, setWizardStep] = useState44({ step: "gather" });
39496
+ const [isSearching, setIsSearching] = useState44(false);
39497
+ const [userHint, setUserHint] = useState44("");
39514
39498
  useEffect48(() => {
39515
39499
  if (isOpen) {
39516
39500
  setWizardStep({ step: "gather" });
@@ -39525,27 +39509,27 @@ function ReferenceWizardModal({
39525
39509
  setWizardStep({ step: "search-results", results: event.response });
39526
39510
  }
39527
39511
  });
39528
- const handleBind = useCallback33(() => {
39512
+ const handleBind = useCallback32(() => {
39529
39513
  setWizardStep({ step: "configure-search" });
39530
39514
  }, []);
39531
- const handleGenerate = useCallback33(() => {
39515
+ const handleGenerate = useCallback32(() => {
39532
39516
  setWizardStep({ step: "configure-generation" });
39533
39517
  }, []);
39534
- const handleCompose = useCallback33(() => {
39518
+ const handleCompose = useCallback32(() => {
39535
39519
  if (!context || !annotationId2 || !resourceId2) return;
39536
39520
  const contextWithHint = userHint ? { ...context, userHint } : context;
39537
39521
  onComposeNavigate(contextWithHint, annotationId2, resourceId2, defaultTitle, entityTypes);
39538
39522
  onClose();
39539
39523
  }, [context, annotationId2, resourceId2, defaultTitle, entityTypes, onComposeNavigate, onClose, userHint]);
39540
- const handleBackToGather = useCallback33(() => {
39524
+ const handleBackToGather = useCallback32(() => {
39541
39525
  setWizardStep({ step: "gather" });
39542
39526
  }, []);
39543
- const handleSearchSubmit = useCallback33((config) => {
39527
+ const handleSearchSubmit = useCallback32((config) => {
39544
39528
  if (!annotationId2 || !context || !resourceId2) return;
39545
39529
  setIsSearching(true);
39546
39530
  const contextWithHint = userHint ? { ...context, userHint } : context;
39547
39531
  session?.client.match.requestSearch({
39548
- correlationId: crypto.randomUUID(),
39532
+ correlationId: uuidV4(),
39549
39533
  resourceId: resourceId2,
39550
39534
  referenceId: annotationId2,
39551
39535
  context: contextWithHint,
@@ -39553,12 +39537,12 @@ function ReferenceWizardModal({
39553
39537
  useSemanticScoring: config.useSemanticScoring
39554
39538
  });
39555
39539
  }, [annotationId2, resourceId2, context, session, userHint]);
39556
- const handleGenerateSubmit = useCallback33((config) => {
39540
+ const handleGenerateSubmit = useCallback32((config) => {
39557
39541
  if (!annotationId2) return;
39558
39542
  onGenerateSubmit(annotationId2, config);
39559
39543
  onClose();
39560
39544
  }, [annotationId2, onGenerateSubmit, onClose]);
39561
- const handleLink = useCallback33((targetResourceId) => {
39545
+ const handleLink = useCallback32((targetResourceId) => {
39562
39546
  if (!annotationId2) return;
39563
39547
  onLinkResource(annotationId2, targetResourceId);
39564
39548
  onClose();
@@ -39700,16 +39684,16 @@ function ReferenceWizardModal({
39700
39684
  }
39701
39685
 
39702
39686
  // src/components/modals/ResourceGenerateModal.tsx
39703
- import { useState as useState47, useEffect as useEffect49, useCallback as useCallback34 } from "react";
39687
+ import { useState as useState46, useEffect as useEffect49, useCallback as useCallback33 } from "react";
39704
39688
 
39705
39689
  // src/components/modals/ConfigureGatherStep.tsx
39706
- import { useState as useState46 } from "react";
39690
+ import { useState as useState45 } from "react";
39707
39691
  import { jsx as jsx59, jsxs as jsxs50 } from "react/jsx-runtime";
39708
39692
  function ConfigureGatherStep({ defaults, onGather, onCancel, translations: t12, children }) {
39709
- const [includeContent, setIncludeContent] = useState46(defaults?.includeContent ?? true);
39710
- const [includeSummary, setIncludeSummary] = useState46(defaults?.includeSummary ?? true);
39711
- const [depth, setDepth] = useState46(defaults?.depth ?? 2);
39712
- const [maxResources, setMaxResources] = useState46(defaults?.maxResources ?? 10);
39693
+ const [includeContent, setIncludeContent] = useState45(defaults?.includeContent ?? true);
39694
+ const [includeSummary, setIncludeSummary] = useState45(defaults?.includeSummary ?? true);
39695
+ const [depth, setDepth] = useState45(defaults?.depth ?? 2);
39696
+ const [maxResources, setMaxResources] = useState45(defaults?.maxResources ?? 10);
39713
39697
  const handleSubmit = (e6) => {
39714
39698
  e6.preventDefault();
39715
39699
  onGather({ includeContent, includeSummary, depth, maxResources });
@@ -39783,9 +39767,9 @@ function ResourceGenerateModal({
39783
39767
  onGenerateSubmit,
39784
39768
  translations: t12
39785
39769
  }) {
39786
- const [step, setStep] = useState47("configure-gather");
39770
+ const [step, setStep] = useState46("configure-gather");
39787
39771
  const { context, loading, error, gather, reset } = useResourceGather();
39788
- const [excludeEntityTypes, setExcludeEntityTypes] = useState47([]);
39772
+ const [excludeEntityTypes, setExcludeEntityTypes] = useState46([]);
39789
39773
  useEffect49(() => {
39790
39774
  if (isOpen) {
39791
39775
  setStep("configure-gather");
@@ -39793,14 +39777,14 @@ function ResourceGenerateModal({
39793
39777
  reset();
39794
39778
  }
39795
39779
  }, [isOpen, reset]);
39796
- const handleGather = useCallback34((config) => {
39780
+ const handleGather = useCallback33((config) => {
39797
39781
  setStep("review");
39798
39782
  void gather(resourceId2, {
39799
39783
  ...config,
39800
39784
  ...excludeEntityTypes.length ? { excludeEntityTypes } : {}
39801
39785
  });
39802
39786
  }, [gather, resourceId2, excludeEntityTypes]);
39803
- const handleGenerate = useCallback34((config) => {
39787
+ const handleGenerate = useCallback33((config) => {
39804
39788
  onGenerateSubmit(resourceId2, config);
39805
39789
  onClose();
39806
39790
  }, [onGenerateSubmit, resourceId2, onClose]);
@@ -39952,20 +39936,20 @@ function ResourceGenerateModal({
39952
39936
  }
39953
39937
 
39954
39938
  // src/components/modals/SearchModal.tsx
39955
- import { useState as useState48, useEffect as useEffect50, useRef as useRef35 } from "react";
39939
+ import { useState as useState47, useEffect as useEffect50, useRef as useRef35 } from "react";
39956
39940
  import { readyValue as readyValue2 } from "@semiont/sdk";
39957
39941
  var import_operators = __toESM(require_operators(), 1);
39958
39942
  import { getResourceId } from "@semiont/core";
39959
39943
  import { createSearchPipeline } from "@semiont/sdk";
39960
39944
 
39961
39945
  // src/hooks/useSearchAnnouncements.ts
39962
- import { useCallback as useCallback35 } from "react";
39946
+ import { useCallback as useCallback34 } from "react";
39963
39947
  function useSearchAnnouncements2() {
39964
39948
  const { announce } = useLiveRegion();
39965
- const announceSearching = useCallback35(() => {
39949
+ const announceSearching = useCallback34(() => {
39966
39950
  announce("Searching...", "polite");
39967
39951
  }, [announce]);
39968
- const announceSearchResults = useCallback35((count2, query) => {
39952
+ const announceSearchResults = useCallback34((count2, query) => {
39969
39953
  if (count2 === 0) {
39970
39954
  announce(`No results found for ${query}`, "polite");
39971
39955
  } else if (count2 === 1) {
@@ -39974,10 +39958,10 @@ function useSearchAnnouncements2() {
39974
39958
  announce(`${count2} results found for ${query}`, "polite");
39975
39959
  }
39976
39960
  }, [announce]);
39977
- const announceSelection = useCallback35((name2, type) => {
39961
+ const announceSelection = useCallback34((name2, type) => {
39978
39962
  announce(`Selected ${type}: ${name2}. Press Enter to navigate.`, "polite");
39979
39963
  }, [announce]);
39980
- const announceNavigation = useCallback35((name2, type) => {
39964
+ const announceNavigation = useCallback34((name2, type) => {
39981
39965
  announce(`Navigating to ${type}: ${name2}`, "assertive");
39982
39966
  }, [announce]);
39983
39967
  return {
@@ -40002,7 +39986,7 @@ function SearchModal({
40002
39986
  const semiont = useObservable(useSemiont().activeSession$)?.client;
40003
39987
  const semiontRef = useRef35(semiont);
40004
39988
  semiontRef.current = semiont;
40005
- const [selectedIndex, setSelectedIndex] = useState48(0);
39989
+ const [selectedIndex, setSelectedIndex] = useState47(0);
40006
39990
  const t12 = {
40007
39991
  placeholder: translations.placeholder || "Search resources, entities...",
40008
39992
  searching: translations.searching || "Searching...",
@@ -40014,7 +39998,7 @@ function SearchModal({
40014
39998
  enter: translations.enter || "Enter",
40015
39999
  esc: translations.esc || "ESC"
40016
40000
  };
40017
- const [pipeline] = useState48(
40001
+ const [pipeline] = useState47(
40018
40002
  () => createSearchPipeline(
40019
40003
  (q2) => semiontRef.current.browse.resources({ search: q2, limit: SEARCH_LIMIT }).pipe(
40020
40004
  (0, import_operators.map)((st) => {
@@ -40165,7 +40149,7 @@ function SearchModal({
40165
40149
  }
40166
40150
 
40167
40151
  // src/components/modals/ResourceSearchModal.tsx
40168
- import { useState as useState49, useEffect as useEffect51, useRef as useRef36 } from "react";
40152
+ import { useState as useState48, useEffect as useEffect51, useRef as useRef36 } from "react";
40169
40153
  import { readyValue as readyValue3 } from "@semiont/sdk";
40170
40154
  var import_operators2 = __toESM(require_operators(), 1);
40171
40155
  import { getResourceId as getResourceId2, getPrimaryRepresentation } from "@semiont/core";
@@ -40202,7 +40186,7 @@ function ResourceSearchModal({
40202
40186
  noResults: translations.noResults || "No documents found",
40203
40187
  close: translations.close || "\u2715"
40204
40188
  };
40205
- const [pipeline] = useState49(
40189
+ const [pipeline] = useState48(
40206
40190
  () => createSearchPipeline2(
40207
40191
  (q2) => semiontRef.current.browse.resources({ search: q2, limit: SEARCH_LIMIT2 }).pipe(
40208
40192
  (0, import_operators2.map)((st) => {
@@ -40344,7 +40328,7 @@ function SkipLinks() {
40344
40328
  }
40345
40329
 
40346
40330
  // src/components/StatusDisplay.tsx
40347
- import { useEffect as useEffect52, useState as useState50 } from "react";
40331
+ import { useEffect as useEffect52, useState as useState49 } from "react";
40348
40332
  import { jsx as jsx64, jsxs as jsxs55 } from "react/jsx-runtime";
40349
40333
  function StatusDisplay({
40350
40334
  isFullyAuthenticated = false,
@@ -40352,9 +40336,9 @@ function StatusDisplay({
40352
40336
  hasValidBackendToken = false
40353
40337
  }) {
40354
40338
  const semiont = useObservable(useSemiont().activeSession$)?.client;
40355
- const [data2, setData] = useState50(null);
40356
- const [loading, setLoading] = useState50(true);
40357
- const [error, setError] = useState50(null);
40339
+ const [data2, setData] = useState49(null);
40340
+ const [loading, setLoading] = useState49(true);
40341
+ const [error, setError] = useState49(null);
40358
40342
  useEffect52(() => {
40359
40343
  if (!semiont) {
40360
40344
  setLoading(false);
@@ -40447,11 +40431,11 @@ function SessionTimer() {
40447
40431
  }
40448
40432
 
40449
40433
  // src/components/SessionExpiryBanner.tsx
40450
- import { useState as useState51 } from "react";
40434
+ import { useState as useState50 } from "react";
40451
40435
  import { jsx as jsx65, jsxs as jsxs57 } from "react/jsx-runtime";
40452
40436
  function SessionExpiryBanner() {
40453
40437
  const { timeRemaining, isExpiringSoon } = useSessionExpiry();
40454
- const [dismissed, setDismissed] = useState51(false);
40438
+ const [dismissed, setDismissed] = useState50(false);
40455
40439
  const formattedTime = formatTime(timeRemaining);
40456
40440
  if (!isExpiringSoon || dismissed || !formattedTime) {
40457
40441
  return null;
@@ -40672,7 +40656,7 @@ function UnifiedHeader({
40672
40656
  }
40673
40657
 
40674
40658
  // src/components/layout/LeftSidebar.tsx
40675
- import { useState as useState52, useEffect as useEffect53 } from "react";
40659
+ import { useState as useState51, useEffect as useEffect53 } from "react";
40676
40660
  import { jsx as jsx69, jsxs as jsxs60 } from "react/jsx-runtime";
40677
40661
  function LeftSidebar({
40678
40662
  Link,
@@ -40687,7 +40671,7 @@ function LeftSidebar({
40687
40671
  isModerator = false,
40688
40672
  currentPath
40689
40673
  }) {
40690
- const [isCollapsed, setIsCollapsed] = useState52(false);
40674
+ const [isCollapsed, setIsCollapsed] = useState51(false);
40691
40675
  const { width, setWidth, minWidth, maxWidth } = usePanelWidth({
40692
40676
  defaultWidth: 256,
40693
40677
  // 16rem
@@ -41567,7 +41551,6 @@ import { jsx as jsx76, jsxs as jsxs65 } from "react/jsx-runtime";
41567
41551
  function AdminDevOpsPage({
41568
41552
  suggestedFeatures,
41569
41553
  theme: theme2,
41570
- showLineNumbers,
41571
41554
  activePanel,
41572
41555
  translations: t12,
41573
41556
  StatusDisplay: StatusDisplay2,
@@ -41619,8 +41602,7 @@ function AdminDevOpsPage({
41619
41602
  ToolbarPanels,
41620
41603
  {
41621
41604
  activePanel,
41622
- theme: theme2,
41623
- showLineNumbers
41605
+ theme: theme2
41624
41606
  }
41625
41607
  ),
41626
41608
  /* @__PURE__ */ jsx76(
@@ -41653,7 +41635,7 @@ function ExportCard({ onExport, isExporting, translations: t12 }) {
41653
41635
  }
41654
41636
 
41655
41637
  // src/features/admin-exchange/components/ImportCard.tsx
41656
- import { useRef as useRef37, useState as useState53, useCallback as useCallback36 } from "react";
41638
+ import { useRef as useRef37, useState as useState52, useCallback as useCallback35 } from "react";
41657
41639
  import { jsx as jsx78, jsxs as jsxs67 } from "react/jsx-runtime";
41658
41640
  function ImportCard({
41659
41641
  onFileSelected,
@@ -41665,23 +41647,23 @@ function ImportCard({
41665
41647
  translations: t12
41666
41648
  }) {
41667
41649
  const fileInputRef = useRef37(null);
41668
- const [isDragActive, setIsDragActive] = useState53(false);
41669
- const [showConfirm, setShowConfirm] = useState53(false);
41670
- const handleDragOver = useCallback36((e6) => {
41650
+ const [isDragActive, setIsDragActive] = useState52(false);
41651
+ const [showConfirm, setShowConfirm] = useState52(false);
41652
+ const handleDragOver = useCallback35((e6) => {
41671
41653
  e6.preventDefault();
41672
41654
  setIsDragActive(true);
41673
41655
  }, []);
41674
- const handleDragLeave = useCallback36(() => {
41656
+ const handleDragLeave = useCallback35(() => {
41675
41657
  setIsDragActive(false);
41676
41658
  }, []);
41677
- const handleDrop = useCallback36((e6) => {
41659
+ const handleDrop = useCallback35((e6) => {
41678
41660
  e6.preventDefault();
41679
41661
  setIsDragActive(false);
41680
41662
  setShowConfirm(false);
41681
41663
  const file = e6.dataTransfer.files[0];
41682
41664
  if (file) onFileSelected(file);
41683
41665
  }, [onFileSelected]);
41684
- const handleFileChange = useCallback36((e6) => {
41666
+ const handleFileChange = useCallback35((e6) => {
41685
41667
  setShowConfirm(false);
41686
41668
  const file = e6.target.files?.[0];
41687
41669
  if (file) onFileSelected(file);
@@ -41840,7 +41822,6 @@ function AdminExchangePage({
41840
41822
  importMessage,
41841
41823
  importResult,
41842
41824
  theme: theme2,
41843
- showLineNumbers,
41844
41825
  activePanel,
41845
41826
  translations: t12,
41846
41827
  ToolbarPanels,
@@ -41889,8 +41870,7 @@ function AdminExchangePage({
41889
41870
  ToolbarPanels,
41890
41871
  {
41891
41872
  activePanel,
41892
- theme: theme2,
41893
- showLineNumbers
41873
+ theme: theme2
41894
41874
  }
41895
41875
  ),
41896
41876
  /* @__PURE__ */ jsx80(
@@ -41911,7 +41891,6 @@ function AdminSecurityPage({
41911
41891
  allowedDomains,
41912
41892
  isLoading,
41913
41893
  theme: theme2,
41914
- showLineNumbers,
41915
41894
  activePanel,
41916
41895
  translations: t12,
41917
41896
  ToolbarPanels,
@@ -41984,8 +41963,7 @@ function AdminSecurityPage({
41984
41963
  ToolbarPanels,
41985
41964
  {
41986
41965
  activePanel,
41987
- theme: theme2,
41988
- showLineNumbers
41966
+ theme: theme2
41989
41967
  }
41990
41968
  ),
41991
41969
  /* @__PURE__ */ jsx81(
@@ -42014,7 +41992,6 @@ function LinkedDataPage({
42014
41992
  importMessage,
42015
41993
  importResult,
42016
41994
  theme: theme2,
42017
- showLineNumbers,
42018
41995
  activePanel,
42019
41996
  translations: t12,
42020
41997
  ToolbarPanels,
@@ -42063,8 +42040,7 @@ function LinkedDataPage({
42063
42040
  ToolbarPanels,
42064
42041
  {
42065
42042
  activePanel,
42066
- theme: theme2,
42067
- showLineNumbers
42043
+ theme: theme2
42068
42044
  }
42069
42045
  ),
42070
42046
  /* @__PURE__ */ jsx82(
@@ -42079,7 +42055,7 @@ function LinkedDataPage({
42079
42055
  }
42080
42056
 
42081
42057
  // src/features/admin-users/components/AdminUsersPage.tsx
42082
- import { useState as useState54 } from "react";
42058
+ import { useState as useState53 } from "react";
42083
42059
  import { Fragment as Fragment17, jsx as jsx83, jsxs as jsxs72 } from "react/jsx-runtime";
42084
42060
  function UserTableRow({
42085
42061
  user,
@@ -42154,16 +42130,15 @@ function AdminUsersPage({
42154
42130
  onAddUser,
42155
42131
  onExportUsers,
42156
42132
  theme: theme2,
42157
- showLineNumbers,
42158
42133
  activePanel,
42159
42134
  translations: t12,
42160
42135
  ToolbarPanels,
42161
42136
  Toolbar: Toolbar2,
42162
42137
  buttonStyles: buttonStyles2
42163
42138
  }) {
42164
- const [searchTerm, setSearchTerm] = useState54("");
42165
- const [selectedRole, setSelectedRole] = useState54("all");
42166
- const [selectedStatus, setSelectedStatus] = useState54("all");
42139
+ const [searchTerm, setSearchTerm] = useState53("");
42140
+ const [selectedRole, setSelectedRole] = useState53("all");
42141
+ const [selectedStatus, setSelectedStatus] = useState53("all");
42167
42142
  const filteredUsers = users.filter((user) => {
42168
42143
  const matchesSearch = (user.name || "").toLowerCase().includes(searchTerm.toLowerCase()) || user.email.toLowerCase().includes(searchTerm.toLowerCase());
42169
42144
  const userRole = user.isAdmin ? "admin" : "user";
@@ -42311,8 +42286,7 @@ function AdminUsersPage({
42311
42286
  ToolbarPanels,
42312
42287
  {
42313
42288
  activePanel,
42314
- theme: theme2,
42315
- showLineNumbers
42289
+ theme: theme2
42316
42290
  }
42317
42291
  ),
42318
42292
  /* @__PURE__ */ jsx83(
@@ -42551,7 +42525,7 @@ function SignInForm({
42551
42525
  }
42552
42526
 
42553
42527
  // src/features/auth/components/SignUpForm.tsx
42554
- import { useState as useState55 } from "react";
42528
+ import { useState as useState54 } from "react";
42555
42529
  import { jsx as jsx85, jsxs as jsxs74 } from "react/jsx-runtime";
42556
42530
  function GoogleIcon2() {
42557
42531
  return /* @__PURE__ */ jsxs74("svg", { className: "semiont-icon semiont-icon--small semiont-icon--inline", viewBox: "0 0 24 24", children: [
@@ -42586,7 +42560,7 @@ function GoogleIcon2() {
42586
42560
  ] });
42587
42561
  }
42588
42562
  function SignUpForm({ onSignUp, Link, translations: t12 }) {
42589
- const [isLoading, setIsLoading] = useState55(false);
42563
+ const [isLoading, setIsLoading] = useState54(false);
42590
42564
  const handleSignUp = async () => {
42591
42565
  setIsLoading(true);
42592
42566
  try {
@@ -42800,7 +42774,6 @@ function EntityTagsPage({
42800
42774
  onAddTag,
42801
42775
  isAddingTag,
42802
42776
  theme: theme2,
42803
- showLineNumbers,
42804
42777
  activePanel,
42805
42778
  translations: t12,
42806
42779
  ToolbarPanels,
@@ -42870,8 +42843,7 @@ function EntityTagsPage({
42870
42843
  ToolbarPanels,
42871
42844
  {
42872
42845
  activePanel,
42873
- theme: theme2,
42874
- showLineNumbers
42846
+ theme: theme2
42875
42847
  }
42876
42848
  ),
42877
42849
  /* @__PURE__ */ jsx88(
@@ -42890,7 +42862,6 @@ import { jsx as jsx89, jsxs as jsxs78 } from "react/jsx-runtime";
42890
42862
  function RecentDocumentsPage({
42891
42863
  isLoading,
42892
42864
  theme: theme2,
42893
- showLineNumbers,
42894
42865
  activePanel,
42895
42866
  translations: t12,
42896
42867
  ToolbarPanels,
@@ -42925,8 +42896,7 @@ function RecentDocumentsPage({
42925
42896
  ToolbarPanels,
42926
42897
  {
42927
42898
  activePanel,
42928
- theme: theme2,
42929
- showLineNumbers
42899
+ theme: theme2
42930
42900
  }
42931
42901
  ),
42932
42902
  /* @__PURE__ */ jsx89(
@@ -42956,7 +42926,6 @@ function TagSchemasPage({
42956
42926
  schemas,
42957
42927
  isLoading,
42958
42928
  theme: theme2,
42959
- showLineNumbers,
42960
42929
  activePanel,
42961
42930
  translations: t12,
42962
42931
  ToolbarPanels,
@@ -43027,8 +42996,7 @@ function TagSchemasPage({
43027
42996
  ToolbarPanels,
43028
42997
  {
43029
42998
  activePanel,
43030
- theme: theme2,
43031
- showLineNumbers
42999
+ theme: theme2
43032
43000
  }
43033
43001
  ),
43034
43002
  /* @__PURE__ */ jsx90(
@@ -43043,7 +43011,7 @@ function TagSchemasPage({
43043
43011
  }
43044
43012
 
43045
43013
  // src/features/resource-compose/components/ResourceComposePage.tsx
43046
- import { useState as useState56, useEffect as useEffect54 } from "react";
43014
+ import { useState as useState55, useEffect as useEffect54 } from "react";
43047
43015
  import { deriveViews as deriveViews2 } from "@semiont/core";
43048
43016
  import { capabilitiesOf as capabilitiesOf5, AUTHORABLE_MEDIA_TYPES, MEDIA_TYPES, mediaTypeForExtension, isSupportedMediaType, LOCALES as LOCALES3 } from "@semiont/core";
43049
43017
 
@@ -43135,7 +43103,6 @@ function ResourceComposePage({
43135
43103
  availableEntityTypes,
43136
43104
  initialLocale,
43137
43105
  theme: theme2,
43138
- showLineNumbers,
43139
43106
  hoverDelayMs,
43140
43107
  activePanel,
43141
43108
  onSaveResource,
@@ -43146,20 +43113,21 @@ function ResourceComposePage({
43146
43113
  Toolbar: Toolbar2
43147
43114
  }) {
43148
43115
  const { announceFormSubmitting, announceFormSuccess, announceFormError } = useFormAnnouncements();
43149
- const [newResourceName, setNewResourceName] = useState56("");
43150
- const [newResourceContent, setNewResourceContent] = useState56("");
43151
- const [selectedEntityTypes, setSelectedEntityTypes] = useState56([]);
43152
- const [isCreating, setIsCreating] = useState56(false);
43153
- const [inputMethod, setInputMethod] = useState56("write");
43154
- const [uploadedFile, setUploadedFile] = useState56(null);
43155
- const [fileMimeType, setFileMimeType] = useState56("text/markdown");
43156
- const [filePreviewUrl, setFilePreviewUrl] = useState56(null);
43157
- const [isDragOver, setIsDragOver] = useState56(false);
43158
- const [selectedFormat, setSelectedFormat] = useState56("text/markdown");
43159
- const [selectedLanguage, setSelectedLanguage] = useState56(initialLocale);
43160
- const [selectedCharset, setSelectedCharset] = useState56("");
43161
- const [storagePath, setStoragePath] = useState56("");
43162
- const [archiveOriginal, setArchiveOriginal] = useState56(true);
43116
+ const { showLineNumbers } = useLineNumbers();
43117
+ const [newResourceName, setNewResourceName] = useState55("");
43118
+ const [newResourceContent, setNewResourceContent] = useState55("");
43119
+ const [selectedEntityTypes, setSelectedEntityTypes] = useState55([]);
43120
+ const [isCreating, setIsCreating] = useState55(false);
43121
+ const [inputMethod, setInputMethod] = useState55("write");
43122
+ const [uploadedFile, setUploadedFile] = useState55(null);
43123
+ const [fileMimeType, setFileMimeType] = useState55("text/markdown");
43124
+ const [filePreviewUrl, setFilePreviewUrl] = useState55(null);
43125
+ const [isDragOver, setIsDragOver] = useState55(false);
43126
+ const [selectedFormat, setSelectedFormat] = useState55("text/markdown");
43127
+ const [selectedLanguage, setSelectedLanguage] = useState55(initialLocale);
43128
+ const [selectedCharset, setSelectedCharset] = useState55("");
43129
+ const [storagePath, setStoragePath] = useState55("");
43130
+ const [archiveOriginal, setArchiveOriginal] = useState55(true);
43163
43131
  useEffect54(() => {
43164
43132
  if (mode === "clone" && cloneData) {
43165
43133
  setNewResourceName(cloneData.sourceResource.name);
@@ -43612,8 +43580,7 @@ function ResourceComposePage({
43612
43580
  ToolbarPanels,
43613
43581
  {
43614
43582
  activePanel,
43615
- theme: theme2,
43616
- showLineNumbers
43583
+ theme: theme2
43617
43584
  }
43618
43585
  ),
43619
43586
  /* @__PURE__ */ jsx92(
@@ -43628,7 +43595,7 @@ function ResourceComposePage({
43628
43595
  }
43629
43596
 
43630
43597
  // src/features/resource-discovery/components/ResourceDiscoveryPage.tsx
43631
- import { useCallback as useCallback37, useRef as useRef38 } from "react";
43598
+ import { useCallback as useCallback36, useRef as useRef38 } from "react";
43632
43599
  import { getResourceId as getResourceId3 } from "@semiont/core";
43633
43600
 
43634
43601
  // src/features/resource-discovery/components/ResourceCard.tsx
@@ -43700,7 +43667,6 @@ function ResourceDiscoveryPage({
43700
43667
  selectedEntityType,
43701
43668
  onSelectedEntityTypeChange,
43702
43669
  theme: theme2,
43703
- showLineNumbers,
43704
43670
  activePanel,
43705
43671
  onNavigateToResource,
43706
43672
  onNavigateToCompose,
@@ -43721,10 +43687,10 @@ function ResourceDiscoveryPage({
43721
43687
  );
43722
43688
  const onNavigateToResourceRef = useRef38(onNavigateToResource);
43723
43689
  onNavigateToResourceRef.current = onNavigateToResource;
43724
- const handleEntityTypeFilter = useCallback37((entityType) => {
43690
+ const handleEntityTypeFilter = useCallback36((entityType) => {
43725
43691
  onSelectedEntityTypeChange(entityType);
43726
43692
  }, [onSelectedEntityTypeChange]);
43727
- const openResource = useCallback37((resource) => {
43693
+ const openResource = useCallback36((resource) => {
43728
43694
  const resourceId2 = getResourceId3(resource);
43729
43695
  if (resourceId2) {
43730
43696
  onNavigateToResourceRef.current(resourceId2);
@@ -43841,8 +43807,7 @@ function ResourceDiscoveryPage({
43841
43807
  ToolbarPanels,
43842
43808
  {
43843
43809
  activePanel,
43844
- theme: theme2,
43845
- showLineNumbers
43810
+ theme: theme2
43846
43811
  }
43847
43812
  ),
43848
43813
  /* @__PURE__ */ jsx94(
@@ -43857,7 +43822,7 @@ function ResourceDiscoveryPage({
43857
43822
  }
43858
43823
 
43859
43824
  // src/features/resource-viewer/components/ResourceViewerPage.tsx
43860
- import { useState as useState57, useEffect as useEffect55, useCallback as useCallback38 } from "react";
43825
+ import { useState as useState56, useEffect as useEffect55, useCallback as useCallback37 } from "react";
43861
43826
  import { annotationId } from "@semiont/core";
43862
43827
  import { getLanguage, getPrimaryRepresentation as getPrimaryRepresentation2, getPrimaryMediaType as getPrimaryMediaType3, capabilitiesOf as capabilitiesOf6 } from "@semiont/core";
43863
43828
 
@@ -43985,7 +43950,7 @@ import { createMarkStateUnit } from "@semiont/sdk";
43985
43950
  import { createGatherStateUnit } from "@semiont/sdk";
43986
43951
  import { createMatchStateUnit } from "@semiont/sdk";
43987
43952
  import { createYieldStateUnit } from "@semiont/sdk";
43988
- import { decodeWithCharset as decodeWithCharset2, textExtractionOf } from "@semiont/core";
43953
+ import { decodeWithCharset as decodeWithCharset2, textExtractionOf, uuidV4 as uuidV42 } from "@semiont/core";
43989
43954
  var WIZARD_CLOSED = {
43990
43955
  open: false,
43991
43956
  annotationId: null,
@@ -44043,7 +44008,7 @@ function createResourceViewerPageStateUnit(session, resourceId2, locale, browse,
44043
44008
  entityTypes: event.entityTypes
44044
44009
  });
44045
44010
  client.bus.get("gather:requested").next({
44046
- correlationId: crypto.randomUUID(),
44011
+ correlationId: uuidV42(),
44047
44012
  annotationId: event.annotationId,
44048
44013
  resourceId: event.resourceId,
44049
44014
  options: { contextWindow: 2e3 }
@@ -44116,15 +44081,15 @@ function ResourceViewerPage({
44116
44081
  const session = useObservable(browser2.activeSession$);
44117
44082
  const semiont = session?.client;
44118
44083
  const navigateExternal = useObservableExternalNavigation();
44119
- const handleViewerOpenResource = useCallback38((id2) => {
44084
+ const handleViewerOpenResource = useCallback37((id2) => {
44120
44085
  navigateExternal(`/know/resource/${id2}`, { resourceId: id2 });
44121
44086
  }, [navigateExternal]);
44122
- const handleViewerOpenPanel = useCallback38((event) => {
44087
+ const handleViewerOpenPanel = useCallback37((event) => {
44123
44088
  browser2.emit("panel:open", event);
44124
44089
  }, [browser2]);
44125
44090
  const { showError, showSuccess } = useToast();
44126
- const { theme: theme2, setTheme } = useTheme();
44127
- const { showLineNumbers, toggleLineNumbers } = useLineNumbers();
44091
+ const { theme: theme2 } = useTheme();
44092
+ const { showLineNumbers } = useLineNumbers();
44128
44093
  const { hoverDelayMs } = useHoverDelay();
44129
44094
  const { triggerSparkleAnimation, clearNewAnnotationId, newAnnotationIds } = useResourceAnnotations();
44130
44095
  const resourceMediaType = getPrimaryMediaType3(resource) || "text/plain";
@@ -44174,11 +44139,11 @@ function ResourceViewerPage({
44174
44139
  const wizardResourceId = wizardState?.resourceId ?? null;
44175
44140
  const wizardDefaultTitle = wizardState?.defaultTitle ?? "";
44176
44141
  const wizardEntityTypes = wizardState?.entityTypes ?? [];
44177
- const [generateOpen, setGenerateOpen] = useState57(false);
44178
- const handleWizardClose = useCallback38(() => {
44142
+ const [generateOpen, setGenerateOpen] = useState56(false);
44143
+ const handleWizardClose = useCallback37(() => {
44179
44144
  stateUnit?.closeWizard();
44180
44145
  }, [stateUnit]);
44181
- const handleWizardGenerateSubmit = useCallback38((referenceId, config) => {
44146
+ const handleWizardGenerateSubmit = useCallback37((referenceId, config) => {
44182
44147
  clearNewAnnotationId(annotationId(referenceId));
44183
44148
  stateUnit?.yield.generate(referenceId, {
44184
44149
  title: config.title,
@@ -44194,7 +44159,7 @@ function ResourceViewerPage({
44194
44159
  context: config.context
44195
44160
  });
44196
44161
  }, [stateUnit, clearNewAnnotationId, resource]);
44197
- const handleResourceGenerateSubmit = useCallback38((_resourceId, config) => {
44162
+ const handleResourceGenerateSubmit = useCallback37((_resourceId, config) => {
44198
44163
  stateUnit?.yield.generateFromResource({
44199
44164
  title: config.title,
44200
44165
  storageUri: config.storagePath,
@@ -44206,7 +44171,7 @@ function ResourceViewerPage({
44206
44171
  context: config.context
44207
44172
  });
44208
44173
  }, [stateUnit, resource]);
44209
- const handleWizardLinkResource = useCallback38(async (referenceId, targetResourceId) => {
44174
+ const handleWizardLinkResource = useCallback37(async (referenceId, targetResourceId) => {
44210
44175
  if (!semiont) return;
44211
44176
  try {
44212
44177
  await semiont.bind.body(
@@ -44219,7 +44184,7 @@ function ResourceViewerPage({
44219
44184
  showError(`Failed to link reference: ${error instanceof Error ? error.message : String(error)}`);
44220
44185
  }
44221
44186
  }, [rUri, semiont, showSuccess, showError]);
44222
- const handleWizardComposeNavigate = useCallback38((context, annId, resId, title, entTypes) => {
44187
+ const handleWizardComposeNavigate = useCallback37((context, annId, resId, title, entTypes) => {
44223
44188
  sessionStorage.setItem(`gather-context:${annId}`, JSON.stringify(context));
44224
44189
  const params = new URLSearchParams({
44225
44190
  annotationUri: annId,
@@ -44244,7 +44209,7 @@ function ResourceViewerPage({
44244
44209
  browser2.emit("panel:open", { panel: "annotations" });
44245
44210
  }
44246
44211
  }, [pendingAnnotation, browser2]);
44247
- const handleResourceArchive = useCallback38(async () => {
44212
+ const handleResourceArchive = useCallback37(async () => {
44248
44213
  if (!semiont) return;
44249
44214
  try {
44250
44215
  await semiont.mark.archive(rUri);
@@ -44254,7 +44219,7 @@ function ResourceViewerPage({
44254
44219
  showError("Failed to archive document");
44255
44220
  }
44256
44221
  }, [semiont, rUri, refetchDocument, showError]);
44257
- const handleResourceUnarchive = useCallback38(async () => {
44222
+ const handleResourceUnarchive = useCallback37(async () => {
44258
44223
  if (!semiont) return;
44259
44224
  try {
44260
44225
  await semiont.mark.unarchive(rUri);
@@ -44264,7 +44229,7 @@ function ResourceViewerPage({
44264
44229
  showError("Failed to unarchive document");
44265
44230
  }
44266
44231
  }, [semiont, rUri, refetchDocument, showError]);
44267
- const handleResourceClone = useCallback38(async () => {
44232
+ const handleResourceClone = useCallback37(async () => {
44268
44233
  if (!semiont) return;
44269
44234
  try {
44270
44235
  const result = await semiont.yield.cloneToken(rUri);
@@ -44275,20 +44240,19 @@ function ResourceViewerPage({
44275
44240
  showError("Failed to generate clone link");
44276
44241
  }
44277
44242
  }, [semiont, rUri, showError, browser2]);
44278
- const handleAnnotationSparkle = useCallback38(({ annotationId: annotationId2 }) => {
44243
+ const handleAnnotationSparkle = useCallback37(({ annotationId: annotationId2 }) => {
44279
44244
  triggerSparkleAnimation(annotationId2);
44280
44245
  }, [triggerSparkleAnimation]);
44281
- const handleAnnotationAdded = useCallback38((stored) => {
44246
+ const handleAnnotationAdded = useCallback37((stored) => {
44282
44247
  triggerSparkleAnimation(stored.payload.annotation.id);
44283
44248
  }, [triggerSparkleAnimation]);
44284
- const handleSettingsThemeChanged = useCallback38(({ theme: theme3 }) => setTheme(theme3), [setTheme]);
44285
- const handleReferenceNavigate = useCallback38(({ resourceId: resourceId2 }) => {
44249
+ const handleReferenceNavigate = useCallback37(({ resourceId: resourceId2 }) => {
44286
44250
  if (routes.resourceDetail) {
44287
44251
  const path = routes.resourceDetail(resourceId2);
44288
44252
  browser2.emit("nav:push", { path, reason: "reference-link" });
44289
44253
  }
44290
44254
  }, [routes.resourceDetail, browser2]);
44291
- const handleEntityTypeClicked = useCallback38(({ entityType }) => {
44255
+ const handleEntityTypeClicked = useCallback37(({ entityType }) => {
44292
44256
  if (routes.know) {
44293
44257
  const path = `${routes.know}?entityType=${encodeURIComponent(entityType)}`;
44294
44258
  browser2.emit("nav:push", { path, reason: "entity-type-filter" });
@@ -44301,8 +44265,6 @@ function ResourceViewerPage({
44301
44265
  "yield:clone": handleResourceClone,
44302
44266
  "beckon:sparkle": handleAnnotationSparkle,
44303
44267
  "mark:added": handleAnnotationAdded,
44304
- "settings:theme-changed": handleSettingsThemeChanged,
44305
- "settings:line-numbers-toggled": toggleLineNumbers,
44306
44268
  "browse:reference-navigate": handleReferenceNavigate,
44307
44269
  "browse:entity-type-clicked": handleEntityTypeClicked
44308
44270
  });
@@ -44322,12 +44284,12 @@ function ResourceViewerPage({
44322
44284
  const primaryMediaType = primaryRep?.mediaType;
44323
44285
  const primaryByteSize = primaryRep?.byteSize;
44324
44286
  const resourceWithContent = { ...resource, content: content2 };
44325
- const handleEventHover = useCallback38((id2) => {
44287
+ const handleEventHover = useCallback37((id2) => {
44326
44288
  if (id2) {
44327
44289
  session?.client.beckon.sparkle(annotationId(id2));
44328
44290
  }
44329
44291
  }, [session]);
44330
- const handleEventClick = useCallback38((_annotationId) => {
44292
+ const handleEventClick = useCallback37((_annotationId) => {
44331
44293
  }, []);
44332
44294
  return /* @__PURE__ */ jsxs84("div", { className: `semiont-document-viewer${activePanel ? " semiont-document-viewer--panel-open" : ""}`, children: [
44333
44295
  /* @__PURE__ */ jsxs84("div", { className: "semiont-document-viewer__main", children: [
@@ -44397,7 +44359,6 @@ function ResourceViewerPage({
44397
44359
  {
44398
44360
  activePanel,
44399
44361
  theme: theme2,
44400
- showLineNumbers,
44401
44362
  width: activePanel === "jsonld" ? "w-[600px]" : activePanel === "annotations" ? "w-[400px]" : "w-64",
44402
44363
  children: [
44403
44364
  annotateMode && resource.archived && /* @__PURE__ */ jsx95("div", { className: "semiont-document-viewer__archived-status", children: /* @__PURE__ */ jsx95("div", { className: "semiont-document-viewer__archived-text", children: "\u{1F4E6} Archived" }) }),
@@ -45152,6 +45113,7 @@ export {
45152
45113
  JsonLdView,
45153
45114
  KeyboardShortcutsHelpModal,
45154
45115
  LeftSidebar,
45116
+ LineNumbersProvider,
45155
45117
  LinkedDataPage,
45156
45118
  LiveRegionProvider,
45157
45119
  NavigationMenu,