@tripsam/onboarding 1.0.19 → 1.0.21

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/index.cjs CHANGED
@@ -136,9 +136,12 @@ __export(slot_exports, {
136
136
  update: () => update2
137
137
  });
138
138
  var import_zod4 = require("zod");
139
- var time12h = import_zod4.z.string().trim().regex(/^((0[1-9]|1[0-2])):([0-5][0-9])\s?(AM|PM)$/i, "Use format hh:mm AM/PM").transform((v) => {
140
- const [, hh, , mm, meridianRaw] = v.match(/^((0[1-9]|1[0-2])):([0-5][0-9])\s?(AM|PM)$/i);
141
- const meridian = meridianRaw.toUpperCase();
139
+ var TIME_12H = /^(0?[1-9]|1[0-2]):([0-5][0-9])(?:[\u00A0\u202F\s]*)?(AM|PM)$/i;
140
+ var time12h = import_zod4.z.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").transform((v) => {
141
+ const m = v.match(TIME_12H);
142
+ const hh = m[1];
143
+ const mm = m[2];
144
+ const meridian = m[3].toUpperCase();
142
145
  let h = parseInt(hh, 10) % 12;
143
146
  if (meridian === "PM") h += 12;
144
147
  return h * 60 + parseInt(mm, 10);
@@ -162,8 +165,8 @@ var me3 = import_zod4.z.object({
162
165
  id: import_zod4.z.string().trim().optional(),
163
166
  name: import_zod4.z.string().trim().nonempty("required"),
164
167
  description: import_zod4.z.string().trim().optional(),
165
- startTime: import_zod4.z.string().trim().nonempty("required"),
166
- endTime: import_zod4.z.string().trim().nonempty("required"),
168
+ startTime: import_zod4.z.coerce.number(),
169
+ endTime: import_zod4.z.coerce.number(),
167
170
  minHour: import_zod4.z.coerce.number("invalid")
168
171
  });
169
172
  var meList = import_zod4.z.array(me3);
package/dist/index.d.cts CHANGED
@@ -180,16 +180,16 @@ declare const me: z.ZodObject<{
180
180
  id: z.ZodOptional<z.ZodString>;
181
181
  name: z.ZodString;
182
182
  description: z.ZodOptional<z.ZodString>;
183
- startTime: z.ZodString;
184
- endTime: z.ZodString;
183
+ startTime: z.ZodCoercedNumber<unknown>;
184
+ endTime: z.ZodCoercedNumber<unknown>;
185
185
  minHour: z.ZodCoercedNumber<unknown>;
186
186
  }, z.core.$strip>;
187
187
  declare const meList: z.ZodArray<z.ZodObject<{
188
188
  id: z.ZodOptional<z.ZodString>;
189
189
  name: z.ZodString;
190
190
  description: z.ZodOptional<z.ZodString>;
191
- startTime: z.ZodString;
192
- endTime: z.ZodString;
191
+ startTime: z.ZodCoercedNumber<unknown>;
192
+ endTime: z.ZodCoercedNumber<unknown>;
193
193
  minHour: z.ZodCoercedNumber<unknown>;
194
194
  }, z.core.$strip>>;
195
195
  type SafeMe = z.output<typeof me>;
package/dist/index.d.ts CHANGED
@@ -180,16 +180,16 @@ declare const me: z.ZodObject<{
180
180
  id: z.ZodOptional<z.ZodString>;
181
181
  name: z.ZodString;
182
182
  description: z.ZodOptional<z.ZodString>;
183
- startTime: z.ZodString;
184
- endTime: z.ZodString;
183
+ startTime: z.ZodCoercedNumber<unknown>;
184
+ endTime: z.ZodCoercedNumber<unknown>;
185
185
  minHour: z.ZodCoercedNumber<unknown>;
186
186
  }, z.core.$strip>;
187
187
  declare const meList: z.ZodArray<z.ZodObject<{
188
188
  id: z.ZodOptional<z.ZodString>;
189
189
  name: z.ZodString;
190
190
  description: z.ZodOptional<z.ZodString>;
191
- startTime: z.ZodString;
192
- endTime: z.ZodString;
191
+ startTime: z.ZodCoercedNumber<unknown>;
192
+ endTime: z.ZodCoercedNumber<unknown>;
193
193
  minHour: z.ZodCoercedNumber<unknown>;
194
194
  }, z.core.$strip>>;
195
195
  type SafeMe = z.output<typeof me>;
package/dist/index.js CHANGED
@@ -113,9 +113,12 @@ __export(slot_exports, {
113
113
  update: () => update2
114
114
  });
115
115
  import { z as z4 } from "zod";
116
- var time12h = z4.string().trim().regex(/^((0[1-9]|1[0-2])):([0-5][0-9])\s?(AM|PM)$/i, "Use format hh:mm AM/PM").transform((v) => {
117
- const [, hh, , mm, meridianRaw] = v.match(/^((0[1-9]|1[0-2])):([0-5][0-9])\s?(AM|PM)$/i);
118
- const meridian = meridianRaw.toUpperCase();
116
+ var TIME_12H = /^(0?[1-9]|1[0-2]):([0-5][0-9])(?:[\u00A0\u202F\s]*)?(AM|PM)$/i;
117
+ var time12h = z4.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").transform((v) => {
118
+ const m = v.match(TIME_12H);
119
+ const hh = m[1];
120
+ const mm = m[2];
121
+ const meridian = m[3].toUpperCase();
119
122
  let h = parseInt(hh, 10) % 12;
120
123
  if (meridian === "PM") h += 12;
121
124
  return h * 60 + parseInt(mm, 10);
@@ -139,8 +142,8 @@ var me3 = z4.object({
139
142
  id: z4.string().trim().optional(),
140
143
  name: z4.string().trim().nonempty("required"),
141
144
  description: z4.string().trim().optional(),
142
- startTime: z4.string().trim().nonempty("required"),
143
- endTime: z4.string().trim().nonempty("required"),
145
+ startTime: z4.coerce.number(),
146
+ endTime: z4.coerce.number(),
144
147
  minHour: z4.coerce.number("invalid")
145
148
  });
146
149
  var meList = z4.array(me3);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tripsam/onboarding",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",