@sushichan044/kg-core 0.10.0 → 0.10.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 +18 -0
- package/dist/describe-cause-SABI_1ex.mjs +9 -0
- package/dist/index.d.mts +367 -367
- package/dist/index.mjs +3 -3
- package/dist/lint.mjs +2 -2
- package/dist/{novel-composer-C0EqiM0f.mjs → novel-composer-CHNWyvn8.mjs} +108 -38
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.mjs +2 -2
- package/dist/{presentation-kind-DCgXI574.d.mts → presentation-kind-BwIZFSZS.d.mts} +102 -102
- package/dist/{question-or-exclamation-spacing-Bv-mF2ZE.mjs → question-or-exclamation-spacing-C5cFLeKr.mjs} +14 -1
- package/package.json +1 -1
- package/dist/describe-cause-BV8mZ3Um.mjs +0 -18
package/README.md
CHANGED
|
@@ -150,6 +150,24 @@ tate-chu-yoko unit. Each render unit carries its selected `presentation` as a
|
|
|
150
150
|
string. A `CombinedGlyphUnit` renders the two digits together; the composer owns
|
|
151
151
|
that decision, so renderers do not compare source group ranges.
|
|
152
152
|
|
|
153
|
+
ASCII sentences are recognized before individual words are classified. A continuous
|
|
154
|
+
stretch of ASCII letters, digits, punctuation, and spaces containing a letter and
|
|
155
|
+
multiple alphanumeric groups separated by spaces or punctuation renders sideways.
|
|
156
|
+
Japanese characters, fullwidth spaces, and newlines end that context. Thus `I love you`,
|
|
157
|
+
`This is a Web novel`, `I'm happy!`, and `STR 10` keep their initials, abbreviations,
|
|
158
|
+
numbers, and punctuation sideways. Standalone `I`, `BGM`, and `Web` retain their
|
|
159
|
+
upright presentation, and standalone `12` still forms a tate-chu-yoko unit.
|
|
160
|
+
Standalone dotted abbreviations whose parts match the upright abbreviation rule,
|
|
161
|
+
such as `U.S.` and `Ph.D.`, keep their letters upright and their periods in the
|
|
162
|
+
existing mixed presentation. In a sentence such as `I live in the U.S.`, the
|
|
163
|
+
abbreviation and its periods render sideways with the surrounding words.
|
|
164
|
+
|
|
165
|
+
Sentences can wrap between words. Words, including attached punctuation,
|
|
166
|
+
apostrophes, and hyphens, stay together; ASCII spaces retain
|
|
167
|
+
their source positions and supply line-break opportunities. Ruby and inline styling
|
|
168
|
+
do not interrupt sentence recognition. Non-ASCII Western text keeps the existing
|
|
169
|
+
presentation rules.
|
|
170
|
+
|
|
153
171
|
An upright Western character sets solid against the kana or kanji beside it rather than
|
|
154
172
|
taking the quarter em 3.2.6 puts around a sideways run, following JLReq 3.2.4: it classes
|
|
155
173
|
with kanji, the same way 3.2.5 classes a tate-chu-yoko run. `QR` and `URL` set upright by
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/internal/describe-cause.ts
|
|
2
|
+
/**
|
|
3
|
+
* Renders an unknown throwable for display, without assuming it is an Error.
|
|
4
|
+
*/
|
|
5
|
+
function describeCause(cause) {
|
|
6
|
+
return cause instanceof Error ? cause.message : String(cause);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { describeCause as t };
|