@piying/view-vue 2.9.0 → 2.9.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.
- package/index.js +31 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/util/typed-component.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@piying/view-vue",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
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.
|
|
39
|
+
"@piying/view-core": "^2.9.2",
|
|
40
40
|
"static-injector": "^6.3.1"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { actions as PresetActions, type AnyCoreSchemaHandle, type AsyncProperty, type PiCommonConfig, type PiTypeConfig, type _PiResolvedCommonViewFieldConfig } from '@piying/view-core';
|
|
2
2
|
import { type MetadataListAction, type RawConfigAction } from '@piying/valibot-visit';
|
|
3
3
|
import type { AllowedComponentProps, DefineComponent, VNodeProps } from 'vue';
|
|
4
|
+
import * as v from 'valibot';
|
|
4
5
|
type ComponentInputs<TComponent> = TComponent extends new (...args: any[]) => any ? InstanceType<TComponent> extends {
|
|
5
6
|
$props: any;
|
|
6
7
|
} ? Omit<InstanceType<TComponent>['$props'], keyof VNodeProps | keyof AllowedComponentProps> : Record<string, any> : Record<string, any>;
|
|
@@ -23,5 +24,9 @@ type ActionComponent<A extends PiTypeConfig> = A['type'] extends DefineComponent
|
|
|
23
24
|
export declare function typedComponent<T extends PiCommonConfig>(input: T): {
|
|
24
25
|
define: T;
|
|
25
26
|
setComponent: <TCName extends keyof T['types'] | DefineComponent<any, any, any>, K>(input: TCName, fn?: (actions: Omit<typeof PresetActions, 'inputs'> & ComponentActions<TCName extends keyof T['types'] ? ActionComponent<NonNullable<T['types']>[TCName]> : TCName>) => any[]) => MetadataListAction<K>;
|
|
27
|
+
nfcComponent: <TCName extends keyof T['types'] | DefineComponent<any, any, any>>(input: TCName, fn?: (actions: Omit<typeof PresetActions, 'inputs'> & ComponentActions<TCName extends keyof T['types'] ? ActionComponent<NonNullable<T['types']>[TCName]> : TCName>) => any[]) => v.SchemaWithPipe<readonly [
|
|
28
|
+
v.OptionalSchema<v.VoidSchema<undefined>, undefined>,
|
|
29
|
+
MetadataListAction<void | undefined>
|
|
30
|
+
]>;
|
|
26
31
|
};
|
|
27
32
|
export {};
|