narraleaf-react 0.47.0 → 0.47.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/built-in.js CHANGED
@@ -1 +1 @@
1
- import{Gallery as L,DevTools as S}from"narraleaf-react";import{Control as r,Image as b,Layer as T,Transform as h}from"narraleaf-react";var d=new WeakMap;function y(e,t={}){let n=d.get(e);if(n)return n;let o=new T(t.name??"[[Effect Layer of "+e.config.name+"]]",{zIndex:t.zIndex??1e3});return e.config.layers.push(o),d.set(e,o),o}function k(e,t={}){let{closeDuration:n=180,hold:o=100,openDuration:p=220,easing:i="easeInOut",color:l="#000"}=t,f=y(e),a=u("[[Blink Top of "+e.config.name+"]]",l,f),s=u("[[Blink Bottom of "+e.config.name+"]]",l,f);return r.do([r.all([a.transform(c([[{opacity:1,clipPath:"inset(0 0 100% 0)"},{duration:0}],[{clipPath:"inset(0 0 50% 0)"},{duration:n,ease:i}]])),s.transform(c([[{opacity:1,clipPath:"inset(100% 0 0 0)"},{duration:0}],[{clipPath:"inset(50% 0 0 0)"},{duration:n,ease:i}]]))]),...o>0?[r.sleep(o)]:[],r.all([a.transform(c([[{clipPath:"inset(0 0 50% 0)"},{duration:0}],[{clipPath:"inset(0 0 100% 0)"},{duration:p,ease:i}],[{opacity:0,clipPath:"inset(0 0 100% 0)"},{duration:0}]])),s.transform(c([[{clipPath:"inset(50% 0 0 0)"},{duration:0}],[{clipPath:"inset(100% 0 0 0)"},{duration:p,ease:i}],[{opacity:0,clipPath:"inset(100% 0 0 0)"},{duration:0}]]))]),r.all([r.do([a.opacity(0,0),a.clearClip({duration:0})]),r.do([s.opacity(0,0),s.clearClip({duration:0})])])])}function E(e,t={}){let{duration:n=300,opacity:o=.72,color:p="#000",inner:i="44%",outer:l="78%",hold:f=600,easing:a="easeInOut"}=t,s=y(e),m=u("[[Vignette of "+e.config.name+"]]",p,s),g=`radial-gradient(circle at center, transparent ${i}, black ${l})`;return r.do([m.transform(c([[{opacity:0,maskImage:g,maskSize:"100% 100%",maskPosition:"center",maskRepeat:"no-repeat",maskMode:"alpha"},{duration:0}],[{opacity:o},{duration:n,ease:a}]])),...f>0?[r.sleep(f)]:[],m.transform(c([[{opacity:0},{duration:n,ease:a}]])),m.clearMask({duration:0})])}function u(e,t,n){return new b({name:e,src:t,autoFit:!0,opacity:0,layer:n})}function c(e){return new h(e.map(([t,n])=>({props:t,options:n})))}export{S as DevTools,L as Gallery,k as blink,y as effectLayer,E as vignette};
1
+ import{Gallery as L,DevTools as S}from"narraleaf-react";import{Control as r,Image as b,Layer as T,Transform as h}from"narraleaf-react";var d=new WeakMap;function y(e,t={}){let n=d.get(e);if(n)return n;let o=new T(t.name??"[[Effect Layer of "+e.config.name+"]]",{zIndex:t.zIndex??1e3});return e.config.layers.push(o),d.set(e,o),o}function k(e,t={}){let{closeDuration:n=180,hold:o=100,openDuration:p=220,easing:i="easeInOut",color:l="#000"}=t,f=y(e),a=u("[[Blink Top of "+e.config.name+"]]",l,f),s=u("[[Blink Bottom of "+e.config.name+"]]",l,f);return r.do([r.all([a.transform(c([[{opacity:1,clipPath:"inset(0 0 100% 0)"},{duration:0}],[{clipPath:"inset(0 0 50% 0)"},{duration:n,ease:i}]])),s.transform(c([[{opacity:1,clipPath:"inset(100% 0 0 0)"},{duration:0}],[{clipPath:"inset(50% 0 0 0)"},{duration:n,ease:i}]]))]),...o>0?[r.sleep(o)]:[],r.all([a.transform(c([[{clipPath:"inset(0 0 50% 0)"},{duration:0}],[{clipPath:"inset(0 0 100% 0)"},{duration:p,ease:i}],[{opacity:0,clipPath:"inset(0 0 100% 0)"},{duration:0}]])),s.transform(c([[{clipPath:"inset(50% 0 0 0)"},{duration:0}],[{clipPath:"inset(100% 0 0 0)"},{duration:p,ease:i}],[{opacity:0,clipPath:"inset(100% 0 0 0)"},{duration:0}]]))]),r.all([r.do([a.opacity(0,0),a.clearClip({duration:0})]),r.do([s.opacity(0,0),s.clearClip({duration:0})])])])}function E(e,t={}){let{duration:n=300,opacity:o=.72,color:p="#000",inner:i="44%",outer:l="78%",hold:f=600,easing:a="easeInOut"}=t,s=y(e),m=u("[[Vignette of "+e.config.name+"]]",p,s),g=`radial-gradient(circle at center, transparent ${i}, black ${l})`;return r.do([m.transform(c([[{opacity:0,maskImage:g,maskSize:"100% 100%",maskPosition:"50% 50%",maskRepeat:"no-repeat",maskMode:"alpha"},{duration:0}],[{opacity:o},{duration:n,ease:a}]])),...f>0?[r.sleep(f)]:[],m.transform(c([[{opacity:0},{duration:n,ease:a}]])),m.clearMask({duration:0})])}function u(e,t,n){return new b({name:e,src:t,autoFit:!0,opacity:0,layer:n})}function c(e){return new h(e.map(([t,n])=>({props:t,options:n})))}export{S as DevTools,L as Gallery,k as blink,y as effectLayer,E as vignette};
@@ -93,6 +93,20 @@ export declare class Timeline {
93
93
  setGuard(guard: GameStateGuard): this;
94
94
  protected catSettled(): [resolved: Timeline[], cancelled: Timeline[]];
95
95
  protected onTimelineRegistered(callback: () => void): this;
96
+ /**
97
+ * Work out the status again, after the awaitable or one of the children has settled.
98
+ *
99
+ * A settled timeline keeps the status it settled with. Children still settle after it -
100
+ * aborting a timeline aborts its children, and each of them reports back here - and that is
101
+ * the abort running its course, not a second outcome.
102
+ *
103
+ * A resolved awaitable is not an aborted one, although its skip controller says it is:
104
+ * `Awaitable.resolve` retires the controller with `cancel()`, which leaves `isAborted()` true.
105
+ * Reading the controller alone called a timeline cancelled the moment its awaitable resolved
106
+ * while a child was still running - a transform or transition action, whose own awaitable
107
+ * resolves one step before the animation it waits for, or a line whose voice outlives it - and
108
+ * then refused the `resolved` the child brought when it finished.
109
+ */
96
110
  private resolveStatus;
97
111
  private emitEvents;
98
112
  /**