king-design-analyzer 1.0.0
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/README.md +151 -0
- package/components/affix.json +178 -0
- package/components/az.json +86 -0
- package/components/badge.json +162 -0
- package/components/billtypes.json +90 -0
- package/components/breadcrumb.json +220 -0
- package/components/button.json +511 -0
- package/components/card.json +334 -0
- package/components/cardcontent.json +144 -0
- package/components/carousel.json +207 -0
- package/components/cascader.json +373 -0
- package/components/checkbox.json +298 -0
- package/components/code.json +318 -0
- package/components/collapse.json +358 -0
- package/components/copy.json +220 -0
- package/components/datepicker.json +529 -0
- package/components/descriptions.json +309 -0
- package/components/dialog.json +460 -0
- package/components/divider.json +287 -0
- package/components/drawer.json +563 -0
- package/components/dropdown.json +407 -0
- package/components/editable.json +331 -0
- package/components/ellipsis.json +218 -0
- package/components/form.json +638 -0
- package/components/grid.json +377 -0
- package/components/icon.json +442 -0
- package/components/input.json +821 -0
- package/components/layoutcontent.json +210 -0
- package/components/menu.json +482 -0
- package/components/message.json +345 -0
- package/components/pagination.json +444 -0
- package/components/paginationplus.json +74 -0
- package/components/popover.json +456 -0
- package/components/progress.json +354 -0
- package/components/protable.json +132 -0
- package/components/radio.json +246 -0
- package/components/region.json +115 -0
- package/components/select.json +676 -0
- package/components/slider.json +422 -0
- package/components/spin.json +232 -0
- package/components/spinner.json +441 -0
- package/components/status.json +75 -0
- package/components/steps.json +292 -0
- package/components/switch.json +357 -0
- package/components/table.json +1057 -0
- package/components/tablecolumnid.json +217 -0
- package/components/tabs.json +363 -0
- package/components/tag.json +504 -0
- package/components/timepicker.json +447 -0
- package/components/tip.json +322 -0
- package/components/tooltip.json +416 -0
- package/components/tour.json +395 -0
- package/components/transfer.json +414 -0
- package/components/tree.json +480 -0
- package/components/treeselect.json +478 -0
- package/components/upload.json +499 -0
- package/components/virtuallist.json +178 -0
- package/dist/ast/index.d.mts +71 -0
- package/dist/ast/index.d.ts +71 -0
- package/dist/ast/index.js +15 -0
- package/dist/ast/index.mjs +2 -0
- package/dist/chunk-4BUGNH4F.mjs +62 -0
- package/dist/chunk-5H7N2A5X.mjs +1 -0
- package/dist/chunk-5IF32MBB.js +603 -0
- package/dist/chunk-ARWRNWDW.js +219 -0
- package/dist/chunk-C3L4IXJC.mjs +577 -0
- package/dist/chunk-GNVCC37B.js +102 -0
- package/dist/chunk-N4UIA6DN.js +68 -0
- package/dist/chunk-RAMIBZAU.mjs +216 -0
- package/dist/chunk-RNQHI7YG.js +64 -0
- package/dist/chunk-TB6BF5TJ.mjs +99 -0
- package/dist/chunk-UX7KGX45.mjs +66 -0
- package/dist/chunk-YTEYDSDW.js +2 -0
- package/dist/full/index.d.mts +29 -0
- package/dist/full/index.d.ts +29 -0
- package/dist/full/index.js +16 -0
- package/dist/full/index.mjs +3 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +43 -0
- package/dist/index.mjs +6 -0
- package/dist/runtime/index.d.mts +14 -0
- package/dist/runtime/index.d.ts +14 -0
- package/dist/runtime/index.js +15 -0
- package/dist/runtime/index.mjs +2 -0
- package/dist/sfcCompiler-m51JOfWs.d.mts +22 -0
- package/dist/sfcCompiler-m51JOfWs.d.ts +22 -0
- package/dist/static/index.d.mts +14 -0
- package/dist/static/index.d.ts +14 -0
- package/dist/static/index.js +19 -0
- package/dist/static/index.mjs +2 -0
- package/package.json +88 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { C as CompilationResult, c as compileSFC } from '../sfcCompiler-m51JOfWs.js';
|
|
2
|
+
|
|
3
|
+
interface ValidationLayer {
|
|
4
|
+
name: string;
|
|
5
|
+
passed: boolean;
|
|
6
|
+
errors: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 运行时预检查 (模拟执行)
|
|
10
|
+
* 验证脚本是否能正确解析和执行
|
|
11
|
+
*/
|
|
12
|
+
declare function validateRuntimePrecheck(code: string): ValidationLayer;
|
|
13
|
+
|
|
14
|
+
export { type ValidationLayer, validateRuntimePrecheck };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkN4UIA6DN_js = require('../chunk-N4UIA6DN.js');
|
|
4
|
+
var chunkGNVCC37B_js = require('../chunk-GNVCC37B.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "validateRuntimePrecheck", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkN4UIA6DN_js.validateRuntimePrecheck; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "compileSFC", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkGNVCC37B_js.compileSFC; }
|
|
15
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface CompilationResult {
|
|
2
|
+
template: string;
|
|
3
|
+
script: string;
|
|
4
|
+
style: string;
|
|
5
|
+
bindings: string[];
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Scopes CSS by prepending a unique class to selectors.
|
|
10
|
+
* Matches {selector} { ... } blocks.
|
|
11
|
+
*/
|
|
12
|
+
declare function scopeStyles(css: string, scopeClass: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Parses and compiles a Vue SFC string for runtime execution.
|
|
15
|
+
*
|
|
16
|
+
* @param code The SFC code string
|
|
17
|
+
* @param scopeId A unique ID for CSS scoping (e.g. 'preview-scope-123')
|
|
18
|
+
* @returns CompilationResult containing extracted parts and transformed script
|
|
19
|
+
*/
|
|
20
|
+
declare function compileSFC(code: string, scopeId: string): CompilationResult;
|
|
21
|
+
|
|
22
|
+
export { type CompilationResult as C, compileSFC as c, scopeStyles as s };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface CompilationResult {
|
|
2
|
+
template: string;
|
|
3
|
+
script: string;
|
|
4
|
+
style: string;
|
|
5
|
+
bindings: string[];
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Scopes CSS by prepending a unique class to selectors.
|
|
10
|
+
* Matches {selector} { ... } blocks.
|
|
11
|
+
*/
|
|
12
|
+
declare function scopeStyles(css: string, scopeClass: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Parses and compiles a Vue SFC string for runtime execution.
|
|
15
|
+
*
|
|
16
|
+
* @param code The SFC code string
|
|
17
|
+
* @param scopeId A unique ID for CSS scoping (e.g. 'preview-scope-123')
|
|
18
|
+
* @returns CompilationResult containing extracted parts and transformed script
|
|
19
|
+
*/
|
|
20
|
+
declare function compileSFC(code: string, scopeId: string): CompilationResult;
|
|
21
|
+
|
|
22
|
+
export { type CompilationResult as C, compileSFC as c, scopeStyles as s };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { C as CompilationResult, c as compileSFC, s as scopeStyles } from '../sfcCompiler-m51JOfWs.mjs';
|
|
2
|
+
|
|
3
|
+
interface ValidationLayer {
|
|
4
|
+
name: string;
|
|
5
|
+
passed: boolean;
|
|
6
|
+
errors: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 静态编译检查
|
|
10
|
+
* 验证 Vue SFC 结构和 TypeScript 语法
|
|
11
|
+
*/
|
|
12
|
+
declare function validateCompilation(code: string): ValidationLayer;
|
|
13
|
+
|
|
14
|
+
export { type ValidationLayer, validateCompilation };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { C as CompilationResult, c as compileSFC, s as scopeStyles } from '../sfcCompiler-m51JOfWs.js';
|
|
2
|
+
|
|
3
|
+
interface ValidationLayer {
|
|
4
|
+
name: string;
|
|
5
|
+
passed: boolean;
|
|
6
|
+
errors: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 静态编译检查
|
|
10
|
+
* 验证 Vue SFC 结构和 TypeScript 语法
|
|
11
|
+
*/
|
|
12
|
+
declare function validateCompilation(code: string): ValidationLayer;
|
|
13
|
+
|
|
14
|
+
export { type ValidationLayer, validateCompilation };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkRNQHI7YG_js = require('../chunk-RNQHI7YG.js');
|
|
4
|
+
var chunkGNVCC37B_js = require('../chunk-GNVCC37B.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "validateCompilation", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkRNQHI7YG_js.validateCompilation; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "compileSFC", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkGNVCC37B_js.compileSFC; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "scopeStyles", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkGNVCC37B_js.scopeStyles; }
|
|
19
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "king-design-analyzer",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AST-based code analyzer for King Design Vue components with on-demand modular imports",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./static": {
|
|
15
|
+
"types": "./dist/static/index.d.ts",
|
|
16
|
+
"import": "./dist/static/index.mjs",
|
|
17
|
+
"require": "./dist/static/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./ast": {
|
|
20
|
+
"types": "./dist/ast/index.d.ts",
|
|
21
|
+
"import": "./dist/ast/index.mjs",
|
|
22
|
+
"require": "./dist/ast/index.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./runtime": {
|
|
25
|
+
"types": "./dist/runtime/index.d.ts",
|
|
26
|
+
"import": "./dist/runtime/index.mjs",
|
|
27
|
+
"require": "./dist/runtime/index.cjs"
|
|
28
|
+
},
|
|
29
|
+
"./full": {
|
|
30
|
+
"types": "./dist/full/index.d.ts",
|
|
31
|
+
"import": "./dist/full/index.mjs",
|
|
32
|
+
"require": "./dist/full/index.cjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"components"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsup",
|
|
41
|
+
"build:tsc": "tsc",
|
|
42
|
+
"dev": "tsup --watch",
|
|
43
|
+
"clean": "rm -rf dist",
|
|
44
|
+
"validate": "npx ts-node src/tools/validateDataset.ts",
|
|
45
|
+
"validate:report": "npx ts-node src/tools/validateDataset.ts -o report.json",
|
|
46
|
+
"validate:unified": "npx ts-node src/tools/testUnifiedValidator.ts",
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"test:watch": "vitest",
|
|
49
|
+
"prepublishOnly": "npm run build"
|
|
50
|
+
},
|
|
51
|
+
"keywords": [
|
|
52
|
+
"king-design",
|
|
53
|
+
"vue",
|
|
54
|
+
"ast",
|
|
55
|
+
"analyzer",
|
|
56
|
+
"lint",
|
|
57
|
+
"validation",
|
|
58
|
+
"sfc"
|
|
59
|
+
],
|
|
60
|
+
"author": "",
|
|
61
|
+
"license": "MIT",
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"sucrase": "^3.35.1"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@vue/compiler-sfc": "^3.5.0",
|
|
67
|
+
"typescript": "^5.0.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"@vue/compiler-sfc": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"typescript": {
|
|
74
|
+
"optional": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@types/node": "^22.10.5",
|
|
79
|
+
"@vue/compiler-sfc": "^3.5.13",
|
|
80
|
+
"ts-node": "^10.9.2",
|
|
81
|
+
"tsup": "^8.3.5",
|
|
82
|
+
"typescript": "^5.7.3",
|
|
83
|
+
"vitest": "^4.0.16"
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=18.0.0"
|
|
87
|
+
}
|
|
88
|
+
}
|