@keemakr/ui-sdk 1.6.0-dev-20261027220914 → 1.6.0-dev-20261027223028
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/icon.d.ts +1 -1
- package/dist/icon.js +3 -1
- package/dist/negotiate.d.ts +2 -2
- package/dist/schema.d.ts +25 -0
- package/dist/schema.js +27 -0
- package/package.json +1 -1
package/dist/icon.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The icon names a heading, a section title and a button take. Each is a Lucide icon on web. */
|
|
2
|
-
export declare const UI_ICONS: readonly ["phone", "mail", "message", "calendar", "user", "building", "bot", "wrench", "note", "pencil", "stethoscope", "clipboard", "camera", "image", "check", "alert", "clock", "plus", "trash", "eye", "graduation-cap", "trend", "inbox", "search", "sparkles"];
|
|
2
|
+
export declare const UI_ICONS: readonly ["phone", "mail", "message", "calendar", "user", "building", "bot", "wrench", "note", "pencil", "stethoscope", "clipboard", "camera", "image", "check", "alert", "clock", "plus", "trash", "eye", "graduation-cap", "trend", "inbox", "search", "sparkles", "list"];
|
|
3
3
|
export type UiIcon = (typeof UI_ICONS)[number];
|
|
4
4
|
/** The button fields `buttonIcon` reads. Loose, so a client whose installed SDK predates them can pass its own node. */
|
|
5
5
|
export interface IconButtonLike {
|
package/dist/icon.js
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
// clinic screen needs to tell its parts apart at a glance: a note's five blocks (assessment,
|
|
8
8
|
// plan, photos, follow-up, alerts), an edit pencil, a camera. The last six head the parts of a
|
|
9
9
|
// customer success screen (Covalent CSM): monitoring, training, growth, an inbox, a search, and
|
|
10
|
-
// what the agent suggests.
|
|
10
|
+
// what the agent suggests. `list` heads a part that lists what someone said (an intake's "What
|
|
11
|
+
// they told us").
|
|
11
12
|
//
|
|
12
13
|
// On a heading or a section title the icon is decorative: the words say what the part is, so it
|
|
13
14
|
// is hidden from screen readers. On an icon-only button the label is still required: it is the
|
|
@@ -32,6 +33,7 @@ export const UI_ICONS = [
|
|
|
32
33
|
'inbox',
|
|
33
34
|
'search',
|
|
34
35
|
'sparkles',
|
|
36
|
+
'list',
|
|
35
37
|
];
|
|
36
38
|
/**
|
|
37
39
|
* How a renderer draws a button's icon: `icon` is a name from the list or undefined (an unknown
|
package/dist/negotiate.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ import type { ChatPress, ScreenRootNode, ScreenTree } from './schema.js';
|
|
|
36
36
|
* than any published release; core's own renderer draws them). Without it, a card that has
|
|
37
37
|
* its own `onPress` keeps it and loses the button; a card with only the button becomes a card
|
|
38
38
|
* whose press is the button's, so every card can still be acted on. The card's `tone` and
|
|
39
|
-
* `badge`, a timeline item's `icon`, `tone` and `actor`,
|
|
40
|
-
* keys: an older parse strips them and draws the rest, so they need no fold.
|
|
39
|
+
* `badge`, a timeline item's `icon`, `tone` and `actor`, a badge's `dot`, a details item's
|
|
40
|
+
* `tone` and `hint`, and a progress's `orientation` are new optional keys: an older parse strips them and draws the rest, so they need no fold.
|
|
41
41
|
* - `markdown.links`: a markdown node's `links` map, and the `[words](screen:ref)` links in its
|
|
42
42
|
* text that open a screen through it (newer than any published release; core's own renderer
|
|
43
43
|
* draws them). Without it, each `screen:` link becomes its words as plain text and the map is
|
package/dist/schema.d.ts
CHANGED
|
@@ -188,6 +188,7 @@ export declare const buttonSchema: z.ZodObject<{
|
|
|
188
188
|
message: "message";
|
|
189
189
|
search: "search";
|
|
190
190
|
note: "note";
|
|
191
|
+
list: "list";
|
|
191
192
|
alert: "alert";
|
|
192
193
|
phone: "phone";
|
|
193
194
|
mail: "mail";
|
|
@@ -386,6 +387,7 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
386
387
|
message: "message";
|
|
387
388
|
search: "search";
|
|
388
389
|
note: "note";
|
|
390
|
+
list: "list";
|
|
389
391
|
alert: "alert";
|
|
390
392
|
phone: "phone";
|
|
391
393
|
mail: "mail";
|
|
@@ -536,6 +538,7 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
536
538
|
message: "message";
|
|
537
539
|
search: "search";
|
|
538
540
|
note: "note";
|
|
541
|
+
list: "list";
|
|
539
542
|
alert: "alert";
|
|
540
543
|
phone: "phone";
|
|
541
544
|
mail: "mail";
|
|
@@ -772,6 +775,7 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
772
775
|
message: "message";
|
|
773
776
|
search: "search";
|
|
774
777
|
note: "note";
|
|
778
|
+
list: "list";
|
|
775
779
|
alert: "alert";
|
|
776
780
|
phone: "phone";
|
|
777
781
|
mail: "mail";
|
|
@@ -922,6 +926,7 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
922
926
|
message: "message";
|
|
923
927
|
search: "search";
|
|
924
928
|
note: "note";
|
|
929
|
+
list: "list";
|
|
925
930
|
alert: "alert";
|
|
926
931
|
phone: "phone";
|
|
927
932
|
mail: "mail";
|
|
@@ -985,6 +990,7 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
985
990
|
message: "message";
|
|
986
991
|
search: "search";
|
|
987
992
|
note: "note";
|
|
993
|
+
list: "list";
|
|
988
994
|
alert: "alert";
|
|
989
995
|
phone: "phone";
|
|
990
996
|
mail: "mail";
|
|
@@ -1165,6 +1171,10 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1165
1171
|
}>;
|
|
1166
1172
|
detail: z.ZodOptional<z.ZodString>;
|
|
1167
1173
|
}, z.core.$strip>>;
|
|
1174
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
1175
|
+
horizontal: "horizontal";
|
|
1176
|
+
vertical: "vertical";
|
|
1177
|
+
}>>;
|
|
1168
1178
|
}, z.core.$strip>, z.ZodObject<{
|
|
1169
1179
|
type: z.ZodLiteral<"chart">;
|
|
1170
1180
|
chartType: z.ZodEnum<{
|
|
@@ -1291,6 +1301,7 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1291
1301
|
message: "message";
|
|
1292
1302
|
search: "search";
|
|
1293
1303
|
note: "note";
|
|
1304
|
+
list: "list";
|
|
1294
1305
|
alert: "alert";
|
|
1295
1306
|
phone: "phone";
|
|
1296
1307
|
mail: "mail";
|
|
@@ -1352,6 +1363,15 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1352
1363
|
locale: z.ZodOptional<z.ZodString>;
|
|
1353
1364
|
}, z.core.$strip>>;
|
|
1354
1365
|
}, z.core.$strip>], "kind">;
|
|
1366
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
1367
|
+
default: "default";
|
|
1368
|
+
success: "success";
|
|
1369
|
+
warning: "warning";
|
|
1370
|
+
destructive: "destructive";
|
|
1371
|
+
info: "info";
|
|
1372
|
+
accent: "accent";
|
|
1373
|
+
}>>;
|
|
1374
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
1355
1375
|
edit: z.ZodOptional<z.ZodObject<{
|
|
1356
1376
|
field: z.ZodString;
|
|
1357
1377
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1801,6 +1821,7 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1801
1821
|
message: "message";
|
|
1802
1822
|
search: "search";
|
|
1803
1823
|
note: "note";
|
|
1824
|
+
list: "list";
|
|
1804
1825
|
alert: "alert";
|
|
1805
1826
|
phone: "phone";
|
|
1806
1827
|
mail: "mail";
|
|
@@ -2220,6 +2241,7 @@ export declare const screenTreeSchema: z.ZodObject<{
|
|
|
2220
2241
|
message: "message";
|
|
2221
2242
|
search: "search";
|
|
2222
2243
|
note: "note";
|
|
2244
|
+
list: "list";
|
|
2223
2245
|
alert: "alert";
|
|
2224
2246
|
phone: "phone";
|
|
2225
2247
|
mail: "mail";
|
|
@@ -2461,6 +2483,7 @@ export declare const actionResultSchema: z.ZodObject<{
|
|
|
2461
2483
|
message: "message";
|
|
2462
2484
|
search: "search";
|
|
2463
2485
|
note: "note";
|
|
2486
|
+
list: "list";
|
|
2464
2487
|
alert: "alert";
|
|
2465
2488
|
phone: "phone";
|
|
2466
2489
|
mail: "mail";
|
|
@@ -2695,6 +2718,7 @@ export declare const jobStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2695
2718
|
message: "message";
|
|
2696
2719
|
search: "search";
|
|
2697
2720
|
note: "note";
|
|
2721
|
+
list: "list";
|
|
2698
2722
|
alert: "alert";
|
|
2699
2723
|
phone: "phone";
|
|
2700
2724
|
mail: "mail";
|
|
@@ -2919,6 +2943,7 @@ export declare const screenLoadResponseSchema: z.ZodObject<{
|
|
|
2919
2943
|
message: "message";
|
|
2920
2944
|
search: "search";
|
|
2921
2945
|
note: "note";
|
|
2946
|
+
list: "list";
|
|
2922
2947
|
alert: "alert";
|
|
2923
2948
|
phone: "phone";
|
|
2924
2949
|
mail: "mail";
|
package/dist/schema.js
CHANGED
|
@@ -413,6 +413,13 @@ const progressSchema = z.object({
|
|
|
413
413
|
}))
|
|
414
414
|
.min(1)
|
|
415
415
|
.max(100),
|
|
416
|
+
/**
|
|
417
|
+
* `horizontal` draws the steps as one row, a track whose segments fill as steps are done, with
|
|
418
|
+
* the current step's label in bold: a patient's journey from booking to aftercare. A narrow
|
|
419
|
+
* screen draws the list down, as `vertical` (the default) does. An app that does not know it
|
|
420
|
+
* draws the list down.
|
|
421
|
+
*/
|
|
422
|
+
orientation: z.enum(['vertical', 'horizontal']).optional(),
|
|
416
423
|
});
|
|
417
424
|
const chartSchema = z
|
|
418
425
|
.object({
|
|
@@ -659,6 +666,19 @@ const detailsSchema = z
|
|
|
659
666
|
.array(z.object({
|
|
660
667
|
label: z.string().min(1).max(80),
|
|
661
668
|
value: cellSchema,
|
|
669
|
+
/**
|
|
670
|
+
* A small mark before the label: where a fact came from, or how sure it is (a tick for
|
|
671
|
+
* "confirmed by a clinician", a warning sign for "reported by the patient"). Each status
|
|
672
|
+
* tone has its own glyph and `accent` is a dot, with a word for screen readers (`hint`,
|
|
673
|
+
* else the tone's own word), so colour is never the only signal. `default` is no mark.
|
|
674
|
+
* An app that does not know it draws the label alone.
|
|
675
|
+
*/
|
|
676
|
+
tone: tone.optional(),
|
|
677
|
+
/**
|
|
678
|
+
* What the mark means ("Patient reported"): read out before the label, and shown when
|
|
679
|
+
* the pointer rests on the mark. Needs a `tone` other than `default`.
|
|
680
|
+
*/
|
|
681
|
+
hint: z.string().min(1).max(80).optional(),
|
|
662
682
|
/**
|
|
663
683
|
* This item is a field when the block is edited: a text box, or a select of `options`.
|
|
664
684
|
* `value` is what the field starts with when the shown value is not it (a badge that
|
|
@@ -685,6 +705,13 @@ const detailsSchema = z
|
|
|
685
705
|
.superRefine((node, ctx) => {
|
|
686
706
|
const fields = new Set();
|
|
687
707
|
for (const [i, item] of node.items.entries()) {
|
|
708
|
+
if (item.hint !== undefined && (item.tone === undefined || item.tone === 'default')) {
|
|
709
|
+
ctx.addIssue({
|
|
710
|
+
code: 'custom',
|
|
711
|
+
path: ['items', i, 'hint'],
|
|
712
|
+
message: 'hint needs an item tone other than default',
|
|
713
|
+
});
|
|
714
|
+
}
|
|
688
715
|
if (!item.edit)
|
|
689
716
|
continue;
|
|
690
717
|
const at = (key) => ['items', i, 'edit', ...(key ? [key] : [])];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keemakr/ui-sdk",
|
|
3
|
-
"version": "1.6.0-dev-
|
|
3
|
+
"version": "1.6.0-dev-20261027223028",
|
|
4
4
|
"description": "Product screens for keemakr marketplace modules: a versioned, server-driven UI tree schema plus defineScreen() handlers. Module code never ships to the browser — keemakr-core validates the tree and renders it with platform components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|