@linkdesk/plugin-sdk 0.1.14 → 0.1.15

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.
@@ -1,109 +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.mjsnpm 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": "圆角八档(键 = 档位名,值 = px999 = 全胶囊 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
- }
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://linkdesk.local/schemas/theme.schema.json",
4
+ "title": "LinkDesk theme definition (ThemeRecipe)",
5
+ "description": "Contract for the theme JSON file referenced by contributes.themes (modeled on plugin.schema.json; format errors are rejected on the spot). Mirrors the ThemeRecipe type in src/core/types/theme.ts; parsing semantics live in parseThemeRecipe. The new format requires colorways[] (the engine reads only the new format); appearance domains are sparse, and an omitted domain inherits the shell's :root default. Validated by scripts/check-theme-schema.mjs (part of the npm run check chain).",
6
+ "type": "object",
7
+ "required": ["id", "name", "type", "colorways"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string",
12
+ "description": "Editor IntelliSense reference (optional) — relative path ../../../public/schemas/theme.schema.json"
13
+ },
14
+ "id": {
15
+ "type": "string",
16
+ "description": "Theme id — globally unique (stored in app.theme; convention: the plugin's short name)"
17
+ },
18
+ "name": {
19
+ "type": "string",
20
+ "description": "Theme display name — shown in the theme picker and the window title"
21
+ },
22
+ "type": {
23
+ "type": "string",
24
+ "enum": ["light", "dark"],
25
+ "description": "Base light/dark mode — dark is the :root base, light is the data-theme override layer"
26
+ },
27
+ "appearance": {
28
+ "type": "object",
29
+ "description": "Appearance domains (single value, sparse) — an omitted domain inherits the shell's :root default",
30
+ "additionalProperties": false,
31
+ "properties": {
32
+ "radius": {
33
+ "type": "object",
34
+ "description": "Eight radius steps (key = step name, value = px; 999 = full 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": "Glass and floating panel material (ThemeSurface) default: no glass, no floating",
50
+ "additionalProperties": false,
51
+ "properties": {
52
+ "type": { "type": "string", "enum": ["glass"], "description": "Glass recipe — default: no glass" },
53
+ "blur": { "type": "number", "description": "Backdrop blur in px0 = off" },
54
+ "saturate": { "type": "number", "description": "Saturation boost — 1 = off" },
55
+ "tint": { "type": "string", "description": "Overlay tint color for the glass surface" },
56
+ "opacity": { "type": "number", "description": "Glass surface opacity (compositing baseline) — 1 = opaque / 0 = fully transparent, background shows through" },
57
+ "specular": { "type": "number", "description": "Liquid glass top highlight strength — 0 = off" },
58
+ "specularColor": { "type": "string", "description": "Base color of the top highlight — default: white; alpha still comes from specular" },
59
+ "morph": { "type": "number", "description": "Morph transition in ms0 = off" },
60
+ "radius": { "type": "number", "description": "Floating corner radius in px0 = square corners flush to the edge" },
61
+ "shadow": { "type": "boolean", "description": "Drop shadow lift — true = floating shadow (maps to --shadow-lift)" },
62
+ "texture": { "type": "string", "description": "Path to a tileable texture image asset (paper texture)" },
63
+ "textureOpacity": { "type": "number", "description": "Texture opacity — 1 = opaque" }
64
+ }
65
+ },
66
+ "font": {
67
+ "type": "object",
68
+ "description": "Font domain — a system font family name or a relative asset path (asset → @font-face → family name)",
69
+ "additionalProperties": false,
70
+ "properties": {
71
+ "ui": { "type": "string", "description": "UI font (--font-ui)" },
72
+ "mono": { "type": "string", "description": "Monospace font (--font-mono)" }
73
+ }
74
+ },
75
+ "background": {
76
+ "type": "object",
77
+ "description": "Image background domain (panorama = full window / zones = sliced)",
78
+ "additionalProperties": false,
79
+ "properties": {
80
+ "image": { "type": "string", "description": "Image path — the author provides a resolvable URL; the engine wraps it in url() when writing --bg-image" },
81
+ "opacity": { "type": "number", "description": "Image layer opacity — 1 = opaque" },
82
+ "mask": { "type": "number", "description": "Image mask darkness (0-1) — 0 = no mask" },
83
+ "maskColor": { "type": "string", "description": "Mask base color — default: black; alpha still comes from mask" },
84
+ "mode": { "type": "string", "enum": ["panorama", "zones"], "description": "Slice mode — panorama (default) / zones (the same image sliced continuously)" }
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "colorways": {
90
+ "type": "array",
91
+ "description": "Colorway list (multi-value color domain, at least one entry)",
92
+ "minItems": 1,
93
+ "items": {
94
+ "type": "object",
95
+ "required": ["id", "name"],
96
+ "additionalProperties": false,
97
+ "properties": {
98
+ "id": { "type": "string", "description": "Colorway id — globally unique (stored in the dynamic app.themeColor enum)" },
99
+ "name": { "type": "string", "description": "Colorway display name" },
100
+ "colors": {
101
+ "type": "object",
102
+ "description": "Color token set (key = contract token name without the -- prefix; value = a color string)",
103
+ "additionalProperties": { "type": "string" }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }