@k2b/ui 0.36.0 → 0.38.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/Dropdown.js +132 -116
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/Tabs.js +18 -15
- package/dist/browser/actions/Tabs.js.map +1 -1
- package/dist/browser/chat/ChatComposer.js +58 -25
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/content/MessageRow.js +164 -152
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/feedback/prompts.js +23 -9
- package/dist/browser/feedback/prompts.js.map +1 -1
- package/dist/browser/inputs/Combobox.js +56 -51
- package/dist/browser/inputs/Combobox.js.map +1 -1
- package/dist/browser/inputs/RichSelect.js +86 -67
- package/dist/browser/inputs/RichSelect.js.map +1 -1
- package/dist/browser/internal/keyed-for.js +47 -0
- package/dist/browser/internal/keyed-for.js.map +1 -0
- package/dist/browser/layout/AppWorkspace.js +252 -238
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/text-editor/engine.js +13 -10
- package/dist/browser/text-editor/engine.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +101 -85
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/Tabs.js +12 -9
- package/dist/ssr/actions/Tabs.js.map +1 -1
- package/dist/ssr/chat/ChatComposer.js +41 -15
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/content/MessageRow.js +9 -2
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/feedback/prompts.js +22 -8
- package/dist/ssr/feedback/prompts.js.map +1 -1
- package/dist/ssr/inputs/Combobox.js +18 -13
- package/dist/ssr/inputs/Combobox.js.map +1 -1
- package/dist/ssr/inputs/RichSelect.js +47 -28
- package/dist/ssr/inputs/RichSelect.js.map +1 -1
- package/dist/ssr/internal/keyed-for.js +47 -0
- package/dist/ssr/internal/keyed-for.js.map +1 -0
- package/dist/ssr/layout/AppWorkspace.js +58 -50
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/text-editor/engine.js +13 -10
- package/dist/ssr/text-editor/engine.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/content/MessageRow.d.ts +1 -1
- package/dist/types/feedback/prompts.d.ts +5 -0
- package/dist/types/internal/keyed-for.d.ts +13 -0
- package/dist/types/layout/AppWorkspace.d.ts +6 -0
- package/dist/types/text-editor/engine.d.ts +1 -1
- package/package.json +3 -2
|
@@ -113,7 +113,7 @@ export type MessageRowProps = {
|
|
|
113
113
|
* the author and time. Defaults to true; `startsMessageGroup` decides it from the previous message.
|
|
114
114
|
*/
|
|
115
115
|
groupStart?: boolean;
|
|
116
|
-
/** Shown next to the name at the start of a group, for example the kind of account. */
|
|
116
|
+
/** Shown next to the name (or own-message time) at the start of a group, for example the kind of account. */
|
|
117
117
|
badge?: JSX.Element;
|
|
118
118
|
/** Send state. Sets a line of fixed height below the message: a clock, a check, or "Not sent" with "Retry". */
|
|
119
119
|
status?: MessageRowStatus;
|
|
@@ -21,6 +21,11 @@ export interface ConfirmOptions extends DialogOptions {
|
|
|
21
21
|
}
|
|
22
22
|
type PromptContent = string | HTMLElement | JSX.Element;
|
|
23
23
|
export type PromptSearchItem<T = unknown> = {
|
|
24
|
+
/**
|
|
25
|
+
* Stable identity of the result, such as its record ID. With it, a newer answer that contains the same result keeps
|
|
26
|
+
* its row, so a click in progress still lands. Without it, each answer replaces the rows.
|
|
27
|
+
*/
|
|
28
|
+
id?: string;
|
|
24
29
|
label: string;
|
|
25
30
|
desc?: string;
|
|
26
31
|
icon?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/**
|
|
3
|
+
* `<For>` that keeps a row's element while its item stays the same: the same object, also when its getters change, or
|
|
4
|
+
* a new object with the same identity (`by`). Hosts rebuild equal items whenever their inputs change; `<For>` would
|
|
5
|
+
* then replace each row, and a row replaced between press and release swallows the click (#2140).
|
|
6
|
+
* Each row reads its current item.
|
|
7
|
+
*/
|
|
8
|
+
export declare function KeyedFor<T>(props: {
|
|
9
|
+
each: readonly T[];
|
|
10
|
+
by: (item: T) => string;
|
|
11
|
+
fallback?: JSX.Element;
|
|
12
|
+
children: (item: () => T, index: () => number) => JSX.Element;
|
|
13
|
+
}): JSX.Element;
|
|
@@ -235,6 +235,12 @@ export type AppWorkspaceSidebarItemProps = {
|
|
|
235
235
|
contextMeta?: JSX.Element;
|
|
236
236
|
/** Passive second line; keep controls in actions or preview. */
|
|
237
237
|
description?: JSX.Element;
|
|
238
|
+
/**
|
|
239
|
+
* A third line with the one fact about the row that needs attention, such as "3 deliveries failed". `noteTone`
|
|
240
|
+
* colours it; the words carry the meaning, the colour only repeats it.
|
|
241
|
+
*/
|
|
242
|
+
note?: JSX.Element;
|
|
243
|
+
noteTone?: "neutral" | "warning" | "danger";
|
|
238
244
|
/** Interactive details, also reachable through a dedicated button. */
|
|
239
245
|
preview?: {
|
|
240
246
|
label: string;
|
|
@@ -27,7 +27,7 @@ export declare function createTextEditor(options: TextEditorOptions): {
|
|
|
27
27
|
view: EditorView;
|
|
28
28
|
/** Also re-reads `presentation`, so a host can refresh it, e.g. after a theme change. */
|
|
29
29
|
setMode: (mode: TextEditorMode) => void;
|
|
30
|
-
setLabel: (
|
|
30
|
+
setLabel: (next: string) => void;
|
|
31
31
|
setReadOnly: (readOnly: boolean) => void;
|
|
32
32
|
destroy: () => void;
|
|
33
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k2b/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Production-ready components for SolidJS applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"@fontsource/ibm-plex-mono": "5.3.0",
|
|
74
74
|
"@fontsource/ibm-plex-sans": "5.3.0",
|
|
75
75
|
"@k2b/stdlib": "0.30.0",
|
|
76
|
+
"@lezer/highlight": "1.2.4",
|
|
76
77
|
"@lezer/markdown": "1.7.2",
|
|
77
78
|
"@tabler/icons-webfont": "3.48.0",
|
|
78
79
|
"dompurify": "3.4.17",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
"devDependencies": {
|
|
89
90
|
"@babel/core": "8.0.6",
|
|
90
91
|
"@babel/preset-typescript": "8.0.1",
|
|
91
|
-
"@k2b/ssr": "0.20.
|
|
92
|
+
"@k2b/ssr": "0.20.2",
|
|
92
93
|
"@types/babel__core": "7.20.5",
|
|
93
94
|
"@types/bun": "1.4.2",
|
|
94
95
|
"axe-core": "4.11.0",
|