@linkdesk/plugin-sdk 0.1.14 → 0.1.16
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 +35 -35
- package/dist/bin.js +19 -19
- package/dist/publish.d.ts +30 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +73 -1
- package/dist/publish.js.map +1 -1
- package/package.json +1 -1
- package/schemas/icon-theme.schema.json +97 -97
- package/schemas/plugin.schema.json +169 -169
- package/schemas/theme.schema.json +109 -109
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://linkdesk.local/schemas/icon-theme.schema.json",
|
|
4
|
-
"title": "LinkDesk
|
|
5
|
-
"description": "contributes.iconThemes
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"properties": {
|
|
9
|
-
"$schema": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"description": "
|
|
12
|
-
},
|
|
13
|
-
"files": {
|
|
14
|
-
"$ref": "#/$defs/mappingTable",
|
|
15
|
-
"description": "
|
|
16
|
-
},
|
|
17
|
-
"extensions": {
|
|
18
|
-
"$ref": "#/$defs/mappingTable",
|
|
19
|
-
"description": "
|
|
20
|
-
},
|
|
21
|
-
"folders": {
|
|
22
|
-
"$ref": "#/$defs/mappingTable",
|
|
23
|
-
"description": "
|
|
24
|
-
},
|
|
25
|
-
"foldersExpanded": {
|
|
26
|
-
"$ref": "#/$defs/mappingTable",
|
|
27
|
-
"description": "
|
|
28
|
-
},
|
|
29
|
-
"file": {
|
|
30
|
-
"$ref": "#/$defs/iconMapping",
|
|
31
|
-
"description": "
|
|
32
|
-
},
|
|
33
|
-
"folder": {
|
|
34
|
-
"$ref": "#/$defs/iconMapping",
|
|
35
|
-
"description": "
|
|
36
|
-
},
|
|
37
|
-
"folderExpanded": {
|
|
38
|
-
"$ref": "#/$defs/iconMapping",
|
|
39
|
-
"description": "
|
|
40
|
-
},
|
|
41
|
-
"rootFolder": {
|
|
42
|
-
"$ref": "#/$defs/iconMapping",
|
|
43
|
-
"description": "
|
|
44
|
-
},
|
|
45
|
-
"rootFolderExpanded": {
|
|
46
|
-
"$ref": "#/$defs/iconMapping",
|
|
47
|
-
"description": "
|
|
48
|
-
},
|
|
49
|
-
"font": {
|
|
50
|
-
"$ref": "#/$defs/fontSpec",
|
|
51
|
-
"description": "
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"$defs": {
|
|
55
|
-
"mappingTable": {
|
|
56
|
-
"type": "object",
|
|
57
|
-
"description": "
|
|
58
|
-
"additionalProperties": { "$ref": "#/$defs/iconMapping" }
|
|
59
|
-
},
|
|
60
|
-
"iconMapping": {
|
|
61
|
-
"title": "
|
|
62
|
-
"type": "object",
|
|
63
|
-
"anyOf": [
|
|
64
|
-
{
|
|
65
|
-
"title": "
|
|
66
|
-
"description": "CSS
|
|
67
|
-
"required": ["class"],
|
|
68
|
-
"properties": {
|
|
69
|
-
"class": { "type": "string", "description": "CSS
|
|
70
|
-
"color": { "type": "string", "description": "
|
|
71
|
-
},
|
|
72
|
-
"additionalProperties": false
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"title": "
|
|
76
|
-
"description": "
|
|
77
|
-
"required": ["imagePath"],
|
|
78
|
-
"properties": {
|
|
79
|
-
"imagePath": { "type": "string", "description": "
|
|
80
|
-
},
|
|
81
|
-
"additionalProperties": false
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
"fontSpec": {
|
|
86
|
-
"type": "object",
|
|
87
|
-
"description": "
|
|
88
|
-
"required": ["path", "family"],
|
|
89
|
-
"additionalProperties": false,
|
|
90
|
-
"properties": {
|
|
91
|
-
"path": { "type": "string", "description": "
|
|
92
|
-
"family": { "type": "string", "description": "
|
|
93
|
-
"glyphs": { "type": "string", "description": "glyph
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://linkdesk.local/schemas/icon-theme.schema.json",
|
|
4
|
+
"title": "LinkDesk icon theme mappings data contract",
|
|
5
|
+
"description": "Contract for the mappings JSON file referenced by contributes.iconThemes — mirrors the engine's normalizeIconThemeMappings (src/pluginLoader/contributions/contributions.ts). Four mapping tables (files/extensions/folders/foldersExpanded) plus five top-level default icon keys (file/folder/folderExpanded/rootFolder/rootFolderExpanded); each entry takes one of two forms: a font glyph (class + optional color) or an image asset (imagePath, relative to the plugin root). An optional top-level font section declares a custom icon font. Validation: @linkdesk/plugin-sdk validateIconThemeJson on the npm side, check-theme-schema.mjs on the repo side (it scans every contributes.iconThemes entry).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Editor IntelliSense reference (optional) — npm authors reference node_modules/@linkdesk/plugin-sdk/schemas/icon-theme.schema.json"
|
|
12
|
+
},
|
|
13
|
+
"files": {
|
|
14
|
+
"$ref": "#/$defs/mappingTable",
|
|
15
|
+
"description": "File name → icon entry (highest match priority; on a miss, extensions is consulted)"
|
|
16
|
+
},
|
|
17
|
+
"extensions": {
|
|
18
|
+
"$ref": "#/$defs/mappingTable",
|
|
19
|
+
"description": "Extension (including the dot, e.g. \".ts\"/\".jsx\") → icon entry"
|
|
20
|
+
},
|
|
21
|
+
"folders": {
|
|
22
|
+
"$ref": "#/$defs/mappingTable",
|
|
23
|
+
"description": "Folder name → icon entry (collapsed)"
|
|
24
|
+
},
|
|
25
|
+
"foldersExpanded": {
|
|
26
|
+
"$ref": "#/$defs/mappingTable",
|
|
27
|
+
"description": "Folder name → icon entry (expanded; defaults to reusing folders)"
|
|
28
|
+
},
|
|
29
|
+
"file": {
|
|
30
|
+
"$ref": "#/$defs/iconMapping",
|
|
31
|
+
"description": "Default file icon — used when files/extensions miss (default: the shell's fallback icon)"
|
|
32
|
+
},
|
|
33
|
+
"folder": {
|
|
34
|
+
"$ref": "#/$defs/iconMapping",
|
|
35
|
+
"description": "Default folder icon — used when folders misses (default: the shell's fallback)"
|
|
36
|
+
},
|
|
37
|
+
"folderExpanded": {
|
|
38
|
+
"$ref": "#/$defs/iconMapping",
|
|
39
|
+
"description": "Default expanded folder icon — used when foldersExpanded misses (default: the shell's fallback)"
|
|
40
|
+
},
|
|
41
|
+
"rootFolder": {
|
|
42
|
+
"$ref": "#/$defs/iconMapping",
|
|
43
|
+
"description": "Root folder icon (default: the shell's fallback)"
|
|
44
|
+
},
|
|
45
|
+
"rootFolderExpanded": {
|
|
46
|
+
"$ref": "#/$defs/iconMapping",
|
|
47
|
+
"description": "Expanded root folder icon (default: the shell's fallback)"
|
|
48
|
+
},
|
|
49
|
+
"font": {
|
|
50
|
+
"$ref": "#/$defs/fontSpec",
|
|
51
|
+
"description": "Custom icon font (optional) — once declared, the shell generates @font-face and the author supplies the glyph classes"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"$defs": {
|
|
55
|
+
"mappingTable": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"description": "Mapping table — name (file name / extension / folder name) → icon entry",
|
|
58
|
+
"additionalProperties": { "$ref": "#/$defs/iconMapping" }
|
|
59
|
+
},
|
|
60
|
+
"iconMapping": {
|
|
61
|
+
"title": "Icon entry — pick one of two forms",
|
|
62
|
+
"type": "object",
|
|
63
|
+
"anyOf": [
|
|
64
|
+
{
|
|
65
|
+
"title": "Font glyph form",
|
|
66
|
+
"description": "CSS class name — codicon as the fallback, or a custom icon font (when class is omitted, the icon font family's own class is used)",
|
|
67
|
+
"required": ["class"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"class": { "type": "string", "description": "CSS class name (e.g. \"codicon codicon-typescript\" or \"myfont myfont-rust\")" },
|
|
70
|
+
"color": { "type": "string", "description": "Optional per-icon color (for colorful seti-style fonts; omit for plain monochrome fonts)" }
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"title": "Image asset form",
|
|
76
|
+
"description": "Image asset — any multicolor, skeuomorphic, or textured artwork",
|
|
77
|
+
"required": ["imagePath"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"imagePath": { "type": "string", "description": "Path to the image asset relative to the plugin root (e.g. \"icons/js.svg\") — at render time the shell resolves it to an absolute linkdesk:// URL via getPluginAssetPath; absolute /assets/... paths are forbidden" }
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": false
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"fontSpec": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"description": "Custom icon font metadata — path is relative to the plugin root or an absolute URL; the shell generates @font-face and the author writes the glyph class CSS",
|
|
88
|
+
"required": ["path", "family"],
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"properties": {
|
|
91
|
+
"path": { "type": "string", "description": "Font file path relative to the plugin root (or an absolute linkdesk:// / http(s):// / data: URL)" },
|
|
92
|
+
"family": { "type": "string", "description": "The family name the author writes in font-family in the glyph CSS" },
|
|
93
|
+
"glyphs": { "type": "string", "description": "Path to the glyph class CSS file relative to the plugin root (optional; default: @font-face only, no custom glyph classes)" }
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|