@k2b/ui 0.66.0 → 0.67.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/base.css +6 -1
- package/dist/browser/actions/Dropdown.js +2 -1
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/FilterChip.js +3 -2
- package/dist/browser/actions/FilterChip.js.map +1 -1
- package/dist/browser/actions/SegmentedControl.js +20 -14
- package/dist/browser/actions/SegmentedControl.js.map +1 -1
- package/dist/browser/charts/core/line-details.js +52 -12
- package/dist/browser/charts/core/line-details.js.map +1 -1
- package/dist/browser/charts/core/line-extras.js +122 -0
- package/dist/browser/charts/core/line-extras.js.map +1 -0
- package/dist/browser/charts/core/line-options.js +1 -1
- package/dist/browser/charts/core/line-options.js.map +1 -1
- package/dist/browser/charts/core/snapshot.js +3 -2
- package/dist/browser/charts/core/snapshot.js.map +1 -1
- package/dist/browser/charts/core/svg-barGauge.js +2 -2
- package/dist/browser/charts/core/svg-barGauge.js.map +1 -1
- package/dist/browser/charts/core/svg-common.js +22 -1
- package/dist/browser/charts/core/svg-common.js.map +1 -1
- package/dist/browser/charts/core/svg-renderers.js +2 -2
- package/dist/browser/charts/core/svg-renderers.js.map +1 -1
- package/dist/browser/chat/ChatDecision.js +5 -4
- package/dist/browser/chat/ChatDecision.js.map +1 -1
- package/dist/browser/chat/ChatPrimitives.js +7 -5
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/content/Calendar.js +1103 -922
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarDayView.js +336 -259
- package/dist/browser/content/CalendarDayView.js.map +1 -1
- package/dist/browser/content/CalendarWeekView.js +332 -236
- package/dist/browser/content/CalendarWeekView.js.map +1 -1
- package/dist/browser/content/ChartRoot.js +233 -100
- package/dist/browser/content/ChartRoot.js.map +1 -1
- package/dist/browser/content/MarkdownView.js +3 -1
- package/dist/browser/content/MarkdownView.js.map +1 -1
- package/dist/browser/content/ReferenceChip.js +2 -1
- package/dist/browser/content/ReferenceChip.js.map +1 -1
- package/dist/browser/content/calendar-days.js +114 -26
- package/dist/browser/content/calendar-days.js.map +1 -1
- package/dist/browser/content/calendar-event-detail.js +133 -98
- package/dist/browser/content/calendar-event-detail.js.map +1 -1
- package/dist/browser/content/calendar-events.js +107 -0
- package/dist/browser/content/calendar-events.js.map +1 -0
- package/dist/browser/content/calendar-messages.js +28 -2
- package/dist/browser/content/calendar-messages.js.map +1 -1
- package/dist/browser/content/calendar-month-layout.js +89 -5
- package/dist/browser/content/calendar-month-layout.js.map +1 -1
- package/dist/browser/content/calendar-month-scroll.js +2 -1
- package/dist/browser/content/calendar-month-scroll.js.map +1 -1
- package/dist/browser/content/calendar-overflow.browser-suite.js +534 -0
- package/dist/browser/content/calendar-overflow.browser-suite.js.map +1 -0
- package/dist/browser/content/calendar-overflow.js +366 -0
- package/dist/browser/content/calendar-overflow.js.map +1 -0
- package/dist/browser/content/calendar-shared.js +119 -104
- package/dist/browser/content/calendar-shared.js.map +1 -1
- package/dist/browser/content/calendar-snapshot.js +71 -0
- package/dist/browser/content/calendar-snapshot.js.map +1 -0
- package/dist/browser/content/calendar-time-view.js +519 -305
- package/dist/browser/content/calendar-time-view.js.map +1 -1
- package/dist/browser/content/chart-bar.js +3 -3
- package/dist/browser/content/chart-bar.js.map +1 -1
- package/dist/browser/content/chart-calendar.js +2 -1
- package/dist/browser/content/chart-calendar.js.map +1 -1
- package/dist/browser/content/chart-inspection-mount.js +1 -1
- package/dist/browser/content/chart-inspection-mount.js.map +1 -1
- package/dist/browser/content/chart-line-gaps.js +1 -1
- package/dist/browser/content/chart-line-gaps.js.map +1 -1
- package/dist/browser/content/chart-message-catalog.js +6 -0
- package/dist/browser/content/chart-message-catalog.js.map +1 -1
- package/dist/browser/content/chart-state-timeline.js +45 -12
- package/dist/browser/content/chart-state-timeline.js.map +1 -1
- package/dist/browser/content/chart-svg.js +5 -1
- package/dist/browser/content/chart-svg.js.map +1 -1
- package/dist/browser/content/chart-tick-room.js +23 -0
- package/dist/browser/content/chart-tick-room.js.map +1 -1
- package/dist/browser/content/index.js +3 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/content/markdown-info-blocks.js +1 -1
- package/dist/browser/content/markdown-info-blocks.js.map +1 -1
- package/dist/browser/content/markdown-links.js +36 -2
- package/dist/browser/content/markdown-links.js.map +1 -1
- package/dist/browser/feedback/prompt-form-loader.js +3 -2
- package/dist/browser/feedback/prompt-form-loader.js.map +1 -1
- package/dist/browser/feedback/toast.js +21 -1
- package/dist/browser/feedback/toast.js.map +1 -1
- package/dist/browser/inputs/AutocompleteSelect.js +2 -1
- package/dist/browser/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/browser/inputs/ChoiceInputs.js +3 -2
- package/dist/browser/inputs/ChoiceInputs.js.map +1 -1
- package/dist/browser/inputs/ColorChoices.js +2 -1
- package/dist/browser/inputs/ColorChoices.js.map +1 -1
- package/dist/browser/inputs/RichSelect.js +2 -1
- package/dist/browser/inputs/RichSelect.js.map +1 -1
- package/dist/browser/inputs/Select.js +3 -2
- package/dist/browser/inputs/Select.js.map +1 -1
- package/dist/browser/inputs/date-picker.js +9 -0
- package/dist/browser/inputs/date-picker.js.map +1 -1
- package/dist/browser/inputs/markdown/Toolbar.js +18 -14
- package/dist/browser/inputs/markdown/Toolbar.js.map +1 -1
- package/dist/browser/internal/color.js +25 -0
- package/dist/browser/internal/color.js.map +1 -1
- package/dist/browser/internal/pending-loads.js +17 -0
- package/dist/browser/internal/pending-loads.js.map +1 -0
- package/dist/browser/intl/messages.js +16 -0
- package/dist/browser/intl/messages.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +6 -0
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/DetailSections.js +110 -98
- package/dist/browser/layout/DetailSections.js.map +1 -1
- package/dist/browser/layout/FloatingWindow.js +2 -1
- package/dist/browser/layout/FloatingWindow.js.map +1 -1
- package/dist/browser/layout/Navigation.js +172 -123
- package/dist/browser/layout/Navigation.js.map +1 -1
- package/dist/browser/layout/Panes.js +188 -237
- package/dist/browser/layout/Panes.js.map +1 -1
- package/dist/browser/layout/SidebarSwitcher.js +7 -3
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/navigation-model.js.map +1 -1
- package/dist/browser/layout/panes-messages.js +0 -4
- package/dist/browser/layout/panes-messages.js.map +1 -1
- package/dist/browser/surfaces/Avatar.js +5 -2
- package/dist/browser/surfaces/Avatar.js.map +1 -1
- package/dist/browser/surfaces/NoticeCard.js +78 -36
- package/dist/browser/surfaces/NoticeCard.js.map +1 -1
- package/dist/browser/surfaces/NoticeRow.js +10 -3
- package/dist/browser/surfaces/NoticeRow.js.map +1 -1
- package/dist/browser/surfaces/index.js +1 -1
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/surfaces/notice-card-classes.js +16 -0
- package/dist/browser/surfaces/notice-card-classes.js.map +1 -0
- package/dist/browser/surfaces/person-color.js +34 -4
- package/dist/browser/surfaces/person-color.js.map +1 -1
- package/dist/browser/v2/accent.js +114 -0
- package/dist/browser/v2/accent.js.map +1 -0
- package/dist/browser/v2/action-bar.js +125 -0
- package/dist/browser/v2/action-bar.js.map +1 -0
- package/dist/browser/v2/addresses.js +135 -0
- package/dist/browser/v2/addresses.js.map +1 -0
- package/dist/browser/v2/announce.js +94 -0
- package/dist/browser/v2/announce.js.map +1 -0
- package/dist/browser/v2/attach-live.js +280 -0
- package/dist/browser/v2/attach-live.js.map +1 -0
- package/dist/browser/v2/attach.js +432 -0
- package/dist/browser/v2/attach.js.map +1 -0
- package/dist/browser/v2/bar-fold.js +405 -0
- package/dist/browser/v2/bar-fold.js.map +1 -0
- package/dist/browser/v2/behavior/adapter.js +378 -0
- package/dist/browser/v2/behavior/adapter.js.map +1 -0
- package/dist/browser/v2/behavior/bind.js +43 -0
- package/dist/browser/v2/behavior/bind.js.map +1 -0
- package/dist/browser/v2/behavior/board.js +184 -0
- package/dist/browser/v2/behavior/board.js.map +1 -0
- package/dist/browser/v2/behavior/calendar.js +39 -0
- package/dist/browser/v2/behavior/calendar.js.map +1 -0
- package/dist/browser/v2/behavior/code.js +25 -0
- package/dist/browser/v2/behavior/code.js.map +1 -0
- package/dist/browser/v2/behavior/controls.js +58 -0
- package/dist/browser/v2/behavior/controls.js.map +1 -0
- package/dist/browser/v2/behavior/dates.js +8 -0
- package/dist/browser/v2/behavior/dates.js.map +1 -0
- package/dist/browser/v2/behavior/dnd.js +545 -0
- package/dist/browser/v2/behavior/dnd.js.map +1 -0
- package/dist/browser/v2/behavior/files.js +43 -0
- package/dist/browser/v2/behavior/files.js.map +1 -0
- package/dist/browser/v2/behavior/layer.js +3 -0
- package/dist/browser/v2/behavior/layer.js.map +1 -0
- package/dist/browser/v2/behavior/lists.js +102 -0
- package/dist/browser/v2/behavior/lists.js.map +1 -0
- package/dist/browser/v2/behavior/menu.js +97 -0
- package/dist/browser/v2/behavior/menu.js.map +1 -0
- package/dist/browser/v2/behavior/messages.js +200 -0
- package/dist/browser/v2/behavior/messages.js.map +1 -0
- package/dist/browser/v2/behavior/overlays.js +304 -0
- package/dist/browser/v2/behavior/overlays.js.map +1 -0
- package/dist/browser/v2/behavior/pickers.js +86 -0
- package/dist/browser/v2/behavior/pickers.js.map +1 -0
- package/dist/browser/v2/behavior/resize.js +147 -0
- package/dist/browser/v2/behavior/resize.js.map +1 -0
- package/dist/browser/v2/behavior/segmented.js +17 -0
- package/dist/browser/v2/behavior/segmented.js.map +1 -0
- package/dist/browser/v2/behavior/select.js +134 -0
- package/dist/browser/v2/behavior/select.js.map +1 -0
- package/dist/browser/v2/behavior/time-input.js +95 -0
- package/dist/browser/v2/behavior/time-input.js.map +1 -0
- package/dist/browser/v2/behavior/time-text.js +83 -0
- package/dist/browser/v2/behavior/time-text.js.map +1 -0
- package/dist/browser/v2/behavior/tip.js +31 -0
- package/dist/browser/v2/behavior/tip.js.map +1 -0
- package/dist/browser/v2/behavior/toast.js +152 -0
- package/dist/browser/v2/behavior/toast.js.map +1 -0
- package/dist/browser/v2/behavior/treegrid.js +75 -0
- package/dist/browser/v2/behavior/treegrid.js.map +1 -0
- package/dist/browser/v2/board-messages.js +70 -0
- package/dist/browser/v2/board-messages.js.map +1 -0
- package/dist/browser/v2/board.js +471 -0
- package/dist/browser/v2/board.js.map +1 -0
- package/dist/browser/v2/button-failure.js +90 -0
- package/dist/browser/v2/button-failure.js.map +1 -0
- package/dist/browser/v2/button.js +174 -45
- package/dist/browser/v2/button.js.map +1 -1
- package/dist/browser/v2/colors.js +135 -0
- package/dist/browser/v2/colors.js.map +1 -0
- package/dist/browser/v2/columns-context.js +48 -0
- package/dist/browser/v2/columns-context.js.map +1 -0
- package/dist/browser/v2/components.js +1761 -428
- package/dist/browser/v2/components.js.map +1 -1
- package/dist/browser/v2/content.js +1650 -562
- package/dist/browser/v2/content.js.map +1 -1
- package/dist/browser/v2/control-messages.js +115 -0
- package/dist/browser/v2/control-messages.js.map +1 -0
- package/dist/browser/v2/controls.js +2391 -336
- package/dist/browser/v2/controls.js.map +1 -1
- package/dist/browser/v2/danger-zone.js +47 -0
- package/dist/browser/v2/danger-zone.js.map +1 -0
- package/dist/browser/v2/date-messages.js +61 -0
- package/dist/browser/v2/date-messages.js.map +1 -0
- package/dist/browser/v2/date-picker.js +405 -0
- package/dist/browser/v2/date-picker.js.map +1 -0
- package/dist/browser/v2/date-week-window.js +264 -0
- package/dist/browser/v2/date-week-window.js.map +1 -0
- package/dist/browser/v2/date-weeks.js +30 -0
- package/dist/browser/v2/date-weeks.js.map +1 -0
- package/dist/browser/v2/day-bar.js +87 -0
- package/dist/browser/v2/day-bar.js.map +1 -0
- package/dist/browser/v2/describe.js +244 -59
- package/dist/browser/v2/describe.js.map +1 -1
- package/dist/browser/v2/draft.js +55 -0
- package/dist/browser/v2/draft.js.map +1 -0
- package/dist/browser/v2/emoji-picker.js +240 -0
- package/dist/browser/v2/emoji-picker.js.map +1 -0
- package/dist/browser/v2/ends.js +37 -0
- package/dist/browser/v2/ends.js.map +1 -0
- package/dist/browser/v2/error-screen.js +118 -0
- package/dist/browser/v2/error-screen.js.map +1 -0
- package/dist/browser/v2/failed.js +90 -0
- package/dist/browser/v2/failed.js.map +1 -0
- package/dist/browser/v2/figures.js +179 -0
- package/dist/browser/v2/figures.js.map +1 -0
- package/dist/browser/v2/filter-bar.js +3009 -0
- package/dist/browser/v2/filter-bar.js.map +1 -0
- package/dist/browser/v2/filter-messages.js +244 -0
- package/dist/browser/v2/filter-messages.js.map +1 -0
- package/dist/browser/v2/head-search.js +159 -0
- package/dist/browser/v2/head-search.js.map +1 -0
- package/dist/browser/v2/heat-days.js +91 -0
- package/dist/browser/v2/heat-days.js.map +1 -0
- package/dist/browser/v2/heat.js +260 -0
- package/dist/browser/v2/heat.js.map +1 -0
- package/dist/browser/v2/icon.js +48 -0
- package/dist/browser/v2/icon.js.map +1 -0
- package/dist/browser/v2/index.js +66 -7
- package/dist/browser/v2/index.js.map +1 -1
- package/dist/browser/v2/layout.js +1815 -275
- package/dist/browser/v2/layout.js.map +1 -1
- package/dist/browser/v2/list-group.js +57 -0
- package/dist/browser/v2/list-group.js.map +1 -0
- package/dist/browser/v2/list-query.js +736 -0
- package/dist/browser/v2/list-query.js.map +1 -0
- package/dist/browser/v2/lookup.js +431 -0
- package/dist/browser/v2/lookup.js.map +1 -0
- package/dist/browser/v2/marks.js +607 -85
- package/dist/browser/v2/marks.js.map +1 -1
- package/dist/browser/v2/menu-panel.js +241 -0
- package/dist/browser/v2/menu-panel.js.map +1 -0
- package/dist/browser/v2/menu.js +797 -0
- package/dist/browser/v2/menu.js.map +1 -0
- package/dist/browser/v2/nav-drop.js +25 -0
- package/dist/browser/v2/nav-drop.js.map +1 -0
- package/dist/browser/v2/nav-face.js +16 -0
- package/dist/browser/v2/nav-face.js.map +1 -0
- package/dist/browser/v2/nav-tree.js +498 -0
- package/dist/browser/v2/nav-tree.js.map +1 -0
- package/dist/browser/v2/now-line.js +61 -0
- package/dist/browser/v2/now-line.js.map +1 -0
- package/dist/browser/v2/overlay-messages.js +41 -0
- package/dist/browser/v2/overlay-messages.js.map +1 -0
- package/dist/browser/v2/overlays.js +431 -0
- package/dist/browser/v2/overlays.js.map +1 -0
- package/dist/browser/v2/page-layer.js +42 -0
- package/dist/browser/v2/page-layer.js.map +1 -0
- package/dist/browser/v2/pane-name.js +55 -0
- package/dist/browser/v2/pane-name.js.map +1 -0
- package/dist/browser/v2/pane-print.js +32 -0
- package/dist/browser/v2/pane-print.js.map +1 -0
- package/dist/browser/v2/pane-sheet.js +147 -0
- package/dist/browser/v2/pane-sheet.js.map +1 -0
- package/dist/browser/v2/popover.js +152 -0
- package/dist/browser/v2/popover.js.map +1 -0
- package/dist/browser/v2/reaction-messages.js +31 -0
- package/dist/browser/v2/reaction-messages.js.map +1 -0
- package/dist/browser/v2/reactions.js +239 -0
- package/dist/browser/v2/reactions.js.map +1 -0
- package/dist/browser/v2/row-drag.js +19 -0
- package/dist/browser/v2/row-drag.js.map +1 -0
- package/dist/browser/v2/section-level.js +9 -0
- package/dist/browser/v2/section-level.js.map +1 -0
- package/dist/browser/v2/segmented.js +146 -0
- package/dist/browser/v2/segmented.js.map +1 -0
- package/dist/browser/v2/select-live.js +162 -0
- package/dist/browser/v2/select-live.js.map +1 -0
- package/dist/browser/v2/setting-messages.js +25 -0
- package/dist/browser/v2/setting-messages.js.map +1 -0
- package/dist/browser/v2/split-button.js +82 -0
- package/dist/browser/v2/split-button.js.map +1 -0
- package/dist/browser/v2/states.js +132 -104
- package/dist/browser/v2/states.js.map +1 -1
- package/dist/browser/v2/status-toolbar.js +23 -0
- package/dist/browser/v2/status-toolbar.js.map +1 -0
- package/dist/browser/v2/structure.js +331 -156
- package/dist/browser/v2/structure.js.map +1 -1
- package/dist/browser/v2/testing/index.js +3 -0
- package/dist/browser/v2/testing/index.js.map +1 -1
- package/dist/browser/v2/testing/measure-v2-layout.js +367 -105
- package/dist/browser/v2/testing/measure-v2-layout.js.map +1 -1
- package/dist/browser/v2/testing/settled.js +8 -2
- package/dist/browser/v2/testing/settled.js.map +1 -1
- package/dist/browser/v2/testing/visible.js +14 -0
- package/dist/browser/v2/testing/visible.js.map +1 -0
- package/dist/browser/v2/toast-host.js +18 -0
- package/dist/browser/v2/toast-host.js.map +1 -0
- package/dist/browser/v2/toast.js +241 -0
- package/dist/browser/v2/toast.js.map +1 -0
- package/dist/browser/v2/tokens.js +14 -0
- package/dist/browser/v2/tokens.js.map +1 -1
- package/dist/browser/v2/tree-messages.js +32 -0
- package/dist/browser/v2/tree-messages.js.map +1 -0
- package/dist/browser/v2/types.js +51 -4
- package/dist/browser/v2/types.js.map +1 -1
- package/dist/browser/v2/unsaved-bar.js +225 -0
- package/dist/browser/v2/unsaved-bar.js.map +1 -0
- package/dist/browser/v2/unsaved-messages.js +65 -0
- package/dist/browser/v2/unsaved-messages.js.map +1 -0
- package/dist/browser/v2/width-cookie.js +45 -0
- package/dist/browser/v2/width-cookie.js.map +1 -0
- package/dist/browser/v2/workspace-messages.js +31 -0
- package/dist/browser/v2/workspace-messages.js.map +1 -0
- package/dist/browser/widgets/Dashboard.js +3 -2
- package/dist/browser/widgets/Dashboard.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +2 -1
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/FilterChip.js +3 -2
- package/dist/ssr/actions/FilterChip.js.map +1 -1
- package/dist/ssr/actions/SegmentedControl.js +2 -2
- package/dist/ssr/actions/SegmentedControl.js.map +1 -1
- package/dist/ssr/charts/core/line-details.js +52 -12
- package/dist/ssr/charts/core/line-details.js.map +1 -1
- package/dist/ssr/charts/core/line-extras.js +122 -0
- package/dist/ssr/charts/core/line-extras.js.map +1 -0
- package/dist/ssr/charts/core/line-options.js +1 -1
- package/dist/ssr/charts/core/line-options.js.map +1 -1
- package/dist/ssr/charts/core/snapshot.js +3 -2
- package/dist/ssr/charts/core/snapshot.js.map +1 -1
- package/dist/ssr/charts/core/svg-barGauge.js +2 -2
- package/dist/ssr/charts/core/svg-barGauge.js.map +1 -1
- package/dist/ssr/charts/core/svg-common.js +22 -1
- package/dist/ssr/charts/core/svg-common.js.map +1 -1
- package/dist/ssr/charts/core/svg-renderers.js +2 -2
- package/dist/ssr/charts/core/svg-renderers.js.map +1 -1
- package/dist/ssr/chat/ChatDecision.js +5 -4
- package/dist/ssr/chat/ChatDecision.js.map +1 -1
- package/dist/ssr/chat/ChatPrimitives.js +7 -5
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/content/Calendar.js +410 -323
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarDayView.js +122 -49
- package/dist/ssr/content/CalendarDayView.js.map +1 -1
- package/dist/ssr/content/CalendarWeekView.js +152 -49
- package/dist/ssr/content/CalendarWeekView.js.map +1 -1
- package/dist/ssr/content/ChartRoot.js +82 -16
- package/dist/ssr/content/ChartRoot.js.map +1 -1
- package/dist/ssr/content/MarkdownView.js +3 -1
- package/dist/ssr/content/MarkdownView.js.map +1 -1
- package/dist/ssr/content/ReferenceChip.js +2 -1
- package/dist/ssr/content/ReferenceChip.js.map +1 -1
- package/dist/ssr/content/calendar-days.js +114 -26
- package/dist/ssr/content/calendar-days.js.map +1 -1
- package/dist/ssr/content/calendar-event-detail.js +46 -10
- package/dist/ssr/content/calendar-event-detail.js.map +1 -1
- package/dist/ssr/content/calendar-events.js +107 -0
- package/dist/ssr/content/calendar-events.js.map +1 -0
- package/dist/ssr/content/calendar-messages.js +28 -2
- package/dist/ssr/content/calendar-messages.js.map +1 -1
- package/dist/ssr/content/calendar-month-layout.js +89 -5
- package/dist/ssr/content/calendar-month-layout.js.map +1 -1
- package/dist/ssr/content/calendar-month-scroll.js +2 -1
- package/dist/ssr/content/calendar-month-scroll.js.map +1 -1
- package/dist/ssr/content/calendar-overflow.browser-suite.js +534 -0
- package/dist/ssr/content/calendar-overflow.browser-suite.js.map +1 -0
- package/dist/ssr/content/calendar-overflow.js +272 -0
- package/dist/ssr/content/calendar-overflow.js.map +1 -0
- package/dist/ssr/content/calendar-shared.js +47 -42
- package/dist/ssr/content/calendar-shared.js.map +1 -1
- package/dist/ssr/content/calendar-snapshot.js +71 -0
- package/dist/ssr/content/calendar-snapshot.js.map +1 -0
- package/dist/ssr/content/calendar-time-view.js +319 -136
- package/dist/ssr/content/calendar-time-view.js.map +1 -1
- package/dist/ssr/content/chart-bar.js +3 -3
- package/dist/ssr/content/chart-bar.js.map +1 -1
- package/dist/ssr/content/chart-calendar.js +2 -1
- package/dist/ssr/content/chart-calendar.js.map +1 -1
- package/dist/ssr/content/chart-inspection-mount.js +1 -1
- package/dist/ssr/content/chart-inspection-mount.js.map +1 -1
- package/dist/ssr/content/chart-line-gaps.js +1 -1
- package/dist/ssr/content/chart-line-gaps.js.map +1 -1
- package/dist/ssr/content/chart-message-catalog.js +6 -0
- package/dist/ssr/content/chart-message-catalog.js.map +1 -1
- package/dist/ssr/content/chart-state-timeline.js +45 -12
- package/dist/ssr/content/chart-state-timeline.js.map +1 -1
- package/dist/ssr/content/chart-svg.js +5 -1
- package/dist/ssr/content/chart-svg.js.map +1 -1
- package/dist/ssr/content/chart-tick-room.js +23 -0
- package/dist/ssr/content/chart-tick-room.js.map +1 -1
- package/dist/ssr/content/index.js +3 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/content/markdown-info-blocks.js +1 -1
- package/dist/ssr/content/markdown-info-blocks.js.map +1 -1
- package/dist/ssr/content/markdown-links.js +36 -2
- package/dist/ssr/content/markdown-links.js.map +1 -1
- package/dist/ssr/feedback/prompt-form-loader.js +3 -2
- package/dist/ssr/feedback/prompt-form-loader.js.map +1 -1
- package/dist/ssr/feedback/toast.js +21 -1
- package/dist/ssr/feedback/toast.js.map +1 -1
- package/dist/ssr/inputs/AutocompleteSelect.js +2 -1
- package/dist/ssr/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/ssr/inputs/ChoiceInputs.js +3 -2
- package/dist/ssr/inputs/ChoiceInputs.js.map +1 -1
- package/dist/ssr/inputs/ColorChoices.js +2 -1
- package/dist/ssr/inputs/ColorChoices.js.map +1 -1
- package/dist/ssr/inputs/RichSelect.js +2 -1
- package/dist/ssr/inputs/RichSelect.js.map +1 -1
- package/dist/ssr/inputs/Select.js +3 -2
- package/dist/ssr/inputs/Select.js.map +1 -1
- package/dist/ssr/inputs/date-picker.js +9 -0
- package/dist/ssr/inputs/date-picker.js.map +1 -1
- package/dist/ssr/inputs/markdown/Toolbar.js +6 -1
- package/dist/ssr/inputs/markdown/Toolbar.js.map +1 -1
- package/dist/ssr/internal/color.js +25 -0
- package/dist/ssr/internal/color.js.map +1 -1
- package/dist/ssr/internal/pending-loads.js +17 -0
- package/dist/ssr/internal/pending-loads.js.map +1 -0
- package/dist/ssr/intl/messages.js +16 -0
- package/dist/ssr/intl/messages.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +6 -0
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/DetailSections.js +19 -10
- package/dist/ssr/layout/DetailSections.js.map +1 -1
- package/dist/ssr/layout/FloatingWindow.js +2 -1
- package/dist/ssr/layout/FloatingWindow.js.map +1 -1
- package/dist/ssr/layout/Navigation.js +54 -26
- package/dist/ssr/layout/Navigation.js.map +1 -1
- package/dist/ssr/layout/Panes.js +32 -67
- package/dist/ssr/layout/Panes.js.map +1 -1
- package/dist/ssr/layout/SidebarSwitcher.js +7 -3
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/navigation-model.js.map +1 -1
- package/dist/ssr/layout/panes-messages.js +0 -4
- package/dist/ssr/layout/panes-messages.js.map +1 -1
- package/dist/ssr/surfaces/Avatar.js +5 -2
- package/dist/ssr/surfaces/Avatar.js.map +1 -1
- package/dist/ssr/surfaces/NoticeCard.js +27 -20
- package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
- package/dist/ssr/surfaces/NoticeRow.js +10 -3
- package/dist/ssr/surfaces/NoticeRow.js.map +1 -1
- package/dist/ssr/surfaces/index.js +1 -1
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/surfaces/notice-card-classes.js +16 -0
- package/dist/ssr/surfaces/notice-card-classes.js.map +1 -0
- package/dist/ssr/surfaces/person-color.js +34 -4
- package/dist/ssr/surfaces/person-color.js.map +1 -1
- package/dist/ssr/v2/accent.js +114 -0
- package/dist/ssr/v2/accent.js.map +1 -0
- package/dist/ssr/v2/action-bar.js +88 -0
- package/dist/ssr/v2/action-bar.js.map +1 -0
- package/dist/ssr/v2/addresses.js +135 -0
- package/dist/ssr/v2/addresses.js.map +1 -0
- package/dist/ssr/v2/announce.js +93 -0
- package/dist/ssr/v2/announce.js.map +1 -0
- package/dist/ssr/v2/attach-live.js +279 -0
- package/dist/ssr/v2/attach-live.js.map +1 -0
- package/dist/ssr/v2/attach.js +432 -0
- package/dist/ssr/v2/attach.js.map +1 -0
- package/dist/ssr/v2/bar-fold.js +405 -0
- package/dist/ssr/v2/bar-fold.js.map +1 -0
- package/dist/ssr/v2/behavior/adapter.js +378 -0
- package/dist/ssr/v2/behavior/adapter.js.map +1 -0
- package/dist/ssr/v2/behavior/bind.js +43 -0
- package/dist/ssr/v2/behavior/bind.js.map +1 -0
- package/dist/ssr/v2/behavior/board.js +184 -0
- package/dist/ssr/v2/behavior/board.js.map +1 -0
- package/dist/ssr/v2/behavior/calendar.js +39 -0
- package/dist/ssr/v2/behavior/calendar.js.map +1 -0
- package/dist/ssr/v2/behavior/code.js +25 -0
- package/dist/ssr/v2/behavior/code.js.map +1 -0
- package/dist/ssr/v2/behavior/controls.js +58 -0
- package/dist/ssr/v2/behavior/controls.js.map +1 -0
- package/dist/ssr/v2/behavior/dates.js +8 -0
- package/dist/ssr/v2/behavior/dates.js.map +1 -0
- package/dist/ssr/v2/behavior/dnd.js +545 -0
- package/dist/ssr/v2/behavior/dnd.js.map +1 -0
- package/dist/ssr/v2/behavior/files.js +43 -0
- package/dist/ssr/v2/behavior/files.js.map +1 -0
- package/dist/ssr/v2/behavior/layer.js +3 -0
- package/dist/ssr/v2/behavior/layer.js.map +1 -0
- package/dist/ssr/v2/behavior/lists.js +102 -0
- package/dist/ssr/v2/behavior/lists.js.map +1 -0
- package/dist/ssr/v2/behavior/menu.js +91 -0
- package/dist/ssr/v2/behavior/menu.js.map +1 -0
- package/dist/ssr/v2/behavior/messages.js +200 -0
- package/dist/ssr/v2/behavior/messages.js.map +1 -0
- package/dist/ssr/v2/behavior/overlays.js +293 -0
- package/dist/ssr/v2/behavior/overlays.js.map +1 -0
- package/dist/ssr/v2/behavior/pickers.js +86 -0
- package/dist/ssr/v2/behavior/pickers.js.map +1 -0
- package/dist/ssr/v2/behavior/resize.js +147 -0
- package/dist/ssr/v2/behavior/resize.js.map +1 -0
- package/dist/ssr/v2/behavior/segmented.js +17 -0
- package/dist/ssr/v2/behavior/segmented.js.map +1 -0
- package/dist/ssr/v2/behavior/select.js +133 -0
- package/dist/ssr/v2/behavior/select.js.map +1 -0
- package/dist/ssr/v2/behavior/time-input.js +95 -0
- package/dist/ssr/v2/behavior/time-input.js.map +1 -0
- package/dist/ssr/v2/behavior/time-text.js +83 -0
- package/dist/ssr/v2/behavior/time-text.js.map +1 -0
- package/dist/ssr/v2/behavior/tip.js +31 -0
- package/dist/ssr/v2/behavior/tip.js.map +1 -0
- package/dist/ssr/v2/behavior/toast.js +152 -0
- package/dist/ssr/v2/behavior/toast.js.map +1 -0
- package/dist/ssr/v2/behavior/treegrid.js +75 -0
- package/dist/ssr/v2/behavior/treegrid.js.map +1 -0
- package/dist/ssr/v2/board-messages.js +70 -0
- package/dist/ssr/v2/board-messages.js.map +1 -0
- package/dist/ssr/v2/board.js +388 -0
- package/dist/ssr/v2/board.js.map +1 -0
- package/dist/ssr/v2/button-failure.js +90 -0
- package/dist/ssr/v2/button-failure.js.map +1 -0
- package/dist/ssr/v2/button.js +172 -45
- package/dist/ssr/v2/button.js.map +1 -1
- package/dist/ssr/v2/colors.js +135 -0
- package/dist/ssr/v2/colors.js.map +1 -0
- package/dist/ssr/v2/columns-context.js +48 -0
- package/dist/ssr/v2/columns-context.js.map +1 -0
- package/dist/ssr/v2/components.js +1184 -218
- package/dist/ssr/v2/components.js.map +1 -1
- package/dist/ssr/v2/content.js +1026 -256
- package/dist/ssr/v2/content.js.map +1 -1
- package/dist/ssr/v2/control-messages.js +115 -0
- package/dist/ssr/v2/control-messages.js.map +1 -0
- package/dist/ssr/v2/controls.js +1715 -95
- package/dist/ssr/v2/controls.js.map +1 -1
- package/dist/ssr/v2/danger-zone.js +28 -0
- package/dist/ssr/v2/danger-zone.js.map +1 -0
- package/dist/ssr/v2/date-messages.js +61 -0
- package/dist/ssr/v2/date-messages.js.map +1 -0
- package/dist/ssr/v2/date-picker.js +351 -0
- package/dist/ssr/v2/date-picker.js.map +1 -0
- package/dist/ssr/v2/date-week-window.js +149 -0
- package/dist/ssr/v2/date-week-window.js.map +1 -0
- package/dist/ssr/v2/date-weeks.js +30 -0
- package/dist/ssr/v2/date-weeks.js.map +1 -0
- package/dist/ssr/v2/day-bar.js +52 -0
- package/dist/ssr/v2/day-bar.js.map +1 -0
- package/dist/ssr/v2/describe.js +244 -59
- package/dist/ssr/v2/describe.js.map +1 -1
- package/dist/ssr/v2/draft.js +55 -0
- package/dist/ssr/v2/draft.js.map +1 -0
- package/dist/ssr/v2/emoji-picker.js +182 -0
- package/dist/ssr/v2/emoji-picker.js.map +1 -0
- package/dist/ssr/v2/ends.js +27 -0
- package/dist/ssr/v2/ends.js.map +1 -0
- package/dist/ssr/v2/error-screen.js +73 -0
- package/dist/ssr/v2/error-screen.js.map +1 -0
- package/dist/ssr/v2/failed.js +63 -0
- package/dist/ssr/v2/failed.js.map +1 -0
- package/dist/ssr/v2/figures.js +101 -0
- package/dist/ssr/v2/figures.js.map +1 -0
- package/dist/ssr/v2/filter-bar.js +2495 -0
- package/dist/ssr/v2/filter-bar.js.map +1 -0
- package/dist/ssr/v2/filter-messages.js +244 -0
- package/dist/ssr/v2/filter-messages.js.map +1 -0
- package/dist/ssr/v2/head-search.js +159 -0
- package/dist/ssr/v2/head-search.js.map +1 -0
- package/dist/ssr/v2/heat-days.js +91 -0
- package/dist/ssr/v2/heat-days.js.map +1 -0
- package/dist/ssr/v2/heat.js +145 -0
- package/dist/ssr/v2/heat.js.map +1 -0
- package/dist/ssr/v2/icon.js +18 -0
- package/dist/ssr/v2/icon.js.map +1 -0
- package/dist/ssr/v2/index.js +66 -7
- package/dist/ssr/v2/index.js.map +1 -1
- package/dist/ssr/v2/layout.js +1214 -108
- package/dist/ssr/v2/layout.js.map +1 -1
- package/dist/ssr/v2/list-group.js +37 -0
- package/dist/ssr/v2/list-group.js.map +1 -0
- package/dist/ssr/v2/list-query.js +736 -0
- package/dist/ssr/v2/list-query.js.map +1 -0
- package/dist/ssr/v2/lookup.js +333 -0
- package/dist/ssr/v2/lookup.js.map +1 -0
- package/dist/ssr/v2/marks.js +331 -24
- package/dist/ssr/v2/marks.js.map +1 -1
- package/dist/ssr/v2/menu-panel.js +217 -0
- package/dist/ssr/v2/menu-panel.js.map +1 -0
- package/dist/ssr/v2/menu.js +733 -0
- package/dist/ssr/v2/menu.js.map +1 -0
- package/dist/ssr/v2/nav-drop.js +25 -0
- package/dist/ssr/v2/nav-drop.js.map +1 -0
- package/dist/ssr/v2/nav-face.js +16 -0
- package/dist/ssr/v2/nav-face.js.map +1 -0
- package/dist/ssr/v2/nav-tree.js +436 -0
- package/dist/ssr/v2/nav-tree.js.map +1 -0
- package/dist/ssr/v2/now-line.js +44 -0
- package/dist/ssr/v2/now-line.js.map +1 -0
- package/dist/ssr/v2/overlay-messages.js +41 -0
- package/dist/ssr/v2/overlay-messages.js.map +1 -0
- package/dist/ssr/v2/overlays.js +365 -0
- package/dist/ssr/v2/overlays.js.map +1 -0
- package/dist/ssr/v2/page-layer.js +41 -0
- package/dist/ssr/v2/page-layer.js.map +1 -0
- package/dist/ssr/v2/pane-name.js +33 -0
- package/dist/ssr/v2/pane-name.js.map +1 -0
- package/dist/ssr/v2/pane-print.js +32 -0
- package/dist/ssr/v2/pane-print.js.map +1 -0
- package/dist/ssr/v2/pane-sheet.js +147 -0
- package/dist/ssr/v2/pane-sheet.js.map +1 -0
- package/dist/ssr/v2/popover.js +144 -0
- package/dist/ssr/v2/popover.js.map +1 -0
- package/dist/ssr/v2/reaction-messages.js +31 -0
- package/dist/ssr/v2/reaction-messages.js.map +1 -0
- package/dist/ssr/v2/reactions.js +200 -0
- package/dist/ssr/v2/reactions.js.map +1 -0
- package/dist/ssr/v2/row-drag.js +19 -0
- package/dist/ssr/v2/row-drag.js.map +1 -0
- package/dist/ssr/v2/section-level.js +9 -0
- package/dist/ssr/v2/section-level.js.map +1 -0
- package/dist/ssr/v2/segmented.js +104 -0
- package/dist/ssr/v2/segmented.js.map +1 -0
- package/dist/ssr/v2/select-live.js +142 -0
- package/dist/ssr/v2/select-live.js.map +1 -0
- package/dist/ssr/v2/setting-messages.js +25 -0
- package/dist/ssr/v2/setting-messages.js.map +1 -0
- package/dist/ssr/v2/split-button.js +66 -0
- package/dist/ssr/v2/split-button.js.map +1 -0
- package/dist/ssr/v2/states.js +89 -77
- package/dist/ssr/v2/states.js.map +1 -1
- package/dist/ssr/v2/status-toolbar.js +23 -0
- package/dist/ssr/v2/status-toolbar.js.map +1 -0
- package/dist/ssr/v2/structure.js +224 -71
- package/dist/ssr/v2/structure.js.map +1 -1
- package/dist/ssr/v2/testing/index.js +3 -0
- package/dist/ssr/v2/testing/index.js.map +1 -1
- package/dist/ssr/v2/testing/measure-v2-layout.js +367 -105
- package/dist/ssr/v2/testing/measure-v2-layout.js.map +1 -1
- package/dist/ssr/v2/testing/settled.js +8 -2
- package/dist/ssr/v2/testing/settled.js.map +1 -1
- package/dist/ssr/v2/testing/visible.js +14 -0
- package/dist/ssr/v2/testing/visible.js.map +1 -0
- package/dist/ssr/v2/toast-host.js +18 -0
- package/dist/ssr/v2/toast-host.js.map +1 -0
- package/dist/ssr/v2/toast.js +222 -0
- package/dist/ssr/v2/toast.js.map +1 -0
- package/dist/ssr/v2/tokens.js +14 -0
- package/dist/ssr/v2/tokens.js.map +1 -1
- package/dist/ssr/v2/tree-messages.js +32 -0
- package/dist/ssr/v2/tree-messages.js.map +1 -0
- package/dist/ssr/v2/types.js +51 -4
- package/dist/ssr/v2/types.js.map +1 -1
- package/dist/ssr/v2/unsaved-bar.js +183 -0
- package/dist/ssr/v2/unsaved-bar.js.map +1 -0
- package/dist/ssr/v2/unsaved-messages.js +65 -0
- package/dist/ssr/v2/unsaved-messages.js.map +1 -0
- package/dist/ssr/v2/width-cookie.js +45 -0
- package/dist/ssr/v2/width-cookie.js.map +1 -0
- package/dist/ssr/v2/workspace-messages.js +31 -0
- package/dist/ssr/v2/workspace-messages.js.map +1 -0
- package/dist/ssr/widgets/Dashboard.js +3 -2
- package/dist/ssr/widgets/Dashboard.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tabler.css +1 -1
- package/dist/types/actions/SegmentedControl.d.ts +4 -0
- package/dist/types/charts/core/line-extras.d.ts +33 -0
- package/dist/types/charts/core/line-options.d.ts +3 -0
- package/dist/types/charts/core/svg-common.d.ts +49 -2
- package/dist/types/content/Calendar.d.ts +14 -2
- package/dist/types/content/MarkdownView.d.ts +2 -0
- package/dist/types/content/calendar-days.d.ts +52 -2
- package/dist/types/content/calendar-events.d.ts +35 -0
- package/dist/types/content/calendar-messages.d.ts +13 -0
- package/dist/types/content/calendar-month-layout.d.ts +44 -4
- package/dist/types/content/calendar-month-scroll.d.ts +2 -1
- package/dist/types/content/calendar-overflow.browser-suite.d.ts +37 -0
- package/dist/types/content/calendar-overflow.d.ts +30 -0
- package/dist/types/content/calendar-shared.d.ts +9 -11
- package/dist/types/content/calendar-snapshot.d.ts +28 -0
- package/dist/types/content/calendar-time-view.d.ts +37 -12
- package/dist/types/content/chart-bar.d.ts +1 -1
- package/dist/types/content/chart-inspection-mount.d.ts +1 -1
- package/dist/types/content/chart-line-gaps.d.ts +1 -1
- package/dist/types/content/chart-message-catalog.d.ts +6 -0
- package/dist/types/content/chart-state-timeline.d.ts +20 -0
- package/dist/types/content/chart-tick-room.d.ts +8 -0
- package/dist/types/content/index.d.ts +3 -0
- package/dist/types/content/markdown-links.d.ts +2 -1
- package/dist/types/inputs/date-picker.d.ts +2 -0
- package/dist/types/internal/color.d.ts +8 -0
- package/dist/types/internal/pending-loads.d.ts +8 -0
- package/dist/types/intl/messages.d.ts +8 -0
- package/dist/types/layout/AppWorkspace.d.ts +5 -0
- package/dist/types/layout/DetailSections.d.ts +11 -1
- package/dist/types/layout/Panes.d.ts +2 -2
- package/dist/types/layout/navigation-model.d.ts +5 -0
- package/dist/types/layout/panes-messages.d.ts +0 -2
- package/dist/types/surfaces/NoticeCard.d.ts +9 -13
- package/dist/types/surfaces/NoticeRow.d.ts +6 -1
- package/dist/types/surfaces/index.d.ts +1 -1
- package/dist/types/surfaces/notice-card-classes.d.ts +14 -0
- package/dist/types/surfaces/person-color.d.ts +27 -4
- package/dist/types/v2/accent.d.ts +24 -0
- package/dist/types/v2/action-bar.d.ts +37 -0
- package/dist/types/v2/addresses.d.ts +26 -0
- package/dist/types/v2/announce.d.ts +17 -0
- package/dist/types/v2/attach-live.d.ts +21 -0
- package/dist/types/v2/attach.d.ts +37 -0
- package/dist/types/v2/bar-fold.d.ts +40 -0
- package/dist/types/v2/behavior/adapter.d.ts +69 -0
- package/dist/types/v2/behavior/bind.d.ts +14 -0
- package/dist/types/v2/behavior/board.d.ts +45 -0
- package/dist/types/v2/behavior/calendar.d.ts +35 -0
- package/dist/types/v2/behavior/code.d.ts +27 -0
- package/dist/types/v2/behavior/controls.d.ts +51 -0
- package/dist/types/v2/behavior/dates.d.ts +7 -0
- package/dist/types/v2/behavior/dnd.d.ts +61 -0
- package/dist/types/v2/behavior/files.d.ts +44 -0
- package/dist/types/v2/behavior/layer.d.ts +1 -0
- package/dist/types/v2/behavior/lists.d.ts +91 -0
- package/dist/types/v2/behavior/menu.d.ts +56 -0
- package/dist/types/v2/behavior/messages.d.ts +72 -0
- package/dist/types/v2/behavior/overlays.d.ts +126 -0
- package/dist/types/v2/behavior/pickers.d.ts +62 -0
- package/dist/types/v2/behavior/resize.d.ts +57 -0
- package/dist/types/v2/behavior/segmented.d.ts +18 -0
- package/dist/types/v2/behavior/select.d.ts +73 -0
- package/dist/types/v2/behavior/time-input.d.ts +36 -0
- package/dist/types/v2/behavior/time-text.d.ts +14 -0
- package/dist/types/v2/behavior/tip.d.ts +17 -0
- package/dist/types/v2/behavior/toast.d.ts +90 -0
- package/dist/types/v2/behavior/treegrid.d.ts +40 -0
- package/dist/types/v2/board-messages.d.ts +22 -0
- package/dist/types/v2/board.d.ts +79 -0
- package/dist/types/v2/button-failure.d.ts +18 -0
- package/dist/types/v2/button.d.ts +77 -5
- package/dist/types/v2/colors.d.ts +42 -0
- package/dist/types/v2/columns-context.d.ts +50 -0
- package/dist/types/v2/components.d.ts +375 -29
- package/dist/types/v2/content.d.ts +265 -20
- package/dist/types/v2/control-messages.d.ts +55 -0
- package/dist/types/v2/controls.d.ts +459 -26
- package/dist/types/v2/danger-zone.d.ts +23 -0
- package/dist/types/v2/date-messages.d.ts +28 -0
- package/dist/types/v2/date-picker.d.ts +47 -0
- package/dist/types/v2/date-week-window.d.ts +22 -0
- package/dist/types/v2/date-weeks.d.ts +11 -0
- package/dist/types/v2/day-bar.d.ts +28 -0
- package/dist/types/v2/draft.d.ts +36 -0
- package/dist/types/v2/emoji-picker.d.ts +10 -0
- package/dist/types/v2/ends.d.ts +8 -0
- package/dist/types/v2/error-screen.d.ts +59 -0
- package/dist/types/v2/failed.d.ts +15 -0
- package/dist/types/v2/figures.d.ts +66 -0
- package/dist/types/v2/filter-bar.d.ts +111 -0
- package/dist/types/v2/filter-messages.d.ts +121 -0
- package/dist/types/v2/head-search.d.ts +13 -0
- package/dist/types/v2/heat-days.d.ts +44 -0
- package/dist/types/v2/heat.d.ts +40 -0
- package/dist/types/v2/icon.d.ts +16 -0
- package/dist/types/v2/index.d.ts +45 -9
- package/dist/types/v2/layout.d.ts +363 -14
- package/dist/types/v2/list-group.d.ts +17 -0
- package/dist/types/v2/list-query.d.ts +432 -0
- package/dist/types/v2/lookup.d.ts +45 -0
- package/dist/types/v2/marks.d.ts +247 -16
- package/dist/types/v2/menu-panel.d.ts +7 -0
- package/dist/types/v2/menu.d.ts +192 -0
- package/dist/types/v2/nav-drop.d.ts +16 -0
- package/dist/types/v2/nav-face.d.ts +12 -0
- package/dist/types/v2/nav-tree.d.ts +66 -0
- package/dist/types/v2/now-line.d.ts +19 -0
- package/dist/types/v2/overlay-messages.d.ts +18 -0
- package/dist/types/v2/overlays.d.ts +105 -0
- package/dist/types/v2/page-layer.d.ts +12 -0
- package/dist/types/v2/pane-name.d.ts +14 -0
- package/dist/types/v2/pane-print.d.ts +8 -0
- package/dist/types/v2/pane-sheet.d.ts +9 -0
- package/dist/types/v2/popover.d.ts +21 -0
- package/dist/types/v2/reaction-messages.d.ts +9 -0
- package/dist/types/v2/reactions.d.ts +41 -0
- package/dist/types/v2/row-drag.d.ts +6 -0
- package/dist/types/v2/section-level.d.ts +6 -0
- package/dist/types/v2/segmented.d.ts +36 -0
- package/dist/types/v2/select-live.d.ts +7 -0
- package/dist/types/v2/setting-messages.d.ts +10 -0
- package/dist/types/v2/split-button.d.ts +24 -0
- package/dist/types/v2/states.d.ts +31 -18
- package/dist/types/v2/status-toolbar.d.ts +13 -0
- package/dist/types/v2/structure.d.ts +58 -4
- package/dist/types/v2/testing/index.d.ts +3 -0
- package/dist/types/v2/testing/measure-v2-layout.d.ts +30 -9
- package/dist/types/v2/testing/settled.d.ts +2 -0
- package/dist/types/v2/testing/visible.d.ts +9 -0
- package/dist/types/v2/toast-host.d.ts +8 -0
- package/dist/types/v2/toast.d.ts +47 -0
- package/dist/types/v2/tokens.d.ts +13 -1
- package/dist/types/v2/tree-messages.d.ts +15 -0
- package/dist/types/v2/types.d.ts +38 -3
- package/dist/types/v2/unsaved-bar.d.ts +47 -0
- package/dist/types/v2/unsaved-messages.d.ts +31 -0
- package/dist/types/v2/width-cookie.d.ts +19 -0
- package/dist/types/v2/workspace-messages.d.ts +15 -0
- package/dist/v2.css +12208 -2043
- package/package.json +15 -6
- package/skills/k2b-ui/HANDOFF.md +77 -0
- package/skills/k2b-ui/SKILL.md +181 -123
- package/skills/k2b-ui/gold/code-policy-1440.png +0 -0
- package/skills/k2b-ui/gold/code-policy-390.png +0 -0
- package/skills/k2b-ui/gold/mail-mailbox-1440.png +0 -0
- package/skills/k2b-ui/gold/mail-mailbox-390.png +0 -0
- package/skills/k2b-ui/gold/notebooks-note-1440.png +0 -0
- package/skills/k2b-ui/gold/notebooks-note-390.png +0 -0
- package/skills/k2b-ui/gold/rhythm-after.png +0 -0
- package/skills/k2b-ui/gold/rhythm-before.png +0 -0
- package/skills/k2b-ui/gold/steps.png +0 -0
- package/skills/k2b-ui/images/actions-1440.png +0 -0
- package/skills/k2b-ui/images/actions-390.png +0 -0
- package/skills/k2b-ui/images/content-1440.png +0 -0
- package/skills/k2b-ui/images/content-390.png +0 -0
- package/skills/k2b-ui/images/conversations-1440.png +0 -0
- package/skills/k2b-ui/images/conversations-390.png +0 -0
- package/skills/k2b-ui/images/detail-sheet-1440.png +0 -0
- package/skills/k2b-ui/images/detail-sheet-390.png +0 -0
- package/skills/k2b-ui/images/dialogs-1440.png +0 -0
- package/skills/k2b-ui/images/dialogs-390.png +0 -0
- package/skills/k2b-ui/images/files-1440.png +0 -0
- package/skills/k2b-ui/images/files-390.png +0 -0
- package/skills/k2b-ui/images/filtered-table-1440.png +0 -0
- package/skills/k2b-ui/images/filtered-table-390.png +0 -0
- package/skills/k2b-ui/images/form-1440.png +0 -0
- package/skills/k2b-ui/images/form-detail-1440.png +0 -0
- package/skills/k2b-ui/images/form-detail-390.png +0 -0
- package/skills/k2b-ui/images/frame-1440.png +0 -0
- package/skills/k2b-ui/images/frame-390.png +0 -0
- package/skills/k2b-ui/images/home-1440.png +0 -0
- package/skills/k2b-ui/images/home-390.png +0 -0
- package/skills/k2b-ui/images/list-detail-1440.png +0 -0
- package/skills/k2b-ui/images/list-detail-390.png +0 -0
- package/skills/k2b-ui/images/mail-1440.png +0 -0
- package/skills/k2b-ui/images/mail-390.png +0 -0
- package/skills/k2b-ui/images/overview-1440.png +0 -0
- package/skills/k2b-ui/images/overview-390.png +0 -0
- package/skills/k2b-ui/images/public-page-1440.png +0 -0
- package/skills/k2b-ui/images/public-page-390.png +0 -0
- package/skills/k2b-ui/images/record-1440.png +0 -0
- package/skills/k2b-ui/images/record-390.png +0 -0
- package/skills/k2b-ui/images/record-groups-1440.png +0 -0
- package/skills/k2b-ui/images/record-groups-390.png +0 -0
- package/skills/k2b-ui/images/settings-1440.png +0 -0
- package/skills/k2b-ui/images/settings-390.png +0 -0
- package/skills/k2b-ui/images/settings-page-1440.png +0 -0
- package/skills/k2b-ui/images/settings-page-390.png +0 -0
- package/skills/k2b-ui/images/start-1440.png +0 -0
- package/skills/k2b-ui/images/start-390.png +0 -0
- package/skills/k2b-ui/images/states-1440.png +0 -0
- package/skills/k2b-ui/images/states-390.png +0 -0
- package/skills/k2b-ui/images/table-1440.png +0 -0
- package/skills/k2b-ui/images/table-390.png +0 -0
- package/skills/k2b-ui/images/tree-1440.png +0 -0
- package/skills/k2b-ui/images/tree-390.png +0 -0
- package/skills/k2b-ui/mockup/shoot.mjs +470 -0
- package/skills/k2b-ui/mockup/starter.html +607 -0
- package/skills/k2b-ui/port/check.mjs +48 -0
- package/skills/k2b-ui/recipes/actions.tsx +226 -0
- package/skills/k2b-ui/recipes/content.tsx +96 -0
- package/skills/k2b-ui/recipes/conversations.tsx +231 -0
- package/skills/k2b-ui/recipes/detail-sheet.tsx +87 -0
- package/skills/k2b-ui/recipes/dialogs.tsx +146 -0
- package/skills/k2b-ui/recipes/files.tsx +468 -0
- package/skills/k2b-ui/recipes/filtered-table.tsx +154 -0
- package/skills/k2b-ui/recipes/form-detail.tsx +143 -0
- package/skills/k2b-ui/recipes/form.tsx +55 -14
- package/skills/k2b-ui/recipes/frame.tsx +206 -0
- package/skills/k2b-ui/recipes/home.tsx +186 -0
- package/skills/k2b-ui/recipes/list-detail.tsx +85 -50
- package/skills/k2b-ui/recipes/mail.tsx +96 -59
- package/skills/k2b-ui/recipes/overview.tsx +303 -0
- package/skills/k2b-ui/recipes/public-page.tsx +315 -0
- package/skills/k2b-ui/recipes/record-groups.tsx +129 -66
- package/skills/k2b-ui/recipes/record.tsx +91 -47
- package/skills/k2b-ui/recipes/settings-page.tsx +269 -0
- package/skills/k2b-ui/recipes/settings.tsx +127 -0
- package/skills/k2b-ui/recipes/start.tsx +165 -0
- package/skills/k2b-ui/recipes/states.tsx +137 -0
- package/skills/k2b-ui/recipes/table.tsx +86 -43
- package/skills/k2b-ui/recipes/tree.tsx +109 -0
- package/skills/k2b-ui/references/gold.md +195 -0
- package/skills/k2b-ui/references/list-queries.md +74 -0
- package/skills/k2b-ui/references/look.md +468 -0
- package/skills/k2b-ui/references/mistakes.md +59 -3
- package/skills/k2b-ui/references/mockups.md +260 -0
- package/skills/k2b-ui/references/primitives.md +1227 -99
- package/skills/k2b-ui/references/recipes.md +425 -11
- package/skills/k2b-ui/references/seeing.md +10 -26
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The class names and tones of `NoticeCard`, apart from the component: Markdown's info blocks write the same markup as
|
|
2
|
+
// a string, and a module with components would bring them along into every bundle that needs only the names.
|
|
3
|
+
|
|
4
|
+
export const NOTICE_CARD_CLASSES = {
|
|
5
|
+
root: "k2b-notice-card",
|
|
6
|
+
icon: "k2b-notice-card__icon",
|
|
7
|
+
content: "k2b-notice-card__content",
|
|
8
|
+
head: "k2b-notice-card__head",
|
|
9
|
+
eyebrow: "k2b-notice-card__eyebrow",
|
|
10
|
+
title: "k2b-notice-card__title",
|
|
11
|
+
meta: "k2b-notice-card__meta",
|
|
12
|
+
description: "k2b-notice-card__description",
|
|
13
|
+
body: "k2b-notice-card__body",
|
|
14
|
+
actions: "k2b-notice-card__actions"
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=notice-card-classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["surfaces/notice-card-classes.ts"],"sourcesContent":["import type { IntentTone } from \"../semantics\";\n\n// The class names and tones of `NoticeCard`, apart from the component: Markdown's info blocks write the same markup as\n// a string, and a module with components would bring them along into every bundle that needs only the names.\n\nexport type NoticeTone = Extract<IntentTone, \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\"> | \"ai\";\n\nexport const NOTICE_CARD_CLASSES = {\n root: \"k2b-notice-card\",\n icon: \"k2b-notice-card__icon\",\n content: \"k2b-notice-card__content\",\n head: \"k2b-notice-card__head\",\n eyebrow: \"k2b-notice-card__eyebrow\",\n title: \"k2b-notice-card__title\",\n meta: \"k2b-notice-card__meta\",\n description: \"k2b-notice-card__description\",\n body: \"k2b-notice-card__body\",\n actions: \"k2b-notice-card__actions\",\n} as const;\n"],"mappings":"AAEA;AACA;;AAIA,OAAO,MAAM,mBAAmB,GAAG;EACjC,IAAI,EAAE,iBAAiB;EACvB,IAAI,EAAE,uBAAuB;EAC7B,OAAO,EAAE,0BAA0B;EACnC,IAAI,EAAE,uBAAuB;EAC7B,OAAO,EAAE,0BAA0B;EACnC,KAAK,EAAE,wBAAwB;EAC/B,IAAI,EAAE,uBAAuB;EAC7B,WAAW,EAAE,8BAA8B;EAC3C,IAAI,EAAE,uBAAuB;EAC7B,OAAO,EAAE;AACX,CAAU","ignoreList":[]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The colors that stand for a person: the tint behind avatar initials, a collaborator's cursor, and the marks and
|
|
3
|
-
* comments a person leaves.
|
|
4
|
-
*
|
|
3
|
+
* comments a person leaves. Eleven hues in the order of the color wheel, each dark enough for white initials (at least
|
|
4
|
+
* 4.5:1), and each pair apart by a CIEDE2000 of at least 5 also for people with protanopia, deuteranopia or tritanopia
|
|
5
|
+
* (person-color.test.ts checks both). The palette leaves out plum, which means AI, and yellow, which reads as a text
|
|
6
|
+
* highlight. Several people can share a color, so a person's name always appears next to it.
|
|
5
7
|
*/
|
|
6
|
-
export const PERSON_COLORS = ["#
|
|
8
|
+
export const PERSON_COLORS = ["#dc2626", "#9a3412", "#4d7c0f", "#15803d", "#065f46", "#0e7490", "#075985", "#475569", "#2563eb", "#3730a3", "#6d28d9"];
|
|
7
9
|
|
|
8
10
|
/** The palette index for a name, the order of the `.k2b-avatar[data-tint]` rules. Surrounding spaces do not count. */
|
|
9
11
|
export const personTint = name => {
|
|
@@ -13,6 +15,34 @@ export const personTint = name => {
|
|
|
13
15
|
return hash % PERSON_COLORS.length;
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* The same hues for the dark theme: each is the light hue 45 % towards white, one step for all, so the hues keep their
|
|
20
|
+
* order of lightness. A mark in a person's color (a comment bar, a passage, a dot, a presence swatch) keeps 3:1 on
|
|
21
|
+
* the dark surface with it, and soft initials 4.5:1 on their tint (person-color.test.ts checks both).
|
|
22
|
+
*/
|
|
23
|
+
export const PERSON_COLORS_DARK = ["#ec8888", "#c78f7d", "#9db77b", "#7eb994", "#76a799", "#7ab3c2", "#77a4bc", "#9aa2ac", "#87a9f4", "#918dcc", "#af89ea"];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A person's color from their display name, the same wherever Cloud shows that person. It is the fill behind white
|
|
27
|
+
* initials and a collaborator's caret with its white label, so it stays the same in both themes.
|
|
28
|
+
*/
|
|
17
29
|
export const personColor = name => PERSON_COLORS[personTint(name)];
|
|
30
|
+
|
|
31
|
+
/** A person's color for the dark theme (see `PERSON_COLORS_DARK`). */
|
|
32
|
+
export const personColorDark = name => PERSON_COLORS_DARK[personTint(name)];
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A person's color for a mark drawn on the page (a comment bar, a dot, a swatch): `light-dark()` of both hues, so the
|
|
36
|
+
* mark keeps 3:1 against the surface in either theme. Use it in CSS only, never where a hex is expected.
|
|
37
|
+
*/
|
|
38
|
+
export const personMarkColor = name => personMarkColorOf(personColor(name));
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The mark color of a stored person color: a hue of `PERSON_COLORS` becomes `light-dark()` of it and its dark step;
|
|
42
|
+
* any other color stays as it is. For contracts that keep the hex (a comment's author color) and draw it in CSS.
|
|
43
|
+
*/
|
|
44
|
+
export const personMarkColorOf = color => {
|
|
45
|
+
const index = PERSON_COLORS.findIndex(hue => hue === color.trim().toLowerCase());
|
|
46
|
+
return index < 0 ? color : `light-dark(${PERSON_COLORS[index]}, ${PERSON_COLORS_DARK[index]})`;
|
|
47
|
+
};
|
|
18
48
|
//# sourceMappingURL=person-color.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/person-color.ts"],"sourcesContent":["/**\n * The colors that stand for a person: the tint behind avatar initials, a collaborator's cursor, and the marks and\n * comments a person leaves. The palette leaves out plum, which means AI, and yellow, which reads as a text
|
|
1
|
+
{"version":3,"names":[],"sources":["surfaces/person-color.ts"],"sourcesContent":["/**\n * The colors that stand for a person: the tint behind avatar initials, a collaborator's cursor, and the marks and\n * comments a person leaves. Eleven hues in the order of the color wheel, each dark enough for white initials (at least\n * 4.5:1), and each pair apart by a CIEDE2000 of at least 5 also for people with protanopia, deuteranopia or tritanopia\n * (person-color.test.ts checks both). The palette leaves out plum, which means AI, and yellow, which reads as a text\n * highlight. Several people can share a color, so a person's name always appears next to it.\n */\nexport const PERSON_COLORS = [\n \"#dc2626\",\n \"#9a3412\",\n \"#4d7c0f\",\n \"#15803d\",\n \"#065f46\",\n \"#0e7490\",\n \"#075985\",\n \"#475569\",\n \"#2563eb\",\n \"#3730a3\",\n \"#6d28d9\",\n] as const;\n\n/** The palette index for a name, the order of the `.k2b-avatar[data-tint]` rules. Surrounding spaces do not count. */\nexport const personTint = (name: string): number => {\n const trimmed = name.trim();\n let hash = 0;\n for (let index = 0; index < trimmed.length; index++) hash = (hash * 31 + trimmed.charCodeAt(index)) >>> 0;\n return hash % PERSON_COLORS.length;\n};\n\n/**\n * The same hues for the dark theme: each is the light hue 45 % towards white, one step for all, so the hues keep their\n * order of lightness. A mark in a person's color (a comment bar, a passage, a dot, a presence swatch) keeps 3:1 on\n * the dark surface with it, and soft initials 4.5:1 on their tint (person-color.test.ts checks both).\n */\nexport const PERSON_COLORS_DARK = [\n \"#ec8888\",\n \"#c78f7d\",\n \"#9db77b\",\n \"#7eb994\",\n \"#76a799\",\n \"#7ab3c2\",\n \"#77a4bc\",\n \"#9aa2ac\",\n \"#87a9f4\",\n \"#918dcc\",\n \"#af89ea\",\n] as const;\n\n/**\n * A person's color from their display name, the same wherever Cloud shows that person. It is the fill behind white\n * initials and a collaborator's caret with its white label, so it stays the same in both themes.\n */\nexport const personColor = (name: string): string => PERSON_COLORS[personTint(name)]!;\n\n/** A person's color for the dark theme (see `PERSON_COLORS_DARK`). */\nexport const personColorDark = (name: string): string => PERSON_COLORS_DARK[personTint(name)]!;\n\n/**\n * A person's color for a mark drawn on the page (a comment bar, a dot, a swatch): `light-dark()` of both hues, so the\n * mark keeps 3:1 against the surface in either theme. Use it in CSS only, never where a hex is expected.\n */\nexport const personMarkColor = (name: string): string => personMarkColorOf(personColor(name));\n\n/**\n * The mark color of a stored person color: a hue of `PERSON_COLORS` becomes `light-dark()` of it and its dark step;\n * any other color stays as it is. For contracts that keep the hex (a comment's author color) and draw it in CSS.\n */\nexport const personMarkColorOf = (color: string): string => {\n const index = PERSON_COLORS.findIndex((hue) => hue === color.trim().toLowerCase());\n return index < 0 ? color : `light-dark(${PERSON_COLORS[index]}, ${PERSON_COLORS_DARK[index]})`;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,aAAa,GAAG,CAC3B,SA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CAAC,KAAK,CAAC,KAAK,kBAAkB,CAAC,KAAK,CAAC,GAAG;AAChG,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { appTint, BLACK, contrast, hexOf, mix, rgbOf, SURFACE_DARK, SURFACE_LIGHT, safeColor, selectedTint, WHITE } from "./colors";
|
|
2
|
+
|
|
3
|
+
// A page's own accent (`Workspace accent`): a part of its own, as `NavQuota` and `navTree` are, so a page without one
|
|
4
|
+
// loads none of its contrast work (1.1 KB of every island with a Workspace before, #4567).
|
|
5
|
+
|
|
6
|
+
/** The near-black words of v2 (`--k2-text` in light), the other ink a primary may take besides white. */
|
|
7
|
+
const NEAR_BLACK = [9, 9, 11];
|
|
8
|
+
/** WCAG 1.4.3: type keeps 4.5:1; WCAG 1.4.11: a bar or a symbol keeps 3:1. */
|
|
9
|
+
const TEXT = 4.5;
|
|
10
|
+
const GRAPHIC = 3;
|
|
11
|
+
|
|
12
|
+
/** A colour as the screen paints it: whole channels, as `hexOf` writes them. */
|
|
13
|
+
const painted = rgb => rgb.map(channel => Math.round(channel));
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The mildest whole-percent step of `color` towards `target` that keeps `ratio` against every ground, judged on the
|
|
17
|
+
* channels it is painted with; `target` itself when no step does.
|
|
18
|
+
*/
|
|
19
|
+
const readableStep = (color, target, grounds, ratio) => {
|
|
20
|
+
for (let step = 0; step <= 100; step++) {
|
|
21
|
+
const moved = painted(mix(target, step / 100, color));
|
|
22
|
+
if (grounds.every(ground => contrast(moved, ground) >= ratio)) return moved;
|
|
23
|
+
}
|
|
24
|
+
return target;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The lightest tone of `color` (towards the surface, the first ground) that still keeps `ratio` against every ground;
|
|
29
|
+
* moved away from them first if it does not yet.
|
|
30
|
+
*/
|
|
31
|
+
const quietTone = (color, grounds, away, ratio) => {
|
|
32
|
+
let quiet = readableStep(color, away, grounds, ratio);
|
|
33
|
+
for (let step = 1; step <= 100; step++) {
|
|
34
|
+
const moved = painted(mix(grounds[0], step / 100, quiet));
|
|
35
|
+
if (grounds.some(ground => contrast(moved, ground) < ratio)) break;
|
|
36
|
+
quiet = moved;
|
|
37
|
+
}
|
|
38
|
+
return quiet;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The fill of the primary action and its words: white when it keeps 4.5:1 on the colour, else the near-black of v2
|
|
43
|
+
* when that does; a colour on which neither does (a narrow band of middle tones) is darkened until white does.
|
|
44
|
+
*/
|
|
45
|
+
const primaryOn = rgb => {
|
|
46
|
+
if (contrast(WHITE, rgb) >= TEXT) return {
|
|
47
|
+
fill: painted(rgb),
|
|
48
|
+
ink: WHITE
|
|
49
|
+
};
|
|
50
|
+
if (contrast(NEAR_BLACK, rgb) >= TEXT) return {
|
|
51
|
+
fill: painted(rgb),
|
|
52
|
+
ink: NEAR_BLACK
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
fill: readableStep(rgb, BLACK, [WHITE], TEXT),
|
|
56
|
+
ink: WHITE
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** A hex colour without alpha: the only form whose contrast can be worked out before the page paints. */
|
|
61
|
+
const OPAQUE_HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The style values of a page's own accent (`Workspace accent`), a colour from data: the colour as the app's colour
|
|
65
|
+
* (`--k2-app`, from which the stylesheet mixes the tint), the primary's fill and words (`--k2-primary`,
|
|
66
|
+
* `--k2-primary-ink`, see `primaryOn`), and for each theme the colour as text (`--k2-accent-ink-light` / `-dark`:
|
|
67
|
+
* darkened in light, lightened in dark, until it keeps 4.5:1 on the surface and on the tint), the quiet tone of a bar
|
|
68
|
+
* (`--k2-accent-soft-light` / `-dark`: as light as 3:1 allows on every ground a bar stands on: the surface, the app's
|
|
69
|
+
* tint and the blue tint of a chosen row), and the primary's edge (`--k2-accent-edge-light` / `-dark`: the fill where
|
|
70
|
+
* it keeps 3:1 on the surface, else the mildest step of it that does, so a pale colour still shows its button). Only
|
|
71
|
+
* an opaque hex colour that passes `safeColor` counts; anything else gives nothing, and the app's colour stands.
|
|
72
|
+
*/
|
|
73
|
+
export const accentStyle = value => {
|
|
74
|
+
const color = safeColor(value);
|
|
75
|
+
const rgb = color !== undefined && OPAQUE_HEX.test(color) ? rgbOf(color) : undefined;
|
|
76
|
+
if (!rgb) return undefined;
|
|
77
|
+
const {
|
|
78
|
+
fill,
|
|
79
|
+
ink
|
|
80
|
+
} = primaryOn(rgb);
|
|
81
|
+
const tintLight = mix(rgb, appTint.light, SURFACE_LIGHT);
|
|
82
|
+
const tintDark = mix(rgb, appTint.dark, SURFACE_DARK);
|
|
83
|
+
const groundsLight = [SURFACE_LIGHT, tintLight, painted(tintLight), selectedTint.light];
|
|
84
|
+
const groundsDark = [SURFACE_DARK, tintDark, painted(tintDark), selectedTint.dark];
|
|
85
|
+
return {
|
|
86
|
+
"--k2-app": hexOf(rgb),
|
|
87
|
+
"--k2-primary": hexOf(fill),
|
|
88
|
+
"--k2-primary-ink": hexOf(ink),
|
|
89
|
+
"--k2-accent-edge-light": hexOf(readableStep(fill, BLACK, [SURFACE_LIGHT], GRAPHIC)),
|
|
90
|
+
"--k2-accent-edge-dark": hexOf(readableStep(fill, WHITE, [SURFACE_DARK], GRAPHIC)),
|
|
91
|
+
"--k2-accent-ink-light": hexOf(readableStep(rgb, BLACK, [SURFACE_LIGHT, tintLight, painted(tintLight)], TEXT)),
|
|
92
|
+
"--k2-accent-ink-dark": hexOf(readableStep(rgb, WHITE, [SURFACE_DARK, tintDark, painted(tintDark)], TEXT)),
|
|
93
|
+
"--k2-accent-soft-light": hexOf(quietTone(rgb, groundsLight, BLACK, GRAPHIC)),
|
|
94
|
+
"--k2-accent-soft-dark": hexOf(quietTone(rgb, groundsDark, WHITE, GRAPHIC))
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* A page's accent as `pageAccent` worked it out: the style values `Workspace accent` sets (each still passes the
|
|
100
|
+
* Workspace's value guard), and nothing else.
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The accent of a page from a colour from data (such as the colour a place or a team chose), for `Workspace accent`:
|
|
105
|
+
* its readable tones, worked out where the colour arrives, on the server too, so the first paint is final (see
|
|
106
|
+
* `accentStyle`). Only `#rrggbb` or `#rgb` counts; any other value gives nothing, and the app's colour stands.
|
|
107
|
+
*/
|
|
108
|
+
export const pageAccent = color => {
|
|
109
|
+
const vars = accentStyle(color);
|
|
110
|
+
return vars ? {
|
|
111
|
+
vars
|
|
112
|
+
} : undefined;
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=accent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/accent.ts"],"sourcesContent":["import {\n appTint,\n BLACK,\n contrast,\n hexOf,\n mix,\n type Rgb,\n rgbOf,\n SURFACE_DARK,\n SURFACE_LIGHT,\n safeColor,\n selectedTint,\n WHITE,\n} from \"./colors\";\n\n// A page's own accent (`Workspace accent`): a part of its own, as `NavQuota` and `navTree` are, so a page without one\n// loads none of its contrast work (1.1 KB of every island with a Workspace before, #4567).\n\n/** The near-black words of v2 (`--k2-text` in light), the other ink a primary may take besides white. */\nconst NEAR_BLACK: Rgb = [9, 9, 11];\n/** WCAG 1.4.3: type keeps 4.5:1; WCAG 1.4.11: a bar or a symbol keeps 3:1. */\nconst TEXT = 4.5;\nconst GRAPHIC = 3;\n\n/** A colour as the screen paints it: whole channels, as `hexOf` writes them. */\nconst painted = (rgb: Rgb): Rgb => rgb.map((channel) => Math.round(channel)) as unknown as Rgb;\n\n/**\n * The mildest whole-percent step of `color` towards `target` that keeps `ratio` against every ground, judged on the\n * channels it is painted with; `target` itself when no step does.\n */\nconst readableStep = (color: Rgb, target: Rgb, grounds: readonly Rgb[], ratio: number): Rgb => {\n for (let step = 0; step <= 100; step++) {\n const moved = painted(mix(target, step / 100, color));\n if (grounds.every((ground) => contrast(moved, ground) >= ratio)) return moved;\n }\n return target;\n};\n\n/**\n * The lightest tone of `color` (towards the surface, the first ground) that still keeps `ratio` against every ground;\n * moved away from them first if it does not yet.\n */\nconst quietTone = (color: Rgb, grounds: readonly [Rgb, ...Rgb[]], away: Rgb, ratio: number): Rgb => {\n let quiet = readableStep(color, away, grounds, ratio);\n for (let step = 1; step <= 100; step++) {\n const moved = painted(mix(grounds[0], step / 100, quiet));\n if (grounds.some((ground) => contrast(moved, ground) < ratio)) break;\n quiet = moved;\n }\n return quiet;\n};\n\n/**\n * The fill of the primary action and its words: white when it keeps 4.5:1 on the colour, else the near-black of v2\n * when that does; a colour on which neither does (a narrow band of middle tones) is darkened until white does.\n */\nconst primaryOn = (rgb: Rgb): { fill: Rgb; ink: Rgb } => {\n if (contrast(WHITE, rgb) >= TEXT) return { fill: painted(rgb), ink: WHITE };\n if (contrast(NEAR_BLACK, rgb) >= TEXT) return { fill: painted(rgb), ink: NEAR_BLACK };\n return { fill: readableStep(rgb, BLACK, [WHITE], TEXT), ink: WHITE };\n};\n\n/** A hex colour without alpha: the only form whose contrast can be worked out before the page paints. */\nconst OPAQUE_HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/**\n * The style values of a page's own accent (`Workspace accent`), a colour from data: the colour as the app's colour\n * (`--k2-app`, from which the stylesheet mixes the tint), the primary's fill and words (`--k2-primary`,\n * `--k2-primary-ink`, see `primaryOn`), and for each theme the colour as text (`--k2-accent-ink-light` / `-dark`:\n * darkened in light, lightened in dark, until it keeps 4.5:1 on the surface and on the tint), the quiet tone of a bar\n * (`--k2-accent-soft-light` / `-dark`: as light as 3:1 allows on every ground a bar stands on: the surface, the app's\n * tint and the blue tint of a chosen row), and the primary's edge (`--k2-accent-edge-light` / `-dark`: the fill where\n * it keeps 3:1 on the surface, else the mildest step of it that does, so a pale colour still shows its button). Only\n * an opaque hex colour that passes `safeColor` counts; anything else gives nothing, and the app's colour stands.\n */\nexport const accentStyle = (value: string | undefined): Record<string, string> | undefined => {\n const color = safeColor(value);\n const rgb = color !== undefined && OPAQUE_HEX.test(color) ? rgbOf(color) : undefined;\n if (!rgb) return undefined;\n const { fill, ink } = primaryOn(rgb);\n const tintLight = mix(rgb, appTint.light, SURFACE_LIGHT);\n const tintDark = mix(rgb, appTint.dark, SURFACE_DARK);\n const groundsLight = [SURFACE_LIGHT, tintLight, painted(tintLight), selectedTint.light] as const;\n const groundsDark = [SURFACE_DARK, tintDark, painted(tintDark), selectedTint.dark] as const;\n return {\n \"--k2-app\": hexOf(rgb),\n \"--k2-primary\": hexOf(fill),\n \"--k2-primary-ink\": hexOf(ink),\n \"--k2-accent-edge-light\": hexOf(readableStep(fill, BLACK, [SURFACE_LIGHT], GRAPHIC)),\n \"--k2-accent-edge-dark\": hexOf(readableStep(fill, WHITE, [SURFACE_DARK], GRAPHIC)),\n \"--k2-accent-ink-light\": hexOf(readableStep(rgb, BLACK, [SURFACE_LIGHT, tintLight, painted(tintLight)], TEXT)),\n \"--k2-accent-ink-dark\": hexOf(readableStep(rgb, WHITE, [SURFACE_DARK, tintDark, painted(tintDark)], TEXT)),\n \"--k2-accent-soft-light\": hexOf(quietTone(rgb, groundsLight, BLACK, GRAPHIC)),\n \"--k2-accent-soft-dark\": hexOf(quietTone(rgb, groundsDark, WHITE, GRAPHIC)),\n };\n};\n\n/**\n * A page's accent as `pageAccent` worked it out: the style values `Workspace accent` sets (each still passes the\n * Workspace's value guard), and nothing else.\n */\nexport type PageAccent = { readonly vars: Readonly<Record<string, string>> };\n\n/**\n * The accent of a page from a colour from data (such as the colour a place or a team chose), for `Workspace accent`:\n * its readable tones, worked out where the colour arrives, on the server too, so the first paint is final (see\n * `accentStyle`). Only `#rrggbb` or `#rgb` counts; any other value gives nothing, and the app's colour stands.\n */\nexport const pageAccent = (color: string | undefined): PageAccent | undefined => {\n const vars = accentStyle(color);\n return vars ? { vars } : undefined;\n};\n"],"mappings":"AAAA,SACE,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,EAEH,KAAK,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,YAAY,EACZ,KAAK,QACA,UAAU;;AAEjB;AACA;;AAEA;AACA,MAAM,UAAe,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;AAClC;AACA,MAAM,IAAI,GAAG,GAAG;AAChB,MAAM,OAAO,GAAG,CAAC;;AAEjB;AACA,MAAM,OAAO,GAAI,GAAQ,IAAU,GAAG,CAAC,GAAG,CAAE,OAAO,IAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAmB;;AAE9F;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,CAAC,KAAU,EAAE,MAAW,EAAE,OAAuB,EAAE,KAAa,KAAU;EAC7F,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,IAAI,GAAG,EAAE,IAAI,EAAE,EAAE;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC;IACrD,IAAI,OAAO,CAAC,KAAK,CAAE,MAAM,IAAK,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,OAAO,KAAK;EAC/E;EACA,OAAO,MAAM;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,OAAiC,EAAE,IAAS,EAAE,KAAa,KAAU;EAClG,IAAI,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC;EACrD,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,IAAI,GAAG,EAAE,IAAI,EAAE,EAAE;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC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ACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,UAAU,GAAI,KAAyB,IAA6B;EAC/E,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC;EAC/B,OAAO,IAAI,GAAG;IAAE;EAAK,CAAC,GAAG,SAAS;AACpC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { memo as _$memo } from "solid-js/web";
|
|
2
|
+
import { ssr as _$ssr } from "solid-js/web";
|
|
3
|
+
import { createComponent as _$createComponent } 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$ = ["<span class=\"k2-actionbar-more\">", "</span>"],
|
|
7
|
+
_tmpl$2 = ["<div class=\"k2-actionbar\" data-k2-part=\"ActionBar\" role=\"group\"", ">", "", "</div>"],
|
|
8
|
+
_tmpl$3 = ["<span class=\"k2-actionbar-words\">", "</span>"],
|
|
9
|
+
_tmpl$4 = ["<span class=\"k2-actionbar-short\">", "</span>"],
|
|
10
|
+
_tmpl$5 = ["<kbd class=\"k2-actionbar-keys\" aria-hidden=\"true\">", "</kbd>"],
|
|
11
|
+
_tmpl$6 = ["<span class=\"k2-actionbar-item\"", ">", "</span>"];
|
|
12
|
+
import { For, Show } from "solid-js";
|
|
13
|
+
import { Button } from "./button";
|
|
14
|
+
import { Menu } from "./menu";
|
|
15
|
+
/**
|
|
16
|
+
* The floating bar of the actions on one thing, such as a search hit in its preview: a light pill at the bottom of a
|
|
17
|
+
* scrolling column, in the middle, on the surface of the `UnsavedBar` (look rule 12); the main action filled, the
|
|
18
|
+
* others without a frame, each with the keys that do the same. Put it last in a column that scrolls in its own
|
|
19
|
+
* flex column: it sticks 16 px above the column's bottom and keeps the room of its own height at the end, so scrolled
|
|
20
|
+
* to the end the last line stands above it and it covers nothing. On the phone it spans the column above the safe
|
|
21
|
+
* area, without keys; actions with `folds` move into its "…" menu.
|
|
22
|
+
*/
|
|
23
|
+
export const ActionBar = props => {
|
|
24
|
+
const folding = () => props.actions.filter(action => action.folds);
|
|
25
|
+
return _$ssr(_tmpl$2, _$ssrAttribute("aria-label", _$escape(props.label, true), false), _$escape(_$createComponent(For, {
|
|
26
|
+
get each() {
|
|
27
|
+
return props.actions;
|
|
28
|
+
},
|
|
29
|
+
children: action => _$ssr(_tmpl$6, _$ssrAttribute("data-primary", action.primary ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-folds", action.folds ? "" : _$escape(undefined, true), false), _$escape(_$createComponent(Button, {
|
|
30
|
+
get variant() {
|
|
31
|
+
return action.primary ? "primary" : "ghost";
|
|
32
|
+
},
|
|
33
|
+
get icon() {
|
|
34
|
+
return action.icon;
|
|
35
|
+
},
|
|
36
|
+
get href() {
|
|
37
|
+
return action.href;
|
|
38
|
+
},
|
|
39
|
+
get onClick() {
|
|
40
|
+
return action.onClick && (event => action.onClick?.(event));
|
|
41
|
+
},
|
|
42
|
+
get disabled() {
|
|
43
|
+
return action.disabled;
|
|
44
|
+
},
|
|
45
|
+
get busy() {
|
|
46
|
+
return action.busy;
|
|
47
|
+
},
|
|
48
|
+
get label() {
|
|
49
|
+
return _$memo(() => !!action.short)() ? action.label : undefined;
|
|
50
|
+
},
|
|
51
|
+
get children() {
|
|
52
|
+
return [_$ssr(_tmpl$3, _$escape(action.label)), _$createComponent(Show, {
|
|
53
|
+
get when() {
|
|
54
|
+
return action.short;
|
|
55
|
+
},
|
|
56
|
+
get children() {
|
|
57
|
+
return _$ssr(_tmpl$4, _$escape(action.short));
|
|
58
|
+
}
|
|
59
|
+
}), _$createComponent(Show, {
|
|
60
|
+
get when() {
|
|
61
|
+
return action.keys;
|
|
62
|
+
},
|
|
63
|
+
get children() {
|
|
64
|
+
return _$ssr(_tmpl$5, _$escape(action.keys));
|
|
65
|
+
}
|
|
66
|
+
})];
|
|
67
|
+
}
|
|
68
|
+
})))
|
|
69
|
+
})), _$escape(_$createComponent(Show, {
|
|
70
|
+
get when() {
|
|
71
|
+
return folding().length > 0;
|
|
72
|
+
},
|
|
73
|
+
get children() {
|
|
74
|
+
return _$ssr(_tmpl$, _$escape(_$createComponent(Menu, {
|
|
75
|
+
get items() {
|
|
76
|
+
return folding().map(action => ({
|
|
77
|
+
label: action.label,
|
|
78
|
+
icon: action.icon,
|
|
79
|
+
href: action.href,
|
|
80
|
+
disabled: action.disabled || action.busy,
|
|
81
|
+
onClick: action.href ? undefined : () => action.onClick?.()
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
})));
|
|
85
|
+
}
|
|
86
|
+
})));
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=action-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/action-bar.tsx"],"sourcesContent":["import { For, Show } from \"solid-js\";\nimport { Button } from \"./button\";\nimport { Menu } from \"./menu\";\n\nexport type ActionBarAction = {\n /** The words of the action, such as \"Antworten\" or \"In Mail öffnen\". */\n label: string;\n /** Shorter words for the phone, where the bar spans the screen, such as \"Öffnen\" for \"In Mail öffnen\". */\n short?: string;\n /** A Tabler icon name before the words. */\n icon?: string;\n /** The one main action of the bar: filled blue, and on the phone it takes the room the others leave. At most one. */\n primary?: boolean;\n /** The keys that do the same, shown beside the words on a wide screen: \"⌘↵\". */\n keys?: string;\n /** On the phone the action moves into the bar's \"…\" menu; the main action and the others stay in sight. */\n folds?: boolean;\n /** The page the action opens, as a link. */\n href?: string;\n /** The deed; a press on the button passes its event (a modified click), an entry of the \"…\" menu none. */\n onClick?: (event?: MouseEvent) => void;\n /** The action cannot be taken now. */\n disabled?: boolean;\n /** The action is under way: a turning sign, no second press. */\n busy?: boolean;\n};\n\nexport type ActionBarProps = {\n /** The name of the bar for assistive technology, such as \"Aktionen für Rechnung 2026-118\". */\n label: string;\n /** The actions in their order; the main one carries `primary`. */\n actions: readonly ActionBarAction[];\n};\n\n/**\n * The floating bar of the actions on one thing, such as a search hit in its preview: a light pill at the bottom of a\n * scrolling column, in the middle, on the surface of the `UnsavedBar` (look rule 12); the main action filled, the\n * others without a frame, each with the keys that do the same. Put it last in a column that scrolls in its own\n * flex column: it sticks 16 px above the column's bottom and keeps the room of its own height at the end, so scrolled\n * to the end the last line stands above it and it covers nothing. On the phone it spans the column above the safe\n * area, without keys; actions with `folds` move into its \"…\" menu.\n */\nexport const ActionBar = (props: ActionBarProps) => {\n const folding = () => props.actions.filter((action) => action.folds);\n return (\n <div class=\"k2-actionbar\" data-k2-part=\"ActionBar\" role=\"group\" aria-label={props.label}>\n <For each={props.actions}>\n {(action) => (\n <span class=\"k2-actionbar-item\" data-primary={action.primary ? \"\" : undefined} data-folds={action.folds ? \"\" : undefined}>\n <Button\n variant={action.primary ? \"primary\" : \"ghost\"}\n icon={action.icon}\n href={action.href}\n onClick={action.onClick && ((event) => action.onClick?.(event))}\n disabled={action.disabled}\n busy={action.busy}\n label={action.short ? action.label : undefined}\n >\n <span class=\"k2-actionbar-words\">{action.label}</span>\n <Show when={action.short}>\n <span class=\"k2-actionbar-short\">{action.short}</span>\n </Show>\n <Show when={action.keys}>\n <kbd class=\"k2-actionbar-keys\" aria-hidden=\"true\">\n {action.keys}\n </kbd>\n </Show>\n </Button>\n </span>\n )}\n </For>\n <Show when={folding().length > 0}>\n <span class=\"k2-actionbar-more\">\n <Menu\n items={folding().map((action) => ({\n label: action.label,\n icon: action.icon,\n href: action.href,\n disabled: action.disabled || action.busy,\n onClick: action.href ? undefined : () => action.onClick?.(),\n }))}\n />\n </span>\n </Show>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,GAAG,EAAE,IAAI,QAAQ,UAAU;AACpC,SAAS,MAAM,QAAQ,UAAU;AACjC,SAAS,IAAI,QAAQ,QAAQ;AAgC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,SAAS,GAAI,KAAqB,IAAK;EAClD,MAAM,OAAO,GAAG,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,KAAK;UAAA,OAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAE,MAAM,KAAM;YAChC,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI;YACxC,OAAO,EAAE,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,MAAM,CAAC,OAAO,GAAG;UAC5D,CAAC,CAAC,CAAC;QAAA;MAAA;IAAA;EAAA;AAMf,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* E-mail addresses in a typed or pasted text, read in one pass: `a@b.example`, `Name <a@b.example>`,
|
|
3
|
+
* `"Berg, Anna" <a@b.example>` and Outlook's `'a@b.example' <a@b.example>`. A semicolon and a new line always end an
|
|
4
|
+
* entry; a comma ends one too, except a comma before `<…>` with no address before it, which belongs to the name
|
|
5
|
+
* (`Berg, Anna <a@b.example>`); a space ends a bare address. A quote or a `<` that is never closed holds the rest of
|
|
6
|
+
* the text, which is then no address and stays. The time grows with the length of the text, never faster.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const separator = c => c === "," || c === ";" || c === "\n" || c === "\r";
|
|
10
|
+
/** A separator that always ends an entry: only a comma may belong to a name. */
|
|
11
|
+
const hard = c => c === ";" || c === "\n" || c === "\r";
|
|
12
|
+
const space = c => c === " " || c === "\t";
|
|
13
|
+
|
|
14
|
+
/** The address of a display form: what stands in `<…>`, or the whole. */
|
|
15
|
+
export const addressOf = display => {
|
|
16
|
+
const open = display.lastIndexOf("<");
|
|
17
|
+
return (open >= 0 && display.endsWith(">") ? display.slice(open + 1, -1) : display).trim();
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Whether a text is one address: a local part, an @ and a domain with a dot, no spaces, quotes or brackets. */
|
|
21
|
+
export const isAddress = text => {
|
|
22
|
+
const at = text.indexOf("@");
|
|
23
|
+
if (at <= 0 || at !== text.lastIndexOf("@")) return false;
|
|
24
|
+
const domain = text.slice(at + 1);
|
|
25
|
+
const dot = domain.indexOf(".");
|
|
26
|
+
if (dot <= 0 || domain.endsWith(".") || domain.includes("..")) return false;
|
|
27
|
+
for (const c of text) if (space(c) || separator(c) || c === "<" || c === ">" || c === '"' || c === "\n") return false;
|
|
28
|
+
return true;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** The same address in another form or case: the key two chips must not share. */
|
|
32
|
+
export const addressKey = display => addressOf(display).toLowerCase();
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* With `final` the last entry counts too; without, only entries a separator closed, so an address still being typed
|
|
36
|
+
* (`mia@lindqvist.e`) is not taken before it is done (Enter, a paste or leaving the field take it).
|
|
37
|
+
*/
|
|
38
|
+
export const scanAddresses = (text, {
|
|
39
|
+
final = true
|
|
40
|
+
} = {}) => {
|
|
41
|
+
const tokens = [];
|
|
42
|
+
let start = 0;
|
|
43
|
+
// the quote that opened a quoted name: `"`, or `'` at the start of an entry (Outlook's `'a@b' <a@b>`; inside a
|
|
44
|
+
// name, as in O'Brien, it is a letter)
|
|
45
|
+
let quoted = null;
|
|
46
|
+
let fresh = true;
|
|
47
|
+
let angled = false;
|
|
48
|
+
let address = false;
|
|
49
|
+
// separators in a token before its address: they end it, unless `<…>` comes after them (then they are its name's)
|
|
50
|
+
let held = [];
|
|
51
|
+
const cut = end => {
|
|
52
|
+
let from = start;
|
|
53
|
+
for (const at of held) {
|
|
54
|
+
tokens.push([from, at]);
|
|
55
|
+
from = at + 1;
|
|
56
|
+
}
|
|
57
|
+
tokens.push([from, end]);
|
|
58
|
+
held = [];
|
|
59
|
+
address = false;
|
|
60
|
+
fresh = true;
|
|
61
|
+
start = end + 1;
|
|
62
|
+
};
|
|
63
|
+
for (let i = 0; i < text.length; i++) {
|
|
64
|
+
const c = text[i];
|
|
65
|
+
if (quoted) {
|
|
66
|
+
if (c === "\\") i++;else if (c === quoted) quoted = null;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (angled) {
|
|
70
|
+
if (c === ">") {
|
|
71
|
+
angled = false;
|
|
72
|
+
address = true;
|
|
73
|
+
}
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const first = fresh && !space(c) && !separator(c);
|
|
77
|
+
if (!space(c) && !separator(c)) fresh = false;
|
|
78
|
+
if (c === '"' || c === "'" && first) quoted = c;else if (c === "<") {
|
|
79
|
+
angled = true;
|
|
80
|
+
held = [];
|
|
81
|
+
} else if (c === "@") address = true;else if (separator(c) || space(c) && address) {
|
|
82
|
+
if (address || hard(c)) cut(i);else held.push(i);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// the entry after the last separator: taken when the text is done, else it is still being typed, and stays so
|
|
86
|
+
const typing = final ? "" : text.slice(start);
|
|
87
|
+
if (final) cut(text.length);
|
|
88
|
+
const found = [];
|
|
89
|
+
const taken = [];
|
|
90
|
+
for (const [from, to] of tokens) {
|
|
91
|
+
const display = text.slice(from, to).trim();
|
|
92
|
+
if (display && isAddress(addressOf(display))) {
|
|
93
|
+
found.push(display);
|
|
94
|
+
taken.push([from, to]);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// the rest keeps its own words and separators; only the addresses taken out leave it
|
|
98
|
+
let rest = "";
|
|
99
|
+
let at = 0;
|
|
100
|
+
for (const [from, to] of taken) {
|
|
101
|
+
rest += text.slice(at, from);
|
|
102
|
+
at = to;
|
|
103
|
+
}
|
|
104
|
+
rest += text.slice(at, final ? text.length : start);
|
|
105
|
+
const closed = trimSeparators(rest);
|
|
106
|
+
const open = typing.trimStart();
|
|
107
|
+
if (!open) return {
|
|
108
|
+
found,
|
|
109
|
+
rest: closed
|
|
110
|
+
};
|
|
111
|
+
// a closed rest and the open entry keep the separator between them
|
|
112
|
+
const between = text[start - 1] === "," || text[start - 1] === ";" ? `${text[start - 1]} ` : "\n";
|
|
113
|
+
return {
|
|
114
|
+
found,
|
|
115
|
+
rest: closed ? closed + between + open : open
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** A text without separators and spaces at its ends, and with one in place of a run of them inside. */
|
|
120
|
+
const trimSeparators = text => {
|
|
121
|
+
let out = "";
|
|
122
|
+
let pending = "";
|
|
123
|
+
for (const c of text) {
|
|
124
|
+
if (separator(c) || space(c)) {
|
|
125
|
+
// a separator wins over a space inside a run, so "a , b" keeps its comma
|
|
126
|
+
if (!pending || separator(c) && !separator(pending)) pending = c === "\r" ? "\n" : c;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (out && pending) out += pending === "\n" ? "\n" : separator(pending) ? `${pending} ` : " ";
|
|
130
|
+
pending = "";
|
|
131
|
+
out += c;
|
|
132
|
+
}
|
|
133
|
+
return out;
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=addresses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/addresses.ts"],"sourcesContent":["/**\n * E-mail addresses in a typed or pasted text, read in one pass: `a@b.example`, `Name <a@b.example>`,\n * `\"Berg, Anna\" <a@b.example>` and Outlook's `'a@b.example' <a@b.example>`. A semicolon and a new line always end an\n * entry; a comma ends one too, except a comma before `<…>` with no address before it, which belongs to the name\n * (`Berg, Anna <a@b.example>`); a space ends a bare address. A quote or a `<` that is never closed holds the rest of\n * the text, which is then no address and stays. The time grows with the length of the text, never faster.\n */\n\nexport type ScannedAddresses = {\n /** The addresses in their display form (`Name <a@b.example>` or `a@b.example`), in their order. */\n found: string[];\n /** What is no address, with its own separators, to stay in the field. */\n rest: string;\n};\n\nconst separator = (c: string) => c === \",\" || c === \";\" || c === \"\\n\" || c === \"\\r\";\n/** A separator that always ends an entry: only a comma may belong to a name. */\nconst hard = (c: string) => c === \";\" || c === \"\\n\" || c === \"\\r\";\nconst space = (c: string) => c === \" \" || c === \"\\t\";\n\n/** The address of a display form: what stands in `<…>`, or the whole. */\nexport const addressOf = (display: string): string => {\n const open = display.lastIndexOf(\"<\");\n return (open >= 0 && display.endsWith(\">\") ? display.slice(open + 1, -1) : display).trim();\n};\n\n/** Whether a text is one address: a local part, an @ and a domain with a dot, no spaces, quotes or brackets. */\nexport const isAddress = (text: string): boolean => {\n const at = text.indexOf(\"@\");\n if (at <= 0 || at !== text.lastIndexOf(\"@\")) return false;\n const domain = text.slice(at + 1);\n const dot = domain.indexOf(\".\");\n if (dot <= 0 || domain.endsWith(\".\") || domain.includes(\"..\")) return false;\n for (const c of text) if (space(c) || separator(c) || c === \"<\" || c === \">\" || c === '\"' || c === \"\\n\") return false;\n return true;\n};\n\n/** The same address in another form or case: the key two chips must not share. */\nexport const addressKey = (display: string): string => addressOf(display).toLowerCase();\n\n/**\n * With `final` the last entry counts too; without, only entries a separator closed, so an address still being typed\n * (`mia@lindqvist.e`) is not taken before it is done (Enter, a paste or leaving the field take it).\n */\nexport const scanAddresses = (text: string, { final = true }: { final?: boolean } = {}): ScannedAddresses => {\n const tokens: [number, number][] = [];\n let start = 0;\n // the quote that opened a quoted name: `\"`, or `'` at the start of an entry (Outlook's `'a@b' <a@b>`; inside a\n // name, as in O'Brien, it is a letter)\n let quoted: string | null = null;\n let fresh = true;\n let angled = false;\n let address = false;\n // separators in a token before its address: they end it, unless `<…>` comes after them (then they are its name's)\n let held: number[] = [];\n const cut = (end: number) => {\n let from = start;\n for (const at of held) {\n tokens.push([from, at]);\n from = at + 1;\n }\n tokens.push([from, end]);\n held = [];\n address = false;\n fresh = true;\n start = end + 1;\n };\n for (let i = 0; i < text.length; i++) {\n const c = text[i]!;\n if (quoted) {\n if (c === \"\\\\\") i++;\n else if (c === quoted) quoted = null;\n continue;\n }\n if (angled) {\n if (c === \">\") {\n angled = false;\n address = true;\n }\n continue;\n }\n const first = fresh && !space(c) && !separator(c);\n if (!space(c) && !separator(c)) fresh = false;\n if (c === '\"' || (c === \"'\" && first)) quoted = c;\n else if (c === \"<\") {\n angled = true;\n held = [];\n } else if (c === \"@\") address = true;\n else if (separator(c) || (space(c) && address)) {\n if (address || hard(c)) cut(i);\n else held.push(i);\n }\n }\n // the entry after the last separator: taken when the text is done, else it is still being typed, and stays so\n const typing = final ? \"\" : text.slice(start);\n if (final) cut(text.length);\n\n const found: string[] = [];\n const taken: [number, number][] = [];\n for (const [from, to] of tokens) {\n const display = text.slice(from, to).trim();\n if (display && isAddress(addressOf(display))) {\n found.push(display);\n taken.push([from, to]);\n }\n }\n // the rest keeps its own words and separators; only the addresses taken out leave it\n let rest = \"\";\n let at = 0;\n for (const [from, to] of taken) {\n rest += text.slice(at, from);\n at = to;\n }\n rest += text.slice(at, final ? text.length : start);\n const closed = trimSeparators(rest);\n const open = typing.trimStart();\n if (!open) return { found, rest: closed };\n // a closed rest and the open entry keep the separator between them\n const between = text[start - 1] === \",\" || text[start - 1] === \";\" ? `${text[start - 1]} ` : \"\\n\";\n return { found, rest: closed ? closed + between + open : open };\n};\n\n/** A text without separators and spaces at its ends, and with one in place of a run of them inside. */\nconst trimSeparators = (text: string): string => {\n let out = \"\";\n let pending = \"\";\n for (const c of text) {\n if (separator(c) || space(c)) {\n // a separator wins over a space inside a run, so \"a , b\" keeps its comma\n if (!pending || (separator(c) && !separator(pending))) pending = c === \"\\r\" ? \"\\n\" : c;\n continue;\n }\n if (out && pending) out += pending === \"\\n\" ? \"\\n\" : separator(pending) ? `${pending} ` : \" \";\n pending = \"\";\n out += c;\n }\n return out;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,MAAM,SAAS,GAAI,CAAS,IAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI;AACnF;AACA,MAAM,IAAI,GAAI,CAAS,IAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI;AACjE,MAA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,OAAO,GAAG,GAAG,GAAG;IAC7F,OAAO,GAAG,EAAE;IACZ,GAAG,IAAI,CAAC;EACV;EACA,OAAO,GAAG;AACZ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ssr as _$ssr } from "solid-js/web";
|
|
2
|
+
var _tmpl$ = "<div class=\"k2-hidden-text\" data-k2-part=\"Announcer\"><div role=\"status\" aria-live=\"polite\" data-k2-news=\"polite\"></div><div role=\"alert\" aria-live=\"assertive\" data-k2-news=\"assertive\"></div></div>";
|
|
3
|
+
/**
|
|
4
|
+
* News for assistive technology that no element on the page shows as it happens, such as a run that changed its
|
|
5
|
+
* state or new mail that arrived: `announce("Lauf 3 ist fertig.")`. A screen reader says it when it is idle;
|
|
6
|
+
* `{ assertive: true }` says it at once, for news that cannot wait (a run that failed).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* News closer together than this is one burst: only its last news is said. A screen reader needs about this long to
|
|
11
|
+
* start speaking, and a run of state changes is then said as the state it reached.
|
|
12
|
+
*/
|
|
13
|
+
const BURST_MS = 250;
|
|
14
|
+
/**
|
|
15
|
+
* A burst that never pauses (progress every 100 ms) still says its latest news this often, so a person waiting for a
|
|
16
|
+
* long run hears where it stands at least once a second.
|
|
17
|
+
*/
|
|
18
|
+
const MAX_WAIT_MS = 1000;
|
|
19
|
+
/**
|
|
20
|
+
* Said news stays this long, then leaves the region: long enough for a screen reader to have said it, short enough
|
|
21
|
+
* that a person browsing the page later does not find old news.
|
|
22
|
+
*/
|
|
23
|
+
const SPOKEN_MS = 5000;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The one live region of a page, in the server markup: a region that exists before its first news is heard, one
|
|
27
|
+
* added with its news often is not. `Workspace` renders it; it takes no room and shows nothing.
|
|
28
|
+
*/
|
|
29
|
+
export const Announcer = () => _$ssr(_tmpl$);
|
|
30
|
+
/**
|
|
31
|
+
* The region of the page, found through the page when the news is said: every island bundles its own copy of
|
|
32
|
+
* `@k2b/ui`, and a module here would not see a Workspace another island renders. With several Workspaces the first
|
|
33
|
+
* one shown takes the news (a hidden one is never heard); without one the news brings a region of its own, once.
|
|
34
|
+
*/
|
|
35
|
+
const region = kind => {
|
|
36
|
+
for (const found of document.querySelectorAll(`[data-k2-part="Announcer"] [data-k2-news="${kind}"]`)) {
|
|
37
|
+
const wrap = found.parentElement;
|
|
38
|
+
if (wrap && !wrap.closest("[hidden]") && wrap.getClientRects().length > 0) return found;
|
|
39
|
+
}
|
|
40
|
+
const host = document.createElement("div");
|
|
41
|
+
host.className = "k2-ui";
|
|
42
|
+
host.style.display = "contents";
|
|
43
|
+
const wrap = document.createElement("div");
|
|
44
|
+
wrap.className = "k2-hidden-text";
|
|
45
|
+
wrap.setAttribute("data-k2-part", "Announcer");
|
|
46
|
+
const make = (role, live) => {
|
|
47
|
+
const element = document.createElement("div");
|
|
48
|
+
element.setAttribute("role", role);
|
|
49
|
+
element.setAttribute("aria-live", live);
|
|
50
|
+
element.setAttribute("data-k2-news", live);
|
|
51
|
+
return element;
|
|
52
|
+
};
|
|
53
|
+
const polite = make("status", "polite");
|
|
54
|
+
const urgent = make("alert", "assertive");
|
|
55
|
+
wrap.append(polite, urgent);
|
|
56
|
+
host.append(wrap);
|
|
57
|
+
document.body.append(host);
|
|
58
|
+
return kind === "assertive" ? urgent : polite;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** The news that waits to be said, by kind: its words, when its burst began, and the timer that says it. */
|
|
62
|
+
const waiting = new Map();
|
|
63
|
+
const speak = kind => {
|
|
64
|
+
const news = waiting.get(kind);
|
|
65
|
+
if (!news) return;
|
|
66
|
+
waiting.delete(kind);
|
|
67
|
+
const target = region(kind);
|
|
68
|
+
const node = document.createElement("div");
|
|
69
|
+
node.textContent = news.text;
|
|
70
|
+
// the news before leaves: a removal is not said, the new node is
|
|
71
|
+
target.replaceChildren(node);
|
|
72
|
+
setTimeout(() => node.remove(), SPOKEN_MS);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Says `text` to assistive technology: politely, or at once with `assertive`. The same words twice are said twice
|
|
77
|
+
* (each news is a node of its own); news within one burst is said as its last news, at least once a second.
|
|
78
|
+
*/
|
|
79
|
+
export const announce = (text, options = {}) => {
|
|
80
|
+
if (typeof document === "undefined" || !text.trim()) return;
|
|
81
|
+
const kind = options.assertive ? "assertive" : "polite";
|
|
82
|
+
const now = Date.now();
|
|
83
|
+
const before = waiting.get(kind);
|
|
84
|
+
if (before) clearTimeout(before.timer);
|
|
85
|
+
const since = before?.since ?? now;
|
|
86
|
+
const timer = setTimeout(() => speak(kind), Math.max(0, Math.min(BURST_MS, since + MAX_WAIT_MS - now)));
|
|
87
|
+
waiting.set(kind, {
|
|
88
|
+
text,
|
|
89
|
+
since,
|
|
90
|
+
timer
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=announce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/announce.tsx"],"sourcesContent":["/**\n * News for assistive technology that no element on the page shows as it happens, such as a run that changed its\n * state or new mail that arrived: `announce(\"Lauf 3 ist fertig.\")`. A screen reader says it when it is idle;\n * `{ assertive: true }` says it at once, for news that cannot wait (a run that failed).\n */\n\n/**\n * News closer together than this is one burst: only its last news is said. A screen reader needs about this long to\n * start speaking, and a run of state changes is then said as the state it reached.\n */\nconst BURST_MS = 250;\n/**\n * A burst that never pauses (progress every 100 ms) still says its latest news this often, so a person waiting for a\n * long run hears where it stands at least once a second.\n */\nconst MAX_WAIT_MS = 1000;\n/**\n * Said news stays this long, then leaves the region: long enough for a screen reader to have said it, short enough\n * that a person browsing the page later does not find old news.\n */\nconst SPOKEN_MS = 5000;\n\n/**\n * The one live region of a page, in the server markup: a region that exists before its first news is heard, one\n * added with its news often is not. `Workspace` renders it; it takes no room and shows nothing.\n */\nexport const Announcer = () => (\n <div class=\"k2-hidden-text\" data-k2-part=\"Announcer\">\n <div role=\"status\" aria-live=\"polite\" data-k2-news=\"polite\" />\n <div role=\"alert\" aria-live=\"assertive\" data-k2-news=\"assertive\" />\n </div>\n);\n\ntype Kind = \"polite\" | \"assertive\";\n\n/**\n * The region of the page, found through the page when the news is said: every island bundles its own copy of\n * `@k2b/ui`, and a module here would not see a Workspace another island renders. With several Workspaces the first\n * one shown takes the news (a hidden one is never heard); without one the news brings a region of its own, once.\n */\nconst region = (kind: Kind): Element => {\n for (const found of document.querySelectorAll(`[data-k2-part=\"Announcer\"] [data-k2-news=\"${kind}\"]`)) {\n const wrap = found.parentElement;\n if (wrap && !wrap.closest(\"[hidden]\") && wrap.getClientRects().length > 0) return found;\n }\n const host = document.createElement(\"div\");\n host.className = \"k2-ui\";\n host.style.display = \"contents\";\n const wrap = document.createElement(\"div\");\n wrap.className = \"k2-hidden-text\";\n wrap.setAttribute(\"data-k2-part\", \"Announcer\");\n const make = (role: string, live: Kind) => {\n const element = document.createElement(\"div\");\n element.setAttribute(\"role\", role);\n element.setAttribute(\"aria-live\", live);\n element.setAttribute(\"data-k2-news\", live);\n return element;\n };\n const polite = make(\"status\", \"polite\");\n const urgent = make(\"alert\", \"assertive\");\n wrap.append(polite, urgent);\n host.append(wrap);\n document.body.append(host);\n return kind === \"assertive\" ? urgent : polite;\n};\n\n/** The news that waits to be said, by kind: its words, when its burst began, and the timer that says it. */\nconst waiting = new Map<Kind, { text: string; since: number; timer: ReturnType<typeof setTimeout> }>();\n\nconst speak = (kind: Kind) => {\n const news = waiting.get(kind);\n if (!news) return;\n waiting.delete(kind);\n const target = region(kind);\n const node = document.createElement(\"div\");\n node.textContent = news.text;\n // the news before leaves: a removal is not said, the new node is\n target.replaceChildren(node);\n setTimeout(() => node.remove(), SPOKEN_MS);\n};\n\n/**\n * Says `text` to assistive technology: politely, or at once with `assertive`. The same words twice are said twice\n * (each news is a node of its own); news within one burst is said as its last news, at least once a second.\n */\nexport const announce = (text: string, options: { assertive?: boolean } = {}): void => {\n if (typeof document === \"undefined\" || !text.trim()) return;\n const kind: Kind = options.assertive ? \"assertive\" : \"polite\";\n const now = Date.now();\n const before = waiting.get(kind);\n if (before) clearTimeout(before.timer);\n const since = before?.since ?? now;\n const timer = setTimeout(() => speak(kind), Math.max(0, Math.min(BURST_MS, since + MAX_WAIT_MS - now)));\n waiting.set(kind, { text, since, timer });\n};\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,QAAQ,GAAG,GAAG;AACpB;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,IAAI;AACxB;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,IAAI;;AAEtB;AACA;AACA;AACA;AACA,OAAO,MAAM,SAAS,GAAG,mBAKxB;AAID;AACA;AACA;AACA;AACA;AACA,MAAM,MAAM,GAAI,IAAU,IAAc;EACtC,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,gBAAgB,CAAC,6CAA6C,IAAI,IAAI,CAAC,EAAE;IACpG,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa;IAChC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,OAAO,KAAK;EACzF;EACA,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;EAC1C,IAAI,CAAC,SAAS,GAAG,OAAO;EACxB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,UAAU;EAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;EAC1C,IAAI,CAAC,SAAS,GAAG,gBAAgB;EACjC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,WAAW,CAAC;EAC9C,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,IAAU,KAAK;IACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CA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