@sushichan044/kg-core 0.11.0 → 0.11.2
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 +27 -3
- package/dist/index.d.mts +307 -307
- package/dist/index.mjs +2 -2
- package/dist/lint.d.mts +5 -7
- package/dist/lint.mjs +29 -18
- package/dist/{novel-composer-z0cv8OHb.mjs → novel-composer-tcseYHc8.mjs} +59 -18
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.mjs +2 -2
- package/dist/{presentation-kind-BCQndPoK.d.mts → presentation-kind-DnJkvxHU.d.mts} +956 -942
- package/dist/{question-or-exclamation-spacing-C5cFLeKr.mjs → question-or-exclamation-spacing-D7TSDUG8.mjs} +38 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -271,13 +271,17 @@ Its line gap is 1.825mm, stage gap 10mm, top margin 12mm, bottom margin 16.55mm,
|
|
|
271
271
|
inner margin 21.825mm, and outer margin 13mm. `NovelCompositionSettings.defaults`
|
|
272
272
|
contains this format. Typeface and reserved lines remain configurable.
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
A6 is fixed at 12Q, 41 characters per line, 17 lines, and one stage. Its line
|
|
275
|
+
gap is 7H (1.75mm), giving a 19H (4.75mm) line pitch, with 12.5mm
|
|
276
|
+
top/bottom margins, a 16mm inner margin, and a 10mm outer margin.
|
|
277
|
+
|
|
278
|
+
`NovelCompositionSettings.forPaper(paperSize, settings)` selects the fixed A5 or A6
|
|
279
|
+
format or centres the current grid on another paper size. For other formats,
|
|
276
280
|
`ManuscriptPageSettings.centered(flow, appearance)` computes millimetre settings
|
|
277
281
|
with half-cell line gaps and two-cell stage gaps. These helpers calculate values;
|
|
278
282
|
validate the result before persisting or rendering an oversized grid.
|
|
279
283
|
|
|
280
|
-
Custom
|
|
284
|
+
Custom page settings on other paper sizes can provide explicit millimetre gaps and margins.
|
|
281
285
|
The settings schema checks that text dimensions plus margins equal the paper
|
|
282
286
|
size within 0.000001mm. Gaps and margins must be nonnegative, and the line gap
|
|
283
287
|
must accommodate the existing half-size annotation area. A mismatch returns
|
|
@@ -406,3 +410,23 @@ does not include polyfills.
|
|
|
406
410
|
## License
|
|
407
411
|
|
|
408
412
|
MIT
|
|
413
|
+
|
|
414
|
+
## Sentence-ending symbols
|
|
415
|
+
|
|
416
|
+
`♡`, `♪`, and `☆` follow the same line-breaking and separator-space rules as
|
|
417
|
+
Japanese question and exclamation marks. Each symbol remains a separate cell.
|
|
418
|
+
Set `additionalSentenceEndingMarks` on composition settings to add Unicode symbols:
|
|
419
|
+
|
|
420
|
+
```ts
|
|
421
|
+
const settings = {
|
|
422
|
+
...NovelCompositionSettings.defaults,
|
|
423
|
+
additionalSentenceEndingMarks: "★",
|
|
424
|
+
};
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
For proofreading, import `createSpaceAfterQuestionOrExclamationRule` from
|
|
428
|
+
`@sushichan044/kg-core/lint` and pass the same option. The factory returns a
|
|
429
|
+
`ManuscriptResult`. Replace the default rule with ID
|
|
430
|
+
`kg/space-after-question-or-exclamation` with the successful result's value.
|
|
431
|
+
An empty string adds nothing; built-in marks remain enabled. Each Unicode code
|
|
432
|
+
point is a separate symbol. Non-symbol characters are rejected.
|