@k2b/ui 0.51.0 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.css +3 -0
- package/dist/browser/actions/Toolbar.js +8 -2
- package/dist/browser/actions/Toolbar.js.map +1 -1
- package/dist/browser/charts/core/bar-labels.js +5 -0
- package/dist/browser/charts/core/bar-labels.js.map +1 -0
- package/dist/browser/charts/core/bubble.js +166 -0
- package/dist/browser/charts/core/bubble.js.map +1 -0
- package/dist/browser/charts/core/default-styles.js +83 -0
- package/dist/browser/charts/core/default-styles.js.map +1 -0
- package/dist/browser/charts/core/funnel-layout.js +79 -0
- package/dist/browser/charts/core/funnel-layout.js.map +1 -0
- package/dist/browser/charts/core/funnel.js +27 -0
- package/dist/browser/charts/core/funnel.js.map +1 -0
- package/dist/browser/charts/core/index.js +6 -1
- package/dist/browser/charts/core/index.js.map +1 -1
- package/dist/browser/charts/core/pareto.js +120 -0
- package/dist/browser/charts/core/pareto.js.map +1 -0
- package/dist/browser/charts/core/radar.js +101 -0
- package/dist/browser/charts/core/radar.js.map +1 -0
- package/dist/browser/charts/core/registry.js +11 -1
- package/dist/browser/charts/core/registry.js.map +1 -1
- package/dist/browser/charts/core/render-size.js +3 -1
- package/dist/browser/charts/core/render-size.js.map +1 -1
- package/dist/browser/charts/core/render.js +19 -0
- package/dist/browser/charts/core/render.js.map +1 -1
- package/dist/browser/charts/core/snapshot.js +1 -1
- package/dist/browser/charts/core/snapshot.js.map +1 -1
- package/dist/browser/charts/core/svg-barGauge.js +67 -0
- package/dist/browser/charts/core/svg-barGauge.js.map +1 -0
- package/dist/browser/charts/core/svg-boxplot.js +127 -0
- package/dist/browser/charts/core/svg-boxplot.js.map +1 -0
- package/dist/browser/charts/core/svg-common.js +1065 -0
- package/dist/browser/charts/core/svg-common.js.map +1 -0
- package/dist/browser/charts/core/svg-gauge.js +185 -0
- package/dist/browser/charts/core/svg-gauge.js.map +1 -0
- package/dist/browser/charts/core/svg-heatmap.js +80 -0
- package/dist/browser/charts/core/svg-heatmap.js.map +1 -0
- package/dist/browser/charts/core/svg-histogram.js +73 -0
- package/dist/browser/charts/core/svg-histogram.js.map +1 -0
- package/dist/browser/charts/core/svg-renderers.js +9 -1777
- package/dist/browser/charts/core/svg-renderers.js.map +1 -1
- package/dist/browser/charts/core/svg-scatter.js +114 -0
- package/dist/browser/charts/core/svg-scatter.js.map +1 -0
- package/dist/browser/charts/core/treemap.js +138 -0
- package/dist/browser/charts/core/treemap.js.map +1 -0
- package/dist/browser/charts/description.js.map +1 -1
- package/dist/browser/content/ChartRoot.js +21 -7
- package/dist/browser/content/ChartRoot.js.map +1 -1
- package/dist/browser/content/ChartSnapshotView.js +4 -1
- package/dist/browser/content/ChartSnapshotView.js.map +1 -1
- package/dist/browser/content/DataTable.js +186 -193
- package/dist/browser/content/DataTable.js.map +1 -1
- package/dist/browser/content/Lightbox.js +55 -23
- package/dist/browser/content/Lightbox.js.map +1 -1
- package/dist/browser/content/ThumbnailStrip.js +174 -0
- package/dist/browser/content/ThumbnailStrip.js.map +1 -0
- package/dist/browser/content/chart-bar.js +98 -0
- package/dist/browser/content/chart-bar.js.map +1 -1
- package/dist/browser/content/chart-inspection-core.js +28 -8
- package/dist/browser/content/chart-inspection-core.js.map +1 -1
- package/dist/browser/content/chart-message-catalog.js +18 -0
- package/dist/browser/content/chart-message-catalog.js.map +1 -1
- package/dist/browser/content/index.js +1 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/content/thumbnail-strip-messages.js +24 -0
- package/dist/browser/content/thumbnail-strip-messages.js.map +1 -0
- package/dist/browser/inputs/ChoiceInputs.js +132 -101
- package/dist/browser/inputs/ChoiceInputs.js.map +1 -1
- package/dist/browser/inputs/index.js +1 -0
- package/dist/browser/inputs/index.js.map +1 -1
- package/dist/browser/inputs/markdown/MarkdownSelectionToolbar.js +330 -0
- package/dist/browser/inputs/markdown/MarkdownSelectionToolbar.js.map +1 -0
- package/dist/browser/internal/field.js +96 -77
- package/dist/browser/internal/field.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +7 -5
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/PanelDialog.js +92 -68
- package/dist/browser/layout/PanelDialog.js.map +1 -1
- package/dist/browser/surfaces/StatCell.js +82 -70
- package/dist/browser/surfaces/StatCell.js.map +1 -1
- package/dist/browser/surfaces/stat-cell-messages.js +4 -2
- package/dist/browser/surfaces/stat-cell-messages.js.map +1 -1
- package/dist/browser/widgets/DashboardFrame.js +93 -88
- package/dist/browser/widgets/DashboardFrame.js.map +1 -1
- package/dist/ssr/actions/Toolbar.js +8 -2
- package/dist/ssr/actions/Toolbar.js.map +1 -1
- package/dist/ssr/charts/core/bar-labels.js +5 -0
- package/dist/ssr/charts/core/bar-labels.js.map +1 -0
- package/dist/ssr/charts/core/bubble.js +166 -0
- package/dist/ssr/charts/core/bubble.js.map +1 -0
- package/dist/ssr/charts/core/default-styles.js +83 -0
- package/dist/ssr/charts/core/default-styles.js.map +1 -0
- package/dist/ssr/charts/core/funnel-layout.js +79 -0
- package/dist/ssr/charts/core/funnel-layout.js.map +1 -0
- package/dist/ssr/charts/core/funnel.js +27 -0
- package/dist/ssr/charts/core/funnel.js.map +1 -0
- package/dist/ssr/charts/core/index.js +6 -1
- package/dist/ssr/charts/core/index.js.map +1 -1
- package/dist/ssr/charts/core/pareto.js +120 -0
- package/dist/ssr/charts/core/pareto.js.map +1 -0
- package/dist/ssr/charts/core/radar.js +101 -0
- package/dist/ssr/charts/core/radar.js.map +1 -0
- package/dist/ssr/charts/core/registry.js +11 -1
- package/dist/ssr/charts/core/registry.js.map +1 -1
- package/dist/ssr/charts/core/render-size.js +3 -1
- package/dist/ssr/charts/core/render-size.js.map +1 -1
- package/dist/ssr/charts/core/render.js +19 -0
- package/dist/ssr/charts/core/render.js.map +1 -1
- package/dist/ssr/charts/core/snapshot.js +1 -1
- package/dist/ssr/charts/core/snapshot.js.map +1 -1
- package/dist/ssr/charts/core/svg-barGauge.js +67 -0
- package/dist/ssr/charts/core/svg-barGauge.js.map +1 -0
- package/dist/ssr/charts/core/svg-boxplot.js +127 -0
- package/dist/ssr/charts/core/svg-boxplot.js.map +1 -0
- package/dist/ssr/charts/core/svg-common.js +1065 -0
- package/dist/ssr/charts/core/svg-common.js.map +1 -0
- package/dist/ssr/charts/core/svg-gauge.js +185 -0
- package/dist/ssr/charts/core/svg-gauge.js.map +1 -0
- package/dist/ssr/charts/core/svg-heatmap.js +80 -0
- package/dist/ssr/charts/core/svg-heatmap.js.map +1 -0
- package/dist/ssr/charts/core/svg-histogram.js +73 -0
- package/dist/ssr/charts/core/svg-histogram.js.map +1 -0
- package/dist/ssr/charts/core/svg-renderers.js +9 -1777
- package/dist/ssr/charts/core/svg-renderers.js.map +1 -1
- package/dist/ssr/charts/core/svg-scatter.js +114 -0
- package/dist/ssr/charts/core/svg-scatter.js.map +1 -0
- package/dist/ssr/charts/core/treemap.js +138 -0
- package/dist/ssr/charts/core/treemap.js.map +1 -0
- package/dist/ssr/charts/description.js.map +1 -1
- package/dist/ssr/content/ChartRoot.js +21 -7
- package/dist/ssr/content/ChartRoot.js.map +1 -1
- package/dist/ssr/content/ChartSnapshotView.js +1 -0
- package/dist/ssr/content/ChartSnapshotView.js.map +1 -1
- package/dist/ssr/content/DataTable.js +12 -16
- package/dist/ssr/content/DataTable.js.map +1 -1
- package/dist/ssr/content/Lightbox.js +32 -3
- package/dist/ssr/content/Lightbox.js.map +1 -1
- package/dist/ssr/content/ThumbnailStrip.js +103 -0
- package/dist/ssr/content/ThumbnailStrip.js.map +1 -0
- package/dist/ssr/content/chart-bar.js +98 -0
- package/dist/ssr/content/chart-bar.js.map +1 -1
- package/dist/ssr/content/chart-inspection-core.js +28 -8
- package/dist/ssr/content/chart-inspection-core.js.map +1 -1
- package/dist/ssr/content/chart-message-catalog.js +18 -0
- package/dist/ssr/content/chart-message-catalog.js.map +1 -1
- package/dist/ssr/content/index.js +1 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/content/thumbnail-strip-messages.js +24 -0
- package/dist/ssr/content/thumbnail-strip-messages.js.map +1 -0
- package/dist/ssr/inputs/ChoiceInputs.js +55 -40
- package/dist/ssr/inputs/ChoiceInputs.js.map +1 -1
- package/dist/ssr/inputs/index.js +1 -0
- package/dist/ssr/inputs/index.js.map +1 -1
- package/dist/ssr/inputs/markdown/MarkdownSelectionToolbar.js +293 -0
- package/dist/ssr/inputs/markdown/MarkdownSelectionToolbar.js.map +1 -0
- package/dist/ssr/internal/field.js +36 -24
- package/dist/ssr/internal/field.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +5 -1
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/PanelDialog.js +40 -26
- package/dist/ssr/layout/PanelDialog.js.map +1 -1
- package/dist/ssr/surfaces/StatCell.js +29 -18
- package/dist/ssr/surfaces/StatCell.js.map +1 -1
- package/dist/ssr/surfaces/stat-cell-messages.js +4 -2
- package/dist/ssr/surfaces/stat-cell-messages.js.map +1 -1
- package/dist/ssr/widgets/DashboardFrame.js +6 -11
- package/dist/ssr/widgets/DashboardFrame.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/Toolbar.d.ts +2 -0
- package/dist/types/charts/core/bar-labels.d.ts +1 -0
- package/dist/types/charts/core/bubble.d.ts +66 -0
- package/dist/types/charts/core/default-styles.d.ts +1 -0
- package/dist/types/charts/core/funnel-layout.d.ts +43 -0
- package/dist/types/charts/core/funnel.d.ts +13 -0
- package/dist/types/charts/core/index.d.ts +6 -1
- package/dist/types/charts/core/pareto.d.ts +40 -0
- package/dist/types/charts/core/radar.d.ts +47 -0
- package/dist/types/charts/core/registry.d.ts +10 -0
- package/dist/types/charts/core/render-size.d.ts +1 -1
- package/dist/types/charts/core/svg-barGauge.d.ts +3 -0
- package/dist/types/charts/core/svg-boxplot.d.ts +18 -0
- package/dist/types/charts/core/svg-common.d.ts +612 -0
- package/dist/types/charts/core/svg-gauge.d.ts +6 -0
- package/dist/types/charts/core/svg-heatmap.d.ts +6 -0
- package/dist/types/charts/core/svg-histogram.d.ts +16 -0
- package/dist/types/charts/core/svg-renderers.d.ts +8 -612
- package/dist/types/charts/core/svg-scatter.d.ts +23 -0
- package/dist/types/charts/core/treemap.d.ts +45 -0
- package/dist/types/charts/description.d.ts +63 -0
- package/dist/types/content/ChartRoot.d.ts +1 -1
- package/dist/types/content/Lightbox.d.ts +2 -0
- package/dist/types/content/ThumbnailStrip.d.ts +29 -0
- package/dist/types/content/chart-bar.d.ts +38 -2
- package/dist/types/content/chart-inspection-core.d.ts +7 -0
- package/dist/types/content/chart-inspection.d.ts +1 -0
- package/dist/types/content/chart-message-catalog.d.ts +8 -0
- package/dist/types/content/index.d.ts +1 -0
- package/dist/types/content/thumbnail-strip-messages.d.ts +10 -0
- package/dist/types/inputs/ChoiceInputs.d.ts +2 -0
- package/dist/types/inputs/index.d.ts +2 -0
- package/dist/types/inputs/markdown/MarkdownSelectionToolbar.d.ts +19 -0
- package/dist/types/internal/field.d.ts +2 -0
- package/dist/types/layout/PanelDialog.d.ts +5 -0
- package/dist/types/surfaces/stat-cell-messages.d.ts +1 -0
- package/dist/types/widgets/DashboardFrame.d.ts +4 -1
- package/package.json +2 -2
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ChartOptions } from "./svg";
|
|
2
|
+
export type TreemapOptions = ChartOptions & {
|
|
3
|
+
groups: string[];
|
|
4
|
+
legend?: boolean;
|
|
5
|
+
data: {
|
|
6
|
+
label: string;
|
|
7
|
+
group: string;
|
|
8
|
+
value: number;
|
|
9
|
+
}[];
|
|
10
|
+
locale?: string;
|
|
11
|
+
format?: (value: number) => string;
|
|
12
|
+
displayWidth?: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function treemapLayout(spec: TreemapOptions, size?: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}): {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
total: number;
|
|
21
|
+
cells: ({
|
|
22
|
+
label: string;
|
|
23
|
+
group: string;
|
|
24
|
+
value: number;
|
|
25
|
+
index: number;
|
|
26
|
+
} & {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
})[];
|
|
32
|
+
header: {
|
|
33
|
+
svg: string;
|
|
34
|
+
height: number;
|
|
35
|
+
};
|
|
36
|
+
legend: {
|
|
37
|
+
label: string;
|
|
38
|
+
x: number;
|
|
39
|
+
row: number;
|
|
40
|
+
index: number;
|
|
41
|
+
}[];
|
|
42
|
+
legendTop: number;
|
|
43
|
+
plotHeight: number;
|
|
44
|
+
};
|
|
45
|
+
export declare function renderTreemapSvg(spec: TreemapOptions): string;
|
|
@@ -87,6 +87,10 @@ type Variants<N> = {
|
|
|
87
87
|
}[];
|
|
88
88
|
layout?: "columns" | "rows" | "grouped" | "stacked";
|
|
89
89
|
normalize?: boolean;
|
|
90
|
+
share?: boolean;
|
|
91
|
+
limit?: number;
|
|
92
|
+
tone?: "in" | "out";
|
|
93
|
+
format?: ChartNumberFormat;
|
|
90
94
|
compare?: {
|
|
91
95
|
label: string;
|
|
92
96
|
data: (number | null)[];
|
|
@@ -99,6 +103,13 @@ type Variants<N> = {
|
|
|
99
103
|
showValues?: boolean;
|
|
100
104
|
legend?: boolean;
|
|
101
105
|
references?: Reference[];
|
|
106
|
+
} | {
|
|
107
|
+
kind: "funnel";
|
|
108
|
+
data: {
|
|
109
|
+
label: string;
|
|
110
|
+
value: number | null;
|
|
111
|
+
}[];
|
|
112
|
+
format?: ChartNumberFormat;
|
|
102
113
|
} | {
|
|
103
114
|
kind: "hbar";
|
|
104
115
|
series: string[];
|
|
@@ -203,6 +214,58 @@ type Variants<N> = {
|
|
|
203
214
|
delta?: N;
|
|
204
215
|
better?: "up" | "down";
|
|
205
216
|
sparkline?: N[];
|
|
217
|
+
} | {
|
|
218
|
+
kind: "treemap";
|
|
219
|
+
groups: string[];
|
|
220
|
+
data: {
|
|
221
|
+
label: string;
|
|
222
|
+
group: string;
|
|
223
|
+
value: number;
|
|
224
|
+
}[];
|
|
225
|
+
legend?: boolean;
|
|
226
|
+
format?: ChartNumberFormat;
|
|
227
|
+
locale?: string;
|
|
228
|
+
} | {
|
|
229
|
+
kind: "pareto";
|
|
230
|
+
labels: [string, string];
|
|
231
|
+
data: {
|
|
232
|
+
label: string;
|
|
233
|
+
value: number;
|
|
234
|
+
prev: number;
|
|
235
|
+
}[];
|
|
236
|
+
format?: ChartNumberFormat;
|
|
237
|
+
locale?: string;
|
|
238
|
+
} | {
|
|
239
|
+
kind: "bubble";
|
|
240
|
+
groups: string[];
|
|
241
|
+
data: {
|
|
242
|
+
label: string;
|
|
243
|
+
group: string;
|
|
244
|
+
x: number;
|
|
245
|
+
y: number;
|
|
246
|
+
size?: number;
|
|
247
|
+
}[];
|
|
248
|
+
xLabel: string;
|
|
249
|
+
yLabel: string;
|
|
250
|
+
sizeLabel?: string;
|
|
251
|
+
averages?: boolean;
|
|
252
|
+
legend?: boolean;
|
|
253
|
+
xFormat?: ChartNumberFormat;
|
|
254
|
+
yFormat?: ChartNumberFormat;
|
|
255
|
+
format?: ChartNumberFormat;
|
|
256
|
+
locale?: string;
|
|
257
|
+
} | {
|
|
258
|
+
kind: "radar";
|
|
259
|
+
axes: string[];
|
|
260
|
+
max: number;
|
|
261
|
+
unit?: string;
|
|
262
|
+
series: {
|
|
263
|
+
label: string;
|
|
264
|
+
data: number[];
|
|
265
|
+
}[];
|
|
266
|
+
format?: ChartNumberFormat;
|
|
267
|
+
legend?: boolean;
|
|
268
|
+
locale?: string;
|
|
206
269
|
};
|
|
207
270
|
/** Portable chart node. Dates are ISO text and missing observations are null, never zero. */
|
|
208
271
|
export type ChartDescription = Common & (Exclude<Variants<number | null>, {
|
|
@@ -73,7 +73,7 @@ export type ChartProps = {
|
|
|
73
73
|
}> & {
|
|
74
74
|
class?: string;
|
|
75
75
|
style?: JSX.CSSProperties | string;
|
|
76
|
-
labels?: ChartLabels;
|
|
76
|
+
labels?: K extends "pareto" ? [string, string] : ChartLabels;
|
|
77
77
|
/**
|
|
78
78
|
* Navigation for maps and state timelines: pan, zoom and reset controls.
|
|
79
79
|
* Arrows pan; Alt+arrows inspect. Every chart shows tooltips and keyboard
|
|
@@ -10,6 +10,8 @@ export type LightboxImage = {
|
|
|
10
10
|
downloadUrl?: string;
|
|
11
11
|
/** Actions for this image, shown before Download in the same style. */
|
|
12
12
|
actions?: readonly LightboxAction[];
|
|
13
|
+
/** A small version for the thumbnail strip, shown from four images on; without it the strip loads `src`. */
|
|
14
|
+
thumbnail?: string;
|
|
13
15
|
};
|
|
14
16
|
type LightboxProps = {
|
|
15
17
|
images: LightboxImage[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/** One image in a `ThumbnailStrip`. */
|
|
3
|
+
export type ThumbnailStripItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
/** Small image URL, or a component that renders the caller's own thumbnail; a neutral tile shows until it loads. */
|
|
7
|
+
thumbnail?: string | (() => JSX.Element);
|
|
8
|
+
/** Marks an image with unsaved edits. */
|
|
9
|
+
dirty?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type ThumbnailStripProps = {
|
|
12
|
+
items: readonly ThumbnailStripItem[];
|
|
13
|
+
/** The `id` of the shown image; it is ringed, scrolled into view, and the strip's one tab stop. */
|
|
14
|
+
currentItem?: string;
|
|
15
|
+
onSelectItem: (id: string) => void;
|
|
16
|
+
/** Adds a "+" tile at the end. */
|
|
17
|
+
onAddItems?: () => void;
|
|
18
|
+
/** Accessible name of the strip, such as "Images". */
|
|
19
|
+
label: string;
|
|
20
|
+
/** The host's layer class, such as `k2b-overlay-surface` where the strip floats over a picture. */
|
|
21
|
+
class?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A row of image thumbnails, 44 px high, that scrolls sideways and fades softly only on the side where more images
|
|
25
|
+
* follow. The current image is ringed and is the strip's one tab stop; the arrow keys, Home, and End move focus between
|
|
26
|
+
* images, and Enter or a click shows one. A dot marks unsaved edits. The host decides where the strip sits, also on a
|
|
27
|
+
* phone, and whether it floats over a picture.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ThumbnailStrip(props: ThumbnailStripProps): JSX.Element;
|
|
@@ -13,6 +13,10 @@ export type BarChartOptions = {
|
|
|
13
13
|
}[];
|
|
14
14
|
layout?: "columns" | "rows" | "grouped" | "stacked";
|
|
15
15
|
normalize?: boolean;
|
|
16
|
+
/** Explicit rows form a ranked list; shares include every source item, including the remainder. */
|
|
17
|
+
share?: boolean;
|
|
18
|
+
limit?: number;
|
|
19
|
+
tone?: "in" | "out";
|
|
16
20
|
locale?: string;
|
|
17
21
|
compare?: {
|
|
18
22
|
label: string;
|
|
@@ -66,13 +70,13 @@ type Scale = {
|
|
|
66
70
|
ticks: number[];
|
|
67
71
|
log: boolean;
|
|
68
72
|
};
|
|
69
|
-
export declare const headerHeight: (opts: BarChartOptions) => number;
|
|
73
|
+
export declare const headerHeight: (opts: Pick<BarChartOptions, "title" | "subtitle">) => number;
|
|
70
74
|
/** The layout a bar chart takes and its logical height, so server and browser reserve the same box. */
|
|
71
75
|
export declare const barChartLayout: (opts: BarChartOptions, width?: number) => {
|
|
72
76
|
layout: BarChartLayout;
|
|
73
77
|
height: number;
|
|
74
78
|
};
|
|
75
|
-
export declare const renderHeader: (opts: BarChartOptions, width: number) => string;
|
|
79
|
+
export declare const renderHeader: (opts: Pick<BarChartOptions, "title" | "subtitle">, width: number) => string;
|
|
76
80
|
/**
|
|
77
81
|
* Render a bar chart in which every category has its label. Few short labels stand below vertical columns; otherwise
|
|
78
82
|
* each category becomes a horizontal row with its label left of the bar and its value at the bar's end. Rows grow the
|
|
@@ -150,4 +154,36 @@ export declare function seriesBarLayout(opts: BarChartOptions, size?: {
|
|
|
150
154
|
};
|
|
151
155
|
barWidthPx: number;
|
|
152
156
|
};
|
|
157
|
+
/** Ranked rows retain original indices. A limit changes the drawing, never the denominator or source data. */
|
|
158
|
+
export declare function rankedBarLayout(opts: BarChartOptions, size?: {
|
|
159
|
+
width: number;
|
|
160
|
+
height: number;
|
|
161
|
+
}): {
|
|
162
|
+
width: number;
|
|
163
|
+
height: number;
|
|
164
|
+
rows: {
|
|
165
|
+
label: string;
|
|
166
|
+
value: number;
|
|
167
|
+
colorIndex?: number;
|
|
168
|
+
index: number;
|
|
169
|
+
rank: number;
|
|
170
|
+
y: number;
|
|
171
|
+
width: number;
|
|
172
|
+
share: number | null;
|
|
173
|
+
}[];
|
|
174
|
+
total: number;
|
|
175
|
+
rest: {
|
|
176
|
+
label: string;
|
|
177
|
+
value: number;
|
|
178
|
+
colorIndex?: number;
|
|
179
|
+
index: number;
|
|
180
|
+
}[];
|
|
181
|
+
restValue: number | null;
|
|
182
|
+
top: number;
|
|
183
|
+
unit: number;
|
|
184
|
+
format: (value: number) => string;
|
|
185
|
+
percent: Intl.NumberFormat;
|
|
186
|
+
shareWidth: number;
|
|
187
|
+
labelWidth: number;
|
|
188
|
+
};
|
|
153
189
|
export {};
|
|
@@ -36,6 +36,11 @@ export declare function createChartInspector(options: {
|
|
|
36
36
|
click: (event: MouseEvent) => void;
|
|
37
37
|
focus: (event: FocusEvent) => void;
|
|
38
38
|
key: (event: KeyboardEvent) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The page scrolled: a keyboard tooltip, or one a linked chart keeps open, follows its mark; others close. A
|
|
41
|
+
* focused chart scrolled into view would otherwise close the tooltip its focus just opened.
|
|
42
|
+
*/
|
|
43
|
+
scroll: () => void;
|
|
39
44
|
close: () => void;
|
|
40
45
|
invalidate: () => void;
|
|
41
46
|
leave: () => void;
|
|
@@ -45,6 +50,8 @@ export declare function closeChartInspectionOnOutside(options: {
|
|
|
45
50
|
container: () => HTMLElement | undefined;
|
|
46
51
|
tooltip: () => HTMLElement | undefined;
|
|
47
52
|
close: () => void;
|
|
53
|
+
/** What a page scroll does; defaults to close. An inspector passes its `scroll`, which keeps keyboard tooltips. */
|
|
54
|
+
scroll?: () => void;
|
|
48
55
|
keepScroll?: () => boolean | undefined;
|
|
49
56
|
}): () => void;
|
|
50
57
|
export type InspectChartOptions = {
|
|
@@ -22,6 +22,7 @@ export declare function createChartInspection(options: {
|
|
|
22
22
|
click: (event: MouseEvent) => void;
|
|
23
23
|
focus: (event: FocusEvent) => void;
|
|
24
24
|
key: (event: KeyboardEvent) => boolean;
|
|
25
|
+
scroll: () => void;
|
|
25
26
|
close: () => void;
|
|
26
27
|
invalidate: () => void;
|
|
27
28
|
leave: () => void;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const chartMessages: import("@k2b/stdlib").Catalog<{
|
|
2
|
+
chartBarStart: string;
|
|
3
|
+
chartBarMore: ({ n }: {
|
|
4
|
+
n: number;
|
|
5
|
+
}) => string;
|
|
2
6
|
chartView: string;
|
|
3
7
|
chartDiagram: string;
|
|
4
8
|
chartData: string;
|
|
@@ -41,6 +45,10 @@ export declare const chartMessages: import("@k2b/stdlib").Catalog<{
|
|
|
41
45
|
resetTimelineView: string;
|
|
42
46
|
}>;
|
|
43
47
|
export declare const resolveChartMessages: (locale: string) => {
|
|
48
|
+
chartBarStart: string;
|
|
49
|
+
chartBarMore: ({ n }: {
|
|
50
|
+
n: number;
|
|
51
|
+
}) => string;
|
|
44
52
|
chartView: string;
|
|
45
53
|
chartDiagram: string;
|
|
46
54
|
chartData: string;
|
|
@@ -71,6 +71,7 @@ export type { StepsProps } from "./Steps";
|
|
|
71
71
|
export { Steps } from "./Steps";
|
|
72
72
|
export type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from "./StructuredDataPreview";
|
|
73
73
|
export { default as StructuredDataPreview, isStructuredDataValue } from "./StructuredDataPreview";
|
|
74
|
+
export { ThumbnailStrip, type ThumbnailStripItem, type ThumbnailStripProps } from "./ThumbnailStrip";
|
|
74
75
|
export type { TimelineColor, TimelineController, TimelineItem, TimelineProps } from "./Timeline";
|
|
75
76
|
export { default as Timeline } from "./Timeline";
|
|
76
77
|
export { VideoPlayer, type VideoPlayerProps } from "./VideoPlayer";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const thumbnailStripMessages: import("@k2b/stdlib").Catalog<{
|
|
2
|
+
thumbnailCurrent: string;
|
|
3
|
+
thumbnailUnsaved: string;
|
|
4
|
+
thumbnailAdd: string;
|
|
5
|
+
}>;
|
|
6
|
+
export type ThumbnailStripMessages = ReturnType<(typeof thumbnailStripMessages)["resolve"]>["t"];
|
|
7
|
+
/** Resolved from the inherited render locale. */
|
|
8
|
+
export declare const useThumbnailStripMessages: () => (() => ThumbnailStripMessages);
|
|
9
|
+
export declare const checkThumbnailStripMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
10
|
+
export {};
|
|
@@ -13,6 +13,8 @@ export type SliderProps = FieldProps & Omit<JSX.InputHTMLAttributes<HTMLInputEle
|
|
|
13
13
|
value: MaybeAccessor<number>;
|
|
14
14
|
formatValue?: (value: number) => string;
|
|
15
15
|
showValue?: boolean;
|
|
16
|
+
/** Place the value and reset beside the label. Without a label, they stay beside the track. */
|
|
17
|
+
valuePlacement?: "control" | "label";
|
|
16
18
|
center?: boolean;
|
|
17
19
|
/**
|
|
18
20
|
* The value the setting starts from. With it, a changed value shows in the accent color and a reset button
|
|
@@ -48,6 +48,8 @@ export type { MultiSelectFetchDataFn, MultiSelectInputProps, MultiSelectOption,
|
|
|
48
48
|
export { MultiSelectInput } from "./MultiSelectInput";
|
|
49
49
|
export type { MarkdownEditorProps } from "./markdown/MarkdownEditor";
|
|
50
50
|
export { MarkdownEditor } from "./markdown/MarkdownEditor";
|
|
51
|
+
export type { MarkdownSelectionToolbarProps } from "./markdown/MarkdownSelectionToolbar";
|
|
52
|
+
export { MarkdownSelectionToolbar } from "./markdown/MarkdownSelectionToolbar";
|
|
51
53
|
export type { SlashCommandsProps } from "./markdown/SlashCommands";
|
|
52
54
|
export { SlashCommands } from "./markdown/SlashCommands";
|
|
53
55
|
export type { NumberInputProps } from "./NumberInput";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export declare const checkSelectionMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
3
|
+
/**
|
|
4
|
+
* The box of a text range's first line in the editor's mirrored presentation layer, or nothing when that line is
|
|
5
|
+
* scrolled out of the surface. The layer holds the same text as the textarea, so its text nodes map offsets to places.
|
|
6
|
+
*/
|
|
7
|
+
export declare const textRangeBox: (layer: HTMLElement, surface: HTMLElement, start: number, end: number) => DOMRect | null;
|
|
8
|
+
export type MarkdownSelectionToolbarProps = {
|
|
9
|
+
/** The editor's textarea, from `MarkdownEditor`'s `textareaRef`. The toolbar attaches once it is there. */
|
|
10
|
+
textarea: HTMLTextAreaElement | undefined;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A small formatting toolbar that floats above selected text in a `MarkdownEditor`: bold, italic, code, link, lists, and
|
|
14
|
+
* quote. Place it beside an editor with `noToolbar` and pass the editor's textarea. It appears once the pointer lets go
|
|
15
|
+
* of a selection and closes on Escape, a collapsed selection, or when the focus leaves both text and toolbar. Touch
|
|
16
|
+
* devices keep their own selection menu, so nothing of it renders there; the keyboard shortcuts work everywhere. It
|
|
17
|
+
* listens to the textarea itself, so editors without it carry none of its code.
|
|
18
|
+
*/
|
|
19
|
+
export declare function MarkdownSelectionToolbar(props: MarkdownSelectionToolbarProps): JSX.Element;
|
|
@@ -13,6 +13,8 @@ type FieldLayoutProps = {
|
|
|
13
13
|
fill?: boolean;
|
|
14
14
|
/** Composite controls use aria-labelledby instead of an HTML label target. */
|
|
15
15
|
labelFor?: string | false;
|
|
16
|
+
/** Optional controls beside the label, outside its clickable target. */
|
|
17
|
+
labelEnd?: JSX.Element;
|
|
16
18
|
} & Pick<FieldProps, "class" | "description" | "error" | "label" | "required" | "disabled">;
|
|
17
19
|
export declare function Field(props: FieldLayoutProps): JSX.Element;
|
|
18
20
|
type FieldAriaOwner = Pick<FieldProps, "aria-describedby" | "aria-label" | "description" | "error" | "label" | "required">;
|
|
@@ -6,6 +6,11 @@ export type PanelDialogProps = {
|
|
|
6
6
|
surface?: PanelDialogSurface;
|
|
7
7
|
/** A 2 px edge in the tone's colour inside the dialog frame; the header shows the tone's icon instead of its own. */
|
|
8
8
|
tone?: DialogTone;
|
|
9
|
+
/**
|
|
10
|
+
* The body shows a picture or a video edge to edge, and the header floats over it as glass chips: the title and
|
|
11
|
+
* subtitle in one chip, the actions in a group, and the close button. For documents, text, and tables leave it off.
|
|
12
|
+
*/
|
|
13
|
+
media?: boolean;
|
|
9
14
|
};
|
|
10
15
|
export type PanelDialogHeaderProps = {
|
|
11
16
|
title: JSX.Element;
|
|
@@ -9,6 +9,7 @@ declare const statCellMessages: import("@k2b/stdlib").Catalog<{
|
|
|
9
9
|
retry: string;
|
|
10
10
|
reload: string;
|
|
11
11
|
loading: string;
|
|
12
|
+
noValue: string;
|
|
12
13
|
}>;
|
|
13
14
|
export type StatCellMessages = ReturnType<(typeof statCellMessages)["resolve"]>["t"];
|
|
14
15
|
/** Resolved from the inherited render locale. */
|
|
@@ -34,7 +34,10 @@ export type DashboardFrameProps = {
|
|
|
34
34
|
* shows the empty sentence and action while the head keeps its state, so a stale note stays.
|
|
35
35
|
*/
|
|
36
36
|
emptyContent?: boolean;
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Height of the body, a CSS length. Every state keeps it. With `reserve`, the content fills it and scrolls inside, so
|
|
39
|
+
* a table keeps its header in view; without it, the hidden copy sets the height.
|
|
40
|
+
*/
|
|
38
41
|
height?: string;
|
|
39
42
|
/**
|
|
40
43
|
* A hidden copy of the full content that holds the body's height in every state, such as every row of a table. The
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k2b/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "Production-ready components for SolidJS applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@babel/core": "8.0.6",
|
|
106
106
|
"@babel/preset-typescript": "8.0.1",
|
|
107
|
-
"@k2b/ssr": "0.21.
|
|
107
|
+
"@k2b/ssr": "0.21.1",
|
|
108
108
|
"@types/babel__core": "7.20.5",
|
|
109
109
|
"@types/bun": "1.4.2",
|
|
110
110
|
"axe-core": "4.11.0",
|