@k2b/ui 0.59.0 → 0.61.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/dist/browser/actions/CommandList.js +67 -74
- package/dist/browser/actions/CommandList.js.map +1 -1
- package/dist/browser/actions/ContextMenu.js +11 -2
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/Dropdown.js +187 -169
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/GestureMenu.js +18 -7
- package/dist/browser/actions/GestureMenu.js.map +1 -1
- package/dist/browser/actions/SelectionAction.js +232 -0
- package/dist/browser/actions/SelectionAction.js.map +1 -0
- package/dist/browser/actions/command-items.js.map +1 -1
- package/dist/browser/actions/index.js +1 -0
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/actions/menu-sheet-open.js +19 -0
- package/dist/browser/actions/menu-sheet-open.js.map +1 -0
- package/dist/browser/charts/core/line-details.js +2 -2
- package/dist/browser/charts/core/line-details.js.map +1 -1
- package/dist/browser/charts/core/render.js +2 -1
- package/dist/browser/charts/core/render.js.map +1 -1
- package/dist/browser/chat/ChatActivityWords.js +142 -0
- package/dist/browser/chat/ChatActivityWords.js.map +1 -0
- package/dist/browser/chat/ChatComposer.js +540 -515
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/ChatComposerQuotes.js +56 -0
- package/dist/browser/chat/ChatComposerQuotes.js.map +1 -0
- package/dist/browser/chat/ChatPrimitives.js +440 -389
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/chat/ChatTasks.js +78 -73
- package/dist/browser/chat/ChatTasks.js.map +1 -1
- package/dist/browser/chat/ChatTimeline.js +3 -0
- package/dist/browser/chat/ChatTimeline.js.map +1 -1
- package/dist/browser/chat/index.js +4 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/content/ActivityList.js +789 -0
- package/dist/browser/content/ActivityList.js.map +1 -0
- package/dist/browser/content/DataTableTools.js +3 -0
- package/dist/browser/content/DataTableTools.js.map +1 -1
- package/dist/browser/content/Lightbox.js +33 -11
- package/dist/browser/content/Lightbox.js.map +1 -1
- package/dist/browser/content/MessageQuote.js +57 -0
- package/dist/browser/content/MessageQuote.js.map +1 -0
- package/dist/browser/content/MessageRow.js +413 -391
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/PdfPages.js +26 -1
- package/dist/browser/content/PdfPages.js.map +1 -1
- package/dist/browser/content/RunLog.js +719 -0
- package/dist/browser/content/RunLog.js.map +1 -0
- package/dist/browser/content/VirtualFeed.js +29 -2
- package/dist/browser/content/VirtualFeed.js.map +1 -1
- package/dist/browser/content/activity-messages.js +47 -0
- package/dist/browser/content/activity-messages.js.map +1 -0
- package/dist/browser/content/activity-timeline.js +144 -0
- package/dist/browser/content/activity-timeline.js.map +1 -0
- package/dist/browser/content/chart-time-calendar.js +12 -18
- package/dist/browser/content/chart-time-calendar.js.map +1 -1
- package/dist/browser/content/find-text.js +47 -0
- package/dist/browser/content/find-text.js.map +1 -0
- package/dist/browser/content/index.js +2 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/content/quote-messages.js +25 -0
- package/dist/browser/content/quote-messages.js.map +1 -0
- package/dist/browser/content/run-log-messages.js +134 -0
- package/dist/browser/content/run-log-messages.js.map +1 -0
- package/dist/browser/feedback/dialog-core.js +118 -14
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/feedback/dialog-frame-motion.js +274 -0
- package/dist/browser/feedback/dialog-frame-motion.js.map +1 -0
- package/dist/browser/feedback/prompt-sheet-view.js +2 -1
- package/dist/browser/feedback/prompt-sheet-view.js.map +1 -1
- package/dist/browser/feedback/prompts.js +49 -53
- package/dist/browser/feedback/prompts.js.map +1 -1
- package/dist/browser/feedback/toast.js +11 -1
- package/dist/browser/feedback/toast.js.map +1 -1
- package/dist/browser/hover-card.js +6 -0
- package/dist/browser/hover-card.js.map +1 -0
- package/dist/browser/inputs/AutocompleteEditor.js +2 -1
- package/dist/browser/inputs/AutocompleteEditor.js.map +1 -1
- package/dist/browser/inputs/AutocompleteSelect.js +3 -12
- package/dist/browser/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/browser/inputs/ChoiceList.js +131 -127
- package/dist/browser/inputs/ChoiceList.js.map +1 -1
- package/dist/browser/inputs/Combobox.js +6 -15
- package/dist/browser/inputs/Combobox.js.map +1 -1
- package/dist/browser/inputs/MultiSelectInput.js +7 -16
- package/dist/browser/inputs/MultiSelectInput.js.map +1 -1
- package/dist/browser/inputs/PeriodPicker.js +475 -252
- package/dist/browser/inputs/PeriodPicker.js.map +1 -1
- package/dist/browser/inputs/RichSelect.js +431 -431
- package/dist/browser/inputs/RichSelect.js.map +1 -1
- package/dist/browser/inputs/Select.js +3 -12
- package/dist/browser/inputs/Select.js.map +1 -1
- package/dist/browser/inputs/SelectChip.js +1 -0
- package/dist/browser/inputs/SelectChip.js.map +1 -1
- package/dist/browser/inputs/TimeInput.js +181 -0
- package/dist/browser/inputs/TimeInput.js.map +1 -0
- package/dist/browser/inputs/choice.js.map +1 -1
- package/dist/browser/inputs/date-picker.js +2 -1
- package/dist/browser/inputs/date-picker.js.map +1 -1
- package/dist/browser/inputs/file-drop.js +2 -0
- package/dist/browser/inputs/file-drop.js.map +1 -1
- package/dist/browser/inputs/index.js +1 -0
- package/dist/browser/inputs/index.js.map +1 -1
- package/dist/browser/inputs/input-messages.js +20 -2
- package/dist/browser/inputs/input-messages.js.map +1 -1
- package/dist/browser/inputs/period-picker-messages.js +20 -2
- package/dist/browser/inputs/period-picker-messages.js.map +1 -1
- package/dist/browser/inputs/period.js +83 -0
- package/dist/browser/inputs/period.js.map +1 -1
- package/dist/browser/inputs/time-input.js +93 -0
- package/dist/browser/inputs/time-input.js.map +1 -0
- package/dist/browser/internal/exit-motion.js +23 -0
- package/dist/browser/internal/exit-motion.js.map +1 -0
- package/dist/browser/internal/option-description.js +47 -0
- package/dist/browser/internal/option-description.js.map +1 -0
- package/dist/browser/internal/scroll-places.js +15 -0
- package/dist/browser/internal/scroll-places.js.map +1 -0
- package/dist/browser/internal/step-row.js +78 -0
- package/dist/browser/internal/step-row.js.map +1 -0
- package/dist/browser/layout/AppWorkspace.js +572 -495
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/BottomSheet.js +2 -14
- package/dist/browser/layout/BottomSheet.js.map +1 -1
- package/dist/browser/layout/Navigation.js +7 -2
- package/dist/browser/layout/Navigation.js.map +1 -1
- package/dist/browser/layout/PullToRefresh.js +76 -23
- package/dist/browser/layout/PullToRefresh.js.map +1 -1
- package/dist/browser/layout/SidebarSwitcher.js +28 -37
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +5 -1
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/bottom-sheet-load.js +17 -0
- package/dist/browser/layout/bottom-sheet-load.js.map +1 -0
- package/dist/browser/layout/bottom-sheet-options.js +27 -0
- package/dist/browser/layout/bottom-sheet-options.js.map +1 -0
- package/dist/browser/layout/index.js +2 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/refresh-messages.js +4 -2
- package/dist/browser/layout/refresh-messages.js.map +1 -1
- package/dist/browser/layout/sheet-motion.js +10 -11
- package/dist/browser/layout/sheet-motion.js.map +1 -1
- package/dist/browser/layout/sidebar-scroll-memory.js +30 -0
- package/dist/browser/layout/sidebar-scroll-memory.js.map +1 -1
- package/dist/browser/surfaces/AvatarStack.js +59 -43
- package/dist/browser/surfaces/AvatarStack.js.map +1 -1
- package/dist/browser/surfaces/LinkCard.js.map +1 -1
- package/dist/browser/surfaces/Section.js +4 -2
- package/dist/browser/surfaces/Section.js.map +1 -1
- package/dist/browser/surfaces/StatCell.js +56 -28
- package/dist/browser/surfaces/StatCell.js.map +1 -1
- package/dist/browser/surfaces/StatGrid.js +17 -8
- package/dist/browser/surfaces/StatGrid.js.map +1 -1
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/ssr/actions/CommandList.js +23 -26
- package/dist/ssr/actions/CommandList.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +8 -2
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +79 -55
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/GestureMenu.js +18 -7
- package/dist/ssr/actions/GestureMenu.js.map +1 -1
- package/dist/ssr/actions/SelectionAction.js +212 -0
- package/dist/ssr/actions/SelectionAction.js.map +1 -0
- package/dist/ssr/actions/command-items.js.map +1 -1
- package/dist/ssr/actions/index.js +1 -0
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/actions/menu-sheet-open.js +19 -0
- package/dist/ssr/actions/menu-sheet-open.js.map +1 -0
- package/dist/ssr/charts/core/line-details.js +2 -2
- package/dist/ssr/charts/core/line-details.js.map +1 -1
- package/dist/ssr/charts/core/render.js +2 -1
- package/dist/ssr/charts/core/render.js.map +1 -1
- package/dist/ssr/chat/ChatActivityWords.js +126 -0
- package/dist/ssr/chat/ChatActivityWords.js.map +1 -0
- package/dist/ssr/chat/ChatComposer.js +24 -3
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/ChatComposerQuotes.js +26 -0
- package/dist/ssr/chat/ChatComposerQuotes.js.map +1 -0
- package/dist/ssr/chat/ChatPrimitives.js +121 -77
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/chat/ChatTasks.js +31 -16
- package/dist/ssr/chat/ChatTasks.js.map +1 -1
- package/dist/ssr/chat/ChatTimeline.js +3 -0
- package/dist/ssr/chat/ChatTimeline.js.map +1 -1
- package/dist/ssr/chat/index.js +4 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/content/ActivityList.js +553 -0
- package/dist/ssr/content/ActivityList.js.map +1 -0
- package/dist/ssr/content/DataTableTools.js +3 -0
- package/dist/ssr/content/DataTableTools.js.map +1 -1
- package/dist/ssr/content/Lightbox.js +33 -11
- package/dist/ssr/content/Lightbox.js.map +1 -1
- package/dist/ssr/content/MessageQuote.js +36 -0
- package/dist/ssr/content/MessageQuote.js.map +1 -0
- package/dist/ssr/content/MessageRow.js +112 -95
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/PdfPages.js +26 -1
- package/dist/ssr/content/PdfPages.js.map +1 -1
- package/dist/ssr/content/RunLog.js +471 -0
- package/dist/ssr/content/RunLog.js.map +1 -0
- package/dist/ssr/content/VirtualFeed.js +29 -2
- package/dist/ssr/content/VirtualFeed.js.map +1 -1
- package/dist/ssr/content/activity-messages.js +47 -0
- package/dist/ssr/content/activity-messages.js.map +1 -0
- package/dist/ssr/content/activity-timeline.js +144 -0
- package/dist/ssr/content/activity-timeline.js.map +1 -0
- package/dist/ssr/content/chart-time-calendar.js +12 -18
- package/dist/ssr/content/chart-time-calendar.js.map +1 -1
- package/dist/ssr/content/find-text.js +47 -0
- package/dist/ssr/content/find-text.js.map +1 -0
- package/dist/ssr/content/index.js +2 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/content/quote-messages.js +25 -0
- package/dist/ssr/content/quote-messages.js.map +1 -0
- package/dist/ssr/content/run-log-messages.js +134 -0
- package/dist/ssr/content/run-log-messages.js.map +1 -0
- package/dist/ssr/feedback/dialog-core.js +118 -14
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/feedback/dialog-frame-motion.js +274 -0
- package/dist/ssr/feedback/dialog-frame-motion.js.map +1 -0
- package/dist/ssr/feedback/prompt-sheet-view.js +2 -1
- package/dist/ssr/feedback/prompt-sheet-view.js.map +1 -1
- package/dist/ssr/feedback/prompts.js +16 -16
- package/dist/ssr/feedback/prompts.js.map +1 -1
- package/dist/ssr/feedback/toast.js +11 -1
- package/dist/ssr/feedback/toast.js.map +1 -1
- package/dist/ssr/hover-card.js +6 -0
- package/dist/ssr/hover-card.js.map +1 -0
- package/dist/ssr/inputs/AutocompleteEditor.js +2 -1
- package/dist/ssr/inputs/AutocompleteEditor.js.map +1 -1
- package/dist/ssr/inputs/AutocompleteSelect.js +3 -8
- package/dist/ssr/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/ssr/inputs/ChoiceList.js +25 -25
- package/dist/ssr/inputs/ChoiceList.js.map +1 -1
- package/dist/ssr/inputs/Combobox.js +4 -9
- package/dist/ssr/inputs/Combobox.js.map +1 -1
- package/dist/ssr/inputs/MultiSelectInput.js +4 -9
- package/dist/ssr/inputs/MultiSelectInput.js.map +1 -1
- package/dist/ssr/inputs/PeriodPicker.js +241 -46
- package/dist/ssr/inputs/PeriodPicker.js.map +1 -1
- package/dist/ssr/inputs/RichSelect.js +135 -121
- package/dist/ssr/inputs/RichSelect.js.map +1 -1
- package/dist/ssr/inputs/Select.js +3 -8
- package/dist/ssr/inputs/Select.js.map +1 -1
- package/dist/ssr/inputs/SelectChip.js +1 -0
- package/dist/ssr/inputs/SelectChip.js.map +1 -1
- package/dist/ssr/inputs/TimeInput.js +145 -0
- package/dist/ssr/inputs/TimeInput.js.map +1 -0
- package/dist/ssr/inputs/choice.js.map +1 -1
- package/dist/ssr/inputs/date-picker.js +2 -1
- package/dist/ssr/inputs/date-picker.js.map +1 -1
- package/dist/ssr/inputs/file-drop.js +2 -0
- package/dist/ssr/inputs/file-drop.js.map +1 -1
- package/dist/ssr/inputs/index.js +1 -0
- package/dist/ssr/inputs/index.js.map +1 -1
- package/dist/ssr/inputs/input-messages.js +20 -2
- package/dist/ssr/inputs/input-messages.js.map +1 -1
- package/dist/ssr/inputs/period-picker-messages.js +20 -2
- package/dist/ssr/inputs/period-picker-messages.js.map +1 -1
- package/dist/ssr/inputs/period.js +83 -0
- package/dist/ssr/inputs/period.js.map +1 -1
- package/dist/ssr/inputs/time-input.js +93 -0
- package/dist/ssr/inputs/time-input.js.map +1 -0
- package/dist/ssr/internal/exit-motion.js +23 -0
- package/dist/ssr/internal/exit-motion.js.map +1 -0
- package/dist/ssr/internal/option-description.js +27 -0
- package/dist/ssr/internal/option-description.js.map +1 -0
- package/dist/ssr/internal/scroll-places.js +15 -0
- package/dist/ssr/internal/scroll-places.js.map +1 -0
- package/dist/ssr/internal/step-row.js +35 -0
- package/dist/ssr/internal/step-row.js.map +1 -0
- package/dist/ssr/layout/AppWorkspace.js +191 -121
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/BottomSheet.js +2 -14
- package/dist/ssr/layout/BottomSheet.js.map +1 -1
- package/dist/ssr/layout/Navigation.js +7 -2
- package/dist/ssr/layout/Navigation.js.map +1 -1
- package/dist/ssr/layout/PullToRefresh.js +67 -16
- package/dist/ssr/layout/PullToRefresh.js.map +1 -1
- package/dist/ssr/layout/SidebarSwitcher.js +8 -13
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +5 -1
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/bottom-sheet-load.js +17 -0
- package/dist/ssr/layout/bottom-sheet-load.js.map +1 -0
- package/dist/ssr/layout/bottom-sheet-options.js +27 -0
- package/dist/ssr/layout/bottom-sheet-options.js.map +1 -0
- package/dist/ssr/layout/index.js +2 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/refresh-messages.js +4 -2
- package/dist/ssr/layout/refresh-messages.js.map +1 -1
- package/dist/ssr/layout/sheet-motion.js +10 -11
- package/dist/ssr/layout/sheet-motion.js.map +1 -1
- package/dist/ssr/layout/sidebar-scroll-memory.js +30 -0
- package/dist/ssr/layout/sidebar-scroll-memory.js.map +1 -1
- package/dist/ssr/surfaces/AvatarStack.js +56 -40
- package/dist/ssr/surfaces/AvatarStack.js.map +1 -1
- package/dist/ssr/surfaces/LinkCard.js.map +1 -1
- package/dist/ssr/surfaces/Section.js +4 -2
- package/dist/ssr/surfaces/Section.js.map +1 -1
- package/dist/ssr/surfaces/StatCell.js +24 -12
- package/dist/ssr/surfaces/StatCell.js.map +1 -1
- package/dist/ssr/surfaces/StatGrid.js +12 -6
- package/dist/ssr/surfaces/StatGrid.js.map +1 -1
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/Dropdown.d.ts +10 -0
- package/dist/types/actions/SelectionAction.d.ts +34 -0
- package/dist/types/actions/command-items.d.ts +5 -0
- package/dist/types/actions/index.d.ts +2 -0
- package/dist/types/actions/menu-sheet-open.d.ts +13 -0
- package/dist/types/charts/core/line-details.d.ts +1 -1
- package/dist/types/chat/ChatActivityWords.d.ts +31 -0
- package/dist/types/chat/ChatComposer.d.ts +17 -1
- package/dist/types/chat/ChatComposerQuotes.d.ts +10 -0
- package/dist/types/chat/ChatPrimitives.d.ts +23 -1
- package/dist/types/chat/ChatTimeline.d.ts +2 -0
- package/dist/types/chat/index.d.ts +6 -2
- package/dist/types/content/ActivityList.d.ts +166 -0
- package/dist/types/content/DataTableTools.d.ts +2 -0
- package/dist/types/content/Lightbox.d.ts +7 -5
- package/dist/types/content/MessageQuote.d.ts +9 -0
- package/dist/types/content/MessageRow.d.ts +5 -0
- package/dist/types/content/RunLog.d.ts +53 -0
- package/dist/types/content/VirtualFeed.d.ts +6 -0
- package/dist/types/content/activity-messages.d.ts +22 -0
- package/dist/types/content/activity-timeline.d.ts +52 -0
- package/dist/types/content/chart-time-calendar.d.ts +6 -0
- package/dist/types/content/find-text.d.ts +10 -0
- package/dist/types/content/index.d.ts +2 -0
- package/dist/types/content/quote-messages.d.ts +6 -0
- package/dist/types/content/run-log-messages.d.ts +61 -0
- package/dist/types/feedback/dialog-core.d.ts +2 -0
- package/dist/types/feedback/dialog-frame-motion.d.ts +37 -0
- package/dist/types/feedback/prompts.d.ts +5 -0
- package/dist/types/feedback/toast.d.ts +9 -1
- package/dist/types/hover-card.d.ts +5 -0
- package/dist/types/inputs/ChoiceList.d.ts +12 -5
- package/dist/types/inputs/Combobox.d.ts +5 -0
- package/dist/types/inputs/MultiSelectInput.d.ts +1 -0
- package/dist/types/inputs/PeriodPicker.d.ts +10 -0
- package/dist/types/inputs/RichSelect.d.ts +5 -0
- package/dist/types/inputs/Select.d.ts +1 -0
- package/dist/types/inputs/SelectChip.d.ts +5 -0
- package/dist/types/inputs/TimeInput.d.ts +16 -0
- package/dist/types/inputs/choice.d.ts +6 -1
- package/dist/types/inputs/index.d.ts +2 -0
- package/dist/types/inputs/input-messages.d.ts +9 -0
- package/dist/types/inputs/period-picker-messages.d.ts +9 -0
- package/dist/types/inputs/period.d.ts +41 -0
- package/dist/types/inputs/time-input.d.ts +43 -0
- package/dist/types/internal/exit-motion.d.ts +10 -0
- package/dist/types/internal/option-description.d.ts +20 -0
- package/dist/types/internal/scroll-places.d.ts +2 -0
- package/dist/types/internal/step-row.d.ts +19 -0
- package/dist/types/layout/AppWorkspace.d.ts +10 -0
- package/dist/types/layout/BottomSheet.d.ts +1 -14
- package/dist/types/layout/PullToRefresh.d.ts +2 -2
- package/dist/types/layout/SidebarSwitcher.d.ts +5 -0
- package/dist/types/layout/bottom-sheet-load.d.ts +9 -0
- package/dist/types/layout/bottom-sheet-options.d.ts +18 -0
- package/dist/types/layout/index.d.ts +3 -2
- package/dist/types/layout/refresh-messages.d.ts +1 -0
- package/dist/types/layout/sheet-motion.d.ts +0 -5
- package/dist/types/layout/sidebar-scroll-memory.d.ts +6 -0
- package/dist/types/surfaces/LinkCard.d.ts +2 -1
- package/dist/types/surfaces/StatCell.d.ts +7 -2
- package/dist/types/surfaces/StatGrid.d.ts +15 -3
- package/dist/types/surfaces/index.d.ts +1 -1
- package/package.json +17 -8
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
2
|
+
import { ssr as _$ssr } from "solid-js/web";
|
|
3
|
+
import { memo as _$memo } from "solid-js/web";
|
|
4
|
+
import { ssrAttribute as _$ssrAttribute } from "solid-js/web";
|
|
5
|
+
import { escape as _$escape } from "solid-js/web";
|
|
6
|
+
var _tmpl$ = ["<i", "></i>"],
|
|
7
|
+
_tmpl$2 = ["<span class=\"k2b-run-log__mark\"", " aria-hidden=\"true\">", "</span>"],
|
|
8
|
+
_tmpl$3 = "<span class=\"k2b-run-log__pip\"></span>",
|
|
9
|
+
_tmpl$4 = ["<li class=\"k2b-run-log__step\"", ">", "</li>"],
|
|
10
|
+
_tmpl$5 = ["<span class=\"k2b-run-log__name\"", ">", "</span>"],
|
|
11
|
+
_tmpl$6 = "<i class=\"ti ti-info-circle\" aria-hidden=\"true\"></i>",
|
|
12
|
+
_tmpl$7 = ["<span>", "</span>"],
|
|
13
|
+
_tmpl$8 = "<i class=\"ti ti-dots\" aria-hidden=\"true\"></i>",
|
|
14
|
+
_tmpl$9 = ["<div class=\"k2b-run-log__more-actions\">", "</div>"],
|
|
15
|
+
_tmpl$0 = ["<div class=\"k2b-run-log__actions\"", "><div class=\"k2b-run-log__inline-actions\">", "</div>", "</div>"],
|
|
16
|
+
_tmpl$1 = ["<i", " aria-hidden=\"true\"></i>"],
|
|
17
|
+
_tmpl$10 = "<i class=\"ti ti-chevron-down k2b-run-log__chevron\" aria-hidden=\"true\"></i>",
|
|
18
|
+
_tmpl$11 = ["<button type=\"button\" class=\"k2b-run-log__toggle\"", "></button>"],
|
|
19
|
+
_tmpl$12 = ["<li class=\"k2b-run-log__earlier\"><button type=\"button\">", "<span>", "</span></button></li>"],
|
|
20
|
+
_tmpl$13 = ["<ol class=\"k2b-run-log__steps\">", "", "</ol>"],
|
|
21
|
+
_tmpl$14 = ["<button type=\"button\" class=\"k2b-run-log__output-toggle\"", "><i class=\"ti ti-chevron-right\" aria-hidden=\"true\"></i><span>", "</span><span class=\"k2b-run-log__counts\">", "</span></button>"],
|
|
22
|
+
_tmpl$15 = ["<button type=\"button\" class=\"k2b-run-log__older\"", ">", "</button>"],
|
|
23
|
+
_tmpl$16 = ["<div class=\"k2b-run-log__fold\"", "", "><div class=\"k2b-run-log__clip\"><div class=\"k2b-run-log__output\" role=\"log\" aria-live=\"off\"", " tabindex=\"0\">", "", "</div></div></div>"],
|
|
24
|
+
_tmpl$17 = ["<section class=\"", "\"", "><header class=\"k2b-run-log__head\"><span class=\"k2b-run-log__head-icon\" aria-hidden=\"true\">", "</span><span class=\"k2b-sr-only\" role=\"status\">", "</span><span class=\"k2b-run-log__main\"", ">", "</span><span class=\"k2b-run-log__meta\">", "</span>", "", "</header><div class=\"k2b-run-log__fold\"", "", "><div class=\"k2b-run-log__clip\">", "</div></div></section>"],
|
|
25
|
+
_tmpl$18 = "<span aria-hidden=\"true\">▸ </span>",
|
|
26
|
+
_tmpl$19 = ["<i", " role=\"img\"", "></i>"],
|
|
27
|
+
_tmpl$20 = ["<div class=\"k2b-run-log__line\"", "><time", ">", "</time><span>", "", "", "</span></div>"];
|
|
28
|
+
import { text } from "@k2b/stdlib";
|
|
29
|
+
import { createEffect, createMemo, createSignal, createUniqueId, Show } from "solid-js";
|
|
30
|
+
import { Button, ButtonLink } from "../actions/Button";
|
|
31
|
+
import { Dropdown } from "../actions/Dropdown";
|
|
32
|
+
import { HoverCard } from "../feedback/HoverCard";
|
|
33
|
+
import { KeyedFor } from "../internal/keyed-for";
|
|
34
|
+
import { StepRowContent } from "../internal/step-row";
|
|
35
|
+
import { useLocale } from "../intl/locale";
|
|
36
|
+
import { useRunLogMessages } from "./run-log-messages";
|
|
37
|
+
const isStep = entry => entry.kind === "step" && "label" in entry;
|
|
38
|
+
const isLog = entry => entry.kind === "log" && "text" in entry;
|
|
39
|
+
const clock = ms => {
|
|
40
|
+
const seconds = Math.floor(Math.max(0, Number.isFinite(ms) ? ms : 0) / 1000);
|
|
41
|
+
return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}`;
|
|
42
|
+
};
|
|
43
|
+
const stepDuration = (step, locale) => {
|
|
44
|
+
if (!step.startedAt || !step.endedAt) return undefined;
|
|
45
|
+
const duration = Date.parse(step.endedAt) - Date.parse(step.startedAt);
|
|
46
|
+
return Number.isFinite(duration) && duration >= 0 ? text.pprintDurationMs(duration, {
|
|
47
|
+
locale
|
|
48
|
+
}) : undefined;
|
|
49
|
+
};
|
|
50
|
+
const atTime = (at, formatter) => {
|
|
51
|
+
const date = new Date(at);
|
|
52
|
+
return Number.isFinite(date.getTime()) ? formatter.format(date) : at;
|
|
53
|
+
};
|
|
54
|
+
const headIcons = {
|
|
55
|
+
idle: "ti ti-circle-dashed",
|
|
56
|
+
starting: "ti ti-loader-2 k2b-spin",
|
|
57
|
+
running: "ti ti-player-play",
|
|
58
|
+
succeeded: "ti ti-circle-check",
|
|
59
|
+
failed: "ti ti-alert-circle"
|
|
60
|
+
};
|
|
61
|
+
const markIcons = {
|
|
62
|
+
pending: "",
|
|
63
|
+
running: "",
|
|
64
|
+
succeeded: "ti ti-check",
|
|
65
|
+
failed: "ti ti-x",
|
|
66
|
+
skipped: "ti ti-minus"
|
|
67
|
+
};
|
|
68
|
+
// The approved many-step example keeps five rows and a navigation row in a fixed window.
|
|
69
|
+
const VISIBLE_STEPS = 5;
|
|
70
|
+
function StepMark(props) {
|
|
71
|
+
return _$ssr(_tmpl$2, _$ssrAttribute("data-status", _$escape(props.status, true), false), _$escape(_$createComponent(Show, {
|
|
72
|
+
get when() {
|
|
73
|
+
return markIcons[props.status] || props.icon;
|
|
74
|
+
},
|
|
75
|
+
get fallback() {
|
|
76
|
+
return _$ssr(_tmpl$3);
|
|
77
|
+
},
|
|
78
|
+
get children() {
|
|
79
|
+
return _$ssr(_tmpl$, _$ssrAttribute("class", _$escape(markIcons[props.status] || props.icon, true), false));
|
|
80
|
+
}
|
|
81
|
+
})));
|
|
82
|
+
}
|
|
83
|
+
function RunStep(props) {
|
|
84
|
+
const t = useRunLogMessages();
|
|
85
|
+
const locale = useLocale();
|
|
86
|
+
const status = () => props.state === "succeeded" && props.step.status === "pending" ? "skipped" : props.step.status;
|
|
87
|
+
const statusLabel = () => ({
|
|
88
|
+
pending: t().pending,
|
|
89
|
+
running: t().active,
|
|
90
|
+
succeeded: t().completed,
|
|
91
|
+
failed: t().stepFailed,
|
|
92
|
+
skipped: t().skipped
|
|
93
|
+
})[status()];
|
|
94
|
+
return _$ssr(_tmpl$4, _$ssrAttribute("data-status", _$escape(status(), true), false), _$escape(_$createComponent(StepRowContent, {
|
|
95
|
+
classes: {
|
|
96
|
+
leading: "k2b-run-log__leading",
|
|
97
|
+
label: "k2b-run-log__label",
|
|
98
|
+
meta: "k2b-run-log__reason",
|
|
99
|
+
duration: "k2b-run-log__duration"
|
|
100
|
+
},
|
|
101
|
+
get leading() {
|
|
102
|
+
return _$createComponent(StepMark, {
|
|
103
|
+
get status() {
|
|
104
|
+
return status();
|
|
105
|
+
},
|
|
106
|
+
get icon() {
|
|
107
|
+
return props.step.icon;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
get label() {
|
|
112
|
+
return [_$ssr(_tmpl$5, _$ssrAttribute("title", _$escape(props.step.label, true), false), _$escape(props.step.label)), _$createComponent(Show, {
|
|
113
|
+
get when() {
|
|
114
|
+
return props.step.description;
|
|
115
|
+
},
|
|
116
|
+
children: description => _$createComponent(HoverCard.Trigger, {
|
|
117
|
+
type: "button",
|
|
118
|
+
triggerClass: "k2b-run-log__info",
|
|
119
|
+
get content() {
|
|
120
|
+
return description();
|
|
121
|
+
},
|
|
122
|
+
get ["aria-label"]() {
|
|
123
|
+
return t().details({
|
|
124
|
+
label: props.step.label
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
get children() {
|
|
128
|
+
return _$ssr(_tmpl$6);
|
|
129
|
+
}
|
|
130
|
+
})
|
|
131
|
+
})];
|
|
132
|
+
},
|
|
133
|
+
get meta() {
|
|
134
|
+
return _$createComponent(Show, {
|
|
135
|
+
get when() {
|
|
136
|
+
return props.step.message;
|
|
137
|
+
},
|
|
138
|
+
children: message => _$createComponent(HoverCard.Trigger, {
|
|
139
|
+
type: "button",
|
|
140
|
+
triggerClass: "k2b-run-log__reason-button",
|
|
141
|
+
get content() {
|
|
142
|
+
return message();
|
|
143
|
+
},
|
|
144
|
+
get children() {
|
|
145
|
+
return _$ssr(_tmpl$7, _$escape(message()));
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
get duration() {
|
|
151
|
+
return _$memo(() => status() === "skipped")() ? t().skipped : stepDuration(props.step, locale());
|
|
152
|
+
},
|
|
153
|
+
get statusLabel() {
|
|
154
|
+
return statusLabel();
|
|
155
|
+
}
|
|
156
|
+
})));
|
|
157
|
+
}
|
|
158
|
+
function RunActions(props) {
|
|
159
|
+
const t = useRunLogMessages();
|
|
160
|
+
const items = () => props.actions.map(action => {
|
|
161
|
+
const base = {
|
|
162
|
+
label: action.label,
|
|
163
|
+
icon: action.icon,
|
|
164
|
+
description: action.disabledReason,
|
|
165
|
+
variant: action.primary ? "accent" : undefined
|
|
166
|
+
};
|
|
167
|
+
if (action.disabled || !action.href && !action.onClick) return {
|
|
168
|
+
...base,
|
|
169
|
+
disabled: true
|
|
170
|
+
};
|
|
171
|
+
if (action.href) return {
|
|
172
|
+
...base,
|
|
173
|
+
href: action.href,
|
|
174
|
+
action: action.onClick
|
|
175
|
+
};
|
|
176
|
+
return {
|
|
177
|
+
...base,
|
|
178
|
+
action: action.onClick
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
return _$ssr(_tmpl$0, _$ssrAttribute("data-multiple", props.actions.length > 1 ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(KeyedFor, {
|
|
182
|
+
get each() {
|
|
183
|
+
return props.actions;
|
|
184
|
+
},
|
|
185
|
+
by: action => action.label,
|
|
186
|
+
children: action => _$createComponent(Show, {
|
|
187
|
+
get when() {
|
|
188
|
+
return _$memo(() => !!action().href)() && !action().disabled;
|
|
189
|
+
},
|
|
190
|
+
get fallback() {
|
|
191
|
+
return _$createComponent(Button, {
|
|
192
|
+
size: "xs",
|
|
193
|
+
variant: "ghost",
|
|
194
|
+
"class": "k2b-run-log__action",
|
|
195
|
+
get ["data-primary"]() {
|
|
196
|
+
return action().primary ? "true" : undefined;
|
|
197
|
+
},
|
|
198
|
+
get disabled() {
|
|
199
|
+
return action().disabled || !action().onClick && !action().href;
|
|
200
|
+
},
|
|
201
|
+
get tooltip() {
|
|
202
|
+
return action().disabledReason;
|
|
203
|
+
},
|
|
204
|
+
onClick: () => action().onClick?.(),
|
|
205
|
+
get children() {
|
|
206
|
+
return [_$ssr(_tmpl$1, _$ssrAttribute("class", _$escape(action().icon, true), false)), _$ssr(_tmpl$7, _$escape(action().label))];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
get children() {
|
|
211
|
+
return _$createComponent(ButtonLink, {
|
|
212
|
+
size: "xs",
|
|
213
|
+
variant: "ghost",
|
|
214
|
+
"class": "k2b-run-log__action",
|
|
215
|
+
get ["data-primary"]() {
|
|
216
|
+
return action().primary ? "true" : undefined;
|
|
217
|
+
},
|
|
218
|
+
get href() {
|
|
219
|
+
return action().href;
|
|
220
|
+
},
|
|
221
|
+
onClick: () => action().onClick?.(),
|
|
222
|
+
get children() {
|
|
223
|
+
return [_$ssr(_tmpl$1, _$ssrAttribute("class", _$escape(action().icon, true), false)), _$ssr(_tmpl$7, _$escape(action().label))];
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
})
|
|
228
|
+
})), _$escape(_$createComponent(Show, {
|
|
229
|
+
get when() {
|
|
230
|
+
return props.actions.length > 1;
|
|
231
|
+
},
|
|
232
|
+
get children() {
|
|
233
|
+
return _$ssr(_tmpl$9, _$escape(_$createComponent(Dropdown.Root, {
|
|
234
|
+
get items() {
|
|
235
|
+
return items();
|
|
236
|
+
},
|
|
237
|
+
position: "bottom-right",
|
|
238
|
+
get children() {
|
|
239
|
+
return _$createComponent(Dropdown.Trigger, {
|
|
240
|
+
iconOnly: true,
|
|
241
|
+
size: "xs",
|
|
242
|
+
variant: "ghost",
|
|
243
|
+
"class": "k2b-run-log__action",
|
|
244
|
+
get label() {
|
|
245
|
+
return t().actions;
|
|
246
|
+
},
|
|
247
|
+
get title() {
|
|
248
|
+
return t().actions;
|
|
249
|
+
},
|
|
250
|
+
get children() {
|
|
251
|
+
return _$ssr(_tmpl$8);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
})));
|
|
256
|
+
}
|
|
257
|
+
})));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/** A run's steps and output. Presentation and disclosures only; the host owns execution, time, connection, and history. */
|
|
261
|
+
export function RunLog(props) {
|
|
262
|
+
const t = useRunLogMessages();
|
|
263
|
+
const locale = useLocale();
|
|
264
|
+
const time = createMemo(() => new Intl.DateTimeFormat(locale(), {
|
|
265
|
+
timeStyle: "medium"
|
|
266
|
+
}));
|
|
267
|
+
const bodyId = createUniqueId();
|
|
268
|
+
const outputId = createUniqueId();
|
|
269
|
+
const [expanded, setExpanded] = createSignal(false);
|
|
270
|
+
const [outputOpen, setOutputOpen] = createSignal(props.output === "open");
|
|
271
|
+
createEffect(() => setOutputOpen(props.output === "open"));
|
|
272
|
+
const [windowStart, setWindowStart] = createSignal();
|
|
273
|
+
const steps = createMemo(() => {
|
|
274
|
+
const rows = new Map();
|
|
275
|
+
for (const entry of props.entries) if (isStep(entry)) rows.set(entry.id, entry);
|
|
276
|
+
return [...rows.values()];
|
|
277
|
+
});
|
|
278
|
+
const logs = createMemo(() => props.entries.filter(isLog));
|
|
279
|
+
const outputLines = createMemo(() => {
|
|
280
|
+
const lines = [];
|
|
281
|
+
for (const step of steps()) {
|
|
282
|
+
if (step.startedAt) lines.push({
|
|
283
|
+
id: `step:${step.id}`,
|
|
284
|
+
at: step.startedAt,
|
|
285
|
+
level: "step",
|
|
286
|
+
text: step.label
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
for (const line of logs()) lines.push({
|
|
290
|
+
...line,
|
|
291
|
+
id: `log:${line.id}`
|
|
292
|
+
});
|
|
293
|
+
return lines.sort((a, b) => {
|
|
294
|
+
const delta = Date.parse(a.at) - Date.parse(b.at);
|
|
295
|
+
return Number.isFinite(delta) ? delta : 0;
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
// A known plan reserves its rows before execution; an empty open output reserves its band too.
|
|
299
|
+
const hasBody = () => steps().length > 0 || outputOpen() || props.state !== "idle" && props.state !== "starting";
|
|
300
|
+
const compact = () => props.size === "compact";
|
|
301
|
+
const visible = () => !compact() || expanded();
|
|
302
|
+
const current = () => steps().find(step => step.status === "running") ?? steps().find(step => step.status === "failed");
|
|
303
|
+
const lastStart = () => Math.max(0, steps().length - VISIBLE_STEPS);
|
|
304
|
+
const currentStart = () => current() ? Math.min(steps().indexOf(current()), lastStart()) : lastStart();
|
|
305
|
+
const start = () => Math.min(windowStart() ?? currentStart(), lastStart());
|
|
306
|
+
const browseSteps = () => {
|
|
307
|
+
if (start() > 0) setWindowStart(Math.max(0, start() - VISIBLE_STEPS));else setWindowStart(windowStart() === undefined ? lastStart() : undefined);
|
|
308
|
+
};
|
|
309
|
+
const stateLabel = () => ({
|
|
310
|
+
idle: t().idle,
|
|
311
|
+
starting: t().starting,
|
|
312
|
+
running: t().running,
|
|
313
|
+
succeeded: t().succeeded,
|
|
314
|
+
failed: t().failed
|
|
315
|
+
})[props.state];
|
|
316
|
+
const main = () => {
|
|
317
|
+
if (props.state === "running") return props.duration === undefined ? t().running : t().since({
|
|
318
|
+
duration: clock(props.duration)
|
|
319
|
+
});
|
|
320
|
+
if (props.state === "succeeded") return props.duration === undefined ? t().succeeded : t().doneAfter({
|
|
321
|
+
duration: clock(props.duration)
|
|
322
|
+
});
|
|
323
|
+
if (props.state === "failed") return props.duration === undefined ? t().failed : t().failedAfter({
|
|
324
|
+
duration: clock(props.duration)
|
|
325
|
+
});
|
|
326
|
+
return props.state === "idle" ? t().idle : t().starting;
|
|
327
|
+
};
|
|
328
|
+
const compactMain = () => props.state === "running" || props.state === "failed" ? current()?.label ?? main() : props.state === "succeeded" ? t().succeeded : main();
|
|
329
|
+
const compactMeta = () => {
|
|
330
|
+
if (props.state === "running" && current()) return [t().progress({
|
|
331
|
+
current: steps().indexOf(current()) + 1,
|
|
332
|
+
count: steps().length
|
|
333
|
+
}), props.duration === undefined ? "" : clock(props.duration)].filter(Boolean).join(" · ");
|
|
334
|
+
if (props.state === "succeeded") return [steps().length === 1 ? t().step : t().steps({
|
|
335
|
+
count: steps().length
|
|
336
|
+
}), props.duration === undefined ? "" : clock(props.duration)].filter(Boolean).join(" · ");
|
|
337
|
+
if (props.state === "failed") return [t().stepFailed, props.duration === undefined ? "" : clock(props.duration)].filter(Boolean).join(" · ");
|
|
338
|
+
return props.meta;
|
|
339
|
+
};
|
|
340
|
+
const count = () => outputLines().length + (props.olderCount ?? 0);
|
|
341
|
+
const counts = () => {
|
|
342
|
+
if (!count()) return t().noLines;
|
|
343
|
+
const warnings = logs().filter(line => line.level === "warn").length;
|
|
344
|
+
const errors = logs().filter(line => line.level === "error").length;
|
|
345
|
+
return [count() === 1 ? t().line : t().lines({
|
|
346
|
+
count: count()
|
|
347
|
+
}), warnings ? warnings === 1 ? t().warning : t().warnings({
|
|
348
|
+
count: warnings
|
|
349
|
+
}) : "", errors ? errors === 1 ? t().error : t().errors({
|
|
350
|
+
count: errors
|
|
351
|
+
}) : ""].filter(Boolean).join(" · ");
|
|
352
|
+
};
|
|
353
|
+
let output;
|
|
354
|
+
let followOutput = true;
|
|
355
|
+
createEffect(() => {
|
|
356
|
+
outputLines();
|
|
357
|
+
if (props.state === "idle" || props.state === "starting") followOutput = true;
|
|
358
|
+
// Reading away from the end pauses following. New batches never scroll the page.
|
|
359
|
+
if (output && followOutput) output.scrollTop = output.scrollHeight;
|
|
360
|
+
});
|
|
361
|
+
return _$ssr(_tmpl$17, `k2b-run-log k2b-focus-inset ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-state", _$escape(props.state, true), false) + _$ssrAttribute("data-size", _$escape(props.size ?? "full", true), false) + _$ssrAttribute("data-expanded", visible() ? "true" : "false", false) + _$ssrAttribute("data-body", hasBody() ? "true" : "false", false) + _$ssrAttribute("aria-label", _$escape(props.label ?? t().run, true), false), _$escape(_$createComponent(Show, {
|
|
362
|
+
get when() {
|
|
363
|
+
return compact();
|
|
364
|
+
},
|
|
365
|
+
get fallback() {
|
|
366
|
+
return _$ssr(_tmpl$, _$ssrAttribute("class", _$escape(headIcons[props.state], true), false));
|
|
367
|
+
},
|
|
368
|
+
get children() {
|
|
369
|
+
return _$createComponent(StepMark, {
|
|
370
|
+
get status() {
|
|
371
|
+
return _$memo(() => props.state === "idle")() ? "pending" : _$memo(() => props.state === "starting")() ? "running" : props.state;
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
})), _$escape(stateLabel()), _$ssrAttribute("title", compact() && !expanded() ? _$escape(compactMain(), true) : _$escape(main(), true), false), compact() && !expanded() ? _$escape(compactMain()) : _$escape(main()), compact() && !expanded() ? _$escape(compactMeta()) : _$escape(props.meta), _$escape(_$createComponent(Show, {
|
|
376
|
+
get when() {
|
|
377
|
+
return props.actions?.length;
|
|
378
|
+
},
|
|
379
|
+
get children() {
|
|
380
|
+
return _$createComponent(RunActions, {
|
|
381
|
+
get actions() {
|
|
382
|
+
return props.actions;
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
})), _$escape(_$createComponent(Show, {
|
|
387
|
+
get when() {
|
|
388
|
+
return compact();
|
|
389
|
+
},
|
|
390
|
+
get children() {
|
|
391
|
+
return [_$ssr(_tmpl$10), _$ssr(_tmpl$11, _$ssrAttribute("aria-label", _$escape(t().toggle, true), false) + _$ssrAttribute("aria-expanded", _$escape(expanded(), true), false) + _$ssrAttribute("aria-controls", _$escape(bodyId, true), false))];
|
|
392
|
+
}
|
|
393
|
+
})), _$ssrAttribute("id", _$escape(bodyId, true), false) + _$ssrAttribute("data-open", visible() ? "true" : "false", false), _$ssrAttribute("inert", !visible(), true) + _$ssrAttribute("aria-hidden", !visible(), false), _$escape(_$createComponent(Show, {
|
|
394
|
+
get when() {
|
|
395
|
+
return hasBody();
|
|
396
|
+
},
|
|
397
|
+
get children() {
|
|
398
|
+
return [_$createComponent(Show, {
|
|
399
|
+
get when() {
|
|
400
|
+
return steps().length;
|
|
401
|
+
},
|
|
402
|
+
get children() {
|
|
403
|
+
return _$ssr(_tmpl$13, _$escape(_$createComponent(Show, {
|
|
404
|
+
get when() {
|
|
405
|
+
return steps().length > VISIBLE_STEPS;
|
|
406
|
+
},
|
|
407
|
+
get children() {
|
|
408
|
+
return _$ssr(_tmpl$12, _$escape(_$createComponent(StepMark, {
|
|
409
|
+
status: "succeeded"
|
|
410
|
+
})), start() ? _$escape(t().earlier({
|
|
411
|
+
count: start()
|
|
412
|
+
})) : windowStart() === undefined ? _$escape(t().later({
|
|
413
|
+
count: lastStart()
|
|
414
|
+
})) : _$escape(t().current));
|
|
415
|
+
}
|
|
416
|
+
})), _$escape(_$createComponent(KeyedFor, {
|
|
417
|
+
get each() {
|
|
418
|
+
return steps().slice(start(), start() + VISIBLE_STEPS);
|
|
419
|
+
},
|
|
420
|
+
by: step => step.id,
|
|
421
|
+
children: step => _$createComponent(RunStep, {
|
|
422
|
+
get step() {
|
|
423
|
+
return step();
|
|
424
|
+
},
|
|
425
|
+
get state() {
|
|
426
|
+
return props.state;
|
|
427
|
+
}
|
|
428
|
+
})
|
|
429
|
+
})));
|
|
430
|
+
}
|
|
431
|
+
}), _$createComponent(Show, {
|
|
432
|
+
get when() {
|
|
433
|
+
return props.output !== "hidden";
|
|
434
|
+
},
|
|
435
|
+
get children() {
|
|
436
|
+
return [_$ssr(_tmpl$14, _$ssrAttribute("aria-expanded", _$escape(outputOpen(), true), false) + _$ssrAttribute("aria-controls", _$escape(outputId, true), false), _$escape(t().output), _$escape(counts())), _$ssr(_tmpl$16, _$ssrAttribute("id", _$escape(outputId, true), false) + _$ssrAttribute("data-open", outputOpen() ? "true" : "false", false), _$ssrAttribute("inert", !outputOpen(), true) + _$ssrAttribute("aria-hidden", !outputOpen(), false), _$ssrAttribute("aria-label", _$escape(t().output, true), false), _$escape(_$createComponent(Show, {
|
|
437
|
+
get when() {
|
|
438
|
+
return props.olderCount;
|
|
439
|
+
},
|
|
440
|
+
get children() {
|
|
441
|
+
return _$ssr(_tmpl$15, _$ssrAttribute("disabled", !props.onLoadOlder, true), _$escape(t().older({
|
|
442
|
+
count: props.olderCount
|
|
443
|
+
})));
|
|
444
|
+
}
|
|
445
|
+
})), _$escape(_$createComponent(KeyedFor, {
|
|
446
|
+
get each() {
|
|
447
|
+
return outputLines();
|
|
448
|
+
},
|
|
449
|
+
by: line => line.id,
|
|
450
|
+
children: line => _$ssr(_tmpl$20, _$ssrAttribute("data-level", _$escape(line().level, true), false), _$ssrAttribute("datetime", _$escape(line().at, true), false), _$escape(atTime(line().at, time())), _$escape(_$createComponent(Show, {
|
|
451
|
+
get when() {
|
|
452
|
+
return line().level === "step";
|
|
453
|
+
},
|
|
454
|
+
get children() {
|
|
455
|
+
return _$ssr(_tmpl$18);
|
|
456
|
+
}
|
|
457
|
+
})), _$escape(_$createComponent(Show, {
|
|
458
|
+
get when() {
|
|
459
|
+
return line().level === "warn" || line().level === "error";
|
|
460
|
+
},
|
|
461
|
+
get children() {
|
|
462
|
+
return [_$ssr(_tmpl$19, _$ssrAttribute("class", line().level === "warn" ? "ti ti-alert-triangle" : "ti ti-x", false), _$ssrAttribute("aria-label", line().level === "warn" ? _$escape(t().warningLevel, true) : _$escape(t().errorLevel, true), false)), " "];
|
|
463
|
+
}
|
|
464
|
+
})), _$escape(line().text))
|
|
465
|
+
})))];
|
|
466
|
+
}
|
|
467
|
+
})];
|
|
468
|
+
}
|
|
469
|
+
})));
|
|
470
|
+
}
|
|
471
|
+
//# sourceMappingURL=RunLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["content/RunLog.tsx"],"sourcesContent":["import { text } from \"@k2b/stdlib\";\nimport { createEffect, createMemo, createSignal, createUniqueId, type JSX, Show } from \"solid-js\";\nimport { Button, ButtonLink } from \"../actions/Button\";\nimport { Dropdown, type DropdownItem } from \"../actions/Dropdown\";\nimport { HoverCard } from \"../feedback/HoverCard\";\nimport { KeyedFor } from \"../internal/keyed-for\";\nimport { StepRowContent } from \"../internal/step-row\";\nimport { useLocale } from \"../intl/locale\";\nimport { useRunLogMessages } from \"./run-log-messages\";\n\nexport type RunLogState = \"idle\" | \"starting\" | \"running\" | \"succeeded\" | \"failed\";\nexport type RunLevel = \"info\" | \"warn\" | \"error\";\nexport type RunStepEntry = {\n kind: \"step\";\n id: string;\n at: string;\n label: string;\n /** Complete Tabler class, e.g. `ti ti-file-text`. */\n icon?: string;\n description?: string;\n status: \"pending\" | \"running\" | \"succeeded\" | \"failed\" | \"skipped\";\n startedAt?: string;\n endedAt?: string;\n message?: string;\n};\nexport type RunLogEntry = { kind: \"log\"; id: string; at: string; level: RunLevel; text: string };\nexport type RunEntry = RunStepEntry | RunLogEntry;\nexport type RunLogAction = {\n icon: string;\n label: string;\n onClick?: () => void;\n href?: string;\n primary?: boolean;\n disabled?: boolean;\n disabledReason?: string;\n};\nexport type RunLogProps = {\n state: RunLogState;\n /** Unknown kinds are ignored. Later step records with the same id replace the row in its original position. */\n entries: readonly (RunEntry | { kind: string })[];\n /** Milliseconds supplied by the host. No clock runs inside RunLog. */\n duration?: number;\n meta?: JSX.Element;\n size?: \"full\" | \"compact\";\n /** Initial disclosure state; a changed value also updates the disclosure. */\n output?: \"open\" | \"closed\" | \"hidden\";\n olderCount?: number;\n onLoadOlder?: () => void;\n actions?: readonly RunLogAction[];\n label?: string;\n class?: string;\n};\n\nconst isStep = (entry: RunLogProps[\"entries\"][number]): entry is RunStepEntry => entry.kind === \"step\" && \"label\" in entry;\nconst isLog = (entry: RunLogProps[\"entries\"][number]): entry is RunLogEntry => entry.kind === \"log\" && \"text\" in entry;\nconst clock = (ms: number) => {\n const seconds = Math.floor(Math.max(0, Number.isFinite(ms) ? ms : 0) / 1000);\n return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, \"0\")}`;\n};\nconst stepDuration = (step: RunStepEntry, locale: string) => {\n if (!step.startedAt || !step.endedAt) return undefined;\n const duration = Date.parse(step.endedAt) - Date.parse(step.startedAt);\n return Number.isFinite(duration) && duration >= 0 ? text.pprintDurationMs(duration, { locale }) : undefined;\n};\nconst atTime = (at: string, formatter: Intl.DateTimeFormat) => {\n const date = new Date(at);\n return Number.isFinite(date.getTime()) ? formatter.format(date) : at;\n};\nconst headIcons: Record<RunLogState, string> = {\n idle: \"ti ti-circle-dashed\",\n starting: \"ti ti-loader-2 k2b-spin\",\n running: \"ti ti-player-play\",\n succeeded: \"ti ti-circle-check\",\n failed: \"ti ti-alert-circle\",\n};\nconst markIcons = { pending: \"\", running: \"\", succeeded: \"ti ti-check\", failed: \"ti ti-x\", skipped: \"ti ti-minus\" };\n// The approved many-step example keeps five rows and a navigation row in a fixed window.\nconst VISIBLE_STEPS = 5;\n\nfunction StepMark(props: { status: RunStepEntry[\"status\"]; icon?: string }) {\n return (\n <span class=\"k2b-run-log__mark\" data-status={props.status} aria-hidden=\"true\">\n <Show when={markIcons[props.status] || props.icon} fallback={<span class=\"k2b-run-log__pip\" />}>\n <i class={markIcons[props.status] || props.icon} />\n </Show>\n </span>\n );\n}\n\nfunction RunStep(props: { step: RunStepEntry; state: RunLogState }) {\n const t = useRunLogMessages();\n const locale = useLocale();\n const status = () => (props.state === \"succeeded\" && props.step.status === \"pending\" ? \"skipped\" : props.step.status);\n const statusLabel = () =>\n ({ pending: t().pending, running: t().active, succeeded: t().completed, failed: t().stepFailed, skipped: t().skipped })[status()];\n return (\n <li class=\"k2b-run-log__step\" data-status={status()}>\n <StepRowContent\n classes={{\n leading: \"k2b-run-log__leading\",\n label: \"k2b-run-log__label\",\n meta: \"k2b-run-log__reason\",\n duration: \"k2b-run-log__duration\",\n }}\n leading={<StepMark status={status()} icon={props.step.icon} />}\n label={\n <>\n <span class=\"k2b-run-log__name\" title={props.step.label}>\n {props.step.label}\n </span>\n <Show when={props.step.description}>\n {(description) => (\n <HoverCard.Trigger\n type=\"button\"\n triggerClass=\"k2b-run-log__info\"\n content={description()}\n aria-label={t().details({ label: props.step.label })}\n >\n <i class=\"ti ti-info-circle\" aria-hidden=\"true\" />\n </HoverCard.Trigger>\n )}\n </Show>\n </>\n }\n meta={\n <Show when={props.step.message}>\n {(message) => (\n <HoverCard.Trigger type=\"button\" triggerClass=\"k2b-run-log__reason-button\" content={message()}>\n <span>{message()}</span>\n </HoverCard.Trigger>\n )}\n </Show>\n }\n duration={status() === \"skipped\" ? t().skipped : stepDuration(props.step, locale())}\n statusLabel={statusLabel()}\n />\n </li>\n );\n}\n\nfunction RunActions(props: { actions: readonly RunLogAction[] }) {\n const t = useRunLogMessages();\n const items = (): DropdownItem[] =>\n props.actions.map((action) => {\n const base = {\n label: action.label,\n icon: action.icon,\n description: action.disabledReason,\n variant: action.primary ? (\"accent\" as const) : undefined,\n };\n if (action.disabled || (!action.href && !action.onClick)) return { ...base, disabled: true };\n if (action.href) return { ...base, href: action.href, action: action.onClick };\n return { ...base, action: action.onClick! };\n });\n return (\n <div class=\"k2b-run-log__actions\" data-multiple={props.actions.length > 1 ? \"true\" : undefined}>\n <div class=\"k2b-run-log__inline-actions\">\n <KeyedFor each={props.actions} by={(action) => action.label}>\n {(action) => (\n <Show\n when={action().href && !action().disabled}\n fallback={\n <Button\n size=\"xs\"\n variant=\"ghost\"\n class=\"k2b-run-log__action\"\n data-primary={action().primary ? \"true\" : undefined}\n disabled={action().disabled || (!action().onClick && !action().href)}\n tooltip={action().disabledReason}\n onClick={() => action().onClick?.()}\n >\n <i class={action().icon} aria-hidden=\"true\" />\n <span>{action().label}</span>\n </Button>\n }\n >\n <ButtonLink\n size=\"xs\"\n variant=\"ghost\"\n class=\"k2b-run-log__action\"\n data-primary={action().primary ? \"true\" : undefined}\n href={action().href}\n onClick={() => action().onClick?.()}\n >\n <i class={action().icon} aria-hidden=\"true\" />\n <span>{action().label}</span>\n </ButtonLink>\n </Show>\n )}\n </KeyedFor>\n </div>\n <Show when={props.actions.length > 1}>\n <div class=\"k2b-run-log__more-actions\">\n <Dropdown.Root items={items()} position=\"bottom-right\">\n <Dropdown.Trigger iconOnly size=\"xs\" variant=\"ghost\" class=\"k2b-run-log__action\" label={t().actions} title={t().actions}>\n <i class=\"ti ti-dots\" aria-hidden=\"true\" />\n </Dropdown.Trigger>\n </Dropdown.Root>\n </div>\n </Show>\n </div>\n );\n}\n\n/** A run's steps and output. Presentation and disclosures only; the host owns execution, time, connection, and history. */\nexport function RunLog(props: RunLogProps): JSX.Element {\n const t = useRunLogMessages();\n const locale = useLocale();\n const time = createMemo(() => new Intl.DateTimeFormat(locale(), { timeStyle: \"medium\" }));\n const bodyId = createUniqueId();\n const outputId = createUniqueId();\n const [expanded, setExpanded] = createSignal(false);\n const [outputOpen, setOutputOpen] = createSignal(props.output === \"open\");\n createEffect(() => setOutputOpen(props.output === \"open\"));\n const [windowStart, setWindowStart] = createSignal<number>();\n const steps = createMemo(() => {\n const rows = new Map<string, RunStepEntry>();\n for (const entry of props.entries) if (isStep(entry)) rows.set(entry.id, entry);\n return [...rows.values()];\n });\n const logs = createMemo(() => props.entries.filter(isLog));\n const outputLines = createMemo(() => {\n const lines: { id: string; at: string; level: RunLevel | \"step\"; text: string }[] = [];\n for (const step of steps()) {\n if (step.startedAt) lines.push({ id: `step:${step.id}`, at: step.startedAt, level: \"step\", text: step.label });\n }\n for (const line of logs()) lines.push({ ...line, id: `log:${line.id}` });\n return lines.sort((a, b) => {\n const delta = Date.parse(a.at) - Date.parse(b.at);\n return Number.isFinite(delta) ? delta : 0;\n });\n });\n // A known plan reserves its rows before execution; an empty open output reserves its band too.\n const hasBody = () => steps().length > 0 || outputOpen() || (props.state !== \"idle\" && props.state !== \"starting\");\n const compact = () => props.size === \"compact\";\n const visible = () => !compact() || expanded();\n const current = () => steps().find((step) => step.status === \"running\") ?? steps().find((step) => step.status === \"failed\");\n const lastStart = () => Math.max(0, steps().length - VISIBLE_STEPS);\n const currentStart = () => (current() ? Math.min(steps().indexOf(current()!), lastStart()) : lastStart());\n const start = () => Math.min(windowStart() ?? currentStart(), lastStart());\n const browseSteps = () => {\n if (start() > 0) setWindowStart(Math.max(0, start() - VISIBLE_STEPS));\n else setWindowStart(windowStart() === undefined ? lastStart() : undefined);\n };\n const stateLabel = () =>\n ({ idle: t().idle, starting: t().starting, running: t().running, succeeded: t().succeeded, failed: t().failed })[props.state];\n const main = () => {\n if (props.state === \"running\") return props.duration === undefined ? t().running : t().since({ duration: clock(props.duration) });\n if (props.state === \"succeeded\")\n return props.duration === undefined ? t().succeeded : t().doneAfter({ duration: clock(props.duration) });\n if (props.state === \"failed\") return props.duration === undefined ? t().failed : t().failedAfter({ duration: clock(props.duration) });\n return props.state === \"idle\" ? t().idle : t().starting;\n };\n const compactMain = () =>\n props.state === \"running\" || props.state === \"failed\"\n ? (current()?.label ?? main())\n : props.state === \"succeeded\"\n ? t().succeeded\n : main();\n const compactMeta = () => {\n if (props.state === \"running\" && current())\n return [\n t().progress({ current: steps().indexOf(current()!) + 1, count: steps().length }),\n props.duration === undefined ? \"\" : clock(props.duration),\n ]\n .filter(Boolean)\n .join(\" · \");\n if (props.state === \"succeeded\")\n return [\n steps().length === 1 ? t().step : t().steps({ count: steps().length }),\n props.duration === undefined ? \"\" : clock(props.duration),\n ]\n .filter(Boolean)\n .join(\" · \");\n if (props.state === \"failed\")\n return [t().stepFailed, props.duration === undefined ? \"\" : clock(props.duration)].filter(Boolean).join(\" · \");\n return props.meta;\n };\n const count = () => outputLines().length + (props.olderCount ?? 0);\n const counts = () => {\n if (!count()) return t().noLines;\n const warnings = logs().filter((line) => line.level === \"warn\").length;\n const errors = logs().filter((line) => line.level === \"error\").length;\n return [\n count() === 1 ? t().line : t().lines({ count: count() }),\n warnings ? (warnings === 1 ? t().warning : t().warnings({ count: warnings })) : \"\",\n errors ? (errors === 1 ? t().error : t().errors({ count: errors })) : \"\",\n ]\n .filter(Boolean)\n .join(\" · \");\n };\n let output: HTMLDivElement | undefined;\n let followOutput = true;\n createEffect(() => {\n outputLines();\n if (props.state === \"idle\" || props.state === \"starting\") followOutput = true;\n // Reading away from the end pauses following. New batches never scroll the page.\n if (output && followOutput) output.scrollTop = output.scrollHeight;\n });\n return (\n <section\n class={`k2b-run-log k2b-focus-inset ${props.class ?? \"\"}`}\n data-state={props.state}\n data-size={props.size ?? \"full\"}\n data-expanded={visible() ? \"true\" : \"false\"}\n data-body={hasBody() ? \"true\" : \"false\"}\n aria-label={props.label ?? t().run}\n >\n <header class=\"k2b-run-log__head\">\n <span class=\"k2b-run-log__head-icon\" aria-hidden=\"true\">\n <Show when={compact()} fallback={<i class={headIcons[props.state]} />}>\n <StepMark status={props.state === \"idle\" ? \"pending\" : props.state === \"starting\" ? \"running\" : props.state} />\n </Show>\n </span>\n <span class=\"k2b-sr-only\" role=\"status\">\n {stateLabel()}\n </span>\n <span class=\"k2b-run-log__main\" title={compact() && !expanded() ? compactMain() : main()}>\n {compact() && !expanded() ? compactMain() : main()}\n </span>\n <span class=\"k2b-run-log__meta\">{compact() && !expanded() ? compactMeta() : props.meta}</span>\n <Show when={props.actions?.length}>\n <RunActions actions={props.actions!} />\n </Show>\n <Show when={compact()}>\n <i class=\"ti ti-chevron-down k2b-run-log__chevron\" aria-hidden=\"true\" />\n <button\n type=\"button\"\n class=\"k2b-run-log__toggle\"\n aria-label={t().toggle}\n aria-expanded={expanded()}\n aria-controls={bodyId}\n onClick={() => setExpanded(!expanded())}\n />\n </Show>\n </header>\n <div class=\"k2b-run-log__fold\" id={bodyId} data-open={visible() ? \"true\" : \"false\"} inert={!visible()} aria-hidden={!visible()}>\n <div class=\"k2b-run-log__clip\">\n <Show when={hasBody()}>\n <Show when={steps().length}>\n <ol class=\"k2b-run-log__steps\">\n <Show when={steps().length > VISIBLE_STEPS}>\n <li class=\"k2b-run-log__earlier\">\n <button type=\"button\" onClick={browseSteps}>\n <StepMark status=\"succeeded\" />\n <span>\n {start()\n ? t().earlier({ count: start() })\n : windowStart() === undefined\n ? t().later({ count: lastStart() })\n : t().current}\n </span>\n </button>\n </li>\n </Show>\n <KeyedFor each={steps().slice(start(), start() + VISIBLE_STEPS)} by={(step) => step.id}>\n {(step) => <RunStep step={step()} state={props.state} />}\n </KeyedFor>\n </ol>\n </Show>\n <Show when={props.output !== \"hidden\"}>\n <button\n type=\"button\"\n class=\"k2b-run-log__output-toggle\"\n aria-expanded={outputOpen()}\n aria-controls={outputId}\n onClick={() => setOutputOpen(!outputOpen())}\n >\n <i class=\"ti ti-chevron-right\" aria-hidden=\"true\" />\n <span>{t().output}</span>\n <span class=\"k2b-run-log__counts\">{counts()}</span>\n </button>\n <div\n class=\"k2b-run-log__fold\"\n id={outputId}\n data-open={outputOpen() ? \"true\" : \"false\"}\n inert={!outputOpen()}\n aria-hidden={!outputOpen()}\n >\n <div class=\"k2b-run-log__clip\">\n <div\n ref={output}\n class=\"k2b-run-log__output\"\n role=\"log\"\n aria-live=\"off\"\n aria-label={t().output}\n tabIndex={0}\n onScroll={(event) => {\n const node = event.currentTarget;\n followOutput = Math.ceil(node.scrollTop + node.clientHeight) >= node.scrollHeight;\n }}\n >\n <Show when={props.olderCount}>\n <button\n type=\"button\"\n class=\"k2b-run-log__older\"\n disabled={!props.onLoadOlder}\n onClick={() => {\n followOutput = false;\n props.onLoadOlder?.();\n }}\n >\n {t().older({ count: props.olderCount! })}\n </button>\n </Show>\n <KeyedFor each={outputLines()} by={(line) => line.id}>\n {(line) => (\n <div class=\"k2b-run-log__line\" data-level={line().level}>\n <time dateTime={line().at}>{atTime(line().at, time())}</time>\n <span>\n <Show when={line().level === \"step\"}>\n <span aria-hidden=\"true\">▸ </span>\n </Show>\n <Show when={line().level === \"warn\" || line().level === \"error\"}>\n <i\n class={line().level === \"warn\" ? \"ti ti-alert-triangle\" : \"ti ti-x\"}\n role=\"img\"\n aria-label={line().level === \"warn\" ? t().warningLevel : t().errorLevel}\n />{\" \"}\n </Show>\n {line().text}\n </span>\n </div>\n )}\n </KeyedFor>\n </div>\n </div>\n </div>\n </Show>\n </Show>\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,IAAI,QAAQ,aAAa;AAClC,SAAS,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAY,IAAI,QAAQ,UAAU;AACjG,SAAS,MAAM,EAAE,UAAU,QAAQ,mBAAmB;AACtD,SAAS,QAAQ,QAA2B,qBAAqB;AACjE,SAAS,SAAS,QAAQ,uBAAuB;AACjD,SAAS,QAAQ,QAAQ,uBAAuB;AAChD,SAAS,cAAc,QAAQ,sBAAsB;AACrD,SAAS,SAAS,QAAQ,gBAAgB;AAC1C,SAAS,iBAAiB,QAAQ,oBAAoB;AA6CtD,MAAM,MAAM,GAAI,KAAqC,IAA4B,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,OAAO,IAAI,KAAK;AAC1H,MAAM,KAAK,GAAI,KAAqC,IAA2B,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,MAAM,IAAI,KAAK;AACtH,MAAM,KAAK,GAAI,EAAU,IAAK;EAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;EAC5E,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;AAC/E,CAAC;AACD,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAE,MAAc,KAAK;EAC3D,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,C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AAC,CAAC,KAAK,KAAK,MAAM;cAAA;cAAA;gBAAA;cAAA;YAAA,gCAGlC,IAAI;cAAA,IAAC,IAAI;gBAAA,OAAE,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,OAAO;cAAA;cAAA;gBAAA,gDAEpD,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,GAAG,sBAAsB,GAAG,SAAS,uCAEvD,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,YAAG,CAAC,CAAC,CAAC,CAAC,YAAY,mBAAG,CAAC,CAAC,CAAC,CAAC,UAAU,kBACtE,GAAG;cAAA;YAAA,cAEP,IAAI,CAAC,CAAC,CAAC,IAAI;UAGjB;QAAA;MAAA;IAAA;EAAA;AAWvB","ignoreList":[]}
|
|
@@ -43,6 +43,8 @@ const VISIBLE_TOLERANCE = 1;
|
|
|
43
43
|
const MEASURE_PASSES = 4;
|
|
44
44
|
const ANNOUNCE_MS = 1_000;
|
|
45
45
|
const HIGHLIGHT_MS = 1_600;
|
|
46
|
+
/** The name of the CSS highlight that tints a passage found by `scrollToKey`'s `highlightText`. */
|
|
47
|
+
const PASSAGE_HIGHLIGHT = "k2b-virtual-feed-passage";
|
|
46
48
|
/** In engines without `scrollend`, the reader's scroll has ended after this long without moving. */
|
|
47
49
|
const QUIET_MS = 300;
|
|
48
50
|
/**
|
|
@@ -929,6 +931,25 @@ export function VirtualFeed(props) {
|
|
|
929
931
|
};
|
|
930
932
|
restore(true);
|
|
931
933
|
};
|
|
934
|
+
|
|
935
|
+
/** Removes the tinted passage, also one whose search is still loading. */
|
|
936
|
+
let clearPassage = () => {};
|
|
937
|
+
/**
|
|
938
|
+
* Tints one passage of a placed item, or the whole item where that is not possible. The search loads with the first
|
|
939
|
+
* passage, so feeds that never jump to one carry none of its code.
|
|
940
|
+
*/
|
|
941
|
+
const highlightPassage = (key, text) => {
|
|
942
|
+
let current = true;
|
|
943
|
+
clearPassage = () => {
|
|
944
|
+
current = false;
|
|
945
|
+
};
|
|
946
|
+
const item = viewport.querySelector(`.k2b-virtual-feed__item[data-key="${CSS.escape(key)}"]`);
|
|
947
|
+
void (item ? import("./find-text") : Promise.reject()).then(({
|
|
948
|
+
highlightTextPassage
|
|
949
|
+
}) => highlightTextPassage(item, text, PASSAGE_HIGHLIGHT)).catch(() => null).then(clear => {
|
|
950
|
+
if (!current) clear?.();else if (clear) clearPassage = clear;else setHighlighted(key);
|
|
951
|
+
});
|
|
952
|
+
};
|
|
932
953
|
const scrollToKey = (key, options = {}) => {
|
|
933
954
|
const index = keys.indexOf(key);
|
|
934
955
|
if (index < 0) return false;
|
|
@@ -953,8 +974,13 @@ export function VirtualFeed(props) {
|
|
|
953
974
|
if (reachesEnd(logicalTop())) setStick(true);
|
|
954
975
|
if (options.highlight) {
|
|
955
976
|
clearTimeout(highlightTimer);
|
|
956
|
-
|
|
957
|
-
|
|
977
|
+
clearPassage();
|
|
978
|
+
setHighlighted(options.highlightText ? undefined : key);
|
|
979
|
+
if (options.highlightText) highlightPassage(key, options.highlightText);
|
|
980
|
+
highlightTimer = setTimeout(() => {
|
|
981
|
+
setHighlighted(undefined);
|
|
982
|
+
clearPassage();
|
|
983
|
+
}, HIGHLIGHT_MS);
|
|
958
984
|
}
|
|
959
985
|
return true;
|
|
960
986
|
};
|
|
@@ -1174,6 +1200,7 @@ export function VirtualFeed(props) {
|
|
|
1174
1200
|
clearTimeout(endTimer);
|
|
1175
1201
|
clearTimeout(announceTimer);
|
|
1176
1202
|
clearTimeout(highlightTimer);
|
|
1203
|
+
clearPassage();
|
|
1177
1204
|
for (const row of rows.values()) row.dispose();
|
|
1178
1205
|
rows.clear();
|
|
1179
1206
|
});
|