@atscript/vue-form 0.1.204 → 0.1.206

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 (195) hide show
  1. package/dist/{_editing-hold-Bj0kZjCr.cjs → _editing-hold-D2uqwszu.cjs} +3 -3
  2. package/dist/{_editing-hold-C6emgUTM.mjs → _editing-hold-D_X5gXHh.mjs} +3 -3
  3. package/dist/_shape-7OdPsQao.cjs +56 -0
  4. package/dist/_shape-A661ZxnJ.mjs +39 -0
  5. package/dist/{as-action-B69WsGIB.mjs → as-action-kBskX68v.mjs} +8 -0
  6. package/dist/{as-action-B3NIgGTV.cjs → as-action-rT6WXLph.cjs} +8 -0
  7. package/dist/as-action.cjs +1 -1
  8. package/dist/as-action.d.cts +1 -1
  9. package/dist/as-action.d.mts +1 -1
  10. package/dist/as-action.mjs +1 -1
  11. package/dist/{as-action.vue-Cz7I0w6k.d.mts → as-action.vue-B7RrjGhF.d.cts} +1 -1
  12. package/dist/{as-action.vue-CzG-4mHk.d.cts → as-action.vue-Dtez-EWu.d.mts} +1 -1
  13. package/dist/{as-array-CWuMR-2P.cjs → as-array-C5lqDDLN.cjs} +14 -6
  14. package/dist/{as-array-dttDB3Rg.mjs → as-array-Tt_4kl5r.mjs} +14 -6
  15. package/dist/{as-array-clear-btn-CRfCFJ73.mjs → as-array-clear-btn-DGUQY_7_.mjs} +1 -1
  16. package/dist/{as-array-clear-btn-BX3HSWel.cjs → as-array-clear-btn-Dk88CYmS.cjs} +1 -1
  17. package/dist/as-array.cjs +1 -1
  18. package/dist/as-array.d.cts +1 -1
  19. package/dist/as-array.d.mts +1 -1
  20. package/dist/as-array.mjs +1 -1
  21. package/dist/{as-array.vue-BspRfMHl.d.cts → as-array.vue-Ca_xan2n.d.mts} +1 -1
  22. package/dist/{as-array.vue-DTrR21eK.d.mts → as-array.vue-Dp_zd3ZM.d.cts} +1 -1
  23. package/dist/{as-checkbox-BS0fjlQC.mjs → as-checkbox-CCX9E19U.mjs} +14 -4
  24. package/dist/{as-checkbox-DyA1ncSp.cjs → as-checkbox-D7NywgIa.cjs} +14 -4
  25. package/dist/as-checkbox.cjs +1 -1
  26. package/dist/as-checkbox.d.cts +1 -1
  27. package/dist/as-checkbox.d.mts +1 -1
  28. package/dist/as-checkbox.mjs +1 -1
  29. package/dist/{as-checkbox.vue-CcifJWeG.d.mts → as-checkbox.vue-BClSBx1g.d.mts} +1 -1
  30. package/dist/{as-checkbox.vue-CliEtXzy.d.cts → as-checkbox.vue-Bf3qqcKu.d.cts} +1 -1
  31. package/dist/{as-collapsible-B0im1dAa.cjs → as-collapsible-CTOLQ3IK.cjs} +1 -1
  32. package/dist/{as-collapsible-B4Vb0XIR.mjs → as-collapsible-CvBoWb0D.mjs} +1 -1
  33. package/dist/as-collapsible.cjs +1 -1
  34. package/dist/as-collapsible.d.cts +1 -1
  35. package/dist/as-collapsible.d.mts +1 -1
  36. package/dist/as-collapsible.mjs +1 -1
  37. package/dist/{as-collapsible.vue-DmfY2xZi.d.mts → as-collapsible.vue-BXdpM7_K.d.cts} +1 -1
  38. package/dist/{as-collapsible.vue-c4kJaqr8.d.cts → as-collapsible.vue-CUhn1EVX.d.mts} +1 -1
  39. package/dist/{as-date-Wk0mReg2.mjs → as-date-3haOaiAG.mjs} +12 -4
  40. package/dist/{as-date-bI28vJja.cjs → as-date-Ubw_1-Ai.cjs} +12 -4
  41. package/dist/as-date.cjs +1 -1
  42. package/dist/as-date.d.cts +1 -1
  43. package/dist/as-date.d.mts +1 -1
  44. package/dist/as-date.mjs +1 -1
  45. package/dist/{as-date.vue-DlZIPl1M.d.cts → as-date.vue-B5NWZ5ON.d.cts} +1 -1
  46. package/dist/{as-date.vue-HBqgKpbV.d.mts → as-date.vue-CJQOrfj3.d.mts} +1 -1
  47. package/dist/{as-datetime-Ca-23Nrq.cjs → as-datetime--7bl-yGW.cjs} +12 -4
  48. package/dist/{as-datetime-F2PdaCh1.mjs → as-datetime-BTekpasP.mjs} +12 -4
  49. package/dist/as-datetime.cjs +1 -1
  50. package/dist/as-datetime.d.cts +1 -1
  51. package/dist/as-datetime.d.mts +1 -1
  52. package/dist/as-datetime.mjs +1 -1
  53. package/dist/{as-datetime.vue-BOewNSCq.d.mts → as-datetime.vue-BvmFdGxe.d.cts} +1 -1
  54. package/dist/{as-datetime.vue-CTkKY2Cc.d.cts → as-datetime.vue-CzMz_RUy.d.mts} +1 -1
  55. package/dist/{as-decimal-4zD1qPmT.mjs → as-decimal-7CIE6UKX.mjs} +21 -4
  56. package/dist/{as-decimal-CYIBnc-k.cjs → as-decimal-DWPRXsYY.cjs} +21 -4
  57. package/dist/as-decimal.cjs +1 -1
  58. package/dist/as-decimal.d.cts +1 -1
  59. package/dist/as-decimal.d.mts +1 -1
  60. package/dist/as-decimal.mjs +1 -1
  61. package/dist/{as-decimal.vue-C6SpdtjD.d.cts → as-decimal.vue-DdVqHtMT.d.cts} +1 -1
  62. package/dist/{as-decimal.vue-DmjoBpWm.d.mts → as-decimal.vue-DyDt1ds0.d.mts} +1 -1
  63. package/dist/{as-field-BdFUGqKv.cjs → as-field-DAClnYiP.cjs} +13 -5
  64. package/dist/{as-field-U_EtrpNj.mjs → as-field-jh5AWref.mjs} +14 -6
  65. package/dist/{as-field-shell-ha1iaJnK.cjs → as-field-shell-Cu8jxZYj.cjs} +17 -7
  66. package/dist/{as-field-shell-DQ30etIq.mjs → as-field-shell-DPzfvPo0.mjs} +17 -7
  67. package/dist/as-field-shell.cjs +1 -1
  68. package/dist/as-field-shell.d.cts +1 -1
  69. package/dist/as-field-shell.d.mts +1 -1
  70. package/dist/as-field-shell.mjs +1 -1
  71. package/dist/{as-field-shell.vue-CVDPz5RX.d.cts → as-field-shell.vue-CPy2uA-b.d.mts} +1 -1
  72. package/dist/{as-field-shell.vue-Dj34leHW.d.mts → as-field-shell.vue-D-8AWUGW.d.cts} +1 -1
  73. package/dist/as-field.cjs +1 -1
  74. package/dist/as-field.mjs +1 -1
  75. package/dist/{as-form-WhZH4ozr.mjs → as-form-B8d1MVTB.mjs} +35 -7
  76. package/dist/{as-form-Dfrq97Tv.cjs → as-form-r5pkXt5U.cjs} +34 -6
  77. package/dist/as-form.cjs +1 -1
  78. package/dist/as-form.d.cts +1 -1
  79. package/dist/as-form.d.mts +1 -1
  80. package/dist/as-form.mjs +1 -1
  81. package/dist/{as-form.vue-B4UKtDpf.d.mts → as-form.vue-BvRHy6mu.d.cts} +28 -10
  82. package/dist/{as-form.vue-D97-WcwS.d.cts → as-form.vue-D1AS3Xf6.d.mts} +28 -10
  83. package/dist/{as-input-Cr2zcWgm.cjs → as-input-BTbu0eF-.cjs} +10 -2
  84. package/dist/{as-input-control-Wygcey6h.mjs → as-input-control-1igViaqC.mjs} +12 -5
  85. package/dist/{as-input-control-D8xoJfr7.cjs → as-input-control-uJpmle-G.cjs} +12 -5
  86. package/dist/{as-input-Du26WjkP.mjs → as-input-tKw19JnF.mjs} +10 -2
  87. package/dist/as-input.cjs +1 -1
  88. package/dist/as-input.d.cts +1 -1
  89. package/dist/as-input.d.mts +1 -1
  90. package/dist/as-input.mjs +1 -1
  91. package/dist/{as-input.vue-CTeXkWxQ.d.mts → as-input.vue-CuC3DYeR.d.cts} +1 -1
  92. package/dist/{as-input.vue-D-cM4wBe.d.cts → as-input.vue-DawR7pA-.d.mts} +1 -1
  93. package/dist/{as-iterator-BvL2pCKj.mjs → as-iterator-B1o83rKV.mjs} +2 -2
  94. package/dist/{as-iterator-BgYp1qj4.cjs → as-iterator-q_w9HBHt.cjs} +2 -2
  95. package/dist/as-iterator.cjs +1 -1
  96. package/dist/as-iterator.mjs +1 -1
  97. package/dist/{as-multi-select-CNRqlh1o.cjs → as-multi-select-DPQ9_Qf1.cjs} +9 -1
  98. package/dist/{as-multi-select-C9yGmtWR.mjs → as-multi-select-DhOlsgdq.mjs} +9 -1
  99. package/dist/as-multi-select.cjs +1 -1
  100. package/dist/as-multi-select.d.cts +1 -1
  101. package/dist/as-multi-select.d.mts +1 -1
  102. package/dist/as-multi-select.mjs +1 -1
  103. package/dist/{as-multi-select.vue-CvZHtvck.d.cts → as-multi-select.vue-CXC47PBk.d.cts} +1 -1
  104. package/dist/{as-multi-select.vue-DVSSEboS.d.mts → as-multi-select.vue-CbVBJq8N.d.mts} +1 -1
  105. package/dist/{as-number-DEkR-Oud.cjs → as-number-CJmX5rb1.cjs} +11 -4
  106. package/dist/{as-number-CsoSsIJ8.mjs → as-number-CVjNUjiS.mjs} +11 -4
  107. package/dist/as-number.cjs +1 -1
  108. package/dist/as-number.d.cts +1 -1
  109. package/dist/as-number.d.mts +1 -1
  110. package/dist/as-number.mjs +1 -1
  111. package/dist/{as-number.vue-7XSQA1oV.d.cts → as-number.vue-BdNvLZca.d.mts} +1 -1
  112. package/dist/{as-number.vue-CEcDCyhs.d.mts → as-number.vue-hJuiJJ70.d.cts} +1 -1
  113. package/dist/{as-object-DIEi_L2T.mjs → as-object-DY5IEc94.mjs} +12 -4
  114. package/dist/{as-object-DZHwEfd8.cjs → as-object-Dq5CPM3i.cjs} +12 -4
  115. package/dist/as-object.cjs +1 -1
  116. package/dist/as-object.d.cts +1 -1
  117. package/dist/as-object.d.mts +1 -1
  118. package/dist/as-object.mjs +1 -1
  119. package/dist/{as-object.vue-eoznJfgx.d.mts → as-object.vue-DHFGLetx.d.cts} +1 -1
  120. package/dist/{as-object.vue-l5nTngPG.d.cts → as-object.vue-DVK_BKOL.d.mts} +1 -1
  121. package/dist/{as-paragraph-wAHRsd_e.cjs → as-paragraph-CaytophZ.cjs} +8 -0
  122. package/dist/{as-paragraph-B49pXlhP.mjs → as-paragraph-ChOqmJe2.mjs} +8 -0
  123. package/dist/as-paragraph.cjs +1 -1
  124. package/dist/as-paragraph.d.cts +1 -1
  125. package/dist/as-paragraph.d.mts +1 -1
  126. package/dist/as-paragraph.mjs +1 -1
  127. package/dist/{as-paragraph.vue-BRByQ1K4.d.cts → as-paragraph.vue-6mBonWFb.d.mts} +1 -1
  128. package/dist/{as-paragraph.vue-CwNr9kox.d.mts → as-paragraph.vue-B_aPmK-B.d.cts} +1 -1
  129. package/dist/{as-radio-Bn14VyaN.mjs → as-radio-BW9K8h6V.mjs} +9 -1
  130. package/dist/{as-radio-CvIgHH9G.cjs → as-radio-C6PnEdjD.cjs} +9 -1
  131. package/dist/as-radio.cjs +1 -1
  132. package/dist/as-radio.d.cts +1 -1
  133. package/dist/as-radio.d.mts +1 -1
  134. package/dist/as-radio.mjs +1 -1
  135. package/dist/{as-radio.vue-CmOKjYGn.d.cts → as-radio.vue-BFxeAHfl.d.mts} +1 -1
  136. package/dist/{as-radio.vue-rTZDD-Um.d.mts → as-radio.vue-B_tDoVl1.d.cts} +1 -1
  137. package/dist/{as-ref-DhWEKsYJ.mjs → as-ref-CXtYo-UZ.mjs} +14 -7
  138. package/dist/{as-ref-BNESufCy.cjs → as-ref-DTsWT_zU.cjs} +14 -7
  139. package/dist/as-ref.cjs +1 -1
  140. package/dist/as-ref.d.cts +1 -1
  141. package/dist/as-ref.d.mts +1 -1
  142. package/dist/as-ref.mjs +1 -1
  143. package/dist/{as-ref.vue-C1Qg56oh.d.cts → as-ref.vue-CqFDKTYk.d.mts} +1 -1
  144. package/dist/{as-ref.vue-CRUzXTRQ.d.mts → as-ref.vue-gCsaCDQx.d.cts} +1 -1
  145. package/dist/{as-select-Csr2229O.mjs → as-select-CbZNupL6.mjs} +22 -9
  146. package/dist/{as-select-COxfMWYf.cjs → as-select-DOvo86Oc.cjs} +21 -8
  147. package/dist/as-select.cjs +1 -1
  148. package/dist/as-select.d.cts +1 -1
  149. package/dist/as-select.d.mts +1 -1
  150. package/dist/as-select.mjs +1 -1
  151. package/dist/{as-select.vue-DlQ93_AO.d.cts → as-select.vue-BN3zvSGs.d.mts} +1 -1
  152. package/dist/{as-select.vue-DnfV-12W.d.mts → as-select.vue-Bh7ppdg9.d.cts} +1 -1
  153. package/dist/{as-time-YMnd789f.mjs → as-time-BDpnkjy8.mjs} +11 -4
  154. package/dist/{as-time-e40w14c7.cjs → as-time-CfnhY3Pf.cjs} +11 -4
  155. package/dist/as-time.cjs +1 -1
  156. package/dist/as-time.d.cts +1 -1
  157. package/dist/as-time.d.mts +1 -1
  158. package/dist/as-time.mjs +1 -1
  159. package/dist/{as-time.vue-DAuXlrGs.d.cts → as-time.vue-C-ruJhmX.d.mts} +1 -1
  160. package/dist/{as-time.vue-PRLKRy84.d.mts → as-time.vue-C_0z-HOS.d.cts} +1 -1
  161. package/dist/{as-tuple-BjMI93bC.mjs → as-tuple--wL64cCu.mjs} +13 -5
  162. package/dist/{as-tuple-Bb-sQh6T.cjs → as-tuple-C5_dcvsH.cjs} +13 -5
  163. package/dist/as-tuple.cjs +1 -1
  164. package/dist/as-tuple.d.cts +1 -1
  165. package/dist/as-tuple.d.mts +1 -1
  166. package/dist/as-tuple.mjs +1 -1
  167. package/dist/{as-tuple.vue-Chqi1IO6.d.mts → as-tuple.vue-BDiSN-np.d.cts} +1 -1
  168. package/dist/{as-tuple.vue-DEL4sOwq.d.cts → as-tuple.vue-CGWun6Iw.d.mts} +1 -1
  169. package/dist/{as-union-D6JPYyYf.cjs → as-union-D3NoKN1H.cjs} +14 -3
  170. package/dist/{as-union-D7FONvHe.mjs → as-union-DAnpGBeK.mjs} +15 -4
  171. package/dist/as-union.cjs +1 -1
  172. package/dist/as-union.d.cts +1 -1
  173. package/dist/as-union.d.mts +1 -1
  174. package/dist/as-union.mjs +1 -1
  175. package/dist/{as-union.vue-BCdmqdYk.d.mts → as-union.vue-BpcREl7L.d.mts} +1 -1
  176. package/dist/{as-union.vue-CKGLn4ni.d.cts → as-union.vue-DuUeLY1X.d.cts} +1 -1
  177. package/dist/{as-variant-picker-VixxxnXA.mjs → as-variant-picker-CihlFH-c.mjs} +1 -1
  178. package/dist/{as-variant-picker-13N8TxuF.cjs → as-variant-picker-CpCxKFtT.cjs} +1 -1
  179. package/dist/index.cjs +56 -26
  180. package/dist/index.d.cts +22 -22
  181. package/dist/index.d.mts +22 -22
  182. package/dist/index.mjs +28 -28
  183. package/dist/{types-ChQuWLmd.d.mts → types-271BUWyf.d.mts} +29 -3
  184. package/dist/{types-BmF8iDTN.d.cts → types-DbjorSCn.d.cts} +29 -3
  185. package/dist/{use-as-date-CAmqx1O7.cjs → use-as-date-BigwPKEs.cjs} +13 -3
  186. package/dist/{use-as-date-CpXG9klN.mjs → use-as-date-iSu5NS79.mjs} +13 -3
  187. package/dist/{use-as-model-texts-BNO2SFQF.cjs → use-as-model-texts-C3V56UDt.cjs} +1 -1
  188. package/dist/{use-as-model-texts-BTFyHNqS.mjs → use-as-model-texts-Cpx5bHJQ.mjs} +1 -1
  189. package/dist/{use-as-value-help-LDhcfxFi.cjs → use-as-value-help-CQMUkP1r.cjs} +4 -2
  190. package/dist/{use-as-value-help-LQWMkS5m.mjs → use-as-value-help-DE8KCbqo.mjs} +4 -2
  191. package/dist/{use-form-context-p2PucQHk.mjs → use-form-context-0FtVVTvf.mjs} +2 -1
  192. package/dist/{use-form-context-d0IcFey0.cjs → use-form-context-U6vg1uqK.cjs} +7 -0
  193. package/package.json +10 -10
  194. package/dist/_shape-BDO-1MzF.cjs +0 -87
  195. package/dist/_shape-DhwW2SvD.mjs +0 -58
@@ -1,87 +0,0 @@
1
- //#region src/composables/_shape.ts
2
- /**
3
- * Match the input shape on commit: `null`/`undefined` model → write the
4
- * canonical string (first-ever commit); pre-existing string → string;
5
- * pre-existing number → number (caller opted into float; the precision
6
- * loss is on them).
7
- *
8
- * Shared by `useAsDecimal` and `useAsNumber`. Not exported from the
9
- * package barrel — internal helper, no public surface.
10
- */
11
- function preserveShape(original, normalized) {
12
- if (original === null || original === void 0) return normalized;
13
- if (typeof original === "string") return normalized;
14
- return Number(normalized);
15
- }
16
- /**
17
- * The value an emptied input commits: `undefined` (omitted) on an optional
18
- * field — `null` is not a value of `name?: T`, and atscript >= 0.1.103
19
- * rejects it there when the field also carries `@meta.required` — else
20
- * `null`. Shared by the number / decimal / date / datetime / time inputs and
21
- * the native number input of the text control.
22
- */
23
- function committedValue(value, optional) {
24
- return value === null && optional ? void 0 : value;
25
- }
26
- /**
27
- * The value an emptied text input commits: `undefined` (omitted) on an
28
- * optional field, like {@link committedValue}; `""` on a required one. Used by
29
- * the text control (which also renders the reference input's plain-text
30
- * fallback).
31
- */
32
- function committedText(value, optional) {
33
- return value === "" && optional ? void 0 : value;
34
- }
35
- /**
36
- * The value an emptied reference commits — the picker's "×" and the empty
37
- * option of a dropdown bound to a dictionary: `undefined` on an optional
38
- * field; else `""` for a string key and `null` for any other (a number id).
39
- */
40
- function emptiedKey(type, optional) {
41
- return type?.kind === "" && type.designType === "string" ? committedText("", optional) : committedValue(null, optional);
42
- }
43
- /**
44
- * The one loaded row holding `value` in `field` — `undefined` when none does or
45
- * when several do (a dictionary whose key has more members than the committed
46
- * field): the value is then committed without a row, so no fill guesses one.
47
- */
48
- function soleRow(rows, field, value) {
49
- let found;
50
- for (const row of rows) {
51
- if (row[field] !== value) continue;
52
- if (found) return void 0;
53
- found = row;
54
- }
55
- return found;
56
- }
57
- //#endregion
58
- Object.defineProperty(exports, "committedText", {
59
- enumerable: true,
60
- get: function() {
61
- return committedText;
62
- }
63
- });
64
- Object.defineProperty(exports, "committedValue", {
65
- enumerable: true,
66
- get: function() {
67
- return committedValue;
68
- }
69
- });
70
- Object.defineProperty(exports, "emptiedKey", {
71
- enumerable: true,
72
- get: function() {
73
- return emptiedKey;
74
- }
75
- });
76
- Object.defineProperty(exports, "preserveShape", {
77
- enumerable: true,
78
- get: function() {
79
- return preserveShape;
80
- }
81
- });
82
- Object.defineProperty(exports, "soleRow", {
83
- enumerable: true,
84
- get: function() {
85
- return soleRow;
86
- }
87
- });
@@ -1,58 +0,0 @@
1
- //#region src/composables/_shape.ts
2
- /**
3
- * Match the input shape on commit: `null`/`undefined` model → write the
4
- * canonical string (first-ever commit); pre-existing string → string;
5
- * pre-existing number → number (caller opted into float; the precision
6
- * loss is on them).
7
- *
8
- * Shared by `useAsDecimal` and `useAsNumber`. Not exported from the
9
- * package barrel — internal helper, no public surface.
10
- */
11
- function preserveShape(original, normalized) {
12
- if (original === null || original === void 0) return normalized;
13
- if (typeof original === "string") return normalized;
14
- return Number(normalized);
15
- }
16
- /**
17
- * The value an emptied input commits: `undefined` (omitted) on an optional
18
- * field — `null` is not a value of `name?: T`, and atscript >= 0.1.103
19
- * rejects it there when the field also carries `@meta.required` — else
20
- * `null`. Shared by the number / decimal / date / datetime / time inputs and
21
- * the native number input of the text control.
22
- */
23
- function committedValue(value, optional) {
24
- return value === null && optional ? void 0 : value;
25
- }
26
- /**
27
- * The value an emptied text input commits: `undefined` (omitted) on an
28
- * optional field, like {@link committedValue}; `""` on a required one. Used by
29
- * the text control (which also renders the reference input's plain-text
30
- * fallback).
31
- */
32
- function committedText(value, optional) {
33
- return value === "" && optional ? void 0 : value;
34
- }
35
- /**
36
- * The value an emptied reference commits — the picker's "×" and the empty
37
- * option of a dropdown bound to a dictionary: `undefined` on an optional
38
- * field; else `""` for a string key and `null` for any other (a number id).
39
- */
40
- function emptiedKey(type, optional) {
41
- return type?.kind === "" && type.designType === "string" ? committedText("", optional) : committedValue(null, optional);
42
- }
43
- /**
44
- * The one loaded row holding `value` in `field` — `undefined` when none does or
45
- * when several do (a dictionary whose key has more members than the committed
46
- * field): the value is then committed without a row, so no fill guesses one.
47
- */
48
- function soleRow(rows, field, value) {
49
- let found;
50
- for (const row of rows) {
51
- if (row[field] !== value) continue;
52
- if (found) return void 0;
53
- found = row;
54
- }
55
- return found;
56
- }
57
- //#endregion
58
- export { soleRow as a, preserveShape as i, committedValue as n, emptiedKey as r, committedText as t };