@atscript/vue-form 0.1.150 → 0.1.151
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/{as-array-BKkhYwuZ.mjs → as-array-DCDWM-j2.mjs} +5 -1
- package/dist/{as-array-B0izQqIU.cjs → as-array-DzQ4o2My.cjs} +5 -1
- package/dist/as-array.cjs +1 -1
- package/dist/as-array.mjs +1 -1
- package/dist/{as-form-eAmkv5B8.cjs → as-form-CAWAyI3M.cjs} +57 -21
- package/dist/{as-form-MHdHR3KR.mjs → as-form-DIn-szcN.mjs} +59 -23
- package/dist/as-form.cjs +1 -1
- package/dist/as-form.d.cts +1 -1
- package/dist/as-form.d.mts +1 -1
- package/dist/as-form.mjs +1 -1
- package/dist/{as-form.vue-qd-_UubI.d.mts → as-form.vue-C-gDmdSX.d.mts} +9 -2
- package/dist/{as-form.vue-BtnsGNZp.d.cts → as-form.vue-CaQkPbVL.d.cts} +9 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +9 -9
|
@@ -355,6 +355,10 @@ var as_array_default = /* @__PURE__ */ defineComponent({
|
|
|
355
355
|
function fieldFor(idx) {
|
|
356
356
|
return getItemField(idx, singular);
|
|
357
357
|
}
|
|
358
|
+
const removers = [];
|
|
359
|
+
function removerFor(idx) {
|
|
360
|
+
return removers[idx] ??= () => removeItem(idx);
|
|
361
|
+
}
|
|
358
362
|
function handleAdd(variantIndex = 0) {
|
|
359
363
|
collapsibleRef.value?.runAndFocusNew(composeAction(() => addItem(variantIndex)), 1);
|
|
360
364
|
}
|
|
@@ -404,7 +408,7 @@ var as_array_default = /* @__PURE__ */ defineComponent({
|
|
|
404
408
|
key: unref(itemKeys)[idx],
|
|
405
409
|
field: fieldFor(idx),
|
|
406
410
|
"array-index": idx,
|
|
407
|
-
"on-remove": (
|
|
411
|
+
"on-remove": removerFor(idx),
|
|
408
412
|
"can-remove": unref(canRemove)
|
|
409
413
|
}, null, 8, [
|
|
410
414
|
"field",
|
|
@@ -355,6 +355,10 @@ var as_array_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
355
355
|
function fieldFor(idx) {
|
|
356
356
|
return getItemField(idx, singular);
|
|
357
357
|
}
|
|
358
|
+
const removers = [];
|
|
359
|
+
function removerFor(idx) {
|
|
360
|
+
return removers[idx] ??= () => removeItem(idx);
|
|
361
|
+
}
|
|
358
362
|
function handleAdd(variantIndex = 0) {
|
|
359
363
|
collapsibleRef.value?.runAndFocusNew(composeAction(() => addItem(variantIndex)), 1);
|
|
360
364
|
}
|
|
@@ -404,7 +408,7 @@ var as_array_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
404
408
|
key: (0, vue.unref)(itemKeys)[idx],
|
|
405
409
|
field: fieldFor(idx),
|
|
406
410
|
"array-index": idx,
|
|
407
|
-
"on-remove": (
|
|
411
|
+
"on-remove": removerFor(idx),
|
|
408
412
|
"can-remove": (0, vue.unref)(canRemove)
|
|
409
413
|
}, null, 8, [
|
|
410
414
|
"field",
|
package/dist/as-array.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_array = require("./as-array-
|
|
1
|
+
const require_as_array = require("./as-array-DzQ4o2My.cjs");
|
|
2
2
|
module.exports = require_as_array.as_array_default;
|
package/dist/as-array.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_array_default } from "./as-array-
|
|
1
|
+
import { t as as_array_default } from "./as-array-DCDWM-j2.mjs";
|
|
2
2
|
export { as_array_default as default };
|
|
@@ -24,20 +24,17 @@ let _atscript_ui = require("@atscript/ui");
|
|
|
24
24
|
* edits and the diff would always come back empty.
|
|
25
25
|
*
|
|
26
26
|
* Reactivity: a single revert-aware `diff` computed drives `isDirty` /
|
|
27
|
-
* `changes`.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* `
|
|
38
|
-
* baseline nor this watcher is ever created. It recomputes only when the live
|
|
39
|
-
* data (`dataRev`) or the baseline (`baselineRev`) changes, and Vue caches the
|
|
40
|
-
* result between reads.
|
|
27
|
+
* `changes`. It subscribes to EVERY leaf of the live data (one tracking walk,
|
|
28
|
+
* like a deep watch, but synchronous and only when read) — so any leaf
|
|
29
|
+
* mutation re-evaluates it, including the leaves of a freshly-inserted keyed
|
|
30
|
+
* row that `buildFormDiff` pushes by reference without reading — and then
|
|
31
|
+
* diffs the RAW data, so the diff walk itself pays no proxy overhead. The
|
|
32
|
+
* change list still carries the live reactive `after` references. OFF stays
|
|
33
|
+
* zero-cost: `createAsFormPatch` is never called when tracking is disabled.
|
|
34
|
+
* It recomputes only when the live data or the baseline (`baselineRev`)
|
|
35
|
+
* changes, and Vue caches the result between reads. The dirty-path closure
|
|
36
|
+
* keeps its identity while its membership is unchanged, so per-field
|
|
37
|
+
* `isDirty` computeds re-run only when a field actually flips.
|
|
41
38
|
*
|
|
42
39
|
* @param def getter for the form's `FormDef`
|
|
43
40
|
* @param getData getter for the WRAPPED form-data container `{ value }`. Before
|
|
@@ -57,7 +54,6 @@ let _atscript_ui = require("@atscript/ui");
|
|
|
57
54
|
function createAsFormPatch(def, getData, onRebased) {
|
|
58
55
|
let baseline;
|
|
59
56
|
const baselineRev = (0, vue.ref)(0);
|
|
60
|
-
const dataRev = (0, vue.ref)(0);
|
|
61
57
|
/**
|
|
62
58
|
* Deep-clones the current wrapped container, or returns `undefined` when no
|
|
63
59
|
* real domain data exists yet. "No data yet" = the container has no `value`
|
|
@@ -85,23 +81,30 @@ function createAsFormPatch(def, getData, onRebased) {
|
|
|
85
81
|
if (prev !== void 0 && (0, _atscript_ui.buildFormDiff)(def(), baseline, { value: prev }).isDirty) return;
|
|
86
82
|
capture();
|
|
87
83
|
}, { flush: "sync" });
|
|
88
|
-
(0, vue.watch)(() => getData(), () => dataRev.value++, { deep: true });
|
|
89
84
|
const diff = (0, vue.computed)(() => {
|
|
90
|
-
dataRev.value;
|
|
91
85
|
baselineRev.value;
|
|
92
86
|
if (baseline === void 0) return {
|
|
93
87
|
isDirty: false,
|
|
94
88
|
changes: []
|
|
95
89
|
};
|
|
96
|
-
const
|
|
90
|
+
const data = getData();
|
|
91
|
+
trackDeep(data);
|
|
92
|
+
const result = (0, _atscript_ui.buildFormDiff)(def(), baseline, rawContainer(data));
|
|
93
|
+
const changes = result.changes.length === 0 ? result.changes : result.changes.map((change) => ({
|
|
94
|
+
...change,
|
|
95
|
+
after: (0, _atscript_ui.getByPath)(data, change.path)
|
|
96
|
+
}));
|
|
97
97
|
return {
|
|
98
98
|
isDirty: result.isDirty,
|
|
99
|
-
changes
|
|
99
|
+
changes
|
|
100
100
|
};
|
|
101
101
|
});
|
|
102
102
|
const isDirty = (0, vue.computed)(() => diff.value.isDirty);
|
|
103
103
|
const changes = (0, vue.computed)(() => diff.value.changes);
|
|
104
|
-
const dirtyPaths = (0, vue.computed)(() =>
|
|
104
|
+
const dirtyPaths = (0, vue.computed)((prev) => {
|
|
105
|
+
const next = (0, _atscript_ui.collectDirtyPaths)(changes.value);
|
|
106
|
+
return prev !== void 0 && sameMembers(prev, next) ? prev : next;
|
|
107
|
+
});
|
|
105
108
|
function getPatch(opts) {
|
|
106
109
|
if (baseline === void 0) return {};
|
|
107
110
|
const frozen = (0, _atscript_ui.deepClone)(getData(), vue.toRaw);
|
|
@@ -157,6 +160,39 @@ function createAsFormPatch(def, getData, onRebased) {
|
|
|
157
160
|
rebaseOnto
|
|
158
161
|
};
|
|
159
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Subscribes the running effect to every leaf reachable from `value` — the
|
|
165
|
+
* walk Vue's deep watch performs (refs, arrays, Map/Set, plain objects;
|
|
166
|
+
* `markRaw` values skipped).
|
|
167
|
+
*/
|
|
168
|
+
function trackDeep(value, seen = /* @__PURE__ */ new Set()) {
|
|
169
|
+
if (typeof value !== "object" || value === null || seen.has(value)) return;
|
|
170
|
+
if (value.__v_skip) return;
|
|
171
|
+
seen.add(value);
|
|
172
|
+
if ((0, vue.isRef)(value)) trackDeep(value.value, seen);
|
|
173
|
+
else if (Array.isArray(value)) for (let i = 0; i < value.length; i++) trackDeep(value[i], seen);
|
|
174
|
+
else if (value instanceof Set || value instanceof Map) value.forEach((v) => trackDeep(v, seen));
|
|
175
|
+
else if (isPlainObjectLike(value)) {
|
|
176
|
+
for (const key in value) trackDeep(value[key], seen);
|
|
177
|
+
for (const key of Object.getOwnPropertySymbols(value)) if (Object.prototype.propertyIsEnumerable.call(value, key)) trackDeep(value[key], seen);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function isPlainObjectLike(value) {
|
|
181
|
+
return Object.prototype.toString.call(value) === "[object Object]";
|
|
182
|
+
}
|
|
183
|
+
/** The wrapped container with its domain value de-proxied. */
|
|
184
|
+
function rawContainer(data) {
|
|
185
|
+
const raw = (0, vue.toRaw)(data);
|
|
186
|
+
return (0, vue.isProxy)(raw.value) ? {
|
|
187
|
+
...raw,
|
|
188
|
+
value: (0, vue.toRaw)(raw.value)
|
|
189
|
+
} : raw;
|
|
190
|
+
}
|
|
191
|
+
function sameMembers(a, b) {
|
|
192
|
+
if (a.size !== b.size) return false;
|
|
193
|
+
for (const k of a) if (!b.has(k)) return false;
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
160
196
|
const NOT_TRACKING_MSG = "useAsFormPatch(): change tracking is not enabled on this form. Pass `track-changes` to <AsForm> (or `trackChanges: true` to useAsForm).";
|
|
161
197
|
/**
|
|
162
198
|
* Reactive read-only access to the form's change-tracking handle from any
|
|
@@ -375,7 +411,7 @@ function useAsForm(options) {
|
|
|
375
411
|
formContext,
|
|
376
412
|
firstValidation: (0, vue.computed)(() => options.firstValidation?.()),
|
|
377
413
|
submitValidator: () => formValidator.value({
|
|
378
|
-
data:
|
|
414
|
+
data: domainData(),
|
|
379
415
|
context: formContext.value ?? {}
|
|
380
416
|
})
|
|
381
417
|
});
|
|
@@ -3,8 +3,8 @@ import { i as useAsNestedSectionsStore, n as provideAsNestedSectionsStore, t as
|
|
|
3
3
|
import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-C_utk6AR.mjs";
|
|
4
4
|
import { t as as_field_default } from "./as-field-DVC3N3Aj.mjs";
|
|
5
5
|
import { t as as_iterator_default } from "./as-iterator-reJaf7uT.mjs";
|
|
6
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, nextTick, normalizeProps, openBlock, provide, reactive, ref, renderSlot, shallowRef, toDisplayString, toRaw, toValue, unref, watch, watchEffect, withModifiers } from "vue";
|
|
7
|
-
import { META_DESCRIPTION, META_LABEL, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_SUBMIT_TEXT, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, collectDirtyPaths, deepClone, getDeclaredFormActions, getFormValidator, iteratePathAncestors, mergeErrorMaps, omitPaths, resolveFormProp, setByPath, unionVariantChanged } from "@atscript/ui";
|
|
6
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, isProxy, isRef, mergeProps, nextTick, normalizeProps, openBlock, provide, reactive, ref, renderSlot, shallowRef, toDisplayString, toRaw, toValue, unref, watch, watchEffect, withModifiers } from "vue";
|
|
7
|
+
import { META_DESCRIPTION, META_LABEL, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_SUBMIT_TEXT, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, collectDirtyPaths, deepClone, getByPath, getDeclaredFormActions, getFormValidator, iteratePathAncestors, mergeErrorMaps, omitPaths, resolveFormProp, setByPath, unionVariantChanged } from "@atscript/ui";
|
|
8
8
|
//#region src/composables/use-as-form-patch.ts
|
|
9
9
|
/**
|
|
10
10
|
* Internal factory invoked by `useAsForm` when `trackChanges` is enabled. Owns
|
|
@@ -24,20 +24,17 @@ import { META_DESCRIPTION, META_LABEL, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_SUBMIT
|
|
|
24
24
|
* edits and the diff would always come back empty.
|
|
25
25
|
*
|
|
26
26
|
* Reactivity: a single revert-aware `diff` computed drives `isDirty` /
|
|
27
|
-
* `changes`.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* `
|
|
38
|
-
* baseline nor this watcher is ever created. It recomputes only when the live
|
|
39
|
-
* data (`dataRev`) or the baseline (`baselineRev`) changes, and Vue caches the
|
|
40
|
-
* result between reads.
|
|
27
|
+
* `changes`. It subscribes to EVERY leaf of the live data (one tracking walk,
|
|
28
|
+
* like a deep watch, but synchronous and only when read) — so any leaf
|
|
29
|
+
* mutation re-evaluates it, including the leaves of a freshly-inserted keyed
|
|
30
|
+
* row that `buildFormDiff` pushes by reference without reading — and then
|
|
31
|
+
* diffs the RAW data, so the diff walk itself pays no proxy overhead. The
|
|
32
|
+
* change list still carries the live reactive `after` references. OFF stays
|
|
33
|
+
* zero-cost: `createAsFormPatch` is never called when tracking is disabled.
|
|
34
|
+
* It recomputes only when the live data or the baseline (`baselineRev`)
|
|
35
|
+
* changes, and Vue caches the result between reads. The dirty-path closure
|
|
36
|
+
* keeps its identity while its membership is unchanged, so per-field
|
|
37
|
+
* `isDirty` computeds re-run only when a field actually flips.
|
|
41
38
|
*
|
|
42
39
|
* @param def getter for the form's `FormDef`
|
|
43
40
|
* @param getData getter for the WRAPPED form-data container `{ value }`. Before
|
|
@@ -57,7 +54,6 @@ import { META_DESCRIPTION, META_LABEL, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_SUBMIT
|
|
|
57
54
|
function createAsFormPatch(def, getData, onRebased) {
|
|
58
55
|
let baseline;
|
|
59
56
|
const baselineRev = ref(0);
|
|
60
|
-
const dataRev = ref(0);
|
|
61
57
|
/**
|
|
62
58
|
* Deep-clones the current wrapped container, or returns `undefined` when no
|
|
63
59
|
* real domain data exists yet. "No data yet" = the container has no `value`
|
|
@@ -85,23 +81,30 @@ function createAsFormPatch(def, getData, onRebased) {
|
|
|
85
81
|
if (prev !== void 0 && buildFormDiff(def(), baseline, { value: prev }).isDirty) return;
|
|
86
82
|
capture();
|
|
87
83
|
}, { flush: "sync" });
|
|
88
|
-
watch(() => getData(), () => dataRev.value++, { deep: true });
|
|
89
84
|
const diff = computed(() => {
|
|
90
|
-
dataRev.value;
|
|
91
85
|
baselineRev.value;
|
|
92
86
|
if (baseline === void 0) return {
|
|
93
87
|
isDirty: false,
|
|
94
88
|
changes: []
|
|
95
89
|
};
|
|
96
|
-
const
|
|
90
|
+
const data = getData();
|
|
91
|
+
trackDeep(data);
|
|
92
|
+
const result = buildFormDiff(def(), baseline, rawContainer(data));
|
|
93
|
+
const changes = result.changes.length === 0 ? result.changes : result.changes.map((change) => ({
|
|
94
|
+
...change,
|
|
95
|
+
after: getByPath(data, change.path)
|
|
96
|
+
}));
|
|
97
97
|
return {
|
|
98
98
|
isDirty: result.isDirty,
|
|
99
|
-
changes
|
|
99
|
+
changes
|
|
100
100
|
};
|
|
101
101
|
});
|
|
102
102
|
const isDirty = computed(() => diff.value.isDirty);
|
|
103
103
|
const changes = computed(() => diff.value.changes);
|
|
104
|
-
const dirtyPaths = computed(() =>
|
|
104
|
+
const dirtyPaths = computed((prev) => {
|
|
105
|
+
const next = collectDirtyPaths(changes.value);
|
|
106
|
+
return prev !== void 0 && sameMembers(prev, next) ? prev : next;
|
|
107
|
+
});
|
|
105
108
|
function getPatch(opts) {
|
|
106
109
|
if (baseline === void 0) return {};
|
|
107
110
|
const frozen = deepClone(getData(), toRaw);
|
|
@@ -157,6 +160,39 @@ function createAsFormPatch(def, getData, onRebased) {
|
|
|
157
160
|
rebaseOnto
|
|
158
161
|
};
|
|
159
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Subscribes the running effect to every leaf reachable from `value` — the
|
|
165
|
+
* walk Vue's deep watch performs (refs, arrays, Map/Set, plain objects;
|
|
166
|
+
* `markRaw` values skipped).
|
|
167
|
+
*/
|
|
168
|
+
function trackDeep(value, seen = /* @__PURE__ */ new Set()) {
|
|
169
|
+
if (typeof value !== "object" || value === null || seen.has(value)) return;
|
|
170
|
+
if (value.__v_skip) return;
|
|
171
|
+
seen.add(value);
|
|
172
|
+
if (isRef(value)) trackDeep(value.value, seen);
|
|
173
|
+
else if (Array.isArray(value)) for (let i = 0; i < value.length; i++) trackDeep(value[i], seen);
|
|
174
|
+
else if (value instanceof Set || value instanceof Map) value.forEach((v) => trackDeep(v, seen));
|
|
175
|
+
else if (isPlainObjectLike(value)) {
|
|
176
|
+
for (const key in value) trackDeep(value[key], seen);
|
|
177
|
+
for (const key of Object.getOwnPropertySymbols(value)) if (Object.prototype.propertyIsEnumerable.call(value, key)) trackDeep(value[key], seen);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function isPlainObjectLike(value) {
|
|
181
|
+
return Object.prototype.toString.call(value) === "[object Object]";
|
|
182
|
+
}
|
|
183
|
+
/** The wrapped container with its domain value de-proxied. */
|
|
184
|
+
function rawContainer(data) {
|
|
185
|
+
const raw = toRaw(data);
|
|
186
|
+
return isProxy(raw.value) ? {
|
|
187
|
+
...raw,
|
|
188
|
+
value: toRaw(raw.value)
|
|
189
|
+
} : raw;
|
|
190
|
+
}
|
|
191
|
+
function sameMembers(a, b) {
|
|
192
|
+
if (a.size !== b.size) return false;
|
|
193
|
+
for (const k of a) if (!b.has(k)) return false;
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
160
196
|
const NOT_TRACKING_MSG = "useAsFormPatch(): change tracking is not enabled on this form. Pass `track-changes` to <AsForm> (or `trackChanges: true` to useAsForm).";
|
|
161
197
|
/**
|
|
162
198
|
* Reactive read-only access to the form's change-tracking handle from any
|
|
@@ -375,7 +411,7 @@ function useAsForm(options) {
|
|
|
375
411
|
formContext,
|
|
376
412
|
firstValidation: computed(() => options.firstValidation?.()),
|
|
377
413
|
submitValidator: () => formValidator.value({
|
|
378
|
-
data:
|
|
414
|
+
data: domainData(),
|
|
379
415
|
context: formContext.value ?? {}
|
|
380
416
|
})
|
|
381
417
|
});
|
package/dist/as-form.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_form = require("./as-form-
|
|
1
|
+
const require_as_form = require("./as-form-CAWAyI3M.cjs");
|
|
2
2
|
module.exports = require_as_form.as_form_default;
|
package/dist/as-form.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as _default, t as Props } from "./as-form.vue-
|
|
1
|
+
import { n as _default, t as Props } from "./as-form.vue-CaQkPbVL.cjs";
|
|
2
2
|
export { Props, _default as default };
|
package/dist/as-form.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as _default, t as Props } from "./as-form.vue-
|
|
1
|
+
import { n as _default, t as Props } from "./as-form.vue-C-gDmdSX.mjs";
|
|
2
2
|
export { Props, _default as default };
|
package/dist/as-form.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_form_default } from "./as-form-
|
|
1
|
+
import { t as as_form_default } from "./as-form-DIn-szcN.mjs";
|
|
2
2
|
export { as_form_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 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.
|
|
8
|
+
//#region ../../node_modules/.pnpm/@atscript+typescript@0.1.102_@atscript+core@0.1.102_@emnapi+core@1.10.0_@emnapi+runtime_c64a9f4c7e92e61b4b6f1ab22397a281/node_modules/@atscript/typescript/dist/utils.d.ts
|
|
9
9
|
interface TError {
|
|
10
10
|
path: string;
|
|
11
11
|
message: string;
|
|
@@ -88,6 +88,13 @@ declare class Validator<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedTyp
|
|
|
88
88
|
* @throws {ValidatorError} When validation fails and `safe` is not `true`.
|
|
89
89
|
*/
|
|
90
90
|
validate<TT = DataType>(value: any, safe?: boolean, context?: unknown): value is TT;
|
|
91
|
+
/**
|
|
92
|
+
* Plain `Validator` without plugins / `replace`: eligible for the allocation-free
|
|
93
|
+
* shortcuts. Subclasses may override the protected `validate*` hooks, so they
|
|
94
|
+
* always take the full walk. (A getter, not a constructor-set field: validators are
|
|
95
|
+
* often built per call, so construction stays as cheap as before.)
|
|
96
|
+
*/
|
|
97
|
+
private get shortcuts();
|
|
91
98
|
protected validateSafe(def: TAtscriptAnnotatedType, value: any): boolean;
|
|
92
99
|
protected get path(): string;
|
|
93
100
|
protected validateAnnotatedType(def: TAtscriptAnnotatedType, value: any): boolean;
|
|
@@ -1343,8 +1350,8 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1343
1350
|
path: string;
|
|
1344
1351
|
message: string;
|
|
1345
1352
|
}[]) => any) | undefined;
|
|
1346
|
-
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
1347
1353
|
onAction?: ((name: string, data: TFormData) => any) | undefined;
|
|
1354
|
+
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
1348
1355
|
"onUnsupported-action"?: ((name: string, data: TFormData) => any) | undefined;
|
|
1349
1356
|
onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TFormData) => any) | undefined;
|
|
1350
1357
|
}> & (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, 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.
|
|
8
|
+
//#region ../../node_modules/.pnpm/@atscript+typescript@0.1.102_@atscript+core@0.1.102_@emnapi+core@1.10.0_@emnapi+runtime_c64a9f4c7e92e61b4b6f1ab22397a281/node_modules/@atscript/typescript/dist/utils.d.ts
|
|
9
9
|
interface TError {
|
|
10
10
|
path: string;
|
|
11
11
|
message: string;
|
|
@@ -88,6 +88,13 @@ declare class Validator<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedTyp
|
|
|
88
88
|
* @throws {ValidatorError} When validation fails and `safe` is not `true`.
|
|
89
89
|
*/
|
|
90
90
|
validate<TT = DataType>(value: any, safe?: boolean, context?: unknown): value is TT;
|
|
91
|
+
/**
|
|
92
|
+
* Plain `Validator` without plugins / `replace`: eligible for the allocation-free
|
|
93
|
+
* shortcuts. Subclasses may override the protected `validate*` hooks, so they
|
|
94
|
+
* always take the full walk. (A getter, not a constructor-set field: validators are
|
|
95
|
+
* often built per call, so construction stays as cheap as before.)
|
|
96
|
+
*/
|
|
97
|
+
private get shortcuts();
|
|
91
98
|
protected validateSafe(def: TAtscriptAnnotatedType, value: any): boolean;
|
|
92
99
|
protected get path(): string;
|
|
93
100
|
protected validateAnnotatedType(def: TAtscriptAnnotatedType, value: any): boolean;
|
|
@@ -1343,8 +1350,8 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1343
1350
|
path: string;
|
|
1344
1351
|
message: string;
|
|
1345
1352
|
}[]) => any) | undefined;
|
|
1346
|
-
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
1347
1353
|
onAction?: ((name: string, data: TFormData) => any) | undefined;
|
|
1354
|
+
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
1348
1355
|
"onUnsupported-action"?: ((name: string, data: TFormData) => any) | undefined;
|
|
1349
1356
|
onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TFormData) => any) | undefined;
|
|
1350
1357
|
}> & (typeof globalThis extends {
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_use_form_context = require("./use-form-context-B6ZnzfxG.cjs");
|
|
3
|
-
const require_as_form = require("./as-form-
|
|
3
|
+
const require_as_form = require("./as-form-CAWAyI3M.cjs");
|
|
4
4
|
const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-u1VgBJAP.cjs");
|
|
5
5
|
const require_use_as_value_help = require("./use-as-value-help-CE8IP9SR.cjs");
|
|
6
6
|
const require_as_field = require("./as-field-BNqrZQ5T.cjs");
|
|
@@ -19,7 +19,7 @@ const require_as_paragraph = require("./as-paragraph-kKM4T1Dq.cjs");
|
|
|
19
19
|
const require_as_action = require("./as-action-DNRackS9.cjs");
|
|
20
20
|
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-CD8seN3C.cjs");
|
|
21
21
|
const require_as_object = require("./as-object-B4WiszzH.cjs");
|
|
22
|
-
const require_as_array = require("./as-array-
|
|
22
|
+
const require_as_array = require("./as-array-DzQ4o2My.cjs");
|
|
23
23
|
const require_as_union = require("./as-union-DT8XDZSt.cjs");
|
|
24
24
|
const require_as_tuple = require("./as-tuple-Bctdt-WG.cjs");
|
|
25
25
|
const require_as_ref = require("./as-ref-CPLoPNRP.cjs");
|
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-
|
|
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-CaQkPbVL.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-BUUl1Y_9.mjs";
|
|
|
20
20
|
import { t as _default$4 } from "./as-date.vue-BZ1cNMbN.mjs";
|
|
21
21
|
import { t as _default$5 } from "./as-datetime.vue-DLuL9Zp3.mjs";
|
|
22
22
|
import { t as _default$19 } from "./as-time.vue-CpQRa8tU.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-
|
|
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-C-gDmdSX.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/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as PATH_PREFIX_KEY, n as useAsUnionVariant, s as DISMISS_EXTERNAL_AT_KEY, t as formatIndexedLabelParts } from "./use-form-context-cDW2GW4-.mjs";
|
|
2
|
-
import { a as useAsFormPatch, i as useAsExternalErrors, n as useAsForm, r as useAsState, t as as_form_default } from "./as-form-
|
|
2
|
+
import { a as useAsFormPatch, i as useAsExternalErrors, n as useAsForm, r as useAsState, t as as_form_default } from "./as-form-DIn-szcN.mjs";
|
|
3
3
|
import { i as useAsNestedSectionsStore, n as provideAsNestedSectionsStore, r as useAsDescendantErrorCounts } from "./use-as-nested-sections-store-Dfo971PK.mjs";
|
|
4
4
|
import { n as useAsValueHelp } from "./use-as-value-help-C_utk6AR.mjs";
|
|
5
5
|
import { a as useAsField, i as useAsFieldScope, n as useAsData, r as useAsOptionalField, t as as_field_default } from "./as-field-DVC3N3Aj.mjs";
|
|
@@ -18,7 +18,7 @@ import { t as as_paragraph_default } from "./as-paragraph-ov2mvW2V.mjs";
|
|
|
18
18
|
import { t as as_action_default } from "./as-action-DqR9HlEa.mjs";
|
|
19
19
|
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-BdjKNx9P.mjs";
|
|
20
20
|
import { t as as_object_default } from "./as-object-DBdqrS5b.mjs";
|
|
21
|
-
import { n as useAsArray, t as as_array_default } from "./as-array-
|
|
21
|
+
import { n as useAsArray, t as as_array_default } from "./as-array-DCDWM-j2.mjs";
|
|
22
22
|
import { n as useAsTypeMap, r as useAsUnion, t as as_union_default } from "./as-union-Gz8gEjmn.mjs";
|
|
23
23
|
import { n as useAsTuple, t as as_tuple_default } from "./as-tuple-CnRtQniL.mjs";
|
|
24
24
|
import { t as as_ref_default } from "./as-ref-qg5EwDtk.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/vue-form",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.151",
|
|
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.
|
|
163
|
+
"@atscript/ui": "^0.1.151"
|
|
164
164
|
},
|
|
165
165
|
"devDependencies": {
|
|
166
|
-
"@atscript/core": "^0.1.
|
|
167
|
-
"@atscript/db-client": "^0.1.
|
|
168
|
-
"@atscript/typescript": "^0.1.
|
|
166
|
+
"@atscript/core": "^0.1.102",
|
|
167
|
+
"@atscript/db-client": "^0.1.151",
|
|
168
|
+
"@atscript/typescript": "^0.1.102",
|
|
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.
|
|
174
|
+
"unplugin-atscript": "^0.1.102",
|
|
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.
|
|
179
|
+
"@atscript/ui-fns": "^0.1.151"
|
|
180
180
|
},
|
|
181
181
|
"peerDependencies": {
|
|
182
|
-
"@atscript/db-client": "^0.1.
|
|
182
|
+
"@atscript/db-client": "^0.1.151",
|
|
183
183
|
"reka-ui": "^2.9.8",
|
|
184
184
|
"vue": "^3",
|
|
185
|
-
"@atscript/ui-fns": "^0.1.
|
|
185
|
+
"@atscript/ui-fns": "^0.1.151"
|
|
186
186
|
},
|
|
187
187
|
"scripts": {
|
|
188
188
|
"build": "node ../../scripts/gen-exports.mjs && vp pack",
|