@atscript/vue-form 0.1.102 → 0.1.103

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.
Files changed (97) hide show
  1. package/dist/{as-array-B_LjJ0oi.mjs → as-array-4rQYVD9_.mjs} +4 -4
  2. package/dist/{as-array-DAeDxzYV.cjs → as-array-C6tCzZir.cjs} +4 -4
  3. package/dist/as-array.cjs +1 -1
  4. package/dist/as-array.mjs +1 -1
  5. package/dist/{as-checkbox-dN1K-rJ_.mjs → as-checkbox-C3i6ZmRk.mjs} +1 -1
  6. package/dist/{as-checkbox-Cva4XHFW.cjs → as-checkbox-oxG8_Isu.cjs} +1 -1
  7. package/dist/as-checkbox.cjs +1 -1
  8. package/dist/as-checkbox.mjs +1 -1
  9. package/dist/{as-collapsible-B0rlXU0x.cjs → as-collapsible-BQ-eYR0v.cjs} +2 -2
  10. package/dist/{as-collapsible-DQOxKGGj.mjs → as-collapsible-DFTzB5Ar.mjs} +2 -2
  11. package/dist/as-collapsible.cjs +1 -1
  12. package/dist/as-collapsible.mjs +1 -1
  13. package/dist/{as-date-CsBBqja_.mjs → as-date-BfISLr-e.mjs} +1 -1
  14. package/dist/{as-date-Cizo8gZx.cjs → as-date-C7pJIpe-.cjs} +1 -1
  15. package/dist/as-date.cjs +1 -1
  16. package/dist/as-date.mjs +1 -1
  17. package/dist/{as-datetime-Cjbprmxg.cjs → as-datetime-DFTI8Wcr.cjs} +1 -1
  18. package/dist/{as-datetime-D_Wbrj9t.mjs → as-datetime-F3In2A6l.mjs} +1 -1
  19. package/dist/as-datetime.cjs +1 -1
  20. package/dist/as-datetime.mjs +1 -1
  21. package/dist/{as-decimal-DhrdOvUQ.cjs → as-decimal-CJAHWYjW.cjs} +1 -1
  22. package/dist/{as-decimal-DtQuZmPA.mjs → as-decimal-DIO8bD2Y.mjs} +1 -1
  23. package/dist/as-decimal.cjs +1 -1
  24. package/dist/as-decimal.mjs +1 -1
  25. package/dist/{as-field-DGnC4dew.cjs → as-field-BKa4D63r.cjs} +1 -1
  26. package/dist/{as-field-CDB-HIfz.mjs → as-field-DLW-csEu.mjs} +1 -1
  27. package/dist/{as-field-shell-D0mNXfQZ.mjs → as-field-shell-BHYEjGcn.mjs} +1 -1
  28. package/dist/{as-field-shell-zeno02I1.cjs → as-field-shell-CW3DDHnq.cjs} +1 -1
  29. package/dist/as-field-shell.cjs +1 -1
  30. package/dist/as-field-shell.mjs +1 -1
  31. package/dist/as-field.cjs +1 -1
  32. package/dist/as-field.mjs +1 -1
  33. package/dist/{as-form-DaAnsFVF.cjs → as-form-CrMA0HdQ.cjs} +196 -10
  34. package/dist/{as-form-8YNdb-49.mjs → as-form-OsyP7m-A.mjs} +193 -13
  35. package/dist/as-form.cjs +1 -1
  36. package/dist/as-form.d.cts +1 -1
  37. package/dist/as-form.d.mts +1 -1
  38. package/dist/as-form.mjs +1 -1
  39. package/dist/{as-form.vue-ZykHT4gZ.d.mts → as-form.vue-2NZSk1F9.d.mts} +48 -2
  40. package/dist/{as-form.vue-5FyX_1CQ.d.cts → as-form.vue-Dg_5GYWG.d.cts} +48 -2
  41. package/dist/{as-input-CwPkK9qR.cjs → as-input-CqxNYh5q.cjs} +1 -1
  42. package/dist/{as-input-VOGvI31W.mjs → as-input-D7aA22Yx.mjs} +1 -1
  43. package/dist/as-input.cjs +1 -1
  44. package/dist/as-input.mjs +1 -1
  45. package/dist/{as-iterator---gxkT-L.mjs → as-iterator-DW7giLlz.mjs} +2 -2
  46. package/dist/{as-iterator-BWXIzbJF.cjs → as-iterator-DsDKfpTh.cjs} +2 -2
  47. package/dist/as-iterator.cjs +1 -1
  48. package/dist/as-iterator.mjs +1 -1
  49. package/dist/{as-multi-select-DGipqqGz.mjs → as-multi-select-Bsf4Y_mv.mjs} +1 -1
  50. package/dist/{as-multi-select-D7XGZS3L.cjs → as-multi-select-DQUInqwY.cjs} +1 -1
  51. package/dist/as-multi-select.cjs +1 -1
  52. package/dist/as-multi-select.mjs +1 -1
  53. package/dist/{as-number-BIhBVXih.mjs → as-number-B8MCg-ph.mjs} +1 -1
  54. package/dist/{as-number-BQWwSipg.cjs → as-number-CFdK5xjM.cjs} +1 -1
  55. package/dist/as-number.cjs +1 -1
  56. package/dist/as-number.mjs +1 -1
  57. package/dist/{as-object-BJxJJM13.cjs → as-object-B4sF9sIh.cjs} +4 -4
  58. package/dist/{as-object-Dr7CttaK.mjs → as-object-CN3KZFXO.mjs} +4 -4
  59. package/dist/as-object.cjs +1 -1
  60. package/dist/as-object.mjs +1 -1
  61. package/dist/{as-radio-CdK8gCkN.cjs → as-radio-BeOQdoeq.cjs} +1 -1
  62. package/dist/{as-radio-DBW6XzlW.mjs → as-radio-CFaDbRPe.mjs} +1 -1
  63. package/dist/as-radio.cjs +1 -1
  64. package/dist/as-radio.mjs +1 -1
  65. package/dist/{as-ref-D6zp_PIG.mjs → as-ref-CNQgr6zE.mjs} +2 -2
  66. package/dist/{as-ref-BOAHVeR-.cjs → as-ref-RawBvR6v.cjs} +2 -2
  67. package/dist/as-ref.cjs +1 -1
  68. package/dist/as-ref.mjs +1 -1
  69. package/dist/{as-select-BiS6USZW.mjs → as-select-Cr00CPKf.mjs} +1 -1
  70. package/dist/{as-select-B2jqgF38.cjs → as-select-LJIvBPiv.cjs} +1 -1
  71. package/dist/as-select.cjs +1 -1
  72. package/dist/as-select.mjs +1 -1
  73. package/dist/{as-time-BN-Vc-iw.mjs → as-time-CE2FaqZ3.mjs} +1 -1
  74. package/dist/{as-time-DdQnNIQX.cjs → as-time-CqCF0pKQ.cjs} +1 -1
  75. package/dist/as-time.cjs +1 -1
  76. package/dist/as-time.mjs +1 -1
  77. package/dist/{as-tuple-DaY_Mw-y.cjs → as-tuple-B3ysbvxB.cjs} +4 -4
  78. package/dist/{as-tuple-BUzs7nm6.mjs → as-tuple-CeJWgP6l.mjs} +4 -4
  79. package/dist/as-tuple.cjs +1 -1
  80. package/dist/as-tuple.mjs +1 -1
  81. package/dist/{as-union-B5OFQLJX.mjs → as-union-BPlYyGVk.mjs} +2 -2
  82. package/dist/{as-union-Cz5cm7BP.cjs → as-union-Djhjo69H.cjs} +2 -2
  83. package/dist/as-union.cjs +1 -1
  84. package/dist/as-union.mjs +1 -1
  85. package/dist/index.cjs +25 -24
  86. package/dist/index.d.cts +90 -5
  87. package/dist/index.d.mts +90 -5
  88. package/dist/index.mjs +25 -25
  89. package/dist/{use-as-optional-add-flow-C85F2VoU.cjs → use-as-optional-add-flow-BXKiK1Kb.cjs} +1 -1
  90. package/dist/{use-as-optional-add-flow-CQctXLZI.mjs → use-as-optional-add-flow-B_gr8sX-.mjs} +1 -1
  91. package/dist/{use-form-context-bAj7UoSe.mjs → use-form-context-D6J1WTyG.mjs} +2 -1
  92. package/dist/{use-form-context-Dwr8Ai1v.cjs → use-form-context-DpGiGUvJ.cjs} +7 -0
  93. package/package.json +4 -4
  94. /package/dist/{use-as-nested-sections-store-jdMRxjBE.cjs → use-as-nested-sections-store--E0Ijpt5.cjs} +0 -0
  95. /package/dist/{use-as-nested-sections-store-lhi0z5z1.mjs → use-as-nested-sections-store-DVRmG7V0.mjs} +0 -0
  96. /package/dist/{use-as-value-help-uANI3zWa.cjs → use-as-value-help-BsAriqCI.cjs} +0 -0
  97. /package/dist/{use-as-value-help-CBykDEjZ.mjs → use-as-value-help-DrISSxCz.mjs} +0 -0
@@ -1,9 +1,9 @@
1
- import { a as CHANGE_HANDLER_KEY, n as useAsUnionVariant, r as useFormContext } from "./use-form-context-bAj7UoSe.mjs";
2
- import { t as as_field_default } from "./as-field-CDB-HIfz.mjs";
3
- import { t as as_collapsible_default } from "./as-collapsible-DQOxKGGj.mjs";
1
+ import { a as CHANGE_HANDLER_KEY, n as useAsUnionVariant, r as useFormContext } from "./use-form-context-D6J1WTyG.mjs";
2
+ import { t as as_field_default } from "./as-field-DLW-csEu.mjs";
3
+ import { t as as_collapsible_default } from "./as-collapsible-DFTzB5Ar.mjs";
4
4
  import { t as as_variant_picker_default } from "./as-variant-picker-B3GLhKyt.mjs";
5
5
  import { t as useAsDropdown } from "./use-as-dropdown-B2Shb7wn.mjs";
6
- import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-CQctXLZI.mjs";
6
+ import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-B_gr8sX-.mjs";
7
7
  import { t as as_array_clear_btn_default } from "./as-array-clear-btn-BY1IBwBP.mjs";
8
8
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, normalizeClass, openBlock, reactive, ref, renderList, toDisplayString, unref, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
9
9
  import { createFormData, createFormValueResolver, getFieldMeta, isUnionField } from "@atscript/ui";
@@ -1,9 +1,9 @@
1
- const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
2
- const require_as_field = require("./as-field-DGnC4dew.cjs");
3
- const require_as_collapsible = require("./as-collapsible-B0rlXU0x.cjs");
1
+ const require_use_form_context = require("./use-form-context-DpGiGUvJ.cjs");
2
+ const require_as_field = require("./as-field-BKa4D63r.cjs");
3
+ const require_as_collapsible = require("./as-collapsible-BQ-eYR0v.cjs");
4
4
  const require_as_variant_picker = require("./as-variant-picker-JlEhh7YO.cjs");
5
5
  const require_use_as_dropdown = require("./use-as-dropdown-Bj9toVdw.cjs");
6
- const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-C85F2VoU.cjs");
6
+ const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-BXKiK1Kb.cjs");
7
7
  const require_as_array_clear_btn = require("./as-array-clear-btn-COfRUzeb.cjs");
8
8
  let vue = require("vue");
9
9
  let _atscript_ui = require("@atscript/ui");
package/dist/as-array.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_array = require("./as-array-DAeDxzYV.cjs");
1
+ const require_as_array = require("./as-array-C6tCzZir.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-B_LjJ0oi.mjs";
1
+ import { t as as_array_default } from "./as-array-4rQYVD9_.mjs";
2
2
  export { as_array_default as default };
@@ -1,4 +1,4 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-D0mNXfQZ.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-BHYEjGcn.mjs";
2
2
  import { n as as_optional_clear_default } from "./as-variant-picker-B3GLhKyt.mjs";
3
3
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, toDisplayString, unref, watchEffect, withCtx } from "vue";
4
4
  //#region src/composables/use-as-tri-state-checkbox.ts
@@ -1,4 +1,4 @@
1
- const require_as_field_shell = require("./as-field-shell-zeno02I1.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-CW3DDHnq.cjs");
2
2
  const require_as_variant_picker = require("./as-variant-picker-JlEhh7YO.cjs");
3
3
  let vue = require("vue");
4
4
  //#region src/composables/use-as-tri-state-checkbox.ts
@@ -1,2 +1,2 @@
1
- const require_as_checkbox = require("./as-checkbox-Cva4XHFW.cjs");
1
+ const require_as_checkbox = require("./as-checkbox-oxG8_Isu.cjs");
2
2
  module.exports = require_as_checkbox.as_checkbox_default;
@@ -1,2 +1,2 @@
1
- import { t as as_checkbox_default } from "./as-checkbox-dN1K-rJ_.mjs";
1
+ import { t as as_checkbox_default } from "./as-checkbox-C3i6ZmRk.mjs";
2
2
  export { as_checkbox_default as default };
@@ -1,5 +1,5 @@
1
- const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
2
- const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-jdMRxjBE.cjs");
1
+ const require_use_form_context = require("./use-form-context-DpGiGUvJ.cjs");
2
+ const require_use_as_nested_sections_store = require("./use-as-nested-sections-store--E0Ijpt5.cjs");
3
3
  const require_focus_after_toggle = require("./focus-after-toggle-CWxiPZWi.cjs");
4
4
  let vue = require("vue");
5
5
  //#region src/components/as-collapsible.vue?vue&type=script&setup=true&lang.ts
@@ -1,5 +1,5 @@
1
- import { t as formatIndexedLabelParts } from "./use-form-context-bAj7UoSe.mjs";
2
- import { r as useAsNestedSectionsStore, t as DESCENDANT_ERROR_COUNTS_KEY } from "./use-as-nested-sections-store-lhi0z5z1.mjs";
1
+ import { t as formatIndexedLabelParts } from "./use-form-context-D6J1WTyG.mjs";
2
+ import { r as useAsNestedSectionsStore, t as DESCENDANT_ERROR_COUNTS_KEY } from "./use-as-nested-sections-store-DVRmG7V0.mjs";
3
3
  import { r as useAsFocusFirstAfter } from "./focus-after-toggle-Dtl3P6CS.mjs";
4
4
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, inject, normalizeClass, onBeforeUnmount, onMounted, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, vShow, withCtx, withDirectives } from "vue";
5
5
  //#region src/components/as-collapsible.vue?vue&type=script&setup=true&lang.ts
@@ -1,2 +1,2 @@
1
- const require_as_collapsible = require("./as-collapsible-B0rlXU0x.cjs");
1
+ const require_as_collapsible = require("./as-collapsible-BQ-eYR0v.cjs");
2
2
  module.exports = require_as_collapsible.as_collapsible_default;
@@ -1,2 +1,2 @@
1
- import { t as as_collapsible_default } from "./as-collapsible-DQOxKGGj.mjs";
1
+ import { t as as_collapsible_default } from "./as-collapsible-DFTzB5Ar.mjs";
2
2
  export { as_collapsible_default as default };
@@ -1,4 +1,4 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-D0mNXfQZ.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-BHYEjGcn.mjs";
2
2
  import { t as as_adornment_shell_default } from "./as-adornment-shell-C4A2fnDp.mjs";
3
3
  import { n as as_date_control_default, t as useAsDate } from "./use-as-date-XLE8HBbo.mjs";
4
4
  import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, unref, withCtx } from "vue";
@@ -1,4 +1,4 @@
1
- const require_as_field_shell = require("./as-field-shell-zeno02I1.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-CW3DDHnq.cjs");
2
2
  const require_as_adornment_shell = require("./as-adornment-shell-DptUMWNk.cjs");
3
3
  const require_use_as_date = require("./use-as-date-DY8b1_V4.cjs");
4
4
  let vue = require("vue");
package/dist/as-date.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_date = require("./as-date-Cizo8gZx.cjs");
1
+ const require_as_date = require("./as-date-C7pJIpe-.cjs");
2
2
  module.exports = require_as_date.as_date_default;
package/dist/as-date.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_date_default } from "./as-date-CsBBqja_.mjs";
1
+ import { t as as_date_default } from "./as-date-BfISLr-e.mjs";
2
2
  export { as_date_default as default };
@@ -1,4 +1,4 @@
1
- const require_as_field_shell = require("./as-field-shell-zeno02I1.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-CW3DDHnq.cjs");
2
2
  const require_as_adornment_shell = require("./as-adornment-shell-DptUMWNk.cjs");
3
3
  const require_use_as_date = require("./use-as-date-DY8b1_V4.cjs");
4
4
  let vue = require("vue");
@@ -1,4 +1,4 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-D0mNXfQZ.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-BHYEjGcn.mjs";
2
2
  import { t as as_adornment_shell_default } from "./as-adornment-shell-C4A2fnDp.mjs";
3
3
  import { n as as_date_control_default, t as useAsDate } from "./use-as-date-XLE8HBbo.mjs";
4
4
  import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, unref, withCtx } from "vue";
@@ -1,2 +1,2 @@
1
- const require_as_datetime = require("./as-datetime-Cjbprmxg.cjs");
1
+ const require_as_datetime = require("./as-datetime-DFTI8Wcr.cjs");
2
2
  module.exports = require_as_datetime.as_datetime_default;
@@ -1,2 +1,2 @@
1
- import { t as as_datetime_default } from "./as-datetime-D_Wbrj9t.mjs";
1
+ import { t as as_datetime_default } from "./as-datetime-F3In2A6l.mjs";
2
2
  export { as_datetime_default as default };
@@ -1,5 +1,5 @@
1
1
  const require_use_as_locale = require("./use-as-locale-C4z5stwD.cjs");
2
- const require_as_field_shell = require("./as-field-shell-zeno02I1.cjs");
2
+ const require_as_field_shell = require("./as-field-shell-CW3DDHnq.cjs");
3
3
  let vue = require("vue");
4
4
  let _atscript_ui = require("@atscript/ui");
5
5
  //#region src/composables/_shape.ts
@@ -1,5 +1,5 @@
1
1
  import { n as useAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
2
- import { t as as_field_shell_default } from "./as-field-shell-D0mNXfQZ.mjs";
2
+ import { t as as_field_shell_default } from "./as-field-shell-BHYEjGcn.mjs";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, nextTick, normalizeClass, normalizeProps, openBlock, ref, toDisplayString, unref, watch, withCtx } from "vue";
4
4
  import { enforceScale, formatDecimalForDisplay, getDecimalSeparator, getThousandsSeparator, groupInteger, joinDecimalString, parseDecimalInput, splitDecimalString } from "@atscript/ui";
5
5
  //#region src/composables/_shape.ts
@@ -1,2 +1,2 @@
1
- const require_as_decimal = require("./as-decimal-DhrdOvUQ.cjs");
1
+ const require_as_decimal = require("./as-decimal-CJAHWYjW.cjs");
2
2
  module.exports = require_as_decimal.as_decimal_default;
@@ -1,2 +1,2 @@
1
- import { t as as_decimal_default } from "./as-decimal-DtQuZmPA.mjs";
1
+ import { t as as_decimal_default } from "./as-decimal-DIO8bD2Y.mjs";
2
2
  export { as_decimal_default as default };
@@ -1,4 +1,4 @@
1
- const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
1
+ const require_use_form_context = require("./use-form-context-DpGiGUvJ.cjs");
2
2
  const require_use_as_locale = require("./use-as-locale-C4z5stwD.cjs");
3
3
  let vue = require("vue");
4
4
  let _atscript_ui = require("@atscript/ui");
@@ -1,4 +1,4 @@
1
- import { a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_STATE_KEY, f as HIDE_ROOT_TITLE_KEY, g as TYPES_KEY, h as ROOT_DATA_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as PATH_PREFIX_KEY, o as COMPONENTS_KEY, p as LEVEL_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY } from "./use-form-context-bAj7UoSe.mjs";
1
+ import { _ as TYPES_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, f as FORM_STATE_KEY, g as ROOT_DATA_KEY, h as PATH_PREFIX_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as LEVEL_KEY, o as COMPONENTS_KEY, p as HIDE_ROOT_TITLE_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY } from "./use-form-context-D6J1WTyG.mjs";
2
2
  import { n as useAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
3
3
  import { computed, createBlock, createElementBlock, defineComponent, inject, isRef, mergeProps, onUnmounted, openBlock, provide, ref, resolveDynamicComponent, toDisplayString, unref, useId, watch } from "vue";
4
4
  import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_LABEL, META_READONLY, META_REQUIRED, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HIDDEN, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_VALIDATE, WF_ACTION_WITH_DATA, buildGridClasses, createFieldValidator, createFormData, createFormValueResolver, extractValueHelp, getByPath, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, isArrayField, isObjectField, isTupleField, isUnionField, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel } from "@atscript/ui";
@@ -1,4 +1,4 @@
1
- import { n as useAsUnionVariant, t as formatIndexedLabelParts } from "./use-form-context-bAj7UoSe.mjs";
1
+ import { n as useAsUnionVariant, t as formatIndexedLabelParts } from "./use-form-context-D6J1WTyG.mjs";
2
2
  import { r as useAsFocusFirstAfter } from "./focus-after-toggle-Dtl3P6CS.mjs";
3
3
  import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-B3GLhKyt.mjs";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toDisplayString, unref, vShow, withDirectives, withKeys, withModifiers } from "vue";
@@ -1,4 +1,4 @@
1
- const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
1
+ const require_use_form_context = require("./use-form-context-DpGiGUvJ.cjs");
2
2
  const require_focus_after_toggle = require("./focus-after-toggle-CWxiPZWi.cjs");
3
3
  const require_as_variant_picker = require("./as-variant-picker-JlEhh7YO.cjs");
4
4
  let vue = require("vue");
@@ -1,2 +1,2 @@
1
- const require_as_field_shell = require("./as-field-shell-zeno02I1.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-CW3DDHnq.cjs");
2
2
  module.exports = require_as_field_shell.as_field_shell_default;
@@ -1,2 +1,2 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-D0mNXfQZ.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-BHYEjGcn.mjs";
2
2
  export { as_field_shell_default as default };
package/dist/as-field.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_field = require("./as-field-DGnC4dew.cjs");
1
+ const require_as_field = require("./as-field-BKa4D63r.cjs");
2
2
  module.exports = require_as_field.as_field_default;
package/dist/as-field.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_field_default } from "./as-field-CDB-HIfz.mjs";
1
+ import { t as as_field_default } from "./as-field-DLW-csEu.mjs";
2
2
  export { as_field_default as default };
@@ -1,10 +1,158 @@
1
- const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
2
- const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-jdMRxjBE.cjs");
3
- const require_use_as_value_help = require("./use-as-value-help-uANI3zWa.cjs");
4
- const require_as_field = require("./as-field-DGnC4dew.cjs");
5
- const require_as_iterator = require("./as-iterator-BWXIzbJF.cjs");
1
+ const require_use_form_context = require("./use-form-context-DpGiGUvJ.cjs");
2
+ const require_use_as_nested_sections_store = require("./use-as-nested-sections-store--E0Ijpt5.cjs");
3
+ const require_use_as_value_help = require("./use-as-value-help-BsAriqCI.cjs");
4
+ const require_as_field = require("./as-field-BKa4D63r.cjs");
5
+ const require_as_iterator = require("./as-iterator-DsDKfpTh.cjs");
6
6
  let vue = require("vue");
7
7
  let _atscript_ui = require("@atscript/ui");
8
+ //#region src/composables/use-as-form-patch.ts
9
+ /**
10
+ * Internal factory invoked by `useAsForm` when `trackChanges` is enabled. Owns
11
+ * the deep-clone baseline lifecycle:
12
+ *
13
+ * - captures a DEEP CLONE of the wrapped form-data the moment tracking becomes
14
+ * active (and, if data is not yet available, when it first arrives),
15
+ * - re-baselines on `reset()` (the form's own reset path calls `rebase()`),
16
+ * - exposes `rebase()` so a consumer can re-baseline after a successful save.
17
+ *
18
+ * The clone is mandatory: `buildFormDiff` keeps LIVE references into the
19
+ * supplied baseline, so a shared reference would be mutated by subsequent
20
+ * edits and the diff would always come back empty.
21
+ *
22
+ * Reactivity: a single revert-aware `diff` computed drives `isDirty` /
23
+ * `changes`. `buildFormDiff` reads most reactive leaves of the live container
24
+ * (via `getByPath` + the `deepEqual` walk), so the computed auto-tracks scalar
25
+ * edits, nested-object edits, and `$update` edits to EXISTING keyed-array items.
26
+ * But the `$insert` branch pushes a freshly-added (not-yet-saved) keyed-array
27
+ * element BY REFERENCE without reading its leaves, so editing such a row's
28
+ * non-key leaves (qty/description) would NOT invalidate the computed. To close
29
+ * that blind spot we add a single deep `watch` on the live data — created ONLY
30
+ * when tracking is active, owned by the component scope (it disposes on unmount)
31
+ * — that bumps `dataRev`; the `diff` computed reads `dataRev` so every leaf
32
+ * mutation, including an inserted row's, re-evaluates it. OFF stays zero-cost:
33
+ * `createAsFormPatch` is never called when tracking is disabled, so neither the
34
+ * baseline nor this watcher is ever created. It recomputes only when the live
35
+ * data (`dataRev`) or the baseline (`baselineRev`) changes, and Vue caches the
36
+ * result between reads.
37
+ *
38
+ * @param def getter for the form's `FormDef`
39
+ * @param getData getter for the WRAPPED form-data container `{ value }`. Before
40
+ * real domain data arrives `useAsForm` yields the empty internal
41
+ * fallback `{}` (no `value` key); the tracker treats that as
42
+ * "no data yet" and defers the baseline until a `{ value: … }`
43
+ * container appears (the fetch-then-fill flow).
44
+ */
45
+ function createAsFormPatch(def, getData) {
46
+ let baseline;
47
+ const baselineRev = (0, vue.ref)(0);
48
+ const dataRev = (0, vue.ref)(0);
49
+ /**
50
+ * Deep-clones the current wrapped container, or returns `undefined` when no
51
+ * real domain data exists yet. "No data yet" = the container has no `value`
52
+ * key or its `value` is `undefined` (the `{}` internal fallback, or a
53
+ * `:form-data` ref that has not resolved). Capturing the empty fallback as the
54
+ * baseline would make every field read as dirty once real data replaces it,
55
+ * so we wait for a genuine `{ value: … }` container.
56
+ */
57
+ function snapshot() {
58
+ const cur = getData();
59
+ if (cur.value === void 0) return void 0;
60
+ return deepClone((0, vue.toRaw)(cur));
61
+ }
62
+ function capture() {
63
+ baseline = snapshot();
64
+ baselineRev.value++;
65
+ }
66
+ capture();
67
+ if (baseline === void 0) {
68
+ const stop = (0, vue.watch)(() => getData().value, () => {
69
+ if (baseline !== void 0) return;
70
+ capture();
71
+ if (baseline !== void 0) stop();
72
+ });
73
+ }
74
+ (0, vue.watch)(() => getData(), () => dataRev.value++, { deep: true });
75
+ const diff = (0, vue.computed)(() => {
76
+ dataRev.value;
77
+ baselineRev.value;
78
+ if (baseline === void 0) return {
79
+ isDirty: false,
80
+ changes: []
81
+ };
82
+ const result = (0, _atscript_ui.buildFormDiff)(def(), baseline, getData());
83
+ return {
84
+ isDirty: result.isDirty,
85
+ changes: result.changes
86
+ };
87
+ });
88
+ const isDirty = (0, vue.computed)(() => diff.value.isDirty);
89
+ const changes = (0, vue.computed)(() => diff.value.changes);
90
+ function getPatch(opts) {
91
+ if (baseline === void 0) return {};
92
+ const frozen = deepClone((0, vue.toRaw)(getData()));
93
+ return (0, _atscript_ui.buildFormDiff)(def(), baseline, frozen, opts).patch;
94
+ }
95
+ function getChanges() {
96
+ if (baseline === void 0) return [];
97
+ const frozen = deepClone((0, vue.toRaw)(getData()));
98
+ return (0, _atscript_ui.buildFormDiff)(def(), baseline, frozen).changes;
99
+ }
100
+ function rebase() {
101
+ capture();
102
+ }
103
+ return {
104
+ isDirty,
105
+ changes,
106
+ getPatch,
107
+ getChanges,
108
+ rebase
109
+ };
110
+ }
111
+ /**
112
+ * Structural deep clone of plain JSON-ish data (objects / arrays / primitives /
113
+ * Date). Used to freeze the baseline so later edits to the live form data don't
114
+ * mutate it. `structuredClone` would throw on Vue proxies / functions; this
115
+ * walks own-enumerable keys and copies leaves by value.
116
+ */
117
+ function deepClone(value) {
118
+ if (value === null || typeof value !== "object") return value;
119
+ if (value instanceof Date) return new Date(value.getTime());
120
+ if (Array.isArray(value)) {
121
+ const out = [];
122
+ for (let i = 0; i < value.length; i++) out.push(deepClone((0, vue.toRaw)(value[i])));
123
+ return out;
124
+ }
125
+ const src = value;
126
+ const out = {};
127
+ for (const k of Object.keys(src)) out[k] = deepClone((0, vue.toRaw)(src[k]));
128
+ return out;
129
+ }
130
+ const NOT_TRACKING_MSG = "useAsFormPatch(): change tracking is not enabled on this form. Pass `track-changes` to <AsForm> (or `trackChanges: true` to useAsForm).";
131
+ /**
132
+ * Reactive read-only access to the form's change-tracking handle from any
133
+ * descendant of an `<AsForm track-changes>`. Mirrors the `useAsData` /
134
+ * `useAsPath` injector pattern.
135
+ *
136
+ * THROWS when called outside a form, or inside a form that did not enable
137
+ * `track-changes` — fail loud rather than silently report "not dirty".
138
+ *
139
+ * @example
140
+ * ```vue
141
+ * <script setup lang="ts">
142
+ * import { useAsFormPatch } from "@atscript/vue-form";
143
+ * const { isDirty, getPatch } = useAsFormPatch();
144
+ * <\/script>
145
+ * <template>
146
+ * <button :disabled="!isDirty" @click="save(getPatch())">Save</button>
147
+ * </template>
148
+ * ```
149
+ */
150
+ function useAsFormPatch() {
151
+ const handle = (0, vue.inject)(require_use_form_context.FORM_PATCH_KEY, void 0);
152
+ if (!handle) throw new Error(NOT_TRACKING_MSG);
153
+ return handle;
154
+ }
155
+ //#endregion
8
156
  //#region src/composables/use-as-external-errors.ts
9
157
  /**
10
158
  * Local dismissal state for externally-supplied errors.
@@ -144,6 +292,9 @@ function useAsState(opts) {
144
292
  }
145
293
  //#endregion
146
294
  //#region src/composables/use-as-form.ts
295
+ const EMPTY_CHANGES = Object.freeze([]);
296
+ const EMPTY_GET_PATCH = () => ({});
297
+ const EMPTY_GET_CHANGES = () => [];
147
298
  /**
148
299
  * Composable backing `<AsForm>`. Owns the entire form state machine —
149
300
  * data container, internal validator, external-error dismissal, action
@@ -179,6 +330,12 @@ function useAsForm(options) {
179
330
  context: formContext.value ?? {}
180
331
  })
181
332
  });
333
+ const patch = options.trackChanges?.() ? createAsFormPatch(() => options.def(), () => data.value) : void 0;
334
+ if (patch) (0, vue.provide)(require_use_form_context.FORM_PATCH_KEY, patch);
335
+ const reset = patch ? async () => {
336
+ await resetState();
337
+ patch.rebase();
338
+ } : resetState;
182
339
  (0, vue.provide)(require_use_form_context.ROOT_DATA_KEY, data);
183
340
  (0, vue.provide)(require_use_form_context.PATH_PREFIX_KEY, (0, vue.computed)(() => ""));
184
341
  (0, vue.provide)(require_use_form_context.TYPES_KEY, (0, vue.computed)(() => options.types()));
@@ -220,12 +377,16 @@ function useAsForm(options) {
220
377
  loading: options.loading?.() === true,
221
378
  submitText: submitText.value,
222
379
  submit: onSubmit,
223
- reset: resetState,
380
+ reset,
224
381
  clearErrors,
225
382
  setErrors,
226
383
  dismissError: ext.dismissAt,
227
384
  dismissFormError: ext.dismissForm,
228
- formContext: formContext.value
385
+ formContext: formContext.value,
386
+ isDirty: patch?.isDirty.value ?? false,
387
+ changes: patch ? patch.changes.value : EMPTY_CHANGES,
388
+ getPatch: patch ? patch.getPatch : EMPTY_GET_PATCH,
389
+ getChanges: patch ? patch.getChanges : EMPTY_GET_CHANGES
229
390
  }));
230
391
  function supportsAction(def, actionId) {
231
392
  return (0, _atscript_ui.getDeclaredFormActions)(def).some((a) => a.id === actionId);
@@ -271,7 +432,7 @@ function useAsForm(options) {
271
432
  errors: ext.effective,
272
433
  formError: ext.formError,
273
434
  internalErrors,
274
- reset: resetState,
435
+ reset,
275
436
  clearErrors,
276
437
  setErrors,
277
438
  onSubmit,
@@ -284,7 +445,8 @@ function useAsForm(options) {
284
445
  dismissError: ext.dismissAt,
285
446
  dismissFormError: ext.dismissForm,
286
447
  formContext,
287
- handleChange
448
+ handleChange,
449
+ patch
288
450
  };
289
451
  }
290
452
  //#endregion
@@ -352,6 +514,10 @@ var as_form_default = /* @__PURE__ */ (0, vue.defineComponent)({
352
514
  loading: {
353
515
  type: Boolean,
354
516
  required: false
517
+ },
518
+ trackChanges: {
519
+ type: Boolean,
520
+ required: false
355
521
  }
356
522
  },
357
523
  emits: [
@@ -361,7 +527,7 @@ var as_form_default = /* @__PURE__ */ (0, vue.defineComponent)({
361
527
  "unsupported-action",
362
528
  "change"
363
529
  ],
364
- setup(__props, { emit: __emit }) {
530
+ setup(__props, { expose: __expose, emit: __emit }) {
365
531
  const props = __props;
366
532
  const emit = __emit;
367
533
  const form = useAsForm({
@@ -375,6 +541,7 @@ var as_form_default = /* @__PURE__ */ (0, vue.defineComponent)({
375
541
  clientFactory: () => props.clientFactory,
376
542
  hideRootTitle: () => props.hideRootTitle,
377
543
  loading: () => props.loading,
544
+ trackChanges: () => props.trackChanges,
378
545
  emits: {
379
546
  submit: (data) => emit("submit", data),
380
547
  error: (errors) => emit("error", errors),
@@ -383,6 +550,19 @@ var as_form_default = /* @__PURE__ */ (0, vue.defineComponent)({
383
550
  change: (type, path, value, formData) => emit("change", type, path, value, formData)
384
551
  }
385
552
  });
553
+ __expose({
554
+ submit: form.onSubmit,
555
+ reset: form.reset,
556
+ get isDirty() {
557
+ return form.patch?.isDirty.value ?? false;
558
+ },
559
+ get changes() {
560
+ return form.patch?.changes.value ?? [];
561
+ },
562
+ getPatch: form.patch ? form.patch.getPatch : () => ({}),
563
+ getChanges: form.patch ? form.patch.getChanges : () => [],
564
+ rebase: form.patch ? form.patch.rebase : () => {}
565
+ });
386
566
  return (_ctx, _cache) => {
387
567
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("form", {
388
568
  class: "as-form",
@@ -438,6 +618,12 @@ Object.defineProperty(exports, "useAsForm", {
438
618
  return useAsForm;
439
619
  }
440
620
  });
621
+ Object.defineProperty(exports, "useAsFormPatch", {
622
+ enumerable: true,
623
+ get: function() {
624
+ return useAsFormPatch;
625
+ }
626
+ });
441
627
  Object.defineProperty(exports, "useAsState", {
442
628
  enumerable: true,
443
629
  get: function() {