@k2b/ui 0.27.0 → 0.29.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/README.md +1 -1
- package/dist/base.css +147 -2
- package/dist/browser/actions/ContextMenu.js +35 -4
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/DragAndDrop.js +89 -0
- package/dist/browser/actions/DragAndDrop.js.map +1 -0
- package/dist/browser/actions/Dropdown.js +184 -158
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/GestureMenu.js +95 -139
- package/dist/browser/actions/GestureMenu.js.map +1 -1
- package/dist/browser/actions/Toolbar.js +379 -48
- package/dist/browser/actions/Toolbar.js.map +1 -1
- package/dist/browser/actions/drag-and-drop-messages.js +75 -0
- package/dist/browser/actions/drag-and-drop-messages.js.map +1 -0
- package/dist/browser/actions/drag-and-drop.js +692 -0
- package/dist/browser/actions/drag-and-drop.js.map +1 -0
- package/dist/browser/actions/index.js +1 -0
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/actions/menu-rows.js +15 -0
- package/dist/browser/actions/menu-rows.js.map +1 -0
- package/dist/browser/actions/menu-sheet.js +154 -0
- package/dist/browser/actions/menu-sheet.js.map +1 -0
- package/dist/browser/actions/toolbar-messages.js +20 -0
- package/dist/browser/actions/toolbar-messages.js.map +1 -0
- package/dist/browser/chart-inspection.js +3 -0
- package/dist/browser/chart-inspection.js.map +1 -0
- package/dist/browser/chat/ChatComposer.js +714 -410
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/ChatDecision.js +778 -0
- package/dist/browser/chat/ChatDecision.js.map +1 -0
- package/dist/browser/chat/ChatPrimitives.js +34 -28
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/chat/ChatTimeline.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +25 -1
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/command-search.js +13 -3
- package/dist/browser/chat/command-search.js.map +1 -1
- package/dist/browser/chat/index.js +8 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/chat/reaction-people.js +15 -0
- package/dist/browser/chat/reaction-people.js.map +1 -0
- package/dist/browser/chat/types.js.map +1 -1
- package/dist/browser/content/Calendar.js +3 -3
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/Chart.js +60 -86
- package/dist/browser/content/Chart.js.map +1 -1
- package/dist/browser/content/ChartSnapshotView.js +7 -10
- package/dist/browser/content/ChartSnapshotView.js.map +1 -1
- package/dist/browser/content/FileBrowser.js +2 -2
- package/dist/browser/content/FileBrowser.js.map +1 -1
- package/dist/browser/content/FileTree.js +42 -36
- package/dist/browser/content/FileTree.js.map +1 -1
- package/dist/browser/content/FileTypeIcon.js +72 -0
- package/dist/browser/content/FileTypeIcon.js.map +1 -0
- package/dist/browser/content/FileView.js +2 -2
- package/dist/browser/content/FileView.js.map +1 -1
- package/dist/browser/content/MessageRow.js +330 -448
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/ReactionBar.js +419 -0
- package/dist/browser/content/ReactionBar.js.map +1 -0
- package/dist/browser/content/ReferenceChip.js +162 -0
- package/dist/browser/content/ReferenceChip.js.map +1 -0
- package/dist/browser/content/calendar-pointer.js +9 -0
- package/dist/browser/content/calendar-pointer.js.map +1 -1
- package/dist/browser/content/calendar-time-view.js +6 -3
- package/dist/browser/content/calendar-time-view.js.map +1 -1
- package/dist/browser/content/chart-inspection-core.js +557 -0
- package/dist/browser/content/chart-inspection-core.js.map +1 -0
- package/dist/browser/content/chart-inspection.js +10 -445
- package/dist/browser/content/chart-inspection.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-snapshot.js +1 -1
- package/dist/browser/content/chart-snapshot.js.map +1 -1
- package/dist/browser/content/index.js +3 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +135 -23
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/index.js +1 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/input-mode.js +40 -0
- package/dist/browser/input-mode.js.map +1 -0
- package/dist/browser/inputs/FileDropTarget.js +24 -9
- package/dist/browser/inputs/FileDropTarget.js.map +1 -1
- package/dist/browser/inputs/FileInputs.js +2 -2
- package/dist/browser/inputs/FileInputs.js.map +1 -1
- package/dist/browser/inputs/SelectChip.js +9 -0
- package/dist/browser/inputs/SelectChip.js.map +1 -1
- package/dist/browser/inputs/emoji/EmojiPicker.js +13 -0
- package/dist/browser/inputs/emoji/EmojiPicker.js.map +1 -1
- package/dist/browser/inputs/file-drop.js.map +1 -1
- package/dist/browser/layout/AppOverview.js +1 -1
- package/dist/browser/layout/AppOverview.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +644 -445
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +283 -197
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/Discussion.js +233 -185
- package/dist/browser/layout/Discussion.js.map +1 -1
- package/dist/browser/layout/PanelDialog.js +88 -86
- package/dist/browser/layout/PanelDialog.js.map +1 -1
- package/dist/browser/layout/ResizeSeparator.js +81 -0
- package/dist/browser/layout/ResizeSeparator.js.map +1 -0
- package/dist/browser/layout/SidebarSwitcher.js +9 -2
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/TabBar.js +15 -12
- package/dist/browser/layout/TabBar.js.map +1 -1
- package/dist/browser/layout/TableOfContents.js +10 -2
- package/dist/browser/layout/TableOfContents.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +130 -17
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/detail-panel-messages.js +35 -0
- package/dist/browser/layout/detail-panel-messages.js.map +1 -0
- package/dist/browser/layout/index.js +3 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/resize-separator.js +90 -0
- package/dist/browser/layout/resize-separator.js.map +1 -0
- package/dist/browser/layout/workspace-messages.js +12 -2
- package/dist/browser/layout/workspace-messages.js.map +1 -1
- package/dist/browser/surfaces/Avatar.js +50 -20
- package/dist/browser/surfaces/Avatar.js.map +1 -1
- package/dist/browser/surfaces/AvatarStack.js +406 -0
- package/dist/browser/surfaces/AvatarStack.js.map +1 -0
- package/dist/browser/surfaces/LinkCard.js +1 -1
- package/dist/browser/surfaces/LinkCard.js.map +1 -1
- package/dist/browser/surfaces/Placeholder.js +14 -3
- package/dist/browser/surfaces/Placeholder.js.map +1 -1
- package/dist/browser/surfaces/StatCell.js +23 -0
- package/dist/browser/surfaces/StatCell.js.map +1 -1
- package/dist/browser/surfaces/avatar-messages.js +8 -2
- package/dist/browser/surfaces/avatar-messages.js.map +1 -1
- package/dist/browser/surfaces/index.js +1 -0
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/widgets/Widget.js +1 -1
- package/dist/browser/widgets/Widget.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +26 -3
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/DragAndDrop.js +63 -0
- package/dist/ssr/actions/DragAndDrop.js.map +1 -0
- package/dist/ssr/actions/Dropdown.js +140 -72
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/GestureMenu.js +76 -107
- package/dist/ssr/actions/GestureMenu.js.map +1 -1
- package/dist/ssr/actions/Toolbar.js +294 -14
- package/dist/ssr/actions/Toolbar.js.map +1 -1
- package/dist/ssr/actions/drag-and-drop-messages.js +75 -0
- package/dist/ssr/actions/drag-and-drop-messages.js.map +1 -0
- package/dist/ssr/actions/drag-and-drop.js +692 -0
- package/dist/ssr/actions/drag-and-drop.js.map +1 -0
- package/dist/ssr/actions/index.js +1 -0
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/actions/menu-rows.js +15 -0
- package/dist/ssr/actions/menu-rows.js.map +1 -0
- package/dist/ssr/actions/menu-sheet.js +138 -0
- package/dist/ssr/actions/menu-sheet.js.map +1 -0
- package/dist/ssr/actions/toolbar-messages.js +20 -0
- package/dist/ssr/actions/toolbar-messages.js.map +1 -0
- package/dist/ssr/chart-inspection.js +3 -0
- package/dist/ssr/chart-inspection.js.map +1 -0
- package/dist/ssr/chat/ChatComposer.js +393 -102
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/ChatDecision.js +465 -0
- package/dist/ssr/chat/ChatDecision.js.map +1 -0
- package/dist/ssr/chat/ChatPrimitives.js +2 -2
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/chat/ChatTimeline.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +25 -1
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/command-search.js +13 -3
- package/dist/ssr/chat/command-search.js.map +1 -1
- package/dist/ssr/chat/index.js +8 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/chat/reaction-people.js +15 -0
- package/dist/ssr/chat/reaction-people.js.map +1 -0
- package/dist/ssr/chat/types.js.map +1 -1
- package/dist/ssr/content/Calendar.js +3 -3
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/Chart.js +25 -38
- package/dist/ssr/content/Chart.js.map +1 -1
- package/dist/ssr/content/ChartSnapshotView.js +7 -10
- package/dist/ssr/content/ChartSnapshotView.js.map +1 -1
- package/dist/ssr/content/FileBrowser.js +2 -2
- package/dist/ssr/content/FileBrowser.js.map +1 -1
- package/dist/ssr/content/FileTree.js +21 -14
- package/dist/ssr/content/FileTree.js.map +1 -1
- package/dist/ssr/content/FileTypeIcon.js +50 -0
- package/dist/ssr/content/FileTypeIcon.js.map +1 -0
- package/dist/ssr/content/FileView.js +2 -2
- package/dist/ssr/content/FileView.js.map +1 -1
- package/dist/ssr/content/MessageRow.js +98 -152
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/ReactionBar.js +304 -0
- package/dist/ssr/content/ReactionBar.js.map +1 -0
- package/dist/ssr/content/ReferenceChip.js +121 -0
- package/dist/ssr/content/ReferenceChip.js.map +1 -0
- package/dist/ssr/content/calendar-pointer.js +9 -0
- package/dist/ssr/content/calendar-pointer.js.map +1 -1
- package/dist/ssr/content/calendar-time-view.js +6 -3
- package/dist/ssr/content/calendar-time-view.js.map +1 -1
- package/dist/ssr/content/chart-inspection-core.js +557 -0
- package/dist/ssr/content/chart-inspection-core.js.map +1 -0
- package/dist/ssr/content/chart-inspection.js +10 -445
- package/dist/ssr/content/chart-inspection.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-snapshot.js +1 -1
- package/dist/ssr/content/chart-snapshot.js.map +1 -1
- package/dist/ssr/content/index.js +3 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +135 -23
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/index.js +1 -0
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/input-mode.js +40 -0
- package/dist/ssr/input-mode.js.map +1 -0
- package/dist/ssr/inputs/FileDropTarget.js +17 -5
- package/dist/ssr/inputs/FileDropTarget.js.map +1 -1
- package/dist/ssr/inputs/FileInputs.js +2 -2
- package/dist/ssr/inputs/FileInputs.js.map +1 -1
- package/dist/ssr/inputs/SelectChip.js +9 -0
- package/dist/ssr/inputs/SelectChip.js.map +1 -1
- package/dist/ssr/inputs/emoji/EmojiPicker.js +12 -0
- package/dist/ssr/inputs/emoji/EmojiPicker.js.map +1 -1
- package/dist/ssr/inputs/file-drop.js.map +1 -1
- package/dist/ssr/layout/AppOverview.js +1 -1
- package/dist/ssr/layout/AppOverview.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +272 -95
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +112 -58
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/Discussion.js +63 -36
- package/dist/ssr/layout/Discussion.js.map +1 -1
- package/dist/ssr/layout/PanelDialog.js +7 -6
- package/dist/ssr/layout/PanelDialog.js.map +1 -1
- package/dist/ssr/layout/ResizeSeparator.js +45 -0
- package/dist/ssr/layout/ResizeSeparator.js.map +1 -0
- package/dist/ssr/layout/SidebarSwitcher.js +9 -2
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/TabBar.js +1 -1
- package/dist/ssr/layout/TabBar.js.map +1 -1
- package/dist/ssr/layout/TableOfContents.js +10 -2
- package/dist/ssr/layout/TableOfContents.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +130 -17
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/detail-panel-messages.js +35 -0
- package/dist/ssr/layout/detail-panel-messages.js.map +1 -0
- package/dist/ssr/layout/index.js +3 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/resize-separator.js +90 -0
- package/dist/ssr/layout/resize-separator.js.map +1 -0
- package/dist/ssr/layout/workspace-messages.js +12 -2
- package/dist/ssr/layout/workspace-messages.js.map +1 -1
- package/dist/ssr/surfaces/Avatar.js +20 -2
- package/dist/ssr/surfaces/Avatar.js.map +1 -1
- package/dist/ssr/surfaces/AvatarStack.js +286 -0
- package/dist/ssr/surfaces/AvatarStack.js.map +1 -0
- package/dist/ssr/surfaces/LinkCard.js +1 -1
- package/dist/ssr/surfaces/LinkCard.js.map +1 -1
- package/dist/ssr/surfaces/Placeholder.js +4 -2
- package/dist/ssr/surfaces/Placeholder.js.map +1 -1
- package/dist/ssr/surfaces/StatCell.js +23 -0
- package/dist/ssr/surfaces/StatCell.js.map +1 -1
- package/dist/ssr/surfaces/avatar-messages.js +8 -2
- package/dist/ssr/surfaces/avatar-messages.js.map +1 -1
- package/dist/ssr/surfaces/index.js +1 -0
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/widgets/Widget.js +1 -1
- package/dist/ssr/widgets/Widget.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/ContextMenu.d.ts +9 -0
- package/dist/types/actions/DragAndDrop.d.ts +29 -0
- package/dist/types/actions/Dropdown.d.ts +12 -5
- package/dist/types/actions/GestureMenu.d.ts +6 -4
- package/dist/types/actions/Toolbar.d.ts +20 -0
- package/dist/types/actions/drag-and-drop-messages.d.ts +35 -0
- package/dist/types/actions/drag-and-drop.d.ts +36 -0
- package/dist/types/actions/index.d.ts +3 -1
- package/dist/types/actions/menu-rows.d.ts +5 -0
- package/dist/types/actions/menu-sheet.d.ts +22 -0
- package/dist/types/actions/toolbar-messages.d.ts +8 -0
- package/dist/types/chart-inspection.d.ts +2 -0
- package/dist/types/chat/ChatComposer.d.ts +26 -1
- package/dist/types/chat/ChatDecision.d.ts +133 -0
- package/dist/types/chat/ChatPrimitives.d.ts +4 -1
- package/dist/types/chat/ChatTimeline.d.ts +2 -1
- package/dist/types/chat/chat-messages.d.ts +13 -2
- package/dist/types/chat/command-search.d.ts +5 -0
- package/dist/types/chat/index.d.ts +25 -1
- package/dist/types/chat/reaction-people.d.ts +9 -0
- package/dist/types/chat/types.d.ts +54 -1
- package/dist/types/content/Chart.d.ts +11 -5
- package/dist/types/content/FileTypeIcon.d.ts +27 -0
- package/dist/types/content/MessageRow.d.ts +3 -10
- package/dist/types/content/ReactionBar.d.ts +32 -0
- package/dist/types/content/ReferenceChip.d.ts +49 -0
- package/dist/types/content/calendar-pointer.d.ts +6 -0
- package/dist/types/content/chart-inspection-core.d.ts +61 -0
- package/dist/types/content/chart-inspection.d.ts +4 -20
- package/dist/types/content/chart-snapshot.d.ts +1 -1
- package/dist/types/content/index.d.ts +5 -1
- package/dist/types/feedback/dialog-core.d.ts +16 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/input-mode.d.ts +7 -0
- package/dist/types/inputs/FileDropTarget.d.ts +6 -3
- package/dist/types/inputs/SelectChip.d.ts +2 -0
- package/dist/types/inputs/file-drop.d.ts +2 -0
- package/dist/types/layout/AppWorkspace.d.ts +5 -3
- package/dist/types/layout/DetailPanel.d.ts +11 -0
- package/dist/types/layout/Discussion.d.ts +8 -0
- package/dist/types/layout/ResizeSeparator.d.ts +9 -0
- package/dist/types/layout/TabBar.d.ts +7 -0
- package/dist/types/layout/TableOfContents.d.ts +2 -0
- package/dist/types/layout/app-workspace-controller.d.ts +2 -0
- package/dist/types/layout/detail-panel-messages.d.ts +15 -0
- package/dist/types/layout/index.d.ts +3 -1
- package/dist/types/layout/resize-separator.d.ts +18 -0
- package/dist/types/layout/workspace-messages.d.ts +5 -0
- package/dist/types/surfaces/Avatar.d.ts +12 -0
- package/dist/types/surfaces/AvatarStack.d.ts +41 -0
- package/dist/types/surfaces/StatCell.d.ts +6 -0
- package/dist/types/surfaces/avatar-messages.d.ts +3 -0
- package/dist/types/surfaces/index.d.ts +3 -1
- package/package.json +7 -2
|
@@ -14,4 +14,13 @@ export type ContextMenuProps = {
|
|
|
14
14
|
};
|
|
15
15
|
/** Right-click menu with keyboard invocation, one-open-at-a-time behavior, and viewport clamping. */
|
|
16
16
|
export declare function ContextMenu(props: ContextMenuProps): JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* Package-internal, not exported from the package index: `openAt` lets GestureMenu open the menu at a held finger, and
|
|
19
|
+
* `title` names what was pressed above the entries, since the finger covers it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ContextMenuBase(props: ContextMenuProps & {
|
|
22
|
+
openAt?: (open: (x: number, y: number) => void) => void;
|
|
23
|
+
title?: string;
|
|
24
|
+
closeWith?: (close: () => void) => void;
|
|
25
|
+
}): JSX.Element;
|
|
17
26
|
export default ContextMenu;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import { type DragPayload } from "./drag-and-drop";
|
|
3
|
+
export type { DragPayload } from "./drag-and-drop";
|
|
4
|
+
export { activeDrag } from "./drag-and-drop";
|
|
5
|
+
export type DragSourceProps<Type extends string = string> = {
|
|
6
|
+
/** Read when the drag starts, so a selection can decide what is dragged. */
|
|
7
|
+
payload: DragPayload<Type>;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
class?: string;
|
|
10
|
+
children: JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export type DropTargetProps<Type extends string = string> = {
|
|
13
|
+
/** The payload types this target takes. */
|
|
14
|
+
accept: readonly Type[];
|
|
15
|
+
/** Names the target in announcements and in the keyboard path, such as "Archive". */
|
|
16
|
+
label: string;
|
|
17
|
+
onDrop: (payload: DragPayload<Type>) => void;
|
|
18
|
+
/** The target takes nothing now, for example without access; it refuses every drop. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
class?: string;
|
|
21
|
+
children: JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
export declare function DragSource<Type extends string = string>(props: DragSourceProps<Type>): JSX.Element;
|
|
24
|
+
export declare function DropTarget<Type extends string = string>(props: DropTargetProps<Type>): JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* Starts the optional keyboard pick-up sequence from a menu entry. Focus returns to `origin` afterwards, or to its
|
|
27
|
+
* nearest focusable ancestor, such as the group of a `GestureMenu`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useKeyboardDrag(): (payload: DragPayload, origin: HTMLElement) => void;
|
|
@@ -23,6 +23,12 @@ export type DropdownAction = (DropdownActionBase & {
|
|
|
23
23
|
* the focus stays on the row. Defaults to `true`.
|
|
24
24
|
*/
|
|
25
25
|
closeOnSelect?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* In a phone sheet, run while the tap still counts as the person's gesture, before the sheet closes, as browsers
|
|
28
|
+
* require for clipboard writes. Other actions run after the sheet has left the history. Such an action must
|
|
29
|
+
* not navigate or open a dialog.
|
|
30
|
+
*/
|
|
31
|
+
immediate?: boolean;
|
|
26
32
|
href?: never;
|
|
27
33
|
external?: never;
|
|
28
34
|
}) | (DropdownActionBase & {
|
|
@@ -41,6 +47,7 @@ export type DropdownChoice = DropdownActionBase & {
|
|
|
41
47
|
action: () => void;
|
|
42
48
|
checked: boolean | (() => boolean);
|
|
43
49
|
choice: "checkbox" | "radio";
|
|
50
|
+
href?: string;
|
|
44
51
|
closeOnSelect?: boolean;
|
|
45
52
|
color?: string;
|
|
46
53
|
};
|
|
@@ -74,6 +81,11 @@ export type DropdownProps = {
|
|
|
74
81
|
disabled?: boolean;
|
|
75
82
|
label?: string;
|
|
76
83
|
align?: "start" | "end";
|
|
84
|
+
/**
|
|
85
|
+
* `sheet` opens the same items as a bottom sheet on phones (below 48rem) instead of a menu beside the trigger.
|
|
86
|
+
* Defaults to `menu`. A controlled menu (`open`) always stays a menu.
|
|
87
|
+
*/
|
|
88
|
+
phone?: "menu" | "sheet";
|
|
77
89
|
};
|
|
78
90
|
export type DropdownTriggerProps = Omit<ButtonProps, "aria-controls" | "aria-expanded" | "aria-haspopup" | "children" | "disabled" | "onClick" | "onKeyDown"> & {
|
|
79
91
|
children: JSX.Element;
|
|
@@ -104,11 +116,6 @@ export type DropdownItemProps = {
|
|
|
104
116
|
onSelect?: () => void;
|
|
105
117
|
class?: string;
|
|
106
118
|
};
|
|
107
|
-
/**
|
|
108
|
-
* Left and Right cycle through the segments of a row section; Up and Down leave it like any item. Returns whether
|
|
109
|
-
* the key moved focus.
|
|
110
|
-
*/
|
|
111
|
-
export declare const focusRowSegment: (items: HTMLElement[], key: string) => boolean;
|
|
112
119
|
export declare const dropdownPosition: (trigger: DOMRect, menu: Pick<DOMRect, "width" | "height">, position: DropdownPosition, viewport: {
|
|
113
120
|
width: number;
|
|
114
121
|
height: number;
|
|
@@ -13,14 +13,15 @@ export type GestureMenuSection = Omit<DropdownSection, "items"> & {
|
|
|
13
13
|
export type GestureMenuItem = GestureMenuAction | DropdownAction | DropdownChoice | GestureMenuSection;
|
|
14
14
|
export type GestureMenuProps = {
|
|
15
15
|
/**
|
|
16
|
-
* The menu. A long press opens
|
|
16
|
+
* The menu. A long press opens a BottomSheet below 48rem and the same menu at the finger from 48rem.
|
|
17
|
+
* Right-click opens it at the pointer; the Context Menu key and Shift+F10 open it beside the focused element.
|
|
17
18
|
* An item with `gesture` is also run by that gesture, so every gesture has its entry here.
|
|
18
19
|
*/
|
|
19
20
|
items: readonly GestureMenuItem[];
|
|
20
21
|
/** Names the element and its menu, for example "Message from Nora, 10:42". */
|
|
21
22
|
label: string;
|
|
22
23
|
children: JSX.Element;
|
|
23
|
-
/** Shown above the menu in the
|
|
24
|
+
/** Shown only above the menu in the phone sheet, for example a row of quick reactions. `close` closes the sheet. */
|
|
24
25
|
sheetTop?: (close: () => void) => JSX.Element;
|
|
25
26
|
/** Tab order of the element. A list that moves focus between its rows itself passes -1. */
|
|
26
27
|
tabIndex?: number;
|
|
@@ -30,8 +31,9 @@ export type GestureMenuProps = {
|
|
|
30
31
|
};
|
|
31
32
|
/**
|
|
32
33
|
* Touch gestures for an element, each the shortcut of an entry in its menu: a horizontal swipe, a double tap, and a
|
|
33
|
-
* long press that opens the
|
|
34
|
-
* right-click
|
|
34
|
+
* long press that opens a `BottomSheet` below 48rem and the same menu at the finger from 48rem. A mouse double-click
|
|
35
|
+
* runs the double-tap action; right-click opens the menu at the pointer, the keyboard beside the focused element.
|
|
36
|
+
* Vertical scrolling never turns into a swipe.
|
|
35
37
|
*/
|
|
36
38
|
export declare function GestureMenu(props: GestureMenuProps): JSX.Element;
|
|
37
39
|
export default GestureMenu;
|
|
@@ -4,6 +4,24 @@ export type ToolbarProps = {
|
|
|
4
4
|
label: string;
|
|
5
5
|
orientation?: "horizontal" | "vertical";
|
|
6
6
|
wrap?: boolean;
|
|
7
|
+
/** `floating` floats the toolbar at the bottom of its column. Defaults to `inline`. */
|
|
8
|
+
variant?: "inline" | "floating";
|
|
9
|
+
class?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ToolbarActionProps = {
|
|
12
|
+
/** Accessible name, tooltip text, and the row label in the More menu. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Icon class, such as "ti ti-archive". */
|
|
15
|
+
icon: string;
|
|
16
|
+
/** Shortcut hint, tooltip suffix, and aria-keyshortcuts; does not register a shortcut handler. */
|
|
17
|
+
keys?: string;
|
|
18
|
+
/** 1 is most important. Larger numbers move first; ties move later DOM actions first. Omit to keep fixed. */
|
|
19
|
+
priority?: number;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
};
|
|
23
|
+
export type ToolbarLabelProps = {
|
|
24
|
+
children: JSX.Element;
|
|
7
25
|
class?: string;
|
|
8
26
|
};
|
|
9
27
|
export type ToolbarGroupProps = {
|
|
@@ -15,6 +33,8 @@ export type ToolbarSeparatorProps = {
|
|
|
15
33
|
class?: string;
|
|
16
34
|
};
|
|
17
35
|
type ToolbarComponent = ((props: ToolbarProps) => JSX.Element) & {
|
|
36
|
+
Action: (props: ToolbarActionProps) => JSX.Element;
|
|
37
|
+
Label: (props: ToolbarLabelProps) => JSX.Element;
|
|
18
38
|
Group: (props: ToolbarGroupProps) => JSX.Element;
|
|
19
39
|
Separator: (props: ToolbarSeparatorProps) => JSX.Element;
|
|
20
40
|
Spacer: () => JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const dragAndDropMessages: import("@k2b/stdlib").Catalog<{
|
|
2
|
+
pickedUp: ({ label }: {
|
|
3
|
+
label: string;
|
|
4
|
+
}) => string;
|
|
5
|
+
pickedUpKeyboard: ({ label, count }: {
|
|
6
|
+
label: string;
|
|
7
|
+
count: number;
|
|
8
|
+
}) => string;
|
|
9
|
+
choice: ({ target, index, count }: {
|
|
10
|
+
target: string;
|
|
11
|
+
index: number;
|
|
12
|
+
count: number;
|
|
13
|
+
}) => string;
|
|
14
|
+
over: ({ target }: {
|
|
15
|
+
target: string;
|
|
16
|
+
}) => string;
|
|
17
|
+
refused: ({ target, label }: {
|
|
18
|
+
target: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}) => string;
|
|
21
|
+
dropped: ({ label, target }: {
|
|
22
|
+
label: string;
|
|
23
|
+
target: string;
|
|
24
|
+
}) => string;
|
|
25
|
+
cancelled: ({ label }: {
|
|
26
|
+
label: string;
|
|
27
|
+
}) => string;
|
|
28
|
+
noTarget: ({ label }: {
|
|
29
|
+
label: string;
|
|
30
|
+
}) => string;
|
|
31
|
+
}>;
|
|
32
|
+
export type DragAndDropMessages = ReturnType<(typeof dragAndDropMessages)["resolve"]>["t"];
|
|
33
|
+
export declare const useDragAndDropMessages: () => (() => DragAndDropMessages);
|
|
34
|
+
export declare const checkDragAndDropMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { DragAndDropMessages } from "./drag-and-drop-messages";
|
|
2
|
+
export type DragPayload<Type extends string = string> = {
|
|
3
|
+
/** What is dragged, such as "mail.message"; targets accept by this. */
|
|
4
|
+
type: Type;
|
|
5
|
+
/** Opaque to @k2b/ui: the application's reference, such as an ID or a ref string. */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Names the item in the preview and in announcements. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Tabler class for the preview, such as "ti ti-mail". */
|
|
10
|
+
icon?: string;
|
|
11
|
+
/** More than one item is dragged: shown as a count on the preview. */
|
|
12
|
+
count?: number;
|
|
13
|
+
};
|
|
14
|
+
/** Reactive payload of the drag in progress, or undefined. */
|
|
15
|
+
export declare const activeDrag: () => DragPayload | undefined;
|
|
16
|
+
/** Internal hand-over to the gesture menu that owns this press. */
|
|
17
|
+
export declare const onPointerDragStart: (listener: (pointerId: number) => void) => (() => void);
|
|
18
|
+
type Target = {
|
|
19
|
+
element: HTMLElement;
|
|
20
|
+
accept: readonly string[];
|
|
21
|
+
label: string;
|
|
22
|
+
messages: DragAndDropMessages;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
drop: (payload: DragPayload) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare const registerDropTarget: (element: HTMLElement, initial: Omit<Target, "element">) => {
|
|
27
|
+
update(next: Omit<Target, "element">): void;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
};
|
|
30
|
+
export declare const bindDragSource: (source: HTMLElement, read: () => {
|
|
31
|
+
payload: DragPayload;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
messages: DragAndDropMessages;
|
|
34
|
+
}) => (() => void);
|
|
35
|
+
export declare const startKeyboardDrag: (input: DragPayload, origin: HTMLElement, messages: DragAndDropMessages) => (() => void);
|
|
36
|
+
export {};
|
|
@@ -6,6 +6,8 @@ export type { CopyButtonProps, CopyButtonValue } from "./CopyButton";
|
|
|
6
6
|
export { CopyButton } from "./CopyButton";
|
|
7
7
|
export type { DisclosureProps } from "./Disclosure";
|
|
8
8
|
export { Disclosure } from "./Disclosure";
|
|
9
|
+
export type { DragPayload, DragSourceProps, DropTargetProps } from "./DragAndDrop";
|
|
10
|
+
export { activeDrag, DragSource, DropTarget, useKeyboardDrag } from "./DragAndDrop";
|
|
9
11
|
export type { DropdownAction, DropdownActionBase, DropdownChoice, DropdownItemProps, DropdownPosition, DropdownProps, DropdownSection, DropdownTriggerProps, } from "./Dropdown";
|
|
10
12
|
export { Dropdown, DropdownItem, dropdownPosition } from "./Dropdown";
|
|
11
13
|
export type { FilterChipOption, FilterChipProps, FilterChipSection } from "./FilterChip";
|
|
@@ -22,5 +24,5 @@ export type { SpotlightButtonProps, SpotlightButtonVariant, SpotlightSearchOptio
|
|
|
22
24
|
export { openSpotlightSearch, SpotlightButton, } from "./SpotlightSearch";
|
|
23
25
|
export type { TabOption, TabsItemProps, TabsProps } from "./Tabs";
|
|
24
26
|
export { Tabs } from "./Tabs";
|
|
25
|
-
export type { ToolbarGroupProps, ToolbarProps, ToolbarSeparatorProps } from "./Toolbar";
|
|
27
|
+
export type { ToolbarActionProps, ToolbarGroupProps, ToolbarLabelProps, ToolbarProps, ToolbarSeparatorProps } from "./Toolbar";
|
|
26
28
|
export { Toolbar } from "./Toolbar";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { DropdownItem } from "./Dropdown";
|
|
3
|
+
/** Phones, where a menu opens as a bottom sheet instead of beside its trigger. */
|
|
4
|
+
export declare const PHONE_SHEET_QUERY = "(max-width: 47.999rem)";
|
|
5
|
+
export declare const prefersMenuSheet: () => boolean;
|
|
6
|
+
export type MenuSheetOptions = {
|
|
7
|
+
/** Renders the rows: the dropdown's own `DropdownItems`, passed in so this module does not import it back. */
|
|
8
|
+
Items: (props: {
|
|
9
|
+
items: readonly DropdownItem[];
|
|
10
|
+
close: (restoreFocus?: boolean) => void;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
items: readonly DropdownItem[];
|
|
13
|
+
/** Names the sheet and its menu. */
|
|
14
|
+
label: string;
|
|
15
|
+
/** The render locale of the opener; the sheet renders outside its tree. */
|
|
16
|
+
locale: string;
|
|
17
|
+
/** Shown above the menu, for example a row of quick reactions. `close` closes the sheet. */
|
|
18
|
+
top?: (close: () => void) => JSX.Element;
|
|
19
|
+
signal?: AbortSignal;
|
|
20
|
+
};
|
|
21
|
+
/** Opens menu items as a bottom sheet; resolves after the sheet closed and the chosen action ran. */
|
|
22
|
+
export declare const openMenuSheet: (options: MenuSheetOptions) => Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const toolbarMessages: import("@k2b/stdlib").Catalog<{
|
|
2
|
+
moreActions: string;
|
|
3
|
+
}>;
|
|
4
|
+
export type ToolbarMessages = ReturnType<(typeof toolbarMessages)["resolve"]>["t"];
|
|
5
|
+
/** Resolved from the inherited render locale. */
|
|
6
|
+
export declare const useToolbarMessages: () => (() => ToolbarMessages);
|
|
7
|
+
export declare const checkToolbarMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { type ChartCursor, createChartCursor } from "./content/chart-cursor";
|
|
2
|
+
export { type ChartDatumRef, type ChartInspection, type ChartKind, type ChartSelection, type ChartTooltip, type ChartTooltipFormatter, type InspectChartOptions, inspectChart, isChartDatum, sameChartDatum, } from "./content/chart-inspection-core";
|
|
@@ -4,10 +4,16 @@ export type ChatCommandContext = {
|
|
|
4
4
|
setValue: (value: string) => void;
|
|
5
5
|
submit: () => void;
|
|
6
6
|
focus: () => void;
|
|
7
|
+
openModelSelection: () => Promise<string | null>;
|
|
7
8
|
};
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* An action can cancel and restore its token, report a short completion message, or hand back a reference chosen in a
|
|
11
|
+
* dialog: `mention` takes the token's place exactly as a `mention` row does, and Ctrl/⌘+Z brings the token back.
|
|
12
|
+
*/
|
|
9
13
|
export type ChatCommandResult = void | "cancelled" | {
|
|
10
14
|
done: string;
|
|
15
|
+
} | {
|
|
16
|
+
mention: ChatAttachment;
|
|
11
17
|
};
|
|
12
18
|
/** A fixed place in the slash list. Sections keep the given order, also while searching. */
|
|
13
19
|
export type ChatCommandSection = {
|
|
@@ -27,6 +33,8 @@ export type ChatCommandScope = {
|
|
|
27
33
|
/** Passed as the third argument to `searchCommands`. */
|
|
28
34
|
export type ChatCommandSearch = {
|
|
29
35
|
scope?: string;
|
|
36
|
+
/** One list opening, unchanged across queries and narrowing; retries start another opening. */
|
|
37
|
+
opening: number;
|
|
30
38
|
};
|
|
31
39
|
export type ChatCommand = {
|
|
32
40
|
/** Section id; unknown or missing ids render in a trailing part without a heading. */
|
|
@@ -35,6 +43,10 @@ export type ChatCommand = {
|
|
|
35
43
|
scope?: string;
|
|
36
44
|
/** Absent from the overview; appears when searched, including its unavailable reason. */
|
|
37
45
|
hiddenUntilSearch?: boolean;
|
|
46
|
+
/** A chosen value, independent of the row marked by keyboard navigation. */
|
|
47
|
+
selected?: boolean;
|
|
48
|
+
/** Retry discovery in a new opening, retaining the token and currently displayed rows. */
|
|
49
|
+
searchAgain?: boolean;
|
|
38
50
|
/** Application name, searchable but not displayed. */
|
|
39
51
|
app?: string;
|
|
40
52
|
/** Stable row key for option ids, marking and de-duplication. Defaults to `name`. */
|
|
@@ -52,6 +64,11 @@ export type ChatCommand = {
|
|
|
52
64
|
action?: (context: ChatCommandContext) => ChatCommandResult | Promise<ChatCommandResult>;
|
|
53
65
|
/** Selecting a reference inserts its display name and retains its opaque payload. */
|
|
54
66
|
mention?: ChatAttachment;
|
|
67
|
+
/**
|
|
68
|
+
* Opens the composer's own file selection, as "Attach files" in the add menu does, within the key or click that chose
|
|
69
|
+
* the row, so the device's file dialog can still open. The token leaves; choosing nothing brings it back.
|
|
70
|
+
*/
|
|
71
|
+
attachFiles?: boolean;
|
|
55
72
|
label?: string;
|
|
56
73
|
disabled?: boolean;
|
|
57
74
|
};
|
|
@@ -97,6 +114,14 @@ export type ChatComposerProps = {
|
|
|
97
114
|
commandSections?: readonly ChatCommandSection[];
|
|
98
115
|
commandScopes?: readonly ChatCommandScope[];
|
|
99
116
|
searchCommands?: (query: string, signal: AbortSignal, search: ChatCommandSearch) => Promise<readonly ChatCommand[]>;
|
|
117
|
+
/**
|
|
118
|
+
* The last row for typed text or a scope, built at once from the query, such as "Search Cloud for “q3”". It is no
|
|
119
|
+
* match: unscoped it follows "Nothing found for …"; in a scope it ends the scope's rows. Not called for the overview.
|
|
120
|
+
*/
|
|
121
|
+
commandFallback?: (search: {
|
|
122
|
+
query: string;
|
|
123
|
+
scope?: string;
|
|
124
|
+
}) => ChatCommand | undefined;
|
|
100
125
|
mentions?: readonly ChatMention[];
|
|
101
126
|
onMentionsChange?: (mentions: readonly ChatMention[]) => void;
|
|
102
127
|
/** Shared surface above the editor; suggestions temporarily replace this content. */
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { ChatDecisionAnswer, ChatDecisionReason, ChatDecisionState, ChatOutcomeLine, ChatPreviewHeaderRow } from "./types";
|
|
3
|
+
export type ChatDecisionProps = {
|
|
4
|
+
/** `open` shows the question; every other state shows `outcome` in its place. */
|
|
5
|
+
state: ChatDecisionState;
|
|
6
|
+
/** The question as one sentence, usually with `ReferenceChip`s. */
|
|
7
|
+
sentence: JSX.Element;
|
|
8
|
+
/** Why this question is asked, in the platform's words. */
|
|
9
|
+
reason: ChatDecisionReason;
|
|
10
|
+
/** The thing itself, usually `Chat.Preview`. */
|
|
11
|
+
preview?: JSX.Element;
|
|
12
|
+
/** The main answer, named by verb and target ("Send to Lea"). `danger` for deletions, `primary` for requests. */
|
|
13
|
+
confirm: ChatDecisionAnswer & {
|
|
14
|
+
variant?: "ai" | "primary" | "danger";
|
|
15
|
+
};
|
|
16
|
+
/** The other answer ("Don't send"). */
|
|
17
|
+
decline: ChatDecisionAnswer;
|
|
18
|
+
/** An optional quiet third answer after the buttons, such as "Yes, and don't ask again in this chat". */
|
|
19
|
+
remember?: ChatDecisionAnswer;
|
|
20
|
+
/** Turns `confirm` and `remember` off; this reason replaces `reason` in the same place. */
|
|
21
|
+
unavailable?: ChatDecisionReason;
|
|
22
|
+
/** The result line shown in every state but `open`, usually `Chat.Outcome`. */
|
|
23
|
+
outcome?: JSX.Element;
|
|
24
|
+
/** Receives a rejected promise from an answer's `onSelect`. */
|
|
25
|
+
onAnswerError?: (error: unknown) => void;
|
|
26
|
+
anchorId?: string | number;
|
|
27
|
+
class?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A question the person answers in the conversation: one sentence, why it is asked, the thing itself, and two answers.
|
|
31
|
+
* An answer collapses it at once to its outcome line, which takes the focus and is announced.
|
|
32
|
+
*/
|
|
33
|
+
export declare function ChatDecision(props: ChatDecisionProps): JSX.Element;
|
|
34
|
+
export type ChatOutcomeProps = {
|
|
35
|
+
/**
|
|
36
|
+
* Every line one flow can show, such as running and done. All of them share one cell, so the line is as high as
|
|
37
|
+
* the longest and switching between them moves nothing.
|
|
38
|
+
*/
|
|
39
|
+
lines: Readonly<Record<string, ChatOutcomeLine>>;
|
|
40
|
+
/** The key of the visible line. */
|
|
41
|
+
current: string;
|
|
42
|
+
/** Receives an error thrown or rejected by a line's `action`. */
|
|
43
|
+
onActionError?: (error: unknown) => void;
|
|
44
|
+
anchorId?: string | number;
|
|
45
|
+
class?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* One line that says what happened: running, done, off, waiting, warning, or error. Changes are announced through a
|
|
49
|
+
* polite live region; the line itself can take the focus.
|
|
50
|
+
*/
|
|
51
|
+
export declare function ChatOutcome(props: ChatOutcomeProps): JSX.Element;
|
|
52
|
+
export type ChatPreviewProps = {
|
|
53
|
+
children: JSX.Element;
|
|
54
|
+
class?: string;
|
|
55
|
+
};
|
|
56
|
+
/** The thing a question is about, as calm text on the sentence's edge: no surface, no column. */
|
|
57
|
+
declare function ChatPreviewRoot(props: ChatPreviewProps): JSX.Element;
|
|
58
|
+
export type ChatPreviewHeaderProps = {
|
|
59
|
+
/** One row per field, such as From, To, Cc, and Bcc; the label stands right before its value. */
|
|
60
|
+
rows: readonly ChatPreviewHeaderRow[];
|
|
61
|
+
/** A last line, such as when the message goes out. */
|
|
62
|
+
note?: JSX.Element;
|
|
63
|
+
};
|
|
64
|
+
declare function ChatPreviewHeader(props: ChatPreviewHeaderProps): JSX.Element;
|
|
65
|
+
export type ChatPreviewTitleProps = {
|
|
66
|
+
children: JSX.Element;
|
|
67
|
+
meta?: JSX.Element;
|
|
68
|
+
};
|
|
69
|
+
/** The thing's name in the text's own face, with optional quiet facts after it. */
|
|
70
|
+
declare function ChatPreviewTitle(props: ChatPreviewTitleProps): JSX.Element;
|
|
71
|
+
/** A rule or instruction as one sentence, such as what a routine does; chips and marks may stand inside. */
|
|
72
|
+
declare function ChatPreviewSentence(props: {
|
|
73
|
+
children: JSX.Element;
|
|
74
|
+
}): JSX.Element;
|
|
75
|
+
/** The first lines of a longer text. It keeps its line breaks, shows about three lines, and fades out. */
|
|
76
|
+
declare function ChatPreviewExcerpt(props: {
|
|
77
|
+
children: JSX.Element;
|
|
78
|
+
}): JSX.Element;
|
|
79
|
+
export type ChatPreviewReadMoreProps = {
|
|
80
|
+
href: string;
|
|
81
|
+
children: JSX.Element;
|
|
82
|
+
/** Tooltip, such as "Opens exactly this version of the draft". */
|
|
83
|
+
title?: string;
|
|
84
|
+
};
|
|
85
|
+
/** Opens the whole thing at exactly the version the question shows. */
|
|
86
|
+
declare function ChatPreviewReadMore(props: ChatPreviewReadMoreProps): JSX.Element;
|
|
87
|
+
/** A list of lines with a name, such as "What the routine may do". */
|
|
88
|
+
declare function ChatPreviewLines(props: {
|
|
89
|
+
label?: string;
|
|
90
|
+
children: JSX.Element;
|
|
91
|
+
}): JSX.Element;
|
|
92
|
+
export type ChatPreviewLineProps = {
|
|
93
|
+
/** Icon class; the text after it starts 1.5rem from the edge. */
|
|
94
|
+
icon: string;
|
|
95
|
+
/** Icon colour, such as the PDF colour of an attachment. */
|
|
96
|
+
accent?: string;
|
|
97
|
+
/** `muted` for limits and notes, `warning` for an application's own warning. */
|
|
98
|
+
tone?: "default" | "muted" | "warning";
|
|
99
|
+
/** Marks the whole line as new or removed. */
|
|
100
|
+
mark?: "added" | "removed";
|
|
101
|
+
/** Quiet facts after the text, such as a file size. */
|
|
102
|
+
meta?: JSX.Element;
|
|
103
|
+
children: JSX.Element;
|
|
104
|
+
};
|
|
105
|
+
/** One line led by an icon: a consequence, a right, an attachment, or a warning. */
|
|
106
|
+
declare function ChatPreviewLine(props: ChatPreviewLineProps): JSX.Element;
|
|
107
|
+
export type ChatPreviewPeopleProps = {
|
|
108
|
+
/** The first few people; their avatars overlap at the start of the line. */
|
|
109
|
+
people: readonly {
|
|
110
|
+
name: string;
|
|
111
|
+
src?: string | null;
|
|
112
|
+
}[];
|
|
113
|
+
/** The names as text, such as "Lea Berg, Tom Weber and 3 others". */
|
|
114
|
+
children: JSX.Element;
|
|
115
|
+
};
|
|
116
|
+
declare function ChatPreviewPeople(props: ChatPreviewPeopleProps): JSX.Element;
|
|
117
|
+
export declare const ChatPreview: typeof ChatPreviewRoot & {
|
|
118
|
+
Header: typeof ChatPreviewHeader;
|
|
119
|
+
Title: typeof ChatPreviewTitle;
|
|
120
|
+
Sentence: typeof ChatPreviewSentence;
|
|
121
|
+
Excerpt: typeof ChatPreviewExcerpt;
|
|
122
|
+
ReadMore: typeof ChatPreviewReadMore;
|
|
123
|
+
Lines: typeof ChatPreviewLines;
|
|
124
|
+
Line: typeof ChatPreviewLine;
|
|
125
|
+
People: typeof ChatPreviewPeople;
|
|
126
|
+
};
|
|
127
|
+
export type ChatMarkProps = {
|
|
128
|
+
change: "added" | "removed";
|
|
129
|
+
children: JSX.Element;
|
|
130
|
+
};
|
|
131
|
+
/** Marks new or removed words; screen readers hear "new:" or "removed:" first. */
|
|
132
|
+
export declare function ChatMark(props: ChatMarkProps): JSX.Element;
|
|
133
|
+
export {};
|
|
@@ -15,7 +15,8 @@ export type ChatMessageProps = {
|
|
|
15
15
|
class?: string;
|
|
16
16
|
};
|
|
17
17
|
export type ChatActivityProps = {
|
|
18
|
-
|
|
18
|
+
/** The step as text, or as a sentence with `ReferenceChip`s. */
|
|
19
|
+
label: JSX.Element;
|
|
19
20
|
/** Spelled-out name for an expandable row whose visible text abbreviates, such as durations. */
|
|
20
21
|
ariaLabel?: string;
|
|
21
22
|
description?: string;
|
|
@@ -27,6 +28,8 @@ export type ChatActivityProps = {
|
|
|
27
28
|
tone?: ChatActivityTone;
|
|
28
29
|
/** Marks the activity as running with the shared accent sweep. */
|
|
29
30
|
busy?: boolean;
|
|
31
|
+
/** Lets label and description wrap instead of ending in an ellipsis, for a system line whose whole sentence matters. */
|
|
32
|
+
wrap?: boolean;
|
|
30
33
|
trailing?: JSX.Element;
|
|
31
34
|
/** Controlled disclosure state. Omit to keep native details behavior. */
|
|
32
35
|
open?: boolean;
|
|
@@ -20,7 +20,8 @@ export type ChatActivityItem = {
|
|
|
20
20
|
kind: "activity";
|
|
21
21
|
/** Unique within the timeline. A record with a known id updates its row in place instead of replacing it. */
|
|
22
22
|
id: string;
|
|
23
|
-
|
|
23
|
+
/** The step as text, or as a sentence with `ReferenceChip`s. */
|
|
24
|
+
label: JSX.Element;
|
|
24
25
|
description?: string;
|
|
25
26
|
icon?: string;
|
|
26
27
|
leading?: JSX.Element;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
declare const chatMessages: import("@k2b/stdlib").Catalog<{
|
|
1
|
+
export declare const chatMessages: import("@k2b/stdlib").Catalog<{
|
|
2
2
|
commandFailed: string;
|
|
3
|
+
commandDraftChanged: string;
|
|
4
|
+
markAdded: string;
|
|
5
|
+
markRemoved: string;
|
|
6
|
+
commandSelected: string;
|
|
3
7
|
attachments: string;
|
|
4
8
|
assistant: string;
|
|
5
9
|
addToChat: string;
|
|
@@ -38,6 +42,14 @@ declare const chatMessages: import("@k2b/stdlib").Catalog<{
|
|
|
38
42
|
own?: boolean;
|
|
39
43
|
}) => string;
|
|
40
44
|
messageAddReaction: string;
|
|
45
|
+
moreReactions: ({ count }: {
|
|
46
|
+
count: number;
|
|
47
|
+
}) => string;
|
|
48
|
+
reactionYou: string;
|
|
49
|
+
reactionAnd: string;
|
|
50
|
+
reactionMorePeople: ({ count }: {
|
|
51
|
+
count: number;
|
|
52
|
+
}) => string;
|
|
41
53
|
messageReplies: ({ count }: {
|
|
42
54
|
count: number;
|
|
43
55
|
}) => string;
|
|
@@ -120,4 +132,3 @@ export type ChatMessages = ReturnType<(typeof chatMessages)["resolve"]>["t"];
|
|
|
120
132
|
/** Resolved from the inherited render locale. */
|
|
121
133
|
export declare const useChatMessages: () => (() => ChatMessages);
|
|
122
134
|
export declare const checkChatMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
123
|
-
export {};
|
|
@@ -30,10 +30,15 @@ export declare function chatCommandListModel(input: {
|
|
|
30
30
|
searchResultsFresh: boolean;
|
|
31
31
|
searchSettled: boolean;
|
|
32
32
|
searching: boolean;
|
|
33
|
+
/** The composer's `commandFallback` row for this query, if any. */
|
|
34
|
+
fallback?: ChatCommand;
|
|
33
35
|
}): {
|
|
34
36
|
scope?: ChatCommandScope;
|
|
35
37
|
groups: Group[];
|
|
36
38
|
rows: ChatCommandRow[];
|
|
37
39
|
empty: boolean;
|
|
40
|
+
fallback?: ChatCommandRow;
|
|
38
41
|
};
|
|
42
|
+
/** Use the composer ranking rules to filter consumer-owned server rows. */
|
|
43
|
+
export declare const matchesChatCommand: (command: ChatCommand, query: string) => boolean;
|
|
39
44
|
export {};
|
|
@@ -3,15 +3,17 @@ import { ChatContextPanel, ChatContextPopup } from "./ChatContextPopup";
|
|
|
3
3
|
import { ChatTasks } from "./ChatTasks";
|
|
4
4
|
export type { ChatTask, ChatTasksProps } from "./ChatTasks";
|
|
5
5
|
import { ChatComposer } from "./ChatComposer";
|
|
6
|
+
import { ChatDecision, ChatMark, ChatOutcome } from "./ChatDecision";
|
|
6
7
|
import { ChatActivity, ChatContextUsage, ChatMessage } from "./ChatPrimitives";
|
|
7
8
|
import { ChatRoot } from "./ChatRoot";
|
|
8
9
|
import { ChatTimeline } from "./ChatTimeline";
|
|
9
10
|
export type { ChatCommand, ChatCommandContext, ChatCommandResult, ChatCommandScope, ChatCommandSearch, ChatCommandSection, ChatComposerProps, ChatFileSelection, ChatPasteHandler, } from "./ChatComposer";
|
|
11
|
+
export type { ChatDecisionProps, ChatMarkProps, ChatOutcomeProps, ChatPreviewHeaderProps, ChatPreviewLineProps, ChatPreviewPeopleProps, ChatPreviewProps, ChatPreviewReadMoreProps, ChatPreviewTitleProps, } from "./ChatDecision";
|
|
10
12
|
export type { ChatActivityProps, ChatContextUsageProps, ChatMessageProps } from "./ChatPrimitives";
|
|
11
13
|
export { formatChatTokens } from "./ChatPrimitives";
|
|
12
14
|
export type { ChatRootProps } from "./ChatRoot";
|
|
13
15
|
export type { ChatActivityItem, ChatMessageItem, ChatTimelineItem, ChatTimelineProps } from "./ChatTimeline";
|
|
14
|
-
export type { ChatAction, ChatActivityTone, ChatAttachment, ChatComposerEmoji, ChatComposerMicrophone, ChatComposerState, ChatContextUsageData, ChatDictationState, ChatMention, ChatMessageStatus, ChatModelOption, ChatRole, ChatSubmitInput, ChatSubmitIntent, ChatUsage, } from "./types";
|
|
16
|
+
export type { ChatAction, ChatActivityTone, ChatAttachment, ChatComposerEmoji, ChatComposerMicrophone, ChatComposerState, ChatContextUsageData, ChatDecisionAnswer, ChatDecisionReason, ChatDecisionState, ChatDictationState, ChatMention, ChatMessageStatus, ChatModelOption, ChatOutcomeLine, ChatOutcomeTone, ChatPreviewHeaderRow, ChatPreviewPerson, ChatRole, ChatSubmitInput, ChatSubmitIntent, ChatUsage, } from "./types";
|
|
15
17
|
/**
|
|
16
18
|
* Portable, controlled chat surface. Applications own storage, streaming,
|
|
17
19
|
* authorization, rich message rendering, and domain actions.
|
|
@@ -25,5 +27,27 @@ export declare const Chat: typeof ChatRoot & {
|
|
|
25
27
|
ContextUsage: typeof ChatContextUsage;
|
|
26
28
|
ContextPopup: typeof ChatContextPopup;
|
|
27
29
|
ContextPanel: typeof ChatContextPanel;
|
|
30
|
+
Decision: typeof ChatDecision;
|
|
31
|
+
Outcome: typeof ChatOutcome;
|
|
32
|
+
Preview: ((props: import("./ChatDecision").ChatPreviewProps) => import("solid-js").JSX.Element) & {
|
|
33
|
+
Header: (props: import("./ChatDecision").ChatPreviewHeaderProps) => import("solid-js").JSX.Element;
|
|
34
|
+
Title: (props: import("./ChatDecision").ChatPreviewTitleProps) => import("solid-js").JSX.Element;
|
|
35
|
+
Sentence: (props: {
|
|
36
|
+
children: import("solid-js").JSX.Element;
|
|
37
|
+
}) => import("solid-js").JSX.Element;
|
|
38
|
+
Excerpt: (props: {
|
|
39
|
+
children: import("solid-js").JSX.Element;
|
|
40
|
+
}) => import("solid-js").JSX.Element;
|
|
41
|
+
ReadMore: (props: import("./ChatDecision").ChatPreviewReadMoreProps) => import("solid-js").JSX.Element;
|
|
42
|
+
Lines: (props: {
|
|
43
|
+
label?: string;
|
|
44
|
+
children: import("solid-js").JSX.Element;
|
|
45
|
+
}) => import("solid-js").JSX.Element;
|
|
46
|
+
Line: (props: import("./ChatDecision").ChatPreviewLineProps) => import("solid-js").JSX.Element;
|
|
47
|
+
People: (props: import("./ChatDecision").ChatPreviewPeopleProps) => import("solid-js").JSX.Element;
|
|
48
|
+
};
|
|
49
|
+
Mark: typeof ChatMark;
|
|
28
50
|
};
|
|
51
|
+
export { matchesChatCommand } from "./command-search";
|
|
29
52
|
export { reconcileChatMentions } from "./composer-document";
|
|
53
|
+
export { type ReactionPeopleInput, reactionPeople } from "./reaction-people";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ReactionPeopleInput = {
|
|
2
|
+
/** Display names of the others who reacted, in the order they reacted; without the reader. */
|
|
3
|
+
names: readonly string[];
|
|
4
|
+
/** The reader reacted too; they come first as "You". */
|
|
5
|
+
own?: boolean;
|
|
6
|
+
/** How many reacted in total, the reader included. May exceed the names given. */
|
|
7
|
+
count: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const reactionPeople: (input: ReactionPeopleInput, locale?: string) => string;
|