@piying/view-vue 2.9.10 → 2.10.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piying/view-vue",
3
- "version": "2.9.10",
3
+ "version": "2.10.1",
4
4
  "description": "Piying view For Vue;Valibot to Component",
5
5
  "type": "module",
6
6
  "homepage": "https://piying-org.github.io/website/docs/client/intro",
@@ -36,7 +36,7 @@
36
36
  ],
37
37
  "license": "MIT",
38
38
  "dependencies": {
39
- "@piying/view-core": "^2.9.10",
39
+ "@piying/view-core": "^2.10.1",
40
40
  "static-injector": "^6.3.1"
41
41
  },
42
42
  "sideEffects": false,
@@ -0,0 +1,35 @@
1
+ import type { KeyPath } from '@piying/view-core';
2
+ import type { PiResolvedViewFieldConfig } from '../type/group';
3
+ type __VLS_Props = {
4
+ field: PiResolvedViewFieldConfig;
5
+ path?: KeyPath;
6
+ };
7
+ declare var __VLS_1: {
8
+ cvaa: {
9
+ value: import("vue").ShallowRef<any>;
10
+ disabled: import("vue").Ref<boolean>;
11
+ valueChange: (input: any) => void;
12
+ touchedChange: () => void;
13
+ };
14
+ field: PiResolvedViewFieldConfig | undefined;
15
+ };
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_1) => any;
18
+ };
19
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}, {}>;
20
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
21
+ export default _default;
22
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
+ type __VLS_TypePropsToOption<T> = {
24
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
25
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
26
+ } : {
27
+ type: import('vue').PropType<T[K]>;
28
+ required: true;
29
+ };
30
+ };
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -1,6 +1,8 @@
1
1
  import type { PiResolvedViewFieldConfig } from '../type/group';
2
+ import { type KeyPath } from '@piying/view-core';
2
3
  type __VLS_Props = {
3
4
  field: PiResolvedViewFieldConfig;
5
+ path?: KeyPath;
4
6
  };
5
7
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}, {}>;
6
8
  export default _default;
@@ -1,12 +1,9 @@
1
1
  import * as v from 'valibot';
2
- import type { Injector } from 'static-injector';
2
+ import { type FieldConvertViewOptions } from '@piying/view-core';
3
3
  type __VLS_Props = {
4
- schema: v.BaseSchema<any, any, any> | v.SchemaWithPipe<any>;
4
+ schema: v.BaseSchema<any, any, any>;
5
5
  modelValue?: any;
6
- options: {
7
- injector?: Injector;
8
- [name: string]: any;
9
- };
6
+ options: FieldConvertViewOptions;
10
7
  };
11
8
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
9
  "update:modelValue": (...args: any[]) => void;
@@ -5,6 +5,8 @@ import PiyingFieldTemplate from './component/field-template.vue';
5
5
  export { PiyingFieldTemplate };
6
6
  import PiyingViewGroup from './component/group.vue';
7
7
  export { PiyingViewGroup };
8
+ import PiyingFieldControlBind from './component/field-control-bind.vue';
9
+ export { PiyingFieldControlBind as Field, PiyingFieldControlBind };
8
10
  export * from './type';
9
11
  export * from './token';
10
12
  export * from './builder';
package/src/token.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type { Injector } from 'static-injector';
2
+ import type { ComputedRef, InjectionKey } from 'vue';
3
+ import type { PiResolvedViewFieldConfig } from './type/group';
4
+ export declare const InjectorToken: InjectionKey<ComputedRef<Injector>>;
5
+ export declare const PI_VIEW_FIELD_TOKEN: InjectionKey<ComputedRef<PiResolvedViewFieldConfig>>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 转换 Valibot 定义为 Piying 字段
3
+ */
4
+ export declare const convertToField: <T extends import("valibot").BaseSchema<any, any, any>>(schema: () => T, parent?: import("static-injector").Injector, options?: () => import("@piying/view-core").FieldConvertOptions | undefined, providers?: import("static-injector").Provider[]) => any;
package/token.d.ts DELETED
@@ -1,14 +0,0 @@
1
- import type { Injector } from 'static-injector';
2
- import type { ComputedRef, InjectionKey } from 'vue';
3
- import type { PiResolvedViewFieldConfig, PiViewConfig } from './type/group';
4
- import type { CoreSchemaHandle, FormBuilder, SetOptional } from '@piying/view-core';
5
- import type { ConvertOptions } from '@piying/valibot-visit';
6
- import * as v from 'valibot';
7
- export declare const InjectorToken: InjectionKey<ComputedRef<Injector>>;
8
- export declare const PI_VIEW_FIELD_TOKEN: InjectionKey<ComputedRef<PiResolvedViewFieldConfig>>;
9
- export declare const PI_INPUT_OPTIONS_TOKEN: InjectionKey<ComputedRef<SetOptional<ConvertOptions<typeof CoreSchemaHandle<any, any>>, 'handle'> & {
10
- builder: typeof FormBuilder<CoreSchemaHandle<any, any>>;
11
- fieldGlobalConfig?: PiViewConfig;
12
- }>>;
13
- export declare const PI_INPUT_SCHEMA_TOKEN: InjectionKey<ComputedRef<v.BaseSchema<any, any, any> | v.SchemaWithPipe<any>>>;
14
- export declare const PI_INPUT_MODEL_TOKEN: InjectionKey<ComputedRef<any>>;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes