narraleaf-react 0.28.0 → 0.29.1
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/dist/game/player/lib/verticalText.d.ts +25 -7
- package/dist/main.js +20 -20
- package/package.json +115 -115
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* top to bottom, and the next column starts to the left. Two things in that layout are not free,
|
|
6
6
|
* and both are about text that is not Japanese:
|
|
7
7
|
*
|
|
8
|
-
* - A Latin word must stay whole. `word-break: break-all
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* - A Latin word must stay whole. `word-break: break-all` would split "Prologue" across two
|
|
9
|
+
* columns, one glyph at a time, sideways. Neither writing mode needs it: `normal` already breaks
|
|
10
|
+
* between CJK characters, which is the only place either one has to break.
|
|
11
11
|
* - A short run - a two-digit number, an initialism - reads better set upright across the column
|
|
12
12
|
* than laid on its side. That is tate-chu-yoko (縦中横), and CSS spells it
|
|
13
13
|
* `text-combine-upright: all` on a wrapper around exactly that run.
|
|
@@ -43,12 +43,30 @@ export type VerticalTextSegment = {
|
|
|
43
43
|
*/
|
|
44
44
|
export declare function segmentVerticalText(text: string, maxLength: number): VerticalTextSegment[];
|
|
45
45
|
/**
|
|
46
|
-
* How a word's own box breaks.
|
|
46
|
+
* How a word's own box breaks. The two writing modes want the same thing, which is why this takes
|
|
47
|
+
* no argument: a column of Japanese breaks by the same rules a line of it does.
|
|
47
48
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
49
|
+
* `word-break: normal` already breaks between CJK characters, which is the only thing `break-all`
|
|
50
|
+
* was ever here for, and it does not take a Latin word apart to do it. `break-all` means what it
|
|
51
|
+
* says: it cut "NarraLeaf" and "English" wherever the line ran out.
|
|
52
|
+
*
|
|
53
|
+
* `line-break: strict` asks for the rest of the kinsoku set. The prohibitions everyone knows - no
|
|
54
|
+
* line beginning with 、 。 」 ? !, none ending with 「 ( - are applied by the browser whatever
|
|
55
|
+
* `word-break` says, and were never the thing at fault. `strict` adds what a printed book is set
|
|
56
|
+
* to, holding back the small kana and the prolonged sound mark: over 301 container sizes, っ opened
|
|
57
|
+
* a line in 20 of them set horizontally and a column in 18 set vertically, and none at all under
|
|
58
|
+
* `strict`. It leaves the tate-chu-yoko runs below alone - a combined `12` measures the same
|
|
59
|
+
* either way.
|
|
60
|
+
*
|
|
61
|
+
* Worth knowing before deleting it: `strict` does nothing unless the document declares a language.
|
|
62
|
+
* Any `lang` will do - `en` is enough, and the shipped shell has one - but with no `lang` above the
|
|
63
|
+
* text the strict rules are not applied and this reads as dead weight.
|
|
64
|
+
*
|
|
65
|
+
* `overflow-wrap: break-word` is the last resort, for a run that fits nowhere - a URL, a long
|
|
66
|
+
* unspaced word in a narrow box - and it applies only after the line has been given its chance to
|
|
67
|
+
* break somewhere legal.
|
|
50
68
|
*/
|
|
51
|
-
export declare function wordBreakStyleFor(
|
|
69
|
+
export declare function wordBreakStyleFor(): React.CSSProperties;
|
|
52
70
|
/**
|
|
53
71
|
* Renders a word's text with its short runs set upright.
|
|
54
72
|
*
|