@k2b/ui 0.32.0 → 0.34.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 +14 -1
- package/dist/browser/actions/ContextMenu.js +13 -0
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/Dropdown.js +173 -102
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/FilterChip.js +113 -56
- package/dist/browser/actions/FilterChip.js.map +1 -1
- package/dist/browser/actions/SelectionToolbar.js +129 -0
- package/dist/browser/actions/SelectionToolbar.js.map +1 -0
- package/dist/browser/actions/filter-messages.js +26 -2
- package/dist/browser/actions/filter-messages.js.map +1 -1
- package/dist/browser/actions/index.js +1 -0
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/actions/menu-rows.js +23 -3
- package/dist/browser/actions/menu-rows.js.map +1 -1
- package/dist/browser/actions/menu-sheet.js +2 -7
- package/dist/browser/actions/menu-sheet.js.map +1 -1
- package/dist/browser/charts.js +6 -0
- package/dist/browser/charts.js.map +1 -0
- package/dist/browser/chat/ChatComposer.js +616 -421
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +18 -0
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/composer-document.js +19 -0
- package/dist/browser/chat/composer-document.js.map +1 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/content/Calendar.js +39 -29
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarDayView.js +159 -165
- package/dist/browser/content/CalendarDayView.js.map +1 -1
- package/dist/browser/content/Chart.js +8 -0
- package/dist/browser/content/Chart.js.map +1 -1
- package/dist/browser/content/FileGrid.js +231 -9
- package/dist/browser/content/FileGrid.js.map +1 -1
- package/dist/browser/content/FileTypeIcon.js +15 -0
- package/dist/browser/content/FileTypeIcon.js.map +1 -1
- package/dist/browser/content/FileView.js +11 -4
- package/dist/browser/content/FileView.js.map +1 -1
- package/dist/browser/content/MessageRow.js +627 -343
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/ReactionBar.js +20 -1
- package/dist/browser/content/ReactionBar.js.map +1 -1
- package/dist/browser/content/calendar-day-scroll.js +4 -3
- package/dist/browser/content/calendar-day-scroll.js.map +1 -1
- package/dist/browser/content/chart-bar.js +476 -0
- package/dist/browser/content/chart-bar.js.map +1 -0
- package/dist/browser/content/file-list-messages.js +52 -0
- package/dist/browser/content/file-list-messages.js.map +1 -0
- package/dist/browser/content/index.js +2 -2
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/Tooltip.js +31 -14
- package/dist/browser/feedback/Tooltip.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +6 -0
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/inputs/ChoiceList.js +178 -0
- package/dist/browser/inputs/ChoiceList.js.map +1 -0
- package/dist/browser/inputs/ChoiceSlider.js +314 -0
- package/dist/browser/inputs/ChoiceSlider.js.map +1 -0
- package/dist/browser/inputs/ChoiceTiles.js +135 -0
- package/dist/browser/inputs/ChoiceTiles.js.map +1 -0
- package/dist/browser/inputs/ColorChoices.js +120 -0
- package/dist/browser/inputs/ColorChoices.js.map +1 -0
- package/dist/browser/inputs/QrScanner.js +95 -13
- package/dist/browser/inputs/QrScanner.js.map +1 -1
- package/dist/browser/inputs/TextInput.js +19 -14
- package/dist/browser/inputs/TextInput.js.map +1 -1
- package/dist/browser/inputs/index.js +4 -0
- package/dist/browser/inputs/index.js.map +1 -1
- package/dist/browser/inputs/qr-messages.js +2 -0
- package/dist/browser/inputs/qr-messages.js.map +1 -1
- package/dist/browser/internal/radio-keys.js +13 -0
- package/dist/browser/internal/radio-keys.js.map +1 -0
- package/dist/browser/intl/shortcut-messages.js +4 -0
- package/dist/browser/intl/shortcut-messages.js.map +1 -1
- package/dist/browser/intl/shortcut.js +4 -0
- package/dist/browser/intl/shortcut.js.map +1 -1
- package/dist/browser/layout/AnchoredPopover.js +180 -0
- package/dist/browser/layout/AnchoredPopover.js.map +1 -0
- package/dist/browser/layout/AppWorkspace.js +684 -532
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +443 -333
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/MobileShell.js +231 -42
- package/dist/browser/layout/MobileShell.js.map +1 -1
- package/dist/browser/layout/Settings.js +283 -175
- package/dist/browser/layout/Settings.js.map +1 -1
- package/dist/browser/layout/SidebarRailHint.js +79 -0
- package/dist/browser/layout/SidebarRailHint.js.map +1 -0
- package/dist/browser/layout/SidebarSwitcher.js +79 -66
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/TabBar.js +18 -4
- package/dist/browser/layout/TabBar.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +11 -4
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/detail-panel-messages.js +4 -2
- package/dist/browser/layout/detail-panel-messages.js.map +1 -1
- package/dist/browser/layout/index.js +3 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/scroll-fade.js +32 -5
- package/dist/browser/layout/scroll-fade.js.map +1 -1
- package/dist/browser/layout/settings-messages.js +26 -2
- package/dist/browser/layout/settings-messages.js.map +1 -1
- package/dist/browser/surfaces/Avatar.js +2 -14
- package/dist/browser/surfaces/Avatar.js.map +1 -1
- package/dist/browser/surfaces/DotStrip.js +70 -0
- package/dist/browser/surfaces/DotStrip.js.map +1 -0
- package/dist/browser/surfaces/NoticeCard.js +46 -30
- package/dist/browser/surfaces/NoticeCard.js.map +1 -1
- package/dist/browser/surfaces/ProgressRing.js +3 -0
- package/dist/browser/surfaces/ProgressRing.js.map +1 -1
- package/dist/browser/surfaces/ResourceCard.js +125 -68
- package/dist/browser/surfaces/ResourceCard.js.map +1 -1
- package/dist/browser/surfaces/index.js +2 -0
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/surfaces/person-color.js +18 -0
- package/dist/browser/surfaces/person-color.js.map +1 -0
- package/dist/browser/surfaces/resource-messages.js +8 -4
- package/dist/browser/surfaces/resource-messages.js.map +1 -1
- package/dist/browser/widgets/Widget.js +3 -2
- package/dist/browser/widgets/Widget.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +9 -0
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +65 -31
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/FilterChip.js +67 -16
- package/dist/ssr/actions/FilterChip.js.map +1 -1
- package/dist/ssr/actions/SelectionToolbar.js +104 -0
- package/dist/ssr/actions/SelectionToolbar.js.map +1 -0
- package/dist/ssr/actions/filter-messages.js +26 -2
- package/dist/ssr/actions/filter-messages.js.map +1 -1
- package/dist/ssr/actions/index.js +1 -0
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/actions/menu-rows.js +23 -3
- package/dist/ssr/actions/menu-rows.js.map +1 -1
- package/dist/ssr/actions/menu-sheet.js +2 -7
- package/dist/ssr/actions/menu-sheet.js.map +1 -1
- package/dist/ssr/charts.js +6 -0
- package/dist/ssr/charts.js.map +1 -0
- package/dist/ssr/chat/ChatComposer.js +184 -76
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +18 -0
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/composer-document.js +19 -0
- package/dist/ssr/chat/composer-document.js.map +1 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/content/Calendar.js +40 -31
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarDayView.js +40 -48
- package/dist/ssr/content/CalendarDayView.js.map +1 -1
- package/dist/ssr/content/Chart.js +8 -0
- package/dist/ssr/content/Chart.js.map +1 -1
- package/dist/ssr/content/FileGrid.js +132 -5
- package/dist/ssr/content/FileGrid.js.map +1 -1
- package/dist/ssr/content/FileTypeIcon.js +15 -0
- package/dist/ssr/content/FileTypeIcon.js.map +1 -1
- package/dist/ssr/content/FileView.js +11 -4
- package/dist/ssr/content/FileView.js.map +1 -1
- package/dist/ssr/content/MessageRow.js +274 -91
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/ReactionBar.js +20 -1
- package/dist/ssr/content/ReactionBar.js.map +1 -1
- package/dist/ssr/content/calendar-day-scroll.js +4 -3
- package/dist/ssr/content/calendar-day-scroll.js.map +1 -1
- package/dist/ssr/content/chart-bar.js +476 -0
- package/dist/ssr/content/chart-bar.js.map +1 -0
- package/dist/ssr/content/file-list-messages.js +52 -0
- package/dist/ssr/content/file-list-messages.js.map +1 -0
- package/dist/ssr/content/index.js +2 -2
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/Tooltip.js +31 -14
- package/dist/ssr/feedback/Tooltip.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +6 -0
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/inputs/ChoiceList.js +95 -0
- package/dist/ssr/inputs/ChoiceList.js.map +1 -0
- package/dist/ssr/inputs/ChoiceSlider.js +191 -0
- package/dist/ssr/inputs/ChoiceSlider.js.map +1 -0
- package/dist/ssr/inputs/ChoiceTiles.js +61 -0
- package/dist/ssr/inputs/ChoiceTiles.js.map +1 -0
- package/dist/ssr/inputs/ColorChoices.js +60 -0
- package/dist/ssr/inputs/ColorChoices.js.map +1 -0
- package/dist/ssr/inputs/QrScanner.js +89 -10
- package/dist/ssr/inputs/QrScanner.js.map +1 -1
- package/dist/ssr/inputs/TextInput.js +17 -2
- package/dist/ssr/inputs/TextInput.js.map +1 -1
- package/dist/ssr/inputs/index.js +4 -0
- package/dist/ssr/inputs/index.js.map +1 -1
- package/dist/ssr/inputs/qr-messages.js +2 -0
- package/dist/ssr/inputs/qr-messages.js.map +1 -1
- package/dist/ssr/internal/radio-keys.js +13 -0
- package/dist/ssr/internal/radio-keys.js.map +1 -0
- package/dist/ssr/intl/shortcut-messages.js +4 -0
- package/dist/ssr/intl/shortcut-messages.js.map +1 -1
- package/dist/ssr/intl/shortcut.js +4 -0
- package/dist/ssr/intl/shortcut.js.map +1 -1
- package/dist/ssr/layout/AnchoredPopover.js +142 -0
- package/dist/ssr/layout/AnchoredPopover.js.map +1 -0
- package/dist/ssr/layout/AppWorkspace.js +287 -141
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +181 -108
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/MobileShell.js +118 -24
- package/dist/ssr/layout/MobileShell.js.map +1 -1
- package/dist/ssr/layout/Settings.js +122 -45
- package/dist/ssr/layout/Settings.js.map +1 -1
- package/dist/ssr/layout/SidebarRailHint.js +79 -0
- package/dist/ssr/layout/SidebarRailHint.js.map +1 -0
- package/dist/ssr/layout/SidebarSwitcher.js +13 -3
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/TabBar.js +11 -3
- package/dist/ssr/layout/TabBar.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +11 -4
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/detail-panel-messages.js +4 -2
- package/dist/ssr/layout/detail-panel-messages.js.map +1 -1
- package/dist/ssr/layout/index.js +3 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/scroll-fade.js +32 -5
- package/dist/ssr/layout/scroll-fade.js.map +1 -1
- package/dist/ssr/layout/settings-messages.js +26 -2
- package/dist/ssr/layout/settings-messages.js.map +1 -1
- package/dist/ssr/surfaces/Avatar.js +2 -14
- package/dist/ssr/surfaces/Avatar.js.map +1 -1
- package/dist/ssr/surfaces/DotStrip.js +31 -0
- package/dist/ssr/surfaces/DotStrip.js.map +1 -0
- package/dist/ssr/surfaces/NoticeCard.js +21 -12
- package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
- package/dist/ssr/surfaces/ProgressRing.js +3 -0
- package/dist/ssr/surfaces/ProgressRing.js.map +1 -1
- package/dist/ssr/surfaces/ResourceCard.js +40 -15
- package/dist/ssr/surfaces/ResourceCard.js.map +1 -1
- package/dist/ssr/surfaces/index.js +2 -0
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/surfaces/person-color.js +18 -0
- package/dist/ssr/surfaces/person-color.js.map +1 -0
- package/dist/ssr/surfaces/resource-messages.js +8 -4
- package/dist/ssr/surfaces/resource-messages.js.map +1 -1
- package/dist/ssr/widgets/Widget.js +3 -2
- package/dist/ssr/widgets/Widget.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/ContextMenu.d.ts +5 -0
- package/dist/types/actions/Dropdown.d.ts +19 -0
- package/dist/types/actions/FilterChip.d.ts +11 -0
- package/dist/types/actions/SelectionToolbar.d.ts +38 -0
- package/dist/types/actions/filter-messages.d.ts +12 -0
- package/dist/types/actions/index.d.ts +2 -0
- package/dist/types/actions/menu-rows.d.ts +7 -2
- package/dist/types/charts.d.ts +5 -0
- package/dist/types/chat/ChatComposer.d.ts +28 -0
- package/dist/types/chat/chat-messages.d.ts +9 -0
- package/dist/types/chat/composer-document.d.ts +5 -0
- package/dist/types/chat/index.d.ts +1 -1
- package/dist/types/content/Calendar.d.ts +7 -0
- package/dist/types/content/Chart.d.ts +2 -1
- package/dist/types/content/FileGrid.d.ts +43 -3
- package/dist/types/content/FileTypeIcon.d.ts +10 -0
- package/dist/types/content/FileView.d.ts +5 -1
- package/dist/types/content/MessageRow.d.ts +66 -2
- package/dist/types/content/calendar-day-scroll.d.ts +2 -1
- package/dist/types/content/chart-bar.d.ts +60 -0
- package/dist/types/content/file-list-messages.d.ts +24 -0
- package/dist/types/content/index.d.ts +4 -4
- package/dist/types/feedback/Tooltip.d.ts +8 -2
- package/dist/types/feedback/dialog-core.d.ts +3 -0
- package/dist/types/inputs/ChoiceList.d.ts +28 -0
- package/dist/types/inputs/ChoiceSlider.d.ts +36 -0
- package/dist/types/inputs/ChoiceTiles.d.ts +25 -0
- package/dist/types/inputs/ColorChoices.d.ts +19 -0
- package/dist/types/inputs/index.d.ts +8 -0
- package/dist/types/inputs/qr-messages.d.ts +1 -0
- package/dist/types/internal/radio-keys.d.ts +5 -0
- package/dist/types/intl/shortcut-messages.d.ts +2 -0
- package/dist/types/layout/AnchoredPopover.d.ts +31 -0
- package/dist/types/layout/AppWorkspace.d.ts +12 -0
- package/dist/types/layout/DetailPanel.d.ts +17 -0
- package/dist/types/layout/MobileShell.d.ts +55 -5
- package/dist/types/layout/Settings.d.ts +22 -0
- package/dist/types/layout/SidebarRailHint.d.ts +26 -0
- package/dist/types/layout/TabBar.d.ts +5 -0
- package/dist/types/layout/detail-panel-messages.d.ts +1 -0
- package/dist/types/layout/index.d.ts +5 -3
- package/dist/types/layout/scroll-fade.d.ts +5 -0
- package/dist/types/layout/settings-messages.d.ts +12 -0
- package/dist/types/surfaces/DotStrip.d.ts +22 -0
- package/dist/types/surfaces/NoticeCard.d.ts +3 -0
- package/dist/types/surfaces/ProgressRing.d.ts +2 -1
- package/dist/types/surfaces/ResourceCard.d.ts +9 -0
- package/dist/types/surfaces/index.d.ts +4 -1
- package/dist/types/surfaces/person-color.d.ts +10 -0
- package/dist/types/surfaces/resource-messages.d.ts +2 -0
- package/dist/types/widgets/Widget.d.ts +3 -2
- package/package.json +7 -2
|
@@ -11,6 +11,11 @@ export type ContextMenuProps = {
|
|
|
11
11
|
onOpen?: () => void;
|
|
12
12
|
id?: string;
|
|
13
13
|
label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Links, form fields, editable text, and selected text inside the host keep the browser's own menu, with its Copy,
|
|
16
|
+
* Paste, and Open link. Use it where the host wraps readable content rather than one row.
|
|
17
|
+
*/
|
|
18
|
+
keepNativeMenu?: boolean;
|
|
14
19
|
};
|
|
15
20
|
/** Right-click menu with keyboard invocation, one-open-at-a-time behavior, and viewport clamping. */
|
|
16
21
|
export declare function ContextMenu(props: ContextMenuProps): JSX.Element;
|
|
@@ -44,6 +44,13 @@ export type DropdownAction = (DropdownActionBase & {
|
|
|
44
44
|
href?: never;
|
|
45
45
|
external?: never;
|
|
46
46
|
});
|
|
47
|
+
/** A second, smaller action at the end of a row, such as "Only" beside a checkbox; it keeps the menu open. */
|
|
48
|
+
export type DropdownSecondaryAction = {
|
|
49
|
+
label: string;
|
|
50
|
+
/** Accessible name when the visible label alone does not say what it acts on, such as "Only Team Logistik". */
|
|
51
|
+
ariaLabel?: string;
|
|
52
|
+
action: () => void;
|
|
53
|
+
};
|
|
47
54
|
/** Declarative radio or checkbox row for compact action menus. */
|
|
48
55
|
export type DropdownChoice = DropdownActionBase & {
|
|
49
56
|
action: () => void;
|
|
@@ -52,6 +59,11 @@ export type DropdownChoice = DropdownActionBase & {
|
|
|
52
59
|
href?: string;
|
|
53
60
|
closeOnSelect?: boolean;
|
|
54
61
|
color?: string;
|
|
62
|
+
/**
|
|
63
|
+
* A second action at the end of the row. It shows while the row is hovered or focused, always on a touch screen,
|
|
64
|
+
* and keeps its place when hidden, so the row never changes width. Right and Left move between the two.
|
|
65
|
+
*/
|
|
66
|
+
secondary?: DropdownSecondaryAction;
|
|
55
67
|
};
|
|
56
68
|
export type DropdownSection = {
|
|
57
69
|
sectionLabel?: string;
|
|
@@ -60,6 +72,8 @@ export type DropdownSection = {
|
|
|
60
72
|
* `sectionLabel`: the label names the choice above the row and for screen readers.
|
|
61
73
|
*/
|
|
62
74
|
layout?: "row";
|
|
75
|
+
/** A quiet action at the end of the section label, such as "All"; it needs a `sectionLabel` and keeps the menu open. */
|
|
76
|
+
labelAction?: DropdownSecondaryAction;
|
|
63
77
|
items: readonly (DropdownAction | DropdownChoice)[];
|
|
64
78
|
};
|
|
65
79
|
export type DropdownItem = DropdownAction | DropdownChoice | DropdownSection;
|
|
@@ -88,6 +102,11 @@ export type DropdownProps = {
|
|
|
88
102
|
* Defaults to `menu`. A controlled menu (`open`) always stays a menu.
|
|
89
103
|
*/
|
|
90
104
|
phone?: "menu" | "sheet";
|
|
105
|
+
/**
|
|
106
|
+
* Renders the entries only once the menu first opens, for a menu repeated on every row of a long list: the page
|
|
107
|
+
* then carries each row's trigger, not each row's entries. Fixed for the menu's lifetime.
|
|
108
|
+
*/
|
|
109
|
+
lazy?: boolean;
|
|
91
110
|
};
|
|
92
111
|
export type DropdownTriggerProps = Omit<ButtonProps, "aria-controls" | "aria-expanded" | "aria-haspopup" | "children" | "disabled" | "onClick" | "onKeyDown"> & {
|
|
93
112
|
children: JSX.Element;
|
|
@@ -5,6 +5,8 @@ export type FilterChipOption = {
|
|
|
5
5
|
label: string;
|
|
6
6
|
icon?: string;
|
|
7
7
|
color?: string;
|
|
8
|
+
/** Quiet trailing information about the option, such as a short note or a loading or warning icon with its own label. */
|
|
9
|
+
trailing?: JSX.Element;
|
|
8
10
|
};
|
|
9
11
|
export type FilterChipSection = {
|
|
10
12
|
label?: string;
|
|
@@ -15,6 +17,8 @@ export type FilterChipSection = {
|
|
|
15
17
|
* chosen option again keeps it; give the row a value in `defaultValue` so Reset keeps a choice too.
|
|
16
18
|
*/
|
|
17
19
|
layout?: "row";
|
|
20
|
+
/** A labelled `multiple` section offers "All" or, once all its options are chosen, "None" beside its label. */
|
|
21
|
+
toggleAll?: boolean;
|
|
18
22
|
};
|
|
19
23
|
export type FilterChipProps = {
|
|
20
24
|
label: string;
|
|
@@ -33,6 +37,13 @@ export type FilterChipProps = {
|
|
|
33
37
|
* chips of `AppWorkspace.Head`; pass only the filter's name as `label`. The chip then grows with its value.
|
|
34
38
|
*/
|
|
35
39
|
showValue?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Each option of a `multiple` section offers "Only" at the end of its row: it chooses that option alone among the
|
|
42
|
+
* `multiple` sections and keeps the choices of single-select sections.
|
|
43
|
+
*/
|
|
44
|
+
only?: boolean;
|
|
45
|
+
/** The trigger shows the colors of the first four chosen options before its label, as a quiet hint of what is in view. */
|
|
46
|
+
swatches?: boolean;
|
|
36
47
|
disabled?: boolean;
|
|
37
48
|
class?: string;
|
|
38
49
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type SelectionToolbarProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The selection's box in viewport coordinates, or nothing while the toolbar is closed. It is read again on every
|
|
5
|
+
* scroll and resize while the toolbar is open, so a function that measures the selection keeps it attached.
|
|
6
|
+
*/
|
|
7
|
+
anchor: () => DOMRect | null | undefined;
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* `above` (default) places the toolbar over the selection and below it when the space above is too small. `below`
|
|
11
|
+
* always places it below, for touch, where the system's own selection menu sits above.
|
|
12
|
+
*/
|
|
13
|
+
placement?: "above" | "below";
|
|
14
|
+
/** The area the toolbar stays in, such as the editor's scroll area under its toolbar: it goes below the selection when the space above inside this area is too small. */
|
|
15
|
+
boundary?: () => HTMLElement | null | undefined;
|
|
16
|
+
/** Escape inside the toolbar; the application closes it and returns focus to the text. */
|
|
17
|
+
onEscape?: () => void;
|
|
18
|
+
children: JSX.Element;
|
|
19
|
+
class?: string;
|
|
20
|
+
};
|
|
21
|
+
/** Where the toolbar goes for a selection box: centered on its first line, inside the viewport. */
|
|
22
|
+
export declare const selectionToolbarPosition: (anchor: Pick<DOMRect, "top" | "bottom" | "left" | "width">, toolbar: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
}, viewport: {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
top?: number;
|
|
29
|
+
}, placement?: "above" | "below") => {
|
|
30
|
+
left: number;
|
|
31
|
+
top: number;
|
|
32
|
+
side: "above" | "below";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A toolbar that floats at a text selection, such as formatting and comment actions over selected text. It lies in
|
|
36
|
+
* the top layer, so no scroll container clips it, and pressing its buttons keeps the selection.
|
|
37
|
+
*/
|
|
38
|
+
export declare function SelectionToolbar(props: SelectionToolbarProps): JSX.Element;
|
|
@@ -2,6 +2,18 @@ declare const filterMessages: import("@k2b/stdlib").Catalog<{
|
|
|
2
2
|
filterActions: string;
|
|
3
3
|
filters: string;
|
|
4
4
|
reset: string;
|
|
5
|
+
all: string;
|
|
6
|
+
none: string;
|
|
7
|
+
allOf: ({ label }: {
|
|
8
|
+
label: string;
|
|
9
|
+
}) => string;
|
|
10
|
+
noneOf: ({ label }: {
|
|
11
|
+
label: string;
|
|
12
|
+
}) => string;
|
|
13
|
+
only: string;
|
|
14
|
+
onlyOption: ({ label }: {
|
|
15
|
+
label: string;
|
|
16
|
+
}) => string;
|
|
5
17
|
}>;
|
|
6
18
|
export type FilterMessages = ReturnType<(typeof filterMessages)["resolve"]>["t"];
|
|
7
19
|
/** Resolved from the inherited render locale. */
|
|
@@ -18,6 +18,8 @@ export type { RemoveButtonProps } from "./RemoveButton";
|
|
|
18
18
|
export { RemoveButton } from "./RemoveButton";
|
|
19
19
|
export type { SegmentedControlProps, SegmentOption } from "./SegmentedControl";
|
|
20
20
|
export { SegmentedControl } from "./SegmentedControl";
|
|
21
|
+
export type { SelectionToolbarProps } from "./SelectionToolbar";
|
|
22
|
+
export { SelectionToolbar } from "./SelectionToolbar";
|
|
21
23
|
export type { SplitButtonProps } from "./SplitButton";
|
|
22
24
|
export { SplitButton } from "./SplitButton";
|
|
23
25
|
export type { SpotlightButtonProps, SpotlightButtonVariant, SpotlightSearchOptions, SpotlightSearchResolver, } from "./SpotlightSearch";
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Left and Right cycle through the segments of a row section
|
|
3
|
-
* the key moved focus.
|
|
2
|
+
* Left and Right cycle through the segments of a row section, or between a row and its secondary action; Up and Down
|
|
3
|
+
* leave it like any item. Returns whether the key moved focus.
|
|
4
4
|
*/
|
|
5
5
|
export declare const focusRowSegment: (items: HTMLElement[], key: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Moves Up, Down, Home, or End through the rows; a row's secondary action is no stop of its own there, so Down from
|
|
8
|
+
* it goes to the next row. Returns whether the key moved focus.
|
|
9
|
+
*/
|
|
10
|
+
export declare const focusMenuRow: (items: HTMLElement[], key: string) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure chart renderers that share the `Chart` component's drawing without its Solid wrapper, for hosts that draw
|
|
3
|
+
* SVG themselves, such as server previews and app frames.
|
|
4
|
+
*/
|
|
5
|
+
export { type BarChartLayout, type BarChartOptions, barChartLayout, renderBarChartSvg } from "./content/chart-bar";
|
|
@@ -129,10 +129,29 @@ export type ChatFileSelection = {
|
|
|
129
129
|
disabled?: boolean;
|
|
130
130
|
label?: string;
|
|
131
131
|
};
|
|
132
|
+
/** A person `@` can mention: a member of the conversation, a person or an agent. */
|
|
133
|
+
export type ChatPersonSuggestion = {
|
|
134
|
+
id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
agent?: boolean;
|
|
137
|
+
};
|
|
138
|
+
/** Suggests people for `@`; the composer inserts the chosen one as a mention named "@Name". */
|
|
139
|
+
export type ChatComposerPeople = {
|
|
140
|
+
/** At most 8 matches are shown; a rejection only means no suggestions. */
|
|
141
|
+
search: (query: string, signal: AbortSignal) => Promise<readonly ChatPersonSuggestion[]>;
|
|
142
|
+
};
|
|
132
143
|
export type ChatPasteHandler = (event: ClipboardEvent & {
|
|
133
144
|
currentTarget: HTMLTextAreaElement;
|
|
134
145
|
target: Element;
|
|
135
146
|
}) => void;
|
|
147
|
+
export type ChatComposerReply = {
|
|
148
|
+
/** Name of the answered message's author. */
|
|
149
|
+
author: string;
|
|
150
|
+
/** Plain text of the answered message; it shows at most two lines. */
|
|
151
|
+
text: string;
|
|
152
|
+
onCancel: () => void;
|
|
153
|
+
onSelect?: () => void;
|
|
154
|
+
};
|
|
136
155
|
export type ChatComposerProps = {
|
|
137
156
|
value: string;
|
|
138
157
|
onValueChange: (value: string) => void;
|
|
@@ -176,6 +195,8 @@ export type ChatComposerProps = {
|
|
|
176
195
|
}) => ChatCommand | undefined;
|
|
177
196
|
mentions?: readonly ChatMention[];
|
|
178
197
|
onMentionsChange?: (mentions: readonly ChatMention[]) => void;
|
|
198
|
+
/** Suggests people after `@`; needs `mentions` and `onMentionsChange`. */
|
|
199
|
+
people?: ChatComposerPeople;
|
|
179
200
|
/** Shared surface above the editor; suggestions temporarily replace this content. */
|
|
180
201
|
accessory?: JSX.Element;
|
|
181
202
|
contextUsage?: ChatContextUsageData;
|
|
@@ -192,6 +213,8 @@ export type ChatComposerProps = {
|
|
|
192
213
|
label?: string;
|
|
193
214
|
inputLabel?: string;
|
|
194
215
|
disabled?: boolean;
|
|
216
|
+
/** Keeps the draft editable but holds it back, such as while the chosen model cannot answer. */
|
|
217
|
+
submitDisabled?: boolean;
|
|
195
218
|
error?: string;
|
|
196
219
|
focusToken?: unknown;
|
|
197
220
|
draftKey?: unknown;
|
|
@@ -216,5 +239,10 @@ export type ChatComposerProps = {
|
|
|
216
239
|
microphone?: ChatComposerMicrophone;
|
|
217
240
|
/** One line above the field. The conversation variant always keeps its height; the default shows it only with content. */
|
|
218
241
|
hint?: JSX.Element;
|
|
242
|
+
/**
|
|
243
|
+
* The message this draft answers, shown above the field on the same quiet tint as a quote in a message, with a
|
|
244
|
+
* button that cancels the reply. `onSelect` makes the quote a button, for example to jump to the original.
|
|
245
|
+
*/
|
|
246
|
+
reply?: ChatComposerReply;
|
|
219
247
|
};
|
|
220
248
|
export declare function ChatComposer(props: ChatComposerProps): JSX.Element;
|
|
@@ -28,6 +28,7 @@ export declare const chatMessages: import("@k2b/stdlib").Catalog<{
|
|
|
28
28
|
messageSent: string;
|
|
29
29
|
messageNotSent: string;
|
|
30
30
|
messageRetry: string;
|
|
31
|
+
messageDiscard: string;
|
|
31
32
|
messageShowMore: string;
|
|
32
33
|
messageShowLess: string;
|
|
33
34
|
messageReplyTo: string;
|
|
@@ -75,6 +76,12 @@ export declare const chatMessages: import("@k2b/stdlib").Catalog<{
|
|
|
75
76
|
couldNotLoadEarlierMessages: string;
|
|
76
77
|
couldNotPostMessage: string;
|
|
77
78
|
messageActions: string;
|
|
79
|
+
cancelReply: string;
|
|
80
|
+
replyingTo: string;
|
|
81
|
+
messageMenu: ({ author, time }: {
|
|
82
|
+
author: string;
|
|
83
|
+
time: string;
|
|
84
|
+
}) => string;
|
|
78
85
|
messageComposer: string;
|
|
79
86
|
messageInput: string;
|
|
80
87
|
model: string;
|
|
@@ -111,6 +118,8 @@ export declare const chatMessages: import("@k2b/stdlib").Catalog<{
|
|
|
111
118
|
composerFormatting: string;
|
|
112
119
|
insertEmoji: string;
|
|
113
120
|
emojiSuggestions: string;
|
|
121
|
+
peopleSuggestions: string;
|
|
122
|
+
agentLabel: string;
|
|
114
123
|
dictate: string;
|
|
115
124
|
dictateOrHold: string;
|
|
116
125
|
stopDictation: string;
|
|
@@ -6,6 +6,11 @@ export type ChatCommandQuery = {
|
|
|
6
6
|
};
|
|
7
7
|
/** Only the token at the caret; URLs, paths and inline/fenced code are ordinary text. */
|
|
8
8
|
export declare function chatCommandQuery(text: string, caret: number, selectionEnd?: number): ChatCommandQuery | null;
|
|
9
|
+
/**
|
|
10
|
+
* The `@name` being typed at the caret, for person suggestions: after the start, a space or an opening parenthesis,
|
|
11
|
+
* outside code and outside an existing mention. The query stops at whitespace, so "@Mar" suggests "Mara Schulz".
|
|
12
|
+
*/
|
|
13
|
+
export declare function chatPeopleQuery(text: string, caret: number, selectionEnd?: number, mentions?: readonly ChatMention[]): ChatCommandQuery | null;
|
|
9
14
|
/** An edit inside a mention removes its identity; edits around it shift the range. */
|
|
10
15
|
export declare function reconcileChatMentions(before: string, after: string, mentions: readonly ChatMention[]): ChatMention[];
|
|
11
16
|
export declare function chatMentionSegments(text: string, mentions: readonly ChatMention[]): {
|
|
@@ -7,7 +7,7 @@ import { ChatDecision, ChatMark, ChatOutcome } from "./ChatDecision";
|
|
|
7
7
|
import { ChatActivity, ChatActivityToggle, ChatContextUsage, ChatMessage } from "./ChatPrimitives";
|
|
8
8
|
import { ChatRoot } from "./ChatRoot";
|
|
9
9
|
import { ChatTimeline } from "./ChatTimeline";
|
|
10
|
-
export type { ChatCommand, ChatCommandContext, ChatCommandDraft, ChatCommandOpenResult, ChatCommandResult, ChatCommandScope, ChatCommandSearch, ChatCommandSection, ChatComposerProps, ChatFileSelection, ChatPasteHandler, } from "./ChatComposer";
|
|
10
|
+
export type { ChatCommand, ChatCommandContext, ChatCommandDraft, ChatCommandOpenResult, ChatCommandResult, ChatCommandScope, ChatCommandSearch, ChatCommandSection, ChatComposerPeople, ChatComposerProps, ChatComposerReply, ChatFileSelection, ChatPasteHandler, ChatPersonSuggestion, } from "./ChatComposer";
|
|
11
11
|
export type { ChatDecisionProps, ChatMarkProps, ChatOutcomeProps, ChatPreviewExcerptProps, ChatPreviewHeaderProps, ChatPreviewLineProps, ChatPreviewPeopleProps, ChatPreviewProps, ChatPreviewReadMoreProps, ChatPreviewShowAllProps, ChatPreviewTitleProps, } from "./ChatDecision";
|
|
12
12
|
export type { ChatActivityProps, ChatActivityToggleProps, ChatContextUsageProps, ChatMessageProps } from "./ChatPrimitives";
|
|
13
13
|
export { formatChatTokens } from "./ChatPrimitives";
|
|
@@ -129,12 +129,19 @@ export type CalendarController = {
|
|
|
129
129
|
export type CalendarCustomView<V extends string = string> = {
|
|
130
130
|
value: V;
|
|
131
131
|
label: string;
|
|
132
|
+
/** Days the previous and next buttons and keys move, such as 14 for a two-week list. Defaults to one day. */
|
|
133
|
+
days?: number;
|
|
132
134
|
};
|
|
133
135
|
export type CalendarProps<V extends string = never> = {
|
|
134
136
|
date: Date | string;
|
|
135
137
|
events: CalendarEvent[];
|
|
136
138
|
view?: CalendarView | V;
|
|
137
139
|
views?: CalendarView[];
|
|
140
|
+
/**
|
|
141
|
+
* `false` leaves the view switcher out of the toolbar, for a host that shows the views elsewhere, such as tabs in
|
|
142
|
+
* its page head. The view commands stay.
|
|
143
|
+
*/
|
|
144
|
+
viewSwitcher?: boolean;
|
|
138
145
|
/** Views after the built-in ones. While one is active, `children` is the body and the header pages by day. */
|
|
139
146
|
customViews?: CalendarCustomView<V>[];
|
|
140
147
|
/** The body of the active custom view. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MapViewport } from "@k2b/stdlib";
|
|
2
2
|
import { charts } from "@k2b/stdlib";
|
|
3
3
|
import type { JSX } from "solid-js";
|
|
4
|
+
import { type BarChartOptions } from "./chart-bar";
|
|
4
5
|
import type { ChartCursor } from "./chart-cursor";
|
|
5
6
|
import { type ChartDatumRef, type ChartKind, type ChartSelection, type ChartTooltipFormatter } from "./chart-inspection-core";
|
|
6
7
|
import { type StateTimelineChartOptions, type StateTimelineDomain } from "./chart-state-timeline";
|
|
@@ -95,7 +96,7 @@ export type ChartProps = {
|
|
|
95
96
|
/** Largest connected X distance; positive, finite, without area/errorBand fills. */ maxGap?: number;
|
|
96
97
|
/** Wrap the legend above the plot inside the caller's total chart height. Requires legend=true. */
|
|
97
98
|
legendPlacement?: "top-start";
|
|
98
|
-
} : {}) & (K extends "stateTimeline" ? StateTimelineChartOptions : Omit<Parameters<(typeof charts)[K]>[0], "width" | "height" | "inspect">);
|
|
99
|
+
} : {}) & (K extends "stateTimeline" ? StateTimelineChartOptions : K extends "bar" ? BarChartOptions : Omit<Parameters<(typeof charts)[K]>[0], "width" | "height" | "inspect">);
|
|
99
100
|
}[ChartKind];
|
|
100
101
|
/** Pure renderer options: component layout, events and inspection are configured elsewhere. */
|
|
101
102
|
export type ChartRenderOptions = {
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
import type { CollectionSelection } from "./collection-selection";
|
|
3
|
-
|
|
3
|
+
/** One part of an open file list, such as its files as rows and its images as tiles. */
|
|
4
|
+
export type FileGridGroup<T> = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: JSX.Element;
|
|
7
|
+
rows: readonly T[];
|
|
8
|
+
/** `tiles` fills each item with its preview and lays the name over it. Defaults to `list`. */
|
|
9
|
+
layout?: "list" | "tiles";
|
|
10
|
+
};
|
|
11
|
+
type FileGridBaseProps<T> = {
|
|
4
12
|
rows: readonly T[];
|
|
5
13
|
getRowId: (row: T) => string;
|
|
6
|
-
selection: CollectionSelection;
|
|
7
14
|
label: string;
|
|
8
15
|
size?: "sm" | "md" | "lg";
|
|
9
16
|
/** `list` shows one compact row per item: preview, name, and meta beside each other. Defaults to `grid`. */
|
|
@@ -12,15 +19,48 @@ export type FileGridProps<T> = {
|
|
|
12
19
|
renderLabel: (row: T) => JSX.Element;
|
|
13
20
|
renderMeta?: (row: T) => JSX.Element;
|
|
14
21
|
renderActions?: (row: T) => JSX.Element;
|
|
15
|
-
|
|
22
|
+
/**
|
|
23
|
+
* `progressive` shows the actions on hover, keyboard focus, or an open menu with a mouse or trackpad, and always
|
|
24
|
+
* on touch. Their slot is reserved in both states, so nothing moves. Defaults to `always`.
|
|
25
|
+
*/
|
|
26
|
+
actionVisibility?: "always" | "progressive";
|
|
16
27
|
onOpen: (row: T) => void;
|
|
17
28
|
onContextMenu?: (row: T) => void;
|
|
18
29
|
/** Extra attributes for one tile, for example drag-and-drop handlers or data attributes the host styles. */
|
|
19
30
|
itemProps?: (row: T) => JSX.HTMLAttributes<HTMLDivElement>;
|
|
20
31
|
class?: string;
|
|
21
32
|
};
|
|
33
|
+
/** A browser or picker: items are selected, and Enter or a double click opens them. */
|
|
34
|
+
export type FileGridSelectableProps<T> = FileGridBaseProps<T> & {
|
|
35
|
+
selection: CollectionSelection;
|
|
36
|
+
onRowClick?: (row: T) => void;
|
|
37
|
+
limit?: never;
|
|
38
|
+
expanded?: never;
|
|
39
|
+
onExpandedChange?: never;
|
|
40
|
+
moreMeta?: never;
|
|
41
|
+
toolbar?: never;
|
|
42
|
+
groups?: never;
|
|
43
|
+
};
|
|
44
|
+
/** A list without selection, as in a details panel: one click on an item opens it. */
|
|
45
|
+
export type FileGridOpenProps<T> = FileGridBaseProps<T> & {
|
|
46
|
+
selection?: never;
|
|
47
|
+
onRowClick?: never;
|
|
48
|
+
/** Shows the first `limit` items, then "Show all N", which opens the full list in place. Without it, the list is always full. */
|
|
49
|
+
limit?: number;
|
|
50
|
+
/** Controls whether the full list is open. Without it, the list keeps its own state. */
|
|
51
|
+
expanded?: boolean;
|
|
52
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
53
|
+
/** A quiet note at the end of "Show all N", such as how many duplicates were merged. */
|
|
54
|
+
moreMeta?: JSX.Element;
|
|
55
|
+
/** Shown above the full list, such as a count, an arrangement switch, or "Download all"; not in the short list. */
|
|
56
|
+
toolbar?: JSX.Element;
|
|
57
|
+
/** How the full list arranges its items, such as files as rows, then images as tiles; the short list stays one list. */
|
|
58
|
+
groups?: (rows: readonly T[]) => readonly FileGridGroup<T>[];
|
|
59
|
+
};
|
|
60
|
+
export type FileGridProps<T> = FileGridSelectableProps<T> | FileGridOpenProps<T>;
|
|
22
61
|
/**
|
|
23
62
|
* File presentation only; the host owns data, menus, leases and permissions. Items the selection marks with
|
|
24
63
|
* `isDisabled` stay reachable by keyboard but cannot be selected or opened; say why in `renderMeta`.
|
|
25
64
|
*/
|
|
26
65
|
export declare function FileGrid<T>(props: FileGridProps<T>): JSX.Element;
|
|
66
|
+
export {};
|
|
@@ -20,6 +20,16 @@ export declare const fileTypeOf: (file: {
|
|
|
20
20
|
mediaType?: string;
|
|
21
21
|
folder?: boolean;
|
|
22
22
|
}) => FileType;
|
|
23
|
+
/**
|
|
24
|
+
* The readable kind of a file in `locale`, such as "PDF", "Image", or "Spreadsheet", for a meta line like
|
|
25
|
+
* "PDF · 4.2 MB" instead of a media type. An unknown kind names the file's extension ("ICC"), and a file without
|
|
26
|
+
* one reads "File".
|
|
27
|
+
*/
|
|
28
|
+
export declare const fileKindLabel: (file: {
|
|
29
|
+
name: string;
|
|
30
|
+
mediaType?: string;
|
|
31
|
+
folder?: boolean;
|
|
32
|
+
}, locale: string) => string;
|
|
23
33
|
/**
|
|
24
34
|
* A file or folder glyph in a soft chip of its type colour. Folders take the app accent hook
|
|
25
35
|
* `--k2b-app-workspace-active`; code, text, and unknown files a neutral ink. The box size is fixed per `size`.
|
|
@@ -76,5 +76,9 @@ export type FileViewRenderer = {
|
|
|
76
76
|
/** Text renderers that support the edit affordance when `save` is present. */
|
|
77
77
|
editable?: boolean;
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
/**
|
|
80
|
+
* A file size such as "4.2 MB". With `locale`, the number follows that language ("4,2 MB") and drops a trailing
|
|
81
|
+
* zero ("64 KB"); without it, the output stays as before.
|
|
82
|
+
*/
|
|
83
|
+
export declare const formatFileViewSize: (bytes: number, locale?: string) => string;
|
|
80
84
|
export default function FileView(props: FileViewProps): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
+
import { type GestureKind } from "../actions/GestureMenu";
|
|
2
3
|
import { type ReactionBarItem } from "./ReactionBar";
|
|
3
4
|
export type MessageRowAuthor = {
|
|
4
5
|
/** Display name, shown at the start of a group and read before every message. */
|
|
@@ -11,12 +12,26 @@ export type MessageRowAuthor = {
|
|
|
11
12
|
export type MessageRowStatus = "pending" | "sent" | "failed";
|
|
12
13
|
export type MessageRowAction = {
|
|
13
14
|
id: string;
|
|
14
|
-
/**
|
|
15
|
+
/** Visible name of the menu entry. */
|
|
15
16
|
label: string;
|
|
16
17
|
/** Icon class, for example `ti ti-arrow-back-up`. */
|
|
17
18
|
icon: string;
|
|
19
|
+
/** One quiet sentence below the label that says what the entry does. */
|
|
20
|
+
description?: string;
|
|
18
21
|
onSelect: () => void;
|
|
19
22
|
disabled?: boolean;
|
|
23
|
+
variant?: "danger";
|
|
24
|
+
/** A touch gesture that runs the entry too. Give each gesture to at most one entry. */
|
|
25
|
+
gesture?: GestureKind;
|
|
26
|
+
/**
|
|
27
|
+
* Alt+click (Option+click on Apple devices) on the message runs the entry directly, and the entry shows that
|
|
28
|
+
* shortcut. Give it to at most one entry.
|
|
29
|
+
*/
|
|
30
|
+
altClick?: boolean;
|
|
31
|
+
/** A key the application handles for the focused message, such as "r"; the entry shows it at its end. */
|
|
32
|
+
shortcut?: string;
|
|
33
|
+
/** In the phone sheet, runs while the tap still counts as the person's gesture, as clipboard writes require. */
|
|
34
|
+
immediate?: boolean;
|
|
20
35
|
};
|
|
21
36
|
export type MessageRowQuote = {
|
|
22
37
|
/** Name of the quoted message's author. */
|
|
@@ -67,6 +82,16 @@ export type MessageRowFile = MessageRowAttachmentTarget & {
|
|
|
67
82
|
icon?: string;
|
|
68
83
|
};
|
|
69
84
|
export type MessageRowAttachment = MessageRowMedia | MessageRowFile;
|
|
85
|
+
/** Where a message belongs, shown as a small chip under it, for example its thread in a timeline of several. */
|
|
86
|
+
export type MessageRowOrigin = {
|
|
87
|
+
label: string;
|
|
88
|
+
/** Icon class, for example `ti ti-hash`. */
|
|
89
|
+
icon?: string;
|
|
90
|
+
/** Opens where the message belongs. Without it, the chip is not a control. */
|
|
91
|
+
onSelect?: () => void;
|
|
92
|
+
/** Accessible name of the control when it must say more than the label, such as "Open thread Updates". */
|
|
93
|
+
selectLabel?: string;
|
|
94
|
+
};
|
|
70
95
|
export type MessageRowProgress = {
|
|
71
96
|
/** What is happening, for example "Writing" or "Searching the files". */
|
|
72
97
|
status: string;
|
|
@@ -96,7 +121,12 @@ export type MessageRowProps = {
|
|
|
96
121
|
receipt?: string;
|
|
97
122
|
/** Called by "Retry" while `status` is `"failed"`. */
|
|
98
123
|
onRetry?: () => void;
|
|
99
|
-
/**
|
|
124
|
+
/** Called by "Discard" next to "Retry" while `status` is `"failed"`, so both answers to a failure sit where it shows. */
|
|
125
|
+
onDiscard?: () => void;
|
|
126
|
+
/**
|
|
127
|
+
* The message's menu. A quiet "…" beside the bubble opens it while the message is hovered or focused, also from the
|
|
128
|
+
* keyboard; right-click and a long press open the same menu. Showing "…" never moves the layout.
|
|
129
|
+
*/
|
|
100
130
|
actions?: readonly MessageRowAction[];
|
|
101
131
|
/** The message this one answers, shown above it. */
|
|
102
132
|
quote?: MessageRowQuote;
|
|
@@ -124,6 +154,8 @@ export type MessageRowProps = {
|
|
|
124
154
|
onAddReaction?: (anchor: HTMLElement) => void;
|
|
125
155
|
/** A bar of fixed height that opens the replies to this message. */
|
|
126
156
|
thread?: MessageRowThread;
|
|
157
|
+
/** A chip of fixed height under the message that names where it belongs. */
|
|
158
|
+
origin?: MessageRowOrigin;
|
|
127
159
|
/** The message is still being written, by a person or an automated author alike: a status line with "Stop". */
|
|
128
160
|
progress?: MessageRowProgress;
|
|
129
161
|
class?: string;
|
|
@@ -138,6 +170,31 @@ export type MessageSystemRowProps = {
|
|
|
138
170
|
icon?: string;
|
|
139
171
|
class?: string;
|
|
140
172
|
};
|
|
173
|
+
export type MessageEventRowProps = {
|
|
174
|
+
/** What changed, for example "Mara set the status to “In review”". */
|
|
175
|
+
children: JSX.Element;
|
|
176
|
+
/** Icon class of the kind of change; a dot by default. */
|
|
177
|
+
icon?: string;
|
|
178
|
+
/** Where the change belongs, such as its thread, where several threads mix. */
|
|
179
|
+
origin?: MessageRowOrigin;
|
|
180
|
+
/** Opens what the change is about, such as the commented passage; the sentence becomes the link. */
|
|
181
|
+
href?: string;
|
|
182
|
+
/** Visible time, formatted by the caller. */
|
|
183
|
+
time?: string;
|
|
184
|
+
dateTime?: string | Date;
|
|
185
|
+
class?: string;
|
|
186
|
+
};
|
|
187
|
+
export type MessageEventGroupProps = {
|
|
188
|
+
/** What the closed group stands for, for example "4 changes to Invitation and Light test". */
|
|
189
|
+
label: string;
|
|
190
|
+
expanded: boolean;
|
|
191
|
+
onToggle: () => void;
|
|
192
|
+
/** Visible time or range, formatted by the caller, for example "09:50–09:58". */
|
|
193
|
+
time?: string;
|
|
194
|
+
/** The first event's time. */
|
|
195
|
+
dateTime?: string | Date;
|
|
196
|
+
class?: string;
|
|
197
|
+
};
|
|
141
198
|
export type MessageGroupEntry = {
|
|
142
199
|
/** Stable identity of the author. */
|
|
143
200
|
author: string;
|
|
@@ -156,6 +213,13 @@ export declare const startsMessageGroup: (entry: MessageGroupEntry, previous?: M
|
|
|
156
213
|
* as `VirtualFeed` keeps its positions.
|
|
157
214
|
*/
|
|
158
215
|
export declare function MessageRow(props: MessageRowProps): JSX.Element;
|
|
216
|
+
/**
|
|
217
|
+
* A quiet line for a change to something the conversation is about, such as a task's new status: no bubble, aligned
|
|
218
|
+
* with the messages' text, with its time at the end. It is no message: it never counts as unread.
|
|
219
|
+
*/
|
|
220
|
+
export declare function MessageEventRow(props: MessageEventRowProps): JSX.Element;
|
|
221
|
+
/** Several event lines in a row as one line that opens them, such as "4 changes to Invitation and Light test". */
|
|
222
|
+
export declare function MessageEventGroup(props: MessageEventGroupProps): JSX.Element;
|
|
159
223
|
/** A quiet, centered line for something that happened in the conversation, such as a person joining. */
|
|
160
224
|
export declare function MessageSystemRow(props: MessageSystemRowProps): JSX.Element;
|
|
161
225
|
export {};
|
|
@@ -42,6 +42,7 @@ export declare const wheelDelta: (axis: WheelAxis, deltaX: number, deltaY: numbe
|
|
|
42
42
|
/**
|
|
43
43
|
* The day start nearest to `position` in a strip of equal columns, or with `room` the nearer day edge at either end of
|
|
44
44
|
* the visible room; ties keep the start. A `heading` of 1 or -1 only looks ahead or back, for a scroll that brought
|
|
45
|
-
* something into view and must not slide back over it.
|
|
45
|
+
* something into view and must not slide back over it. The result is a whole pixel: a drawer can leave a fractional
|
|
46
|
+
* room, and WebKit drops the fraction of a scroll position, which would leave the strip short of the edge (#1713).
|
|
46
47
|
*/
|
|
47
48
|
export declare const snapToColumn: (position: number, width: number, room?: number, heading?: number) => number;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type AxisOptions, type BarItem, type ReferenceLine } from "@k2b/stdlib";
|
|
2
|
+
/**
|
|
3
|
+
* Bar chart options: stdlib's `charts.bar` options plus a title for the category axis and a separate value format.
|
|
4
|
+
* The wrapper owns size and inspection.
|
|
5
|
+
*/
|
|
6
|
+
export type BarChartOptions = {
|
|
7
|
+
data: BarItem[];
|
|
8
|
+
/** Value axis. `label` titles it, `format` writes its ticks and, without `valueFormat`, the printed values. */
|
|
9
|
+
yAxis?: AxisOptions;
|
|
10
|
+
/**
|
|
11
|
+
* Category axis. `label` titles it. `ordered` marks categories that follow each other, such as days or steps: they
|
|
12
|
+
* stay columns, and only every n-th label shows when they would not fit, as on a time axis. Unordered categories each
|
|
13
|
+
* keep their label and turn into rows instead.
|
|
14
|
+
*/
|
|
15
|
+
xAxis?: {
|
|
16
|
+
label?: string;
|
|
17
|
+
ordered?: boolean;
|
|
18
|
+
};
|
|
19
|
+
/** Writes printed values and tooltip values. Defaults to `yAxis.format`. */
|
|
20
|
+
valueFormat?: (value: number) => string;
|
|
21
|
+
colorByBar?: boolean;
|
|
22
|
+
references?: ReferenceLine[];
|
|
23
|
+
/** Print every value at its bar. Default: whenever the values stay readable; rows always print them. */
|
|
24
|
+
showValues?: boolean;
|
|
25
|
+
/** A legend of the bar colors; used only with `colorByBar` in columns, where labels sit below the plot. */
|
|
26
|
+
legend?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
subtitle?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The narrowest width in CSS pixels at which the drawing is shown; labels are laid out to fit it. Defaults to a
|
|
32
|
+
* 320px phone column. A host that draws at its measured width passes that width.
|
|
33
|
+
*/
|
|
34
|
+
displayWidth?: number;
|
|
35
|
+
/** Logical insets of the column layout. Rows place their labels and values themselves. */
|
|
36
|
+
padding?: number | {
|
|
37
|
+
top?: number;
|
|
38
|
+
right?: number;
|
|
39
|
+
bottom?: number;
|
|
40
|
+
left?: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type BarChartLayout = "columns" | "rows";
|
|
44
|
+
/** Estimated width of `text` at `size` pixels in the UI sans font with tabular figures; a little wide on purpose. */
|
|
45
|
+
export declare const chartTextWidth: (text: string, size?: number) => number;
|
|
46
|
+
/** The layout a bar chart takes and its logical height, so server and browser reserve the same box. */
|
|
47
|
+
export declare const barChartLayout: (opts: BarChartOptions, width?: number) => {
|
|
48
|
+
layout: BarChartLayout;
|
|
49
|
+
height: number;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Render a bar chart in which every category has its label. Few short labels stand below vertical columns; otherwise
|
|
53
|
+
* each category becomes a horizontal row with its label left of the bar and its value at the bar's end. Rows grow the
|
|
54
|
+
* drawing instead of dropping labels: use {@link barChartLayout} for its logical height.
|
|
55
|
+
*/
|
|
56
|
+
export declare const renderBarChartSvg: (opts: BarChartOptions & {
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
inspect?: boolean;
|
|
60
|
+
}) => string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** File kinds and list folding shared by `FileGrid` and `fileKindLabel`. */
|
|
2
|
+
declare const fileListMessages: import("@k2b/stdlib").Catalog<{
|
|
3
|
+
folder: string;
|
|
4
|
+
pdf: string;
|
|
5
|
+
image: string;
|
|
6
|
+
sheet: string;
|
|
7
|
+
document: string;
|
|
8
|
+
slides: string;
|
|
9
|
+
video: string;
|
|
10
|
+
audio: string;
|
|
11
|
+
archive: string;
|
|
12
|
+
file: string;
|
|
13
|
+
files: string;
|
|
14
|
+
images: string;
|
|
15
|
+
showAll: ({ count }: {
|
|
16
|
+
count: number;
|
|
17
|
+
}) => string;
|
|
18
|
+
showLess: string;
|
|
19
|
+
}>;
|
|
20
|
+
export type FileListMessages = ReturnType<(typeof fileListMessages)["resolve"]>["t"];
|
|
21
|
+
export declare const resolveFileListMessages: (locale: string) => FileListMessages;
|
|
22
|
+
export declare const useFileListMessages: () => (() => FileListMessages);
|
|
23
|
+
export declare const checkFileListMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
24
|
+
export {};
|