narraleaf-react 0.27.0 → 0.28.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 {};