@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 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 };