@keemakr/ui-sdk 1.0.0 → 1.1.0-dev-20260818125238

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 CHANGED
@@ -59,7 +59,7 @@ export declare const cellSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
59
59
  kind: z.ZodLiteral<"date">;
60
60
  value: z.ZodISODateTime;
61
61
  }, z.core.$strip>], "kind">;
62
- declare const leafNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
62
+ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
63
63
  type: z.ZodLiteral<"heading">;
64
64
  text: z.ZodString;
65
65
  }, z.core.$strip>, z.ZodObject<{
@@ -211,7 +211,7 @@ declare const leafNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
211
211
  name: z.ZodString;
212
212
  values: z.ZodArray<z.ZodNumber>;
213
213
  }, z.core.$strip>>;
214
- }, z.core.$strip>]>;
214
+ }, z.core.$strip>], "type">;
215
215
  type LeafScreenNode = z.infer<typeof leafNodeSchema>;
216
216
  type LeafScreenNodeInput = z.input<typeof leafNodeSchema>;
217
217
  export type ScreenNode = LeafScreenNode | {
package/dist/schema.js CHANGED
@@ -97,7 +97,7 @@ const chartSchema = z
97
97
  }
98
98
  }
99
99
  });
100
- const leafNodeSchema = z.union([
100
+ const leafNodeSchema = z.discriminatedUnion('type', [
101
101
  z.object({ type: z.literal('heading'), text: z.string().max(120) }),
102
102
  z.object({
103
103
  type: z.literal('text'),
@@ -182,7 +182,7 @@ function nodeSchemaAtDepth(depth) {
182
182
  return cached;
183
183
  if (depth === MAX_SECTION_DEPTH)
184
184
  return leafNodeSchema;
185
- const schema = z.union([
185
+ const schema = z.discriminatedUnion('type', [
186
186
  leafNodeSchema,
187
187
  z.object({
188
188
  type: z.literal('section'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keemakr/ui-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.1.0-dev-20260818125238",
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",