sdoc-editor-cli 0.12.1 → 0.13.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.
- package/README.md +2 -1
- package/dist/sdoc.js +504 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,7 +144,7 @@ sdoc capabilities --human
|
|
|
144
144
|
"commands": ["capabilities", "inspect", "validate", "apply", "rename-heading", "set-document-title", "create"],
|
|
145
145
|
"projections": ["catalog", "target", "section", "document"],
|
|
146
146
|
"catalogKinds": ["blocks", "outline", "references", "referenceables", "endnotes"],
|
|
147
|
-
"builtInTemplateIds": ["builtin:blank", "builtin:technical-report", "builtin:design-specification", "builtin:verification-report"]
|
|
147
|
+
"builtInTemplateIds": ["builtin:blank", "builtin:feature-showcase", "builtin:technical-report", "builtin:design-specification", "builtin:verification-report"]
|
|
148
148
|
}
|
|
149
149
|
```
|
|
150
150
|
|
|
@@ -338,6 +338,7 @@ default template is `builtin:blank`; the default title is the output filename.
|
|
|
338
338
|
|
|
339
339
|
```powershell
|
|
340
340
|
sdoc create report.sdoc --title "Quarterly Report" --json
|
|
341
|
+
sdoc create tour.sdoc --template builtin:feature-showcase --dry-run --json
|
|
341
342
|
sdoc create report.sdoc --template builtin:technical-report --dry-run --json
|
|
342
343
|
sdoc create design.sdoc --template builtin:design-specification --json
|
|
343
344
|
sdoc create verification.sdoc --template builtin:verification-report --json
|
package/dist/sdoc.js
CHANGED
|
@@ -910,6 +910,20 @@ var DOCUMENT_SETTING_KEYS = Object.keys(DOCUMENT_SETTING_REGISTRY);
|
|
|
910
910
|
var SETTINGS_DEFAULTS = Object.freeze(Object.fromEntries(
|
|
911
911
|
DOCUMENT_SETTING_KEYS.map((key) => [key, DOCUMENT_SETTING_REGISTRY[key].defaultValue])
|
|
912
912
|
));
|
|
913
|
+
var HOST_SETTING_DEFAULTS = Object.freeze({
|
|
914
|
+
defaultImageAlignment: "center",
|
|
915
|
+
exportImagePath: "relative",
|
|
916
|
+
fontWeightBody: "Regular",
|
|
917
|
+
fontWeightBold: "Bold",
|
|
918
|
+
fontWeightH1: "Bold",
|
|
919
|
+
fontWeightH2: "SemiBold",
|
|
920
|
+
fontWeightH3: "SemiBold",
|
|
921
|
+
companyName: "",
|
|
922
|
+
primaryColor: "#2563EB",
|
|
923
|
+
accentColor: "#6b6b6b",
|
|
924
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
925
|
+
customStyles: ""
|
|
926
|
+
});
|
|
913
927
|
var EDITOR_SETTINGS_DEFAULTS = {
|
|
914
928
|
captionStyle: SETTINGS_DEFAULTS.captionStyle,
|
|
915
929
|
imageCaptionPrefix: CAPTION_PRESETS.modern.figurePrefix,
|
|
@@ -930,8 +944,8 @@ var EDITOR_SETTINGS_DEFAULTS = {
|
|
|
930
944
|
headingH4Color: SETTINGS_DEFAULTS.headingH4Color,
|
|
931
945
|
headingH5Color: SETTINGS_DEFAULTS.headingH5Color,
|
|
932
946
|
headingH6Color: SETTINGS_DEFAULTS.headingH6Color,
|
|
933
|
-
defaultImageAlignment:
|
|
934
|
-
exportImagePath:
|
|
947
|
+
defaultImageAlignment: HOST_SETTING_DEFAULTS.defaultImageAlignment,
|
|
948
|
+
exportImagePath: HOST_SETTING_DEFAULTS.exportImagePath,
|
|
935
949
|
pdfScale: SETTINGS_DEFAULTS.pdfScale,
|
|
936
950
|
selfContained: SETTINGS_DEFAULTS.selfContained,
|
|
937
951
|
slideBreakLevel: SETTINGS_DEFAULTS.slideBreakLevel,
|
|
@@ -5497,8 +5511,8 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5497
5511
|
validate10.errors = vErrors;
|
|
5498
5512
|
return errors === 0;
|
|
5499
5513
|
}
|
|
5500
|
-
var validateDoc =
|
|
5501
|
-
function
|
|
5514
|
+
var validateDoc = validate63;
|
|
5515
|
+
function validate63(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
5502
5516
|
let vErrors = null;
|
|
5503
5517
|
let errors = 0;
|
|
5504
5518
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -5562,11 +5576,11 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5562
5576
|
}
|
|
5563
5577
|
errors++;
|
|
5564
5578
|
}
|
|
5565
|
-
|
|
5579
|
+
validate63.errors = vErrors;
|
|
5566
5580
|
return errors === 0;
|
|
5567
5581
|
}
|
|
5568
|
-
var validateSettingsSchema =
|
|
5569
|
-
function
|
|
5582
|
+
var validateSettingsSchema = validate65;
|
|
5583
|
+
function validate65(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
5570
5584
|
let vErrors = null;
|
|
5571
5585
|
let errors = 0;
|
|
5572
5586
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -5979,7 +5993,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5979
5993
|
}
|
|
5980
5994
|
errors++;
|
|
5981
5995
|
}
|
|
5982
|
-
|
|
5996
|
+
validate65.errors = vErrors;
|
|
5983
5997
|
return errors === 0;
|
|
5984
5998
|
}
|
|
5985
5999
|
|
|
@@ -8218,6 +8232,454 @@ var design_specification_sdoc_default = {
|
|
|
8218
8232
|
}
|
|
8219
8233
|
};
|
|
8220
8234
|
|
|
8235
|
+
// ../shared/template/builtins/feature-showcase.sdoc.json
|
|
8236
|
+
var feature_showcase_sdoc_default = {
|
|
8237
|
+
sdoc: "1.0",
|
|
8238
|
+
meta: {
|
|
8239
|
+
title: "\uAE30\uB2A5 \uB458\uB7EC\uBCF4\uAE30",
|
|
8240
|
+
author: "",
|
|
8241
|
+
version: "0.1",
|
|
8242
|
+
created: "2026-01-01T00:00:00.000Z",
|
|
8243
|
+
modified: "2026-01-01T00:00:00.000Z",
|
|
8244
|
+
template: {
|
|
8245
|
+
name: "\uAE30\uB2A5 \uB458\uB7EC\uBCF4\uAE30",
|
|
8246
|
+
description: "\uD604\uC7AC \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uBC14\uB85C \uD655\uC778\uD560 \uC218 \uC788\uB294 \uBB38\uC11C \uAE30\uB2A5\uC758 \uC2E4\uC81C \uC608\uC81C\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uC6A9 \uC591\uC2DD\uC744 \uB300\uCCB4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
8247
|
+
category: "showcase"
|
|
8248
|
+
},
|
|
8249
|
+
settings: {
|
|
8250
|
+
headingNumbering: true,
|
|
8251
|
+
headingStartNumber: 1,
|
|
8252
|
+
headingDecoration: true,
|
|
8253
|
+
captionStyle: "korean",
|
|
8254
|
+
captionNumbering: "hierarchical",
|
|
8255
|
+
equationNumbering: "hierarchical",
|
|
8256
|
+
crossRefIncludeCaption: true,
|
|
8257
|
+
selfContained: "none",
|
|
8258
|
+
pdfScale: 100,
|
|
8259
|
+
slideBreakLevel: "h1-only",
|
|
8260
|
+
showTitleSlide: true
|
|
8261
|
+
}
|
|
8262
|
+
},
|
|
8263
|
+
doc: {
|
|
8264
|
+
type: "doc",
|
|
8265
|
+
content: [
|
|
8266
|
+
{
|
|
8267
|
+
type: "heading",
|
|
8268
|
+
attrs: { level: 1, id: "how-to-use", numbered: false },
|
|
8269
|
+
content: [{ type: "text", text: "\uC774 \uBB38\uC11C\uB97C \uC4F0\uB294 \uBC29\uBC95" }]
|
|
8270
|
+
},
|
|
8271
|
+
{
|
|
8272
|
+
type: "paragraph",
|
|
8273
|
+
content: [
|
|
8274
|
+
{ type: "text", text: "\uC774 \uBB38\uC11C\uB294 \uBE48 \uBB38\uC11C\uB098 \uBCF4\uACE0\uC11C \uC591\uC2DD\uC774 \uC544\uB2C8\uB77C, \uC124\uCE58 \uD6C4 \uAE30\uB2A5\uC744 \uD55C \uD654\uBA74\uC5D0\uC11C \uD655\uC778\uD558\uB294 \uB458\uB7EC\uBCF4\uAE30\uC785\uB2C8\uB2E4. \uC81C\uBAA9 \uD45C\uC2DC\uC904\uC758 \uBB38\uC11C \uC81C\uBAA9\uC744 \uBC14\uAFBC \uB4A4 \uBCF8\uBB38\uC744 \uD3B8\uC9D1\uD574 \uBCF4\uC138\uC694. \uD604\uC7AC \uBB38\uC11C\uB97C \uB36E\uC5B4\uC4F0\uC9C0 \uB9D0\uACE0 " },
|
|
8275
|
+
{ type: "text", text: "\uC0C8 \uBB38\uC11C", marks: [{ type: "bold" }] },
|
|
8276
|
+
{ type: "text", text: "\uB85C \uC0DD\uC131\uD558\uC138\uC694." }
|
|
8277
|
+
]
|
|
8278
|
+
},
|
|
8279
|
+
{
|
|
8280
|
+
type: "callout",
|
|
8281
|
+
attrs: { variant: "note" },
|
|
8282
|
+
content: [
|
|
8283
|
+
{
|
|
8284
|
+
type: "paragraph",
|
|
8285
|
+
content: [
|
|
8286
|
+
{ type: "text", text: "\uC774\uBBF8\uC9C0\uC640 Draw.io\uB294 \uC544\uC9C1 \uD15C\uD50C\uB9BF\uC5D0 \uBB36\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. PlantUML\xB7D2\xB7Graphviz\uB294 \uC678\uBD80 \uB80C\uB354\uB7EC \uB3D9\uC758\uAC00 \uC788\uC5B4\uC57C \uADF8\uB824\uC9C0\uBBC0\uB85C \uC774 \uBB38\uC11C\uC5D0\uB294 \uB123\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAC01\uC8FC\uAC00 \uC788\uC73C\uBA74 Slides \uB0B4\uBCF4\uB0B4\uAE30\uC640 Book \uD569\uC131\uC774 \uC2E4\uD328\uD558\uB294 \uAC83\uC774 \uD604\uC7AC \uACC4\uC57D\uC785\uB2C8\uB2E4." }
|
|
8287
|
+
]
|
|
8288
|
+
}
|
|
8289
|
+
]
|
|
8290
|
+
},
|
|
8291
|
+
{ type: "horizontalRule" },
|
|
8292
|
+
{
|
|
8293
|
+
type: "heading",
|
|
8294
|
+
attrs: { level: 1, id: "headings-and-numbers" },
|
|
8295
|
+
content: [{ type: "text", text: "\uC81C\uBAA9\uACFC \uBC88\uD638" }]
|
|
8296
|
+
},
|
|
8297
|
+
{
|
|
8298
|
+
type: "paragraph",
|
|
8299
|
+
content: [
|
|
8300
|
+
{ type: "text", text: "H1\uBD80\uD130 H6\uAE4C\uC9C0 \uACC4\uCE35\uC744 \uB9CC\uB4E4 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC704 \u201C\uC774 \uBB38\uC11C\uB97C \uC4F0\uB294 \uBC29\uBC95\u201D\uCC98\uB7FC " },
|
|
8301
|
+
{ type: "text", text: "numbered: false", marks: [{ type: "code" }] },
|
|
8302
|
+
{ type: "text", text: "\uC778 \uC81C\uBAA9\uC740 \uBC88\uD638\uC5D0\uC11C \uBE60\uC9D1\uB2C8\uB2E4. \uBC88\uD638\uC640 \uC7A5\uC2DD\uC740 \uBB38\uC11C \uC124\uC815\uC758 \uC81C\uBAA9 \uBC88\uD638\xB7\uC7A5\uC2DD\uC744 \uB530\uB985\uB2C8\uB2E4." }
|
|
8303
|
+
]
|
|
8304
|
+
},
|
|
8305
|
+
{
|
|
8306
|
+
type: "heading",
|
|
8307
|
+
attrs: { level: 2, id: "heading-h2" },
|
|
8308
|
+
content: [{ type: "text", text: "\uB450\uBC88\uC9F8 \uC218\uC900" }]
|
|
8309
|
+
},
|
|
8310
|
+
{
|
|
8311
|
+
type: "heading",
|
|
8312
|
+
attrs: { level: 3, id: "heading-h3" },
|
|
8313
|
+
content: [{ type: "text", text: "\uC138\uBC88\uC9F8 \uC218\uC900" }]
|
|
8314
|
+
},
|
|
8315
|
+
{
|
|
8316
|
+
type: "heading",
|
|
8317
|
+
attrs: { level: 4, id: "heading-h4" },
|
|
8318
|
+
content: [{ type: "text", text: "\uB124\uBC88\uC9F8 \uC218\uC900" }]
|
|
8319
|
+
},
|
|
8320
|
+
{
|
|
8321
|
+
type: "heading",
|
|
8322
|
+
attrs: { level: 5, id: "heading-h5" },
|
|
8323
|
+
content: [{ type: "text", text: "\uB2E4\uC12F\uBC88\uC9F8 \uC218\uC900" }]
|
|
8324
|
+
},
|
|
8325
|
+
{
|
|
8326
|
+
type: "heading",
|
|
8327
|
+
attrs: { level: 6, id: "heading-h6" },
|
|
8328
|
+
content: [{ type: "text", text: "\uC5EC\uC12F\uBC88\uC9F8 \uC218\uC900" }]
|
|
8329
|
+
},
|
|
8330
|
+
{
|
|
8331
|
+
type: "heading",
|
|
8332
|
+
attrs: { level: 1, id: "text-formatting" },
|
|
8333
|
+
content: [{ type: "text", text: "\uBCF8\uBB38 \uC11C\uC2DD" }]
|
|
8334
|
+
},
|
|
8335
|
+
{
|
|
8336
|
+
type: "paragraph",
|
|
8337
|
+
content: [
|
|
8338
|
+
{ type: "text", text: "\uAC19\uC740 \uBB38\uC7A5\uC5D0\uC11C " },
|
|
8339
|
+
{ type: "text", text: "\uAD75\uAC8C", marks: [{ type: "bold" }] },
|
|
8340
|
+
{ type: "text", text: ", " },
|
|
8341
|
+
{ type: "text", text: "\uAE30\uC6B8\uC784", marks: [{ type: "italic" }] },
|
|
8342
|
+
{ type: "text", text: ", " },
|
|
8343
|
+
{ type: "text", text: "\uBC11\uC904", marks: [{ type: "underline" }] },
|
|
8344
|
+
{ type: "text", text: ", " },
|
|
8345
|
+
{ type: "text", text: "\uCDE8\uC18C\uC120", marks: [{ type: "strike" }] },
|
|
8346
|
+
{ type: "text", text: ", " },
|
|
8347
|
+
{ type: "text", text: "\uCF54\uB4DC", marks: [{ type: "code" }] },
|
|
8348
|
+
{ type: "text", text: ", " },
|
|
8349
|
+
{ type: "text", text: "\uAC15\uC870", marks: [{ type: "highlight", attrs: { color: "#fef08a" } }] },
|
|
8350
|
+
{ type: "text", text: ", \uC544\uB798 \uCCA8\uC790 H" },
|
|
8351
|
+
{ type: "text", text: "2", marks: [{ type: "subscript" }] },
|
|
8352
|
+
{ type: "text", text: "O, \uC704 \uCCA8\uC790 x" },
|
|
8353
|
+
{ type: "text", text: "2", marks: [{ type: "superscript" }] },
|
|
8354
|
+
{ type: "text", text: "\uB97C \uD568\uAED8 \uC501\uB2C8\uB2E4." }
|
|
8355
|
+
]
|
|
8356
|
+
},
|
|
8357
|
+
{
|
|
8358
|
+
type: "paragraph",
|
|
8359
|
+
content: [
|
|
8360
|
+
{ type: "text", text: "\uC904 \uBC14\uAFC8\uC740 \uBB38\uB2E8\uC744 \uB098\uB204\uAC70\uB098, \uAC19\uC740 \uBB38\uB2E8 \uC548\uC5D0\uC11C" },
|
|
8361
|
+
{ type: "hardBreak" },
|
|
8362
|
+
{ type: "text", text: "\uAC15\uC81C \uC904\uBC14\uAFC8\uC744 \uB123\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uC808\uB85C \uC774\uB3D9\uD558\uB824\uBA74 " },
|
|
8363
|
+
{
|
|
8364
|
+
type: "text",
|
|
8365
|
+
text: "9. \uAD50\uCC28 \uCC38\uC870",
|
|
8366
|
+
marks: [{ type: "link", attrs: { href: "#cross-references" } }]
|
|
8367
|
+
},
|
|
8368
|
+
{ type: "text", text: "\uB97C \uC0AC\uC6A9\uD558\uC138\uC694." }
|
|
8369
|
+
]
|
|
8370
|
+
},
|
|
8371
|
+
{
|
|
8372
|
+
type: "heading",
|
|
8373
|
+
attrs: { level: 1, id: "lists" },
|
|
8374
|
+
content: [{ type: "text", text: "\uBAA9\uB85D" }]
|
|
8375
|
+
},
|
|
8376
|
+
{
|
|
8377
|
+
type: "paragraph",
|
|
8378
|
+
content: [{ type: "text", text: "\uAE00\uBA38\uB9AC \uAE30\uD638, \uBC88\uD638, \uD560 \uC77C \uBAA9\uB85D\uC744 \uBCF8\uBB38\uC5D0 \uBC14\uB85C \uB123\uC2B5\uB2C8\uB2E4." }]
|
|
8379
|
+
},
|
|
8380
|
+
{
|
|
8381
|
+
type: "bulletList",
|
|
8382
|
+
content: [
|
|
8383
|
+
{
|
|
8384
|
+
type: "listItem",
|
|
8385
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uAD6C\uC870\uC640 \uBC88\uD638\uB97C \uC720\uC9C0\uD55C \uCC44 \uD3B8\uC9D1" }] }]
|
|
8386
|
+
},
|
|
8387
|
+
{
|
|
8388
|
+
type: "listItem",
|
|
8389
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uD45C\xB7\uC218\uC2DD\xB7\uB2E4\uC774\uC5B4\uADF8\uB7A8\uC744 \uAC19\uC740 \uBB38\uC11C\uC5D0 \uBC30\uCE58" }] }]
|
|
8390
|
+
}
|
|
8391
|
+
]
|
|
8392
|
+
},
|
|
8393
|
+
{
|
|
8394
|
+
type: "orderedList",
|
|
8395
|
+
content: [
|
|
8396
|
+
{
|
|
8397
|
+
type: "listItem",
|
|
8398
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uC0C8 \uBB38\uC11C\uB85C \uC774 \uD15C\uD50C\uB9BF\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4." }] }]
|
|
8399
|
+
},
|
|
8400
|
+
{
|
|
8401
|
+
type: "listItem",
|
|
8402
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uC81C\uBAA9\uC744 \uBC14\uAFBC \uB4A4 \uD55C \uC808\uC744 \uC218\uC815\uD569\uB2C8\uB2E4." }] }]
|
|
8403
|
+
},
|
|
8404
|
+
{
|
|
8405
|
+
type: "listItem",
|
|
8406
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "HTML \uB610\uB294 Markdown\uC73C\uB85C \uB0B4\uBCF4\uB0C5\uB2C8\uB2E4." }] }]
|
|
8407
|
+
}
|
|
8408
|
+
]
|
|
8409
|
+
},
|
|
8410
|
+
{
|
|
8411
|
+
type: "taskList",
|
|
8412
|
+
content: [
|
|
8413
|
+
{
|
|
8414
|
+
type: "taskItem",
|
|
8415
|
+
attrs: { checked: true },
|
|
8416
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uB458\uB7EC\uBCF4\uAE30 \uBB38\uC11C\uB97C \uC5F4\uC5C8\uC2B5\uB2C8\uB2E4." }] }]
|
|
8417
|
+
},
|
|
8418
|
+
{
|
|
8419
|
+
type: "taskItem",
|
|
8420
|
+
attrs: { checked: false },
|
|
8421
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uBB38\uC11C \uC81C\uBAA9\uC744 \uBC14\uAFD4 \uC800\uC7A5\uD569\uB2C8\uB2E4." }] }]
|
|
8422
|
+
},
|
|
8423
|
+
{
|
|
8424
|
+
type: "taskItem",
|
|
8425
|
+
attrs: { checked: false },
|
|
8426
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uC9C0\uC6D0\uB418\uB294 \uD615\uC2DD\uC73C\uB85C \uB0B4\uBCF4\uB0C5\uB2C8\uB2E4." }] }]
|
|
8427
|
+
}
|
|
8428
|
+
]
|
|
8429
|
+
},
|
|
8430
|
+
{
|
|
8431
|
+
type: "heading",
|
|
8432
|
+
attrs: { level: 1, id: "tables-and-captions" },
|
|
8433
|
+
content: [{ type: "text", text: "\uD45C\uC640 \uCEA1\uC158" }]
|
|
8434
|
+
},
|
|
8435
|
+
{
|
|
8436
|
+
type: "paragraph",
|
|
8437
|
+
content: [
|
|
8438
|
+
{ type: "text", text: "\uD45C\uB294 \uCEA1\uC158, \uBCD1\uD569 \uC140, \uAD50\uCC28 \uCC38\uC870\uC6A9 ID\uB97C \uAC00\uC9D1\uB2C8\uB2E4. \uC544\uB798 \uD45C\uB294 " },
|
|
8439
|
+
{
|
|
8440
|
+
type: "text",
|
|
8441
|
+
text: "\uD45C 4.1 \uD3B8\uC9D1\uAE30\uC640 CLI\uAC00 \uAC19\uC740 \uBB38\uC11C \uC6D0\uBCF8\uC744 \uB2E4\uB8E8\uB294 \uBC29\uC2DD",
|
|
8442
|
+
marks: [{ type: "link", attrs: { href: "#feature-matrix" } }]
|
|
8443
|
+
},
|
|
8444
|
+
{ type: "text", text: "\uB85C \uB2E4\uC2DC \uAC00\uB9AC\uD0AC \uC218 \uC788\uC2B5\uB2C8\uB2E4." }
|
|
8445
|
+
]
|
|
8446
|
+
},
|
|
8447
|
+
{
|
|
8448
|
+
type: "table",
|
|
8449
|
+
attrs: {
|
|
8450
|
+
id: "feature-matrix",
|
|
8451
|
+
caption: "\uD3B8\uC9D1\uAE30\uC640 CLI\uAC00 \uAC19\uC740 \uBB38\uC11C \uC6D0\uBCF8\uC744 \uB2E4\uB8E8\uB294 \uBC29\uC2DD",
|
|
8452
|
+
align: "center",
|
|
8453
|
+
width: "100%"
|
|
8454
|
+
},
|
|
8455
|
+
content: [
|
|
8456
|
+
{
|
|
8457
|
+
type: "tableRow",
|
|
8458
|
+
content: [
|
|
8459
|
+
{ type: "tableHeader", content: [{ type: "paragraph", content: [{ type: "text", text: "\uAE30\uB2A5" }] }] },
|
|
8460
|
+
{ type: "tableHeader", content: [{ type: "paragraph", content: [{ type: "text", text: "VS Code" }] }] },
|
|
8461
|
+
{ type: "tableHeader", content: [{ type: "paragraph", content: [{ type: "text", text: "CLI" }] }] }
|
|
8462
|
+
]
|
|
8463
|
+
},
|
|
8464
|
+
{
|
|
8465
|
+
type: "tableRow",
|
|
8466
|
+
content: [
|
|
8467
|
+
{
|
|
8468
|
+
type: "tableCell",
|
|
8469
|
+
attrs: { rowspan: 2 },
|
|
8470
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uD45C" }] }]
|
|
8471
|
+
},
|
|
8472
|
+
{ type: "tableCell", content: [{ type: "paragraph", content: [{ type: "text", text: "\uBCD1\uD569 \uC140 \uD3B8\uC9D1" }] }] },
|
|
8473
|
+
{ type: "tableCell", content: [{ type: "paragraph", content: [{ type: "text", text: "\uAD6C\uC870 \uC720\uC9C0" }] }] }
|
|
8474
|
+
]
|
|
8475
|
+
},
|
|
8476
|
+
{
|
|
8477
|
+
type: "tableRow",
|
|
8478
|
+
content: [
|
|
8479
|
+
{ type: "tableCell", content: [{ type: "paragraph", content: [{ type: "text", text: "\uCEA1\uC158\xB7\uBC88\uD638" }] }] },
|
|
8480
|
+
{ type: "tableCell", content: [{ type: "paragraph", content: [{ type: "text", text: "inspect" }] }] }
|
|
8481
|
+
]
|
|
8482
|
+
},
|
|
8483
|
+
{
|
|
8484
|
+
type: "tableRow",
|
|
8485
|
+
content: [
|
|
8486
|
+
{ type: "tableCell", content: [{ type: "paragraph", content: [{ type: "text", text: "\uAC01\uC8FC" }] }] },
|
|
8487
|
+
{ type: "tableCell", content: [{ type: "paragraph", content: [{ type: "text", text: "\uBB38\uC11C \uB05D \uBAA9\uB85D" }] }] },
|
|
8488
|
+
{ type: "tableCell", content: [{ type: "paragraph", content: [{ type: "text", text: "endnotes \uCE74\uD0C8\uB85C\uADF8" }] }] }
|
|
8489
|
+
]
|
|
8490
|
+
},
|
|
8491
|
+
{
|
|
8492
|
+
type: "tableRow",
|
|
8493
|
+
content: [
|
|
8494
|
+
{
|
|
8495
|
+
type: "tableCell",
|
|
8496
|
+
attrs: { colspan: 3 },
|
|
8497
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uCEA1\uC158\uACFC \uBC88\uD638\uB294 \uC774 \uBB38\uC11C\uC758 \uC124\uC815(korean, \uACC4\uCE35 \uBC88\uD638)\uC744 \uB530\uB985\uB2C8\uB2E4." }] }]
|
|
8498
|
+
}
|
|
8499
|
+
]
|
|
8500
|
+
}
|
|
8501
|
+
]
|
|
8502
|
+
},
|
|
8503
|
+
{
|
|
8504
|
+
type: "heading",
|
|
8505
|
+
attrs: { level: 1, id: "math" },
|
|
8506
|
+
content: [{ type: "text", text: "\uC218\uC2DD" }]
|
|
8507
|
+
},
|
|
8508
|
+
{
|
|
8509
|
+
type: "paragraph",
|
|
8510
|
+
content: [
|
|
8511
|
+
{ type: "text", text: "\uBB38\uC7A5 \uC548\uC758 \uC778\uB77C\uC778 \uC218\uC2DD\uC740 " },
|
|
8512
|
+
{ type: "mathInline", attrs: { latex: "a^2 + b^2 = c^2" } },
|
|
8513
|
+
{ type: "text", text: "\uCC98\uB7FC \uC4F0\uACE0, \uC544\uB798 \uBE14\uB85D \uC218\uC2DD\uC740 \uBC88\uD638\uB97C \uBD99\uC5EC " },
|
|
8514
|
+
{
|
|
8515
|
+
type: "text",
|
|
8516
|
+
text: "\uC2DD (5.1)",
|
|
8517
|
+
marks: [{ type: "link", attrs: { href: "#energy-equation" } }]
|
|
8518
|
+
},
|
|
8519
|
+
{ type: "text", text: "\uB85C \uAC00\uB9AC\uD0B5\uB2C8\uB2E4." }
|
|
8520
|
+
]
|
|
8521
|
+
},
|
|
8522
|
+
{
|
|
8523
|
+
type: "mathBlock",
|
|
8524
|
+
attrs: {
|
|
8525
|
+
latex: "E = mc^{2}",
|
|
8526
|
+
id: "energy-equation"
|
|
8527
|
+
}
|
|
8528
|
+
},
|
|
8529
|
+
{
|
|
8530
|
+
type: "heading",
|
|
8531
|
+
attrs: { level: 1, id: "code" },
|
|
8532
|
+
content: [{ type: "text", text: "\uCF54\uB4DC" }]
|
|
8533
|
+
},
|
|
8534
|
+
{
|
|
8535
|
+
type: "paragraph",
|
|
8536
|
+
content: [{ type: "text", text: "\uCF54\uB4DC \uBE14\uB85D\uC740 \uC5B8\uC5B4 \uD45C\uC2DC\uC640 \uD568\uAED8 \uC800\uC7A5\uB429\uB2C8\uB2E4. CLI\uC5D0\uC11C\uB3C4 \uAC19\uC740 \uD15C\uD50C\uB9BF\uC73C\uB85C \uBB38\uC11C\uB97C \uB9CC\uB4E4 \uC218 \uC788\uC2B5\uB2C8\uB2E4." }]
|
|
8537
|
+
},
|
|
8538
|
+
{
|
|
8539
|
+
type: "codeBlock",
|
|
8540
|
+
attrs: { language: "powershell" },
|
|
8541
|
+
content: [
|
|
8542
|
+
{
|
|
8543
|
+
type: "text",
|
|
8544
|
+
text: 'sdoc create demo.sdoc --template builtin:feature-showcase --title "\uAE30\uB2A5 \uB458\uB7EC\uBCF4\uAE30"\nsdoc validate demo.sdoc --json'
|
|
8545
|
+
}
|
|
8546
|
+
]
|
|
8547
|
+
},
|
|
8548
|
+
{
|
|
8549
|
+
type: "heading",
|
|
8550
|
+
attrs: { level: 1, id: "diagrams" },
|
|
8551
|
+
content: [{ type: "text", text: "\uB2E4\uC774\uC5B4\uADF8\uB7A8" }]
|
|
8552
|
+
},
|
|
8553
|
+
{
|
|
8554
|
+
type: "paragraph",
|
|
8555
|
+
content: [{ type: "text", text: "Mermaid\uB294 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uB85C\uCEEC\uB85C \uADF8\uB9BD\uB2C8\uB2E4. \uBB38\uC11C\uB97C \uC5F0 \uAC83\uB9CC\uC73C\uB85C \uC678\uBD80 \uB124\uD2B8\uC6CC\uD06C\uC5D0 \uB2E4\uC774\uC5B4\uADF8\uB7A8 \uC6D0\uBCF8\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." }]
|
|
8556
|
+
},
|
|
8557
|
+
{
|
|
8558
|
+
type: "diagram",
|
|
8559
|
+
attrs: {
|
|
8560
|
+
language: "mermaid",
|
|
8561
|
+
code: "flowchart LR\n write[\uC791\uC131] --> review[\uAC80\uD1A0]\n review --> publish[\uCD9C\uD310]"
|
|
8562
|
+
}
|
|
8563
|
+
},
|
|
8564
|
+
{
|
|
8565
|
+
type: "heading",
|
|
8566
|
+
attrs: { level: 1, id: "quotes-and-callouts" },
|
|
8567
|
+
content: [{ type: "text", text: "\uC778\uC6A9\uACFC \uAC15\uC870 \uC0C1\uC790" }]
|
|
8568
|
+
},
|
|
8569
|
+
{
|
|
8570
|
+
type: "blockquote",
|
|
8571
|
+
content: [
|
|
8572
|
+
{
|
|
8573
|
+
type: "paragraph",
|
|
8574
|
+
content: [{ type: "text", text: "\uC6D0\uBCF8\uC740 Git\uC73C\uB85C \uAC80\uD1A0 \uAC00\uB2A5\uD55C \uAD6C\uC870\uD654 JSON\uC73C\uB85C \uB0A8\uC2B5\uB2C8\uB2E4." }]
|
|
8575
|
+
}
|
|
8576
|
+
]
|
|
8577
|
+
},
|
|
8578
|
+
{
|
|
8579
|
+
type: "callout",
|
|
8580
|
+
attrs: { variant: "warning" },
|
|
8581
|
+
content: [
|
|
8582
|
+
{
|
|
8583
|
+
type: "paragraph",
|
|
8584
|
+
content: [{ type: "text", text: "\uD15C\uD50C\uB9BF\uC73C\uB85C \uD604\uC7AC \uBB38\uC11C\uB97C \uBC14\uAFB8\uBA74 \uBCF8\uBB38\uACFC \uBB38\uC11C \uC124\uC815\uC774 \uAD50\uCCB4\uB429\uB2C8\uB2E4. \uB458\uB7EC\uBCF4\uAE30\uB294 \uC0C8 \uD30C\uC77C\uB85C \uB9CC\uB4DC\uC138\uC694." }]
|
|
8585
|
+
}
|
|
8586
|
+
]
|
|
8587
|
+
},
|
|
8588
|
+
{
|
|
8589
|
+
type: "callout",
|
|
8590
|
+
attrs: { variant: "tip" },
|
|
8591
|
+
content: [
|
|
8592
|
+
{
|
|
8593
|
+
type: "paragraph",
|
|
8594
|
+
content: [{ type: "text", text: "Navigate\uC5D0\uC11C \uC81C\uBAA9\xB7\uD45C\xB7\uC218\uC2DD\uC73C\uB85C \uC774\uB3D9\uD558\uACE0, \uAC01\uC8FC \uBC88\uD638\uB294 \uD45C\uC2DD\uACFC \uBB38\uC11C \uB05D \uBAA9\uB85D\uC744 \uC624\uAC11\uB2C8\uB2E4." }]
|
|
8595
|
+
}
|
|
8596
|
+
]
|
|
8597
|
+
},
|
|
8598
|
+
{
|
|
8599
|
+
type: "heading",
|
|
8600
|
+
attrs: { level: 1, id: "cross-references" },
|
|
8601
|
+
content: [{ type: "text", text: "\uAD50\uCC28 \uCC38\uC870" }]
|
|
8602
|
+
},
|
|
8603
|
+
{
|
|
8604
|
+
type: "paragraph",
|
|
8605
|
+
content: [
|
|
8606
|
+
{ type: "text", text: "\uAD50\uCC28 \uCC38\uC870\uB294 \uB300\uC0C1\uC758 \uC548\uC815 ID\uB97C \uAC00\uB9AC\uD0B5\uB2C8\uB2E4. " },
|
|
8607
|
+
{
|
|
8608
|
+
type: "text",
|
|
8609
|
+
text: "1. \uC81C\uBAA9\uACFC \uBC88\uD638",
|
|
8610
|
+
marks: [{ type: "link", attrs: { href: "#headings-and-numbers" } }]
|
|
8611
|
+
},
|
|
8612
|
+
{ type: "text", text: ", " },
|
|
8613
|
+
{
|
|
8614
|
+
type: "text",
|
|
8615
|
+
text: "\uD45C 4.1 \uD3B8\uC9D1\uAE30\uC640 CLI\uAC00 \uAC19\uC740 \uBB38\uC11C \uC6D0\uBCF8\uC744 \uB2E4\uB8E8\uB294 \uBC29\uC2DD",
|
|
8616
|
+
marks: [{ type: "link", attrs: { href: "#feature-matrix" } }]
|
|
8617
|
+
},
|
|
8618
|
+
{ type: "text", text: ", " },
|
|
8619
|
+
{
|
|
8620
|
+
type: "text",
|
|
8621
|
+
text: "\uC2DD (5.1)",
|
|
8622
|
+
marks: [{ type: "link", attrs: { href: "#energy-equation" } }]
|
|
8623
|
+
},
|
|
8624
|
+
{ type: "text", text: "\uC740 \uBC88\uD638\uAC00 \uBC14\uB00C\uC5B4\uB3C4 \uAC19\uC740 \uB300\uC0C1\uC744 \uC720\uC9C0\uD569\uB2C8\uB2E4." }
|
|
8625
|
+
]
|
|
8626
|
+
},
|
|
8627
|
+
{
|
|
8628
|
+
type: "heading",
|
|
8629
|
+
attrs: { level: 1, id: "footnotes" },
|
|
8630
|
+
content: [{ type: "text", text: "\uAC01\uC8FC" }]
|
|
8631
|
+
},
|
|
8632
|
+
{
|
|
8633
|
+
type: "paragraph",
|
|
8634
|
+
content: [
|
|
8635
|
+
{ type: "text", text: "\uAC01\uC8FC \uD45C\uC2DD\uC744 \uB204\uB974\uBA74 \uBB38\uC11C \uB05D \uBAA9\uB85D\uC73C\uB85C \uC774\uB3D9\uD558\uACE0, \uBAA9\uB85D\uC758 \uBC88\uD638\uB294 \uB2E4\uC2DC \uD45C\uC2DD\uC73C\uB85C \uB3CC\uC544\uAC11\uB2C8\uB2E4." },
|
|
8636
|
+
{
|
|
8637
|
+
type: "endnote",
|
|
8638
|
+
attrs: {
|
|
8639
|
+
id: "endnote-slides-limit",
|
|
8640
|
+
body: "Slides \uB0B4\uBCF4\uB0B4\uAE30\uB294 \uAC01\uC8FC \uBC30\uCE58 \uC815\uCC45\uC774 \uC815\uD574\uC9C8 \uB54C\uAE4C\uC9C0 \uC2E4\uD328\uD569\uB2C8\uB2E4. HTML, PDF, Markdown, AsciiDoc\uC740 \uAC01\uC8FC\uB97C \uC9C0\uC6D0\uD569\uB2C8\uB2E4."
|
|
8641
|
+
}
|
|
8642
|
+
},
|
|
8643
|
+
{ type: "text", text: " " },
|
|
8644
|
+
{
|
|
8645
|
+
type: "endnote",
|
|
8646
|
+
attrs: {
|
|
8647
|
+
id: "endnote-book-limit",
|
|
8648
|
+
body: ".sdocbook \uD569\uC131\uC740 \uAC01\uC8FC\uAC00 \uC788\uC73C\uBA74 ENDNOTES_UNSUPPORTED \uC9C4\uB2E8\uC744 \uB0B4\uACE0 \uC870\uC6A9\uD788 \uBC84\uB9AC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."
|
|
8649
|
+
}
|
|
8650
|
+
}
|
|
8651
|
+
]
|
|
8652
|
+
},
|
|
8653
|
+
{
|
|
8654
|
+
type: "heading",
|
|
8655
|
+
attrs: { level: 1, id: "not-included", numbered: false },
|
|
8656
|
+
content: [{ type: "text", text: "\uC774 \uBB38\uC11C\uC5D0 \uC5C6\uB294 \uAC83" }]
|
|
8657
|
+
},
|
|
8658
|
+
{
|
|
8659
|
+
type: "paragraph",
|
|
8660
|
+
content: [{ type: "text", text: "\uC544\uB798\uB294 \uD604\uC7AC \uC81C\uD488\uC5D0 \uC788\uC9C0\uB9CC, \uC774 \uB458\uB7EC\uBCF4\uAE30\uC5D0\uB294 \uACE0\uC758\uB85C \uB123\uC9C0 \uC54A\uC740 \uAE30\uB2A5\uC785\uB2C8\uB2E4." }]
|
|
8661
|
+
},
|
|
8662
|
+
{
|
|
8663
|
+
type: "bulletList",
|
|
8664
|
+
content: [
|
|
8665
|
+
{
|
|
8666
|
+
type: "listItem",
|
|
8667
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uC774\uBBF8\uC9C0\uC640 Draw.io \uC608\uC81C \u2014 \uD15C\uD50C\uB9BF \uC790\uC0B0 \uBCF5\uC0AC \uACC4\uC57D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4 (#26)." }] }]
|
|
8668
|
+
},
|
|
8669
|
+
{
|
|
8670
|
+
type: "listItem",
|
|
8671
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "PlantUML, D2, Graphviz \u2014 \uC678\uBD80 \uB80C\uB354\uB7EC \uB3D9\uC758 \uC5C6\uC774 \uB124\uD2B8\uC6CC\uD06C \uC804\uC1A1\uC774 \uC77C\uC5B4\uB098\uBA74 \uC548 \uB429\uB2C8\uB2E4." }] }]
|
|
8672
|
+
},
|
|
8673
|
+
{
|
|
8674
|
+
type: "listItem",
|
|
8675
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: "\uC6D0\uACA9\xB7\uC870\uC9C1 \uD15C\uD50C\uB9BF \uCE74\uD0C8\uB85C\uADF8 \u2014 \uD6C4\uC18D \uC791\uC5C5\uC785\uB2C8\uB2E4 (#27)." }] }]
|
|
8676
|
+
}
|
|
8677
|
+
]
|
|
8678
|
+
}
|
|
8679
|
+
]
|
|
8680
|
+
}
|
|
8681
|
+
};
|
|
8682
|
+
|
|
8221
8683
|
// ../shared/template/builtins/technical-report.sdoc.json
|
|
8222
8684
|
var technical_report_sdoc_default = {
|
|
8223
8685
|
sdoc: "1.0",
|
|
@@ -8337,6 +8799,11 @@ var createBuiltIn = (definition) => {
|
|
|
8337
8799
|
};
|
|
8338
8800
|
var BUILTIN_TEMPLATES = Object.freeze([
|
|
8339
8801
|
createBuiltIn({ id: "builtin:blank", sourceLabel: "Structured Doc Editor", value: blank_sdoc_default }),
|
|
8802
|
+
createBuiltIn({
|
|
8803
|
+
id: "builtin:feature-showcase",
|
|
8804
|
+
sourceLabel: "Structured Doc Editor",
|
|
8805
|
+
value: feature_showcase_sdoc_default
|
|
8806
|
+
}),
|
|
8340
8807
|
createBuiltIn({
|
|
8341
8808
|
id: "builtin:technical-report",
|
|
8342
8809
|
sourceLabel: "Structured Doc Editor",
|
|
@@ -8592,6 +9059,33 @@ function instantiateTemplate(template, options) {
|
|
|
8592
9059
|
return result;
|
|
8593
9060
|
}
|
|
8594
9061
|
|
|
9062
|
+
// ../shared/converter/htmlSafety.ts
|
|
9063
|
+
var escapeStyleElementText = (value) => value.replace(/<\/style/gi, "<\\/style");
|
|
9064
|
+
|
|
9065
|
+
// ../shared/converter/jsonToHtml.ts
|
|
9066
|
+
var AUTO_RENDER_CALL = `renderMathInElement(document.body, { delimiters: [
|
|
9067
|
+
{left: '\\\\[', right: '\\\\]', display: true},
|
|
9068
|
+
{left: '\\\\(', right: '\\\\)', display: false}
|
|
9069
|
+
]});`;
|
|
9070
|
+
var AUTO_RENDER_WHEN_READY = `if (document.readyState === 'loading') {
|
|
9071
|
+
document.addEventListener('DOMContentLoaded', () => { ${AUTO_RENDER_CALL} }, { once: true });
|
|
9072
|
+
} else {
|
|
9073
|
+
${AUTO_RENDER_CALL}
|
|
9074
|
+
}`;
|
|
9075
|
+
|
|
9076
|
+
// ../shared/template/preview.ts
|
|
9077
|
+
var TEMPLATE_HTML_PREVIEW_STYLES = escapeStyleElementText(`
|
|
9078
|
+
body { margin: 12px; font: 15px/1.5 system-ui, sans-serif; color: #222; background: #fff; }
|
|
9079
|
+
h1, h2, h3, h4, h5, h6 { margin: 0.9em 0 0.35em; line-height: 1.25; }
|
|
9080
|
+
p { margin: 0.5em 0; }
|
|
9081
|
+
table { border-collapse: collapse; width: 100%; margin: 0.75em 0; }
|
|
9082
|
+
th, td { border: 1px solid #ccc; padding: 4px 6px; text-align: left; }
|
|
9083
|
+
blockquote { margin: 0.75em 0; padding: 0.4em 0.8em; border-left: 4px solid #888; }
|
|
9084
|
+
.callout { margin: 0.75em 0; padding: 0.6em 0.8em; border-left: 4px solid #64748b; background: #f8fafc; }
|
|
9085
|
+
pre, code { font-family: ui-monospace, monospace; }
|
|
9086
|
+
pre { overflow: auto; padding: 8px; background: #f4f4f4; }
|
|
9087
|
+
`);
|
|
9088
|
+
|
|
8595
9089
|
// src/io.ts
|
|
8596
9090
|
import { randomBytes } from "node:crypto";
|
|
8597
9091
|
import { link, open, readFile, realpath, rename, rm, stat } from "node:fs/promises";
|
|
@@ -9153,6 +9647,7 @@ var COMMAND_HELP = {
|
|
|
9153
9647
|
],
|
|
9154
9648
|
examples: [
|
|
9155
9649
|
'sdoc create report.sdoc --title "Quarterly Report"',
|
|
9650
|
+
"sdoc create tour.sdoc --template builtin:feature-showcase --dry-run",
|
|
9156
9651
|
"sdoc create report.sdoc --template builtin:technical-report --dry-run"
|
|
9157
9652
|
]
|
|
9158
9653
|
}
|
|
@@ -9479,7 +9974,7 @@ async function createDocumentPlan(documentPath, options = {}) {
|
|
|
9479
9974
|
}
|
|
9480
9975
|
|
|
9481
9976
|
// src/main.ts
|
|
9482
|
-
var VERSION = true ? "0.
|
|
9977
|
+
var VERSION = true ? "0.13.0" : packageMetadata.version;
|
|
9483
9978
|
var DEFAULT_DEPENDENCIES = {
|
|
9484
9979
|
replaceDocument: atomicReplace,
|
|
9485
9980
|
createDocument: atomicCreate
|