@cssui/unplugin 1.0.0 → 1.0.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/dist/components.d.ts +1 -1
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +8 -0
- package/dist/resolver.d.ts +21 -0
- package/dist/resolver.js +1 -1
- package/package.json +50 -48
package/dist/components.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const cssUIComponentPaths: readonly ["button", "input", "checkbox", "radio", "switch", "divider", "modal", "toast", "icon", "slider", "tabs", "carousel", "input-number", "tooltip", "select", "steps", "toolbars", "input-bar", "date-picker", "time-picker"];
|
|
1
|
+
export declare const cssUIComponentPaths: readonly ["button", "input", "checkbox", "radio", "switch", "divider", "modal", "toast", "icon", "slider", "tabs", "carousel", "input-number", "tooltip", "select", "steps", "toolbars", "input-bar", "date-picker", "time-picker", "breadcrumb", "float-button", "form", "grid", "nav-menu", "pagination", "sidebar", "table"];
|
|
2
2
|
export type CssUIComponentPath = (typeof cssUIComponentPaths)[number];
|
|
3
3
|
export declare function isCssUIComponentPath(value: string): value is CssUIComponentPath;
|
|
4
4
|
//# sourceMappingURL=components.d.ts.map
|
package/dist/components.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,iUA6BtB,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAIrE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAE/E"}
|
package/dist/components.js
CHANGED
|
@@ -19,6 +19,14 @@ export const cssUIComponentPaths = [
|
|
|
19
19
|
'input-bar',
|
|
20
20
|
'date-picker',
|
|
21
21
|
'time-picker',
|
|
22
|
+
'breadcrumb',
|
|
23
|
+
'float-button',
|
|
24
|
+
'form',
|
|
25
|
+
'grid',
|
|
26
|
+
'nav-menu',
|
|
27
|
+
'pagination',
|
|
28
|
+
'sidebar',
|
|
29
|
+
'table',
|
|
22
30
|
];
|
|
23
31
|
const cssUIComponentPathSet = new Set(cssUIComponentPaths);
|
|
24
32
|
export function isCssUIComponentPath(value) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type ResolverType = 'react' | 'vue';
|
|
2
|
+
export interface ComponentResolverOptions {
|
|
3
|
+
prefix?: string;
|
|
4
|
+
type?: ResolverType;
|
|
5
|
+
importStyle?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ComponentResolveResult {
|
|
8
|
+
from: string;
|
|
9
|
+
name: string;
|
|
10
|
+
sideEffects?: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface CssUIComponentResolver {
|
|
13
|
+
type: 'component';
|
|
14
|
+
resolve: (name: string) => ComponentResolveResult | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare function CssUIResolver(options?: ComponentResolverOptions): CssUIComponentResolver;
|
|
17
|
+
export declare function createResolver(options?: ComponentResolverOptions): (name: string) => ComponentResolveResult | undefined;
|
|
18
|
+
export declare const resolverReact: CssUIComponentResolver;
|
|
19
|
+
export declare const resolverVue: CssUIComponentResolver;
|
|
20
|
+
export default CssUIResolver;
|
|
21
|
+
//# sourceMappingURL=resolver.d.ts.map
|
package/dist/resolver.js
CHANGED
|
@@ -31,7 +31,7 @@ export function CssUIResolver(options = {}) {
|
|
|
31
31
|
}
|
|
32
32
|
let sideEffects;
|
|
33
33
|
if (importStyle) {
|
|
34
|
-
sideEffects = [`@cssui
|
|
34
|
+
sideEffects = [`@cssui/${type}/${componentPath}/style.css`];
|
|
35
35
|
}
|
|
36
36
|
return {
|
|
37
37
|
from: `@cssui/${type}/${componentPath}`,
|
package/package.json
CHANGED
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cssui/unplugin",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "周生生 UI 自动引入插件",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"module": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js",
|
|
12
|
-
"default": "./dist/index.js"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@cssui/unplugin",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "周生生 UI 自动引入插件",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rimraf dist tsconfig.tsbuildinfo && tsc -p tsconfig.json && node ./scripts/ensure-declarations.mjs",
|
|
20
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
21
|
+
"clean": "rimraf dist tsconfig.tsbuildinfo"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"unplugin": "^1.6.0"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"vite": ">=3.0.0",
|
|
28
|
+
"webpack": ">=5.0.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependenciesMeta": {
|
|
31
|
+
"vite": {
|
|
32
|
+
"optional": true
|
|
33
|
+
},
|
|
34
|
+
"webpack": {
|
|
35
|
+
"optional": true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^20.11.5",
|
|
40
|
+
"vite": "^5.0.12",
|
|
41
|
+
"webpack": "^5.90.1"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"unplugin",
|
|
45
|
+
"auto-import",
|
|
46
|
+
"resolver"
|
|
47
|
+
],
|
|
48
|
+
"author": "3lin9",
|
|
49
|
+
"license": "MIT"
|
|
50
|
+
}
|