@rive-app/webgl2-advanced 2.43.1 → 2.44.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/webgl2-advanced",
3
- "version": "2.43.1",
3
+ "version": "2.44.0",
4
4
  "description": "Rive's webgl2 low-level canvas based web api.",
5
5
  "main": "webgl2_advanced.mjs",
6
6
  "homepage": "https://rive.app",
package/rive.wasm CHANGED
Binary file
@@ -1049,13 +1049,13 @@ export declare class StateMachineInstance {
1049
1049
  focusRight(): boolean;
1050
1050
 
1051
1051
  /**
1052
- * Move focus to the nearest focusable node to the up of the current focus, by on-screen position.
1052
+ * Move focus to the nearest focusable node above the current focus, by on-screen position.
1053
1053
  * @returns false if nothing is focused or no node lies in that direction
1054
1054
  */
1055
1055
  focusUp(): boolean;
1056
1056
 
1057
1057
  /**
1058
- * Move focus to the nearest focusable node to the down of the current focus, by on-screen position.
1058
+ * Move focus to the nearest focusable node below the current focus, by on-screen position.
1059
1059
  * @returns false if nothing is focused or no node lies in that direction
1060
1060
  */
1061
1061
  focusDown(): boolean;
@@ -1075,7 +1075,7 @@ export declare class StateMachineInstance {
1075
1075
  /**
1076
1076
  * Forward a key press/release to the focus tree via the state machine's focus manager.
1077
1077
  * The event bubbles from the primary focus node up its ancestors until a handler consumes it.
1078
- * Standalone modifier keys must never be sent; fold held modifiers into the `modifiers` bitmask.
1078
+ * Modifier keys are sent as keys too; held modifiers also go in the `modifiers` bitmask.
1079
1079
  * @param key - GLFW-style key code (see js/src/utils/keyMap.ts)
1080
1080
  * @param modifiers - KeyModifiers bitmask (shift=1, ctrl=2, alt=4, meta=8)
1081
1081
  * @param isPressed - true for keydown, false for keyup
@@ -1094,6 +1094,13 @@ export declare class StateMachineInstance {
1094
1094
  */
1095
1095
  textInput(text: string): boolean;
1096
1096
 
1097
+ /**
1098
+ * The selected text of the focused element, or an empty string when nothing with a
1099
+ * selection is focused. Used to fill the clipboard on copy/cut. An obscured field
1100
+ * (i.e. a password) reports empty string.
1101
+ */
1102
+ selectedText(): string;
1103
+
1097
1104
  /**
1098
1105
  * Deletes the underlying instance created via the WASM. It's important to clean up this instance
1099
1106
  * when no longer in use
@@ -80,14 +80,14 @@ return}switch(c){case 1:c=d;E[b>>2]=c;E[b+4>>2]=(c-E[b>>2])/4294967296;break;cas
80
80
  !1;return c},["delete"](){this.g.m||dc(this);if(this.g.ka&&!this.g.ia)throw new O("Object already scheduled for deletion");Ub(this);var c=this.g;--c.count.value;0===c.count.value&&(c.D?c.K.R(c.D):c.u.h.R(c.m));this.g.ia||(this.g.D=void 0,this.g.m=void 0)},isDeleted:function(){return!this.g.m},deleteLater:function(){this.g.m||dc(this);if(this.g.ka&&!this.g.ia)throw new O("Object already scheduled for deletion");ec.push(this);this.g.ka=!0;return this}});const b=Symbol.dispose;b&&(a[b]=a["delete"])})();
81
81
  Object.assign(tc.prototype,{Mb(a){this.lb&&(a=this.lb(a));return a},Ya(a){this.R?.(a)},J:Zb,o:function(a){function b(){return this.wa?sc(this.h.N,{u:this.$b,m:c,K:this,D:a}):sc(this.h.N,{u:this,m:a})}var c=this.Mb(a);if(!c)return this.Ya(a),null;var d=rc(this.h,c);if(void 0!==d){if(0===d.g.count.value)return d.g.m=c,d.g.D=a,d.clone();d=d.clone();this.Ya(a);return d}d=this.h.Lb(c);d=gc[d];if(!d)return b.call(this);d=this.va?d.Cb:d.pointerType;var e=qc(c,this.h,d.h);return null===e?b.call(this):this.wa?
82
82
  sc(d.h.N,{u:d,m:e,K:this,D:a}):sc(d.h.N,{u:d,m:e})}});for(let a=0;32>a;++a)sd.push(Array(a));l.print&&(oa=l.print);l.printErr&&(w=l.printErr);l.wasmBinary&&(pa=l.wasmBinary);l.thisProgram&&(ja=l.thisProgram);if(l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);0<l.preInit.length;)l.preInit.shift()();
83
- var Cd={362693:(a,b,c,d,e)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.miniaudio){window.miniaudio={referenceCount:0};window.miniaudio.device_type={};window.miniaudio.device_type.playback=a;window.miniaudio.device_type.capture=b;window.miniaudio.device_type.duplex=c;window.miniaudio.device_state={};window.miniaudio.device_state.stopped=d;window.miniaudio.device_state.started=e;let f=window.miniaudio;f.devices=
83
+ var Cd={369781:(a,b,c,d,e)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.miniaudio){window.miniaudio={referenceCount:0};window.miniaudio.device_type={};window.miniaudio.device_type.playback=a;window.miniaudio.device_type.capture=b;window.miniaudio.device_type.duplex=c;window.miniaudio.device_state={};window.miniaudio.device_state.stopped=d;window.miniaudio.device_state.started=e;let f=window.miniaudio;f.devices=
84
84
  [];f.track_device=function(g){for(var h=0;h<f.devices.length;++h)if(null==f.devices[h])return f.devices[h]=g,h;f.devices.push(g);return f.devices.length-1};f.untrack_device_by_index=function(g){for(f.devices[g]=null;0<f.devices.length;)if(null==f.devices[f.devices.length-1])f.devices.pop();else break};f.untrack_device=function(g){for(var h=0;h<f.devices.length;++h)if(f.devices[h]==g)return f.untrack_device_by_index(h)};f.get_device_by_index=function(g){return f.devices[g]};f.unlock_event_types=["touchend",
85
- "click"];f.unlock=function(){for(var g=0;g<f.devices.length;++g){var h=f.devices[g];null!=h&&null!=h.L&&h.state===f.device_state.started&&h.L.resume().then(()=>{zd(h.ib)},k=>{console.error("Failed to resume audiocontext",k)})}f.unlock_event_types.map(function(k){document.removeEventListener(k,f.unlock,!0)})};f.unlock_event_types.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},364871:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(a){document.removeEventListener(a,
86
- window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},365175:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,365279:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},365450:(a,b,c,d,e,f)=>{if("undefined"===typeof window.miniaudio)return-1;var g={},h={};a==window.miniaudio.device_type.playback&&0!=c&&(h.sampleRate=c);g.L=
85
+ "click"];f.unlock=function(){for(var g=0;g<f.devices.length;++g){var h=f.devices[g];null!=h&&null!=h.L&&h.state===f.device_state.started&&h.L.resume().then(()=>{zd(h.ib)},k=>{console.error("Failed to resume audiocontext",k)})}f.unlock_event_types.map(function(k){document.removeEventListener(k,f.unlock,!0)})};f.unlock_event_types.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},371959:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(a){document.removeEventListener(a,
86
+ window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},372263:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,372367:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},372538:(a,b,c,d,e,f)=>{if("undefined"===typeof window.miniaudio)return-1;var g={},h={};a==window.miniaudio.device_type.playback&&0!=c&&(h.sampleRate=c);g.L=
87
87
  new (window.AudioContext||window.webkitAudioContext)(h);g.L.suspend();g.state=window.miniaudio.device_state.stopped;c=0;a!=window.miniaudio.device_type.playback&&(c=b);g.aa=g.L.createScriptProcessor(d,c,b);g.aa.onaudioprocess=function(k){if(null==g.ua||0==g.ua.length)g.ua=new Float32Array(va.buffer,e,d*b);if(a==window.miniaudio.device_type.capture||a==window.miniaudio.device_type.duplex){for(var n=0;n<b;n+=1)for(var p=k.inputBuffer.getChannelData(n),u=g.ua,t=0;t<d;t+=1)u[t*b+n]=p[t];Ad(f,d,e)}if(a==
88
88
  window.miniaudio.device_type.playback||a==window.miniaudio.device_type.duplex)for(Bd(f,d,e),n=0;n<k.outputBuffer.numberOfChannels;++n)for(p=k.outputBuffer.getChannelData(n),u=g.ua,t=0;t<d;t+=1)p[t]=u[t*b+n];else for(n=0;n<k.outputBuffer.numberOfChannels;++n)k.outputBuffer.getChannelData(n).fill(0)};a!=window.miniaudio.device_type.capture&&a!=window.miniaudio.device_type.duplex||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(k){g.Ea=g.L.createMediaStreamSource(k);g.Ea.connect(g.aa);
89
- g.aa.connect(g.L.destination)}).catch(function(k){console.log("Failed to get user media: "+k)});a==window.miniaudio.device_type.playback&&g.aa.connect(g.L.destination);g.ib=f;return window.miniaudio.track_device(g)},368327:a=>window.miniaudio.get_device_by_index(a).L.sampleRate,368400:a=>{a=window.miniaudio.get_device_by_index(a);void 0!==a.aa&&(a.aa.onaudioprocess=function(){},a.aa.disconnect(),a.aa=void 0);void 0!==a.Ea&&(a.Ea.disconnect(),a.Ea=void 0);a.L.close();a.L=void 0;a.ib=void 0},368800:a=>
90
- {window.miniaudio.untrack_device_by_index(a)},368850:a=>{a=window.miniaudio.get_device_by_index(a);a.L.resume();a.state=window.miniaudio.device_state.started},368989:a=>{a=window.miniaudio.get_device_by_index(a);a.L.suspend();a.state=window.miniaudio.device_state.stopped}},Rb,vd,Qb,zd,Ad,Bd,Dd,Ed,Fd,za,vc,Hd={__syscall_fcntl64:function(a,b,c){Ka=c;try{var d=vb(a);switch(b){case 0:var e=La();if(0>e)break;for(;kb[e];)e++;return xb(d,e).Z;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=
89
+ g.aa.connect(g.L.destination)}).catch(function(k){console.log("Failed to get user media: "+k)});a==window.miniaudio.device_type.playback&&g.aa.connect(g.L.destination);g.ib=f;return window.miniaudio.track_device(g)},375415:a=>window.miniaudio.get_device_by_index(a).L.sampleRate,375488:a=>{a=window.miniaudio.get_device_by_index(a);void 0!==a.aa&&(a.aa.onaudioprocess=function(){},a.aa.disconnect(),a.aa=void 0);void 0!==a.Ea&&(a.Ea.disconnect(),a.Ea=void 0);a.L.close();a.L=void 0;a.ib=void 0},375888:a=>
90
+ {window.miniaudio.untrack_device_by_index(a)},375938:a=>{a=window.miniaudio.get_device_by_index(a);a.L.resume();a.state=window.miniaudio.device_state.started},376077:a=>{a=window.miniaudio.get_device_by_index(a);a.L.suspend();a.state=window.miniaudio.device_state.stopped}},Rb,vd,Qb,zd,Ad,Bd,Dd,Ed,Fd,za,vc,Hd={__syscall_fcntl64:function(a,b,c){Ka=c;try{var d=vb(a);switch(b){case 0:var e=La();if(0>e)break;for(;kb[e];)e++;return xb(d,e).Z;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=
91
91
  La(),d.flags|=e,0;case 12:return e=La(),ta[e+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(f){if("undefined"==typeof Hb||"ErrnoError"!==f.name)throw f;return-f.Y}},__syscall_ioctl:function(a,b,c){Ka=c;try{var d=vb(a);switch(b){case 21509:return d.s?0:-59;case 21505:if(!d.s)return-59;if(d.s.X.Tb){a=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var e=La();D[e>>2]=25856;D[e+4>>2]=5;D[e+8>>2]=191;D[e+12>>2]=35387;for(var f=0;32>f;f++)A[e+f+17]=a[f]||0}return 0;case 21510:case 21511:case 21512:return d.s?
92
92
  0:-59;case 21506:case 21507:case 21508:if(!d.s)return-59;if(d.s.X.Ub)for(e=La(),a=[],f=0;32>f;f++)a.push(A[e+f+17]);return 0;case 21519:if(!d.s)return-59;e=La();return D[e>>2]=0;case 21520:return d.s?-28:-59;case 21537:case 21531:e=La();if(!d.i.Sb)throw new M(59);return d.i.Sb(d,b,e);case 21523:if(!d.s)return-59;d.s.X.Vb&&(f=[24,80],e=La(),ta[e>>1]=f[0],ta[e+2>>1]=f[1]);return 0;case 21524:return d.s?0:-59;case 21515:return d.s?0:-59;default:return-28}}catch(g){if("undefined"==typeof Hb||"ErrnoError"!==
93
93
  g.name)throw g;return-g.Y}},__syscall_openat:function(a,b,c,d){Ka=d;try{b=b?K(B,b):"";var e=b;if("/"===e.charAt(0))b=e;else{var f=-100===a?"/":vb(a).path;if(0==e.length)throw new M(44);b=f+"/"+e}var g=d?La():0;return Eb(b,c,g).Z}catch(h){if("undefined"==typeof Hb||"ErrnoError"!==h.name)throw h;return-h.Y}},_abort_js:()=>Aa(""),_embind_create_inheriting_constructor:(a,b,c)=>{a=Q(a);b=Tb(b,"wrapper");c=P(c);var d=b.h,e=d.N,f=d.C.N,g=d.C.constructor;a=Ib(a,function(...h){for(var k of d.C.jb)if(this[k]===