@semiont/react-ui 0.2.30-build.55 → 0.2.30-build.56
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/index.d.mts +74 -1
- package/dist/index.mjs +1449 -1307
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/styles/components/left-sidebar.css +4 -0
- package/src/styles/components/navigation-tabs.css +12 -0
- package/src/styles/components/resize-handle.css +110 -0
- package/src/styles/features/resource.css +6 -2
- package/src/styles/index.css +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -1166,6 +1166,42 @@ declare function useLineNumbers(): {
|
|
|
1166
1166
|
toggleLineNumbers: () => void;
|
|
1167
1167
|
};
|
|
1168
1168
|
|
|
1169
|
+
interface UsePanelWidthOptions {
|
|
1170
|
+
defaultWidth?: number;
|
|
1171
|
+
minWidth?: number;
|
|
1172
|
+
maxWidth?: number;
|
|
1173
|
+
storageKey?: string;
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Custom hook for managing resizable panel width with localStorage persistence
|
|
1177
|
+
*
|
|
1178
|
+
* @param options Configuration options for panel width behavior
|
|
1179
|
+
* @param options.defaultWidth Default width in pixels (default: 384px / 24rem)
|
|
1180
|
+
* @param options.minWidth Minimum allowed width in pixels (default: 256px / 16rem)
|
|
1181
|
+
* @param options.maxWidth Maximum allowed width in pixels (default: 800px / 50rem)
|
|
1182
|
+
* @param options.storageKey localStorage key for persistence (default: 'semiont-panel-width')
|
|
1183
|
+
*
|
|
1184
|
+
* @returns Object containing current width, setter function, and constraints
|
|
1185
|
+
*
|
|
1186
|
+
* @example
|
|
1187
|
+
* ```tsx
|
|
1188
|
+
* const { width, setWidth, minWidth, maxWidth } = usePanelWidth();
|
|
1189
|
+
*
|
|
1190
|
+
* <div style={{ width: `${width}px` }}>
|
|
1191
|
+
* <ResizeHandle onResize={setWidth} minWidth={minWidth} maxWidth={maxWidth} />
|
|
1192
|
+
* </div>
|
|
1193
|
+
* ```
|
|
1194
|
+
*/
|
|
1195
|
+
declare function usePanelWidth({ defaultWidth, // 24rem
|
|
1196
|
+
minWidth, // 16rem
|
|
1197
|
+
maxWidth, // 50rem
|
|
1198
|
+
storageKey }?: UsePanelWidthOptions): {
|
|
1199
|
+
width: number;
|
|
1200
|
+
setWidth: (newWidth: number) => void;
|
|
1201
|
+
minWidth: number;
|
|
1202
|
+
maxWidth: number;
|
|
1203
|
+
};
|
|
1204
|
+
|
|
1169
1205
|
/**
|
|
1170
1206
|
* Resource event structure from the event store
|
|
1171
1207
|
* (Re-exported from api-client for consistency)
|
|
@@ -1706,6 +1742,43 @@ declare function useLanguageChangeAnnouncements(): {
|
|
|
1706
1742
|
announceLanguageChanged: (newLanguage: string) => void;
|
|
1707
1743
|
};
|
|
1708
1744
|
|
|
1745
|
+
interface ResizeHandleProps {
|
|
1746
|
+
/** Callback fired when resize occurs */
|
|
1747
|
+
onResize: (newWidth: number) => void;
|
|
1748
|
+
/** Minimum allowed width in pixels */
|
|
1749
|
+
minWidth: number;
|
|
1750
|
+
/** Maximum allowed width in pixels */
|
|
1751
|
+
maxWidth: number;
|
|
1752
|
+
/** Position of handle - left or right edge */
|
|
1753
|
+
position?: 'left' | 'right';
|
|
1754
|
+
/** Aria label for accessibility */
|
|
1755
|
+
ariaLabel?: string;
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Draggable resize handle for panels and sidebars
|
|
1759
|
+
*
|
|
1760
|
+
* Features:
|
|
1761
|
+
* - Mouse drag to resize
|
|
1762
|
+
* - Keyboard navigation (Arrow keys: ±10px, Shift+Arrow: ±50px)
|
|
1763
|
+
* - Enforces min/max constraints
|
|
1764
|
+
* - Visual feedback on hover and drag
|
|
1765
|
+
* - Accessible (WCAG compliant)
|
|
1766
|
+
*
|
|
1767
|
+
* @example
|
|
1768
|
+
* ```tsx
|
|
1769
|
+
* <div className="panel" style={{ width: `${width}px` }}>
|
|
1770
|
+
* <ResizeHandle
|
|
1771
|
+
* onResize={setWidth}
|
|
1772
|
+
* minWidth={256}
|
|
1773
|
+
* maxWidth={800}
|
|
1774
|
+
* position="left"
|
|
1775
|
+
* />
|
|
1776
|
+
* <div>Panel content</div>
|
|
1777
|
+
* </div>
|
|
1778
|
+
* ```
|
|
1779
|
+
*/
|
|
1780
|
+
declare function ResizeHandle({ onResize, minWidth, maxWidth, position, ariaLabel }: ResizeHandleProps): react_jsx_runtime.JSX.Element;
|
|
1781
|
+
|
|
1709
1782
|
interface ResourceTagsInlineProps {
|
|
1710
1783
|
documentId: string;
|
|
1711
1784
|
tags: string[];
|
|
@@ -3572,4 +3645,4 @@ interface ResourceViewerPageProps {
|
|
|
3572
3645
|
}
|
|
3573
3646
|
declare function ResourceViewerPage({ resource, rUri, content, contentLoading, annotations, referencedBy, referencedByLoading, allEntityTypes, locale, theme, onThemeChange, showLineNumbers, onLineNumbersToggle, activePanel, onPanelToggle, setActivePanel, onUpdateDocumentTags, onArchive, onUnarchive, onClone, onUpdateAnnotationBody, onRefetchAnnotations, onCreateAnnotation, onDeleteAnnotation, onTriggerSparkleAnimation, onClearNewAnnotationId, showSuccess, showError, onAnnotationAdded, onAnnotationRemoved, onAnnotationBodyUpdated, onDocumentArchived, onDocumentUnarchived, onEntityTagAdded, onEntityTagRemoved, onEventError, cacheManager, client, Link, routes, ToolbarPanels, SearchResourcesModal, GenerationConfigModal, }: ResourceViewerPageProps): react_jsx_runtime.JSX.Element;
|
|
3574
3647
|
|
|
3575
|
-
export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateToolbar, AnnotateView, type Annotation$n as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, AnnotationUIProvider, type AnnotationUIProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientManager, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, type AvailableLocale, type BorderRadiusToken, BrowseView, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, type CollapsibleResourceNavigationProps, type ColorToken, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type CreateAnnotationParams, type DeleteAnnotationParams, DetectSection, type DetectionConfig, type DetectionProgress, DetectionProgressWidget, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, Footer, type GenerationOptions, type GenerationProgress, HighlightEntry, HighlightPanel, HistoryEvent, ImageURLSchema, ImageViewer, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LiveRegionProvider, type Motivation$4 as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, type OpenResource, OpenResourcesManager, OpenResourcesProvider, PageLayout, PanelHeader, PopupContainer, PopupHeader, type PreparedAnnotation, ProposeEntitiesModal, QUERY_KEYS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferencesPanel, type ResolvedTheme, ResourceAnnotationsProvider, ResourceCard, type ResourceCardProps, ResourceComposePage, type ResourceComposePageProps, ResourceDiscoveryPage, type ResourceDiscoveryPageProps, ResourceErrorState, type ResourceErrorStateProps, type ResourceEvent, ResourceInfoPanel, ResourceLoadingState, ResourceSearchModal, type ResourceSearchModalProps, ResourceTagsInline, ResourceViewer, ResourceViewerPage, type ResourceViewerPageProps, type RouteBuilder, type SaveResourceParams, SearchModal, type SearchModalProps, SelectedTextDisplay, type SelectionData, type SelectionMotivation, SemiontBranding, SemiontFavicon, type SemiontResource$3 as SemiontResource, SessionExpiryBanner, SessionManager, SessionProvider, SessionTimer, SettingsPanel, type ShadowToken, type ShapeType, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, SimpleNavigation, type SimpleNavigationItem, type SimpleNavigationProps, SkipLinks, SortableResourceTab, type SortableResourceTabProps, type SpacingToken, StatisticsPanel, StatusDisplay, type StreamStatus, SvgDrawingCanvas, TagEntry, TagSchemasPage, type TagSchemasPageProps, TaggingPanel, type TextSegment, type TextSelection, type Theme, ToastContainer, type ToastMessage, ToastProvider, type ToastType, Toolbar, type ToolbarPanelType, type TransitionToken, TranslationManager, TranslationProvider, type TranslationProviderProps, type TypographyToken, type UICreateAnnotationParams, UnifiedAnnotationsPanel, UnifiedHeader, UserMenuSkeleton, WelcomePage, type WelcomePageProps, buttonStyles, createCancelDetectionHandler, createDetectionHandler, cssVariables, dispatch401Error, dispatch403Error, dispatchAuthEvent, faviconPaths, generateCSSVariables, getAnnotationClassName, getAnnotationInternalType, getAnnotator, getResourceIcon, getShortcutDisplay, groupAnnotationsByType, jsonLightHighlightStyle, jsonLightTheme, onAuthEvent, rehypeRenderAnnotations, remarkAnnotations, sanitizeImageURL, supportsDetection, tokens, useAdmin, useAnnotationManager, useAnnotationPanel, useAnnotationUI, useAnnotations, useApiClient, useAuthApi, useCacheManager, useDebounce, useDebouncedCallback, useDetectionProgress, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useFormAnnouncements, useFormValidation, useFormattedTime, useGenerationProgress, useHealth, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useOpenResources, usePreloadTranslations, useResourceAnnotations, useResourceEvents, useResourceLoadingAnnouncements, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useTheme, useToast, useToolbar, useTranslations, validationRules, withHandlers };
|
|
3648
|
+
export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateToolbar, AnnotateView, type Annotation$n as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, AnnotationUIProvider, type AnnotationUIProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientManager, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, type AvailableLocale, type BorderRadiusToken, BrowseView, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, type CollapsibleResourceNavigationProps, type ColorToken, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type CreateAnnotationParams, type DeleteAnnotationParams, DetectSection, type DetectionConfig, type DetectionProgress, DetectionProgressWidget, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, Footer, type GenerationOptions, type GenerationProgress, HighlightEntry, HighlightPanel, HistoryEvent, ImageURLSchema, ImageViewer, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LiveRegionProvider, type Motivation$4 as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, type OpenResource, OpenResourcesManager, OpenResourcesProvider, PageLayout, PanelHeader, PopupContainer, PopupHeader, type PreparedAnnotation, ProposeEntitiesModal, QUERY_KEYS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferencesPanel, ResizeHandle, type ResolvedTheme, ResourceAnnotationsProvider, ResourceCard, type ResourceCardProps, ResourceComposePage, type ResourceComposePageProps, ResourceDiscoveryPage, type ResourceDiscoveryPageProps, ResourceErrorState, type ResourceErrorStateProps, type ResourceEvent, ResourceInfoPanel, ResourceLoadingState, ResourceSearchModal, type ResourceSearchModalProps, ResourceTagsInline, ResourceViewer, ResourceViewerPage, type ResourceViewerPageProps, type RouteBuilder, type SaveResourceParams, SearchModal, type SearchModalProps, SelectedTextDisplay, type SelectionData, type SelectionMotivation, SemiontBranding, SemiontFavicon, type SemiontResource$3 as SemiontResource, SessionExpiryBanner, SessionManager, SessionProvider, SessionTimer, SettingsPanel, type ShadowToken, type ShapeType, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, SimpleNavigation, type SimpleNavigationItem, type SimpleNavigationProps, SkipLinks, SortableResourceTab, type SortableResourceTabProps, type SpacingToken, StatisticsPanel, StatusDisplay, type StreamStatus, SvgDrawingCanvas, TagEntry, TagSchemasPage, type TagSchemasPageProps, TaggingPanel, type TextSegment, type TextSelection, type Theme, ToastContainer, type ToastMessage, ToastProvider, type ToastType, Toolbar, type ToolbarPanelType, type TransitionToken, TranslationManager, TranslationProvider, type TranslationProviderProps, type TypographyToken, type UICreateAnnotationParams, UnifiedAnnotationsPanel, UnifiedHeader, UserMenuSkeleton, WelcomePage, type WelcomePageProps, buttonStyles, createCancelDetectionHandler, createDetectionHandler, cssVariables, dispatch401Error, dispatch403Error, dispatchAuthEvent, faviconPaths, generateCSSVariables, getAnnotationClassName, getAnnotationInternalType, getAnnotator, getResourceIcon, getShortcutDisplay, groupAnnotationsByType, jsonLightHighlightStyle, jsonLightTheme, onAuthEvent, rehypeRenderAnnotations, remarkAnnotations, sanitizeImageURL, supportsDetection, tokens, useAdmin, useAnnotationManager, useAnnotationPanel, useAnnotationUI, useAnnotations, useApiClient, useAuthApi, useCacheManager, useDebounce, useDebouncedCallback, useDetectionProgress, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useFormAnnouncements, useFormValidation, useFormattedTime, useGenerationProgress, useHealth, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useOpenResources, usePanelWidth, usePreloadTranslations, useResourceAnnotations, useResourceEvents, useResourceLoadingAnnouncements, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useTheme, useToast, useToolbar, useTranslations, validationRules, withHandlers };
|