@keboola/design 11.9.0 → 12.0.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 +34 -8
- package/CHANGELOG.md +155 -0
- package/COMPONENT-API.md +337 -289
- package/README.md +11 -1
- package/dist/{AIKit-ELIsegJz.js → AIKit-BD4r7ff-.js} +404 -243
- package/dist/AIKit-BD4r7ff-.js.map +1 -0
- package/dist/{Alert-BsIM_oFK.js → Alert-UI-CIs-1.js} +16 -16
- package/dist/Alert-UI-CIs-1.js.map +1 -0
- package/dist/{AlertModal-BGJdaRRj.js → AlertModal-Th2khjPi.js} +5 -5
- package/dist/AlertModal-Th2khjPi.js.map +1 -0
- package/dist/{AppShell-DRgJxpXW.js → AppShell-WSQabK8r.js} +15 -52
- package/dist/AppShell-WSQabK8r.js.map +1 -0
- package/dist/{AutoSaveTextarea-BeuWuszr.js → AutoSaveTextarea-C5iIr2Ts.js} +2 -2
- package/dist/{AutoSaveTextarea-BeuWuszr.js.map → AutoSaveTextarea-C5iIr2Ts.js.map} +1 -1
- package/dist/{Badge-o5jURtpB.js → Badge-DIjhwPvh.js} +4 -9
- package/dist/Badge-DIjhwPvh.js.map +1 -0
- package/dist/{BrandEditor-BsTBM3s6.js → BrandEditor-BU23Vl8V.js} +7 -7
- package/dist/{BrandEditor-BsTBM3s6.js.map → BrandEditor-BU23Vl8V.js.map} +1 -1
- package/dist/{BrandLogo-CoKBk4MI.js → BrandLogo-CKpVSZb6.js} +4 -4
- package/dist/BrandLogo-CKpVSZb6.js.map +1 -0
- package/dist/{Breadcrumb-xqEUxfwn.js → Breadcrumb-p9HtMLCc.js} +8 -14
- package/dist/Breadcrumb-p9HtMLCc.js.map +1 -0
- package/dist/{Button-DsRrU5F1.js → Button-Ca4Q3VJU.js} +31 -13
- package/dist/Button-Ca4Q3VJU.js.map +1 -0
- package/dist/{Calendar-cG5NIJ4O.js → Calendar-DFtmZzbF.js} +99 -99
- package/dist/Calendar-DFtmZzbF.js.map +1 -0
- package/dist/{Card-Dyo7055Q.js → Card-Cr9MBNHu.js} +4 -4
- package/dist/Card-Cr9MBNHu.js.map +1 -0
- package/dist/{Checkbox-Dq5fPNrO.js → Checkbox-8yIIgY7g.js} +4 -4
- package/dist/Checkbox-8yIIgY7g.js.map +1 -0
- package/dist/{Clipboard-BZitKiSA.js → Clipboard-_xf6hMDD.js} +2 -2
- package/dist/{Clipboard-BZitKiSA.js.map → Clipboard-_xf6hMDD.js.map} +1 -1
- package/dist/{ClipboardButton-KHQnPEh_.js → ClipboardButton-DHa1trtI.js} +4 -4
- package/dist/{ClipboardButton-KHQnPEh_.js.map → ClipboardButton-DHa1trtI.js.map} +1 -1
- package/dist/{CodeEditor-BJKJXA0c.js → CodeEditor-BSo-oLFG.js} +55 -165
- package/dist/CodeEditor-BSo-oLFG.js.map +1 -0
- package/dist/{ColorInput-Bj3dfPFA.js → ColorInput-DSMqrs2-.js} +12 -27
- package/dist/ColorInput-DSMqrs2-.js.map +1 -0
- package/dist/{ColorModeSwitch-CWt-DZGC.js → ColorModeSwitch-D7EuWyJz.js} +7 -17
- package/dist/ColorModeSwitch-D7EuWyJz.js.map +1 -0
- package/dist/Combobox-CxRAYOBt.js +1069 -0
- package/dist/Combobox-CxRAYOBt.js.map +1 -0
- package/dist/{Command-BDU3C1gg.js → Command-BU_cVurn.js} +4 -4
- package/dist/{Command-BDU3C1gg.js.map → Command-BU_cVurn.js.map} +1 -1
- package/dist/{CopyField-BHRQUyuF.js → CopyField-6_c-NdLO.js} +17 -53
- package/dist/{CopyField-BHRQUyuF.js.map → CopyField-6_c-NdLO.js.map} +1 -1
- package/dist/{DateInput-B6N8g0ra.js → DateInput-DyEErfJf.js} +6 -6
- package/dist/{DateInput-B6N8g0ra.js.map → DateInput-DyEErfJf.js.map} +1 -1
- package/dist/{DatePicker-nA8YdE84.js → DatePicker-CtSa9b3V.js} +3 -3
- package/dist/{DatePicker-nA8YdE84.js.map → DatePicker-CtSa9b3V.js.map} +1 -1
- package/dist/{DateRangeInput-7M9Z4cVO.js → DateRangeInput-Dg7-VUd9.js} +10 -14
- package/dist/DateRangeInput-Dg7-VUd9.js.map +1 -0
- package/dist/{DateRangePicker-DjSUFjh4.js → DateRangePicker-BoPnh4aH.js} +9 -13
- package/dist/DateRangePicker-BoPnh4aH.js.map +1 -0
- package/dist/DiffView-ppTIzh2h.js.map +1 -1
- package/dist/{DropdownMenu-CgVwhDvl.js → DropdownMenu-gRM-A8qU.js} +3 -3
- package/dist/DropdownMenu-gRM-A8qU.js.map +1 -0
- package/dist/{FieldItem-DZGIdiXE.js → FieldItem-2wMXQ0Qw.js} +12 -25
- package/dist/FieldItem-2wMXQ0Qw.js.map +1 -0
- package/dist/{FieldItem-vhIJW4pj.d.ts → FieldItem-CPN1xjN5.d.ts} +11 -25
- package/dist/{FileUpload-DYQCTGjU.js → FileUpload-C83tXuE2.js} +11 -16
- package/dist/{FileUpload-DYQCTGjU.js.map → FileUpload-C83tXuE2.js.map} +1 -1
- package/dist/{Form-CcK7dRrC.js → Form-95rVLfX8.js} +15 -23
- package/dist/{Form-CcK7dRrC.js.map → Form-95rVLfX8.js.map} +1 -1
- package/dist/{FormGroup-DR_gZ25-.js → FormGroup-CmNiAtU6.js} +11 -17
- package/dist/FormGroup-CmNiAtU6.js.map +1 -0
- package/dist/{FullScreenModal-CN9nAs72.js → FullScreenModal-CD7mYeTz.js} +15 -29
- package/dist/FullScreenModal-CD7mYeTz.js.map +1 -0
- package/dist/{HoverCard-B9ZMJxjn.js → HoverCard-B8OKu9XZ.js} +2 -2
- package/dist/{HoverCard-B9ZMJxjn.js.map → HoverCard-B8OKu9XZ.js.map} +1 -1
- package/dist/{InputGroup-Do8K2hvD.js → InputGroup-B4QOPxHl.js} +11 -13
- package/dist/InputGroup-B4QOPxHl.js.map +1 -0
- package/dist/{Kbd-LCFMumoq.js → Kbd-J4n1J6i4.js} +23 -13
- package/dist/Kbd-J4n1J6i4.js.map +1 -0
- package/dist/{MarkedText-DNGEUVWc.js → MarkedText-DlmlJO0u.js} +2 -2
- package/dist/{MarkedText-DNGEUVWc.js.map → MarkedText-DlmlJO0u.js.map} +1 -1
- package/dist/{MermaidDiagram-ZG0iiDV_.js → MermaidDiagram-BQvz6bhv.js} +16 -34
- package/dist/MermaidDiagram-BQvz6bhv.js.map +1 -0
- package/dist/{Modal-I3VWk2oo.js → Modal-Driyqs_N.js} +17 -34
- package/dist/Modal-Driyqs_N.js.map +1 -0
- package/dist/{ModalTitle-CeLM_mX9.js → ModalTitle-BxopkIoQ.js} +3 -3
- package/dist/ModalTitle-BxopkIoQ.js.map +1 -0
- package/dist/{MultiActionButtonGroup-CYZ8IgSf.js → MultiActionButtonGroup-BPnmzBtw.js} +3 -3
- package/dist/{MultiActionButtonGroup-CYZ8IgSf.js.map → MultiActionButtonGroup-BPnmzBtw.js.map} +1 -1
- package/dist/{Navbar-Liy1TPI7.js → Navbar-B_DNpv5s.js} +9 -13
- package/dist/{Navbar-Liy1TPI7.js.map → Navbar-B_DNpv5s.js.map} +1 -1
- package/dist/{OtpInput-CbbymqYs.js → OtpInput-I8B8Vjdl.js} +2 -2
- package/dist/{OtpInput-CbbymqYs.js.map → OtpInput-I8B8Vjdl.js.map} +1 -1
- package/dist/{PageHeader-Q3IpCnQd.js → PageHeader-CgfyXpf1.js} +13 -26
- package/dist/PageHeader-CgfyXpf1.js.map +1 -0
- package/dist/{PageLayout-DSVM-ASz.js → PageLayout-DiAAILuS.js} +12 -20
- package/dist/PageLayout-DiAAILuS.js.map +1 -0
- package/dist/{PageToolbar-BKVJiDAL.js → PageToolbar-DOAtAnfL.js} +12 -42
- package/dist/PageToolbar-DOAtAnfL.js.map +1 -0
- package/dist/{Pagination-C_b7Xhey.js → Pagination-LaSg-5cl.js} +3 -3
- package/dist/{Pagination-C_b7Xhey.js.map → Pagination-LaSg-5cl.js.map} +1 -1
- package/dist/{Popconfirm-5pBzT_HQ.js → Popconfirm-SLz0zodk.js} +3 -3
- package/dist/{Popconfirm-5pBzT_HQ.js.map → Popconfirm-SLz0zodk.js.map} +1 -1
- package/dist/{Popover-BEbQrC_P.js → Popover-CEk915I1.js} +4 -3
- package/dist/Popover-CEk915I1.js.map +1 -0
- package/dist/{RadioGroup-Byc2mym4.js → RadioGroup-CBPRLRN0.js} +4 -4
- package/dist/{RadioGroup-Byc2mym4.js.map → RadioGroup-CBPRLRN0.js.map} +1 -1
- package/dist/{Search-Dhig_hPD.js → Search-DmkQo716.js} +3 -3
- package/dist/{Search-Dhig_hPD.js.map → Search-DmkQo716.js.map} +1 -1
- package/dist/{SearchInput-92r2bkA7.js → SearchInput-CEfQDNl3.js} +8 -13
- package/dist/SearchInput-CEfQDNl3.js.map +1 -0
- package/dist/{SectionNav-CNLJsiVG.js → SectionNav-B_qf0AXi.js} +10 -42
- package/dist/SectionNav-B_qf0AXi.js.map +1 -0
- package/dist/{Select-DV3Hak_l.js → Select-ByRvkZ3D.js} +8 -11
- package/dist/{Select-DV3Hak_l.js.map → Select-ByRvkZ3D.js.map} +1 -1
- package/dist/{Sheet-OparjIi-.js → Sheet-C-yXk5Da.js} +5 -9
- package/dist/Sheet-C-yXk5Da.js.map +1 -0
- package/dist/{Sidebar-CLEbBtNY.js → Sidebar-Ds0E6PbR.js} +16 -33
- package/dist/Sidebar-Ds0E6PbR.js.map +1 -0
- package/dist/{Slider-DLclvRws.js → Slider-DWdu9NuM.js} +3 -3
- package/dist/{Slider-DLclvRws.js.map → Slider-DWdu9NuM.js.map} +1 -1
- package/dist/{Stepper-C8sm9ZFM.js → Stepper-BLkLhfnd.js} +6 -9
- package/dist/{Stepper-C8sm9ZFM.js.map → Stepper-BLkLhfnd.js.map} +1 -1
- package/dist/{Switch-B0WdGSjz.js → Switch-DZvNePOm.js} +2 -2
- package/dist/{Switch-B0WdGSjz.js.map → Switch-DZvNePOm.js.map} +1 -1
- package/dist/{Table-CvYuTuNU.js → Table-BaVT5Tkn.js} +6 -11
- package/dist/{Table-CvYuTuNU.js.map → Table-BaVT5Tkn.js.map} +1 -1
- package/dist/{Tabs-eB974xJf.js → Tabs-Dt9oLYHC.js} +3 -3
- package/dist/{Tabs-eB974xJf.js.map → Tabs-Dt9oLYHC.js.map} +1 -1
- package/dist/{TextInput-CFTf4Cz1.js → TextInput-CDG2XpBl.js} +10 -14
- package/dist/TextInput-CDG2XpBl.js.map +1 -0
- package/dist/{ThemeProvider-DAmNn9Sd.js → ThemeProvider-DXsxFg1U.js} +13 -31
- package/dist/ThemeProvider-DXsxFg1U.js.map +1 -0
- package/dist/{TimePicker-BGeqc-Ed.js → TimePicker-CDGYrRxi.js} +2 -2
- package/dist/{TimePicker-BGeqc-Ed.js.map → TimePicker-CDGYrRxi.js.map} +1 -1
- package/dist/{Timeline-C8-wnRRr.js → Timeline-B-I6sb0M.js} +2 -2
- package/dist/{Timeline-C8-wnRRr.js.map → Timeline-B-I6sb0M.js.map} +1 -1
- package/dist/{Toast-Dr6Uw7ao.js → Toast-PfQf3vj-.js} +2 -2
- package/dist/{Toast-Dr6Uw7ao.js.map → Toast-PfQf3vj-.js.map} +1 -1
- package/dist/{Workbench-UR2FBC7I.js → Workbench-DmZzpkj7.js} +2 -2
- package/dist/{Workbench-UR2FBC7I.js.map → Workbench-DmZzpkj7.js.map} +1 -1
- package/dist/{ZoomableSvg-BZlk3PFJ.js → ZoomableSvg-BzXVfgnI.js} +5 -19
- package/dist/ZoomableSvg-BzXVfgnI.js.map +1 -0
- package/dist/charts.d.ts +21 -52
- package/dist/charts.js +13 -39
- package/dist/charts.js.map +1 -1
- package/dist/{context-D7X470dy.js → context-U293r3v-.js} +5 -9
- package/dist/context-U293r3v-.js.map +1 -0
- package/dist/editors.d.ts +27 -124
- package/dist/editors.js +29 -71
- package/dist/editors.js.map +1 -1
- package/dist/{findLiteralMatches-BGBw8Vbl.js → findLiteralMatches-DgGLzyG0.js} +8 -20
- package/dist/findLiteralMatches-DgGLzyG0.js.map +1 -0
- package/dist/flint.d.ts +3 -6
- package/dist/flint.js +31 -80
- package/dist/flint.js.map +1 -1
- package/dist/{icons-Cek151jC.js → icons-wcA70iQx.js} +105 -2
- package/dist/icons-wcA70iQx.js.map +1 -0
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +2 -2
- package/dist/{index-m-kQEWiY.d.ts → index-B7k-09i1.d.ts} +14 -2
- package/dist/index.d.ts +1151 -1838
- package/dist/index.js +68 -67
- package/dist/internal/blocks/AIKit.js +2 -2
- package/dist/internal/blocks/AppShell.js +1 -1
- package/dist/internal/blocks/AuthLayout.js +7 -27
- package/dist/internal/blocks/AuthLayout.js.map +1 -1
- package/dist/internal/blocks/AutoSaveTextarea.js +1 -1
- package/dist/internal/blocks/BrandEditor.js +1 -1
- package/dist/internal/blocks/ChartPanel.js +4 -8
- package/dist/internal/blocks/ChartPanel.js.map +1 -1
- package/dist/internal/blocks/ChipEditor.js +13 -21
- package/dist/internal/blocks/ChipEditor.js.map +1 -1
- package/dist/internal/blocks/ClipboardButton.js +1 -1
- package/dist/internal/blocks/ColorInput.js +1 -1
- package/dist/internal/blocks/ColorModeSwitch.js +1 -1
- package/dist/internal/blocks/Command.js +1 -1
- package/dist/internal/blocks/CopyField.js +1 -1
- package/dist/internal/blocks/DashboardHero.js +4 -7
- package/dist/internal/blocks/DashboardHero.js.map +1 -1
- package/dist/internal/blocks/DateInput.js +1 -1
- package/dist/internal/blocks/DateRangeInput.js +1 -1
- package/dist/internal/blocks/EmptyConfigurationActionCard.js +1 -1
- package/dist/internal/blocks/EmptyState.js +5 -9
- package/dist/internal/blocks/EmptyState.js.map +1 -1
- package/dist/internal/blocks/ErrorState.js +5 -9
- package/dist/internal/blocks/ErrorState.js.map +1 -1
- package/dist/internal/blocks/ExportMenu.js +6 -10
- package/dist/internal/blocks/ExportMenu.js.map +1 -1
- package/dist/internal/blocks/Form/connectors/ComboboxField.js +40 -0
- package/dist/internal/blocks/Form/connectors/ComboboxField.js.map +1 -0
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +5 -22
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js.map +1 -1
- package/dist/internal/blocks/Form.js +1 -1
- package/dist/internal/blocks/FormGroup.js +1 -1
- package/dist/internal/blocks/GoogleButton.js +1 -1
- package/dist/internal/blocks/MicrosoftButton.js +1 -1
- package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
- package/dist/internal/blocks/MultiCombobox.js +161 -154
- package/dist/internal/blocks/MultiCombobox.js.map +1 -1
- package/dist/internal/blocks/NumberInput.js +1 -1
- package/dist/internal/blocks/OtpInput.js +1 -1
- package/dist/internal/blocks/PageHeader.js +1 -1
- package/dist/internal/blocks/PageLayout.js +1 -1
- package/dist/internal/blocks/PageToolbar.js +1 -1
- package/dist/internal/blocks/PasswordInput.js +4 -4
- package/dist/internal/blocks/PasswordInput.js.map +1 -1
- package/dist/internal/blocks/SearchInput.js +1 -1
- package/dist/internal/blocks/SearchInputWithNavigation.js +4 -4
- package/dist/internal/blocks/SectionNav.js +1 -1
- package/dist/internal/blocks/SplitButton.js +3 -3
- package/dist/internal/blocks/StatCard.js +4 -8
- package/dist/internal/blocks/StatCard.js.map +1 -1
- package/dist/internal/blocks/TextInput.js +1 -1
- package/dist/internal/blocks/Textarea.js +2 -2
- package/dist/internal/blocks/TimeInput.js +5 -5
- package/dist/internal/blocks/TimeInput.js.map +1 -1
- package/dist/internal/components/Alert.js +1 -1
- package/dist/internal/components/AlertModal.js +1 -1
- package/dist/internal/components/Avatar.js +1 -1
- package/dist/internal/components/Badge.js +1 -1
- package/dist/internal/components/BrandLogo.js +1 -1
- package/dist/internal/components/Breadcrumb.js +1 -1
- package/dist/internal/components/Button.js +1 -1
- package/dist/internal/components/ButtonGroup.js.map +1 -1
- package/dist/internal/components/Calendar.js +1 -1
- package/dist/internal/components/Card.js +1 -1
- package/dist/internal/components/Checkbox.js +1 -1
- package/dist/internal/components/Clipboard.js +1 -1
- package/dist/internal/components/CollapsiblePanel.js +2 -2
- package/dist/internal/components/Combobox.js +2 -2
- package/dist/internal/components/DatePicker.js +1 -1
- package/dist/internal/components/DateRangePicker.js +1 -1
- package/dist/internal/components/DropdownMenu.js +1 -1
- package/dist/internal/components/FileUpload.js +1 -1
- package/dist/internal/components/FullScreenModal.js +1 -1
- package/dist/internal/components/HoverCard.js +1 -1
- package/dist/internal/components/InputGroup.js +1 -1
- package/dist/internal/components/Kbd.js +1 -1
- package/dist/internal/components/MarkedText.js +1 -1
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +1 -1
- package/dist/internal/components/Modal.js +1 -1
- package/dist/internal/components/Navbar.js +1 -1
- package/dist/internal/components/Pagination.js +1 -1
- package/dist/internal/components/PanelWithDetails.js +1 -1
- package/dist/internal/components/Popconfirm.js +1 -1
- package/dist/internal/components/Popover.js +1 -1
- package/dist/internal/components/RadioGroup.js +1 -1
- package/dist/internal/components/Search.js +1 -1
- package/dist/internal/components/Select.js +1 -1
- package/dist/internal/components/Separator.js.map +1 -1
- package/dist/internal/components/Sheet.js +1 -1
- package/dist/internal/components/Sidebar.js +1 -1
- package/dist/internal/components/Skeleton/Skeleton.js +5 -9
- package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/internal/components/Slider.js +1 -1
- package/dist/internal/components/SpotlightBackdrop.js +3 -8
- package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
- package/dist/internal/components/StatusDot.js +8 -15
- package/dist/internal/components/StatusDot.js.map +1 -1
- package/dist/internal/components/Stepper.js +1 -1
- package/dist/internal/components/Switch.js +1 -1
- package/dist/internal/components/Table.js +1 -1
- package/dist/internal/components/Tabs.js +1 -1
- package/dist/internal/components/ThemeProvider.js +3 -3
- package/dist/internal/components/TimePicker.js +1 -1
- package/dist/internal/components/Timeline.js +1 -1
- package/dist/internal/components/Toast.js +2 -2
- package/dist/internal/components/Tooltip.js +1 -1
- package/dist/internal/components/Truncated.js +4 -8
- package/dist/internal/components/Truncated.js.map +1 -1
- package/dist/internal/components/Workbench.js +1 -1
- package/dist/internal/components/ZoomableSvg.js +1 -1
- package/dist/internal/hooks/useScrollbarPosition.js +1 -1
- package/dist/internal/hooks/useStableCallback.js +4 -13
- package/dist/internal/hooks/useStableCallback.js.map +1 -1
- package/dist/internal/utils.js +2 -2
- package/dist/markdown-editor.d.ts +15 -37
- package/dist/markdown-editor.js +17 -23
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.d.ts +4 -6
- package/dist/mermaid.js +1 -1
- package/dist/rjsf.d.ts +9 -19
- package/dist/rjsf.js +44 -84
- package/dist/rjsf.js.map +1 -1
- package/dist/{styles-BAFscjSV.js → styles-gzcjOyKv.js} +6 -6
- package/dist/styles-gzcjOyKv.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/svgTransforms-Dw2hRA-i.js +51 -0
- package/dist/svgTransforms-Dw2hRA-i.js.map +1 -0
- package/dist/testing.d.ts +3 -10
- package/dist/testing.js +5 -12
- package/dist/testing.js.map +1 -1
- package/dist/themeTokens-7DEab0kp.js +31 -0
- package/dist/themeTokens-7DEab0kp.js.map +1 -0
- package/dist/{toast-DIC0iNRf.js → toast-CyXEdaCZ.js} +3 -3
- package/dist/toast-CyXEdaCZ.js.map +1 -0
- package/dist/{themeScopeContext-D7fSyb06.js → useColorSchemeState-Cw4MCXUs.js} +14 -14
- package/dist/useColorSchemeState-Cw4MCXUs.js.map +1 -0
- package/dist/{useControllableState-M6494mCT.js → useControllableState-CUYXMsfz.js} +3 -7
- package/dist/useControllableState-CUYXMsfz.js.map +1 -0
- package/dist/useElement-D-RjrGa4.js +21 -0
- package/dist/useElement-D-RjrGa4.js.map +1 -0
- package/dist/useThemeAttributes-B199Regy.js +67 -0
- package/dist/useThemeAttributes-B199Regy.js.map +1 -0
- package/dist/{utils-BW4AE8VP.js → utils-Bd28bWgm.js} +31 -26
- package/dist/utils-Bd28bWgm.js.map +1 -0
- package/dist/vega.d.ts +8 -30
- package/dist/vega.js +5 -13
- package/dist/vega.js.map +1 -1
- package/dist/{vegaTheme-CSvFEMBl.js → vegaTheme-VQMWTlBw.js} +7 -21
- package/dist/vegaTheme-VQMWTlBw.js.map +1 -0
- package/package.json +10 -9
- package/src/styles.css +120 -14
- package/src/theme.css +126 -6
- package/dist/AIKit-ELIsegJz.js.map +0 -1
- package/dist/Alert-BsIM_oFK.js.map +0 -1
- package/dist/AlertModal-BGJdaRRj.js.map +0 -1
- package/dist/AppShell-DRgJxpXW.js.map +0 -1
- package/dist/Badge-o5jURtpB.js.map +0 -1
- package/dist/BrandLogo-CoKBk4MI.js.map +0 -1
- package/dist/Breadcrumb-xqEUxfwn.js.map +0 -1
- package/dist/Button-DsRrU5F1.js.map +0 -1
- package/dist/Calendar-cG5NIJ4O.js.map +0 -1
- package/dist/Card-Dyo7055Q.js.map +0 -1
- package/dist/Checkbox-Dq5fPNrO.js.map +0 -1
- package/dist/CodeEditor-BJKJXA0c.js.map +0 -1
- package/dist/ColorInput-Bj3dfPFA.js.map +0 -1
- package/dist/ColorModeSwitch-CWt-DZGC.js.map +0 -1
- package/dist/Combobox-D8PrEqTG.js +0 -619
- package/dist/Combobox-D8PrEqTG.js.map +0 -1
- package/dist/DateRangeInput-7M9Z4cVO.js.map +0 -1
- package/dist/DateRangePicker-DjSUFjh4.js.map +0 -1
- package/dist/DropdownMenu-CgVwhDvl.js.map +0 -1
- package/dist/FieldItem-DZGIdiXE.js.map +0 -1
- package/dist/FormGroup-DR_gZ25-.js.map +0 -1
- package/dist/FullScreenModal-CN9nAs72.js.map +0 -1
- package/dist/InputGroup-Do8K2hvD.js.map +0 -1
- package/dist/Kbd-LCFMumoq.js.map +0 -1
- package/dist/MermaidDiagram-ZG0iiDV_.js.map +0 -1
- package/dist/Modal-I3VWk2oo.js.map +0 -1
- package/dist/ModalTitle-CeLM_mX9.js.map +0 -1
- package/dist/PageHeader-Q3IpCnQd.js.map +0 -1
- package/dist/PageLayout-DSVM-ASz.js.map +0 -1
- package/dist/PageToolbar-BKVJiDAL.js.map +0 -1
- package/dist/Popover-BEbQrC_P.js.map +0 -1
- package/dist/SearchInput-92r2bkA7.js.map +0 -1
- package/dist/SectionNav-CNLJsiVG.js.map +0 -1
- package/dist/Sheet-OparjIi-.js.map +0 -1
- package/dist/Sidebar-CLEbBtNY.js.map +0 -1
- package/dist/TextInput-CFTf4Cz1.js.map +0 -1
- package/dist/ThemeProvider-DAmNn9Sd.js.map +0 -1
- package/dist/ZoomableSvg-BZlk3PFJ.js.map +0 -1
- package/dist/context-D7X470dy.js.map +0 -1
- package/dist/findLiteralMatches-BGBw8Vbl.js.map +0 -1
- package/dist/icons-Cek151jC.js.map +0 -1
- package/dist/styles-BAFscjSV.js.map +0 -1
- package/dist/svgTransforms-CJAYPk7o.js +0 -81
- package/dist/svgTransforms-CJAYPk7o.js.map +0 -1
- package/dist/themeScopeContext-D7fSyb06.js.map +0 -1
- package/dist/themeTokens-qP1-55O7.js +0 -119
- package/dist/themeTokens-qP1-55O7.js.map +0 -1
- package/dist/toast-DIC0iNRf.js.map +0 -1
- package/dist/useControllableState-M6494mCT.js.map +0 -1
- package/dist/useElement-BK3AAiIf.js +0 -24
- package/dist/useElement-BK3AAiIf.js.map +0 -1
- package/dist/utils-BW4AE8VP.js.map +0 -1
- package/dist/vegaTheme-CSvFEMBl.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-U293r3v-.js","names":[],"sources":["../src/components/ThemeProvider/context.tsx"],"sourcesContent":["import { createContext, use } from 'react';\n\nimport type { Brand } from '@keboola/brand-registry';\n\nimport { DEFAULT_COLOR_SCHEME, defaultBrand, defaultTheme } from './defaults';\nimport type { Theme } from './types';\nimport type { useBrandState } from './useBrandState';\nimport type { useColorSchemeState } from './useColorSchemeState';\n\nexport type ThemeContextValue = ReturnType<typeof useColorSchemeState> &\n ReturnType<typeof useBrandState> & {\n themes: Theme[];\n currentTheme: Theme;\n /** Raw brand tokens, so a nested `ThemeScope` can re-derive them for another scheme. */\n brandTheme: Brand['theme'];\n };\n\nconst noop = () => void 0;\n\nconst defaultContext: ThemeContextValue = {\n scheme: DEFAULT_COLOR_SCHEME,\n resolvedScheme: DEFAULT_COLOR_SCHEME,\n setScheme: noop,\n brandId: defaultTheme.id,\n setBrand: noop,\n\n themes: [defaultTheme],\n currentTheme: defaultTheme,\n brandTheme: defaultBrand.theme,\n};\n\nexport const ThemeContext = createContext(defaultContext);\n\nexport const useTheme = () => use(ThemeContext);\n\n/**\n * TEMPORARY, kbc-ui-internal: whether the subtree renders the argo design language.\n *\n * - kbc-ui provides `false` for legacy brands/surfaces (its `AppThemeProvider`).\n * - `ThemeProvider` never sets it — argo is independent of the brand.\n * - Delete it and `useArgoDesign` once kbc-ui's chrome is migrated.\n */\nexport const ArgoDesignContext = createContext<boolean>(true);\n\nexport const useArgoDesign = () => use(ArgoDesignContext);\n"],"mappings":";;;AAiBA,MAAM,aAAa,KAAK;AAExB,MAAM,iBAAoC;CACxC,QAAQ;CACR,gBAAgB;CAChB,WAAW;CACX,SAAS,aAAa;CACtB,UAAU;CAEV,QAAQ,CAAC,YAAY;CACrB,cAAc;CACd,YAAY,aAAa;AAC3B;AAEA,MAAa,eAAe,cAAc,cAAc;AAExD,MAAa,iBAAiB,IAAI,YAAY;;;;;;;;AAS9C,MAAa,oBAAoB,cAAuB,IAAI;AAE5D,MAAa,sBAAsB,IAAI,iBAAiB"}
|
package/dist/editors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./types-BPcAjMG0.js";
|
|
2
|
-
import { ChangeClassification, FieldItemProps, MergeConflict } from "./FieldItem-
|
|
2
|
+
import { ChangeClassification, FieldItemProps, MergeConflict } from "./FieldItem-CPN1xjN5.js";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
4
|
import { CompletionSource } from "@codemirror/autocomplete";
|
|
5
5
|
import { EditorView } from "@codemirror/view";
|
|
@@ -24,99 +24,35 @@ type EditorVariable = {
|
|
|
24
24
|
type Props$3 = {
|
|
25
25
|
value: string;
|
|
26
26
|
previousValue?: string;
|
|
27
|
-
/**
|
|
28
|
-
* `'field'` draws the chrome an `InputGroup` draws — surface, border, radius,
|
|
29
|
-
* focus ring, read-only wash — for an editor that is one control among others
|
|
30
|
-
* in a form. It sizes to its content, so don't pin its height.
|
|
31
|
-
*
|
|
32
|
-
* `'plain'` (the default) is the full-bleed surface of an editor that *is* the
|
|
33
|
-
* panel: a modal body, a chat block, a fixed-height viewer already framed by
|
|
34
|
-
* whatever contains it.
|
|
35
|
-
*/
|
|
27
|
+
/** `'field'`: `InputGroup` chrome, sized to content (don't pin height). `'plain'`: full-bleed panel. */
|
|
36
28
|
variant?: 'plain' | 'field';
|
|
37
29
|
mode?: LANGUAGE_MODE;
|
|
38
30
|
placeholder?: string;
|
|
39
|
-
/**
|
|
31
|
+
/** Screen-reader name: the editor has no visible label of its own. */
|
|
40
32
|
ariaLabel?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Names the editable region from an existing element, for when the label is already on screen.
|
|
43
|
-
* Prefer this over `ariaLabel` inside a form — `CodeEditorField` passes the field's own label id.
|
|
44
|
-
*/
|
|
33
|
+
/** Prefer over `ariaLabel` inside a form. */
|
|
45
34
|
ariaLabelledBy?: string;
|
|
46
|
-
/** Links the editable region to help / error text. Space-delimited idref list. */
|
|
47
35
|
ariaDescribedBy?: string;
|
|
48
|
-
/**
|
|
36
|
+
/** Visual error styling is the caller's (`variant="field"`). */
|
|
49
37
|
ariaInvalid?: boolean;
|
|
50
38
|
ariaRequired?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Treats a blank document as valid instead of a parse error (JSON modes only).
|
|
53
|
-
*
|
|
54
|
-
* - Off by default: for a standalone editor "Unexpected end of input" is correct, and at several
|
|
55
|
-
* call sites the gutter marker is the only thing explaining a Save button that
|
|
56
|
-
* `isValidJsonConfig('') === false` has already disabled.
|
|
57
|
-
* - `CodeEditorField` turns it on for a field that is not `required`, where an empty document is
|
|
58
|
-
* how the value is removed.
|
|
59
|
-
*/
|
|
39
|
+
/** JSON modes: a blank document is not a parse error. Off by default: the mark explains a disabled Save. */
|
|
60
40
|
allowBlankDocument?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Fires when focus leaves the editable region — what a form connector needs to mark its field
|
|
63
|
-
* blurred, which is the gate errors are revealed on.
|
|
64
|
-
*
|
|
65
|
-
* - Bound as a CodeMirror DOM handler on the content node, not on the wrapper: the wrapper is not
|
|
66
|
-
* what gets focused.
|
|
67
|
-
* - Installed only when passed, so an editor without it keeps the extension set it had.
|
|
68
|
-
*/
|
|
41
|
+
/** Bound on CodeMirror's content node (the wrapper is not what gets focused). */
|
|
69
42
|
onBlur?: () => void;
|
|
70
|
-
/**
|
|
71
|
-
* Highlights every occurrence and scrolls the selected one into view. The find
|
|
72
|
-
* UI is the caller's — pass the query it holds, and omit both props entirely to
|
|
73
|
-
* leave the search extension uninstalled.
|
|
74
|
-
*/
|
|
43
|
+
/** Highlights matches; the find UI is the caller's. Omit both props to skip the search extension. */
|
|
75
44
|
searchQuery?: string;
|
|
76
45
|
searchMatchIndex?: number;
|
|
77
46
|
readOnly?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Refuses edits while leaving the editor looking and behaving as it did — for a
|
|
80
|
-
* transient lock such as an in-flight save, where a keystroke landing mid-request
|
|
81
|
-
* would be overwritten by the response. `readOnly` is the wrong prop for that:
|
|
82
|
-
* it turns the editor into a viewer, greying the surface and taking the lint
|
|
83
|
-
* marks and completions with it.
|
|
84
|
-
*/
|
|
47
|
+
/** Refuses edits without changing the look, e.g. during a save; `readOnly` makes a greyed viewer. */
|
|
85
48
|
inputLocked?: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* A flat list of completions, offered everywhere in the document. One word per
|
|
88
|
-
* label: CodeMirror derives the pattern for the word being completed from the
|
|
89
|
-
* labels' characters, so a space in one widens it across whitespace and the
|
|
90
|
-
* editor offers nothing past the first word of a line. A phrase belongs in
|
|
91
|
-
* `completionSource`.
|
|
92
|
-
*
|
|
93
|
-
* Compared by identity, like `completionSource` — hand the editor a stable array.
|
|
94
|
-
*/
|
|
49
|
+
/** One word per label (a space breaks matching; phrases go in `completionSource`). Pass a stable array. */
|
|
95
50
|
autocompletions?: string[];
|
|
96
|
-
/**
|
|
97
|
-
* Completions that depend on where the cursor is — a column list offered only
|
|
98
|
-
* after its table, say. Wins over both `autocompletions` and `completeAny`,
|
|
99
|
-
* which stay the right props for a list that is the same everywhere in the
|
|
100
|
-
* document and for having no list at all. Like them, it opens on typing.
|
|
101
|
-
*
|
|
102
|
-
* Compared by identity: build it in a `useMemo` or the editor rebuilds its whole
|
|
103
|
-
* extension tree on every render.
|
|
104
|
-
*/
|
|
51
|
+
/** Cursor-dependent completions; wins over `autocompletions` / `completeAny`. Memoize it. */
|
|
105
52
|
completionSource?: CompletionSource;
|
|
106
|
-
/**
|
|
107
|
-
* Configuration variables, completed into `{{name}}`. Independent of
|
|
108
|
-
* `completionSource`: both are offered, so a caller keeps its own completions and
|
|
109
|
-
* gets variables spelled the way the rest of the platform writes them.
|
|
110
|
-
*/
|
|
53
|
+
/** Completed into `{{name}}`, alongside `completionSource`. */
|
|
111
54
|
variables?: EditorVariable[];
|
|
112
|
-
/**
|
|
113
|
-
* Whether the completion popup runs at all.
|
|
114
|
-
*
|
|
115
|
-
* - `false` silences every source, the *language's* own vocabulary included.
|
|
116
|
-
* - For a field highlighted as a language nobody authors there: pasted `.env` and a
|
|
117
|
-
* cURL command sit in shell mode for its colours, and shell's `ls`, `sudo`, `vim`
|
|
118
|
-
* are noise over content we cannot predict.
|
|
119
|
-
*/
|
|
55
|
+
/** `false` silences every source, the language's own included (e.g. shell mode used only for colours). */
|
|
120
56
|
withCompletions?: boolean;
|
|
121
57
|
extraKeys?: Record<string, () => void>;
|
|
122
58
|
withToggleCommentHint?: boolean;
|
|
@@ -128,11 +64,7 @@ type Props$3 = {
|
|
|
128
64
|
completeAny?: boolean;
|
|
129
65
|
help?: ReactNode;
|
|
130
66
|
helpPostfix?: ReactNode;
|
|
131
|
-
/**
|
|
132
|
-
* Extra actions for the toolbar that floats over the editor's top-right corner,
|
|
133
|
-
* beside the copy button. The toolbar is a 28px chip, so pass `size="icon-xs"`
|
|
134
|
-
* buttons — a default-sized one grows the chip and de-aligns the copy button.
|
|
135
|
-
*/
|
|
67
|
+
/** Toolbar actions beside the copy button; pass `size="icon-xs"` buttons to fit the 28px chip. */
|
|
136
68
|
renderAdditionalButtons?: (value?: string) => ReactNode;
|
|
137
69
|
className?: string;
|
|
138
70
|
} & ({
|
|
@@ -142,7 +74,7 @@ type Props$3 = {
|
|
|
142
74
|
readOnly?: boolean;
|
|
143
75
|
onChange: (value: string) => void;
|
|
144
76
|
});
|
|
145
|
-
declare const CodeEditor: ({ value, previousValue, onChange, variant, mode, placeholder, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid, ariaRequired, allowBlankDocument, onBlur, searchQuery, searchMatchIndex, readOnly, inputLocked, autocompletions, completionSource, variables, withCompletions, extraKeys, withToggleCommentHint, withAutofocus, withLineNumbers, withLineWrapping, withCollapseUnchanged, withCopyButton, completeAny, help, helpPostfix, renderAdditionalButtons, className }: Props$3) => import("react
|
|
77
|
+
declare const CodeEditor: ({ value, previousValue, onChange, variant, mode, placeholder, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid, ariaRequired, allowBlankDocument, onBlur, searchQuery, searchMatchIndex, readOnly, inputLocked, autocompletions, completionSource, variables, withCompletions, extraKeys, withToggleCommentHint, withAutofocus, withLineNumbers, withLineWrapping, withCollapseUnchanged, withCopyButton, completeAny, help, helpPostfix, renderAdditionalButtons, className }: Props$3) => import("react").JSX.Element;
|
|
146
78
|
//#endregion
|
|
147
79
|
//#region src/components/CodeEditor/highlighting.d.ts
|
|
148
80
|
type HighlightedLines = {
|
|
@@ -175,19 +107,11 @@ type Props$2 = {
|
|
|
175
107
|
autoFocus?: boolean;
|
|
176
108
|
lineNumbers?: boolean;
|
|
177
109
|
className?: string;
|
|
178
|
-
/**
|
|
179
|
-
* A schema is too large to compare by value, so this one prop keeps the
|
|
180
|
-
* identity requirement every other prop here is now free of: hand the editor
|
|
181
|
-
* a stable object, or it rebuilds its whole extension tree on every render.
|
|
182
|
-
*/
|
|
110
|
+
/** Compared by identity: pass a stable object or the extension tree rebuilds every render. */
|
|
183
111
|
schema?: SQLNamespace;
|
|
184
112
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* `CodeEditor`'s prop of the same name, it replaces nothing.
|
|
188
|
-
*
|
|
189
|
-
* Compared by identity: build it in a `useMemo` or the editor rebuilds its whole
|
|
190
|
-
* extension tree on every render.
|
|
113
|
+
* Added to schema/keyword/variable completions; unlike `CodeEditor`'s, replaces nothing.
|
|
114
|
+
* Compared by identity: `useMemo` it or the extension tree rebuilds every render.
|
|
191
115
|
*/
|
|
192
116
|
completionSource?: CompletionSource;
|
|
193
117
|
variables?: EditorVariable[];
|
|
@@ -196,7 +120,7 @@ type Props$2 = {
|
|
|
196
120
|
highlightLines?: HighlightedLines;
|
|
197
121
|
dialect?: SqlDialectName$1;
|
|
198
122
|
};
|
|
199
|
-
declare const SqlEditor: ({ value, onChange, onSelectionChange, onCreateEditor, onDestroyEditor, onBlurEditor, onFocusEditor, placeholder, searchQuery, searchMatchIndex, readOnly, queryParser, autoFocus, lineNumbers, className, schema, completionSource, variables, defaultDatabase, defaultSchema, highlightLines, dialect }: Props$2) => import("react
|
|
123
|
+
declare const SqlEditor: ({ value, onChange, onSelectionChange, onCreateEditor, onDestroyEditor, onBlurEditor, onFocusEditor, placeholder, searchQuery, searchMatchIndex, readOnly, queryParser, autoFocus, lineNumbers, className, schema, completionSource, variables, defaultDatabase, defaultSchema, highlightLines, dialect }: Props$2) => import("react").JSX.Element;
|
|
200
124
|
//#endregion
|
|
201
125
|
//#region src/components/MergeEditor/MergeEditor.d.ts
|
|
202
126
|
type Props$1 = {
|
|
@@ -222,15 +146,11 @@ type Props$1 = {
|
|
|
222
146
|
middleClassName?: string;
|
|
223
147
|
rightHeader?: ReactNode;
|
|
224
148
|
className?: string;
|
|
225
|
-
/**
|
|
226
|
-
* Paint the corresponding read-only pane with the error palette to signal the
|
|
227
|
-
* side has been deleted upstream. The diff is still rendered so the user can
|
|
228
|
-
* see what was lost; accept/dismiss controls for that side are suppressed.
|
|
229
|
-
*/
|
|
149
|
+
/** Side deleted upstream: its pane turns error-red, its accept/dismiss controls are hidden. */
|
|
230
150
|
leftDeleted?: boolean;
|
|
231
151
|
rightDeleted?: boolean;
|
|
232
152
|
};
|
|
233
|
-
declare const MergeEditor: ({ mergeValue, handleMergeChange, leftText, rightText, leftConflicts, rightConflicts, leftHighlightedLines, rightHighlightedLines, leftClassification, rightClassification, mergeHighlightedLines, mergeClassification, acceptLeft, acceptRight, dismissLeft, dismissRight, leftHeader, middleHeader, middleHeaderClassName, middleClassName, rightHeader, className, leftDeleted, rightDeleted }: Props$1) => import("react
|
|
153
|
+
declare const MergeEditor: ({ mergeValue, handleMergeChange, leftText, rightText, leftConflicts, rightConflicts, leftHighlightedLines, rightHighlightedLines, leftClassification, rightClassification, mergeHighlightedLines, mergeClassification, acceptLeft, acceptRight, dismissLeft, dismissRight, leftHeader, middleHeader, middleHeaderClassName, middleClassName, rightHeader, className, leftDeleted, rightDeleted }: Props$1) => import("react").JSX.Element;
|
|
234
154
|
//#endregion
|
|
235
155
|
//#region src/components/CodeEditor/CodeEditorField.d.ts
|
|
236
156
|
type Props = FieldItemProps & Omit<ComponentProps<typeof CodeEditor>, 'value' | 'onChange' | 'onBlur' | 'ariaLabel' | 'ariaLabelledBy' | 'ariaDescribedBy' | 'ariaInvalid' | 'ariaRequired' | 'readOnly' | 'className' | 'allowBlankDocument'> & {
|
|
@@ -238,31 +158,14 @@ type Props = FieldItemProps & Omit<ComponentProps<typeof CodeEditor>, 'value' |
|
|
|
238
158
|
editorClassName?: string;
|
|
239
159
|
};
|
|
240
160
|
/**
|
|
241
|
-
* Code / JSON editor field
|
|
242
|
-
*
|
|
243
|
-
* ⚠️ Shipped from **`@keboola/design/editors`**, not as a `field.*` connector on `useAppForm`, and
|
|
244
|
-
* deliberately: CodeMirror plus its language modes is ~170 kB brotlied, and registering this in the root
|
|
245
|
-
* form hook pulled all of it into `@keboola/design`'s main entry — every consumer paying for an editor
|
|
246
|
-
* most of them never render. That is the whole reason the `editors` subpath exists.
|
|
247
|
-
*
|
|
248
|
-
* It still reads the field from context, so it composes exactly like a connector:
|
|
249
|
-
*
|
|
250
|
-
* ```tsx
|
|
251
|
-
* import { CodeEditorField } from '@keboola/design/editors';
|
|
252
|
-
*
|
|
253
|
-
* <form.AppField name="schema">{() => <CodeEditorField label="Schema" />}</form.AppField>
|
|
254
|
-
* ```
|
|
255
|
-
*
|
|
256
|
-
* Text in, text out, deliberately: a JSON field is mid-edit invalid for most of the time the user is
|
|
257
|
-
* typing in it, and parsing on every keystroke would either throw away their cursor position or throw
|
|
258
|
-
* away the text. Parse in the schema (or at submit) and keep the editor's own content authoritative.
|
|
259
|
-
*
|
|
260
|
-
* `variant="field"` by default so it reads as a form control rather than a code block.
|
|
161
|
+
* Code / JSON editor field; state is the raw editor text, never a parsed value.
|
|
261
162
|
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
163
|
+
* - In `@keboola/design/editors`, not `useAppForm`: keeps CodeMirror (~170 kB) out of the main entry.
|
|
164
|
+
* - Reads the field from context, so use it inside `<form.AppField>` like a connector.
|
|
165
|
+
* - JSON is invalid mid-edit; parse in the schema or at submit.
|
|
166
|
+
* - Labelled via `aria-labelledby`: CodeMirror's `div[role="textbox"]` is not labelable.
|
|
264
167
|
*/
|
|
265
|
-
declare const CodeEditorField: ({ label, action, required, requiredMark, help, tooltip, className, 'aria-describedby': ariaDescribedBy, editorClassName, variant, ...editorProps }: Props) => import("react
|
|
168
|
+
declare const CodeEditorField: ({ label, action, required, requiredMark, help, tooltip, className, 'aria-describedby': ariaDescribedBy, editorClassName, variant, ...editorProps }: Props) => import("react").JSX.Element;
|
|
266
169
|
//#endregion
|
|
267
170
|
export { CodeEditor, CodeEditorField, type EditorVariable, type LANGUAGE_MODE, LANGUAGE_MODES, MergeEditor, type SqlDialectName, SqlEditor, isLanguageMode };
|
|
268
171
|
//# sourceMappingURL=editors.d.ts.map
|
package/dist/editors.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { cn } from "./classNames-BzrkDnOD.js";
|
|
2
|
-
import { ChevronsLeft, ChevronsRight, X } from "./icons-
|
|
3
|
-
import { Button } from "./Button-
|
|
2
|
+
import { ChevronsLeft, ChevronsRight, X } from "./icons-wcA70iQx.js";
|
|
3
|
+
import { Button } from "./Button-Ca4Q3VJU.js";
|
|
4
4
|
import { useStableCallback } from "./internal/hooks/useStableCallback.js";
|
|
5
|
-
import { FieldItem, useFieldContext } from "./FieldItem-
|
|
5
|
+
import { FieldItem, useFieldContext } from "./FieldItem-2wMXQ0Qw.js";
|
|
6
6
|
import { CHANGE_CLASS } from "./internal/components/MergeEditor/constants.js";
|
|
7
|
-
import { resolveToken } from "./themeTokens-
|
|
8
|
-
import { CodeEditor, LANGUAGE_MODES, buildBaseThemeStyles, buildBasicSetup, buildCanvasChrome, buildChromeStyles, buildCustomTheme, buildDiffWash, isLanguageMode, searchExtension, updateSearch, useThemedExtension, useTooltipsExtension, useVariableCompletion } from "./CodeEditor-
|
|
7
|
+
import { resolveToken } from "./themeTokens-7DEab0kp.js";
|
|
8
|
+
import { CodeEditor, LANGUAGE_MODES, buildBaseThemeStyles, buildBasicSetup, buildCanvasChrome, buildChromeStyles, buildCustomTheme, buildDiffWash, isLanguageMode, searchExtension, updateSearch, useThemedExtension, useTooltipsExtension, useVariableCompletion } from "./CodeEditor-BSo-oLFG.js";
|
|
9
9
|
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { Decoration, EditorView, GutterMarker, ViewPlugin, gutter, gutterLineClass } from "@codemirror/view";
|
|
12
12
|
import CodeMirror, { EditorView as EditorView$1, keymap as keymap$1 } from "@uiw/react-codemirror";
|
|
13
|
-
import colors from "@keboola/tailwind-config/colors";
|
|
14
13
|
import { installExtensions } from "@keboola/codemirror-lang-sql";
|
|
14
|
+
import colors from "@keboola/tailwind-config/colors";
|
|
15
15
|
import { RangeSet, RangeSetBuilder, StateEffect, StateField } from "@codemirror/state";
|
|
16
16
|
import { defaultKeymap } from "@codemirror/commands";
|
|
17
17
|
//#region src/components/CodeEditor/activeQueryHighlight.ts
|
|
@@ -19,10 +19,7 @@ const activeQueryFirstLine = Decoration.line({ class: "cm-active-query cm-active
|
|
|
19
19
|
const activeQueryMiddleLine = Decoration.line({ class: "cm-active-query" });
|
|
20
20
|
const activeQueryLastLine = Decoration.line({ class: "cm-active-query cm-active-query-last" });
|
|
21
21
|
const activeQuerySingleLine = Decoration.line({ class: "cm-active-query cm-active-query-first cm-active-query-last" });
|
|
22
|
-
/**
|
|
23
|
-
* Given pre-computed query boundaries and a cursor position, find which query
|
|
24
|
-
* the cursor is in. Returns trimmed character offsets or null.
|
|
25
|
-
*/
|
|
22
|
+
/** Whitespace-trimmed offsets of the query holding the cursor, or null. */
|
|
26
23
|
const findActiveQueryRange = (doc, cursorPos, boundaries) => {
|
|
27
24
|
if (boundaries.length === 0) return null;
|
|
28
25
|
let match = boundaries[boundaries.length - 1];
|
|
@@ -43,16 +40,20 @@ const findActiveQueryRange = (doc, cursorPos, boundaries) => {
|
|
|
43
40
|
};
|
|
44
41
|
};
|
|
45
42
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
43
|
+
* Character-offset boundaries for the fragments a splitter reported for `doc`.
|
|
44
|
+
*
|
|
45
|
+
* - Bounded by `docLength`: an injected splitter is not trusted to re-join to `doc`.
|
|
46
|
+
* - A fragment past the end is cut there, or dropped if it starts past it.
|
|
47
|
+
* - Offsets past the document would throw in `Text.lineAt`.
|
|
48
48
|
*/
|
|
49
|
-
const computeBoundaries = (queries) => {
|
|
49
|
+
const computeBoundaries = (queries, docLength) => {
|
|
50
50
|
const boundaries = [];
|
|
51
51
|
let offset = 0;
|
|
52
52
|
for (const query of queries) {
|
|
53
|
+
if (offset >= docLength) break;
|
|
53
54
|
boundaries.push({
|
|
54
55
|
from: offset,
|
|
55
|
-
to: offset + query.length
|
|
56
|
+
to: Math.min(offset + query.length, docLength)
|
|
56
57
|
});
|
|
57
58
|
offset += query.length;
|
|
58
59
|
}
|
|
@@ -61,14 +62,9 @@ const computeBoundaries = (queries) => {
|
|
|
61
62
|
/**
|
|
62
63
|
* Synchronously map cached boundaries through a changeset.
|
|
63
64
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* can exceed the changeset's pre-change length and `ChangeSet.mapPos` throws
|
|
68
|
-
* `RangeError: Position X is out of range for changeset of length Y`.
|
|
69
|
-
*
|
|
70
|
-
* Clamp positions into the valid `[0, changes.length]` range before mapping
|
|
71
|
-
* and drop degenerate boundaries so the mapping is safe even with stale cache.
|
|
65
|
+
* - Clamped to `[0, changes.length]` first: the re-parse is debounced, so boundaries can be
|
|
66
|
+
* stale, and `ChangeSet.mapPos` throws a `RangeError` past the pre-change length.
|
|
67
|
+
* - Degenerate boundaries are dropped.
|
|
72
68
|
*/
|
|
73
69
|
const mapBoundariesThroughChanges = (boundaries, changes) => {
|
|
74
70
|
const prevLen = changes.length;
|
|
@@ -125,13 +121,7 @@ const activeQueryHighlight = (splitQueries) => {
|
|
|
125
121
|
this.destroyed = true;
|
|
126
122
|
if (this.debounceTimer) clearTimeout(this.debounceTimer);
|
|
127
123
|
}
|
|
128
|
-
/**
|
|
129
|
-
* Update decorations using cached query boundaries.
|
|
130
|
-
* Only mutates this.decorations — does NOT call view.dispatch().
|
|
131
|
-
* When called from update() (sync), CodeMirror picks up the new
|
|
132
|
-
* decorations via the accessor. When called from the async
|
|
133
|
-
* scheduleDocParse callback, the caller must dispatch separately.
|
|
134
|
-
*/
|
|
124
|
+
/** Sets `this.decorations` without dispatching; an async caller must dispatch. */
|
|
135
125
|
updateFromCache(view) {
|
|
136
126
|
if (!view.hasFocus) {
|
|
137
127
|
this.decorations = Decoration.none;
|
|
@@ -151,7 +141,6 @@ const activeQueryHighlight = (splitQueries) => {
|
|
|
151
141
|
const range = findActiveQueryRange(doc, main.head, this.cachedBoundaries);
|
|
152
142
|
this.decorations = range ? buildDecorations(view, range) : Decoration.none;
|
|
153
143
|
}
|
|
154
|
-
/** Parse queries async (debounced) and update decorations. */
|
|
155
144
|
scheduleDocParse(view) {
|
|
156
145
|
if (this.debounceTimer) clearTimeout(this.debounceTimer);
|
|
157
146
|
this.debounceTimer = setTimeout(async () => {
|
|
@@ -174,7 +163,7 @@ const activeQueryHighlight = (splitQueries) => {
|
|
|
174
163
|
}
|
|
175
164
|
if (this.destroyed || seq !== this.seq) return;
|
|
176
165
|
this.cachedDoc = doc;
|
|
177
|
-
this.cachedBoundaries = computeBoundaries(queries);
|
|
166
|
+
this.cachedBoundaries = computeBoundaries(queries, doc.length);
|
|
178
167
|
this.updateFromCache(view);
|
|
179
168
|
if (!this.destroyed) view.dispatch();
|
|
180
169
|
}, 100);
|
|
@@ -506,25 +495,11 @@ const createDiffHighlightExtension = () => StateField.define({
|
|
|
506
495
|
provide: (f) => [EditorView.decorations.from(f, (val) => val.decorations), gutterLineClass.from(f, (val) => val.gutterMarkers)]
|
|
507
496
|
});
|
|
508
497
|
/**
|
|
509
|
-
* The highlight palette,
|
|
510
|
-
* through `useThemedExtension` — the field instance must stay stable across a
|
|
511
|
-
* scheme change (a fresh one would drop the current highlights), the colours
|
|
512
|
-
* must not.
|
|
513
|
-
*
|
|
514
|
-
* `!important` overrides CodeMirror's built-in active-line and selection
|
|
515
|
-
* backgrounds. SAFE = change present on one side only (green). CONFLICT = both
|
|
516
|
-
* sides edited this region (amber/warning — NOT red, since red reads as
|
|
517
|
-
* "deletion" and the 3-pane editor only ever displays additions in each side
|
|
518
|
-
* pane). The colored left border doubles as a scan-lane so changes are easy to
|
|
519
|
-
* spot when zoomed out.
|
|
498
|
+
* The highlight palette, for `useThemedExtension`; separate from the StateField, which must stay stable across schemes.
|
|
520
499
|
*
|
|
521
|
-
*
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
* light slab.
|
|
525
|
-
*
|
|
526
|
-
* A pure function of `scheme`, which `useThemedExtension` passes from the same
|
|
527
|
-
* read that produced its cache key.
|
|
500
|
+
* - `!important` overrides CodeMirror's active-line and selection backgrounds.
|
|
501
|
+
* - SAFE (green): one side changed. CONFLICT (amber, not red — red reads as deletion): both did.
|
|
502
|
+
* - Dark mode tints at low alpha; an opaque pastel would put light text on a light slab.
|
|
528
503
|
*/
|
|
529
504
|
const buildDiffHighlightTheme = (scheme) => {
|
|
530
505
|
const dark = scheme === "dark";
|
|
@@ -766,29 +741,12 @@ const MergeEditor = ({ mergeValue, handleMergeChange, leftText, rightText, leftC
|
|
|
766
741
|
//#endregion
|
|
767
742
|
//#region src/components/CodeEditor/CodeEditorField.tsx
|
|
768
743
|
/**
|
|
769
|
-
* Code / JSON editor field
|
|
770
|
-
*
|
|
771
|
-
* ⚠️ Shipped from **`@keboola/design/editors`**, not as a `field.*` connector on `useAppForm`, and
|
|
772
|
-
* deliberately: CodeMirror plus its language modes is ~170 kB brotlied, and registering this in the root
|
|
773
|
-
* form hook pulled all of it into `@keboola/design`'s main entry — every consumer paying for an editor
|
|
774
|
-
* most of them never render. That is the whole reason the `editors` subpath exists.
|
|
775
|
-
*
|
|
776
|
-
* It still reads the field from context, so it composes exactly like a connector:
|
|
777
|
-
*
|
|
778
|
-
* ```tsx
|
|
779
|
-
* import { CodeEditorField } from '@keboola/design/editors';
|
|
780
|
-
*
|
|
781
|
-
* <form.AppField name="schema">{() => <CodeEditorField label="Schema" />}</form.AppField>
|
|
782
|
-
* ```
|
|
783
|
-
*
|
|
784
|
-
* Text in, text out, deliberately: a JSON field is mid-edit invalid for most of the time the user is
|
|
785
|
-
* typing in it, and parsing on every keystroke would either throw away their cursor position or throw
|
|
786
|
-
* away the text. Parse in the schema (or at submit) and keep the editor's own content authoritative.
|
|
787
|
-
*
|
|
788
|
-
* `variant="field"` by default so it reads as a form control rather than a code block.
|
|
744
|
+
* Code / JSON editor field; state is the raw editor text, never a parsed value.
|
|
789
745
|
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
746
|
+
* - In `@keboola/design/editors`, not `useAppForm`: keeps CodeMirror (~170 kB) out of the main entry.
|
|
747
|
+
* - Reads the field from context, so use it inside `<form.AppField>` like a connector.
|
|
748
|
+
* - JSON is invalid mid-edit; parse in the schema or at submit.
|
|
749
|
+
* - Labelled via `aria-labelledby`: CodeMirror's `div[role="textbox"]` is not labelable.
|
|
792
750
|
*/
|
|
793
751
|
const CodeEditorField = ({ label, action, required, requiredMark, help, tooltip, className, "aria-describedby": ariaDescribedBy, editorClassName, variant = "field", ...editorProps }) => {
|
|
794
752
|
const field = useFieldContext();
|