@devvit/ui-renderer 0.11.14-next-2025-05-05-684779788.0 → 0.11.14-next-2025-05-05-f04677e09.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/blocks/components/devvit-blocks-web-view.d.ts.map +1 -1
- package/blocks/components/devvit-blocks-web-view.js +2 -1
- package/blocks/components/devvit-blocks-web-view.js.map +1 -1
- package/devvit-custom-post-meta.min.json +4 -4
- package/devvit-custom-post.min.js +1 -1
- package/devvit-custom-post.min.js.map +3 -3
- package/devvit-surface-meta.min.json +4 -4
- package/devvit-surface.min.js +1 -1
- package/devvit-surface.min.js.map +3 -3
- package/package.json +8 -8
|
@@ -1586,7 +1586,7 @@
|
|
|
1586
1586
|
"format": "esm"
|
|
1587
1587
|
},
|
|
1588
1588
|
"library/src/blocks/components/devvit-blocks-web-view.ts": {
|
|
1589
|
-
"bytes":
|
|
1589
|
+
"bytes": 10264,
|
|
1590
1590
|
"imports": [
|
|
1591
1591
|
{
|
|
1592
1592
|
"path": "../protos/dist/types/devvit/ui/effects/web_view/v1alpha/post_message.js",
|
|
@@ -7036,7 +7036,7 @@
|
|
|
7036
7036
|
"imports": [],
|
|
7037
7037
|
"exports": [],
|
|
7038
7038
|
"inputs": {},
|
|
7039
|
-
"bytes":
|
|
7039
|
+
"bytes": 1894930
|
|
7040
7040
|
},
|
|
7041
7041
|
"dist/devvit-surface.min.js": {
|
|
7042
7042
|
"imports": [
|
|
@@ -7384,7 +7384,7 @@
|
|
|
7384
7384
|
"bytesInOutput": 107
|
|
7385
7385
|
},
|
|
7386
7386
|
"library/src/blocks/components/devvit-blocks-web-view.ts": {
|
|
7387
|
-
"bytesInOutput":
|
|
7387
|
+
"bytesInOutput": 3904
|
|
7388
7388
|
},
|
|
7389
7389
|
"library/src/blocks/templates/renderWebViewBlock.ts": {
|
|
7390
7390
|
"bytesInOutput": 540
|
|
@@ -7528,7 +7528,7 @@
|
|
|
7528
7528
|
"bytesInOutput": 8371
|
|
7529
7529
|
}
|
|
7530
7530
|
},
|
|
7531
|
-
"bytes":
|
|
7531
|
+
"bytes": 792709
|
|
7532
7532
|
}
|
|
7533
7533
|
}
|
|
7534
7534
|
}
|
package/devvit-surface.min.js
CHANGED
|
@@ -608,7 +608,7 @@ button inline-flex`},Aa=e=>{let{createElement:t}=W(),{attributes:r,selected:n,ro
|
|
|
608
608
|
sandbox="allow-scripts ${r}"
|
|
609
609
|
referrerpolicy="origin"
|
|
610
610
|
@load="${B(this,z,C8)}"
|
|
611
|
-
></iframe>`}};ce=new WeakMap,ue=new WeakMap,Q3=new WeakMap,j3=new WeakMap,z=new WeakSet,Mr=function(){B(this,z,se).call(this,"WebView reset. Clearing queued messages:",f(this,ue).length),f(this,ue).length=0},et=new WeakMap,x8=function(r){r.effect&&this.dispatchEvent(l5("devvit-ui-effect",{effect:r.effect,onEvent:n=>{B(this,z,Y5).call(this,"devvit-message",{id:r.id??""
|
|
611
|
+
></iframe>`}};ce=new WeakMap,ue=new WeakMap,Q3=new WeakMap,j3=new WeakMap,z=new WeakSet,Mr=function(){B(this,z,se).call(this,"WebView reset. Clearing queued messages:",f(this,ue).length),f(this,ue).length=0},et=new WeakMap,x8=function(r){r.effect&&this.dispatchEvent(l5("devvit-ui-effect",{effect:r.effect,onEvent:n=>{let a=JSON.parse(JSON.stringify(n));B(this,z,Y5).call(this,"devvit-message",{...a,id:r.id??""})}}))},Lr=function(){if(this.state&&f(this,ce)){let r={state:this.state};B(this,z,Y5).call(this,"devvit-state",r),B(this,z,Y5).call(this,"stateUpdate",this.state)}},C8=function(){if(!f(this,ce)&&this.src){B(this,z,se).call(this,"Page loaded. Sending initial state."),V(this,ce,!0),B(this,z,Lr).call(this),B(this,z,se).call(this,"Sending",f(this,ue).length,"queued messages");for(let r of f(this,ue))B(this,z,Y5).call(this,"devvit-message",r)}},Y5=function(r,n){let a={type:r,data:n},i=this._targetOrigin?{targetOrigin:this._targetOrigin}:{};this._iframe?.contentWindow?.postMessage(a,i),B(this,z,se).call(this,()=>["Sending message:",JSON.stringify(a)])},se=function(r){globalThis.devvit?.debug.webView&&console.log.apply(null,[`[webView${this.id?`#${this.id}`:""}]`,...typeof r=="function"?r():typeof r=="string"?[r]:r])},H([Q({type:String})],C0.prototype,"src",2),H([Q({type:Boolean,attribute:"dev-mode"})],C0.prototype,"devMode",2),H([Q({type:Object,attribute:!1})],C0.prototype,"onReceivedPostMessage",2),H([Q({attribute:!1})],C0.prototype,"state",2),H([s5()],C0.prototype,"_originDiffers",2),H([s5()],C0.prototype,"_targetOrigin",2),H([s5()],C0.prototype,"pendingSrc",2),H([c6("iframe")],C0.prototype,"_iframe",2),C0=H([W5("devvit-blocks-web-view")],C0);function M8(e,t){let{html:r,styleMap:n,ifDefined:a}=W();if(!e.config?.webviewConfig)return console.error("Invalid block: WebView missing WebViewConfig"),M;let{id:i}=e,{url:o,state:c}=e.config.webviewConfig,l={...R1(e,t)},u={...O1(e,t)},v=ja(e,t),d=t.resolveWebViewUrl?.(o);return r`<devvit-blocks-web-view
|
|
612
612
|
id="${a(i)}"
|
|
613
613
|
src="${d}"
|
|
614
614
|
class="${b1(l)}"
|