@keboola/design 11.0.0 → 11.2.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/AGENTS.md +16 -1
- package/CHANGELOG.md +2138 -0
- package/COMPONENT-API.md +40 -1
- package/dist/AIKit-DiS0CVOW.js +1320 -0
- package/dist/AIKit-DiS0CVOW.js.map +1 -0
- package/dist/Alert-DfZq9kGe.js +133 -0
- package/dist/Alert-DfZq9kGe.js.map +1 -0
- package/dist/AlertModal-Dp_XuJBW.js +219 -0
- package/dist/AlertModal-Dp_XuJBW.js.map +1 -0
- package/dist/AppShell-B5GQN6Zs.js +143 -0
- package/dist/AppShell-B5GQN6Zs.js.map +1 -0
- package/dist/AutoSaveTextarea-BeuWuszr.js +58 -0
- package/dist/{chunk-UGT6DKWM.js.map → AutoSaveTextarea-BeuWuszr.js.map} +1 -1
- package/dist/Badge-Ch26CXoP.js +195 -0
- package/dist/Badge-Ch26CXoP.js.map +1 -0
- package/dist/BrandEditor-DyzgfVkl.js +903 -0
- package/dist/BrandEditor-DyzgfVkl.js.map +1 -0
- package/dist/BrandLogo-CJkRd0F8.js +46 -0
- package/dist/BrandLogo-CJkRd0F8.js.map +1 -0
- package/dist/Breadcrumb-Frst8MTA.js +330 -0
- package/dist/Breadcrumb-Frst8MTA.js.map +1 -0
- package/dist/Button-6xBX0nNl.js +391 -0
- package/dist/Button-6xBX0nNl.js.map +1 -0
- package/dist/Calendar-cG5NIJ4O.js +6768 -0
- package/dist/Calendar-cG5NIJ4O.js.map +1 -0
- package/dist/Card-BAoZ35CV.js +105 -0
- package/dist/Card-BAoZ35CV.js.map +1 -0
- package/dist/Checkbox-GJ8-srt4.js +97 -0
- package/dist/Checkbox-GJ8-srt4.js.map +1 -0
- package/dist/Clipboard-CBJZiviP.js +58 -0
- package/dist/Clipboard-CBJZiviP.js.map +1 -0
- package/dist/ClipboardButton-ClcluT0C.js +43 -0
- package/dist/ClipboardButton-ClcluT0C.js.map +1 -0
- package/dist/CodeEditor-DyaN-Ij2.js +1000 -0
- package/dist/CodeEditor-DyaN-Ij2.js.map +1 -0
- package/dist/Collapsible-BQXWEOBC.js +34 -0
- package/dist/Collapsible-BQXWEOBC.js.map +1 -0
- package/dist/ColorInput-B8z4j4Y_.js +180 -0
- package/dist/ColorInput-B8z4j4Y_.js.map +1 -0
- package/dist/ColorModeSwitch-dZFZyqy1.js +77 -0
- package/dist/ColorModeSwitch-dZFZyqy1.js.map +1 -0
- package/dist/Combobox-Dgm6Z4ib.js +443 -0
- package/dist/Combobox-Dgm6Z4ib.js.map +1 -0
- package/dist/Command-C0aZfVTq.js +102 -0
- package/dist/Command-C0aZfVTq.js.map +1 -0
- package/dist/CopyField-BJ96zvXs.js +322 -0
- package/dist/CopyField-BJ96zvXs.js.map +1 -0
- package/dist/DateInput-B3UdzRfW.js +141 -0
- package/dist/DateInput-B3UdzRfW.js.map +1 -0
- package/dist/DatePicker-Dw3DpbUh.js +24 -0
- package/dist/DatePicker-Dw3DpbUh.js.map +1 -0
- package/dist/DateRangeInput-DTuySEiq.js +139 -0
- package/dist/DateRangeInput-DTuySEiq.js.map +1 -0
- package/dist/DateRangePicker-DCmMHg4s.js +159 -0
- package/dist/DateRangePicker-DCmMHg4s.js.map +1 -0
- package/dist/DiagramSkeleton-lwBS2YBa.js +11 -0
- package/dist/DiagramSkeleton-lwBS2YBa.js.map +1 -0
- package/dist/DiffView-ppTIzh2h.js +429 -0
- package/dist/DiffView-ppTIzh2h.js.map +1 -0
- package/dist/DropdownMenu-t90tVw6l.js +327 -0
- package/dist/DropdownMenu-t90tVw6l.js.map +1 -0
- package/dist/FieldBox-D7DYtX_m.js +70 -0
- package/dist/FieldBox-D7DYtX_m.js.map +1 -0
- package/dist/FieldItem-CAPj9lj3.d.ts +111 -0
- package/dist/FieldItem-D-h1NeBo.js +108 -0
- package/dist/FieldItem-D-h1NeBo.js.map +1 -0
- package/dist/FileUpload-BRv0TaZk.js +2527 -0
- package/dist/FileUpload-BRv0TaZk.js.map +1 -0
- package/dist/Form-DHvcFoEi.js +311 -0
- package/dist/Form-DHvcFoEi.js.map +1 -0
- package/dist/FormGroup-C41n65cE.js +124 -0
- package/dist/FormGroup-C41n65cE.js.map +1 -0
- package/dist/FullScreenModal-Cb3PGgh4.js +96 -0
- package/dist/FullScreenModal-Cb3PGgh4.js.map +1 -0
- package/dist/HoverCard-WfDkLK1s.js +31 -0
- package/dist/HoverCard-WfDkLK1s.js.map +1 -0
- package/dist/InputGroup-CdTq8H7c.js +292 -0
- package/dist/InputGroup-CdTq8H7c.js.map +1 -0
- package/dist/Kbd-CxHAo1oo.js +111 -0
- package/dist/Kbd-CxHAo1oo.js.map +1 -0
- package/dist/MarkedText-Ckbft5mw.js +44 -0
- package/dist/MarkedText-Ckbft5mw.js.map +1 -0
- package/dist/MermaidDiagram-ChL3WIQT.js +399 -0
- package/dist/MermaidDiagram-ChL3WIQT.js.map +1 -0
- package/dist/Modal-wqG8nJiK.js +185 -0
- package/dist/Modal-wqG8nJiK.js.map +1 -0
- package/dist/ModalTitle-C76ke2eo.js +28 -0
- package/dist/ModalTitle-C76ke2eo.js.map +1 -0
- package/dist/MultiActionButtonGroup-BiIIubiL.js +33 -0
- package/dist/MultiActionButtonGroup-BiIIubiL.js.map +1 -0
- package/dist/Navbar-BfaPeLUL.js +325 -0
- package/dist/Navbar-BfaPeLUL.js.map +1 -0
- package/dist/OtpInput-CbbymqYs.js +93 -0
- package/dist/OtpInput-CbbymqYs.js.map +1 -0
- package/dist/PageHeader-Q3IpCnQd.js +177 -0
- package/dist/PageHeader-Q3IpCnQd.js.map +1 -0
- package/dist/PageLayout-DSVM-ASz.js +176 -0
- package/dist/PageLayout-DSVM-ASz.js.map +1 -0
- package/dist/PageToolbar-OQg3mPF-.js +153 -0
- package/dist/PageToolbar-OQg3mPF-.js.map +1 -0
- package/dist/Pagination-Cjfda8KG.js +70 -0
- package/dist/Pagination-Cjfda8KG.js.map +1 -0
- package/dist/Popconfirm-D7_vfxFd.js +167 -0
- package/dist/Popconfirm-D7_vfxFd.js.map +1 -0
- package/dist/Popover-CzeHjvrB.js +85 -0
- package/dist/Popover-CzeHjvrB.js.map +1 -0
- package/dist/RadioGroup-sIveSsNa.js +233 -0
- package/dist/RadioGroup-sIveSsNa.js.map +1 -0
- package/dist/Resizable-D3vYToZH.js +52 -0
- package/dist/Resizable-D3vYToZH.js.map +1 -0
- package/dist/Search-3UiqNZRj.js +184 -0
- package/dist/Search-3UiqNZRj.js.map +1 -0
- package/dist/SearchInput-C7dF_Ir-.js +102 -0
- package/dist/SearchInput-C7dF_Ir-.js.map +1 -0
- package/dist/SectionNav-8NoTOKO8.js +276 -0
- package/dist/SectionNav-8NoTOKO8.js.map +1 -0
- package/dist/Select-Is0VkePH.js +181 -0
- package/dist/Select-Is0VkePH.js.map +1 -0
- package/dist/Sheet-Dw9BDvjI.js +169 -0
- package/dist/Sheet-Dw9BDvjI.js.map +1 -0
- package/dist/Sidebar-Dcb4rinA.js +799 -0
- package/dist/Sidebar-Dcb4rinA.js.map +1 -0
- package/dist/Slider-BOPfMOMm.js +127 -0
- package/dist/Slider-BOPfMOMm.js.map +1 -0
- package/dist/Stepper-C8sm9ZFM.js +325 -0
- package/dist/Stepper-C8sm9ZFM.js.map +1 -0
- package/dist/Switch-CX2A0v50.js +201 -0
- package/dist/Switch-CX2A0v50.js.map +1 -0
- package/dist/Table-CvYuTuNU.js +104 -0
- package/dist/Table-CvYuTuNU.js.map +1 -0
- package/dist/Tabs-UMQuDoW8.js +74 -0
- package/dist/Tabs-UMQuDoW8.js.map +1 -0
- package/dist/TextInput-CMuN1WfY.js +110 -0
- package/dist/TextInput-CMuN1WfY.js.map +1 -0
- package/dist/ThemeProvider-QncUrfJn.js +203 -0
- package/dist/ThemeProvider-QncUrfJn.js.map +1 -0
- package/dist/TimePicker-D9zktB8A.js +98 -0
- package/dist/TimePicker-D9zktB8A.js.map +1 -0
- package/dist/Timeline-6btyJl4D.js +154 -0
- package/dist/Timeline-6btyJl4D.js.map +1 -0
- package/dist/Toast-DQSbs3oA.js +49 -0
- package/dist/Toast-DQSbs3oA.js.map +1 -0
- package/dist/ToggleGroup-Cy_10Mvu.js +47 -0
- package/dist/ToggleGroup-Cy_10Mvu.js.map +1 -0
- package/dist/Workbench-BzE-Vvd9.js +293 -0
- package/dist/Workbench-BzE-Vvd9.js.map +1 -0
- package/dist/ZoomableSvg-CZEu6sAq.js +248 -0
- package/dist/ZoomableSvg-CZEu6sAq.js.map +1 -0
- package/dist/charts.d.ts +110 -103
- package/dist/charts.js +303 -254
- package/dist/charts.js.map +1 -1
- package/dist/classNames-BzrkDnOD.js +9 -0
- package/dist/classNames-BzrkDnOD.js.map +1 -0
- package/dist/context-KxxeMHbR.js +62 -0
- package/dist/context-KxxeMHbR.js.map +1 -0
- package/dist/editors.d.ts +244 -175
- package/dist/editors.js +802 -428
- package/dist/editors.js.map +1 -1
- package/dist/escapeStringRegexp-8MxP2knR.js +6 -0
- package/dist/escapeStringRegexp-8MxP2knR.js.map +1 -0
- package/dist/icons-Cek151jC.js +640 -0
- package/dist/icons-Cek151jC.js.map +1 -0
- package/dist/icons.d.ts +2 -41
- package/dist/icons.js +2 -9
- package/dist/index-m-kQEWiY.d.ts +54 -0
- package/dist/index.d.ts +6191 -9891
- package/dist/index.js +113 -124
- package/dist/internal/blocks/AIKit.js +2 -30
- package/dist/internal/blocks/AppShell.js +2 -11
- package/dist/internal/blocks/AutoSaveTextarea.js +2 -14
- package/dist/internal/blocks/BrandEditor.js +2 -23
- package/dist/internal/blocks/ChartPanel.js +45 -9
- package/dist/internal/blocks/ChartPanel.js.map +1 -1
- package/dist/internal/blocks/ClipboardButton.js +2 -12
- package/dist/internal/blocks/ColorInput.js +2 -13
- package/dist/internal/blocks/ColorModeSwitch.js +2 -13
- package/dist/internal/blocks/Command.js +2 -15
- package/dist/internal/blocks/CopyField.js +2 -11
- package/dist/internal/blocks/DashboardHero.js +58 -8
- package/dist/internal/blocks/DashboardHero.js.map +1 -1
- package/dist/internal/blocks/DateInput.js +2 -16
- package/dist/internal/blocks/DateRangeInput.js +2 -16
- package/dist/internal/blocks/EmptyConfigurationActionCard.js +15 -9
- package/dist/internal/blocks/EmptyConfigurationActionCard.js.map +1 -1
- package/dist/internal/blocks/EmptyState.js +141 -3
- package/dist/internal/blocks/EmptyState.js.map +1 -1
- package/dist/internal/blocks/ErrorState.js +178 -4
- package/dist/internal/blocks/ErrorState.js.map +1 -1
- package/dist/internal/blocks/ExportMenu.js +40 -12
- package/dist/internal/blocks/ExportMenu.js.map +1 -1
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +56 -0
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js.map +1 -0
- package/dist/internal/blocks/Form.js +2 -29
- package/dist/internal/blocks/FormGroup.js +2 -18
- package/dist/internal/blocks/GoogleButton.js +94 -9
- package/dist/internal/blocks/GoogleButton.js.map +1 -1
- package/dist/internal/blocks/MicrosoftButton.js +63 -9
- package/dist/internal/blocks/MicrosoftButton.js.map +1 -1
- package/dist/internal/blocks/MultiActionButtonGroup.js +2 -12
- package/dist/internal/blocks/MultiCombobox.js +192 -13
- package/dist/internal/blocks/MultiCombobox.js.map +1 -1
- package/dist/internal/blocks/NumberInput.js +43 -11
- package/dist/internal/blocks/NumberInput.js.map +1 -1
- package/dist/internal/blocks/OtpInput.js +2 -10
- package/dist/internal/blocks/PageHeader.js +2 -9
- package/dist/internal/blocks/PageLayout.js +2 -9
- package/dist/internal/blocks/PageToolbar.js +2 -13
- package/dist/internal/blocks/PasswordInput.js +96 -12
- package/dist/internal/blocks/PasswordInput.js.map +1 -1
- package/dist/internal/blocks/SearchInput.js +2 -12
- package/dist/internal/blocks/SearchInputWithNavigation.js +64 -15
- package/dist/internal/blocks/SearchInputWithNavigation.js.map +1 -1
- package/dist/internal/blocks/SectionNav.js +2 -15
- package/dist/internal/blocks/SplitButton.js +45 -13
- package/dist/internal/blocks/SplitButton.js.map +1 -1
- package/dist/internal/blocks/StatCard.js +96 -9
- package/dist/internal/blocks/StatCard.js.map +1 -1
- package/dist/internal/blocks/TextInput.js +2 -13
- package/dist/internal/blocks/Textarea.js +31 -12
- package/dist/internal/blocks/Textarea.js.map +1 -1
- package/dist/internal/blocks/TimeInput.js +76 -16
- package/dist/internal/blocks/TimeInput.js.map +1 -1
- package/dist/internal/components/Alert.js +2 -11
- package/dist/internal/components/AlertModal.js +2 -11
- package/dist/internal/components/Avatar.js +52 -8
- package/dist/internal/components/Avatar.js.map +1 -1
- package/dist/internal/components/Badge.js +2 -9
- package/dist/internal/components/BrandLogo.js +2 -11
- package/dist/internal/components/Breadcrumb.js +2 -14
- package/dist/internal/components/Button.js +2 -10
- package/dist/internal/components/ButtonGroup.js +65 -8
- package/dist/internal/components/ButtonGroup.js.map +1 -1
- package/dist/internal/components/Calendar.js +2 -9
- package/dist/internal/components/Card.js +2 -9
- package/dist/internal/components/Checkbox.js +2 -11
- package/dist/internal/components/Clipboard.js +2 -9
- package/dist/internal/components/Collapsible.js +2 -9
- package/dist/internal/components/CollapsiblePanel.js +86 -10
- package/dist/internal/components/CollapsiblePanel.js.map +1 -1
- package/dist/internal/components/Combobox.js +2 -13
- package/dist/internal/components/DatePicker.js +2 -11
- package/dist/internal/components/DateRangePicker.js +2 -17
- package/dist/internal/components/DiffView.js +2 -9
- package/dist/internal/components/DotsLoader.js +17 -4
- package/dist/internal/components/DotsLoader.js.map +1 -1
- package/dist/internal/components/DropdownMenu.js +2 -11
- package/dist/internal/components/EmptySearchContent.js +11 -3
- package/dist/internal/components/EmptySearchContent.js.map +1 -1
- package/dist/internal/components/FileUpload.js +2 -11
- package/dist/internal/components/FullScreenModal.js +2 -12
- package/dist/internal/components/HelpBlock.js +24 -3
- package/dist/internal/components/HelpBlock.js.map +1 -1
- package/dist/internal/components/HoverCard.js +2 -9
- package/dist/internal/components/InputGroup.js +2 -11
- package/dist/internal/components/Kbd.js +2 -9
- package/dist/internal/components/Label.js +38 -8
- package/dist/internal/components/Label.js.map +1 -1
- package/dist/internal/components/Link.js +21 -8
- package/dist/internal/components/Link.js.map +1 -1
- package/dist/internal/components/MarkedText.js +2 -5
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +19 -9
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js.map +1 -1
- package/dist/internal/components/MergeEditor/PaneHeader.js +12 -3
- package/dist/internal/components/MergeEditor/PaneHeader.js.map +1 -1
- package/dist/internal/components/MergeEditor/constants.js +17 -3
- package/dist/internal/components/MergeEditor/constants.js.map +1 -1
- package/dist/internal/components/MergeEditor/useMergeDiff.js +2 -5
- package/dist/internal/components/Modal.js +2 -13
- package/dist/internal/components/Navbar.js +2 -14
- package/dist/internal/components/Pagination.js +2 -11
- package/dist/internal/components/PanelWithDetails.js +30 -10
- package/dist/internal/components/PanelWithDetails.js.map +1 -1
- package/dist/internal/components/Popconfirm.js +2 -12
- package/dist/internal/components/Popover.js +2 -9
- package/dist/internal/components/Progress.js +46 -8
- package/dist/internal/components/Progress.js.map +1 -1
- package/dist/internal/components/RadioGroup.js +2 -12
- package/dist/internal/components/Resizable.js +2 -9
- package/dist/internal/components/ScrollArea.js +41 -8
- package/dist/internal/components/ScrollArea.js.map +1 -1
- package/dist/internal/components/Search.js +2 -10
- package/dist/internal/components/Select.js +2 -12
- package/dist/internal/components/Separator.js +83 -8
- package/dist/internal/components/Separator.js.map +1 -1
- package/dist/internal/components/Sheet.js +2 -12
- package/dist/internal/components/Sidebar.js +2 -20
- package/dist/internal/components/Skeleton/Skeleton.js +38 -8
- package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/internal/components/Skeleton/SkeletonList.js +40 -9
- package/dist/internal/components/Skeleton/SkeletonList.js.map +1 -1
- package/dist/internal/components/Slider.js +2 -11
- package/dist/internal/components/SpotlightBackdrop.js +131 -8
- package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
- package/dist/internal/components/Stepper.js +2 -10
- package/dist/internal/components/Switch.js +2 -10
- package/dist/internal/components/Table.js +2 -10
- package/dist/internal/components/Tabs.js +2 -12
- package/dist/internal/components/ThemeProvider.js +3 -10
- package/dist/internal/components/TimePicker.js +2 -12
- package/dist/internal/components/Timeline.js +2 -10
- package/dist/internal/components/Toast.js +3 -11
- package/dist/internal/components/Toggle.js +168 -8
- package/dist/internal/components/Toggle.js.map +1 -1
- package/dist/internal/components/ToggleGroup.js +2 -9
- package/dist/internal/components/Tooltip.js +2 -8
- package/dist/internal/components/Truncated.js +44 -8
- package/dist/internal/components/Truncated.js.map +1 -1
- package/dist/internal/components/Workbench.js +2 -11
- package/dist/internal/components/ZoomableSvg.js +2 -13
- package/dist/internal/hooks/useAutosizeInput.js +76 -3
- package/dist/internal/hooks/useAutosizeInput.js.map +1 -1
- package/dist/internal/hooks/useScrollbarPosition.js +44 -4
- package/dist/internal/hooks/useScrollbarPosition.js.map +1 -1
- package/dist/internal/hooks/useStableCallback.js +28 -3
- package/dist/internal/hooks/useStableCallback.js.map +1 -1
- package/dist/internal/utils/mergeRefs.js +19 -3
- package/dist/internal/utils/mergeRefs.js.map +1 -1
- package/dist/internal/utils.js +5 -8
- package/dist/markdown-editor.d.ts +72 -72
- package/dist/markdown-editor.js +1122 -1207
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.d.ts +12 -12
- package/dist/mermaid.js +2 -18
- package/dist/rjsf.d.ts +45 -34
- package/dist/rjsf.js +1601 -1671
- package/dist/rjsf.js.map +1 -1
- package/dist/rolldown-runtime-Bdc48AWt.js +33 -0
- package/dist/styles-DSUP_-9Z.js +158 -0
- package/dist/styles-DSUP_-9Z.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/testing.d.ts +8 -7
- package/dist/testing.js +36 -21
- package/dist/testing.js.map +1 -1
- package/dist/themeTokens-BNg98Mu9.js +85 -0
- package/dist/themeTokens-BNg98Mu9.js.map +1 -0
- package/dist/toast-CjkURw0M.js +184 -0
- package/dist/toast-CjkURw0M.js.map +1 -0
- package/dist/useColorSchemeState-CYqcUfSH.js +61 -0
- package/dist/useColorSchemeState-CYqcUfSH.js.map +1 -0
- package/dist/useControllableState-M6494mCT.js +31 -0
- package/dist/useControllableState-M6494mCT.js.map +1 -0
- package/dist/useElement-DkF6esWL.js +15 -0
- package/dist/useElement-DkF6esWL.js.map +1 -0
- package/dist/useMergeDiff-CvowEXJ1.js +465 -0
- package/dist/useMergeDiff-CvowEXJ1.js.map +1 -0
- package/dist/utils-D0c5VAyF.js +308 -0
- package/dist/utils-D0c5VAyF.js.map +1 -0
- package/package.json +11 -10
- package/dist/MermaidDiagram-ZU5KAVRT.js +0 -18
- package/dist/MermaidDiagram-ZU5KAVRT.js.map +0 -1
- package/dist/chunk-2YYJDKSP.js +0 -51
- package/dist/chunk-2YYJDKSP.js.map +0 -1
- package/dist/chunk-3P5UUCFI.js +0 -385
- package/dist/chunk-3P5UUCFI.js.map +0 -1
- package/dist/chunk-3QDFDDWZ.js +0 -99
- package/dist/chunk-3QDFDDWZ.js.map +0 -1
- package/dist/chunk-3W27OLK5.js +0 -15
- package/dist/chunk-3W27OLK5.js.map +0 -1
- package/dist/chunk-4FIZZONW.js +0 -40
- package/dist/chunk-4FIZZONW.js.map +0 -1
- package/dist/chunk-4GIAXOJG.js +0 -133
- package/dist/chunk-4GIAXOJG.js.map +0 -1
- package/dist/chunk-52NDNMK7.js +0 -99
- package/dist/chunk-52NDNMK7.js.map +0 -1
- package/dist/chunk-576G5OES.js +0 -201
- package/dist/chunk-576G5OES.js.map +0 -1
- package/dist/chunk-5AIE6SET.js +0 -659
- package/dist/chunk-5AIE6SET.js.map +0 -1
- package/dist/chunk-5FTNAZRW.js +0 -327
- package/dist/chunk-5FTNAZRW.js.map +0 -1
- package/dist/chunk-5IG2S7ZY.js +0 -70
- package/dist/chunk-5IG2S7ZY.js.map +0 -1
- package/dist/chunk-5QCXHNCW.js +0 -404
- package/dist/chunk-5QCXHNCW.js.map +0 -1
- package/dist/chunk-6DUMGC7Y.js +0 -105
- package/dist/chunk-6DUMGC7Y.js.map +0 -1
- package/dist/chunk-6J25CVST.js +0 -174
- package/dist/chunk-6J25CVST.js.map +0 -1
- package/dist/chunk-6NN35XOP.js +0 -120
- package/dist/chunk-6NN35XOP.js.map +0 -1
- package/dist/chunk-6NZBVA4T.js +0 -24
- package/dist/chunk-6NZBVA4T.js.map +0 -1
- package/dist/chunk-6W5BHRCL.js +0 -295
- package/dist/chunk-6W5BHRCL.js.map +0 -1
- package/dist/chunk-72BKRCEG.js +0 -409
- package/dist/chunk-72BKRCEG.js.map +0 -1
- package/dist/chunk-7GTI3PPI.js +0 -95
- package/dist/chunk-7GTI3PPI.js.map +0 -1
- package/dist/chunk-7P6PLZ4B.js +0 -74
- package/dist/chunk-7P6PLZ4B.js.map +0 -1
- package/dist/chunk-7WZWY5IA.js +0 -46
- package/dist/chunk-7WZWY5IA.js.map +0 -1
- package/dist/chunk-AIYO2632.js +0 -489
- package/dist/chunk-AIYO2632.js.map +0 -1
- package/dist/chunk-ANFZWPNE.js +0 -112
- package/dist/chunk-ANFZWPNE.js.map +0 -1
- package/dist/chunk-ANZTVAJU.js +0 -73
- package/dist/chunk-ANZTVAJU.js.map +0 -1
- package/dist/chunk-BD5BTJKX.js +0 -166
- package/dist/chunk-BD5BTJKX.js.map +0 -1
- package/dist/chunk-BHGIDSRJ.js +0 -140
- package/dist/chunk-BHGIDSRJ.js.map +0 -1
- package/dist/chunk-BSQWZITZ.js +0 -507
- package/dist/chunk-BSQWZITZ.js.map +0 -1
- package/dist/chunk-D3LAIK62.js +0 -23
- package/dist/chunk-D3LAIK62.js.map +0 -1
- package/dist/chunk-DODCR43C.js +0 -155
- package/dist/chunk-DODCR43C.js.map +0 -1
- package/dist/chunk-EEK5NGZF.js +0 -40
- package/dist/chunk-EEK5NGZF.js.map +0 -1
- package/dist/chunk-ENRG7TXA.js +0 -11
- package/dist/chunk-ENRG7TXA.js.map +0 -1
- package/dist/chunk-EQRMGIGY.js +0 -239
- package/dist/chunk-EQRMGIGY.js.map +0 -1
- package/dist/chunk-ERAHK5YQ.js +0 -495
- package/dist/chunk-ERAHK5YQ.js.map +0 -1
- package/dist/chunk-F3FOFY2P.js +0 -124
- package/dist/chunk-F3FOFY2P.js.map +0 -1
- package/dist/chunk-F6BTWFOC.js +0 -507
- package/dist/chunk-F6BTWFOC.js.map +0 -1
- package/dist/chunk-F6J6NNAL.js +0 -34
- package/dist/chunk-F6J6NNAL.js.map +0 -1
- package/dist/chunk-FCHJ7D5O.js +0 -59
- package/dist/chunk-FCHJ7D5O.js.map +0 -1
- package/dist/chunk-FFJTEQCC.js +0 -80
- package/dist/chunk-FFJTEQCC.js.map +0 -1
- package/dist/chunk-FUFMVW7O.js +0 -64
- package/dist/chunk-FUFMVW7O.js.map +0 -1
- package/dist/chunk-FVPGQ6UE.js +0 -25
- package/dist/chunk-FVPGQ6UE.js.map +0 -1
- package/dist/chunk-G3PMV62Z.js +0 -33
- package/dist/chunk-G3PMV62Z.js.map +0 -1
- package/dist/chunk-GACFOW3E.js +0 -51
- package/dist/chunk-GACFOW3E.js.map +0 -1
- package/dist/chunk-GDT6HQMK.js +0 -42
- package/dist/chunk-GDT6HQMK.js.map +0 -1
- package/dist/chunk-HLGU22C6.js +0 -2589
- package/dist/chunk-HLGU22C6.js.map +0 -1
- package/dist/chunk-HPMYYGP7.js +0 -134
- package/dist/chunk-HPMYYGP7.js.map +0 -1
- package/dist/chunk-I2UCOD45.js +0 -197
- package/dist/chunk-I2UCOD45.js.map +0 -1
- package/dist/chunk-IEGDZUVM.js +0 -75
- package/dist/chunk-IEGDZUVM.js.map +0 -1
- package/dist/chunk-IIS7INHF.js +0 -47
- package/dist/chunk-IIS7INHF.js.map +0 -1
- package/dist/chunk-ITELSEFU.js +0 -256
- package/dist/chunk-ITELSEFU.js.map +0 -1
- package/dist/chunk-IXAYNBOY.js +0 -407
- package/dist/chunk-IXAYNBOY.js.map +0 -1
- package/dist/chunk-JUW2ETEI.js +0 -191
- package/dist/chunk-JUW2ETEI.js.map +0 -1
- package/dist/chunk-K65C7CVE.js +0 -127
- package/dist/chunk-K65C7CVE.js.map +0 -1
- package/dist/chunk-KDI64MCY.js +0 -189
- package/dist/chunk-KDI64MCY.js.map +0 -1
- package/dist/chunk-KN4ASMH5.js +0 -160
- package/dist/chunk-KN4ASMH5.js.map +0 -1
- package/dist/chunk-KQW7QNTU.js +0 -1549
- package/dist/chunk-KQW7QNTU.js.map +0 -1
- package/dist/chunk-KR7NXXHC.js +0 -66
- package/dist/chunk-KR7NXXHC.js.map +0 -1
- package/dist/chunk-KRZKIVMA.js +0 -142
- package/dist/chunk-KRZKIVMA.js.map +0 -1
- package/dist/chunk-KTTLLKGQ.js +0 -185
- package/dist/chunk-KTTLLKGQ.js.map +0 -1
- package/dist/chunk-KWKSHPDP.js +0 -234
- package/dist/chunk-KWKSHPDP.js.map +0 -1
- package/dist/chunk-KZVC7OYG.js +0 -57
- package/dist/chunk-KZVC7OYG.js.map +0 -1
- package/dist/chunk-L5DHUN2V.js +0 -204
- package/dist/chunk-L5DHUN2V.js.map +0 -1
- package/dist/chunk-LCTGEH57.js +0 -1376
- package/dist/chunk-LCTGEH57.js.map +0 -1
- package/dist/chunk-LXLIQ2D6.js +0 -12
- package/dist/chunk-LXLIQ2D6.js.map +0 -1
- package/dist/chunk-M4CTURKX.js +0 -84
- package/dist/chunk-M4CTURKX.js.map +0 -1
- package/dist/chunk-M6LTUPVP.js +0 -301
- package/dist/chunk-M6LTUPVP.js.map +0 -1
- package/dist/chunk-MA6RRHDT.js +0 -291
- package/dist/chunk-MA6RRHDT.js.map +0 -1
- package/dist/chunk-MODE4QIA.js +0 -6
- package/dist/chunk-MODE4QIA.js.map +0 -1
- package/dist/chunk-MVILMVGG.js +0 -118
- package/dist/chunk-MVILMVGG.js.map +0 -1
- package/dist/chunk-MWS4VCLV.js +0 -17
- package/dist/chunk-MWS4VCLV.js.map +0 -1
- package/dist/chunk-NEUX74SO.js +0 -315
- package/dist/chunk-NEUX74SO.js.map +0 -1
- package/dist/chunk-NFHKYBRD.js +0 -156
- package/dist/chunk-NFHKYBRD.js.map +0 -1
- package/dist/chunk-NHJNNXD3.js +0 -89
- package/dist/chunk-NHJNNXD3.js.map +0 -1
- package/dist/chunk-O2BF3HZL.js +0 -33
- package/dist/chunk-O2BF3HZL.js.map +0 -1
- package/dist/chunk-OANXCZYD.js +0 -212
- package/dist/chunk-OANXCZYD.js.map +0 -1
- package/dist/chunk-ODJF7YIP.js +0 -230
- package/dist/chunk-ODJF7YIP.js.map +0 -1
- package/dist/chunk-ON4BJTHI.js +0 -101
- package/dist/chunk-ON4BJTHI.js.map +0 -1
- package/dist/chunk-OTL5WXIJ.js +0 -16
- package/dist/chunk-OTL5WXIJ.js.map +0 -1
- package/dist/chunk-PACNBKJV.js +0 -47
- package/dist/chunk-PACNBKJV.js.map +0 -1
- package/dist/chunk-PROCA7K7.js +0 -23
- package/dist/chunk-PROCA7K7.js.map +0 -1
- package/dist/chunk-QGMIPA67.js +0 -85
- package/dist/chunk-QGMIPA67.js.map +0 -1
- package/dist/chunk-QQA37LFB.js +0 -190
- package/dist/chunk-QQA37LFB.js.map +0 -1
- package/dist/chunk-QZAWRSEB.js +0 -61
- package/dist/chunk-QZAWRSEB.js.map +0 -1
- package/dist/chunk-R74KGWNS.js +0 -699
- package/dist/chunk-R74KGWNS.js.map +0 -1
- package/dist/chunk-RFDLHMKL.js +0 -110
- package/dist/chunk-RFDLHMKL.js.map +0 -1
- package/dist/chunk-RL64HN7S.js +0 -40
- package/dist/chunk-RL64HN7S.js.map +0 -1
- package/dist/chunk-RMRQKPL7.js +0 -115
- package/dist/chunk-RMRQKPL7.js.map +0 -1
- package/dist/chunk-RQVK4IYC.js +0 -606
- package/dist/chunk-RQVK4IYC.js.map +0 -1
- package/dist/chunk-RTW56PWZ.js +0 -59
- package/dist/chunk-RTW56PWZ.js.map +0 -1
- package/dist/chunk-RUTPQNLR.js +0 -266
- package/dist/chunk-RUTPQNLR.js.map +0 -1
- package/dist/chunk-S6TAF63G.js +0 -25
- package/dist/chunk-S6TAF63G.js.map +0 -1
- package/dist/chunk-SBGAUGXY.js +0 -224
- package/dist/chunk-SBGAUGXY.js.map +0 -1
- package/dist/chunk-SC275NHZ.js +0 -407
- package/dist/chunk-SC275NHZ.js.map +0 -1
- package/dist/chunk-SCQPU4UE.js +0 -97
- package/dist/chunk-SCQPU4UE.js.map +0 -1
- package/dist/chunk-SFFF2WQP.js +0 -8
- package/dist/chunk-SFFF2WQP.js.map +0 -1
- package/dist/chunk-SJYMHZKA.js +0 -36
- package/dist/chunk-SJYMHZKA.js.map +0 -1
- package/dist/chunk-SLCCUJVN.js +0 -125
- package/dist/chunk-SLCCUJVN.js.map +0 -1
- package/dist/chunk-SVBSNSD4.js +0 -259
- package/dist/chunk-SVBSNSD4.js.map +0 -1
- package/dist/chunk-SVPLTL35.js +0 -62
- package/dist/chunk-SVPLTL35.js.map +0 -1
- package/dist/chunk-SWQFYNYG.js +0 -338
- package/dist/chunk-SWQFYNYG.js.map +0 -1
- package/dist/chunk-THHB4EWS.js +0 -72
- package/dist/chunk-THHB4EWS.js.map +0 -1
- package/dist/chunk-TUCDD33E.js +0 -246
- package/dist/chunk-TUCDD33E.js.map +0 -1
- package/dist/chunk-TV4WAP2R.js +0 -14
- package/dist/chunk-TV4WAP2R.js.map +0 -1
- package/dist/chunk-U3A6YBTZ.js +0 -134
- package/dist/chunk-U3A6YBTZ.js.map +0 -1
- package/dist/chunk-UGT6DKWM.js +0 -95
- package/dist/chunk-VSERHUWD.js +0 -212
- package/dist/chunk-VSERHUWD.js.map +0 -1
- package/dist/chunk-VYG7BDXC.js +0 -49
- package/dist/chunk-VYG7BDXC.js.map +0 -1
- package/dist/chunk-WETKNYZX.js +0 -52
- package/dist/chunk-WETKNYZX.js.map +0 -1
- package/dist/chunk-WGG4AML3.js +0 -216
- package/dist/chunk-WGG4AML3.js.map +0 -1
- package/dist/chunk-WKAUEL6I.js +0 -30
- package/dist/chunk-WKAUEL6I.js.map +0 -1
- package/dist/chunk-WPOLA5CG.js +0 -81
- package/dist/chunk-WPOLA5CG.js.map +0 -1
- package/dist/chunk-WPVETCGJ.js +0 -254
- package/dist/chunk-WPVETCGJ.js.map +0 -1
- package/dist/chunk-WTSM3A7E.js +0 -13
- package/dist/chunk-WTSM3A7E.js.map +0 -1
- package/dist/chunk-WU3F2K3T.js +0 -148
- package/dist/chunk-WU3F2K3T.js.map +0 -1
- package/dist/chunk-WZZK2DTZ.js +0 -39
- package/dist/chunk-WZZK2DTZ.js.map +0 -1
- package/dist/chunk-X4IHLKRD.js +0 -42
- package/dist/chunk-X4IHLKRD.js.map +0 -1
- package/dist/chunk-XAHEXZJC.js +0 -80
- package/dist/chunk-XAHEXZJC.js.map +0 -1
- package/dist/chunk-XCYGJDUX.js +0 -31
- package/dist/chunk-XCYGJDUX.js.map +0 -1
- package/dist/chunk-Y4W3JORC.js +0 -104
- package/dist/chunk-Y4W3JORC.js.map +0 -1
- package/dist/chunk-YFZJ3ZLG.js +0 -1297
- package/dist/chunk-YFZJ3ZLG.js.map +0 -1
- package/dist/chunk-YI3WLXEN.js +0 -4387
- package/dist/chunk-YI3WLXEN.js.map +0 -1
- package/dist/chunk-ZBKFSPD3.js +0 -29
- package/dist/chunk-ZBKFSPD3.js.map +0 -1
- package/dist/chunk-ZOERRQ6A.js +0 -79
- package/dist/chunk-ZOERRQ6A.js.map +0 -1
- package/dist/chunk-ZSTGUKHU.js +0 -10
- package/dist/chunk-ZSTGUKHU.js.map +0 -1
- package/dist/chunk-ZUEHDL27.js +0 -65
- package/dist/chunk-ZUEHDL27.js.map +0 -1
- package/dist/constants-D3gaMY-W.d.ts +0 -39
- package/dist/icons.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/blocks/AIKit.js.map +0 -1
- package/dist/internal/blocks/AppShell.js.map +0 -1
- package/dist/internal/blocks/AutoSaveTextarea.js.map +0 -1
- package/dist/internal/blocks/BrandEditor.js.map +0 -1
- package/dist/internal/blocks/ClipboardButton.js.map +0 -1
- package/dist/internal/blocks/ColorInput.js.map +0 -1
- package/dist/internal/blocks/ColorModeSwitch.js.map +0 -1
- package/dist/internal/blocks/Command.js.map +0 -1
- package/dist/internal/blocks/CopyField.js.map +0 -1
- package/dist/internal/blocks/DateInput.js.map +0 -1
- package/dist/internal/blocks/DateRangeInput.js.map +0 -1
- package/dist/internal/blocks/Form.js.map +0 -1
- package/dist/internal/blocks/FormGroup.js.map +0 -1
- package/dist/internal/blocks/MultiActionButtonGroup.js.map +0 -1
- package/dist/internal/blocks/OtpInput.js.map +0 -1
- package/dist/internal/blocks/PageHeader.js.map +0 -1
- package/dist/internal/blocks/PageLayout.js.map +0 -1
- package/dist/internal/blocks/PageToolbar.js.map +0 -1
- package/dist/internal/blocks/SearchInput.js.map +0 -1
- package/dist/internal/blocks/SectionNav.js.map +0 -1
- package/dist/internal/blocks/TextInput.js.map +0 -1
- package/dist/internal/components/Alert.js.map +0 -1
- package/dist/internal/components/AlertModal.js.map +0 -1
- package/dist/internal/components/Badge.js.map +0 -1
- package/dist/internal/components/BrandLogo.js.map +0 -1
- package/dist/internal/components/Breadcrumb.js.map +0 -1
- package/dist/internal/components/Button.js.map +0 -1
- package/dist/internal/components/Calendar.js.map +0 -1
- package/dist/internal/components/Card.js.map +0 -1
- package/dist/internal/components/Checkbox.js.map +0 -1
- package/dist/internal/components/Clipboard.js.map +0 -1
- package/dist/internal/components/Collapsible.js.map +0 -1
- package/dist/internal/components/Combobox.js.map +0 -1
- package/dist/internal/components/DatePicker.js.map +0 -1
- package/dist/internal/components/DateRangePicker.js.map +0 -1
- package/dist/internal/components/DiffView.js.map +0 -1
- package/dist/internal/components/DropdownMenu.js.map +0 -1
- package/dist/internal/components/FileUpload.js.map +0 -1
- package/dist/internal/components/FullScreenModal.js.map +0 -1
- package/dist/internal/components/HoverCard.js.map +0 -1
- package/dist/internal/components/InputGroup.js.map +0 -1
- package/dist/internal/components/Kbd.js.map +0 -1
- package/dist/internal/components/MarkedText.js.map +0 -1
- package/dist/internal/components/MergeEditor/useMergeDiff.js.map +0 -1
- package/dist/internal/components/Modal.js.map +0 -1
- package/dist/internal/components/Navbar.js.map +0 -1
- package/dist/internal/components/Pagination.js.map +0 -1
- package/dist/internal/components/Popconfirm.js.map +0 -1
- package/dist/internal/components/Popover.js.map +0 -1
- package/dist/internal/components/RadioGroup.js.map +0 -1
- package/dist/internal/components/Resizable.js.map +0 -1
- package/dist/internal/components/Search.js.map +0 -1
- package/dist/internal/components/Select.js.map +0 -1
- package/dist/internal/components/Sheet.js.map +0 -1
- package/dist/internal/components/Sidebar.js.map +0 -1
- package/dist/internal/components/Slider.js.map +0 -1
- package/dist/internal/components/Stepper.js.map +0 -1
- package/dist/internal/components/Switch.js.map +0 -1
- package/dist/internal/components/Table.js.map +0 -1
- package/dist/internal/components/Tabs.js.map +0 -1
- package/dist/internal/components/ThemeProvider.js.map +0 -1
- package/dist/internal/components/TimePicker.js.map +0 -1
- package/dist/internal/components/Timeline.js.map +0 -1
- package/dist/internal/components/Toast.js.map +0 -1
- package/dist/internal/components/ToggleGroup.js.map +0 -1
- package/dist/internal/components/Tooltip.js.map +0 -1
- package/dist/internal/components/Workbench.js.map +0 -1
- package/dist/internal/components/ZoomableSvg.js.map +0 -1
- package/dist/internal/utils.js.map +0 -1
- package/dist/mermaid.js.map +0 -1
package/dist/chunk-BHGIDSRJ.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { ChevronsUpDown, ChevronUp, ChevronDown } from './chunk-RQVK4IYC.js';
|
|
2
|
-
import { cn } from './chunk-LXLIQ2D6.js';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var TableBody = ({
|
|
6
|
-
withBorderSeparator = true,
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}) => {
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
-
"tbody",
|
|
12
|
-
{
|
|
13
|
-
className: cn(
|
|
14
|
-
{
|
|
15
|
-
"tw:[&_tr]:border-0 tw:[&_tr]:border-b-border tw:[&_tr]:border-b tw:[&_tr]:border-solid tw:[&_tr:last-child]:border-0": withBorderSeparator
|
|
16
|
-
},
|
|
17
|
-
className
|
|
18
|
-
),
|
|
19
|
-
...props
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
var TableCell = ({ className, ...props }) => {
|
|
24
|
-
return /* @__PURE__ */ jsx("td", { className: cn("tw:px-3 tw:py-2", className), ...props });
|
|
25
|
-
};
|
|
26
|
-
var TableFooter = ({ className, ...props }) => {
|
|
27
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
-
"tfoot",
|
|
29
|
-
{
|
|
30
|
-
className: cn(
|
|
31
|
-
"tw:bg-muted/50 tw:border-t tw:border-border tw:font-medium tw:[&>tr]:last:border-b-0",
|
|
32
|
-
className
|
|
33
|
-
),
|
|
34
|
-
...props
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
var TableHead = ({ className, ...props }) => {
|
|
39
|
-
return /* @__PURE__ */ jsx(
|
|
40
|
-
"th",
|
|
41
|
-
{
|
|
42
|
-
className: cn(
|
|
43
|
-
"tw:px-3 tw:py-2 tw:text-left tw:font-medium tw:whitespace-nowrap tw:[&:has([role=checkbox])]:pr-0 tw:[&>[role=checkbox]]:translate-y-[2px] tw:focus-within:ring-2 tw:focus-within:ring-ring/50",
|
|
44
|
-
className
|
|
45
|
-
),
|
|
46
|
-
...props
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
var TableHeader = ({
|
|
51
|
-
withShadow = false,
|
|
52
|
-
className,
|
|
53
|
-
...props
|
|
54
|
-
}) => {
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
56
|
-
"thead",
|
|
57
|
-
{
|
|
58
|
-
className: cn(
|
|
59
|
-
// `[&_tr]:hover:` (0,2,1) outranks `TableRow`'s own `hover:bg-muted/50` (0,2,0), so the
|
|
60
|
-
// header row keeps its background instead of flashing muted — a header is not hoverable.
|
|
61
|
-
"tw:sticky tw:top-0 tw:z-10 tw:[&_tr]:bg-table-header tw:[&_tr]:hover:bg-table-header tw:[&_tr]:border-b tw:[&_tr]:border-border",
|
|
62
|
-
{ "tw:shadow-table": withShadow },
|
|
63
|
-
className
|
|
64
|
-
),
|
|
65
|
-
...props
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
var TableRow = ({ ref, className, ...props }) => /* @__PURE__ */ jsx(
|
|
70
|
-
"tr",
|
|
71
|
-
{
|
|
72
|
-
ref,
|
|
73
|
-
className: cn(
|
|
74
|
-
"tw:hover:bg-muted/50 tw:aria-selected:bg-accent tw:aria-selected:hover:bg-accent",
|
|
75
|
-
className
|
|
76
|
-
),
|
|
77
|
-
...props
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
var tableAriaSort = (sorted) => sorted === "asc" ? "ascending" : sorted === "desc" ? "descending" : "none";
|
|
81
|
-
var TableSortHeader = ({ sorted, children, className, ...props }) => {
|
|
82
|
-
const Icon = sorted === false ? ChevronsUpDown : sorted === "asc" ? ChevronUp : ChevronDown;
|
|
83
|
-
return /* @__PURE__ */ jsxs(
|
|
84
|
-
"button",
|
|
85
|
-
{
|
|
86
|
-
className: cn(
|
|
87
|
-
"tw:group tw:flex tw:cursor-pointer tw:items-center tw:gap-1 tw:border-0 tw:bg-transparent tw:p-0 tw:font-medium tw:text-inherit",
|
|
88
|
-
className
|
|
89
|
-
),
|
|
90
|
-
...props,
|
|
91
|
-
type: "button",
|
|
92
|
-
children: [
|
|
93
|
-
children,
|
|
94
|
-
/* @__PURE__ */ jsx(Icon, { className: "tw:size-3 tw:text-muted-foreground" })
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
};
|
|
99
|
-
var Table = ({
|
|
100
|
-
borderCollapsed = true,
|
|
101
|
-
bordered = false,
|
|
102
|
-
containerClassName,
|
|
103
|
-
className,
|
|
104
|
-
...props
|
|
105
|
-
}) => {
|
|
106
|
-
return /* @__PURE__ */ jsx(
|
|
107
|
-
"div",
|
|
108
|
-
{
|
|
109
|
-
className: cn(
|
|
110
|
-
"tw:relative tw:w-full",
|
|
111
|
-
bordered && "tw:overflow-auto tw:rounded-[10px] tw:border tw:border-solid tw:border-border",
|
|
112
|
-
containerClassName
|
|
113
|
-
),
|
|
114
|
-
children: /* @__PURE__ */ jsx(
|
|
115
|
-
"table",
|
|
116
|
-
{
|
|
117
|
-
className: cn(
|
|
118
|
-
// `tw:text-foreground` (a semantic token) so header + cell text flips
|
|
119
|
-
// under `[data-theme='dark']` instead of inheriting a fixed dark color.
|
|
120
|
-
"tw:w-full tw:caption-bottom tw:text-sm tw:text-foreground",
|
|
121
|
-
borderCollapsed ? "tw:border-collapse" : "tw:border-separate tw:border-spacing-y-1",
|
|
122
|
-
className
|
|
123
|
-
),
|
|
124
|
-
...props
|
|
125
|
-
}
|
|
126
|
-
)
|
|
127
|
-
}
|
|
128
|
-
);
|
|
129
|
-
};
|
|
130
|
-
Table.Header = TableHeader;
|
|
131
|
-
Table.Head = TableHead;
|
|
132
|
-
Table.Body = TableBody;
|
|
133
|
-
Table.Row = TableRow;
|
|
134
|
-
Table.Cell = TableCell;
|
|
135
|
-
Table.Footer = TableFooter;
|
|
136
|
-
Table.SortHeader = TableSortHeader;
|
|
137
|
-
|
|
138
|
-
export { Table, TableSortHeader, tableAriaSort };
|
|
139
|
-
//# sourceMappingURL=chunk-BHGIDSRJ.js.map
|
|
140
|
-
//# sourceMappingURL=chunk-BHGIDSRJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Table/TableBody.tsx","../src/components/Table/TableCell.tsx","../src/components/Table/TableFooter.tsx","../src/components/Table/TableHead.tsx","../src/components/Table/TableHeader.tsx","../src/components/Table/TableRow.tsx","../src/components/Table/TableSortHeader.tsx","../src/components/Table/Table.tsx"],"names":["jsx"],"mappings":";;;;AAIO,IAAM,YAAY,CAAC;AAAA,EACxB,mBAAA,GAAsB,IAAA;AAAA,EACtB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAmE;AACjE,EAAA,uBACE,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT;AAAA,UACE,sHAAA,EACE;AAAA,SACJ;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAA;ACjBO,IAAM,YAAY,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,KAA4B;AAC1E,EAAA,uBAAOA,IAAC,IAAA,EAAA,EAAG,SAAA,EAAW,GAAG,iBAAA,EAAmB,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACrE,CAAA;ACFO,IAAM,cAAc,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,KAA+B;AAC/E,EAAA,uBACEA,GAAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,sFAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAA;ACVO,IAAM,YAAY,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,KAA4B;AAC1E,EAAA,uBACEA,GAAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,gMAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAA;ACVO,IAAM,cAAc,CAAC;AAAA,EAC1B,UAAA,GAAa,KAAA;AAAA,EACb,SAAA;AAAA,EACA,GAAG;AACL,CAAA,KAA0D;AACxD,EAAA,uBACEA,GAAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA;AAAA;AAAA,QAGT,iIAAA;AAAA,QACA,EAAE,mBAAmB,UAAA,EAAW;AAAA,QAChC;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAA;ACjBO,IAAM,QAAA,GAAW,CAAC,EAAE,GAAA,EAAK,WAAW,GAAG,KAAA,uBAC5CA,GAAAA;AAAA,EAAC,IAAA;AAAA,EAAA;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,kFAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CAAA;ACJK,IAAM,aAAA,GAAgB,CAAC,MAAA,KAC5B,MAAA,KAAW,QAAQ,WAAA,GAAc,MAAA,KAAW,SAAS,YAAA,GAAe;AAe/D,IAAM,eAAA,GAAkB,CAAC,EAAE,MAAA,EAAQ,UAAU,SAAA,EAAW,GAAG,OAAM,KAAa;AACnF,EAAA,MAAM,OAAO,MAAA,KAAW,KAAA,GAAQ,cAAA,GAAiB,MAAA,KAAW,QAAQ,SAAA,GAAY,WAAA;AAChF,EAAA,uBACE,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,iIAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MACJ,IAAA,EAAK,QAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACDA,GAAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAU,oCAAA,EAAqC;AAAA;AAAA;AAAA,GACvD;AAEJ;ACJO,IAAM,QAAQ,CAAC;AAAA,EACpB,eAAA,GAAkB,IAAA;AAAA,EAClB,QAAA,GAAW,KAAA;AAAA,EACX,kBAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAa;AACX,EAAA,uBACEA,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,uBAAA;AAAA,QACA,QAAA,IAAY,+EAAA;AAAA,QACZ;AAAA,OACF;AAAA,MAEA,QAAA,kBAAAA,GAAAA;AAAA,QAAC,OAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,EAAA;AAAA;AAAA;AAAA,YAGT,2DAAA;AAAA,YACA,kBAAkB,oBAAA,GAAuB,0CAAA;AAAA,YACzC;AAAA,WACF;AAAA,UACC,GAAG;AAAA;AAAA;AACN;AAAA,GACF;AAEJ;AAEA,KAAA,CAAM,MAAA,GAAS,WAAA;AACf,KAAA,CAAM,IAAA,GAAO,SAAA;AACb,KAAA,CAAM,IAAA,GAAO,SAAA;AACb,KAAA,CAAM,GAAA,GAAM,QAAA;AACZ,KAAA,CAAM,IAAA,GAAO,SAAA;AACb,KAAA,CAAM,MAAA,GAAS,WAAA;AACf,KAAA,CAAM,UAAA,GAAa,eAAA","file":"chunk-BHGIDSRJ.js","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\nexport const TableBody = ({\n withBorderSeparator = true,\n className,\n ...props\n}: { withBorderSeparator?: boolean } & ComponentProps<'tbody'>) => {\n return (\n <tbody\n className={cn(\n {\n 'tw:[&_tr]:border-0 tw:[&_tr]:border-b-border tw:[&_tr]:border-b tw:[&_tr]:border-solid tw:[&_tr:last-child]:border-0':\n withBorderSeparator,\n },\n className,\n )}\n {...props}\n />\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\nexport const TableCell = ({ className, ...props }: ComponentProps<'td'>) => {\n return <td className={cn('tw:px-3 tw:py-2', className)} {...props} />;\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\nexport const TableFooter = ({ className, ...props }: ComponentProps<'tfoot'>) => {\n return (\n <tfoot\n className={cn(\n 'tw:bg-muted/50 tw:border-t tw:border-border tw:font-medium tw:[&>tr]:last:border-b-0',\n className,\n )}\n {...props}\n />\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\nexport const TableHead = ({ className, ...props }: ComponentProps<'th'>) => {\n return (\n <th\n className={cn(\n 'tw:px-3 tw:py-2 tw:text-left tw:font-medium tw:whitespace-nowrap tw:[&:has([role=checkbox])]:pr-0 tw:[&>[role=checkbox]]:translate-y-[2px] tw:focus-within:ring-2 tw:focus-within:ring-ring/50',\n className,\n )}\n {...props}\n />\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\nexport const TableHeader = ({\n withShadow = false,\n className,\n ...props\n}: { withShadow?: boolean } & ComponentProps<'thead'>) => {\n return (\n <thead\n className={cn(\n // `[&_tr]:hover:` (0,2,1) outranks `TableRow`'s own `hover:bg-muted/50` (0,2,0), so the\n // header row keeps its background instead of flashing muted — a header is not hoverable.\n 'tw:sticky tw:top-0 tw:z-10 tw:[&_tr]:bg-table-header tw:[&_tr]:hover:bg-table-header tw:[&_tr]:border-b tw:[&_tr]:border-border',\n { 'tw:shadow-table': withShadow },\n className,\n )}\n {...props}\n />\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\nexport const TableRow = ({ ref, className, ...props }: ComponentProps<'tr'>) => (\n <tr\n ref={ref}\n className={cn(\n 'tw:hover:bg-muted/50 tw:aria-selected:bg-accent tw:aria-selected:hover:bg-accent',\n className,\n )}\n {...props}\n />\n);\n","import type { ComponentProps, ReactNode } from 'react';\n\nimport { ChevronDown, ChevronsUpDown, ChevronUp } from '../../icons';\nimport { cn } from '../../utils';\n\nexport type TableSortDirection = 'asc' | 'desc' | false;\n\n/** Maps a sort direction to the `aria-sort` value for the enclosing `Table.Head`. */\nexport const tableAriaSort = (sorted: TableSortDirection): ComponentProps<'th'>['aria-sort'] =>\n sorted === 'asc' ? 'ascending' : sorted === 'desc' ? 'descending' : 'none';\n\ntype Props = {\n /** Current sort state for this column: `'asc'`, `'desc'`, or `false` when unsorted. */\n sorted: TableSortDirection;\n children: ReactNode;\n} & Omit<ComponentProps<'button'>, 'children' | 'type'>;\n\n/**\n * Clickable column-header label with a sort-direction chevron, for use inside `Table.Head`.\n *\n * Presentational only — it owns no sort state. Pair it with your sort model (a `useState`\n * key/direction pair, or `@tanstack/react-table`'s `getToggleSortingHandler()` / `getIsSorted()`)\n * and set `aria-sort` on the enclosing `Table.Head` via {@link tableAriaSort}.\n */\nexport const TableSortHeader = ({ sorted, children, className, ...props }: Props) => {\n const Icon = sorted === false ? ChevronsUpDown : sorted === 'asc' ? ChevronUp : ChevronDown;\n return (\n <button\n className={cn(\n 'tw:group tw:flex tw:cursor-pointer tw:items-center tw:gap-1 tw:border-0 tw:bg-transparent tw:p-0 tw:font-medium tw:text-inherit',\n className,\n )}\n {...props}\n type=\"button\"\n >\n {children}\n <Icon className=\"tw:size-3 tw:text-muted-foreground\" />\n </button>\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\nimport { TableBody } from './TableBody';\nimport { TableCell } from './TableCell';\nimport { TableFooter } from './TableFooter';\nimport { TableHead } from './TableHead';\nimport { TableHeader } from './TableHeader';\nimport { TableRow } from './TableRow';\nimport { TableSortHeader } from './TableSortHeader';\n\n/**\n * Props for `Table`. `borderCollapsed` toggles standard collapsed borders vs separate row spacing;\n * `bordered` wraps the table in a rounded bordered container with overflow scrolling.\n */\ntype Props = {\n borderCollapsed?: boolean;\n bordered?: boolean;\n containerClassName?: string;\n} & ComponentProps<'table'>;\n\n/**\n * Tabular data surface with header / body / row / cell compound parts.\n *\n * **When to use:** tabular data with named columns — entity lists with shared schema (jobs, buckets,\n * tables), sortable rows, row-level actions. Compose `Table.Header` + `Table.Body` + `Table.Row` +\n * `Table.Head` / `Table.Cell`.\n * **When NOT to use:** for heterogeneous lists where each row has its own shape use a `Card` list;\n * for tree / hierarchy layouts use a custom recursive list with `Table` per level.\n * **Composition:** wrap in `PageLayout.Content`. For sortable / filterable behaviour bring your own\n * state library (TanStack Table is a common pairing); this component is presentational.\n *\n * @see RECIPES.md#list-detail — for a list-table + row-click-to-detail pattern\n */\nexport const Table = ({\n borderCollapsed = true,\n bordered = false,\n containerClassName,\n className,\n ...props\n}: Props) => {\n return (\n <div\n className={cn(\n 'tw:relative tw:w-full',\n bordered && 'tw:overflow-auto tw:rounded-[10px] tw:border tw:border-solid tw:border-border',\n containerClassName,\n )}\n >\n <table\n className={cn(\n // `tw:text-foreground` (a semantic token) so header + cell text flips\n // under `[data-theme='dark']` instead of inheriting a fixed dark color.\n 'tw:w-full tw:caption-bottom tw:text-sm tw:text-foreground',\n borderCollapsed ? 'tw:border-collapse' : 'tw:border-separate tw:border-spacing-y-1',\n className,\n )}\n {...props}\n />\n </div>\n );\n};\n\nTable.Header = TableHeader;\nTable.Head = TableHead;\nTable.Body = TableBody;\nTable.Row = TableRow;\nTable.Cell = TableCell;\nTable.Footer = TableFooter;\nTable.SortHeader = TableSortHeader;\n"]}
|
package/dist/chunk-BSQWZITZ.js
DELETED
|
@@ -1,507 +0,0 @@
|
|
|
1
|
-
import { CHANGE_CLASS, CHUNK_TYPE } from './chunk-OTL5WXIJ.js';
|
|
2
|
-
import { useState, useRef, useCallback, useLayoutEffect, useEffect, useMemo } from 'react';
|
|
3
|
-
import { diff3Merge } from 'node-diff3';
|
|
4
|
-
import { diffLines } from 'diff';
|
|
5
|
-
|
|
6
|
-
var computeDiffChunks = (oldText, newText) => {
|
|
7
|
-
const changes = diffLines(oldText, newText);
|
|
8
|
-
const chunks = [];
|
|
9
|
-
let oldLine = 1;
|
|
10
|
-
let newLine = 1;
|
|
11
|
-
for (const change of changes) {
|
|
12
|
-
if (change.value === "") continue;
|
|
13
|
-
const lineCount = change.count || change.value.replace(/\n$/, "").split("\n").length;
|
|
14
|
-
if (change.removed) {
|
|
15
|
-
chunks.push({
|
|
16
|
-
type: CHUNK_TYPE.REMOVED,
|
|
17
|
-
value: change.value,
|
|
18
|
-
oldStart: oldLine,
|
|
19
|
-
oldEnd: oldLine + lineCount - 1,
|
|
20
|
-
newStart: newLine,
|
|
21
|
-
newEnd: newLine
|
|
22
|
-
});
|
|
23
|
-
oldLine += lineCount;
|
|
24
|
-
} else if (change.added) {
|
|
25
|
-
chunks.push({
|
|
26
|
-
type: CHUNK_TYPE.ADDED,
|
|
27
|
-
value: change.value,
|
|
28
|
-
oldStart: oldLine,
|
|
29
|
-
oldEnd: oldLine,
|
|
30
|
-
newStart: newLine,
|
|
31
|
-
newEnd: newLine + lineCount - 1
|
|
32
|
-
});
|
|
33
|
-
newLine += lineCount;
|
|
34
|
-
} else {
|
|
35
|
-
chunks.push({
|
|
36
|
-
type: CHUNK_TYPE.UNCHANGED,
|
|
37
|
-
value: change.value,
|
|
38
|
-
oldStart: oldLine,
|
|
39
|
-
oldEnd: oldLine + lineCount - 1,
|
|
40
|
-
newStart: newLine,
|
|
41
|
-
newEnd: newLine + lineCount - 1
|
|
42
|
-
});
|
|
43
|
-
oldLine += lineCount;
|
|
44
|
-
newLine += lineCount;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return chunks;
|
|
48
|
-
};
|
|
49
|
-
var getChangedLineNumbers = (chunks, side) => {
|
|
50
|
-
const lines = /* @__PURE__ */ new Set();
|
|
51
|
-
for (const chunk of chunks) {
|
|
52
|
-
if (chunk.type === CHUNK_TYPE.UNCHANGED) continue;
|
|
53
|
-
if (side === "old" && chunk.type === CHUNK_TYPE.REMOVED) {
|
|
54
|
-
for (let i = chunk.oldStart; i <= chunk.oldEnd; i++) lines.add(i);
|
|
55
|
-
}
|
|
56
|
-
if (side === "new" && chunk.type === CHUNK_TYPE.ADDED) {
|
|
57
|
-
for (let i = chunk.newStart; i <= chunk.newEnd; i++) lines.add(i);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return lines;
|
|
61
|
-
};
|
|
62
|
-
var filterHighlightedLines = (chunks, side, classification, suppressedLines) => {
|
|
63
|
-
const filtered = /* @__PURE__ */ new Set();
|
|
64
|
-
for (const line of getChangedLineNumbers(chunks, side)) {
|
|
65
|
-
if (classification.has(line) && !suppressedLines.has(line)) filtered.add(line);
|
|
66
|
-
}
|
|
67
|
-
return filtered;
|
|
68
|
-
};
|
|
69
|
-
var replaceLines = (text, startLine, endLine, replacement) => {
|
|
70
|
-
const lines = text.split("\n");
|
|
71
|
-
const before = lines.slice(0, startLine - 1);
|
|
72
|
-
const after = startLine > endLine ? lines.slice(startLine - 1) : lines.slice(endLine);
|
|
73
|
-
const replacementArr = replacement === "" ? [] : replacement.replace(/\n$/, "").split("\n");
|
|
74
|
-
return [...before, ...replacementArr, ...after].join("\n");
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// src/components/MergeEditor/useMergeDiff.ts
|
|
78
|
-
var DEBOUNCE_MS = 150;
|
|
79
|
-
var rangesOverlap = (s1, e1, s2, e2) => s1 <= e2 && e1 >= s2;
|
|
80
|
-
var computeSuppressedLines = (dismissedLines, pairs, resolvedIds, getRange) => {
|
|
81
|
-
const lines = new Set(dismissedLines);
|
|
82
|
-
for (const pair of pairs) {
|
|
83
|
-
if (resolvedIds.has(pair.id)) {
|
|
84
|
-
const [start, end] = getRange(pair);
|
|
85
|
-
for (let i = start; i <= end; i++) lines.add(i);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return lines;
|
|
89
|
-
};
|
|
90
|
-
var filterVisibleConflicts = (conflicts, classification, dismissedLines, getRange, findPair, fullyResolvedPairIds) => conflicts.filter((c) => {
|
|
91
|
-
const [start, end] = getRange(c);
|
|
92
|
-
let hasClassifiedLine = false;
|
|
93
|
-
let allDismissed = true;
|
|
94
|
-
for (let i = start; i <= end; i++) {
|
|
95
|
-
if (classification.has(i)) hasClassifiedLine = true;
|
|
96
|
-
if (!dismissedLines.has(i)) allDismissed = false;
|
|
97
|
-
}
|
|
98
|
-
if (!hasClassifiedLine || allDismissed) return false;
|
|
99
|
-
const pair = findPair(c);
|
|
100
|
-
return !pair || !fullyResolvedPairIds.has(pair.id);
|
|
101
|
-
});
|
|
102
|
-
var useMergeDiff = (baseText, leftText, rightText) => {
|
|
103
|
-
const [mergeValue, setMergeValue] = useState(baseText);
|
|
104
|
-
const debounceRef = useRef(null);
|
|
105
|
-
const [debouncedMergeValue, setDebouncedMergeValue] = useState(mergeValue);
|
|
106
|
-
const [acceptedPairSides, setAcceptedPairSides] = useState(
|
|
107
|
-
() => /* @__PURE__ */ new Map()
|
|
108
|
-
);
|
|
109
|
-
const [dismissedLeftLines, setDismissedLeftLines] = useState(() => /* @__PURE__ */ new Set());
|
|
110
|
-
const [dismissedRightLines, setDismissedRightLines] = useState(() => /* @__PURE__ */ new Set());
|
|
111
|
-
const reset = useCallback(() => {
|
|
112
|
-
if (debounceRef.current) {
|
|
113
|
-
clearTimeout(debounceRef.current);
|
|
114
|
-
debounceRef.current = null;
|
|
115
|
-
}
|
|
116
|
-
setMergeValue(baseText);
|
|
117
|
-
setDebouncedMergeValue(baseText);
|
|
118
|
-
setAcceptedPairSides(/* @__PURE__ */ new Map());
|
|
119
|
-
setDismissedLeftLines(/* @__PURE__ */ new Set());
|
|
120
|
-
setDismissedRightLines(/* @__PURE__ */ new Set());
|
|
121
|
-
}, [baseText]);
|
|
122
|
-
useLayoutEffect(() => {
|
|
123
|
-
reset();
|
|
124
|
-
}, [baseText, leftText, rightText]);
|
|
125
|
-
useEffect(() => {
|
|
126
|
-
return () => {
|
|
127
|
-
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
128
|
-
};
|
|
129
|
-
}, []);
|
|
130
|
-
const handleMergeChange = useCallback((value) => {
|
|
131
|
-
setMergeValue(value);
|
|
132
|
-
if (debounceRef.current) {
|
|
133
|
-
clearTimeout(debounceRef.current);
|
|
134
|
-
}
|
|
135
|
-
debounceRef.current = setTimeout(() => {
|
|
136
|
-
setDebouncedMergeValue(value);
|
|
137
|
-
}, DEBOUNCE_MS);
|
|
138
|
-
}, []);
|
|
139
|
-
const leftDiffChunks = useMemo(
|
|
140
|
-
() => computeDiffChunks(leftText, debouncedMergeValue),
|
|
141
|
-
[leftText, debouncedMergeValue]
|
|
142
|
-
);
|
|
143
|
-
const rightDiffChunks = useMemo(
|
|
144
|
-
() => computeDiffChunks(debouncedMergeValue, rightText),
|
|
145
|
-
[debouncedMergeValue, rightText]
|
|
146
|
-
);
|
|
147
|
-
const leftConflicts = useMemo(() => pairChunksIntoConflicts(leftDiffChunks), [leftDiffChunks]);
|
|
148
|
-
const rightConflicts = useMemo(() => pairChunksIntoConflicts(rightDiffChunks), [rightDiffChunks]);
|
|
149
|
-
const leftVsBase = useMemo(() => computeDiffChunks(baseText, leftText), [baseText, leftText]);
|
|
150
|
-
const rightVsBase = useMemo(() => computeDiffChunks(baseText, rightText), [baseText, rightText]);
|
|
151
|
-
const { leftClassification, rightClassification, conflictPairs } = useMemo(() => {
|
|
152
|
-
const baseLines = baseText.split("\n");
|
|
153
|
-
const leftLines = leftText.split("\n");
|
|
154
|
-
const rightLines = rightText.split("\n");
|
|
155
|
-
const result = diff3Merge(leftLines, baseLines, rightLines);
|
|
156
|
-
const leftConflictLineSet = /* @__PURE__ */ new Set();
|
|
157
|
-
const rightConflictLineSet = /* @__PURE__ */ new Set();
|
|
158
|
-
const pairs = [];
|
|
159
|
-
for (const block of result) {
|
|
160
|
-
if ("conflict" in block && block.conflict) {
|
|
161
|
-
const { a, aIndex, b, bIndex } = block.conflict;
|
|
162
|
-
for (let i = 0; i < a.length; i++) leftConflictLineSet.add(aIndex + i + 1);
|
|
163
|
-
for (let i = 0; i < b.length; i++) rightConflictLineSet.add(bIndex + i + 1);
|
|
164
|
-
pairs.push({
|
|
165
|
-
id: `pair-${aIndex}-${bIndex}`,
|
|
166
|
-
leftStart: aIndex + 1,
|
|
167
|
-
leftEnd: aIndex + a.length,
|
|
168
|
-
rightStart: bIndex + 1,
|
|
169
|
-
rightEnd: bIndex + b.length
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
const leftChanged = getChangedLineNumbers(leftVsBase, "new");
|
|
174
|
-
const rightChanged = getChangedLineNumbers(rightVsBase, "new");
|
|
175
|
-
const leftMap = /* @__PURE__ */ new Map();
|
|
176
|
-
for (const line of leftChanged) {
|
|
177
|
-
leftMap.set(line, leftConflictLineSet.has(line) ? CHANGE_CLASS.CONFLICT : CHANGE_CLASS.SAFE);
|
|
178
|
-
}
|
|
179
|
-
const rightMap = /* @__PURE__ */ new Map();
|
|
180
|
-
for (const line of rightChanged) {
|
|
181
|
-
rightMap.set(
|
|
182
|
-
line,
|
|
183
|
-
rightConflictLineSet.has(line) ? CHANGE_CLASS.CONFLICT : CHANGE_CLASS.SAFE
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
return {
|
|
187
|
-
leftClassification: leftMap,
|
|
188
|
-
rightClassification: rightMap,
|
|
189
|
-
conflictPairs: pairs
|
|
190
|
-
};
|
|
191
|
-
}, [baseText, leftText, rightText, leftVsBase, rightVsBase]);
|
|
192
|
-
const findPairForLeft = useCallback(
|
|
193
|
-
(conflict) => conflictPairs.find(
|
|
194
|
-
(p) => rangesOverlap(conflict.oldStartLine, conflict.oldEndLine, p.leftStart, p.leftEnd)
|
|
195
|
-
),
|
|
196
|
-
[conflictPairs]
|
|
197
|
-
);
|
|
198
|
-
const findPairForRight = useCallback(
|
|
199
|
-
(conflict) => conflictPairs.find(
|
|
200
|
-
(p) => rangesOverlap(conflict.newStartLine, conflict.newEndLine, p.rightStart, p.rightEnd)
|
|
201
|
-
),
|
|
202
|
-
[conflictPairs]
|
|
203
|
-
);
|
|
204
|
-
const markSideAccepted = useCallback((pair, side) => {
|
|
205
|
-
if (!pair) return;
|
|
206
|
-
setAcceptedPairSides((prev) => {
|
|
207
|
-
const next = new Map(prev);
|
|
208
|
-
const sides = new Set(prev.get(pair.id) ?? []);
|
|
209
|
-
sides.add(side);
|
|
210
|
-
next.set(pair.id, sides);
|
|
211
|
-
return next;
|
|
212
|
-
});
|
|
213
|
-
}, []);
|
|
214
|
-
const isOtherSideAccepted = useCallback(
|
|
215
|
-
(pair, side) => {
|
|
216
|
-
if (!pair) return false;
|
|
217
|
-
const otherSide = side === "left" ? "right" : "left";
|
|
218
|
-
return acceptedPairSides.get(pair.id)?.has(otherSide) ?? false;
|
|
219
|
-
},
|
|
220
|
-
[acceptedPairSides]
|
|
221
|
-
);
|
|
222
|
-
const acceptSide = useCallback(
|
|
223
|
-
(conflict, side) => {
|
|
224
|
-
const findPair = side === "left" ? findPairForLeft : findPairForRight;
|
|
225
|
-
const pair = findPair(conflict);
|
|
226
|
-
const otherAccepted = isOtherSideAccepted(pair, side);
|
|
227
|
-
const sourceValue = side === "left" ? conflict.oldValue : conflict.newValue;
|
|
228
|
-
const targetStart = side === "left" ? conflict.newStartLine : conflict.oldStartLine;
|
|
229
|
-
const targetEnd = side === "left" ? conflict.newEndLine : conflict.oldEndLine;
|
|
230
|
-
if (debounceRef.current) {
|
|
231
|
-
clearTimeout(debounceRef.current);
|
|
232
|
-
debounceRef.current = null;
|
|
233
|
-
}
|
|
234
|
-
const mergeTargetEmpty = side === "left" ? conflict.newValue === "" : conflict.oldValue === "";
|
|
235
|
-
const newValue = otherAccepted ? replaceLines(mergeValue, targetEnd + 1, targetEnd, sourceValue) : mergeTargetEmpty ? replaceLines(mergeValue, targetStart, targetStart - 1, sourceValue) : replaceLines(mergeValue, targetStart, targetEnd, sourceValue);
|
|
236
|
-
setMergeValue(newValue);
|
|
237
|
-
setDebouncedMergeValue(newValue);
|
|
238
|
-
markSideAccepted(pair, side);
|
|
239
|
-
if (!pair) {
|
|
240
|
-
const setDismissedSide = side === "left" ? setDismissedLeftLines : setDismissedRightLines;
|
|
241
|
-
const [sideStart, sideEnd] = side === "left" ? [conflict.oldStartLine, conflict.oldEndLine] : [conflict.newStartLine, conflict.newEndLine];
|
|
242
|
-
setDismissedSide((prev) => {
|
|
243
|
-
const next = new Set(prev);
|
|
244
|
-
for (let i = sideStart; i <= sideEnd; i++) next.add(i);
|
|
245
|
-
return next;
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
[mergeValue, findPairForLeft, findPairForRight, isOtherSideAccepted, markSideAccepted]
|
|
250
|
-
);
|
|
251
|
-
const acceptLeft = useCallback(
|
|
252
|
-
(conflict) => acceptSide(conflict, "left"),
|
|
253
|
-
[acceptSide]
|
|
254
|
-
);
|
|
255
|
-
const acceptRight = useCallback(
|
|
256
|
-
(conflict) => acceptSide(conflict, "right"),
|
|
257
|
-
[acceptSide]
|
|
258
|
-
);
|
|
259
|
-
const dismissSide = useCallback((conflict, side) => {
|
|
260
|
-
const setDismissed = side === "left" ? setDismissedLeftLines : setDismissedRightLines;
|
|
261
|
-
const [sideStart, sideEnd] = side === "left" ? [conflict.oldStartLine, conflict.oldEndLine] : [conflict.newStartLine, conflict.newEndLine];
|
|
262
|
-
setDismissed((prev) => {
|
|
263
|
-
const next = new Set(prev);
|
|
264
|
-
for (let i = sideStart; i <= sideEnd; i++) next.add(i);
|
|
265
|
-
return next;
|
|
266
|
-
});
|
|
267
|
-
}, []);
|
|
268
|
-
const dismissLeft = useCallback(
|
|
269
|
-
(conflict) => dismissSide(conflict, "left"),
|
|
270
|
-
[dismissSide]
|
|
271
|
-
);
|
|
272
|
-
const dismissRight = useCallback(
|
|
273
|
-
(conflict) => dismissSide(conflict, "right"),
|
|
274
|
-
[dismissSide]
|
|
275
|
-
);
|
|
276
|
-
const fullyResolvedPairIds = useMemo(() => {
|
|
277
|
-
const ids = /* @__PURE__ */ new Set();
|
|
278
|
-
for (const pair of conflictPairs) {
|
|
279
|
-
const leftAccepted = acceptedPairSides.get(pair.id)?.has("left") ?? false;
|
|
280
|
-
const rightAccepted = acceptedPairSides.get(pair.id)?.has("right") ?? false;
|
|
281
|
-
let leftDismissed = true;
|
|
282
|
-
for (let i = pair.leftStart; i <= pair.leftEnd; i++) {
|
|
283
|
-
if (!dismissedLeftLines.has(i)) {
|
|
284
|
-
leftDismissed = false;
|
|
285
|
-
break;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
let rightDismissed = true;
|
|
289
|
-
for (let i = pair.rightStart; i <= pair.rightEnd; i++) {
|
|
290
|
-
if (!dismissedRightLines.has(i)) {
|
|
291
|
-
rightDismissed = false;
|
|
292
|
-
break;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
if ((leftAccepted || leftDismissed) && (rightAccepted || rightDismissed)) {
|
|
296
|
-
ids.add(pair.id);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
return ids;
|
|
300
|
-
}, [conflictPairs, acceptedPairSides, dismissedLeftLines, dismissedRightLines]);
|
|
301
|
-
const visibleLeftConflicts = useMemo(
|
|
302
|
-
() => filterVisibleConflicts(
|
|
303
|
-
leftConflicts,
|
|
304
|
-
leftClassification,
|
|
305
|
-
dismissedLeftLines,
|
|
306
|
-
(c) => [c.oldStartLine, c.oldEndLine],
|
|
307
|
-
findPairForLeft,
|
|
308
|
-
fullyResolvedPairIds
|
|
309
|
-
),
|
|
310
|
-
[leftConflicts, leftClassification, dismissedLeftLines, findPairForLeft, fullyResolvedPairIds]
|
|
311
|
-
);
|
|
312
|
-
const visibleRightConflicts = useMemo(
|
|
313
|
-
() => filterVisibleConflicts(
|
|
314
|
-
rightConflicts,
|
|
315
|
-
rightClassification,
|
|
316
|
-
dismissedRightLines,
|
|
317
|
-
(c) => [c.newStartLine, c.newEndLine],
|
|
318
|
-
findPairForRight,
|
|
319
|
-
fullyResolvedPairIds
|
|
320
|
-
),
|
|
321
|
-
[
|
|
322
|
-
rightConflicts,
|
|
323
|
-
rightClassification,
|
|
324
|
-
dismissedRightLines,
|
|
325
|
-
findPairForRight,
|
|
326
|
-
fullyResolvedPairIds
|
|
327
|
-
]
|
|
328
|
-
);
|
|
329
|
-
const suppressedLeftLines = useMemo(
|
|
330
|
-
() => computeSuppressedLines(dismissedLeftLines, conflictPairs, fullyResolvedPairIds, (p) => [
|
|
331
|
-
p.leftStart,
|
|
332
|
-
p.leftEnd
|
|
333
|
-
]),
|
|
334
|
-
[conflictPairs, fullyResolvedPairIds, dismissedLeftLines]
|
|
335
|
-
);
|
|
336
|
-
const suppressedRightLines = useMemo(
|
|
337
|
-
() => computeSuppressedLines(dismissedRightLines, conflictPairs, fullyResolvedPairIds, (p) => [
|
|
338
|
-
p.rightStart,
|
|
339
|
-
p.rightEnd
|
|
340
|
-
]),
|
|
341
|
-
[conflictPairs, fullyResolvedPairIds, dismissedRightLines]
|
|
342
|
-
);
|
|
343
|
-
const { mergeHighlightedLines, mergeClassification } = useMemo(() => {
|
|
344
|
-
const mergeLeftLines = getChangedLineNumbers(leftDiffChunks, "new");
|
|
345
|
-
const mergeRightLines = getChangedLineNumbers(rightDiffChunks, "old");
|
|
346
|
-
const mergeLineToPair = /* @__PURE__ */ new Map();
|
|
347
|
-
for (const conflict of leftConflicts) {
|
|
348
|
-
const pair = findPairForLeft(conflict);
|
|
349
|
-
if (pair) {
|
|
350
|
-
for (let i = conflict.newStartLine; i <= conflict.newEndLine; i++) {
|
|
351
|
-
mergeLineToPair.set(i, pair.id);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
for (const conflict of rightConflicts) {
|
|
356
|
-
const pair = findPairForRight(conflict);
|
|
357
|
-
if (pair) {
|
|
358
|
-
for (let i = conflict.oldStartLine; i <= conflict.oldEndLine; i++) {
|
|
359
|
-
mergeLineToPair.set(i, pair.id);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
const suppressedMergeLines = /* @__PURE__ */ new Set();
|
|
364
|
-
for (const conflict of leftConflicts) {
|
|
365
|
-
if (findPairForLeft(conflict)) continue;
|
|
366
|
-
if (conflict.oldStartLine > conflict.oldEndLine) continue;
|
|
367
|
-
let allDismissed = true;
|
|
368
|
-
for (let i = conflict.oldStartLine; i <= conflict.oldEndLine; i++) {
|
|
369
|
-
if (!dismissedLeftLines.has(i)) {
|
|
370
|
-
allDismissed = false;
|
|
371
|
-
break;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
if (allDismissed) {
|
|
375
|
-
for (let i = conflict.newStartLine; i <= conflict.newEndLine; i++) {
|
|
376
|
-
suppressedMergeLines.add(i);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
for (const conflict of rightConflicts) {
|
|
381
|
-
if (findPairForRight(conflict)) continue;
|
|
382
|
-
if (conflict.newStartLine > conflict.newEndLine) continue;
|
|
383
|
-
let allDismissed = true;
|
|
384
|
-
for (let i = conflict.newStartLine; i <= conflict.newEndLine; i++) {
|
|
385
|
-
if (!dismissedRightLines.has(i)) {
|
|
386
|
-
allDismissed = false;
|
|
387
|
-
break;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
if (allDismissed) {
|
|
391
|
-
for (let i = conflict.oldStartLine; i <= conflict.oldEndLine; i++) {
|
|
392
|
-
suppressedMergeLines.add(i);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
const allMergeLines = /* @__PURE__ */ new Set();
|
|
397
|
-
for (const line of mergeLeftLines) allMergeLines.add(line);
|
|
398
|
-
for (const line of mergeRightLines) allMergeLines.add(line);
|
|
399
|
-
const highlighted = /* @__PURE__ */ new Set();
|
|
400
|
-
const classification = /* @__PURE__ */ new Map();
|
|
401
|
-
for (const line of allMergeLines) {
|
|
402
|
-
if (suppressedMergeLines.has(line)) continue;
|
|
403
|
-
const pairId = mergeLineToPair.get(line);
|
|
404
|
-
if (pairId && fullyResolvedPairIds.has(pairId)) continue;
|
|
405
|
-
highlighted.add(line);
|
|
406
|
-
classification.set(line, pairId ? CHANGE_CLASS.CONFLICT : CHANGE_CLASS.SAFE);
|
|
407
|
-
}
|
|
408
|
-
return { mergeHighlightedLines: highlighted, mergeClassification: classification };
|
|
409
|
-
}, [
|
|
410
|
-
leftDiffChunks,
|
|
411
|
-
rightDiffChunks,
|
|
412
|
-
leftConflicts,
|
|
413
|
-
rightConflicts,
|
|
414
|
-
findPairForLeft,
|
|
415
|
-
findPairForRight,
|
|
416
|
-
fullyResolvedPairIds,
|
|
417
|
-
dismissedLeftLines,
|
|
418
|
-
dismissedRightLines
|
|
419
|
-
]);
|
|
420
|
-
const leftHighlightedLines = useMemo(
|
|
421
|
-
() => filterHighlightedLines(leftDiffChunks, "old", leftClassification, suppressedLeftLines),
|
|
422
|
-
[leftDiffChunks, leftClassification, suppressedLeftLines]
|
|
423
|
-
);
|
|
424
|
-
const rightHighlightedLines = useMemo(
|
|
425
|
-
() => filterHighlightedLines(rightDiffChunks, "new", rightClassification, suppressedRightLines),
|
|
426
|
-
[rightDiffChunks, rightClassification, suppressedRightLines]
|
|
427
|
-
);
|
|
428
|
-
const remainingSafeChanges = useMemo(() => {
|
|
429
|
-
const leftSafe = visibleLeftConflicts.filter((c) => !findPairForLeft(c)).length;
|
|
430
|
-
const rightSafe = visibleRightConflicts.filter((c) => !findPairForRight(c)).length;
|
|
431
|
-
return leftSafe + rightSafe;
|
|
432
|
-
}, [visibleLeftConflicts, visibleRightConflicts, findPairForLeft, findPairForRight]);
|
|
433
|
-
return {
|
|
434
|
-
mergeValue,
|
|
435
|
-
handleMergeChange,
|
|
436
|
-
leftConflicts: visibleLeftConflicts,
|
|
437
|
-
rightConflicts: visibleRightConflicts,
|
|
438
|
-
leftHighlightedLines,
|
|
439
|
-
rightHighlightedLines,
|
|
440
|
-
leftClassification,
|
|
441
|
-
rightClassification,
|
|
442
|
-
mergeHighlightedLines,
|
|
443
|
-
mergeClassification,
|
|
444
|
-
acceptLeft,
|
|
445
|
-
acceptRight,
|
|
446
|
-
dismissLeft,
|
|
447
|
-
dismissRight,
|
|
448
|
-
totalConflicts: conflictPairs.length,
|
|
449
|
-
resolvedConflicts: fullyResolvedPairIds.size,
|
|
450
|
-
remainingSafeChanges,
|
|
451
|
-
isDirty: mergeValue !== baseText || dismissedLeftLines.size > 0 || dismissedRightLines.size > 0,
|
|
452
|
-
reset
|
|
453
|
-
};
|
|
454
|
-
};
|
|
455
|
-
var pairChunksIntoConflicts = (chunks) => {
|
|
456
|
-
const conflicts = [];
|
|
457
|
-
let i = 0;
|
|
458
|
-
while (i < chunks.length) {
|
|
459
|
-
const chunk = chunks[i];
|
|
460
|
-
if (chunk.type === CHUNK_TYPE.UNCHANGED) {
|
|
461
|
-
i++;
|
|
462
|
-
continue;
|
|
463
|
-
}
|
|
464
|
-
if (chunk.type === CHUNK_TYPE.REMOVED) {
|
|
465
|
-
const next = chunks[i + 1];
|
|
466
|
-
if (next?.type === CHUNK_TYPE.ADDED) {
|
|
467
|
-
conflicts.push({
|
|
468
|
-
id: `${chunk.oldStart}-${next.newStart}`,
|
|
469
|
-
oldValue: chunk.value,
|
|
470
|
-
oldStartLine: chunk.oldStart,
|
|
471
|
-
oldEndLine: chunk.oldEnd,
|
|
472
|
-
newValue: next.value,
|
|
473
|
-
newStartLine: next.newStart,
|
|
474
|
-
newEndLine: next.newEnd
|
|
475
|
-
});
|
|
476
|
-
i += 2;
|
|
477
|
-
} else {
|
|
478
|
-
conflicts.push({
|
|
479
|
-
id: `${chunk.oldStart}-del`,
|
|
480
|
-
oldValue: chunk.value,
|
|
481
|
-
oldStartLine: chunk.oldStart,
|
|
482
|
-
oldEndLine: chunk.oldEnd,
|
|
483
|
-
newValue: "",
|
|
484
|
-
newStartLine: chunk.newStart,
|
|
485
|
-
newEndLine: chunk.newStart
|
|
486
|
-
});
|
|
487
|
-
i++;
|
|
488
|
-
}
|
|
489
|
-
} else {
|
|
490
|
-
conflicts.push({
|
|
491
|
-
id: `add-${chunk.newStart}`,
|
|
492
|
-
oldValue: "",
|
|
493
|
-
oldStartLine: chunk.oldStart,
|
|
494
|
-
oldEndLine: chunk.oldStart,
|
|
495
|
-
newValue: chunk.value,
|
|
496
|
-
newStartLine: chunk.newStart,
|
|
497
|
-
newEndLine: chunk.newEnd
|
|
498
|
-
});
|
|
499
|
-
i++;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
return conflicts;
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
export { useMergeDiff };
|
|
506
|
-
//# sourceMappingURL=chunk-BSQWZITZ.js.map
|
|
507
|
-
//# sourceMappingURL=chunk-BSQWZITZ.js.map
|