@semiont/react-ui 0.5.25 → 0.5.27
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.
- package/README.md +28 -4
- package/dist/PdfAnnotationCanvas.client-EVUPTUWZ.js +677 -0
- package/dist/PdfAnnotationCanvas.client-EVUPTUWZ.js.map +1 -0
- package/dist/PdfAnnotationCanvas.client-TGDPPGXJ.css +185 -0
- package/dist/PdfAnnotationCanvas.client-TGDPPGXJ.css.map +1 -0
- package/dist/{ar-CULRHLNG.js → ar-OU3DQGC6.js} +65 -7
- package/dist/ar-OU3DQGC6.js.map +1 -0
- package/dist/{bn-HYR7CEL2.js → bn-PHWCR6AZ.js} +65 -7
- package/dist/bn-PHWCR6AZ.js.map +1 -0
- package/dist/chunk-5VDTWRXJ.js +287 -0
- package/dist/chunk-5VDTWRXJ.js.map +1 -0
- package/dist/{chunk-TG2XQEC4.js → chunk-BTUG3VJJ.js} +18 -298
- package/dist/chunk-BTUG3VJJ.js.map +1 -0
- package/dist/{chunk-NH6L2GIL.js → chunk-PCRRBU7H.js} +65 -7
- package/dist/chunk-PCRRBU7H.js.map +1 -0
- package/dist/{cs-YBRWY7NH.js → cs-NEXYZ62I.js} +65 -7
- package/dist/cs-NEXYZ62I.js.map +1 -0
- package/dist/{da-PHDEOBV3.js → da-FAT43YCU.js} +65 -7
- package/dist/da-FAT43YCU.js.map +1 -0
- package/dist/{de-O4UCCVLJ.js → de-KRQ3WBCU.js} +65 -7
- package/dist/de-KRQ3WBCU.js.map +1 -0
- package/dist/{el-MVGO6WZV.js → el-Q4IU3EKC.js} +65 -7
- package/dist/el-Q4IU3EKC.js.map +1 -0
- package/dist/{en-2KQILFKQ.js → en-2KADE7N4.js} +6 -2
- package/dist/{es-USSLXQY7.js → es-2IO3R2MK.js} +65 -7
- package/dist/es-2IO3R2MK.js.map +1 -0
- package/dist/{fa-WMAREFWY.js → fa-Q5GOQFXX.js} +65 -7
- package/dist/fa-Q5GOQFXX.js.map +1 -0
- package/dist/{fi-B3NBNOTS.js → fi-R6NMRWBE.js} +65 -7
- package/dist/fi-R6NMRWBE.js.map +1 -0
- package/dist/{fr-TXYK5T5W.js → fr-QY4D5E6J.js} +65 -7
- package/dist/fr-QY4D5E6J.js.map +1 -0
- package/dist/{he-JCJACW5D.js → he-X6Y77XHY.js} +65 -7
- package/dist/he-X6Y77XHY.js.map +1 -0
- package/dist/{hi-VOQLZNJU.js → hi-XL7IOEQM.js} +65 -7
- package/dist/hi-XL7IOEQM.js.map +1 -0
- package/dist/{id-BFN5RZNZ.js → id-QZ4ZZS67.js} +65 -7
- package/dist/id-QZ4ZZS67.js.map +1 -0
- package/dist/index.css +241 -508
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +155 -54
- package/dist/index.js +1815 -1642
- package/dist/index.js.map +1 -1
- package/dist/integrations/css-modules-helper.js +1 -3
- package/dist/integrations/css-modules-helper.js.map +1 -1
- package/dist/{it-TWWDHKKM.js → it-ME2Q7OB6.js} +65 -7
- package/dist/it-ME2Q7OB6.js.map +1 -0
- package/dist/{ja-YRQLEBFM.js → ja-HX7QASRI.js} +65 -7
- package/dist/ja-HX7QASRI.js.map +1 -0
- package/dist/{ko-PG6B3CRB.js → ko-EQO5AHAV.js} +65 -7
- package/dist/ko-EQO5AHAV.js.map +1 -0
- package/dist/{ms-7EZECVKM.js → ms-UILFSF3I.js} +65 -7
- package/dist/ms-UILFSF3I.js.map +1 -0
- package/dist/{nl-HP753YAP.js → nl-NNI45PMK.js} +65 -7
- package/dist/nl-NNI45PMK.js.map +1 -0
- package/dist/{no-JUD5WX3N.js → no-MAL5F6P6.js} +65 -7
- package/dist/no-MAL5F6P6.js.map +1 -0
- package/dist/{pl-RVUL4CBM.js → pl-4RMY6JAJ.js} +65 -7
- package/dist/pl-4RMY6JAJ.js.map +1 -0
- package/dist/{pt-RPOVD4QM.js → pt-VQH2X3QQ.js} +65 -7
- package/dist/pt-VQH2X3QQ.js.map +1 -0
- package/dist/{ro-DMYWQTRD.js → ro-XXCQO2OG.js} +65 -7
- package/dist/ro-XXCQO2OG.js.map +1 -0
- package/dist/{sv-DMZ4FGXD.js → sv-7Z6EJ6U4.js} +65 -7
- package/dist/sv-7Z6EJ6U4.js.map +1 -0
- package/dist/test-utils.css +1 -1
- package/dist/test-utils.css.map +1 -1
- package/dist/test-utils.d.ts +1 -1
- package/dist/test-utils.js +5 -3
- package/dist/test-utils.js.map +1 -1
- package/dist/{th-4HVBJBQ2.js → th-L3DXXYVQ.js} +65 -7
- package/dist/th-L3DXXYVQ.js.map +1 -0
- package/dist/{tr-6BDPU5ML.js → tr-P3DFVLFJ.js} +65 -7
- package/dist/tr-P3DFVLFJ.js.map +1 -0
- package/dist/{uk-TBZBT2TL.js → uk-7C5D3PXS.js} +65 -7
- package/dist/uk-7C5D3PXS.js.map +1 -0
- package/dist/{vi-UMKZKZL3.js → vi-ZLTLEO7P.js} +65 -7
- package/dist/vi-ZLTLEO7P.js.map +1 -0
- package/dist/{zh-YBJWJJYB.js → zh-5FHVWDIN.js} +65 -7
- package/dist/zh-5FHVWDIN.js.map +1 -0
- package/package.json +7 -7
- package/src/components/AssistProgress.tsx +144 -134
- package/src/components/{EntityFoundLog.tsx → ItemFoundLog.tsx} +12 -7
- package/src/components/ProtectedErrorBoundary.css +3 -1
- package/src/components/StatusDisplay.css +35 -35
- package/src/components/Toast.css +3 -1
- package/src/components/__tests__/AssistProgress.test.tsx +216 -148
- package/src/components/annotation/annotation-entries.css +0 -4
- package/src/components/annotation/annotations.css +1 -1
- package/src/components/annotation/references.css +0 -4
- package/src/components/image-annotation/AnnotationOverlay.tsx +6 -6
- package/src/components/image-annotation/SvgDrawingCanvas.tsx +1 -1
- package/src/components/image-annotation/__tests__/AnnotationOverlay.click.test.tsx +7 -9
- package/src/components/image-annotation/__tests__/SvgDrawingCanvas.click.test.tsx +1 -2
- package/src/components/layout/Header.css +0 -4
- package/src/components/layout/LeftSidebar.css +0 -4
- package/src/components/modals/ConfigureGenerationStep.tsx +109 -48
- package/src/components/modals/ConfigureSearchStep.tsx +23 -40
- package/src/components/modals/ReferenceWizardModal.tsx +55 -16
- package/src/components/modals/ResourceGenerateModal.tsx +24 -8
- package/src/components/modals/ResourceSearchModal.tsx +1 -1
- package/src/components/modals/SearchModal.css +5 -17
- package/src/components/modals/SearchModal.tsx +1 -1
- package/src/components/modals/SearchResultsStep.tsx +2 -20
- package/src/components/modals/WizardFooter.tsx +63 -0
- package/src/components/modals/__tests__/ConfigureGenerationStep.test.tsx +255 -0
- package/src/components/modals/__tests__/ConfigureSearchStep.test.tsx +72 -0
- package/src/components/modals/__tests__/ReferenceWizardModal.test.tsx +256 -0
- package/src/components/modals/__tests__/ResourceGenerateModal.test.tsx +1 -0
- package/src/components/modals/__tests__/ResourceSearchModal.test.tsx +6 -2
- package/src/components/modals/__tests__/SearchModal.search-wiring.test.tsx +6 -2
- package/src/components/modals/__tests__/WizardFooter.test.tsx +235 -0
- package/src/components/modals/modals.css +16 -42
- package/src/components/navigation/NavigationTabs.css +0 -20
- package/src/components/pdf-annotation/PdfAnnotationCanvas.css +162 -6
- package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +623 -232
- package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +764 -7
- package/src/components/pdf-annotation/__tests__/estimate-slot-height.test.ts +53 -0
- package/src/components/pdf-annotation/estimate-slot-height.ts +31 -0
- package/src/components/resource/AnnotateView.tsx +16 -5
- package/src/components/resource/AnnotationHistory.tsx +2 -0
- package/src/components/resource/BrowseView.tsx +15 -4
- package/src/components/resource/ResourceViewer.tsx +23 -24
- package/src/components/resource/__tests__/AnnotateView.focus.test.tsx +50 -0
- package/src/components/resource/__tests__/AnnotationHistory.test.tsx +2 -0
- package/src/components/resource/__tests__/BrowseView.test.tsx +29 -3
- package/src/components/resource/__tests__/ResourceViewer.embeddable.test.tsx +47 -3
- package/src/components/resource/__tests__/browse-renderers.dispatch.test.tsx +33 -0
- package/src/components/resource/annotate-renderers.tsx +10 -1
- package/src/components/resource/browse-renderers.tsx +10 -1
- package/src/components/resource/event-formatting.ts +0 -3
- package/src/components/resource/panels/AssessmentEntry.tsx +1 -1
- package/src/components/resource/panels/AssessmentPanel.css +5 -6
- package/src/components/resource/panels/AssistSection.css +68 -271
- package/src/components/resource/panels/AssistSection.tsx +4 -4
- package/src/components/resource/panels/AssistShell.tsx +12 -4
- package/src/components/resource/panels/CollaborationPanel.css +47 -22
- package/src/components/resource/panels/CollaborationPanel.tsx +93 -2
- package/src/components/resource/panels/CommentEntry.tsx +1 -1
- package/src/components/resource/panels/CommentsPanel.css +0 -16
- package/src/components/resource/panels/HighlightEntry.tsx +1 -1
- package/src/components/resource/panels/HighlightPanel.css +0 -7
- package/src/components/resource/panels/JsonLdPanel.css +0 -4
- package/src/components/resource/panels/ReferenceEntry.tsx +1 -1
- package/src/components/resource/panels/ReferencesPanel.css +0 -12
- package/src/components/resource/panels/ReferencesPanel.tsx +12 -20
- package/src/components/resource/panels/ResourceInfoPanel.css +0 -32
- package/src/components/resource/panels/ResourceInfoPanel.tsx +1 -1
- package/src/components/resource/panels/StatisticsPanel.css +0 -20
- package/src/components/resource/panels/TagEntry.tsx +1 -1
- package/src/components/resource/panels/TaggingPanel.css +0 -4
- package/src/components/resource/panels/TaggingPanel.tsx +2 -10
- package/src/components/resource/panels/UnifiedAnnotationsPanel.css +0 -4
- package/src/components/resource/panels/__tests__/AssessmentEntry.test.tsx +0 -1
- package/src/components/resource/panels/__tests__/AssistSection.test.tsx +48 -50
- package/src/components/resource/panels/__tests__/AssistShell.test.tsx +11 -6
- package/src/components/resource/panels/__tests__/CollaborationPanel.test.tsx +89 -0
- package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +1 -2
- package/src/components/resource/panels/__tests__/HighlightEntry.test.tsx +0 -1
- package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +44 -36
- package/src/components/resource/panels/__tests__/ReferenceEntry.test.tsx +0 -1
- package/src/components/resource/panels/__tests__/ReferencesPanel.headless.test.tsx +1 -1
- package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +34 -53
- package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +37 -1
- package/src/components/resource/panels/__tests__/TagEntry.test.tsx +0 -1
- package/src/components/settings/SettingsPanel.css +0 -4
- package/src/features/auth/auth.css +9 -33
- package/src/features/resource-compose/state/__tests__/compose-page-state-unit.test.ts +25 -1
- package/src/features/resource-compose/state/compose-page-state-unit.ts +11 -2
- package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +55 -0
- package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +29 -0
- package/src/features/resource-discovery/state/__tests__/discover-state-unit.test.ts +53 -3
- package/src/features/resource-discovery/state/discover-state-unit.ts +29 -8
- package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +26 -0
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +42 -21
- package/src/features/resource-viewer/hooks/__tests__/useResourceViewedReport.test.tsx +63 -0
- package/src/features/resource-viewer/hooks/useResourceViewedReport.ts +33 -0
- package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts +2 -2
- package/src/features/resource-viewer/state/resource-viewer-page-state-unit.ts +1 -1
- package/src/styles/core/buttons.css +3 -1
- package/src/styles/core/forms.css +0 -21
- package/src/styles/core/indicators.css +0 -4
- package/src/styles/core/inputs.css +1 -5
- package/src/styles/core/progress.css +2 -34
- package/src/styles/core/sliders.css +0 -4
- package/src/styles/core/toggles.css +0 -4
- package/src/styles/features/compose.css +1 -1
- package/src/styles/features/resource-discovery.css +13 -0
- package/src/styles/features/resource-viewer.css +1 -21
- package/src/styles/features/static-pages.css +11 -11
- package/src/styles/motivations/motivation-assessment.css +2 -2
- package/src/styles/motivations/motivation-comment.css +2 -2
- package/src/styles/motivations/motivation-reference.css +2 -2
- package/src/styles/panels/history-panel.css +0 -40
- package/src/styles/panels/user-panel.css +0 -3
- package/src/styles/patterns/panel-helpers.css +0 -27
- package/src/styles/patterns/panel-sections.css +0 -59
- package/src/styles/patterns/panels-base.css +4 -36
- package/src/styles/utilities/motion.css +15 -15
- package/src/styles/variables.css +29 -1
- package/translations/ar.json +59 -5
- package/translations/bn.json +59 -5
- package/translations/cs.json +59 -5
- package/translations/da.json +59 -5
- package/translations/de.json +59 -5
- package/translations/el.json +59 -5
- package/translations/en.json +59 -5
- package/translations/es.json +59 -5
- package/translations/fa.json +59 -5
- package/translations/fi.json +59 -5
- package/translations/fr.json +59 -5
- package/translations/he.json +59 -5
- package/translations/hi.json +59 -5
- package/translations/id.json +59 -5
- package/translations/it.json +59 -5
- package/translations/ja.json +59 -5
- package/translations/ko.json +59 -5
- package/translations/ms.json +59 -5
- package/translations/nl.json +59 -5
- package/translations/no.json +59 -5
- package/translations/pl.json +59 -5
- package/translations/pt.json +59 -5
- package/translations/ro.json +59 -5
- package/translations/sv.json +59 -5
- package/translations/th.json +59 -5
- package/translations/tr.json +59 -5
- package/translations/uk.json +59 -5
- package/translations/vi.json +59 -5
- package/translations/zh.json +59 -5
- package/dist/PdfAnnotationCanvas.client-EHQWF6BR.js +0 -462
- package/dist/PdfAnnotationCanvas.client-EHQWF6BR.js.map +0 -1
- package/dist/PdfAnnotationCanvas.client-SU5KNT7G.css +0 -98
- package/dist/PdfAnnotationCanvas.client-SU5KNT7G.css.map +0 -1
- package/dist/ar-CULRHLNG.js.map +0 -1
- package/dist/bn-HYR7CEL2.js.map +0 -1
- package/dist/chunk-NH6L2GIL.js.map +0 -1
- package/dist/chunk-TG2XQEC4.js.map +0 -1
- package/dist/chunk-XUDKYAVC.js +0 -21
- package/dist/chunk-XUDKYAVC.js.map +0 -1
- package/dist/cs-YBRWY7NH.js.map +0 -1
- package/dist/da-PHDEOBV3.js.map +0 -1
- package/dist/de-O4UCCVLJ.js.map +0 -1
- package/dist/el-MVGO6WZV.js.map +0 -1
- package/dist/es-USSLXQY7.js.map +0 -1
- package/dist/fa-WMAREFWY.js.map +0 -1
- package/dist/fi-B3NBNOTS.js.map +0 -1
- package/dist/fr-TXYK5T5W.js.map +0 -1
- package/dist/he-JCJACW5D.js.map +0 -1
- package/dist/hi-VOQLZNJU.js.map +0 -1
- package/dist/id-BFN5RZNZ.js.map +0 -1
- package/dist/it-TWWDHKKM.js.map +0 -1
- package/dist/ja-YRQLEBFM.js.map +0 -1
- package/dist/ko-PG6B3CRB.js.map +0 -1
- package/dist/ms-7EZECVKM.js.map +0 -1
- package/dist/nl-HP753YAP.js.map +0 -1
- package/dist/no-JUD5WX3N.js.map +0 -1
- package/dist/pl-RVUL4CBM.js.map +0 -1
- package/dist/pt-RPOVD4QM.js.map +0 -1
- package/dist/ro-DMYWQTRD.js.map +0 -1
- package/dist/sv-DMZ4FGXD.js.map +0 -1
- package/dist/th-4HVBJBQ2.js.map +0 -1
- package/dist/tr-6BDPU5ML.js.map +0 -1
- package/dist/uk-TBZBT2TL.js.map +0 -1
- package/dist/vi-UMKZKZL3.js.map +0 -1
- package/dist/zh-YBJWJJYB.js.map +0 -1
- package/src/integrations/tailwind-plugin.cjs +0 -224
- /package/dist/{en-2KQILFKQ.js.map → en-2KADE7N4.js.map} +0 -0
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
9
|
+
import { assistProgressTranslations } from '../../../lib/assist-progress-copy';
|
|
10
|
+
import { useResourceViewedReport } from '../hooks/useResourceViewedReport';
|
|
9
11
|
import type { components, ResourceDescriptor, ResourceId, GatheredContext, EventMap } from '@semiont/core';
|
|
10
12
|
import type { ConnectionState } from '@semiont/core';
|
|
11
13
|
import { annotationId } from '@semiont/core';
|
|
@@ -24,6 +26,7 @@ import type { BrowseMediaRenderers, AnnotateMediaRenderers } from '@semiont/reac
|
|
|
24
26
|
import { useObservable } from '@semiont/react-ui';
|
|
25
27
|
import { useResourceContent } from '../../../hooks/useResourceContent';
|
|
26
28
|
import { useMediaToken } from '../../../hooks/useMediaToken';
|
|
29
|
+
import { useCollaborators } from '../../../hooks/useCollaborators';
|
|
27
30
|
import { mediaUrl } from '../../../lib/media-url';
|
|
28
31
|
import { useToast } from '../../../components/Toast';
|
|
29
32
|
import { useOutcomeToasts } from '../../../hooks/useOutcomeToasts';
|
|
@@ -117,7 +120,7 @@ export interface ResourceViewerPageProps {
|
|
|
117
120
|
* @subscribes yield:clone - Clone the current resource
|
|
118
121
|
* @subscribes beckon:sparkle - Trigger sparkle animation
|
|
119
122
|
* @subscribes mark:added - Annotation was created (sparkle)
|
|
120
|
-
* @subscribes browse:
|
|
123
|
+
* @subscribes browse:resource-open - Open a resource in the viewer (local links + the launcher's tour verbs)
|
|
121
124
|
* @subscribes browse:entity-type-clicked - Navigate filtered by entity type
|
|
122
125
|
*
|
|
123
126
|
* Outcome-notification channels (mark:create-error, mark:delete-error,
|
|
@@ -147,6 +150,18 @@ export function ResourceViewerPage({
|
|
|
147
150
|
const semiont = session?.client;
|
|
148
151
|
const navigateExternal = useObservableExternalNavigation();
|
|
149
152
|
|
|
153
|
+
// The KB's collaborator roster, for the Collaboration panel's software-agent
|
|
154
|
+
// rows. Subscribed unconditionally at the top level (hooks ordering) even
|
|
155
|
+
// though only one panel reads it; the underlying cache is a KB-wide
|
|
156
|
+
// singleton, so this costs one shared subscription, not one per panel open.
|
|
157
|
+
const { collaborators } = useCollaborators(semiont ?? null);
|
|
158
|
+
|
|
159
|
+
// At most one entry serves `generation` — the KB's workers.* config yields one
|
|
160
|
+
// inference config per job type — so `find` is exact, not a first-wins guess.
|
|
161
|
+
const generationAgent = collaborators.find((entry) =>
|
|
162
|
+
entry.servesJobTypes?.includes('generation'),
|
|
163
|
+
);
|
|
164
|
+
|
|
150
165
|
// ResourceViewer is bring-your-own-session: feed it the active session plus
|
|
151
166
|
// host-owned navigation (reference follow) and panel control (app-scoped bus).
|
|
152
167
|
const handleViewerOpenResource = useCallback((id: string) => {
|
|
@@ -224,6 +239,7 @@ export function ResourceViewerPage({
|
|
|
224
239
|
const panelInitialTab = useObservable(stateUnit?.browse.panelInitialTab$) ?? null;
|
|
225
240
|
const onScrollCompleted = stateUnit?.browse.onScrollCompleted;
|
|
226
241
|
const generationProgress = useObservable(stateUnit?.yield.progress$) ?? null;
|
|
242
|
+
const isGenerating = useObservable(stateUnit?.yield.isGenerating$) ?? false;
|
|
227
243
|
const gatherContext = useObservable(stateUnit?.gather.context$) ?? null;
|
|
228
244
|
const gatherLoading = useObservable(stateUnit?.gather.loading$) ?? false;
|
|
229
245
|
const gatherError = useObservable(stateUnit?.gather.error$) ?? null;
|
|
@@ -241,7 +257,7 @@ export function ResourceViewerPage({
|
|
|
241
257
|
|
|
242
258
|
const handleWizardGenerateSubmit = useCallback((referenceId: string, config: GenerationConfig) => {
|
|
243
259
|
clearNewAnnotationId(annotationId(referenceId));
|
|
244
|
-
stateUnit?.yield.generate(
|
|
260
|
+
stateUnit?.yield.generate(config.context, {
|
|
245
261
|
title: config.title,
|
|
246
262
|
storageUri: config.storagePath,
|
|
247
263
|
prompt: config.prompt,
|
|
@@ -252,16 +268,15 @@ export function ResourceViewerPage({
|
|
|
252
268
|
sourceLanguage: getLanguage(resource),
|
|
253
269
|
temperature: config.temperature,
|
|
254
270
|
maxTokens: config.maxTokens,
|
|
255
|
-
context: config.context,
|
|
256
271
|
});
|
|
257
272
|
}, [stateUnit, clearNewAnnotationId, resource]);
|
|
258
273
|
|
|
259
274
|
// Resource-generate flow (GENERATE-FROM-BUTTON): drive the SAME yield progress$
|
|
260
|
-
// the annotation path uses so the full
|
|
261
|
-
//
|
|
262
|
-
//
|
|
275
|
+
// the annotation path uses so the full `AssistProgress` widget shows — NOT a
|
|
276
|
+
// toast. Both paths are one `generate(context, options)` now: the context's
|
|
277
|
+
// focus.kind (resource here, annotation above) decides the shape.
|
|
263
278
|
const handleResourceGenerateSubmit = useCallback((_resourceId: string, config: GenerationConfig) => {
|
|
264
|
-
stateUnit?.yield.
|
|
279
|
+
stateUnit?.yield.generate(config.context, {
|
|
265
280
|
title: config.title,
|
|
266
281
|
storageUri: config.storagePath,
|
|
267
282
|
...(config.prompt ? { prompt: config.prompt } : {}),
|
|
@@ -269,7 +284,6 @@ export function ResourceViewerPage({
|
|
|
269
284
|
sourceLanguage: getLanguage(resource),
|
|
270
285
|
temperature: config.temperature,
|
|
271
286
|
maxTokens: config.maxTokens,
|
|
272
|
-
context: config.context,
|
|
273
287
|
});
|
|
274
288
|
}, [stateUnit, resource]);
|
|
275
289
|
|
|
@@ -378,7 +392,7 @@ export function ResourceViewerPage({
|
|
|
378
392
|
triggerSparkleAnimation(stored.payload.annotation.id);
|
|
379
393
|
}, [triggerSparkleAnimation]);
|
|
380
394
|
|
|
381
|
-
const
|
|
395
|
+
const handleResourceOpen = useCallback(({ resourceId }: { resourceId: string }) => {
|
|
382
396
|
if (routes.resourceDetail) {
|
|
383
397
|
const path = routes.resourceDetail(resourceId);
|
|
384
398
|
browser.emit('nav:push', { path, reason: 'reference-link' });
|
|
@@ -396,7 +410,7 @@ export function ResourceViewerPage({
|
|
|
396
410
|
// assist timed-out) live in useOutcomeToasts — they need only the resource id
|
|
397
411
|
// and the toast surface. The registration below keeps the handlers that need
|
|
398
412
|
// page-local dependencies (SDK actions, sparkles, settings, navigation).
|
|
399
|
-
useOutcomeToasts(
|
|
413
|
+
useOutcomeToasts(rUri);
|
|
400
414
|
|
|
401
415
|
// Single useEventSubscriptions call per file (enforced by
|
|
402
416
|
// scripts/compliance/audit-hooks-ordering.ts); hooks like useOutcomeToasts
|
|
@@ -407,7 +421,7 @@ export function ResourceViewerPage({
|
|
|
407
421
|
'yield:clone': handleResourceClone,
|
|
408
422
|
'beckon:sparkle': handleAnnotationSparkle,
|
|
409
423
|
'mark:added': handleAnnotationAdded,
|
|
410
|
-
'browse:
|
|
424
|
+
'browse:resource-open': handleResourceOpen,
|
|
411
425
|
'browse:entity-type-clicked': handleEntityTypeClicked,
|
|
412
426
|
});
|
|
413
427
|
|
|
@@ -426,6 +440,11 @@ export function ResourceViewerPage({
|
|
|
426
440
|
}
|
|
427
441
|
}, [contentLoading, content, resource.name, announceResourceLoading, announceResourceLoaded]);
|
|
428
442
|
|
|
443
|
+
// Report the arrival on the wire (browse:resource-viewed) — same
|
|
444
|
+
// load-complete condition the announcement uses, so "viewed" means the
|
|
445
|
+
// content is actually on screen (GUIDED-TOUR P5, D6).
|
|
446
|
+
useResourceViewedReport(rUri, !contentLoading && !!content);
|
|
447
|
+
|
|
429
448
|
// Derived state
|
|
430
449
|
const documentEntityTypes = resource.entityTypes || [];
|
|
431
450
|
|
|
@@ -476,17 +495,14 @@ export function ResourceViewerPage({
|
|
|
476
495
|
<AssistProgress
|
|
477
496
|
progress={generationProgress}
|
|
478
497
|
dataType="generation"
|
|
498
|
+
// The ending is the owner's fact and every owner must state it
|
|
499
|
+
// (CLEAN-PROGRESS D1). This call site used to pass neither
|
|
500
|
+
// `ended` nor `onDismiss`, so a finished generation stayed in its
|
|
501
|
+
// running form and then vanished on a timer.
|
|
502
|
+
ended={!isGenerating}
|
|
479
503
|
onCancel={() => session?.client.job.cancelRequest('generation')}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
cancel: tg('progressCancel'),
|
|
483
|
-
inProgress: tg('progressInProgress'),
|
|
484
|
-
complete: tg('progressComplete'),
|
|
485
|
-
failed: tg('progressFailed'),
|
|
486
|
-
paramsTitle: ta('paramsTitle'),
|
|
487
|
-
processing: (label) => ta('processing', { label }),
|
|
488
|
-
close: ta('close'),
|
|
489
|
-
}}
|
|
504
|
+
onDismiss={() => stateUnit?.yield.dismissProgress()}
|
|
505
|
+
translations={assistProgressTranslations(ta)}
|
|
490
506
|
/>
|
|
491
507
|
)}
|
|
492
508
|
{/* Scrollable body wrapper - contains document content, header is sibling above */}
|
|
@@ -637,6 +653,7 @@ export function ResourceViewerPage({
|
|
|
637
653
|
state={streamStatus}
|
|
638
654
|
eventCount={0}
|
|
639
655
|
knowledgeBaseName={knowledgeBaseName}
|
|
656
|
+
collaborators={collaborators}
|
|
640
657
|
/>
|
|
641
658
|
)}
|
|
642
659
|
|
|
@@ -657,6 +674,7 @@ export function ResourceViewerPage({
|
|
|
657
674
|
|
|
658
675
|
{/* Reference Resolution Wizard */}
|
|
659
676
|
<ReferenceWizardModal
|
|
677
|
+
{...(generationAgent ? { generationAgent } : {})}
|
|
660
678
|
isOpen={wizardOpen}
|
|
661
679
|
onClose={handleWizardClose}
|
|
662
680
|
annotationId={wizardAnnotationId}
|
|
@@ -703,6 +721,7 @@ export function ResourceViewerPage({
|
|
|
703
721
|
creativityCreative: tw('creativityCreative'),
|
|
704
722
|
maxLength: tw('maxLength'),
|
|
705
723
|
maxLengthHelp: tw('maxLengthHelp'),
|
|
724
|
+
maxLengthCeiling: tw('maxLengthCeiling'),
|
|
706
725
|
maxResults: tw('maxResults'),
|
|
707
726
|
semanticScoring: tw('semanticScoring'),
|
|
708
727
|
semanticScoringHelp: tw('semanticScoringHelp'),
|
|
@@ -711,6 +730,7 @@ export function ResourceViewerPage({
|
|
|
711
730
|
|
|
712
731
|
{/* Resource-generate flow (GENERATE-FROM-BUTTON) */}
|
|
713
732
|
<ResourceGenerateModal
|
|
733
|
+
{...(generationAgent ? { generationAgent } : {})}
|
|
714
734
|
isOpen={generateOpen}
|
|
715
735
|
onClose={() => setGenerateOpen(false)}
|
|
716
736
|
resourceId={rUri}
|
|
@@ -748,6 +768,7 @@ export function ResourceViewerPage({
|
|
|
748
768
|
creativityCreative: tg('creativityCreative'),
|
|
749
769
|
maxLength: tg('maxLength'),
|
|
750
770
|
maxLengthHelp: tg('maxLengthHelp'),
|
|
771
|
+
maxLengthCeiling: tg('maxLengthCeiling'),
|
|
751
772
|
generate: tg('generate'),
|
|
752
773
|
}}
|
|
753
774
|
/>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The viewer's arrival report — GUIDED-TOUR P5 (D6).
|
|
3
|
+
*
|
|
4
|
+
* `browse:resource-viewed` is a REPORT, deliberately distinct from the
|
|
5
|
+
* imperative `browse:resource-open`: it fires when a resource has actually
|
|
6
|
+
* loaded on screen, however the user got there (followed cue, in-app link,
|
|
7
|
+
* back button, typed URL). The contract this pins: once per arrival — never
|
|
8
|
+
* on unrelated re-renders, never before the content is up, and again when
|
|
9
|
+
* the viewer moves to a different resource.
|
|
10
|
+
*/
|
|
11
|
+
import { renderHook } from '@testing-library/react';
|
|
12
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
13
|
+
import type { ReactNode } from 'react';
|
|
14
|
+
import { useResourceViewedReport } from '../useResourceViewedReport';
|
|
15
|
+
import { createTestSemiontWrapper } from '../../../../test-utils';
|
|
16
|
+
import { resourceId } from '@semiont/core';
|
|
17
|
+
|
|
18
|
+
function makeWrapper() {
|
|
19
|
+
const { SemiontWrapper, client } = createTestSemiontWrapper();
|
|
20
|
+
const wrapper = ({ children }: { children: ReactNode }) => (
|
|
21
|
+
<SemiontWrapper>{children}</SemiontWrapper>
|
|
22
|
+
);
|
|
23
|
+
const viewed = vi.spyOn(client.browse, 'resourceViewed').mockImplementation(() => {});
|
|
24
|
+
return { wrapper, viewed };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const RID_A = resourceId('resaaa11223344556677889900aabbcc');
|
|
28
|
+
const RID_B = resourceId('resbbb11223344556677889900aabbcc');
|
|
29
|
+
|
|
30
|
+
describe('useResourceViewedReport', () => {
|
|
31
|
+
it('reports once when the resource finishes loading, not before and not again on re-render', () => {
|
|
32
|
+
const { wrapper, viewed } = makeWrapper();
|
|
33
|
+
|
|
34
|
+
const { rerender } = renderHook(
|
|
35
|
+
({ rid, loaded }: { rid: ReturnType<typeof resourceId>; loaded: boolean }) => useResourceViewedReport(rid, loaded),
|
|
36
|
+
{ wrapper, initialProps: { rid: RID_A, loaded: false } },
|
|
37
|
+
);
|
|
38
|
+
expect(viewed).not.toHaveBeenCalled();
|
|
39
|
+
|
|
40
|
+
rerender({ rid: RID_A, loaded: true });
|
|
41
|
+
expect(viewed).toHaveBeenCalledTimes(1);
|
|
42
|
+
|
|
43
|
+
rerender({ rid: RID_A, loaded: true });
|
|
44
|
+
rerender({ rid: RID_A, loaded: true });
|
|
45
|
+
expect(viewed).toHaveBeenCalledTimes(1);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('reports again when the viewer arrives at a different resource', () => {
|
|
49
|
+
const { wrapper, viewed } = makeWrapper();
|
|
50
|
+
|
|
51
|
+
const { rerender } = renderHook(
|
|
52
|
+
({ rid, loaded }: { rid: ReturnType<typeof resourceId>; loaded: boolean }) => useResourceViewedReport(rid, loaded),
|
|
53
|
+
{ wrapper, initialProps: { rid: RID_A, loaded: true } },
|
|
54
|
+
);
|
|
55
|
+
expect(viewed).toHaveBeenCalledTimes(1);
|
|
56
|
+
|
|
57
|
+
rerender({ rid: RID_B, loaded: false });
|
|
58
|
+
expect(viewed).toHaveBeenCalledTimes(1);
|
|
59
|
+
|
|
60
|
+
rerender({ rid: RID_B, loaded: true });
|
|
61
|
+
expect(viewed).toHaveBeenCalledTimes(2);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import type { ResourceId } from '@semiont/core';
|
|
3
|
+
import { useSemiont } from '../../../session/SemiontProvider';
|
|
4
|
+
import { useObservable } from '../../../hooks/useObservable';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Report a resource arrival on `browse:resource-viewed` — GUIDED-TOUR P5 (D6).
|
|
8
|
+
*
|
|
9
|
+
* Fires exactly once per arrival, when the resource has finished loading —
|
|
10
|
+
* however the user got here: a followed cue, an in-app link, the back button,
|
|
11
|
+
* a typed URL. That "any means" property is why this lives at the viewer's
|
|
12
|
+
* load-complete transition rather than on any navigation intent path. A
|
|
13
|
+
* re-render never re-reports; arriving at a different resource does.
|
|
14
|
+
*
|
|
15
|
+
* This is the REPORT half of the tour protocol. The imperative half is
|
|
16
|
+
* `browse:resource-open`; they must never share a channel (D6 — the driver
|
|
17
|
+
* would hear its own commands, and one viewer's click would steer another's
|
|
18
|
+
* page).
|
|
19
|
+
*/
|
|
20
|
+
export function useResourceViewedReport(rid: ResourceId, loaded: boolean): void {
|
|
21
|
+
const semiont = useSemiont();
|
|
22
|
+
const session = useObservable(semiont.activeSession$);
|
|
23
|
+
// Brand once at the boundary (BRAND-UPSTREAM): the caller already holds a
|
|
24
|
+
// ResourceId; this hook never re-brands.
|
|
25
|
+
const reported = useRef<ResourceId | null>(null);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (!loaded || !session) return;
|
|
29
|
+
if (reported.current === rid) return;
|
|
30
|
+
reported.current = rid;
|
|
31
|
+
session.client.browse.resourceViewed(rid);
|
|
32
|
+
}, [rid, loaded, session]);
|
|
33
|
+
}
|
package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts
CHANGED
|
@@ -56,7 +56,7 @@ function clientWithNamespaces(overrides: {
|
|
|
56
56
|
},
|
|
57
57
|
gather: { annotation: vi.fn(() => new Observable(() => {})) },
|
|
58
58
|
match: { search: vi.fn(() => new Observable(() => {})) },
|
|
59
|
-
yield: {
|
|
59
|
+
yield: { fromContext: vi.fn(() => new Observable(() => {})) },
|
|
60
60
|
bind: { body: vi.fn().mockResolvedValue(undefined) },
|
|
61
61
|
});
|
|
62
62
|
}
|
|
@@ -357,7 +357,7 @@ describe('createResourceViewerPageStateUnit — list failure states', () => {
|
|
|
357
357
|
mark: { annotation: vi.fn(), delete: vi.fn(), assist: vi.fn(() => new Observable(() => {})) },
|
|
358
358
|
gather: { annotation: vi.fn(() => new Observable(() => {})) },
|
|
359
359
|
match: { search: vi.fn(() => new Observable(() => {})) },
|
|
360
|
-
yield: {
|
|
360
|
+
yield: { fromContext: vi.fn(() => new Observable(() => {})) },
|
|
361
361
|
bind: { body: vi.fn().mockResolvedValue(undefined) },
|
|
362
362
|
});
|
|
363
363
|
const unit = createResourceViewerPageStateUnit(tc.session, RID, 'en', mockBrowse());
|
|
@@ -76,7 +76,7 @@ export function createResourceViewerPageStateUnit(
|
|
|
76
76
|
const mark = createMarkStateUnit(client, resourceId);
|
|
77
77
|
const gather = createGatherStateUnit(client, resourceId);
|
|
78
78
|
const matchStateUnit = createMatchStateUnit(client, resourceId);
|
|
79
|
-
const yieldStateUnit = createYieldStateUnit(client,
|
|
79
|
+
const yieldStateUnit = createYieldStateUnit(client, locale);
|
|
80
80
|
|
|
81
81
|
disposer.add(beckon);
|
|
82
82
|
// `browse` (ShellStateUnit) is a *passed-in* dependency — owned by `useShellStateUnit`,
|
|
@@ -487,8 +487,10 @@
|
|
|
487
487
|
color: var(--semiont-color-white);
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
+
/* Hover lifts. The dark active state is primary-600, so hovering to 700 sank
|
|
491
|
+
it — the opposite of the sibling .semiont-panel-button:hover above. */
|
|
490
492
|
[data-theme="dark"] .semiont-panel-button-active:hover {
|
|
491
|
-
background-color: var(--semiont-color-primary-
|
|
493
|
+
background-color: var(--semiont-color-primary-500);
|
|
492
494
|
}
|
|
493
495
|
|
|
494
496
|
/* ============================================
|
|
@@ -67,11 +67,6 @@
|
|
|
67
67
|
color: var(--semiont-text-primary);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
[data-theme="dark"] .semiont-form__checkbox-label,
|
|
71
|
-
[data-theme="dark"] .semiont-form__radio-label {
|
|
72
|
-
color: var(--semiont-text-primary);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
70
|
/* Form actions */
|
|
76
71
|
.semiont-form__actions {
|
|
77
72
|
display: flex;
|
|
@@ -121,10 +116,6 @@
|
|
|
121
116
|
padding: 0 0.5rem;
|
|
122
117
|
}
|
|
123
118
|
|
|
124
|
-
[data-theme="dark"] .semiont-form__legend {
|
|
125
|
-
color: var(--semiont-text-primary);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
119
|
/* Note: Disabled states for form controls are defined in their respective core files */
|
|
129
120
|
|
|
130
121
|
/* Panel form elements */
|
|
@@ -218,10 +209,6 @@
|
|
|
218
209
|
color: var(--semiont-text-primary);
|
|
219
210
|
}
|
|
220
211
|
|
|
221
|
-
[data-theme="dark"] .semiont-form-field__label {
|
|
222
|
-
color: var(--semiont-text-primary);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
212
|
.semiont-form-field__label--with-checkbox {
|
|
226
213
|
display: flex;
|
|
227
214
|
align-items: center;
|
|
@@ -235,20 +222,12 @@
|
|
|
235
222
|
font-weight: var(--semiont-font-medium);
|
|
236
223
|
}
|
|
237
224
|
|
|
238
|
-
[data-theme="dark"] .semiont-form-field__info {
|
|
239
|
-
color: var(--semiont-text-tertiary);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
225
|
.semiont-form-field__char-count {
|
|
243
226
|
font-size: var(--semiont-text-xs);
|
|
244
227
|
color: var(--semiont-text-tertiary);
|
|
245
228
|
text-align: right;
|
|
246
229
|
}
|
|
247
230
|
|
|
248
|
-
[data-theme="dark"] .semiont-form-field__char-count {
|
|
249
|
-
color: var(--semiont-text-tertiary);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
231
|
/* Note: Basic form controls (.semiont-textarea, .semiont-select, .semiont-checkbox)
|
|
253
232
|
are now defined in /styles/core/ as they are fundamental UI elements.
|
|
254
233
|
See: core/textareas.css, core/selects.css, core/checkboxes.css */
|
|
@@ -131,10 +131,6 @@
|
|
|
131
131
|
color: var(--semiont-text-secondary);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
[data-theme="dark"] .semiont-indicator__label {
|
|
135
|
-
color: var(--semiont-text-secondary);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
134
|
/* Indicator Badge (dot with count) */
|
|
139
135
|
.semiont-indicator-badge {
|
|
140
136
|
position: relative;
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
align-items: center;
|
|
138
138
|
padding: 0.5rem 0.5rem 0.5rem 0.75rem;
|
|
139
139
|
font-size: var(--semiont-text-sm);
|
|
140
|
-
font-family: var(--semiont-font-mono
|
|
140
|
+
font-family: var(--semiont-font-mono);
|
|
141
141
|
color: var(--semiont-text-tertiary);
|
|
142
142
|
background-color: var(--semiont-color-gray-50);
|
|
143
143
|
border-right: 1px solid var(--semiont-color-gray-300);
|
|
@@ -160,10 +160,6 @@
|
|
|
160
160
|
min-width: 0;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
[data-theme="dark"] .semiont-input--addon {
|
|
164
|
-
border: none;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
163
|
.semiont-input--addon:focus-visible,
|
|
168
164
|
.semiont-input--addon:focus {
|
|
169
165
|
outline: none;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
[data-theme="dark"] .semiont-progress__fill--warning {
|
|
86
|
-
background-color: var(--semiont-color-warning);
|
|
86
|
+
background-color: var(--semiont-color-warning-light);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.semiont-progress__fill--error {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
[data-theme="dark"] .semiont-progress__fill--error {
|
|
94
|
-
background-color: var(--semiont-color-error);
|
|
94
|
+
background-color: var(--semiont-color-error-light);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/* With Label */
|
|
@@ -108,10 +108,6 @@
|
|
|
108
108
|
color: var(--semiont-text-secondary);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
[data-theme="dark"] .semiont-progress__label {
|
|
112
|
-
color: var(--semiont-text-secondary);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
111
|
/* Indeterminate Progress */
|
|
116
112
|
.semiont-progress--indeterminate .semiont-progress__fill {
|
|
117
113
|
width: 30%;
|
|
@@ -140,31 +136,3 @@
|
|
|
140
136
|
}
|
|
141
137
|
}
|
|
142
138
|
|
|
143
|
-
/* Legacy Compatibility Mappings (deprecated - use base classes above)
|
|
144
|
-
These will be removed in a future version. Update components to use .semiont-progress */
|
|
145
|
-
.semiont-progress-bar,
|
|
146
|
-
.semiont-panel-progress {
|
|
147
|
-
position: relative;
|
|
148
|
-
width: 100%;
|
|
149
|
-
height: 0.5rem;
|
|
150
|
-
background-color: var(--semiont-bg-secondary);
|
|
151
|
-
border-radius: var(--semiont-radius-full);
|
|
152
|
-
overflow: hidden;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
[data-theme="dark"] .semiont-progress-bar,
|
|
156
|
-
[data-theme="dark"] .semiont-panel-progress {
|
|
157
|
-
background-color: var(--semiont-bg-tertiary);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.semiont-progress-bar__fill,
|
|
161
|
-
.semiont-panel-progress__fill {
|
|
162
|
-
height: 100%;
|
|
163
|
-
background-color: var(--semiont-color-primary-500);
|
|
164
|
-
transition: width 0.3s ease;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
[data-theme="dark"] .semiont-progress-bar__fill,
|
|
168
|
-
[data-theme="dark"] .semiont-panel-progress__fill {
|
|
169
|
-
background-color: var(--semiont-color-primary-500);
|
|
170
|
-
}
|
|
@@ -212,10 +212,6 @@
|
|
|
212
212
|
color: var(--semiont-text-secondary);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
[data-theme="dark"] .semiont-slider__labels {
|
|
216
|
-
color: var(--semiont-text-secondary);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
215
|
/* Small labels variant — reduced font size for compact inline contexts */
|
|
220
216
|
.semiont-slider__labels--small {
|
|
221
217
|
font-size: 0.6875rem;
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
highlight while a drag hovers. */
|
|
119
119
|
.semiont-form__upload-dropzone[data-drag-over="true"] {
|
|
120
120
|
border-color: var(--semiont-color-primary-500);
|
|
121
|
-
background: var(--semiont-color-primary-50
|
|
121
|
+
background: var(--semiont-color-primary-50);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
/* Dark mode needs its own tint: primary-50 is a near-white wash that would
|
|
@@ -203,6 +203,19 @@
|
|
|
203
203
|
color: var(--semiont-color-gray-300);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
/* Semantic-fallback caption: explains WHY these results, without competing
|
|
207
|
+
with them. Quieter than the heading it sits under (SEMANTIC-FALLBACK P3b). */
|
|
208
|
+
.semiont-card__documents-note {
|
|
209
|
+
margin: -0.25rem 0 0.75rem;
|
|
210
|
+
font-size: 0.8125rem;
|
|
211
|
+
font-style: italic;
|
|
212
|
+
color: var(--semiont-color-gray-600);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
[data-theme="dark"] .semiont-card__documents-note {
|
|
216
|
+
color: var(--semiont-color-gray-400);
|
|
217
|
+
}
|
|
218
|
+
|
|
206
219
|
.semiont-card__warning {
|
|
207
220
|
padding: 1rem;
|
|
208
221
|
background: var(--semiont-color-yellow-50);
|
|
@@ -173,20 +173,12 @@
|
|
|
173
173
|
color: var(--semiont-text-secondary);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
[data-theme="dark"] .semiont-browse-view__content h6 {
|
|
177
|
-
color: var(--semiont-text-secondary);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
176
|
.semiont-browse-view__content p {
|
|
181
177
|
margin-bottom: 1em;
|
|
182
178
|
line-height: var(--semiont-leading-relaxed);
|
|
183
179
|
color: var(--semiont-text-primary);
|
|
184
180
|
}
|
|
185
181
|
|
|
186
|
-
[data-theme="dark"] .semiont-browse-view__content p {
|
|
187
|
-
color: var(--semiont-text-primary);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
182
|
.semiont-browse-view__content ul,
|
|
191
183
|
.semiont-browse-view__content ol {
|
|
192
184
|
margin-bottom: 1em;
|
|
@@ -207,10 +199,6 @@
|
|
|
207
199
|
color: var(--semiont-text-primary);
|
|
208
200
|
}
|
|
209
201
|
|
|
210
|
-
[data-theme="dark"] .semiont-browse-view__content li {
|
|
211
|
-
color: var(--semiont-text-primary);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
202
|
/* Nested lists */
|
|
215
203
|
.semiont-browse-view__content ul ul,
|
|
216
204
|
.semiont-browse-view__content ol ol,
|
|
@@ -324,7 +312,7 @@
|
|
|
324
312
|
}
|
|
325
313
|
|
|
326
314
|
[data-theme="dark"] .semiont-browse-view__content tr:nth-child(even) td {
|
|
327
|
-
background: var(--semiont-color-gray-
|
|
315
|
+
background: var(--semiont-color-gray-800);
|
|
328
316
|
}
|
|
329
317
|
|
|
330
318
|
/* GFM task list checkboxes */
|
|
@@ -627,19 +615,11 @@
|
|
|
627
615
|
margin-bottom: 0.5rem;
|
|
628
616
|
}
|
|
629
617
|
|
|
630
|
-
[data-theme="dark"] .semiont-page__title {
|
|
631
|
-
color: var(--semiont-text-primary);
|
|
632
|
-
}
|
|
633
|
-
|
|
634
618
|
.semiont-page__subtitle {
|
|
635
619
|
color: var(--semiont-text-secondary);
|
|
636
620
|
font-size: 1rem;
|
|
637
621
|
}
|
|
638
622
|
|
|
639
|
-
[data-theme="dark"] .semiont-page__subtitle {
|
|
640
|
-
color: var(--semiont-text-secondary);
|
|
641
|
-
}
|
|
642
|
-
|
|
643
623
|
.semiont-page__reference-notice {
|
|
644
624
|
background-color: var(--semiont-color-blue-50);
|
|
645
625
|
border: 1px solid var(--semiont-color-blue-200);
|
|
@@ -412,8 +412,8 @@
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
.semiont-static-warning-box {
|
|
415
|
-
background: var(--semiont-color-
|
|
416
|
-
border-left: 4px solid var(--semiont-color-
|
|
415
|
+
background: var(--semiont-color-amber-50);
|
|
416
|
+
border-left: 4px solid var(--semiont-color-amber-500);
|
|
417
417
|
border-radius: 0.375rem;
|
|
418
418
|
padding: 1rem 1.25rem;
|
|
419
419
|
margin: 1.5rem 0;
|
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
|
|
428
428
|
[data-theme="dark"] .semiont-static-warning-box {
|
|
429
429
|
background: rgba(251, 146, 60, 0.1);
|
|
430
|
-
border-left-color: var(--semiont-color-
|
|
430
|
+
border-left-color: var(--semiont-color-amber-400);
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
/* ========================================
|
|
@@ -447,27 +447,27 @@
|
|
|
447
447
|
|
|
448
448
|
.semiont-static-badge-planned {
|
|
449
449
|
background: rgba(251, 146, 60, 0.1);
|
|
450
|
-
color: var(--semiont-color-
|
|
451
|
-
border: 1px solid var(--semiont-color-
|
|
450
|
+
color: var(--semiont-color-amber-700);
|
|
451
|
+
border: 1px solid var(--semiont-color-amber-200);
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
.semiont-static-badge-active {
|
|
455
455
|
background: rgba(34, 197, 94, 0.1);
|
|
456
|
-
color: var(--semiont-color-
|
|
457
|
-
border: 1px solid var(--semiont-color-
|
|
456
|
+
color: var(--semiont-color-green-700);
|
|
457
|
+
border: 1px solid var(--semiont-color-green-200);
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
/* Dark mode */
|
|
461
461
|
[data-theme="dark"] .semiont-static-badge-planned {
|
|
462
462
|
background: rgba(251, 146, 60, 0.15);
|
|
463
|
-
color: var(--semiont-color-
|
|
464
|
-
border-color: var(--semiont-color-
|
|
463
|
+
color: var(--semiont-color-amber-400);
|
|
464
|
+
border-color: var(--semiont-color-amber-600);
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
[data-theme="dark"] .semiont-static-badge-active {
|
|
468
468
|
background: rgba(34, 197, 94, 0.15);
|
|
469
|
-
color: var(--semiont-color-
|
|
470
|
-
border-color: var(--semiont-color-
|
|
469
|
+
color: var(--semiont-color-green-400);
|
|
470
|
+
border-color: var(--semiont-color-green-600);
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
/* ========================================
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
[data-theme="dark"] .semiont-assessment-star {
|
|
249
|
-
color: var(--semiont-color-warning);
|
|
249
|
+
color: var(--semiont-color-warning-light);
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
.semiont-assessment-star:hover {
|
|
@@ -258,5 +258,5 @@
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
[data-theme="dark"] .semiont-assessment-star--filled {
|
|
261
|
-
color: var(--semiont-color-warning);
|
|
261
|
+
color: var(--semiont-color-warning-light);
|
|
262
262
|
}
|