@intlayer/design-system 8.9.8 → 8.10.0-canary.0
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/esm/components/Browser/Browser.content.mjs +120 -0
- package/dist/esm/components/Browser/Browser.content.mjs.map +1 -1
- package/dist/esm/components/Browser/Browser.mjs +131 -9
- package/dist/esm/components/Browser/Browser.mjs.map +1 -1
- package/dist/esm/components/Browser/extractUrlFromSitemap.mjs +44 -0
- package/dist/esm/components/Browser/extractUrlFromSitemap.mjs.map +1 -0
- package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +51 -3
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +3 -3
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +2 -2
- package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -1
- package/dist/esm/components/Form/elements/OTPElement.mjs +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -2
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +8 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +1 -1
- package/dist/esm/components/Modal/Modal.mjs +2 -2
- package/dist/esm/components/Navbar/MobileNavbar.mjs +1 -1
- package/dist/esm/components/Pagination/Pagination.mjs +1 -1
- package/dist/esm/components/RightDrawer/RightDrawer.mjs +3 -3
- package/dist/esm/components/Tab/Tab.mjs +1 -1
- package/dist/esm/components/WithResizer/index.mjs +12 -9
- package/dist/esm/components/WithResizer/index.mjs.map +1 -1
- package/dist/esm/components/index.mjs +2 -2
- package/dist/esm/hooks/index.mjs +9 -9
- package/dist/types/components/Badge/index.d.ts +2 -2
- package/dist/types/components/Browser/Browser.content.d.ts +120 -0
- package/dist/types/components/Browser/Browser.d.ts.map +1 -1
- package/dist/types/components/Browser/extractUrlFromSitemap.d.ts +5 -0
- package/dist/types/components/Browser/extractUrlFromSitemap.d.ts.map +1 -0
- package/dist/types/components/Button/Button.d.ts +5 -5
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +2 -2
- package/dist/types/components/Command/index.d.ts +2 -2
- package/dist/types/components/Container/index.d.ts +8 -8
- package/dist/types/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/types/components/Input/Checkbox.d.ts +2 -2
- package/dist/types/components/Link/Link.d.ts +4 -4
- package/dist/types/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +2 -2
- package/dist/types/components/SwitchSelector/SwitchSelector.d.ts +1 -1
- package/dist/types/components/SwitchSelector/VerticalSwitchSelector.d.ts +1 -1
- package/dist/types/components/Tab/Tab.d.ts +2 -2
- package/dist/types/components/TabSelector/TabSelector.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +3 -3
- package/dist/types/components/Toaster/Toast.d.ts +1 -1
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/WithResizer/index.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@utils/cn';\nimport React, {\n type FC,\n type PropsWithChildren,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nconst HANDLE_DOUBLE_CLICK_ZONE_PX = 16;\n\n/**\n * Props for the WithResizer component.\n *\n * Defines the configuration for a resizable container with drag-based width adjustment.\n *\n * @example\n * ```tsx\n * // Basic resizable container\n * <WithResizer initialWidth={300} minWidth={200} maxWidth={600}>\n * <div className=\"p-4\">Resizable content</div>\n * </WithResizer>\n *\n * // Sidebar with resizing\n * <WithResizer\n * initialWidth={250}\n * minWidth={180}\n * maxWidth={400}\n * >\n * <nav className=\"h-full p-4\">\n * <SidebarContent />\n * </nav>\n * </WithResizer>\n *\n * // Panel with unlimited growth\n * <WithResizer initialWidth={400} minWidth={300}>\n * <div className=\"h-full overflow-auto\">\n * <PanelContent />\n * </div>\n * </WithResizer>\n * ```\n */\ntype WithResizerProps = {\n /** Initial width of the resizable container in pixels */\n initialWidth: number;\n /** Maximum allowed width in pixels (optional, no limit if not specified) */\n maxWidth?: number;\n /** Minimum allowed width in pixels */\n minWidth?: number;\n /** Position of the resize handle (default: 'right') */\n handlePosition?: 'left' | 'right';\n /** Apply base styles */\n style?: boolean;\n /** Additional className */\n className?: string;\n /** Controlled open/close — true expands to defaultOpenWidth (or last used), false collapses to 0 */\n isOpen?: boolean;\n /** Width to restore when isOpen becomes true and current width is 0 */\n defaultOpenWidth?: number;\n};\n\n/**\n * WithResizer Component\n *\n * A flexible container component that allows users to dynamically resize its width\n * through mouse or touch drag interactions. Perfect for creating adjustable panels,\n * sidebars, and split-pane layouts.\n *\n * ## Features\n * - **Mouse & Touch Support**: Works with both mouse drag and touch interactions\n * - **Constraint Enforcement**: Respects minimum and maximum width boundaries\n * - **Visual Feedback**: Clear resize handle with hover and active states\n * - **Smooth Interactions**: Passive event listeners for optimal performance\n * - **Accessibility**: ARIA slider role with proper value announcements\n * - **Responsive Design**: Adapts to different screen sizes and containers\n *\n * ## Technical Implementation\n * - **Event Handling**: Uses `useCallback` for optimal performance\n * - **Boundary Calculation**: Real-time width calculation based on mouse/touch position\n * - **State Management**: Tracks resizing state for visual feedback\n * - **Memory Management**: Proper cleanup of global event listeners\n * - **Touch Events**: Full support for mobile touch interactions\n *\n * ## Visual Design\n * - **Resize Handle**: Rounded handle positioned on the right border\n * - **Border Indicator**: Visual border showing resizable edge\n * - **State Feedback**: Different colors for normal, hover, and active states\n * - **Dark Mode**: Full support with appropriate color scheme\n * - **Smooth Transitions**: CSS transitions for visual polish\n *\n * ## Use Cases\n * - **Application Sidebars**: Collapsible navigation and tool panels\n * - **Content Panels**: Adjustable content areas in complex layouts\n * - **Split Panes**: Dividing screen space between multiple content areas\n * - **Inspector Panels**: Debugging tools and property inspectors\n * - **File Explorers**: Tree views with adjustable column widths\n * - **Dashboard Widgets**: Customizable widget sizes for dashboards\n *\n * ## Accessibility Features\n * - **ARIA Slider**: Proper slider role for screen readers\n * - **Value Announcements**: Current, minimum, and maximum values announced\n * - **Keyboard Focus**: Focusable with tab navigation\n * - **Clear Affordances**: Visual indicators for interactive elements\n *\n * @example\n * ```tsx\n * // Application sidebar with resizing\n * const [sidebarWidth, setSidebarWidth] = useState(250);\n *\n * <div className=\"flex h-screen\">\n * <WithResizer\n * initialWidth={sidebarWidth}\n * minWidth={200}\n * maxWidth={400}\n * >\n * <aside className=\"h-full bg-gray-100 p-4\">\n * <nav>\n * <NavItems />\n * </nav>\n * </aside>\n * </WithResizer>\n *\n * <main className=\"flex-1 p-6\">\n * <MainContent />\n * </main>\n * </div>\n *\n * // Developer tools panel\n * <WithResizer\n * initialWidth={350}\n * minWidth={250}\n * maxWidth={600}\n * >\n * <div className=\"h-full flex flex-col\">\n * <div className=\"flex-1 overflow-auto p-4\">\n * <InspectorContent />\n * </div>\n * <div className=\"border-t p-2\">\n * <Controls />\n * </div>\n * </div>\n * </WithResizer>\n *\n * // Multi-column layout\n * <div className=\"flex h-full\">\n * <WithResizer initialWidth={300} minWidth={200} maxWidth={500}>\n * <FileExplorer />\n * </WithResizer>\n *\n * <WithResizer initialWidth={400} minWidth={300}>\n * <CodeEditor />\n * </WithResizer>\n *\n * <div className=\"flex-1 min-w-0\">\n * <OutputPanel />\n * </div>\n * </div>\n * ```\n *\n * ## Performance Considerations\n * - Uses passive event listeners to prevent scroll blocking\n * - Optimized with `useCallback` to prevent unnecessary re-renders\n * - Efficient boundary calculations using `getBoundingClientRect`\n * - Minimal DOM manipulation for smooth drag interactions\n *\n * ## Browser Support\n * - Modern browsers with support for touch events\n * - Graceful degradation for older browsers\n * - Mobile-first touch interaction handling\n */\nexport const WithResizer: FC<PropsWithChildren<WithResizerProps>> = ({\n initialWidth,\n maxWidth,\n minWidth = 0,\n handlePosition = 'right',\n children,\n style,\n className,\n isOpen,\n defaultOpenWidth,\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [width, setWidth] = useState(initialWidth);\n const [isResizing, setIsResizing] = useState(false);\n const lastExpandedWidthRef = useRef(initialWidth);\n\n const resizeState = useRef({\n startX: 0,\n startWidth: 0,\n factor: 1,\n });\n\n // Handler to resize the div\n const resize = useCallback(\n (mouseMoveEvent: MouseEvent | TouchEvent) => {\n if (resizeState.current.startWidth === 0) return;\n\n let clientX = 0;\n if (mouseMoveEvent instanceof MouseEvent) {\n clientX = mouseMoveEvent.clientX;\n } else if (\n typeof TouchEvent !== 'undefined' &&\n mouseMoveEvent instanceof TouchEvent\n ) {\n clientX = mouseMoveEvent.touches[0].clientX;\n }\n\n const { startX, startWidth, factor } = resizeState.current;\n const delta = (clientX - startX) / factor;\n // Invert delta for left handle (moving left decreases width, moving right increases width)\n const adjustedDelta = handlePosition === 'left' ? -delta : delta;\n const newWidth = startWidth + adjustedDelta;\n\n const constrainedWidth = Math.max(\n Math.min(newWidth, maxWidth ?? Infinity),\n minWidth\n );\n\n setWidth(constrainedWidth);\n },\n [maxWidth, minWidth, handlePosition]\n );\n\n // Handler to stop resizing\n const stopResizing = useCallback(() => {\n setIsResizing(false);\n document.body.style.cursor = '';\n document.body.style.userSelect = '';\n window.removeEventListener('mousemove', resize);\n window.removeEventListener('mouseup', stopResizing);\n window.removeEventListener('touchmove', resize);\n window.removeEventListener('touchend', stopResizing);\n }, [resize]);\n\n // Handler to start resizing\n const startResizing = useCallback(\n (\n mouseDownEvent:\n | React.MouseEvent<HTMLDivElement>\n | React.TouchEvent<HTMLDivElement>\n ) => {\n mouseDownEvent.preventDefault();\n const container = containerRef.current;\n\n if (!container) return;\n\n const { width: rectWidth } = container.getBoundingClientRect();\n const offsetWidth = container.offsetWidth;\n const factor = offsetWidth > 0 ? rectWidth / offsetWidth : 1;\n\n let clientX = 0;\n if ('touches' in mouseDownEvent) {\n clientX = mouseDownEvent.touches[0].clientX;\n } else {\n clientX = mouseDownEvent.clientX;\n }\n\n resizeState.current = {\n startX: clientX,\n startWidth: offsetWidth,\n factor,\n };\n\n setIsResizing(true);\n document.body.style.cursor = 'ew-resize';\n document.body.style.userSelect = 'none';\n\n window.addEventListener('mousemove', resize, { passive: true });\n window.addEventListener('mouseup', stopResizing);\n window.addEventListener('touchmove', resize, { passive: true });\n window.addEventListener('touchend', stopResizing);\n },\n [resize, stopResizing]\n );\n\n useEffect(() => {\n return () => {\n window.removeEventListener('mousemove', resize);\n window.removeEventListener('mouseup', stopResizing);\n window.removeEventListener('touchmove', resize);\n window.removeEventListener('touchend', stopResizing);\n };\n }, [resize, stopResizing]);\n\n useEffect(() => {\n if (width > minWidth) {\n lastExpandedWidthRef.current = width;\n }\n }, [width, minWidth]);\n\n useEffect(() => {\n if (isOpen === undefined) return;\n if (!isOpen) {\n setWidth(0);\n } else {\n const target =\n lastExpandedWidthRef.current > 0\n ? lastExpandedWidthRef.current\n : (defaultOpenWidth ?? initialWidth);\n setWidth(Math.max(target, minWidth));\n }\n }, [isOpen]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleDoubleClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const el = containerRef.current;\n if (!el) return;\n\n const { left, right } = el.getBoundingClientRect();\n const inHandleZone =\n handlePosition === 'right'\n ? right - event.clientX <= HANDLE_DOUBLE_CLICK_ZONE_PX\n : event.clientX - left <= HANDLE_DOUBLE_CLICK_ZONE_PX;\n\n if (!inHandleZone) return;\n\n event.preventDefault();\n event.stopPropagation();\n\n if (width > minWidth) {\n setWidth(minWidth);\n return;\n }\n\n const target = Math.min(\n Math.max(lastExpandedWidthRef.current, minWidth),\n maxWidth ?? Infinity\n );\n setWidth(target);\n },\n [handlePosition, maxWidth, minWidth, width]\n );\n\n return (\n <div\n className={cn(\n 'relative h-full w-full max-w-[80%] shrink-0 cursor-ew-resize',\n style &&\n (handlePosition === 'right'\n ? [\n 'border-r-[2px]',\n 'after:absolute after:top-1/2 after:right-0 after:block after:h-10 after:w-2 after:translate-x-1/2 after:-translate-y-1/2 after:transform after:cursor-ew-resize after:rounded-full after:bg-neutral-200 after:transition after:content-[\"\"] dark:after:bg-neutral-950',\n ]\n : [\n 'border-l-[2px]',\n 'after:absolute after:top-1/2 after:left-0 after:block after:h-10 after:w-2 after:-translate-x-1/2 after:-translate-y-1/2 after:transform after:cursor-ew-resize after:rounded-full after:bg-neutral-200 after:transition after:content-[\"\"] dark:after:bg-neutral-950',\n ]),\n style &&\n 'border-neutral-200 transition active:border-neutral-400 active:after:bg-neutral-400 dark:border-neutral-950 dark:active:border-neutral-600 active:dark:after:bg-neutral-600',\n minWidth && `min-w-[${minWidth}px]`,\n\n maxWidth && `max-w-[${maxWidth}px]`,\n !style && className\n )}\n style={{\n width: `${width}px`,\n transition: isResizing ? 'none' : 'width 200ms ease-in-out',\n }}\n ref={containerRef}\n onMouseDown={startResizing}\n onTouchStart={startResizing}\n onDoubleClick={handleDoubleClick}\n aria-valuemin={minWidth}\n aria-valuemax={maxWidth}\n aria-valuenow={width}\n aria-label=\"Resizable component\"\n role=\"slider\"\n tabIndex={0}\n >\n {/* biome-ignore lint/a11y/noStaticElementInteractions: This div stops event propagation to prevent content clicks from triggering resize */}\n <div\n role=\"presentation\"\n className=\"absolute top-0 left-0 size-full cursor-default overflow-hidden\"\n onMouseDown={(e) => e.stopPropagation()}\n onTouchStart={(e) => e.stopPropagation()}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/WithResizer/index.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@utils/cn';\nimport React, {\n type FC,\n type PropsWithChildren,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nconst HANDLE_DOUBLE_CLICK_ZONE_PX = 16;\n\n/**\n * Props for the WithResizer component.\n *\n * Defines the configuration for a resizable container with drag-based width adjustment.\n *\n * @example\n * ```tsx\n * // Basic resizable container\n * <WithResizer initialWidth={300} minWidth={200} maxWidth={600}>\n * <div className=\"p-4\">Resizable content</div>\n * </WithResizer>\n *\n * // Sidebar with resizing\n * <WithResizer\n * initialWidth={250}\n * minWidth={180}\n * maxWidth={400}\n * >\n * <nav className=\"h-full p-4\">\n * <SidebarContent />\n * </nav>\n * </WithResizer>\n *\n * // Panel with unlimited growth\n * <WithResizer initialWidth={400} minWidth={300}>\n * <div className=\"h-full overflow-auto\">\n * <PanelContent />\n * </div>\n * </WithResizer>\n * ```\n */\ntype WithResizerProps = {\n /** Initial width of the resizable container in pixels */\n initialWidth: number;\n /** Maximum allowed width in pixels (optional, no limit if not specified) */\n maxWidth?: number;\n /** Minimum allowed width in pixels */\n minWidth?: number;\n /** Position of the resize handle (default: 'right') */\n handlePosition?: 'left' | 'right';\n /** Apply base styles */\n style?: boolean;\n /** Additional className */\n className?: string;\n /** Controlled open/close — true expands to defaultOpenWidth (or last used), false collapses to 0 */\n isOpen?: boolean;\n /** Width to restore when isOpen becomes true and current width is 0 */\n defaultOpenWidth?: number;\n};\n\n/**\n * WithResizer Component\n *\n * A flexible container component that allows users to dynamically resize its width\n * through mouse or touch drag interactions. Perfect for creating adjustable panels,\n * sidebars, and split-pane layouts.\n *\n * ## Features\n * - **Mouse & Touch Support**: Works with both mouse drag and touch interactions\n * - **Constraint Enforcement**: Respects minimum and maximum width boundaries\n * - **Visual Feedback**: Clear resize handle with hover and active states\n * - **Smooth Interactions**: Passive event listeners for optimal performance\n * - **Accessibility**: ARIA slider role with proper value announcements\n * - **Responsive Design**: Adapts to different screen sizes and containers\n *\n * ## Technical Implementation\n * - **Event Handling**: Uses `useCallback` for optimal performance\n * - **Boundary Calculation**: Real-time width calculation based on mouse/touch position\n * - **State Management**: Tracks resizing state for visual feedback\n * - **Memory Management**: Proper cleanup of global event listeners\n * - **Touch Events**: Full support for mobile touch interactions\n *\n * ## Visual Design\n * - **Resize Handle**: Rounded handle positioned on the right border\n * - **Border Indicator**: Visual border showing resizable edge\n * - **State Feedback**: Different colors for normal, hover, and active states\n * - **Dark Mode**: Full support with appropriate color scheme\n * - **Smooth Transitions**: CSS transitions for visual polish\n *\n * ## Use Cases\n * - **Application Sidebars**: Collapsible navigation and tool panels\n * - **Content Panels**: Adjustable content areas in complex layouts\n * - **Split Panes**: Dividing screen space between multiple content areas\n * - **Inspector Panels**: Debugging tools and property inspectors\n * - **File Explorers**: Tree views with adjustable column widths\n * - **Dashboard Widgets**: Customizable widget sizes for dashboards\n *\n * ## Accessibility Features\n * - **ARIA Slider**: Proper slider role for screen readers\n * - **Value Announcements**: Current, minimum, and maximum values announced\n * - **Keyboard Focus**: Focusable with tab navigation\n * - **Clear Affordances**: Visual indicators for interactive elements\n *\n * @example\n * ```tsx\n * // Application sidebar with resizing\n * const [sidebarWidth, setSidebarWidth] = useState(250);\n *\n * <div className=\"flex h-screen\">\n * <WithResizer\n * initialWidth={sidebarWidth}\n * minWidth={200}\n * maxWidth={400}\n * >\n * <aside className=\"h-full bg-gray-100 p-4\">\n * <nav>\n * <NavItems />\n * </nav>\n * </aside>\n * </WithResizer>\n *\n * <main className=\"flex-1 p-6\">\n * <MainContent />\n * </main>\n * </div>\n *\n * // Developer tools panel\n * <WithResizer\n * initialWidth={350}\n * minWidth={250}\n * maxWidth={600}\n * >\n * <div className=\"h-full flex flex-col\">\n * <div className=\"flex-1 overflow-auto p-4\">\n * <InspectorContent />\n * </div>\n * <div className=\"border-t p-2\">\n * <Controls />\n * </div>\n * </div>\n * </WithResizer>\n *\n * // Multi-column layout\n * <div className=\"flex h-full\">\n * <WithResizer initialWidth={300} minWidth={200} maxWidth={500}>\n * <FileExplorer />\n * </WithResizer>\n *\n * <WithResizer initialWidth={400} minWidth={300}>\n * <CodeEditor />\n * </WithResizer>\n *\n * <div className=\"flex-1 min-w-0\">\n * <OutputPanel />\n * </div>\n * </div>\n * ```\n *\n * ## Performance Considerations\n * - Uses passive event listeners to prevent scroll blocking\n * - Optimized with `useCallback` to prevent unnecessary re-renders\n * - Efficient boundary calculations using `getBoundingClientRect`\n * - Minimal DOM manipulation for smooth drag interactions\n *\n * ## Browser Support\n * - Modern browsers with support for touch events\n * - Graceful degradation for older browsers\n * - Mobile-first touch interaction handling\n */\nexport const WithResizer: FC<PropsWithChildren<WithResizerProps>> = ({\n initialWidth,\n maxWidth,\n minWidth = 0,\n handlePosition = 'right',\n children,\n style = true,\n className,\n isOpen,\n defaultOpenWidth,\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [width, setWidth] = useState(initialWidth);\n const [isResizing, setIsResizing] = useState(false);\n const lastExpandedWidthRef = useRef(initialWidth);\n\n const resizeState = useRef({\n startX: 0,\n startWidth: 0,\n factor: 1,\n });\n\n // Handler to resize the div\n const resize = useCallback(\n (mouseMoveEvent: MouseEvent | TouchEvent) => {\n if (resizeState.current.startWidth === 0) return;\n\n let clientX = 0;\n if (mouseMoveEvent instanceof MouseEvent) {\n clientX = mouseMoveEvent.clientX;\n } else if (\n typeof TouchEvent !== 'undefined' &&\n mouseMoveEvent instanceof TouchEvent\n ) {\n clientX = mouseMoveEvent.touches[0].clientX;\n }\n\n const { startX, startWidth, factor } = resizeState.current;\n const delta = (clientX - startX) / factor;\n // Invert delta for left handle (moving left decreases width, moving right increases width)\n const adjustedDelta = handlePosition === 'left' ? -delta : delta;\n const newWidth = startWidth + adjustedDelta;\n\n const constrainedWidth = Math.max(\n Math.min(newWidth, maxWidth ?? Infinity),\n minWidth\n );\n\n setWidth(constrainedWidth);\n },\n [maxWidth, minWidth, handlePosition]\n );\n\n // Handler to stop resizing\n const stopResizing = useCallback(() => {\n setIsResizing(false);\n document.body.style.cursor = '';\n document.body.style.userSelect = '';\n window.removeEventListener('mousemove', resize);\n window.removeEventListener('mouseup', stopResizing);\n window.removeEventListener('touchmove', resize);\n window.removeEventListener('touchend', stopResizing);\n }, [resize]);\n\n // Handler to start resizing\n const startResizing = useCallback(\n (\n mouseDownEvent:\n | React.MouseEvent<HTMLDivElement>\n | React.TouchEvent<HTMLDivElement>\n ) => {\n mouseDownEvent.preventDefault();\n const container = containerRef.current;\n\n if (!container) return;\n\n const { width: rectWidth } = container.getBoundingClientRect();\n const offsetWidth = container.offsetWidth;\n const factor = offsetWidth > 0 ? rectWidth / offsetWidth : 1;\n\n let clientX = 0;\n if ('touches' in mouseDownEvent) {\n clientX = mouseDownEvent.touches[0].clientX;\n } else {\n clientX = mouseDownEvent.clientX;\n }\n\n resizeState.current = {\n startX: clientX,\n startWidth: offsetWidth,\n factor,\n };\n\n setIsResizing(true);\n document.body.style.cursor = 'ew-resize';\n document.body.style.userSelect = 'none';\n\n window.addEventListener('mousemove', resize, { passive: true });\n window.addEventListener('mouseup', stopResizing);\n window.addEventListener('touchmove', resize, { passive: true });\n window.addEventListener('touchend', stopResizing);\n },\n [resize, stopResizing]\n );\n\n useEffect(() => {\n return () => {\n window.removeEventListener('mousemove', resize);\n window.removeEventListener('mouseup', stopResizing);\n window.removeEventListener('touchmove', resize);\n window.removeEventListener('touchend', stopResizing);\n };\n }, [resize, stopResizing]);\n\n useEffect(() => {\n if (width > minWidth) {\n lastExpandedWidthRef.current = width;\n }\n }, [width, minWidth]);\n\n useEffect(() => {\n if (isOpen === undefined) return;\n if (!isOpen) {\n setWidth(0);\n } else {\n const target =\n lastExpandedWidthRef.current > 0\n ? lastExpandedWidthRef.current\n : (defaultOpenWidth ?? initialWidth);\n setWidth(Math.max(target, minWidth));\n }\n }, [isOpen]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleDoubleClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const el = containerRef.current;\n if (!el) return;\n\n const { left, right } = el.getBoundingClientRect();\n const inHandleZone =\n handlePosition === 'right'\n ? right - event.clientX <= HANDLE_DOUBLE_CLICK_ZONE_PX\n : event.clientX - left <= HANDLE_DOUBLE_CLICK_ZONE_PX;\n\n if (!inHandleZone) return;\n\n event.preventDefault();\n event.stopPropagation();\n\n if (width > minWidth) {\n setWidth(minWidth);\n return;\n }\n\n const target = Math.min(\n Math.max(lastExpandedWidthRef.current, minWidth),\n maxWidth ?? Infinity\n );\n setWidth(target);\n },\n [handlePosition, maxWidth, minWidth, width]\n );\n\n return (\n <div\n className={cn(\n 'relative h-full w-full max-w-[80%] shrink-0',\n style &&\n (handlePosition === 'right' ? 'border-r-[2px]' : 'border-l-[2px]'),\n style &&\n 'border-neutral-200 transition active:border-neutral-400 dark:border-neutral-950 dark:active:border-neutral-600',\n minWidth && `min-w-[${minWidth}px]`,\n maxWidth && `max-w-[${maxWidth}px]`,\n !style && className\n )}\n style={{\n width: `${width}px`,\n transition: isResizing ? 'none' : 'width 200ms ease-in-out',\n }}\n ref={containerRef}\n aria-valuemin={minWidth}\n aria-valuemax={maxWidth}\n aria-valuenow={width}\n aria-label=\"Resizable component\"\n role=\"slider\"\n tabIndex={0}\n >\n {/* biome-ignore lint/a11y/noStaticElementInteractions: This div stops event propagation to prevent content clicks from triggering resize */}\n <div\n role=\"presentation\"\n className=\"absolute top-0 left-0 size-full cursor-default overflow-hidden\"\n onMouseDown={(e) => e.stopPropagation()}\n onTouchStart={(e) => e.stopPropagation()}\n >\n {children}\n </div>\n {/* biome-ignore lint/a11y/noStaticElementInteractions: Invisible handle strip — owns resize events so content stopPropagation doesn't block them */}\n <div\n role=\"presentation\"\n className={cn(\n 'absolute top-0 z-10 h-full w-3 cursor-ew-resize',\n handlePosition === 'right' ? 'right-0' : 'left-0'\n )}\n onMouseDown={startResizing}\n onTouchStart={startResizing}\n onDoubleClick={handleDoubleClick}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;AAYA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiKpC,MAAa,eAAwD,EACnE,cACA,UACA,WAAW,GACX,iBAAiB,SACjB,UACA,QAAQ,MACR,WACA,QACA,uBACI;CACJ,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,CAAC,OAAO,YAAY,SAAS,YAAY;CAC/C,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAClD,MAAM,uBAAuB,OAAO,YAAY;CAEhD,MAAM,cAAc,OAAO;EACzB,QAAQ;EACR,YAAY;EACZ,QAAQ;CACV,CAAC;CAGD,MAAM,SAAS,aACZ,mBAA4C;EAC3C,IAAI,YAAY,QAAQ,eAAe,GAAG;EAE1C,IAAI,UAAU;EACd,IAAI,0BAA0B,YAC5B,UAAU,eAAe;OACpB,IACL,OAAO,eAAe,eACtB,0BAA0B,YAE1B,UAAU,eAAe,QAAQ,GAAG;EAGtC,MAAM,EAAE,QAAQ,YAAY,WAAW,YAAY;EACnD,MAAM,SAAS,UAAU,UAAU;EAGnC,MAAM,WAAW,cADK,mBAAmB,SAAS,CAAC,QAAQ;EAQ3D,SALyB,KAAK,IAC5B,KAAK,IAAI,UAAU,YAAY,QAAQ,GACvC,QAGsB,CAAC;CAC3B,GACA;EAAC;EAAU;EAAU;CAAc,CACrC;CAGA,MAAM,eAAe,kBAAkB;EACrC,cAAc,KAAK;EACnB,SAAS,KAAK,MAAM,SAAS;EAC7B,SAAS,KAAK,MAAM,aAAa;EACjC,OAAO,oBAAoB,aAAa,MAAM;EAC9C,OAAO,oBAAoB,WAAW,YAAY;EAClD,OAAO,oBAAoB,aAAa,MAAM;EAC9C,OAAO,oBAAoB,YAAY,YAAY;CACrD,GAAG,CAAC,MAAM,CAAC;CAGX,MAAM,gBAAgB,aAElB,mBAGG;EACH,eAAe,eAAe;EAC9B,MAAM,YAAY,aAAa;EAE/B,IAAI,CAAC,WAAW;EAEhB,MAAM,EAAE,OAAO,cAAc,UAAU,sBAAsB;EAC7D,MAAM,cAAc,UAAU;EAC9B,MAAM,SAAS,cAAc,IAAI,YAAY,cAAc;EAE3D,IAAI,UAAU;EACd,IAAI,aAAa,gBACf,UAAU,eAAe,QAAQ,GAAG;OAEpC,UAAU,eAAe;EAG3B,YAAY,UAAU;GACpB,QAAQ;GACR,YAAY;GACZ;EACF;EAEA,cAAc,IAAI;EAClB,SAAS,KAAK,MAAM,SAAS;EAC7B,SAAS,KAAK,MAAM,aAAa;EAEjC,OAAO,iBAAiB,aAAa,QAAQ,EAAE,SAAS,KAAK,CAAC;EAC9D,OAAO,iBAAiB,WAAW,YAAY;EAC/C,OAAO,iBAAiB,aAAa,QAAQ,EAAE,SAAS,KAAK,CAAC;EAC9D,OAAO,iBAAiB,YAAY,YAAY;CAClD,GACA,CAAC,QAAQ,YAAY,CACvB;CAEA,gBAAgB;EACd,aAAa;GACX,OAAO,oBAAoB,aAAa,MAAM;GAC9C,OAAO,oBAAoB,WAAW,YAAY;GAClD,OAAO,oBAAoB,aAAa,MAAM;GAC9C,OAAO,oBAAoB,YAAY,YAAY;EACrD;CACF,GAAG,CAAC,QAAQ,YAAY,CAAC;CAEzB,gBAAgB;EACd,IAAI,QAAQ,UACV,qBAAqB,UAAU;CAEnC,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,gBAAgB;EACd,IAAI,WAAW,QAAW;EAC1B,IAAI,CAAC,QACH,SAAS,CAAC;OACL;GACL,MAAM,SACJ,qBAAqB,UAAU,IAC3B,qBAAqB,UACpB,oBAAoB;GAC3B,SAAS,KAAK,IAAI,QAAQ,QAAQ,CAAC;EACrC;CACF,GAAG,CAAC,MAAM,CAAC;CAEX,MAAM,oBAAoB,aACvB,UAA4C;EAC3C,MAAM,KAAK,aAAa;EACxB,IAAI,CAAC,IAAI;EAET,MAAM,EAAE,MAAM,UAAU,GAAG,sBAAsB;EAMjD,IAAI,EAJF,mBAAmB,UACf,QAAQ,MAAM,WAAW,8BACzB,MAAM,UAAU,QAAQ,8BAEX;EAEnB,MAAM,eAAe;EACrB,MAAM,gBAAgB;EAEtB,IAAI,QAAQ,UAAU;GACpB,SAAS,QAAQ;GACjB;EACF;EAMA,SAJe,KAAK,IAClB,KAAK,IAAI,qBAAqB,SAAS,QAAQ,GAC/C,YAAY,QAEA,CAAC;CACjB,GACA;EAAC;EAAgB;EAAU;EAAU;CAAK,CAC5C;CAEA,OACE,qBAAC,OAAD;EACE,WAAW,GACT,+CACA,UACG,mBAAmB,UAAU,mBAAmB,mBACnD,SACE,kHACF,YAAY,UAAU,SAAS,MAC/B,YAAY,UAAU,SAAS,MAC/B,CAAC,SAAS,SACZ;EACA,OAAO;GACL,OAAO,GAAG,MAAM;GAChB,YAAY,aAAa,SAAS;EACpC;EACA,KAAK;EACL,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,cAAW;EACX,MAAK;EACL,UAAU;YArBZ,CAwBE,oBAAC,OAAD;GACE,MAAK;GACL,WAAU;GACV,cAAc,MAAM,EAAE,gBAAgB;GACtC,eAAe,MAAM,EAAE,gBAAgB;GAEtC;EACE,IAEL,oBAAC,OAAD;GACE,MAAK;GACL,WAAW,GACT,mDACA,mBAAmB,UAAU,YAAY,QAC3C;GACA,aAAa;GACb,cAAc;GACd,eAAe;EAChB,EACE;;AAET"}
|
|
@@ -10,6 +10,8 @@ import { Avatar, getCapitals } from "./Avatar/index.mjs";
|
|
|
10
10
|
import { Badge, BadgeColor, BadgeSize, BadgeVariant, badgeVariants } from "./Badge/index.mjs";
|
|
11
11
|
import { Link, LinkColor, LinkRoundedSize, LinkSize, LinkUnderlined, LinkVariant, checkIsExternalLink, isTextChildren, linkVariants } from "./Link/Link.mjs";
|
|
12
12
|
import { Breadcrumb } from "./Breadcrumb/index.mjs";
|
|
13
|
+
import { ClickOutsideDiv } from "./ClickOutsideDiv/index.mjs";
|
|
14
|
+
import { DropDown, DropDownAlign, DropDownYAlign } from "./DropDown/index.mjs";
|
|
13
15
|
import { Checkbox, CheckboxColor, CheckboxSize, checkboxVariants } from "./Input/Checkbox.mjs";
|
|
14
16
|
import { Input, InputSize, InputVariant, inputVariants } from "./Input/Input.mjs";
|
|
15
17
|
import { InputPassword } from "./Input/InputPassword.mjs";
|
|
@@ -20,7 +22,6 @@ import { KeyList, KeyboardShortcut } from "./KeyboardShortcut/KeyboardShortcut.m
|
|
|
20
22
|
import { Detail, PopoverStatic, PopoverXAlign, PopoverYAlign } from "./Popover/static.mjs";
|
|
21
23
|
import { Popover } from "./Popover/dynamic.mjs";
|
|
22
24
|
import { Carousel } from "./Carousel/index.mjs";
|
|
23
|
-
import { ClickOutsideDiv } from "./ClickOutsideDiv/index.mjs";
|
|
24
25
|
import { CollapsibleTable } from "./CollapsibleTable/CollapsibleTable.mjs";
|
|
25
26
|
import { Command, CommandRoot } from "./Command/index.mjs";
|
|
26
27
|
import { PressableSpan } from "./PressableSpan/PressableSpan.mjs";
|
|
@@ -36,7 +37,6 @@ import { TextArea } from "./TextArea/TextArea.mjs";
|
|
|
36
37
|
import { AutoSizedTextArea } from "./TextArea/AutoSizeTextArea.mjs";
|
|
37
38
|
import { EditableFieldTextArea } from "./EditableField/EditableFieldTextArea.mjs";
|
|
38
39
|
import { DictionaryEditor } from "./DictionaryEditor/DictionaryEditor.mjs";
|
|
39
|
-
import { DropDown, DropDownAlign, DropDownYAlign } from "./DropDown/index.mjs";
|
|
40
40
|
import { LocaleSwitcherContentProvider, useLocaleSwitcherContent } from "./LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
|
|
41
41
|
import { LocaleSwitcherContent } from "./LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs";
|
|
42
42
|
import { Label } from "./Label/index.mjs";
|
package/dist/esm/hooks/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useKeyboardDetector } from "./useKeyboardDetector.mjs";
|
|
2
|
+
import { useGetElementOrWindow } from "./useGetElementOrWindow.mjs";
|
|
3
|
+
import { useScrollY } from "./useScrollY.mjs";
|
|
3
4
|
import { usePersistedStore } from "./usePersistedStore.mjs";
|
|
5
|
+
import { useHorizontalSwipe } from "./useHorizontalSwipe.mjs";
|
|
6
|
+
import { useItemSelector } from "./useItemSelector.mjs";
|
|
7
|
+
import { calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useDevice } from "./useDevice.mjs";
|
|
4
8
|
import { useOAuth2 } from "./useAuth/useOAuth2.mjs";
|
|
5
9
|
import { useSession } from "./useAuth/useSession.mjs";
|
|
6
10
|
import { useAuth } from "./useAuth/useAuth.mjs";
|
|
7
11
|
import { useIntlayerAuth, useIntlayerOAuth } from "./useIntlayerAPI.mjs";
|
|
8
12
|
import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useChat, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeleteOrganizationById, useDeletePasskey, useDeleteProject, useDeleteProjectById, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGithubToken, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useInfiniteGetDictionaries, useLinkSocial, useListAccounts, useListPasskeys, useListSSOProviders, useLogin, useLogout, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, usePushProjectConfiguration, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnlinkAccount, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUploadUserAvatar, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary } from "./reactQuery.mjs";
|
|
9
|
-
import {
|
|
13
|
+
import { useSearch } from "./useSearch.mjs";
|
|
14
|
+
import { useIsMounted } from "./useIsMounted.mjs";
|
|
10
15
|
import { useGetElementById } from "./useGetElementById.mjs";
|
|
11
|
-
import { useGetElementOrWindow } from "./useGetElementOrWindow.mjs";
|
|
12
|
-
import { useHorizontalSwipe } from "./useHorizontalSwipe.mjs";
|
|
13
16
|
import { useIsDarkMode } from "./useIsDarkMode.mjs";
|
|
14
|
-
import { useIsMounted } from "./useIsMounted.mjs";
|
|
15
|
-
import { useKeyboardDetector } from "./useKeyboardDetector.mjs";
|
|
16
17
|
import { useScreenWidth } from "./useScreenWidth.mjs";
|
|
17
18
|
import { useScrollBlockage } from "./useScrollBlockage/index.mjs";
|
|
18
19
|
import { useScrollDetection } from "./useScrollDetection.mjs";
|
|
19
|
-
import {
|
|
20
|
-
import { useSearch } from "./useSearch.mjs";
|
|
20
|
+
import { useUser } from "./useUser/index.mjs";
|
|
21
21
|
|
|
22
22
|
export { calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAuth, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useChat, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeleteOrganizationById, useDeletePasskey, useDeleteProject, useDeleteProjectById, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDevice, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetElementById, useGetElementOrWindow, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGithubToken, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useHorizontalSwipe, useInfiniteGetDictionaries, useIntlayerAuth, useIntlayerOAuth, useIsDarkMode, useIsMounted, useItemSelector, useKeyboardDetector, useLinkSocial, useListAccounts, useListPasskeys, useListSSOProviders, useLogin, useLogout, useOAuth2, usePauseTranslationJob, usePersistedStore, usePushCIConfig, usePushDictionaries, usePushProjectConfiguration, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useScreenWidth, useScrollBlockage, useScrollDetection, useScrollY, useSearch, useSearchDoc, useSelectOrganization, useSelectProject, useSession, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnlinkAccount, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUploadUserAvatar, useUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
|
|
@@ -42,9 +42,9 @@ declare enum BadgeSize {
|
|
|
42
42
|
* @description Defines the styling variants for different badge combinations
|
|
43
43
|
*/
|
|
44
44
|
declare const badgeVariants: (props?: {
|
|
45
|
-
color?: "text" | "primary" | "
|
|
45
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "error" | "custom" | "success";
|
|
46
46
|
variant?: "none" | "default" | "outline" | "hoverable";
|
|
47
|
-
size?: "
|
|
47
|
+
size?: "sm" | "md" | "lg";
|
|
48
48
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
49
49
|
/**
|
|
50
50
|
* Badge component props interface
|
|
@@ -143,6 +143,126 @@ declare const browserContent: {
|
|
|
143
143
|
vi: string;
|
|
144
144
|
uk: string;
|
|
145
145
|
}>;
|
|
146
|
+
sitemapButtonLabel: import("@intlayer/core/transpiler").TranslationContent<unknown, {
|
|
147
|
+
en: string;
|
|
148
|
+
'en-GB': string;
|
|
149
|
+
fr: string;
|
|
150
|
+
es: string;
|
|
151
|
+
de: string;
|
|
152
|
+
ja: string;
|
|
153
|
+
ko: string;
|
|
154
|
+
zh: string;
|
|
155
|
+
it: string;
|
|
156
|
+
pt: string;
|
|
157
|
+
hi: string;
|
|
158
|
+
ar: string;
|
|
159
|
+
ru: string;
|
|
160
|
+
tr: string;
|
|
161
|
+
pl: string;
|
|
162
|
+
id: string;
|
|
163
|
+
vi: string;
|
|
164
|
+
uk: string;
|
|
165
|
+
}>;
|
|
166
|
+
sitemapSearchPlaceholder: import("@intlayer/core/transpiler").TranslationContent<unknown, {
|
|
167
|
+
en: string;
|
|
168
|
+
'en-GB': string;
|
|
169
|
+
fr: string;
|
|
170
|
+
es: string;
|
|
171
|
+
de: string;
|
|
172
|
+
ja: string;
|
|
173
|
+
ko: string;
|
|
174
|
+
zh: string;
|
|
175
|
+
it: string;
|
|
176
|
+
pt: string;
|
|
177
|
+
hi: string;
|
|
178
|
+
ar: string;
|
|
179
|
+
ru: string;
|
|
180
|
+
tr: string;
|
|
181
|
+
pl: string;
|
|
182
|
+
id: string;
|
|
183
|
+
vi: string;
|
|
184
|
+
uk: string;
|
|
185
|
+
}>;
|
|
186
|
+
sitemapSearchAriaLabel: import("@intlayer/core/transpiler").TranslationContent<unknown, {
|
|
187
|
+
en: string;
|
|
188
|
+
'en-GB': string;
|
|
189
|
+
fr: string;
|
|
190
|
+
es: string;
|
|
191
|
+
de: string;
|
|
192
|
+
ja: string;
|
|
193
|
+
ko: string;
|
|
194
|
+
zh: string;
|
|
195
|
+
it: string;
|
|
196
|
+
pt: string;
|
|
197
|
+
hi: string;
|
|
198
|
+
ar: string;
|
|
199
|
+
ru: string;
|
|
200
|
+
tr: string;
|
|
201
|
+
pl: string;
|
|
202
|
+
id: string;
|
|
203
|
+
vi: string;
|
|
204
|
+
uk: string;
|
|
205
|
+
}>;
|
|
206
|
+
sitemapLoading: import("@intlayer/core/transpiler").TranslationContent<unknown, {
|
|
207
|
+
en: string;
|
|
208
|
+
'en-GB': string;
|
|
209
|
+
fr: string;
|
|
210
|
+
es: string;
|
|
211
|
+
de: string;
|
|
212
|
+
ja: string;
|
|
213
|
+
ko: string;
|
|
214
|
+
zh: string;
|
|
215
|
+
it: string;
|
|
216
|
+
pt: string;
|
|
217
|
+
hi: string;
|
|
218
|
+
ar: string;
|
|
219
|
+
ru: string;
|
|
220
|
+
tr: string;
|
|
221
|
+
pl: string;
|
|
222
|
+
id: string;
|
|
223
|
+
vi: string;
|
|
224
|
+
uk: string;
|
|
225
|
+
}>;
|
|
226
|
+
sitemapEmpty: import("@intlayer/core/transpiler").TranslationContent<unknown, {
|
|
227
|
+
en: string;
|
|
228
|
+
'en-GB': string;
|
|
229
|
+
fr: string;
|
|
230
|
+
es: string;
|
|
231
|
+
de: string;
|
|
232
|
+
ja: string;
|
|
233
|
+
ko: string;
|
|
234
|
+
zh: string;
|
|
235
|
+
it: string;
|
|
236
|
+
pt: string;
|
|
237
|
+
hi: string;
|
|
238
|
+
ar: string;
|
|
239
|
+
ru: string;
|
|
240
|
+
tr: string;
|
|
241
|
+
pl: string;
|
|
242
|
+
id: string;
|
|
243
|
+
vi: string;
|
|
244
|
+
uk: string;
|
|
245
|
+
}>;
|
|
246
|
+
sitemapError: import("@intlayer/core/transpiler").TranslationContent<unknown, {
|
|
247
|
+
en: string;
|
|
248
|
+
'en-GB': string;
|
|
249
|
+
fr: string;
|
|
250
|
+
es: string;
|
|
251
|
+
de: string;
|
|
252
|
+
ja: string;
|
|
253
|
+
ko: string;
|
|
254
|
+
zh: string;
|
|
255
|
+
it: string;
|
|
256
|
+
pt: string;
|
|
257
|
+
hi: string;
|
|
258
|
+
ar: string;
|
|
259
|
+
ru: string;
|
|
260
|
+
tr: string;
|
|
261
|
+
pl: string;
|
|
262
|
+
id: string;
|
|
263
|
+
vi: string;
|
|
264
|
+
uk: string;
|
|
265
|
+
}>;
|
|
146
266
|
};
|
|
147
267
|
title: string;
|
|
148
268
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Browser.d.ts","names":[],"sources":["../../../../src/components/Browser/Browser.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Browser.d.ts","names":[],"sources":["../../../../src/components/Browser/Browser.tsx"],"mappings":";;;KA6BY,YAAA;EACV,UAAA;EACA,IAAA;EACA,SAAA;EACA,KAAA,GAAQ,aAAA;EACR,IAAA;EACA,YAAA;EACA,OAAA;EACA,GAAA,GAAM,SAAA,CAAU,iBAAA;EAChB,iBAAA;AAAA,IACE,cAAA,CAAe,iBAAA;AAAA,cAWN,OAAA;EAAW,UAAA;EAAA,IAAA;EAAA,SAAA;EAAA,KAAA;EAAA,IAAA;EAAA,cAAA,SAAA;EAAA,OAAA;EAAA,GAAA;EAAA,iBAAA;EAAA,GAAA;AAAA,GAWrB,YAAA,iCAAY,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractUrlFromSitemap.d.ts","names":[],"sources":["../../../../src/components/Browser/extractUrlFromSitemap.ts"],"mappings":";cAuCa,qBAAA,GACX,OAAA,aACC,OAAO"}
|
|
@@ -60,11 +60,11 @@ declare enum ButtonTextAlign {
|
|
|
60
60
|
* Enhanced button variants with improved accessibility and focus states
|
|
61
61
|
*/
|
|
62
62
|
declare const buttonVariants: (props?: {
|
|
63
|
-
size?: "
|
|
64
|
-
color?: "text" | "primary" | "
|
|
65
|
-
roundedSize?: "
|
|
66
|
-
variant?: "
|
|
67
|
-
textAlign?: "left" | "
|
|
63
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
|
|
64
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "error" | "custom" | "card" | "current" | "text-inverse" | "success";
|
|
65
|
+
roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "4xl" | "5xl" | "full";
|
|
66
|
+
variant?: "input" | "none" | "default" | "outline" | "link" | "invisible-link" | "hoverable" | "fade";
|
|
67
|
+
textAlign?: "left" | "center" | "right";
|
|
68
68
|
isFullWidth?: boolean;
|
|
69
69
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
70
70
|
/**
|
|
@@ -4,8 +4,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
4
4
|
//#region src/components/CollapsibleTable/CollapsibleTable.d.ts
|
|
5
5
|
declare const collapsibleTableVariants: (props?: {
|
|
6
6
|
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
7
|
-
variant?: "
|
|
8
|
-
spacing?: "
|
|
7
|
+
variant?: "default" | "ghost" | "dark" | "outlined";
|
|
8
|
+
spacing?: "sm" | "md" | "lg" | "none" | "auto";
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
10
10
|
interface CollapsibleTableProps extends Omit<HTMLAttributes<HTMLElement>, 'title'>, VariantProps<typeof collapsibleTableVariants> {
|
|
11
11
|
/** Table title displayed in the header */
|
|
@@ -27,7 +27,7 @@ declare const Command: {
|
|
|
27
27
|
ref?: React.Ref<HTMLInputElement>;
|
|
28
28
|
} & {
|
|
29
29
|
asChild?: boolean;
|
|
30
|
-
}, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement> | "asChild">, "
|
|
30
|
+
}, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement> | "asChild">, "type" | "onChange" | "value"> & {
|
|
31
31
|
value?: string;
|
|
32
32
|
onValueChange?: (search: string) => void;
|
|
33
33
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -53,7 +53,7 @@ declare const Command: {
|
|
|
53
53
|
ref?: React.Ref<HTMLDivElement>;
|
|
54
54
|
} & {
|
|
55
55
|
asChild?: boolean;
|
|
56
|
-
}, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild">, "
|
|
56
|
+
}, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
|
|
57
57
|
heading?: React.ReactNode;
|
|
58
58
|
value?: string;
|
|
59
59
|
forceMount?: boolean;
|
|
@@ -7,14 +7,14 @@ import { VariantProps } from "class-variance-authority";
|
|
|
7
7
|
* Provides flexible styling options for background, padding, borders, and layout
|
|
8
8
|
*/
|
|
9
9
|
declare const containerVariants: (props?: {
|
|
10
|
-
roundedSize?: "
|
|
11
|
-
transparency?: "
|
|
12
|
-
padding?: "
|
|
13
|
-
separator?: "
|
|
14
|
-
border?: "
|
|
15
|
-
borderColor?: "
|
|
16
|
-
background?: "
|
|
17
|
-
gap?: "
|
|
10
|
+
roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "full" | "3xl" | "4xl";
|
|
11
|
+
transparency?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full";
|
|
12
|
+
padding?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
|
|
13
|
+
separator?: "both" | "without" | "x" | "y";
|
|
14
|
+
border?: "with" | "none";
|
|
15
|
+
borderColor?: "error" | "success" | "text" | "primary" | "secondary" | "neutral" | "card" | "warning";
|
|
16
|
+
background?: "with" | "none" | "hoverable";
|
|
17
|
+
gap?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
|
|
18
18
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
19
19
|
/** Available rounded corner sizes for the container */
|
|
20
20
|
declare enum ContainerRoundedSize {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.d.ts","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"TextEditor.d.ts","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"],"mappings":";;;;;cA+Fa,SAAA;AAAA,KA2ID,eAAA;EACV,UAAA,EAAY,UAAA;EACZ,OAAA,EAAS,OAAA;EACT,OAAA,EAAS,WAAA;EACT,UAAA;EACA,aAAA,IAAiB,OAAA,aAAoB,SAAA;EACrC,eAAA,IAAmB,QAAA;AAAA;AAAA,cAqsBR,UAAA,kBAAU,oBAAA,CAAA,eAAA;AAAA,cA8MV,mBAAA,kBAAmB,oBAAA,CAAA,eAAA"}
|
|
@@ -4,8 +4,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
4
4
|
//#region src/components/Input/Checkbox.d.ts
|
|
5
5
|
declare const checkboxVariants: (props?: {
|
|
6
6
|
variant?: "default";
|
|
7
|
-
size?: "
|
|
8
|
-
color?: "
|
|
7
|
+
size?: "xs" | "sm" | "md" | "lg";
|
|
8
|
+
color?: "error" | "success" | "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "custom" | "text-inverse";
|
|
9
9
|
validationStyleEnabled?: "enabled" | "disabled";
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
11
11
|
declare enum CheckboxSize {
|
|
@@ -52,10 +52,10 @@ declare enum LinkUnderlined {
|
|
|
52
52
|
FALSE = "false"
|
|
53
53
|
}
|
|
54
54
|
declare const linkVariants: (props?: {
|
|
55
|
-
variant?: "
|
|
56
|
-
roundedSize?: "
|
|
57
|
-
color?: "text" | "primary" | "
|
|
58
|
-
size?: "
|
|
55
|
+
variant?: "default" | "invisible-link" | "hoverable" | "button" | "button-outlined";
|
|
56
|
+
roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
|
|
57
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "error" | "custom" | "text-inverse" | "success";
|
|
58
|
+
size?: "sm" | "md" | "lg" | "xl" | "custom";
|
|
59
59
|
underlined?: boolean | LinkUnderlined.DEFAULT;
|
|
60
60
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
61
61
|
type LinkProps = DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & VariantProps<typeof linkVariants> & {
|
package/dist/types/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleSwitcherContentContext.d.ts","names":[],"sources":["../../../../src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"LocaleSwitcherContentContext.d.ts","names":[],"sources":["../../../../src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.tsx"],"mappings":";;;;KAeK,iCAAA;EACH,gBAAA,EAAkB,aAAA;EAClB,eAAA,EAAiB,aAAA;EACjB,kBAAA,EAAoB,QAAA,CAAS,cAAA,CAAe,aAAA;AAAA;AAAA,cAUjC,wBAAA,QAAwB,iCACK;AAAA,KAErC,kCAAA;EACH,gBAAA,EAAkB,aAAA;EAClB,sBAAA,GAAyB,aAAa;AAAA;AAAA,cAG3B,6BAAA,EAA+B,EAAA,CAC1C,iBAAA,CAAkB,kCAAA"}
|
|
@@ -4,8 +4,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
4
4
|
//#region src/components/Pagination/Pagination.d.ts
|
|
5
5
|
declare const paginationVariants: (props?: {
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
|
-
color?: "
|
|
8
|
-
variant?: "default" | "
|
|
7
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral";
|
|
8
|
+
variant?: "default" | "bordered" | "ghost";
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
10
10
|
declare enum PaginationSize {
|
|
11
11
|
SM = "sm",
|
|
@@ -40,7 +40,7 @@ declare const switchSelectorVariant: (props?: {
|
|
|
40
40
|
disabled?: boolean;
|
|
41
41
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
42
42
|
declare const choiceVariant: (props?: {
|
|
43
|
-
size?: "
|
|
43
|
+
size?: "xs" | "sm" | "md" | "lg";
|
|
44
44
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
45
45
|
declare const indicatorVariant: (props?: {
|
|
46
46
|
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
|
|
@@ -7,7 +7,7 @@ declare const verticalSwitchSelectorVariant: (props?: {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
9
9
|
declare const verticalChoiceVariant: (props?: {
|
|
10
|
-
size?: "
|
|
10
|
+
size?: "sm" | "md" | "lg";
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
12
12
|
type VerticalSwitchSelectorProps<T = boolean> = SwitchSelectorBaseProps<T> & VariantProps<typeof verticalSwitchSelectorVariant> & VariantProps<typeof verticalChoiceVariant>;
|
|
13
13
|
/**
|
|
@@ -3,8 +3,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/Tab/Tab.d.ts
|
|
5
5
|
declare const tabContainerVariant: (props?: {
|
|
6
|
-
background?: "
|
|
7
|
-
variant?: "default" | "
|
|
6
|
+
background?: "with" | "without";
|
|
7
|
+
variant?: "default" | "bordered" | "ghost";
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
9
9
|
type TabProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof tabContainerVariant> & {
|
|
10
10
|
defaultTab?: string;
|
|
@@ -13,7 +13,7 @@ declare enum TabSelectorColor {
|
|
|
13
13
|
TEXT = "text"
|
|
14
14
|
}
|
|
15
15
|
declare const tabSelectorVariant: (props?: {
|
|
16
|
-
color?: "
|
|
16
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
|
|
17
17
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
18
18
|
type TabSelectorItemProps = HTMLAttributes<HTMLElement> & {
|
|
19
19
|
key: string | number;
|
|
@@ -184,9 +184,9 @@ declare enum TagBackground {
|
|
|
184
184
|
WITH = "with"
|
|
185
185
|
}
|
|
186
186
|
declare const containerVariants: (props?: {
|
|
187
|
-
roundedSize?: "
|
|
188
|
-
color?: "text" | "primary" | "
|
|
189
|
-
size?: "
|
|
187
|
+
roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
|
|
188
|
+
color?: "text" | "primary" | "neutral" | "error" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
|
|
189
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
190
190
|
border?: "none" | "with";
|
|
191
191
|
background?: "none" | "with";
|
|
192
192
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
@@ -24,7 +24,7 @@ declare const ToastViewport: FC<ComponentProps<typeof ToastPrimitives.Viewport>>
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
declare const toastVariants: (props?: {
|
|
27
|
-
variant?: "error" | "
|
|
27
|
+
variant?: "error" | "default" | "success";
|
|
28
28
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
29
29
|
/**
|
|
30
30
|
* Toast Component
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/design-system",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0-canary.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
|
|
6
6
|
"keywords": [
|
|
@@ -421,12 +421,12 @@
|
|
|
421
421
|
"dependencies": {
|
|
422
422
|
"@better-auth/passkey": "1.6.11",
|
|
423
423
|
"@better-auth/sso": "1.6.11",
|
|
424
|
-
"@intlayer/api": "8.
|
|
425
|
-
"@intlayer/config": "8.
|
|
426
|
-
"@intlayer/core": "8.
|
|
427
|
-
"@intlayer/dictionaries-entry": "8.
|
|
428
|
-
"@intlayer/editor-react": "8.
|
|
429
|
-
"@intlayer/types": "8.
|
|
424
|
+
"@intlayer/api": "8.10.0-canary.0",
|
|
425
|
+
"@intlayer/config": "8.10.0-canary.0",
|
|
426
|
+
"@intlayer/core": "8.10.0-canary.0",
|
|
427
|
+
"@intlayer/dictionaries-entry": "8.10.0-canary.0",
|
|
428
|
+
"@intlayer/editor-react": "8.10.0-canary.0",
|
|
429
|
+
"@intlayer/types": "8.10.0-canary.0",
|
|
430
430
|
"@radix-ui/react-dialog": "1.1.15",
|
|
431
431
|
"@radix-ui/react-select": "2.2.6",
|
|
432
432
|
"@radix-ui/react-slot": "1.2.4",
|
|
@@ -441,12 +441,12 @@
|
|
|
441
441
|
"defu": "6.1.7",
|
|
442
442
|
"dompurify": "^3.4.3",
|
|
443
443
|
"isomorphic-dompurify": "^3.13.0",
|
|
444
|
-
"react-intlayer": "8.
|
|
444
|
+
"react-intlayer": "8.10.0-canary.0",
|
|
445
445
|
"rollup-preserve-directives": "1.1.3",
|
|
446
446
|
"zod": "4.4.3"
|
|
447
447
|
},
|
|
448
448
|
"devDependencies": {
|
|
449
|
-
"@intlayer/backend": "8.
|
|
449
|
+
"@intlayer/backend": "8.10.0-canary.0",
|
|
450
450
|
"@shikijs/transformers": "4.0.2",
|
|
451
451
|
"@storybook/addon-a11y": "8.6.14",
|
|
452
452
|
"@storybook/addon-essentials": "8.6.14",
|
|
@@ -470,14 +470,14 @@
|
|
|
470
470
|
"@testing-library/user-event": "14.6.1",
|
|
471
471
|
"@types/dompurify": "^3.2.0",
|
|
472
472
|
"@types/espree": "11.1.0",
|
|
473
|
-
"@types/node": "25.
|
|
473
|
+
"@types/node": "25.9.0",
|
|
474
474
|
"@types/react": "19.2.14",
|
|
475
475
|
"@types/react-dom": "19.2.3",
|
|
476
476
|
"@utils/ts-config": "1.0.4",
|
|
477
477
|
"@utils/ts-config-types": "1.0.4",
|
|
478
478
|
"clsx": "2.1.1",
|
|
479
479
|
"fast-glob": "3.3.3",
|
|
480
|
-
"intlayer": "8.
|
|
480
|
+
"intlayer": "8.10.0-canary.0",
|
|
481
481
|
"rimraf": "6.1.3",
|
|
482
482
|
"shiki": "4.0.2",
|
|
483
483
|
"storybook": "8.6.17",
|
|
@@ -485,26 +485,26 @@
|
|
|
485
485
|
"tsdown": "0.22.00",
|
|
486
486
|
"typescript": "6.0.3",
|
|
487
487
|
"vite": "8.0.13",
|
|
488
|
-
"vite-intlayer": "8.
|
|
488
|
+
"vite-intlayer": "8.10.0-canary.0",
|
|
489
489
|
"vite-plugin-dts": "5.0.0",
|
|
490
490
|
"vitest": "4.1.6"
|
|
491
491
|
},
|
|
492
492
|
"peerDependencies": {
|
|
493
493
|
"@better-fetch/fetch": "1.1.21",
|
|
494
494
|
"@hookform/resolvers": "5.2.2",
|
|
495
|
-
"@intlayer/backend": "8.
|
|
495
|
+
"@intlayer/backend": "8.10.0-canary.0",
|
|
496
496
|
"@monaco-editor/react": "4.7.0",
|
|
497
497
|
"@shikijs/transformers": "4.0.2",
|
|
498
|
-
"@tanstack/react-query": "5.100.
|
|
498
|
+
"@tanstack/react-query": "5.100.11",
|
|
499
499
|
"@tanstack/react-query-devtools": "5.100.10",
|
|
500
|
-
"framer-motion": "12.
|
|
500
|
+
"framer-motion": "12.39.0",
|
|
501
501
|
"fuse.js": "7.3.0",
|
|
502
|
-
"intlayer": "8.
|
|
502
|
+
"intlayer": "8.10.0-canary.0",
|
|
503
503
|
"lucide-react": "1.16.0",
|
|
504
504
|
"react": ">=16.0.0",
|
|
505
505
|
"react-dom": ">=16.0.0",
|
|
506
506
|
"react-hook-form": "7.76.0",
|
|
507
|
-
"react-intlayer": "8.
|
|
507
|
+
"react-intlayer": "8.10.0-canary.0",
|
|
508
508
|
"shiki": "4.0.2",
|
|
509
509
|
"tailwindcss": "4.3.0"
|
|
510
510
|
},
|