@keemakr/ui-sdk 1.6.0-dev-20261027084552 → 1.6.0-dev-20261027085115
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/schema.d.ts +18 -0
- package/dist/schema.js +23 -0
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -1923,6 +1923,7 @@ export type ScreenNode = LeafScreenNode | {
|
|
|
1923
1923
|
label: string;
|
|
1924
1924
|
onPress: Press;
|
|
1925
1925
|
};
|
|
1926
|
+
tone?: 'default' | 'success' | 'warning' | 'destructive' | 'info' | 'accent';
|
|
1926
1927
|
children: ScreenNode[];
|
|
1927
1928
|
};
|
|
1928
1929
|
type ScreenNodeInput = LeafScreenNodeInput | {
|
|
@@ -1947,6 +1948,7 @@ type ScreenNodeInput = LeafScreenNodeInput | {
|
|
|
1947
1948
|
label: string;
|
|
1948
1949
|
onPress: z.input<typeof pressSchema>;
|
|
1949
1950
|
};
|
|
1951
|
+
tone?: 'default' | 'success' | 'warning' | 'destructive' | 'info' | 'accent';
|
|
1950
1952
|
children: ScreenNodeInput[];
|
|
1951
1953
|
};
|
|
1952
1954
|
/**
|
|
@@ -2052,6 +2054,10 @@ export declare const screenTreeSchema: z.ZodObject<{
|
|
|
2052
2054
|
dot: z.ZodOptional<z.ZodBoolean>;
|
|
2053
2055
|
hint: z.ZodOptional<z.ZodString>;
|
|
2054
2056
|
}, z.core.$strip>>>;
|
|
2057
|
+
avatar: z.ZodOptional<z.ZodObject<{
|
|
2058
|
+
initials: z.ZodString;
|
|
2059
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2060
|
+
}, z.core.$strip>>;
|
|
2055
2061
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2056
2062
|
label: z.ZodString;
|
|
2057
2063
|
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -2276,6 +2282,10 @@ export declare const actionResultSchema: z.ZodObject<{
|
|
|
2276
2282
|
dot: z.ZodOptional<z.ZodBoolean>;
|
|
2277
2283
|
hint: z.ZodOptional<z.ZodString>;
|
|
2278
2284
|
}, z.core.$strip>>>;
|
|
2285
|
+
avatar: z.ZodOptional<z.ZodObject<{
|
|
2286
|
+
initials: z.ZodString;
|
|
2287
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2288
|
+
}, z.core.$strip>>;
|
|
2279
2289
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2280
2290
|
label: z.ZodString;
|
|
2281
2291
|
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -2493,6 +2503,10 @@ export declare const jobStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2493
2503
|
dot: z.ZodOptional<z.ZodBoolean>;
|
|
2494
2504
|
hint: z.ZodOptional<z.ZodString>;
|
|
2495
2505
|
}, z.core.$strip>>>;
|
|
2506
|
+
avatar: z.ZodOptional<z.ZodObject<{
|
|
2507
|
+
initials: z.ZodString;
|
|
2508
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2509
|
+
}, z.core.$strip>>;
|
|
2496
2510
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2497
2511
|
label: z.ZodString;
|
|
2498
2512
|
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -2700,6 +2714,10 @@ export declare const screenLoadResponseSchema: z.ZodObject<{
|
|
|
2700
2714
|
dot: z.ZodOptional<z.ZodBoolean>;
|
|
2701
2715
|
hint: z.ZodOptional<z.ZodString>;
|
|
2702
2716
|
}, z.core.$strip>>>;
|
|
2717
|
+
avatar: z.ZodOptional<z.ZodObject<{
|
|
2718
|
+
initials: z.ZodString;
|
|
2719
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2720
|
+
}, z.core.$strip>>;
|
|
2703
2721
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2704
2722
|
label: z.ZodString;
|
|
2705
2723
|
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/schema.js
CHANGED
|
@@ -2285,6 +2285,12 @@ const sectionShape = (children) => z.object({
|
|
|
2285
2285
|
onPress: pressSchema,
|
|
2286
2286
|
})
|
|
2287
2287
|
.optional(),
|
|
2288
|
+
/**
|
|
2289
|
+
* Tints a `card` section in a tone: its border and a faint wash behind it, so one card reads
|
|
2290
|
+
* as marked (a red diagnosis on an account). Colour is never the only signal: the title says
|
|
2291
|
+
* why ("Red · onboarding stalled"). Needs `surface: 'card'`. Default `default`, no tint.
|
|
2292
|
+
*/
|
|
2293
|
+
tone: tone.optional(),
|
|
2288
2294
|
children: z.array(children).max(100),
|
|
2289
2295
|
});
|
|
2290
2296
|
/** The rules between a section's fields, which a field's own schema cannot state. */
|
|
@@ -2361,6 +2367,13 @@ function checkSection(node, ctx) {
|
|
|
2361
2367
|
message: 'a section action sits on its title line, so it needs a title',
|
|
2362
2368
|
});
|
|
2363
2369
|
}
|
|
2370
|
+
if (node.tone !== undefined && node.surface !== 'card') {
|
|
2371
|
+
ctx.addIssue({
|
|
2372
|
+
code: 'custom',
|
|
2373
|
+
path: ['tone'],
|
|
2374
|
+
message: "a section tone tints a card, so it needs surface: 'card'",
|
|
2375
|
+
});
|
|
2376
|
+
}
|
|
2364
2377
|
}
|
|
2365
2378
|
const sectionBranch = (children) => sectionShape(children).superRefine(checkSection);
|
|
2366
2379
|
/**
|
|
@@ -2470,6 +2483,16 @@ export const screenTreeSchema = z
|
|
|
2470
2483
|
* only signal, so each label says the status in words ("At risk").
|
|
2471
2484
|
*/
|
|
2472
2485
|
badges: z.array(tagSchema).min(1).max(4).optional(),
|
|
2486
|
+
/**
|
|
2487
|
+
* A square before the title that says whose screen this is at a glance: an account's
|
|
2488
|
+
* initials, or its logo from the module's media. Decorative: the title names it. With an
|
|
2489
|
+
* avatar the header is drawn as one card (avatar, title and badges, facts, actions), the
|
|
2490
|
+
* top of a record's page. `initials` are drawn when there is no `src`, and while it loads
|
|
2491
|
+
* or when it fails.
|
|
2492
|
+
*/
|
|
2493
|
+
avatar: z
|
|
2494
|
+
.object({ initials: z.string().min(1).max(3), src: mediaPathSchema.optional() })
|
|
2495
|
+
.optional(),
|
|
2473
2496
|
/**
|
|
2474
2497
|
* Up to eight facts drawn as a compact row under the title (and its
|
|
2475
2498
|
* description): ARR, renewal date, reps, NPS. Each value is a cell, so a
|
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-20261027085115",
|
|
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",
|