@atscript/vue-form 0.1.160 → 0.1.161

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.
@@ -1,2 +1,2 @@
1
- import { n as _default, t as Props } from "./as-form.vue-DlM0HiAT.cjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-BmW2ap6p.cjs";
2
2
  export { Props, _default as default };
@@ -1,2 +1,2 @@
1
- import { n as _default, t as Props } from "./as-form.vue-B52d8Ocv.mjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-Dz7Ue2jh.mjs";
2
2
  export { Props, _default as default };
@@ -5,7 +5,7 @@ import * as _atscript_ui0 from "@atscript/ui";
5
5
  import { ClientFactory, ClientFactory as ClientFactory$1, FormArrayFieldDef, FormDef, FormDiffOptions, FormDiffOptions as FormDiffOptions$1, FormFieldChange, FormFieldChange as FormFieldChange$1, FormFieldDef, FormRebaseOptions, FormRebaseOptions as FormRebaseOptions$1, FormTupleFieldDef, FormUnionFieldDef, FormUnionVariant, ResolvedValueHelp, TResolveOptions, ValueHelpInfo, getDefaultClientFactory, hasFieldMeta, isFieldHidden, joinPath, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
6
6
  import { TFnScope } from "@atscript/ui-fns";
7
7
 
8
- //#region ../../node_modules/.pnpm/@atscript+typescript@0.1.109_@atscript+core@0.1.109_@emnapi+core@1.10.0_@emnapi+runtime_b5b784e486fc95b6b8ffe49add98419f/node_modules/@atscript/typescript/dist/utils.d.ts
8
+ //#region ../../node_modules/.pnpm/@atscript+typescript@0.2.1_@atscript+core@0.2.1_@emnapi+core@1.10.0_@emnapi+runtime@1.1_d28dea31c61ba6562726a1c33f4e67c8/node_modules/@atscript/typescript/dist/utils.d.ts
9
9
  interface TError {
10
10
  path: string;
11
11
  message: string;
@@ -30,6 +30,12 @@ interface TValidatorOptions {
30
30
  /** Context exposed to {@link TValidatorPlugin} functions. */
31
31
  interface TValidatorPluginContext {
32
32
  opts: Validator<any>['opts'];
33
+ /**
34
+ * Validates `value` against `def` at the current path (errors go to the current level). With
35
+ * `unknownProps: 'strip'`, a call that returns `false` strips nothing: the keys it recorded are
36
+ * dropped, as for a rejected union branch, so trying alternatives (`a || b`) strips what the
37
+ * union `a | b` would.
38
+ */
33
39
  validateAnnotatedType: Validator<any>['validateAnnotatedType'];
34
40
  error: Validator<any>['error'];
35
41
  path: Validator<any>['path'];
@@ -75,11 +81,37 @@ declare class Validator<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedTyp
75
81
  protected depth: number;
76
82
  protected limitExceeded: boolean;
77
83
  protected context: unknown;
84
+ /**
85
+ * The unions over objects this call decided inside union branches (value → outcomes). A union
86
+ * nested in its own branches, many branches each, is reached again with the same value and path
87
+ * from every branch of every union above it — (branches)^(depth) work. The memo is made once
88
+ * the call has wasted {@link WASTE_BEFORE_MEMO} union branches (failed after branches of nested
89
+ * unions over objects failed) since the outermost union, as in the pre-check — ordinary walks
90
+ * never make it. It decides each such union once, with the same result and the same error object
91
+ * (both depend only on these, the options and the input, which the walk never changes), and
92
+ * records the same strips again.
93
+ */
94
+ private unionMemo?;
95
+ /** Union branches being checked (`> 0`: inside a union branch). */
96
+ private unionDepth;
97
+ /** Failed branches of unions over objects inside union branches (see `unionMemo`). */
98
+ private nestedFailures;
99
+ /** Wasted union branches since the outermost union was entered (see `unionMemo`). */
100
+ private wasted;
101
+ /**
102
+ * `unknownProps: 'strip'`: the unknown keys of the objects that passed (`object, key, …`), in the
103
+ * order the objects completed, then in key order. A rejected union branch, pattern property
104
+ * attempt or plugin sub-validation drops what it recorded; the keys are deleted once the whole
105
+ * call passes (`performStrips`).
106
+ */
107
+ private strips;
78
108
  protected buildPath(): string;
79
109
  protected push(name: string): void;
80
110
  protected pop(saveErrors: boolean): TError[] | null | undefined;
81
111
  protected clear(): void;
82
- protected error(message: string, path?: string, details?: TError[]): void;
112
+ protected error(message: string, path?: string, details?: TError[]): TError;
113
+ /** Adds `error`, already made, to the errors of the current level (as {@link error} does). */
114
+ private report;
83
115
  protected throw(): void;
84
116
  /**
85
117
  * Validates a value against the type definition.
@@ -100,36 +132,68 @@ declare class Validator<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedTyp
100
132
  * often built per call, so construction stays as cheap as before.)
101
133
  */
102
134
  private get shortcuts();
135
+ /** Validates `value` against `def` (after `replace`, `optional` and the plugins). */
103
136
  protected validateSafe(def: TAtscriptAnnotatedType, value: any): boolean;
137
+ /**
138
+ * What {@link validateSafe} decides of `def` (replaced) before its own validation: an
139
+ * optional `def` passes `undefined` / `null`, a plugin may decide — `undefined` to go on.
140
+ */
141
+ private preCheck;
142
+ /** The context the plugins get (see {@link pluginContext}), made on the first plugin call. */
143
+ private pluginCtx?;
144
+ /**
145
+ * The plugins' view of this validator: its state read live; `validateAnnotatedType` drops the
146
+ * strips a failed call recorded (a failed validation at any level strips nothing).
147
+ */
148
+ private pluginContext;
149
+ /** `def` as the `replace` option replaces it at the current path (memoized per node). */
150
+ private replaced;
104
151
  protected get path(): string;
105
152
  /** The type this validator was created for (see {@link TValidatorPluginContext.root}). */
106
153
  protected get root(): T;
107
154
  protected validateAnnotatedType(def: TAtscriptAnnotatedType, value: any): boolean;
108
155
  protected validateUnion(def: TAtscriptAnnotatedType<TAtscriptTypeComplex>, value: any): boolean;
156
+ /** A union branch failed after branches of nested unions over objects did (see `unionMemo`). */
157
+ private wasteBranch;
158
+ /** The outcome this call recorded for union `def` over `value` at `path` (see `unionMemo`). */
159
+ private decided;
160
+ /**
161
+ * Records the outcome of union `def` over `value` at `path`, entered with `kept` strips (the
162
+ * ones after them are its own).
163
+ */
164
+ private decide;
109
165
  /**
110
166
  * Constraints annotated on the union itself (`@expect.min 0` on `number | null`)
111
167
  * apply to the non-null value that matched `branch`, on top of the branch's own.
112
168
  * A literal branch (an enum value) is exempt: its value is fixed.
113
169
  */
114
170
  protected validateUnionConstraints(def: TAtscriptAnnotatedType<TAtscriptTypeComplex>, branch: TAtscriptAnnotatedType, value: any): boolean;
171
+ /** Every member must pass, each on its own (JSON Schema `allOf`). */
115
172
  protected validateIntersection(def: TAtscriptAnnotatedType<TAtscriptTypeComplex>, value: any): boolean;
173
+ /**
174
+ * An unknown key (`unknownProps`): 'error' reports it, 'strip' adds it to the keys to strip
175
+ * (returned; recorded in `strips` once the object passed).
176
+ */
177
+ private unknownKey;
178
+ /** The `skipList` keys of the object at the current path. */
179
+ private skipListHere;
116
180
  protected validateTuple(def: TAtscriptAnnotatedType<TAtscriptTypeComplex>, value: any): boolean;
117
181
  protected validateArray(def: TAtscriptAnnotatedType<TAtscriptTypeArray>, value: any): boolean;
118
182
  /** `@expect.minLength` / `maxLength` / `array.uniqueItems` checks for an array value. */
119
- protected validateArrayConstraints(metadata: TMetadataMap<AtscriptMetadata>, value: any[], of?: TAtscriptAnnotatedType): boolean;
183
+ protected validateArrayConstraints(meta: TMetadataMap<AtscriptMetadata>, value: any[], of?: TAtscriptAnnotatedType): boolean;
120
184
  protected validateObject(def: TAtscriptAnnotatedType<TAtscriptTypeObject>, value: any): boolean;
121
185
  protected validatePrimitive(def: TAtscriptAnnotatedType<TAtscriptTypeFinal>, value: any): boolean;
122
186
  protected validateString(def: TAtscriptAnnotatedType<TAtscriptTypeFinal>, value: string): boolean;
123
187
  /** `@meta.required` / `@expect.minLength` / `maxLength` / `pattern` checks for a string value. */
124
- protected validateStringConstraints(metadata: TMetadataMap<AtscriptMetadata>, value: string): boolean;
188
+ protected validateStringConstraints(meta: TMetadataMap<AtscriptMetadata>, value: string): boolean;
125
189
  protected validateNumber(def: TAtscriptAnnotatedType<TAtscriptTypeFinal>, value: number): boolean;
126
190
  /** `@expect.int` / `min` / `max` / `exclusiveMin` / `exclusiveMax` checks for a number value. */
127
- protected validateNumberConstraints(metadata: TMetadataMap<AtscriptMetadata>, value: number): boolean;
191
+ protected validateNumberConstraints(meta: TMetadataMap<AtscriptMetadata>, value: number): boolean;
128
192
  /** Reports a failed number bound: its custom message, else `Expected <label> <bound>, got <value>`. */
129
193
  private numberBoundFailed;
130
194
  protected validateBoolean(def: TAtscriptAnnotatedType<TAtscriptTypeFinal>, value: boolean): boolean;
131
195
  /** `@meta.required` check for a boolean value (must be `true`). */
132
- protected validateBooleanConstraints(metadata: TMetadataMap<AtscriptMetadata>, value: boolean): boolean;
196
+ protected validateBooleanConstraints(meta: TMetadataMap<AtscriptMetadata>, value: boolean): boolean;
133
197
  }
134
198
  /** Error thrown by {@link Validator.validate} when validation fails. Contains structured error details. */
135
199
  /** Type definition for union, intersection, or tuple types. */
@@ -1377,8 +1441,8 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1377
1441
  path: string;
1378
1442
  message: string;
1379
1443
  }[]) => any) | undefined;
1380
- onAction?: ((name: string, data: TFormData) => any) | undefined;
1381
1444
  onSubmit?: ((data: TFormData) => any) | undefined;
1445
+ onAction?: ((name: string, data: TFormData) => any) | undefined;
1382
1446
  "onUnsupported-action"?: ((name: string, data: TFormData) => any) | undefined;
1383
1447
  onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TFormData) => any) | undefined;
1384
1448
  }> & (typeof globalThis extends {
@@ -5,7 +5,7 @@ import * as _atscript_ui0 from "@atscript/ui";
5
5
  import { ClientFactory, ClientFactory as ClientFactory$1, FormArrayFieldDef, FormDef, FormDiffOptions, FormDiffOptions as FormDiffOptions$1, FormFieldChange, FormFieldChange as FormFieldChange$1, FormFieldDef, FormRebaseOptions, FormRebaseOptions as FormRebaseOptions$1, FormTupleFieldDef, FormUnionFieldDef, FormUnionVariant, ResolvedValueHelp, TResolveOptions, ValueHelpInfo, getDefaultClientFactory, hasFieldMeta as hasFieldMeta$1, isFieldHidden as isFieldHidden$1, joinPath as joinPath$1, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
6
6
  import { TFnScope } from "@atscript/ui-fns";
7
7
 
8
- //#region ../../node_modules/.pnpm/@atscript+typescript@0.1.109_@atscript+core@0.1.109_@emnapi+core@1.10.0_@emnapi+runtime_b5b784e486fc95b6b8ffe49add98419f/node_modules/@atscript/typescript/dist/utils.d.ts
8
+ //#region ../../node_modules/.pnpm/@atscript+typescript@0.2.1_@atscript+core@0.2.1_@emnapi+core@1.10.0_@emnapi+runtime@1.1_d28dea31c61ba6562726a1c33f4e67c8/node_modules/@atscript/typescript/dist/utils.d.ts
9
9
  interface TError {
10
10
  path: string;
11
11
  message: string;
@@ -30,6 +30,12 @@ interface TValidatorOptions {
30
30
  /** Context exposed to {@link TValidatorPlugin} functions. */
31
31
  interface TValidatorPluginContext {
32
32
  opts: Validator<any>['opts'];
33
+ /**
34
+ * Validates `value` against `def` at the current path (errors go to the current level). With
35
+ * `unknownProps: 'strip'`, a call that returns `false` strips nothing: the keys it recorded are
36
+ * dropped, as for a rejected union branch, so trying alternatives (`a || b`) strips what the
37
+ * union `a | b` would.
38
+ */
33
39
  validateAnnotatedType: Validator<any>['validateAnnotatedType'];
34
40
  error: Validator<any>['error'];
35
41
  path: Validator<any>['path'];
@@ -75,11 +81,37 @@ declare class Validator<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedTyp
75
81
  protected depth: number;
76
82
  protected limitExceeded: boolean;
77
83
  protected context: unknown;
84
+ /**
85
+ * The unions over objects this call decided inside union branches (value → outcomes). A union
86
+ * nested in its own branches, many branches each, is reached again with the same value and path
87
+ * from every branch of every union above it — (branches)^(depth) work. The memo is made once
88
+ * the call has wasted {@link WASTE_BEFORE_MEMO} union branches (failed after branches of nested
89
+ * unions over objects failed) since the outermost union, as in the pre-check — ordinary walks
90
+ * never make it. It decides each such union once, with the same result and the same error object
91
+ * (both depend only on these, the options and the input, which the walk never changes), and
92
+ * records the same strips again.
93
+ */
94
+ private unionMemo?;
95
+ /** Union branches being checked (`> 0`: inside a union branch). */
96
+ private unionDepth;
97
+ /** Failed branches of unions over objects inside union branches (see `unionMemo`). */
98
+ private nestedFailures;
99
+ /** Wasted union branches since the outermost union was entered (see `unionMemo`). */
100
+ private wasted;
101
+ /**
102
+ * `unknownProps: 'strip'`: the unknown keys of the objects that passed (`object, key, …`), in the
103
+ * order the objects completed, then in key order. A rejected union branch, pattern property
104
+ * attempt or plugin sub-validation drops what it recorded; the keys are deleted once the whole
105
+ * call passes (`performStrips`).
106
+ */
107
+ private strips;
78
108
  protected buildPath(): string;
79
109
  protected push(name: string): void;
80
110
  protected pop(saveErrors: boolean): TError[] | null | undefined;
81
111
  protected clear(): void;
82
- protected error(message: string, path?: string, details?: TError[]): void;
112
+ protected error(message: string, path?: string, details?: TError[]): TError;
113
+ /** Adds `error`, already made, to the errors of the current level (as {@link error} does). */
114
+ private report;
83
115
  protected throw(): void;
84
116
  /**
85
117
  * Validates a value against the type definition.
@@ -100,36 +132,68 @@ declare class Validator<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedTyp
100
132
  * often built per call, so construction stays as cheap as before.)
101
133
  */
102
134
  private get shortcuts();
135
+ /** Validates `value` against `def` (after `replace`, `optional` and the plugins). */
103
136
  protected validateSafe(def: TAtscriptAnnotatedType, value: any): boolean;
137
+ /**
138
+ * What {@link validateSafe} decides of `def` (replaced) before its own validation: an
139
+ * optional `def` passes `undefined` / `null`, a plugin may decide — `undefined` to go on.
140
+ */
141
+ private preCheck;
142
+ /** The context the plugins get (see {@link pluginContext}), made on the first plugin call. */
143
+ private pluginCtx?;
144
+ /**
145
+ * The plugins' view of this validator: its state read live; `validateAnnotatedType` drops the
146
+ * strips a failed call recorded (a failed validation at any level strips nothing).
147
+ */
148
+ private pluginContext;
149
+ /** `def` as the `replace` option replaces it at the current path (memoized per node). */
150
+ private replaced;
104
151
  protected get path(): string;
105
152
  /** The type this validator was created for (see {@link TValidatorPluginContext.root}). */
106
153
  protected get root(): T;
107
154
  protected validateAnnotatedType(def: TAtscriptAnnotatedType, value: any): boolean;
108
155
  protected validateUnion(def: TAtscriptAnnotatedType<TAtscriptTypeComplex>, value: any): boolean;
156
+ /** A union branch failed after branches of nested unions over objects did (see `unionMemo`). */
157
+ private wasteBranch;
158
+ /** The outcome this call recorded for union `def` over `value` at `path` (see `unionMemo`). */
159
+ private decided;
160
+ /**
161
+ * Records the outcome of union `def` over `value` at `path`, entered with `kept` strips (the
162
+ * ones after them are its own).
163
+ */
164
+ private decide;
109
165
  /**
110
166
  * Constraints annotated on the union itself (`@expect.min 0` on `number | null`)
111
167
  * apply to the non-null value that matched `branch`, on top of the branch's own.
112
168
  * A literal branch (an enum value) is exempt: its value is fixed.
113
169
  */
114
170
  protected validateUnionConstraints(def: TAtscriptAnnotatedType<TAtscriptTypeComplex>, branch: TAtscriptAnnotatedType, value: any): boolean;
171
+ /** Every member must pass, each on its own (JSON Schema `allOf`). */
115
172
  protected validateIntersection(def: TAtscriptAnnotatedType<TAtscriptTypeComplex>, value: any): boolean;
173
+ /**
174
+ * An unknown key (`unknownProps`): 'error' reports it, 'strip' adds it to the keys to strip
175
+ * (returned; recorded in `strips` once the object passed).
176
+ */
177
+ private unknownKey;
178
+ /** The `skipList` keys of the object at the current path. */
179
+ private skipListHere;
116
180
  protected validateTuple(def: TAtscriptAnnotatedType<TAtscriptTypeComplex>, value: any): boolean;
117
181
  protected validateArray(def: TAtscriptAnnotatedType<TAtscriptTypeArray>, value: any): boolean;
118
182
  /** `@expect.minLength` / `maxLength` / `array.uniqueItems` checks for an array value. */
119
- protected validateArrayConstraints(metadata: TMetadataMap<AtscriptMetadata>, value: any[], of?: TAtscriptAnnotatedType): boolean;
183
+ protected validateArrayConstraints(meta: TMetadataMap<AtscriptMetadata>, value: any[], of?: TAtscriptAnnotatedType): boolean;
120
184
  protected validateObject(def: TAtscriptAnnotatedType<TAtscriptTypeObject>, value: any): boolean;
121
185
  protected validatePrimitive(def: TAtscriptAnnotatedType<TAtscriptTypeFinal>, value: any): boolean;
122
186
  protected validateString(def: TAtscriptAnnotatedType<TAtscriptTypeFinal>, value: string): boolean;
123
187
  /** `@meta.required` / `@expect.minLength` / `maxLength` / `pattern` checks for a string value. */
124
- protected validateStringConstraints(metadata: TMetadataMap<AtscriptMetadata>, value: string): boolean;
188
+ protected validateStringConstraints(meta: TMetadataMap<AtscriptMetadata>, value: string): boolean;
125
189
  protected validateNumber(def: TAtscriptAnnotatedType<TAtscriptTypeFinal>, value: number): boolean;
126
190
  /** `@expect.int` / `min` / `max` / `exclusiveMin` / `exclusiveMax` checks for a number value. */
127
- protected validateNumberConstraints(metadata: TMetadataMap<AtscriptMetadata>, value: number): boolean;
191
+ protected validateNumberConstraints(meta: TMetadataMap<AtscriptMetadata>, value: number): boolean;
128
192
  /** Reports a failed number bound: its custom message, else `Expected <label> <bound>, got <value>`. */
129
193
  private numberBoundFailed;
130
194
  protected validateBoolean(def: TAtscriptAnnotatedType<TAtscriptTypeFinal>, value: boolean): boolean;
131
195
  /** `@meta.required` check for a boolean value (must be `true`). */
132
- protected validateBooleanConstraints(metadata: TMetadataMap<AtscriptMetadata>, value: boolean): boolean;
196
+ protected validateBooleanConstraints(meta: TMetadataMap<AtscriptMetadata>, value: boolean): boolean;
133
197
  }
134
198
  /** Error thrown by {@link Validator.validate} when validation fails. Contains structured error details. */
135
199
  /** Type definition for union, intersection, or tuple types. */
@@ -1377,8 +1441,8 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1377
1441
  path: string;
1378
1442
  message: string;
1379
1443
  }[]) => any) | undefined;
1380
- onAction?: ((name: string, data: TFormData) => any) | undefined;
1381
1444
  onSubmit?: ((data: TFormData) => any) | undefined;
1445
+ onAction?: ((name: string, data: TFormData) => any) | undefined;
1382
1446
  "onUnsupported-action"?: ((name: string, data: TFormData) => any) | undefined;
1383
1447
  onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TFormData) => any) | undefined;
1384
1448
  }> & (typeof globalThis extends {
package/dist/index.d.cts CHANGED
@@ -20,5 +20,5 @@ import { t as _default$13 } from "./as-number.vue-DE33Giq3.cjs";
20
20
  import { t as _default$4 } from "./as-date.vue-BiUgcOwZ.cjs";
21
21
  import { t as _default$5 } from "./as-datetime.vue-BVc6jcUI.cjs";
22
22
  import { t as _default$19 } from "./as-time.vue-CmvsgHJd.cjs";
23
- import { $ as AsNestedSectionsStore, A as UseAsDecimalOptions, At as TFormFieldCallbacks, B as UseAsOptionalAddFlowReturn, C as useAsDate, Ct as useAsFormPatch, D as UseAsNumberOptions, Dt as UseAsFieldOptions, E as useAsDualInput, Et as useAsState, F as useAsLocale, Ft as createAsFormDef, G as useAsVisibleFields, H as focusFirstAfter, I as UseAsTriStateCheckboxOptions, J as TResolveFieldPropOptions, K as UseAsOptionalFieldReturn, L as UseAsTriStateCheckboxReturn, M as useAsDecimal, Mt as TFormRule, N as UseAsLocaleReturn, Nt as TFormState, O as UseAsNumberReturn, Ot as UseAsFieldReturn, P as provideAsLocale, Pt as createDefaultTypes, Q as useAsLevel, R as useAsTriStateCheckbox, S as UseAsDateReturn, St as RebaseOntoResult, T as UseAsDualInputReturn, Tt as UseAsStateReturn, U as focusNewFocusableAfter, V as useAsOptionalAddFlow, W as useAsFocusFirstAfter, X as useAsFieldScope, Y as UseAsFieldScopeReturn, Z as provideAsNestedLevel, _ as UseAsTypeMapReturn, _t as useAsExternalErrors, a as FormFieldChange, at as UseAsValueHelpReturn, b as useAsPath, bt as useAsForm, c as hasFieldMeta, ct as useAsUnionVariant, d as resetDefaultClientFactory, dt as UseAsTupleReturn, et as provideAsNestedSectionsStore, f as setDefaultClientFactory, ft as useAsTuple, g as useAsData, gt as UseAsExternalErrorsReturn, h as UseAsDataReturn, ht as UseAsExternalErrorsOptions, i as FormDiffOptions, it as UseAsValueHelpOptions, j as UseAsDecimalReturn, jt as TFormFieldRegistration, k as useAsNumber, kt as useAsField, l as isFieldHidden, lt as UseAsUnionReturn, m as useAsErrorDismiss, mt as useAsArray, n as _default$9, nt as useAsNestedSectionsStore, o as FormRebaseOptions, ot as useAsValueHelp, p as AsErrorDismiss, pt as UseAsArrayReturn, q as useAsOptionalField, r as ClientFactory, rt as useAsDropdown, s as getDefaultClientFactory, st as formatIndexedLabelParts, tt as useAsDescendantErrorCounts, u as joinPath, ut as useAsUnion, v as useAsTypeMap, vt as UseAsFormOptions, w as UseAsDualInputOptions, wt as TFormSubmitValidator, x as UseAsDateOptions, xt as AsFormPatchHandle, y as UseAsPathReturn, yt as UseAsFormReturn, z as UseAsOptionalAddFlowOptions } from "./as-form.vue-DlM0HiAT.cjs";
23
+ import { $ as AsNestedSectionsStore, A as UseAsDecimalOptions, At as TFormFieldCallbacks, B as UseAsOptionalAddFlowReturn, C as useAsDate, Ct as useAsFormPatch, D as UseAsNumberOptions, Dt as UseAsFieldOptions, E as useAsDualInput, Et as useAsState, F as useAsLocale, Ft as createAsFormDef, G as useAsVisibleFields, H as focusFirstAfter, I as UseAsTriStateCheckboxOptions, J as TResolveFieldPropOptions, K as UseAsOptionalFieldReturn, L as UseAsTriStateCheckboxReturn, M as useAsDecimal, Mt as TFormRule, N as UseAsLocaleReturn, Nt as TFormState, O as UseAsNumberReturn, Ot as UseAsFieldReturn, P as provideAsLocale, Pt as createDefaultTypes, Q as useAsLevel, R as useAsTriStateCheckbox, S as UseAsDateReturn, St as RebaseOntoResult, T as UseAsDualInputReturn, Tt as UseAsStateReturn, U as focusNewFocusableAfter, V as useAsOptionalAddFlow, W as useAsFocusFirstAfter, X as useAsFieldScope, Y as UseAsFieldScopeReturn, Z as provideAsNestedLevel, _ as UseAsTypeMapReturn, _t as useAsExternalErrors, a as FormFieldChange, at as UseAsValueHelpReturn, b as useAsPath, bt as useAsForm, c as hasFieldMeta, ct as useAsUnionVariant, d as resetDefaultClientFactory, dt as UseAsTupleReturn, et as provideAsNestedSectionsStore, f as setDefaultClientFactory, ft as useAsTuple, g as useAsData, gt as UseAsExternalErrorsReturn, h as UseAsDataReturn, ht as UseAsExternalErrorsOptions, i as FormDiffOptions, it as UseAsValueHelpOptions, j as UseAsDecimalReturn, jt as TFormFieldRegistration, k as useAsNumber, kt as useAsField, l as isFieldHidden, lt as UseAsUnionReturn, m as useAsErrorDismiss, mt as useAsArray, n as _default$9, nt as useAsNestedSectionsStore, o as FormRebaseOptions, ot as useAsValueHelp, p as AsErrorDismiss, pt as UseAsArrayReturn, q as useAsOptionalField, r as ClientFactory, rt as useAsDropdown, s as getDefaultClientFactory, st as formatIndexedLabelParts, tt as useAsDescendantErrorCounts, u as joinPath, ut as useAsUnion, v as useAsTypeMap, vt as UseAsFormOptions, w as UseAsDualInputOptions, wt as TFormSubmitValidator, x as UseAsDateOptions, xt as AsFormPatchHandle, y as UseAsPathReturn, yt as UseAsFormReturn, z as UseAsOptionalAddFlowOptions } from "./as-form.vue-BmW2ap6p.cjs";
24
24
  export { _default as AsAction, _default$1 as AsArray, _default$2 as AsCheckbox, _default$3 as AsCollapsible, _default$4 as AsDate, _default$5 as AsDatetime, _default$6 as AsDecimal, AsErrorDismiss, _default$7 as AsField, _default$8 as AsFieldShell, _default$9 as AsForm, AsFormPatchHandle, _default$10 as AsInput, _default$11 as AsIterator, _default$12 as AsMultiSelect, AsNestedSectionsStore, _default$13 as AsNumber, _default$14 as AsObject, _default$15 as AsParagraph, _default$16 as AsRadio, _default$17 as AsRef, _default$18 as AsSelect, _default$19 as AsTime, _default$20 as AsTuple, _default$21 as AsUnion, ClientFactory, FormDiffOptions, FormFieldChange, FormRebaseOptions, RebaseOntoResult, TAsBaseComponentProps, TAsChangeType, TAsCollapsibleProps, TAsCollapsibleSlots, TAsComponentEmits, TAsComponentProps, TAsTypeComponents, TAsUnionContext, TFormFieldCallbacks, TFormFieldRegistration, TFormRule, TFormState, TFormSubmitValidator, TResolveFieldPropOptions, UseAsArrayReturn, UseAsDataReturn, UseAsDateOptions, UseAsDateReturn, UseAsDecimalOptions, UseAsDecimalReturn, UseAsDualInputOptions, UseAsDualInputReturn, UseAsExternalErrorsOptions, UseAsExternalErrorsReturn, UseAsFieldOptions, UseAsFieldReturn, UseAsFieldScopeReturn, UseAsFormOptions, UseAsFormReturn, UseAsLocaleReturn, UseAsNumberOptions, UseAsNumberReturn, UseAsOptionalAddFlowOptions, UseAsOptionalAddFlowReturn, UseAsOptionalFieldReturn, UseAsPathReturn, UseAsStateReturn, UseAsTriStateCheckboxOptions, UseAsTriStateCheckboxReturn, UseAsTupleReturn, UseAsTypeMapReturn, UseAsUnionReturn, UseAsValueHelpOptions, UseAsValueHelpReturn, createAsFormDef, createDefaultTypes, focusFirstAfter, focusNewFocusableAfter, formatIndexedLabelParts, getDefaultClientFactory, hasFieldMeta, isFieldHidden, joinPath, provideAsLocale, provideAsNestedLevel, provideAsNestedSectionsStore, resetDefaultClientFactory, setDefaultClientFactory, useAsArray, useAsData, useAsDate, useAsDecimal, useAsDescendantErrorCounts, useAsDropdown, useAsDualInput, useAsErrorDismiss, useAsExternalErrors, useAsField, useAsFieldScope, useAsFocusFirstAfter, useAsForm, useAsFormPatch, useAsLevel, useAsLocale, useAsNestedSectionsStore, useAsNumber, useAsOptionalAddFlow, useAsOptionalField, useAsPath, useAsState, useAsTriStateCheckbox, useAsTuple, useAsTypeMap, useAsUnion, useAsUnionVariant, useAsValueHelp, useAsVisibleFields };
package/dist/index.d.mts CHANGED
@@ -20,5 +20,5 @@ import { t as _default$13 } from "./as-number.vue-BiZ2B2iJ.mjs";
20
20
  import { t as _default$4 } from "./as-date.vue-BVvALvZ_.mjs";
21
21
  import { t as _default$5 } from "./as-datetime.vue-CCQqZsKA.mjs";
22
22
  import { t as _default$19 } from "./as-time.vue-DGfZPnWK.mjs";
23
- import { $ as AsNestedSectionsStore, A as UseAsDecimalOptions, At as TFormFieldCallbacks, B as UseAsOptionalAddFlowReturn, C as useAsDate, Ct as useAsFormPatch, D as UseAsNumberOptions, Dt as UseAsFieldOptions, E as useAsDualInput, Et as useAsState, F as useAsLocale, Ft as createAsFormDef, G as useAsVisibleFields, H as focusFirstAfter, I as UseAsTriStateCheckboxOptions, J as TResolveFieldPropOptions, K as UseAsOptionalFieldReturn, L as UseAsTriStateCheckboxReturn, M as useAsDecimal, Mt as TFormRule, N as UseAsLocaleReturn, Nt as TFormState, O as UseAsNumberReturn, Ot as UseAsFieldReturn, P as provideAsLocale, Pt as createDefaultTypes, Q as useAsLevel, R as useAsTriStateCheckbox, S as UseAsDateReturn, St as RebaseOntoResult, T as UseAsDualInputReturn, Tt as UseAsStateReturn, U as focusNewFocusableAfter, V as useAsOptionalAddFlow, W as useAsFocusFirstAfter, X as useAsFieldScope, Y as UseAsFieldScopeReturn, Z as provideAsNestedLevel, _ as UseAsTypeMapReturn, _t as useAsExternalErrors, a as FormFieldChange, at as UseAsValueHelpReturn, b as useAsPath, bt as useAsForm, c as hasFieldMeta, ct as useAsUnionVariant, d as resetDefaultClientFactory, dt as UseAsTupleReturn, et as provideAsNestedSectionsStore, f as setDefaultClientFactory, ft as useAsTuple, g as useAsData, gt as UseAsExternalErrorsReturn, h as UseAsDataReturn, ht as UseAsExternalErrorsOptions, i as FormDiffOptions, it as UseAsValueHelpOptions, j as UseAsDecimalReturn, jt as TFormFieldRegistration, k as useAsNumber, kt as useAsField, l as isFieldHidden, lt as UseAsUnionReturn, m as useAsErrorDismiss, mt as useAsArray, n as _default$9, nt as useAsNestedSectionsStore, o as FormRebaseOptions, ot as useAsValueHelp, p as AsErrorDismiss, pt as UseAsArrayReturn, q as useAsOptionalField, r as ClientFactory, rt as useAsDropdown, s as getDefaultClientFactory, st as formatIndexedLabelParts, tt as useAsDescendantErrorCounts, u as joinPath, ut as useAsUnion, v as useAsTypeMap, vt as UseAsFormOptions, w as UseAsDualInputOptions, wt as TFormSubmitValidator, x as UseAsDateOptions, xt as AsFormPatchHandle, y as UseAsPathReturn, yt as UseAsFormReturn, z as UseAsOptionalAddFlowOptions } from "./as-form.vue-B52d8Ocv.mjs";
23
+ import { $ as AsNestedSectionsStore, A as UseAsDecimalOptions, At as TFormFieldCallbacks, B as UseAsOptionalAddFlowReturn, C as useAsDate, Ct as useAsFormPatch, D as UseAsNumberOptions, Dt as UseAsFieldOptions, E as useAsDualInput, Et as useAsState, F as useAsLocale, Ft as createAsFormDef, G as useAsVisibleFields, H as focusFirstAfter, I as UseAsTriStateCheckboxOptions, J as TResolveFieldPropOptions, K as UseAsOptionalFieldReturn, L as UseAsTriStateCheckboxReturn, M as useAsDecimal, Mt as TFormRule, N as UseAsLocaleReturn, Nt as TFormState, O as UseAsNumberReturn, Ot as UseAsFieldReturn, P as provideAsLocale, Pt as createDefaultTypes, Q as useAsLevel, R as useAsTriStateCheckbox, S as UseAsDateReturn, St as RebaseOntoResult, T as UseAsDualInputReturn, Tt as UseAsStateReturn, U as focusNewFocusableAfter, V as useAsOptionalAddFlow, W as useAsFocusFirstAfter, X as useAsFieldScope, Y as UseAsFieldScopeReturn, Z as provideAsNestedLevel, _ as UseAsTypeMapReturn, _t as useAsExternalErrors, a as FormFieldChange, at as UseAsValueHelpReturn, b as useAsPath, bt as useAsForm, c as hasFieldMeta, ct as useAsUnionVariant, d as resetDefaultClientFactory, dt as UseAsTupleReturn, et as provideAsNestedSectionsStore, f as setDefaultClientFactory, ft as useAsTuple, g as useAsData, gt as UseAsExternalErrorsReturn, h as UseAsDataReturn, ht as UseAsExternalErrorsOptions, i as FormDiffOptions, it as UseAsValueHelpOptions, j as UseAsDecimalReturn, jt as TFormFieldRegistration, k as useAsNumber, kt as useAsField, l as isFieldHidden, lt as UseAsUnionReturn, m as useAsErrorDismiss, mt as useAsArray, n as _default$9, nt as useAsNestedSectionsStore, o as FormRebaseOptions, ot as useAsValueHelp, p as AsErrorDismiss, pt as UseAsArrayReturn, q as useAsOptionalField, r as ClientFactory, rt as useAsDropdown, s as getDefaultClientFactory, st as formatIndexedLabelParts, tt as useAsDescendantErrorCounts, u as joinPath, ut as useAsUnion, v as useAsTypeMap, vt as UseAsFormOptions, w as UseAsDualInputOptions, wt as TFormSubmitValidator, x as UseAsDateOptions, xt as AsFormPatchHandle, y as UseAsPathReturn, yt as UseAsFormReturn, z as UseAsOptionalAddFlowOptions } from "./as-form.vue-Dz7Ue2jh.mjs";
24
24
  export { _default as AsAction, _default$1 as AsArray, _default$2 as AsCheckbox, _default$3 as AsCollapsible, _default$4 as AsDate, _default$5 as AsDatetime, _default$6 as AsDecimal, AsErrorDismiss, _default$7 as AsField, _default$8 as AsFieldShell, _default$9 as AsForm, AsFormPatchHandle, _default$10 as AsInput, _default$11 as AsIterator, _default$12 as AsMultiSelect, AsNestedSectionsStore, _default$13 as AsNumber, _default$14 as AsObject, _default$15 as AsParagraph, _default$16 as AsRadio, _default$17 as AsRef, _default$18 as AsSelect, _default$19 as AsTime, _default$20 as AsTuple, _default$21 as AsUnion, ClientFactory, FormDiffOptions, FormFieldChange, FormRebaseOptions, RebaseOntoResult, TAsBaseComponentProps, TAsChangeType, TAsCollapsibleProps, TAsCollapsibleSlots, TAsComponentEmits, TAsComponentProps, TAsTypeComponents, TAsUnionContext, TFormFieldCallbacks, TFormFieldRegistration, TFormRule, TFormState, TFormSubmitValidator, TResolveFieldPropOptions, UseAsArrayReturn, UseAsDataReturn, UseAsDateOptions, UseAsDateReturn, UseAsDecimalOptions, UseAsDecimalReturn, UseAsDualInputOptions, UseAsDualInputReturn, UseAsExternalErrorsOptions, UseAsExternalErrorsReturn, UseAsFieldOptions, UseAsFieldReturn, UseAsFieldScopeReturn, UseAsFormOptions, UseAsFormReturn, UseAsLocaleReturn, UseAsNumberOptions, UseAsNumberReturn, UseAsOptionalAddFlowOptions, UseAsOptionalAddFlowReturn, UseAsOptionalFieldReturn, UseAsPathReturn, UseAsStateReturn, UseAsTriStateCheckboxOptions, UseAsTriStateCheckboxReturn, UseAsTupleReturn, UseAsTypeMapReturn, UseAsUnionReturn, UseAsValueHelpOptions, UseAsValueHelpReturn, createAsFormDef, createDefaultTypes, focusFirstAfter, focusNewFocusableAfter, formatIndexedLabelParts, getDefaultClientFactory, hasFieldMeta, isFieldHidden, joinPath, provideAsLocale, provideAsNestedLevel, provideAsNestedSectionsStore, resetDefaultClientFactory, setDefaultClientFactory, useAsArray, useAsData, useAsDate, useAsDecimal, useAsDescendantErrorCounts, useAsDropdown, useAsDualInput, useAsErrorDismiss, useAsExternalErrors, useAsField, useAsFieldScope, useAsFocusFirstAfter, useAsForm, useAsFormPatch, useAsLevel, useAsLocale, useAsNestedSectionsStore, useAsNumber, useAsOptionalAddFlow, useAsOptionalField, useAsPath, useAsState, useAsTriStateCheckbox, useAsTuple, useAsTypeMap, useAsUnion, useAsUnionVariant, useAsValueHelp, useAsVisibleFields };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/vue-form",
3
- "version": "0.1.160",
3
+ "version": "0.1.161",
4
4
  "description": "Type-driven form rendering for Atscript with Vue 3",
5
5
  "keywords": [
6
6
  "atscript",
@@ -160,29 +160,29 @@
160
160
  "access": "public"
161
161
  },
162
162
  "dependencies": {
163
- "@atscript/ui": "^0.1.160"
163
+ "@atscript/ui": "^0.1.161"
164
164
  },
165
165
  "devDependencies": {
166
- "@atscript/core": "^0.1.109",
167
- "@atscript/db-client": "^0.1.164",
168
- "@atscript/typescript": "^0.1.109",
166
+ "@atscript/core": "^0.2.1",
167
+ "@atscript/db-client": "^0.1.165",
168
+ "@atscript/typescript": "^0.2.1",
169
169
  "@tsdown/css": "^0.21.4",
170
170
  "@vitejs/plugin-vue": "^6",
171
171
  "@vue/test-utils": "^2",
172
172
  "happy-dom": "^18",
173
173
  "reka-ui": "^2.9.8",
174
- "unplugin-atscript": "^0.1.109",
174
+ "unplugin-atscript": "^0.2.1",
175
175
  "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
176
176
  "vue": "^3",
177
177
  "vue-tsc": "~3.2.9",
178
178
  "vunor": "^0.3.2",
179
- "@atscript/ui-fns": "^0.1.160"
179
+ "@atscript/ui-fns": "^0.1.161"
180
180
  },
181
181
  "peerDependencies": {
182
- "@atscript/db-client": "^0.1.164",
182
+ "@atscript/db-client": "^0.1.165",
183
183
  "reka-ui": "^2.9.8",
184
184
  "vue": "^3",
185
- "@atscript/ui-fns": "^0.1.160"
185
+ "@atscript/ui-fns": "^0.1.161"
186
186
  },
187
187
  "scripts": {
188
188
  "build": "node ../../scripts/gen-exports.mjs && vp pack",