themebooth 0.1.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.
Files changed (89) hide show
  1. package/README.md +172 -0
  2. package/dist/bin/themebooth.d.ts +3 -0
  3. package/dist/bin/themebooth.d.ts.map +1 -0
  4. package/dist/bin/themebooth.js +103 -0
  5. package/dist/bin/themebooth.js.map +1 -0
  6. package/dist/cli/init.d.ts +2 -0
  7. package/dist/cli/init.d.ts.map +1 -0
  8. package/dist/cli/init.js +433 -0
  9. package/dist/cli/init.js.map +1 -0
  10. package/dist/cli/package.d.ts +2 -0
  11. package/dist/cli/package.d.ts.map +1 -0
  12. package/dist/cli/package.js +194 -0
  13. package/dist/cli/package.js.map +1 -0
  14. package/dist/cli/preview.d.ts +2 -0
  15. package/dist/cli/preview.d.ts.map +1 -0
  16. package/dist/cli/preview.js +93 -0
  17. package/dist/cli/preview.js.map +1 -0
  18. package/dist/cli/publish.d.ts +2 -0
  19. package/dist/cli/publish.d.ts.map +1 -0
  20. package/dist/cli/publish.js +126 -0
  21. package/dist/cli/publish.js.map +1 -0
  22. package/dist/core/manifest.d.ts +44 -0
  23. package/dist/core/manifest.d.ts.map +1 -0
  24. package/dist/core/manifest.js +101 -0
  25. package/dist/core/manifest.js.map +1 -0
  26. package/dist/core/transpiler.d.ts +13 -0
  27. package/dist/core/transpiler.d.ts.map +1 -0
  28. package/dist/core/transpiler.js +139 -0
  29. package/dist/core/transpiler.js.map +1 -0
  30. package/dist/core/variables.d.ts +33 -0
  31. package/dist/core/variables.d.ts.map +1 -0
  32. package/dist/core/variables.js +155 -0
  33. package/dist/core/variables.js.map +1 -0
  34. package/dist/exporters/notepad-plus.d.ts +3 -0
  35. package/dist/exporters/notepad-plus.d.ts.map +1 -0
  36. package/dist/exporters/notepad-plus.js +90 -0
  37. package/dist/exporters/notepad-plus.js.map +1 -0
  38. package/dist/exporters/vscode.d.ts +11 -0
  39. package/dist/exporters/vscode.d.ts.map +1 -0
  40. package/dist/exporters/vscode.js +34 -0
  41. package/dist/exporters/vscode.js.map +1 -0
  42. package/dist/exporters/zed.d.ts +12 -0
  43. package/dist/exporters/zed.d.ts.map +1 -0
  44. package/dist/exporters/zed.js +48 -0
  45. package/dist/exporters/zed.js.map +1 -0
  46. package/dist/preview/renderer.d.ts +3 -0
  47. package/dist/preview/renderer.d.ts.map +1 -0
  48. package/dist/preview/renderer.js +257 -0
  49. package/dist/preview/renderer.js.map +1 -0
  50. package/dist/preview/server.d.ts +24 -0
  51. package/dist/preview/server.d.ts.map +1 -0
  52. package/dist/preview/server.js +166 -0
  53. package/dist/preview/server.js.map +1 -0
  54. package/dist/preview/watcher.d.ts +9 -0
  55. package/dist/preview/watcher.d.ts.map +1 -0
  56. package/dist/preview/watcher.js +81 -0
  57. package/dist/preview/watcher.js.map +1 -0
  58. package/dist/publish/notepad-plus.d.ts +2 -0
  59. package/dist/publish/notepad-plus.d.ts.map +1 -0
  60. package/dist/publish/notepad-plus.js +151 -0
  61. package/dist/publish/notepad-plus.js.map +1 -0
  62. package/dist/publish/vscode.d.ts +2 -0
  63. package/dist/publish/vscode.d.ts.map +1 -0
  64. package/dist/publish/vscode.js +144 -0
  65. package/dist/publish/vscode.js.map +1 -0
  66. package/dist/publish/zed.d.ts +2 -0
  67. package/dist/publish/zed.d.ts.map +1 -0
  68. package/dist/publish/zed.js +137 -0
  69. package/dist/publish/zed.js.map +1 -0
  70. package/dist/templates/presets/dark.json +53 -0
  71. package/dist/templates/presets/high-contrast.json +54 -0
  72. package/dist/templates/presets/light.json +53 -0
  73. package/dist/utils/logger.d.ts +18 -0
  74. package/dist/utils/logger.d.ts.map +1 -0
  75. package/dist/utils/logger.js +56 -0
  76. package/dist/utils/logger.js.map +1 -0
  77. package/dist/utils/paths.d.ts +32 -0
  78. package/dist/utils/paths.d.ts.map +1 -0
  79. package/dist/utils/paths.js +111 -0
  80. package/dist/utils/paths.js.map +1 -0
  81. package/dist/utils/schema.d.ts +17 -0
  82. package/dist/utils/schema.d.ts.map +1 -0
  83. package/dist/utils/schema.js +80 -0
  84. package/dist/utils/schema.js.map +1 -0
  85. package/dist/utils/validation.d.ts +59 -0
  86. package/dist/utils/validation.d.ts.map +1 -0
  87. package/dist/utils/validation.js +323 -0
  88. package/dist/utils/validation.js.map +1 -0
  89. package/package.json +59 -0
@@ -0,0 +1,433 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.initCommand = initCommand;
40
+ const fs = __importStar(require("fs/promises"));
41
+ const path = __importStar(require("path"));
42
+ const chalk_1 = __importDefault(require("chalk"));
43
+ const logger_1 = require("../utils/logger");
44
+ const paths_1 = require("../utils/paths");
45
+ const MASCOT = `
46
+ /\\ /\\
47
+ ((ovo))
48
+ ():::()
49
+ VVV
50
+ `;
51
+ const DIVIDER = ".oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.";
52
+ const GITIGNORE_CONTENT = `# Generated files
53
+ preview.html
54
+ dist/
55
+ node_modules/
56
+
57
+ # Cache
58
+ .themebooth/cache/
59
+ .themebooth/output/
60
+
61
+ # IDE
62
+ .vscode/
63
+ .idea/
64
+ *.swp
65
+ *.swo
66
+ *~
67
+
68
+ # OS
69
+ .DS_Store
70
+ Thumbs.db
71
+ `;
72
+ const CUSTOM_MANIFEST = {
73
+ name: "My Custom Theme",
74
+ description: "A beautiful custom syntax theme",
75
+ author: "Your Name",
76
+ version: "1.0.0",
77
+ variables: {
78
+ background: "#1e1e1e",
79
+ foreground: "#d4d4d4",
80
+ accent: "#007acc",
81
+ keyword: "#569cd6",
82
+ string: "#ce9178",
83
+ comment: "#6a9955",
84
+ number: "#b5cea8",
85
+ builtin: "#4ec9b0",
86
+ error: "#f48771",
87
+ },
88
+ colors: {
89
+ "editor.background": "$background",
90
+ "editor.foreground": "$foreground",
91
+ "editor.lineNumberActiveForeground": "$accent",
92
+ "editor.selectionBackground": "#264f78",
93
+ "editor.wordHighlightBackground": "#575757",
94
+ "editorCursor.foreground": "$accent",
95
+ "editorWhitespace.foreground": "#464646",
96
+ },
97
+ tokens: {
98
+ keyword: {
99
+ foreground: "$keyword",
100
+ fontStyle: "bold",
101
+ },
102
+ string: {
103
+ foreground: "$string",
104
+ },
105
+ comment: {
106
+ foreground: "$comment",
107
+ fontStyle: "italic",
108
+ },
109
+ number: {
110
+ foreground: "$number",
111
+ },
112
+ "constant.builtin": {
113
+ foreground: "$builtin",
114
+ },
115
+ },
116
+ presets: [],
117
+ };
118
+ async function loadPresetsFromFiles() {
119
+ const presetsDir = path.join(__dirname, "../templates/presets");
120
+ const presets = {};
121
+ try {
122
+ const files = await fs.readdir(presetsDir);
123
+ for (const file of files) {
124
+ if (file.endsWith(".json")) {
125
+ const presetName = file.replace(".json", "");
126
+ const filePath = path.join(presetsDir, file);
127
+ const content = await fs.readFile(filePath, "utf-8");
128
+ presets[presetName] = JSON.parse(content);
129
+ }
130
+ }
131
+ }
132
+ catch (error) {
133
+ // Fall back to hardcoded custom if files not found
134
+ logger_1.logger.warn("Could not load preset files, using fallback templates");
135
+ }
136
+ return presets;
137
+ }
138
+ function generatePreviewHtml(themeName) {
139
+ return `<!DOCTYPE html>
140
+ <html lang="en">
141
+ <head>
142
+ <meta charset="UTF-8">
143
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
144
+ <title>${themeName} - Live Preview</title>
145
+ <style>
146
+ * {
147
+ margin: 0;
148
+ padding: 0;
149
+ box-sizing: border-box;
150
+ }
151
+
152
+ body {
153
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
154
+ background-color: #1e1e1e;
155
+ color: #d4d4d4;
156
+ padding: 20px;
157
+ line-height: 1.6;
158
+ }
159
+
160
+ .container {
161
+ max-width: 1200px;
162
+ margin: 0 auto;
163
+ }
164
+
165
+ h1 {
166
+ margin-bottom: 10px;
167
+ color: #61dafb;
168
+ }
169
+
170
+ .subtitle {
171
+ color: #888;
172
+ margin-bottom: 30px;
173
+ }
174
+
175
+ .section {
176
+ margin-bottom: 40px;
177
+ }
178
+
179
+ .section h2 {
180
+ font-size: 18px;
181
+ color: #61dafb;
182
+ margin-bottom: 15px;
183
+ border-bottom: 1px solid #444;
184
+ padding-bottom: 10px;
185
+ }
186
+
187
+ .code-sample {
188
+ background-color: #252526;
189
+ border: 1px solid #3e3e42;
190
+ border-radius: 4px;
191
+ padding: 15px;
192
+ overflow-x: auto;
193
+ margin-bottom: 15px;
194
+ }
195
+
196
+ .code-sample code {
197
+ display: block;
198
+ }
199
+
200
+ .keyword { color: #569cd6; font-weight: bold; }
201
+ .string { color: #ce9178; }
202
+ .comment { color: #6a9955; font-style: italic; }
203
+ .number { color: #b5cea8; }
204
+ .builtin { color: #4ec9b0; }
205
+
206
+ .palette {
207
+ display: grid;
208
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
209
+ gap: 15px;
210
+ margin-bottom: 20px;
211
+ }
212
+
213
+ .color-box {
214
+ display: flex;
215
+ flex-direction: column;
216
+ align-items: center;
217
+ padding: 15px;
218
+ border: 1px solid #3e3e42;
219
+ border-radius: 4px;
220
+ background-color: #252526;
221
+ }
222
+
223
+ .color-box .swatch {
224
+ width: 100%;
225
+ height: 80px;
226
+ border-radius: 4px;
227
+ margin-bottom: 10px;
228
+ border: 1px solid #3e3e42;
229
+ }
230
+
231
+ .color-box .name {
232
+ font-size: 12px;
233
+ color: #888;
234
+ text-align: center;
235
+ word-break: break-word;
236
+ }
237
+
238
+ .color-box .value {
239
+ font-size: 11px;
240
+ color: #61dafb;
241
+ font-family: monospace;
242
+ margin-top: 5px;
243
+ }
244
+
245
+ .status {
246
+ padding: 10px 15px;
247
+ border-radius: 4px;
248
+ margin-bottom: 20px;
249
+ }
250
+
251
+ .status.success {
252
+ background-color: #1f6f1f;
253
+ color: #6ec46e;
254
+ }
255
+
256
+ .status.error {
257
+ background-color: #6f1f1f;
258
+ color: #c46e6e;
259
+ }
260
+
261
+ .reload-hint {
262
+ position: fixed;
263
+ bottom: 20px;
264
+ right: 20px;
265
+ background-color: #333;
266
+ border: 1px solid #555;
267
+ border-radius: 4px;
268
+ padding: 10px 15px;
269
+ font-size: 12px;
270
+ color: #888;
271
+ }
272
+ </style>
273
+ </head>
274
+ <body>
275
+ <div class="container">
276
+ <h1>${themeName}</h1>
277
+ <p class="subtitle">Live Preview • Edit manifest.json to see changes</p>
278
+
279
+ <div id="status" class="status success" style="display:none;"></div>
280
+
281
+ <div class="section">
282
+ <h2>Color Palette</h2>
283
+ <div class="palette" id="palette"></div>
284
+ </div>
285
+
286
+ <div class="section">
287
+ <h2>JavaScript</h2>
288
+ <div class="code-sample">
289
+ <code>
290
+ <span class="keyword">const</span> greeting = <span class="string">"Hello, World!"</span>;
291
+ <span class="keyword">function</span> greet(name) {
292
+ <span class="comment">// Print greeting</span>
293
+ console.log(\`\${greeting} My name is \${name}\`);
294
+ <span class="keyword">return</span> <span class="number">42</span>;
295
+ }
296
+ </code>
297
+ </div>
298
+ </div>
299
+
300
+ <div class="section">
301
+ <h2>Python</h2>
302
+ <div class="code-sample">
303
+ <code>
304
+ <span class="keyword">def</span> greet(name):
305
+ <span class="comment"># Print greeting</span>
306
+ greeting = <span class="string">"Hello, World!"</span>
307
+ print(f<span class="string">"{greeting} My name is {name}"</span>)
308
+ <span class="keyword">return</span> <span class="number">42</span>
309
+
310
+ greet(<span class="string">"Python"</span>)
311
+ </code>
312
+ </div>
313
+ </div>
314
+
315
+ <div class="section">
316
+ <h2>JSON</h2>
317
+ <div class="code-sample">
318
+ <code>
319
+ {
320
+ <span class="string">"name"</span>: <span class="string">"My Theme"</span>,
321
+ <span class="string">"version"</span>: <span class="string">"1.0.0"</span>,
322
+ <span class="string">"colors"</span>: {
323
+ <span class="string">"background"</span>: <span class="string">"#1e1e1e"</span>,
324
+ <span class="string">"foreground"</span>: <span class="string">"#d4d4d4"</span>
325
+ }
326
+ }
327
+ </code>
328
+ </div>
329
+ </div>
330
+ </div>
331
+
332
+ <div class="reload-hint">🔄 Watching for changes...</div>
333
+
334
+ <script>
335
+ // Hot-reload on file change
336
+ const ws = new WebSocket(\`ws://\${window.location.host}/ws\`);
337
+ ws.addEventListener('message', (event) => {
338
+ if (event.data === 'reload') {
339
+ window.location.reload();
340
+ }
341
+ });
342
+ ws.addEventListener('error', () => {
343
+ console.log('WebSocket connection failed - hot-reload unavailable');
344
+ });
345
+ </script>
346
+ </body>
347
+ </html>
348
+ `;
349
+ }
350
+ async function initCommand(themeName, presetName) {
351
+ try {
352
+ // Display welcome message
353
+ console.log(chalk_1.default.magenta(MASCOT));
354
+ logger_1.logger.divider();
355
+ // Use provided theme name or current directory name
356
+ const finalThemeName = themeName || path.basename(process.cwd());
357
+ if (!finalThemeName) {
358
+ logger_1.logger.error("Theme name is required");
359
+ throw new Error("Theme name is required");
360
+ }
361
+ const themeDir = themeName ? path.join(process.cwd(), themeName) : process.cwd();
362
+ const paths = (0, paths_1.getThemeProjectPaths)(themeDir);
363
+ // Check if directory already exists and is not empty
364
+ if (themeName) {
365
+ try {
366
+ const stat = await fs.stat(themeDir);
367
+ if (stat.isDirectory()) {
368
+ const files = await fs.readdir(themeDir);
369
+ if (files.length > 0) {
370
+ logger_1.logger.error(`Directory '${themeName}' already exists and is not empty`);
371
+ logger_1.logger.info("Options:");
372
+ logger_1.logger.info(" • Use a different theme name");
373
+ logger_1.logger.info(" • Use 'themebooth init' without arguments to initialize current directory");
374
+ throw new Error("Directory already exists");
375
+ }
376
+ }
377
+ }
378
+ catch (error) {
379
+ if (error?.code !== "ENOENT") {
380
+ throw error;
381
+ }
382
+ }
383
+ }
384
+ // Ensure structure exists
385
+ await (0, paths_1.ensureThemeProjectStructure)(paths);
386
+ // Load presets from files
387
+ const presetManifests = await loadPresetsFromFiles();
388
+ // Determine which preset to use
389
+ let selectedPreset = CUSTOM_MANIFEST;
390
+ if (presetName) {
391
+ if (presetName in presetManifests) {
392
+ selectedPreset = presetManifests[presetName];
393
+ }
394
+ else {
395
+ logger_1.logger.warn(`Preset "${presetName}" not found, using default dark preset`);
396
+ selectedPreset = presetManifests["dark"] || CUSTOM_MANIFEST;
397
+ }
398
+ }
399
+ else if (Object.keys(presetManifests).length > 0) {
400
+ // Use first available preset (dark) as default
401
+ selectedPreset = presetManifests["dark"] || Object.values(presetManifests)[0] || CUSTOM_MANIFEST;
402
+ }
403
+ // Create manifest with user's theme name
404
+ const manifest = { ...selectedPreset, name: finalThemeName };
405
+ await (0, paths_1.writeManifest)(paths.manifest, manifest);
406
+ // Write .gitignore
407
+ await fs.writeFile(path.join(paths.root, ".gitignore"), GITIGNORE_CONTENT, "utf-8");
408
+ // Write preview.html
409
+ const previewHtml = generatePreviewHtml(finalThemeName);
410
+ await fs.writeFile(paths.preview, previewHtml, "utf-8");
411
+ // Success output
412
+ console.log();
413
+ logger_1.logger.divider();
414
+ logger_1.logger.success(`Theme project created at ${themeDir}`);
415
+ console.log();
416
+ logger_1.logger.info(`Files created:`);
417
+ logger_1.logger.info(` • ${chalk_1.default.yellow("manifest.json")} - Theme definition`);
418
+ logger_1.logger.info(` • ${chalk_1.default.yellow("preview.html")} - Live preview (in .gitignore)`);
419
+ logger_1.logger.info(` • ${chalk_1.default.yellow(".gitignore")} - Git ignore rules`);
420
+ logger_1.logger.info(` • ${chalk_1.default.yellow(".themebooth/cache/")} - Transpilation cache`);
421
+ console.log();
422
+ logger_1.logger.info(`Next steps:`);
423
+ logger_1.logger.info(` ${chalk_1.default.cyan(`cd ${themeName ? themeName : "."}`)} `);
424
+ logger_1.logger.info(` ${chalk_1.default.cyan(`themebooth preview`)}`);
425
+ console.log();
426
+ logger_1.logger.divider();
427
+ }
428
+ catch (error) {
429
+ logger_1.logger.error(`Failed to initialize theme: ${error instanceof Error ? error.message : String(error)}`);
430
+ throw error;
431
+ }
432
+ }
433
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+TA,kCAyFC;AAxZD,gDAAkC;AAClC,2CAA6B;AAC7B,kDAA0B;AAC1B,4CAAyC;AACzC,0CAAkG;AAGlG,MAAM,MAAM,GAAG;;;;;CAKd,CAAC;AAEF,MAAM,OAAO,GAAG,2DAA2D,CAAC;AAE5E,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;CAmBzB,CAAC;AAEF,MAAM,eAAe,GAAa;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,E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;QAC9B,eAAM,CAAC,IAAI,CAAC,OAAO,eAAK,CAAC,MAAM,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;QACvE,eAAM,CAAC,IAAI,CAAC,OAAO,eAAK,CAAC,MAAM,CAAC,cAAc,CAAC,iCAAiC,CAAC,CAAC;QAClF,eAAM,CAAC,IAAI,CAAC,OAAO,eAAK,CAAC,MAAM,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;QACpE,eAAM,CAAC,IAAI,CAAC,OAAO,eAAK,CAAC,MAAM,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;QAC/E,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,eAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,eAAM,CAAC,IAAI,CAAC,KAAK,eAAK,CAAC,IAAI,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACrE,eAAM,CAAC,IAAI,CAAC,KAAK,eAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,eAAM,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACtG,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function packageCommand(): Promise<void>;
2
+ //# sourceMappingURL=package.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/cli/package.ts"],"names":[],"mappings":"AA0DA,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAkHpD"}
@@ -0,0 +1,194 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.packageCommand = packageCommand;
37
+ const path = __importStar(require("path"));
38
+ const fs = __importStar(require("fs/promises"));
39
+ const logger_1 = require("../utils/logger");
40
+ const paths_1 = require("../utils/paths");
41
+ const transpiler_1 = require("../core/transpiler");
42
+ const validation_1 = require("../utils/validation");
43
+ const PUBLISH_README = `# How to Publish Your Theme
44
+
45
+ ## VS Code
46
+
47
+ 1. Install \`vsce\` (VS Code Extension Manager):
48
+ \`\`\`bash
49
+ npm install -g vsce
50
+ \`\`\`
51
+
52
+ 2. Create a publisher account at https://marketplace.visualstudio.com/
53
+
54
+ 3. Get a Personal Access Token:
55
+ - Go to https://dev.azure.com/_usersSettings/tokens
56
+ - Create a new token with "Marketplace" scope
57
+
58
+ 4. Publish your theme:
59
+ \`\`\`bash
60
+ vsce publish --token <YOUR_TOKEN>
61
+ \`\`\`
62
+
63
+ ## Notepad++
64
+
65
+ 1. Go to https://github.com/notepad-plus-plus/nppPluginList
66
+
67
+ 2. Fork the repository and add your XML file to the \`xml\` folder
68
+
69
+ 3. Create a pull request with your theme
70
+
71
+ ## Zed
72
+
73
+ 1. Install \`zed\` CLI (if available in your region)
74
+
75
+ 2. Login to Zed registry:
76
+ \`\`\`bash
77
+ zed auth login
78
+ \`\`\`
79
+
80
+ 3. Publish your theme:
81
+ \`\`\`bash
82
+ zed theme publish zed-*.json
83
+ \`\`\`
84
+
85
+ ---
86
+
87
+ Generated theme files:
88
+ - VS Code: \`.json\` format
89
+ - Notepad++: \`.xml\` format
90
+ - Zed: \`zed-*.json\` format
91
+ `;
92
+ async function packageCommand() {
93
+ try {
94
+ const themeDir = process.cwd();
95
+ const paths = (0, paths_1.getThemeProjectPaths)(themeDir);
96
+ // Check manifest exists
97
+ const exists = await (0, paths_1.manifestExists)(paths.manifest);
98
+ if (!exists) {
99
+ logger_1.logger.error("No manifest.json found in current directory");
100
+ logger_1.logger.info("Run 'themebooth init' to create a theme project");
101
+ throw new Error("Manifest not found");
102
+ }
103
+ // Comprehensive validation
104
+ logger_1.logger.info("Validating manifest.json...");
105
+ const validation = await (0, validation_1.validateManifestComprehensive)(paths.manifest);
106
+ if (!validation.isValid) {
107
+ logger_1.logger.error("Manifest validation failed:");
108
+ for (const err of validation.errors) {
109
+ const locationStr = err.line ? ` (line ${err.line}${err.column ? `, col ${err.column}` : ""})` : "";
110
+ logger_1.logger.error(` • ${err.field}${locationStr}: ${err.message}`);
111
+ if (err.suggestion) {
112
+ logger_1.logger.info(` → ${err.suggestion}`);
113
+ }
114
+ }
115
+ throw new Error("Invalid manifest");
116
+ }
117
+ // Show warnings
118
+ if (validation.warnings.length > 0) {
119
+ logger_1.logger.warn("Manifest warnings:");
120
+ for (const warn of validation.warnings) {
121
+ logger_1.logger.warn(` • ${warn.field}: ${warn.message}`);
122
+ }
123
+ }
124
+ if (!validation.manifest) {
125
+ throw new Error("Failed to load validated manifest");
126
+ }
127
+ const manifest = validation.manifest;
128
+ logger_1.logger.info(`Packaging theme: ${manifest.name}@${manifest.version}`);
129
+ // Create output directory
130
+ const outputDir = path.join(paths.output, manifest.name);
131
+ await fs.mkdir(outputDir, { recursive: true });
132
+ // Transpile
133
+ logger_1.logger.info("Transpiling to all platforms...");
134
+ const transpilationResult = await (0, transpiler_1.transpileTheme)(paths.manifest, outputDir);
135
+ // Validate exports
136
+ logger_1.logger.info("Validating exported files...");
137
+ const validationResults = [];
138
+ for (const result of transpilationResult.results) {
139
+ if (result.success && result.path) {
140
+ let exportValidation;
141
+ if (result.platform === "VS Code") {
142
+ exportValidation = await (0, validation_1.validateExportedTheme)(result.path, "vscode");
143
+ }
144
+ else if (result.platform === "Notepad++") {
145
+ exportValidation = await (0, validation_1.validateNotepadPlusPlusXML)(result.path);
146
+ }
147
+ else if (result.platform === "Zed") {
148
+ exportValidation = await (0, validation_1.validateExportedTheme)(result.path, "zed");
149
+ }
150
+ else {
151
+ exportValidation = { isValid: true };
152
+ }
153
+ validationResults.push({
154
+ platform: result.platform,
155
+ ...exportValidation,
156
+ });
157
+ }
158
+ }
159
+ // Report results
160
+ logger_1.logger.success(`Theme packaged to ./.themebooth/output/${manifest.name}/`);
161
+ logger_1.logger.info("\nExport results:");
162
+ for (const result of transpilationResult.results) {
163
+ const validation = validationResults.find((v) => v.platform === result.platform);
164
+ if (result.success) {
165
+ const relativePath = path.relative(process.cwd(), result.path || "");
166
+ if (validation && !validation.isValid) {
167
+ logger_1.logger.error(` ⚠ ${result.platform} (validation failed)`);
168
+ logger_1.logger.info(` → ${relativePath}`);
169
+ logger_1.logger.error(` Error: ${validation.error}`);
170
+ }
171
+ else {
172
+ logger_1.logger.success(` ✓ ${result.platform}`);
173
+ logger_1.logger.info(` → ${relativePath}`);
174
+ }
175
+ }
176
+ else {
177
+ logger_1.logger.error(` ✗ ${result.platform}: ${result.error}`);
178
+ }
179
+ }
180
+ // Write README
181
+ const readmePath = path.join(outputDir, "PUBLISH.md");
182
+ await fs.writeFile(readmePath, PUBLISH_README, "utf-8");
183
+ logger_1.logger.info(`\nPublishing guide: ./.themebooth/output/${manifest.name}/PUBLISH.md`);
184
+ logger_1.logger.info("\nNext steps:");
185
+ logger_1.logger.info(` • Review theme files in ./.themebooth/output/${manifest.name}/`);
186
+ logger_1.logger.info(` • Read PUBLISH.md for platform-specific instructions`);
187
+ logger_1.logger.info(` • Run 'themebooth publish <platform>' for guided publishing`);
188
+ }
189
+ catch (error) {
190
+ logger_1.logger.error(`Failed to package theme: ${error instanceof Error ? error.message : String(error)}`);
191
+ throw error;
192
+ }
193
+ }
194
+ //# sourceMappingURL=package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/cli/package.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,wCAkHC;AA5KD,2CAA6B;AAC7B,gDAAkC;AAClC,4CAAyC;AACzC,0CAAoF;AACpF,mDAAoD;AAEpD,oDAAuH;AAEvH,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDtB,CAAC;AAEK,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,IAAA,4BAAoB,EAAC,QAAQ,CAAC,CAAC;QAE7C,wBAAwB;QACxB,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAc,EAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,EAAE,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AAC;qBAAM,CAAC;oBACN,eAAM,CAAC,OAAO,CAAC,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;oBACzC,eAAM,CAAC,IAAI,CAAC,SAAS,YAAY,EAAE,CAAC,CAAC;gBACvC,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,eAAM,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,QAAQ,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC;QAED,eAAe;QACf,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QACtD,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;QACxD,eAAM,CAAC,IAAI,CAAC,4CAA4C,QAAQ,CAAC,IAAI,aAAa,CAAC,CAAC;QAEpF,eAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC7B,eAAM,CAAC,IAAI,CAAC,kDAAkD,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC;QAChF,eAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QACtE,eAAM,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;IAC/E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,4BAA4B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACnG,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function previewCommand(): Promise<void>;
2
+ //# sourceMappingURL=preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/cli/preview.ts"],"names":[],"mappings":"AAMA,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAsEpD"}