@semiont/react-ui 0.5.2 → 0.5.4
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-5QESNO5H.mjs → PdfAnnotationCanvas.client-CN3C3S55.js} +2 -2
- package/dist/{ar-3W37O3R3.mjs → ar-U2EXWUMQ.js} +3 -21
- package/dist/ar-U2EXWUMQ.js.map +1 -0
- package/dist/assets/favicons/SemiontFavicon.d.ts +9 -0
- package/dist/assets/favicons/SemiontFavicon.d.ts.map +1 -0
- package/dist/assets/favicons/index.d.ts +12 -0
- package/dist/assets/favicons/index.d.ts.map +1 -0
- package/dist/{bn-JZTJLMVE.mjs → bn-DRJGV772.js} +3 -21
- package/dist/bn-DRJGV772.js.map +1 -0
- package/dist/{chunk-7VWNZ5YX.mjs → chunk-3Q3TUKWP.js} +32 -32
- package/dist/{chunk-NOD3NCXE.mjs → chunk-GERSK2DY.js} +3 -21
- package/dist/chunk-GERSK2DY.js.map +1 -0
- package/dist/{chunk-D4GAAQMM.mjs → chunk-K6BJDL2I.js} +1 -1
- package/dist/components/AnnotateReferencesProgressWidget.d.ts +15 -0
- package/dist/components/AnnotateReferencesProgressWidget.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts +69 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/CodeMirrorRenderer.d.ts +25 -0
- package/dist/components/CodeMirrorRenderer.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.d.ts +30 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/LiveRegion.d.ts +41 -0
- package/dist/components/LiveRegion.d.ts.map +1 -0
- package/dist/components/ProtectedErrorBoundary.d.ts +27 -0
- package/dist/components/ProtectedErrorBoundary.d.ts.map +1 -0
- package/dist/components/ResizeHandle.d.ts +39 -0
- package/dist/components/ResizeHandle.d.ts.map +1 -0
- package/dist/components/ResourceTagsInline.d.ts +10 -0
- package/dist/components/ResourceTagsInline.d.ts.map +1 -0
- package/dist/components/SessionExpiryBanner.d.ts +2 -0
- package/dist/components/SessionExpiryBanner.d.ts.map +1 -0
- package/dist/components/SessionTimer.d.ts +2 -0
- package/dist/components/SessionTimer.d.ts.map +1 -0
- package/dist/components/StatusDisplay.d.ts +9 -0
- package/dist/components/StatusDisplay.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +27 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Toolbar.d.ts +15 -0
- package/dist/components/Toolbar.d.ts.map +1 -0
- package/dist/components/UserMenuSkeleton.d.ts +2 -0
- package/dist/components/UserMenuSkeleton.d.ts.map +1 -0
- package/dist/components/annotation/AnnotateToolbar.d.ts +29 -0
- package/dist/components/annotation/AnnotateToolbar.d.ts.map +1 -0
- package/dist/components/annotation-popups/JsonLdView.d.ts +8 -0
- package/dist/components/annotation-popups/JsonLdView.d.ts.map +1 -0
- package/dist/components/annotation-popups/SharedPopupElements.d.ts +28 -0
- package/dist/components/annotation-popups/SharedPopupElements.d.ts.map +1 -0
- package/dist/components/branding/SemiontBranding.d.ts +13 -0
- package/dist/components/branding/SemiontBranding.d.ts.map +1 -0
- package/dist/components/error-states/ResourceErrorState.d.ts +11 -0
- package/dist/components/error-states/ResourceErrorState.d.ts.map +1 -0
- package/dist/components/image-annotation/AnnotationOverlay.d.ts +22 -0
- package/dist/components/image-annotation/AnnotationOverlay.d.ts.map +1 -0
- package/dist/components/image-annotation/SvgDrawingCanvas.d.ts +23 -0
- package/dist/components/image-annotation/SvgDrawingCanvas.d.ts.map +1 -0
- package/dist/components/layout/LeftSidebar.d.ts +24 -0
- package/dist/components/layout/LeftSidebar.d.ts.map +1 -0
- package/dist/components/layout/PageLayout.d.ts +21 -0
- package/dist/components/layout/PageLayout.d.ts.map +1 -0
- package/dist/components/layout/SkipLinks.d.ts +8 -0
- package/dist/components/layout/SkipLinks.d.ts.map +1 -0
- package/dist/components/layout/UnifiedHeader.d.ts +21 -0
- package/dist/components/layout/UnifiedHeader.d.ts.map +1 -0
- package/dist/components/loading-states/ComposeLoadingState.d.ts +10 -0
- package/dist/components/loading-states/ComposeLoadingState.d.ts.map +1 -0
- package/dist/components/loading-states/ResourceLoadingState.d.ts +7 -0
- package/dist/components/loading-states/ResourceLoadingState.d.ts.map +1 -0
- package/dist/components/modals/ConfigureGenerationStep.d.ts +36 -0
- package/dist/components/modals/ConfigureGenerationStep.d.ts.map +1 -0
- package/dist/components/modals/ConfigureSearchStep.d.ts +21 -0
- package/dist/components/modals/ConfigureSearchStep.d.ts.map +1 -0
- package/dist/components/modals/ContextSummary.d.ts +14 -0
- package/dist/components/modals/ContextSummary.d.ts.map +1 -0
- package/dist/components/modals/GatherContextStep.d.ts +23 -0
- package/dist/components/modals/GatherContextStep.d.ts.map +1 -0
- package/dist/components/modals/KeyboardShortcutsHelpModal.d.ts +8 -0
- package/dist/components/modals/KeyboardShortcutsHelpModal.d.ts.map +1 -0
- package/dist/components/modals/PermissionDeniedModal.d.ts +12 -0
- package/dist/components/modals/PermissionDeniedModal.d.ts.map +1 -0
- package/dist/components/modals/ReferenceWizardModal.d.ts +64 -0
- package/dist/components/modals/ReferenceWizardModal.d.ts.map +1 -0
- package/dist/components/modals/ResourceSearchModal.d.ts +16 -0
- package/dist/components/modals/ResourceSearchModal.d.ts.map +1 -0
- package/dist/components/modals/SearchModal.d.ts +20 -0
- package/dist/components/modals/SearchModal.d.ts.map +1 -0
- package/dist/components/modals/SearchResultsStep.d.ts +22 -0
- package/dist/components/modals/SearchResultsStep.d.ts.map +1 -0
- package/dist/components/modals/SessionExpiredModal.d.ts +12 -0
- package/dist/components/modals/SessionExpiredModal.d.ts.map +1 -0
- package/dist/components/navigation/CollapsibleResourceNavigation.d.ts +13 -0
- package/dist/components/navigation/CollapsibleResourceNavigation.d.ts.map +1 -0
- package/dist/components/navigation/Footer.d.ts +20 -0
- package/dist/components/navigation/Footer.d.ts.map +1 -0
- package/dist/components/navigation/NavigationMenu.d.ts +18 -0
- package/dist/components/navigation/NavigationMenu.d.ts.map +1 -0
- package/dist/components/navigation/ObservableLink.d.ts +52 -0
- package/dist/components/navigation/ObservableLink.d.ts.map +1 -0
- package/dist/components/navigation/SimpleNavigation.d.ts +35 -0
- package/dist/components/navigation/SimpleNavigation.d.ts.map +1 -0
- package/dist/components/navigation/SortableResourceTab.d.ts +7 -0
- package/dist/components/navigation/SortableResourceTab.d.ts.map +1 -0
- package/dist/components/pdf-annotation/PdfAnnotationCanvas.client.d.ts +8 -0
- package/dist/components/pdf-annotation/PdfAnnotationCanvas.client.d.ts.map +1 -0
- package/dist/components/pdf-annotation/PdfAnnotationCanvas.d.ts +25 -0
- package/dist/components/pdf-annotation/PdfAnnotationCanvas.d.ts.map +1 -0
- package/dist/components/resource/AnnotateView.d.ts +29 -0
- package/dist/components/resource/AnnotateView.d.ts.map +1 -0
- package/dist/components/resource/AnnotationHistory.d.ts +14 -0
- package/dist/components/resource/AnnotationHistory.d.ts.map +1 -0
- package/dist/components/resource/BrowseView.d.ts +28 -0
- package/dist/components/resource/BrowseView.d.ts.map +1 -0
- package/dist/components/resource/HistoryEvent.d.ts +19 -0
- package/dist/components/resource/HistoryEvent.d.ts.map +1 -0
- package/dist/components/resource/ResourceViewer.d.ts +46 -0
- package/dist/components/resource/ResourceViewer.d.ts.map +1 -0
- package/dist/components/resource/event-formatting.d.ts +61 -0
- package/dist/components/resource/event-formatting.d.ts.map +1 -0
- package/dist/components/resource/panels/AssessmentEntry.d.ts +11 -0
- package/dist/components/resource/panels/AssessmentEntry.d.ts.map +1 -0
- package/dist/components/resource/panels/AssessmentPanel.d.ts +32 -0
- package/dist/components/resource/panels/AssessmentPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/AssistSection.d.ts +27 -0
- package/dist/components/resource/panels/AssistSection.d.ts.map +1 -0
- package/dist/components/resource/panels/CollaborationPanel.d.ts +28 -0
- package/dist/components/resource/panels/CollaborationPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/CommentEntry.d.ts +12 -0
- package/dist/components/resource/panels/CommentEntry.d.ts.map +1 -0
- package/dist/components/resource/panels/CommentsPanel.d.ts +32 -0
- package/dist/components/resource/panels/CommentsPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/HighlightEntry.d.ts +11 -0
- package/dist/components/resource/panels/HighlightEntry.d.ts.map +1 -0
- package/dist/components/resource/panels/HighlightPanel.d.ts +30 -0
- package/dist/components/resource/panels/HighlightPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/JsonLdPanel.d.ts +9 -0
- package/dist/components/resource/panels/JsonLdPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/PanelHeader.d.ts +13 -0
- package/dist/components/resource/panels/PanelHeader.d.ts.map +1 -0
- package/dist/components/resource/panels/ReferenceEntry.d.ts +15 -0
- package/dist/components/resource/panels/ReferenceEntry.d.ts.map +1 -0
- package/dist/components/resource/panels/ReferencesPanel.d.ts +43 -0
- package/dist/components/resource/panels/ReferencesPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/ResourceInfoPanel.d.ts +27 -0
- package/dist/components/resource/panels/ResourceInfoPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/StatisticsPanel.d.ts +12 -0
- package/dist/components/resource/panels/StatisticsPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/TagEntry.d.ts +11 -0
- package/dist/components/resource/panels/TagEntry.d.ts.map +1 -0
- package/dist/components/resource/panels/TaggingPanel.d.ts +34 -0
- package/dist/components/resource/panels/TaggingPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/UnifiedAnnotationsPanel.d.ts +52 -0
- package/dist/components/resource/panels/UnifiedAnnotationsPanel.d.ts.map +1 -0
- package/dist/components/resource/panels/agent-label.d.ts +11 -0
- package/dist/components/resource/panels/agent-label.d.ts.map +1 -0
- package/dist/components/settings/SettingsPanel.d.ts +19 -0
- package/dist/components/settings/SettingsPanel.d.ts.map +1 -0
- package/dist/components/viewers/ImageViewer.d.ts +8 -0
- package/dist/components/viewers/ImageViewer.d.ts.map +1 -0
- package/dist/components/viewers/index.d.ts +2 -0
- package/dist/components/viewers/index.d.ts.map +1 -0
- package/dist/contexts/AnnotationContext.d.ts +46 -0
- package/dist/contexts/AnnotationContext.d.ts.map +1 -0
- package/dist/contexts/ResourceAnnotationsContext.d.ts +14 -0
- package/dist/contexts/ResourceAnnotationsContext.d.ts.map +1 -0
- package/dist/contexts/RoutingContext.d.ts +59 -0
- package/dist/contexts/RoutingContext.d.ts.map +1 -0
- package/dist/contexts/ThemeContext.d.ts +15 -0
- package/dist/contexts/ThemeContext.d.ts.map +1 -0
- package/dist/contexts/TranslationContext.d.ts +51 -0
- package/dist/contexts/TranslationContext.d.ts.map +1 -0
- package/dist/contexts/useEventSubscription.d.ts +41 -0
- package/dist/contexts/useEventSubscription.d.ts.map +1 -0
- package/dist/{cs-XYHH7HNE.mjs → cs-PTWDM23V.js} +3 -21
- package/dist/cs-PTWDM23V.js.map +1 -0
- package/dist/{da-MZKIECVT.mjs → da-KSNIKYSS.js} +3 -21
- package/dist/da-KSNIKYSS.js.map +1 -0
- package/dist/{de-AYXTMRQW.mjs → de-F2XBEWFY.js} +3 -21
- package/dist/de-F2XBEWFY.js.map +1 -0
- package/dist/design-tokens/index.d.ts +178 -0
- package/dist/design-tokens/index.d.ts.map +1 -0
- package/dist/{el-A6CVQWAW.mjs → el-DLD2GWAP.js} +3 -21
- package/dist/el-DLD2GWAP.js.map +1 -0
- package/dist/{en-YPQQBI4T.mjs → en-L45VK7BS.js} +3 -3
- package/dist/{es-M2HXLJGT.mjs → es-WLPYWGB5.js} +3 -21
- package/dist/es-WLPYWGB5.js.map +1 -0
- package/dist/{fa-V6JZJDYP.mjs → fa-BAXHSDZG.js} +3 -21
- package/dist/fa-BAXHSDZG.js.map +1 -0
- package/dist/features/admin-devops/components/AdminDevOpsPage.d.ts +33 -0
- package/dist/features/admin-devops/components/AdminDevOpsPage.d.ts.map +1 -0
- package/dist/features/admin-exchange/components/AdminExchangePage.d.ts +37 -0
- package/dist/features/admin-exchange/components/AdminExchangePage.d.ts.map +1 -0
- package/dist/features/admin-exchange/components/ExportCard.d.ts +18 -0
- package/dist/features/admin-exchange/components/ExportCard.d.ts.map +1 -0
- package/dist/features/admin-exchange/components/ImportCard.d.ts +32 -0
- package/dist/features/admin-exchange/components/ImportCard.d.ts.map +1 -0
- package/dist/features/admin-exchange/components/ImportProgress.d.ts +26 -0
- package/dist/features/admin-exchange/components/ImportProgress.d.ts.map +1 -0
- package/dist/features/admin-exchange/state/exchange-state-unit.d.ts +31 -0
- package/dist/features/admin-exchange/state/exchange-state-unit.d.ts.map +1 -0
- package/dist/features/admin-security/components/AdminSecurityPage.d.ts +42 -0
- package/dist/features/admin-security/components/AdminSecurityPage.d.ts.map +1 -0
- package/dist/features/admin-security/state/admin-security-state-unit.d.ts +12 -0
- package/dist/features/admin-security/state/admin-security-state-unit.d.ts.map +1 -0
- package/dist/features/admin-users/components/AdminUsersPage.d.ts +88 -0
- package/dist/features/admin-users/components/AdminUsersPage.d.ts.map +1 -0
- package/dist/features/admin-users/state/admin-users-state-unit.d.ts +17 -0
- package/dist/features/admin-users/state/admin-users-state-unit.d.ts.map +1 -0
- package/dist/features/auth/components/AuthErrorDisplay.d.ts +34 -0
- package/dist/features/auth/components/AuthErrorDisplay.d.ts.map +1 -0
- package/dist/features/auth/components/SignInForm.d.ts +80 -0
- package/dist/features/auth/components/SignInForm.d.ts.map +1 -0
- package/dist/features/auth/components/SignUpForm.d.ts +39 -0
- package/dist/features/auth/components/SignUpForm.d.ts.map +1 -0
- package/dist/features/auth-welcome/components/WelcomePage.d.ts +62 -0
- package/dist/features/auth-welcome/components/WelcomePage.d.ts.map +1 -0
- package/dist/features/auth-welcome/state/welcome-state-unit.d.ts +12 -0
- package/dist/features/auth-welcome/state/welcome-state-unit.d.ts.map +1 -0
- package/dist/features/moderate-entity-tags/components/EntityTagsPage.d.ts +32 -0
- package/dist/features/moderate-entity-tags/components/EntityTagsPage.d.ts.map +1 -0
- package/dist/features/moderate-entity-tags/state/entity-tags-state-unit.d.ts +16 -0
- package/dist/features/moderate-entity-tags/state/entity-tags-state-unit.d.ts.map +1 -0
- package/dist/features/moderate-recent/components/RecentDocumentsPage.d.ts +27 -0
- package/dist/features/moderate-recent/components/RecentDocumentsPage.d.ts.map +1 -0
- package/dist/features/moderate-tag-schemas/components/TagSchemasPage.d.ts +25 -0
- package/dist/features/moderate-tag-schemas/components/TagSchemasPage.d.ts.map +1 -0
- package/dist/features/moderation-linked-data/components/LinkedDataPage.d.ts +38 -0
- package/dist/features/moderation-linked-data/components/LinkedDataPage.d.ts.map +1 -0
- package/dist/features/resource-compose/components/ResourceComposePage.d.ts +83 -0
- package/dist/features/resource-compose/components/ResourceComposePage.d.ts.map +1 -0
- package/dist/features/resource-compose/components/UploadProgressBar.d.ts +23 -0
- package/dist/features/resource-compose/components/UploadProgressBar.d.ts.map +1 -0
- package/dist/features/resource-compose/state/compose-page-state-unit.d.ts +59 -0
- package/dist/features/resource-compose/state/compose-page-state-unit.d.ts.map +1 -0
- package/dist/features/resource-discovery/components/ResourceCard.d.ts +17 -0
- package/dist/features/resource-discovery/components/ResourceCard.d.ts.map +1 -0
- package/dist/features/resource-discovery/components/ResourceDiscoveryPage.d.ts +43 -0
- package/dist/features/resource-discovery/components/ResourceDiscoveryPage.d.ts.map +1 -0
- package/dist/features/resource-discovery/state/discover-state-unit.d.ts +15 -0
- package/dist/features/resource-discovery/state/discover-state-unit.d.ts.map +1 -0
- package/dist/features/resource-viewer/components/ResourceViewerPage.d.ts +80 -0
- package/dist/features/resource-viewer/components/ResourceViewerPage.d.ts.map +1 -0
- package/dist/features/resource-viewer/state/resource-loader-state-unit.d.ts +11 -0
- package/dist/features/resource-viewer/state/resource-loader-state-unit.d.ts.map +1 -0
- package/dist/features/resource-viewer/state/resource-viewer-page-state-unit.d.ts +48 -0
- package/dist/features/resource-viewer/state/resource-viewer-page-state-unit.d.ts.map +1 -0
- package/dist/{fi-ONDTZ5H7.mjs → fi-FCHSYVOT.js} +3 -21
- package/dist/fi-FCHSYVOT.js.map +1 -0
- package/dist/{fr-PAPV4H4G.mjs → fr-3UERBSL6.js} +3 -21
- package/dist/fr-3UERBSL6.js.map +1 -0
- package/dist/{he-F6VTLJLW.mjs → he-F6F3FV2K.js} +3 -21
- package/dist/he-F6F3FV2K.js.map +1 -0
- package/dist/{hi-CFUAV4BF.mjs → hi-4BK6IK7Q.js} +3 -21
- package/dist/hi-4BK6IK7Q.js.map +1 -0
- package/dist/hooks/useDebounce.d.ts +29 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useDragAnnouncements.d.ts +12 -0
- package/dist/hooks/useDragAnnouncements.d.ts.map +1 -0
- package/dist/hooks/useHoverDelay.d.ts +8 -0
- package/dist/hooks/useHoverDelay.d.ts.map +1 -0
- package/dist/hooks/useHoverEmitter.d.ts +8 -0
- package/dist/hooks/useHoverEmitter.d.ts.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +29 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/hooks/useLineNumbers.d.ts +8 -0
- package/dist/hooks/useLineNumbers.d.ts.map +1 -0
- package/dist/hooks/useMediaToken.d.ts +7 -0
- package/dist/hooks/useMediaToken.d.ts.map +1 -0
- package/dist/hooks/useObservable.d.ts +23 -0
- package/dist/hooks/useObservable.d.ts.map +1 -0
- package/dist/hooks/useObservableBrowse.d.ts +70 -0
- package/dist/hooks/useObservableBrowse.d.ts.map +1 -0
- package/dist/hooks/usePanelWidth.d.ts +37 -0
- package/dist/hooks/usePanelWidth.d.ts.map +1 -0
- package/dist/hooks/useResourceContent.d.ts +7 -0
- package/dist/hooks/useResourceContent.d.ts.map +1 -0
- package/dist/hooks/useRovingTabIndex.d.ts +13 -0
- package/dist/hooks/useRovingTabIndex.d.ts.map +1 -0
- package/dist/hooks/useSearchAnnouncements.d.ts +10 -0
- package/dist/hooks/useSearchAnnouncements.d.ts.map +1 -0
- package/dist/hooks/useSessionExpiry.d.ts +10 -0
- package/dist/hooks/useSessionExpiry.d.ts.map +1 -0
- package/dist/hooks/useShellStateUnit.d.ts +9 -0
- package/dist/hooks/useShellStateUnit.d.ts.map +1 -0
- package/dist/hooks/useStateUnit.d.ts +3 -0
- package/dist/hooks/useStateUnit.d.ts.map +1 -0
- package/dist/hooks/useUI.d.ts +24 -0
- package/dist/hooks/useUI.d.ts.map +1 -0
- package/dist/{id-NBKLCCI7.mjs → id-7ECCWP3J.js} +3 -21
- package/dist/id-7ECCWP3J.js.map +1 -0
- package/dist/index.d.ts +150 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/{index.mjs → index.js} +155 -305
- package/dist/index.js.map +1 -0
- package/dist/integrations/css-modules-helper.d.ts +114 -0
- package/dist/integrations/css-modules-helper.d.ts.map +1 -0
- package/dist/integrations/styled-components-theme.d.ts +95 -0
- package/dist/integrations/styled-components-theme.d.ts.map +1 -0
- package/dist/integrations/tailwind-plugin.d.cts +3 -0
- package/dist/integrations/tailwind-plugin.d.cts.map +1 -0
- package/dist/{it-SLSOWVVU.mjs → it-234Z6XK6.js} +3 -21
- package/dist/it-234Z6XK6.js.map +1 -0
- package/dist/{ja-L5IG4ECE.mjs → ja-PJWQI4OQ.js} +3 -21
- package/dist/ja-PJWQI4OQ.js.map +1 -0
- package/dist/{ko-QYMTULKK.mjs → ko-APUEW2RS.js} +3 -21
- package/dist/ko-APUEW2RS.js.map +1 -0
- package/dist/lib/annotation-overlay.d.ts +71 -0
- package/dist/lib/annotation-overlay.d.ts.map +1 -0
- package/dist/lib/annotation-registry.d.ts +62 -0
- package/dist/lib/annotation-registry.d.ts.map +1 -0
- package/dist/lib/browser-pdfjs.d.ts +93 -0
- package/dist/lib/browser-pdfjs.d.ts.map +1 -0
- package/dist/lib/button-styles.d.ts +27 -0
- package/dist/lib/button-styles.d.ts.map +1 -0
- package/dist/lib/codemirror-handlers.d.ts +52 -0
- package/dist/lib/codemirror-handlers.d.ts.map +1 -0
- package/dist/lib/codemirror-json-theme.d.ts +8 -0
- package/dist/lib/codemirror-json-theme.d.ts.map +1 -0
- package/dist/lib/codemirror-logic.d.ts +66 -0
- package/dist/lib/codemirror-logic.d.ts.map +1 -0
- package/dist/lib/codemirror-widgets.d.ts +39 -0
- package/dist/lib/codemirror-widgets.d.ts.map +1 -0
- package/dist/lib/formatTime.d.ts +2 -0
- package/dist/lib/formatTime.d.ts.map +1 -0
- package/dist/lib/media-shapes.d.ts +51 -0
- package/dist/lib/media-shapes.d.ts.map +1 -0
- package/dist/lib/pdf-coordinates.d.ts +69 -0
- package/dist/lib/pdf-coordinates.d.ts.map +1 -0
- package/dist/lib/resource-utils.d.ts +22 -0
- package/dist/lib/resource-utils.d.ts.map +1 -0
- package/dist/lib/scroll-utils.d.ts +20 -0
- package/dist/lib/scroll-utils.d.ts.map +1 -0
- package/dist/lib/text-segmentation.d.ts +25 -0
- package/dist/lib/text-segmentation.d.ts.map +1 -0
- package/dist/lib/text-selection-handler.d.ts +46 -0
- package/dist/lib/text-selection-handler.d.ts.map +1 -0
- package/dist/lib/validation.d.ts +47 -0
- package/dist/lib/validation.d.ts.map +1 -0
- package/dist/{ms-5DGSFKM2.mjs → ms-PJBZWZWD.js} +3 -21
- package/dist/ms-PJBZWZWD.js.map +1 -0
- package/dist/{nl-VZPCGONO.mjs → nl-L4C3ZBCU.js} +3 -21
- package/dist/nl-L4C3ZBCU.js.map +1 -0
- package/dist/{no-MF6F352I.mjs → no-QE5N5KNG.js} +3 -21
- package/dist/no-QE5N5KNG.js.map +1 -0
- package/dist/{pl-WIK72JUO.mjs → pl-5Q2D23PD.js} +3 -21
- package/dist/pl-5Q2D23PD.js.map +1 -0
- package/dist/{pt-RRP5ZF6A.mjs → pt-AIGUOIOC.js} +3 -21
- package/dist/pt-AIGUOIOC.js.map +1 -0
- package/dist/{ro-XHQLC3T7.mjs → ro-T56CSHTY.js} +3 -21
- package/dist/ro-T56CSHTY.js.map +1 -0
- package/dist/session/SemiontProvider.d.ts +28 -0
- package/dist/session/SemiontProvider.d.ts.map +1 -0
- package/dist/session/web-browser-storage.d.ts +19 -0
- package/dist/session/web-browser-storage.d.ts.map +1 -0
- package/dist/state/session-state-unit.d.ts +9 -0
- package/dist/state/session-state-unit.d.ts.map +1 -0
- package/dist/state/shell-state-unit.d.ts +33 -0
- package/dist/state/shell-state-unit.d.ts.map +1 -0
- package/dist/{sv-EWULDN6E.mjs → sv-L4TJQ2UH.js} +3 -21
- package/dist/sv-L4TJQ2UH.js.map +1 -0
- package/dist/{test-utils.d.mts → test-utils.d.ts} +18 -21
- package/dist/test-utils.d.ts.map +1 -0
- package/dist/{test-utils.mjs → test-utils.js} +5 -5
- package/dist/{th-TGOBHFG4.mjs → th-6O7Y6O2Q.js} +3 -21
- package/dist/th-6O7Y6O2Q.js.map +1 -0
- package/dist/{tr-LMMPBMV7.mjs → tr-D4CQCSNO.js} +3 -21
- package/dist/tr-D4CQCSNO.js.map +1 -0
- package/dist/types/AnnotationManager.d.ts +53 -0
- package/dist/types/AnnotationManager.d.ts.map +1 -0
- package/dist/{TranslationManager-9Xj3MIWQ.d.mts → types/TranslationManager.d.ts} +2 -3
- package/dist/types/TranslationManager.d.ts.map +1 -0
- package/dist/types/annotation-props.d.ts +108 -0
- package/dist/types/annotation-props.d.ts.map +1 -0
- package/dist/types/collapsible-navigation.d.ts +69 -0
- package/dist/types/collapsible-navigation.d.ts.map +1 -0
- package/dist/types/modals.d.ts +77 -0
- package/dist/types/modals.d.ts.map +1 -0
- package/dist/types/navigation.d.ts +35 -0
- package/dist/types/navigation.d.ts.map +1 -0
- package/dist/types/resource-viewer.d.ts +19 -0
- package/dist/types/resource-viewer.d.ts.map +1 -0
- package/dist/types/simple-navigation.d.ts +15 -0
- package/dist/types/simple-navigation.d.ts.map +1 -0
- package/dist/types/translation.d.ts +5 -0
- package/dist/types/translation.d.ts.map +1 -0
- package/dist/{uk-IPGRRJY6.mjs → uk-2HMQG6ND.js} +3 -21
- package/dist/uk-2HMQG6ND.js.map +1 -0
- package/dist/{vi-Q676OJQS.mjs → vi-XVJ4RUEJ.js} +3 -21
- package/dist/vi-XVJ4RUEJ.js.map +1 -0
- package/dist/{zh-F3MTWQDX.mjs → zh-K2KDPGHK.js} +3 -21
- package/dist/zh-K2KDPGHK.js.map +1 -0
- package/package.json +19 -18
- package/src/components/resource/HistoryEvent.tsx +0 -3
- package/src/components/resource/__tests__/HistoryEvent.test.tsx +1 -4
- package/src/components/resource/__tests__/event-formatting.test.ts +2 -14
- package/src/components/resource/event-formatting.ts +3 -4
- package/src/components/resource/panels/AssessmentEntry.tsx +4 -1
- package/src/components/resource/panels/CommentEntry.tsx +4 -1
- package/src/components/resource/panels/HighlightEntry.tsx +4 -1
- package/src/components/resource/panels/ReferenceEntry.tsx +4 -1
- package/src/components/resource/panels/ResourceInfoPanel.tsx +11 -23
- package/src/components/resource/panels/TagEntry.tsx +17 -3
- package/src/components/resource/panels/TaggingPanel.tsx +83 -41
- package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +2 -2
- package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +12 -16
- package/src/components/resource/panels/__tests__/TagEntry.test.tsx +26 -19
- package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +128 -38
- package/src/components/resource/panels/__tests__/agent-label.test.ts +93 -0
- package/src/components/resource/panels/agent-label.ts +20 -0
- package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +3 -3
- package/src/features/resource-compose/state/compose-page-state-unit.ts +0 -1
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +0 -1
- package/translations/ar.json +1 -19
- package/translations/bn.json +1 -19
- package/translations/cs.json +1 -19
- package/translations/da.json +1 -19
- package/translations/de.json +1 -19
- package/translations/el.json +1 -19
- package/translations/en.json +3 -21
- package/translations/es.json +1 -19
- package/translations/fa.json +1 -19
- package/translations/fi.json +1 -19
- package/translations/fr.json +1 -19
- package/translations/he.json +1 -19
- package/translations/hi.json +1 -19
- package/translations/id.json +1 -19
- package/translations/it.json +1 -19
- package/translations/ja.json +1 -19
- package/translations/ko.json +1 -19
- package/translations/ms.json +1 -19
- package/translations/nl.json +1 -19
- package/translations/no.json +1 -19
- package/translations/pl.json +1 -19
- package/translations/pt.json +1 -19
- package/translations/ro.json +1 -19
- package/translations/sv.json +1 -19
- package/translations/th.json +1 -19
- package/translations/tr.json +1 -19
- package/translations/uk.json +1 -19
- package/translations/vi.json +1 -19
- package/translations/zh.json +1 -19
- package/dist/ar-3W37O3R3.mjs.map +0 -1
- package/dist/bn-JZTJLMVE.mjs.map +0 -1
- package/dist/chunk-NOD3NCXE.mjs.map +0 -1
- package/dist/cs-XYHH7HNE.mjs.map +0 -1
- package/dist/da-MZKIECVT.mjs.map +0 -1
- package/dist/de-AYXTMRQW.mjs.map +0 -1
- package/dist/el-A6CVQWAW.mjs.map +0 -1
- package/dist/es-M2HXLJGT.mjs.map +0 -1
- package/dist/fa-V6JZJDYP.mjs.map +0 -1
- package/dist/fi-ONDTZ5H7.mjs.map +0 -1
- package/dist/fr-PAPV4H4G.mjs.map +0 -1
- package/dist/he-F6VTLJLW.mjs.map +0 -1
- package/dist/hi-CFUAV4BF.mjs.map +0 -1
- package/dist/id-NBKLCCI7.mjs.map +0 -1
- package/dist/index.d.mts +0 -3548
- package/dist/index.mjs.map +0 -1
- package/dist/it-SLSOWVVU.mjs.map +0 -1
- package/dist/ja-L5IG4ECE.mjs.map +0 -1
- package/dist/ko-QYMTULKK.mjs.map +0 -1
- package/dist/ms-5DGSFKM2.mjs.map +0 -1
- package/dist/nl-VZPCGONO.mjs.map +0 -1
- package/dist/no-MF6F352I.mjs.map +0 -1
- package/dist/pl-WIK72JUO.mjs.map +0 -1
- package/dist/pt-RRP5ZF6A.mjs.map +0 -1
- package/dist/ro-XHQLC3T7.mjs.map +0 -1
- package/dist/sv-EWULDN6E.mjs.map +0 -1
- package/dist/th-TGOBHFG4.mjs.map +0 -1
- package/dist/tr-LMMPBMV7.mjs.map +0 -1
- package/dist/uk-IPGRRJY6.mjs.map +0 -1
- package/dist/vi-Q676OJQS.mjs.map +0 -1
- package/dist/zh-F3MTWQDX.mjs.map +0 -1
- /package/dist/{PdfAnnotationCanvas.client-5QESNO5H.mjs.map → PdfAnnotationCanvas.client-CN3C3S55.js.map} +0 -0
- /package/dist/{chunk-7VWNZ5YX.mjs.map → chunk-3Q3TUKWP.js.map} +0 -0
- /package/dist/{chunk-D4GAAQMM.mjs.map → chunk-K6BJDL2I.js.map} +0 -0
- /package/dist/{en-YPQQBI4T.mjs.map → en-L45VK7BS.js.map} +0 -0
- /package/dist/{test-utils.mjs.map → test-utils.js.map} +0 -0
- /package/src/integrations/{tailwind-plugin.js → tailwind-plugin.cjs} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Annotation overlay: decouples annotation highlighting from markdown rendering.
|
|
3
|
+
*
|
|
4
|
+
* Instead of weaving annotations into the markdown AST via remark/rehype plugins
|
|
5
|
+
* (which forces O(ASTnodes × annotations) work on every render), this module:
|
|
6
|
+
*
|
|
7
|
+
* 1. Builds a source→rendered offset map once after the markdown DOM paints
|
|
8
|
+
* 2. Resolves W3C TextPositionSelector offsets to DOM Ranges via binary search
|
|
9
|
+
* 3. Wraps matched ranges with <span> elements carrying data-annotation-* attributes
|
|
10
|
+
*
|
|
11
|
+
* Markdown renders once (cached by React.memo). Annotation changes only touch
|
|
12
|
+
* the overlay spans — no markdown re-parse, no AST walk.
|
|
13
|
+
*/
|
|
14
|
+
import type { Annotation } from '@semiont/core';
|
|
15
|
+
export interface OverlayAnnotation {
|
|
16
|
+
id: string;
|
|
17
|
+
exact: string;
|
|
18
|
+
offset: number;
|
|
19
|
+
length: number;
|
|
20
|
+
type: string;
|
|
21
|
+
source: string | null;
|
|
22
|
+
}
|
|
23
|
+
interface TextNodeEntry {
|
|
24
|
+
node: Text;
|
|
25
|
+
start: number;
|
|
26
|
+
end: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build a map from markdown source offsets to rendered text offsets.
|
|
30
|
+
* Character-by-character alignment: walks source and rendered text in parallel,
|
|
31
|
+
* matching characters and skipping markdown syntax in the source.
|
|
32
|
+
*
|
|
33
|
+
* Complexity: O(sourceLength) — runs once per content change.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildSourceToRenderedMap(markdownSource: string, container: HTMLElement): Map<number, number>;
|
|
36
|
+
/**
|
|
37
|
+
* Build a sorted array of text nodes with cumulative rendered offsets
|
|
38
|
+
* for efficient offset→node lookups via binary search.
|
|
39
|
+
*
|
|
40
|
+
* Complexity: O(textNodes) — runs once per overlay application.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildTextNodeIndex(container: HTMLElement): TextNodeEntry[];
|
|
43
|
+
/**
|
|
44
|
+
* Resolve annotations to DOM Ranges using the cached offset map.
|
|
45
|
+
*
|
|
46
|
+
* Complexity: O(annotations × log(textNodes)).
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveAnnotationRanges(annotations: OverlayAnnotation[], offsetMap: Map<number, number>, textNodeIndex: TextNodeEntry[]): Map<string, {
|
|
49
|
+
range: Range;
|
|
50
|
+
annotation: OverlayAnnotation;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Wrap annotation Ranges with styled <span> elements.
|
|
54
|
+
* Handles cross-element ranges by splitting into per-text-node segments.
|
|
55
|
+
*/
|
|
56
|
+
export declare function applyHighlights(ranges: Map<string, {
|
|
57
|
+
range: Range;
|
|
58
|
+
annotation: OverlayAnnotation;
|
|
59
|
+
}>): void;
|
|
60
|
+
/**
|
|
61
|
+
* Remove all annotation highlight spans, restoring the original DOM.
|
|
62
|
+
* Unwraps spans and merges adjacent text nodes.
|
|
63
|
+
*/
|
|
64
|
+
export declare function clearHighlights(container: HTMLElement): void;
|
|
65
|
+
/**
|
|
66
|
+
* Convert W3C Annotations to the simplified overlay format.
|
|
67
|
+
* Extracts TextPositionSelector offsets and annotation type.
|
|
68
|
+
*/
|
|
69
|
+
export declare function toOverlayAnnotations(annotations: Annotation[]): OverlayAnnotation[];
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=annotation-overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotation-overlay.d.ts","sourceRoot":"","sources":["../../src/lib/annotation-overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAID;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,WAAW,GACrB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA+BrB;AAID;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,WAAW,GAAG,aAAa,EAAE,CAa1E;AA+BD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,iBAAiB,EAAE,EAChC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,aAAa,EAAE,aAAa,EAAE,GAC7B,GAAG,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE,iBAAiB,CAAA;CAAE,CAAC,CAmB9D;AAID;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE,iBAAiB,CAAA;CAAE,CAAC,GACnE,IAAI,CAsBN;AAmDD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAW5D;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAmBnF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized annotation type registry
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for W3C annotation motivation metadata including:
|
|
5
|
+
* - Visual styling (CSS classes)
|
|
6
|
+
* - Behavior flags (clickable, hover, side panel)
|
|
7
|
+
* - Type guards (motivation matching)
|
|
8
|
+
* - Accessibility (screen reader announcements)
|
|
9
|
+
* - Runtime handlers (click, hover, detect, update, create)
|
|
10
|
+
*
|
|
11
|
+
* Per CLAUDE.md: This is the ONLY place to define annotation type metadata.
|
|
12
|
+
* No aliasing, wrappers, or compatibility layers elsewhere.
|
|
13
|
+
*/
|
|
14
|
+
import type { components } from '@semiont/core';
|
|
15
|
+
import type { Annotation } from '@semiont/core';
|
|
16
|
+
type Motivation = components['schemas']['Motivation'];
|
|
17
|
+
/**
|
|
18
|
+
* Detection configuration for SSE-based annotation detection
|
|
19
|
+
*/
|
|
20
|
+
export interface DetectionConfig {
|
|
21
|
+
sseMethod: 'detectReferences' | 'detectHighlights' | 'detectAssessments' | 'detectComments' | 'detectTags';
|
|
22
|
+
countField: 'foundCount' | 'createdCount' | 'tagsCreated';
|
|
23
|
+
displayNamePlural: string;
|
|
24
|
+
displayNameSingular: string;
|
|
25
|
+
formatRequestParams?: (args: unknown[]) => Array<{
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Creation configuration - describes how to create annotations of this type
|
|
32
|
+
*/
|
|
33
|
+
export interface CreateConfig {
|
|
34
|
+
bodyBuilder: 'empty' | 'text' | 'entityTag' | 'dualTag';
|
|
35
|
+
refetchAfter: boolean;
|
|
36
|
+
successMessage?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Annotator: Encapsulates all motivation-specific behavior
|
|
40
|
+
* Handles clicks, hovers, detection, and other operations for one annotation type
|
|
41
|
+
*/
|
|
42
|
+
export interface Annotator {
|
|
43
|
+
motivation: Motivation;
|
|
44
|
+
internalType: string;
|
|
45
|
+
displayName: string;
|
|
46
|
+
description: string;
|
|
47
|
+
className: string;
|
|
48
|
+
iconEmoji?: string;
|
|
49
|
+
isClickable: boolean;
|
|
50
|
+
hasHoverInteraction: boolean;
|
|
51
|
+
hasSidePanel: boolean;
|
|
52
|
+
matchesAnnotation: (annotation: Annotation) => boolean;
|
|
53
|
+
announceOnCreate: string;
|
|
54
|
+
detection?: DetectionConfig;
|
|
55
|
+
create: CreateConfig;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Static annotator definitions - single source of truth
|
|
59
|
+
*/
|
|
60
|
+
export declare const ANNOTATORS: Record<string, Annotator>;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=annotation-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotation-registry.d.ts","sourceRoot":"","sources":["../../src/lib/annotation-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,KAAK,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,eAAe;IAE9B,SAAS,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,gBAAgB,GAAG,YAAY,CAAC;IAG3G,UAAU,EAAE,YAAY,GAAG,cAAc,GAAG,aAAa,CAAC;IAG1D,iBAAiB,EAAE,MAAM,CAAC;IAG1B,mBAAmB,EAAE,MAAM,CAAC;IAI5B,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpF;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAE3B,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IAGxD,YAAY,EAAE,OAAO,CAAC;IAGtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IAExB,UAAU,EAAE,UAAU,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAGpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,OAAO,CAAC;IAGtB,iBAAiB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC;IAGvD,gBAAgB,EAAE,MAAM,CAAC;IAGzB,SAAS,CAAC,EAAE,eAAe,CAAC;IAG5B,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAoKhD,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser PDF.js utilities
|
|
3
|
+
*
|
|
4
|
+
* Uses native browser PDF.js when available, falls back to CDN.
|
|
5
|
+
* Zero npm dependencies - no webpack bundling issues.
|
|
6
|
+
*/
|
|
7
|
+
export interface PDFDocumentProxy {
|
|
8
|
+
numPages: number;
|
|
9
|
+
getPage(pageNumber: number): Promise<PDFPageProxy>;
|
|
10
|
+
}
|
|
11
|
+
export interface PDFPageProxy {
|
|
12
|
+
getViewport(params: {
|
|
13
|
+
scale: number;
|
|
14
|
+
rotation?: number;
|
|
15
|
+
}): PDFViewport;
|
|
16
|
+
render(params: PDFRenderParams): PDFRenderTask;
|
|
17
|
+
getTextContent(): Promise<TextContent>;
|
|
18
|
+
}
|
|
19
|
+
export interface PDFViewport {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
scale: number;
|
|
23
|
+
rotation: number;
|
|
24
|
+
}
|
|
25
|
+
export interface PDFRenderParams {
|
|
26
|
+
canvasContext: CanvasRenderingContext2D;
|
|
27
|
+
viewport: PDFViewport;
|
|
28
|
+
}
|
|
29
|
+
export interface PDFRenderTask {
|
|
30
|
+
promise: Promise<void>;
|
|
31
|
+
cancel(): void;
|
|
32
|
+
}
|
|
33
|
+
export interface PDFLib {
|
|
34
|
+
getDocument(params: {
|
|
35
|
+
url: string;
|
|
36
|
+
}): PDFLoadingTask;
|
|
37
|
+
GlobalWorkerOptions: {
|
|
38
|
+
workerSrc: string;
|
|
39
|
+
};
|
|
40
|
+
version: string;
|
|
41
|
+
}
|
|
42
|
+
export interface PDFLoadingTask {
|
|
43
|
+
promise: Promise<PDFDocumentProxy>;
|
|
44
|
+
destroy(): void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Text content types (for Phase 2)
|
|
48
|
+
*/
|
|
49
|
+
export interface TextItem {
|
|
50
|
+
str: string;
|
|
51
|
+
dir: string;
|
|
52
|
+
transform: number[];
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
fontName: string;
|
|
56
|
+
hasEOL: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface TextContent {
|
|
59
|
+
items: TextItem[];
|
|
60
|
+
styles: Record<string, any>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Ensure PDF.js is available, loading from local public folder if needed
|
|
64
|
+
*/
|
|
65
|
+
export declare function ensurePdfJs(): Promise<PDFLib>;
|
|
66
|
+
/**
|
|
67
|
+
* Load PDF document from a URL.
|
|
68
|
+
*
|
|
69
|
+
* The URL must include authentication (e.g. ?token=<media-token>).
|
|
70
|
+
* PDF.js streams the document directly — no ArrayBuffer buffering in JS.
|
|
71
|
+
*/
|
|
72
|
+
export declare function loadPdfDocument(url: string): Promise<PDFDocumentProxy>;
|
|
73
|
+
/**
|
|
74
|
+
* Render PDF page to canvas and return as data URL
|
|
75
|
+
*/
|
|
76
|
+
export declare function renderPdfPageToDataUrl(page: PDFPageProxy, scale?: number): Promise<{
|
|
77
|
+
dataUrl: string;
|
|
78
|
+
width: number;
|
|
79
|
+
height: number;
|
|
80
|
+
}>;
|
|
81
|
+
/**
|
|
82
|
+
* Render PDF page with text content extraction (Phase 2)
|
|
83
|
+
*
|
|
84
|
+
* This function extracts text in parallel with rendering for future
|
|
85
|
+
* text layer support. Currently the text content is available but not used.
|
|
86
|
+
*/
|
|
87
|
+
export declare function renderPdfPageWithText(page: PDFPageProxy, scale?: number): Promise<{
|
|
88
|
+
dataUrl: string;
|
|
89
|
+
width: number;
|
|
90
|
+
height: number;
|
|
91
|
+
textContent: TextContent;
|
|
92
|
+
}>;
|
|
93
|
+
//# sourceMappingURL=browser-pdfjs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-pdfjs.d.ts","sourceRoot":"","sources":["../../src/lib/browser-pdfjs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,WAAW,CAAC;IACvE,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,aAAa,CAAC;IAC/C,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,wBAAwB,CAAC;IACxC,QAAQ,EAAE,WAAW,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,MAAM;IACrB,WAAW,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,cAAc,CAAC;IACrD,mBAAmB,EAAE;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACnC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAgCnD;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAI5E;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,YAAY,EAClB,KAAK,SAAM,GACV,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CA2B7D;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,YAAY,EAClB,KAAK,SAAM,GACV,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC,CAgCD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized button styles matching Figma design
|
|
3
|
+
* Two primary styles from authenticated home page:
|
|
4
|
+
* 1. Primary (cyan/blue gradient) - for main CTAs
|
|
5
|
+
* 2. Secondary (gray with black outline) - for secondary actions
|
|
6
|
+
*/
|
|
7
|
+
export declare const buttonStyles: {
|
|
8
|
+
readonly primary: {
|
|
9
|
+
readonly base: "semiont-button semiont-button--primary";
|
|
10
|
+
readonly large: "semiont-button semiont-button--primary semiont-button--large";
|
|
11
|
+
};
|
|
12
|
+
readonly secondary: {
|
|
13
|
+
readonly base: "semiont-button semiont-button--secondary";
|
|
14
|
+
readonly withScale: "semiont-button semiont-button--secondary semiont-button--scale";
|
|
15
|
+
};
|
|
16
|
+
readonly tertiary: {
|
|
17
|
+
readonly base: "semiont-button semiont-button--tertiary";
|
|
18
|
+
};
|
|
19
|
+
readonly danger: {
|
|
20
|
+
readonly base: "semiont-button semiont-button--danger";
|
|
21
|
+
};
|
|
22
|
+
readonly warning: {
|
|
23
|
+
readonly base: "semiont-button semiont-button--warning";
|
|
24
|
+
};
|
|
25
|
+
readonly combine: (...classes: string[]) => string;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=button-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-styles.d.ts","sourceRoot":"","sources":["../../src/lib/button-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;mCA6BD,MAAM,EAAE;CACtB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event handler logic extracted from CodeMirrorRenderer
|
|
3
|
+
*
|
|
4
|
+
* These functions handle click and hover interactions on annotations
|
|
5
|
+
* and widgets within the CodeMirror editor. They operate on plain DOM
|
|
6
|
+
* elements and a SemiontSession — no CodeMirror API dependency.
|
|
7
|
+
*/
|
|
8
|
+
import type { Motivation } from '@semiont/core';
|
|
9
|
+
import type { SemiontSession } from '@semiont/sdk';
|
|
10
|
+
import type { TextSegment } from './codemirror-logic';
|
|
11
|
+
/**
|
|
12
|
+
* Handle click on an annotation element.
|
|
13
|
+
* Looks up the segment by annotation ID, then emits browse:click.
|
|
14
|
+
*
|
|
15
|
+
* @returns true if the click was handled (an annotation was clicked), false otherwise
|
|
16
|
+
*/
|
|
17
|
+
export declare function handleAnnotationClick(target: HTMLElement, segmentsById: Map<string, TextSegment>, session: SemiontSession): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Result of processing a widget click
|
|
20
|
+
*/
|
|
21
|
+
export interface WidgetClickResult {
|
|
22
|
+
handled: boolean;
|
|
23
|
+
action?: 'navigate' | 'browse-click';
|
|
24
|
+
resourceId?: string;
|
|
25
|
+
annotationId?: string;
|
|
26
|
+
motivation?: Motivation;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Handle click on a reference preview widget.
|
|
30
|
+
* Determines whether to navigate (resolved) or browse-click (unresolved).
|
|
31
|
+
*/
|
|
32
|
+
export declare function handleWidgetClick(target: HTMLElement): WidgetClickResult;
|
|
33
|
+
/**
|
|
34
|
+
* Dispatch a widget click result to the session bus
|
|
35
|
+
*/
|
|
36
|
+
export declare function dispatchWidgetClick(result: WidgetClickResult, session: SemiontSession): void;
|
|
37
|
+
/**
|
|
38
|
+
* Handle mouseenter on a widget — show preview tooltip for resolved references
|
|
39
|
+
*/
|
|
40
|
+
export declare function handleWidgetMouseEnter(target: HTMLElement): {
|
|
41
|
+
showPreview: boolean;
|
|
42
|
+
targetName?: string;
|
|
43
|
+
widget: HTMLElement | null;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Handle mouseleave on a widget — hide preview tooltip
|
|
47
|
+
*/
|
|
48
|
+
export declare function handleWidgetMouseLeave(target: HTMLElement): {
|
|
49
|
+
hidePreview: boolean;
|
|
50
|
+
widget: HTMLElement | null;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=codemirror-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemirror-handlers.d.ts","sourceRoot":"","sources":["../../src/lib/codemirror-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EACtC,OAAO,EAAE,cAAc,GACtB,OAAO,CAWT;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,CA2BxE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAQ5F;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG;IAC3D,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;CAC5B,CAmBA;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG;IAC3D,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;CAC5B,CAcA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CodeMirror JSON theme for light mode
|
|
3
|
+
* Used by both JsonLdView (popups) and JsonLdPanel (sidebar)
|
|
4
|
+
*/
|
|
5
|
+
import { HighlightStyle } from '@codemirror/language';
|
|
6
|
+
export declare const jsonLightTheme: import("@codemirror/state").Extension;
|
|
7
|
+
export declare const jsonLightHighlightStyle: HighlightStyle;
|
|
8
|
+
//# sourceMappingURL=codemirror-json-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemirror-json-theme.d.ts","sourceRoot":"","sources":["../../src/lib/codemirror-json-theme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,eAAO,MAAM,cAAc,uCAmBR,CAAC;AAEpB,eAAO,MAAM,uBAAuB,gBASlC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure logic extracted from CodeMirrorRenderer
|
|
3
|
+
*
|
|
4
|
+
* These functions have zero dependency on CodeMirror's DOM or React.
|
|
5
|
+
* They handle position conversion, tooltip generation, and decoration metadata.
|
|
6
|
+
*/
|
|
7
|
+
import type { Annotation } from '@semiont/core';
|
|
8
|
+
export interface TextSegment {
|
|
9
|
+
exact: string;
|
|
10
|
+
annotation?: Annotation;
|
|
11
|
+
start: number;
|
|
12
|
+
end: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Convert positions from CRLF character space to LF character space.
|
|
16
|
+
* CodeMirror normalizes all line endings to LF internally, but annotation positions
|
|
17
|
+
* are calculated in the original content's character space (which may have CRLF).
|
|
18
|
+
*
|
|
19
|
+
* @param segments - Segments with positions in CRLF space
|
|
20
|
+
* @param content - Original content (may have CRLF line endings)
|
|
21
|
+
* @returns Segments with positions adjusted for LF space
|
|
22
|
+
*/
|
|
23
|
+
export declare function convertSegmentPositions(segments: TextSegment[], content: string): TextSegment[];
|
|
24
|
+
/**
|
|
25
|
+
* Get tooltip text for annotation based on type/motivation
|
|
26
|
+
*/
|
|
27
|
+
export declare function getAnnotationTooltip(annotation: Annotation): string;
|
|
28
|
+
/**
|
|
29
|
+
* Metadata for a single annotation decoration (class name, data attributes, tooltip)
|
|
30
|
+
*/
|
|
31
|
+
export interface AnnotationDecorationMeta {
|
|
32
|
+
className: string;
|
|
33
|
+
annotationType: string;
|
|
34
|
+
annotationId: string;
|
|
35
|
+
tooltip: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Compute decoration metadata for a single annotated segment.
|
|
39
|
+
* Pure function — no CodeMirror dependency.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getAnnotationDecorationMeta(annotation: Annotation, isNew: boolean): AnnotationDecorationMeta;
|
|
42
|
+
/**
|
|
43
|
+
* Compute all annotation decoration metadata from segments.
|
|
44
|
+
* Returns sorted, filtered entries ready for CodeMirror's RangeSetBuilder.
|
|
45
|
+
*/
|
|
46
|
+
export declare function computeAnnotationDecorations(segments: TextSegment[], newAnnotationIds?: Set<string>): Array<{
|
|
47
|
+
start: number;
|
|
48
|
+
end: number;
|
|
49
|
+
meta: AnnotationDecorationMeta;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Widget metadata for a reference annotation
|
|
53
|
+
*/
|
|
54
|
+
export interface ReferenceWidgetMeta {
|
|
55
|
+
annotationId: string;
|
|
56
|
+
position: number;
|
|
57
|
+
targetName: string | undefined;
|
|
58
|
+
isGenerating: boolean;
|
|
59
|
+
bodySource: string | undefined;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Compute widget metadata for reference annotations.
|
|
63
|
+
* Pure function — no CodeMirror dependency.
|
|
64
|
+
*/
|
|
65
|
+
export declare function computeWidgetDecorations(segments: TextSegment[], generatingReferenceId: string | null | undefined, getTargetResourceName?: (resourceId: string) => string | undefined): ReferenceWidgetMeta[];
|
|
66
|
+
//# sourceMappingURL=codemirror-logic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemirror-logic.d.ts","sourceRoot":"","sources":["../../src/lib/codemirror-logic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,EAAE,CA+B/F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAsBnE;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,OAAO,GACb,wBAAwB,CAuB1B;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,WAAW,EAAE,EACvB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC7B,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,wBAAwB,CAAA;CAAE,CAAC,CAavE;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,WAAW,EAAE,EACvB,qBAAqB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChD,qBAAqB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GACjE,mBAAmB,EAAE,CAkBvB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeMirror Inline Widgets
|
|
3
|
+
*
|
|
4
|
+
* Custom widgets for enhancing the document editing experience:
|
|
5
|
+
* - Reference resolution indicators (resolved 🔗, generating ✨, stub ❓)
|
|
6
|
+
*
|
|
7
|
+
* Event handling uses delegation — no per-widget listeners.
|
|
8
|
+
* Data attributes on the container enable CodeMirrorRenderer to handle
|
|
9
|
+
* clicks and hovers via a single set of delegated handlers.
|
|
10
|
+
*/
|
|
11
|
+
import { WidgetType } from '@codemirror/view';
|
|
12
|
+
import type { Annotation } from '@semiont/core';
|
|
13
|
+
/**
|
|
14
|
+
* Reference Resolution Widget
|
|
15
|
+
* Shows a small indicator next to references with hover preview.
|
|
16
|
+
*
|
|
17
|
+
* All event handling is delegated — the widget sets data attributes
|
|
18
|
+
* and CodeMirrorRenderer handles events via container-level listeners.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ReferenceResolutionWidget extends WidgetType {
|
|
21
|
+
readonly annotation: Annotation;
|
|
22
|
+
readonly targetDocumentName?: string | undefined;
|
|
23
|
+
readonly isGenerating?: boolean | undefined;
|
|
24
|
+
constructor(annotation: Annotation, targetDocumentName?: string | undefined, isGenerating?: boolean | undefined);
|
|
25
|
+
eq(other: ReferenceResolutionWidget): boolean;
|
|
26
|
+
toDOM(): HTMLSpanElement;
|
|
27
|
+
ignoreEvent(event: Event): boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Show a tooltip preview on a widget container.
|
|
31
|
+
* Called from delegated mouseenter handler in CodeMirrorRenderer.
|
|
32
|
+
*/
|
|
33
|
+
export declare function showWidgetPreview(container: HTMLElement, documentName: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Hide the tooltip preview from a widget container.
|
|
36
|
+
* Called from delegated mouseleave handler in CodeMirrorRenderer.
|
|
37
|
+
*/
|
|
38
|
+
export declare function hideWidgetPreview(container: HTMLElement): void;
|
|
39
|
+
//# sourceMappingURL=codemirror-widgets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemirror-widgets.d.ts","sourceRoot":"","sources":["../../src/lib/codemirror-widgets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;GAMG;AACH,qBAAa,yBAA0B,SAAQ,UAAU;IAErD,QAAQ,CAAC,UAAU,EAAE,UAAU;IAC/B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM;IACpC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO;gBAFtB,UAAU,EAAE,UAAU,EACtB,kBAAkB,CAAC,EAAE,MAAM,YAAA,EAC3B,YAAY,CAAC,EAAE,OAAO,YAAA;IAKxB,EAAE,CAAC,KAAK,EAAE,yBAAyB;IASnC,KAAK;IAqGL,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;CAG5C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAwBpF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAG9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatTime.d.ts","sourceRoot":"","sources":["../../src/lib/formatTime.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAiBrE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media Type Shape Support
|
|
3
|
+
*
|
|
4
|
+
* Defines which annotation shapes are supported for each media type.
|
|
5
|
+
* Shapes are tracked per selector type (FragmentSelector, SvgSelector).
|
|
6
|
+
*/
|
|
7
|
+
import type { ShapeType } from '../components/annotation/AnnotateToolbar';
|
|
8
|
+
/**
|
|
9
|
+
* Selector types that support shape selection
|
|
10
|
+
*/
|
|
11
|
+
export type SelectorType = 'fragment' | 'svg' | 'text';
|
|
12
|
+
/**
|
|
13
|
+
* Get supported annotation shapes for a given media type
|
|
14
|
+
*
|
|
15
|
+
* PDF: Only rectangles (FragmentSelector with RFC 3778 viewrect)
|
|
16
|
+
* Images: All shapes (SvgSelector supports rect, circle, polygon)
|
|
17
|
+
*
|
|
18
|
+
* @param mediaType - MIME type of the resource (e.g., 'application/pdf', 'image/png')
|
|
19
|
+
* @returns Array of supported shape types for annotation
|
|
20
|
+
*/
|
|
21
|
+
export declare function getSupportedShapes(mediaType: string | undefined | null): ShapeType[];
|
|
22
|
+
/**
|
|
23
|
+
* Check if a shape type is supported for a given media type
|
|
24
|
+
*
|
|
25
|
+
* @param mediaType - MIME type of the resource
|
|
26
|
+
* @param shape - Shape type to check
|
|
27
|
+
* @returns true if the shape is supported for this media type
|
|
28
|
+
*/
|
|
29
|
+
export declare function isShapeSupported(mediaType: string | undefined | null, shape: ShapeType): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Get the selector type used for a given media type
|
|
32
|
+
*
|
|
33
|
+
* @param mediaType - MIME type of the resource
|
|
34
|
+
* @returns Selector type (fragment, svg, or text)
|
|
35
|
+
*/
|
|
36
|
+
export declare function getSelectorType(mediaType: string | undefined | null): SelectorType;
|
|
37
|
+
/**
|
|
38
|
+
* Get the selected shape for a given selector type from localStorage
|
|
39
|
+
*
|
|
40
|
+
* @param selectorType - The selector type
|
|
41
|
+
* @returns The selected shape, or default for that selector type
|
|
42
|
+
*/
|
|
43
|
+
export declare function getSelectedShapeForSelectorType(selectorType: SelectorType): ShapeType;
|
|
44
|
+
/**
|
|
45
|
+
* Save the selected shape for a given selector type to localStorage
|
|
46
|
+
*
|
|
47
|
+
* @param selectorType - The selector type
|
|
48
|
+
* @param shape - The shape to save
|
|
49
|
+
*/
|
|
50
|
+
export declare function saveSelectedShapeForSelectorType(selectorType: SelectorType, shape: ShapeType): void;
|
|
51
|
+
//# sourceMappingURL=media-shapes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-shapes.d.ts","sourceRoot":"","sources":["../../src/lib/media-shapes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC;AAEvD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,EAAE,CAmBpF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EACpC,KAAK,EAAE,SAAS,GACf,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,YAAY,CAiBlF;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,YAAY,EAAE,YAAY,GAAG,SAAS,CAqBrF;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAKnG"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDF Coordinate Utilities
|
|
3
|
+
*
|
|
4
|
+
* Handles coordinate transformations between:
|
|
5
|
+
* - Canvas space (pixels, top-left origin, Y increases downward)
|
|
6
|
+
* - PDF space (points, bottom-left origin, Y increases upward)
|
|
7
|
+
*
|
|
8
|
+
* Based on RFC 3778 PDF Fragment Identifiers:
|
|
9
|
+
* https://tools.ietf.org/html/rfc3778
|
|
10
|
+
*/
|
|
11
|
+
export interface Rectangle {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
export interface PdfCoordinate {
|
|
18
|
+
page: number;
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
24
|
+
export interface CanvasRectangle {
|
|
25
|
+
startX: number;
|
|
26
|
+
startY: number;
|
|
27
|
+
endX: number;
|
|
28
|
+
endY: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Convert canvas coordinates to PDF coordinates
|
|
32
|
+
*
|
|
33
|
+
* Canvas: Origin at top-left, Y increases downward
|
|
34
|
+
* PDF: Origin at bottom-left, Y increases upward
|
|
35
|
+
*
|
|
36
|
+
* @param canvasRect - Rectangle in canvas pixel coordinates
|
|
37
|
+
* @param page - PDF page number (1-indexed)
|
|
38
|
+
* @param pageWidth - PDF page width in points
|
|
39
|
+
* @param pageHeight - PDF page height in points
|
|
40
|
+
* @param scale - Current canvas scale factor
|
|
41
|
+
*/
|
|
42
|
+
export declare function canvasToPdfCoordinates(canvasRect: CanvasRectangle, page: number, _pageWidth: number, pageHeight: number, scale?: number): PdfCoordinate;
|
|
43
|
+
/**
|
|
44
|
+
* Convert PDF coordinates to canvas coordinates
|
|
45
|
+
*
|
|
46
|
+
* @param pdfCoord - Coordinates in PDF space
|
|
47
|
+
* @param pageHeight - PDF page height in points
|
|
48
|
+
* @param scale - Current canvas scale factor
|
|
49
|
+
*/
|
|
50
|
+
export declare function pdfToCanvasCoordinates(pdfCoord: PdfCoordinate, pageHeight: number, scale?: number): Rectangle;
|
|
51
|
+
/**
|
|
52
|
+
* Generate RFC 3778 FragmentSelector value
|
|
53
|
+
*
|
|
54
|
+
* Format: page=N&viewrect=left,top,width,height
|
|
55
|
+
* All coordinates in PDF points
|
|
56
|
+
*/
|
|
57
|
+
export declare function createFragmentSelector(coord: PdfCoordinate): string;
|
|
58
|
+
/**
|
|
59
|
+
* Parse RFC 3778 FragmentSelector value
|
|
60
|
+
*
|
|
61
|
+
* @param fragment - Fragment string like "page=5&viewrect=100,200,300,400"
|
|
62
|
+
* @returns Parsed PDF coordinates or null if invalid
|
|
63
|
+
*/
|
|
64
|
+
export declare function parseFragmentSelector(fragment: string): PdfCoordinate | null;
|
|
65
|
+
/**
|
|
66
|
+
* Extract page number from FragmentSelector
|
|
67
|
+
*/
|
|
68
|
+
export declare function getPageFromFragment(fragment: string): number | null;
|
|
69
|
+
//# sourceMappingURL=pdf-coordinates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-coordinates.d.ts","sourceRoot":"","sources":["../../src/lib/pdf-coordinates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,MAAU,GAChB,aAAa,CAsBf;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,MAAU,GAChB,SAAS,CAeX;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAqB5E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGnE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource utilities
|
|
3
|
+
* Shared helper functions for resource display and metadata
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Get icon emoji based on media type
|
|
7
|
+
*/
|
|
8
|
+
export declare function getResourceIcon(mediaType: string | undefined): string;
|
|
9
|
+
/**
|
|
10
|
+
* Check if a resource supports text-based AI detection features
|
|
11
|
+
*
|
|
12
|
+
* Currently returns true for any text/* media type.
|
|
13
|
+
* Future enhancements may include:
|
|
14
|
+
* - Checking resource language/locale compatibility
|
|
15
|
+
* - Validating content size limits
|
|
16
|
+
* - Checking for specific text format requirements
|
|
17
|
+
*
|
|
18
|
+
* @param mediaType - The media type string (e.g., 'text/plain', 'text/markdown')
|
|
19
|
+
* @returns true if the resource supports AI detection features
|
|
20
|
+
*/
|
|
21
|
+
export declare function supportsDetection(mediaType: string | undefined): boolean;
|
|
22
|
+
//# sourceMappingURL=resource-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-utils.d.ts","sourceRoot":"","sources":["../../src/lib/resource-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAmBrE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAIxE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll utilities for annotation navigation
|
|
3
|
+
*/
|
|
4
|
+
export interface ScrollToAnnotationOptions {
|
|
5
|
+
/** Add pulse animation that auto-removes after 2 seconds */
|
|
6
|
+
pulse?: boolean;
|
|
7
|
+
/** Scroll behavior */
|
|
8
|
+
behavior?: ScrollBehavior;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Scrolls an annotation into view within its scroll container.
|
|
12
|
+
* Centers the annotation vertically within the container.
|
|
13
|
+
*
|
|
14
|
+
* @param annotationId - ID of the annotation to scroll to
|
|
15
|
+
* @param rootElement - Root element containing the annotation (will search within this)
|
|
16
|
+
* @param options - Scroll options
|
|
17
|
+
* @returns true if annotation was found and scrolled, false otherwise
|
|
18
|
+
*/
|
|
19
|
+
export declare function scrollAnnotationIntoView(annotationId: string | null, rootElement: HTMLElement, options?: ScrollToAnnotationOptions): boolean;
|
|
20
|
+
//# sourceMappingURL=scroll-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-utils.d.ts","sourceRoot":"","sources":["../../src/lib/scroll-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,WAAW,EAAE,WAAW,EACxB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAgDT"}
|