@semiont/react-ui 0.5.9 → 0.5.11

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 (209) hide show
  1. package/README.md +1 -1
  2. package/dist/{PdfAnnotationCanvas.client-U4EVBZEV.js → PdfAnnotationCanvas.client-KWQ7XDWT.js} +5 -2
  3. package/dist/PdfAnnotationCanvas.client-KWQ7XDWT.js.map +1 -0
  4. package/dist/{ar-WA47UUWA.js → ar-ZHKO4XDR.js} +45 -4
  5. package/dist/ar-ZHKO4XDR.js.map +1 -0
  6. package/dist/{bn-5ANDRIU6.js → bn-3BUDKAK5.js} +45 -4
  7. package/dist/bn-3BUDKAK5.js.map +1 -0
  8. package/dist/{chunk-YBGN4ACY.js → chunk-O23TLLXW.js} +1 -6
  9. package/dist/{chunk-WHUGODTB.js → chunk-PFUXQPWJ.js} +127 -127
  10. package/dist/{chunk-WHUGODTB.js.map → chunk-PFUXQPWJ.js.map} +1 -1
  11. package/dist/{chunk-GERSK2DY.js → chunk-R52YAGHK.js} +42 -1
  12. package/dist/chunk-R52YAGHK.js.map +1 -0
  13. package/dist/{cs-3RU7F4JX.js → cs-2EFEUKTW.js} +45 -4
  14. package/dist/cs-2EFEUKTW.js.map +1 -0
  15. package/dist/{da-GSW5P5HG.js → da-SUD3Q44Q.js} +45 -4
  16. package/dist/da-SUD3Q44Q.js.map +1 -0
  17. package/dist/{de-JUAUYF4Z.js → de-6IC5QRX7.js} +45 -4
  18. package/dist/de-6IC5QRX7.js.map +1 -0
  19. package/dist/{el-JNLWCKEC.js → el-Q4NAXFRC.js} +45 -4
  20. package/dist/el-Q4NAXFRC.js.map +1 -0
  21. package/dist/{en-RBN2GUHF.js → en-P2L4X27N.js} +5 -3
  22. package/dist/{es-WPOX225H.js → es-YUKZBD4W.js} +45 -4
  23. package/dist/es-YUKZBD4W.js.map +1 -0
  24. package/dist/{fa-TAEP6N77.js → fa-OJ47LILE.js} +45 -4
  25. package/dist/fa-OJ47LILE.js.map +1 -0
  26. package/dist/{fi-ZVZHANSP.js → fi-QFFL5CUB.js} +45 -4
  27. package/dist/fi-QFFL5CUB.js.map +1 -0
  28. package/dist/{fr-VLZW7M4N.js → fr-BOQZZWP4.js} +45 -4
  29. package/dist/fr-BOQZZWP4.js.map +1 -0
  30. package/dist/{he-QFAFYA77.js → he-LXDY3TFA.js} +45 -4
  31. package/dist/he-LXDY3TFA.js.map +1 -0
  32. package/dist/{hi-AO3DQPCV.js → hi-HOJER77V.js} +45 -4
  33. package/dist/hi-HOJER77V.js.map +1 -0
  34. package/dist/{id-GTXF42WM.js → id-I5WQ6EWD.js} +45 -4
  35. package/dist/id-I5WQ6EWD.js.map +1 -0
  36. package/dist/index.css +150 -112
  37. package/dist/index.css.map +1 -1
  38. package/dist/index.d.ts +403 -45
  39. package/dist/index.js +4660 -18860
  40. package/dist/index.js.map +1 -1
  41. package/dist/integrations/css-modules-helper.js +1 -1
  42. package/dist/integrations/styled-components-theme.js +1 -1
  43. package/dist/{it-AS5GM232.js → it-UYH642IJ.js} +45 -4
  44. package/dist/it-UYH642IJ.js.map +1 -0
  45. package/dist/{ja-GZ4HLUOF.js → ja-JTVWAC4L.js} +45 -4
  46. package/dist/ja-JTVWAC4L.js.map +1 -0
  47. package/dist/{ko-A4XUXFGJ.js → ko-IHXFMOIZ.js} +45 -4
  48. package/dist/ko-IHXFMOIZ.js.map +1 -0
  49. package/dist/{ms-YBAO3S6K.js → ms-JH25VFLO.js} +45 -4
  50. package/dist/ms-JH25VFLO.js.map +1 -0
  51. package/dist/{nl-3TJGIIIU.js → nl-SURXW7IQ.js} +45 -4
  52. package/dist/nl-SURXW7IQ.js.map +1 -0
  53. package/dist/{no-4AXIQPRQ.js → no-HXIKQFDZ.js} +45 -4
  54. package/dist/no-HXIKQFDZ.js.map +1 -0
  55. package/dist/{pl-5GP6GKXO.js → pl-7A4KU6XK.js} +45 -4
  56. package/dist/pl-7A4KU6XK.js.map +1 -0
  57. package/dist/{pt-26Y6JFG5.js → pt-6MGYP7Q5.js} +45 -4
  58. package/dist/pt-6MGYP7Q5.js.map +1 -0
  59. package/dist/{ro-C7UXFRWJ.js → ro-IROCHNIA.js} +45 -4
  60. package/dist/ro-IROCHNIA.js.map +1 -0
  61. package/dist/{sv-44DVD76T.js → sv-WDJD75CV.js} +45 -4
  62. package/dist/sv-WDJD75CV.js.map +1 -0
  63. package/dist/test-utils.js +9 -4
  64. package/dist/test-utils.js.map +1 -1
  65. package/dist/{th-GIQRTBOY.js → th-RIO2E6B3.js} +45 -4
  66. package/dist/th-RIO2E6B3.js.map +1 -0
  67. package/dist/{tr-WMQWO4D6.js → tr-TZ7ERCIN.js} +45 -4
  68. package/dist/tr-TZ7ERCIN.js.map +1 -0
  69. package/dist/{uk-I7ML6RGG.js → uk-ZFWDKLUE.js} +45 -4
  70. package/dist/uk-ZFWDKLUE.js.map +1 -0
  71. package/dist/{vi-FGWECASQ.js → vi-UIOSP2JG.js} +45 -4
  72. package/dist/vi-UIOSP2JG.js.map +1 -0
  73. package/dist/{zh-L5FN73XC.js → zh-6R6YUY46.js} +45 -4
  74. package/dist/zh-6R6YUY46.js.map +1 -0
  75. package/package.json +18 -9
  76. package/src/components/AnnotateReferencesProgressWidget.tsx +35 -16
  77. package/src/components/ResourceTagsInline.tsx +94 -11
  78. package/src/components/StatusDisplay.css +36 -0
  79. package/src/components/__tests__/AnnotateReferencesProgressWidget.test.tsx +41 -91
  80. package/src/components/__tests__/ResourceTagsInline.test.tsx +101 -3
  81. package/src/components/annotation/AnnotateToolbar.tsx +53 -28
  82. package/src/components/annotation/__tests__/AnnotateToolbar.display.test.tsx +76 -0
  83. package/src/components/annotation/__tests__/AnnotateToolbar.test.tsx +124 -360
  84. package/src/components/image-annotation/SvgDrawingCanvas.tsx +5 -1
  85. package/src/components/modals/ConfigureGatherStep.tsx +102 -0
  86. package/src/components/modals/ContextSummary.tsx +15 -6
  87. package/src/components/modals/GatherContextStep.tsx +104 -59
  88. package/src/components/modals/ResourceGenerateModal.tsx +258 -0
  89. package/src/components/modals/__tests__/ConfigureGatherStep.test.tsx +82 -0
  90. package/src/components/modals/__tests__/GatherContextStep.resource.test.tsx +107 -0
  91. package/src/components/modals/__tests__/ResourceGenerateModal.test.tsx +197 -0
  92. package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +5 -0
  93. package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +6 -6
  94. package/src/components/resource/AnnotateView.tsx +59 -38
  95. package/src/components/resource/BrowseView.tsx +159 -133
  96. package/src/components/resource/ResourceViewer.tsx +119 -128
  97. package/src/components/resource/__tests__/AnnotateView.embeddable.test.tsx +55 -0
  98. package/src/components/resource/__tests__/BrowseView.embeddable.test.tsx +49 -0
  99. package/src/components/resource/__tests__/BrowseView.links.test.tsx +60 -0
  100. package/src/components/resource/__tests__/BrowseView.overlay-async.test.tsx +113 -0
  101. package/src/components/resource/__tests__/BrowseView.reference-hover.test.tsx +161 -0
  102. package/src/components/resource/__tests__/BrowseView.registry.test.tsx +43 -0
  103. package/src/components/resource/__tests__/BrowseView.test.tsx +35 -22
  104. package/src/components/resource/__tests__/ResourceViewer.embeddable.test.tsx +63 -0
  105. package/src/components/resource/__tests__/ResourceViewer.mode-switch.test.tsx +12 -7
  106. package/src/components/resource/__tests__/ResourceViewer.toolbar-opt-out.test.tsx +135 -0
  107. package/src/components/resource/__tests__/ResourceViewer.toolbar-prefs.test.tsx +200 -0
  108. package/src/components/resource/__tests__/browse-renderers.test.tsx +34 -0
  109. package/src/components/resource/__tests__/inline-embedding.test.tsx +81 -0
  110. package/src/components/resource/__tests__/media-completeness.test.tsx +88 -0
  111. package/src/components/resource/browse-renderers.tsx +63 -0
  112. package/src/components/resource/panels/AssessmentPanel.tsx +4 -0
  113. package/src/components/resource/panels/CommentsPanel.tsx +4 -0
  114. package/src/components/resource/panels/HighlightPanel.tsx +4 -0
  115. package/src/components/resource/panels/ReferencesPanel.tsx +14 -0
  116. package/src/components/resource/panels/ResourceInfoPanel.tsx +22 -0
  117. package/src/components/resource/panels/TaggingPanel.tsx +4 -0
  118. package/src/components/resource/panels/UnifiedAnnotationsPanel.tsx +5 -2
  119. package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +1 -0
  120. package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +1 -0
  121. package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +16 -16
  122. package/src/components/resource/panels/__tests__/ReferencesPanel.observable-flow.test.tsx +1 -1
  123. package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +1 -0
  124. package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +26 -0
  125. package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +1 -0
  126. package/src/components/toolbar/Toolbar.css +14 -0
  127. package/src/features/admin-exchange/state/__tests__/exchange-state-unit.test.ts +14 -0
  128. package/src/features/admin-exchange/state/exchange-state-unit.ts +4 -2
  129. package/src/features/admin-security/state/__tests__/admin-security-state-unit.test.ts +14 -0
  130. package/src/features/admin-security/state/admin-security-state-unit.ts +4 -2
  131. package/src/features/admin-users/state/__tests__/admin-users-state-unit.test.ts +12 -5
  132. package/src/features/admin-users/state/admin-users-state-unit.ts +4 -2
  133. package/src/features/auth-welcome/state/__tests__/welcome-state-unit.test.ts +11 -0
  134. package/src/features/auth-welcome/state/welcome-state-unit.ts +1 -1
  135. package/src/features/moderate-entity-tags/state/__tests__/entity-tags-state-unit.test.ts +14 -0
  136. package/src/features/moderate-entity-tags/state/entity-tags-state-unit.ts +4 -2
  137. package/src/features/resource-compose/components/ResourceComposePage.tsx +13 -7
  138. package/src/features/resource-compose/state/__tests__/compose-page-state-unit.test.ts +13 -0
  139. package/src/features/resource-compose/state/compose-page-state-unit.ts +5 -2
  140. package/src/features/resource-discovery/state/__tests__/discover-state-unit.test.ts +15 -9
  141. package/src/features/resource-discovery/state/discover-state-unit.ts +5 -2
  142. package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +7 -17
  143. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +119 -17
  144. package/src/features/resource-viewer/state/__tests__/resource-loader-state-unit.test.ts +11 -0
  145. package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts +30 -0
  146. package/src/features/resource-viewer/state/resource-loader-state-unit.ts +1 -1
  147. package/src/features/resource-viewer/state/resource-viewer-page-state-unit.ts +7 -16
  148. package/src/styles/features/resource-viewer.css +19 -0
  149. package/translations/ar.json +41 -2
  150. package/translations/bn.json +41 -2
  151. package/translations/cs.json +41 -2
  152. package/translations/da.json +41 -2
  153. package/translations/de.json +41 -2
  154. package/translations/el.json +41 -2
  155. package/translations/en.json +39 -0
  156. package/translations/es.json +41 -2
  157. package/translations/fa.json +41 -2
  158. package/translations/fi.json +41 -2
  159. package/translations/fr.json +41 -2
  160. package/translations/he.json +41 -2
  161. package/translations/hi.json +41 -2
  162. package/translations/id.json +41 -2
  163. package/translations/it.json +41 -2
  164. package/translations/ja.json +41 -2
  165. package/translations/ko.json +41 -2
  166. package/translations/ms.json +41 -2
  167. package/translations/nl.json +41 -2
  168. package/translations/no.json +41 -2
  169. package/translations/pl.json +41 -2
  170. package/translations/pt.json +41 -2
  171. package/translations/ro.json +41 -2
  172. package/translations/sv.json +41 -2
  173. package/translations/th.json +41 -2
  174. package/translations/tr.json +41 -2
  175. package/translations/uk.json +41 -2
  176. package/translations/vi.json +41 -2
  177. package/translations/zh.json +41 -2
  178. package/dist/PdfAnnotationCanvas.client-U4EVBZEV.js.map +0 -1
  179. package/dist/ar-WA47UUWA.js.map +0 -1
  180. package/dist/bn-5ANDRIU6.js.map +0 -1
  181. package/dist/chunk-GERSK2DY.js.map +0 -1
  182. package/dist/cs-3RU7F4JX.js.map +0 -1
  183. package/dist/da-GSW5P5HG.js.map +0 -1
  184. package/dist/de-JUAUYF4Z.js.map +0 -1
  185. package/dist/el-JNLWCKEC.js.map +0 -1
  186. package/dist/es-WPOX225H.js.map +0 -1
  187. package/dist/fa-TAEP6N77.js.map +0 -1
  188. package/dist/fi-ZVZHANSP.js.map +0 -1
  189. package/dist/fr-VLZW7M4N.js.map +0 -1
  190. package/dist/he-QFAFYA77.js.map +0 -1
  191. package/dist/hi-AO3DQPCV.js.map +0 -1
  192. package/dist/id-GTXF42WM.js.map +0 -1
  193. package/dist/it-AS5GM232.js.map +0 -1
  194. package/dist/ja-GZ4HLUOF.js.map +0 -1
  195. package/dist/ko-A4XUXFGJ.js.map +0 -1
  196. package/dist/ms-YBAO3S6K.js.map +0 -1
  197. package/dist/nl-3TJGIIIU.js.map +0 -1
  198. package/dist/no-4AXIQPRQ.js.map +0 -1
  199. package/dist/pl-5GP6GKXO.js.map +0 -1
  200. package/dist/pt-26Y6JFG5.js.map +0 -1
  201. package/dist/ro-C7UXFRWJ.js.map +0 -1
  202. package/dist/sv-44DVD76T.js.map +0 -1
  203. package/dist/th-GIQRTBOY.js.map +0 -1
  204. package/dist/tr-WMQWO4D6.js.map +0 -1
  205. package/dist/uk-I7ML6RGG.js.map +0 -1
  206. package/dist/vi-FGWECASQ.js.map +0 -1
  207. package/dist/zh-L5FN73XC.js.map +0 -1
  208. /package/dist/{chunk-YBGN4ACY.js.map → chunk-O23TLLXW.js.map} +0 -0
  209. /package/dist/{en-RBN2GUHF.js.map → en-P2L4X27N.js.map} +0 -0
@@ -1,7 +1,8 @@
1
1
  import { BehaviorSubject, Subject, combineLatest, of, type Observable } from 'rxjs';
2
2
  import { debounceTime, distinctUntilChanged, map, startWith, switchMap, shareReplay } from 'rxjs/operators';
3
3
  import type { ResourceDescriptor } from '@semiont/core';
4
- import type { SemiontClient, StateUnit } from '@semiont/sdk';
4
+ import type { SemiontClient } from '@semiont/sdk';
5
+ import type { StateUnit } from '@semiont/core';
5
6
  import { createDisposer } from '@semiont/sdk';
6
7
  import type { ShellStateUnit } from '../../../state/shell-state-unit';
7
8
 
@@ -30,7 +31,9 @@ export function createDiscoverStateUnit(
30
31
  browse: ShellStateUnit,
31
32
  ): DiscoverStateUnit {
32
33
  const disposer = createDisposer();
33
- disposer.add(browse);
34
+ // `browse` (ShellStateUnit) is a *passed-in* dependency owned by the caller
35
+ // (`useShellStateUnit`), not this unit — do NOT add it to the disposer (it's the
36
+ // shared, app-scoped shell). See packages/sdk/docs/STATE-UNITS.md (composition rule).
34
37
 
35
38
  // Selected entity-type chip on the Discover page. Drives both the
36
39
  // `recent` list and the search results — filtering happens on the
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { describe, it, expect, vi, beforeEach } from 'vitest';
9
- import { render, screen, act } from '@testing-library/react';
9
+ import { render, screen } from '@testing-library/react';
10
10
  import React from 'react';
11
11
  import { ResourceViewerPage } from '../components/ResourceViewerPage';
12
12
  import type { ResourceViewerPageProps } from '../components/ResourceViewerPage';
@@ -276,8 +276,11 @@ describe('ResourceViewerPage', () => {
276
276
  expect(screen.queryByText('📦 Archived')).not.toBeInTheDocument();
277
277
  });
278
278
 
279
- it('shows archived badge after mark:mode-toggled event fires', () => {
280
- localStorage.setItem('annotateMode', 'false');
279
+ it('shows archived badge when the toolbar prefs hold annotate mode', () => {
280
+ // Mode is a toolbar PREF now (TOOLBAR-PREFS-AS-PROPS): the page's
281
+ // useToolbarPrefs() policy layer initializes from the persisted key and
282
+ // feeds the viewer controlled props — no mark:mode-toggled bus event.
283
+ localStorage.setItem('annotateMode', 'true');
281
284
  localStorage.setItem('activeToolbarPanel', 'annotations');
282
285
 
283
286
  const props = createMockProps({
@@ -289,20 +292,7 @@ describe('ResourceViewerPage', () => {
289
292
 
290
293
  renderWithProviders(<ResourceViewerPage {...props} />);
291
294
 
292
- // Before toggle: annotateMode is false, so archived badge is hidden
293
- expect(screen.queryByText('📦 Archived')).not.toBeInTheDocument();
294
-
295
- // Get the handler map that ResourceViewerPage passed to useEventSubscriptions
296
- const handlerMap = mockUseEventSubscriptions.mock.calls[mockUseEventSubscriptions.mock.calls.length - 1]?.[0] as Record<string, () => void>;
297
- expect(handlerMap).toBeDefined();
298
- expect(handlerMap['mark:mode-toggled']).toBeDefined();
299
-
300
- // Fire the mode toggle — this is what the toolbar emits
301
- act(() => {
302
- handlerMap['mark:mode-toggled']();
303
- });
304
-
305
- // After toggle: annotateMode is true, so archived badge should appear
295
+ // annotateMode true (from the policy layer) archived badge visible
306
296
  expect(screen.getByText('📦 Archived')).toBeInTheDocument();
307
297
 
308
298
  localStorage.clear();
@@ -28,6 +28,9 @@ import { useTheme } from '../../../contexts/ThemeContext';
28
28
  import { useLineNumbers } from '../../../hooks/useLineNumbers';
29
29
  import { useHoverDelay } from '../../../hooks/useHoverDelay';
30
30
  import { useEventSubscriptions } from '../../../contexts/useEventSubscription';
31
+ import { useObservableExternalNavigation } from '../../../hooks/useObservableBrowse';
32
+ import { useToolbarPrefs } from '../../../hooks/useToolbarPrefs';
33
+ import { getSelectorType } from '../../../lib/media-shapes';
31
34
  import { useResourceAnnotations } from '../../../contexts/ResourceAnnotationsContext';
32
35
  import { useSemiont } from '../../../session/SemiontProvider';
33
36
  import { createResourceViewerPageStateUnit } from '../state/resource-viewer-page-state-unit';
@@ -35,6 +38,8 @@ import { useStateUnit } from '../../../hooks/useStateUnit';
35
38
  import { useShellStateUnit } from '../../../hooks/useShellStateUnit';
36
39
  import { useTranslations } from '../../../contexts/TranslationContext';
37
40
  import { ReferenceWizardModal } from '../../../components/modals/ReferenceWizardModal';
41
+ import { ResourceGenerateModal } from '../../../components/modals/ResourceGenerateModal';
42
+ import { AnnotateReferencesProgressWidget } from '../../../components/AnnotateReferencesProgressWidget';
38
43
  import type { GenerationConfig } from '../../../components/modals/ConfigureGenerationStep';
39
44
 
40
45
  type SemiontResource = ResourceDescriptor;
@@ -128,30 +133,53 @@ export function ResourceViewerPage({
128
133
  }: ResourceViewerPageProps) {
129
134
  // Translations
130
135
  const tw = useTranslations('ReferenceWizard');
136
+ const tg = useTranslations('ResourceGenerate');
131
137
 
132
138
  const browser = useSemiont();
133
139
  const session = useObservable(browser.activeSession$);
134
140
  const semiont = session?.client;
141
+ const navigateExternal = useObservableExternalNavigation();
142
+
143
+ // ResourceViewer is bring-your-own-session: feed it the active session plus
144
+ // host-owned navigation (reference follow) and panel control (app-scoped bus).
145
+ const handleViewerOpenResource = useCallback((id: string) => {
146
+ navigateExternal(`/know/resource/${id}`, { resourceId: id });
147
+ }, [navigateExternal]);
148
+
149
+ const handleViewerOpenPanel = useCallback((event: EventMap['panel:open']) => {
150
+ browser.emit('panel:open', event);
151
+ }, [browser]);
135
152
 
136
153
  // UI state hooks
137
154
  const { showError, showSuccess, showInfo } = useToast();
138
155
  const { theme, setTheme } = useTheme();
139
156
  const { showLineNumbers, toggleLineNumbers } = useLineNumbers();
140
157
  const { hoverDelayMs } = useHoverDelay();
141
- const { triggerSparkleAnimation, clearNewAnnotationId } = useResourceAnnotations();
158
+ const { triggerSparkleAnimation, clearNewAnnotationId, newAnnotationIds } = useResourceAnnotations();
142
159
 
143
160
  // Render mode chooses the content path: 'text' decodes inline; 'image'
144
161
  // and 'pdf' go through the media-token (binary) path. 'none'/registry-miss
145
162
  // fall to the text path harmlessly — the viewer shows metadata + download.
146
163
  const resourceMediaType = getPrimaryMediaType(resource) || 'text/plain';
164
+
165
+ // Toolbar prefs: the POLICY layer (TOOLBAR-PREFS-AS-PROPS). The page owns the
166
+ // Browser's global-toolbar UX — shared values, localStorage persistence — and
167
+ // feeds the viewer its controlled props; the components hold no pref state policy.
168
+ const toolbarPrefs = useToolbarPrefs(getSelectorType(resourceMediaType));
169
+ const annotateMode = toolbarPrefs.annotateMode;
147
170
  const renderMode = capabilitiesOf(resourceMediaType)?.render;
148
171
  const isBinary = renderMode === 'image' || renderMode === 'pdf';
149
172
 
150
173
  // Text path: fetch and decode representation (disabled for binary — mediaToken path handles those)
151
- const { content: textContent, loading: textLoading } = useResourceContent(rUri, resource, !isBinary);
174
+ // Headless hook returns the error; the page (chrome tier) owns the toast.
175
+ const { content: textContent, loading: textLoading, error: contentError } = useResourceContent(semiont ?? null, rUri, resource, !isBinary);
176
+
177
+ useEffect(() => {
178
+ if (contentError) showError('Failed to load resource representation');
179
+ }, [contentError, showError]);
152
180
 
153
181
  // Binary path: fetch short-lived media token, construct URL
154
- const { token: mediaToken, loading: mediaTokenLoading } = useMediaToken(rUri);
182
+ const { token: mediaToken, loading: mediaTokenLoading } = useMediaToken(semiont ?? null, rUri);
155
183
  const binaryContent = (isBinary && mediaToken && semiont)
156
184
  ? `${semiont.baseUrl}/api/resources/${rUri}?token=${mediaToken}`
157
185
  : '';
@@ -187,6 +215,7 @@ export function ResourceViewerPage({
187
215
  const wizardResourceId = wizardState?.resourceId ?? null;
188
216
  const wizardDefaultTitle = wizardState?.defaultTitle ?? '';
189
217
  const wizardEntityTypes = wizardState?.entityTypes ?? [];
218
+ const [generateOpen, setGenerateOpen] = useState(false);
190
219
 
191
220
  const handleWizardClose = useCallback(() => {
192
221
  stateUnit.closeWizard();
@@ -209,6 +238,23 @@ export function ResourceViewerPage({
209
238
  });
210
239
  }, [stateUnit, clearNewAnnotationId, resource]);
211
240
 
241
+ // Resource-generate flow (GENERATE-FROM-BUTTON): drive the SAME yield progress$
242
+ // the annotation path uses so the full AnnotateReferencesProgressWidget shows —
243
+ // NOT a toast. `generateFromResource` is Phase 6 (the @semiont/sdk session);
244
+ // this is declared RED until that method lands. Do not re-impl it here.
245
+ const handleResourceGenerateSubmit = useCallback((_resourceId: string, config: GenerationConfig) => {
246
+ stateUnit.yield.generateFromResource({
247
+ title: config.title,
248
+ storageUri: config.storagePath,
249
+ ...(config.prompt ? { prompt: config.prompt } : {}),
250
+ language: config.language,
251
+ sourceLanguage: getLanguage(resource),
252
+ temperature: config.temperature,
253
+ maxTokens: config.maxTokens,
254
+ context: config.context,
255
+ });
256
+ }, [stateUnit, resource]);
257
+
212
258
  const handleWizardLinkResource = useCallback(async (referenceId: string, targetResourceId: string) => {
213
259
  if (!semiont) return;
214
260
  try {
@@ -366,13 +412,8 @@ export function ResourceViewerPage({
366
412
  }
367
413
  }, [routes.know, session]);
368
414
 
369
- const handleModeToggled = useCallback(() => {
370
- setAnnotateMode(prev => !prev);
371
- }, []);
372
-
373
415
  // Event bus subscriptions (combined into single useEventSubscriptions call to prevent hook ordering issues)
374
416
  useEventSubscriptions({
375
- 'mark:mode-toggled': handleModeToggled,
376
417
  'mark:archive': handleResourceArchive,
377
418
  'mark:unarchive': handleResourceUnarchive,
378
419
  'yield:clone': handleResourceClone,
@@ -414,15 +455,6 @@ export function ResourceViewerPage({
414
455
  const primaryMediaType = primaryRep?.mediaType;
415
456
  const primaryByteSize = primaryRep?.byteSize;
416
457
 
417
- // Annotate mode state - synced via mark:mode-toggled event from AnnotateToolbar
418
- const [annotateMode, setAnnotateMode] = useState(() => {
419
- if (typeof window !== 'undefined') {
420
- return localStorage.getItem('annotateMode') === 'true';
421
- }
422
- return false;
423
- });
424
-
425
-
426
458
  // Combine resource with content
427
459
  const resourceWithContent = { ...resource, content };
428
460
 
@@ -452,6 +484,21 @@ export function ResourceViewerPage({
452
484
  </h2>
453
485
  </div>
454
486
  </div>
487
+ {/* Resource-generation progress (GENERATE-FROM-BUTTON P7) — no annotationId ⇒ a resource-gen job */}
488
+ {generationProgress && !generationProgress.annotationId && (
489
+ <AnnotateReferencesProgressWidget
490
+ progress={generationProgress}
491
+ annotationType="generation"
492
+ cancelJobType="generation"
493
+ translations={{
494
+ title: tg('progressTitle'),
495
+ cancel: tg('progressCancel'),
496
+ inProgress: tg('progressInProgress'),
497
+ complete: tg('progressComplete'),
498
+ failed: tg('progressFailed'),
499
+ }}
500
+ />
501
+ )}
455
502
  {/* Scrollable body wrapper - contains document content, header is sibling above */}
456
503
  <div className="semiont-document-viewer__scrollable-body" lang={getLanguage(resource) || undefined}>
457
504
  <ErrorBoundary
@@ -480,6 +527,18 @@ export function ResourceViewerPage({
480
527
  <ResourceViewer
481
528
  resource={resourceWithContent}
482
529
  annotations={groups ?? { highlights: [], comments: [], assessments: [], references: [], tags: [] }}
530
+ session={session ?? null}
531
+ onOpenResource={handleViewerOpenResource}
532
+ onOpenPanel={handleViewerOpenPanel}
533
+ annotateMode={toolbarPrefs.annotateMode}
534
+ onAnnotateModeChange={toolbarPrefs.setAnnotateMode}
535
+ clickAction={toolbarPrefs.clickAction}
536
+ onClickActionChange={toolbarPrefs.setClickAction}
537
+ selectionMotivation={toolbarPrefs.selectionMotivation}
538
+ onSelectionMotivationChange={toolbarPrefs.setSelectionMotivation}
539
+ shape={toolbarPrefs.shape}
540
+ onShapeChange={toolbarPrefs.setShape}
541
+ newAnnotationIds={newAnnotationIds}
483
542
  generatingReferenceId={generationProgress?.annotationId ?? null}
484
543
  showLineNumbers={showLineNumbers}
485
544
  hoverDelayMs={hoverDelayMs}
@@ -565,6 +624,7 @@ export function ResourceViewerPage({
565
624
  wasAttributedTo={resource.wasAttributedTo}
566
625
  wasDerivedFrom={resource.wasDerivedFrom}
567
626
  generator={resource.generator as components['schemas']['Agent'] | components['schemas']['Agent'][] | undefined}
627
+ onGenerate={() => setGenerateOpen(true)}
568
628
  />
569
629
  )}
570
630
 
@@ -645,6 +705,48 @@ export function ResourceViewerPage({
645
705
  semanticScoringHelp: tw('semanticScoringHelp'),
646
706
  }}
647
707
  />
708
+
709
+ {/* Resource-generate flow (GENERATE-FROM-BUTTON) */}
710
+ <ResourceGenerateModal
711
+ isOpen={generateOpen}
712
+ onClose={() => setGenerateOpen(false)}
713
+ resourceId={rUri}
714
+ defaultTitle=""
715
+ locale={locale}
716
+ onGenerateSubmit={handleResourceGenerateSubmit}
717
+ translations={{
718
+ gatherTitle: tg('gatherTitle'),
719
+ reviewTitle: tg('reviewTitle'),
720
+ configureTitle: tg('configureTitle'),
721
+ next: tg('next'),
722
+ back: tg('back'),
723
+ cancel: tg('cancel'),
724
+ gatherIntro: tg('gatherIntro'),
725
+ includeContent: tg('includeContent'),
726
+ includeSummary: tg('includeSummary'),
727
+ gatherDepth: tg('gatherDepth'),
728
+ gatherMaxResources: tg('gatherMaxResources'),
729
+ gatherButton: tg('gatherButton'),
730
+ excludeLabel: tg('excludeLabel'),
731
+ loadingContext: tg('loadingContext'),
732
+ failedContext: tg('failedContext'),
733
+ sourceContextLabel: tg('sourceContextLabel'),
734
+ connectionsLabel: tg('connectionsLabel'),
735
+ citedByLabel: tg('citedByLabel'),
736
+ resourceTitle: tg('resourceTitle'),
737
+ resourceTitlePlaceholder: tg('resourceTitlePlaceholder'),
738
+ additionalInstructions: tg('additionalInstructions'),
739
+ additionalInstructionsPlaceholder: tg('additionalInstructionsPlaceholder'),
740
+ language: tg('language'),
741
+ languageHelp: tg('languageHelp'),
742
+ creativity: tg('creativity'),
743
+ creativityFocused: tg('creativityFocused'),
744
+ creativityCreative: tg('creativityCreative'),
745
+ maxLength: tg('maxLength'),
746
+ maxLengthHelp: tg('maxLengthHelp'),
747
+ generate: tg('generate'),
748
+ }}
749
+ />
648
750
  </div>
649
751
  );
650
752
  }
@@ -4,6 +4,7 @@ import { filter } from 'rxjs/operators';
4
4
  import { resourceId as makeResourceId } from '@semiont/core';
5
5
  import type { SemiontClient } from '@semiont/sdk';
6
6
  import { createResourceLoaderStateUnit } from '../resource-loader-state-unit';
7
+ import { assertStateUnitAxioms } from '@semiont/core/testing';
7
8
 
8
9
  const RID = makeResourceId('res-1');
9
10
 
@@ -44,3 +45,13 @@ describe('createResourceLoaderStateUnit', () => {
44
45
  stateUnit.dispose();
45
46
  });
46
47
  });
48
+
49
+ describe('ResourceLoaderStateUnit — StateUnit axioms', () => {
50
+ it('satisfies the StateUnit axioms', () => {
51
+ // No owned surfaces: resource$/isLoading$ are derived from client.browse; dispose is a no-op.
52
+ assertStateUnitAxioms({
53
+ setup: () => createResourceLoaderStateUnit(mockClient(), RID),
54
+ invocations: (u) => [() => u.invalidate()],
55
+ });
56
+ });
57
+ });
@@ -4,6 +4,7 @@ import { filter } from 'rxjs/operators';
4
4
  import { annotationId, resourceId as makeResourceId } from '@semiont/core';
5
5
  import type { ShellStateUnit } from '../../../../state/shell-state-unit';
6
6
  import { createResourceViewerPageStateUnit } from '../resource-viewer-page-state-unit';
7
+ import { assertStateUnitAxioms, disposeProbe } from '@semiont/core/testing';
7
8
  import { makeTestClient, type TestClient } from '../../../../__tests__/test-client';
8
9
 
9
10
  const RID = makeResourceId('res-1');
@@ -237,3 +238,32 @@ describe('createResourceViewerPageStateUnit', () => {
237
238
  stateUnit.dispose();
238
239
  });
239
240
  });
241
+
242
+ describe('ResourceViewerPageStateUnit — StateUnit axioms', () => {
243
+ it('satisfies the StateUnit axioms (A7-passed: browse survives; A7-owned: children disposed)', () => {
244
+ const RID = makeResourceId('res-ax');
245
+ assertStateUnitAxioms({
246
+ setup: () => {
247
+ const browse = disposeProbe();
248
+ const tc = clientWithNamespaces();
249
+ return {
250
+ unit: createResourceViewerPageStateUnit(tc.client, RID, 'en', browse as unknown as ShellStateUnit),
251
+ passedIn: [browse],
252
+ teardown: () => tc.bus.destroy(),
253
+ };
254
+ },
255
+ surfaces: (u) => [u.wizard$, u.content$, u.contentLoading$, u.mediaToken$],
256
+ invocations: (u) => [() => u.closeWizard()],
257
+ // A7-owned: the internally-constructed children must be disposed when the page
258
+ // disposes — proven by their own surfaces completing. (Match has no public
259
+ // surface; it's disposed via the same disposer.)
260
+ ownedChildSurfaces: (u) => [
261
+ u.beckon.hoveredAnnotationId$,
262
+ u.mark.pendingAnnotation$,
263
+ u.gather.context$,
264
+ u.yield.isGenerating$,
265
+ ],
266
+ numRuns: 5,
267
+ });
268
+ });
269
+ });
@@ -1,6 +1,6 @@
1
1
  import { type Observable, map } from 'rxjs';
2
2
  import type { ResourceDescriptor, ResourceId } from '@semiont/core';
3
- import type { StateUnit } from '@semiont/sdk';
3
+ import type { StateUnit } from '@semiont/core';
4
4
  import type { SemiontClient } from '@semiont/sdk';
5
5
 
6
6
  export interface ResourceLoaderStateUnit extends StateUnit {
@@ -1,7 +1,7 @@
1
1
  import { BehaviorSubject, type Observable, map } from 'rxjs';
2
2
  import type { ResourceId, components } from '@semiont/core';
3
3
  import { createDisposer } from '@semiont/sdk';
4
- import type { StateUnit } from '@semiont/sdk';
4
+ import type { StateUnit } from '@semiont/core';
5
5
  import type { ShellStateUnit } from '../../../state/shell-state-unit';
6
6
  import { createBeckonStateUnit, type BeckonStateUnit } from '@semiont/sdk';
7
7
  import { createMarkStateUnit, type MarkStateUnit } from '@semiont/sdk';
@@ -10,7 +10,7 @@ import { createMatchStateUnit } from '@semiont/sdk';
10
10
  import { createYieldStateUnit, type YieldStateUnit } from '@semiont/sdk';
11
11
  import type { SemiontClient } from '@semiont/sdk';
12
12
  import { decodeWithCharset, textExtractionOf } from '@semiont/core';
13
- import { isHighlight, isComment, isAssessment, isReference, isTag } from '@semiont/core';
13
+ import { groupAnnotations } from '../../../lib/annotation-groups';
14
14
  import type { ReferencedByEntry } from '@semiont/sdk';
15
15
 
16
16
  import type { Annotation } from '@semiont/core';
@@ -72,7 +72,10 @@ export function createResourceViewerPageStateUnit(
72
72
  const yieldStateUnit = createYieldStateUnit(client, resourceId, locale);
73
73
 
74
74
  disposer.add(beckon);
75
- disposer.add(browse);
75
+ // `browse` (ShellStateUnit) is a *passed-in* dependency — owned by `useShellStateUnit`,
76
+ // not this page unit. Do NOT add it to the disposer: it's app-scoped and shared, so
77
+ // disposing it on page teardown would tear down (or double-dispose) the shared shell.
78
+ // See packages/sdk/docs/STATE-UNITS.md (composition: only dispose children you construct).
76
79
  disposer.add(mark);
77
80
  disposer.add(gather);
78
81
  disposer.add(matchStateUnit);
@@ -82,19 +85,7 @@ export function createResourceViewerPageStateUnit(
82
85
  map((a) => a ?? []),
83
86
  );
84
87
 
85
- const annotationGroups$: Observable<AnnotationGroups> = annotations$.pipe(
86
- map((anns) => {
87
- const groups: AnnotationGroups = { highlights: [], comments: [], assessments: [], references: [], tags: [] };
88
- for (const ann of anns) {
89
- if (isHighlight(ann)) groups.highlights.push(ann);
90
- else if (isComment(ann)) groups.comments.push(ann);
91
- else if (isAssessment(ann)) groups.assessments.push(ann);
92
- else if (isReference(ann)) groups.references.push(ann);
93
- else if (isTag(ann)) groups.tags.push(ann);
94
- }
95
- return groups;
96
- }),
97
- );
88
+ const annotationGroups$: Observable<AnnotationGroups> = annotations$.pipe(map(groupAnnotations));
98
89
 
99
90
  const entityTypes$: Observable<string[]> = client.browse.entityTypes().pipe(
100
91
  map((e) => e ?? []),
@@ -111,6 +111,25 @@
111
111
  padding: 0 1.5rem; /* Move padding from parent to scrollable content */
112
112
  }
113
113
 
114
+ /* ── Inline embed variant ────────────────────────────────────────────────────
115
+ * Auto-height to content, no inner scroll container, no pane chrome — the
116
+ * viewer drops into a chat bubble / card / list item and the HOST page
117
+ * scrolls. Default (no modifier) keeps the fill-the-pane behavior above. */
118
+ .semiont-resource-viewer--inline {
119
+ height: auto;
120
+ }
121
+
122
+ .semiont-browse-view--inline {
123
+ height: auto;
124
+ background-color: transparent; /* the host container owns the background */
125
+ }
126
+
127
+ .semiont-browse-view--inline .semiont-browse-view__content {
128
+ flex: none; /* size to content, not to a pane */
129
+ overflow: visible; /* no inner scrollbar — the host page is the scroll context */
130
+ padding: 0; /* no pane gutter — the host owns spacing */
131
+ }
132
+
114
133
  /* ── Markdown prose typography ──────────────────────────────────────────────
115
134
  * The global CSS reset zeroes margins/padding on all block elements and
116
135
  * removes list styles. Re-apply semantic typographic defaults scoped to the
@@ -16,8 +16,11 @@
16
16
  "representation": "التمثيل",
17
17
  "mediaType": "نوع الوسائط",
18
18
  "byteSize": "الحجم",
19
+ "storageUri": "التخزين",
19
20
  "clone": "استنساخ",
20
21
  "cloneDescription": "إنشاء رابط استنساخ قابل للمشاركة لهذا المورد",
22
+ "generate": "توليد",
23
+ "generateDescription": "إنشاء مورد جديد من سياق هذا المورد",
21
24
  "archive": "أرشفة",
22
25
  "archiveDescription": "نقل هذا المورد إلى حالة الأرشيف",
23
26
  "unarchive": "إلغاء الأرشفة",
@@ -26,8 +29,7 @@
26
29
  "createdAt": "تاريخ الإنشاء",
27
30
  "modifiedAt": "تاريخ التعديل",
28
31
  "attributedTo": "منسوب إلى",
29
- "derivedFrom": "مشتق من",
30
- "storageUri": "التخزين"
32
+ "derivedFrom": "مشتق من"
31
33
  },
32
34
  "CollaborationPanel": {
33
35
  "title": "التعاون",
@@ -321,6 +323,43 @@
321
323
  "hoverDelayDescription": "تأخير {{delay}} ميلي ثانية قبل ظهور تأثيرات التمرير"
322
324
  },
323
325
  "AnnotateView": {},
326
+ "ResourceGenerate": {
327
+ "gatherTitle": "تكوين الجمع",
328
+ "reviewTitle": "مراجعة السياق",
329
+ "configureTitle": "تكوين التوليد",
330
+ "next": "التالي",
331
+ "back": "رجوع",
332
+ "cancel": "إلغاء",
333
+ "gatherIntro": "اختر ما تريد تضمينه في السياق المُجمَّع.",
334
+ "includeContent": "تضمين محتوى المورد",
335
+ "includeSummary": "تضمين الملخص",
336
+ "gatherDepth": "العمق",
337
+ "gatherMaxResources": "الحد الأقصى للموارد",
338
+ "gatherButton": "جمع",
339
+ "excludeLabel": "استبعاد من الاسترجاع",
340
+ "loadingContext": "جارٍ جمع السياق...",
341
+ "failedContext": "فشل في جمع السياق",
342
+ "sourceContextLabel": "المورد",
343
+ "connectionsLabel": "الاتصالات",
344
+ "citedByLabel": "مُستشهد به من قِبل",
345
+ "resourceTitle": "عنوان المورد الجديد",
346
+ "resourceTitlePlaceholder": "عنوان المورد المُولَّد...",
347
+ "additionalInstructions": "تعليمات إضافية",
348
+ "additionalInstructionsPlaceholder": "إرشادات اختيارية للتوليد...",
349
+ "language": "اللغة",
350
+ "languageHelp": "لغة المورد المُولَّد",
351
+ "creativity": "الإبداع",
352
+ "creativityFocused": "مركّز",
353
+ "creativityCreative": "إبداعي",
354
+ "maxLength": "الحد الأقصى للطول",
355
+ "maxLengthHelp": "العدد الأقصى من الرموز",
356
+ "generate": "توليد",
357
+ "progressTitle": "جارٍ توليد المورد",
358
+ "progressCancel": "إلغاء التوليد",
359
+ "progressInProgress": "جارٍ التوليد…",
360
+ "progressComplete": "اكتمل التوليد!",
361
+ "progressFailed": "فشل التوليد"
362
+ },
324
363
  "ReferenceWizard": {
325
364
  "gatherTitle": "السياق المُجمَّع",
326
365
  "configureGenerationTitle": "تكوين التوليد",
@@ -16,8 +16,11 @@
16
16
  "representation": "উপস্থাপনা",
17
17
  "mediaType": "মিডিয়ার ধরন",
18
18
  "byteSize": "আকার",
19
+ "storageUri": "সঞ্চয়স্থান",
19
20
  "clone": "ক্লোন",
20
21
  "cloneDescription": "এই সম্পদের জন্য একটি শেয়ারযোগ্য ক্লোন লিঙ্ক তৈরি করুন",
22
+ "generate": "তৈরি করুন",
23
+ "generateDescription": "এই সম্পদের প্রসঙ্গ থেকে একটি নতুন সম্পদ তৈরি করুন",
21
24
  "archive": "সংরক্ষণাগারভুক্ত করুন",
22
25
  "archiveDescription": "এই সম্পদটিকে সংরক্ষণাগারভুক্ত অবস্থায় স্থানান্তর করুন",
23
26
  "unarchive": "সংরক্ষণাগার থেকে পুনরুদ্ধার করুন",
@@ -26,8 +29,7 @@
26
29
  "createdAt": "তৈরির তারিখ",
27
30
  "modifiedAt": "পরিবর্তনের তারিখ",
28
31
  "attributedTo": "সম্পাদককৃত",
29
- "derivedFrom": "থেকে উৎপন্ন",
30
- "storageUri": "সঞ্চয়স্থান"
32
+ "derivedFrom": "থেকে উৎপন্ন"
31
33
  },
32
34
  "CollaborationPanel": {
33
35
  "title": "সহযোগিতা",
@@ -321,6 +323,43 @@
321
323
  "hoverDelayDescription": "হোভার প্রভাব প্রদর্শনের আগে {{delay}}মি.সে. বিলম্ব"
322
324
  },
323
325
  "AnnotateView": {},
326
+ "ResourceGenerate": {
327
+ "gatherTitle": "সংগ্রহ কনফিগার করুন",
328
+ "reviewTitle": "প্রসঙ্গ পর্যালোচনা করুন",
329
+ "configureTitle": "জেনারেশন কনফিগার করুন",
330
+ "next": "পরবর্তী",
331
+ "back": "পিছনে",
332
+ "cancel": "বাতিল করুন",
333
+ "gatherIntro": "সংগৃহীত প্রসঙ্গে কী অন্তর্ভুক্ত করবেন তা বেছে নিন।",
334
+ "includeContent": "সম্পদের বিষয়বস্তু অন্তর্ভুক্ত করুন",
335
+ "includeSummary": "সারসংক্ষেপ অন্তর্ভুক্ত করুন",
336
+ "gatherDepth": "গভীরতা",
337
+ "gatherMaxResources": "সর্বোচ্চ সম্পদ",
338
+ "gatherButton": "সংগ্রহ করুন",
339
+ "excludeLabel": "পুনরুদ্ধার থেকে বাদ দিন",
340
+ "loadingContext": "প্রসঙ্গ সংগ্রহ হচ্ছে...",
341
+ "failedContext": "প্রসঙ্গ সংগ্রহ ব্যর্থ",
342
+ "sourceContextLabel": "সম্পদ",
343
+ "connectionsLabel": "সংযোগসমূহ",
344
+ "citedByLabel": "উদ্ধৃতকারী",
345
+ "resourceTitle": "নতুন সম্পদের শিরোনাম",
346
+ "resourceTitlePlaceholder": "তৈরি করা সম্পদের শিরোনাম...",
347
+ "additionalInstructions": "অতিরিক্ত নির্দেশনা",
348
+ "additionalInstructionsPlaceholder": "তৈরির জন্য ঐচ্ছিক নির্দেশনা...",
349
+ "language": "ভাষা",
350
+ "languageHelp": "তৈরি করা সম্পদের ভাষা",
351
+ "creativity": "সৃজনশীলতা",
352
+ "creativityFocused": "কেন্দ্রীভূত",
353
+ "creativityCreative": "সৃজনশীল",
354
+ "maxLength": "সর্বোচ্চ দৈর্ঘ্য",
355
+ "maxLengthHelp": "সর্বোচ্চ টোকেন সংখ্যা",
356
+ "generate": "তৈরি করুন",
357
+ "progressTitle": "সম্পদ তৈরি হচ্ছে",
358
+ "progressCancel": "তৈরি বাতিল করুন",
359
+ "progressInProgress": "তৈরি হচ্ছে…",
360
+ "progressComplete": "তৈরি সম্পূর্ণ!",
361
+ "progressFailed": "তৈরি ব্যর্থ"
362
+ },
324
363
  "ReferenceWizard": {
325
364
  "gatherTitle": "সংগৃহীত প্রসঙ্গ",
326
365
  "configureGenerationTitle": "জেনারেশন কনফিগার করুন",
@@ -16,8 +16,11 @@
16
16
  "representation": "Reprezentace",
17
17
  "mediaType": "Typ média",
18
18
  "byteSize": "Velikost",
19
+ "storageUri": "Úložiště",
19
20
  "clone": "Klonovat",
20
21
  "cloneDescription": "Vytvořit sdílitelný odkaz na klon tohoto zdroje",
22
+ "generate": "Generovat",
23
+ "generateDescription": "Vygenerovat nový zdroj z kontextu tohoto zdroje",
21
24
  "archive": "Archivovat",
22
25
  "archiveDescription": "Přesunout tento zdroj do archivovaného stavu",
23
26
  "unarchive": "Obnovit z archivu",
@@ -26,8 +29,7 @@
26
29
  "createdAt": "Vytvořeno",
27
30
  "modifiedAt": "Upraveno",
28
31
  "attributedTo": "Připsáno",
29
- "derivedFrom": "Odvozeno z",
30
- "storageUri": "Úložiště"
32
+ "derivedFrom": "Odvozeno z"
31
33
  },
32
34
  "CollaborationPanel": {
33
35
  "title": "Spolupráce",
@@ -321,6 +323,43 @@
321
323
  "hoverDelayDescription": "{{delay}}ms zpoždění před zobrazením efektů při najetí"
322
324
  },
323
325
  "AnnotateView": {},
326
+ "ResourceGenerate": {
327
+ "gatherTitle": "Konfigurovat shromáždění",
328
+ "reviewTitle": "Zkontrolovat kontext",
329
+ "configureTitle": "Konfigurovat generování",
330
+ "next": "Další",
331
+ "back": "Zpět",
332
+ "cancel": "Zrušit",
333
+ "gatherIntro": "Vyberte, co zahrnout do shromážděného kontextu.",
334
+ "includeContent": "Zahrnout obsah zdroje",
335
+ "includeSummary": "Zahrnout souhrn",
336
+ "gatherDepth": "Hloubka",
337
+ "gatherMaxResources": "Maximální počet zdrojů",
338
+ "gatherButton": "Shromáždit",
339
+ "excludeLabel": "Vyloučit z vyvolání",
340
+ "loadingContext": "Shromažďování kontextu...",
341
+ "failedContext": "Nepodařilo se shromáždit kontext",
342
+ "sourceContextLabel": "Zdroj",
343
+ "connectionsLabel": "Připojení",
344
+ "citedByLabel": "Citováno",
345
+ "resourceTitle": "Název nového zdroje",
346
+ "resourceTitlePlaceholder": "Název generovaného zdroje...",
347
+ "additionalInstructions": "Další pokyny",
348
+ "additionalInstructionsPlaceholder": "Volitelné pokyny pro generování...",
349
+ "language": "Jazyk",
350
+ "languageHelp": "Jazyk generovaného zdroje",
351
+ "creativity": "Kreativita",
352
+ "creativityFocused": "Zaměřená",
353
+ "creativityCreative": "Kreativní",
354
+ "maxLength": "Maximální délka",
355
+ "maxLengthHelp": "Maximální počet tokenů",
356
+ "generate": "Generovat",
357
+ "progressTitle": "Generování zdroje",
358
+ "progressCancel": "Zrušit generování",
359
+ "progressInProgress": "Generování…",
360
+ "progressComplete": "Generování dokončeno!",
361
+ "progressFailed": "Generování selhalo"
362
+ },
324
363
  "ReferenceWizard": {
325
364
  "gatherTitle": "Shromážděný kontext",
326
365
  "configureGenerationTitle": "Konfigurovat generování",