nuxt-ui-formwerk 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
+ export * from '../dist/runtime/types/index.js';
2
3
 
3
4
  declare const _default: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions, _nuxt_schema.ModuleOptions, false>;
4
5
 
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-ui-formwerk",
3
3
  "configKey": "uiElements",
4
- "version": "0.1.13",
4
+ "version": "0.1.14",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -1,20 +1,27 @@
1
+ export type FieldProps = Omit<FormFieldProps, "validateOnInputDelay" | "errorPattern" | "eagerValidation" | "error">;
2
+ export interface FieldSlots {
3
+ default(props: {
4
+ model: {
5
+ modelValue: any;
6
+ "onUpdate:modelValue": (value: any) => void;
7
+ };
8
+ setValue: (value: any) => void;
9
+ value: any;
10
+ }): any;
11
+ }
1
12
  import type { FormFieldProps } from "@nuxt/ui";
2
- type __VLS_Props = Omit<FormFieldProps, "validateOnInputDelay" | "errorPattern" | "eagerValidation" | "error">;
3
- declare var __VLS_8: {
4
- model: {
5
- modelValue: any;
6
- "onUpdate:modelValue": (value: any) => void;
7
- };
8
- setValue: (value: any) => void;
9
- value: any;
10
- };
11
- type __VLS_Slots = {} & {
12
- default?: (props: typeof __VLS_8) => any;
13
- };
14
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
13
  declare const _default: typeof __VLS_export;
17
14
  export default _default;
15
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
16
+ default?: (props: {
17
+ model: {
18
+ modelValue: any;
19
+ "onUpdate:modelValue": (value: any) => void;
20
+ };
21
+ setValue: (value: any) => void;
22
+ value: any;
23
+ }) => any;
24
+ }>;
18
25
  type __VLS_WithSlots<T, S> = T & {
19
26
  new (): {
20
27
  $slots: S;
@@ -1,8 +1,12 @@
1
+ <script>
2
+
3
+ </script>
4
+
1
5
  <script setup>
2
6
  import { useCustomControl } from "@formwerk/core";
3
7
  import { formBusInjectionKey } from "#imports";
4
8
  import { inject, watch, computed } from "vue";
5
- import { formwerkOptionsInjectionKey, formwerkBusInjectionKey } from "./Form.vue";
9
+ import { formwerkOptionsInjectionKey, formwerkBusInjectionKey } from "../types/form";
6
10
  const props = defineProps({
7
11
  as: { type: null, required: false },
8
12
  name: { type: String, required: false },
@@ -21,7 +25,6 @@ const formwerkBus = inject(formwerkBusInjectionKey, void 0);
21
25
  const formwerkOptions = inject(formwerkOptionsInjectionKey, void 0);
22
26
  const {
23
27
  field: { errorMessage, fieldValue, setValue, setBlurred, setTouched, isTouched, isBlurred, isDirty }
24
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
28
  } = useCustomControl({
26
29
  name: props.name,
27
30
  required: props.required,
@@ -1,20 +1,27 @@
1
+ export type FieldProps = Omit<FormFieldProps, "validateOnInputDelay" | "errorPattern" | "eagerValidation" | "error">;
2
+ export interface FieldSlots {
3
+ default(props: {
4
+ model: {
5
+ modelValue: any;
6
+ "onUpdate:modelValue": (value: any) => void;
7
+ };
8
+ setValue: (value: any) => void;
9
+ value: any;
10
+ }): any;
11
+ }
1
12
  import type { FormFieldProps } from "@nuxt/ui";
2
- type __VLS_Props = Omit<FormFieldProps, "validateOnInputDelay" | "errorPattern" | "eagerValidation" | "error">;
3
- declare var __VLS_8: {
4
- model: {
5
- modelValue: any;
6
- "onUpdate:modelValue": (value: any) => void;
7
- };
8
- setValue: (value: any) => void;
9
- value: any;
10
- };
11
- type __VLS_Slots = {} & {
12
- default?: (props: typeof __VLS_8) => any;
13
- };
14
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
13
  declare const _default: typeof __VLS_export;
17
14
  export default _default;
15
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
16
+ default?: (props: {
17
+ model: {
18
+ modelValue: any;
19
+ "onUpdate:modelValue": (value: any) => void;
20
+ };
21
+ setValue: (value: any) => void;
22
+ value: any;
23
+ }) => any;
24
+ }>;
18
25
  type __VLS_WithSlots<T, S> = T & {
19
26
  new (): {
20
27
  $slots: S;
@@ -0,0 +1,25 @@
1
+ export interface FormSlots {
2
+ default(props: {
3
+ blurredFields: ReadonlySet<any>;
4
+ touchedFields: ReadonlySet<any>;
5
+ dirtyFields: ReadonlySet<any>;
6
+ }): any;
7
+ }
8
+ export interface Props {
9
+ validateOn?: "touched" | "blur" | "dirty";
10
+ disabled?: boolean;
11
+ }
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
15
+ default?: (props: {
16
+ blurredFields: Set<any>;
17
+ touchedFields: Set<any>;
18
+ dirtyFields: Set<any>;
19
+ }) => any;
20
+ }>;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -3,8 +3,10 @@ import { provide, reactive, computed } from "vue";
3
3
  import { useEventBus } from "@vueuse/core";
4
4
  import { useFormContext } from "@formwerk/core";
5
5
  import { formBusInjectionKey, formOptionsInjectionKey } from "#imports";
6
- export const formwerkOptionsInjectionKey = /* @__PURE__ */ Symbol("nuxt-ui-formwerk.form-options");
7
- export const formwerkBusInjectionKey = /* @__PURE__ */ Symbol("nuxt-ui-formwerk.form-events");
6
+ import {
7
+ formwerkOptionsInjectionKey,
8
+ formwerkBusInjectionKey
9
+ } from "../types/form";
8
10
  </script>
9
11
 
10
12
  <script setup>
@@ -0,0 +1,25 @@
1
+ export interface FormSlots {
2
+ default(props: {
3
+ blurredFields: ReadonlySet<any>;
4
+ touchedFields: ReadonlySet<any>;
5
+ dirtyFields: ReadonlySet<any>;
6
+ }): any;
7
+ }
8
+ export interface Props {
9
+ validateOn?: "touched" | "blur" | "dirty";
10
+ disabled?: boolean;
11
+ }
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
15
+ default?: (props: {
16
+ blurredFields: Set<any>;
17
+ touchedFields: Set<any>;
18
+ dirtyFields: Set<any>;
19
+ }) => any;
20
+ }>;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,13 @@
1
+ import type { InjectionKey, ComputedRef } from "vue";
2
+ import type { UseEventBusReturn } from "@vueuse/core";
3
+ export interface FormInjectedOptions {
4
+ disabled?: boolean;
5
+ validateOn?: FormwerkInputEvents;
6
+ }
7
+ export type FormwerkInputEvent = {
8
+ name: string;
9
+ payload: unknown;
10
+ };
11
+ export type FormwerkInputEvents = "touched" | "blur" | "dirty";
12
+ export declare const formwerkOptionsInjectionKey: InjectionKey<ComputedRef<FormInjectedOptions>>;
13
+ export declare const formwerkBusInjectionKey: InjectionKey<UseEventBusReturn<FormwerkInputEvents, FormwerkInputEvent>>;
@@ -0,0 +1,2 @@
1
+ export const formwerkOptionsInjectionKey = Symbol("nuxt-ui-formwerk.form-options");
2
+ export const formwerkBusInjectionKey = Symbol("nuxt-ui-formwerk.form-events");
@@ -0,0 +1,4 @@
1
+ export * from "../components/Form.vue.js";
2
+ export * from "../components/Field.vue.js";
3
+ export * from "../components/Group.vue.js";
4
+ export * from "./form.js";
@@ -0,0 +1,4 @@
1
+ export * from "../components/Form.vue";
2
+ export * from "../components/Field.vue";
3
+ export * from "../components/Group.vue";
4
+ export * from "./form.js";
package/dist/types.d.mts CHANGED
@@ -5,3 +5,5 @@ import type { default as Module } from './module.mjs'
5
5
  export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
6
 
7
7
  export { default } from './module.mjs'
8
+
9
+ export * from '../dist/runtime/types/index.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-ui-formwerk",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "A collection of beautiful, animated UI components for Nuxt applications",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/genu/nuxt-ui-formwerk.git",
@@ -31,7 +31,7 @@
31
31
  "@nuxt/eslint-config": "^1.12.1",
32
32
  "@nuxt/module-builder": "^1.0.2",
33
33
  "@nuxt/schema": "^4.2.2",
34
- "@nuxt/test-utils": "^3.22.0",
34
+ "@nuxt/test-utils": "^3.23.0",
35
35
  "@types/culori": "^4.0.1",
36
36
  "@types/node": "latest",
37
37
  "changelogen": "^0.6.2",