@bytechain.cn/colamd-themes 0.5.9 → 0.6.1

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 (69) hide show
  1. package/README.md +85 -19
  2. package/dist/cli.js +70 -6
  3. package/dist/cli.js.map +1 -1
  4. package/dist/compat.d.ts +23 -3
  5. package/dist/compat.js +71 -12
  6. package/dist/compat.js.map +1 -1
  7. package/dist/dsh-plugin.js +1 -1
  8. package/dist/generator.d.ts +1 -1
  9. package/dist/generator.js +5 -2
  10. package/dist/generator.js.map +1 -1
  11. package/dist/models.d.ts +7 -1
  12. package/dist/models.js +1 -1
  13. package/dist/models.js.map +1 -1
  14. package/dist/renderer.d.ts +1 -1
  15. package/dist/renderer.js +21 -3
  16. package/dist/renderer.js.map +1 -1
  17. package/dist/slides-markdown.d.ts +45 -0
  18. package/dist/slides-markdown.js +515 -0
  19. package/dist/slides-markdown.js.map +1 -0
  20. package/dist/slides.d.ts +36 -0
  21. package/dist/slides.js +149 -0
  22. package/dist/slides.js.map +1 -0
  23. package/dist/templates/theme-template.hbs +11 -0
  24. package/dist/validators.d.ts +2 -2
  25. package/dist/validators.js +71 -4
  26. package/dist/validators.js.map +1 -1
  27. package/package.json +3 -2
  28. package/skills/build-skills.sh +224 -217
  29. package/skills/colamd-themes/SKILL.md +178 -6
  30. package/themes/8-bit-orbit.css +817 -0
  31. package/themes/README.md +69 -0
  32. package/themes/biennale-yellow.css +577 -0
  33. package/themes/block-frame.css +774 -0
  34. package/themes/blue-professional.css +741 -0
  35. package/themes/bold-poster.css +794 -0
  36. package/themes/broadside.css +837 -0
  37. package/themes/capsule.css +767 -0
  38. package/themes/cartesian.css +584 -0
  39. package/themes/cobalt-grid.css +632 -0
  40. package/themes/coral.css +699 -0
  41. package/themes/creative-mode.css +642 -0
  42. package/themes/daisy-days.css +1052 -0
  43. package/themes/editorial-forest.css +796 -0
  44. package/themes/editorial-tri-tone.css +811 -0
  45. package/themes/emerald-editorial.css +683 -0
  46. package/themes/grove.css +623 -0
  47. package/themes/indigo-deck.css +336 -0
  48. package/themes/indigo-porcelain-light.css +335 -0
  49. package/themes/long-table.css +782 -0
  50. package/themes/mat.css +848 -0
  51. package/themes/monochrome.css +782 -0
  52. package/themes/neo-grid-bold.css +838 -0
  53. package/themes/peoples-platform.css +843 -0
  54. package/themes/pin-and-paper.css +700 -0
  55. package/themes/pink-script-dark.css +648 -0
  56. package/themes/pink-script.css +290 -0
  57. package/themes/playful.css +774 -0
  58. package/themes/raw-grid.css +814 -0
  59. package/themes/retro-windows.css +767 -0
  60. package/themes/retro-zine.css +814 -0
  61. package/themes/sakura-chroma.css +775 -0
  62. package/themes/scatterbrain.css +726 -0
  63. package/themes/signal.css +872 -0
  64. package/themes/soft-editorial.css +788 -0
  65. package/themes/stencil-tablet.css +922 -0
  66. package/themes/studio.css +767 -0
  67. package/themes/swiss-lemon-dark.css +529 -0
  68. package/themes/swiss-lemon-light.css +375 -0
  69. package/themes/vellum.css +723 -0
@@ -1,217 +1,224 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Build agent-specific skill files from the canonical source.
4
- #
5
- # Usage:
6
- # bash skills/build-skills.sh # generate all
7
- # bash skills/build-skills.sh claude # generate for one agent
8
- #
9
- # Source: skills/colamd-themes/SKILL.md
10
- # Output: .{agent}/skills/colamd-themes/SKILL.md (or equivalent)
11
-
12
- set -euo pipefail
13
- cd "$(dirname "$0")/.."
14
-
15
- SOURCE="skills/colamd-themes/SKILL.md"
16
- if [[ ! -f "$SOURCE" ]]; then
17
- echo "Error: Source skill not found: $SOURCE" >&2
18
- exit 1
19
- fi
20
-
21
- # Read the body (everything after the first blank line following the heading).
22
- # Strip CR first: on Windows checkouts the source may use CRLF, and sed's
23
- # `/^$/` cannot match a "\r" line — silently producing an empty BODY and
24
- # truncated skill files (regression shipped in 0.5.2).
25
- BODY=$(sed 's/\r$//' "$SOURCE" | sed -n '/^$/,$ { /^# ColaMD/!p; }' | sed '1{/^$/d;}')
26
- if [[ -z "$BODY" ]]; then
27
- echo "Error: extracted body from $SOURCE is empty (line-ending issue?)" >&2
28
- exit 1
29
- fi
30
-
31
- # ── Frontmatter templates ──
32
-
33
- FRONT_CLAUDE='---
34
- name: colamd-themes
35
- description: >
36
- Generate, validate, export, and manage ColaMD 2.7.8-rc.2 contract CSS themes.
37
- Extract formatting from URLs, DOCX, or PDF sources; export Markdown to
38
- standalone HTML/PDF with themes applied; batch export; manage theme
39
- configuration.
40
- ---'
41
-
42
- FRONT_OPENCODE='---
43
- name: colamd-themes
44
- version: "1.0.0"
45
- description: >
46
- Generate, validate, export, and manage ColaMD 2.7.8-rc.2 contract CSS themes.
47
- Extract from URLs/DOCX/PDF; export Markdown to HTML/PDF; batch export.
48
- user-invocable: true
49
- allowed-tools:
50
- - Read
51
- - Write
52
- - Edit
53
- - Bash
54
- - Glob
55
- - Grep
56
- ---'
57
-
58
- FRONT_OPENCLAW='---
59
- id: colamd-themes
60
- name: ColaMD Themes
61
- description: >
62
- Generate, validate, export, and manage ColaMD 2.7.8-rc.2 contract CSS themes.
63
- Extract from URLs/DOCX/PDF; export Markdown to HTML/PDF; batch export.
64
- version: "1.0.0"
65
- icon: "\U0001F3A8"
66
- author: bytechain
67
- homepage: https://github.com/byteuser1977/ColaMD-themes
68
- user-invocable: true
69
- metadata:
70
- openclaw:
71
- os: [darwin, linux, win32]
72
- clawdbot:
73
- emoji: "\U0001F3A8"
74
- requires:
75
- bins: [node, npm]
76
- ---'
77
-
78
- FRONT_HERMES='---
79
- name: colamd-themes
80
- description: "Generate, validate, export, and manage ColaMD 2.7.8-rc.2 contract CSS themes."
81
- version: 1.0.0
82
- author: bytechain
83
- license: MIT
84
- metadata:
85
- hermes:
86
- tags: [colamd, themes, css, markdown, export, pdf, html]
87
- prerequisites:
88
- commands: [node, npm]
89
- ---'
90
-
91
- FRONT_DSH='---
92
- name: colamd-themes
93
- version: "1.0.0"
94
- description: >
95
- Generate, validate, export, and manage ColaMD 2.7.8-rc.2 contract CSS themes.
96
- Extract from URLs/DOCX/PDF; export Markdown to HTML/PDF; batch export.
97
- metadata:
98
- dsh:
99
- tags: [colamd, themes, css, markdown, export, pdf, html]
100
- prerequisites:
101
- commands: [node, npm]
102
- ---'
103
-
104
- # Trae project skill constraints: description is a single-line plain scalar,
105
- # unquoted, with no ": ", "<", or ">" (router-visible trigger text).
106
- FRONT_TRAE_SKILL='---
107
- name: colamd-themes
108
- description: Generate, validate, and export ColaMD contract CSS themes — extract from URLs, DOCX or PDF, export Markdown to HTML or PDF. Use when the user asks to create, validate, export, or manage ColaMD themes.
109
- ---'
110
-
111
- # ── Generator functions ──
112
-
113
- generate_claude() {
114
- local dir=".claude/skills"
115
- mkdir -p "$dir"
116
- local file="$dir/colamd-themes.skill.md"
117
- echo "$FRONT_CLAUDE" > "$file"
118
- echo "" >> "$file"
119
- echo "$BODY" >> "$file"
120
- echo " → $file"
121
- }
122
-
123
- generate_opencode() {
124
- local dir=".opencode/skills/colamd-themes"
125
- mkdir -p "$dir"
126
- local file="$dir/SKILL.md"
127
- echo "$FRONT_OPENCODE" > "$file"
128
- echo "" >> "$file"
129
- echo "$BODY" >> "$file"
130
- echo " → $file"
131
- }
132
-
133
- generate_openclaw() {
134
- local dir=".openclaw/skills/colamd-themes"
135
- mkdir -p "$dir"
136
- local file="$dir/SKILL.md"
137
- echo "$FRONT_OPENCLAW" > "$file"
138
- echo "" >> "$file"
139
- echo "$BODY" >> "$file"
140
- echo " → $file"
141
- }
142
-
143
- generate_hermes() {
144
- local dir=".hermes/skills/tools/colamd-themes"
145
- mkdir -p "$dir"
146
- local file="$dir/SKILL.md"
147
- echo "$FRONT_HERMES" > "$file"
148
- echo "" >> "$file"
149
- echo "$BODY" >> "$file"
150
- echo " → $file"
151
- }
152
-
153
- generate_dsh() {
154
- local dir=".dsh/skills/colamd-themes"
155
- mkdir -p "$dir"
156
- local file="$dir/SKILL.md"
157
- echo "$FRONT_DSH" > "$file"
158
- echo "" >> "$file"
159
- echo "$BODY" >> "$file"
160
- echo " → $file"
161
- }
162
-
163
- generate_trae() {
164
- local dir=".trae/rules"
165
- mkdir -p "$dir"
166
- local file="$dir/colamd-themes.md"
167
- # Trae uses plain Markdown, no YAML frontmatter
168
- echo "# ColaMD Themes Skill Instructions" > "$file"
169
- echo "" >> "$file"
170
- echo "When the user asks to create, validate, export, or manage ColaMD themes, use the following CLI tool:" >> "$file"
171
- echo "" >> "$file"
172
- echo "$BODY" >> "$file"
173
- echo " → $file"
174
- }
175
-
176
- generate_trae_skill() {
177
- local dir=".trae/skills/colamd-themes"
178
- mkdir -p "$dir"
179
- local file="$dir/SKILL.md"
180
- echo "$FRONT_TRAE_SKILL" > "$file"
181
- echo "" >> "$file"
182
- echo "$BODY" >> "$file"
183
- echo " → $file"
184
- }
185
-
186
- # ── Main ──
187
-
188
- TARGET="${1:-all}"
189
- echo "Building skill files from: $SOURCE"
190
- echo ""
191
-
192
- case "$TARGET" in
193
- claude) generate_claude ;;
194
- opencode) generate_opencode ;;
195
- openclaw) generate_openclaw ;;
196
- hermes) generate_hermes ;;
197
- trae) generate_trae ;;
198
- trae-skill) generate_trae_skill ;;
199
- dsh) generate_dsh ;;
200
- all)
201
- generate_claude
202
- generate_opencode
203
- generate_openclaw
204
- generate_hermes
205
- generate_trae
206
- generate_trae_skill
207
- generate_dsh
208
- ;;
209
- *)
210
- echo "Unknown agent: $TARGET" >&2
211
- echo "Usage: $0 [claude|opencode|openclaw|hermes|trae|trae-skill|dsh|all]" >&2
212
- exit 1
213
- ;;
214
- esac
215
-
216
- echo ""
217
- echo "Done. Skill files generated."
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Build agent-specific skill files from the canonical source.
4
+ #
5
+ # Usage:
6
+ # bash skills/build-skills.sh # generate all
7
+ # bash skills/build-skills.sh claude # generate for one agent
8
+ #
9
+ # Source: skills/colamd-themes/SKILL.md
10
+ # Output: .{agent}/skills/colamd-themes/SKILL.md (or equivalent)
11
+
12
+ set -euo pipefail
13
+ cd "$(dirname "$0")/.."
14
+
15
+ SOURCE="skills/colamd-themes/SKILL.md"
16
+ if [[ ! -f "$SOURCE" ]]; then
17
+ echo "Error: Source skill not found: $SOURCE" >&2
18
+ exit 1
19
+ fi
20
+
21
+ # Read the body (everything after the first blank line following the heading).
22
+ # Strip CR first: on Windows checkouts the source may use CRLF, and sed's
23
+ # `/^$/` cannot match a "\r" line — silently producing an empty BODY and
24
+ # truncated skill files (regression shipped in 0.5.2).
25
+ BODY=$(sed 's/\r$//' "$SOURCE" | sed -n '/^$/,$ { /^# ColaMD/!p; }' | sed '1{/^$/d;}')
26
+ if [[ -z "$BODY" ]]; then
27
+ echo "Error: extracted body from $SOURCE is empty (line-ending issue?)" >&2
28
+ exit 1
29
+ fi
30
+
31
+ # ── Frontmatter templates ──
32
+
33
+ FRONT_CLAUDE='---
34
+ name: colamd-themes
35
+ description: >
36
+ Generate, validate, export, and manage ColaMD 2.7 contract CSS themes
37
+ (2.7.13 anchor, slide layouts stable). Extract formatting from URLs,
38
+ DOCX, or PDF sources (optionally with PPT --slide-* styling); convert
39
+ Markdown into slide-deck Markdown; export Markdown to standalone HTML/PDF
40
+ with themes applied; batch export; manage theme configuration.
41
+ ---'
42
+
43
+ FRONT_OPENCODE='---
44
+ name: colamd-themes
45
+ version: "1.0.0"
46
+ description: >
47
+ Generate, validate, export, and manage ColaMD 2.7 contract CSS themes
48
+ (2.7.13 anchor, slide layouts stable). Extract from URLs/DOCX/PDF
49
+ with optional PPT styling; convert Markdown to slide decks; export
50
+ Markdown to HTML/PDF; batch export.
51
+ user-invocable: true
52
+ allowed-tools:
53
+ - Read
54
+ - Write
55
+ - Edit
56
+ - Bash
57
+ - Glob
58
+ - Grep
59
+ ---'
60
+
61
+ FRONT_OPENCLAW='---
62
+ id: colamd-themes
63
+ name: ColaMD Themes
64
+ description: >
65
+ Generate, validate, export, and manage ColaMD 2.7 contract CSS themes
66
+ (2.7.13 anchor, slide layouts stable). Extract from URLs/DOCX/PDF
67
+ with optional PPT styling; convert Markdown to slide decks; export
68
+ Markdown to HTML/PDF; batch export.
69
+ version: "1.0.0"
70
+ icon: "\U0001F3A8"
71
+ author: bytechain
72
+ homepage: https://github.com/byteuser1977/ColaMD-themes
73
+ user-invocable: true
74
+ metadata:
75
+ openclaw:
76
+ os: [darwin, linux, win32]
77
+ clawdbot:
78
+ emoji: "\U0001F3A8"
79
+ requires:
80
+ bins: [node, npm]
81
+ ---'
82
+
83
+ FRONT_HERMES='---
84
+ name: colamd-themes
85
+ description: "Generate, validate, export, and manage ColaMD 2.7 contract CSS themes with PPT slide layouts; convert Markdown to slide decks; export HTML/PDF."
86
+ version: 1.0.0
87
+ author: bytechain
88
+ license: MIT
89
+ metadata:
90
+ hermes:
91
+ tags: [colamd, themes, css, markdown, export, pdf, html]
92
+ prerequisites:
93
+ commands: [node, npm]
94
+ ---'
95
+
96
+ FRONT_DSH='---
97
+ name: colamd-themes
98
+ version: "1.0.0"
99
+ description: >
100
+ Generate, validate, export, and manage ColaMD 2.7 contract CSS themes
101
+ (2.7.13 anchor, slide layouts stable). Extract from URLs/DOCX/PDF
102
+ with optional PPT styling; convert Markdown to slide decks; export
103
+ Markdown to HTML/PDF; batch export.
104
+ metadata:
105
+ dsh:
106
+ tags: [colamd, themes, css, markdown, export, pdf, html]
107
+ prerequisites:
108
+ commands: [node, npm]
109
+ ---'
110
+
111
+ # Trae project skill constraints: description is a single-line plain scalar,
112
+ # unquoted, with no ": ", "<", or ">" (router-visible trigger text).
113
+ FRONT_TRAE_SKILL='---
114
+ name: colamd-themes
115
+ description: Generate, validate, and export ColaMD contract CSS themes with PPT slide layout support — extract from URLs, DOCX or PDF (optionally with PPT --slide-* styling), convert Markdown to slide-deck Markdown, export Markdown to HTML or PDF. Use when the user asks to create, validate, export, or manage ColaMD themes, or to generate PPT slides from Markdown.
116
+ ---'
117
+
118
+ # ── Generator functions ──
119
+
120
+ generate_claude() {
121
+ local dir=".claude/skills"
122
+ mkdir -p "$dir"
123
+ local file="$dir/colamd-themes.skill.md"
124
+ echo "$FRONT_CLAUDE" > "$file"
125
+ echo "" >> "$file"
126
+ echo "$BODY" >> "$file"
127
+ echo " → $file"
128
+ }
129
+
130
+ generate_opencode() {
131
+ local dir=".opencode/skills/colamd-themes"
132
+ mkdir -p "$dir"
133
+ local file="$dir/SKILL.md"
134
+ echo "$FRONT_OPENCODE" > "$file"
135
+ echo "" >> "$file"
136
+ echo "$BODY" >> "$file"
137
+ echo " → $file"
138
+ }
139
+
140
+ generate_openclaw() {
141
+ local dir=".openclaw/skills/colamd-themes"
142
+ mkdir -p "$dir"
143
+ local file="$dir/SKILL.md"
144
+ echo "$FRONT_OPENCLAW" > "$file"
145
+ echo "" >> "$file"
146
+ echo "$BODY" >> "$file"
147
+ echo " → $file"
148
+ }
149
+
150
+ generate_hermes() {
151
+ local dir=".hermes/skills/tools/colamd-themes"
152
+ mkdir -p "$dir"
153
+ local file="$dir/SKILL.md"
154
+ echo "$FRONT_HERMES" > "$file"
155
+ echo "" >> "$file"
156
+ echo "$BODY" >> "$file"
157
+ echo " → $file"
158
+ }
159
+
160
+ generate_dsh() {
161
+ local dir=".dsh/skills/colamd-themes"
162
+ mkdir -p "$dir"
163
+ local file="$dir/SKILL.md"
164
+ echo "$FRONT_DSH" > "$file"
165
+ echo "" >> "$file"
166
+ echo "$BODY" >> "$file"
167
+ echo " → $file"
168
+ }
169
+
170
+ generate_trae() {
171
+ local dir=".trae/rules"
172
+ mkdir -p "$dir"
173
+ local file="$dir/colamd-themes.md"
174
+ # Trae uses plain Markdown, no YAML frontmatter
175
+ echo "# ColaMD Themes Skill Instructions" > "$file"
176
+ echo "" >> "$file"
177
+ echo "When the user asks to create, validate, export, or manage ColaMD themes, use the following CLI tool:" >> "$file"
178
+ echo "" >> "$file"
179
+ echo "$BODY" >> "$file"
180
+ echo " → $file"
181
+ }
182
+
183
+ generate_trae_skill() {
184
+ local dir=".trae/skills/colamd-themes"
185
+ mkdir -p "$dir"
186
+ local file="$dir/SKILL.md"
187
+ echo "$FRONT_TRAE_SKILL" > "$file"
188
+ echo "" >> "$file"
189
+ echo "$BODY" >> "$file"
190
+ echo " → $file"
191
+ }
192
+
193
+ # ── Main ──
194
+
195
+ TARGET="${1:-all}"
196
+ echo "Building skill files from: $SOURCE"
197
+ echo ""
198
+
199
+ case "$TARGET" in
200
+ claude) generate_claude ;;
201
+ opencode) generate_opencode ;;
202
+ openclaw) generate_openclaw ;;
203
+ hermes) generate_hermes ;;
204
+ trae) generate_trae ;;
205
+ trae-skill) generate_trae_skill ;;
206
+ dsh) generate_dsh ;;
207
+ all)
208
+ generate_claude
209
+ generate_opencode
210
+ generate_openclaw
211
+ generate_hermes
212
+ generate_trae
213
+ generate_trae_skill
214
+ generate_dsh
215
+ ;;
216
+ *)
217
+ echo "Unknown agent: $TARGET" >&2
218
+ echo "Usage: $0 [claude|opencode|openclaw|hermes|trae|trae-skill|dsh|all]" >&2
219
+ exit 1
220
+ ;;
221
+ esac
222
+
223
+ echo ""
224
+ echo "Done. Skill files generated."