@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,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Button } from "../Button/Button.js";
|
|
3
3
|
import { TextField } from "../TextField/TextField.js";
|
|
4
|
+
import { Link } from "../Link/Link.js";
|
|
4
5
|
import { tr } from "../../i18n.js";
|
|
5
6
|
import { Icon } from "../../icons/Icon.js";
|
|
6
7
|
import { cx } from "../../internal/util.js";
|
|
7
|
-
import { FieldErrorIcon, FieldLabel, FieldMessage } from "../../internal/Field.js";
|
|
8
|
+
import { FieldErrorIcon, FieldLabel, FieldMessage, QuietErrors } from "../../internal/Field.js";
|
|
8
9
|
import { includeIcons } from "../../icons/store.js";
|
|
9
10
|
import eye_default from "../../icons/ph/eye.js";
|
|
10
11
|
import eye_slash_default from "../../icons/ph/eye-slash.js";
|
|
@@ -12,10 +13,11 @@ import * as React from "react";
|
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
// src/components/LoginCard/LoginCard.tsx
|
|
14
15
|
includeIcons(eye_default, eye_slash_default);
|
|
15
|
-
/** A centered sign-in
|
|
16
|
+
/** A centered sign-in page: account, password with show-password, 「忘記密碼」 beside the password label, errors under each
|
|
16
17
|
* field. Pass error = { account, password } from your sign-in check. */
|
|
17
18
|
function LoginCard(p) {
|
|
18
19
|
const pwId = React.useId();
|
|
20
|
+
const userId = React.useId();
|
|
19
21
|
const [user, setUser] = React.useState("");
|
|
20
22
|
const [pass, setPass] = React.useState("");
|
|
21
23
|
const [show, setShow] = React.useState(false);
|
|
@@ -23,6 +25,17 @@ function LoginCard(p) {
|
|
|
23
25
|
const err = p.error || {};
|
|
24
26
|
const uErr = tried && !user ? tr("請輸入帳號") : err.account;
|
|
25
27
|
const pErr = tried && !pass ? tr("請輸入密碼") : err.password;
|
|
28
|
+
const focusFirst = (u, pw) => {
|
|
29
|
+
const id = u ? userId : pw ? pwId : null;
|
|
30
|
+
if (id) document.getElementById(id)?.focus();
|
|
31
|
+
};
|
|
32
|
+
const errKey = `${err.account ?? ""}\u0000${err.password ?? ""}`;
|
|
33
|
+
const lastErr = React.useRef(errKey);
|
|
34
|
+
React.useEffect(() => {
|
|
35
|
+
if (errKey === lastErr.current) return;
|
|
36
|
+
lastErr.current = errKey;
|
|
37
|
+
focusFirst(!!err.account, !!err.password);
|
|
38
|
+
});
|
|
26
39
|
function submit(e) {
|
|
27
40
|
e.preventDefault();
|
|
28
41
|
setTried(true);
|
|
@@ -30,85 +43,93 @@ function LoginCard(p) {
|
|
|
30
43
|
account: user,
|
|
31
44
|
password: pass
|
|
32
45
|
});
|
|
46
|
+
else focusFirst(!user, !pass);
|
|
33
47
|
}
|
|
34
|
-
return /* @__PURE__ */ jsx("
|
|
48
|
+
return /* @__PURE__ */ jsx("main", {
|
|
35
49
|
className: cx("ui-loginpage", p.className),
|
|
36
|
-
children: /* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
className: "ui-
|
|
68
|
-
children:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
50
|
+
children: /* @__PURE__ */ jsx(QuietErrors.Provider, {
|
|
51
|
+
value: true,
|
|
52
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
53
|
+
className: "ui-logincard",
|
|
54
|
+
onSubmit: submit,
|
|
55
|
+
noValidate: true,
|
|
56
|
+
children: [
|
|
57
|
+
p.logo || p.brand ? /* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: "ui-login-brand",
|
|
59
|
+
children: [p.logo ? /* @__PURE__ */ jsx("span", {
|
|
60
|
+
className: "ui-login-logo",
|
|
61
|
+
children: p.logo
|
|
62
|
+
}) : null, p.brand]
|
|
63
|
+
}) : null,
|
|
64
|
+
/* @__PURE__ */ jsx("h1", {
|
|
65
|
+
className: "ui-login-title",
|
|
66
|
+
children: p.title || tr("登入")
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx(TextField, {
|
|
69
|
+
id: userId,
|
|
70
|
+
label: tr("帳號"),
|
|
71
|
+
value: user,
|
|
72
|
+
onChange: setUser,
|
|
73
|
+
placeholder: tr("Email 或帳號"),
|
|
74
|
+
autoComplete: "username",
|
|
75
|
+
error: uErr
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsxs("div", {
|
|
78
|
+
className: cx("ui-field", pErr && "has-error"),
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsxs("div", {
|
|
81
|
+
className: "ui-login-pwlabel",
|
|
82
|
+
children: [/* @__PURE__ */ jsx(FieldLabel, {
|
|
83
|
+
htmlFor: pwId,
|
|
84
|
+
children: tr("密碼")
|
|
85
|
+
}), p.forgotHref ? /* @__PURE__ */ jsx(Link, {
|
|
86
|
+
href: p.forgotHref,
|
|
87
|
+
className: "ui-login-forgot",
|
|
88
|
+
children: tr("忘記密碼")
|
|
89
|
+
}) : null]
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ jsxs("div", {
|
|
92
|
+
className: cx("ui-pwfield", pErr && "is-invalid"),
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsx("input", {
|
|
95
|
+
id: pwId,
|
|
96
|
+
className: "ui-pwfield-input",
|
|
97
|
+
type: show ? "text" : "password",
|
|
98
|
+
value: pass,
|
|
99
|
+
autoComplete: "current-password",
|
|
100
|
+
"aria-invalid": pErr ? true : void 0,
|
|
101
|
+
"aria-describedby": pErr ? pwId + "-err" : void 0,
|
|
102
|
+
onChange: (e) => setPass(e.target.value)
|
|
103
|
+
}),
|
|
104
|
+
pErr ? /* @__PURE__ */ jsx(FieldErrorIcon, { inline: true }) : null,
|
|
105
|
+
/* @__PURE__ */ jsx("button", {
|
|
106
|
+
type: "button",
|
|
107
|
+
className: "ui-datefield-btn",
|
|
108
|
+
"aria-label": tr("顯示密碼"),
|
|
109
|
+
"aria-pressed": show,
|
|
110
|
+
onClick: () => setShow(!show),
|
|
111
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
112
|
+
name: show ? "eye-slash" : "eye",
|
|
113
|
+
size: 18
|
|
114
|
+
})
|
|
94
115
|
})
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
]
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ jsx(FieldMessage, {
|
|
119
|
+
id: pwId + "-err",
|
|
120
|
+
error: pErr
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ jsx(Button, {
|
|
125
|
+
variant: "primary",
|
|
126
|
+
type: "submit",
|
|
127
|
+
loading: p.loading,
|
|
128
|
+
className: "ui-login-submit",
|
|
129
|
+
children: tr("登入")
|
|
130
|
+
})
|
|
131
|
+
]
|
|
132
|
+
})
|
|
112
133
|
})
|
|
113
134
|
});
|
|
114
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginCard.js","names":["phEye","phEyeSlash"],"sources":["../../../src/components/LoginCard/LoginCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button } from '../Button/Button';\nimport { TextField } from '../TextField/TextField';\nimport { tr } from '../../i18n';\nimport { Icon } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { FieldErrorIcon, FieldLabel, FieldMessage } from '../../internal/Field';\nimport { includeIcons } from '../../icons/store';\nimport phEye from '../../icons/ph/eye';\nimport phEyeSlash from '../../icons/ph/eye-slash';\n\nincludeIcons(phEye, phEyeSlash);\n\nexport interface LoginCardProps {\n /**
|
|
1
|
+
{"version":3,"file":"LoginCard.js","names":["phEye","phEyeSlash"],"sources":["../../../src/components/LoginCard/LoginCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button } from '../Button/Button';\nimport { TextField } from '../TextField/TextField';\nimport { Link } from '../Link/Link';\nimport { tr } from '../../i18n';\nimport { Icon } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { FieldErrorIcon, FieldLabel, FieldMessage, QuietErrors } from '../../internal/Field';\nimport { includeIcons } from '../../icons/store';\nimport phEye from '../../icons/ph/eye';\nimport phEyeSlash from '../../icons/ph/eye-slash';\n\nincludeIcons(phEye, phEyeSlash);\n\nexport interface LoginCardProps {\n /** The product's mark (an <svg> or <img>, 32 px tall) beside the brand name. */\n logo?: React.ReactNode;\n /** Product name above the title. */\n brand?: React.ReactNode;\n /** Default 「登入」. */\n title?: string;\n /** Receives the account and password when both are filled. */\n onSubmit: (v: { account: string; password: string }) => void;\n /** Errors from your sign-in check, shown under each field: the cause and the fix; `backticks` are code. Focus moves to\n * the first field with an error when it arrives. */\n error?: { account?: string; password?: string } | null;\n /** Adds 「忘記密碼」 beside the password label. */\n forgotHref?: string;\n /** The sign-in is running: the button shows a spinner and ignores presses, keeping focus. */\n loading?: boolean;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** A centered sign-in page: account, password with show-password, 「忘記密碼」 beside the password label, errors under each\n * field. Pass error = { account, password } from your sign-in check. */\nexport function LoginCard(p: LoginCardProps) {\n const pwId = React.useId();\n const userId = React.useId();\n const [user, setUser] = React.useState('');\n const [pass, setPass] = React.useState('');\n const [show, setShow] = React.useState(false);\n const [tried, setTried] = React.useState(false);\n const err = p.error || {};\n const uErr = tried && !user ? tr('請輸入帳號') : err.account;\n const pErr = tried && !pass ? tr('請輸入密碼') : err.password;\n // Focus goes to the first field with an error: the field reads its error (aria-describedby), one message at a time.\n const focusFirst = (u: boolean, pw: boolean) => {\n const id = u ? userId : pw ? pwId : null;\n if (id) document.getElementById(id)?.focus();\n };\n // An error from the sign-in check arrives after the request: focus its field then too.\n const errKey = `${err.account ?? ''}\\u0000${err.password ?? ''}`;\n const lastErr = React.useRef(errKey);\n React.useEffect(() => {\n if (errKey === lastErr.current) return;\n lastErr.current = errKey;\n focusFirst(!!err.account, !!err.password);\n });\n function submit(e: React.FormEvent) {\n e.preventDefault();\n setTried(true);\n if (user && pass) p.onSubmit({ account: user, password: pass });\n else focusFirst(!user, !pass);\n }\n return (\n <main className={cx('ui-loginpage', p.className)}>\n <QuietErrors.Provider value>\n <form className=\"ui-logincard\" onSubmit={submit} noValidate>\n {p.logo || p.brand ? (\n <div className=\"ui-login-brand\">\n {p.logo ? <span className=\"ui-login-logo\">{p.logo}</span> : null}\n {p.brand}\n </div>\n ) : null}\n <h1 className=\"ui-login-title\">{p.title || tr('登入')}</h1>\n <TextField id={userId} label={tr('帳號')} value={user} onChange={setUser} placeholder={tr('Email 或帳號')} autoComplete=\"username\" error={uErr} />\n <div className={cx('ui-field', pErr && 'has-error')}>\n <div className=\"ui-login-pwlabel\">\n <FieldLabel htmlFor={pwId}>{tr('密碼')}</FieldLabel>\n {p.forgotHref ? (\n <Link href={p.forgotHref} className=\"ui-login-forgot\">\n {tr('忘記密碼')}\n </Link>\n ) : null}\n </div>\n <div className={cx('ui-pwfield', pErr && 'is-invalid')}>\n <input\n id={pwId}\n className=\"ui-pwfield-input\"\n type={show ? 'text' : 'password'}\n value={pass}\n autoComplete=\"current-password\"\n aria-invalid={pErr ? true : undefined}\n aria-describedby={pErr ? pwId + '-err' : undefined}\n onChange={(e) => setPass(e.target.value)}\n />\n {pErr ? <FieldErrorIcon inline /> : null}\n {/* One name, and pressed or not: 「顯示密碼,已按下」. */}\n <button type=\"button\" className=\"ui-datefield-btn\" aria-label={tr('顯示密碼')} aria-pressed={show} onClick={() => setShow(!show)}>\n <Icon name={show ? 'eye-slash' : 'eye'} size={18} />\n </button>\n </div>\n <FieldMessage id={pwId + '-err'} error={pErr} />\n </div>\n <Button variant=\"primary\" type=\"submit\" loading={p.loading} className=\"ui-login-submit\">\n {tr('登入')}\n </Button>\n </form>\n </QuietErrors.Provider>\n </main>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,aAAaA,aAAOC,iBAAU;;;AAwB9B,SAAgB,UAAU,GAAmB;CAC3C,MAAM,OAAO,MAAM,MAAM;CACzB,MAAM,SAAS,MAAM,MAAM;CAC3B,MAAM,CA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A,GAAG,IAAI;KACF,CAAA;IACJ;;EACc,CAAA;CAClB,CAAA;AAEV"}
|
|
@@ -31,6 +31,7 @@ export interface MarkdownProps {
|
|
|
31
31
|
terms?: readonly TermDef[];
|
|
32
32
|
/** 'first' (default): each word only where it first appears in a paragraph, list item or table cell. 'all': everywhere. */
|
|
33
33
|
termsMark?: TermsMark;
|
|
34
|
+
/** Extra class on the root element. */
|
|
34
35
|
className?: string;
|
|
35
36
|
}
|
|
36
37
|
/** Markdown from project documents and code comments, in the system's own type, code and table styles. Never runs HTML:
|
|
@@ -328,7 +328,7 @@ function inline(src, c) {
|
|
|
328
328
|
id = decodeURIComponent(termId);
|
|
329
329
|
} catch {}
|
|
330
330
|
const t = c.terms?.find((x) => x.term === id);
|
|
331
|
-
devWarn(!t, "Markdown", `[${m.text}](term:${termId})
|
|
331
|
+
devWarn(!t, "Markdown", `[${m.text}](term:${termId}) has no entry with term "${id}" in terms, so only the text shows. Add it to terms, or change the word after term:.`);
|
|
332
332
|
c.seen?.add(id);
|
|
333
333
|
out.push(t ? termNode(t, c.k(), inline(m.text, noTerms(c))) : /* @__PURE__ */ jsx(React.Fragment, { children: inline(m.text, noTerms(c)) }, c.k()));
|
|
334
334
|
i = m.end;
|
|
@@ -478,6 +478,15 @@ function link(raw, children, c, name) {
|
|
|
478
478
|
children
|
|
479
479
|
}, c.k());
|
|
480
480
|
}
|
|
481
|
+
/** A list item whose whole content is one link (a reference list: 「RFC 1812: IPv4 router …」): that link, made a row
|
|
482
|
+
* that fills the item, or null. Links inside a sentence stay inline. */
|
|
483
|
+
function rowLink(nodes) {
|
|
484
|
+
const parts = nodes.filter((n) => !(typeof n === "string" && !n.trim()));
|
|
485
|
+
if (parts.length !== 1) return null;
|
|
486
|
+
const only = parts[0];
|
|
487
|
+
if (!React.isValidElement(only) || only.type !== "a" && only.type !== "button" || only.props.className !== "ui-md-link") return null;
|
|
488
|
+
return React.cloneElement(only, { className: "ui-md-link is-row" });
|
|
489
|
+
}
|
|
481
490
|
const FENCE_LANG = {
|
|
482
491
|
python: "py",
|
|
483
492
|
javascript: "js",
|
|
@@ -539,7 +548,16 @@ function Markdown(p) {
|
|
|
539
548
|
}, c.k());
|
|
540
549
|
case "quote": return /* @__PURE__ */ jsx("blockquote", { children: render(b.blocks) }, c.k());
|
|
541
550
|
case "list": {
|
|
542
|
-
const items = b.items.map((it) =>
|
|
551
|
+
const items = b.items.map((it) => {
|
|
552
|
+
const key = c.k();
|
|
553
|
+
if (!(it.length === 1 && it[0].t === "p")) return /* @__PURE__ */ jsx("li", { children: render(it) }, key);
|
|
554
|
+
const nodes = inline(it[0].text, block(c));
|
|
555
|
+
const row = rowLink(nodes);
|
|
556
|
+
return row ? /* @__PURE__ */ jsx("li", {
|
|
557
|
+
className: "ui-md-rowitem",
|
|
558
|
+
children: row
|
|
559
|
+
}, key) : /* @__PURE__ */ jsx("li", { children: nodes }, key);
|
|
560
|
+
});
|
|
543
561
|
return b.ordered ? /* @__PURE__ */ jsx("ol", {
|
|
544
562
|
start: b.start === 1 ? void 0 : b.start,
|
|
545
563
|
children: items
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.js","names":["phCaretRight"],"sources":["../../../src/components/Markdown/Markdown.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Alert, type AlertTone } from '../Alert/Alert';\nimport { Icon } from '../../icons/Icon';\nimport { ColResize, TableDialog, ZoomButton } from '../../internal/tableTools';\nimport { cx, resizeObserver } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\nimport { CodeView } from '../CodeView/CodeView';\nimport { languageOf } from '../CodeView/tokens';\nimport { InlineCode, type OnRef, type RefHref } from '../InlineCode/InlineCode';\nimport { AiMark } from '../AiMark/AiMark';\nimport { findTerms, termNode, termPattern, withTerms, type TermDef, type TermsMark } from '../../internal/terms';\nimport { includeIcons } from '../../icons/store';\nimport phCaretRight from '../../icons/ph/caret-right';\n\nincludeIcons(phCaretRight);\n\n/* A small Markdown reader for project documents and code comments. It builds React elements only: no HTML from the\n source is ever run. HTML tags are dropped and their text kept (MX). */\n\ntype Block =\n | { t: 'h'; level: number; text: string }\n | { t: 'p'; text: string }\n | { t: 'code'; lang: string; code: string }\n | { t: 'quote'; blocks: Block[] }\n | { t: 'list'; ordered: boolean; start: number; items: Block[][] }\n | { t: 'table'; head: string[]; align: ('left' | 'right' | 'center' | null)[]; rows: string[][] }\n | { t: 'hr' }\n | { t: 'details'; summary: string; blocks: Block[] }\n | { t: 'alert'; tone: AlertTone; blocks: Block[] };\n\n// DA: <details> and <summary> are the only HTML let through, without attributes; they make a closed block.\nconst DETAILS_OPEN = /^\\s*<details\\b[^>]*>/i;\nconst DETAILS_TAG = /<(\\/?)details\\b[^>]*>/gi;\nconst SUMMARY = /<summary\\b[^>]*>([\\s\\S]*?)<\\/summary>/i;\n// NB: GitHub's alerts, > [!NOTE] and the like, shown as the system's Alert.\nconst ALERT = /^\\s*\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]\\s*$/i;\nconst ALERT_TONE: Record<string, AlertTone> = { NOTE: 'info', TIP: 'success', IMPORTANT: 'info', WARNING: 'warning', CAUTION: 'danger' };\n\nconst FENCE = /^ {0,3}(`{3,}|~{3,})\\s*([\\w+#.-]*)/;\nconst HEADING = /^ {0,3}(#{1,6})(?:\\s+(.*?))?\\s*#*\\s*$/;\nconst HR = /^ {0,3}([-*_])(?:\\s*\\1){2,}\\s*$/;\nconst ITEM = /^( {0,3})([-*+]|\\d{1,9}[.)])(\\s+|$)(.*)$/;\nconst QUOTE = /^ {0,3}> ?(.*)$/;\nconst TABLE_SEP = /^\\s*\\|?\\s*:?-{1,}:?\\s*(\\|\\s*:?-{1,}:?\\s*)*\\|?\\s*$/;\n\nfunction cells(line: string): string[] {\n let s = line.trim();\n if (s.startsWith('|')) s = s.slice(1);\n if (s.endsWith('|') && !s.endsWith('\\\\|')) s = s.slice(0, -1);\n const out: string[] = [];\n let cur = '';\n let code = false;\n for (let i = 0; i < s.length; i++) {\n const c = s[i];\n if (c === '\\\\' && s[i + 1] === '|') {\n cur += '|';\n i++;\n } else if (c === '`') {\n code = !code;\n cur += c;\n } else if (c === '|' && !code) {\n out.push(cur.trim());\n cur = '';\n } else cur += c;\n }\n out.push(cur.trim());\n return out;\n}\n\nconst blank = (l: string) => !l.trim();\nconst startsBlock = (l: string) => FENCE.test(l) || HEADING.test(l) || HR.test(l) || QUOTE.test(l) || ITEM.test(l);\n\nfunction parse(lines: string[]): Block[] {\n const out: Block[] = [];\n let i = 0;\n while (i < lines.length) {\n const line = lines[i];\n if (blank(line)) {\n i++;\n continue;\n }\n if (DETAILS_OPEN.test(line)) {\n // The matching </details>, counting nested ones; what follows it on the line goes on as more Markdown.\n const rest = lines.slice(i).join('\\n');\n DETAILS_TAG.lastIndex = 0;\n let depth = 0;\n let open = -1;\n let close = rest.length;\n let after = rest.length;\n for (let m = DETAILS_TAG.exec(rest); m; m = DETAILS_TAG.exec(rest)) {\n if (!m[1]) {\n if (depth++ === 0) open = m.index + m[0].length;\n } else if (--depth === 0) {\n close = m.index;\n after = m.index + m[0].length;\n break;\n }\n }\n let inner = rest.slice(open, close);\n const sum = SUMMARY.exec(inner);\n if (sum) inner = inner.slice(0, sum.index) + inner.slice(sum.index + sum[0].length);\n out.push({ t: 'details', summary: (sum?.[1] ?? '').trim(), blocks: parse(inner.split('\\n')) });\n return out.concat(parse(rest.slice(after).split('\\n')));\n }\n const fence = FENCE.exec(line);\n if (fence) {\n const mark = fence[1];\n const body: string[] = [];\n i++;\n while (i < lines.length && !lines[i].trim().startsWith(mark)) body.push(lines[i++]);\n i++;\n out.push({ t: 'code', lang: fence[2].toLowerCase(), code: body.join('\\n') });\n continue;\n }\n const h = HEADING.exec(line);\n if (h) {\n out.push({ t: 'h', level: h[1].length, text: h[2] ?? '' });\n i++;\n continue;\n }\n if (HR.test(line)) {\n out.push({ t: 'hr' });\n i++;\n continue;\n }\n if (QUOTE.test(line)) {\n const body: string[] = [];\n while (i < lines.length && !blank(lines[i]) && (QUOTE.test(lines[i]) || !startsBlock(lines[i]))) {\n body.push(QUOTE.exec(lines[i])?.[1] ?? lines[i]);\n i++;\n }\n const alert = body.length > 0 ? ALERT.exec(body[0]) : null;\n if (alert) out.push({ t: 'alert', tone: ALERT_TONE[alert[1].toUpperCase()], blocks: parse(body.slice(1)) });\n else out.push({ t: 'quote', blocks: parse(body) });\n continue;\n }\n const item = ITEM.exec(line);\n if (item) {\n const ordered = /\\d/.test(item[2]);\n const start = ordered ? parseInt(item[2], 10) : 1;\n const items: Block[][] = [];\n while (i < lines.length) {\n const m = ITEM.exec(lines[i]);\n if (!m || /\\d/.test(m[2]) !== ordered) break;\n const indent = m[1].length + m[2].length + Math.max(1, Math.min(m[3].length, 4));\n const body = [m[4]];\n i++;\n // The item's own lines: indented continuation (nested lists too), and lazy text right after it.\n while (i < lines.length) {\n const l = lines[i];\n if (blank(l)) {\n const next = lines[i + 1];\n if (next !== undefined && /^\\s+/.test(next) && next.search(/\\S/) >= indent) {\n body.push('');\n i++;\n continue;\n }\n break;\n }\n const lead = l.search(/\\S/);\n if (lead >= indent || (lead >= 2 && ITEM.test(l.trimStart()))) body.push(l.slice(Math.min(lead, indent)));\n else if (!startsBlock(l) && !ITEM.test(l)) body.push(l);\n else break;\n i++;\n }\n items.push(parse(body));\n if (i < lines.length && blank(lines[i])) {\n const next = lines[i + 1];\n if (next !== undefined && ITEM.test(next) && /\\d/.test(ITEM.exec(next)?.[2] ?? '') === ordered) {\n i++;\n continue;\n }\n break;\n }\n }\n out.push({ t: 'list', ordered, start, items });\n continue;\n }\n if (line.includes('|') && i + 1 < lines.length && TABLE_SEP.test(lines[i + 1]) && lines[i + 1].includes('-')) {\n const head = cells(line);\n const align = cells(lines[i + 1]).map((c) =>\n c.startsWith(':') && c.endsWith(':') ? 'center' : c.endsWith(':') ? 'right' : c.startsWith(':') ? 'left' : null,\n );\n const rows: string[][] = [];\n i += 2;\n while (i < lines.length && !blank(lines[i]) && lines[i].includes('|')) rows.push(cells(lines[i++]));\n out.push({ t: 'table', head, align, rows });\n continue;\n }\n // A paragraph: lines until a blank line or another block.\n const body = [line];\n i++;\n while (i < lines.length && !blank(lines[i]) && !startsBlock(lines[i])) body.push(lines[i++]);\n out.push({ t: 'p', text: body.join('\\n') });\n }\n return out;\n}\n\n/** Only http, https, mailto and relative addresses are kept; anything else (javascript:, data:) is not a link. */\nexport function safeHref(href: string): string | undefined {\n const h = href.trim();\n if (!h) return undefined;\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(h);\n if (!scheme) return h;\n return ['http', 'https', 'mailto'].includes(scheme[1].toLowerCase()) ? h : undefined;\n}\n\n// A path in inline code: folders and a file with an extension, or a file and line (src/app.c:86, docs/a.md).\nconst PATH = /^(?:\\.{1,2}\\/)?(?:[\\w.-]+\\/)*[\\w.-]+\\.[A-Za-z0-9]+(?::\\d+(?:-\\d+)?)?$/;\nconst isPath = (s: string) => PATH.test(s) && (s.includes('/') || /:\\d/.test(s));\n\n// Never links, even when listed in schemes.\nconst BLOCKED = ['javascript', 'data', 'vbscript'];\n\ninterface Ctx {\n /** Extra schemes (fn, file) handed to linkHref and onLink as they are. */\n schemes?: string[];\n /** The next key: counted from 0 on every render, so the same source gives the same keys. */\n k: () => string;\n linkHref?: (href: string) => string | undefined | null;\n onLink?: (href: string, e: React.MouseEvent<HTMLElement>) => void;\n refHref?: RefHref;\n onRef?: OnRef;\n terms?: readonly TermDef[];\n termsMark: TermsMark;\n /** All the words in one pattern; null without terms. */\n termRe: RegExp | null;\n /** Words already marked in this block (paragraph, list item, table cell). Absent: no words here (headings, link\n * text, a details summary). */\n seen?: Set<string>;\n}\n\n/** A new block: its own count of marked words. */\nconst block = (c: Ctx): Ctx => ({ ...c, seen: new Set() });\n/** No words marked inside (headings, link text, a summary button). */\nconst noTerms = (c: Ctx): Ctx => ({ ...c, seen: undefined });\n\nconst CJK = /[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\u3000-\\u303f\\uff00-\\uffef]/u;\n\n/** Inline Markdown: code spans, links, autolinks, bold, italic, hard breaks; HTML tags dropped, their text kept. */\nfunction inline(src: string, c: Ctx): React.ReactNode[] {\n let aiMark: string | null = null;\n const out: React.ReactNode[] = [];\n let text = '';\n const flush = () => {\n if (text && c.termRe && c.terms && c.seen) out.push(...withTerms(text, findTerms(text, c.terms, c.termRe, c.termsMark, c.seen), c.terms, c.k));\n else if (text) out.push(text);\n text = '';\n };\n let i = 0;\n while (i < src.length) {\n const ch = src[i];\n if (ch === '\\\\' && i + 1 < src.length && /[\\\\`*_{}[\\]()#+\\-.!|<>~]/.test(src[i + 1])) {\n text += src[i + 1];\n i += 2;\n continue;\n }\n if (ch === '\\\\' && src[i + 1] === '\\n') {\n flush();\n out.push(<br key={c.k()} />);\n i += 2;\n continue;\n }\n if (ch === '\\n') {\n // Two spaces before a line break make a break; otherwise it is a space.\n if (/ {2,}$/.test(text)) {\n text = text.replace(/ +$/, '');\n flush();\n out.push(<br key={c.k()} />);\n } else {\n // Lines joined: a space between words, none next to Chinese text or full-width punctuation.\n text = text.replace(/ +$/, '');\n const before = text.at(-1) ?? (typeof out.at(-1) === 'string' ? String(out.at(-1)).at(-1) : '');\n const after = src.slice(i + 1).trimStart()[0] ?? '';\n if (!CJK.test(before ?? '') && !CJK.test(after)) text += ' ';\n while (src[i + 1] === ' ') i++;\n }\n i++;\n continue;\n }\n if (ch === '`') {\n const run = /^`+/.exec(src.slice(i))?.[0] ?? '`';\n const end = src.indexOf(run, i + run.length);\n if (end > 0) {\n flush();\n let v = src.slice(i + run.length, end).replace(/\\n/g, ' ');\n if (/^ .* $/.test(v)) v = v.slice(1, -1);\n out.push(code(v, c));\n i = end + run.length;\n continue;\n }\n }\n if (ch === '<') {\n const auto = /^<((?:https?:|mailto:)[^\\s<>]+)>/i.exec(src.slice(i));\n if (auto) {\n flush();\n out.push(link(auto[1], [auto[1].replace(/^mailto:/i, '')], c));\n i += auto[0].length;\n continue;\n }\n const tag = /^<!--[\\s\\S]*?-->|^<\\/?[A-Za-z][\\w-]*(?:\\s[^<>]*)?\\/?>/.exec(src.slice(i));\n if (tag) {\n // MX: an HTML tag (or comment) is dropped; the text between tags stays.\n i += tag[0].length;\n continue;\n }\n }\n if (ch === '!' && src[i + 1] === '[') {\n // An image shows its alt text; nothing is loaded.\n const m = /^!\\[([^\\]]*)\\]\\([^)]*\\)/.exec(src.slice(i));\n if (m) {\n text += m[1];\n i += m[0].length;\n continue;\n }\n }\n if (ch === '[') {\n const m = matchLink(src, i);\n if (m) {\n // [AI](ai:) marks a paragraph, list item or cell written by AI: an AiMark at its end, wherever it is written.\n // Other words in the brackets, such as [推測](ai:), are shown in the same style.\n if (m.href.trim().toLowerCase() === 'ai:') {\n const words = m.text.trim();\n aiMark = words && words !== 'AI' ? words : '';\n i = m.end;\n if (src[i] === ' ') i++;\n continue;\n }\n flush();\n // [cookie](term:cookie) marks a word explicitly with its entry in terms.\n const termId = /^term:(.*)$/i.exec(m.href.trim())?.[1];\n if (termId !== undefined) {\n let id = termId;\n try {\n id = decodeURIComponent(termId);\n } catch {\n /* kept as written */\n }\n const t = c.terms?.find((x) => x.term === id);\n devWarn(!t, 'Markdown', `[${m.text}](term:${termId}) 找不到 terms 裡 term 為「${id}」的項目,只顯示文字。把它加進 terms,或改 term: 後面的字。`);\n c.seen?.add(id);\n out.push(t ? termNode(t, c.k(), inline(m.text, noTerms(c))) : <React.Fragment key={c.k()}>{inline(m.text, noTerms(c))}</React.Fragment>);\n i = m.end;\n continue;\n }\n // A link whose text is one code span ([`_sync_as`](fn:…)) is a name: accent monospace, no chip.\n const name = /^\\s*`([^`]+)`\\s*$/.exec(m.text)?.[1];\n out.push(link(m.href, inline(m.text, noTerms(c)), c, name));\n i = m.end;\n continue;\n }\n }\n if (ch === '*' || ch === '_') {\n const run = src[i + 1] === ch ? ch + ch : ch;\n // _ inside a word (snake_case) is not emphasis.\n const prev = src[i - 1];\n const intraword = ch === '_' && prev !== undefined && /\\w/.test(prev);\n const next = src[i + run.length];\n if (!intraword && next && !/\\s/.test(next)) {\n const end = findClose(src, i + run.length, run);\n if (end > 0) {\n flush();\n const inner = inline(src.slice(i + run.length, end), c);\n out.push(run.length === 2 ? <strong key={c.k()}>{inner}</strong> : <em key={c.k()}>{inner}</em>);\n i = end + run.length;\n continue;\n }\n }\n }\n text += ch;\n i++;\n }\n flush();\n if (aiMark != null) {\n // A trailing space before the mark is dropped; the mark keeps its own 8 px.\n const last = out[out.length - 1];\n if (typeof last === 'string') out[out.length - 1] = last.replace(/\\s+$/, '');\n out.push(<AiMark key={c.k()} text={aiMark || undefined} />);\n }\n return out;\n\n function code(v: string, ctx: Ctx): React.ReactNode {\n const onRef = ctx.onRef;\n if (isPath(v)) {\n // A file and line that points somewhere is a location: gray, one step smaller.\n const href = ctx.refHref?.(v) || undefined;\n const click = onRef\n ? (e: React.MouseEvent<HTMLElement>) => {\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onRef(v, e);\n }\n : undefined;\n if (href)\n return (\n <InlineCode key={ctx.k()} look=\"location\" href={href} onClick={click}>\n {v}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={ctx.k()} look=\"location\" onClick={click}>\n {v}\n </InlineCode>\n );\n }\n return <InlineCode key={ctx.k()}>{v}</InlineCode>;\n }\n}\n\nfunction matchLink(src: string, i: number): { text: string; href: string; end: number } | null {\n let depth = 0;\n let j = i;\n for (; j < src.length; j++) {\n if (src[j] === '\\\\') {\n j++;\n continue;\n }\n if (src[j] === '[') depth++;\n else if (src[j] === ']' && --depth === 0) break;\n }\n if (j >= src.length || src[j + 1] !== '(') return null;\n // The address may hold balanced parentheses (javascript:alert(1), wiki/Foo_(bar)); an optional \"title\" follows.\n let at = j + 2;\n while (src[at] === ' ') at++;\n let depth2 = 0;\n let href = '';\n for (; at < src.length; at++) {\n const ch = src[at];\n if (/\\s/.test(ch)) break;\n if (ch === '(') depth2++;\n else if (ch === ')') {\n if (depth2 === 0) break;\n depth2--;\n }\n href += ch;\n }\n const rest = /^(?:\\s+(?:\"[^\"]*\"|'[^']*'))?\\s*\\)/.exec(src.slice(at));\n if (!rest) return null;\n return { text: src.slice(i + 1, j), href: href.replace(/^<(.*)>$/, '$1'), end: at + rest[0].length };\n}\n\nfunction findClose(src: string, from: number, run: string): number {\n let j = from;\n while ((j = src.indexOf(run, j)) > 0) {\n const before = src[j - 1];\n const after = src[j + run.length];\n if (before && !/\\s/.test(before) && !(run[0] === '_' && after && /\\w/.test(after)) && !(run.length === 1 && after === run)) return j;\n j += run.length;\n }\n return -1;\n}\n\nfunction link(raw: string, children: React.ReactNode, c: Ctx, name?: string): React.ReactNode {\n // A scheme listed in schemes (fn:, file:) is up to linkHref and onLink: no address of its own.\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(raw.trim())?.[1].toLowerCase();\n const own = !!scheme && !BLOCKED.includes(scheme) && !!c.schemes?.some((x) => x.toLowerCase() === scheme);\n const safe = own ? raw.trim() : safeHref(raw);\n if (safe === undefined) return <React.Fragment key={c.k()}>{children}</React.Fragment>;\n const href = c.linkHref ? c.linkHref(safe) || undefined : own ? undefined : safe;\n if (!href && !c.onLink) return <React.Fragment key={c.k()}>{children}</React.Fragment>;\n const outside = !!href && /^https?:/i.test(href);\n const onLink = c.onLink;\n const click = onLink\n ? (e: React.MouseEvent<HTMLElement>) => {\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onLink(safe, e);\n }\n : undefined;\n if (name !== undefined && !(outside && !c.onLink)) {\n if (href)\n return (\n <InlineCode key={c.k()} look=\"name\" href={href} onClick={click}>\n {name}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={c.k()} look=\"name\" onClick={click}>\n {name}\n </InlineCode>\n );\n }\n if (!href)\n return (\n <button key={c.k()} type=\"button\" className=\"ui-md-link\" onClick={click}>\n {children}\n </button>\n );\n return (\n <a key={c.k()} className=\"ui-md-link\" href={href} onClick={click} {...(outside && !c.onLink ? { target: '_blank', rel: 'noopener noreferrer' } : {})}>\n {children}\n </a>\n );\n}\n\n// A fence's language name as CodeView knows it: ```python is py, ```bash is sh; file extensions work too (```ts).\nconst FENCE_LANG: Record<string, string> = {\n python: 'py',\n javascript: 'js',\n typescript: 'js',\n jsx: 'js',\n tsx: 'js',\n bash: 'sh',\n shell: 'sh',\n zsh: 'sh',\n console: 'sh',\n 'c++': 'c',\n};\nconst fenceLang = (l: string) => FENCE_LANG[l] ?? (languageOf('x.' + l) !== 'plain' ? languageOf('x.' + l) : l || 'plain');\n\n// A number cell's figures and its unit: [all, number, space, unit].\nconst NUM_UNIT = /^([-+]?(?:NT\\$\\s?)?[\\d,]+(?:\\.\\d+)?)(\\s?)(%|[A-Za-z]{1,3}|\\p{Script=Han}{1,2})$/u;\nconst NUM = /^[-+]?(?:NT\\$\\s?)?[\\d,]+(?:\\.\\d+)?\\s?(?:%|[A-Za-z]{1,3}|\\p{Script=Han}{1,2})?$/u;\n\nexport interface MarkdownProps {\n /** The Markdown text. */\n children: string;\n /** Only inline syntax (code, links, bold, italic), no paragraphs: for a one-line summary such as a README's first\n * sentence. Line breaks become spaces. */\n inline?: boolean;\n /** small: 13 px, for notes. Default: the same 16 px as the text around it. */\n size?: 'body' | 'small';\n /** The heading level `#` becomes. Default 4: # is an h4 (20 px), ## an h5, ### and deeper h6 (both 16 px bold). */\n topLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Link schemes of your own, such as ['fn', 'file']: [_sync_as](fn:harness/controller.py:VirtualRouter._sync_as)\n * goes to linkHref and onLink as written, which decide what it opens. javascript:, data: and vbscript: never link. */\n schemes?: string[];\n /** The address of a link (after the http, https, mailto or relative check); return undefined for no link. */\n linkHref?: (href: string) => string | undefined | null;\n /** A plain click on a link (the default navigation is prevented; Ctrl, ⌘ or Shift still open linkHref). */\n onLink?: (href: string, e: React.MouseEvent<HTMLElement>) => void;\n /** Inline code that is a path (harness/routing.py:108, docs/a.md) and paths in code blocks: their link. Same as\n * CodeView's refHref. */\n refHref?: RefHref;\n /** A plain click on such a path. Same as CodeView's onRef. */\n onRef?: OnRef;\n /** Words that get an explanation (Term variant=\"inline\"): matched whole and case-sensitive in plain text, not in\n * inline code, link text or headings; fenced code blocks match them in comments and strings. `[cookie](term:cookie)`\n * marks one explicitly, wherever it is. */\n terms?: readonly TermDef[];\n /** 'first' (default): each word only where it first appears in a paragraph, list item or table cell. 'all': everywhere. */\n termsMark?: TermsMark;\n className?: string;\n}\n\n/** Markdown from project documents and code comments, in the system's own type, code and table styles. Never runs HTML:\n * tags are dropped and their text kept; links only to http, https, mailto and relative addresses. */\nexport function Markdown(p: MarkdownProps) {\n // Keys count from 0 on every render, so the same source gives the same keys and nothing remounts.\n let n = 0;\n const termsMark = p.termsMark ?? 'first';\n const termRe = React.useMemo(() => termPattern(p.terms), [p.terms]);\n const c: Ctx = {\n k: () => 'm' + n++,\n schemes: p.schemes,\n linkHref: p.linkHref,\n onLink: p.onLink,\n refHref: p.refHref,\n onRef: p.onRef,\n terms: p.terms,\n termsMark,\n termRe,\n };\n const src = String(p.children ?? '').replace(/\\r\\n?/g, '\\n');\n const cls = cx('ui-md', p.size === 'small' && 'is-small', p.className);\n if (p.inline) return <span className={cx(cls, 'is-inline')}>{inline(src.trim().replace(/\\n\\s*\\n/g, '\\n'), block(c))}</span>;\n const top = p.topLevel ?? 4;\n const render = (blocks: Block[]): React.ReactNode[] =>\n blocks.map((b) => {\n switch (b.t) {\n case 'h': {\n const H = `h${Math.min(6, top + b.level - 1)}` as 'h4';\n return (\n <H key={c.k()} className=\"ui-md-h\">\n {inline(b.text, noTerms(c))}\n </H>\n );\n }\n case 'p':\n return <p key={c.k()}>{inline(b.text, block(c))}</p>;\n case 'hr':\n return <hr key={c.k()} />;\n case 'details':\n return (\n <MdDetails key={c.k()} summary={inline(b.summary, noTerms(c))}>\n {render(b.blocks)}\n </MdDetails>\n );\n case 'alert':\n return (\n <Alert key={c.k()} tone={b.tone} className=\"ui-md-alert\">\n {render(b.blocks)}\n </Alert>\n );\n case 'quote':\n return <blockquote key={c.k()}>{render(b.blocks)}</blockquote>;\n case 'list': {\n const items = b.items.map((it) => <li key={c.k()}>{it.length === 1 && it[0].t === 'p' ? inline(it[0].text, block(c)) : render(it)}</li>);\n return b.ordered ? (\n <ol key={c.k()} start={b.start === 1 ? undefined : b.start}>\n {items}\n </ol>\n ) : (\n <ul key={c.k()}>{items}</ul>\n );\n }\n case 'code':\n return (\n <CodeView\n key={c.k()}\n className=\"ui-md-code\"\n code={b.code}\n language={fenceLang(b.lang)}\n languageLabel={b.lang ? undefined : false}\n copy\n lineNumbers={false}\n refHref={p.refHref}\n onRef={p.onRef}\n terms={p.terms}\n termsMark={termsMark}\n />\n );\n case 'table': {\n // Numbers right-aligned: a column whose cells are all numbers, unless the source sets its alignment.\n const n = b.head.length;\n const numeric = b.head.map((_, j) => b.rows.length > 0 && b.rows.every((r) => !r[j] || NUM.test(r[j])));\n const align = (j: number): React.CSSProperties | undefined => {\n const a = b.align[j] ?? (numeric[j] ? 'right' : null);\n return a ? { textAlign: a } : undefined;\n };\n return (\n <MdTable\n key={c.k()}\n label={b.head.map(plain).join('、')}\n heads={b.head.map((h) => inline(h, noTerms(c)))}\n headText={b.head.map(plain)}\n rows={b.rows.map((r) =>\n Array.from({ length: n }, (_, j) => {\n // A number column: the figures in Geist Mono (td.is-num), the unit (「46 分」「3.5 GB」) in the text font.\n const u = numeric[j] ? NUM_UNIT.exec(r[j] ?? '') : null;\n return u ? (\n <>\n {inline(u[1], block(c))}\n {u[2]}\n <span className=\"ui-unit\">{u[3]}</span>\n </>\n ) : (\n inline(r[j] ?? '', block(c))\n );\n }),\n )}\n numeric={numeric}\n align={align}\n />\n );\n }\n }\n });\n return <div className={cls}>{render(parse(src.split('\\n')))}</div>;\n}\n\n/** A header cell as plain text, for the label above each value when a narrow table turns into cards. */\nconst plain = (md: string) =>\n md\n .replace(/\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1')\n .replace(/[`*_]/g, '')\n .trim();\n\n/** DA: a <details> block: a button with the summary, closed at first. The closed content stays in the page\n * (hidden=\"until-found\"), so the browser's find opens it, as in Section. */\nfunction MdDetails({ summary, children }: { summary: React.ReactNode; children: React.ReactNode }) {\n const [open, setOpen] = React.useState(false);\n const id = React.useId();\n const body = React.useRef<HTMLDivElement>(null);\n React.useLayoutEffect(() => {\n const el = body.current;\n if (!el) return;\n if (open) {\n el.removeAttribute('hidden');\n return;\n }\n el.setAttribute('hidden', 'until-found');\n const found = () => setOpen(true);\n el.addEventListener('beforematch', found);\n return () => el.removeEventListener('beforematch', found);\n }, [open]);\n return (\n <div className={cx('ui-md-details', open && 'is-open')}>\n <button type=\"button\" className=\"ui-md-summary\" aria-expanded={open} aria-controls={id} onClick={() => setOpen(!open)}>\n <Icon name=\"caret-right\" size={16} className=\"ui-md-caret\" />\n <span>{summary}</span>\n </button>\n <div id={id} ref={body} className=\"ui-md-details-body\">\n {children}\n </div>\n </div>\n );\n}\n\n/** A Markdown table: column borders in the header drag; the corner button shows the whole table in a wide dialog.\n * Under 480 px every row is a card instead, without either. The border, the dialog and the copy icon are the same as\n * DataTable's (internal/tableTools). */\nfunction MdTable(p: {\n label: string;\n heads: React.ReactNode[];\n headText: string[];\n rows: React.ReactNode[][];\n numeric: boolean[];\n align: (j: number) => React.CSSProperties | undefined;\n}) {\n const [widths, setWidths] = React.useState<number[] | null>(null);\n const [big, setBig] = React.useState(false);\n const [dragging, setDragging] = React.useState(false);\n const table = React.useRef<HTMLTableElement>(null);\n // Rounded up: a fixed column a fraction of a pixel narrower than it was drawn would wrap its longest word.\n const measure = () => [...(table.current?.querySelectorAll<HTMLElement>('thead th') ?? [])].map((th) => Math.ceil(th.getBoundingClientRect().width));\n // The drawn widths, kept for the borders' aria-valuenow (refs are not read while rendering).\n const [measured, setMeasured] = React.useState<number[]>([]);\n React.useLayoutEffect(() => {\n const el = table.current;\n if (!el) return;\n const update = () => {\n const m = [...el.querySelectorAll<HTMLElement>('thead th')].map((th) => Math.ceil(th.getBoundingClientRect().width));\n setMeasured((old) => (old.length === m.length && old.every((v, i) => v === m[i]) ? old : m));\n };\n update();\n const ro = resizeObserver(update);\n ro?.observe(el);\n return () => ro?.disconnect();\n }, []);\n const body = (resize: boolean) => (\n <table\n ref={resize ? table : undefined}\n className=\"ui-md-table\"\n style={resize && widths ? { width: widths.reduce((a, b) => a + b, 0), tableLayout: 'fixed', minWidth: 0 } : undefined}\n >\n {resize && widths ? (\n <colgroup>\n {widths.map((w, j) => (\n <col key={j} style={{ width: w }} />\n ))}\n </colgroup>\n ) : null}\n <thead>\n <tr>\n {p.heads.map((h, j) => (\n <th key={j} style={p.align(j)}>\n {h}\n {resize ? (\n <ColResize\n name={p.headText[j]}\n width={widths?.[j] ?? measured[j] ?? 0}\n start={() => (widths ?? measure())[j]}\n onWidth={(w) => {\n const next = (widths ?? measure()).slice();\n next[j] = w;\n setWidths(next);\n }}\n onReset={() => setWidths(null)}\n onDragging={setDragging}\n />\n ) : null}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {p.rows.map((r, ri) => (\n <tr key={ri}>\n {r.map((cell, j) => (\n <td key={j} className={p.numeric[j] ? 'is-num' : undefined} style={p.align(j)} data-label={p.headText[j]}>\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n return (\n <div className={cx('ui-md-tablebox', dragging && 'is-resizing')}>\n <div className=\"ui-md-table-tools\">\n <ZoomButton onClick={() => setBig(true)} />\n </div>\n <div className=\"ui-md-table-wrap\" tabIndex={0} role=\"region\" aria-label={p.label}>\n {body(true)}\n </div>\n <TableDialog open={big} onClose={() => setBig(false)}>\n <div className=\"ui-md ui-md-table-wrap\" tabIndex={0} role=\"region\" aria-label={p.label}>\n {body(false)}\n </div>\n </TableDialog>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAcA,aAAaA,mBAAY;AAiBzB,MAAM,eAAe;AACrB,MAAM,cAAc;A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EAAA,UACG,EAAE,KAAK,MAAM,MACZ,oBAAC,MAAD;IAAY,WAAW,EAAE,QAAQ,KAAK,WAAW,KAAA;IAAW,OAAO,EAAE,MAAM,CAAC;IAAG,cAAY,EAAE,SAAS;IACnG,UAAA;GACC,GAFK,CAEL,CACL,EACC,GANK,EAML,CACL,EACI,CAAA;EACF;;CAET,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,kBAAkB,YAAY,aAAa;EAA9D,UAAA;GACE,oBAAC,OAAD;IAAK,WAAU;IACb,UAAA,oBAAC,YAAD,EAAY,eAAe,OAAO,IAAI,EAAI,CAAA;GACvC,CAAA;GACL,oBAAC,OAAD;IAAK,WAAU;IAAmB,UAAU;IAAG,MAAK;IAAS,cAAY,EAAE;IACxE,UAAA,KAAK,IAAI;GACP,CAAA;GACL,oBAAC,aAAD;IAAa,MAAM;IAAK,eAAe,OAAO,KAAK;IACjD,UAAA,oBAAC,OAAD;KAAK,WAAU;KAAyB,UAAU;KAAG,MAAK;KAAS,cAAY,EAAE;KAC9E,UAAA,KAAK,KAAK;IACR,CAAA;GACM,CAAA;EACV;;AAET"}
|
|
1
|
+
{"version":3,"file":"Markdown.js","names":["phCaretRight"],"sources":["../../../src/components/Markdown/Markdown.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Alert, type AlertTone } from '../Alert/Alert';\nimport { Icon } from '../../icons/Icon';\nimport { ColResize, TableDialog, ZoomButton } from '../../internal/tableTools';\nimport { cx, resizeObserver } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\nimport { CodeView } from '../CodeView/CodeView';\nimport { languageOf } from '../CodeView/tokens';\nimport { InlineCode, type OnRef, type RefHref } from '../InlineCode/InlineCode';\nimport { AiMark } from '../AiMark/AiMark';\nimport { findTerms, termNode, termPattern, withTerms, type TermDef, type TermsMark } from '../../internal/terms';\nimport { includeIcons } from '../../icons/store';\nimport phCaretRight from '../../icons/ph/caret-right';\n\nincludeIcons(phCaretRight);\n\n/* A small Markdown reader for project documents and code comments. It builds React elements only: no HTML from the\n source is ever run. HTML tags are dropped and their text kept (MX). */\n\ntype Block =\n | { t: 'h'; level: number; text: string }\n | { t: 'p'; text: string }\n | { t: 'code'; lang: string; code: string }\n | { t: 'quote'; blocks: Block[] }\n | { t: 'list'; ordered: boolean; start: number; items: Block[][] }\n | { t: 'table'; head: string[]; align: ('left' | 'right' | 'center' | null)[]; rows: string[][] }\n | { t: 'hr' }\n | { t: 'details'; summary: string; blocks: Block[] }\n | { t: 'alert'; tone: AlertTone; blocks: Block[] };\n\n// DA: <details> and <summary> are the only HTML let through, without attributes; they make a closed block.\nconst DETAILS_OPEN = /^\\s*<details\\b[^>]*>/i;\nconst DETAILS_TAG = /<(\\/?)details\\b[^>]*>/gi;\nconst SUMMARY = /<summary\\b[^>]*>([\\s\\S]*?)<\\/summary>/i;\n// NB: GitHub's alerts, > [!NOTE] and the like, shown as the system's Alert.\nconst ALERT = /^\\s*\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]\\s*$/i;\nconst ALERT_TONE: Record<string, AlertTone> = { NOTE: 'info', TIP: 'success', IMPORTANT: 'info', WARNING: 'warning', CAUTION: 'danger' };\n\nconst FENCE = /^ {0,3}(`{3,}|~{3,})\\s*([\\w+#.-]*)/;\nconst HEADING = /^ {0,3}(#{1,6})(?:\\s+(.*?))?\\s*#*\\s*$/;\nconst HR = /^ {0,3}([-*_])(?:\\s*\\1){2,}\\s*$/;\nconst ITEM = /^( {0,3})([-*+]|\\d{1,9}[.)])(\\s+|$)(.*)$/;\nconst QUOTE = /^ {0,3}> ?(.*)$/;\nconst TABLE_SEP = /^\\s*\\|?\\s*:?-{1,}:?\\s*(\\|\\s*:?-{1,}:?\\s*)*\\|?\\s*$/;\n\nfunction cells(line: string): string[] {\n let s = line.trim();\n if (s.startsWith('|')) s = s.slice(1);\n if (s.endsWith('|') && !s.endsWith('\\\\|')) s = s.slice(0, -1);\n const out: string[] = [];\n let cur = '';\n let code = false;\n for (let i = 0; i < s.length; i++) {\n const c = s[i];\n if (c === '\\\\' && s[i + 1] === '|') {\n cur += '|';\n i++;\n } else if (c === '`') {\n code = !code;\n cur += c;\n } else if (c === '|' && !code) {\n out.push(cur.trim());\n cur = '';\n } else cur += c;\n }\n out.push(cur.trim());\n return out;\n}\n\nconst blank = (l: string) => !l.trim();\nconst startsBlock = (l: string) => FENCE.test(l) || HEADING.test(l) || HR.test(l) || QUOTE.test(l) || ITEM.test(l);\n\nfunction parse(lines: string[]): Block[] {\n const out: Block[] = [];\n let i = 0;\n while (i < lines.length) {\n const line = lines[i];\n if (blank(line)) {\n i++;\n continue;\n }\n if (DETAILS_OPEN.test(line)) {\n // The matching </details>, counting nested ones; what follows it on the line goes on as more Markdown.\n const rest = lines.slice(i).join('\\n');\n DETAILS_TAG.lastIndex = 0;\n let depth = 0;\n let open = -1;\n let close = rest.length;\n let after = rest.length;\n for (let m = DETAILS_TAG.exec(rest); m; m = DETAILS_TAG.exec(rest)) {\n if (!m[1]) {\n if (depth++ === 0) open = m.index + m[0].length;\n } else if (--depth === 0) {\n close = m.index;\n after = m.index + m[0].length;\n break;\n }\n }\n let inner = rest.slice(open, close);\n const sum = SUMMARY.exec(inner);\n if (sum) inner = inner.slice(0, sum.index) + inner.slice(sum.index + sum[0].length);\n out.push({ t: 'details', summary: (sum?.[1] ?? '').trim(), blocks: parse(inner.split('\\n')) });\n return out.concat(parse(rest.slice(after).split('\\n')));\n }\n const fence = FENCE.exec(line);\n if (fence) {\n const mark = fence[1];\n const body: string[] = [];\n i++;\n while (i < lines.length && !lines[i].trim().startsWith(mark)) body.push(lines[i++]);\n i++;\n out.push({ t: 'code', lang: fence[2].toLowerCase(), code: body.join('\\n') });\n continue;\n }\n const h = HEADING.exec(line);\n if (h) {\n out.push({ t: 'h', level: h[1].length, text: h[2] ?? '' });\n i++;\n continue;\n }\n if (HR.test(line)) {\n out.push({ t: 'hr' });\n i++;\n continue;\n }\n if (QUOTE.test(line)) {\n const body: string[] = [];\n while (i < lines.length && !blank(lines[i]) && (QUOTE.test(lines[i]) || !startsBlock(lines[i]))) {\n body.push(QUOTE.exec(lines[i])?.[1] ?? lines[i]);\n i++;\n }\n const alert = body.length > 0 ? ALERT.exec(body[0]) : null;\n if (alert) out.push({ t: 'alert', tone: ALERT_TONE[alert[1].toUpperCase()], blocks: parse(body.slice(1)) });\n else out.push({ t: 'quote', blocks: parse(body) });\n continue;\n }\n const item = ITEM.exec(line);\n if (item) {\n const ordered = /\\d/.test(item[2]);\n const start = ordered ? parseInt(item[2], 10) : 1;\n const items: Block[][] = [];\n while (i < lines.length) {\n const m = ITEM.exec(lines[i]);\n if (!m || /\\d/.test(m[2]) !== ordered) break;\n const indent = m[1].length + m[2].length + Math.max(1, Math.min(m[3].length, 4));\n const body = [m[4]];\n i++;\n // The item's own lines: indented continuation (nested lists too), and lazy text right after it.\n while (i < lines.length) {\n const l = lines[i];\n if (blank(l)) {\n const next = lines[i + 1];\n if (next !== undefined && /^\\s+/.test(next) && next.search(/\\S/) >= indent) {\n body.push('');\n i++;\n continue;\n }\n break;\n }\n const lead = l.search(/\\S/);\n if (lead >= indent || (lead >= 2 && ITEM.test(l.trimStart()))) body.push(l.slice(Math.min(lead, indent)));\n else if (!startsBlock(l) && !ITEM.test(l)) body.push(l);\n else break;\n i++;\n }\n items.push(parse(body));\n if (i < lines.length && blank(lines[i])) {\n const next = lines[i + 1];\n if (next !== undefined && ITEM.test(next) && /\\d/.test(ITEM.exec(next)?.[2] ?? '') === ordered) {\n i++;\n continue;\n }\n break;\n }\n }\n out.push({ t: 'list', ordered, start, items });\n continue;\n }\n if (line.includes('|') && i + 1 < lines.length && TABLE_SEP.test(lines[i + 1]) && lines[i + 1].includes('-')) {\n const head = cells(line);\n const align = cells(lines[i + 1]).map((c) =>\n c.startsWith(':') && c.endsWith(':') ? 'center' : c.endsWith(':') ? 'right' : c.startsWith(':') ? 'left' : null,\n );\n const rows: string[][] = [];\n i += 2;\n while (i < lines.length && !blank(lines[i]) && lines[i].includes('|')) rows.push(cells(lines[i++]));\n out.push({ t: 'table', head, align, rows });\n continue;\n }\n // A paragraph: lines until a blank line or another block.\n const body = [line];\n i++;\n while (i < lines.length && !blank(lines[i]) && !startsBlock(lines[i])) body.push(lines[i++]);\n out.push({ t: 'p', text: body.join('\\n') });\n }\n return out;\n}\n\n/** Only http, https, mailto and relative addresses are kept; anything else (javascript:, data:) is not a link. */\nexport function safeHref(href: string): string | undefined {\n const h = href.trim();\n if (!h) return undefined;\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(h);\n if (!scheme) return h;\n return ['http', 'https', 'mailto'].includes(scheme[1].toLowerCase()) ? h : undefined;\n}\n\n// A path in inline code: folders and a file with an extension, or a file and line (src/app.c:86, docs/a.md).\nconst PATH = /^(?:\\.{1,2}\\/)?(?:[\\w.-]+\\/)*[\\w.-]+\\.[A-Za-z0-9]+(?::\\d+(?:-\\d+)?)?$/;\nconst isPath = (s: string) => PATH.test(s) && (s.includes('/') || /:\\d/.test(s));\n\n// Never links, even when listed in schemes.\nconst BLOCKED = ['javascript', 'data', 'vbscript'];\n\ninterface Ctx {\n /** Extra schemes (fn, file) handed to linkHref and onLink as they are. */\n schemes?: string[];\n /** The next key: counted from 0 on every render, so the same source gives the same keys. */\n k: () => string;\n linkHref?: (href: string) => string | undefined | null;\n onLink?: (href: string, e: React.MouseEvent<HTMLElement>) => void;\n refHref?: RefHref;\n onRef?: OnRef;\n terms?: readonly TermDef[];\n termsMark: TermsMark;\n /** All the words in one pattern; null without terms. */\n termRe: RegExp | null;\n /** Words already marked in this block (paragraph, list item, table cell). Absent: no words here (headings, link\n * text, a details summary). */\n seen?: Set<string>;\n}\n\n/** A new block: its own count of marked words. */\nconst block = (c: Ctx): Ctx => ({ ...c, seen: new Set() });\n/** No words marked inside (headings, link text, a summary button). */\nconst noTerms = (c: Ctx): Ctx => ({ ...c, seen: undefined });\n\nconst CJK = /[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\u3000-\\u303f\\uff00-\\uffef]/u;\n\n/** Inline Markdown: code spans, links, autolinks, bold, italic, hard breaks; HTML tags dropped, their text kept. */\nfunction inline(src: string, c: Ctx): React.ReactNode[] {\n let aiMark: string | null = null;\n const out: React.ReactNode[] = [];\n let text = '';\n const flush = () => {\n if (text && c.termRe && c.terms && c.seen) out.push(...withTerms(text, findTerms(text, c.terms, c.termRe, c.termsMark, c.seen), c.terms, c.k));\n else if (text) out.push(text);\n text = '';\n };\n let i = 0;\n while (i < src.length) {\n const ch = src[i];\n if (ch === '\\\\' && i + 1 < src.length && /[\\\\`*_{}[\\]()#+\\-.!|<>~]/.test(src[i + 1])) {\n text += src[i + 1];\n i += 2;\n continue;\n }\n if (ch === '\\\\' && src[i + 1] === '\\n') {\n flush();\n out.push(<br key={c.k()} />);\n i += 2;\n continue;\n }\n if (ch === '\\n') {\n // Two spaces before a line break make a break; otherwise it is a space.\n if (/ {2,}$/.test(text)) {\n text = text.replace(/ +$/, '');\n flush();\n out.push(<br key={c.k()} />);\n } else {\n // Lines joined: a space between words, none next to Chinese text or full-width punctuation.\n text = text.replace(/ +$/, '');\n const before = text.at(-1) ?? (typeof out.at(-1) === 'string' ? String(out.at(-1)).at(-1) : '');\n const after = src.slice(i + 1).trimStart()[0] ?? '';\n if (!CJK.test(before ?? '') && !CJK.test(after)) text += ' ';\n while (src[i + 1] === ' ') i++;\n }\n i++;\n continue;\n }\n if (ch === '`') {\n const run = /^`+/.exec(src.slice(i))?.[0] ?? '`';\n const end = src.indexOf(run, i + run.length);\n if (end > 0) {\n flush();\n let v = src.slice(i + run.length, end).replace(/\\n/g, ' ');\n if (/^ .* $/.test(v)) v = v.slice(1, -1);\n out.push(code(v, c));\n i = end + run.length;\n continue;\n }\n }\n if (ch === '<') {\n const auto = /^<((?:https?:|mailto:)[^\\s<>]+)>/i.exec(src.slice(i));\n if (auto) {\n flush();\n out.push(link(auto[1], [auto[1].replace(/^mailto:/i, '')], c));\n i += auto[0].length;\n continue;\n }\n const tag = /^<!--[\\s\\S]*?-->|^<\\/?[A-Za-z][\\w-]*(?:\\s[^<>]*)?\\/?>/.exec(src.slice(i));\n if (tag) {\n // MX: an HTML tag (or comment) is dropped; the text between tags stays.\n i += tag[0].length;\n continue;\n }\n }\n if (ch === '!' && src[i + 1] === '[') {\n // An image shows its alt text; nothing is loaded.\n const m = /^!\\[([^\\]]*)\\]\\([^)]*\\)/.exec(src.slice(i));\n if (m) {\n text += m[1];\n i += m[0].length;\n continue;\n }\n }\n if (ch === '[') {\n const m = matchLink(src, i);\n if (m) {\n // [AI](ai:) marks a paragraph, list item or cell written by AI: an AiMark at its end, wherever it is written.\n // Other words in the brackets, such as [推測](ai:), are shown in the same style.\n if (m.href.trim().toLowerCase() === 'ai:') {\n const words = m.text.trim();\n aiMark = words && words !== 'AI' ? words : '';\n i = m.end;\n if (src[i] === ' ') i++;\n continue;\n }\n flush();\n // [cookie](term:cookie) marks a word explicitly with its entry in terms.\n const termId = /^term:(.*)$/i.exec(m.href.trim())?.[1];\n if (termId !== undefined) {\n let id = termId;\n try {\n id = decodeURIComponent(termId);\n } catch {\n /* kept as written */\n }\n const t = c.terms?.find((x) => x.term === id);\n devWarn(\n !t,\n 'Markdown',\n `[${m.text}](term:${termId}) has no entry with term \"${id}\" in terms, so only the text shows. Add it to terms, or change the word after term:.`,\n );\n c.seen?.add(id);\n out.push(t ? termNode(t, c.k(), inline(m.text, noTerms(c))) : <React.Fragment key={c.k()}>{inline(m.text, noTerms(c))}</React.Fragment>);\n i = m.end;\n continue;\n }\n // A link whose text is one code span ([`_sync_as`](fn:…)) is a name: accent monospace, no chip.\n const name = /^\\s*`([^`]+)`\\s*$/.exec(m.text)?.[1];\n out.push(link(m.href, inline(m.text, noTerms(c)), c, name));\n i = m.end;\n continue;\n }\n }\n if (ch === '*' || ch === '_') {\n const run = src[i + 1] === ch ? ch + ch : ch;\n // _ inside a word (snake_case) is not emphasis.\n const prev = src[i - 1];\n const intraword = ch === '_' && prev !== undefined && /\\w/.test(prev);\n const next = src[i + run.length];\n if (!intraword && next && !/\\s/.test(next)) {\n const end = findClose(src, i + run.length, run);\n if (end > 0) {\n flush();\n const inner = inline(src.slice(i + run.length, end), c);\n out.push(run.length === 2 ? <strong key={c.k()}>{inner}</strong> : <em key={c.k()}>{inner}</em>);\n i = end + run.length;\n continue;\n }\n }\n }\n text += ch;\n i++;\n }\n flush();\n if (aiMark != null) {\n // A trailing space before the mark is dropped; the mark keeps its own 8 px.\n const last = out[out.length - 1];\n if (typeof last === 'string') out[out.length - 1] = last.replace(/\\s+$/, '');\n out.push(<AiMark key={c.k()} text={aiMark || undefined} />);\n }\n return out;\n\n function code(v: string, ctx: Ctx): React.ReactNode {\n const onRef = ctx.onRef;\n if (isPath(v)) {\n // A file and line that points somewhere is a location: gray, one step smaller.\n const href = ctx.refHref?.(v) || undefined;\n const click = onRef\n ? (e: React.MouseEvent<HTMLElement>) => {\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onRef(v, e);\n }\n : undefined;\n if (href)\n return (\n <InlineCode key={ctx.k()} look=\"location\" href={href} onClick={click}>\n {v}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={ctx.k()} look=\"location\" onClick={click}>\n {v}\n </InlineCode>\n );\n }\n return <InlineCode key={ctx.k()}>{v}</InlineCode>;\n }\n}\n\nfunction matchLink(src: string, i: number): { text: string; href: string; end: number } | null {\n let depth = 0;\n let j = i;\n for (; j < src.length; j++) {\n if (src[j] === '\\\\') {\n j++;\n continue;\n }\n if (src[j] === '[') depth++;\n else if (src[j] === ']' && --depth === 0) break;\n }\n if (j >= src.length || src[j + 1] !== '(') return null;\n // The address may hold balanced parentheses (javascript:alert(1), wiki/Foo_(bar)); an optional \"title\" follows.\n let at = j + 2;\n while (src[at] === ' ') at++;\n let depth2 = 0;\n let href = '';\n for (; at < src.length; at++) {\n const ch = src[at];\n if (/\\s/.test(ch)) break;\n if (ch === '(') depth2++;\n else if (ch === ')') {\n if (depth2 === 0) break;\n depth2--;\n }\n href += ch;\n }\n const rest = /^(?:\\s+(?:\"[^\"]*\"|'[^']*'))?\\s*\\)/.exec(src.slice(at));\n if (!rest) return null;\n return { text: src.slice(i + 1, j), href: href.replace(/^<(.*)>$/, '$1'), end: at + rest[0].length };\n}\n\nfunction findClose(src: string, from: number, run: string): number {\n let j = from;\n while ((j = src.indexOf(run, j)) > 0) {\n const before = src[j - 1];\n const after = src[j + run.length];\n if (before && !/\\s/.test(before) && !(run[0] === '_' && after && /\\w/.test(after)) && !(run.length === 1 && after === run)) return j;\n j += run.length;\n }\n return -1;\n}\n\nfunction link(raw: string, children: React.ReactNode, c: Ctx, name?: string): React.ReactNode {\n // A scheme listed in schemes (fn:, file:) is up to linkHref and onLink: no address of its own.\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(raw.trim())?.[1].toLowerCase();\n const own = !!scheme && !BLOCKED.includes(scheme) && !!c.schemes?.some((x) => x.toLowerCase() === scheme);\n const safe = own ? raw.trim() : safeHref(raw);\n if (safe === undefined) return <React.Fragment key={c.k()}>{children}</React.Fragment>;\n const href = c.linkHref ? c.linkHref(safe) || undefined : own ? undefined : safe;\n if (!href && !c.onLink) return <React.Fragment key={c.k()}>{children}</React.Fragment>;\n const outside = !!href && /^https?:/i.test(href);\n const onLink = c.onLink;\n const click = onLink\n ? (e: React.MouseEvent<HTMLElement>) => {\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onLink(safe, e);\n }\n : undefined;\n if (name !== undefined && !(outside && !c.onLink)) {\n if (href)\n return (\n <InlineCode key={c.k()} look=\"name\" href={href} onClick={click}>\n {name}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={c.k()} look=\"name\" onClick={click}>\n {name}\n </InlineCode>\n );\n }\n if (!href)\n return (\n <button key={c.k()} type=\"button\" className=\"ui-md-link\" onClick={click}>\n {children}\n </button>\n );\n return (\n <a key={c.k()} className=\"ui-md-link\" href={href} onClick={click} {...(outside && !c.onLink ? { target: '_blank', rel: 'noopener noreferrer' } : {})}>\n {children}\n </a>\n );\n}\n\n/** A list item whose whole content is one link (a reference list: 「RFC 1812: IPv4 router …」): that link, made a row\n * that fills the item, or null. Links inside a sentence stay inline. */\nfunction rowLink(nodes: React.ReactNode[]): React.ReactElement | null {\n const parts = nodes.filter((n) => !(typeof n === 'string' && !n.trim()));\n if (parts.length !== 1) return null;\n const only = parts[0];\n if (!React.isValidElement<{ className?: string }>(only) || (only.type !== 'a' && only.type !== 'button') || only.props.className !== 'ui-md-link')\n return null;\n return React.cloneElement(only, { className: 'ui-md-link is-row' });\n}\n\n// A fence's language name as CodeView knows it: ```python is py, ```bash is sh; file extensions work too (```ts).\nconst FENCE_LANG: Record<string, string> = {\n python: 'py',\n javascript: 'js',\n typescript: 'js',\n jsx: 'js',\n tsx: 'js',\n bash: 'sh',\n shell: 'sh',\n zsh: 'sh',\n console: 'sh',\n 'c++': 'c',\n};\nconst fenceLang = (l: string) => FENCE_LANG[l] ?? (languageOf('x.' + l) !== 'plain' ? languageOf('x.' + l) : l || 'plain');\n\n// A number cell's figures and its unit: [all, number, space, unit].\nconst NUM_UNIT = /^([-+]?(?:NT\\$\\s?)?[\\d,]+(?:\\.\\d+)?)(\\s?)(%|[A-Za-z]{1,3}|\\p{Script=Han}{1,2})$/u;\nconst NUM = /^[-+]?(?:NT\\$\\s?)?[\\d,]+(?:\\.\\d+)?\\s?(?:%|[A-Za-z]{1,3}|\\p{Script=Han}{1,2})?$/u;\n\nexport interface MarkdownProps {\n /** The Markdown text. */\n children: string;\n /** Only inline syntax (code, links, bold, italic), no paragraphs: for a one-line summary such as a README's first\n * sentence. Line breaks become spaces. */\n inline?: boolean;\n /** small: 13 px, for notes. Default: the same 16 px as the text around it. */\n size?: 'body' | 'small';\n /** The heading level `#` becomes. Default 4: # is an h4 (20 px), ## an h5, ### and deeper h6 (both 16 px bold). */\n topLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Link schemes of your own, such as ['fn', 'file']: [_sync_as](fn:harness/controller.py:VirtualRouter._sync_as)\n * goes to linkHref and onLink as written, which decide what it opens. javascript:, data: and vbscript: never link. */\n schemes?: string[];\n /** The address of a link (after the http, https, mailto or relative check); return undefined for no link. */\n linkHref?: (href: string) => string | undefined | null;\n /** A plain click on a link (the default navigation is prevented; Ctrl, ⌘ or Shift still open linkHref). */\n onLink?: (href: string, e: React.MouseEvent<HTMLElement>) => void;\n /** Inline code that is a path (harness/routing.py:108, docs/a.md) and paths in code blocks: their link. Same as\n * CodeView's refHref. */\n refHref?: RefHref;\n /** A plain click on such a path. Same as CodeView's onRef. */\n onRef?: OnRef;\n /** Words that get an explanation (Term variant=\"inline\"): matched whole and case-sensitive in plain text, not in\n * inline code, link text or headings; fenced code blocks match them in comments and strings. `[cookie](term:cookie)`\n * marks one explicitly, wherever it is. */\n terms?: readonly TermDef[];\n /** 'first' (default): each word only where it first appears in a paragraph, list item or table cell. 'all': everywhere. */\n termsMark?: TermsMark;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Markdown from project documents and code comments, in the system's own type, code and table styles. Never runs HTML:\n * tags are dropped and their text kept; links only to http, https, mailto and relative addresses. */\nexport function Markdown(p: MarkdownProps) {\n // Keys count from 0 on every render, so the same source gives the same keys and nothing remounts.\n let n = 0;\n const termsMark = p.termsMark ?? 'first';\n const termRe = React.useMemo(() => termPattern(p.terms), [p.terms]);\n const c: Ctx = {\n k: () => 'm' + n++,\n schemes: p.schemes,\n linkHref: p.linkHref,\n onLink: p.onLink,\n refHref: p.refHref,\n onRef: p.onRef,\n terms: p.terms,\n termsMark,\n termRe,\n };\n const src = String(p.children ?? '').replace(/\\r\\n?/g, '\\n');\n const cls = cx('ui-md', p.size === 'small' && 'is-small', p.className);\n if (p.inline) return <span className={cx(cls, 'is-inline')}>{inline(src.trim().replace(/\\n\\s*\\n/g, '\\n'), block(c))}</span>;\n const top = p.topLevel ?? 4;\n const render = (blocks: Block[]): React.ReactNode[] =>\n blocks.map((b) => {\n switch (b.t) {\n case 'h': {\n const H = `h${Math.min(6, top + b.level - 1)}` as 'h4';\n return (\n <H key={c.k()} className=\"ui-md-h\">\n {inline(b.text, noTerms(c))}\n </H>\n );\n }\n case 'p':\n return <p key={c.k()}>{inline(b.text, block(c))}</p>;\n case 'hr':\n return <hr key={c.k()} />;\n case 'details':\n return (\n <MdDetails key={c.k()} summary={inline(b.summary, noTerms(c))}>\n {render(b.blocks)}\n </MdDetails>\n );\n case 'alert':\n return (\n <Alert key={c.k()} tone={b.tone} className=\"ui-md-alert\">\n {render(b.blocks)}\n </Alert>\n );\n case 'quote':\n return <blockquote key={c.k()}>{render(b.blocks)}</blockquote>;\n case 'list': {\n const items = b.items.map((it) => {\n const key = c.k();\n if (!(it.length === 1 && it[0].t === 'p')) return <li key={key}>{render(it)}</li>;\n const nodes = inline(it[0].text, block(c));\n const row = rowLink(nodes);\n return row ? (\n <li key={key} className=\"ui-md-rowitem\">\n {row}\n </li>\n ) : (\n <li key={key}>{nodes}</li>\n );\n });\n return b.ordered ? (\n <ol key={c.k()} start={b.start === 1 ? undefined : b.start}>\n {items}\n </ol>\n ) : (\n <ul key={c.k()}>{items}</ul>\n );\n }\n case 'code':\n return (\n <CodeView\n key={c.k()}\n className=\"ui-md-code\"\n code={b.code}\n language={fenceLang(b.lang)}\n languageLabel={b.lang ? undefined : false}\n copy\n lineNumbers={false}\n refHref={p.refHref}\n onRef={p.onRef}\n terms={p.terms}\n termsMark={termsMark}\n />\n );\n case 'table': {\n // Numbers right-aligned: a column whose cells are all numbers, unless the source sets its alignment.\n const n = b.head.length;\n const numeric = b.head.map((_, j) => b.rows.length > 0 && b.rows.every((r) => !r[j] || NUM.test(r[j])));\n const align = (j: number): React.CSSProperties | undefined => {\n const a = b.align[j] ?? (numeric[j] ? 'right' : null);\n return a ? { textAlign: a } : undefined;\n };\n return (\n <MdTable\n key={c.k()}\n label={b.head.map(plain).join('、')}\n heads={b.head.map((h) => inline(h, noTerms(c)))}\n headText={b.head.map(plain)}\n rows={b.rows.map((r) =>\n Array.from({ length: n }, (_, j) => {\n // A number column: the figures in Geist Mono (td.is-num), the unit (「46 分」「3.5 GB」) in the text font.\n const u = numeric[j] ? NUM_UNIT.exec(r[j] ?? '') : null;\n return u ? (\n <>\n {inline(u[1], block(c))}\n {u[2]}\n <span className=\"ui-unit\">{u[3]}</span>\n </>\n ) : (\n inline(r[j] ?? '', block(c))\n );\n }),\n )}\n numeric={numeric}\n align={align}\n />\n );\n }\n }\n });\n return <div className={cls}>{render(parse(src.split('\\n')))}</div>;\n}\n\n/** A header cell as plain text, for the label above each value when a narrow table turns into cards. */\nconst plain = (md: string) =>\n md\n .replace(/\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1')\n .replace(/[`*_]/g, '')\n .trim();\n\n/** DA: a <details> block: a button with the summary, closed at first. The closed content stays in the page\n * (hidden=\"until-found\"), so the browser's find opens it, as in Section. */\nfunction MdDetails({ summary, children }: { summary: React.ReactNode; children: React.ReactNode }) {\n const [open, setOpen] = React.useState(false);\n const id = React.useId();\n const body = React.useRef<HTMLDivElement>(null);\n React.useLayoutEffect(() => {\n const el = body.current;\n if (!el) return;\n if (open) {\n el.removeAttribute('hidden');\n return;\n }\n el.setAttribute('hidden', 'until-found');\n const found = () => setOpen(true);\n el.addEventListener('beforematch', found);\n return () => el.removeEventListener('beforematch', found);\n }, [open]);\n return (\n <div className={cx('ui-md-details', open && 'is-open')}>\n <button type=\"button\" className=\"ui-md-summary\" aria-expanded={open} aria-controls={id} onClick={() => setOpen(!open)}>\n <Icon name=\"caret-right\" size={16} className=\"ui-md-caret\" />\n <span>{summary}</span>\n </button>\n <div id={id} ref={body} className=\"ui-md-details-body\">\n {children}\n </div>\n </div>\n );\n}\n\n/** A Markdown table: column borders in the header drag; the corner button shows the whole table in a wide dialog.\n * Under 480 px every row is a card instead, without either. The border, the dialog and the copy icon are the same as\n * DataTable's (internal/tableTools). */\nfunction MdTable(p: {\n label: string;\n heads: React.ReactNode[];\n headText: string[];\n rows: React.ReactNode[][];\n numeric: boolean[];\n align: (j: number) => React.CSSProperties | undefined;\n}) {\n const [widths, setWidths] = React.useState<number[] | null>(null);\n const [big, setBig] = React.useState(false);\n const [dragging, setDragging] = React.useState(false);\n const table = React.useRef<HTMLTableElement>(null);\n // Rounded up: a fixed column a fraction of a pixel narrower than it was drawn would wrap its longest word.\n const measure = () => [...(table.current?.querySelectorAll<HTMLElement>('thead th') ?? [])].map((th) => Math.ceil(th.getBoundingClientRect().width));\n // The drawn widths, kept for the borders' aria-valuenow (refs are not read while rendering).\n const [measured, setMeasured] = React.useState<number[]>([]);\n React.useLayoutEffect(() => {\n const el = table.current;\n if (!el) return;\n const update = () => {\n const m = [...el.querySelectorAll<HTMLElement>('thead th')].map((th) => Math.ceil(th.getBoundingClientRect().width));\n setMeasured((old) => (old.length === m.length && old.every((v, i) => v === m[i]) ? old : m));\n };\n update();\n const ro = resizeObserver(update);\n ro?.observe(el);\n return () => ro?.disconnect();\n }, []);\n const body = (resize: boolean) => (\n <table\n ref={resize ? table : undefined}\n className=\"ui-md-table\"\n style={resize && widths ? { width: widths.reduce((a, b) => a + b, 0), tableLayout: 'fixed', minWidth: 0 } : undefined}\n >\n {resize && widths ? (\n <colgroup>\n {widths.map((w, j) => (\n <col key={j} style={{ width: w }} />\n ))}\n </colgroup>\n ) : null}\n <thead>\n <tr>\n {p.heads.map((h, j) => (\n <th key={j} style={p.align(j)}>\n {h}\n {resize ? (\n <ColResize\n name={p.headText[j]}\n width={widths?.[j] ?? measured[j] ?? 0}\n start={() => (widths ?? measure())[j]}\n onWidth={(w) => {\n const next = (widths ?? measure()).slice();\n next[j] = w;\n setWidths(next);\n }}\n onReset={() => setWidths(null)}\n onDragging={setDragging}\n />\n ) : null}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {p.rows.map((r, ri) => (\n <tr key={ri}>\n {r.map((cell, j) => (\n <td key={j} className={p.numeric[j] ? 'is-num' : undefined} style={p.align(j)} data-label={p.headText[j]}>\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n return (\n <div className={cx('ui-md-tablebox', dragging && 'is-resizing')}>\n <div className=\"ui-md-table-tools\">\n <ZoomButton onClick={() => setBig(true)} />\n </div>\n <div className=\"ui-md-table-wrap\" tabIndex={0} role=\"region\" aria-label={p.label}>\n {body(true)}\n </div>\n <TableDialog open={big} onClose={() => setBig(false)}>\n <div className=\"ui-md ui-md-table-wrap\" tabIndex={0} role=\"region\" aria-label={p.label}>\n {body(false)}\n </div>\n </TableDialog>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAcA,aAAaA,mBAAY;AAiBzB,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,UAAU;AAEhB,MAAM,QAAQ;AACd,MAAM,aAAwC;CAAE,MAAM;CAAQ,KAAK;CAAW,WAAW;CAAQ,SAAS;CAAW,SAAS;AAAS;AAEvI,MAAM,QAAQ;AACd,MAAM,UAAU;AAChB,MAAM,KAAK;AACX,MAAM,OAAO;AACb,MAAM,QAAQ;AACd,MAAM,YAAY;AAElB,SAAS,MAAM,MAAwB;CACrC,IAAI,IAAI,KAAK,KAAK;CAClB,IAAI,EAAE,WAAW,GAAG,GAAG,IAAI,EAAE,MAAM,CAAC;CACpC,IAAI,EAAE,SAAS,GAAG,KAAK,CAAC,EAAE,SAAS,KAAK,GAAG,IAAI,EAAE,MAAM,GAAG,EAAE;CAC5D,MAAM,MAAgB,CAAC;CACvB,IAAI,MAAM;CACV,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;EACjC,MAAM,IAAI,EAAE;EACZ,IAAI,MAAM,QAAQ,EAAE,IAAI,OAAO,KAAK;GAClC,OAAO;GACP;EACF,OAAO,IAAI,MAAM,KAAK;GACpB,OAAO,CAAC;GACR,OAAO;EACT,OAAO,IAAI,MAAM,OAAO,CAAC,MAAM;GAC7B,IAAI,KAAK,IAAI,KA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,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,kBAAkB,YAAY,aAAa;EAA9D,UAAA;GACE,oBAAC,OAAD;IAAK,WAAU;IACb,UAAA,oBAAC,YAAD,EAAY,eAAe,OAAO,IAAI,EAAI,CAAA;GACvC,CAAA;GACL,oBAAC,OAAD;IAAK,WAAU;IAAmB,UAAU;IAAG,MAAK;IAAS,cAAY,EAAE;IACxE,UAAA,KAAK,IAAI;GACP,CAAA;GACL,oBAAC,aAAD;IAAa,MAAM;IAAK,eAAe,OAAO,KAAK;IACjD,UAAA,oBAAC,OAAD;KAAK,WAAU;KAAyB,UAAU;KAAG,MAAK;KAAS,cAAY,EAAE;KAC9E,UAAA,KAAK,KAAK;IACR,CAAA;GACM,CAAA;EACV;;AAET"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IconSource } from "../../icons/Icon.js";
|
|
2
2
|
import { DangerConfirm } from "../Button/Button.js";
|
|
3
|
+
import { OpenStateProps } from "../../internal/open.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
interface MenuItemBase {
|
|
5
6
|
/** A verb: 重新命名, 複製連結. */
|
|
@@ -17,7 +18,8 @@ export type MenuItem = (MenuItemBase & {
|
|
|
17
18
|
danger: true;
|
|
18
19
|
confirm: DangerConfirm;
|
|
19
20
|
});
|
|
20
|
-
export interface MenuProps {
|
|
21
|
+
export interface MenuProps extends OpenStateProps {
|
|
22
|
+
/** The actions; danger ones go last, in red, and are confirmed. */
|
|
21
23
|
items: MenuItem[];
|
|
22
24
|
/** aria-label and tooltip of the ⋯ button. Default 「更多操作」. */
|
|
23
25
|
label?: string;
|
|
@@ -29,5 +31,5 @@ export interface MenuProps {
|
|
|
29
31
|
triggerClassName?: string;
|
|
30
32
|
}
|
|
31
33
|
/** The ⋯ button and its list of actions. Danger items go last, in red, after a divider, and are confirmed. */
|
|
32
|
-
export declare function Menu({ items, label, icon, align, triggerClassName }: MenuProps): React.JSX.Element;
|
|
34
|
+
export declare function Menu({ items, label, icon, align, triggerClassName, open: openProp, defaultOpen, onOpenChange }: MenuProps): React.JSX.Element;
|
|
33
35
|
export {};
|