@galaxy-io/dls 1.0.3
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/README.md +42 -0
- package/dist/accordion/Accordion.d.ts +30 -0
- package/dist/accordion/Accordion.js +147 -0
- package/dist/animations/Fade.d.ts +6 -0
- package/dist/animations/Fade.js +22 -0
- package/dist/animations/Flashing.d.ts +3 -0
- package/dist/animations/Flashing.js +14 -0
- package/dist/animations/RotateWithTransition.d.ts +8 -0
- package/dist/animations/RotateWithTransition.js +28 -0
- package/dist/animations/ScaleFade.d.ts +6 -0
- package/dist/animations/ScaleFade.js +31 -0
- package/dist/animations/SpinAnimation.d.ts +7 -0
- package/dist/animations/SpinAnimation.js +20 -0
- package/dist/animations/SpinVerticalAnimation.d.ts +6 -0
- package/dist/animations/SpinVerticalAnimation.js +19 -0
- package/dist/assets/components/GalaxyLogomarkDark.d.ts +3 -0
- package/dist/assets/components/GalaxyLogomarkDark.js +11 -0
- package/dist/assets/components/GalaxyLogomarkLight.d.ts +3 -0
- package/dist/assets/components/GalaxyLogomarkLight.js +17 -0
- package/dist/assets/components/GalaxyWordmarkDark.d.ts +3 -0
- package/dist/assets/components/GalaxyWordmarkDark.js +15 -0
- package/dist/assets/components/GalaxyWordmarkLight.d.ts +3 -0
- package/dist/assets/components/GalaxyWordmarkLight.js +28 -0
- package/dist/assets/components/enrichment/PerplexityIcon.d.ts +3 -0
- package/dist/assets/components/enrichment/PerplexityIcon.js +35 -0
- package/dist/assets/components/enrichment/TavilyIcon.d.ts +3 -0
- package/dist/assets/components/enrichment/TavilyIcon.js +15 -0
- package/dist/assets/components/onboarding/TenantSetupDark.d.ts +3 -0
- package/dist/assets/components/onboarding/TenantSetupDark.js +498 -0
- package/dist/assets/components/onboarding/TenantSetupLight.d.ts +3 -0
- package/dist/assets/components/onboarding/TenantSetupLight.js +482 -0
- package/dist/assets/components/onboarding/UserSetupDark.d.ts +3 -0
- package/dist/assets/components/onboarding/UserSetupDark.js +1086 -0
- package/dist/assets/components/onboarding/UserSetupLight.d.ts +3 -0
- package/dist/assets/components/onboarding/UserSetupLight.js +1024 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.js +466 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.js +460 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.js +336 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.js +336 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.js +153 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.js +153 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.js +117 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.js +117 -0
- package/dist/assets/components/projects/MappingMethodBlankDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankDark.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankDarkHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankDarkHovered.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankLight.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankLightHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankLightHovered.js +150 -0
- package/dist/assets/components/projects/MappingMethodJsonDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonDark.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonDarkHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonDarkHovered.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonLight.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonLightHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonLightHovered.js +90 -0
- package/dist/assets/components/projects/ProjectsEmptyStateDark.d.ts +3 -0
- package/dist/assets/components/projects/ProjectsEmptyStateDark.js +454 -0
- package/dist/assets/components/projects/ProjectsEmptyStateLight.d.ts +3 -0
- package/dist/assets/components/projects/ProjectsEmptyStateLight.js +456 -0
- package/dist/assets/components/root/CreateProjectActionCardDark.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardDark.js +1796 -0
- package/dist/assets/components/root/CreateProjectActionCardDarkHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardDarkHovered.js +1796 -0
- package/dist/assets/components/root/CreateProjectActionCardLight.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardLight.js +1786 -0
- package/dist/assets/components/root/CreateProjectActionCardLightHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardLightHovered.js +1786 -0
- package/dist/assets/components/root/CreateSourceActionCardDark.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardDark.js +879 -0
- package/dist/assets/components/root/CreateSourceActionCardDarkHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardDarkHovered.js +879 -0
- package/dist/assets/components/root/CreateSourceActionCardLight.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardLight.js +889 -0
- package/dist/assets/components/root/CreateSourceActionCardLightHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardLightHovered.js +889 -0
- package/dist/assets/components/sources/AttioIcon.d.ts +3 -0
- package/dist/assets/components/sources/AttioIcon.js +11 -0
- package/dist/assets/components/sources/BigquerySourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/BigquerySourceIcon.js +39 -0
- package/dist/assets/components/sources/BrowserbaseSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/BrowserbaseSourceIcon.js +35 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.js +13 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/ConfluenceSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/ConfluenceSourceIcon.js +30 -0
- package/dist/assets/components/sources/GalaxyFileUploadSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyFileUploadSourceIcon.js +16 -0
- package/dist/assets/components/sources/GalaxyTextSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyTextSourceIcon.js +16 -0
- package/dist/assets/components/sources/GalaxyWebhookSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyWebhookSourceIcon.js +16 -0
- package/dist/assets/components/sources/GithubSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GithubSourceIcon.js +27 -0
- package/dist/assets/components/sources/GoogleDriveIcon.d.ts +3 -0
- package/dist/assets/components/sources/GoogleDriveIcon.js +45 -0
- package/dist/assets/components/sources/HubspotSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/HubspotSourceIcon.js +14 -0
- package/dist/assets/components/sources/JiraSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/JiraSourceIcon.js +54 -0
- package/dist/assets/components/sources/LinearSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/LinearSourceIcon.js +14 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconDark.js +17 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconLight.js +17 -0
- package/dist/assets/components/sources/NetsuiteSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/NetsuiteSourceIcon.js +32 -0
- package/dist/assets/components/sources/NotionIcon.d.ts +3 -0
- package/dist/assets/components/sources/NotionIcon.js +20 -0
- package/dist/assets/components/sources/NotionLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/NotionLogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/NotionLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/NotionLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconDark.js +28 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconLight.js +28 -0
- package/dist/assets/components/sources/PostgresqlIcon.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlIcon.js +61 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/S3Icon.d.ts +3 -0
- package/dist/assets/components/sources/S3Icon.js +76 -0
- package/dist/assets/components/sources/S3LogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/S3LogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/S3LogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/S3LogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/SalesforceSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/SalesforceSourceIcon.js +23 -0
- package/dist/assets/components/sources/SlackIcon.d.ts +3 -0
- package/dist/assets/components/sources/SlackIcon.js +32 -0
- package/dist/assets/components/sources/SlackLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/SlackLogoSourceIconDark.js +15 -0
- package/dist/assets/components/sources/SlackLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/SlackLogoSourceIconLight.js +15 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.js +14 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.js +14 -0
- package/dist/assets/components/sources/SourcesEmptyStateDark.d.ts +3 -0
- package/dist/assets/components/sources/SourcesEmptyStateDark.js +432 -0
- package/dist/assets/components/sources/SourcesEmptyStateLight.d.ts +3 -0
- package/dist/assets/components/sources/SourcesEmptyStateLight.js +434 -0
- package/dist/assets/components/sources/WikipediaSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/WikipediaSourceIcon.js +1490 -0
- package/dist/assets/models/galaxy-logomark.js +4 -0
- package/dist/avatar/Avatar.d.ts +9 -0
- package/dist/avatar/Avatar.js +52 -0
- package/dist/avatar/AvatarEmpty.d.ts +36 -0
- package/dist/avatar/AvatarEmpty.js +43 -0
- package/dist/avatar/AvatarShimmer.d.ts +28 -0
- package/dist/avatar/AvatarShimmer.js +21 -0
- package/dist/avatar/GalaxyAvatar.d.ts +6 -0
- package/dist/avatar/GalaxyAvatar.js +36 -0
- package/dist/avatar/types.d.ts +5 -0
- package/dist/avatar/types.js +9 -0
- package/dist/backgrounds/CellGridBackground.d.ts +13 -0
- package/dist/backgrounds/CellGridBackground.js +39 -0
- package/dist/backgrounds/CrossGridBackground.d.ts +14 -0
- package/dist/backgrounds/CrossGridBackground.js +45 -0
- package/dist/backgrounds/DotGridBackground.d.ts +13 -0
- package/dist/backgrounds/DotGridBackground.js +43 -0
- package/dist/badge/Badge.d.ts +30 -0
- package/dist/badge/Badge.js +92 -0
- package/dist/beacons/Beacon.d.ts +43 -0
- package/dist/beacons/Beacon.js +68 -0
- package/dist/buttons/Button.d.ts +30 -0
- package/dist/buttons/Button.js +173 -0
- package/dist/charts/BarChart.d.ts +21 -0
- package/dist/charts/BarChart.js +264 -0
- package/dist/charts/ChartAxis.d.ts +28 -0
- package/dist/charts/ChartAxis.js +94 -0
- package/dist/charts/ChartLegend.d.ts +7 -0
- package/dist/charts/ChartLegend.js +30 -0
- package/dist/charts/ChartTooltip.d.ts +7 -0
- package/dist/charts/ChartTooltip.js +66 -0
- package/dist/charts/LineChart.d.ts +22 -0
- package/dist/charts/LineChart.js +250 -0
- package/dist/charts/PieChart.d.ts +35 -0
- package/dist/charts/PieChart.js +183 -0
- package/dist/charts/constants.d.ts +22 -0
- package/dist/charts/constants.js +38 -0
- package/dist/charts/types.d.ts +80 -0
- package/dist/charts/types.js +0 -0
- package/dist/charts/utils.d.ts +29 -0
- package/dist/charts/utils.js +62 -0
- package/dist/chips/Chip.d.ts +39 -0
- package/dist/chips/Chip.js +185 -0
- package/dist/containers/FlexItem.d.ts +28 -0
- package/dist/containers/FlexItem.js +93 -0
- package/dist/containers/FlexWrapper.d.ts +147 -0
- package/dist/containers/FlexWrapper.js +122 -0
- package/dist/containers/GridWrapper.d.ts +120 -0
- package/dist/containers/GridWrapper.js +117 -0
- package/dist/containers/Spacing.d.ts +13 -0
- package/dist/containers/Spacing.js +52 -0
- package/dist/containers/Wrapper.d.ts +16 -0
- package/dist/containers/Wrapper.js +50 -0
- package/dist/dividers/HorizontalDivider.d.ts +2 -0
- package/dist/dividers/HorizontalDivider.js +17 -0
- package/dist/dividers/VerticalDivider.d.ts +2 -0
- package/dist/dividers/VerticalDivider.js +17 -0
- package/dist/drawer/Drawer.d.ts +13 -0
- package/dist/drawer/Drawer.js +70 -0
- package/dist/dropdown/Dropdown.d.ts +51 -0
- package/dist/dropdown/Dropdown.js +136 -0
- package/dist/dropdown/DropdownButton.d.ts +18 -0
- package/dist/dropdown/DropdownButton.js +179 -0
- package/dist/dropdown/DropdownFooter.d.ts +10 -0
- package/dist/dropdown/DropdownFooter.js +35 -0
- package/dist/dropdown/DropdownItem.d.ts +10 -0
- package/dist/dropdown/DropdownItem.js +38 -0
- package/dist/editor/CodeEditor.d.ts +68 -0
- package/dist/editor/CodeEditor.js +435 -0
- package/dist/editor/CodeEditorReactWidget.d.ts +35 -0
- package/dist/editor/CodeEditorReactWidget.js +47 -0
- package/dist/hooks/useDismiss.d.ts +27 -0
- package/dist/hooks/useDismiss.js +37 -0
- package/dist/hooks/useElementWidth.d.ts +22 -0
- package/dist/hooks/useElementWidth.js +44 -0
- package/dist/hooks/useResize.d.ts +83 -0
- package/dist/hooks/useResize.js +114 -0
- package/dist/hotkeys/HotKeyBindings.d.ts +7 -0
- package/dist/hotkeys/HotKeyBindings.js +23 -0
- package/dist/hotkeys/HotKeySymbol.d.ts +13 -0
- package/dist/hotkeys/HotKeySymbol.js +49 -0
- package/dist/icons/BackIcon.d.ts +3 -0
- package/dist/icons/BackIcon.js +13 -0
- package/dist/icons/CloseIcon.d.ts +3 -0
- package/dist/icons/CloseIcon.js +13 -0
- package/dist/icons/CreateIcon.d.ts +3 -0
- package/dist/icons/CreateIcon.js +13 -0
- package/dist/icons/ForwardIcon.d.ts +3 -0
- package/dist/icons/ForwardIcon.js +13 -0
- package/dist/icons/GalaxyLogomark.d.ts +5 -0
- package/dist/icons/GalaxyLogomark.js +21 -0
- package/dist/icons/GalaxyLogomark3D.d.ts +41 -0
- package/dist/icons/GalaxyLogomark3D.js +310 -0
- package/dist/icons/GalaxyWordmark.d.ts +5 -0
- package/dist/icons/GalaxyWordmark.js +21 -0
- package/dist/icons/HelpIcon.d.ts +3 -0
- package/dist/icons/HelpIcon.js +14 -0
- package/dist/icons/Icon.d.ts +41 -0
- package/dist/icons/Icon.js +51 -0
- package/dist/icons/ProjectsIcon.d.ts +3 -0
- package/dist/icons/ProjectsIcon.js +12 -0
- package/dist/icons/SearchIcon.d.ts +3 -0
- package/dist/icons/SearchIcon.js +12 -0
- package/dist/icons/SourcesIcon.d.ts +3 -0
- package/dist/icons/SourcesIcon.js +12 -0
- package/dist/icons/TextIcon.d.ts +4 -0
- package/dist/icons/TextIcon.js +22 -0
- package/dist/icons/WebScrapeIcon.d.ts +4 -0
- package/dist/icons/WebScrapeIcon.js +22 -0
- package/dist/icons/WebhookIcon.d.ts +4 -0
- package/dist/icons/WebhookIcon.js +22 -0
- package/dist/icons/sources/AttioLogomark.d.ts +4 -0
- package/dist/icons/sources/AttioLogomark.js +8 -0
- package/dist/icons/sources/BrowserbaseLogomark.d.ts +4 -0
- package/dist/icons/sources/BrowserbaseLogomark.js +8 -0
- package/dist/icons/sources/ClickhouseLogomark.d.ts +4 -0
- package/dist/icons/sources/ClickhouseLogomark.js +16 -0
- package/dist/icons/sources/ConfluenceLogomark.d.ts +4 -0
- package/dist/icons/sources/ConfluenceLogomark.js +8 -0
- package/dist/icons/sources/GithubLogomark.d.ts +4 -0
- package/dist/icons/sources/GithubLogomark.js +8 -0
- package/dist/icons/sources/GoogleBigqueryLogomark.d.ts +4 -0
- package/dist/icons/sources/GoogleBigqueryLogomark.js +8 -0
- package/dist/icons/sources/GoogleDriveLogomark.d.ts +4 -0
- package/dist/icons/sources/GoogleDriveLogomark.js +8 -0
- package/dist/icons/sources/HubspotLogomark.d.ts +4 -0
- package/dist/icons/sources/HubspotLogomark.js +8 -0
- package/dist/icons/sources/JiraLogomark.d.ts +4 -0
- package/dist/icons/sources/JiraLogomark.js +8 -0
- package/dist/icons/sources/LinearLogomark.d.ts +4 -0
- package/dist/icons/sources/LinearLogomark.js +8 -0
- package/dist/icons/sources/MySQLLogomark.d.ts +4 -0
- package/dist/icons/sources/MySQLLogomark.js +8 -0
- package/dist/icons/sources/NetsuiteLogomark.d.ts +4 -0
- package/dist/icons/sources/NetsuiteLogomark.js +8 -0
- package/dist/icons/sources/NotionLogomark.d.ts +4 -0
- package/dist/icons/sources/NotionLogomark.js +8 -0
- package/dist/icons/sources/PostgresLogomark.d.ts +4 -0
- package/dist/icons/sources/PostgresLogomark.js +8 -0
- package/dist/icons/sources/S3Logomark.d.ts +4 -0
- package/dist/icons/sources/S3Logomark.js +8 -0
- package/dist/icons/sources/SalesforceLogomark.d.ts +4 -0
- package/dist/icons/sources/SalesforceLogomark.js +8 -0
- package/dist/icons/sources/SlackLogoIconmark.d.ts +4 -0
- package/dist/icons/sources/SlackLogoIconmark.js +8 -0
- package/dist/icons/sources/SnowflakeLogomark.d.ts +4 -0
- package/dist/icons/sources/SnowflakeLogomark.js +16 -0
- package/dist/icons/sources/WikipediaLogomark.d.ts +4 -0
- package/dist/icons/sources/WikipediaLogomark.js +8 -0
- package/dist/inputs/CheckboxInput.d.ts +20 -0
- package/dist/inputs/CheckboxInput.js +97 -0
- package/dist/inputs/ColorInput.d.ts +20 -0
- package/dist/inputs/ColorInput.js +368 -0
- package/dist/inputs/CopyInput.d.ts +15 -0
- package/dist/inputs/CopyInput.js +46 -0
- package/dist/inputs/DateInput.d.ts +19 -0
- package/dist/inputs/DateInput.js +498 -0
- package/dist/inputs/Input.d.ts +91 -0
- package/dist/inputs/Input.js +205 -0
- package/dist/inputs/MultiSelectInput.d.ts +38 -0
- package/dist/inputs/MultiSelectInput.js +566 -0
- package/dist/inputs/MultiTextInput.d.ts +27 -0
- package/dist/inputs/MultiTextInput.js +178 -0
- package/dist/inputs/NumberInput.d.ts +4 -0
- package/dist/inputs/NumberInput.js +34 -0
- package/dist/inputs/PasswordInput.d.ts +4 -0
- package/dist/inputs/PasswordInput.js +40 -0
- package/dist/inputs/RadioInput.d.ts +20 -0
- package/dist/inputs/RadioInput.js +108 -0
- package/dist/inputs/SelectInput.d.ts +51 -0
- package/dist/inputs/SelectInput.js +528 -0
- package/dist/inputs/SliderInput.d.ts +16 -0
- package/dist/inputs/SliderInput.js +172 -0
- package/dist/inputs/TextAreaInput.d.ts +40 -0
- package/dist/inputs/TextAreaInput.js +238 -0
- package/dist/inputs/TextInput.d.ts +4 -0
- package/dist/inputs/TextInput.js +53 -0
- package/dist/inputs/ToggleInput.d.ts +11 -0
- package/dist/inputs/ToggleInput.js +100 -0
- package/dist/inputs/hooks.d.ts +10 -0
- package/dist/inputs/hooks.js +22 -0
- package/dist/links/Link.d.ts +2 -0
- package/dist/links/Link.js +10 -0
- package/dist/lists/BulletedList.d.ts +11 -0
- package/dist/lists/BulletedList.js +41 -0
- package/dist/metrics/MetricItem.d.ts +15 -0
- package/dist/metrics/MetricItem.js +53 -0
- package/dist/metrics/ProgressBar.d.ts +15 -0
- package/dist/metrics/ProgressBar.js +60 -0
- package/dist/modal/Modal.d.ts +7 -0
- package/dist/modal/Modal.js +52 -0
- package/dist/overlay/OverlayProvider.d.ts +26 -0
- package/dist/overlay/OverlayProvider.js +92 -0
- package/dist/overlay/constants.d.ts +27 -0
- package/dist/overlay/constants.js +36 -0
- package/dist/overlay/useOverlay.d.ts +7 -0
- package/dist/overlay/useOverlay.js +46 -0
- package/dist/resizable/HorizontalResizeHandle.d.ts +10 -0
- package/dist/resizable/HorizontalResizeHandle.js +32 -0
- package/dist/resizable/VerticalResizeHandle.d.ts +11 -0
- package/dist/resizable/VerticalResizeHandle.js +33 -0
- package/dist/shapes/Circle.d.ts +6 -0
- package/dist/shapes/Circle.js +25 -0
- package/dist/spreadsheet/InfiniteSpreadsheet.d.ts +3 -0
- package/dist/spreadsheet/InfiniteSpreadsheet.js +265 -0
- package/dist/spreadsheet/SpreadsheetAddColumnButton.d.ts +6 -0
- package/dist/spreadsheet/SpreadsheetAddColumnButton.js +32 -0
- package/dist/spreadsheet/SpreadsheetCell.d.ts +19 -0
- package/dist/spreadsheet/SpreadsheetCell.js +115 -0
- package/dist/spreadsheet/SpreadsheetCellEditor.d.ts +11 -0
- package/dist/spreadsheet/SpreadsheetCellEditor.js +95 -0
- package/dist/spreadsheet/SpreadsheetHeaderCell.d.ts +13 -0
- package/dist/spreadsheet/SpreadsheetHeaderCell.js +125 -0
- package/dist/spreadsheet/SpreadsheetRow.d.ts +21 -0
- package/dist/spreadsheet/SpreadsheetRow.js +68 -0
- package/dist/spreadsheet/SpreadsheetRowActionCell.d.ts +11 -0
- package/dist/spreadsheet/SpreadsheetRowActionCell.js +60 -0
- package/dist/spreadsheet/hooks/useColumnResize.d.ts +6 -0
- package/dist/spreadsheet/hooks/useColumnResize.js +46 -0
- package/dist/spreadsheet/hooks/useSpreadsheetEditing.d.ts +13 -0
- package/dist/spreadsheet/hooks/useSpreadsheetEditing.js +41 -0
- package/dist/spreadsheet/types.d.ts +92 -0
- package/dist/spreadsheet/types.js +21 -0
- package/dist/styles.css +213 -0
- package/dist/switcher/Switcher.d.ts +11 -0
- package/dist/switcher/Switcher.js +41 -0
- package/dist/table/InfiniteTable.d.ts +83 -0
- package/dist/table/InfiniteTable.js +711 -0
- package/dist/table/VirtualizedInfiniteTable.d.ts +28 -0
- package/dist/table/VirtualizedInfiniteTable.js +359 -0
- package/dist/text/Bold.d.ts +3 -0
- package/dist/text/Bold.js +17 -0
- package/dist/text/Code.d.ts +3 -0
- package/dist/text/Code.js +27 -0
- package/dist/text/EditableText.d.ts +7 -0
- package/dist/text/EditableText.js +141 -0
- package/dist/text/Ellipsis.d.ts +10 -0
- package/dist/text/Ellipsis.js +28 -0
- package/dist/text/MarkdownText.d.ts +7 -0
- package/dist/text/MarkdownText.js +295 -0
- package/dist/text/Paragraph.d.ts +16 -0
- package/dist/text/Paragraph.js +76 -0
- package/dist/text/RequiredMarker.d.ts +6 -0
- package/dist/text/RequiredMarker.js +44 -0
- package/dist/text/Selectable.d.ts +3 -0
- package/dist/text/Selectable.js +15 -0
- package/dist/text/Text.d.ts +47 -0
- package/dist/text/Text.js +104 -0
- package/dist/text/TextShimmer.d.ts +7 -0
- package/dist/text/TextShimmer.js +30 -0
- package/dist/theme/GalaxyTheme.d.ts +36 -0
- package/dist/theme/GalaxyTheme.js +107 -0
- package/dist/theme/constants.d.ts +13 -0
- package/dist/theme/constants.js +43 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.js +6 -0
- package/dist/theme/types.d.ts +174 -0
- package/dist/theme/types.js +0 -0
- package/dist/theme/typography.d.ts +2 -0
- package/dist/theme/typography.js +73 -0
- package/dist/theme/variants/dark.d.ts +2 -0
- package/dist/theme/variants/dark.js +125 -0
- package/dist/theme/variants/light.d.ts +2 -0
- package/dist/theme/variants/light.js +125 -0
- package/dist/tooltip/Tooltip.d.ts +37 -0
- package/dist/tooltip/Tooltip.js +79 -0
- package/dist/utils/colors.d.ts +84 -0
- package/dist/utils/colors.js +323 -0
- package/dist/utils/linaria.d.ts +1 -0
- package/dist/utils/linaria.js +8 -0
- package/dist/widget/Widget.d.ts +28 -0
- package/dist/widget/Widget.js +99 -0
- package/package.json +268 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { GalaxyTheme } from "../theme/constants.js";
|
|
2
|
+
import { useGalaxyTheme, withTheme } from "../theme/GalaxyTheme.js";
|
|
3
|
+
import { getCssSizeValue } from "../utils/linaria.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { styled } from "@linaria/react";
|
|
6
|
+
import { match } from "ts-pattern";
|
|
7
|
+
import { useMemo } from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { EditorView, keymap } from "@codemirror/view";
|
|
10
|
+
import { tags } from "@lezer/highlight";
|
|
11
|
+
import { langs, loadLanguage } from "@uiw/codemirror-extensions-langs";
|
|
12
|
+
import { createTheme } from "@uiw/codemirror-themes";
|
|
13
|
+
import CodeMirror from "@uiw/react-codemirror";
|
|
14
|
+
//#region src/editor/CodeEditor.tsx
|
|
15
|
+
var CodeEditorVariant = /* @__PURE__ */ function(CodeEditorVariant) {
|
|
16
|
+
CodeEditorVariant["BASE"] = "BASE";
|
|
17
|
+
CodeEditorVariant["PRIMARY"] = "PRIMARY";
|
|
18
|
+
CodeEditorVariant["SECONDARY"] = "SECONDARY";
|
|
19
|
+
CodeEditorVariant["TERTIARY"] = "TERTIARY";
|
|
20
|
+
return CodeEditorVariant;
|
|
21
|
+
}({});
|
|
22
|
+
var _exp = () => ({ $noBorder, theme }) => $noBorder ? "none" : `0.5px solid ${theme.color.border.primary}`;
|
|
23
|
+
var _exp2 = () => ({ $borderRadius }) => getCssSizeValue($borderRadius);
|
|
24
|
+
var CodeEditorWrapper = withTheme(/*#__PURE__*/ styled("div")({
|
|
25
|
+
name: "CodeEditorWrapper",
|
|
26
|
+
class: "cwfaerb",
|
|
27
|
+
propsAsIs: false,
|
|
28
|
+
vars: {
|
|
29
|
+
"cwfaerb-0": [_exp()],
|
|
30
|
+
"cwfaerb-1": [_exp2()]
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
function getBackgroundColorFromVariant(theme, variant) {
|
|
34
|
+
return match(variant).with("BASE", () => theme.color.background.base).with("PRIMARY", () => theme.color.background.primary).with("SECONDARY", () => theme.color.background.secondary).with("TERTIARY", () => theme.color.background.tertiary).exhaustive();
|
|
35
|
+
}
|
|
36
|
+
function createSearchPanelThemeExtension(theme) {
|
|
37
|
+
return EditorView.theme({
|
|
38
|
+
".cm-panels": { backgroundColor: "transparent" },
|
|
39
|
+
".cm-panels.cm-panels-top": { borderBottom: "none" },
|
|
40
|
+
".cm-panels.cm-panels-bottom": { borderTop: "none" },
|
|
41
|
+
".cm-panel.cm-search": {
|
|
42
|
+
margin: "6px",
|
|
43
|
+
padding: "6px",
|
|
44
|
+
width: "fit-content",
|
|
45
|
+
maxWidth: "calc(100% - 12px)",
|
|
46
|
+
borderRadius: "5px",
|
|
47
|
+
border: `0.5px solid ${theme.color.border.primary}`,
|
|
48
|
+
backgroundColor: theme.color.background.primary,
|
|
49
|
+
color: theme.color.text.primary,
|
|
50
|
+
fontFamily: theme.font.sans.family,
|
|
51
|
+
fontSize: theme.font.sans.size.body_md
|
|
52
|
+
},
|
|
53
|
+
".cm-panel.cm-search input, .cm-panel.cm-search button, .cm-panel.cm-search label": { margin: 0 },
|
|
54
|
+
".cm-panel.cm-search .cm-textfield[name=replace], .cm-panel.cm-search .cm-button[name=replace], .cm-panel.cm-search .cm-button[name=replaceAll], .cm-panel.cm-search label:has(input[name=case]), .cm-panel.cm-search label:has(input[name=re]), .cm-panel.cm-search label:has(input[name=word]), .cm-panel.cm-search [name=close], .cm-panel.cm-search br": { display: "none" },
|
|
55
|
+
".cm-panel.cm-search .cm-textfield": {
|
|
56
|
+
height: "24px",
|
|
57
|
+
minHeight: "24px",
|
|
58
|
+
maxHeight: "24px",
|
|
59
|
+
padding: "0 6px",
|
|
60
|
+
margin: 0,
|
|
61
|
+
boxSizing: "border-box",
|
|
62
|
+
alignSelf: "center",
|
|
63
|
+
verticalAlign: "middle",
|
|
64
|
+
borderRadius: "5px",
|
|
65
|
+
border: `0.5px solid ${theme.color.border.primary}`,
|
|
66
|
+
background: theme.color.background.primary,
|
|
67
|
+
color: theme.color.text.primary,
|
|
68
|
+
fontFamily: theme.font.sans.family,
|
|
69
|
+
fontSize: theme.font.sans.size.body_md,
|
|
70
|
+
lineHeight: "24px",
|
|
71
|
+
fontWeight: theme.font.sans.weight.regular,
|
|
72
|
+
outline: "none",
|
|
73
|
+
"&::placeholder": { color: theme.color.text.tertiary },
|
|
74
|
+
"&:focus": { borderColor: theme.color.border.selected }
|
|
75
|
+
},
|
|
76
|
+
".cm-panel.cm-search .cm-button": {
|
|
77
|
+
height: "24px",
|
|
78
|
+
minHeight: "24px",
|
|
79
|
+
maxHeight: "24px",
|
|
80
|
+
padding: "0 10px",
|
|
81
|
+
margin: 0,
|
|
82
|
+
boxSizing: "border-box",
|
|
83
|
+
alignSelf: "center",
|
|
84
|
+
borderRadius: "5px",
|
|
85
|
+
border: "0.5px solid transparent",
|
|
86
|
+
background: "transparent",
|
|
87
|
+
backgroundImage: "none",
|
|
88
|
+
color: theme.color.text.primary,
|
|
89
|
+
fontFamily: theme.font.sans.family,
|
|
90
|
+
fontSize: theme.font.sans.size.body_md,
|
|
91
|
+
lineHeight: "24px",
|
|
92
|
+
fontWeight: theme.font.sans.weight.medium,
|
|
93
|
+
textTransform: "capitalize",
|
|
94
|
+
cursor: "pointer",
|
|
95
|
+
display: "inline-flex",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
justifyContent: "center",
|
|
98
|
+
verticalAlign: "middle",
|
|
99
|
+
whiteSpace: "nowrap",
|
|
100
|
+
appearance: "none",
|
|
101
|
+
WebkitAppearance: "none",
|
|
102
|
+
boxShadow: "none",
|
|
103
|
+
filter: "none",
|
|
104
|
+
transition: "background-color 0.075s ease-in-out, border 0.075s ease-in-out",
|
|
105
|
+
"&:hover": {
|
|
106
|
+
backgroundColor: theme.color.background.secondary,
|
|
107
|
+
borderColor: theme.color.border.primary
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function createCodeMirrorThemeExtension(theme, galaxyTheme, variant, isReadOnly) {
|
|
113
|
+
const codeMirrorTheme = match(galaxyTheme).returnType().with(GalaxyTheme.DARK, () => "dark").with(GalaxyTheme.LIGHT, () => "light").exhaustive();
|
|
114
|
+
const settingsBackgroundColor = getBackgroundColorFromVariant(theme, variant);
|
|
115
|
+
const settingsSelectionColor = isReadOnly ? theme.color.opacity.bw0 : theme.color.opacity.bw16Alt;
|
|
116
|
+
const settingsSelectionMatchColor = getBackgroundColorFromVariant(theme, variant);
|
|
117
|
+
const settingsGutterBackgroundColor = getBackgroundColorFromVariant(theme, variant);
|
|
118
|
+
const settingsGutterActiveForegroundColor = isReadOnly ? theme.color.text.tertiary : theme.color.text.primary;
|
|
119
|
+
return createTheme({
|
|
120
|
+
theme: codeMirrorTheme,
|
|
121
|
+
settings: {
|
|
122
|
+
background: settingsBackgroundColor,
|
|
123
|
+
foreground: theme.color.text.primary,
|
|
124
|
+
caret: theme.color.text.primary,
|
|
125
|
+
selection: settingsSelectionColor,
|
|
126
|
+
selectionMatch: settingsSelectionMatchColor,
|
|
127
|
+
lineHighlight: "transparent",
|
|
128
|
+
gutterBackground: settingsGutterBackgroundColor,
|
|
129
|
+
gutterForeground: theme.color.text.tertiary,
|
|
130
|
+
gutterActiveForeground: settingsGutterActiveForegroundColor,
|
|
131
|
+
gutterBorder: "transparent",
|
|
132
|
+
fontFamily: theme.font.mono.family,
|
|
133
|
+
fontSize: theme.font.mono.size.body_md
|
|
134
|
+
},
|
|
135
|
+
styles: [
|
|
136
|
+
{
|
|
137
|
+
tag: tags.comment,
|
|
138
|
+
color: theme.color.text.tertiary,
|
|
139
|
+
fontStyle: "italic"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
tag: tags.lineComment,
|
|
143
|
+
color: theme.color.text.tertiary,
|
|
144
|
+
fontStyle: "italic"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
tag: tags.blockComment,
|
|
148
|
+
color: theme.color.text.tertiary,
|
|
149
|
+
fontStyle: "italic"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
tag: tags.variableName,
|
|
153
|
+
color: theme.color.text.primary
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
tag: tags.definition(tags.variableName),
|
|
157
|
+
color: theme.color.text.primary
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
tag: tags.propertyName,
|
|
161
|
+
color: theme.color.text.purple
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
tag: tags.definition(tags.propertyName),
|
|
165
|
+
color: theme.color.text.purple
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
tag: tags.string,
|
|
169
|
+
color: theme.color.text.primary
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
tag: tags.special(tags.string),
|
|
173
|
+
color: theme.color.text.primary
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
tag: tags.character,
|
|
177
|
+
color: theme.color.text.primary
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
tag: tags.escape,
|
|
181
|
+
color: theme.color.text.primary
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
tag: tags.number,
|
|
185
|
+
color: theme.color.text.pink
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
tag: tags.integer,
|
|
189
|
+
color: theme.color.text.pink
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
tag: tags.float,
|
|
193
|
+
color: theme.color.text.pink
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
tag: tags.bool,
|
|
197
|
+
color: theme.color.text.pink
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
tag: tags.null,
|
|
201
|
+
color: theme.color.text.pink
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
tag: tags.atom,
|
|
205
|
+
color: theme.color.text.pink
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
tag: tags.keyword,
|
|
209
|
+
color: theme.color.text.blue,
|
|
210
|
+
fontWeight: "500"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
tag: tags.modifier,
|
|
214
|
+
color: theme.color.text.blue
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
tag: tags.self,
|
|
218
|
+
color: theme.color.text.blue
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
tag: tags.operator,
|
|
222
|
+
color: theme.color.text.tertiary
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
tag: tags.punctuation,
|
|
226
|
+
color: theme.color.text.tertiary
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
tag: tags.separator,
|
|
230
|
+
color: theme.color.text.tertiary
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
tag: tags.bracket,
|
|
234
|
+
color: theme.color.text.tertiary
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
tag: tags.angleBracket,
|
|
238
|
+
color: theme.color.text.tertiary
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
tag: tags.squareBracket,
|
|
242
|
+
color: theme.color.text.tertiary
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
tag: tags.paren,
|
|
246
|
+
color: theme.color.text.tertiary
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
tag: tags.brace,
|
|
250
|
+
color: theme.color.text.tertiary
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
tag: tags.special(tags.brace),
|
|
254
|
+
color: theme.color.text.teal
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
tag: tags.className,
|
|
258
|
+
color: theme.color.text.purple
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
tag: tags.typeName,
|
|
262
|
+
color: theme.color.text.purple
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
tag: tags.definition(tags.typeName),
|
|
266
|
+
color: theme.color.text.purple
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
tag: tags.namespace,
|
|
270
|
+
color: theme.color.text.teal
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
tag: tags.function(tags.variableName),
|
|
274
|
+
color: theme.color.text.blue
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
tag: tags.definition(tags.function(tags.variableName)),
|
|
278
|
+
color: theme.color.text.blue
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
tag: tags.function(tags.propertyName),
|
|
282
|
+
color: theme.color.text.teal
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
tag: tags.tagName,
|
|
286
|
+
color: theme.color.text.pink
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
tag: tags.attributeName,
|
|
290
|
+
color: theme.color.text.blue
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
tag: tags.attributeValue,
|
|
294
|
+
color: theme.color.text.green
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
tag: tags.heading,
|
|
298
|
+
color: theme.color.text.pink,
|
|
299
|
+
fontWeight: "bold"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
tag: tags.heading1,
|
|
303
|
+
color: theme.color.text.pink,
|
|
304
|
+
fontWeight: "bold"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
tag: tags.heading2,
|
|
308
|
+
color: theme.color.text.orange,
|
|
309
|
+
fontWeight: "bold"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
tag: tags.heading3,
|
|
313
|
+
color: theme.color.text.teal,
|
|
314
|
+
fontWeight: "bold"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
tag: tags.link,
|
|
318
|
+
color: theme.color.text.blue,
|
|
319
|
+
textDecoration: "underline"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
tag: tags.url,
|
|
323
|
+
color: theme.color.text.teal,
|
|
324
|
+
textDecoration: "underline"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
tag: tags.emphasis,
|
|
328
|
+
color: theme.color.text.lime,
|
|
329
|
+
fontStyle: "italic"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
tag: tags.strong,
|
|
333
|
+
color: theme.color.text.purple,
|
|
334
|
+
fontWeight: "bold"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
tag: tags.strikethrough,
|
|
338
|
+
color: theme.color.text.tertiary,
|
|
339
|
+
textDecoration: "line-through"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
tag: tags.regexp,
|
|
343
|
+
color: theme.color.text.yellow
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
tag: tags.labelName,
|
|
347
|
+
color: theme.color.text.lime
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
tag: tags.meta,
|
|
351
|
+
color: theme.color.text.tertiary
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
tag: tags.annotation,
|
|
355
|
+
color: theme.color.text.tertiary
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
tag: tags.processingInstruction,
|
|
359
|
+
color: theme.color.text.tertiary
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
tag: tags.invalid,
|
|
363
|
+
color: theme.color.text.error
|
|
364
|
+
}
|
|
365
|
+
]
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
var CodeEditor = ({ content, placeholder, lang, customExtensions = [], onChange, onExecute, borderRadius, noBorder, isReadOnly, noLineNumbers, padding, variant = "PRIMARY" }) => {
|
|
369
|
+
const { theme, galaxyTheme } = useGalaxyTheme();
|
|
370
|
+
const codeMirrorTheme = useMemo(() => createCodeMirrorThemeExtension(theme, galaxyTheme, variant, isReadOnly), [
|
|
371
|
+
theme,
|
|
372
|
+
galaxyTheme,
|
|
373
|
+
variant,
|
|
374
|
+
isReadOnly
|
|
375
|
+
]);
|
|
376
|
+
const langExtensions = useMemo(() => {
|
|
377
|
+
if (!lang) return [];
|
|
378
|
+
loadLanguage(lang);
|
|
379
|
+
const langExtension = langs[lang];
|
|
380
|
+
if (langExtension) return [langExtension()];
|
|
381
|
+
return [];
|
|
382
|
+
}, [lang]);
|
|
383
|
+
const keymapExtensions = useMemo(() => {
|
|
384
|
+
if (!onExecute) return [];
|
|
385
|
+
return [keymap.of([{
|
|
386
|
+
key: "Mod-Enter",
|
|
387
|
+
run: () => {
|
|
388
|
+
onExecute();
|
|
389
|
+
return true;
|
|
390
|
+
}
|
|
391
|
+
}])];
|
|
392
|
+
}, [onExecute]);
|
|
393
|
+
const searchPanelTheme = useMemo(() => createSearchPanelThemeExtension(theme), [theme]);
|
|
394
|
+
const noLineNumbersTheme = useMemo(() => {
|
|
395
|
+
if (!noLineNumbers) return [];
|
|
396
|
+
return [EditorView.theme({ ".cm-gutters": { display: "none" } })];
|
|
397
|
+
}, [noLineNumbers]);
|
|
398
|
+
const paddingTheme = useMemo(() => {
|
|
399
|
+
return [EditorView.theme({ ".cm-content": { padding: getCssSizeValue(padding ?? 4) } })];
|
|
400
|
+
}, [padding]);
|
|
401
|
+
const extensions = useMemo(() => {
|
|
402
|
+
return [
|
|
403
|
+
...langExtensions,
|
|
404
|
+
...keymapExtensions,
|
|
405
|
+
searchPanelTheme,
|
|
406
|
+
...noLineNumbersTheme,
|
|
407
|
+
...paddingTheme,
|
|
408
|
+
...customExtensions
|
|
409
|
+
];
|
|
410
|
+
}, [
|
|
411
|
+
langExtensions,
|
|
412
|
+
keymapExtensions,
|
|
413
|
+
searchPanelTheme,
|
|
414
|
+
noLineNumbersTheme,
|
|
415
|
+
paddingTheme,
|
|
416
|
+
customExtensions
|
|
417
|
+
]);
|
|
418
|
+
return /* @__PURE__ */ jsx(CodeEditorWrapper, {
|
|
419
|
+
$borderRadius: borderRadius,
|
|
420
|
+
$noBorder: noBorder,
|
|
421
|
+
children: /* @__PURE__ */ jsx(CodeMirror, {
|
|
422
|
+
value: content,
|
|
423
|
+
placeholder,
|
|
424
|
+
width: "100%",
|
|
425
|
+
height: "100%",
|
|
426
|
+
theme: codeMirrorTheme,
|
|
427
|
+
editable: !isReadOnly,
|
|
428
|
+
basicSetup: { lineNumbers: !noLineNumbers },
|
|
429
|
+
extensions,
|
|
430
|
+
onChange
|
|
431
|
+
})
|
|
432
|
+
});
|
|
433
|
+
};
|
|
434
|
+
//#endregion
|
|
435
|
+
export { CodeEditorVariant, createCodeMirrorThemeExtension, createSearchPanelThemeExtension, CodeEditor as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { WidgetType } from "@codemirror/view";
|
|
3
|
+
/**
|
|
4
|
+
* Abstract base class for rendering React components inside CodeMirror widgets.
|
|
5
|
+
*
|
|
6
|
+
* This class enables embedding React components as inline decorations in CodeMirror editors.
|
|
7
|
+
* Subclasses must implement the `render()` method to return the React content to display.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* class MyWidget extends CodeEditorReactWidget {
|
|
12
|
+
* constructor(readonly label: string) {
|
|
13
|
+
* super();
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* render(): ReactNode {
|
|
17
|
+
* return <MyComponent label={this.label} />;
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* eq(other: CodeEditorReactWidget): boolean {
|
|
21
|
+
* return other instanceof CodeEditorReactWidget && this.label === other.label;
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare abstract class CodeEditorReactWidget extends WidgetType {
|
|
27
|
+
private root;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the React content to render in the widget.
|
|
30
|
+
* Implement this method in subclasses to define the widget's appearance.
|
|
31
|
+
*/
|
|
32
|
+
abstract render(): ReactNode;
|
|
33
|
+
toDOM(): HTMLElement;
|
|
34
|
+
destroy(): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRoot } from "react-dom/client";
|
|
2
|
+
import { WidgetType } from "@codemirror/view";
|
|
3
|
+
//#region src/editor/CodeEditorReactWidget.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Abstract base class for rendering React components inside CodeMirror widgets.
|
|
6
|
+
*
|
|
7
|
+
* This class enables embedding React components as inline decorations in CodeMirror editors.
|
|
8
|
+
* Subclasses must implement the `render()` method to return the React content to display.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* class MyWidget extends CodeEditorReactWidget {
|
|
13
|
+
* constructor(readonly label: string) {
|
|
14
|
+
* super();
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* render(): ReactNode {
|
|
18
|
+
* return <MyComponent label={this.label} />;
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* eq(other: CodeEditorReactWidget): boolean {
|
|
22
|
+
* return other instanceof CodeEditorReactWidget && this.label === other.label;
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
var CodeEditorReactWidget = class extends WidgetType {
|
|
28
|
+
root = null;
|
|
29
|
+
toDOM() {
|
|
30
|
+
const container = document.createElement("span");
|
|
31
|
+
container.className = "cm-react-widget";
|
|
32
|
+
container.style.display = "inline-flex";
|
|
33
|
+
container.style.verticalAlign = "baseline";
|
|
34
|
+
this.root = createRoot(container);
|
|
35
|
+
this.root.render(this.render());
|
|
36
|
+
return container;
|
|
37
|
+
}
|
|
38
|
+
destroy() {
|
|
39
|
+
if (this.root) {
|
|
40
|
+
const rootToUnmount = this.root;
|
|
41
|
+
setTimeout(() => rootToUnmount.unmount(), 0);
|
|
42
|
+
this.root = null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { CodeEditorReactWidget };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
export interface UseDismissOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Refs to exclude from click outside detection (e.g., dropdowns, tooltips)
|
|
5
|
+
*/
|
|
6
|
+
excludeRefs?: RefObject<HTMLElement>[];
|
|
7
|
+
/**
|
|
8
|
+
* Whether to enable ESC key support
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
enableEscape?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to enable click outside detection
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
enableClickOutside?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the hook is enabled
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The function to call when the dismiss is triggered
|
|
24
|
+
*/
|
|
25
|
+
onDismiss?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const useDismiss: <T extends HTMLElement = HTMLElement>(handlerOrOptions: (() => void) | UseDismissOptions, options?: UseDismissOptions) => RefObject<T>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
import { useHotkeys } from "react-hotkeys-hook";
|
|
3
|
+
//#region src/hooks/useDismiss.ts
|
|
4
|
+
var useDismiss = (handlerOrOptions, options) => {
|
|
5
|
+
const isOptionsOnly = typeof handlerOrOptions !== "function";
|
|
6
|
+
const handler = isOptionsOnly ? void 0 : handlerOrOptions;
|
|
7
|
+
const { excludeRefs, enableEscape = true, enableClickOutside = true, enabled = true, onDismiss } = (isOptionsOnly ? handlerOrOptions : options) || {};
|
|
8
|
+
const ref = useRef(null);
|
|
9
|
+
const dismissHandler = onDismiss ?? handler;
|
|
10
|
+
const handlerRef = useRef(dismissHandler);
|
|
11
|
+
const excludeRefsRef = useRef(excludeRefs);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
handlerRef.current = dismissHandler;
|
|
14
|
+
excludeRefsRef.current = excludeRefs;
|
|
15
|
+
}, [dismissHandler, excludeRefs]);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (!enabled || !enableClickOutside) return;
|
|
18
|
+
const handleClickOutside = (event) => {
|
|
19
|
+
const target = event.target;
|
|
20
|
+
if (ref.current && ref.current.contains(target)) return;
|
|
21
|
+
if (excludeRefsRef.current) {
|
|
22
|
+
for (const excludeRef of excludeRefsRef.current) if (excludeRef.current && excludeRef.current.contains(target)) return;
|
|
23
|
+
}
|
|
24
|
+
if (handlerRef.current) handlerRef.current();
|
|
25
|
+
};
|
|
26
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
27
|
+
return () => {
|
|
28
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
29
|
+
};
|
|
30
|
+
}, [enabled, enableClickOutside]);
|
|
31
|
+
useHotkeys("esc", () => {
|
|
32
|
+
if (enabled && handlerRef.current) handlerRef.current();
|
|
33
|
+
}, { enabled: enabled && enableEscape }, [enabled, enableEscape]);
|
|
34
|
+
return ref;
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { useDismiss };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook that measures and tracks the width of an element using ResizeObserver.
|
|
3
|
+
* Returns undefined until the first measurement is complete.
|
|
4
|
+
*
|
|
5
|
+
* @param ref - A ref to the element to measure
|
|
6
|
+
* @returns The current width of the element in pixels, or undefined if not yet measured
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const containerRef = useRef<HTMLDivElement>(null);
|
|
10
|
+
* const width = useElementWidth(containerRef);
|
|
11
|
+
*
|
|
12
|
+
* if (width === undefined) {
|
|
13
|
+
* return <div ref={containerRef} />;
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* return (
|
|
17
|
+
* <div ref={containerRef}>
|
|
18
|
+
* <Chart width={width} />
|
|
19
|
+
* </div>
|
|
20
|
+
* );
|
|
21
|
+
*/
|
|
22
|
+
export declare const useElementWidth: (ref: React.RefObject<HTMLElement | null>) => number | undefined;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
//#region src/hooks/useElementWidth.ts
|
|
3
|
+
/**
|
|
4
|
+
* Hook that measures and tracks the width of an element using ResizeObserver.
|
|
5
|
+
* Returns undefined until the first measurement is complete.
|
|
6
|
+
*
|
|
7
|
+
* @param ref - A ref to the element to measure
|
|
8
|
+
* @returns The current width of the element in pixels, or undefined if not yet measured
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const containerRef = useRef<HTMLDivElement>(null);
|
|
12
|
+
* const width = useElementWidth(containerRef);
|
|
13
|
+
*
|
|
14
|
+
* if (width === undefined) {
|
|
15
|
+
* return <div ref={containerRef} />;
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* return (
|
|
19
|
+
* <div ref={containerRef}>
|
|
20
|
+
* <Chart width={width} />
|
|
21
|
+
* </div>
|
|
22
|
+
* );
|
|
23
|
+
*/
|
|
24
|
+
var useElementWidth = (ref) => {
|
|
25
|
+
const [width, setWidth] = useState(void 0);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
const element = ref.current;
|
|
28
|
+
if (!element) return;
|
|
29
|
+
const update = () => {
|
|
30
|
+
setWidth(element.getBoundingClientRect().width);
|
|
31
|
+
};
|
|
32
|
+
update();
|
|
33
|
+
if (typeof ResizeObserver === "undefined") {
|
|
34
|
+
window.addEventListener("resize", update);
|
|
35
|
+
return () => window.removeEventListener("resize", update);
|
|
36
|
+
}
|
|
37
|
+
const observer = new ResizeObserver(() => update());
|
|
38
|
+
observer.observe(element);
|
|
39
|
+
return () => observer.disconnect();
|
|
40
|
+
}, [ref]);
|
|
41
|
+
return width;
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { useElementWidth };
|