@semiont/react-ui 0.4.21 → 0.4.22
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/dist/{PdfAnnotationCanvas.client-6ZGFEN2N.mjs → PdfAnnotationCanvas.client-5QESNO5H.mjs} +10 -9
- package/dist/PdfAnnotationCanvas.client-5QESNO5H.mjs.map +1 -0
- package/dist/{chunk-KEDFYI6N.mjs → chunk-4NOUO3W6.mjs} +2 -2
- package/dist/{chunk-KEDFYI6N.mjs.map → chunk-4NOUO3W6.mjs.map} +1 -1
- package/dist/index.d.mts +54 -79
- package/dist/index.mjs +255 -254
- package/dist/index.mjs.map +1 -1
- package/dist/test-utils.d.mts +3 -1
- package/dist/test-utils.mjs +14 -8
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +2 -1
- package/src/components/AnnotateReferencesProgressWidget.tsx +1 -1
- package/src/components/CodeMirrorRenderer.tsx +5 -3
- package/src/components/LiveRegion.tsx +1 -2
- package/src/components/StatusDisplay.tsx +1 -1
- package/src/components/__tests__/StatusDisplay.test.tsx +3 -1
- package/src/components/annotation/AnnotateToolbar.tsx +5 -7
- package/src/components/annotation-popups/JsonLdView.tsx +1 -2
- package/src/components/annotation-popups/__tests__/JsonLdView.test.tsx +1 -1
- package/src/components/image-annotation/AnnotationOverlay.tsx +12 -14
- package/src/components/image-annotation/SvgDrawingCanvas.tsx +8 -13
- package/src/components/modals/ConfigureGenerationStep.tsx +1 -2
- package/src/components/modals/ReferenceWizardModal.tsx +1 -1
- package/src/components/modals/ResourceSearchModal.tsx +3 -3
- package/src/components/modals/SearchModal.tsx +2 -1
- package/src/components/modals/SearchResultsStep.tsx +1 -3
- package/src/components/modals/__tests__/SearchModal.accessibility.test.tsx +6 -2
- package/src/components/modals/__tests__/SearchModal.basic.test.tsx +6 -2
- package/src/components/modals/__tests__/SearchModal.keyboard.test.tsx +6 -2
- package/src/components/modals/__tests__/SearchModal.visual.test.tsx +6 -2
- package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +11 -12
- package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +1 -1
- package/src/components/resource/AnnotateView.tsx +2 -5
- package/src/components/resource/BrowseView.tsx +6 -4
- package/src/components/resource/ResourceViewer.tsx +7 -11
- package/src/components/resource/__tests__/BrowseView.test.tsx +4 -4
- package/src/components/resource/__tests__/ResourceViewer.mode-switch.test.tsx +1 -0
- package/src/components/resource/__tests__/event-formatting.test.ts +6 -2
- package/src/components/resource/event-formatting.ts +2 -3
- package/src/components/resource/panels/AssessmentEntry.tsx +3 -5
- package/src/components/resource/panels/AssessmentPanel.tsx +5 -5
- package/src/components/resource/panels/AssistSection.tsx +6 -10
- package/src/components/resource/panels/CollaborationPanel.tsx +1 -1
- package/src/components/resource/panels/CommentEntry.tsx +3 -5
- package/src/components/resource/panels/CommentsPanel.tsx +5 -5
- package/src/components/resource/panels/HighlightEntry.tsx +3 -5
- package/src/components/resource/panels/HighlightPanel.tsx +3 -3
- package/src/components/resource/panels/ReferenceEntry.tsx +7 -9
- package/src/components/resource/panels/ReferencesPanel.tsx +8 -11
- package/src/components/resource/panels/ResourceInfoPanel.tsx +5 -5
- package/src/components/resource/panels/StatisticsPanel.tsx +2 -3
- package/src/components/resource/panels/TagEntry.tsx +3 -5
- package/src/components/resource/panels/TaggingPanel.tsx +8 -11
- package/src/components/resource/panels/UnifiedAnnotationsPanel.tsx +1 -1
- package/src/components/resource/panels/__tests__/AssessmentEntry.test.tsx +4 -4
- package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +4 -5
- package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +4 -4
- package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +4 -5
- package/src/components/resource/panels/__tests__/HighlightEntry.test.tsx +4 -4
- package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +1 -1
- package/src/components/resource/panels/__tests__/ReferenceEntry.test.tsx +4 -4
- package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +21 -14
- package/src/components/resource/panels/__tests__/StatisticsPanel.test.tsx +3 -3
- package/src/components/resource/panels/__tests__/TagEntry.test.tsx +4 -4
- package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +4 -5
- package/src/components/settings/SettingsPanel.tsx +1 -1
- package/src/components/settings/__tests__/SettingsPanel.test.tsx +3 -3
- package/src/features/admin-devops/components/AdminDevOpsPage.tsx +1 -2
- package/src/features/admin-exchange/components/AdminExchangePage.tsx +1 -1
- package/src/features/admin-exchange/components/ImportCard.tsx +1 -2
- package/src/features/admin-security/components/AdminSecurityPage.tsx +1 -2
- package/src/features/admin-users/components/AdminUsersPage.tsx +1 -1
- package/src/features/moderate-entity-tags/components/EntityTagsPage.tsx +1 -2
- package/src/features/moderate-recent/components/RecentDocumentsPage.tsx +1 -2
- package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +1 -1
- package/src/features/moderation-linked-data/components/LinkedDataPage.tsx +1 -1
- package/src/features/resource-compose/components/ResourceComposePage.tsx +3 -2
- package/src/features/resource-discovery/components/ResourceCard.tsx +1 -2
- package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +3 -4
- package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +4 -5
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +12 -11
- package/dist/PdfAnnotationCanvas.client-6ZGFEN2N.mjs.map +0 -1
package/dist/test-utils.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { ReactElement } from 'react';
|
|
2
2
|
import { RenderOptions, RenderResult } from '@testing-library/react';
|
|
3
3
|
export * from '@testing-library/react';
|
|
4
|
-
import { SemiontBrowser } from '@semiont/
|
|
4
|
+
import { SemiontBrowser, SemiontClient } from '@semiont/sdk';
|
|
5
5
|
import { EventBus } from '@semiont/core';
|
|
6
6
|
import { T as TranslationManager } from './TranslationManager-9Xj3MIWQ.mjs';
|
|
7
7
|
export { vi } from 'vitest';
|
|
@@ -62,6 +62,8 @@ declare function createTestSemiontWrapper(apiBaseUrl?: string): {
|
|
|
62
62
|
eventBus: EventBus;
|
|
63
63
|
/** App-scoped bus (the fake browser's own bus). */
|
|
64
64
|
shellBus: EventBus;
|
|
65
|
+
/** The fake session's client — for tests that need to spy on namespace methods. */
|
|
66
|
+
client: SemiontClient;
|
|
65
67
|
};
|
|
66
68
|
/**
|
|
67
69
|
* Create a mock translation manager with custom translations
|
package/dist/test-utils.mjs
CHANGED
|
@@ -157,7 +157,7 @@ import {
|
|
|
157
157
|
require_zip,
|
|
158
158
|
require_zipAll,
|
|
159
159
|
require_zipWith
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-4NOUO3W6.mjs";
|
|
161
161
|
import "./chunk-NOD3NCXE.mjs";
|
|
162
162
|
import {
|
|
163
163
|
__commonJS,
|
|
@@ -15328,21 +15328,26 @@ if (typeof process === "undefined" || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
|
|
|
15328
15328
|
// src/test-utils.tsx
|
|
15329
15329
|
var import_rxjs = __toESM(require_cjs());
|
|
15330
15330
|
import { vi } from "vitest";
|
|
15331
|
-
import {
|
|
15331
|
+
import { SemiontClient } from "@semiont/sdk";
|
|
15332
|
+
import { HttpContentTransport, HttpTransport } from "@semiont/api-client";
|
|
15332
15333
|
import { baseUrl, EventBus } from "@semiont/core";
|
|
15333
15334
|
import { vi as vi2 } from "vitest";
|
|
15334
15335
|
import { jsx } from "react/jsx-runtime";
|
|
15335
15336
|
function createFakeBrowserForTests(apiBaseUrl) {
|
|
15336
|
-
const
|
|
15337
|
-
|
|
15338
|
-
});
|
|
15337
|
+
const transport = new HttpTransport({ baseUrl: baseUrl(apiBaseUrl) });
|
|
15338
|
+
const client = new SemiontClient(transport, new HttpContentTransport(transport));
|
|
15339
15339
|
const fakeSession = {
|
|
15340
15340
|
client,
|
|
15341
15341
|
kb: null,
|
|
15342
15342
|
user$: new import_rxjs.BehaviorSubject(null),
|
|
15343
15343
|
token$: new import_rxjs.BehaviorSubject(null),
|
|
15344
15344
|
expiresAt: null,
|
|
15345
|
-
refresh: vi.fn(async () => null)
|
|
15345
|
+
refresh: vi.fn(async () => null),
|
|
15346
|
+
/** Generic-channel subscription carve-out — mirror of SemiontSession.subscribe. */
|
|
15347
|
+
subscribe: (channel, handler) => {
|
|
15348
|
+
const sub = client.bus.get(channel).subscribe(handler);
|
|
15349
|
+
return () => sub.unsubscribe();
|
|
15350
|
+
}
|
|
15346
15351
|
};
|
|
15347
15352
|
const fakeSignals = {
|
|
15348
15353
|
sessionExpiredAt$: new import_rxjs.BehaviorSubject(null),
|
|
@@ -15412,7 +15417,7 @@ var defaultMocks = {
|
|
|
15412
15417
|
}
|
|
15413
15418
|
};
|
|
15414
15419
|
function busOf(client) {
|
|
15415
|
-
return client.
|
|
15420
|
+
return client.bus;
|
|
15416
15421
|
}
|
|
15417
15422
|
function shellBusOf(browser) {
|
|
15418
15423
|
return browser._shellBus;
|
|
@@ -15446,7 +15451,8 @@ function createTestSemiontWrapper(apiBaseUrl = "http://localhost:4000") {
|
|
|
15446
15451
|
return {
|
|
15447
15452
|
SemiontWrapper,
|
|
15448
15453
|
eventBus: busOf(client),
|
|
15449
|
-
shellBus: shellBusOf(fakeBrowser)
|
|
15454
|
+
shellBus: shellBusOf(fakeBrowser),
|
|
15455
|
+
client
|
|
15450
15456
|
};
|
|
15451
15457
|
}
|
|
15452
15458
|
function createMockTranslationManager(translations) {
|