@nebulahome/package-sdk 0.0.0-stage → 1.0.1

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.
@@ -0,0 +1,54 @@
1
+ //#region src/generate/problems.ts
2
+ /**
3
+ * What is wrong with a package's declaration, every problem at once and each with where it is,
4
+ * so an author fixes them in one pass rather than one build at a time.
5
+ */
6
+ /** Thrown when a declaration does not hold together. */
7
+ var PackageConfigError = class extends Error {
8
+ /** Every problem, one line each: `cards[0].options.days: …`. */
9
+ problems;
10
+ /**
11
+ * Gathers the problems.
12
+ *
13
+ * @param problems - Each problem, with where it is.
14
+ */
15
+ constructor(problems) {
16
+ super(`The package does not hold together:\n${problems.map((problem) => ` - ${problem}`).join("\n")}`);
17
+ this.name = "PackageConfigError";
18
+ this.problems = problems;
19
+ }
20
+ };
21
+ /**
22
+ * A place to gather problems.
23
+ *
24
+ * @returns It.
25
+ */
26
+ function problems() {
27
+ const list = [];
28
+ return {
29
+ /**
30
+ * Records a problem.
31
+ *
32
+ * @param path - Where in the declaration, or empty for the whole of it.
33
+ * @param message - What is wrong.
34
+ */
35
+ add: (path, message) => {
36
+ list.push(path === "" ? message : `${path}: ${message}`);
37
+ },
38
+ list
39
+ };
40
+ }
41
+ /**
42
+ * A path from its parts, as a declaration is written: `cards[0].options.days`.
43
+ *
44
+ * @param parts - The keys and indexes.
45
+ * @returns The path.
46
+ */
47
+ function pathOf(parts) {
48
+ return parts.reduce((path, part) => {
49
+ if (typeof part === "number") return `${path}[${String(part)}]`;
50
+ return path === "" ? String(part) : `${path}.${String(part)}`;
51
+ }, "");
52
+ }
53
+ //#endregion
54
+ export { pathOf as n, problems as r, PackageConfigError as t };
@@ -0,0 +1,68 @@
1
+ import { O as OptionField, S as FormValues, T as NoFields, d as EntityTypeDefinition, lt as EntityId, x as Fields } from "./json.js";
2
+ //#region src/definitions/card.d.ts
3
+ /** The cells a card can cover: 1×1, 2×1, 2×2 and 2×3. */
4
+ type CardSize = 'small' | 'wide' | 'medium' | 'large';
5
+ /** How a card fills its frame: inside its padding, or to its edges. */
6
+ type CardPadding = 'default' | 'none';
7
+ /** A card, as declared. */
8
+ type CardDefinition<TId extends string = string, TSize extends CardSize = CardSize, TOptions extends Fields<OptionField> = Fields<OptionField>> = {
9
+ readonly kind: 'card';
10
+ readonly id: TId;
11
+ readonly name: string;
12
+ readonly description?: string;
13
+ /** A catalogue icon id, as everywhere in the interface. */
14
+ readonly icon: string;
15
+ /** The sizes it can be drawn at; the first is what it is added at. `['medium']` when not said. */
16
+ readonly sizes?: readonly TSize[];
17
+ readonly padding?: CardPadding;
18
+ /** What its inspector asks, per card on a dashboard. */
19
+ readonly options?: TOptions;
20
+ };
21
+ /** The sizes a card is drawn at. */
22
+ type SizeOf<TCard> = TCard extends CardDefinition<string, infer TSize> ? TSize : CardSize;
23
+ /** The values of a card's options, defaults applied. */
24
+ type OptionsOf<TCard> = TCard extends CardDefinition<string, CardSize, infer TOptions> ? FormValues<TOptions> : never;
25
+ /**
26
+ * Declares a card.
27
+ *
28
+ * @param card - Its id, name, icon, sizes and options.
29
+ * @returns The card, for `definePackage`'s `cards` and for its component's props.
30
+ */
31
+ declare function defineCard<const TId extends string, const TSize extends CardSize = 'medium', const TOptions extends Fields<OptionField> = NoFields>(card: Omit<CardDefinition<TId, TSize, TOptions>, 'kind'>): CardDefinition<TId, TSize, TOptions>;
32
+ //#endregion
33
+ //#region src/props.d.ts
34
+ /** A component of the package: a function of its props, or one React wrapped (`memo`). */
35
+ type PackageComponent<TProps> = ((props: TProps) => unknown) | {
36
+ readonly $$typeof: symbol;
37
+ };
38
+ /** How a component is loaded: `() => import('./card.js')`, to it or to a module that exports it. */
39
+ type Loader<TProps> = () => Promise<PackageComponent<TProps> | {
40
+ readonly default: PackageComponent<TProps>;
41
+ }>;
42
+ /** What the package's own page is given. */
43
+ type PageProps = {
44
+ readonly packageId: string;
45
+ };
46
+ /** What a card is given. */
47
+ type CardProps<TCard extends CardDefinition = CardDefinition> = {
48
+ readonly packageId: string;
49
+ readonly cardId: TCard['id'];
50
+ /** The card's declared name. */
51
+ readonly name: string;
52
+ /** What the owner titled this card, if anything. */
53
+ readonly title: string | null;
54
+ /** The size it is drawn at now. */
55
+ readonly size: SizeOf<TCard>;
56
+ /** What its inspector asked, defaults applied. */
57
+ readonly options: OptionsOf<TCard>;
58
+ /** Whether the dashboard is being edited: no interaction is expected. */
59
+ readonly isEditing: boolean;
60
+ };
61
+ /** What an entity view is given. */
62
+ type EntityViewProps<TType extends EntityTypeDefinition = EntityTypeDefinition> = {
63
+ readonly packageId: string;
64
+ readonly entityId: EntityId;
65
+ readonly type: TType['id'];
66
+ };
67
+ //#endregion
68
+ export { PageProps as a, CardSize as c, defineCard as d, PackageComponent as i, OptionsOf as l, EntityViewProps as n, CardDefinition as o, Loader as r, CardPadding as s, CardProps as t, SizeOf as u };
@@ -0,0 +1,12 @@
1
+ //#endregion
2
+ //#region src/version.ts
3
+ /**
4
+ * The SDK's own version, read from its `package.json` when it is built.
5
+ *
6
+ * What a package records in its manifest's `sdk` range, and what the platform says it implements:
7
+ * the two are compared before a package is installed or started (PACKAGES_DOCS.md 11).
8
+ */
9
+ /** The SDK's own version, `1.0.0`. */
10
+ const SDK_VERSION = "1.0.1";
11
+ //#endregion
12
+ export { SDK_VERSION as t };
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {}
package/dist/cli.js ADDED
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env node
2
+ import { t as PackageConfigError } from "./chunks/node-problems.js";
3
+ import path from "node:path";
4
+ import { parseArgs } from "node:util";
5
+ //#region src/cli/index.ts
6
+ /**
7
+ * `nebulahome-package`: the command a package is checked, built and packed with
8
+ * (PACKAGES_DOCS.md 8.2).
9
+ *
10
+ * ```
11
+ * nebulahome-package validate the declaration holds together, the way the platform reads it
12
+ * nebulahome-package build validate, then build both halves into dist/
13
+ * nebulahome-package pack [--url u] pack dist/ into <id>-<version>.tgz, and index-entry.json with --url
14
+ * ```
15
+ *
16
+ * Every command takes `--root <folder>`, the package's folder - the working directory when not
17
+ * said. A problem ends it with exit code 1, every problem printed.
18
+ *
19
+ * The build and the archive are loaded when a command needs them: the build imports Vite, the
20
+ * package's own development dependency, so the help runs anywhere - `npx` in an empty folder - and
21
+ * a command run without Vite says what to install.
22
+ */
23
+ /** The tools a package is built with, as the README has them installed. */
24
+ const BUILD_TOOLS = "pnpm add -D vite typescript react @types/react @vitejs/plugin-react tailwindcss @tailwindcss/vite";
25
+ /** How the command is used. */
26
+ const USAGE = `Usage: nebulahome-package <validate | build | pack> [--root <folder>] [--url <base>]
27
+
28
+ validate check nebula.config.ts the way the platform reads a release
29
+ build validate, then build the interface and the server into dist/
30
+ pack pack dist/ into <id>-<version>.tgz; with --url, or on GitHub Actions, write
31
+ index-entry.json for the package index too
32
+ `;
33
+ /**
34
+ * Writes a line for whoever runs the command.
35
+ *
36
+ * @param line - What it says.
37
+ */
38
+ function say(line) {
39
+ process.stdout.write(`${line}\n`);
40
+ }
41
+ /**
42
+ * Says whether an error is Node failing to find Vite: the SDK is not where the package's tools
43
+ * are installed, or they are not installed yet.
44
+ *
45
+ * @param error - What was thrown.
46
+ * @returns True when it is.
47
+ */
48
+ function isViteMissing(error) {
49
+ return error instanceof Error && "code" in error && error.code === "ERR_MODULE_NOT_FOUND" && error.message.includes("'vite'");
50
+ }
51
+ /**
52
+ * What to do when Vite is missing.
53
+ *
54
+ * @param command - The command that needs it.
55
+ * @returns The lines to print.
56
+ */
57
+ function viteMissing(command) {
58
+ return `nebulahome-package ${command} needs Vite, and it is not installed where the SDK is.
59
+ Install the SDK and the tools a package is built with in the package's folder:
60
+
61
+ pnpm add @nebulahome/package-sdk
62
+ ${BUILD_TOOLS}
63
+
64
+ then run the command from there: pnpm exec nebulahome-package ${command}
65
+ `;
66
+ }
67
+ /**
68
+ * Runs the command.
69
+ *
70
+ * @param args - Its arguments, after the program's name.
71
+ * @returns Its exit code.
72
+ */
73
+ async function run(args) {
74
+ const { positionals, values } = parseArgs({
75
+ args: [...args],
76
+ allowPositionals: true,
77
+ options: {
78
+ root: { type: "string" },
79
+ url: { type: "string" },
80
+ help: {
81
+ type: "boolean",
82
+ short: "h"
83
+ }
84
+ }
85
+ });
86
+ const [command] = positionals;
87
+ const root = path.resolve(values.root ?? ".");
88
+ if (values.help === true || command === void 0) {
89
+ say(USAGE);
90
+ return command === void 0 && values.help !== true ? 1 : 0;
91
+ }
92
+ try {
93
+ switch (command) {
94
+ case "validate": {
95
+ const { checkPackage } = await import("./chunks/node-build2.js");
96
+ const { generated } = await checkPackage({ root });
97
+ say(`${String(generated.manifest["name"])} ${String(generated.manifest["version"])} holds together.`);
98
+ return 0;
99
+ }
100
+ case "build": {
101
+ const { buildPackage } = await import("./chunks/node-build2.js");
102
+ const { generated, outDir } = await buildPackage({
103
+ root,
104
+ logLevel: "warn"
105
+ });
106
+ say(`Built ${String(generated.manifest["name"])} ${String(generated.manifest["version"])} into ${path.relative(root, outDir)}.`);
107
+ return 0;
108
+ }
109
+ case "pack": {
110
+ const [{ checkPackage }, { packRelease }] = await Promise.all([import("./chunks/node-build2.js"), import("./chunks/node-pack.js")]);
111
+ const { outDir } = await checkPackage({ root });
112
+ const packed = await packRelease({
113
+ root,
114
+ outDir,
115
+ ...values.url === void 0 ? {} : { urlBase: values.url }
116
+ });
117
+ say(`Packed ${path.relative(root, packed.archive)} (${String(packed.size)} bytes, sha256 ${packed.sha256}).`);
118
+ say(packed.indexEntry === void 0 ? "Wrote no index-entry.json: pass --url <base> for the address the archive is released at." : `Wrote ${path.relative(root, packed.indexEntry)}.`);
119
+ return 0;
120
+ }
121
+ default:
122
+ process.stderr.write(`There is no command ${command}.\n\n${USAGE}`);
123
+ return 1;
124
+ }
125
+ } catch (error) {
126
+ if (error instanceof PackageConfigError) {
127
+ process.stderr.write(`${error.message}\n`);
128
+ return 1;
129
+ }
130
+ if (isViteMissing(error)) {
131
+ process.stderr.write(viteMissing(command));
132
+ return 1;
133
+ }
134
+ throw error;
135
+ }
136
+ }
137
+ //#endregion
138
+ //#region src/cli/bin.ts
139
+ /**
140
+ * The `nebulahome-package` executable: runs the command, and ends with its exit code.
141
+ */
142
+ process.exitCode = await run(process.argv.slice(2));
143
+ //#endregion
144
+ export {};
@@ -0,0 +1,381 @@
1
+ import { ButtonHTMLAttributes, ComponentType, InputHTMLAttributes, ReactElement, ReactNode, SVGProps } from "react";
2
+ //#region src/components/types.d.ts
3
+ /** What a button does: the one thing a screen is for, anything else, or a destructive action. */
4
+ type ButtonVariant = 'primary' | 'ghost' | 'danger';
5
+ /** A button's size. */
6
+ type ButtonSize = 'compact' | 'medium' | 'large';
7
+ /** A button: a native button's attributes, a variant and a size. */
8
+ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
9
+ readonly variant?: ButtonVariant;
10
+ readonly size?: ButtonSize;
11
+ /** Draws a spinner and refuses presses while true. */
12
+ readonly isBusy?: boolean;
13
+ readonly children: ReactNode;
14
+ };
15
+ /** A button with an icon and no text, named by `label`. */
16
+ type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label'> & {
17
+ readonly variant?: 'bare' | 'danger';
18
+ readonly size?: 'small' | 'medium' | 'large';
19
+ /** What pressing it does, for a screen reader and the tooltip. */
20
+ readonly label: string;
21
+ /** The glyph: an `Icon`. */
22
+ readonly children: ReactNode;
23
+ };
24
+ /** A catalogue icon, by the ids `icon` fields take. */
25
+ type IconProps = Omit<SVGProps<SVGSVGElement>, 'id' | 'width' | 'height' | 'viewBox'> & {
26
+ readonly id: string;
27
+ /** In pixels; 20 when not said. */
28
+ readonly size?: number;
29
+ };
30
+ /** What a badge means. */
31
+ type BadgeTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger';
32
+ /** A short state. */
33
+ type BadgeProps = {
34
+ readonly tone?: BadgeTone;
35
+ readonly size?: 'small' | 'medium';
36
+ readonly icon?: ReactNode;
37
+ readonly children: ReactNode;
38
+ readonly className?: string;
39
+ };
40
+ /** A titled section. */
41
+ type PanelProps = {
42
+ readonly title: string;
43
+ /** `flat` for a panel inside another. */
44
+ readonly elevation?: 'raised' | 'flat';
45
+ /** What sits in the title's row: a button. */
46
+ readonly action?: ReactNode;
47
+ readonly children: ReactNode;
48
+ readonly className?: string;
49
+ };
50
+ /** A row of a panel: a title, a note under it, a control opposite. */
51
+ type PanelRowProps = {
52
+ readonly title: ReactNode;
53
+ readonly note?: ReactNode;
54
+ readonly control?: ReactNode;
55
+ readonly children?: ReactNode;
56
+ readonly className?: string;
57
+ };
58
+ /** A note under a panel. */
59
+ type PanelNoteProps = {
60
+ readonly children: ReactNode;
61
+ };
62
+ /** A card's two-line heading. */
63
+ type CardHeadingProps = {
64
+ readonly title: string;
65
+ readonly subtitle?: string | null | undefined;
66
+ /** What sits opposite: a switch, a badge. */
67
+ readonly tail?: ReactNode;
68
+ /** Draws the title quieter, for something that cannot be read. */
69
+ readonly isMuted?: boolean;
70
+ };
71
+ /** A reading as a number and its unit. */
72
+ type FigureProps = {
73
+ /** The number, already written. */
74
+ readonly value: string;
75
+ readonly unit?: string | null | undefined;
76
+ readonly size?: 'large' | 'medium' | 'small';
77
+ /** A colour for the number, when what it measures has one. */
78
+ readonly color?: string | undefined;
79
+ };
80
+ /** A state at a glance. */
81
+ type StatusDotProps = {
82
+ readonly tone: 'success' | 'warning' | 'danger' | 'neutral' | 'accent';
83
+ /** What it means, for the tooltip and a screen reader. */
84
+ readonly title: string;
85
+ /** Pulses while something is being done. */
86
+ readonly isBusy?: boolean;
87
+ };
88
+ /** How far something has come. */
89
+ type ProgressBarProps = {
90
+ /** 0 to 100; null pulses the whole bar. */
91
+ readonly percent: number | null;
92
+ /** What it is, for a screen reader. */
93
+ readonly label: string;
94
+ };
95
+ /** An explanation behind a small `i`. */
96
+ type HintProps = {
97
+ readonly text: string;
98
+ readonly className?: string;
99
+ };
100
+ /** A labelled text input: an input's attributes, a label, and what it says under it. */
101
+ type TextFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'size'> & {
102
+ readonly label: string;
103
+ readonly isLabelHidden?: boolean;
104
+ readonly size?: 'compact' | 'medium' | 'large';
105
+ readonly error?: string | undefined;
106
+ readonly warning?: string | undefined;
107
+ readonly hint?: ReactNode;
108
+ };
109
+ /** One choice of a select or a segmented control. */
110
+ type ControlOption<TValue extends string = string> = {
111
+ readonly value: TValue;
112
+ readonly label: string;
113
+ };
114
+ /** A labelled choice from a list. */
115
+ type SelectFieldProps = {
116
+ readonly label: string;
117
+ readonly isLabelHidden?: boolean;
118
+ readonly options: readonly ControlOption[];
119
+ readonly value: string;
120
+ readonly onChange: (value: string) => void;
121
+ readonly disabled?: boolean;
122
+ readonly size?: 'compact' | 'medium' | 'large';
123
+ readonly error?: string | undefined;
124
+ readonly hint?: ReactNode;
125
+ readonly className?: string;
126
+ };
127
+ /** On or off. */
128
+ type SwitchProps = {
129
+ readonly label: string;
130
+ readonly isOn: boolean;
131
+ readonly onChange: (isOn: boolean) => void;
132
+ readonly size?: 'small' | 'medium';
133
+ readonly disabled?: boolean;
134
+ readonly isBusy?: boolean;
135
+ readonly className?: string;
136
+ };
137
+ /** One of a few, side by side. */
138
+ type SegmentedProps<TValue extends string = string> = {
139
+ readonly label: string;
140
+ readonly options: readonly ControlOption<TValue>[];
141
+ readonly value: TValue;
142
+ readonly onChange: (value: TValue) => void;
143
+ readonly size?: 'compact' | 'medium';
144
+ readonly disabled?: boolean;
145
+ readonly className?: string;
146
+ };
147
+ /** A value in a range. */
148
+ type SliderProps = {
149
+ readonly label: string;
150
+ readonly isLabelHidden?: boolean;
151
+ readonly value: number;
152
+ readonly min: number;
153
+ readonly max: number;
154
+ readonly step?: number;
155
+ /** The value, written: `40 %`. */
156
+ readonly display: string;
157
+ readonly onChange: (value: number) => void;
158
+ /** Once the knob is let go. */
159
+ readonly onCommit?: ((value: number) => void) | undefined;
160
+ readonly fill?: 'accent' | 'warm';
161
+ readonly disabled?: boolean;
162
+ readonly className?: string;
163
+ };
164
+ /** A value by steps. */
165
+ type StepperProps = {
166
+ readonly label: string;
167
+ readonly value: number;
168
+ readonly min: number;
169
+ readonly max: number;
170
+ readonly step: number;
171
+ /**
172
+ * Writes a value.
173
+ *
174
+ * @param value - The value.
175
+ * @returns It, written.
176
+ */
177
+ readonly format: (value: number) => string;
178
+ readonly onChange: (value: number) => void;
179
+ readonly disabled?: boolean;
180
+ readonly className?: string;
181
+ };
182
+ /** A colour of the tag palette. */
183
+ type TagColor = 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'violet' | 'pink';
184
+ /** A coloured tag. */
185
+ type TagChipProps = {
186
+ readonly color: TagColor;
187
+ readonly children: string;
188
+ readonly size?: 'small' | 'medium';
189
+ /** Shows a remove button that calls this. */
190
+ readonly onRemove?: (() => void) | undefined;
191
+ readonly className?: string;
192
+ };
193
+ /** A dialog, drawn inside the package's scope. */
194
+ type ModalProps = {
195
+ readonly isOpen: boolean;
196
+ readonly onClose: () => void;
197
+ readonly title: string;
198
+ readonly description?: ReactNode;
199
+ readonly size?: 'small' | 'medium' | 'large';
200
+ readonly closesOnBackdrop?: boolean;
201
+ readonly children: ReactNode;
202
+ /** Its buttons. */
203
+ readonly footer?: ReactNode;
204
+ };
205
+ /** What `cn` joins: classes, conditions, lists of them. */
206
+ type ClassValue = string | number | bigint | boolean | null | undefined | readonly ClassValue[] | Readonly<Record<string, unknown>>;
207
+ /** What the interface lends to implement `/components`. */
208
+ type ComponentsHost = {
209
+ readonly Button: ComponentType<ButtonProps>;
210
+ readonly IconButton: ComponentType<IconButtonProps>;
211
+ readonly Icon: ComponentType<IconProps>;
212
+ readonly Badge: ComponentType<BadgeProps>;
213
+ readonly Panel: ComponentType<PanelProps>;
214
+ readonly PanelRow: ComponentType<PanelRowProps>;
215
+ readonly PanelNote: ComponentType<PanelNoteProps>;
216
+ readonly CardHeading: ComponentType<CardHeadingProps>;
217
+ readonly Figure: ComponentType<FigureProps>;
218
+ readonly StatusDot: ComponentType<StatusDotProps>;
219
+ readonly ProgressBar: ComponentType<ProgressBarProps>;
220
+ readonly Hint: ComponentType<HintProps>;
221
+ readonly TextField: ComponentType<TextFieldProps>;
222
+ readonly SelectField: ComponentType<SelectFieldProps>;
223
+ readonly Switch: ComponentType<SwitchProps>;
224
+ readonly Segmented: ComponentType<SegmentedProps>;
225
+ readonly Slider: ComponentType<SliderProps>;
226
+ readonly Stepper: ComponentType<StepperProps>;
227
+ readonly TagChip: ComponentType<TagChipProps>;
228
+ readonly Modal: ComponentType<ModalProps>;
229
+ readonly cn: (...classes: readonly ClassValue[]) => string;
230
+ };
231
+ //#endregion
232
+ //#region src/components/index.d.ts
233
+ /**
234
+ * An action.
235
+ *
236
+ * @param props - A native button's attributes, a variant and a size.
237
+ * @returns The button.
238
+ */
239
+ export declare function Button(props: ButtonProps): ReactElement;
240
+ /**
241
+ * An action with an icon and no text.
242
+ *
243
+ * @param props - What it does, its glyph, its variant and size.
244
+ * @returns The button.
245
+ */
246
+ export declare function IconButton(props: IconButtonProps): ReactElement;
247
+ /**
248
+ * A catalogue icon.
249
+ *
250
+ * @param props - Its id and size.
251
+ * @returns The icon.
252
+ */
253
+ export declare function Icon(props: IconProps): ReactElement;
254
+ /**
255
+ * A short state.
256
+ *
257
+ * @param props - Its tone, size and text.
258
+ * @returns The badge.
259
+ */
260
+ export declare function Badge(props: BadgeProps): ReactElement;
261
+ /**
262
+ * A titled section.
263
+ *
264
+ * @param props - Its title, action and content.
265
+ * @returns The panel.
266
+ */
267
+ export declare function Panel(props: PanelProps): ReactElement;
268
+ /**
269
+ * A row of a panel.
270
+ *
271
+ * @param props - Its title, note and control.
272
+ * @returns The row.
273
+ */
274
+ export declare function PanelRow(props: PanelRowProps): ReactElement;
275
+ /**
276
+ * A note under a panel.
277
+ *
278
+ * @param props - What it says.
279
+ * @returns The note.
280
+ */
281
+ export declare function PanelNote(props: PanelNoteProps): ReactElement;
282
+ /**
283
+ * A card's two-line heading, as the dashboard's own cards draw it.
284
+ *
285
+ * @param props - Its title, subtitle and tail.
286
+ * @returns The heading.
287
+ */
288
+ export declare function CardHeading(props: CardHeadingProps): ReactElement;
289
+ /**
290
+ * A reading as a number and its unit.
291
+ *
292
+ * @param props - The number, its unit and size.
293
+ * @returns The figure.
294
+ */
295
+ export declare function Figure(props: FigureProps): ReactElement;
296
+ /**
297
+ * A state at a glance.
298
+ *
299
+ * @param props - Its tone and meaning.
300
+ * @returns The dot.
301
+ */
302
+ export declare function StatusDot(props: StatusDotProps): ReactElement;
303
+ /**
304
+ * How far something has come.
305
+ *
306
+ * @param props - The percentage and what it is.
307
+ * @returns The bar.
308
+ */
309
+ export declare function ProgressBar(props: ProgressBarProps): ReactElement;
310
+ /**
311
+ * An explanation behind a small `i`.
312
+ *
313
+ * @param props - The explanation.
314
+ * @returns The hint.
315
+ */
316
+ export declare function Hint(props: HintProps): ReactElement;
317
+ /**
318
+ * A labelled text input.
319
+ *
320
+ * @param props - An input's attributes, its label and what it says under it.
321
+ * @returns The field.
322
+ */
323
+ export declare function TextField(props: TextFieldProps): ReactElement;
324
+ /**
325
+ * A labelled choice from a list.
326
+ *
327
+ * @param props - Its label, options and value.
328
+ * @returns The field.
329
+ */
330
+ export declare function SelectField(props: SelectFieldProps): ReactElement;
331
+ /**
332
+ * On or off.
333
+ *
334
+ * @param props - Its label and state.
335
+ * @returns The switch.
336
+ */
337
+ export declare function Switch(props: SwitchProps): ReactElement;
338
+ /**
339
+ * One of a few, side by side.
340
+ *
341
+ * @param props - Its label, options and value.
342
+ * @returns The control.
343
+ */
344
+ export declare function Segmented<TValue extends string>(props: SegmentedProps<TValue>): ReactElement;
345
+ /**
346
+ * A value in a range.
347
+ *
348
+ * @param props - Its label, range, value and how it is written.
349
+ * @returns The slider.
350
+ */
351
+ export declare function Slider(props: SliderProps): ReactElement;
352
+ /**
353
+ * A value by steps.
354
+ *
355
+ * @param props - Its label, range, step and how it is written.
356
+ * @returns The stepper.
357
+ */
358
+ export declare function Stepper(props: StepperProps): ReactElement;
359
+ /**
360
+ * A coloured tag.
361
+ *
362
+ * @param props - Its colour and text.
363
+ * @returns The tag.
364
+ */
365
+ export declare function TagChip(props: TagChipProps): ReactElement;
366
+ /**
367
+ * A dialog, drawn inside the package's scope.
368
+ *
369
+ * @param props - Whether it is open, its title, content and buttons.
370
+ * @returns The dialog.
371
+ */
372
+ export declare function Modal(props: ModalProps): ReactElement;
373
+ /**
374
+ * Joins class names, resolving Tailwind conflicts: the later class wins.
375
+ *
376
+ * @param classes - Classes, conditions, lists of them.
377
+ * @returns The class names.
378
+ */
379
+ export declare function cn(...classes: readonly ClassValue[]): string;
380
+ //#endregion
381
+ export type { BadgeProps, BadgeTone, ButtonProps, ButtonSize, ButtonVariant, CardHeadingProps, ClassValue, ComponentsHost, ControlOption, FigureProps, HintProps, IconButtonProps, IconProps, ModalProps, PanelNoteProps, PanelProps, PanelRowProps, ProgressBarProps, SegmentedProps, SelectFieldProps, SliderProps, StatusDotProps, StepperProps, SwitchProps, TagChipProps, TagColor, TextFieldProps };