@linkdesk/plugin-sdk 0.1.0 → 0.1.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.
Files changed (55) hide show
  1. package/README.md +21 -0
  2. package/dist/bin.js +12 -0
  3. package/dist/bin.js.map +1 -1
  4. package/dist/eslint/checks/css-hardcode.d.ts +14 -0
  5. package/dist/eslint/checks/css-hardcode.d.ts.map +1 -0
  6. package/dist/eslint/checks/css-hardcode.js +87 -0
  7. package/dist/eslint/checks/css-hardcode.js.map +1 -0
  8. package/dist/eslint/checks/disable.d.ts +29 -0
  9. package/dist/eslint/checks/disable.d.ts.map +1 -0
  10. package/dist/eslint/checks/disable.js +151 -0
  11. package/dist/eslint/checks/disable.js.map +1 -0
  12. package/dist/eslint/checks/font-scale.d.ts +19 -0
  13. package/dist/eslint/checks/font-scale.d.ts.map +1 -0
  14. package/dist/eslint/checks/font-scale.js +127 -0
  15. package/dist/eslint/checks/font-scale.js.map +1 -0
  16. package/dist/eslint/checks/scan.d.ts +20 -0
  17. package/dist/eslint/checks/scan.d.ts.map +1 -0
  18. package/dist/eslint/checks/scan.js +63 -0
  19. package/dist/eslint/checks/scan.js.map +1 -0
  20. package/dist/eslint/checks/spacing-grid.d.ts +14 -0
  21. package/dist/eslint/checks/spacing-grid.d.ts.map +1 -0
  22. package/dist/eslint/checks/spacing-grid.js +54 -0
  23. package/dist/eslint/checks/spacing-grid.js.map +1 -0
  24. package/dist/eslint/index.d.ts +15 -0
  25. package/dist/eslint/index.d.ts.map +1 -0
  26. package/dist/eslint/index.js +13 -0
  27. package/dist/eslint/index.js.map +1 -0
  28. package/dist/eslint/lint.d.ts +26 -0
  29. package/dist/eslint/lint.d.ts.map +1 -0
  30. package/dist/eslint/lint.js +112 -0
  31. package/dist/eslint/lint.js.map +1 -0
  32. package/dist/eslint/preset.d.ts +11 -0
  33. package/dist/eslint/preset.d.ts.map +1 -0
  34. package/dist/eslint/preset.js +88 -0
  35. package/dist/eslint/preset.js.map +1 -0
  36. package/dist/eslint/rules.d.ts +28 -0
  37. package/dist/eslint/rules.d.ts.map +1 -0
  38. package/dist/eslint/rules.js +441 -0
  39. package/dist/eslint/rules.js.map +1 -0
  40. package/dist/index.d.ts +3 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +3 -1
  43. package/dist/index.js.map +1 -1
  44. package/dist/validate.d.ts +9 -2
  45. package/dist/validate.d.ts.map +1 -1
  46. package/dist/validate.js +88 -24
  47. package/dist/validate.js.map +1 -1
  48. package/dist/vite-config.d.ts +29 -8
  49. package/dist/vite-config.d.ts.map +1 -1
  50. package/dist/vite-config.js +377 -67
  51. package/dist/vite-config.js.map +1 -1
  52. package/package.json +20 -3
  53. package/schemas/icon-theme.schema.json +97 -0
  54. package/schemas/plugin.schema.json +696 -687
  55. package/schemas/theme.schema.json +109 -0
@@ -0,0 +1,109 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://linkdesk.local/schemas/theme.schema.json",
4
+ "title": "LinkDesk 主题定义(ThemeRecipe,05 schema)",
5
+ "description": "contributes.themes 指向的主题 JSON 文件契约(E5.8#129 立——对标 plugin.schema.json,格式错当场拦)。镜像 src/core/types/theme.ts ThemeRecipe;解析语义见 parseThemeRecipe。新格式必备 colorways[](决策 F:引擎只读新格式);appearance 各域稀疏,缺的域继承 :root 壳默认。校验脚本 scripts/check-theme-schema.mjs(npm run check 链)。",
6
+ "type": "object",
7
+ "required": ["id", "name", "type", "colorways"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string",
12
+ "description": "编辑器 IntelliSense 引用(可选)——相对路径 ../../../public/schemas/theme.schema.json"
13
+ },
14
+ "id": {
15
+ "type": "string",
16
+ "description": "主题 id——全局唯一(app.theme 存此;惯例 = 插件短名)"
17
+ },
18
+ "name": {
19
+ "type": "string",
20
+ "description": "主题显示名——主题选择器/浏览器标题"
21
+ },
22
+ "type": {
23
+ "type": "string",
24
+ "enum": ["light", "dark"],
25
+ "description": "基础明暗——dark 基底 :root / light 覆盖层 data-theme"
26
+ },
27
+ "appearance": {
28
+ "type": "object",
29
+ "description": "风格域(单值稀疏)——缺的域继承 :root 壳默认",
30
+ "additionalProperties": false,
31
+ "properties": {
32
+ "radius": {
33
+ "type": "object",
34
+ "description": "圆角八档(键 = 档位名,值 = px;999 = 全胶囊 pill)",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "xs": { "type": "number" },
38
+ "sm": { "type": "number" },
39
+ "md": { "type": "number" },
40
+ "lg": { "type": "number" },
41
+ "xl": { "type": "number" },
42
+ "2xl": { "type": "number" },
43
+ "pill": { "type": "number" },
44
+ "full": { "type": "number" }
45
+ }
46
+ },
47
+ "glass": {
48
+ "type": "object",
49
+ "description": "玻璃 + 悬浮面板材质(ThemeSurface)——缺省 = 无玻璃无悬浮",
50
+ "additionalProperties": false,
51
+ "properties": {
52
+ "type": { "type": "string", "enum": ["glass"], "description": "玻璃配方——缺省 = 无玻璃" },
53
+ "blur": { "type": "number", "description": "backdrop blur px——0 = 关" },
54
+ "saturate": { "type": "number", "description": "饱和度增强——1 = 关" },
55
+ "tint": { "type": "string", "description": "玻璃面叠加色" },
56
+ "opacity": { "type": "number", "description": "玻璃面不透明度(合成层基线)——1 = 不透明 / 0 = 全透见背景" },
57
+ "specular": { "type": "number", "description": "液态玻璃顶部高光强度——0 = 关" },
58
+ "specularColor": { "type": "string", "description": "顶部高光基色——缺省 = 白;alpha 仍走 specular" },
59
+ "morph": { "type": "number", "description": "形变过渡 ms——0 = 关" },
60
+ "radius": { "type": "number", "description": "悬浮圆角 px——0 = 直角贴边" },
61
+ "shadow": { "type": "boolean", "description": "投影浮起——true = 悬浮投影(映射 --shadow-lift)" },
62
+ "texture": { "type": "string", "description": "可平铺纹理图资产路径(⑬ 纸纹分区)" },
63
+ "textureOpacity": { "type": "number", "description": "纹理不透明度——1 = 不透明" }
64
+ }
65
+ },
66
+ "font": {
67
+ "type": "object",
68
+ "description": "字体域——系统字体族名字符串 or 资产相对路径(#50.17:资产 → @font-face → 族名)",
69
+ "additionalProperties": false,
70
+ "properties": {
71
+ "ui": { "type": "string", "description": "UI 字体(--font-ui)" },
72
+ "mono": { "type": "string", "description": "等宽字体(--font-mono)" }
73
+ }
74
+ },
75
+ "background": {
76
+ "type": "object",
77
+ "description": "图片背景域(panorama 全窗 / zones 切片)",
78
+ "additionalProperties": false,
79
+ "properties": {
80
+ "image": { "type": "string", "description": "图片路径——作者提供可解析 URL,引擎写 --bg-image 时 url() 包裹" },
81
+ "opacity": { "type": "number", "description": "图片层不透明度——1 = 不透明" },
82
+ "mask": { "type": "number", "description": "图片遮罩明暗(0-1)——0 = 无遮罩" },
83
+ "maskColor": { "type": "string", "description": "遮罩基色——缺省 = 黑;alpha 仍走 mask" },
84
+ "mode": { "type": "string", "enum": ["panorama", "zones"], "description": "切片模式——panorama(默认)/ zones(同图连续切片)" }
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "colorways": {
90
+ "type": "array",
91
+ "description": "配色变体列表(颜色域多值,至少 1 项)",
92
+ "minItems": 1,
93
+ "items": {
94
+ "type": "object",
95
+ "required": ["id", "name"],
96
+ "additionalProperties": false,
97
+ "properties": {
98
+ "id": { "type": "string", "description": "配色变体 id——全局唯一(app.themeColor 动态 enum 存此)" },
99
+ "name": { "type": "string", "description": "配色显示名" },
100
+ "colors": {
101
+ "type": "object",
102
+ "description": "颜色 token 集(键 = 变量契约 token 名去 -- 前缀;值 = 颜色字符串)",
103
+ "additionalProperties": { "type": "string" }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }