@flowrunner/cli 0.1.18-dev.1 → 0.1.18-dev.3

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.
@@ -17,10 +17,10 @@ export interface FieldPlan {
17
17
  *
18
18
  * Carried because `coreType` alone stops describing the field: a union resolves to its first branch, so a
19
19
  * `z.union([z.email(), z.literal('')])` reports `'string'` and would then treat a blank as a VALUE. It is
20
- * not one — `''` has always been absence on a union, which is exactly what makes the documented
21
- * "blank means not set" spelling (`z.union([z.url(), z.literal('')]).optional()`) work.
20
+ * not one — `''` is absence on a union, unless the union declares it (`blankBranch`).
22
21
  */
23
22
  isUnion: boolean;
23
+ blankBranch: boolean;
24
24
  absence: AbsencePolicy;
25
25
  absorbsBlank: boolean;
26
26
  keepsEmpty: boolean;
@@ -53,6 +53,14 @@ export interface WidgetInfo {
53
53
  };
54
54
  }
55
55
  export declare function literalType(core: AnyZod): string | undefined;
56
+ /**
57
+ * True when a union declares `''` as one of its forms — a `z.literal('')` branch (FR-3933).
58
+ *
59
+ * On such a union `''` is a VALUE, not a blank: the author listed it, so it is the deliberate "empty" a flow
60
+ * sends (the Empty Text chip, a bound `''`), while `null` and a missing value stay "not provided". That is the
61
+ * only way a flow can clear a date: an untouched block field arrives as `null`, so `null` cannot mean "clear".
62
+ */
63
+ export declare function hasBlankBranch(ins: Inspected): boolean;
56
64
  export declare function deriveWidget(ins: Inspected): WidgetInfo;
57
65
  export declare function shapeEntries(schema: AnyZod | undefined): [name: string, schema: AnyZod][];
58
66
  export declare function fieldLabels(schema: AnyZod): Record<string, string> | undefined;