@seanyeh77/ui 0.43.1 → 0.45.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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/bundle.js +20 -20
- package/dist/components/AccentPicker/AccentPicker.d.ts +1 -0
- package/dist/components/AccentPicker/AccentPicker.js +92 -72
- package/dist/components/AccentPicker/AccentPicker.js.map +1 -1
- package/dist/components/ActionBar/ActionBar.d.ts +2 -0
- package/dist/components/ActionBar/ActionBar.js.map +1 -1
- package/dist/components/AiMark/AiMark.d.ts +1 -0
- package/dist/components/AiMark/AiMark.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +6 -3
- package/dist/components/Alert/Alert.js +18 -14
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/AppShell/AppShell.d.ts +10 -4
- package/dist/components/AppShell/AppShell.js +30 -19
- package/dist/components/AppShell/AppShell.js.map +1 -1
- package/dist/components/Badge/Badge.d.ts +24 -7
- package/dist/components/Badge/Badge.js +78 -21
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/BarChart/BarChart.d.ts +14 -1
- package/dist/components/BarChart/BarChart.js +88 -59
- package/dist/components/BarChart/BarChart.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.d.ts +4 -1
- package/dist/components/Button/Button.js +17 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +11 -2
- package/dist/components/Calendar/Calendar.js +16 -5
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +24 -8
- package/dist/components/Checkbox/Checkbox.js +22 -9
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CodeView/CodeView.d.ts +3 -0
- package/dist/components/CodeView/CodeView.js +6 -6
- package/dist/components/CodeView/CodeView.js.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.d.ts +16 -4
- package/dist/components/CommandPalette/CommandPalette.js +38 -11
- package/dist/components/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/components/ConsoleLayout/ConsoleLayout.d.ts +2 -3
- package/dist/components/ConsoleLayout/ConsoleLayout.js +4 -1
- package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -1
- package/dist/components/DangerZone/DangerZone.d.ts +3 -2
- package/dist/components/DangerZone/DangerZone.js +3 -2
- package/dist/components/DangerZone/DangerZone.js.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +16 -4
- package/dist/components/DataTable/DataTable.js +346 -208
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/SortButton.js +48 -5
- package/dist/components/DataTable/SortButton.js.map +1 -1
- package/dist/components/DataTable/filters.js +2 -1
- package/dist/components/DataTable/filters.js.map +1 -1
- package/dist/components/DataTable/parts.js +1 -1
- package/dist/components/DataTable/parts.js.map +1 -1
- package/dist/components/DataTable/types.d.ts +10 -3
- package/dist/components/DatePicker/DatePicker.d.ts +9 -7
- package/dist/components/DatePicker/DatePicker.js +16 -6
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +12 -7
- package/dist/components/DateRangePicker/DateRangePicker.js +81 -45
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DetailList/DetailList.d.ts +2 -0
- package/dist/components/DetailList/DetailList.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +56 -20
- package/dist/components/Dialog/Dialog.js +46 -14
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +18 -5
- package/dist/components/Drawer/Drawer.js +87 -24
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +2 -2
- package/dist/components/EmptyState/EmptyState.js +3 -2
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/ErrorPage/ErrorPage.d.ts +4 -0
- package/dist/components/ErrorPage/ErrorPage.js +2 -1
- package/dist/components/ErrorPage/ErrorPage.js.map +1 -1
- package/dist/components/EventTimeline/EventTimeline.d.ts +23 -5
- package/dist/components/EventTimeline/EventTimeline.js +64 -20
- package/dist/components/EventTimeline/EventTimeline.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +10 -2
- package/dist/components/FileUpload/FileUpload.js +5 -2
- package/dist/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/components/FormGrid/FormGrid.d.ts +3 -1
- package/dist/components/FormGrid/FormGrid.js +5 -2
- package/dist/components/FormGrid/FormGrid.js.map +1 -1
- package/dist/components/Graph/Graph.d.ts +1 -0
- package/dist/components/Graph/Graph.js +8 -4
- package/dist/components/Graph/Graph.js.map +1 -1
- package/dist/components/Grid/Grid.d.ts +11 -4
- package/dist/components/Grid/Grid.js +14 -2
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +2 -1
- package/dist/components/IconButton/IconButton.js +10 -1
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/InlineCode/InlineCode.d.ts +6 -0
- package/dist/components/InlineCode/InlineCode.js +10 -6
- package/dist/components/InlineCode/InlineCode.js.map +1 -1
- package/dist/components/KpiCard/KpiCard.d.ts +7 -3
- package/dist/components/KpiCard/KpiCard.js +40 -25
- package/dist/components/KpiCard/KpiCard.js.map +1 -1
- package/dist/components/LayerGraph/LayerGraph.d.ts +68 -23
- package/dist/components/LayerGraph/LayerGraph.js +178 -97
- package/dist/components/LayerGraph/LayerGraph.js.map +1 -1
- package/dist/components/LineChart/LineChart.d.ts +10 -3
- package/dist/components/LineChart/LineChart.js +55 -23
- package/dist/components/LineChart/LineChart.js.map +1 -1
- package/dist/components/Link/Link.d.ts +17 -0
- package/dist/components/Link/Link.js +47 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/LoadingBar/LoadingBar.d.ts +1 -0
- package/dist/components/LoadingBar/LoadingBar.js.map +1 -1
- package/dist/components/LoginCard/LoginCard.d.ts +9 -3
- package/dist/components/LoginCard/LoginCard.js +99 -78
- package/dist/components/LoginCard/LoginCard.js.map +1 -1
- package/dist/components/Markdown/Markdown.d.ts +1 -0
- package/dist/components/Markdown/Markdown.js +20 -2
- package/dist/components/Markdown/Markdown.js.map +1 -1
- package/dist/components/Menu/Menu.d.ts +4 -2
- package/dist/components/Menu/Menu.js +43 -33
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Meter/Meter.d.ts +4 -0
- package/dist/components/Meter/Meter.js.map +1 -1
- package/dist/components/MobileTabBar/MobileTabBar.d.ts +3 -0
- package/dist/components/MobileTabBar/MobileTabBar.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +7 -6
- package/dist/components/MultiSelect/MultiSelect.js +27 -9
- package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/components/NotificationBell/NotificationBell.d.ts +4 -0
- package/dist/components/NotificationBell/NotificationBell.js +4 -3
- package/dist/components/NotificationBell/NotificationBell.js.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +34 -0
- package/dist/components/PageHeader/PageHeader.js +68 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +11 -4
- package/dist/components/Popover/Popover.js +17 -7
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressRing/ProgressRing.d.ts +1 -0
- package/dist/components/ProgressRing/ProgressRing.js.map +1 -1
- package/dist/components/ProjectSwitcher/ProjectSwitcher.d.ts +5 -1
- package/dist/components/ProjectSwitcher/ProjectSwitcher.js +16 -3
- package/dist/components/ProjectSwitcher/ProjectSwitcher.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +22 -5
- package/dist/components/RadioGroup/RadioGroup.js +48 -47
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RelativeTime/RelativeTime.d.ts +10 -0
- package/dist/components/RelativeTime/RelativeTime.js +44 -0
- package/dist/components/RelativeTime/RelativeTime.js.map +1 -0
- package/dist/components/SearchField/SearchField.d.ts +2 -0
- package/dist/components/SearchField/SearchField.js.map +1 -1
- package/dist/components/Section/Section.d.ts +4 -0
- package/dist/components/Section/Section.js +8 -22
- package/dist/components/Section/Section.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +22 -9
- package/dist/components/SegmentedControl/SegmentedControl.js +20 -19
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/Select/Select.d.ts +7 -11
- package/dist/components/Select/Select.js +7 -3
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/SettingsLayout/SettingsLayout.d.ts +33 -4
- package/dist/components/SettingsLayout/SettingsLayout.js +62 -14
- package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -1
- package/dist/components/SideNav/SideNav.d.ts +2 -0
- package/dist/components/SideNav/SideNav.js +3 -3
- package/dist/components/SideNav/SideNav.js.map +1 -1
- package/dist/components/SplitPane/SplitPane.d.ts +1 -0
- package/dist/components/SplitPane/SplitPane.js.map +1 -1
- package/dist/components/StatusBand/StatusBand.d.ts +1 -0
- package/dist/components/StatusBand/StatusBand.js.map +1 -1
- package/dist/components/Suggestion/Suggestion.d.ts +6 -0
- package/dist/components/Suggestion/Suggestion.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +13 -3
- package/dist/components/Switch/Switch.js +16 -7
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +8 -1
- package/dist/components/Tabs/Tabs.js +6 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +15 -7
- package/dist/components/Tag/Tag.js +22 -10
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Term/Term.d.ts +8 -3
- package/dist/components/Term/Term.js +1 -1
- package/dist/components/Term/Term.js.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +6 -9
- package/dist/components/TextArea/TextArea.js +25 -12
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/TextField/TextField.d.ts +8 -11
- package/dist/components/TextField/TextField.js +9 -7
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/ThemePicker/ThemePicker.d.ts +1 -0
- package/dist/components/ThemePicker/ThemePicker.js +35 -34
- package/dist/components/ThemePicker/ThemePicker.js.map +1 -1
- package/dist/components/TimeControl/TimeControl.d.ts +1 -0
- package/dist/components/TimeControl/TimeControl.js.map +1 -1
- package/dist/components/Toast/Toast.d.ts +56 -3
- package/dist/components/Toast/Toast.js +191 -8
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/TopBar/TopBar.d.ts +6 -2
- package/dist/components/TopBar/TopBar.js +7 -1
- package/dist/components/TopBar/TopBar.js.map +1 -1
- package/dist/components/Tour/Tour.d.ts +14 -3
- package/dist/components/Tour/Tour.js +26 -14
- package/dist/components/Tour/Tour.js.map +1 -1
- package/dist/components/TreeList/TreeList.d.ts +28 -4
- package/dist/components/TreeList/TreeList.js +32 -20
- package/dist/components/TreeList/TreeList.js.map +1 -1
- package/dist/components/Workbench/Workbench.d.ts +1 -0
- package/dist/components/Workbench/Workbench.js +24 -12
- package/dist/components/Workbench/Workbench.js.map +1 -1
- package/dist/components/ZoneMap/ZoneMap.d.ts +12 -2
- package/dist/components/ZoneMap/ZoneMap.js +13 -5
- package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
- package/dist/components/useFormErrors/useFormErrors.d.ts +20 -0
- package/dist/components/useFormErrors/useFormErrors.js +55 -0
- package/dist/components/useFormErrors/useFormErrors.js.map +1 -0
- package/dist/css/AccentPicker.css +1 -0
- package/dist/css/Alert.css +8 -19
- package/dist/css/AppShell.css +1 -0
- package/dist/css/Badge.css +19 -45
- package/dist/css/BarChart.css +21 -3
- package/dist/css/Button.css +6 -1
- package/dist/css/Card.css +8 -8
- package/dist/css/Checkbox.css +20 -0
- package/dist/css/CodeView.css +3 -2
- package/dist/css/DangerZone.css +5 -3
- package/dist/css/DataTable.css +303 -69
- package/dist/css/DatePicker.css +1 -0
- package/dist/css/DateRangePicker.css +24 -2
- package/dist/css/Drawer.css +31 -0
- package/dist/css/EmptyState.css +1 -0
- package/dist/css/ErrorPage.css +4 -1
- package/dist/css/EventTimeline.css +34 -5
- package/dist/css/FileUpload.css +1 -0
- package/dist/css/FormGrid.css +12 -3
- package/dist/css/Graph.css +9 -1
- package/dist/css/Grid.css +8 -0
- package/dist/css/KpiCard.css +13 -1
- package/dist/css/LayerGraph.css +40 -15
- package/dist/css/Link.css +23 -0
- package/dist/css/LoginCard.css +17 -11
- package/dist/css/Markdown.css +31 -2
- package/dist/css/Menu.css +0 -2
- package/dist/css/Meter.css +16 -0
- package/dist/css/MultiSelect.css +1 -0
- package/dist/css/NotificationBell.css +1 -0
- package/dist/css/PageHeader.css +50 -0
- package/dist/css/ProgressBar.css +12 -0
- package/dist/css/ProjectSwitcher.css +25 -23
- package/dist/css/RelativeTime.css +2 -0
- package/dist/css/SegmentedControl.css +38 -10
- package/dist/css/Select.css +1 -0
- package/dist/css/SettingsLayout.css +29 -8
- package/dist/css/SideNav.css +4 -1
- package/dist/css/Skeleton.css +22 -1
- package/dist/css/Suggestion.css +1 -1
- package/dist/css/Switch.css +27 -0
- package/dist/css/Tabs.css +8 -7
- package/dist/css/Tag.css +19 -12
- package/dist/css/Term.css +1 -1
- package/dist/css/TextArea.css +1 -0
- package/dist/css/TextField.css +1 -0
- package/dist/css/Toast.css +101 -4
- package/dist/css/TopBar.css +21 -2
- package/dist/css/Tour.css +1 -1
- package/dist/css/TreeList.css +7 -3
- package/dist/css/Workbench.css +13 -1
- package/dist/css/ZoneMap.css +0 -1
- package/dist/css/base.css +45 -0
- package/dist/css/end.css +119 -5
- package/dist/deprecated.d.ts +3 -0
- package/dist/deprecated.js +13 -0
- package/dist/deprecated.js.map +1 -0
- package/dist/fonts.css +2 -7543
- package/dist/format.d.ts +3 -1
- package/dist/format.js +15 -5
- package/dist/format.js.map +1 -1
- package/dist/generated/themeDefaults.d.ts +8 -0
- package/dist/generated/themeDefaults.js +35 -0
- package/dist/generated/themeDefaults.js.map +1 -0
- package/dist/i18n.d.ts +7 -2
- package/dist/i18n.js +65 -10
- package/dist/i18n.js.map +1 -1
- package/dist/icons/Icon.d.ts +3 -1
- package/dist/icons/Icon.js.map +1 -1
- package/dist/index.d.ts +23 -14
- package/dist/index.js +14 -8
- package/dist/internal/Field.d.ts +19 -0
- package/dist/internal/Field.js +13 -6
- package/dist/internal/Field.js.map +1 -1
- package/dist/internal/FloatingPanel.js +2 -1
- package/dist/internal/FloatingPanel.js.map +1 -1
- package/dist/internal/chart.d.ts +4 -0
- package/dist/internal/chart.js +89 -19
- package/dist/internal/chart.js.map +1 -1
- package/dist/internal/codeSpans.js +20 -0
- package/dist/internal/codeSpans.js.map +1 -0
- package/dist/internal/dev.js +9 -4
- package/dist/internal/dev.js.map +1 -1
- package/dist/internal/focus.js +27 -3
- package/dist/internal/focus.js.map +1 -1
- package/dist/internal/focusMain.js +6 -2
- package/dist/internal/focusMain.js.map +1 -1
- package/dist/internal/open.d.ts +14 -0
- package/dist/internal/open.js +28 -0
- package/dist/internal/open.js.map +1 -0
- package/dist/internal/roving.js +37 -0
- package/dist/internal/roving.js.map +1 -0
- package/dist/internal/shell.js +12 -0
- package/dist/internal/shell.js.map +1 -0
- package/dist/internal/stored.js +89 -0
- package/dist/internal/stored.js.map +1 -0
- package/dist/internal/tableTools.js +46 -4
- package/dist/internal/tableTools.js.map +1 -1
- package/dist/internal/util.js +8 -17
- package/dist/internal/util.js.map +1 -1
- package/dist/locale.d.ts +17 -0
- package/dist/locale.js +29 -0
- package/dist/locale.js.map +1 -0
- package/dist/styles.css +1296 -400
- package/dist/theme.d.ts +23 -5
- package/dist/theme.js +85 -25
- package/dist/theme.js.map +1 -1
- package/dist/tokens.css +3 -0
- package/docs/AccentPicker.md +3 -1
- package/docs/Alert.md +4 -3
- package/docs/AppShell.md +11 -10
- package/docs/Badge.md +26 -16
- package/docs/BarChart.md +7 -4
- package/docs/Button.md +4 -5
- package/docs/Calendar.md +2 -2
- package/docs/Card.md +9 -8
- package/docs/Checkbox.md +4 -1
- package/docs/CodeView.md +30 -43
- package/docs/CommandPalette.md +3 -2
- package/docs/ConsoleLayout.md +5 -5
- package/docs/DangerZone.md +3 -2
- package/docs/DataColors.md +2 -2
- package/docs/DataTable.md +29 -141
- package/docs/DatePicker.md +1 -0
- package/docs/DateRangePicker.md +3 -0
- package/docs/DetailList.md +9 -9
- package/docs/Dialog.md +8 -4
- package/docs/Drawer.md +7 -4
- package/docs/ErrorPage.md +1 -1
- package/docs/EventTimeline.md +23 -12
- package/docs/FileUpload.md +1 -1
- package/docs/FormGrid.md +2 -1
- package/docs/Format.md +5 -3
- package/docs/Graph.md +1 -1
- package/docs/Grid.md +5 -1
- package/docs/KpiCard.md +6 -4
- package/docs/LayerGraph.md +18 -53
- package/docs/LineChart.md +5 -3
- package/docs/Link.md +22 -0
- package/docs/LoginCard.md +7 -3
- package/docs/Markdown.md +3 -13
- package/docs/Menu.md +2 -0
- package/docs/Meter.md +1 -0
- package/docs/MultiSelect.md +2 -1
- package/docs/NotificationBell.md +1 -0
- package/docs/PageHeader.md +34 -0
- package/docs/Popover.md +3 -1
- package/docs/ProgressBar.md +3 -1
- package/docs/ProjectSwitcher.md +14 -14
- package/docs/RadioGroup.md +2 -0
- package/docs/RelativeTime.md +23 -0
- package/docs/Section.md +1 -1
- package/docs/SegmentedControl.md +9 -6
- package/docs/Select.md +2 -1
- package/docs/SettingsLayout.md +19 -4
- package/docs/SideNav.md +1 -1
- package/docs/Skeleton.md +2 -1
- package/docs/Switch.md +3 -1
- package/docs/Tabs.md +4 -3
- package/docs/Tag.md +9 -7
- package/docs/Term.md +3 -3
- package/docs/TextArea.md +2 -1
- package/docs/TextField.md +5 -3
- package/docs/ThemePicker.md +3 -1
- package/docs/Toast.md +17 -5
- package/docs/TopBar.md +8 -5
- package/docs/Tour.md +3 -2
- package/docs/TreeList.md +10 -37
- package/docs/Workbench.md +1 -48
- package/docs/ZoneMap.md +5 -5
- package/docs/agents.md +82 -0
- package/docs/code.md +2 -2
- package/docs/components.json +314 -0
- package/docs/data.md +9 -18
- package/docs/forms.md +6 -5
- package/docs/guidelines.md +39 -31
- package/docs/icons.md +9 -0
- package/docs/layout.md +16 -20
- package/docs/motion.md +31 -56
- package/docs/theme.md +15 -18
- package/docs/useFormErrors.md +35 -0
- package/package.json +8 -7
- package/dist/bundle.js.map +0 -1
- package/dist/fonts/LICENSE-OFL.txt +0 -93
- package/dist/fonts/geist-mono-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-700-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-400-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-500-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-600-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-700-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-700-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-700-normal.woff2 +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { GraphLegendItem } from "../Graph/Graph.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface LayerGraphNode {
|
|
4
|
+
/** Unique id: edges, value and onChange use it. */
|
|
4
5
|
id: string;
|
|
6
|
+
/** Shown on the box. Default: the id. */
|
|
5
7
|
name?: string;
|
|
6
8
|
/** The name is code (a path, a file, a module): Geist Mono. Default: the text font, for names in words (「被追蹤的程式」). */
|
|
7
9
|
code?: boolean;
|
|
@@ -9,13 +11,11 @@ export interface LayerGraphNode {
|
|
|
9
11
|
layer?: number;
|
|
10
12
|
/** How big it is (functions, files, endpoints): drawn as the size bar. */
|
|
11
13
|
size?: number;
|
|
12
|
-
/** @deprecated use size. */
|
|
13
|
-
fns?: number;
|
|
14
14
|
/** Used by most others: not drawn as a layer; shown as a small box under the diagram with how often it is used.
|
|
15
15
|
* Selectable like the other boxes (same selected and onSelect): the boxes that use it show 「使用 N 次」. */
|
|
16
16
|
shared?: boolean;
|
|
17
17
|
/** Outside the repository (a traced program, a library): drawn above every layer with a dashed outline and
|
|
18
|
-
*
|
|
18
|
+
* 「外部」 (externalLabel) under the name. Not in any layer and no size bar; its lines, selection and list entry
|
|
19
19
|
* work like any box's. */
|
|
20
20
|
external?: boolean;
|
|
21
21
|
/** A short tag beside the name (「可修改」「受保護」): on the same line, never cut; the name is cut first. In the list
|
|
@@ -25,7 +25,9 @@ export interface LayerGraphNode {
|
|
|
25
25
|
tagTone?: 'neutral' | 'warning';
|
|
26
26
|
}
|
|
27
27
|
export interface LayerGraphEdge {
|
|
28
|
+
/** The id of the box the line starts at. */
|
|
28
29
|
from: string;
|
|
30
|
+
/** The id of the box the arrow points at. */
|
|
29
31
|
to: string;
|
|
30
32
|
/** How often: sets the line width. */
|
|
31
33
|
count?: number;
|
|
@@ -39,11 +41,49 @@ export interface LayerGraphEdge {
|
|
|
39
41
|
/** Names the edge for selectedEdge and onSelectEdge. Default `${from}->${to}`. */
|
|
40
42
|
id?: string;
|
|
41
43
|
}
|
|
44
|
+
/** Every text LayerGraph writes, for your domain's words or another language. Pass only the ones to change. */
|
|
45
|
+
export interface LayerGraphLabels {
|
|
46
|
+
/** Text under a box's size bar: a string with {n}, or a function of the size for words that change with the number
|
|
47
|
+
* (`(n) => n === 1 ? '1 function' : `${n} functions``). Default 「{n} 個項目」. */
|
|
48
|
+
size: string | ((n: number) => string);
|
|
49
|
+
/** A selected edge's count: a string with {n}, or a function of the count. Default 「{n} 次」 (English 「1 call」). */
|
|
50
|
+
count: string | ((n: number) => string);
|
|
51
|
+
/** Under the name of an external box, and after it in the list. Default 「repo 外」. */
|
|
52
|
+
external: string;
|
|
53
|
+
/** Heading of the shared items under the diagram. Default 「共用項目」. */
|
|
54
|
+
shared: string;
|
|
55
|
+
/** A shared item's line; {a} is how many items use it, {b} the total count. Default 「{a} 個項目使用,共 {b} 次」. */
|
|
56
|
+
sharedMeta: string;
|
|
57
|
+
/** On a box that uses the selected shared item; {n} is how often. Default 「使用 {n} 次」. */
|
|
58
|
+
use: string;
|
|
59
|
+
/** Label of inferred edges without their own, and their legend entry. Default 「推測」 (legend 「推測的關係」). */
|
|
60
|
+
inferred: string;
|
|
61
|
+
/** Explains inferred edges in the legend (a Term). */
|
|
62
|
+
inferredText: string;
|
|
63
|
+
/** The word for declared edges, after a label in the list. Default 「宣告」. */
|
|
64
|
+
declared: string;
|
|
65
|
+
/** The legend entry for declared edges. Default 「專案宣告的關係」. */
|
|
66
|
+
declaredLegend: string;
|
|
67
|
+
/** Explains declared edges in the legend (a Term), e.g. which file declares them. */
|
|
68
|
+
declaredText: string;
|
|
69
|
+
/** Heading of the boxes in the list view. Default 「項目」. */
|
|
70
|
+
listNodes: string;
|
|
71
|
+
/** Heading of the lines in the list view. Default 「關係」. */
|
|
72
|
+
listEdges: string;
|
|
73
|
+
}
|
|
42
74
|
export interface LayerGraphProps {
|
|
75
|
+
/** The boxes. */
|
|
43
76
|
nodes: LayerGraphNode[];
|
|
77
|
+
/** The lines between boxes (by id). */
|
|
44
78
|
edges: LayerGraphEdge[];
|
|
79
|
+
/** The selected box's id (controlled); null for none. */
|
|
80
|
+
value?: string | null;
|
|
81
|
+
/** A box picked (its id) or picked again (null). Selecting a box dims everything unrelated and turns its lines
|
|
82
|
+
* accent; it clears the selected edge. */
|
|
83
|
+
onChange?: (id: string | null) => void;
|
|
84
|
+
/** @deprecated use value. */
|
|
45
85
|
selected?: string | null;
|
|
46
|
-
/**
|
|
86
|
+
/** @deprecated use onChange. */
|
|
47
87
|
onSelect?: (id: string | null) => void;
|
|
48
88
|
/** The selected edge's id (controlled, like selected). */
|
|
49
89
|
selectedEdge?: string | null;
|
|
@@ -58,34 +98,35 @@ export interface LayerGraphProps {
|
|
|
58
98
|
* 'switch'): a Switch with the text 「線上文字」, on while labels show. 'icon': the tag icon button with a fixed name
|
|
59
99
|
* and aria-pressed, for a tight toolbar. false: none. */
|
|
60
100
|
labelToggle?: boolean | 'switch' | 'icon';
|
|
61
|
-
/** px. Default 200. */
|
|
101
|
+
/** Box width in px. Default 200. */
|
|
62
102
|
nodeWidth?: number;
|
|
63
|
-
/**
|
|
64
|
-
|
|
103
|
+
/** Your words for every text LayerGraph writes: { size: '{n} 個函式', count: '呼叫 {n} 次', … }. */
|
|
104
|
+
labels?: Partial<LayerGraphLabels>;
|
|
105
|
+
/** @deprecated use labels.size. */
|
|
65
106
|
sizeLabel?: string | ((n: number) => string);
|
|
66
|
-
/**
|
|
67
|
-
* Default 「{n} 次」 (English 「1 call」, 「2 calls」). */
|
|
107
|
+
/** @deprecated use labels.count. */
|
|
68
108
|
countLabel?: string | ((n: number) => string);
|
|
69
|
-
/**
|
|
109
|
+
/** @deprecated use labels.external. */
|
|
70
110
|
externalLabel?: string;
|
|
71
|
-
/**
|
|
111
|
+
/** @deprecated use labels.shared. */
|
|
72
112
|
sharedLabel?: string;
|
|
73
|
-
/**
|
|
113
|
+
/** @deprecated use labels.sharedMeta. */
|
|
74
114
|
sharedMeta?: string;
|
|
75
|
-
/**
|
|
115
|
+
/** @deprecated use labels.use. */
|
|
76
116
|
useLabel?: string;
|
|
77
|
-
/**
|
|
117
|
+
/** @deprecated use labels.inferred. */
|
|
78
118
|
inferredLabel?: string;
|
|
79
|
-
/**
|
|
119
|
+
/** @deprecated use labels.inferredText. */
|
|
80
120
|
inferredText?: string;
|
|
81
|
-
/**
|
|
121
|
+
/** @deprecated use labels.declared. */
|
|
82
122
|
declaredLabel?: string;
|
|
83
|
-
/**
|
|
123
|
+
/** @deprecated use labels.declaredLegend. */
|
|
84
124
|
declaredLegend?: string;
|
|
85
|
-
/**
|
|
125
|
+
/** @deprecated use labels.declaredText. */
|
|
86
126
|
declaredText?: string;
|
|
87
127
|
/** false hides the legend. By default it lists only the kinds of line the diagram has. */
|
|
88
128
|
legend?: boolean;
|
|
129
|
+
/** Your own legend entries instead of the kinds of line the diagram has. */
|
|
89
130
|
legendItems?: GraphLegendItem[];
|
|
90
131
|
/** Default 「架構圖」. */
|
|
91
132
|
label?: string;
|
|
@@ -96,22 +137,26 @@ export interface LayerGraphProps {
|
|
|
96
137
|
* between them grow), so lines and their labels have more room. Up past the drawn height: the diagram scrolls up and
|
|
97
138
|
* down inside a shorter frame. ↑↓ 16 px, Enter or a double-click goes back. Default false. */
|
|
98
139
|
resizable?: boolean;
|
|
99
|
-
/** Remembers the
|
|
140
|
+
/** Remembers the reader's choices in localStorage under this name: the dragged height (ui-lg-height:<name>) and the
|
|
141
|
+
* line-label switch (ui-lg-labels:<name>); it also names the diagram's sideways scroll, kept while the page lives.
|
|
142
|
+
* Without it nothing is stored. */
|
|
143
|
+
storageKey?: string;
|
|
144
|
+
/** @deprecated use storageKey. */
|
|
100
145
|
heightKey?: string;
|
|
101
146
|
/** Controls of the page on the same row as 「圖/清單」, at its left, such as the page's own 「依元件/依檔案」 Tabs,
|
|
102
147
|
* so two switches do not sit on two rows. */
|
|
103
148
|
toolbar?: React.ReactNode;
|
|
104
|
-
/**
|
|
149
|
+
/** @deprecated use labels.listNodes and labels.listEdges. */
|
|
105
150
|
listLabels?: {
|
|
106
151
|
nodes?: string;
|
|
107
152
|
edges?: string;
|
|
108
153
|
};
|
|
109
|
-
/**
|
|
110
|
-
* tab). Default: the box ids. */
|
|
154
|
+
/** @deprecated use storageKey. */
|
|
111
155
|
scrollKey?: string;
|
|
156
|
+
/** Extra class on the root element. */
|
|
112
157
|
className?: string;
|
|
113
158
|
}
|
|
114
159
|
/** Architecture as layers of boxes with arrows. Line width shows how often; inferred relations are dashed and labelled;
|
|
115
160
|
* shared items are listed under the diagram instead of drawn. Wider than its box: the boxes narrow (down to 120 px),
|
|
116
161
|
* then the whole diagram scales down (to 0.75 at least); past that it scrolls sideways at full width (PM, WA). */
|
|
117
|
-
export declare function LayerGraph(
|
|
162
|
+
export declare function LayerGraph(props: LayerGraphProps): React.JSX.Element;
|
|
@@ -7,7 +7,9 @@ import { tr } from "../../i18n.js";
|
|
|
7
7
|
import { format } from "../../format.js";
|
|
8
8
|
import { cx, monoNums, resizeObserver } from "../../internal/util.js";
|
|
9
9
|
import { ScrollHint, useScrollHint } from "../../internal/scrollHint.js";
|
|
10
|
+
import { codeSpans } from "../../internal/codeSpans.js";
|
|
10
11
|
import { devWarn } from "../../internal/dev.js";
|
|
12
|
+
import { useStored } from "../../internal/stored.js";
|
|
11
13
|
import { Icon } from "../../icons/Icon.js";
|
|
12
14
|
import { includeIcons } from "../../icons/store.js";
|
|
13
15
|
import lock_default from "../../icons/ph/lock.js";
|
|
@@ -16,9 +18,64 @@ import * as React from "react";
|
|
|
16
18
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
19
|
// src/components/LayerGraph/LayerGraph.tsx
|
|
18
20
|
includeIcons(lock_default, tag_default);
|
|
21
|
+
const OLD_LABELS = {
|
|
22
|
+
sizeLabel: "size",
|
|
23
|
+
countLabel: "count",
|
|
24
|
+
externalLabel: "external",
|
|
25
|
+
sharedLabel: "shared",
|
|
26
|
+
sharedMeta: "sharedMeta",
|
|
27
|
+
useLabel: "use",
|
|
28
|
+
inferredLabel: "inferred",
|
|
29
|
+
inferredText: "inferredText",
|
|
30
|
+
declaredLabel: "declared",
|
|
31
|
+
declaredLegend: "declaredLegend",
|
|
32
|
+
declaredText: "declaredText"
|
|
33
|
+
};
|
|
34
|
+
/** The props with the new names folded into the ones the drawing reads: labels.* into the text props, value and
|
|
35
|
+
* onChange into selected and onSelect, storageKey into the storage names (nothing stored without one). */
|
|
36
|
+
function resolveProps(q) {
|
|
37
|
+
const old = Object.keys(OLD_LABELS).filter((k) => q[k] !== void 0);
|
|
38
|
+
devWarn(old.length > 0 || q.listLabels !== void 0, "LayerGraph", `${[...old, ...q.listLabels ? ["listLabels"] : []].join(", ")} moved into labels: pass labels={{ ${old.map((k) => OLD_LABELS[k] + ": …").join(", ")}${q.listLabels ? (old.length ? ", " : "") + "listNodes: …, listEdges: …" : ""} }}. The old props work until the next release.`);
|
|
39
|
+
devWarn(q.selected !== void 0 || q.onSelect !== void 0, "LayerGraph", "selected and onSelect are renamed value and onChange; pass those instead.");
|
|
40
|
+
devWarn(q.heightKey !== void 0 || q.scrollKey !== void 0, "LayerGraph", "heightKey and scrollKey are one prop now: pass storageKey.");
|
|
41
|
+
const l = q.labels ?? {};
|
|
42
|
+
const key = q.storageKey ?? q.heightKey ?? q.scrollKey;
|
|
43
|
+
return {
|
|
44
|
+
...q,
|
|
45
|
+
selected: q.value !== void 0 ? q.value : q.selected,
|
|
46
|
+
onSelect: q.onChange ?? q.onSelect,
|
|
47
|
+
sizeLabel: l.size ?? q.sizeLabel,
|
|
48
|
+
countLabel: l.count ?? q.countLabel,
|
|
49
|
+
externalLabel: l.external ?? q.externalLabel,
|
|
50
|
+
sharedLabel: l.shared ?? q.sharedLabel,
|
|
51
|
+
sharedMeta: l.sharedMeta ?? q.sharedMeta,
|
|
52
|
+
useLabel: l.use ?? q.useLabel,
|
|
53
|
+
inferredLabel: l.inferred ?? q.inferredLabel,
|
|
54
|
+
inferredText: l.inferredText ?? q.inferredText,
|
|
55
|
+
declaredLabel: l.declared ?? q.declaredLabel,
|
|
56
|
+
declaredLegend: l.declaredLegend ?? q.declaredLegend,
|
|
57
|
+
declaredText: l.declaredText ?? q.declaredText,
|
|
58
|
+
listLabels: {
|
|
59
|
+
nodes: l.listNodes ?? q.listLabels?.nodes,
|
|
60
|
+
edges: l.listEdges ?? q.listLabels?.edges
|
|
61
|
+
},
|
|
62
|
+
heightKey: key,
|
|
63
|
+
scrollKey: key
|
|
64
|
+
};
|
|
65
|
+
}
|
|
19
66
|
const scrollMemory = /* @__PURE__ */ new Map();
|
|
20
67
|
let measure;
|
|
21
|
-
const
|
|
68
|
+
const NUM = /(\d[\d,.]*)/;
|
|
69
|
+
/** A label in pieces: `code` (read the same way as CodeText, by codeSpans) and numbers are mono, the rest sans. */
|
|
70
|
+
function labelPieces(text) {
|
|
71
|
+
return codeSpans(text).flatMap((s) => s.code ? [{
|
|
72
|
+
mono: true,
|
|
73
|
+
text: s.text
|
|
74
|
+
}] : s.text.split(NUM).map((t, i) => ({
|
|
75
|
+
mono: i % 2 === 1,
|
|
76
|
+
text: t
|
|
77
|
+
})).filter((p) => p.text !== ""));
|
|
78
|
+
}
|
|
22
79
|
/** A label with a number: {n} in a string, or a function of the number; the number comes back as \u0001 (monoNums). */
|
|
23
80
|
function withNum(label, n, fallback) {
|
|
24
81
|
if (typeof label === "function") {
|
|
@@ -116,21 +173,28 @@ function HeightHandle(p) {
|
|
|
116
173
|
});
|
|
117
174
|
}
|
|
118
175
|
function labelWidth(text) {
|
|
119
|
-
const parts = text
|
|
176
|
+
const parts = labelPieces(text);
|
|
120
177
|
if (measure === void 0) measure = canvas2d();
|
|
121
178
|
const c = measure;
|
|
122
179
|
if (!c) return text.length * 9;
|
|
123
180
|
const cs = getComputedStyle(document.documentElement);
|
|
124
181
|
const sans = cs.getPropertyValue("--font-sans") || "sans-serif";
|
|
125
182
|
const mono = cs.getPropertyValue("--font-mono") || "monospace";
|
|
126
|
-
return parts.reduce((w,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return w + c.measureText(t[0] === "`" ? t.slice(1, -1) : t).width;
|
|
183
|
+
return parts.reduce((w, p) => {
|
|
184
|
+
c.font = "600 12px " + (p.mono ? mono : sans);
|
|
185
|
+
return w + c.measureText(p.text).width;
|
|
130
186
|
}, 0);
|
|
131
187
|
}
|
|
132
188
|
const LABELS_KEY = "ui-lg-labels:";
|
|
133
|
-
const
|
|
189
|
+
const parseOnOff = (raw) => {
|
|
190
|
+
if (raw !== "1" && raw !== "0") throw new Error("not a stored choice");
|
|
191
|
+
return raw === "1";
|
|
192
|
+
};
|
|
193
|
+
const parseHeight = (raw) => {
|
|
194
|
+
const v = Number(raw);
|
|
195
|
+
if (!Number.isFinite(v)) throw new Error("not a stored height");
|
|
196
|
+
return v;
|
|
197
|
+
};
|
|
134
198
|
const GROW = 24;
|
|
135
199
|
const GROW_MAX = 144;
|
|
136
200
|
/** The label on 1 line, then wrapped onto 2, 3 and 4 lines as evenly as it goes. Breaks between Chinese characters
|
|
@@ -176,10 +240,10 @@ function wraps(text) {
|
|
|
176
240
|
return out;
|
|
177
241
|
}
|
|
178
242
|
function labelParts(text) {
|
|
179
|
-
return text
|
|
243
|
+
return labelPieces(text).map((p, i) => p.mono ? /* @__PURE__ */ jsx("span", {
|
|
180
244
|
className: "ui-lg-code",
|
|
181
|
-
children:
|
|
182
|
-
}, i) :
|
|
245
|
+
children: p.text
|
|
246
|
+
}, i) : p.text);
|
|
183
247
|
}
|
|
184
248
|
/** Rounded orthogonal path through the points. */
|
|
185
249
|
function route(pts, R) {
|
|
@@ -212,28 +276,14 @@ const clean = (pts) => pts.filter((q, i) => {
|
|
|
212
276
|
/** Architecture as layers of boxes with arrows. Line width shows how often; inferred relations are dashed and labelled;
|
|
213
277
|
* shared items are listed under the diagram instead of drawn. Wider than its box: the boxes narrow (down to 120 px),
|
|
214
278
|
* then the whole diagram scales down (to 0.75 at least); past that it scrolls sideways at full width (PM, WA). */
|
|
215
|
-
function LayerGraph(
|
|
279
|
+
function LayerGraph(props) {
|
|
280
|
+
const p = resolveProps(props);
|
|
216
281
|
const [avail, setAvail] = React.useState(0);
|
|
217
282
|
const [fit, setFit] = React.useState(null);
|
|
218
283
|
const fitted = fit && fit.at === avail ? fit : null;
|
|
219
284
|
const NW = fitted?.nw ?? (p.nodeWidth || 200);
|
|
220
285
|
const GAP = 56;
|
|
221
|
-
const [dh,
|
|
222
|
-
if (!p.resizable || !p.heightKey) return 0;
|
|
223
|
-
try {
|
|
224
|
-
const v = Number(localStorage.getItem("ui-lg-height:" + p.heightKey));
|
|
225
|
-
return Number.isFinite(v) ? v : 0;
|
|
226
|
-
} catch {
|
|
227
|
-
return 0;
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
const setDh = React.useCallback((v) => {
|
|
231
|
-
setDhState(v);
|
|
232
|
-
if (!p.heightKey) return;
|
|
233
|
-
try {
|
|
234
|
-
localStorage.setItem("ui-lg-height:" + p.heightKey, String(Math.round(v)));
|
|
235
|
-
} catch {}
|
|
236
|
-
}, [p.heightKey]);
|
|
286
|
+
const [dh, setDh] = useStored(p.resizable && p.heightKey ? "ui-lg-height:" + p.heightKey : void 0, parseHeight, 0, (v) => String(Math.round(v)));
|
|
237
287
|
const spreadKey = avail + "#" + p.nodes.map((n) => n.id).join("|") + "#" + p.edges.map((e) => e.from + ">" + e.to + ":" + (e.label ?? "")).join("|");
|
|
238
288
|
const [spreadAt, setSpread] = React.useState({
|
|
239
289
|
key: "",
|
|
@@ -245,9 +295,8 @@ function LayerGraph(p) {
|
|
|
245
295
|
const PAD = 16;
|
|
246
296
|
const all = p.nodes;
|
|
247
297
|
const sel = p.selected ?? null;
|
|
248
|
-
devWarn(all.some((n) => n.
|
|
249
|
-
|
|
250
|
-
const sizeOf = (n) => n.external && !n.shared ? void 0 : n.size ?? n.fns;
|
|
298
|
+
devWarn(() => all.some((n) => n.external && n.shared), "LayerGraph", "a node is both external and shared; it is drawn as shared. Keep one of the two.");
|
|
299
|
+
const sizeOf = (n) => n.external && !n.shared ? void 0 : n.size;
|
|
251
300
|
const sharedIds = new Set(all.filter((n) => n.shared).map((n) => n.id));
|
|
252
301
|
const main = all.filter((n) => !n.shared);
|
|
253
302
|
const tagLine = main.some((n) => {
|
|
@@ -339,22 +388,22 @@ function LayerGraph(p) {
|
|
|
339
388
|
for (const k in ins) ins[k].sort((a, b) => pos[a.from].x - pos[b.from].x);
|
|
340
389
|
const edgeId = (e) => e.id ?? `${e.from}->${e.to}`;
|
|
341
390
|
const pickEdge = p.onSelectEdge;
|
|
342
|
-
const [labelsOn, setLabelsOn] =
|
|
343
|
-
try {
|
|
344
|
-
const v = window.localStorage.getItem(LABELS_KEY + (p.scrollKey ?? allIds(p.nodes)));
|
|
345
|
-
if (v === "1" || v === "0") return v === "1";
|
|
346
|
-
} catch {}
|
|
347
|
-
return p.edgeLabels !== "hover";
|
|
348
|
-
});
|
|
391
|
+
const [labelsOn, setLabelsOn] = useStored(p.scrollKey ? LABELS_KEY + p.scrollKey : void 0, parseOnOff, p.edgeLabels !== "hover", (v) => v ? "1" : "0");
|
|
349
392
|
const peek = !labelsOn;
|
|
350
|
-
const switchLabels = () =>
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
393
|
+
const switchLabels = () => setLabelsOn(!labelsOn);
|
|
394
|
+
const canvasRef = React.useRef(null);
|
|
395
|
+
const hoverRef = React.useRef(null);
|
|
396
|
+
const paintHover = React.useCallback(() => {
|
|
397
|
+
const root = canvasRef.current;
|
|
398
|
+
if (!root) return;
|
|
399
|
+
for (const el of root.querySelectorAll("[data-hl]")) el.classList.toggle("is-hl", el.getAttribute("data-hl") === hoverRef.current);
|
|
400
|
+
}, []);
|
|
401
|
+
const setHover = React.useCallback((id) => {
|
|
402
|
+
if (hoverRef.current === id) return;
|
|
403
|
+
hoverRef.current = id;
|
|
404
|
+
paintHover();
|
|
405
|
+
}, [paintHover]);
|
|
406
|
+
React.useLayoutEffect(paintHover);
|
|
358
407
|
const { ref: scrollRef, more: scrollMore, overflows, scrolled, onScroll } = useScrollHint();
|
|
359
408
|
const uid = React.useId().replace(/:/g, "");
|
|
360
409
|
const [view, setView] = React.useState("graph");
|
|
@@ -612,7 +661,6 @@ function LayerGraph(p) {
|
|
|
612
661
|
const r = related(e);
|
|
613
662
|
const dim = focus && !r;
|
|
614
663
|
const picked = e === selEdge;
|
|
615
|
-
const hovered = !!pickEdge && hover === edgeId(e) && !r;
|
|
616
664
|
const up = isUp(e);
|
|
617
665
|
let pts;
|
|
618
666
|
let tx;
|
|
@@ -781,7 +829,7 @@ function LayerGraph(p) {
|
|
|
781
829
|
ty
|
|
782
830
|
]);
|
|
783
831
|
}
|
|
784
|
-
const w = (lab(e) ? 1.5 : 1.5 + 5.5 * ((e.count || 0) / maxCount)) + (picked ? 1.5 : 0)
|
|
832
|
+
const w = (lab(e) ? 1.5 : 1.5 + 5.5 * ((e.count || 0) / maxCount)) + (picked ? 1.5 : 0);
|
|
785
833
|
const cpts = clean(pts);
|
|
786
834
|
ptsOf[idx] = cpts;
|
|
787
835
|
for (let k = 1; k < cpts.length; k++) {
|
|
@@ -799,15 +847,16 @@ function LayerGraph(p) {
|
|
|
799
847
|
}
|
|
800
848
|
const d = route(cpts, 10);
|
|
801
849
|
paths.push(/* @__PURE__ */ jsx("path", {
|
|
802
|
-
className: cx("ui-lg-edge", e.declared ? "is-declared" : e.inferred && "is-inferred", r && "is-related", dim && "is-dim"
|
|
850
|
+
className: cx("ui-lg-edge", e.declared ? "is-declared" : e.inferred && "is-inferred", r && "is-related", dim && "is-dim"),
|
|
851
|
+
"data-hl": edgeId(e),
|
|
803
852
|
d,
|
|
804
|
-
strokeWidth: w
|
|
853
|
+
strokeWidth: w,
|
|
854
|
+
style: { "--lg-w": w }
|
|
805
855
|
}, "p" + idx));
|
|
806
856
|
if (!pickEdge && peek) hitPaths.push(/* @__PURE__ */ jsx("path", {
|
|
807
857
|
className: "ui-lg-hit is-peek",
|
|
808
858
|
d,
|
|
809
|
-
|
|
810
|
-
onPointerLeave: () => setHover(null)
|
|
859
|
+
"data-hover": edgeId(e)
|
|
811
860
|
}, "h" + idx));
|
|
812
861
|
if (pickEdge) hitPaths.push(/* @__PURE__ */ jsx("path", {
|
|
813
862
|
className: "ui-lg-hit",
|
|
@@ -825,10 +874,7 @@ function LayerGraph(p) {
|
|
|
825
874
|
ev.stopPropagation();
|
|
826
875
|
choose(e);
|
|
827
876
|
},
|
|
828
|
-
|
|
829
|
-
onPointerLeave: () => setHover(null),
|
|
830
|
-
onFocus: peek ? () => setHover(edgeId(e)) : void 0,
|
|
831
|
-
onBlur: peek ? () => setHover(null) : void 0,
|
|
877
|
+
"data-hover": edgeId(e),
|
|
832
878
|
onKeyDown: (ev) => {
|
|
833
879
|
if (ev.key === "Enter" || ev.key === " ") {
|
|
834
880
|
ev.preventDefault();
|
|
@@ -951,7 +997,8 @@ function LayerGraph(p) {
|
|
|
951
997
|
};
|
|
952
998
|
const labelEl = (m, x0, top, lines = [m.text], over = false, num = 0) => /* @__PURE__ */ jsx("span", {
|
|
953
999
|
"aria-hidden": pickEdge ? true : void 0,
|
|
954
|
-
className: cx("ui-lg-label", over && "is-over", num > 0 && "is-numbered", num > 0 &&
|
|
1000
|
+
className: cx("ui-lg-label", over && "is-over", num > 0 && "is-numbered", num > 0 && m.e === selEdge && "is-shown", pickEdge && "is-clickable", m.r && "is-related", m.dim && "is-dim", peek && !m.r && m.e !== selEdge && "is-quiet"),
|
|
1001
|
+
"data-hl": edgeId(m.e),
|
|
955
1002
|
style: {
|
|
956
1003
|
left: x0,
|
|
957
1004
|
top
|
|
@@ -960,8 +1007,7 @@ function LayerGraph(p) {
|
|
|
960
1007
|
ev.stopPropagation();
|
|
961
1008
|
choose(m.e);
|
|
962
1009
|
} : void 0,
|
|
963
|
-
|
|
964
|
-
onPointerLeave: pickEdge ? () => setHover(null) : void 0,
|
|
1010
|
+
"data-hover": pickEdge ? edgeId(m.e) : void 0,
|
|
965
1011
|
children: lines.map((t, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [i ? /* @__PURE__ */ jsx("br", {}) : null, labelParts(t)] }, i))
|
|
966
1012
|
}, "l" + m.idx);
|
|
967
1013
|
const later = [];
|
|
@@ -1188,14 +1234,14 @@ function LayerGraph(p) {
|
|
|
1188
1234
|
marks.sort((m, n) => Number(!!m.up) - Number(!!n.up) || m.ty - n.ty || m.tx - n.tx).forEach((m) => place(m, false));
|
|
1189
1235
|
later.forEach((m) => place(m, true));
|
|
1190
1236
|
for (const o of numbered) labels.push(/* @__PURE__ */ jsx("span", {
|
|
1191
|
-
className: cx("ui-lg-num", o.m.dim && "is-dim",
|
|
1237
|
+
className: cx("ui-lg-num", o.m.dim && "is-dim", o.m.e === selEdge && "is-on"),
|
|
1238
|
+
"data-hl": edgeId(o.m.e),
|
|
1192
1239
|
style: {
|
|
1193
1240
|
left: o.x,
|
|
1194
1241
|
top: o.y
|
|
1195
1242
|
},
|
|
1196
1243
|
"aria-hidden": "true",
|
|
1197
|
-
|
|
1198
|
-
onPointerLeave: pickEdge ? () => setHover(null) : void 0,
|
|
1244
|
+
"data-hover": pickEdge ? edgeId(o.m.e) : void 0,
|
|
1199
1245
|
children: o.n
|
|
1200
1246
|
}, "n" + o.m.idx));
|
|
1201
1247
|
return {
|
|
@@ -1210,46 +1256,76 @@ function LayerGraph(p) {
|
|
|
1210
1256
|
numbered
|
|
1211
1257
|
};
|
|
1212
1258
|
};
|
|
1213
|
-
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
let drawn = draw();
|
|
1220
|
-
const grows = () => [...drawn.need].filter((g) => gaps[g] < floor[g] + GROW_MAX);
|
|
1221
|
-
for (let k = 0; k < GROW_MAX / GROW && grows().length; k++) {
|
|
1222
|
-
for (const g of grows()) gaps[g] = Math.min(floor[g] + GROW_MAX, gaps[g] + GROW);
|
|
1223
|
-
placeRows();
|
|
1224
|
-
drawn = draw();
|
|
1225
|
-
}
|
|
1226
|
-
const stuck = [...drawn.need].filter((g) => gaps[g] >= floor[g] + GROW_MAX);
|
|
1227
|
-
if (stuck.length) {
|
|
1228
|
-
for (const g of stuck) gaps[g] = floor[g];
|
|
1259
|
+
const routed = React.useMemo(() => {
|
|
1260
|
+
for (const id in laneCount) {
|
|
1261
|
+
const g = layerIndex[id] - 1;
|
|
1262
|
+
if (g >= 0) gaps[g] = Math.max(gaps[g], laneCount[id] * LANE_H + 40);
|
|
1263
|
+
}
|
|
1264
|
+
const floor = gaps.slice();
|
|
1229
1265
|
placeRows();
|
|
1230
|
-
drawn = draw();
|
|
1231
|
-
const
|
|
1232
|
-
for (let k = 0; k < GROW_MAX / GROW &&
|
|
1233
|
-
for (const g of
|
|
1266
|
+
let drawn = draw();
|
|
1267
|
+
const grows = () => [...drawn.need].filter((g) => gaps[g] < floor[g] + GROW_MAX);
|
|
1268
|
+
for (let k = 0; k < GROW_MAX / GROW && grows().length; k++) {
|
|
1269
|
+
for (const g of grows()) gaps[g] = Math.min(floor[g] + GROW_MAX, gaps[g] + GROW);
|
|
1234
1270
|
placeRows();
|
|
1235
1271
|
drawn = draw();
|
|
1236
1272
|
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1273
|
+
const stuck = [...drawn.need].filter((g) => gaps[g] >= floor[g] + GROW_MAX);
|
|
1274
|
+
if (stuck.length) {
|
|
1275
|
+
for (const g of stuck) gaps[g] = floor[g];
|
|
1276
|
+
placeRows();
|
|
1277
|
+
drawn = draw();
|
|
1278
|
+
const crowded = () => [...drawn.crowd].filter((g) => stuck.includes(g) && gaps[g] < floor[g] + GROW_MAX);
|
|
1279
|
+
for (let k = 0; k < GROW_MAX / GROW && crowded().length; k++) {
|
|
1280
|
+
for (const g of crowded()) gaps[g] = Math.min(floor[g] + GROW_MAX, gaps[g] + GROW);
|
|
1281
|
+
placeRows();
|
|
1282
|
+
drawn = draw();
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
for (let k = 0; k < 3 && drawn.least < 0; k++) {
|
|
1286
|
+
const shift = Math.ceil(-drawn.least);
|
|
1287
|
+
for (const id in pos) pos[id].x += shift;
|
|
1288
|
+
W += shift;
|
|
1289
|
+
drawn = draw();
|
|
1290
|
+
}
|
|
1291
|
+
if (drawn.wide > W) {
|
|
1292
|
+
W = Math.ceil(drawn.wide);
|
|
1293
|
+
drawn = draw();
|
|
1294
|
+
}
|
|
1295
|
+
return {
|
|
1296
|
+
drawn,
|
|
1297
|
+
W,
|
|
1298
|
+
H,
|
|
1299
|
+
gaps: gaps.slice(),
|
|
1300
|
+
pos: Object.fromEntries(Object.entries(pos).map(([k, v]) => [k, { ...v }]))
|
|
1301
|
+
};
|
|
1302
|
+
}, [
|
|
1303
|
+
p.nodes,
|
|
1304
|
+
p.edges,
|
|
1305
|
+
NW,
|
|
1306
|
+
COL,
|
|
1307
|
+
NH,
|
|
1308
|
+
extra,
|
|
1309
|
+
labelsOn,
|
|
1310
|
+
sel,
|
|
1311
|
+
p.selectedEdge,
|
|
1312
|
+
pickEdge,
|
|
1313
|
+
p.onSelect,
|
|
1314
|
+
p.countLabel,
|
|
1315
|
+
p.inferredLabel,
|
|
1316
|
+
p.declaredLabel,
|
|
1317
|
+
p.nodeWidth
|
|
1318
|
+
]);
|
|
1319
|
+
const drawn = routed.drawn;
|
|
1320
|
+
W = routed.W;
|
|
1321
|
+
H = routed.H;
|
|
1322
|
+
gaps.splice(0, gaps.length, ...routed.gaps);
|
|
1323
|
+
for (const id in routed.pos) pos[id] = { ...routed.pos[id] };
|
|
1248
1324
|
const { paths, labels, hitPaths, numbered } = drawn;
|
|
1249
1325
|
const firstX = Math.min(...main.filter((n) => pos[n.id]).map((n) => boxOf(n.id).x), W);
|
|
1250
1326
|
const selBox = sel != null && pos[sel] ? boxOf(sel) : null;
|
|
1251
1327
|
const sizeText = (n) => withNum(p.sizeLabel, n, () => byCount(n, "1 個項目", "{n} 個項目"));
|
|
1252
|
-
const externalText = p.externalLabel ?? tr("
|
|
1328
|
+
const externalText = p.externalLabel ?? tr("外部");
|
|
1253
1329
|
const useText = p.useLabel ?? tr("使用 {n} 次");
|
|
1254
1330
|
const tagOf = (n) => n.tag ? /* @__PURE__ */ jsxs("span", {
|
|
1255
1331
|
className: cx("ui-lg-tag", n.tagTone === "warning" && "is-warning"),
|
|
@@ -1497,7 +1573,7 @@ function LayerGraph(p) {
|
|
|
1497
1573
|
const frameH = p.resizable && dh < 0 ? Math.max(Math.min(MIN_FRAME, naturalH), naturalH + dh) : null;
|
|
1498
1574
|
const dragTo = (v) => Math.max(Math.min(MIN_FRAME, naturalH) - naturalH, Math.min(v, between ? MAX_EXTRA * between * scale : 0));
|
|
1499
1575
|
return /* @__PURE__ */ jsxs("div", {
|
|
1500
|
-
className: cx("ui-graph ui-lg", p.className),
|
|
1576
|
+
className: cx("ui-graph ui-lg", pickEdge && "has-pick", p.className),
|
|
1501
1577
|
children: [
|
|
1502
1578
|
p.listView === false && !toggleShown && !p.toolbar ? null : /* @__PURE__ */ jsxs("div", {
|
|
1503
1579
|
className: "ui-lg-bar",
|
|
@@ -1547,6 +1623,7 @@ function LayerGraph(p) {
|
|
|
1547
1623
|
onScroll: onScrollKeep,
|
|
1548
1624
|
style: frameH != null ? { height: frameH } : void 0,
|
|
1549
1625
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1626
|
+
ref: canvasRef,
|
|
1550
1627
|
className: "ui-lg-canvas",
|
|
1551
1628
|
style: scale === 1 ? {
|
|
1552
1629
|
width: W,
|
|
@@ -1562,6 +1639,10 @@ function LayerGraph(p) {
|
|
|
1562
1639
|
},
|
|
1563
1640
|
role: "group",
|
|
1564
1641
|
"aria-label": p.label || tr("架構圖"),
|
|
1642
|
+
onPointerOver: (e) => setHover(e.target.closest("[data-hover]")?.getAttribute("data-hover") ?? null),
|
|
1643
|
+
onPointerLeave: () => setHover(null),
|
|
1644
|
+
onFocus: (e) => peek && setHover(e.target.closest("[data-hover]")?.getAttribute("data-hover") ?? null),
|
|
1645
|
+
onBlur: () => peek && setHover(null),
|
|
1565
1646
|
onClick: pickEdge && p.selectedEdge != null ? () => pickEdge(null) : void 0,
|
|
1566
1647
|
children: [
|
|
1567
1648
|
/* @__PURE__ */ jsx("svg", {
|
|
@@ -1631,16 +1712,16 @@ function LayerGraph(p) {
|
|
|
1631
1712
|
showList || p.legend === false || !p.legendItems && !edges.some((e) => pos[e.from] && pos[e.to]) ? null : /* @__PURE__ */ jsx(GraphLegend, { items: p.legendItems || [
|
|
1632
1713
|
...edges.some((e) => !lab(e) && pos[e.from] && pos[e.to]) ? [{
|
|
1633
1714
|
type: "weight",
|
|
1634
|
-
label: "次數越多線越粗"
|
|
1715
|
+
label: tr("次數越多線越粗")
|
|
1635
1716
|
}] : [],
|
|
1636
1717
|
...edges.some((e) => e.inferred && !e.declared && pos[e.from] && pos[e.to]) ? [{
|
|
1637
1718
|
type: "inferred",
|
|
1638
|
-
label: p.inferredLabel || "推測的關係",
|
|
1719
|
+
label: p.inferredLabel || tr("推測的關係"),
|
|
1639
1720
|
text: p.inferredText
|
|
1640
1721
|
}] : [],
|
|
1641
1722
|
...edges.some((e) => e.declared && pos[e.from] && pos[e.to]) ? [{
|
|
1642
1723
|
type: "declared",
|
|
1643
|
-
label: p.declaredLegend || "專案宣告的關係",
|
|
1724
|
+
label: p.declaredLegend || tr("專案宣告的關係"),
|
|
1644
1725
|
text: p.declaredText
|
|
1645
1726
|
}] : []
|
|
1646
1727
|
] })
|