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
package/README.md ADDED
@@ -0,0 +1,172 @@
1
+ # Theme Booth
2
+
3
+ Create beautiful syntax highlighting themes for VS Code, Notepad++, and Zed—without learning three different config formats. Write once, publish everywhere.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g themebooth
9
+ ```
10
+
11
+ ## Quickstart
12
+
13
+ ### 1. Initialize a new theme
14
+
15
+ ```bash
16
+ themebooth init my_theme
17
+ cd my_theme
18
+ ```
19
+
20
+ Creates a project with `manifest.json` (your theme definition) and a live preview setup.
21
+
22
+ ### 2. Define your theme
23
+
24
+ Edit `manifest.json` with your color palette and syntax rules. Define colors once as variables, reuse them everywhere:
25
+
26
+ ```json
27
+ {
28
+ "name": "Ocean Dream",
29
+ "description": "A cool, calm syntax theme",
30
+ "author": "you@example.com",
31
+ "variables": {
32
+ "bg": "#0d1117",
33
+ "fg": "#c9d1d9",
34
+ "accent": "#58a6ff",
35
+ "error": "#ff7b72",
36
+ "string": "#a371f7",
37
+ "comment": "#8b949e"
38
+ },
39
+ "colors": {
40
+ "background": "$bg",
41
+ "foreground": "$fg"
42
+ },
43
+ "tokens": {
44
+ "keyword": { "foreground": "$error", "fontStyle": "bold" },
45
+ "string": { "foreground": "$string" },
46
+ "comment": { "foreground": "$comment", "fontStyle": "italic" }
47
+ }
48
+ }
49
+ ```
50
+
51
+ Use `$variableName` anywhere in the file. Change a color once, updates everywhere.
52
+
53
+ ### 3. Preview live changes
54
+
55
+ ```bash
56
+ themebooth preview
57
+ ```
58
+
59
+ Opens `preview.html` in your browser. Edit `manifest.json`, and the preview reloads automatically. Test with built-in code samples or paste your own code.
60
+
61
+ ### 4. Package your theme
62
+
63
+ ```bash
64
+ themebooth package
65
+ ```
66
+
67
+ Generates `ocean-dream/` with ready-to-publish formats for all 3 platforms.
68
+
69
+ ### 5. Publish to marketplaces
70
+
71
+ **VS Code:**
72
+ ```bash
73
+ themebooth publish vscode
74
+ ```
75
+
76
+ **Notepad++:**
77
+ ```bash
78
+ themebooth publish notepad++
79
+ ```
80
+
81
+ **Zed:**
82
+ ```bash
83
+ themebooth publish zed
84
+ ```
85
+
86
+ Each command guides you through marketplace login and submission.
87
+
88
+ ## What v1 supports
89
+
90
+ - **3 editors**: VS Code, Notepad++, Zed
91
+ - **Single JSON theme definition** (no per-editor config files in v1)
92
+ - **Color variables** (`$colorName`) for DRY theming—define once, reuse everywhere
93
+ - **Live HTML preview** with code samples
94
+ - **One-command packaging** to editor-native formats
95
+ - **Built-in syntax presets** (light, dark, high contrast templates)
96
+
97
+ ## How it works
98
+
99
+ 1. Write a single `manifest.json` with your colors and token rules
100
+ 2. Theme Booth transpiles it into each editor's native format:
101
+ - VS Code → `.json` theme file
102
+ - Notepad++ → `.xml` style definition
103
+ - Zed → `.json` theme file
104
+ 3. Publish directly from CLI using your marketplace credentials
105
+
106
+ ## Documentation
107
+
108
+ - **[Manifest Schema](MANIFEST_SCHEMA.md)** — Complete reference for `manifest.json`
109
+ - **[CLI Commands](CLI_HELP.md)** — Detailed help for each command
110
+ - **[Troubleshooting](TROUBLESHOOTING.md)** — Solutions for common issues
111
+ - **[Contributing](CONTRIBUTING.md)** — How to contribute to Theme Booth
112
+
113
+ ## Examples
114
+
115
+ ### Create a theme from preset
116
+ ```bash
117
+ themebooth init ocean-dream --preset dark
118
+ cd ocean-dream
119
+ themebooth preview
120
+ ```
121
+
122
+ ### Use custom colors
123
+ Edit `manifest.json`:
124
+ ```json
125
+ {
126
+ "name": "My Theme",
127
+ "author": "Your Name",
128
+ "description": "Custom syntax theme",
129
+ "version": "1.0.0",
130
+ "variables": {
131
+ "bg": "#0d1117",
132
+ "fg": "#c9d1d9",
133
+ "keyword": "#ff6b6b"
134
+ },
135
+ "colors": {
136
+ "editor.background": "$bg",
137
+ "editor.foreground": "$fg"
138
+ },
139
+ "tokens": {
140
+ "keyword": { "foreground": "$keyword", "fontStyle": "bold" }
141
+ },
142
+ "presets": []
143
+ }
144
+ ```
145
+
146
+ Then preview:
147
+ ```bash
148
+ themebooth preview
149
+ ```
150
+
151
+ Changes to `manifest.json` reload automatically.
152
+
153
+ ## CLI Commands
154
+
155
+ | Command | Purpose |
156
+ |---------|---------|
157
+ | `themebooth init [name]` | Create new theme project |
158
+ | `themebooth preview` | Live preview with hot-reload |
159
+ | `themebooth package` | Package for all platforms |
160
+ | `themebooth publish <platform>` | Publish to marketplace |
161
+
162
+ See `themebooth --help` or `themebooth <command> --help` for detailed options.
163
+
164
+ ## Next: Future versions
165
+
166
+ **v2** adds Sublime Text, IntelliJ IDEA, and PyCharm with multi-file support and language-specific overrides.
167
+
168
+ **v3** brings Eclipse and Visual Studio with advanced plugin structures.
169
+
170
+ ---
171
+
172
+ See [ROADMAP.md](ROADMAP.md) for the full vision.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=themebooth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themebooth.d.ts","sourceRoot":"","sources":["../../src/bin/themebooth.ts"],"names":[],"mappings":""}
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const commander_1 = require("commander");
5
+ const init_1 = require("../cli/init");
6
+ const preview_1 = require("../cli/preview");
7
+ const package_1 = require("../cli/package");
8
+ const publish_1 = require("../cli/publish");
9
+ const program = new commander_1.Command();
10
+ program
11
+ .name("themebooth")
12
+ .description("Create syntax themes once, publish to VS Code, Notepad++, and Zed")
13
+ .version("0.1.0");
14
+ program
15
+ .command("init [name]")
16
+ .description("Initialize a new theme project")
17
+ .option("-p, --preset <preset>", "Use a preset (dark, light, high-contrast)", "dark")
18
+ .addHelpText("after", `
19
+ Examples:
20
+ $ themebooth init my-theme
21
+ $ themebooth init --preset light my-theme
22
+ $ themebooth init # Uses current directory name
23
+
24
+ Presets:
25
+ dark - Dark mode with cool blues (default)
26
+ light - Light mode with warm tones
27
+ high-contrast - Accessibility-focused, max contrast
28
+ `)
29
+ .action(async (name, options) => {
30
+ try {
31
+ await (0, init_1.initCommand)(name, options.preset);
32
+ }
33
+ catch (error) {
34
+ process.exit(1);
35
+ }
36
+ });
37
+ program
38
+ .command("preview")
39
+ .description("Start live preview server for theme editing")
40
+ .addHelpText("after", `
41
+ Starts an Express server at http://localhost:5173 with hot-reload.
42
+ Watch manifest.json for changes and reload preview.html in browser.
43
+
44
+ Examples:
45
+ $ themebooth preview
46
+ $ themebooth preview # Port auto-fallback if 5173 in use
47
+ `)
48
+ .action(async () => {
49
+ try {
50
+ await (0, preview_1.previewCommand)();
51
+ }
52
+ catch (error) {
53
+ process.exit(1);
54
+ }
55
+ });
56
+ program
57
+ .command("package")
58
+ .description("Package theme for all platforms (VS Code, Notepad++, Zed)")
59
+ .addHelpText("after", `
60
+ Validates manifest.json, transpiles to each editor's native format.
61
+ Outputs packaged files to ./.themebooth/output/{theme-name}/
62
+
63
+ Examples:
64
+ $ themebooth package
65
+ $ ls ./.themebooth/output/
66
+ `)
67
+ .action(async () => {
68
+ try {
69
+ await (0, package_1.packageCommand)();
70
+ }
71
+ catch (error) {
72
+ process.exit(1);
73
+ }
74
+ });
75
+ program
76
+ .command("publish [platform]")
77
+ .description("Publish theme to marketplace (vscode, notepad++, zed)")
78
+ .addHelpText("after", `
79
+ Interactive flow for marketplace submission. Requires packaged output.
80
+
81
+ Platforms:
82
+ vscode - VS Code Marketplace
83
+ notepad++ - Notepad++ Plugin Manager
84
+ zed - Zed Theme Registry
85
+
86
+ Examples:
87
+ $ themebooth package
88
+ $ themebooth publish vscode
89
+ $ themebooth publish notepad++
90
+ `)
91
+ .action(async (platform) => {
92
+ try {
93
+ await (0, publish_1.publishCommand)(platform);
94
+ }
95
+ catch (error) {
96
+ process.exit(1);
97
+ }
98
+ });
99
+ program.parse(process.argv);
100
+ if (!process.argv.slice(2).length) {
101
+ program.outputHelp();
102
+ }
103
+ //# sourceMappingURL=themebooth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themebooth.js","sourceRoot":"","sources":["../../src/bin/themebooth.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,sCAA0C;AAC1C,4CAAgD;AAChD,4CAAgD;AAChD,4CAAgD;AAGhD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,WAAW,CAAC,mEAAmE,CAAC;KAChF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,aAAa,CAAC;KACtB,WAAW,CAAC,gCAAgC,CAAC;KAC7C,MAAM,CAAC,uBAAuB,EAAE,2CAA2C,EAAE,MAAM,CAAC;KACpF,WAAW,CAAC,OAAO,EAAE;;;;;;;;;;GAUrB,CAAC;KACD,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC9B,IAAI,CAAC;QACH,MAAM,IAAA,kBAAW,EAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,6CAA6C,CAAC;KAC1D,WAAW,CAAC,OAAO,EAAE;;;;;;;GAOrB,CAAC;KACD,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC;QACH,MAAM,IAAA,wBAAc,GAAE,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,2DAA2D,CAAC;KACxE,WAAW,CAAC,OAAO,EAAE;;;;;;;GAOrB,CAAC;KACD,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC;QACH,MAAM,IAAA,wBAAc,GAAE,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,oBAAoB,CAAC;KAC7B,WAAW,CAAC,uDAAuD,CAAC;KACpE,WAAW,CAAC,OAAO,EAAE;;;;;;;;;;;;GAYrB,CAAC;KACD,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;IACzB,IAAI,CAAC;QACH,MAAM,IAAA,wBAAc,EAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function initCommand(themeName?: string, presetName?: string): Promise<void>;
2
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AA+TA,wBAAsB,WAAW,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyFxF"}