@fresh-editor/fresh-editor 0.1.97 → 0.1.99
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/CHANGELOG.md +76 -0
- package/package.json +1 -1
- package/plugins/code-tour.ts +397 -0
- package/plugins/lib/fresh.d.ts +26 -3
- package/plugins/pkg.ts +487 -72
- package/plugins/schemas/package.schema.json +146 -1
- package/plugins/schemas/tour.schema.json +103 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": {
|
|
24
24
|
"type": "string",
|
|
25
|
-
"enum": ["plugin", "theme", "theme-pack", "language"],
|
|
25
|
+
"enum": ["plugin", "theme", "theme-pack", "language", "bundle"],
|
|
26
26
|
"description": "Package type"
|
|
27
27
|
},
|
|
28
28
|
"author": {
|
|
@@ -184,6 +184,151 @@
|
|
|
184
184
|
"description": "LSP initialization options"
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
+
},
|
|
188
|
+
"languages": {
|
|
189
|
+
"type": "array",
|
|
190
|
+
"description": "Language definitions (for bundles)",
|
|
191
|
+
"items": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"required": ["id"],
|
|
194
|
+
"properties": {
|
|
195
|
+
"id": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"description": "Language identifier (e.g., 'elixir', 'heex')"
|
|
198
|
+
},
|
|
199
|
+
"grammar": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"description": "Grammar configuration",
|
|
202
|
+
"required": ["file"],
|
|
203
|
+
"properties": {
|
|
204
|
+
"file": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "Path to grammar file relative to package"
|
|
207
|
+
},
|
|
208
|
+
"extensions": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"items": { "type": "string" },
|
|
211
|
+
"description": "File extensions this grammar handles"
|
|
212
|
+
},
|
|
213
|
+
"firstLine": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "Regex pattern for shebang detection"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"language": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"description": "Language configuration",
|
|
222
|
+
"properties": {
|
|
223
|
+
"commentPrefix": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"description": "Line comment prefix"
|
|
226
|
+
},
|
|
227
|
+
"blockCommentStart": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "Block comment start marker"
|
|
230
|
+
},
|
|
231
|
+
"blockCommentEnd": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"description": "Block comment end marker"
|
|
234
|
+
},
|
|
235
|
+
"tabSize": {
|
|
236
|
+
"type": "integer",
|
|
237
|
+
"minimum": 1,
|
|
238
|
+
"description": "Default tab size for this language"
|
|
239
|
+
},
|
|
240
|
+
"useTabs": {
|
|
241
|
+
"type": "boolean",
|
|
242
|
+
"description": "Use tabs instead of spaces"
|
|
243
|
+
},
|
|
244
|
+
"autoIndent": {
|
|
245
|
+
"type": "boolean",
|
|
246
|
+
"description": "Enable automatic indentation"
|
|
247
|
+
},
|
|
248
|
+
"showWhitespaceTabs": {
|
|
249
|
+
"type": "boolean",
|
|
250
|
+
"description": "Whether to show whitespace tab indicators"
|
|
251
|
+
},
|
|
252
|
+
"formatter": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"required": ["command"],
|
|
255
|
+
"properties": {
|
|
256
|
+
"command": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"description": "Formatter command"
|
|
259
|
+
},
|
|
260
|
+
"args": {
|
|
261
|
+
"type": "array",
|
|
262
|
+
"items": { "type": "string" },
|
|
263
|
+
"description": "Arguments to pass to the formatter"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"lsp": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"description": "LSP server configuration",
|
|
272
|
+
"required": ["command"],
|
|
273
|
+
"properties": {
|
|
274
|
+
"command": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"description": "LSP server command"
|
|
277
|
+
},
|
|
278
|
+
"args": {
|
|
279
|
+
"type": "array",
|
|
280
|
+
"items": { "type": "string" },
|
|
281
|
+
"description": "Arguments to pass to the server"
|
|
282
|
+
},
|
|
283
|
+
"autoStart": {
|
|
284
|
+
"type": "boolean",
|
|
285
|
+
"description": "Auto-start the server when a matching file is opened"
|
|
286
|
+
},
|
|
287
|
+
"initializationOptions": {
|
|
288
|
+
"type": "object",
|
|
289
|
+
"description": "LSP initialization options"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"plugins": {
|
|
297
|
+
"type": "array",
|
|
298
|
+
"description": "Plugin definitions (for bundles)",
|
|
299
|
+
"items": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"required": ["entry"],
|
|
302
|
+
"properties": {
|
|
303
|
+
"entry": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"description": "Plugin entry point file relative to package"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"themes": {
|
|
311
|
+
"type": "array",
|
|
312
|
+
"description": "Theme definitions (for bundles)",
|
|
313
|
+
"items": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"required": ["file", "name"],
|
|
316
|
+
"properties": {
|
|
317
|
+
"file": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"description": "Theme JSON file path relative to package"
|
|
320
|
+
},
|
|
321
|
+
"name": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"description": "Display name for the theme"
|
|
324
|
+
},
|
|
325
|
+
"variant": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"enum": ["dark", "light"],
|
|
328
|
+
"description": "Theme variant (dark or light)"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
187
332
|
}
|
|
188
333
|
}
|
|
189
334
|
},
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://fresh-editor.dev/schemas/tour-manifest-v1.json",
|
|
4
|
+
"title": "Fresh Code Tour Manifest",
|
|
5
|
+
"description": "Schema for .fresh-tour.json files that define guided code walkthroughs",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["title", "description", "schema_version", "steps"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Reference to this JSON schema for editor validation"
|
|
13
|
+
},
|
|
14
|
+
"title": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"maxLength": 100,
|
|
18
|
+
"description": "Display title for the tour"
|
|
19
|
+
},
|
|
20
|
+
"description": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"maxLength": 500,
|
|
23
|
+
"description": "Brief description of what this tour covers"
|
|
24
|
+
},
|
|
25
|
+
"schema_version": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": ["1.0"],
|
|
28
|
+
"description": "Schema version for forward compatibility"
|
|
29
|
+
},
|
|
30
|
+
"commit_hash": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^[a-f0-9]{7,40}$",
|
|
33
|
+
"description": "Git commit hash (short or full) this tour was created for"
|
|
34
|
+
},
|
|
35
|
+
"steps": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"minItems": 1,
|
|
38
|
+
"description": "Ordered list of tour steps",
|
|
39
|
+
"items": {
|
|
40
|
+
"$ref": "#/definitions/TourStep"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"definitions": {
|
|
45
|
+
"TourStep": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": ["step_id", "title", "file_path", "lines", "explanation"],
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"properties": {
|
|
50
|
+
"step_id": {
|
|
51
|
+
"type": "integer",
|
|
52
|
+
"minimum": 1,
|
|
53
|
+
"description": "Unique identifier for this step (1-indexed)"
|
|
54
|
+
},
|
|
55
|
+
"title": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1,
|
|
58
|
+
"maxLength": 100,
|
|
59
|
+
"description": "Short title displayed in the tour dock"
|
|
60
|
+
},
|
|
61
|
+
"file_path": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 1,
|
|
64
|
+
"description": "Path to the file, relative to project root"
|
|
65
|
+
},
|
|
66
|
+
"lines": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 1
|
|
71
|
+
},
|
|
72
|
+
"minItems": 2,
|
|
73
|
+
"maxItems": 2,
|
|
74
|
+
"description": "Line range [start, end] (1-indexed, inclusive)"
|
|
75
|
+
},
|
|
76
|
+
"explanation": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "Markdown-formatted explanation shown in the tour dock"
|
|
79
|
+
},
|
|
80
|
+
"overlay_config": {
|
|
81
|
+
"$ref": "#/definitions/OverlayConfig"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"OverlayConfig": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"properties": {
|
|
89
|
+
"type": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": ["block", "line"],
|
|
92
|
+
"default": "block",
|
|
93
|
+
"description": "block = highlight entire range, line = highlight each line separately"
|
|
94
|
+
},
|
|
95
|
+
"focus_mode": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"default": false,
|
|
98
|
+
"description": "When true, dims lines outside the active range"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|