@atscript/vue-form 0.1.206 → 0.1.207

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 (209) hide show
  1. package/dist/{as-action-rT6WXLph.cjs → as-action-BGIbuTxh.cjs} +3 -3
  2. package/dist/{as-action-kBskX68v.mjs → as-action-CPQ64nNi.mjs} +3 -3
  3. package/dist/as-action.cjs +1 -1
  4. package/dist/as-action.d.cts +1 -1
  5. package/dist/as-action.d.mts +1 -1
  6. package/dist/as-action.mjs +1 -1
  7. package/dist/{as-action.vue-B7RrjGhF.d.cts → as-action.vue-BjGc3z94.d.mts} +1 -1
  8. package/dist/{as-action.vue-Dtez-EWu.d.mts → as-action.vue-wGCmd-ww.d.cts} +1 -1
  9. package/dist/{as-array-C5lqDDLN.cjs → as-array-BCmGCZul.cjs} +10 -10
  10. package/dist/{as-array-Tt_4kl5r.mjs → as-array-CHVronOS.mjs} +10 -10
  11. package/dist/{as-array-clear-btn-Dk88CYmS.cjs → as-array-clear-btn-BolX7Wpe.cjs} +1 -1
  12. package/dist/{as-array-clear-btn-DGUQY_7_.mjs → as-array-clear-btn-DOBKhLCy.mjs} +1 -1
  13. package/dist/as-array.cjs +1 -1
  14. package/dist/as-array.d.cts +1 -1
  15. package/dist/as-array.d.mts +1 -1
  16. package/dist/as-array.mjs +1 -1
  17. package/dist/{as-array.vue-Ca_xan2n.d.mts → as-array.vue-BB22gE0u.d.cts} +1 -1
  18. package/dist/{as-array.vue-Dp_zd3ZM.d.cts → as-array.vue-CgYp_DSb.d.mts} +1 -1
  19. package/dist/{as-checkbox-D7NywgIa.cjs → as-checkbox-BKWtScvS.cjs} +7 -17
  20. package/dist/{as-checkbox-CCX9E19U.mjs → as-checkbox-BX5N5GHR.mjs} +7 -17
  21. package/dist/as-checkbox.cjs +1 -1
  22. package/dist/as-checkbox.d.cts +1 -1
  23. package/dist/as-checkbox.d.mts +1 -1
  24. package/dist/as-checkbox.mjs +1 -1
  25. package/dist/{as-checkbox.vue-BClSBx1g.d.mts → as-checkbox.vue-CQzeu4IP.d.mts} +1 -1
  26. package/dist/{as-checkbox.vue-Bf3qqcKu.d.cts → as-checkbox.vue-RTW5hwvE.d.cts} +1 -1
  27. package/dist/as-collapsible.cjs +1 -1
  28. package/dist/as-collapsible.d.cts +1 -1
  29. package/dist/as-collapsible.d.mts +1 -1
  30. package/dist/as-collapsible.mjs +1 -1
  31. package/dist/{as-collapsible.vue-BXdpM7_K.d.cts → as-collapsible.vue-BKN4DmSy.d.mts} +1 -1
  32. package/dist/{as-collapsible.vue-CUhn1EVX.d.mts → as-collapsible.vue-CPmozkkf.d.cts} +1 -1
  33. package/dist/{as-date-3haOaiAG.mjs → as-date-Bkrp2GY4.mjs} +6 -6
  34. package/dist/{as-date-Ubw_1-Ai.cjs → as-date-C6tT9FPz.cjs} +6 -6
  35. package/dist/as-date.cjs +1 -1
  36. package/dist/as-date.d.cts +1 -1
  37. package/dist/as-date.d.mts +1 -1
  38. package/dist/as-date.mjs +1 -1
  39. package/dist/{as-date.vue-B5NWZ5ON.d.cts → as-date.vue-BpfWumrA.d.cts} +1 -1
  40. package/dist/{as-date.vue-CJQOrfj3.d.mts → as-date.vue-DJ125nVS.d.mts} +1 -1
  41. package/dist/{as-datetime--7bl-yGW.cjs → as-datetime-DWLW4W7O.cjs} +6 -6
  42. package/dist/{as-datetime-BTekpasP.mjs → as-datetime-Dt_AWrCG.mjs} +6 -6
  43. package/dist/as-datetime.cjs +1 -1
  44. package/dist/as-datetime.d.cts +1 -1
  45. package/dist/as-datetime.d.mts +1 -1
  46. package/dist/as-datetime.mjs +1 -1
  47. package/dist/{as-datetime.vue-BvmFdGxe.d.cts → as-datetime.vue-DO3tkof1.d.cts} +1 -1
  48. package/dist/{as-datetime.vue-CzMz_RUy.d.mts → as-datetime.vue-DfFAaVdS.d.mts} +1 -1
  49. package/dist/{as-decimal-7CIE6UKX.mjs → as-decimal-BUr24VTI.mjs} +5 -5
  50. package/dist/{as-decimal-DWPRXsYY.cjs → as-decimal-DuWZDjbg.cjs} +5 -5
  51. package/dist/as-decimal.cjs +1 -1
  52. package/dist/as-decimal.d.cts +1 -1
  53. package/dist/as-decimal.d.mts +1 -1
  54. package/dist/as-decimal.mjs +1 -1
  55. package/dist/{as-decimal.vue-DdVqHtMT.d.cts → as-decimal.vue-BODauGXK.d.mts} +1 -1
  56. package/dist/{as-decimal.vue-DyDt1ds0.d.mts → as-decimal.vue-C42_-oK9.d.cts} +1 -1
  57. package/dist/{as-field-jh5AWref.mjs → as-field-iQ2H3VGd.mjs} +30 -42
  58. package/dist/{as-field-DAClnYiP.cjs → as-field-lMMfms8d.cjs} +29 -41
  59. package/dist/{as-field-shell-Cu8jxZYj.cjs → as-field-shell-BPesuJKa.cjs} +6 -6
  60. package/dist/{as-field-shell-DPzfvPo0.mjs → as-field-shell-QMsYyJ8r.mjs} +6 -6
  61. package/dist/as-field-shell.cjs +1 -1
  62. package/dist/as-field-shell.d.cts +1 -1
  63. package/dist/as-field-shell.d.mts +1 -1
  64. package/dist/as-field-shell.mjs +1 -1
  65. package/dist/{as-field-shell.vue-CPy2uA-b.d.mts → as-field-shell.vue-CQqwykWy.d.cts} +1 -1
  66. package/dist/{as-field-shell.vue-D-8AWUGW.d.cts → as-field-shell.vue-o7T2u4aw.d.mts} +1 -1
  67. package/dist/as-field.cjs +1 -1
  68. package/dist/as-field.d.mts +1 -1
  69. package/dist/as-field.mjs +1 -1
  70. package/dist/{as-form-B8d1MVTB.mjs → as-form-CuMRP5aZ.mjs} +26 -9
  71. package/dist/{as-form-r5pkXt5U.cjs → as-form-DE3TVGV-.cjs} +25 -8
  72. package/dist/as-form.cjs +1 -1
  73. package/dist/as-form.d.cts +1 -1
  74. package/dist/as-form.d.mts +1 -1
  75. package/dist/as-form.mjs +1 -1
  76. package/dist/{as-form.vue-BvRHy6mu.d.cts → as-form.vue-B9MZrw7V.d.cts} +16 -38
  77. package/dist/{as-form.vue-D1AS3Xf6.d.mts → as-form.vue-DwqofFJa.d.mts} +16 -38
  78. package/dist/{as-input-tKw19JnF.mjs → as-input-BEP6nX82.mjs} +6 -6
  79. package/dist/{as-input-BTbu0eF-.cjs → as-input-BrgRxZag.cjs} +6 -6
  80. package/dist/{as-input-control-1igViaqC.mjs → as-input-control-CINIJm-h.mjs} +13 -5
  81. package/dist/{as-input-control-uJpmle-G.cjs → as-input-control-DXJBrgih.cjs} +13 -5
  82. package/dist/as-input.cjs +1 -1
  83. package/dist/as-input.d.cts +1 -1
  84. package/dist/as-input.d.mts +1 -1
  85. package/dist/as-input.mjs +1 -1
  86. package/dist/{as-input.vue-CuC3DYeR.d.cts → as-input.vue-Cl8DTJqr.d.cts} +1 -1
  87. package/dist/{as-input.vue-DawR7pA-.d.mts → as-input.vue-CqV91VOb.d.mts} +1 -1
  88. package/dist/{as-iterator-B1o83rKV.mjs → as-iterator-DbCm61j1.mjs} +1 -1
  89. package/dist/{as-iterator-q_w9HBHt.cjs → as-iterator-DeLt7-BO.cjs} +1 -1
  90. package/dist/as-iterator.cjs +1 -1
  91. package/dist/as-iterator.d.mts +1 -1
  92. package/dist/as-iterator.mjs +1 -1
  93. package/dist/{as-multi-select-DPQ9_Qf1.cjs → as-multi-select-CJ3iRsiL.cjs} +4 -4
  94. package/dist/{as-multi-select-DhOlsgdq.mjs → as-multi-select-Ca2ULklw.mjs} +4 -4
  95. package/dist/as-multi-select.cjs +1 -1
  96. package/dist/as-multi-select.d.cts +1 -1
  97. package/dist/as-multi-select.d.mts +1 -1
  98. package/dist/as-multi-select.mjs +1 -1
  99. package/dist/{as-multi-select.vue-CbVBJq8N.d.mts → as-multi-select.vue-B6M_f7u-.d.cts} +1 -1
  100. package/dist/{as-multi-select.vue-CXC47PBk.d.cts → as-multi-select.vue-Cvvy1kMm.d.mts} +1 -1
  101. package/dist/{as-number-CJmX5rb1.cjs → as-number-CHXaKqtg.cjs} +5 -5
  102. package/dist/{as-number-CVjNUjiS.mjs → as-number-CgHRTx6P.mjs} +5 -5
  103. package/dist/as-number.cjs +1 -1
  104. package/dist/as-number.d.cts +1 -1
  105. package/dist/as-number.d.mts +1 -1
  106. package/dist/as-number.mjs +1 -1
  107. package/dist/{as-number.vue-BdNvLZca.d.mts → as-number.vue-5U6oFVJC.d.cts} +1 -1
  108. package/dist/{as-number.vue-hJuiJJ70.d.cts → as-number.vue-BN6_1oQf.d.mts} +1 -1
  109. package/dist/{as-object-DY5IEc94.mjs → as-object-BCeBkKCo.mjs} +7 -7
  110. package/dist/{as-object-Dq5CPM3i.cjs → as-object-Babu0BIk.cjs} +7 -7
  111. package/dist/as-object.cjs +1 -1
  112. package/dist/as-object.d.cts +1 -1
  113. package/dist/as-object.d.mts +1 -1
  114. package/dist/as-object.mjs +1 -1
  115. package/dist/{as-object.vue-DHFGLetx.d.cts → as-object.vue-BNCOIwjS.d.mts} +1 -1
  116. package/dist/{as-object.vue-DVK_BKOL.d.mts → as-object.vue-BnUdIcLW.d.cts} +1 -1
  117. package/dist/{as-paragraph-CaytophZ.cjs → as-paragraph-DHtc4LrM.cjs} +3 -3
  118. package/dist/{as-paragraph-ChOqmJe2.mjs → as-paragraph-ScTsCm_J.mjs} +3 -3
  119. package/dist/as-paragraph.cjs +1 -1
  120. package/dist/as-paragraph.d.cts +1 -1
  121. package/dist/as-paragraph.d.mts +1 -1
  122. package/dist/as-paragraph.mjs +1 -1
  123. package/dist/{as-paragraph.vue-6mBonWFb.d.mts → as-paragraph.vue-80Q1bZMd.d.cts} +1 -1
  124. package/dist/{as-paragraph.vue-B_aPmK-B.d.cts → as-paragraph.vue-Dhy9ke_Z.d.mts} +1 -1
  125. package/dist/{as-radio-C6PnEdjD.cjs → as-radio-BFM_CPvW.cjs} +4 -4
  126. package/dist/{as-radio-BW9K8h6V.mjs → as-radio-CL6Np-X5.mjs} +4 -4
  127. package/dist/as-radio.cjs +1 -1
  128. package/dist/as-radio.d.cts +1 -1
  129. package/dist/as-radio.d.mts +1 -1
  130. package/dist/as-radio.mjs +1 -1
  131. package/dist/{as-radio.vue-BFxeAHfl.d.mts → as-radio.vue-ByorW-nk.d.cts} +1 -1
  132. package/dist/{as-radio.vue-B_tDoVl1.d.cts → as-radio.vue-CLdvEAmZ.d.mts} +1 -1
  133. package/dist/{as-ref-DTsWT_zU.cjs → as-ref-CEj1RBnH.cjs} +14 -14
  134. package/dist/{as-ref-CXtYo-UZ.mjs → as-ref-D14yC6np.mjs} +14 -14
  135. package/dist/as-ref.cjs +1 -1
  136. package/dist/as-ref.d.cts +1 -1
  137. package/dist/as-ref.d.mts +1 -1
  138. package/dist/as-ref.mjs +1 -1
  139. package/dist/{as-ref.vue-CqFDKTYk.d.mts → as-ref.vue--ISeV6VM.d.cts} +1 -1
  140. package/dist/{as-ref.vue-gCsaCDQx.d.cts → as-ref.vue-DW7vsBE6.d.mts} +1 -1
  141. package/dist/{as-select-DOvo86Oc.cjs → as-select-B-ZeOCu5.cjs} +7 -16
  142. package/dist/{as-select-CbZNupL6.mjs → as-select-BME-vti2.mjs} +8 -17
  143. package/dist/as-select.cjs +1 -1
  144. package/dist/as-select.d.cts +1 -1
  145. package/dist/as-select.d.mts +1 -1
  146. package/dist/as-select.mjs +1 -1
  147. package/dist/{as-select.vue-BN3zvSGs.d.mts → as-select.vue-BEfTkycX.d.cts} +1 -1
  148. package/dist/{as-select.vue-Bh7ppdg9.d.cts → as-select.vue-C45NS5Rq.d.mts} +1 -1
  149. package/dist/{as-time-CfnhY3Pf.cjs → as-time-CnuojSkh.cjs} +6 -6
  150. package/dist/{as-time-BDpnkjy8.mjs → as-time-HRZh7pdx.mjs} +6 -6
  151. package/dist/as-time.cjs +1 -1
  152. package/dist/as-time.d.cts +1 -1
  153. package/dist/as-time.d.mts +1 -1
  154. package/dist/as-time.mjs +1 -1
  155. package/dist/{as-time.vue-C-ruJhmX.d.mts → as-time.vue--Qmcr-O0.d.cts} +1 -1
  156. package/dist/{as-time.vue-C_0z-HOS.d.cts → as-time.vue-0M0m0DXe.d.mts} +1 -1
  157. package/dist/{as-tuple-C5_dcvsH.cjs → as-tuple-XpcKK1LK.cjs} +8 -8
  158. package/dist/{as-tuple--wL64cCu.mjs → as-tuple-qHmf6fwJ.mjs} +8 -8
  159. package/dist/as-tuple.cjs +1 -1
  160. package/dist/as-tuple.d.cts +1 -1
  161. package/dist/as-tuple.d.mts +1 -1
  162. package/dist/as-tuple.mjs +1 -1
  163. package/dist/{as-tuple.vue-BDiSN-np.d.cts → as-tuple.vue-CKbx_YFz.d.mts} +1 -1
  164. package/dist/{as-tuple.vue-CGWun6Iw.d.mts → as-tuple.vue-Di5D2HD4.d.cts} +1 -1
  165. package/dist/{as-union-DAnpGBeK.mjs → as-union-Ca5o9xw2.mjs} +7 -7
  166. package/dist/{as-union-D3NoKN1H.cjs → as-union-CwB0ACpI.cjs} +7 -7
  167. package/dist/as-union.cjs +1 -1
  168. package/dist/as-union.d.cts +1 -1
  169. package/dist/as-union.d.mts +1 -1
  170. package/dist/as-union.mjs +1 -1
  171. package/dist/{as-union.vue-BpcREl7L.d.mts → as-union.vue-UnG0zG81.d.cts} +1 -1
  172. package/dist/{as-union.vue-DuUeLY1X.d.cts → as-union.vue-eGlHN_hp.d.mts} +1 -1
  173. package/dist/{as-variant-picker-CihlFH-c.mjs → as-variant-picker-CKSLKefM.mjs} +2 -2
  174. package/dist/{as-variant-picker-CpCxKFtT.cjs → as-variant-picker-CceIhZUk.cjs} +2 -2
  175. package/dist/index.cjs +29 -27
  176. package/dist/index.d.cts +23 -23
  177. package/dist/index.d.mts +25 -25
  178. package/dist/index.mjs +29 -28
  179. package/dist/locale.cjs +2 -0
  180. package/dist/locale.d.cts +2 -2
  181. package/dist/locale.d.mts +2 -2
  182. package/dist/locale.mjs +2 -1
  183. package/dist/{types-271BUWyf.d.mts → types-C5Gx4ZuF.d.mts} +86 -8
  184. package/dist/{types-DbjorSCn.d.cts → types-D23g9Vs-.d.cts} +86 -8
  185. package/dist/{use-as-date-iSu5NS79.mjs → use-as-date-B2hKWXAl.mjs} +3 -3
  186. package/dist/{use-as-date-BigwPKEs.cjs → use-as-date-BWJbi_j2.cjs} +3 -3
  187. package/dist/{use-as-value-help-DE8KCbqo.mjs → use-as-value-help-B5yNO1tE.mjs} +45 -28
  188. package/dist/{use-as-value-help-CQMUkP1r.cjs → use-as-value-help-ZR_BvS0L.cjs} +48 -25
  189. package/dist/{use-as-locale-D4NDG8Vg.d.mts → use-value-help-texts-BL1qfGA2.d.cts} +26 -2
  190. package/dist/use-value-help-texts-LySFdZya.mjs +52 -0
  191. package/dist/{use-as-locale-CtvT6oO5.d.cts → use-value-help-texts-fzgKU4NG.d.mts} +26 -2
  192. package/dist/use-value-help-texts-ikiPKy-U.cjs +57 -0
  193. package/package.json +9 -9
  194. /package/dist/{_editing-hold-D2uqwszu.cjs → _editing-hold-DbM25sc_.cjs} +0 -0
  195. /package/dist/{_editing-hold-D_X5gXHh.mjs → _editing-hold-s65mkJu2.mjs} +0 -0
  196. /package/dist/{_shape-A661ZxnJ.mjs → _shape-CnW2sBRs.mjs} +0 -0
  197. /package/dist/{_shape-7OdPsQao.cjs → _shape-DPDZTV_T.cjs} +0 -0
  198. /package/dist/{as-adornment-shell-CBaksXGT.mjs → as-adornment-shell-C_z_q-mz.mjs} +0 -0
  199. /package/dist/{as-adornment-shell-CmS9BOFm.cjs → as-adornment-shell-CgwCACXA.cjs} +0 -0
  200. /package/dist/{as-collapsible-CvBoWb0D.mjs → as-collapsible-B9KPgJyo.mjs} +0 -0
  201. /package/dist/{as-collapsible-CTOLQ3IK.cjs → as-collapsible-C37-3_Rp.cjs} +0 -0
  202. /package/dist/{as-field.vue-BWaTLJd6.d.mts → as-field.vue-BMg2Ep8h.d.mts} +0 -0
  203. /package/dist/{as-iterator.vue-BUCohjxw.d.mts → as-iterator.vue-BdUxcovH.d.mts} +0 -0
  204. /package/dist/{use-as-model-texts-C3V56UDt.cjs → use-as-model-texts-BSFCEwAa.cjs} +0 -0
  205. /package/dist/{use-as-model-texts-Cpx5bHJQ.mjs → use-as-model-texts-BXSEzUWJ.mjs} +0 -0
  206. /package/dist/{use-as-optional-add-flow-DMDd4Ms0.cjs → use-as-optional-add-flow-CsUjhfkc.cjs} +0 -0
  207. /package/dist/{use-as-optional-add-flow-C1Ol6KO2.mjs → use-as-optional-add-flow-WA-R6yXz.mjs} +0 -0
  208. /package/dist/{variant-label-_GLezszT.cjs → variant-label-CSzBE4T6.cjs} +0 -0
  209. /package/dist/{variant-label-CmzTQC2B.mjs → variant-label-Drm3s-28.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { b as TFormState, d as TAsFormSubmitResult, f as TAsFormValue, g as TAsFormError, l as TAsTypeComponents, r as TAsChangeType, s as TAsComponentProps, t as AsFormExposed, u as TAsUnionContext, y as TFormRule } from "./types-DbjorSCn.cjs";
1
+ import { C as TFormState, S as TFormRule, d as TAsFormSubmitResult, f as TAsFormValue, g as UseAsDataReturn, l as TAsTypeComponents, r as TAsChangeType, s as TAsComponentProps, t as AsFormExposed, u as TAsUnionContext, v as TAsFormError } from "./types-D23g9Vs-.cjs";
2
2
  import * as vue from "vue";
3
3
  import { Component, ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, WritableComputedRef } from "vue";
4
4
  import * as _atscript_ui0 from "@atscript/ui";
@@ -95,6 +95,12 @@ declare function useAsState<TFormData, TContext>(opts: {
95
95
  formContext?: MaybeRef<TContext>;
96
96
  firstValidation?: MaybeRef<TFormState["firstValidation"] | undefined>; /** When provided, replaces per-field iteration on submit. */
97
97
  submitValidator?: TFormSubmitValidator;
98
+ /**
99
+ * The client factory dictionary texts are read with (`formState.displayText`):
100
+ * the form's. Default: the one the form's pickers use — provided above it
101
+ * (`CLIENT_FACTORY_KEY`), else the app-wide one. Since 0.1.207.
102
+ */
103
+ clientFactory?: ClientFactory;
98
104
  }): UseAsStateReturn;
99
105
  //#endregion
100
106
  //#region src/composables/use-as-external-errors.d.ts
@@ -239,7 +245,6 @@ interface UseAsValueHelpReturn {
239
245
  searchText: Ref<string>;
240
246
  results: ShallowRef<Record<string, unknown>[]>;
241
247
  searching: Ref<boolean>;
242
- labelIsFkValue: ComputedRef<boolean>;
243
248
  kickoff: () => Promise<void>;
244
249
  /**
245
250
  * The one pick path: commits `item[info.targetField]`, writes the binding's
@@ -806,40 +811,6 @@ interface UseAsTypeMapReturn {
806
811
  */
807
812
  declare function useAsTypeMap(): UseAsTypeMapReturn;
808
813
  //#endregion
809
- //#region src/composables/use-as-data.d.ts
810
- interface UseAsDataReturn {
811
- /** Domain data (the unwrapped inner value of the form's `{ value }` container). */
812
- rootData: ComputedRef<unknown>;
813
- /** Read the value at an absolute dotted path inside the form. */
814
- getValueAt: (path: string) => ComputedRef<unknown>;
815
- /** Read a sibling field's value relative to the current `useAsPath()` prefix. */
816
- siblingValue: <T = unknown>(name: string) => ComputedRef<T | undefined>;
817
- /**
818
- * Write the value at an absolute dotted path inside the form (missing
819
- * containers are created: an array where the next segment is an index,
820
- * else an object; an empty form root too). The write is a committed edit:
821
- * change tracking sees it, the field at that path re-validates like one the
822
- * user changed, and `AsForm` emits `change` with type `"update"`. Outside a
823
- * form, a no-op.
824
- */
825
- setValueAt: (path: string, value: unknown) => void;
826
- /**
827
- * Write a sibling field's value, relative to the current `useAsPath()`
828
- * prefix — e.g. a custom picker filling the fields next to it. Same rules
829
- * as `setValueAt`.
830
- */
831
- setSibling: (name: string, value: unknown) => void;
832
- }
833
- /**
834
- * Reactive access to form data at any point in the `<AsForm>` tree: readers
835
- * plus `setValueAt` / `setSibling` writers. Outside a form, all readers
836
- * return `undefined` and the writers do nothing.
837
- *
838
- * Call sites get a `ComputedRef` so they can compose it directly with
839
- * other reactive primitives without an extra `computed()` wrapper.
840
- */
841
- declare function useAsData(): UseAsDataReturn;
842
- //#endregion
843
814
  //#region src/composables/use-as-error-dismiss.d.ts
844
815
  /**
845
816
  * Imperative dismissal of an external (server-supplied) error at a given
@@ -922,8 +893,8 @@ interface Props<TF, TC> {
922
893
  }
923
894
  declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
924
895
  props: vue.PublicProps & __VLS_PrettifyLocal<Props<TFormData, TFormContext> & {
925
- onError?: ((errors: TAsFormError[]) => any) | undefined;
926
896
  onSubmit?: ((data: TAsFormValue<TFormData>) => any) | undefined;
897
+ onError?: ((errors: TAsFormError[]) => any) | undefined;
927
898
  onAction?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
928
899
  "onUnsupported-action"?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
929
900
  onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TAsFormValue<TFormData>) => any) | undefined;
@@ -955,6 +926,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
955
926
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
956
927
  getChanges: () => FormFieldChange[];
957
928
  isDirtyPath: (path: string) => boolean;
929
+ displayText: UseAsDataReturn["displayText"];
958
930
  }) => any;
959
931
  } & {
960
932
  'form.before'?: (props: {
@@ -979,6 +951,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
979
951
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
980
952
  getChanges: () => FormFieldChange[];
981
953
  isDirtyPath: (path: string) => boolean;
954
+ displayText: UseAsDataReturn["displayText"];
982
955
  }) => any;
983
956
  } & {
984
957
  'form.after'?: (props: {
@@ -1003,6 +976,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1003
976
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1004
977
  getChanges: () => FormFieldChange[];
1005
978
  isDirtyPath: (path: string) => boolean;
979
+ displayText: UseAsDataReturn["displayText"];
1006
980
  }) => any;
1007
981
  } & {
1008
982
  'form.error'?: (props: {
@@ -1029,6 +1003,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1029
1003
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1030
1004
  getChanges: () => FormFieldChange[];
1031
1005
  isDirtyPath: (path: string) => boolean;
1006
+ displayText: UseAsDataReturn["displayText"];
1032
1007
  }) => any;
1033
1008
  } & {
1034
1009
  'form.submit'?: (props: {
@@ -1054,6 +1029,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1054
1029
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1055
1030
  getChanges: () => FormFieldChange[];
1056
1031
  isDirtyPath: (path: string) => boolean;
1032
+ displayText: UseAsDataReturn["displayText"];
1057
1033
  }) => any;
1058
1034
  } & {
1059
1035
  'form.footer'?: (props: {
@@ -1078,6 +1054,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1078
1054
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1079
1055
  getChanges: () => FormFieldChange[];
1080
1056
  isDirtyPath: (path: string) => boolean;
1057
+ displayText: UseAsDataReturn["displayText"];
1081
1058
  }) => any;
1082
1059
  } & {
1083
1060
  'form.loading'?: (props: {
@@ -1102,6 +1079,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1102
1079
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1103
1080
  getChanges: () => FormFieldChange[];
1104
1081
  isDirtyPath: (path: string) => boolean;
1082
+ displayText: UseAsDataReturn["displayText"];
1105
1083
  }) => any;
1106
1084
  };
1107
1085
  emit: {
@@ -1117,4 +1095,4 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1117
1095
  declare const _default: typeof __VLS_export;
1118
1096
  type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
1119
1097
  //#endregion
1120
- export { useAsOptionalField as $, useAsDate as A, createDefaultTypes as At, variantLabel as B, useAsData as C, useAsExternalErrors as Ct, useAsPath as D, UseAsFieldOptions as Dt, UseAsPathReturn as E, useAsState as Et, UseAsNumberReturn as F, UseAsOptionalAddFlowOptions as G, UseAsTriStateCheckboxOptions as H, useAsNumber as I, focusFirstAfter as J, UseAsOptionalAddFlowReturn as K, UseAsDecimalOptions as L, UseAsDualInputReturn as M, useAsDualInput as N, UseAsDateOptions as O, UseAsFieldReturn as Ot, UseAsNumberOptions as P, UseAsOptionalFieldReturn as Q, UseAsDecimalReturn as R, UseAsDataReturn as S, UseAsExternalErrorsReturn as St, useAsTypeMap as T, UseAsStateReturn as Tt, UseAsTriStateCheckboxReturn as U, useAsModelTexts as V, useAsTriStateCheckbox as W, useAsFocusFirstAfter as X, focusNewFocusableAfter as Y, useAsVisibleFields as Z, resolveOptionalMode as _, UseAsTupleReturn as _t, FormFieldChange$1 as a, AsNestedSectionsStore as at, AsErrorDismiss as b, useAsArray as bt, TypedClientFactory as c, useAsNestedSectionsStore as ct, getDefaultClientFactory as d, UseAsValueHelpReturn as dt, TResolveFieldPropOptions as et, getDefaultOptionalMode as f, useAsValueHelp as ft, resetDefaultClientFactory as g, useAsUnion as gt, joinPath as h, UseAsUnionReturn as ht, FormDiffOptions$1 as i, useAsLevel as it, UseAsDualInputOptions as j, createAsFormDef as jt, UseAsDateReturn as k, useAsField as kt, UI_FORM_OPTIONAL_MODE as l, useAsDropdown as lt, isFieldHidden as m, useAsUnionVariant as mt, _default as n, useAsFieldScope as nt, FormRebaseOptions$1 as o, provideAsNestedSectionsStore as ot, hasFieldMeta as p, formatIndexedLabelParts as pt, useAsOptionalAddFlow as q, ClientFactory$1 as r, provideAsNestedLevel as rt, TOptionalMode$1 as s, useAsDescendantErrorCounts as st, Props as t, UseAsFieldScopeReturn as tt, emptiedValue as u, UseAsValueHelpOptions as ut, setDefaultClientFactory as v, useAsTuple as vt, UseAsTypeMapReturn as w, TFormSubmitValidator as wt, useAsErrorDismiss as x, UseAsExternalErrorsOptions as xt, setDefaultOptionalMode as y, UseAsArrayReturn as yt, useAsDecimal as z };
1098
+ export { UseAsFieldScopeReturn as $, UseAsDualInputReturn as A, UseAsTriStateCheckboxOptions as B, useAsTypeMap as C, UseAsStateReturn as Ct, UseAsDateReturn as D, useAsField as Dt, UseAsDateOptions as E, UseAsFieldReturn as Et, UseAsDecimalOptions as F, useAsOptionalAddFlow as G, useAsTriStateCheckbox as H, UseAsDecimalReturn as I, useAsFocusFirstAfter as J, focusFirstAfter as K, useAsDecimal as L, UseAsNumberOptions as M, UseAsNumberReturn as N, useAsDate as O, createDefaultTypes as Ot, useAsNumber as P, TResolveFieldPropOptions as Q, variantLabel as R, UseAsTypeMapReturn as S, TFormSubmitValidator as St, useAsPath as T, UseAsFieldOptions as Tt, UseAsOptionalAddFlowOptions as U, UseAsTriStateCheckboxReturn as V, UseAsOptionalAddFlowReturn as W, UseAsOptionalFieldReturn as X, useAsVisibleFields as Y, useAsOptionalField as Z, resolveOptionalMode as _, UseAsArrayReturn as _t, FormFieldChange$1 as a, useAsDescendantErrorCounts as at, AsErrorDismiss as b, UseAsExternalErrorsReturn as bt, TypedClientFactory as c, UseAsValueHelpOptions as ct, getDefaultClientFactory as d, formatIndexedLabelParts as dt, useAsFieldScope as et, getDefaultOptionalMode as f, useAsUnionVariant as ft, resetDefaultClientFactory as g, useAsTuple as gt, joinPath as h, UseAsTupleReturn as ht, FormDiffOptions$1 as i, provideAsNestedSectionsStore as it, useAsDualInput as j, UseAsDualInputOptions as k, createAsFormDef as kt, UI_FORM_OPTIONAL_MODE as l, UseAsValueHelpReturn as lt, isFieldHidden as m, useAsUnion as mt, _default as n, useAsLevel as nt, FormRebaseOptions$1 as o, useAsNestedSectionsStore as ot, hasFieldMeta as p, UseAsUnionReturn as pt, focusNewFocusableAfter as q, ClientFactory$1 as r, AsNestedSectionsStore as rt, TOptionalMode$1 as s, useAsDropdown as st, Props as t, provideAsNestedLevel as tt, emptiedValue as u, useAsValueHelp as ut, setDefaultClientFactory as v, useAsArray as vt, UseAsPathReturn as w, useAsState as wt, useAsErrorDismiss as x, useAsExternalErrors as xt, setDefaultOptionalMode as y, UseAsExternalErrorsOptions as yt, useAsModelTexts as z };
@@ -1,4 +1,4 @@
1
- import { b as TFormState, d as TAsFormSubmitResult, f as TAsFormValue, g as TAsFormError, l as TAsTypeComponents, r as TAsChangeType, s as TAsComponentProps, t as AsFormExposed, u as TAsUnionContext, y as TFormRule } from "./types-271BUWyf.mjs";
1
+ import { C as TFormState, S as TFormRule, d as TAsFormSubmitResult, f as TAsFormValue, g as UseAsDataReturn, l as TAsTypeComponents, r as TAsChangeType, s as TAsComponentProps, t as AsFormExposed, u as TAsUnionContext, v as TAsFormError } from "./types-C5Gx4ZuF.mjs";
2
2
  import * as vue from "vue";
3
3
  import { Component, ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, WritableComputedRef } from "vue";
4
4
  import * as _atscript_ui0 from "@atscript/ui";
@@ -95,6 +95,12 @@ declare function useAsState<TFormData, TContext>(opts: {
95
95
  formContext?: MaybeRef<TContext>;
96
96
  firstValidation?: MaybeRef<TFormState["firstValidation"] | undefined>; /** When provided, replaces per-field iteration on submit. */
97
97
  submitValidator?: TFormSubmitValidator;
98
+ /**
99
+ * The client factory dictionary texts are read with (`formState.displayText`):
100
+ * the form's. Default: the one the form's pickers use — provided above it
101
+ * (`CLIENT_FACTORY_KEY`), else the app-wide one. Since 0.1.207.
102
+ */
103
+ clientFactory?: ClientFactory;
98
104
  }): UseAsStateReturn;
99
105
  //#endregion
100
106
  //#region src/composables/use-as-external-errors.d.ts
@@ -239,7 +245,6 @@ interface UseAsValueHelpReturn {
239
245
  searchText: Ref<string>;
240
246
  results: ShallowRef<Record<string, unknown>[]>;
241
247
  searching: Ref<boolean>;
242
- labelIsFkValue: ComputedRef<boolean>;
243
248
  kickoff: () => Promise<void>;
244
249
  /**
245
250
  * The one pick path: commits `item[info.targetField]`, writes the binding's
@@ -806,40 +811,6 @@ interface UseAsTypeMapReturn {
806
811
  */
807
812
  declare function useAsTypeMap(): UseAsTypeMapReturn;
808
813
  //#endregion
809
- //#region src/composables/use-as-data.d.ts
810
- interface UseAsDataReturn {
811
- /** Domain data (the unwrapped inner value of the form's `{ value }` container). */
812
- rootData: ComputedRef<unknown>;
813
- /** Read the value at an absolute dotted path inside the form. */
814
- getValueAt: (path: string) => ComputedRef<unknown>;
815
- /** Read a sibling field's value relative to the current `useAsPath()` prefix. */
816
- siblingValue: <T = unknown>(name: string) => ComputedRef<T | undefined>;
817
- /**
818
- * Write the value at an absolute dotted path inside the form (missing
819
- * containers are created: an array where the next segment is an index,
820
- * else an object; an empty form root too). The write is a committed edit:
821
- * change tracking sees it, the field at that path re-validates like one the
822
- * user changed, and `AsForm` emits `change` with type `"update"`. Outside a
823
- * form, a no-op.
824
- */
825
- setValueAt: (path: string, value: unknown) => void;
826
- /**
827
- * Write a sibling field's value, relative to the current `useAsPath()`
828
- * prefix — e.g. a custom picker filling the fields next to it. Same rules
829
- * as `setValueAt`.
830
- */
831
- setSibling: (name: string, value: unknown) => void;
832
- }
833
- /**
834
- * Reactive access to form data at any point in the `<AsForm>` tree: readers
835
- * plus `setValueAt` / `setSibling` writers. Outside a form, all readers
836
- * return `undefined` and the writers do nothing.
837
- *
838
- * Call sites get a `ComputedRef` so they can compose it directly with
839
- * other reactive primitives without an extra `computed()` wrapper.
840
- */
841
- declare function useAsData(): UseAsDataReturn;
842
- //#endregion
843
814
  //#region src/composables/use-as-error-dismiss.d.ts
844
815
  /**
845
816
  * Imperative dismissal of an external (server-supplied) error at a given
@@ -922,8 +893,8 @@ interface Props<TF, TC> {
922
893
  }
923
894
  declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
924
895
  props: vue.PublicProps & __VLS_PrettifyLocal<Props<TFormData, TFormContext> & {
925
- onError?: ((errors: TAsFormError[]) => any) | undefined;
926
896
  onSubmit?: ((data: TAsFormValue<TFormData>) => any) | undefined;
897
+ onError?: ((errors: TAsFormError[]) => any) | undefined;
927
898
  onAction?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
928
899
  "onUnsupported-action"?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
929
900
  onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TAsFormValue<TFormData>) => any) | undefined;
@@ -955,6 +926,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
955
926
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
956
927
  getChanges: () => FormFieldChange[];
957
928
  isDirtyPath: (path: string) => boolean;
929
+ displayText: UseAsDataReturn["displayText"];
958
930
  }) => any;
959
931
  } & {
960
932
  'form.before'?: (props: {
@@ -979,6 +951,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
979
951
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
980
952
  getChanges: () => FormFieldChange[];
981
953
  isDirtyPath: (path: string) => boolean;
954
+ displayText: UseAsDataReturn["displayText"];
982
955
  }) => any;
983
956
  } & {
984
957
  'form.after'?: (props: {
@@ -1003,6 +976,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1003
976
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1004
977
  getChanges: () => FormFieldChange[];
1005
978
  isDirtyPath: (path: string) => boolean;
979
+ displayText: UseAsDataReturn["displayText"];
1006
980
  }) => any;
1007
981
  } & {
1008
982
  'form.error'?: (props: {
@@ -1029,6 +1003,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1029
1003
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1030
1004
  getChanges: () => FormFieldChange[];
1031
1005
  isDirtyPath: (path: string) => boolean;
1006
+ displayText: UseAsDataReturn["displayText"];
1032
1007
  }) => any;
1033
1008
  } & {
1034
1009
  'form.submit'?: (props: {
@@ -1054,6 +1029,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1054
1029
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1055
1030
  getChanges: () => FormFieldChange[];
1056
1031
  isDirtyPath: (path: string) => boolean;
1032
+ displayText: UseAsDataReturn["displayText"];
1057
1033
  }) => any;
1058
1034
  } & {
1059
1035
  'form.footer'?: (props: {
@@ -1078,6 +1054,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1078
1054
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1079
1055
  getChanges: () => FormFieldChange[];
1080
1056
  isDirtyPath: (path: string) => boolean;
1057
+ displayText: UseAsDataReturn["displayText"];
1081
1058
  }) => any;
1082
1059
  } & {
1083
1060
  'form.loading'?: (props: {
@@ -1102,6 +1079,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1102
1079
  getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
1103
1080
  getChanges: () => FormFieldChange[];
1104
1081
  isDirtyPath: (path: string) => boolean;
1082
+ displayText: UseAsDataReturn["displayText"];
1105
1083
  }) => any;
1106
1084
  };
1107
1085
  emit: {
@@ -1117,4 +1095,4 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
1117
1095
  declare const _default: typeof __VLS_export;
1118
1096
  type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
1119
1097
  //#endregion
1120
- export { useAsOptionalField as $, useAsDate as A, createDefaultTypes as At, variantLabel as B, useAsData as C, useAsExternalErrors as Ct, useAsPath as D, UseAsFieldOptions as Dt, UseAsPathReturn as E, useAsState as Et, UseAsNumberReturn as F, UseAsOptionalAddFlowOptions as G, UseAsTriStateCheckboxOptions as H, useAsNumber as I, focusFirstAfter as J, UseAsOptionalAddFlowReturn as K, UseAsDecimalOptions as L, UseAsDualInputReturn as M, useAsDualInput as N, UseAsDateOptions as O, UseAsFieldReturn as Ot, UseAsNumberOptions as P, UseAsOptionalFieldReturn as Q, UseAsDecimalReturn as R, UseAsDataReturn as S, UseAsExternalErrorsReturn as St, useAsTypeMap as T, UseAsStateReturn as Tt, UseAsTriStateCheckboxReturn as U, useAsModelTexts as V, useAsTriStateCheckbox as W, useAsFocusFirstAfter as X, focusNewFocusableAfter as Y, useAsVisibleFields as Z, resolveOptionalMode$1 as _, UseAsTupleReturn as _t, FormFieldChange$1 as a, AsNestedSectionsStore as at, AsErrorDismiss as b, useAsArray as bt, TypedClientFactory as c, useAsNestedSectionsStore as ct, getDefaultClientFactory as d, UseAsValueHelpReturn as dt, TResolveFieldPropOptions as et, getDefaultOptionalMode as f, useAsValueHelp as ft, resetDefaultClientFactory as g, useAsUnion as gt, joinPath$1 as h, UseAsUnionReturn as ht, FormDiffOptions$1 as i, useAsLevel as it, UseAsDualInputOptions as j, createAsFormDef as jt, UseAsDateReturn as k, useAsField as kt, UI_FORM_OPTIONAL_MODE as l, useAsDropdown as lt, isFieldHidden$1 as m, useAsUnionVariant as mt, _default as n, useAsFieldScope as nt, FormRebaseOptions$1 as o, provideAsNestedSectionsStore as ot, hasFieldMeta$1 as p, formatIndexedLabelParts as pt, useAsOptionalAddFlow as q, ClientFactory$1 as r, provideAsNestedLevel as rt, TOptionalMode$1 as s, useAsDescendantErrorCounts as st, Props as t, UseAsFieldScopeReturn as tt, emptiedValue$1 as u, UseAsValueHelpOptions as ut, setDefaultClientFactory as v, useAsTuple as vt, UseAsTypeMapReturn as w, TFormSubmitValidator as wt, useAsErrorDismiss as x, UseAsExternalErrorsOptions as xt, setDefaultOptionalMode as y, UseAsArrayReturn as yt, useAsDecimal as z };
1098
+ export { UseAsFieldScopeReturn as $, UseAsDualInputReturn as A, UseAsTriStateCheckboxOptions as B, useAsTypeMap as C, UseAsStateReturn as Ct, UseAsDateReturn as D, useAsField as Dt, UseAsDateOptions as E, UseAsFieldReturn as Et, UseAsDecimalOptions as F, useAsOptionalAddFlow as G, useAsTriStateCheckbox as H, UseAsDecimalReturn as I, useAsFocusFirstAfter as J, focusFirstAfter as K, useAsDecimal as L, UseAsNumberOptions as M, UseAsNumberReturn as N, useAsDate as O, createDefaultTypes as Ot, useAsNumber as P, TResolveFieldPropOptions as Q, variantLabel as R, UseAsTypeMapReturn as S, TFormSubmitValidator as St, useAsPath as T, UseAsFieldOptions as Tt, UseAsOptionalAddFlowOptions as U, UseAsTriStateCheckboxReturn as V, UseAsOptionalAddFlowReturn as W, UseAsOptionalFieldReturn as X, useAsVisibleFields as Y, useAsOptionalField as Z, resolveOptionalMode$1 as _, UseAsArrayReturn as _t, FormFieldChange$1 as a, useAsDescendantErrorCounts as at, AsErrorDismiss as b, UseAsExternalErrorsReturn as bt, TypedClientFactory as c, UseAsValueHelpOptions as ct, getDefaultClientFactory as d, formatIndexedLabelParts as dt, useAsFieldScope as et, getDefaultOptionalMode as f, useAsUnionVariant as ft, resetDefaultClientFactory as g, useAsTuple as gt, joinPath$1 as h, UseAsTupleReturn as ht, FormDiffOptions$1 as i, provideAsNestedSectionsStore as it, useAsDualInput as j, UseAsDualInputOptions as k, createAsFormDef as kt, UI_FORM_OPTIONAL_MODE as l, UseAsValueHelpReturn as lt, isFieldHidden$1 as m, useAsUnion as mt, _default as n, useAsLevel as nt, FormRebaseOptions$1 as o, useAsNestedSectionsStore as ot, hasFieldMeta$1 as p, UseAsUnionReturn as pt, focusNewFocusableAfter as q, ClientFactory$1 as r, AsNestedSectionsStore as rt, TOptionalMode$1 as s, useAsDropdown as st, Props as t, provideAsNestedLevel as tt, emptiedValue$1 as u, useAsValueHelp as ut, setDefaultClientFactory as v, useAsArray as vt, UseAsPathReturn as w, useAsState as wt, useAsErrorDismiss as x, useAsExternalErrors as xt, setDefaultOptionalMode as y, UseAsExternalErrorsOptions as yt, useAsModelTexts as z };
@@ -1,6 +1,6 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-DPzfvPo0.mjs";
2
- import { t as as_input_control_default } from "./as-input-control-1igViaqC.mjs";
3
- import { t as as_adornment_shell_default } from "./as-adornment-shell-CBaksXGT.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-QMsYyJ8r.mjs";
2
+ import { t as as_input_control_default } from "./as-input-control-CINIJm-h.mjs";
3
+ import { t as as_adornment_shell_default } from "./as-adornment-shell-C_z_q-mz.mjs";
4
4
  import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, withCtx } from "vue";
5
5
  //#endregion
6
6
  //#region src/components/defaults/as-input.vue
@@ -142,9 +142,9 @@ var as_input_default = /* @__PURE__ */ defineComponent({
142
142
  type: Object,
143
143
  required: false
144
144
  },
145
- valueLabel: {
146
- type: String,
147
- required: false
145
+ displayText: {
146
+ type: Function,
147
+ required: true
148
148
  },
149
149
  singularLabel: {
150
150
  type: String,
@@ -1,6 +1,6 @@
1
- const require_as_field_shell = require("./as-field-shell-Cu8jxZYj.cjs");
2
- const require_as_input_control = require("./as-input-control-uJpmle-G.cjs");
3
- const require_as_adornment_shell = require("./as-adornment-shell-CmS9BOFm.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-BPesuJKa.cjs");
2
+ const require_as_input_control = require("./as-input-control-DXJBrgih.cjs");
3
+ const require_as_adornment_shell = require("./as-adornment-shell-CgwCACXA.cjs");
4
4
  let vue = require("vue");
5
5
  //#endregion
6
6
  //#region src/components/defaults/as-input.vue
@@ -142,9 +142,9 @@ var as_input_default = /* @__PURE__ */ (0, vue.defineComponent)({
142
142
  type: Object,
143
143
  required: false
144
144
  },
145
- valueLabel: {
146
- type: String,
147
- required: false
145
+ displayText: {
146
+ type: Function,
147
+ required: true
148
148
  },
149
149
  singularLabel: {
150
150
  type: String,
@@ -165,9 +165,9 @@ var as_input_control_default = /* @__PURE__ */ defineComponent({
165
165
  type: Object,
166
166
  required: false
167
167
  },
168
- valueLabel: {
169
- type: String,
170
- required: false
168
+ displayText: {
169
+ type: Function,
170
+ required: true
171
171
  },
172
172
  singularLabel: {
173
173
  type: String,
@@ -242,11 +242,19 @@ var as_input_control_default = /* @__PURE__ */ defineComponent({
242
242
  * `""` or `null`).
243
243
  */
244
244
  const inputModel = computed({
245
- get: () => props.readonly && props.valueLabel !== void 0 ? props.valueLabel : props.model.value,
245
+ get: () => props.readonly ? shownText.value : props.model.value,
246
246
  set: (v) => {
247
247
  props.model.value = v === "" ? props.emptiedValue : v;
248
248
  }
249
249
  });
250
+ /** What a read-only input shows; never read while the field is edited (no dictionary read). */
251
+ const shownText = computed(() => props.readonly ? props.displayText() : "");
252
+ /** A read-only value shown with words (`Berlin (BER)`) needs a text input, not a number one. */
253
+ const inputType = computed(() => {
254
+ if (!props.readonly || props.type !== "number") return props.type;
255
+ const value = props.model.value;
256
+ return shownText.value === (value === null || value === void 0 ? "" : String(value)) ? props.type : "text";
257
+ });
250
258
  /**
251
259
  * UX polish — numeric inputs select-all on focus so the next keystroke
252
260
  * replaces the existing value. Skipped for text/password/textarea where
@@ -282,7 +290,7 @@ var as_input_control_default = /* @__PURE__ */ defineComponent({
282
290
  placeholder: __props.placeholder,
283
291
  autocomplete: __props.autocomplete,
284
292
  name: __props.name,
285
- type: __props.readonly && __props.valueLabel !== void 0 ? "text" : __props.type,
293
+ type: inputType.value,
286
294
  disabled: __props.disabled,
287
295
  readonly: __props.readonly,
288
296
  "aria-required": __props.required || void 0,
@@ -165,9 +165,9 @@ var as_input_control_default = /* @__PURE__ */ (0, vue.defineComponent)({
165
165
  type: Object,
166
166
  required: false
167
167
  },
168
- valueLabel: {
169
- type: String,
170
- required: false
168
+ displayText: {
169
+ type: Function,
170
+ required: true
171
171
  },
172
172
  singularLabel: {
173
173
  type: String,
@@ -242,11 +242,19 @@ var as_input_control_default = /* @__PURE__ */ (0, vue.defineComponent)({
242
242
  * `""` or `null`).
243
243
  */
244
244
  const inputModel = (0, vue.computed)({
245
- get: () => props.readonly && props.valueLabel !== void 0 ? props.valueLabel : props.model.value,
245
+ get: () => props.readonly ? shownText.value : props.model.value,
246
246
  set: (v) => {
247
247
  props.model.value = v === "" ? props.emptiedValue : v;
248
248
  }
249
249
  });
250
+ /** What a read-only input shows; never read while the field is edited (no dictionary read). */
251
+ const shownText = (0, vue.computed)(() => props.readonly ? props.displayText() : "");
252
+ /** A read-only value shown with words (`Berlin (BER)`) needs a text input, not a number one. */
253
+ const inputType = (0, vue.computed)(() => {
254
+ if (!props.readonly || props.type !== "number") return props.type;
255
+ const value = props.model.value;
256
+ return shownText.value === (value === null || value === void 0 ? "" : String(value)) ? props.type : "text";
257
+ });
250
258
  /**
251
259
  * UX polish — numeric inputs select-all on focus so the next keystroke
252
260
  * replaces the existing value. Skipped for text/password/textarea where
@@ -282,7 +290,7 @@ var as_input_control_default = /* @__PURE__ */ (0, vue.defineComponent)({
282
290
  placeholder: __props.placeholder,
283
291
  autocomplete: __props.autocomplete,
284
292
  name: __props.name,
285
- type: __props.readonly && __props.valueLabel !== void 0 ? "text" : __props.type,
293
+ type: inputType.value,
286
294
  disabled: __props.disabled,
287
295
  readonly: __props.readonly,
288
296
  "aria-required": __props.required || void 0,
package/dist/as-input.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_input = require("./as-input-BTbu0eF-.cjs");
1
+ const require_as_input = require("./as-input-BrgRxZag.cjs");
2
2
  module.exports = require_as_input.as_input_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-input.vue-CuC3DYeR.cjs";
1
+ import { t as _default } from "./as-input.vue-Cl8DTJqr.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-input.vue-DawR7pA-.mjs";
1
+ import { t as _default } from "./as-input.vue-CqV91VOb.mjs";
2
2
  export { _default as default };
package/dist/as-input.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_input_default } from "./as-input-tKw19JnF.mjs";
1
+ import { t as as_input_default } from "./as-input-BEP6nX82.mjs";
2
2
  export { as_input_default as default };
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-DbjorSCn.cjs";
1
+ import { s as TAsComponentProps } from "./types-D23g9Vs-.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-input.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-271BUWyf.mjs";
1
+ import { s as TAsComponentProps } from "./types-C5Gx4ZuF.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-input.vue.d.ts
@@ -1,5 +1,5 @@
1
1
  import { g as LEVEL_KEY, y as PATH_PREFIX_KEY } from "./use-form-context-0FtVVTvf.mjs";
2
- import { t as as_field_default } from "./as-field-jh5AWref.mjs";
2
+ import { t as as_field_default } from "./as-field-iQ2H3VGd.mjs";
3
3
  import { Fragment, computed, createBlock, createElementBlock, defineComponent, inject, openBlock, provide, renderList } from "vue";
4
4
  import { joinPath } from "@atscript/ui";
5
5
  //#region src/composables/use-as-level.ts
@@ -1,5 +1,5 @@
1
1
  const require_use_form_context = require("./use-form-context-U6vg1uqK.cjs");
2
- const require_as_field = require("./as-field-DAClnYiP.cjs");
2
+ const require_as_field = require("./as-field-lMMfms8d.cjs");
3
3
  let vue = require("vue");
4
4
  let _atscript_ui = require("@atscript/ui");
5
5
  //#region src/composables/use-as-level.ts
@@ -1,2 +1,2 @@
1
- const require_as_iterator = require("./as-iterator-q_w9HBHt.cjs");
1
+ const require_as_iterator = require("./as-iterator-DeLt7-BO.cjs");
2
2
  module.exports = require_as_iterator.as_iterator_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-iterator.vue-BUCohjxw.mjs";
1
+ import { t as _default } from "./as-iterator.vue-BdUxcovH.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_iterator_default } from "./as-iterator-B1o83rKV.mjs";
1
+ import { t as as_iterator_default } from "./as-iterator-DbCm61j1.mjs";
2
2
  export { as_iterator_default as default };
@@ -1,5 +1,5 @@
1
1
  const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
2
- const require_as_field_shell = require("./as-field-shell-Cu8jxZYj.cjs");
2
+ const require_as_field_shell = require("./as-field-shell-BPesuJKa.cjs");
3
3
  let vue = require("vue");
4
4
  let _atscript_ui = require("@atscript/ui");
5
5
  let reka_ui = require("reka-ui");
@@ -159,9 +159,9 @@ var as_multi_select_default = /* @__PURE__ */ (0, vue.defineComponent)({
159
159
  type: Object,
160
160
  required: false
161
161
  },
162
- valueLabel: {
163
- type: String,
164
- required: false
162
+ displayText: {
163
+ type: Function,
164
+ required: true
165
165
  },
166
166
  singularLabel: {
167
167
  type: String,
@@ -1,5 +1,5 @@
1
1
  import { o as useAsTexts } from "./use-as-locale-CznDr-7i.mjs";
2
- import { t as as_field_shell_default } from "./as-field-shell-DPzfvPo0.mjs";
2
+ import { t as as_field_shell_default } from "./as-field-shell-QMsYyJ8r.mjs";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderList, toDisplayString, unref, withCtx, withModifiers } from "vue";
4
4
  import { hasFieldMeta, optKey, optLabel, optionValue } from "@atscript/ui";
5
5
  import { ComboboxAnchor, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxPortal, ComboboxRoot, ComboboxViewport, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText, TagsInputRoot } from "reka-ui";
@@ -159,9 +159,9 @@ var as_multi_select_default = /* @__PURE__ */ defineComponent({
159
159
  type: Object,
160
160
  required: false
161
161
  },
162
- valueLabel: {
163
- type: String,
164
- required: false
162
+ displayText: {
163
+ type: Function,
164
+ required: true
165
165
  },
166
166
  singularLabel: {
167
167
  type: String,
@@ -1,2 +1,2 @@
1
- const require_as_multi_select = require("./as-multi-select-DPQ9_Qf1.cjs");
1
+ const require_as_multi_select = require("./as-multi-select-CJ3iRsiL.cjs");
2
2
  module.exports = require_as_multi_select.as_multi_select_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-multi-select.vue-CXC47PBk.cjs";
1
+ import { t as _default } from "./as-multi-select.vue-B6M_f7u-.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-multi-select.vue-CbVBJq8N.mjs";
1
+ import { t as _default } from "./as-multi-select.vue-Cvvy1kMm.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_multi_select_default } from "./as-multi-select-DhOlsgdq.mjs";
1
+ import { t as as_multi_select_default } from "./as-multi-select-Ca2ULklw.mjs";
2
2
  export { as_multi_select_default as default };
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-271BUWyf.mjs";
1
+ import { s as TAsComponentProps } from "./types-D23g9Vs-.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-multi-select.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-DbjorSCn.cjs";
1
+ import { s as TAsComponentProps } from "./types-C5Gx4ZuF.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-multi-select.vue.d.ts
@@ -1,6 +1,6 @@
1
1
  const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
2
- const require_as_field_shell = require("./as-field-shell-Cu8jxZYj.cjs");
3
- const require_as_input_control = require("./as-input-control-uJpmle-G.cjs");
2
+ const require_as_field_shell = require("./as-field-shell-BPesuJKa.cjs");
3
+ const require_as_input_control = require("./as-input-control-DXJBrgih.cjs");
4
4
  let vue = require("vue");
5
5
  let _atscript_ui = require("@atscript/ui");
6
6
  //#region src/composables/use-as-number.ts
@@ -215,9 +215,9 @@ var as_number_default = /* @__PURE__ */ (0, vue.defineComponent)({
215
215
  type: Object,
216
216
  required: false
217
217
  },
218
- valueLabel: {
219
- type: String,
220
- required: false
218
+ displayText: {
219
+ type: Function,
220
+ required: true
221
221
  },
222
222
  singularLabel: {
223
223
  type: String,
@@ -1,6 +1,6 @@
1
1
  import { a as useAsLocale } from "./use-as-locale-CznDr-7i.mjs";
2
- import { t as as_field_shell_default } from "./as-field-shell-DPzfvPo0.mjs";
3
- import { t as as_input_control_default } from "./as-input-control-1igViaqC.mjs";
2
+ import { t as as_field_shell_default } from "./as-field-shell-QMsYyJ8r.mjs";
3
+ import { t as as_input_control_default } from "./as-input-control-CINIJm-h.mjs";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, ref, toDisplayString, withCtx } from "vue";
5
5
  import { getDecimalSeparator, parseDecimalInput } from "@atscript/ui";
6
6
  //#region src/composables/use-as-number.ts
@@ -215,9 +215,9 @@ var as_number_default = /* @__PURE__ */ defineComponent({
215
215
  type: Object,
216
216
  required: false
217
217
  },
218
- valueLabel: {
219
- type: String,
220
- required: false
218
+ displayText: {
219
+ type: Function,
220
+ required: true
221
221
  },
222
222
  singularLabel: {
223
223
  type: String,
@@ -1,2 +1,2 @@
1
- const require_as_number = require("./as-number-CJmX5rb1.cjs");
1
+ const require_as_number = require("./as-number-CHXaKqtg.cjs");
2
2
  module.exports = require_as_number.as_number_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-number.vue-hJuiJJ70.cjs";
1
+ import { t as _default } from "./as-number.vue-5U6oFVJC.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-number.vue-BdNvLZca.mjs";
1
+ import { t as _default } from "./as-number.vue-BN6_1oQf.mjs";
2
2
  export { _default as default };