@multiplatform.one/components 7.46.0 → 7.47.1
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/dist/cjs/Alert/index.cjs +1 -1
- package/dist/cjs/Alert/index.native.js +1 -1
- package/dist/cjs/Alert/index.native.js.map +1 -1
- package/dist/cjs/Carousel/index.cjs +1 -1
- package/dist/cjs/Carousel/index.native.js +1 -1
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/Chip/index.cjs +18 -7
- package/dist/cjs/Chip/index.native.js +20 -8
- package/dist/cjs/Chip/index.native.js.map +1 -1
- package/dist/cjs/ErrorBoundary/index.cjs +2 -2
- package/dist/cjs/ErrorBoundary/index.native.js +2 -2
- package/dist/cjs/ErrorBoundary/index.native.js.map +1 -1
- package/dist/cjs/Heading.cjs +8 -127
- package/dist/cjs/Heading.native.js +7 -133
- package/dist/cjs/Heading.native.js.map +1 -1
- package/dist/cjs/OverflowRow/index.cjs +65 -2
- package/dist/cjs/OverflowRow/index.native.js +68 -2
- package/dist/cjs/OverflowRow/index.native.js.map +1 -1
- package/dist/cjs/Pagination.cjs +4 -1
- package/dist/cjs/Pagination.native.js +4 -1
- package/dist/cjs/Pagination.native.js.map +1 -1
- package/dist/cjs/ProgressSteps/index.cjs +1 -1
- package/dist/cjs/ProgressSteps/index.native.js +1 -1
- package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
- package/dist/cjs/Quote/index.cjs +1 -0
- package/dist/cjs/Quote/index.native.js +1 -0
- package/dist/cjs/Quote/index.native.js.map +1 -1
- package/dist/cjs/SkipLink/index.cjs +1 -2
- package/dist/cjs/SkipLink/index.native.js +1 -2
- package/dist/cjs/SkipLink/index.native.js.map +1 -1
- package/dist/cjs/SortableList/index.cjs +2 -1
- package/dist/cjs/SortableList/index.native.js +2 -1
- package/dist/cjs/SortableList/index.native.js.map +1 -1
- package/dist/cjs/SortableList/useSortableRows.cjs +2 -2
- package/dist/cjs/SortableList/useSortableRows.native.js +2 -2
- package/dist/cjs/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/cjs/Text.cjs +5 -116
- package/dist/cjs/Text.native.js +4 -120
- package/dist/cjs/Text.native.js.map +1 -1
- package/dist/cjs/ThemePlayground/index.cjs +3 -2
- package/dist/cjs/ThemePresetPicker/index.cjs +21 -22
- package/dist/cjs/ThemePresetPicker/index.native.js +21 -22
- package/dist/cjs/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.cjs +2 -1
- package/dist/cjs/TreeSelect/index.native.js +2 -1
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/Video/PlayerChrome.cjs +1 -1
- package/dist/cjs/Video/PlayerChrome.native.js +1 -1
- package/dist/cjs/Video/PlayerChrome.native.js.map +1 -1
- package/dist/cjs/Video/VideoFrame.cjs +2 -1
- package/dist/cjs/Video/VideoFrame.native.js +2 -1
- package/dist/cjs/Video/VideoFrame.native.js.map +1 -1
- package/dist/cjs/Video/index.cjs +3 -1
- package/dist/cjs/actions/DestructiveAction.cjs +3 -2
- package/dist/cjs/actions/DestructiveAction.native.js +3 -2
- package/dist/cjs/actions/DestructiveAction.native.js.map +1 -1
- package/dist/cjs/appShell/ScopeMenu.cjs +2 -1
- package/dist/cjs/appShell/ScopeMenu.native.js +2 -1
- package/dist/cjs/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/cjs/appShell/SettingsSplit.cjs +5 -4
- package/dist/cjs/appShell/SettingsSplit.native.js +5 -4
- package/dist/cjs/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/cjs/appShell/Springboard.cjs +2 -1
- package/dist/cjs/appShell/Springboard.native.js +2 -1
- package/dist/cjs/appShell/Springboard.native.js.map +1 -1
- package/dist/cjs/appShell/SystemBar.cjs +2 -1
- package/dist/cjs/appShell/SystemBar.native.js +2 -1
- package/dist/cjs/appShell/SystemBar.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/index.cjs +9 -2
- package/dist/cjs/code/Highlighter/index.native.js +13 -2
- package/dist/cjs/code/Highlighter/index.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/namedGroupMatchAll.cjs +96 -0
- package/dist/cjs/code/Highlighter/namedGroupMatchAll.native.js +108 -0
- package/dist/cjs/code/Highlighter/namedGroupMatchAll.native.js.map +1 -0
- package/dist/cjs/feedback/ConfirmDialog.cjs +1 -1
- package/dist/cjs/feedback/ConfirmDialog.native.js +1 -1
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.cjs +11 -10
- package/dist/cjs/layouts/attachments.native.js +11 -10
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/breadcrumbs.cjs +3 -2
- package/dist/cjs/layouts/breadcrumbs.native.js +3 -2
- package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +80 -8
- package/dist/cjs/layouts/page.native.js +82 -8
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.cjs +3 -1
- package/dist/cjs/layouts/sidebar.native.js +3 -1
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +2 -1
- package/dist/cjs/layouts/tags.native.js +2 -1
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.cjs +14 -13
- package/dist/cjs/layouts/timeline.native.js +14 -13
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/layouts/toolbar.cjs +2 -1
- package/dist/cjs/layouts/toolbar.native.js +2 -1
- package/dist/cjs/layouts/toolbar.native.js.map +1 -1
- package/dist/cjs/linearGradientSetup.cjs +18 -0
- package/dist/cjs/linearGradientSetup.native.js +4 -0
- package/dist/cjs/linearGradientSetup.native.js.map +1 -0
- package/dist/cjs/views/Calendar.cjs +14 -13
- package/dist/cjs/views/Calendar.native.js +14 -13
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Gantt.cjs +188 -55
- package/dist/cjs/views/Gantt.native.js +201 -55
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/GanttDateGrip.cjs +216 -0
- package/dist/cjs/views/GanttDateGrip.native.js +259 -0
- package/dist/cjs/views/GanttDateGrip.native.js.map +1 -0
- package/dist/cjs/views/Kanban.cjs +3 -2
- package/dist/cjs/views/Kanban.native.js +3 -2
- package/dist/cjs/views/Kanban.native.js.map +1 -1
- package/dist/cjs/views/List.cjs +13 -3
- package/dist/cjs/views/List.native.js +14 -3
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/cjs/views/Matrix.cjs +2 -1
- package/dist/cjs/views/Matrix.native.js +2 -1
- package/dist/cjs/views/Matrix.native.js.map +1 -1
- package/dist/cjs/views/TreeView.cjs +3 -2
- package/dist/cjs/views/TreeView.native.js +3 -2
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/ganttIntervals.cjs +85 -0
- package/dist/cjs/views/ganttIntervals.native.js +92 -0
- package/dist/cjs/views/ganttIntervals.native.js.map +1 -0
- package/dist/esm/Alert/index.mjs +2 -2
- package/dist/esm/Alert/index.mjs.map +1 -1
- package/dist/esm/Alert/index.native.js +2 -2
- package/dist/esm/Alert/index.native.js.map +1 -1
- package/dist/esm/Carousel/index.mjs +1 -1
- package/dist/esm/Carousel/index.mjs.map +1 -1
- package/dist/esm/Carousel/index.native.js +1 -1
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/Chip/index.mjs +18 -7
- package/dist/esm/Chip/index.mjs.map +1 -1
- package/dist/esm/Chip/index.native.js +20 -8
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/ErrorBoundary/index.mjs +1 -1
- package/dist/esm/ErrorBoundary/index.mjs.map +1 -1
- package/dist/esm/ErrorBoundary/index.native.js +1 -1
- package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
- package/dist/esm/Heading.mjs +1 -120
- package/dist/esm/Heading.mjs.map +1 -1
- package/dist/esm/Heading.native.js +1 -127
- package/dist/esm/Heading.native.js.map +1 -1
- package/dist/esm/OverflowRow/index.mjs +66 -4
- package/dist/esm/OverflowRow/index.mjs.map +1 -1
- package/dist/esm/OverflowRow/index.native.js +69 -4
- package/dist/esm/OverflowRow/index.native.js.map +1 -1
- package/dist/esm/Pagination.mjs +4 -1
- package/dist/esm/Pagination.mjs.map +1 -1
- package/dist/esm/Pagination.native.js +4 -1
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.mjs +2 -2
- package/dist/esm/ProgressSteps/index.mjs.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js +2 -2
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Quote/index.mjs +2 -1
- package/dist/esm/Quote/index.mjs.map +1 -1
- package/dist/esm/Quote/index.native.js +2 -1
- package/dist/esm/Quote/index.native.js.map +1 -1
- package/dist/esm/SkipLink/index.mjs +1 -2
- package/dist/esm/SkipLink/index.mjs.map +1 -1
- package/dist/esm/SkipLink/index.native.js +1 -2
- package/dist/esm/SkipLink/index.native.js.map +1 -1
- package/dist/esm/SortableList/index.mjs +5 -4
- package/dist/esm/SortableList/index.mjs.map +1 -1
- package/dist/esm/SortableList/index.native.js +5 -4
- package/dist/esm/SortableList/index.native.js.map +1 -1
- package/dist/esm/SortableList/useSortableRows.mjs +2 -2
- package/dist/esm/SortableList/useSortableRows.mjs.map +1 -1
- package/dist/esm/SortableList/useSortableRows.native.js +2 -2
- package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/esm/Text.mjs +1 -112
- package/dist/esm/Text.mjs.map +1 -1
- package/dist/esm/Text.native.js +1 -117
- package/dist/esm/Text.native.js.map +1 -1
- package/dist/esm/ThemePlayground/index.mjs +2 -1
- package/dist/esm/ThemePlayground/index.mjs.map +1 -1
- package/dist/esm/ThemePresetPicker/index.mjs +21 -22
- package/dist/esm/ThemePresetPicker/index.mjs.map +1 -1
- package/dist/esm/ThemePresetPicker/index.native.js +21 -22
- package/dist/esm/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.mjs +6 -5
- package/dist/esm/TreeSelect/index.mjs.map +1 -1
- package/dist/esm/TreeSelect/index.native.js +6 -5
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/Video/PlayerChrome.mjs +1 -1
- package/dist/esm/Video/PlayerChrome.mjs.map +1 -1
- package/dist/esm/Video/PlayerChrome.native.js +1 -1
- package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
- package/dist/esm/Video/VideoFrame.mjs +3 -2
- package/dist/esm/Video/VideoFrame.mjs.map +1 -1
- package/dist/esm/Video/VideoFrame.native.js +3 -2
- package/dist/esm/Video/VideoFrame.native.js.map +1 -1
- package/dist/esm/Video/index.mjs +3 -1
- package/dist/esm/Video/index.mjs.map +1 -1
- package/dist/esm/actions/DestructiveAction.mjs +2 -1
- package/dist/esm/actions/DestructiveAction.mjs.map +1 -1
- package/dist/esm/actions/DestructiveAction.native.js +2 -1
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/appShell/ScopeMenu.mjs +2 -1
- package/dist/esm/appShell/ScopeMenu.mjs.map +1 -1
- package/dist/esm/appShell/ScopeMenu.native.js +2 -1
- package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/esm/appShell/SettingsSplit.mjs +5 -4
- package/dist/esm/appShell/SettingsSplit.mjs.map +1 -1
- package/dist/esm/appShell/SettingsSplit.native.js +5 -4
- package/dist/esm/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/esm/appShell/Springboard.mjs +3 -2
- package/dist/esm/appShell/Springboard.mjs.map +1 -1
- package/dist/esm/appShell/Springboard.native.js +3 -2
- package/dist/esm/appShell/Springboard.native.js.map +1 -1
- package/dist/esm/appShell/SystemBar.mjs +2 -1
- package/dist/esm/appShell/SystemBar.mjs.map +1 -1
- package/dist/esm/appShell/SystemBar.native.js +2 -1
- package/dist/esm/appShell/SystemBar.native.js.map +1 -1
- package/dist/esm/code/Highlighter/index.mjs +9 -2
- package/dist/esm/code/Highlighter/index.mjs.map +1 -1
- package/dist/esm/code/Highlighter/index.native.js +13 -2
- package/dist/esm/code/Highlighter/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/namedGroupMatchAll.mjs +70 -0
- package/dist/esm/code/Highlighter/namedGroupMatchAll.mjs.map +1 -0
- package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js +79 -0
- package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js.map +1 -0
- package/dist/esm/feedback/ConfirmDialog.mjs +1 -1
- package/dist/esm/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/layouts/attachments.mjs +3 -2
- package/dist/esm/layouts/attachments.mjs.map +1 -1
- package/dist/esm/layouts/attachments.native.js +3 -2
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.mjs +3 -2
- package/dist/esm/layouts/breadcrumbs.mjs.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js +3 -2
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +80 -10
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +82 -10
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.mjs +5 -3
- package/dist/esm/layouts/sidebar.mjs.map +1 -1
- package/dist/esm/layouts/sidebar.native.js +5 -3
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.mjs +6 -5
- package/dist/esm/layouts/tags.mjs.map +1 -1
- package/dist/esm/layouts/tags.native.js +6 -5
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.mjs +4 -3
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +4 -3
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/layouts/toolbar.mjs +2 -1
- package/dist/esm/layouts/toolbar.mjs.map +1 -1
- package/dist/esm/layouts/toolbar.native.js +2 -1
- package/dist/esm/layouts/toolbar.native.js.map +1 -1
- package/dist/esm/linearGradientSetup.mjs +2 -0
- package/dist/esm/linearGradientSetup.mjs.map +1 -0
- package/dist/esm/linearGradientSetup.native.js +2 -0
- package/dist/esm/linearGradientSetup.native.js.map +1 -0
- package/dist/esm/views/Calendar.mjs +7 -6
- package/dist/esm/views/Calendar.mjs.map +1 -1
- package/dist/esm/views/Calendar.native.js +7 -6
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +196 -63
- package/dist/esm/views/Gantt.mjs.map +1 -1
- package/dist/esm/views/Gantt.native.js +209 -63
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.mjs +191 -0
- package/dist/esm/views/GanttDateGrip.mjs.map +1 -0
- package/dist/esm/views/GanttDateGrip.native.js +231 -0
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -0
- package/dist/esm/views/Kanban.mjs +5 -4
- package/dist/esm/views/Kanban.mjs.map +1 -1
- package/dist/esm/views/Kanban.native.js +3 -2
- package/dist/esm/views/Kanban.native.js.map +1 -1
- package/dist/esm/views/List.mjs +13 -5
- package/dist/esm/views/List.mjs.map +1 -1
- package/dist/esm/views/List.native.js +14 -5
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/Matrix.mjs +10 -9
- package/dist/esm/views/Matrix.mjs.map +1 -1
- package/dist/esm/views/Matrix.native.js +10 -9
- package/dist/esm/views/Matrix.native.js.map +1 -1
- package/dist/esm/views/TreeView.mjs +5 -4
- package/dist/esm/views/TreeView.mjs.map +1 -1
- package/dist/esm/views/TreeView.native.js +5 -4
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/ganttIntervals.mjs +57 -0
- package/dist/esm/views/ganttIntervals.mjs.map +1 -0
- package/dist/esm/views/ganttIntervals.native.js +61 -0
- package/dist/esm/views/ganttIntervals.native.js.map +1 -0
- package/dist/jsx/Alert/index.mjs +2 -2
- package/dist/jsx/Alert/index.mjs.map +1 -1
- package/dist/jsx/Alert/index.native.js +1 -1
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/Carousel/index.mjs +1 -1
- package/dist/jsx/Carousel/index.mjs.map +1 -1
- package/dist/jsx/Carousel/index.native.js +1 -1
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.mjs +18 -7
- package/dist/jsx/Chip/index.mjs.map +1 -1
- package/dist/jsx/Chip/index.native.js +20 -8
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/ErrorBoundary/index.mjs +1 -1
- package/dist/jsx/ErrorBoundary/index.mjs.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js +2 -2
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Heading.mjs +1 -120
- package/dist/jsx/Heading.mjs.map +1 -1
- package/dist/jsx/Heading.native.js +7 -133
- package/dist/jsx/Heading.native.js.map +1 -1
- package/dist/jsx/OverflowRow/index.mjs +66 -4
- package/dist/jsx/OverflowRow/index.mjs.map +1 -1
- package/dist/jsx/OverflowRow/index.native.js +68 -2
- package/dist/jsx/OverflowRow/index.native.js.map +1 -1
- package/dist/jsx/Pagination.mjs +4 -1
- package/dist/jsx/Pagination.mjs.map +1 -1
- package/dist/jsx/Pagination.native.js +4 -1
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.mjs +2 -2
- package/dist/jsx/ProgressSteps/index.mjs.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js +1 -1
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Quote/index.mjs +2 -1
- package/dist/jsx/Quote/index.mjs.map +1 -1
- package/dist/jsx/Quote/index.native.js +1 -0
- package/dist/jsx/Quote/index.native.js.map +1 -1
- package/dist/jsx/SkipLink/index.mjs +1 -2
- package/dist/jsx/SkipLink/index.mjs.map +1 -1
- package/dist/jsx/SkipLink/index.native.js +1 -2
- package/dist/jsx/SkipLink/index.native.js.map +1 -1
- package/dist/jsx/SortableList/index.mjs +5 -4
- package/dist/jsx/SortableList/index.mjs.map +1 -1
- package/dist/jsx/SortableList/index.native.js +2 -1
- package/dist/jsx/SortableList/index.native.js.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.mjs +2 -2
- package/dist/jsx/SortableList/useSortableRows.mjs.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.native.js +2 -2
- package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/jsx/Text.mjs +1 -112
- package/dist/jsx/Text.mjs.map +1 -1
- package/dist/jsx/Text.native.js +4 -120
- package/dist/jsx/Text.native.js.map +1 -1
- package/dist/jsx/ThemePlayground/index.mjs +2 -1
- package/dist/jsx/ThemePlayground/index.mjs.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.mjs +21 -22
- package/dist/jsx/ThemePresetPicker/index.mjs.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js +21 -22
- package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.mjs +6 -5
- package/dist/jsx/TreeSelect/index.mjs.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +2 -1
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/Video/PlayerChrome.mjs +1 -1
- package/dist/jsx/Video/PlayerChrome.mjs.map +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.mjs +3 -2
- package/dist/jsx/Video/VideoFrame.mjs.map +1 -1
- package/dist/jsx/Video/VideoFrame.native.js +2 -1
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
- package/dist/jsx/Video/index.mjs +3 -1
- package/dist/jsx/Video/index.mjs.map +1 -1
- package/dist/jsx/actions/DestructiveAction.mjs +2 -1
- package/dist/jsx/actions/DestructiveAction.mjs.map +1 -1
- package/dist/jsx/actions/DestructiveAction.native.js +3 -2
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.mjs +2 -1
- package/dist/jsx/appShell/ScopeMenu.mjs.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js +2 -1
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.mjs +5 -4
- package/dist/jsx/appShell/SettingsSplit.mjs.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js +5 -4
- package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/jsx/appShell/Springboard.mjs +3 -2
- package/dist/jsx/appShell/Springboard.mjs.map +1 -1
- package/dist/jsx/appShell/Springboard.native.js +2 -1
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.mjs +2 -1
- package/dist/jsx/appShell/SystemBar.mjs.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js +2 -1
- package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.mjs +9 -2
- package/dist/jsx/code/Highlighter/index.mjs.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js +13 -2
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.mjs +70 -0
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.mjs.map +1 -0
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js +108 -0
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -0
- package/dist/jsx/feedback/ConfirmDialog.mjs +1 -1
- package/dist/jsx/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.mjs +3 -2
- package/dist/jsx/layouts/attachments.mjs.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +11 -10
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.mjs +3 -2
- package/dist/jsx/layouts/breadcrumbs.mjs.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js +3 -2
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +80 -10
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +82 -8
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.mjs +5 -3
- package/dist/jsx/layouts/sidebar.mjs.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +3 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.mjs +6 -5
- package/dist/jsx/layouts/tags.mjs.map +1 -1
- package/dist/jsx/layouts/tags.native.js +2 -1
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.mjs +4 -3
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +14 -13
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/layouts/toolbar.mjs +2 -1
- package/dist/jsx/layouts/toolbar.mjs.map +1 -1
- package/dist/jsx/layouts/toolbar.native.js +2 -1
- package/dist/jsx/layouts/toolbar.native.js.map +1 -1
- package/dist/jsx/linearGradientSetup.mjs +2 -0
- package/dist/jsx/linearGradientSetup.mjs.map +1 -0
- package/dist/jsx/linearGradientSetup.native.js +4 -0
- package/dist/jsx/linearGradientSetup.native.js.map +1 -0
- package/dist/jsx/views/Calendar.mjs +7 -6
- package/dist/jsx/views/Calendar.mjs.map +1 -1
- package/dist/jsx/views/Calendar.native.js +14 -13
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Gantt.mjs +196 -63
- package/dist/jsx/views/Gantt.mjs.map +1 -1
- package/dist/jsx/views/Gantt.native.js +201 -55
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.mjs +191 -0
- package/dist/jsx/views/GanttDateGrip.mjs.map +1 -0
- package/dist/jsx/views/GanttDateGrip.native.js +259 -0
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -0
- package/dist/jsx/views/Kanban.mjs +5 -4
- package/dist/jsx/views/Kanban.mjs.map +1 -1
- package/dist/jsx/views/Kanban.native.js +3 -2
- package/dist/jsx/views/Kanban.native.js.map +1 -1
- package/dist/jsx/views/List.mjs +13 -5
- package/dist/jsx/views/List.mjs.map +1 -1
- package/dist/jsx/views/List.native.js +14 -3
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/Matrix.mjs +10 -9
- package/dist/jsx/views/Matrix.mjs.map +1 -1
- package/dist/jsx/views/Matrix.native.js +2 -1
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/TreeView.mjs +5 -4
- package/dist/jsx/views/TreeView.mjs.map +1 -1
- package/dist/jsx/views/TreeView.native.js +3 -2
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/ganttIntervals.mjs +57 -0
- package/dist/jsx/views/ganttIntervals.mjs.map +1 -0
- package/dist/jsx/views/ganttIntervals.native.js +92 -0
- package/dist/jsx/views/ganttIntervals.native.js.map +1 -0
- package/package.json +12 -10
- package/src/Accordion/Accordion.stories.tsx +2 -1
- package/src/Alert/Alert.stories.tsx +2 -1
- package/src/Alert/index.tsx +2 -1
- package/src/AnimateHeight/AnimateHeight.stories.tsx +2 -1
- package/src/Avatar/Avatar.stories.tsx +2 -1
- package/src/Badge/Badge.stories.tsx +2 -1
- package/src/Card.stories.tsx +2 -1
- package/src/CardFooter.stories.tsx +2 -1
- package/src/CardHeader.stories.tsx +2 -1
- package/src/Carousel/Carousel.stories.tsx +2 -1
- package/src/Carousel/index.tsx +1 -1
- package/src/Chip/Chip.borderLadder.spec.tsx +3 -3
- package/src/Chip/Chip.ink.spec.tsx +70 -2
- package/src/Chip/Chip.spec.tsx +7 -4
- package/src/Chip/Chip.stories.tsx +2 -1
- package/src/Chip/index.tsx +29 -7
- package/src/ContextMenu/ContextMenu.stories.tsx +2 -1
- package/src/DialogContent.stories.tsx +2 -1
- package/src/DotIndicator/DotIndicator.stories.tsx +2 -1
- package/src/DropdownMenu/DropdownMenu.stories.tsx +2 -1
- package/src/ErrorBoundary/ErrorBoundary.stories.tsx +2 -1
- package/src/ErrorBoundary/index.tsx +1 -1
- package/src/Heading.native.spec.tsx +13 -5
- package/src/Heading.spec.tsx +55 -11
- package/src/Heading.tsx +3 -66
- package/src/Meter/Meter.spec.tsx +4 -4
- package/src/OverflowRow/OverflowRow.native.spec.tsx +124 -1
- package/src/OverflowRow/index.tsx +103 -4
- package/src/Pagination.stories.tsx +2 -1
- package/src/Pagination.tsx +9 -1
- package/src/Panel.stories.tsx +2 -1
- package/src/PopoverContent.stories.tsx +2 -1
- package/src/ProgressSteps/index.tsx +5 -1
- package/src/Quote/index.tsx +9 -2
- package/src/Separator/Separator.stories.tsx +2 -1
- package/src/SheetFrame.stories.tsx +2 -1
- package/src/SheetModal/SheetModal.stories.tsx +2 -1
- package/src/Skeleton/Skeleton.stories.tsx +2 -1
- package/src/SkipLink/SkipLink.stories.tsx +2 -1
- package/src/SkipLink/index.tsx +1 -2
- package/src/SortableList/index.tsx +14 -6
- package/src/SortableList/useSortableRows.ts +3 -2
- package/src/Tabs/Tabs.stories.tsx +2 -1
- package/src/Text.spec.tsx +22 -0
- package/src/Text.tsx +9 -133
- package/src/ThemePlayground/ExpoThemeColors.stories.tsx +60 -0
- package/src/ThemePlayground/index.tsx +2 -1
- package/src/ThemePresetPicker/ThemePresetPicker.spec.tsx +20 -0
- package/src/ThemePresetPicker/ThemePresetPicker.stories.spec.tsx +34 -12
- package/src/ThemePresetPicker/ThemePresetPicker.stories.tsx +11 -3
- package/src/ThemePresetPicker/index.tsx +35 -29
- package/src/Toast/Toast.stories.tsx +2 -1
- package/src/Tooltip/Tooltip.spec.tsx +1 -1
- package/src/TreeSelect/index.tsx +10 -9
- package/src/Video/PlayerChrome.tsx +1 -1
- package/src/Video/VideoFrame.tsx +4 -3
- package/src/Video/index.tsx +3 -1
- package/src/Wheel/Wheel.stories.tsx +2 -1
- package/src/actions/ActionBar.stories.tsx +2 -1
- package/src/actions/DestructiveAction.stories.tsx +2 -1
- package/src/actions/DestructiveAction.tsx +2 -1
- package/src/appShell/ScopeMenu.tsx +2 -1
- package/src/appShell/SettingsSplit.stories.tsx +2 -1
- package/src/appShell/SettingsSplit.tsx +6 -5
- package/src/appShell/Springboard.tsx +3 -2
- package/src/appShell/SystemBar.tsx +2 -1
- package/src/charts/Axis.stories.tsx +2 -1
- package/src/charts/ChartSurface.stories.tsx +2 -1
- package/src/charts/Charts.stories.tsx +2 -1
- package/src/code/CodeBlock/codeBlock.stories.ts +15 -0
- package/src/code/CodeInline.stories.tsx +3 -1
- package/src/code/Highlighter/Highlighter.native.spec.ts +76 -0
- package/src/code/Highlighter/index.ts +16 -1
- package/src/code/Highlighter/namedGroupMatchAll.ts +90 -0
- package/src/feedback/ConfirmDialog.stories.tsx +2 -1
- package/src/feedback/ConfirmDialog.tsx +1 -1
- package/src/feedback/Notify.stories.tsx +2 -1
- package/src/icons/CheckRegular.stories.tsx +2 -1
- package/src/icons/MinusRegular.stories.tsx +2 -1
- package/src/layouts/AsyncBoundary.stories.tsx +2 -1
- package/src/layouts/Attachments.stories.tsx +2 -1
- package/src/layouts/Debug/DebugLayout.stories.tsx +2 -1
- package/src/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.tsx +2 -2
- package/src/layouts/PageHeader.stories.tsx +2 -1
- package/src/layouts/PageSection.stories.tsx +2 -1
- package/src/layouts/PageTemplates.stories.tsx +64 -2
- package/src/layouts/PaneScaffold.stories.tsx +2 -2
- package/src/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.tsx +2 -2
- package/src/layouts/Screen.stories.tsx +2 -1
- package/src/layouts/Sidebar.stories.tsx +2 -1
- package/src/layouts/Tags.stories.tsx +2 -1
- package/src/layouts/Timeline.stories.tsx +2 -1
- package/src/layouts/Toolbar.stories.tsx +2 -1
- package/src/layouts/ViewSwitcher.stories.tsx +2 -1
- package/src/layouts/attachments.tsx +4 -3
- package/src/layouts/breadcrumbs.tsx +4 -3
- package/src/layouts/page.tsx +98 -9
- package/src/layouts/pageChrome.phone.spec.tsx +58 -0
- package/src/layouts/sidebar.tsx +7 -5
- package/src/layouts/tags-trigger.spec.tsx +3 -3
- package/src/layouts/tags.tsx +14 -9
- package/src/layouts/timeline.tsx +6 -5
- package/src/layouts/toolbar.tsx +2 -1
- package/src/linearGradientSetup.native.spec.ts +19 -0
- package/src/linearGradientSetup.native.ts +3 -0
- package/src/linearGradientSetup.ts +1 -0
- package/src/views/Calendar.tsx +12 -11
- package/src/views/Gantt.intervals.spec.tsx +69 -0
- package/src/views/Gantt.scroll.spec.tsx +42 -0
- package/src/views/Gantt.spec.tsx +4 -5
- package/src/views/Gantt.stories.tsx +19 -0
- package/src/views/Gantt.tsx +230 -106
- package/src/views/GanttDateGrip.native.spec.tsx +118 -0
- package/src/views/GanttDateGrip.tsx +266 -0
- package/src/views/ImageGrid.stories.tsx +2 -1
- package/src/views/Kanban.native.spec.tsx +98 -0
- package/src/views/Kanban.native.tsx +3 -2
- package/src/views/Kanban.stories.tsx +2 -1
- package/src/views/Kanban.tsx +15 -6
- package/src/views/List.spec.tsx +18 -0
- package/src/views/List.tsx +17 -2
- package/src/views/Matrix.tsx +22 -17
- package/src/views/TreeView.reveal.stories.tsx +2 -1
- package/src/views/TreeView.tsx +15 -6
- package/src/views/dataIdentity.spec.tsx +5 -1
- package/src/views/ganttIntervals.spec.ts +84 -0
- package/src/views/ganttIntervals.ts +91 -0
- package/src/views/index.ts +2 -0
- package/types/Alert/index.d.ts.map +1 -1
- package/types/Chip/index.d.ts +5 -3
- package/types/Chip/index.d.ts.map +1 -1
- package/types/Collapsible.d.ts +1 -1
- package/types/Heading.d.ts +2 -9
- package/types/Heading.d.ts.map +1 -1
- package/types/OverflowRow/index.d.ts +1 -0
- package/types/OverflowRow/index.d.ts.map +1 -1
- package/types/Pagination.d.ts +6 -1
- package/types/Pagination.d.ts.map +1 -1
- package/types/ProgressSteps/index.d.ts.map +1 -1
- package/types/Quote/index.d.ts.map +1 -1
- package/types/SkipLink/index.d.ts.map +1 -1
- package/types/SortableList/index.d.ts.map +1 -1
- package/types/SortableList/useSortableRows.d.ts.map +1 -1
- package/types/Tabs/index.d.ts +1 -1
- package/types/Text.d.ts +2 -12
- package/types/Text.d.ts.map +1 -1
- package/types/ThemePlayground/index.d.ts.map +1 -1
- package/types/ThemePresetPicker/index.d.ts +3 -1
- package/types/ThemePresetPicker/index.d.ts.map +1 -1
- package/types/TreeSelect/index.d.ts.map +1 -1
- package/types/Video/VideoFrame.d.ts.map +1 -1
- package/types/Video/index.d.ts.map +1 -1
- package/types/actions/DestructiveAction.d.ts.map +1 -1
- package/types/appShell/ScopeMenu.d.ts.map +1 -1
- package/types/appShell/SettingsSplit.d.ts.map +1 -1
- package/types/appShell/Springboard.d.ts.map +1 -1
- package/types/appShell/SystemBar.d.ts.map +1 -1
- package/types/code/Highlighter/index.d.ts.map +1 -1
- package/types/code/Highlighter/namedGroupMatchAll.d.ts +22 -0
- package/types/code/Highlighter/namedGroupMatchAll.d.ts.map +1 -0
- package/types/layouts/attachments.d.ts.map +1 -1
- package/types/layouts/breadcrumbs.d.ts.map +1 -1
- package/types/layouts/page.d.ts +21 -3
- package/types/layouts/page.d.ts.map +1 -1
- package/types/layouts/sidebar.d.ts.map +1 -1
- package/types/layouts/tags.d.ts.map +1 -1
- package/types/layouts/timeline.d.ts.map +1 -1
- package/types/layouts/toolbar.d.ts.map +1 -1
- package/types/linearGradientSetup.d.ts +2 -0
- package/types/linearGradientSetup.d.ts.map +1 -0
- package/types/linearGradientSetup.native.d.ts +2 -0
- package/types/linearGradientSetup.native.d.ts.map +1 -0
- package/types/views/Calendar.d.ts.map +1 -1
- package/types/views/Gantt.d.ts +9 -21
- package/types/views/Gantt.d.ts.map +1 -1
- package/types/views/GanttDateGrip.d.ts +22 -0
- package/types/views/GanttDateGrip.d.ts.map +1 -0
- package/types/views/Kanban.d.ts.map +1 -1
- package/types/views/List.d.ts +17 -0
- package/types/views/List.d.ts.map +1 -1
- package/types/views/Matrix.d.ts.map +1 -1
- package/types/views/TreeView.d.ts.map +1 -1
- package/types/views/ganttIntervals.d.ts +11 -0
- package/types/views/ganttIntervals.d.ts.map +1 -0
- package/types/views/index.d.ts +1 -0
- package/types/views/index.d.ts.map +1 -1
|
@@ -5,9 +5,10 @@ import {
|
|
|
5
5
|
type SchemePreference,
|
|
6
6
|
} from "@multiplatform.one/theme";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
8
|
-
import {
|
|
9
|
-
import { Paragraph, XStack, YStack } from "tamagui";
|
|
8
|
+
import { YStack, type ColorTokens } from "tamagui";
|
|
10
9
|
import { Chip } from "../Chip";
|
|
10
|
+
import { OverflowRow } from "../OverflowRow";
|
|
11
|
+
import { Paragraph } from "../Text";
|
|
11
12
|
|
|
12
13
|
export interface ThemePresetPickerProps {
|
|
13
14
|
rows?: ReadonlyArray<"scheme" | "preset">;
|
|
@@ -15,6 +16,7 @@ export interface ThemePresetPickerProps {
|
|
|
15
16
|
/** Signed-in owner; none records this device's signed-out choice. */
|
|
16
17
|
userId?: string | null;
|
|
17
18
|
testID?: string;
|
|
19
|
+
fadeColor?: ColorTokens;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
const titleCase = (name: string) =>
|
|
@@ -28,6 +30,7 @@ export function ThemePresetPicker({
|
|
|
28
30
|
useUserScheme = useSchemePreference,
|
|
29
31
|
userId,
|
|
30
32
|
testID = "theme-preset-picker",
|
|
33
|
+
fadeColor,
|
|
31
34
|
}: ThemePresetPickerProps) {
|
|
32
35
|
const { t } = useTranslation();
|
|
33
36
|
const scheme = useUserScheme();
|
|
@@ -35,7 +38,7 @@ export function ThemePresetPicker({
|
|
|
35
38
|
const presets = ["default", ...getPresetNames().filter((name) => name !== "default")];
|
|
36
39
|
const selectedPreset = presets.includes(preset.presetName) ? preset.presetName : "default";
|
|
37
40
|
return (
|
|
38
|
-
<YStack testID={testID} gap="$
|
|
41
|
+
<YStack testID={testID} gap="$3">
|
|
39
42
|
{rows.map((row) => {
|
|
40
43
|
const label = t(`themePresetPicker.${row}`, { defaultValue: titleCase(row) });
|
|
41
44
|
const options = row === "scheme" ? (["system", "light", "dark"] as const) : presets;
|
|
@@ -44,32 +47,35 @@ export function ThemePresetPicker({
|
|
|
44
47
|
<Paragraph fontSize="$2" color="$color11">
|
|
45
48
|
{label}
|
|
46
49
|
</Paragraph>
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
<OverflowRow
|
|
51
|
+
gap="$1.5"
|
|
52
|
+
fadeColor={fadeColor}
|
|
53
|
+
keyboardShouldPersistTaps="handled"
|
|
54
|
+
accessibilityLabel={label}
|
|
55
|
+
>
|
|
56
|
+
{options.map((name) => {
|
|
57
|
+
const optionLabel = t(`themePresetPicker.${row}s.${name}`, {
|
|
58
|
+
defaultValue: titleCase(name),
|
|
59
|
+
});
|
|
60
|
+
return (
|
|
61
|
+
<Chip
|
|
62
|
+
key={name}
|
|
63
|
+
aria-label={`${label}: ${optionLabel}`}
|
|
64
|
+
selected={(row === "scheme" ? scheme.setting : selectedPreset) === name}
|
|
65
|
+
onPress={() => {
|
|
66
|
+
if (
|
|
67
|
+
row === "scheme" &&
|
|
68
|
+
(name === "system" || name === "light" || name === "dark")
|
|
69
|
+
)
|
|
70
|
+
scheme.set(name);
|
|
71
|
+
else preset.choosePreset(name, userId ?? null);
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
74
|
+
{optionLabel}
|
|
75
|
+
</Chip>
|
|
76
|
+
);
|
|
77
|
+
})}
|
|
78
|
+
</OverflowRow>
|
|
73
79
|
</YStack>
|
|
74
80
|
);
|
|
75
81
|
})}
|
|
@@ -2,7 +2,7 @@ import { action } from "@multiplatform.one/storybook";
|
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { Button } from "@multiplatform.one/forms";
|
|
5
|
-
import {
|
|
5
|
+
import { XStack, YStack } from "tamagui";
|
|
6
6
|
import { SheetModal } from "../SheetModal";
|
|
7
7
|
import {
|
|
8
8
|
Toast,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
type ToastShowOptions,
|
|
14
14
|
} from "./index";
|
|
15
15
|
import { resetToasts } from "./store";
|
|
16
|
+
import { Text } from "../Text";
|
|
16
17
|
|
|
17
18
|
const intents: ToastIntent[] = ["accent", "success", "warning", "error"];
|
|
18
19
|
|
|
@@ -160,7 +160,7 @@ describe("Tooltip content rides the border, elevation and animation knobs", () =
|
|
|
160
160
|
});
|
|
161
161
|
expect(small).toMatchObject({
|
|
162
162
|
mounted: true,
|
|
163
|
-
border: "_btw-
|
|
163
|
+
border: "_btw-1px",
|
|
164
164
|
shadow: "_bxsh-0px11px22px",
|
|
165
165
|
});
|
|
166
166
|
// Overlay large is the ladder's own $5 dialog stop, not the control $4 (MPO-99).
|
package/src/TreeSelect/index.tsx
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "@multiplatform.one/theme";
|
|
31
31
|
import { useDismiss, useInteractions, FloatingFocusManager } from "@floating-ui/react";
|
|
32
32
|
import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
33
|
-
import { Text, View, XStack, YStack, isWeb, type GetProps } from "tamagui";
|
|
33
|
+
import { Text as TamaguiText, View, XStack, YStack, isWeb, type GetProps } from "tamagui";
|
|
34
34
|
import { useDirection } from "../hooks/useDirection";
|
|
35
35
|
import { useTranslation } from "../shared/i18n";
|
|
36
36
|
import type { TreeNode } from "../views/TreeView";
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
flattenVisible,
|
|
43
43
|
type FlatTreeRow,
|
|
44
44
|
} from "./treeSelectModel";
|
|
45
|
+
import { Text } from "../Text";
|
|
45
46
|
|
|
46
47
|
export type { TreeNode as TreeSelectNode } from "../views/TreeView";
|
|
47
48
|
|
|
@@ -241,7 +242,7 @@ function TreeSelectRows({
|
|
|
241
242
|
>
|
|
242
243
|
{leadingIcon}
|
|
243
244
|
</View>
|
|
244
|
-
<
|
|
245
|
+
<TamaguiText
|
|
245
246
|
{...knobProps.body}
|
|
246
247
|
fontSize={13}
|
|
247
248
|
lineHeight={24}
|
|
@@ -251,11 +252,11 @@ function TreeSelectRows({
|
|
|
251
252
|
minWidth={0}
|
|
252
253
|
>
|
|
253
254
|
{node.label}
|
|
254
|
-
</
|
|
255
|
+
</TamaguiText>
|
|
255
256
|
{hasChildren && childCount > 0 ? (
|
|
256
|
-
<
|
|
257
|
+
<TamaguiText fontFamily="$mono" fontSize={11} lineHeight={21} color="$color8">
|
|
257
258
|
{childCount}
|
|
258
|
-
</
|
|
259
|
+
</TamaguiText>
|
|
259
260
|
) : null}
|
|
260
261
|
{isSelected ? (
|
|
261
262
|
<View flexShrink={0} width={14} height={14}>
|
|
@@ -333,9 +334,9 @@ function EmptyFilterRow({ message }: { message: string }) {
|
|
|
333
334
|
minHeight={44}
|
|
334
335
|
paddingHorizontal="$3"
|
|
335
336
|
>
|
|
336
|
-
<
|
|
337
|
+
<TamaguiText {...knobProps.body} color={formCommonColors.text}>
|
|
337
338
|
{message}
|
|
338
|
-
</
|
|
339
|
+
</TamaguiText>
|
|
339
340
|
</XStack>
|
|
340
341
|
);
|
|
341
342
|
}
|
|
@@ -984,9 +985,9 @@ export function TreeSelect({
|
|
|
984
985
|
knobProps={knobProps as never}
|
|
985
986
|
disabled={disabled}
|
|
986
987
|
>
|
|
987
|
-
<
|
|
988
|
+
<TamaguiText paddingVertical="$2" paddingHorizontal="$3" {...knobProps.body}>
|
|
988
989
|
{display ?? "—"}
|
|
989
|
-
</
|
|
990
|
+
</TamaguiText>
|
|
990
991
|
</FieldLayout>
|
|
991
992
|
</YStack>
|
|
992
993
|
);
|
|
@@ -161,7 +161,7 @@ function SeekBar({
|
|
|
161
161
|
e.stopPropagation?.();
|
|
162
162
|
e.preventDefault?.();
|
|
163
163
|
const target = e.currentTarget;
|
|
164
|
-
if (!target || e.clientX == null) return;
|
|
164
|
+
if (!target || e.clientX == null || typeof document === "undefined") return;
|
|
165
165
|
onSeekingChange(true);
|
|
166
166
|
seekAt(e.clientX, target);
|
|
167
167
|
const move = (ev: PointerEvent) => seekAt(ev.clientX, target);
|
package/src/Video/VideoFrame.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
|
-
import { Paragraph, YStack, styled } from "tamagui";
|
|
3
|
+
import { Paragraph as TamaguiParagraph, YStack, styled } from "tamagui";
|
|
4
4
|
import { wrapBareTextChildren } from "../shared/textRidesText";
|
|
5
|
+
import { Paragraph } from "../Text";
|
|
5
6
|
|
|
6
7
|
export const VideoFrame = styled(YStack, {
|
|
7
8
|
name: "Video",
|
|
@@ -31,14 +32,14 @@ export function VideoCaption({ children }: { children: ReactNode }) {
|
|
|
31
32
|
return (
|
|
32
33
|
<Paragraph render="figcaption" color={knobProps.textAccentColor as "$color11"}>
|
|
33
34
|
{wrapBareTextChildren(children, (label, key) => (
|
|
34
|
-
<
|
|
35
|
+
<TamaguiParagraph
|
|
35
36
|
key={key}
|
|
36
37
|
render="span"
|
|
37
38
|
{...knobProps.body}
|
|
38
39
|
color={knobProps.textAccentColor as "$color11"}
|
|
39
40
|
>
|
|
40
41
|
{label}
|
|
41
|
-
</
|
|
42
|
+
</TamaguiParagraph>
|
|
42
43
|
))}
|
|
43
44
|
</Paragraph>
|
|
44
45
|
);
|
package/src/Video/index.tsx
CHANGED
|
@@ -11,7 +11,9 @@ export type { VideoProps } from "./types";
|
|
|
11
11
|
const HIDE_MS = 2500;
|
|
12
12
|
|
|
13
13
|
function asVideoElement(node: unknown): HTMLVideoElement | null {
|
|
14
|
-
if (!node || typeof HTMLVideoElement === "undefined")
|
|
14
|
+
if (!node || typeof HTMLVideoElement === "undefined" || typeof Element === "undefined") {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
15
17
|
if (node instanceof HTMLVideoElement) return node;
|
|
16
18
|
if (node instanceof Element) {
|
|
17
19
|
if (node.tagName === "VIDEO") return node as HTMLVideoElement;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { XStack, YStack } from "tamagui";
|
|
4
4
|
import { Wheel } from "./index";
|
|
5
|
+
import { Text } from "../Text";
|
|
5
6
|
|
|
6
7
|
const meta: Meta<typeof Wheel> = {
|
|
7
8
|
title: "Components/Wheel",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Button } from "@multiplatform.one/forms";
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { YStack } from "tamagui";
|
|
5
5
|
import { Card } from "../surfaces";
|
|
6
6
|
import { ActionBar, type ActionBarProps } from "./ActionBar";
|
|
7
|
+
import { Paragraph } from "../Text";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Presses land in the story itself rather than the Actions panel: the panel's
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { action } from "@multiplatform.one/storybook";
|
|
2
2
|
import { Button } from "@multiplatform.one/forms";
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
4
|
-
import {
|
|
4
|
+
import { YStack } from "tamagui";
|
|
5
5
|
import { ActionBar } from "./ActionBar";
|
|
6
6
|
import { DestructiveAction } from "./DestructiveAction";
|
|
7
|
+
import { Paragraph } from "../Text";
|
|
7
8
|
|
|
8
9
|
const meta: Meta<typeof DestructiveAction> = {
|
|
9
10
|
title: "Components/DestructiveAction",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { Button, formatActionLabel, type ButtonProps } from "@multiplatform.one/forms";
|
|
9
9
|
import { useCallback, useState, type ReactNode } from "react";
|
|
10
10
|
import { useTranslation } from "../shared/i18n";
|
|
11
|
-
import { Input,
|
|
11
|
+
import { Input, YStack } from "tamagui";
|
|
12
12
|
import { ConfirmDialog } from "../feedback/ConfirmDialog";
|
|
13
13
|
import { withInterp } from "../shared/t";
|
|
14
14
|
import {
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
type DestructiveSeverity,
|
|
19
19
|
type DestructiveSeverityHints,
|
|
20
20
|
} from "./severity";
|
|
21
|
+
import { Paragraph } from "../Text";
|
|
21
22
|
|
|
22
23
|
export type DestructiveConfirmContext = {
|
|
23
24
|
verb: string;
|
|
@@ -19,7 +19,8 @@ import { FloatingPanel } from "@multiplatform.one/forms";
|
|
|
19
19
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
20
20
|
import { CaretDownIcon, CaretUpIcon, CheckIcon } from "@phosphor-icons/react";
|
|
21
21
|
import { useState } from "react";
|
|
22
|
-
import {
|
|
22
|
+
import { XStack, YStack } from "tamagui";
|
|
23
|
+
import { SizableText } from "../Text";
|
|
23
24
|
|
|
24
25
|
export interface ScopeMenuOption {
|
|
25
26
|
value: string;
|
|
@@ -8,8 +8,9 @@ import {
|
|
|
8
8
|
UserIcon,
|
|
9
9
|
WifiHighIcon,
|
|
10
10
|
} from "@phosphor-icons/react";
|
|
11
|
-
import {
|
|
11
|
+
import { YStack } from "tamagui";
|
|
12
12
|
import { SettingsSplit, type SettingsSplitGroup } from "./SettingsSplit";
|
|
13
|
+
import { SizableText } from "../Text";
|
|
13
14
|
|
|
14
15
|
const meta: Meta<typeof SettingsSplit> = {
|
|
15
16
|
title: "Components/SettingsSplit",
|
|
@@ -14,8 +14,9 @@ import { IconSlot } from "@multiplatform.one/theme";
|
|
|
14
14
|
import { hairline, useLayoutSizeClass, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
15
15
|
import { CaretLeftIcon, CaretRightIcon } from "@phosphor-icons/react";
|
|
16
16
|
import { useState, type ComponentType, type ReactNode } from "react";
|
|
17
|
-
import { SizableText, XStack, YStack } from "tamagui";
|
|
17
|
+
import { SizableText as TamaguiSizableText, XStack, YStack } from "tamagui";
|
|
18
18
|
import { ScrollView } from "../ScrollView";
|
|
19
|
+
import { SizableText } from "../Text";
|
|
19
20
|
|
|
20
21
|
export interface SettingsSplitItem {
|
|
21
22
|
key: string;
|
|
@@ -191,9 +192,9 @@ export function SettingsSplit({
|
|
|
191
192
|
};
|
|
192
193
|
|
|
193
194
|
const heading = (text: string) => (
|
|
194
|
-
<
|
|
195
|
+
<TamaguiSizableText {...knobProps.heading} paddingHorizontal="$3" paddingTop="$3">
|
|
195
196
|
{text}
|
|
196
|
-
</
|
|
197
|
+
</TamaguiSizableText>
|
|
197
198
|
);
|
|
198
199
|
|
|
199
200
|
if (layout === "push") {
|
|
@@ -218,7 +219,7 @@ export function SettingsSplit({
|
|
|
218
219
|
</XStack>
|
|
219
220
|
<ScrollView flex={1}>
|
|
220
221
|
<YStack gap="$3" padding="$3" data-testid={`${testID}-detail`}>
|
|
221
|
-
<
|
|
222
|
+
<TamaguiSizableText {...knobProps.heading}>{pushed.label}</TamaguiSizableText>
|
|
222
223
|
{renderDetail(pushed)}
|
|
223
224
|
</YStack>
|
|
224
225
|
</ScrollView>
|
|
@@ -256,7 +257,7 @@ export function SettingsSplit({
|
|
|
256
257
|
<YStack gap="$3" padding="$4" data-testid={`${testID}-detail`}>
|
|
257
258
|
{selectedItem ? (
|
|
258
259
|
<>
|
|
259
|
-
<
|
|
260
|
+
<TamaguiSizableText {...knobProps.heading}>{selectedItem.label}</TamaguiSizableText>
|
|
260
261
|
{renderDetail(selectedItem)}
|
|
261
262
|
</>
|
|
262
263
|
) : null}
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
11
11
|
import { useEffect, useRef, useState, type ReactNode } from "react";
|
|
12
|
-
import { SizableText, XStack, YStack } from "tamagui";
|
|
12
|
+
import { SizableText as TamaguiSizableText, XStack, YStack } from "tamagui";
|
|
13
13
|
import { SheetModal } from "../SheetModal";
|
|
14
14
|
import { AppGlyph, appAccessibleLabel, type AppEntry } from "./appTile";
|
|
15
|
+
import { SizableText } from "../Text";
|
|
15
16
|
|
|
16
17
|
export type SpringboardApp = AppEntry;
|
|
17
18
|
|
|
@@ -125,7 +126,7 @@ export function Springboard({
|
|
|
125
126
|
sheetApp ? (
|
|
126
127
|
<XStack alignItems="center" gap="$3">
|
|
127
128
|
<AppGlyph icon={sheetApp.icon} tileSize="$4" />
|
|
128
|
-
<
|
|
129
|
+
<TamaguiSizableText {...knobProps.heading}>{sheetApp.label}</TamaguiSizableText>
|
|
129
130
|
</XStack>
|
|
130
131
|
) : null
|
|
131
132
|
}
|
|
@@ -18,8 +18,9 @@ import { IconSlot } from "@multiplatform.one/theme";
|
|
|
18
18
|
import { hairline, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
19
19
|
import type { ComponentType, ReactNode } from "react";
|
|
20
20
|
import { useEffect, useState } from "react";
|
|
21
|
-
import {
|
|
21
|
+
import { XStack, YStack } from "tamagui";
|
|
22
22
|
import { useTopInsetStyle } from "./topInset";
|
|
23
|
+
import { SizableText } from "../Text";
|
|
23
24
|
|
|
24
25
|
export interface SystemBarStatus {
|
|
25
26
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
-
import {
|
|
2
|
+
import { YStack } from "tamagui";
|
|
3
3
|
import { Card } from "../surfaces";
|
|
4
4
|
import { XAxis, YAxis } from "./Axis";
|
|
5
5
|
import { ChartSurface } from "./ChartSurface";
|
|
@@ -7,6 +7,7 @@ import { computeCartesianPlot } from "./composeChart";
|
|
|
7
7
|
import { createBandScale, createLinearScale, formatAxisTick, getLinearTicks } from "./math";
|
|
8
8
|
import type { ChartSize } from "./types";
|
|
9
9
|
import { useChartTheme } from "./useChartTheme";
|
|
10
|
+
import { Paragraph } from "../Text";
|
|
10
11
|
|
|
11
12
|
const weekdays = ["Mon", "Tue", "Wed", "Thu", "Fri"];
|
|
12
13
|
const longLabels = [
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
-
import {
|
|
2
|
+
import { YStack } from "tamagui";
|
|
3
3
|
import { Card } from "../surfaces";
|
|
4
4
|
import { ChartSurface } from "./ChartSurface";
|
|
5
5
|
import { createBandScale, createLinearScale } from "./math";
|
|
6
6
|
import { Circle, Line, Rect } from "./svg";
|
|
7
7
|
import type { ChartSize } from "./types";
|
|
8
8
|
import { useChartTheme } from "./useChartTheme";
|
|
9
|
+
import { Paragraph } from "../Text";
|
|
9
10
|
|
|
10
11
|
const bars = [
|
|
11
12
|
{ label: "Mon", value: 3 },
|
|
@@ -3,7 +3,7 @@ import { KPICard } from "../views/Dashboard";
|
|
|
3
3
|
import { action } from "@multiplatform.one/storybook";
|
|
4
4
|
import { Preset } from "@multiplatform.one/theme";
|
|
5
5
|
import type { Meta } from "@storybook/react-native-web-vite";
|
|
6
|
-
import {
|
|
6
|
+
import { Theme, XStack, YStack } from "tamagui";
|
|
7
7
|
import { Card } from "../surfaces";
|
|
8
8
|
import { AreaChart, LineChart } from "./LineChart";
|
|
9
9
|
import { ChartDataView } from "./ChartDataView";
|
|
@@ -12,6 +12,7 @@ import { PieChart } from "./PieChart";
|
|
|
12
12
|
import { chartWebProps } from "./svg";
|
|
13
13
|
import { Sparkline } from "./Sparkline";
|
|
14
14
|
import type { ChartDatum } from "./types";
|
|
15
|
+
import { Text } from "../Text";
|
|
15
16
|
|
|
16
17
|
const monthly: ChartDatum[] = [
|
|
17
18
|
{ label: "Jan", value: 420 },
|
|
@@ -29,3 +29,18 @@ function howdy() {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export default meta;
|
|
32
|
+
|
|
33
|
+
export const shell: StoryObj<typeof CodeBlock> = {
|
|
34
|
+
name: "Shell",
|
|
35
|
+
args: {
|
|
36
|
+
backgroundColor: "$color2",
|
|
37
|
+
language: "bash",
|
|
38
|
+
children: `#!/bin/sh
|
|
39
|
+
set -eu
|
|
40
|
+
for f in scripts/*.sh; do
|
|
41
|
+
echo "lint $f" | grep -v skip # FZ-7829
|
|
42
|
+
shfmt -d "$f"
|
|
43
|
+
done
|
|
44
|
+
`,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
-
import { Anchor,
|
|
2
|
+
import { Anchor, YStack } from "tamagui";
|
|
3
3
|
import { CodeInline } from "./Code/index";
|
|
4
|
+
import { H2 } from "../Heading";
|
|
5
|
+
import { Paragraph } from "../Text";
|
|
4
6
|
|
|
5
7
|
const meta: Meta<typeof CodeInline> = {
|
|
6
8
|
title: "Components/CodeInline",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FZ-7829. On Hermes, `String.prototype.matchAll` returns matches whose
|
|
3
|
+
* `groups` is undefined (its @@matchAll copies the regex without the
|
|
4
|
+
* group-name mapping). shiki's JS regex engine converts grammars through
|
|
5
|
+
* helpers that read `match.groups` from `matchAll`, so on iOS shell and python
|
|
6
|
+
* came back as plain lines. This suite gives Node that same matchAll and
|
|
7
|
+
* asserts the shipped languages still come back coloured.
|
|
8
|
+
*/
|
|
9
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
10
|
+
import { highlightCode } from "./index";
|
|
11
|
+
import { resetNamedGroupMatchAllProbe, withNamedGroupMatchAll } from "./namedGroupMatchAll";
|
|
12
|
+
|
|
13
|
+
const nativeMatchAll = String.prototype.matchAll;
|
|
14
|
+
|
|
15
|
+
function hermesMatchAll(this: string, regexp: RegExp): IterableIterator<RegExpExecArray> {
|
|
16
|
+
const inner = nativeMatchAll.call(this, regexp);
|
|
17
|
+
const iterator: IterableIterator<RegExpExecArray> = {
|
|
18
|
+
next() {
|
|
19
|
+
const step = inner.next();
|
|
20
|
+
if (!step.done) step.value.groups = undefined;
|
|
21
|
+
return step;
|
|
22
|
+
},
|
|
23
|
+
[Symbol.iterator]() {
|
|
24
|
+
return iterator;
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
return iterator;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const colours = (lines: { color?: string }[][]) =>
|
|
31
|
+
new Set(lines.flat().flatMap((token) => (token.color ? [token.color] : [])));
|
|
32
|
+
|
|
33
|
+
const snippets: Record<string, string> = {
|
|
34
|
+
bash: 'set -eu\nfor f in *.sh; do\n echo "lint $f" | grep -v skip # note\ndone',
|
|
35
|
+
typescript: "const x: number = 1; // c",
|
|
36
|
+
javascript: "function f(a) { return `${a}`; }",
|
|
37
|
+
json: '{"a": [1, true, null]}',
|
|
38
|
+
yaml: 'a: 1\nb: [x, "y"]',
|
|
39
|
+
python: "def f(x):\n return x + 1 # c",
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
describe("highlightCode under Hermes's matchAll", () => {
|
|
43
|
+
beforeAll(() => {
|
|
44
|
+
String.prototype.matchAll = hermesMatchAll as typeof nativeMatchAll;
|
|
45
|
+
resetNamedGroupMatchAllProbe();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
afterAll(() => {
|
|
49
|
+
String.prototype.matchAll = nativeMatchAll;
|
|
50
|
+
resetNamedGroupMatchAllProbe();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("the emulation drops named groups the way Hermes does", () => {
|
|
54
|
+
const first = "x".matchAll(new RegExp("(?<g>x)", "g")).next().value;
|
|
55
|
+
expect(first?.groups).toBeUndefined();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("colours a shell snippet", { timeout: 60000 }, async () => {
|
|
59
|
+
const lines = await highlightCode(snippets.bash!, "bash");
|
|
60
|
+
expect(lines.map((line) => line.map((token) => token.content).join("")).join("\n")).toBe(
|
|
61
|
+
snippets.bash,
|
|
62
|
+
);
|
|
63
|
+
expect(colours(lines).size).toBeGreaterThan(1);
|
|
64
|
+
expect([...colours(lines)].some((colour) => colour.startsWith("$syntax"))).toBe(true);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it.each(Object.keys(snippets))("colours %s", { timeout: 60000 }, async (language) => {
|
|
68
|
+
const lines = await highlightCode(snippets[language]!, language);
|
|
69
|
+
expect(colours(lines).size).toBeGreaterThan(1);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("puts the engine's matchAll back after converting", () => {
|
|
73
|
+
expect(withNamedGroupMatchAll(() => String.prototype.matchAll)).not.toBe(hermesMatchAll);
|
|
74
|
+
expect(String.prototype.matchAll).toBe(hermesMatchAll);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { createContext, useContext, useEffect, useState } from "react";
|
|
10
10
|
import { houseSyntaxTheme } from "./houseSyntaxTheme";
|
|
11
|
+
import { withNamedGroupMatchAll } from "./namedGroupMatchAll";
|
|
11
12
|
|
|
12
13
|
export * from "./houseSyntaxTheme";
|
|
13
14
|
|
|
@@ -78,6 +79,15 @@ function plainTextTokens(code: string): HighlightLine[] {
|
|
|
78
79
|
// of an eager preload.
|
|
79
80
|
let highlighterPromise: Promise<any> | null = null;
|
|
80
81
|
|
|
82
|
+
// shiki stops a line at 500ms by default and returns the rest as one plain
|
|
83
|
+
// token. The JS engine converts a grammar's regexes lazily inside that clock,
|
|
84
|
+
// so on Hermes (no JIT) or a loaded CPU the first lines of a big grammar like
|
|
85
|
+
// TypeScript ran out of time and came back uncoloured; any wall-clock budget
|
|
86
|
+
// flakes the same way. The clock is off, and a line too long to tokenize
|
|
87
|
+
// cheaply stays plain instead.
|
|
88
|
+
const tokenizeTimeLimit = 0;
|
|
89
|
+
const tokenizeMaxLineLength = 5000;
|
|
90
|
+
|
|
81
91
|
function getHighlighter(): Promise<any> {
|
|
82
92
|
if (!highlighterPromise) {
|
|
83
93
|
highlighterPromise = Promise.all([import("shiki"), import("shiki/engine/javascript")]).then(
|
|
@@ -85,7 +95,10 @@ function getHighlighter(): Promise<any> {
|
|
|
85
95
|
shiki.createHighlighter({
|
|
86
96
|
themes: [],
|
|
87
97
|
langs: [],
|
|
88
|
-
engine: jsEngine.createJavaScriptRegexEngine(
|
|
98
|
+
engine: jsEngine.createJavaScriptRegexEngine({
|
|
99
|
+
regexConstructor: (pattern: string) =>
|
|
100
|
+
withNamedGroupMatchAll(() => jsEngine.defaultJavaScriptRegexConstructor(pattern)),
|
|
101
|
+
}),
|
|
89
102
|
}),
|
|
90
103
|
);
|
|
91
104
|
}
|
|
@@ -119,6 +132,8 @@ export async function highlightCode(
|
|
|
119
132
|
const result = highlighter.codeToTokens(code, {
|
|
120
133
|
lang: lang as any,
|
|
121
134
|
theme: theme as any,
|
|
135
|
+
tokenizeTimeLimit,
|
|
136
|
+
tokenizeMaxLineLength,
|
|
122
137
|
});
|
|
123
138
|
return result.tokens.map((line: any[]) =>
|
|
124
139
|
line.map((token) => ({
|