@sfxcode/nuxt-ui-formkit 1.2.1 → 1.2.2

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 (39) hide show
  1. package/README.md +18 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -1
  4. package/dist/runtime/components/FUAutoForm.d.vue.ts +65 -0
  5. package/dist/runtime/components/FUAutoForm.vue +59 -0
  6. package/dist/runtime/components/FUAutoForm.vue.d.ts +65 -0
  7. package/dist/runtime/components/FUDataEdit.d.vue.ts +1 -1
  8. package/dist/runtime/components/FUDataEdit.vue.d.ts +1 -1
  9. package/dist/runtime/components/FUDataView.d.vue.ts +1 -1
  10. package/dist/runtime/components/FUDataView.vue.d.ts +1 -1
  11. package/dist/runtime/composables/useFormKitAutoForm.d.ts +38 -0
  12. package/dist/runtime/composables/useFormKitAutoForm.js +349 -0
  13. package/dist/runtime/composables/useFormKitForm.d.ts +11 -0
  14. package/dist/runtime/composables/useFormKitForm.js +38 -0
  15. package/dist/runtime/composables/useFormKitMultiStep.d.ts +5 -0
  16. package/dist/runtime/composables/useFormKitMultiStep.js +65 -0
  17. package/dist/runtime/composables/useFormKitRepeater.d.ts +4 -0
  18. package/dist/runtime/composables/useFormKitRepeater.js +138 -0
  19. package/dist/runtime/formkit/createNuxtUiFormkitConfig.d.ts +19 -0
  20. package/dist/runtime/formkit/createNuxtUiFormkitConfig.js +12 -0
  21. package/dist/runtime/formkit/createNuxtUiFormkitConfig.mjs +12 -0
  22. package/dist/runtime/formkit/definitions/index.d.ts +3 -0
  23. package/dist/runtime/formkit/definitions/index.js +4 -0
  24. package/dist/runtime/formkit/definitions/index.mjs +4 -0
  25. package/dist/runtime/formkit/definitions/multiStep.d.ts +3 -0
  26. package/dist/runtime/formkit/definitions/multiStep.js +90 -0
  27. package/dist/runtime/formkit/definitions/multiStep.mjs +90 -0
  28. package/dist/runtime/formkit/definitions/repeater.js +3 -119
  29. package/dist/runtime/formkit/definitions/repeater.mjs +3 -119
  30. package/dist/runtime/formkit/index.d.ts +10 -0
  31. package/dist/runtime/formkit/index.js +1 -0
  32. package/dist/runtime/formkit/index.mjs +1 -0
  33. package/dist/runtime/formkit/plugins/index.d.ts +1 -0
  34. package/dist/runtime/formkit/plugins/index.js +1 -0
  35. package/dist/runtime/formkit/plugins/index.mjs +1 -0
  36. package/dist/runtime/plugin.js +2 -1
  37. package/dist/runtime/utils/dateValueConversion.d.ts +8 -7
  38. package/dist/runtime/utils/dateValueConversion.js +1 -1
  39. package/package.json +5 -2
@@ -1,6 +1,8 @@
1
1
  import { createInput } from "@formkit/vue";
2
+ import { useFormKitRepeater } from "../../composables/useFormKitRepeater.js";
2
3
  import { useFormKitSchema } from "../../composables/useFormKitSchema.js";
3
4
  const { addList, addElement, addListGroup, addComponent } = useFormKitSchema();
5
+ const { addRepeaterHandler } = useFormKitRepeater();
4
6
  function addButtonGroup(buttonGroupClass = "", buttonGroupItemClass = "", buttonSize, render = "true") {
5
7
  const addActionButtonComponent = (onClick = "", icon = "", color = "", render2 = "true", disabled = "false") => {
6
8
  return addElement("div", [addComponent("UButton", { onClick, icon, color, disabled, size: buttonSize })], { class: buttonGroupItemClass }, render2);
@@ -53,7 +55,7 @@ export const nuxtUIRepeaterDefinition = createInput(
53
55
  onDragend: "$dragNodeEnd"
54
56
  })
55
57
  ], true, {})
56
- ], true, "true", { value: "$value" })
58
+ ], true, "true", { value: "$value", validation: "$repeaterValidation" })
57
59
  ], { class: "$internalListClass", id: "$internalListId" }, true),
58
60
  {
59
61
  props: [
@@ -82,121 +84,3 @@ export const nuxtUIRepeaterDefinition = createInput(
82
84
  features: [addRepeaterHandler]
83
85
  }
84
86
  );
85
- function addRepeaterHandler(node) {
86
- const swapElements = (array, index1, index2) => {
87
- const [element] = array.splice(index1, 1);
88
- if (element !== void 0) {
89
- array.splice(index2, 0, element);
90
- }
91
- return array;
92
- };
93
- const uuid = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2);
94
- node.on("created", () => {
95
- if (node.context) {
96
- let dragStartIndex = null;
97
- let dragOverIndex = null;
98
- const newItem = node.context.newItem || {};
99
- node.context.listName = node.name;
100
- node.context.renderButtons = !node.context.hideButtonGroup;
101
- node.context.insertButtonSize = node.context.insertButtonSize ? node.context.insertButtonSize : "md";
102
- node.context.buttonSize = node.context.buttonSize ? node.context.buttonSize : "md";
103
- node.context.renderMoveButtons = !node.context.hideMoveButtons;
104
- node.context.draggable = !!node.context.draggable;
105
- node.context.renderDragHandle = !!node.context.displayDragHandle;
106
- node.context.dragHandleIconName = node.context.dragHandleIconName || "i-lucide-grip-vertical";
107
- node.context.internalDragHandleClass = node.context.dragHandleClass ? `formkit-repeater-drag-handle ${node.context.dragHandleClass}` : "formkit-repeater-drag-handle";
108
- node.context.internalListClass = node.context.listClass ? `formkit-items ${node.context.listClass}` : "formkit-items";
109
- node.context.internalListItemClass = node.context.listItemClass ? `formkit-item ${node.context.listItemClass}` : "formkit-item";
110
- node.context.internalListId = `formkit-items-${uuid}`;
111
- node.context.minItems = node.context.minItems !== void 0 ? node.context.minItems : 0;
112
- node.context.maxItems = node.context.maxItems !== void 0 ? node.context.maxItems : Number.POSITIVE_INFINITY;
113
- node.context.getListItemClass = (index) => {
114
- if (dragOverIndex === index && dragStartIndex !== index)
115
- return `${node.context?.internalListItemClass} formkit-repeater-drop-target`;
116
- return node.context?.internalListItemClass?.toString() ?? "";
117
- };
118
- node.context.getListItemId = (index) => {
119
- return `formkit-item-${index}-${uuid}`;
120
- };
121
- node.context.insertNode = (parentNode) => () => {
122
- if (parentNode && Array.isArray(parentNode._value)) {
123
- const newArray = [{ ...newItem }, ...parentNode.value];
124
- parentNode.input(newArray, false);
125
- }
126
- };
127
- node.context.removeNode = (parentNode, index) => () => {
128
- if (parentNode && Array.isArray(parentNode._value)) {
129
- parentNode.input(parentNode._value.filter((_, i) => i !== index), false);
130
- }
131
- };
132
- node.context.addNode = (parentNode, index) => () => {
133
- if (parentNode && Array.isArray(parentNode._value)) {
134
- const array = parentNode.value;
135
- array.splice(index + 1, 0, { ...newItem });
136
- parentNode.input(array, false);
137
- }
138
- };
139
- node.context.cloneNode = (parentNode, index) => () => {
140
- if (parentNode && Array.isArray(parentNode._value)) {
141
- const item = parentNode.value[index];
142
- const array = parentNode.value;
143
- array.splice(index + 1, 0, { ...item });
144
- parentNode.input(array, false);
145
- }
146
- };
147
- node.context.moveNodeUp = (parentNode, index) => () => {
148
- if (parentNode && Array.isArray(parentNode._value)) {
149
- if (index > 0)
150
- parentNode.input(swapElements(parentNode.value, index - 1, index), false);
151
- }
152
- };
153
- node.context.moveNodeDown = (parentNode, index) => () => {
154
- if (parentNode && Array.isArray(parentNode._value)) {
155
- if (index < parentNode.value.length - 1)
156
- parentNode.input(swapElements(parentNode.value, index, index + 1), false);
157
- }
158
- };
159
- node.context.dragNodeStart = (_parentNode, index) => (event) => {
160
- dragStartIndex = index;
161
- if (event?.dataTransfer) {
162
- event.dataTransfer.effectAllowed = "move";
163
- event.dataTransfer.setData("text/plain", String(index));
164
- }
165
- };
166
- node.context.dragNodeOver = (targetIndex) => (event) => {
167
- event?.preventDefault();
168
- dragOverIndex = targetIndex;
169
- if (event?.dataTransfer)
170
- event.dataTransfer.dropEffect = "move";
171
- };
172
- node.context.dragNodeLeave = (targetIndex) => () => {
173
- if (dragOverIndex === targetIndex)
174
- dragOverIndex = null;
175
- };
176
- node.context.dropNode = (parentNode, targetIndex) => (event) => {
177
- event?.preventDefault();
178
- if (!parentNode || !Array.isArray(parentNode._value)) {
179
- dragOverIndex = null;
180
- return;
181
- }
182
- const sourceFromEvent = Number.parseInt(event?.dataTransfer?.getData("text/plain") || "", 10);
183
- const sourceIndex = Number.isInteger(sourceFromEvent) ? sourceFromEvent : dragStartIndex;
184
- if (sourceIndex === null || sourceIndex === targetIndex) {
185
- dragOverIndex = null;
186
- return;
187
- }
188
- if (sourceIndex < 0 || sourceIndex >= parentNode.value.length) {
189
- dragOverIndex = null;
190
- return;
191
- }
192
- parentNode.input(swapElements(parentNode.value, sourceIndex, targetIndex), false);
193
- dragStartIndex = null;
194
- dragOverIndex = null;
195
- };
196
- node.context.dragNodeEnd = () => {
197
- dragStartIndex = null;
198
- dragOverIndex = null;
199
- };
200
- }
201
- });
202
- }
@@ -1,6 +1,8 @@
1
1
  import { createInput } from "@formkit/vue";
2
+ import { useFormKitRepeater } from "../../composables/useFormKitRepeater";
2
3
  import { useFormKitSchema } from "../../composables/useFormKitSchema";
3
4
  const { addList, addElement, addListGroup, addComponent } = useFormKitSchema();
5
+ const { addRepeaterHandler } = useFormKitRepeater();
4
6
  function addButtonGroup(buttonGroupClass = "", buttonGroupItemClass = "", buttonSize, render = "true") {
5
7
  const addActionButtonComponent = (onClick = "", icon = "", color = "", render2 = "true", disabled = "false") => {
6
8
  return addElement("div", [addComponent("UButton", { onClick, icon, color, disabled, size: buttonSize })], { class: buttonGroupItemClass }, render2);
@@ -53,7 +55,7 @@ export const nuxtUIRepeaterDefinition = createInput(
53
55
  onDragend: "$dragNodeEnd"
54
56
  })
55
57
  ], true, {})
56
- ], true, "true", { value: "$value" })
58
+ ], true, "true", { value: "$value", validation: "$repeaterValidation" })
57
59
  ], { class: "$internalListClass", id: "$internalListId" }, true),
58
60
  {
59
61
  props: [
@@ -82,121 +84,3 @@ export const nuxtUIRepeaterDefinition = createInput(
82
84
  features: [addRepeaterHandler]
83
85
  }
84
86
  );
85
- function addRepeaterHandler(node) {
86
- const swapElements = (array, index1, index2) => {
87
- const [element] = array.splice(index1, 1);
88
- if (element !== void 0) {
89
- array.splice(index2, 0, element);
90
- }
91
- return array;
92
- };
93
- const uuid = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2);
94
- node.on("created", () => {
95
- if (node.context) {
96
- let dragStartIndex = null;
97
- let dragOverIndex = null;
98
- const newItem = node.context.newItem || {};
99
- node.context.listName = node.name;
100
- node.context.renderButtons = !node.context.hideButtonGroup;
101
- node.context.insertButtonSize = node.context.insertButtonSize ? node.context.insertButtonSize : "md";
102
- node.context.buttonSize = node.context.buttonSize ? node.context.buttonSize : "md";
103
- node.context.renderMoveButtons = !node.context.hideMoveButtons;
104
- node.context.draggable = !!node.context.draggable;
105
- node.context.renderDragHandle = !!node.context.displayDragHandle;
106
- node.context.dragHandleIconName = node.context.dragHandleIconName || "i-lucide-grip-vertical";
107
- node.context.internalDragHandleClass = node.context.dragHandleClass ? `formkit-repeater-drag-handle ${node.context.dragHandleClass}` : "formkit-repeater-drag-handle";
108
- node.context.internalListClass = node.context.listClass ? `formkit-items ${node.context.listClass}` : "formkit-items";
109
- node.context.internalListItemClass = node.context.listItemClass ? `formkit-item ${node.context.listItemClass}` : "formkit-item";
110
- node.context.internalListId = `formkit-items-${uuid}`;
111
- node.context.minItems = node.context.minItems !== void 0 ? node.context.minItems : 0;
112
- node.context.maxItems = node.context.maxItems !== void 0 ? node.context.maxItems : Number.POSITIVE_INFINITY;
113
- node.context.getListItemClass = (index) => {
114
- if (dragOverIndex === index && dragStartIndex !== index)
115
- return `${node.context?.internalListItemClass} formkit-repeater-drop-target`;
116
- return node.context?.internalListItemClass?.toString() ?? "";
117
- };
118
- node.context.getListItemId = (index) => {
119
- return `formkit-item-${index}-${uuid}`;
120
- };
121
- node.context.insertNode = (parentNode) => () => {
122
- if (parentNode && Array.isArray(parentNode._value)) {
123
- const newArray = [{ ...newItem }, ...parentNode.value];
124
- parentNode.input(newArray, false);
125
- }
126
- };
127
- node.context.removeNode = (parentNode, index) => () => {
128
- if (parentNode && Array.isArray(parentNode._value)) {
129
- parentNode.input(parentNode._value.filter((_, i) => i !== index), false);
130
- }
131
- };
132
- node.context.addNode = (parentNode, index) => () => {
133
- if (parentNode && Array.isArray(parentNode._value)) {
134
- const array = parentNode.value;
135
- array.splice(index + 1, 0, { ...newItem });
136
- parentNode.input(array, false);
137
- }
138
- };
139
- node.context.cloneNode = (parentNode, index) => () => {
140
- if (parentNode && Array.isArray(parentNode._value)) {
141
- const item = parentNode.value[index];
142
- const array = parentNode.value;
143
- array.splice(index + 1, 0, { ...item });
144
- parentNode.input(array, false);
145
- }
146
- };
147
- node.context.moveNodeUp = (parentNode, index) => () => {
148
- if (parentNode && Array.isArray(parentNode._value)) {
149
- if (index > 0)
150
- parentNode.input(swapElements(parentNode.value, index - 1, index), false);
151
- }
152
- };
153
- node.context.moveNodeDown = (parentNode, index) => () => {
154
- if (parentNode && Array.isArray(parentNode._value)) {
155
- if (index < parentNode.value.length - 1)
156
- parentNode.input(swapElements(parentNode.value, index, index + 1), false);
157
- }
158
- };
159
- node.context.dragNodeStart = (_parentNode, index) => (event) => {
160
- dragStartIndex = index;
161
- if (event?.dataTransfer) {
162
- event.dataTransfer.effectAllowed = "move";
163
- event.dataTransfer.setData("text/plain", String(index));
164
- }
165
- };
166
- node.context.dragNodeOver = (targetIndex) => (event) => {
167
- event?.preventDefault();
168
- dragOverIndex = targetIndex;
169
- if (event?.dataTransfer)
170
- event.dataTransfer.dropEffect = "move";
171
- };
172
- node.context.dragNodeLeave = (targetIndex) => () => {
173
- if (dragOverIndex === targetIndex)
174
- dragOverIndex = null;
175
- };
176
- node.context.dropNode = (parentNode, targetIndex) => (event) => {
177
- event?.preventDefault();
178
- if (!parentNode || !Array.isArray(parentNode._value)) {
179
- dragOverIndex = null;
180
- return;
181
- }
182
- const sourceFromEvent = Number.parseInt(event?.dataTransfer?.getData("text/plain") || "", 10);
183
- const sourceIndex = Number.isInteger(sourceFromEvent) ? sourceFromEvent : dragStartIndex;
184
- if (sourceIndex === null || sourceIndex === targetIndex) {
185
- dragOverIndex = null;
186
- return;
187
- }
188
- if (sourceIndex < 0 || sourceIndex >= parentNode.value.length) {
189
- dragOverIndex = null;
190
- return;
191
- }
192
- parentNode.input(swapElements(parentNode.value, sourceIndex, targetIndex), false);
193
- dragStartIndex = null;
194
- dragOverIndex = null;
195
- };
196
- node.context.dragNodeEnd = () => {
197
- dragStartIndex = null;
198
- dragOverIndex = null;
199
- };
200
- }
201
- });
202
- }
@@ -1,5 +1,7 @@
1
+ import type { FormKitMultiStepSlots, FormKitStepSlots } from '@formkit/addons';
1
2
  import type { FormKitBaseSlots, FormKitInputs } from '@formkit/inputs';
2
3
  import type { CalendarSlots, CheckboxSlots, CheckboxGroupSlots, EditorSlots, FileUploadSlots, RadioGroupSlots, InputSlots, TextareaSlots, SelectSlots, SelectMenuSlots, InputDateSlots, InputMenuSlots, InputNumberSlots, InputTagsSlots, InputTimeSlots, ListboxSlots, SwitchSlots } from '@nuxt/ui';
4
+ export * from './createNuxtUiFormkitConfig.js';
3
5
  export * from './definitions/index.js';
4
6
  export * from './plugins/index.js';
5
7
  /**
@@ -47,6 +49,9 @@ declare module '@formkit/inputs' {
47
49
  nuxtUIListbox: {
48
50
  type: 'nuxtUIListbox';
49
51
  };
52
+ nuxtUIMultiStep: {
53
+ type: 'nuxtUIMultiStep';
54
+ };
50
55
  nuxtUIPinInput: {
51
56
  type: 'nuxtUIPinInput';
52
57
  };
@@ -62,6 +67,9 @@ declare module '@formkit/inputs' {
62
67
  nuxtUISlider: {
63
68
  type: 'nuxtUISlider';
64
69
  };
70
+ nuxtUIStep: {
71
+ type: 'nuxtUIStep';
72
+ };
65
73
  nuxtUISwitch: {
66
74
  type: 'nuxtUISwitch';
67
75
  };
@@ -100,9 +108,11 @@ declare module '@formkit/inputs' {
100
108
  nuxtUIInputTags: MergeSlots<FormKitBaseSlots<Props>, InputTagsSlots>;
101
109
  nuxtUIInputTime: MergeSlots<FormKitBaseSlots<Props>, InputTimeSlots>;
102
110
  nuxtUIListbox: MergeSlots<FormKitBaseSlots<Props>, ListboxSlots>;
111
+ nuxtUIMultiStep: MergeSlots<FormKitBaseSlots<Props>, FormKitMultiStepSlots<Props>>;
103
112
  nuxtUIRadioGroup: MergeSlots<FormKitBaseSlots<Props>, RadioGroupSlots>;
104
113
  nuxtUISelect: MergeSlots<FormKitBaseSlots<Props>, SelectSlots>;
105
114
  nuxtUISelectMenu: MergeSlots<FormKitBaseSlots<Props>, SelectMenuSlots>;
115
+ nuxtUIStep: MergeSlots<FormKitBaseSlots<Props>, FormKitStepSlots<Props>>;
106
116
  nuxtUISwitch: MergeSlots<FormKitBaseSlots<Props>, SwitchSlots>;
107
117
  nuxtUITextarea: MergeSlots<FormKitBaseSlots<Props>, TextareaSlots>;
108
118
  }
@@ -1,2 +1,3 @@
1
+ export * from "./createNuxtUiFormkitConfig.js";
1
2
  export * from "./definitions/index.js";
2
3
  export * from "./plugins/index.js";
@@ -1,2 +1,3 @@
1
+ export * from "./createNuxtUiFormkitConfig.mjs";
1
2
  export * from "./definitions/index.mjs";
2
3
  export * from "./plugins/index.mjs";
@@ -1,3 +1,4 @@
1
1
  import type { FormKitNode } from '@formkit/core';
2
+ export { createMultiStepPlugin } from '@formkit/addons';
2
3
  export declare function addNuxtAsteriskPlugin(node: FormKitNode): void;
3
4
  export declare function addNuxtLabelPlugin(node: FormKitNode): void;
@@ -1,3 +1,4 @@
1
+ export { createMultiStepPlugin } from "@formkit/addons";
1
2
  export function addNuxtAsteriskPlugin(node) {
2
3
  if (!node.props.type.startsWith("nuxtUI") || node.props.type.startsWith("FUOutput"))
3
4
  return;
@@ -1,3 +1,4 @@
1
+ export { createMultiStepPlugin } from "@formkit/addons";
1
2
  export function addNuxtAsteriskPlugin(node) {
2
3
  if (!node.props.type.startsWith("nuxtUI") || node.props.type.startsWith("FUOutput"))
3
4
  return;
@@ -1,6 +1,7 @@
1
1
  import { defineNuxtPlugin } from "#app";
2
- import { UButton, UIcon } from "#components";
2
+ import { UButton, UIcon, UTabs } from "#components";
3
3
  export default defineNuxtPlugin((_nuxtApp) => {
4
4
  _nuxtApp.vueApp.component("UButton", UButton);
5
5
  _nuxtApp.vueApp.component("UIcon", UIcon);
6
+ _nuxtApp.vueApp.component("UTabs", UTabs);
6
7
  });
@@ -6,6 +6,7 @@ export interface DateConversionOptions {
6
6
  hideTimeZone?: boolean;
7
7
  timeZone?: string;
8
8
  }
9
+ export declare function isDateValue(value: unknown): value is DateValue;
9
10
  /**
10
11
  * Converts an external value (JS `Date`, ISO 8601 string, or an already-native
11
12
  * `DateValue`) into the `DateValue` that `UInputDate`/`UCalendar` require.
@@ -24,12 +25,12 @@ export declare function toDateValueOrRangeOrArray(value: unknown, options?: Date
24
25
  /** Converts a `DateValue` emitted by `UInputDate`/`UCalendar` back into the shape the form value should take. */
25
26
  export declare function fromDateValue(value: DateValue | undefined, valueType: DateValueType, timeZone?: string): DateValue | Date | string | undefined;
26
27
  /** Same as {@link fromDateValue}, but also handles the `{ start, end }` range shape. */
27
- export declare function fromDateValueOrRange(value: unknown, valueType: DateValueType, timeZone?: string): string | Date | CalendarDate | CalendarDateTime | ZonedDateTime | {
28
- start: string | Date | DateValue | undefined;
29
- end: string | Date | DateValue | undefined;
28
+ export declare function fromDateValueOrRange(value: unknown, valueType: DateValueType, timeZone?: string): string | CalendarDate | CalendarDateTime | ZonedDateTime | Date | {
29
+ start: string | DateValue | Date | undefined;
30
+ end: string | DateValue | Date | undefined;
30
31
  } | undefined;
31
32
  /** Same as {@link fromDateValueOrRange}, but also handles arrays (multiple-selection mode). */
32
- export declare function fromDateValueOrRangeOrArray(value: unknown, valueType: DateValueType, timeZone?: string): string | Date | CalendarDate | CalendarDateTime | ZonedDateTime | {
33
- start: string | Date | DateValue | undefined;
34
- end: string | Date | DateValue | undefined;
35
- } | (string | Date | DateValue | undefined)[] | undefined;
33
+ export declare function fromDateValueOrRangeOrArray(value: unknown, valueType: DateValueType, timeZone?: string): string | CalendarDate | CalendarDateTime | ZonedDateTime | Date | {
34
+ start: string | DateValue | Date | undefined;
35
+ end: string | DateValue | Date | undefined;
36
+ } | (string | DateValue | Date | undefined)[] | undefined;
@@ -1,7 +1,7 @@
1
1
  import { CalendarDate, CalendarDateTime, ZonedDateTime, fromDate, getLocalTimeZone, parseAbsolute, parseDate, parseDateTime, toCalendarDate, toCalendarDateTime } from "@internationalized/date";
2
2
  const ISO_DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
3
3
  const ISO_HAS_ZONE = /(?:Z|[+-]\d{2}:\d{2})(?:\[[^\]]+\])?$/;
4
- function isDateValue(value) {
4
+ export function isDateValue(value) {
5
5
  return value instanceof CalendarDate || value instanceof CalendarDateTime || value instanceof ZonedDateTime;
6
6
  }
7
7
  function isRangeLike(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/nuxt-ui-formkit",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "FormKit integration for Nuxt UI - Seamlessly connect FormKit form handling with Nuxt UI components",
5
5
  "author": {
6
6
  "name": "Tom",
@@ -109,6 +109,7 @@
109
109
  "@nuxt/test-utils": "^4.0.3",
110
110
  "@types/node": "latest",
111
111
  "@vitejs/plugin-vue": "^6.0.7",
112
+ "@vue/test-utils": "^2.4.11",
112
113
  "changelogen": "^0.6.2",
113
114
  "codemirror": "^6.0.2",
114
115
  "eslint": "^10.6.0",
@@ -118,11 +119,13 @@
118
119
  "sass-embedded": "^1.100.0",
119
120
  "typescript": "~6.0.3",
120
121
  "unbuild": "^3.6.1",
122
+ "valibot": "^1.4.2",
121
123
  "vitepress": "2.0.0-alpha.17",
122
124
  "vitest": "^4.1.9",
123
125
  "vue": "^3.5.39",
124
126
  "vue-i18n": "^11.4.6",
125
- "vue-tsc": "^3.3.6"
127
+ "vue-tsc": "^3.3.6",
128
+ "zod": "^4.4.3"
126
129
  },
127
130
  "packageManager": "pnpm@11.1.2+sha512.415a1cc25974731e75455c1468371be74c5aa5fb7621b50d4056d222451609f11412f23fd602e6169f1e060466641f798597e1be961a10688836a67b16569499"
128
131
  }