@k2b/ui 0.28.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/dist/browser/actions/ContextMenu.js +5 -0
- 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/GestureMenu.js +26 -3
- package/dist/browser/actions/GestureMenu.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/chat/ChatComposer.js +385 -265
- 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 +6 -0
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/command-search.js +10 -3
- package/dist/browser/chat/command-search.js.map +1 -1
- package/dist/browser/chat/index.js +6 -1
- package/dist/browser/chat/index.js.map +1 -1
- 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 +54 -71
- package/dist/browser/content/Chart.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/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/index.js +2 -0
- package/dist/browser/content/index.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/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/app-workspace-controller.js +130 -17
- package/dist/browser/layout/app-workspace-controller.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/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/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/widgets/Widget.js +1 -1
- package/dist/browser/widgets/Widget.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +5 -0
- 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/GestureMenu.js +26 -3
- package/dist/ssr/actions/GestureMenu.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/chat/ChatComposer.js +131 -14
- 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 +6 -0
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/command-search.js +10 -3
- package/dist/ssr/chat/command-search.js.map +1 -1
- package/dist/ssr/chat/index.js +6 -1
- package/dist/ssr/chat/index.js.map +1 -1
- 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 +19 -23
- package/dist/ssr/content/Chart.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/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/index.js +2 -0
- package/dist/ssr/content/index.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/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/app-workspace-controller.js +130 -17
- package/dist/ssr/layout/app-workspace-controller.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/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/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/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 +1 -0
- package/dist/types/actions/DragAndDrop.d.ts +29 -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 +2 -0
- package/dist/types/chat/ChatComposer.d.ts +19 -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 +3 -0
- package/dist/types/chat/command-search.d.ts +3 -0
- package/dist/types/chat/index.d.ts +23 -1
- package/dist/types/chat/types.d.ts +54 -1
- package/dist/types/content/Chart.d.ts +9 -3
- package/dist/types/content/FileTypeIcon.d.ts +27 -0
- package/dist/types/content/ReferenceChip.d.ts +49 -0
- package/dist/types/content/calendar-pointer.d.ts +6 -0
- package/dist/types/content/index.d.ts +3 -0
- package/dist/types/layout/AppWorkspace.d.ts +5 -3
- package/dist/types/layout/ResizeSeparator.d.ts +9 -0
- package/dist/types/layout/TabBar.d.ts +7 -0
- package/dist/types/layout/app-workspace-controller.d.ts +2 -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/StatCell.d.ts +6 -0
- package/package.json +2 -2
|
@@ -21,5 +21,6 @@ export declare function ContextMenu(props: ContextMenuProps): JSX.Element;
|
|
|
21
21
|
export declare function ContextMenuBase(props: ContextMenuProps & {
|
|
22
22
|
openAt?: (open: (x: number, y: number) => void) => void;
|
|
23
23
|
title?: string;
|
|
24
|
+
closeWith?: (close: () => void) => void;
|
|
24
25
|
}): JSX.Element;
|
|
25
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;
|
|
@@ -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";
|
|
@@ -6,9 +6,14 @@ export type ChatCommandContext = {
|
|
|
6
6
|
focus: () => void;
|
|
7
7
|
openModelSelection: () => Promise<string | null>;
|
|
8
8
|
};
|
|
9
|
-
/**
|
|
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
|
+
*/
|
|
10
13
|
export type ChatCommandResult = void | "cancelled" | {
|
|
11
14
|
done: string;
|
|
15
|
+
} | {
|
|
16
|
+
mention: ChatAttachment;
|
|
12
17
|
};
|
|
13
18
|
/** A fixed place in the slash list. Sections keep the given order, also while searching. */
|
|
14
19
|
export type ChatCommandSection = {
|
|
@@ -59,6 +64,11 @@ export type ChatCommand = {
|
|
|
59
64
|
action?: (context: ChatCommandContext) => ChatCommandResult | Promise<ChatCommandResult>;
|
|
60
65
|
/** Selecting a reference inserts its display name and retains its opaque payload. */
|
|
61
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;
|
|
62
72
|
label?: string;
|
|
63
73
|
disabled?: boolean;
|
|
64
74
|
};
|
|
@@ -104,6 +114,14 @@ export type ChatComposerProps = {
|
|
|
104
114
|
commandSections?: readonly ChatCommandSection[];
|
|
105
115
|
commandScopes?: readonly ChatCommandScope[];
|
|
106
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;
|
|
107
125
|
mentions?: readonly ChatMention[];
|
|
108
126
|
onMentionsChange?: (mentions: readonly ChatMention[]) => void;
|
|
109
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;
|
|
@@ -30,11 +30,14 @@ 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
|
};
|
|
39
42
|
/** Use the composer ranking rules to filter consumer-owned server rows. */
|
|
40
43
|
export declare const matchesChatCommand: (command: ChatCommand, query: string) => boolean;
|
|
@@ -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,6 +27,26 @@ 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
|
};
|
|
29
51
|
export { matchesChatCommand } from "./command-search";
|
|
30
52
|
export { reconcileChatMentions } from "./composer-document";
|
|
@@ -1,7 +1,60 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
1
2
|
import type { EmojiSkinTone } from "../inputs/emoji/emoji-index";
|
|
2
3
|
export type ChatRole = "user" | "assistant" | "system" | "tool";
|
|
3
4
|
export type ChatMessageStatus = "pending" | "streaming" | "complete" | "error";
|
|
4
|
-
|
|
5
|
+
/** `warning` marks a partial result or an outcome that is not yet known. */
|
|
6
|
+
export type ChatActivityTone = "neutral" | "ai" | "success" | "warning" | "danger";
|
|
7
|
+
/** `open` asks; `sending` while the answer is on its way; `decided` once answered; `expired` when it ran out. */
|
|
8
|
+
export type ChatDecisionState = "open" | "sending" | "decided" | "expired";
|
|
9
|
+
/** One answer of a question. Set the question's state in `onSelect` before awaiting anything, so it collapses at once. */
|
|
10
|
+
export type ChatDecisionAnswer = {
|
|
11
|
+
label: string;
|
|
12
|
+
/** Icon class, for example `ti ti-send`. */
|
|
13
|
+
icon?: string;
|
|
14
|
+
onSelect: () => void | Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
/** Why a question is asked, or why its main answer is off. */
|
|
17
|
+
export type ChatDecisionReason = {
|
|
18
|
+
text: JSX.Element;
|
|
19
|
+
/** Icon class; the text after it starts 1.5rem from the edge. */
|
|
20
|
+
icon?: string;
|
|
21
|
+
/** `danger` for deletions, `warning` for outside content and limits. */
|
|
22
|
+
tone?: "neutral" | "danger" | "warning";
|
|
23
|
+
};
|
|
24
|
+
export type ChatOutcomeTone = "running" | "done" | "off" | "waiting" | "warning" | "error";
|
|
25
|
+
/** One text of an outcome flow. */
|
|
26
|
+
export type ChatOutcomeLine = {
|
|
27
|
+
tone: ChatOutcomeTone;
|
|
28
|
+
/** What happened, as one sentence, usually with `ReferenceChip`s. */
|
|
29
|
+
text: JSX.Element;
|
|
30
|
+
/** A quiet second sentence, such as "You declined." */
|
|
31
|
+
detail?: JSX.Element;
|
|
32
|
+
/** A formatted time after the text. */
|
|
33
|
+
time?: string;
|
|
34
|
+
/** Replaces the tone's icon, for example `ti ti-clock-x` for an expired question. */
|
|
35
|
+
icon?: string;
|
|
36
|
+
/** One text link after the line, such as "Ask again". */
|
|
37
|
+
action?: {
|
|
38
|
+
label: string;
|
|
39
|
+
onSelect: () => void | Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
/** Small buttons under the line. Shown while this line is current; otherwise hidden but still reserving their row. */
|
|
42
|
+
actions?: JSX.Element;
|
|
43
|
+
};
|
|
44
|
+
/** A person in a preview header: the name in the text colour, then the address the message really uses. */
|
|
45
|
+
export type ChatPreviewPerson = {
|
|
46
|
+
name?: string;
|
|
47
|
+
address?: string;
|
|
48
|
+
};
|
|
49
|
+
/** One header row, such as "To Lea Berg lea.berg@example.com". */
|
|
50
|
+
export type ChatPreviewHeaderRow = {
|
|
51
|
+
label: string;
|
|
52
|
+
people?: readonly ChatPreviewPerson[];
|
|
53
|
+
/** Further content after the people, such as "and 2 more". */
|
|
54
|
+
value?: JSX.Element;
|
|
55
|
+
/** Draws the label stronger, for recipients others cannot see. */
|
|
56
|
+
emphasis?: boolean;
|
|
57
|
+
};
|
|
5
58
|
type ChatActionBase = {
|
|
6
59
|
id: string;
|
|
7
60
|
label: string;
|
|
@@ -25,9 +25,9 @@ import { type StateTimelineChartOptions, type StateTimelineDomain } from "./char
|
|
|
25
25
|
* **Why so thin.** The props are a discriminated union over each
|
|
26
26
|
* stdlib chart function — `kind: "line"` brings in exactly the params
|
|
27
27
|
* `charts.line` expects, `kind: "bar"` brings in `charts.bar`'s, etc.
|
|
28
|
-
* Options stay aligned with stdlib without renaming.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* Options stay aligned with stdlib without renaming. Every chart provides
|
|
29
|
+
* renderer-owned inspection, tooltips and optional selection by default.
|
|
30
|
+
* `interactive` adds bounded pan / zoom and reset controls to maps and state timelines.
|
|
31
31
|
* If stdlib gains a new option, it's automatically available at every
|
|
32
32
|
* callsite.
|
|
33
33
|
*
|
|
@@ -75,10 +75,16 @@ export type ChartProps = {
|
|
|
75
75
|
class?: string;
|
|
76
76
|
style?: JSX.CSSProperties | string;
|
|
77
77
|
labels?: ChartLabels;
|
|
78
|
+
/**
|
|
79
|
+
* Navigation for maps and state timelines: pan, zoom and reset controls.
|
|
80
|
+
* Arrows pan; Alt+arrows inspect. Every chart shows tooltips and keyboard
|
|
81
|
+
* inspection without this prop.
|
|
82
|
+
*/
|
|
78
83
|
interactive?: boolean;
|
|
79
84
|
onSelect?: (selection: ChartSelection) => void;
|
|
80
85
|
/** Controlled highlight; indices belong to this exact input snapshot. */
|
|
81
86
|
selected?: ChartDatumRef | null;
|
|
87
|
+
/** Customize the always-on tooltip with a title and labeled text rows. */
|
|
82
88
|
tooltip?: ChartTooltipFormatter;
|
|
83
89
|
/** Optional shared X cursor for line charts. */
|
|
84
90
|
cursor?: ChartCursor;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
/** The colour family a file's icon tile uses. `other` covers code, text, and unknown files. */
|
|
3
|
+
export type FileType = "folder" | "pdf" | "image" | "sheet" | "document" | "slides" | "video" | "audio" | "archive" | "other";
|
|
4
|
+
export type FileTypeIconProps = {
|
|
5
|
+
/** The file or folder name; its extension picks the glyph and the type colour. */
|
|
6
|
+
name: string;
|
|
7
|
+
mediaType?: string;
|
|
8
|
+
folder?: boolean;
|
|
9
|
+
/** Shows an open folder, for example the folder a list is showing. */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** A Tabler icon class that replaces the glyph the name picks; the type colour still follows the name. */
|
|
12
|
+
icon?: string;
|
|
13
|
+
/** `sm` for tree rows, `md` for list rows, `lg` for grid previews. Defaults to `md`. */
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
class?: string;
|
|
16
|
+
};
|
|
17
|
+
/** Resolve the colour family for a file or folder from its name and media type. */
|
|
18
|
+
export declare const fileTypeOf: (file: {
|
|
19
|
+
name: string;
|
|
20
|
+
mediaType?: string;
|
|
21
|
+
folder?: boolean;
|
|
22
|
+
}) => FileType;
|
|
23
|
+
/**
|
|
24
|
+
* A file or folder glyph in a soft chip of its type colour. Folders take the app accent hook
|
|
25
|
+
* `--k2b-app-workspace-active`; code, text, and unknown files a neutral ink. The box size is fixed per `size`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function FileTypeIcon(props: FileTypeIconProps): JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/** The visible length of a chip; longer titles are cut in the middle. */
|
|
3
|
+
export declare const REFERENCE_CHIP_MAX_CHARACTERS = 40;
|
|
4
|
+
/**
|
|
5
|
+
* Shortens `text` to at most `max` visible characters by cutting its middle, so the start and an ending such as
|
|
6
|
+
* ".pdf" stay readable. Counts user-perceived characters, so an emoji is never split.
|
|
7
|
+
* @example truncateMiddle("Quarterly report for the operations team 2026.pdf", 24) // "Quarterly re…m 2026.pdf"
|
|
8
|
+
*/
|
|
9
|
+
export declare const truncateMiddle: (text: string, max?: number) => string;
|
|
10
|
+
type ReferenceChipCommon = {
|
|
11
|
+
class?: string;
|
|
12
|
+
};
|
|
13
|
+
/** A thing or a place: an icon in its application colour and its title, a link while it exists. */
|
|
14
|
+
export type ReferenceChipObjectProps = ReferenceChipCommon & {
|
|
15
|
+
kind: "object" | "place";
|
|
16
|
+
title: string;
|
|
17
|
+
/** Destination of the chip. Omit it, or set `gone`, when there is nothing to open. */
|
|
18
|
+
href?: string;
|
|
19
|
+
/** Icon class, for example `ti ti-mail`. */
|
|
20
|
+
icon?: string;
|
|
21
|
+
/** Icon colour, usually the owning application's accent. Sets `--k2b-reference-icon`. */
|
|
22
|
+
accent?: string;
|
|
23
|
+
/** The thing no longer exists: struck through and never a link. */
|
|
24
|
+
gone?: boolean;
|
|
25
|
+
};
|
|
26
|
+
/** A person: avatar and display name. The address belongs in the preview, never in the chip. */
|
|
27
|
+
export type ReferenceChipPersonProps = ReferenceChipCommon & {
|
|
28
|
+
kind: "person";
|
|
29
|
+
name: string;
|
|
30
|
+
/** Avatar image; initials on a tint from the name otherwise. */
|
|
31
|
+
src?: string | null;
|
|
32
|
+
href?: string;
|
|
33
|
+
};
|
|
34
|
+
/** A date or time the host already formatted for the reader. */
|
|
35
|
+
export type ReferenceChipTimeProps = ReferenceChipCommon & {
|
|
36
|
+
kind: "time";
|
|
37
|
+
label: string;
|
|
38
|
+
/** Machine-readable value for `<time datetime>`. */
|
|
39
|
+
dateTime?: string;
|
|
40
|
+
};
|
|
41
|
+
export type ReferenceChipProps = ReferenceChipObjectProps | ReferenceChipPersonProps | ReferenceChipTimeProps;
|
|
42
|
+
/**
|
|
43
|
+
* A typed reference inside a sentence: a thing, a place, a person, or a time, in the calm `.k2b-reference` pill.
|
|
44
|
+
* A chip shows at most 40 characters and cuts longer titles in the middle; the full title stays its accessible name
|
|
45
|
+
* and tooltip.
|
|
46
|
+
* @example <ReferenceChip kind="object" title="Maintenance window" icon="ti ti-mail" accent="var(--app-mail)" href="/mail/…" />
|
|
47
|
+
*/
|
|
48
|
+
export declare function ReferenceChip(props: ReferenceChipProps): JSX.Element;
|
|
49
|
+
export default ReferenceChip;
|
|
@@ -22,6 +22,12 @@ type CalendarPointerSessionOptions<T> = {
|
|
|
22
22
|
/** Called on every move once the gesture is active, such as to move a token with the pointer. */
|
|
23
23
|
onMove?: (clientX: number, clientY: number) => void;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Runs `open` once the browser has handled the pointer release that ends a drag. The browser light-dismisses an
|
|
27
|
+
* `auto` popover that opens while it dispatches that `pointerup`, as the HTML popover rules ask and Chromium 156
|
|
28
|
+
* does, so a popover that a drag opens must open after the release.
|
|
29
|
+
*/
|
|
30
|
+
export declare const afterPointerRelease: (open: () => void) => void;
|
|
25
31
|
/**
|
|
26
32
|
* Owns one pointer gesture from threshold crossing through commit or cancel.
|
|
27
33
|
* Views provide geometry through `resolve`; this helper owns global cleanup,
|
|
@@ -25,6 +25,7 @@ export { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocR
|
|
|
25
25
|
export { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from "./FileBrowser";
|
|
26
26
|
export { FileGrid, type FileGridProps } from "./FileGrid";
|
|
27
27
|
export { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from "./FileTree";
|
|
28
|
+
export { type FileType, FileTypeIcon, type FileTypeIconProps, fileTypeOf } from "./FileTypeIcon";
|
|
28
29
|
export { canPreviewFile, default as FileView, type FileViewContent, type FileViewFile, type FileViewPreviewKind, type FileViewProps, type FileViewRenderer, type FileViewRendererProps, formatFileViewSize, getFileViewPreviewKind, } from "./FileView";
|
|
29
30
|
export type { KbdProps } from "./Kbd";
|
|
30
31
|
export { Kbd } from "./Kbd";
|
|
@@ -45,6 +46,8 @@ export { default as PdfPreview } from "./PdfPreview";
|
|
|
45
46
|
export type { RangeOption, RangePickerProps } from "./RangePicker";
|
|
46
47
|
export { default as RangePicker } from "./RangePicker";
|
|
47
48
|
export { ReactionBar, type ReactionBarItem, type ReactionBarProps } from "./ReactionBar";
|
|
49
|
+
export type { ReferenceChipObjectProps, ReferenceChipPersonProps, ReferenceChipProps, ReferenceChipTimeProps, } from "./ReferenceChip";
|
|
50
|
+
export { REFERENCE_CHIP_MAX_CHARACTERS, ReferenceChip, truncateMiddle } from "./ReferenceChip";
|
|
48
51
|
export type { StepsProps } from "./Steps";
|
|
49
52
|
export { Steps } from "./Steps";
|
|
50
53
|
export type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from "./StructuredDataPreview";
|
|
@@ -123,9 +123,11 @@ export type AppWorkspaceSidebarProps = {
|
|
|
123
123
|
/**
|
|
124
124
|
* Below 48rem (768 px) the sidebar is hidden and the host's mobile
|
|
125
125
|
* navigation takes over; from 48 to 64rem it is an overlay that a button in
|
|
126
|
-
* the workspace's head opens. `"stacked"`
|
|
127
|
-
*
|
|
128
|
-
*
|
|
126
|
+
* the workspace's head opens. `"stacked"` is for overviews whose sidebar is
|
|
127
|
+
* the primary object list: below 64rem its items become one row of chips
|
|
128
|
+
* above the content, and "All" at the end of the row opens the complete
|
|
129
|
+
* sidebar in a sheet (a centered dialog from 48rem). From 64rem it is the
|
|
130
|
+
* regular sidebar column; the element is a `nav` landmark either way.
|
|
129
131
|
*/
|
|
130
132
|
mobile?: "hidden" | "stacked";
|
|
131
133
|
resizable?: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ResizeSeparatorOptions } from "./resize-separator";
|
|
2
|
+
export type ResizeSeparatorProps = Omit<ResizeSeparatorOptions, "value"> & {
|
|
3
|
+
label: string;
|
|
4
|
+
orientation: "vertical" | "horizontal";
|
|
5
|
+
value: number;
|
|
6
|
+
controls?: string;
|
|
7
|
+
class?: string;
|
|
8
|
+
};
|
|
9
|
+
export default function ResizeSeparator(props: ResizeSeparatorProps): import("solid-js").JSX.Element;
|
|
@@ -15,6 +15,13 @@ export type TabBarProps = {
|
|
|
15
15
|
label: string;
|
|
16
16
|
/** Up to five destinations; further items are not rendered. Put the rest behind a "More" destination. */
|
|
17
17
|
items: readonly TabBarItem[];
|
|
18
|
+
/**
|
|
19
|
+
* `bar` (the default) is flat on the page canvas and pads the bottom safe area. `floating` is a rounded bar that the
|
|
20
|
+
* host places above the content, away from the safe areas; its open item is a raised chip. The host may paint it
|
|
21
|
+
* with `--k2b-tab-bar-background`, color its items with `--k2b-tab-bar-color`, and color the open item with
|
|
22
|
+
* `--k2b-tab-bar-selected-background` and `--k2b-tab-bar-selected-color`.
|
|
23
|
+
*/
|
|
24
|
+
variant?: "bar" | "floating";
|
|
18
25
|
class?: string;
|
|
19
26
|
};
|
|
20
27
|
/**
|