@adoptai/genui-components 0.1.59 → 0.1.60

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.
@@ -26,6 +26,13 @@ export declare const decisionCardSchema: z.ZodObject<{
26
26
  id: z.ZodOptional<z.ZodString>;
27
27
  label: z.ZodString;
28
28
  recommended: z.ZodOptional<z.ZodBoolean>;
29
+ value: z.ZodOptional<z.ZodNumber>;
30
+ adjust: z.ZodOptional<z.ZodObject<{
31
+ min: z.ZodNumber;
32
+ max: z.ZodNumber;
33
+ step: z.ZodOptional<z.ZodNumber>;
34
+ unit: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>>;
29
36
  }, z.core.$strip>>;
30
37
  source: z.ZodOptional<z.ZodObject<{
31
38
  label: z.ZodOptional<z.ZodString>;
@@ -33,6 +40,7 @@ export declare const decisionCardSchema: z.ZodObject<{
33
40
  }, z.core.$strip>>;
34
41
  resolved: z.ZodOptional<z.ZodObject<{
35
42
  option: z.ZodString;
43
+ value: z.ZodOptional<z.ZodNumber>;
36
44
  }, z.core.$strip>>;
37
45
  }, z.core.$strip>;
38
46
  export declare const decisionCardTool: {
@@ -116,6 +124,31 @@ export declare const decisionCardTool: {
116
124
  recommended: {
117
125
  type: string;
118
126
  };
127
+ value: {
128
+ type: string;
129
+ description: string;
130
+ };
131
+ adjust: {
132
+ type: string;
133
+ description: string;
134
+ properties: {
135
+ min: {
136
+ type: string;
137
+ };
138
+ max: {
139
+ type: string;
140
+ };
141
+ step: {
142
+ type: string;
143
+ description: string;
144
+ };
145
+ unit: {
146
+ type: string;
147
+ description: string;
148
+ };
149
+ };
150
+ required: string[];
151
+ };
119
152
  };
120
153
  required: string[];
121
154
  };
@@ -139,6 +172,10 @@ export declare const decisionCardTool: {
139
172
  option: {
140
173
  type: string;
141
174
  };
175
+ value: {
176
+ type: string;
177
+ description: string;
178
+ };
142
179
  };
143
180
  required: string[];
144
181
  };
@@ -1 +1 @@
1
- {"version":3,"file":"decision-card.d.ts","sourceRoot":"","sources":["../../src/schemas/decision-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyC7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuE5B,CAAC"}
1
+ {"version":3,"file":"decision-card.d.ts","sourceRoot":"","sources":["../../src/schemas/decision-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmD7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwF5B,CAAC"}
@@ -3703,7 +3703,14 @@ var decisionCardSchema = zod.z.object({
3703
3703
  zod.z.object({
3704
3704
  id: zod.z.string().optional(),
3705
3705
  label: zod.z.string(),
3706
- recommended: zod.z.boolean().optional()
3706
+ recommended: zod.z.boolean().optional(),
3707
+ value: zod.z.number().optional(),
3708
+ adjust: zod.z.object({
3709
+ min: zod.z.number(),
3710
+ max: zod.z.number(),
3711
+ step: zod.z.number().optional(),
3712
+ unit: zod.z.string().optional()
3713
+ }).optional()
3707
3714
  })
3708
3715
  ).min(1).max(5),
3709
3716
  source: zod.z.object({
@@ -3711,7 +3718,8 @@ var decisionCardSchema = zod.z.object({
3711
3718
  url: zod.z.string().optional()
3712
3719
  }).optional(),
3713
3720
  resolved: zod.z.object({
3714
- option: zod.z.string()
3721
+ option: zod.z.string(),
3722
+ value: zod.z.number().optional()
3715
3723
  }).optional()
3716
3724
  });
3717
3725
  var decisionCardTool = {
@@ -3754,13 +3762,28 @@ var decisionCardTool = {
3754
3762
  type: "array",
3755
3763
  minItems: 1,
3756
3764
  maxItems: 5,
3757
- description: "Mutually-exclusive resolution choices; mark one `recommended` to make it primary",
3765
+ description: "Mutually-exclusive resolution choices; mark one `recommended` to make it primary. An option that carries a numeric figure the user may want to tune (e.g. 'Book reserve' at 50 units) should set `value` (your suggested figure) and `adjust` ({min,max[,step,unit]}) \u2014 the card then lets the user fine-tune the number within that range before confirming.",
3758
3766
  items: {
3759
3767
  type: "object",
3760
3768
  properties: {
3761
3769
  id: { type: "string" },
3762
3770
  label: { type: "string" },
3763
- recommended: { type: "boolean" }
3771
+ recommended: { type: "boolean" },
3772
+ value: {
3773
+ type: "number",
3774
+ description: "Suggested numeric figure for this option (the starting point of the adjuster)"
3775
+ },
3776
+ adjust: {
3777
+ type: "object",
3778
+ description: "Allow the user to tune `value` within this inclusive range before resolving",
3779
+ properties: {
3780
+ min: { type: "number" },
3781
+ max: { type: "number" },
3782
+ step: { type: "number", description: "Increment granularity; defaults to a sensible step for the range" },
3783
+ unit: { type: "string", description: "Short unit suffix shown after the number, e.g. 'units', '%', 'hrs'" }
3784
+ },
3785
+ required: ["min", "max"]
3786
+ }
3764
3787
  },
3765
3788
  required: ["label"]
3766
3789
  }
@@ -3777,7 +3800,8 @@ var decisionCardTool = {
3777
3800
  type: "object",
3778
3801
  description: "Pre-resolved state for transcript replay",
3779
3802
  properties: {
3780
- option: { type: "string" }
3803
+ option: { type: "string" },
3804
+ value: { type: "number", description: "Adjusted figure the user confirmed, when the option was adjustable" }
3781
3805
  },
3782
3806
  required: ["option"]
3783
3807
  }