@semiont/react-ui 0.2.28-build.40 → 0.2.28

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 (106) hide show
  1. package/README.md +2 -27
  2. package/dist/{TranslationManager-Co_5fSxl.d.mts → TranslationManager-8nrCwJEY.d.mts} +1 -2
  3. package/dist/chunk-5ONCAANE.mjs +172 -0
  4. package/dist/chunk-5ONCAANE.mjs.map +1 -0
  5. package/dist/{chunk-3JTO27MH.mjs → chunk-ATHYNK3C.mjs} +1 -7
  6. package/dist/index.d.mts +73 -64
  7. package/dist/index.mjs +9936 -4158
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/{magic-string.es-7FJ3LUGB.mjs → magic-string.es-DJUUJRO3.mjs} +2 -2
  10. package/dist/test-utils.d.mts +1 -1
  11. package/dist/test-utils.mjs +304 -313
  12. package/dist/test-utils.mjs.map +1 -1
  13. package/package.json +2 -4
  14. package/dist/ar-TQSFB35U.mjs +0 -325
  15. package/dist/ar-TQSFB35U.mjs.map +0 -1
  16. package/dist/bn-525U24T3.mjs +0 -325
  17. package/dist/bn-525U24T3.mjs.map +0 -1
  18. package/dist/chunk-BHAP6MVA.mjs +0 -325
  19. package/dist/chunk-BHAP6MVA.mjs.map +0 -1
  20. package/dist/chunk-W6E2UESX.mjs +0 -387
  21. package/dist/chunk-W6E2UESX.mjs.map +0 -1
  22. package/dist/cs-OYWTGLFM.mjs +0 -325
  23. package/dist/cs-OYWTGLFM.mjs.map +0 -1
  24. package/dist/da-BDXG2ITK.mjs +0 -325
  25. package/dist/da-BDXG2ITK.mjs.map +0 -1
  26. package/dist/de-NB5JLMES.mjs +0 -325
  27. package/dist/de-NB5JLMES.mjs.map +0 -1
  28. package/dist/el-3SVXEAJI.mjs +0 -325
  29. package/dist/el-3SVXEAJI.mjs.map +0 -1
  30. package/dist/en-DVB4OE2R.mjs +0 -39
  31. package/dist/en-DVB4OE2R.mjs.map +0 -1
  32. package/dist/es-YBOFA3W5.mjs +0 -325
  33. package/dist/es-YBOFA3W5.mjs.map +0 -1
  34. package/dist/fa-7MU36AMY.mjs +0 -325
  35. package/dist/fa-7MU36AMY.mjs.map +0 -1
  36. package/dist/fi-PQKJB32G.mjs +0 -325
  37. package/dist/fi-PQKJB32G.mjs.map +0 -1
  38. package/dist/fr-U4HK5GM6.mjs +0 -325
  39. package/dist/fr-U4HK5GM6.mjs.map +0 -1
  40. package/dist/he-F5MNZHAL.mjs +0 -325
  41. package/dist/he-F5MNZHAL.mjs.map +0 -1
  42. package/dist/hi-2PHI37ZX.mjs +0 -325
  43. package/dist/hi-2PHI37ZX.mjs.map +0 -1
  44. package/dist/id-JPRBNCGS.mjs +0 -325
  45. package/dist/id-JPRBNCGS.mjs.map +0 -1
  46. package/dist/it-MRLWI5OS.mjs +0 -325
  47. package/dist/it-MRLWI5OS.mjs.map +0 -1
  48. package/dist/ja-YQ6RPI2T.mjs +0 -325
  49. package/dist/ja-YQ6RPI2T.mjs.map +0 -1
  50. package/dist/ko-DUAVCEXX.mjs +0 -325
  51. package/dist/ko-DUAVCEXX.mjs.map +0 -1
  52. package/dist/ms-FBHSR4PG.mjs +0 -325
  53. package/dist/ms-FBHSR4PG.mjs.map +0 -1
  54. package/dist/nl-IC2MPZXN.mjs +0 -325
  55. package/dist/nl-IC2MPZXN.mjs.map +0 -1
  56. package/dist/no-LLD43NRM.mjs +0 -325
  57. package/dist/no-LLD43NRM.mjs.map +0 -1
  58. package/dist/pl-DDOJBR4D.mjs +0 -325
  59. package/dist/pl-DDOJBR4D.mjs.map +0 -1
  60. package/dist/pt-7TFHQRRN.mjs +0 -325
  61. package/dist/pt-7TFHQRRN.mjs.map +0 -1
  62. package/dist/ro-P4PJEGDU.mjs +0 -325
  63. package/dist/ro-P4PJEGDU.mjs.map +0 -1
  64. package/dist/sv-LF3VEQD2.mjs +0 -325
  65. package/dist/sv-LF3VEQD2.mjs.map +0 -1
  66. package/dist/th-YUQAOFXF.mjs +0 -325
  67. package/dist/th-YUQAOFXF.mjs.map +0 -1
  68. package/dist/tr-CSIGLMJC.mjs +0 -325
  69. package/dist/tr-CSIGLMJC.mjs.map +0 -1
  70. package/dist/uk-LW3QBKSR.mjs +0 -325
  71. package/dist/uk-LW3QBKSR.mjs.map +0 -1
  72. package/dist/vi-W464Y6ZC.mjs +0 -325
  73. package/dist/vi-W464Y6ZC.mjs.map +0 -1
  74. package/dist/zh-R5XLM3EI.mjs +0 -325
  75. package/dist/zh-R5XLM3EI.mjs.map +0 -1
  76. package/translations/ar.json +0 -287
  77. package/translations/bn.json +0 -287
  78. package/translations/cs.json +0 -287
  79. package/translations/da.json +0 -287
  80. package/translations/de.json +0 -287
  81. package/translations/el.json +0 -287
  82. package/translations/en.json +0 -287
  83. package/translations/es.json +0 -287
  84. package/translations/fa.json +0 -287
  85. package/translations/fi.json +0 -287
  86. package/translations/fr.json +0 -287
  87. package/translations/he.json +0 -287
  88. package/translations/hi.json +0 -287
  89. package/translations/id.json +0 -287
  90. package/translations/it.json +0 -287
  91. package/translations/ja.json +0 -287
  92. package/translations/ko.json +0 -287
  93. package/translations/ms.json +0 -287
  94. package/translations/nl.json +0 -287
  95. package/translations/no.json +0 -287
  96. package/translations/pl.json +0 -287
  97. package/translations/pt.json +0 -287
  98. package/translations/ro.json +0 -287
  99. package/translations/sv.json +0 -287
  100. package/translations/th.json +0 -287
  101. package/translations/tr.json +0 -287
  102. package/translations/uk.json +0 -287
  103. package/translations/vi.json +0 -287
  104. package/translations/zh.json +0 -287
  105. /package/dist/{chunk-3JTO27MH.mjs.map → chunk-ATHYNK3C.mjs.map} +0 -0
  106. /package/dist/{magic-string.es-7FJ3LUGB.mjs.map → magic-string.es-DJUUJRO3.mjs.map} +0 -0
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # @semiont/react-ui
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@semiont/react-ui)](https://www.npmjs.com/package/@semiont/react-ui)
4
3
  [![Tests](https://github.com/The-AI-Alliance/semiont/actions/workflows/package-tests.yml/badge.svg)](https://github.com/The-AI-Alliance/semiont/actions/workflows/package-tests.yml?query=branch%3Amain+is%3Asuccess+job%3A%22Test+react-ui%22)
5
4
  [![Accessibility Tests](https://github.com/The-AI-Alliance/semiont/actions/workflows/accessibility-tests.yml/badge.svg)](https://github.com/The-AI-Alliance/semiont/actions/workflows/accessibility-tests.yml)
6
5
  [![WCAG 2.1 AA](https://img.shields.io/badge/WCAG-2.1%20AA-blue.svg)](https://www.w3.org/WAI/WCAG2AA-Conformance)
@@ -19,10 +18,8 @@ Framework-agnostic React component library for building Semiont knowledge manage
19
18
  - **Type-Safe API Hooks** - React Query wrappers for all Semiont API operations
20
19
  - **Authentication Components** - Sign-in, sign-up, and error display components
21
20
  - **Accessibility First** - WCAG compliant with keyboard navigation, screen reader support
22
- - **Comprehensive Testing** - 1250+ tests with extensive coverage
21
+ - **Comprehensive Testing** - 800+ tests with extensive coverage
23
22
  - **Annotation System** - Rich annotation and tagging capabilities
24
- - **Built-in Translations** - English and Spanish included, with dynamic loading for optimal bundle size
25
- - **Flexible i18n** - Three modes: default English, built-in locales, or custom translation system
26
23
 
27
24
  ## Installation
28
25
 
@@ -93,33 +90,11 @@ function MyComponent() {
93
90
  ```tsx
94
91
  import { useTranslations } from '@semiont/react-ui';
95
92
 
96
- // Option 1: Default English (no provider needed)
97
93
  function Toolbar() {
98
94
  const t = useTranslations('Toolbar');
99
- return <button>{t('save')}</button>;
100
- }
101
-
102
- // Option 2: Built-in locales
103
- import { TranslationProvider } from '@semiont/react-ui';
104
-
105
- function App() {
106
- return (
107
- <TranslationProvider locale="es">
108
- <Toolbar />
109
- </TranslationProvider>
110
- );
111
- }
112
95
 
113
- // Option 3: Custom translation system
114
- const myTranslationManager = {
115
- t: (namespace, key, params) => myI18n.translate(`${namespace}.${key}`, params)
116
- };
117
-
118
- function App() {
119
96
  return (
120
- <TranslationProvider translationManager={myTranslationManager}>
121
- <Toolbar />
122
- </TranslationProvider>
97
+ <button>{t('save')}</button>
123
98
  );
124
99
  }
125
100
  ```
@@ -109,10 +109,9 @@ interface TranslationManager {
109
109
  * Translate a key within a namespace
110
110
  * @param namespace - Translation namespace (e.g., 'Toolbar', 'ResourceViewer')
111
111
  * @param key - Translation key within the namespace
112
- * @param params - Optional parameters for interpolation
113
112
  * @returns Translated string
114
113
  */
115
- t: (namespace: string, key: string, params?: Record<string, any>) => string;
114
+ t: (namespace: string, key: string) => string;
116
115
  }
117
116
 
118
117
  export type { ApiClientManager as A, OpenResourcesManager as O, SessionManager as S, TranslationManager as T, OpenResource as a, SessionState as b };
@@ -0,0 +1,172 @@
1
+ 'use client';
2
+
3
+ // src/contexts/ApiClientContext.tsx
4
+ import { createContext, useContext } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var ApiClientContext = createContext(null);
7
+ function ApiClientProvider({
8
+ apiClientManager,
9
+ children
10
+ }) {
11
+ return /* @__PURE__ */ jsx(ApiClientContext.Provider, { value: apiClientManager, children });
12
+ }
13
+ function useApiClient() {
14
+ const context = useContext(ApiClientContext);
15
+ if (!context) {
16
+ throw new Error("useApiClient must be used within an ApiClientProvider");
17
+ }
18
+ return context.client;
19
+ }
20
+
21
+ // src/contexts/SessionContext.tsx
22
+ import { createContext as createContext2, useContext as useContext2 } from "react";
23
+ import { jsx as jsx2 } from "react/jsx-runtime";
24
+ var SessionContext = createContext2(null);
25
+ function SessionProvider({
26
+ sessionManager,
27
+ children
28
+ }) {
29
+ return /* @__PURE__ */ jsx2(SessionContext.Provider, { value: sessionManager, children });
30
+ }
31
+ function useSessionContext() {
32
+ const context = useContext2(SessionContext);
33
+ if (!context) {
34
+ throw new Error("useSessionContext must be used within SessionProvider");
35
+ }
36
+ return context;
37
+ }
38
+
39
+ // src/contexts/OpenResourcesContext.tsx
40
+ import { createContext as createContext3, useContext as useContext3 } from "react";
41
+ import { jsx as jsx3 } from "react/jsx-runtime";
42
+ var OpenResourcesContext = createContext3(void 0);
43
+ function OpenResourcesProvider({
44
+ openResourcesManager,
45
+ children
46
+ }) {
47
+ return /* @__PURE__ */ jsx3(OpenResourcesContext.Provider, { value: openResourcesManager, children });
48
+ }
49
+ function useOpenResources() {
50
+ const context = useContext3(OpenResourcesContext);
51
+ if (context === void 0) {
52
+ throw new Error("useOpenResources must be used within an OpenResourcesProvider");
53
+ }
54
+ return context;
55
+ }
56
+
57
+ // src/contexts/TranslationContext.tsx
58
+ import { createContext as createContext4, useContext as useContext4 } from "react";
59
+ import { jsx as jsx4 } from "react/jsx-runtime";
60
+ var TranslationContext = createContext4(null);
61
+ function TranslationProvider({
62
+ translationManager,
63
+ children
64
+ }) {
65
+ return /* @__PURE__ */ jsx4(TranslationContext.Provider, { value: translationManager, children });
66
+ }
67
+ function useTranslations(namespace) {
68
+ const context = useContext4(TranslationContext);
69
+ if (!context) {
70
+ throw new Error("useTranslations must be used within a TranslationProvider");
71
+ }
72
+ return (key) => context.t(namespace, key);
73
+ }
74
+
75
+ // src/components/Toast.tsx
76
+ import React4, { useEffect, useState } from "react";
77
+ import { createPortal } from "react-dom";
78
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
79
+ var icons = {
80
+ success: /* @__PURE__ */ jsx5("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
81
+ error: /* @__PURE__ */ jsx5("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }),
82
+ warning: /* @__PURE__ */ jsx5("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
83
+ info: /* @__PURE__ */ jsx5("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) })
84
+ };
85
+ var styles = {
86
+ success: "bg-green-50 dark:bg-green-900/20 text-green-800 dark:text-green-200 border-green-200 dark:border-green-800",
87
+ error: "bg-red-50 dark:bg-red-900/20 text-red-800 dark:text-red-200 border-red-200 dark:border-red-800",
88
+ warning: "bg-yellow-50 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-200 border-yellow-200 dark:border-yellow-800",
89
+ info: "bg-blue-50 dark:bg-blue-900/20 text-blue-800 dark:text-blue-200 border-blue-200 dark:border-blue-800"
90
+ };
91
+ function Toast({ toast, onClose }) {
92
+ useEffect(() => {
93
+ const timer = setTimeout(() => {
94
+ onClose(toast.id);
95
+ }, toast.duration || 3e3);
96
+ return () => clearTimeout(timer);
97
+ }, [toast, onClose]);
98
+ return /* @__PURE__ */ jsxs(
99
+ "div",
100
+ {
101
+ className: `flex items-center gap-3 px-4 py-3 rounded-lg border shadow-lg transition-all duration-300 transform ${styles[toast.type]}`,
102
+ role: "alert",
103
+ children: [
104
+ /* @__PURE__ */ jsx5("div", { className: "flex-shrink-0", children: icons[toast.type] }),
105
+ /* @__PURE__ */ jsx5("p", { className: "text-sm font-medium", children: toast.message }),
106
+ /* @__PURE__ */ jsx5(
107
+ "button",
108
+ {
109
+ onClick: () => onClose(toast.id),
110
+ className: "ml-auto flex-shrink-0 hover:opacity-70 transition-opacity",
111
+ "aria-label": "Close",
112
+ children: /* @__PURE__ */ jsx5("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
113
+ }
114
+ )
115
+ ]
116
+ }
117
+ );
118
+ }
119
+ function ToastContainer({ toasts, onClose }) {
120
+ const [mounted, setMounted] = useState(false);
121
+ useEffect(() => {
122
+ setMounted(true);
123
+ return () => setMounted(false);
124
+ }, []);
125
+ if (!mounted) return null;
126
+ return createPortal(
127
+ /* @__PURE__ */ jsx5("div", { className: "fixed top-4 right-4 z-50 space-y-2 max-w-sm", children: toasts.map((toast) => /* @__PURE__ */ jsx5(Toast, { toast, onClose }, toast.id)) }),
128
+ document.body
129
+ );
130
+ }
131
+ var ToastContext = React4.createContext(void 0);
132
+ function ToastProvider({ children }) {
133
+ const [toasts, setToasts] = useState([]);
134
+ const showToast = (message, type = "info", duration) => {
135
+ const id = Date.now().toString();
136
+ const newToast = duration !== void 0 ? { id, message, type, duration } : { id, message, type };
137
+ setToasts((prev) => [...prev, newToast]);
138
+ };
139
+ const showSuccess = (message, duration) => showToast(message, "success", duration);
140
+ const showError = (message, duration) => showToast(message, "error", duration);
141
+ const showWarning = (message, duration) => showToast(message, "warning", duration);
142
+ const showInfo = (message, duration) => showToast(message, "info", duration);
143
+ const handleClose = (id) => {
144
+ setToasts((prev) => prev.filter((toast) => toast.id !== id));
145
+ };
146
+ return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { showToast, showSuccess, showError, showWarning, showInfo }, children: [
147
+ children,
148
+ /* @__PURE__ */ jsx5(ToastContainer, { toasts, onClose: handleClose })
149
+ ] });
150
+ }
151
+ function useToast() {
152
+ const context = React4.useContext(ToastContext);
153
+ if (context === void 0) {
154
+ throw new Error("useToast must be used within a ToastProvider");
155
+ }
156
+ return context;
157
+ }
158
+
159
+ export {
160
+ ApiClientProvider,
161
+ useApiClient,
162
+ SessionProvider,
163
+ useSessionContext,
164
+ OpenResourcesProvider,
165
+ useOpenResources,
166
+ TranslationProvider,
167
+ useTranslations,
168
+ ToastContainer,
169
+ ToastProvider,
170
+ useToast
171
+ };
172
+ //# sourceMappingURL=chunk-5ONCAANE.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/contexts/ApiClientContext.tsx","../src/contexts/SessionContext.tsx","../src/contexts/OpenResourcesContext.tsx","../src/contexts/TranslationContext.tsx","../src/components/Toast.tsx"],"sourcesContent":["'use client';\n\nimport React, { createContext, useContext, ReactNode } from 'react';\nimport type { ApiClientManager } from '../types/ApiClientManager';\n\nconst ApiClientContext = createContext<ApiClientManager | null>(null);\n\nexport interface ApiClientProviderProps {\n apiClientManager: ApiClientManager;\n children: ReactNode;\n}\n\n/**\n * Provider for API client management\n * Apps must provide an ApiClientManager implementation\n */\nexport function ApiClientProvider({\n apiClientManager,\n children,\n}: ApiClientProviderProps) {\n return (\n <ApiClientContext.Provider value={apiClientManager}>\n {children}\n </ApiClientContext.Provider>\n );\n}\n\n/**\n * Hook to access the API client\n * Must be used within an ApiClientProvider\n * @returns API client instance (null if not authenticated)\n */\nexport function useApiClient() {\n const context = useContext(ApiClientContext);\n\n if (!context) {\n throw new Error('useApiClient must be used within an ApiClientProvider');\n }\n\n return context.client;\n}\n","'use client';\n\nimport { createContext, useContext, ReactNode } from 'react';\nimport type { SessionManager } from '../types/SessionManager';\n\nconst SessionContext = createContext<SessionManager | null>(null);\n\n/**\n * Provider Pattern: Accepts SessionManager implementation as prop\n * and makes it available to child components via Context.\n *\n * Apps provide their own implementation (next-auth, custom auth, etc.)\n * and pass it to this provider at the root level.\n *\n * @example\n * ```tsx\n * // In app root\n * const sessionManager = useSessionManager(); // App's implementation\n *\n * <SessionProvider sessionManager={sessionManager}>\n * <App />\n * </SessionProvider>\n * ```\n */\nexport function SessionProvider({\n sessionManager,\n children\n}: {\n sessionManager: SessionManager;\n children: ReactNode;\n}) {\n return (\n <SessionContext.Provider value={sessionManager}>\n {children}\n </SessionContext.Provider>\n );\n}\n\n/**\n * Hook to access SessionManager from Context\n * Components use this hook to access session state and expiry information\n */\nexport function useSessionContext() {\n const context = useContext(SessionContext);\n if (!context) {\n throw new Error('useSessionContext must be used within SessionProvider');\n }\n return context;\n}","'use client';\n\nimport React, { createContext, useContext } from 'react';\nimport type { OpenResourcesManager } from '../types/OpenResourcesManager';\n\nconst OpenResourcesContext = createContext<OpenResourcesManager | undefined>(undefined);\n\n/**\n * Provider Pattern: Accepts OpenResourcesManager implementation as prop\n * and makes it available to child components via Context.\n *\n * Apps provide their own implementation (localStorage, sessionStorage, database, etc.)\n * and pass it to this provider at the root level.\n *\n * @example\n * ```tsx\n * // In app root\n * const openResourcesManager = useOpenResourcesManager(); // App's implementation\n *\n * <OpenResourcesProvider openResourcesManager={openResourcesManager}>\n * <App />\n * </OpenResourcesProvider>\n * ```\n */\nexport function OpenResourcesProvider({\n openResourcesManager,\n children\n}: {\n openResourcesManager: OpenResourcesManager;\n children: React.ReactNode;\n}) {\n return (\n <OpenResourcesContext.Provider value={openResourcesManager}>\n {children}\n </OpenResourcesContext.Provider>\n );\n}\n\n/**\n * Hook to access OpenResourcesManager from Context\n * Components use this hook to access open resources functionality\n */\nexport function useOpenResources(): OpenResourcesManager {\n const context = useContext(OpenResourcesContext);\n if (context === undefined) {\n throw new Error('useOpenResources must be used within an OpenResourcesProvider');\n }\n return context;\n}","'use client';\n\nimport React, { createContext, useContext, ReactNode } from 'react';\nimport type { TranslationManager } from '../types/TranslationManager';\n\nconst TranslationContext = createContext<TranslationManager | null>(null);\n\nexport interface TranslationProviderProps {\n translationManager: TranslationManager;\n children: ReactNode;\n}\n\n/**\n * Provider for translation management\n * Apps must provide a TranslationManager implementation\n */\nexport function TranslationProvider({\n translationManager,\n children,\n}: TranslationProviderProps) {\n return (\n <TranslationContext.Provider value={translationManager}>\n {children}\n </TranslationContext.Provider>\n );\n}\n\n/**\n * Hook to access translations within a namespace\n * Must be used within a TranslationProvider\n * @param namespace - Translation namespace (e.g., 'Toolbar', 'ResourceViewer')\n * @returns Function to translate keys within the namespace\n */\nexport function useTranslations(namespace: string) {\n const context = useContext(TranslationContext);\n\n if (!context) {\n throw new Error('useTranslations must be used within a TranslationProvider');\n }\n\n // Return a function that translates keys within this namespace\n return (key: string) => context.t(namespace, key);\n}\n","'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nexport type ToastType = 'success' | 'error' | 'info' | 'warning';\n\nexport interface ToastMessage {\n id: string;\n message: string;\n type: ToastType;\n duration?: number;\n}\n\ninterface ToastProps {\n toast: ToastMessage;\n onClose: (id: string) => void;\n}\n\nconst icons = {\n success: (\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 13l4 4L19 7\" />\n </svg>\n ),\n error: (\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n ),\n warning: (\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\" />\n </svg>\n ),\n info: (\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n ),\n};\n\nconst styles = {\n success: 'bg-green-50 dark:bg-green-900/20 text-green-800 dark:text-green-200 border-green-200 dark:border-green-800',\n error: 'bg-red-50 dark:bg-red-900/20 text-red-800 dark:text-red-200 border-red-200 dark:border-red-800',\n warning: 'bg-yellow-50 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-200 border-yellow-200 dark:border-yellow-800',\n info: 'bg-blue-50 dark:bg-blue-900/20 text-blue-800 dark:text-blue-200 border-blue-200 dark:border-blue-800',\n};\n\nfunction Toast({ toast, onClose }: ToastProps) {\n useEffect(() => {\n const timer = setTimeout(() => {\n onClose(toast.id);\n }, toast.duration || 3000);\n\n return () => clearTimeout(timer);\n }, [toast, onClose]);\n\n return (\n <div\n className={`flex items-center gap-3 px-4 py-3 rounded-lg border shadow-lg transition-all duration-300 transform ${styles[toast.type]}`}\n role=\"alert\"\n >\n <div className=\"flex-shrink-0\">{icons[toast.type]}</div>\n <p className=\"text-sm font-medium\">{toast.message}</p>\n <button\n onClick={() => onClose(toast.id)}\n className=\"ml-auto flex-shrink-0 hover:opacity-70 transition-opacity\"\n aria-label=\"Close\"\n >\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n </div>\n );\n}\n\ninterface ToastContainerProps {\n toasts: ToastMessage[];\n onClose: (id: string) => void;\n}\n\nexport function ToastContainer({ toasts, onClose }: ToastContainerProps) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n return () => setMounted(false);\n }, []);\n\n if (!mounted) return null;\n\n return createPortal(\n <div className=\"fixed top-4 right-4 z-50 space-y-2 max-w-sm\">\n {toasts.map((toast) => (\n <Toast key={toast.id} toast={toast} onClose={onClose} />\n ))}\n </div>,\n document.body\n );\n}\n\n// Toast context and hook for global toast management\ninterface ToastContextType {\n showToast: (message: string, type?: ToastType, duration?: number) => void;\n showSuccess: (message: string, duration?: number) => void;\n showError: (message: string, duration?: number) => void;\n showWarning: (message: string, duration?: number) => void;\n showInfo: (message: string, duration?: number) => void;\n}\n\nconst ToastContext = React.createContext<ToastContextType | undefined>(undefined);\n\nexport function ToastProvider({ children }: { children: React.ReactNode }) {\n const [toasts, setToasts] = useState<ToastMessage[]>([]);\n\n const showToast = (message: string, type: ToastType = 'info', duration?: number) => {\n const id = Date.now().toString();\n const newToast: ToastMessage = duration !== undefined \n ? { id, message, type, duration }\n : { id, message, type };\n setToasts((prev) => [...prev, newToast]);\n };\n\n const showSuccess = (message: string, duration?: number) => showToast(message, 'success', duration);\n const showError = (message: string, duration?: number) => showToast(message, 'error', duration);\n const showWarning = (message: string, duration?: number) => showToast(message, 'warning', duration);\n const showInfo = (message: string, duration?: number) => showToast(message, 'info', duration);\n\n const handleClose = (id: string) => {\n setToasts((prev) => prev.filter((toast) => toast.id !== id));\n };\n\n return (\n <ToastContext.Provider value={{ showToast, showSuccess, showError, showWarning, showInfo }}>\n {children}\n <ToastContainer toasts={toasts} onClose={handleClose} />\n </ToastContext.Provider>\n );\n}\n\nexport function useToast() {\n const context = React.useContext(ToastContext);\n if (context === undefined) {\n throw new Error('useToast must be used within a ToastProvider');\n }\n return context;\n}"],"mappings":";;;AAEA,SAAgB,eAAe,kBAA6B;AAmBxD;AAhBJ,IAAM,mBAAmB,cAAuC,IAAI;AAW7D,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AACF,GAA2B;AACzB,SACE,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,kBAC/B,UACH;AAEJ;AAOO,SAAS,eAAe;AAC7B,QAAM,UAAU,WAAW,gBAAgB;AAE3C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,uDAAuD;AAAA,EACzE;AAEA,SAAO,QAAQ;AACjB;;;ACtCA,SAAS,iBAAAA,gBAAe,cAAAC,mBAA6B;AA8BjD,gBAAAC,YAAA;AA3BJ,IAAM,iBAAiBF,eAAqC,IAAI;AAmBzD,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AACF,GAGG;AACD,S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AU,SAAS,QAAQ,QAAQ;AAE5F,QAAM,cAAc,CAAC,OAAe;AAClC,cAAU,CAAC,SAAS,KAAK,OAAO,CAAC,UAAU,MAAM,OAAO,EAAE,CAAC;AAAA,EAC7D;AAEA,SACE,qBAAC,aAAa,UAAb,EAAsB,OAAO,EAAE,WAAW,aAAa,WAAW,aAAa,SAAS,GACtF;AAAA;AAAA,IACD,gBAAAC,KAAC,kBAAe,QAAgB,SAAS,aAAa;AAAA,KACxD;AAEJ;AAEO,SAAS,WAAW;AACzB,QAAM,UAAUD,OAAM,WAAW,YAAY;AAC7C,MAAI,YAAY,QAAW;AACzB,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,SAAO;AACT;","names":["createContext","useContext","jsx","createContext","useContext","jsx","createContext","useContext","jsx","React","jsx"]}
@@ -11,11 +11,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
11
11
  if (typeof require !== "undefined") return require.apply(this, arguments);
12
12
  throw Error('Dynamic require of "' + x + '" is not supported');
13
13
  });
14
- var __glob = (map) => (path) => {
15
- var fn = map[path];
16
- if (fn) return fn();
17
- throw new Error("Module not found in bundle: " + path);
18
- };
19
14
  var __commonJS = (cb, mod) => function __require2() {
20
15
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
21
16
  };
@@ -42,9 +37,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
42
37
 
43
38
  export {
44
39
  __require,
45
- __glob,
46
40
  __commonJS,
47
41
  __export,
48
42
  __toESM
49
43
  };
50
- //# sourceMappingURL=chunk-3JTO27MH.mjs.map
44
+ //# sourceMappingURL=chunk-ATHYNK3C.mjs.map
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _semiont_api_client from '@semiont/api-client';
2
2
  import { components, ResourceUri, Selector, GenerationContext, SemiontApiClient, AnnotationUri, ResourceAnnotationUri, ValidationResult, DetectionProgress as DetectionProgress$1, GenerationProgress as GenerationProgress$1, ResourceEvent as ResourceEvent$1, StoredEvent, paths } from '@semiont/api-client';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { A as ApiClientManager, O as OpenResourcesManager, S as SessionManager, T as TranslationManager } from './TranslationManager-Co_5fSxl.mjs';
5
- export { a as OpenResource, b as SessionState } from './TranslationManager-Co_5fSxl.mjs';
4
+ import { A as ApiClientManager, O as OpenResourcesManager, S as SessionManager, T as TranslationManager } from './TranslationManager-8nrCwJEY.mjs';
5
+ export { a as OpenResource, b as SessionState } from './TranslationManager-8nrCwJEY.mjs';
6
6
  import * as React$1 from 'react';
7
7
  import React__default, { MutableRefObject, KeyboardEvent as KeyboardEvent$1, ReactNode, Component, ErrorInfo } from 'react';
8
8
  import * as _tanstack_react_query from '@tanstack/react-query';
@@ -15,6 +15,7 @@ import { Root as Root$1 } from 'mdast';
15
15
  import { VFile } from 'vfile';
16
16
  import { TagSchema } from '@semiont/ontology';
17
17
  export { TAG_SCHEMAS, TagCategory, TagSchema, getAllTagSchemas, getSchemaCategory as getTagCategory, getTagSchema, getTagSchemasByDomain, isValidCategory } from '@semiont/ontology';
18
+ import * as next_auth from 'next-auth';
18
19
 
19
20
  type Annotation$o = components['schemas']['Annotation'];
20
21
  /**
@@ -1003,6 +1004,56 @@ declare function useAnnotationPanel<T extends Annotation$j>(annotations: T[], ho
1003
1004
  handleAnnotationRef: (id: string, el: HTMLElement | null) => void;
1004
1005
  };
1005
1006
 
1007
+ /**
1008
+ * Enhanced authentication hook with validation and user information
1009
+ */
1010
+ declare function useAuth(): {
1011
+ session: next_auth.Session | null;
1012
+ user: {
1013
+ name?: string | null;
1014
+ email?: string | null;
1015
+ image?: string | null;
1016
+ isAdmin?: boolean;
1017
+ } | undefined;
1018
+ backendUser: {
1019
+ id: string;
1020
+ email: string;
1021
+ name?: string | undefined;
1022
+ image?: string | undefined;
1023
+ domain: string;
1024
+ isAdmin: boolean;
1025
+ isModerator: boolean;
1026
+ termsAcceptedAt?: string | null;
1027
+ } | undefined;
1028
+ isLoading: boolean;
1029
+ isAuthenticated: boolean;
1030
+ hasValidBackendToken: boolean;
1031
+ userDomain: string | undefined;
1032
+ displayName: string;
1033
+ avatarUrl: string | null | undefined;
1034
+ isAdmin: boolean;
1035
+ isModerator: boolean;
1036
+ isFullyAuthenticated: boolean;
1037
+ };
1038
+ /**
1039
+ * Hook for getting user preferences and settings
1040
+ */
1041
+ declare function useUserPreferences(): {
1042
+ theme: "light" | "dark" | "system";
1043
+ language: string;
1044
+ timezone: string;
1045
+ emailNotifications: boolean;
1046
+ };
1047
+ /**
1048
+ * Hook for checking user permissions (future expansion)
1049
+ */
1050
+ declare function usePermissions(): {
1051
+ canRead: boolean;
1052
+ canWrite: boolean;
1053
+ canAdmin: boolean;
1054
+ canManageUsers: boolean;
1055
+ };
1056
+
1006
1057
  /**
1007
1058
  * Creates a debounced version of a callback function
1008
1059
  *
@@ -1513,54 +1564,22 @@ declare function SessionProvider({ sessionManager, children }: {
1513
1564
  */
1514
1565
  declare function useSessionContext(): SessionManager;
1515
1566
 
1516
- declare const AVAILABLE_LOCALES: readonly ["ar", "bn", "cs", "da", "de", "el", "en", "es", "fa", "fi", "fr", "he", "hi", "id", "it", "ja", "ko", "ms", "nl", "no", "pl", "pt", "ro", "sv", "th", "tr", "uk", "vi", "zh"];
1517
- type AvailableLocale = typeof AVAILABLE_LOCALES[number];
1518
1567
  interface TranslationProviderProps {
1519
- /**
1520
- * Option 1: Provide a complete TranslationManager implementation
1521
- */
1522
- translationManager?: TranslationManager;
1523
- /**
1524
- * Option 2: Use built-in translations by specifying a locale
1525
- * When adding new locales, just add the JSON file and update AVAILABLE_LOCALES
1526
- */
1527
- locale?: string;
1528
- /**
1529
- * Loading component to show while translations are being loaded
1530
- * Only relevant when using dynamic locale loading
1531
- */
1532
- loadingComponent?: ReactNode;
1568
+ translationManager: TranslationManager;
1533
1569
  children: ReactNode;
1534
1570
  }
1535
1571
  /**
1536
- * Provider for translation management with dynamic loading
1537
- *
1538
- * Three modes of operation:
1539
- * 1. No provider: Components use default English strings
1540
- * 2. With locale prop: Dynamically loads translations for that locale
1541
- * 3. With translationManager: Use custom translation implementation
1572
+ * Provider for translation management
1573
+ * Apps must provide a TranslationManager implementation
1542
1574
  */
1543
- declare function TranslationProvider({ translationManager, locale, loadingComponent, children, }: TranslationProviderProps): react_jsx_runtime.JSX.Element;
1575
+ declare function TranslationProvider({ translationManager, children, }: TranslationProviderProps): react_jsx_runtime.JSX.Element;
1544
1576
  /**
1545
1577
  * Hook to access translations within a namespace
1546
- *
1547
- * Works in three modes:
1548
- * 1. Without provider: Returns default English translations
1549
- * 2. With provider using locale: Returns dynamically loaded translations for that locale
1550
- * 3. With custom provider: Uses the custom translation manager
1551
- *
1578
+ * Must be used within a TranslationProvider
1552
1579
  * @param namespace - Translation namespace (e.g., 'Toolbar', 'ResourceViewer')
1553
1580
  * @returns Function to translate keys within the namespace
1554
1581
  */
1555
- declare function useTranslations(namespace: string): (key: string, params?: Record<string, any>) => string;
1556
- /**
1557
- * Hook to preload translations for a locale
1558
- * Useful for preloading translations before navigation
1559
- */
1560
- declare function usePreloadTranslations(): {
1561
- preload: (locale: string) => Promise<boolean>;
1562
- isLoaded: (locale: string) => boolean;
1563
- };
1582
+ declare function useTranslations(namespace: string): (key: string) => string;
1564
1583
 
1565
1584
  type Annotation$h = components['schemas']['Annotation'];
1566
1585
  interface TextSegment {
@@ -1621,7 +1640,7 @@ declare class ErrorBoundary extends Component<Props$a, State> {
1621
1640
  static getDerivedStateFromError(error: Error): State;
1622
1641
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
1623
1642
  handleReset: () => void;
1624
- render(): string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
1643
+ render(): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<React__default.AwaitedReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
1625
1644
  }
1626
1645
  /**
1627
1646
  * Specialized error boundary for async components
@@ -1792,6 +1811,8 @@ interface ProposeEntitiesModalProps {
1792
1811
  }
1793
1812
  declare function ProposeEntitiesModal({ isOpen, onConfirm, onCancel }: ProposeEntitiesModalProps): react_jsx_runtime.JSX.Element;
1794
1813
 
1814
+ declare function SessionExpiredModal(): react_jsx_runtime.JSX.Element;
1815
+
1795
1816
  type Annotation$c = components['schemas']['Annotation'];
1796
1817
 
1797
1818
  interface Props$8 {
@@ -2280,12 +2301,7 @@ declare function NavigationMenu({ Link, routes, t, isAdmin, isModerator, brandin
2280
2301
  */
2281
2302
  declare function SkipLinks(): react_jsx_runtime.JSX.Element;
2282
2303
 
2283
- interface StatusDisplayProps {
2284
- isFullyAuthenticated?: boolean;
2285
- isAuthenticated?: boolean;
2286
- hasValidBackendToken?: boolean;
2287
- }
2288
- declare function StatusDisplay({ isFullyAuthenticated, isAuthenticated, hasValidBackendToken }: StatusDisplayProps): react_jsx_runtime.JSX.Element;
2304
+ declare function StatusDisplay(): react_jsx_runtime.JSX.Element;
2289
2305
 
2290
2306
  declare function SessionTimer(): react_jsx_runtime.JSX.Element | null;
2291
2307
 
@@ -2318,11 +2334,8 @@ interface UnifiedHeaderProps {
2318
2334
  showAuthLinks?: boolean;
2319
2335
  brandingLink?: string;
2320
2336
  variant?: 'standalone' | 'embedded' | 'floating';
2321
- isAuthenticated?: boolean;
2322
- isAdmin?: boolean;
2323
- isModerator?: boolean;
2324
2337
  }
2325
- declare function UnifiedHeader({ Link, routes, t, tHome, showBranding, showAuthLinks, brandingLink, variant, isAuthenticated, isAdmin, isModerator }: UnifiedHeaderProps): react_jsx_runtime.JSX.Element;
2338
+ declare function UnifiedHeader({ Link, routes, t, tHome, showBranding, showAuthLinks, brandingLink, variant }: UnifiedHeaderProps): react_jsx_runtime.JSX.Element;
2326
2339
 
2327
2340
  interface LeftSidebarProps {
2328
2341
  Link: React__default.ComponentType<LinkComponentProps>;
@@ -2333,11 +2346,8 @@ interface LeftSidebarProps {
2333
2346
  brandingLink?: string;
2334
2347
  collapsible?: boolean;
2335
2348
  storageKey?: string;
2336
- isAuthenticated?: boolean;
2337
- isAdmin?: boolean;
2338
- isModerator?: boolean;
2339
2349
  }
2340
- declare function LeftSidebar({ Link, routes, t, tHome, children, brandingLink, collapsible, storageKey, isAuthenticated, isAdmin, isModerator }: LeftSidebarProps): react_jsx_runtime.JSX.Element;
2350
+ declare function LeftSidebar({ Link, routes, t, tHome, children, brandingLink, collapsible, storageKey }: LeftSidebarProps): react_jsx_runtime.JSX.Element;
2341
2351
 
2342
2352
  interface PageLayoutProps {
2343
2353
  Link: React__default.ComponentType<LinkComponentProps>;
@@ -2541,17 +2551,17 @@ interface SignInFormProps {
2541
2551
  */
2542
2552
  onGoogleSignIn: () => Promise<void>;
2543
2553
  /**
2544
- * Callback when user submits email/password credentials
2554
+ * Callback when user submits local credentials
2545
2555
  */
2546
- onCredentialsSignIn?: ((email: string, password: string) => Promise<void>) | undefined;
2556
+ onLocalSignIn?: ((email: string, password: string) => Promise<void>) | undefined;
2547
2557
  /**
2548
2558
  * Error message to display (if any)
2549
2559
  */
2550
2560
  error?: string | null;
2551
2561
  /**
2552
- * Whether to show email/password auth form
2562
+ * Whether to show local auth form
2553
2563
  */
2554
- showCredentialsAuth?: boolean;
2564
+ showLocalAuth?: boolean;
2555
2565
  /**
2556
2566
  * Link component for routing - passed from parent
2557
2567
  */
@@ -2568,22 +2578,21 @@ interface SignInFormProps {
2568
2578
  emailPlaceholder: string;
2569
2579
  passwordLabel: string;
2570
2580
  passwordPlaceholder: string;
2571
- signInWithCredentials: string;
2581
+ signInLocal: string;
2572
2582
  or: string;
2573
- credentialsAuthEnabled: string;
2583
+ localAuthEnabled: string;
2574
2584
  approvedDomainsOnly: string;
2575
2585
  backToHome: string;
2576
2586
  learnMore: string;
2577
2587
  signUpInstead: string;
2578
2588
  errorEmailRequired: string;
2579
2589
  errorPasswordRequired: string;
2580
- tagline: string;
2581
2590
  };
2582
2591
  }
2583
2592
  /**
2584
2593
  * SignInForm - Main sign-in component
2585
2594
  */
2586
- declare function SignInForm({ onGoogleSignIn, onCredentialsSignIn, error, showCredentialsAuth, Link, translations: t, }: SignInFormProps): react_jsx_runtime.JSX.Element;
2595
+ declare function SignInForm({ onGoogleSignIn, onLocalSignIn, error, showLocalAuth, Link, translations: t, }: SignInFormProps): react_jsx_runtime.JSX.Element;
2587
2596
 
2588
2597
  interface SignUpFormProps {
2589
2598
  /**
@@ -3000,4 +3009,4 @@ interface ResourceViewerPageProps {
3000
3009
  }
3001
3010
  declare function ResourceViewerPage({ resource, rUri, content, contentLoading, annotations, referencedBy, referencedByLoading, allEntityTypes, locale, theme, onThemeChange, showLineNumbers, onLineNumbersToggle, activePanel, onPanelToggle, setActivePanel, onUpdateDocumentTags, onArchive, onUnarchive, onClone, onUpdateAnnotationBody, onRefetchAnnotations, onCreateAnnotation, onDeleteAnnotation, onTriggerSparkleAnimation, onClearNewAnnotationId, showSuccess, showError, onAnnotationAdded, onAnnotationRemoved, onAnnotationBodyUpdated, onDocumentArchived, onDocumentUnarchived, onEntityTagAdded, onEntityTagRemoved, onEventError, cacheManager, client, Link, routes, ToolbarPanels, SearchResourcesModal, GenerationConfigModal, }: ResourceViewerPageProps): react_jsx_runtime.JSX.Element;
3002
3011
 
3003
- export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateToolbar, AnnotateView, type Annotation$m as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, AnnotationUIProvider, type AnnotationUIProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientManager, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, type AvailableLocale, BrowseView, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type CreateAnnotationParams, type DeleteAnnotationParams, DetectSection, type DetectionConfig, type DetectionProgress, DetectionProgressWidget, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, Footer, type GenerationOptions, type GenerationProgress, HighlightEntry, HighlightPanel, HistoryEvent, ImageURLSchema, ImageViewer, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LiveRegionProvider, type Motivation$2 as Motivation, NavigationMenu, type OAuthProvider, type OAuthUser, OAuthUserSchema, OpenResourcesManager, OpenResourcesProvider, PageLayout, PanelHeader, PopupContainer, PopupHeader, type PreparedAnnotation, ProposeEntitiesModal, QUERY_KEYS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferencesPanel, ResourceAnnotationsProvider, ResourceCard, type ResourceCardProps, ResourceComposePage, type ResourceComposePageProps, ResourceDiscoveryPage, type ResourceDiscoveryPageProps, ResourceErrorState, type ResourceErrorStateProps, type ResourceEvent, ResourceInfoPanel, ResourceLoadingState, ResourceTagsInline, ResourceViewer, ResourceViewerPage, type ResourceViewerPageProps, type RouteBuilder, type SaveResourceParams, SelectedTextDisplay, type SelectionData, type SelectionMotivation, SemiontBranding, type SemiontResource$2 as SemiontResource, SessionExpiryBanner, SessionManager, SessionProvider, SessionTimer, type ShapeType, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, SkipLinks, StatisticsPanel, StatusDisplay, type StreamStatus, SvgDrawingCanvas, TagEntry, TagSchemasPage, type TagSchemasPageProps, TaggingPanel, type TextSegment, type TextSelection, ToastContainer, type ToastMessage, ToastProvider, type ToastType, Toolbar, type ToolbarPanelType, TranslationManager, TranslationProvider, type TranslationProviderProps, type UICreateAnnotationParams, UnifiedAnnotationsPanel, UnifiedHeader, UserMenuSkeleton, WelcomePage, type WelcomePageProps, buttonStyles, createCancelDetectionHandler, createDetectionHandler, dispatch401Error, dispatch403Error, dispatchAuthEvent, getAnnotationClassName, getAnnotationInternalType, getAnnotator, getResourceIcon, getShortcutDisplay, groupAnnotationsByType, jsonLightHighlightStyle, jsonLightTheme, onAuthEvent, rehypeRenderAnnotations, remarkAnnotations, sanitizeImageURL, supportsDetection, useAdmin, useAnnotationManager, useAnnotationPanel, useAnnotationUI, useAnnotations, useApiClient, useAuthApi, useCacheManager, useDebounce, useDebouncedCallback, useDetectionProgress, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useFormValidation, useFormattedTime, useGenerationProgress, useHealth, useIsTyping, useKeyboardShortcuts, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useOpenResources, usePreloadTranslations, useResourceAnnotations, useResourceEvents, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useTheme, useToast, useToolbar, useTranslations, validationRules, withHandlers };
3012
+ export { ANNOTATORS, AUTH_EVENTS, AdminDevOpsPage, type AdminDevOpsPageProps, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateToolbar, AnnotateView, type Annotation$m as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, AnnotationUIProvider, type AnnotationUIProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientManager, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, BrowseView, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type CreateAnnotationParams, type DeleteAnnotationParams, DetectSection, type DetectionConfig, type DetectionProgress, DetectionProgressWidget, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, Footer, type GenerationOptions, type GenerationProgress, HighlightEntry, HighlightPanel, HistoryEvent, ImageURLSchema, ImageViewer, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LiveRegionProvider, type Motivation$2 as Motivation, NavigationMenu, type OAuthProvider, type OAuthUser, OAuthUserSchema, OpenResourcesManager, OpenResourcesProvider, PageLayout, PanelHeader, PopupContainer, PopupHeader, type PreparedAnnotation, ProposeEntitiesModal, QUERY_KEYS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferencesPanel, ResourceAnnotationsProvider, ResourceCard, type ResourceCardProps, ResourceComposePage, type ResourceComposePageProps, ResourceDiscoveryPage, type ResourceDiscoveryPageProps, ResourceErrorState, type ResourceErrorStateProps, type ResourceEvent, ResourceInfoPanel, ResourceLoadingState, ResourceTagsInline, ResourceViewer, ResourceViewerPage, type ResourceViewerPageProps, type RouteBuilder, type SaveResourceParams, SelectedTextDisplay, type SelectionData, type SelectionMotivation, SemiontBranding, type SemiontResource$2 as SemiontResource, SessionExpiredModal, SessionExpiryBanner, SessionManager, SessionProvider, SessionTimer, type ShapeType, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, SkipLinks, StatisticsPanel, StatusDisplay, type StreamStatus, SvgDrawingCanvas, TagEntry, TagSchemasPage, type TagSchemasPageProps, TaggingPanel, type TextSegment, type TextSelection, ToastContainer, type ToastMessage, ToastProvider, type ToastType, Toolbar, type ToolbarPanelType, TranslationManager, TranslationProvider, type TranslationProviderProps, type UICreateAnnotationParams, UnifiedAnnotationsPanel, UnifiedHeader, UserMenuSkeleton, WelcomePage, type WelcomePageProps, buttonStyles, createCancelDetectionHandler, createDetectionHandler, dispatch401Error, dispatch403Error, dispatchAuthEvent, getAnnotationClassName, getAnnotationInternalType, getAnnotator, getResourceIcon, getShortcutDisplay, groupAnnotationsByType, jsonLightHighlightStyle, jsonLightTheme, onAuthEvent, rehypeRenderAnnotations, remarkAnnotations, sanitizeImageURL, supportsDetection, useAdmin, useAnnotationManager, useAnnotationPanel, useAnnotationUI, useAnnotations, useApiClient, useAuth, useAuthApi, useCacheManager, useDebounce, useDebouncedCallback, useDetectionProgress, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useFormValidation, useFormattedTime, useGenerationProgress, useHealth, useIsTyping, useKeyboardShortcuts, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useOpenResources, usePermissions, useResourceAnnotations, useResourceEvents, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useTheme, useToast, useToolbar, useTranslations, useUserPreferences, validationRules, withHandlers };