narraleaf-react 0.27.0 → 0.29.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.
|
@@ -6,15 +6,17 @@ import { TextTransition } from "../elements/transition/transitions/text/textTran
|
|
|
6
6
|
import { BlurDissolve } from "../elements/transition/transitions/image/blurDissolve";
|
|
7
7
|
import { Push } from "../elements/transition/transitions/image/push";
|
|
8
8
|
import { Darkness } from "../elements/transition/transitions/image/darkness";
|
|
9
|
+
import { Exposure } from "../elements/transition/transitions/image/exposure";
|
|
9
10
|
import { ThroughColor } from "../elements/transition/transitions/image/throughColor";
|
|
10
11
|
import { Reveal } from "../elements/transition/transitions/image/reveal";
|
|
11
12
|
import { Mask } from "../elements/transition/transitions/image/mask";
|
|
12
|
-
export { Transition, ImageTransition, TextTransition, Dissolve, FadeIn, BlurDissolve, Push, Darkness, ThroughColor, Reveal, Mask, };
|
|
13
|
+
export { Transition, ImageTransition, TextTransition, Dissolve, FadeIn, BlurDissolve, Push, Darkness, Exposure, ThroughColor, Reveal, Mask, };
|
|
13
14
|
export type { DissolveOptions } from "../elements/transition/transitions/image/dissolve";
|
|
14
15
|
export type { FadeInOptions } from "../elements/transition/transitions/image/fadeIn";
|
|
15
16
|
export type { BlurDissolveOptions } from "../elements/transition/transitions/image/blurDissolve";
|
|
16
17
|
export type { PushOptions } from "../elements/transition/transitions/image/push";
|
|
17
18
|
export type { DarknessOptions } from "../elements/transition/transitions/image/darkness";
|
|
19
|
+
export type { ExposureOptions } from "../elements/transition/transitions/image/exposure";
|
|
18
20
|
export type { ThroughColorOptions, ThroughColorUncover, } from "../elements/transition/transitions/image/throughColor";
|
|
19
21
|
export type { RevealOptions } from "../elements/transition/transitions/image/reveal";
|
|
20
22
|
export type { MaskPattern, WipePatternOptions, BarnDoorPatternOptions, IrisPatternOptions, ClockPatternOptions, FanPatternOptions, BlindsPatternOptions, DotsPatternOptions, } from "../elements/transition/transitions/image/mask";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { TransitionAnimationType, TransitionTask } from "../../../../elements/transition/type";
|
|
2
|
+
import { TransformDefinitions } from "../../../../elements/transform/type";
|
|
3
|
+
import { ImageTransition } from "../../../../elements/transition/transitions/image/imageTransition";
|
|
4
|
+
type AnimationType = [TransitionAnimationType.Number];
|
|
5
|
+
export type ExposureOptions = {
|
|
6
|
+
/** Duration in milliseconds. */
|
|
7
|
+
duration: number;
|
|
8
|
+
/**
|
|
9
|
+
* Peak exposure in stops, driving the frame to a gain of `2 ** ev`. Every channel
|
|
10
|
+
* clips at white on the way, so a channel already near white blows out almost at
|
|
11
|
+
* once while a dark one holds on nearly to the end — the difference between this
|
|
12
|
+
* and a white plate. @default 4.6
|
|
13
|
+
*/
|
|
14
|
+
ev?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Shadow lift (0–1) mixed in ahead of the gain, ramped in with it.
|
|
17
|
+
*
|
|
18
|
+
* Gain alone never whitens pure black, so without a lift a night frame ends the
|
|
19
|
+
* burn as a black silhouette on white. This is the flare a real lens adds; 0.03–0.06
|
|
20
|
+
* carries the shadows up without touching the frame at rest. @default 0.04
|
|
21
|
+
*/
|
|
22
|
+
lift?: number;
|
|
23
|
+
/** Fraction (0–1) of the duration spent fully blown out. @default 0 */
|
|
24
|
+
hold?: number;
|
|
25
|
+
easing?: TransformDefinitions.EasingDefinition;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* An exposure transition: the outgoing frame is driven up in stops until it burns out
|
|
29
|
+
* to white, the images swap inside that white window, and the incoming frame comes
|
|
30
|
+
* back down to a normal exposure.
|
|
31
|
+
*
|
|
32
|
+
* Unlike a white plate faded over the frame — which moves every colour toward white at
|
|
33
|
+
* one rate — the whitening here is per-channel clipping, so highlights go first,
|
|
34
|
+
* saturated colours pass through a hue shift as their leading channel clips, and the
|
|
35
|
+
* shadows are the last thing left. {@link ThroughColor} with a white colour is the
|
|
36
|
+
* plate version; this is the photographic one.
|
|
37
|
+
*
|
|
38
|
+
* Emitted as a plain CSS `filter` chain, so it drives an `<img>` and a detached scene
|
|
39
|
+
* root alike. `invert brightness invert` is a lift with no clipping of its own
|
|
40
|
+
* (`c → lift + (1 - lift)·c`); the trailing `brightness` is the gain that does clip.
|
|
41
|
+
*/
|
|
42
|
+
export declare class Exposure extends ImageTransition<AnimationType> {
|
|
43
|
+
private duration;
|
|
44
|
+
private ev;
|
|
45
|
+
private lift;
|
|
46
|
+
private hold;
|
|
47
|
+
private easing?;
|
|
48
|
+
constructor(options: ExposureOptions);
|
|
49
|
+
/**
|
|
50
|
+
* Style for a frame at a given burn amount (0 = untouched, 1 = fully blown out).
|
|
51
|
+
*
|
|
52
|
+
* The lift is scaled by the burn rather than applied flat, so a resting frame is
|
|
53
|
+
* bit-for-bit the source image and writes no filter at all — a filter left on a
|
|
54
|
+
* settled scene root would give it a compositing layer for nothing.
|
|
55
|
+
*/
|
|
56
|
+
private burnStyle;
|
|
57
|
+
createTask(): TransitionTask<HTMLImageElement, AnimationType>;
|
|
58
|
+
copy(): Exposure;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -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
|
*
|