@masumdev/markforge 0.2.4 → 0.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masumdev/markforge",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Modern, high-performance Markdown & MDX multi-format document publishing engine and CLI (DOCX, PDF, HTML, and Images) with embedded HTML/CSS, image inliner, and Ink terminal UI.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/schema.json CHANGED
@@ -27,20 +27,36 @@
27
27
  },
28
28
  "outputDir": {
29
29
  "type": "string",
30
- "description": "Output directory for compiled documents"
30
+ "description": "Output directory where compiled documents will be saved"
31
31
  },
32
32
  "theme": {
33
- "type": "string",
34
- "description": "Visual document theme name",
35
- "enum": ["default", "academic", "github", "corporate", "minimal", "dracula"],
36
- "default": "default"
37
- },
38
- "css": {
39
- "description": "Custom CSS stylesheet path(s) to inject",
33
+ "description": "Visual document theme (preset 'corporate' or custom ThemeProps object)",
40
34
  "oneOf": [
41
- { "type": "string" },
42
- { "type": "array", "items": { "type": "string" } }
43
- ]
35
+ {
36
+ "type": "string",
37
+ "enum": ["corporate", "default"]
38
+ },
39
+ {
40
+ "type": "object",
41
+ "properties": {
42
+ "primaryColor": { "type": "string" },
43
+ "primaryDark": { "type": "string" },
44
+ "primaryLight": { "type": "string" },
45
+ "backgroundColor": { "type": "string" },
46
+ "textColor": { "type": "string" },
47
+ "textMuted": { "type": "string" },
48
+ "borderColor": { "type": "string" },
49
+ "cardBackground": { "type": "string" },
50
+ "codeBackground": { "type": "string" },
51
+ "codeText": { "type": "string" },
52
+ "fontFamily": { "type": "string" },
53
+ "fontMono": { "type": "string" },
54
+ "customCss": { "type": "string" }
55
+ },
56
+ "additionalProperties": false
57
+ }
58
+ ],
59
+ "default": "corporate"
44
60
  },
45
61
  "orientation": {
46
62
  "type": "string",
@@ -50,13 +66,13 @@
50
66
  },
51
67
  "paperSize": {
52
68
  "type": "string",
53
- "description": "Physical page size",
69
+ "description": "Standard physical paper size",
54
70
  "enum": ["A4", "Letter", "Legal", "A3", "A5"],
55
71
  "default": "A4"
56
72
  },
57
73
  "margins": {
58
74
  "type": "object",
59
- "description": "Document margins (supports units like '2.5cm', '1in', '20mm', or pt numbers)",
75
+ "description": "Document page margins (supports units like '2.5cm', '1in', '20mm', or pt numbers)",
60
76
  "properties": {
61
77
  "top": { "type": ["string", "number"] },
62
78
  "bottom": { "type": ["string", "number"] },
@@ -67,21 +83,133 @@
67
83
  },
68
84
  "header": {
69
85
  "type": "object",
70
- "description": "Header text across pages",
86
+ "description": "Running header template across document pages (supports {title}, {subtitle}, {author}, {version}, {date}, {company})",
71
87
  "properties": {
72
- "left": { "type": "string" },
73
- "center": { "type": "string" },
74
- "right": { "type": "string" }
88
+ "left": {
89
+ "oneOf": [
90
+ { "type": "string" },
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "text": { "type": "string" },
95
+ "color": { "type": "string" },
96
+ "fontSize": { "type": "number" },
97
+ "fontFamily": { "type": "string" },
98
+ "bold": { "type": "boolean" },
99
+ "italic": { "type": "boolean" }
100
+ },
101
+ "required": ["text"],
102
+ "additionalProperties": false
103
+ }
104
+ ]
105
+ },
106
+ "center": {
107
+ "oneOf": [
108
+ { "type": "string" },
109
+ {
110
+ "type": "object",
111
+ "properties": {
112
+ "text": { "type": "string" },
113
+ "color": { "type": "string" },
114
+ "fontSize": { "type": "number" },
115
+ "fontFamily": { "type": "string" },
116
+ "bold": { "type": "boolean" },
117
+ "italic": { "type": "boolean" }
118
+ },
119
+ "required": ["text"],
120
+ "additionalProperties": false
121
+ }
122
+ ]
123
+ },
124
+ "right": {
125
+ "oneOf": [
126
+ { "type": "string" },
127
+ {
128
+ "type": "object",
129
+ "properties": {
130
+ "text": { "type": "string" },
131
+ "color": { "type": "string" },
132
+ "fontSize": { "type": "number" },
133
+ "fontFamily": { "type": "string" },
134
+ "bold": { "type": "boolean" },
135
+ "italic": { "type": "boolean" }
136
+ },
137
+ "required": ["text"],
138
+ "additionalProperties": false
139
+ }
140
+ ]
141
+ },
142
+ "divider": { "type": "boolean" },
143
+ "dividerColor": { "type": "string" },
144
+ "font": { "type": "string" },
145
+ "size": { "type": "number" },
146
+ "color": { "type": "string" }
75
147
  },
76
148
  "additionalProperties": false
77
149
  },
78
150
  "footer": {
79
151
  "type": "object",
80
- "description": "Footer text across pages (supports {page} and {pages} variables)",
152
+ "description": "Running footer template across document pages (supports {page}, {pages}, {title}, {author}, {date})",
81
153
  "properties": {
82
- "left": { "type": "string" },
83
- "center": { "type": "string" },
84
- "right": { "type": "string" }
154
+ "left": {
155
+ "oneOf": [
156
+ { "type": "string" },
157
+ {
158
+ "type": "object",
159
+ "properties": {
160
+ "text": { "type": "string" },
161
+ "color": { "type": "string" },
162
+ "fontSize": { "type": "number" },
163
+ "fontFamily": { "type": "string" },
164
+ "bold": { "type": "boolean" },
165
+ "italic": { "type": "boolean" }
166
+ },
167
+ "required": ["text"],
168
+ "additionalProperties": false
169
+ }
170
+ ]
171
+ },
172
+ "center": {
173
+ "oneOf": [
174
+ { "type": "string" },
175
+ {
176
+ "type": "object",
177
+ "properties": {
178
+ "text": { "type": "string" },
179
+ "color": { "type": "string" },
180
+ "fontSize": { "type": "number" },
181
+ "fontFamily": { "type": "string" },
182
+ "bold": { "type": "boolean" },
183
+ "italic": { "type": "boolean" }
184
+ },
185
+ "required": ["text"],
186
+ "additionalProperties": false
187
+ }
188
+ ]
189
+ },
190
+ "right": {
191
+ "oneOf": [
192
+ { "type": "string" },
193
+ {
194
+ "type": "object",
195
+ "properties": {
196
+ "text": { "type": "string" },
197
+ "color": { "type": "string" },
198
+ "fontSize": { "type": "number" },
199
+ "fontFamily": { "type": "string" },
200
+ "bold": { "type": "boolean" },
201
+ "italic": { "type": "boolean" }
202
+ },
203
+ "required": ["text"],
204
+ "additionalProperties": false
205
+ }
206
+ ]
207
+ },
208
+ "divider": { "type": "boolean" },
209
+ "dividerColor": { "type": "string" },
210
+ "font": { "type": "string" },
211
+ "size": { "type": "number" },
212
+ "color": { "type": "string" }
85
213
  },
86
214
  "additionalProperties": false
87
215
  },
@@ -91,37 +219,71 @@
91
219
  "default": false
92
220
  },
93
221
  "watermark": {
94
- "type": "string",
95
- "description": "Diagonal watermark text across document pages"
96
- },
97
- "embedImages": {
98
- "type": "boolean",
99
- "description": "Whether to inline/embed all images as Base64 in outputs",
100
- "default": true
222
+ "description": "Watermark configuration across document pages (string or WatermarkOptions object)",
223
+ "oneOf": [
224
+ { "type": "string" },
225
+ { "type": "boolean" },
226
+ {
227
+ "type": "object",
228
+ "properties": {
229
+ "text": { "type": "string" },
230
+ "color": { "type": "string" },
231
+ "opacity": { "type": "number" },
232
+ "fontSize": { "type": "number" },
233
+ "rotate": { "type": "number" },
234
+ "position": {
235
+ "type": "string",
236
+ "enum": ["diagonal", "center", "top-right", "bottom-right"]
237
+ }
238
+ },
239
+ "required": ["text"],
240
+ "additionalProperties": false
241
+ }
242
+ ]
101
243
  },
102
- "bundleHtml": {
103
- "type": "boolean",
104
- "description": "Produce self-contained HTML with embedded styles and scripts",
105
- "default": true
244
+ "css": {
245
+ "description": "Custom CSS stylesheet path(s) to inject into the document",
246
+ "oneOf": [
247
+ { "type": "string" },
248
+ { "type": "array", "items": { "type": "string" } }
249
+ ]
106
250
  },
107
251
  "syntaxTheme": {
108
252
  "type": "string",
109
- "description": "Code block syntax highlighting color scheme",
253
+ "description": "Code block syntax highlighting color theme",
110
254
  "enum": ["github-dark", "github-light", "dracula", "monokai", "nord"],
111
255
  "default": "github-dark"
112
256
  },
113
257
  "metadata": {
114
258
  "type": "object",
115
- "description": "Document frontmatter metadata defaults",
259
+ "description": "Default document metadata dictionary (used as fallback if not in markdown frontmatter)",
116
260
  "properties": {
117
261
  "title": { "type": "string" },
118
- "author": { "type": "string" },
262
+ "subtitle": { "type": "string" },
263
+ "author": {
264
+ "oneOf": [
265
+ { "type": "string" },
266
+ { "type": "array", "items": { "type": "string" } }
267
+ ]
268
+ },
119
269
  "date": { "type": "string" },
120
270
  "version": { "type": "string" },
121
- "company": { "type": "string" }
271
+ "company": { "type": "string" },
272
+ "lang": { "type": "string" },
273
+ "coverPage": { "type": "boolean" }
122
274
  },
123
275
  "additionalProperties": true
124
276
  },
277
+ "embedImages": {
278
+ "type": "boolean",
279
+ "description": "Whether to inline/embed all images as Base64 in outputs",
280
+ "default": true
281
+ },
282
+ "bundleHtml": {
283
+ "type": "boolean",
284
+ "description": "Produce self-contained HTML with embedded styles and scripts",
285
+ "default": true
286
+ },
125
287
  "watch": {
126
288
  "type": "boolean",
127
289
  "description": "Watch mode for re-compilation on source file changes",