Skip to content

Commit

Permalink
Deploying to gh-pages from @ f3fe8d1 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ealmloff committed Jun 25, 2024
1 parent d4a367a commit 966d665
Show file tree
Hide file tree
Showing 38 changed files with 54 additions and 56 deletions.
3 changes: 1 addition & 2 deletions 404.html

Large diffs are not rendered by default.

Binary file added AndroidDioxusdemopng12e7f2550f7085b6.avif
Binary file not shown.
Binary file added IOSdioxusdemopngd6132246893db281.avif
Binary file not shown.
Binary file added androidndkinstallpngd7b277db13dec198.avif
Binary file not shown.
Binary file added androidstudiodevicepngc50f7d7d81f88c62.avif
Binary file not shown.
Binary file added androidstudiodevicespng51b46c925ccabf3.avif
Binary file not shown.
Binary file added androidstudiosimulatorpngcf3c549367414f31.avif
Binary file not shown.
Binary file added asbuilddropdownpng77947f8155d36f4d.avif
Binary file not shown.
Binary file added asbuildvariantmenupnga813eb4de609b2b7.avif
Binary file not shown.
Binary file modified assets/dioxus/docsite_bg.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

function setAttributeInner(node,field,value,ns){if(ns==="style"){node.style.setProperty(field,value);return}if(ns){node.setAttributeNS(ns,field,value);return}switch(field){case"value":if(node.value!==value)node.value=value;break;case"initial_value":node.defaultValue=value;break;case"checked":node.checked=truthy(value);break;case"initial_checked":node.defaultChecked=truthy(value);break;case"selected":node.selected=truthy(value);break;case"initial_selected":node.defaultSelected=truthy(value);break;case"dangerous_inner_html":node.innerHTML=value;break;default:if(!truthy(value)&&isBoolAttr(field))node.removeAttribute(field);else node.setAttribute(field,value)}}var truthy=function(val){return val==="true"||val===!0},isBoolAttr=function(field){switch(field){case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"playsinline":case"readonly":case"required":case"reversed":case"selected":case"truespeed":case"webkitdirectory":return!0;default:return!1}};class BaseInterpreter{global;local;root;handler;nodes;stack;templates;m;constructor(){}initialize(root,handler=null){if(this.global={},this.local={},this.root=root,this.nodes=[root],this.stack=[root],this.templates={},handler)this.handler=handler}createListener(event_name,element,bubbles){if(bubbles)if(this.global[event_name]===void 0)this.global[event_name]={active:1,callback:this.handler},this.root.addEventListener(event_name,this.handler);else this.global[event_name].active++;else{const id=element.getAttribute("data-dioxus-id");if(!this.local[id])this.local[id]={};element.addEventListener(event_name,this.handler)}}removeListener(element,event_name,bubbles){if(bubbles)this.removeBubblingListener(event_name);else this.removeNonBubblingListener(element,event_name)}removeBubblingListener(event_name){if(this.global[event_name].active--,this.global[event_name].active===0)this.root.removeEventListener(event_name,this.global[event_name].callback),delete this.global[event_name]}removeNonBubblingListener(element,event_name){const id=element.getAttribute("data-dioxus-id");if(delete this.local[id][event_name],Object.keys(this.local[id]).length===0)delete this.local[id];element.removeEventListener(event_name,this.handler)}removeAllNonBubblingListeners(element){const id=element.getAttribute("data-dioxus-id");delete this.local[id]}getNode(id){return this.nodes[id]}appendChildren(id,many){const root=this.nodes[id],els=this.stack.splice(this.stack.length-many);for(let k=0;k<many;k++)root.appendChild(els[k])}loadChild(ptr,len){let node=this.stack[this.stack.length-1],ptr_end=ptr+len;for(;ptr<ptr_end;ptr++){let end=this.m.getUint8(ptr);for(node=node.firstChild;end>0;end--)node=node.nextSibling}return node}saveTemplate(nodes,tmpl_id){this.templates[tmpl_id]=nodes}hydrate(ids){const hydrateNodes=document.querySelectorAll("[data-node-hydration]");for(let i=0;i<hydrateNodes.length;i++){const hydrateNode=hydrateNodes[i],split=hydrateNode.getAttribute("data-node-hydration").split(","),id=ids[parseInt(split[0])];if(this.nodes[id]=hydrateNode,split.length>1){hydrateNode.listening=split.length-1,hydrateNode.setAttribute("data-dioxus-id",id.toString());for(let j=1;j<split.length;j++){const split2=split[j].split(":"),event_name=split2[0],bubbles=split2[1]==="1";this.createListener(event_name,hydrateNode,bubbles)}}}const treeWalker=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT);let currentNode=treeWalker.nextNode();while(currentNode){const split=currentNode.textContent.split("node-id");if(split.length>1)this.nodes[ids[parseInt(split[1])]]=currentNode.nextSibling;currentNode=treeWalker.nextNode()}}setAttributeInner(node,field,value,ns){setAttributeInner(node,field,value,ns)}}export{BaseInterpreter};

let id,ns,many,value,field,bubbles;
let ns,id,field,value,many,bubbles;
export class RawInterpreter extends BaseInterpreter {
constructor(r) {
super();
Expand All @@ -14,20 +14,7 @@
this.e = null;
this.z = null;
this.metaflags = null;
this.namespace = [];
this.namespace_cache_hit = null;
this.namespace_cache_idx;
this.get_namespace = function() {
this.namespace_cache_idx = this.u8buf[this.u8bufp++];
if(this.namespace_cache_idx & 128){
this.namespace_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]);
this.namespace[this.namespace_cache_idx&4294967167]=this.namespace_cache_hit;
return this.namespace_cache_hit;
}
else{
return this.namespace[this.namespace_cache_idx&4294967167];
}
};this.attr = [];
this.s = "";this.lsp = null;this.sp = null;this.sl = null;this.c = new TextDecoder();this.attr = [];
this.attr_cache_hit = null;
this.attr_cache_idx;
this.get_attr = function() {
Expand All @@ -40,7 +27,20 @@
else{
return this.attr[this.attr_cache_idx&4294967167];
}
};this.ns_cache = [];
};this.namespace = [];
this.namespace_cache_hit = null;
this.namespace_cache_idx;
this.get_namespace = function() {
this.namespace_cache_idx = this.u8buf[this.u8bufp++];
if(this.namespace_cache_idx & 128){
this.namespace_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]);
this.namespace[this.namespace_cache_idx&4294967167]=this.namespace_cache_hit;
return this.namespace_cache_hit;
}
else{
return this.namespace[this.namespace_cache_idx&4294967167];
}
};this.u16buf=null;this.u16bufp=null;this.ns_cache = [];
this.ns_cache_cache_hit = null;
this.ns_cache_cache_idx;
this.get_ns_cache = function() {
Expand All @@ -53,7 +53,7 @@
else{
return this.ns_cache[this.ns_cache_cache_idx&4294967167];
}
};this.u32buf=null;this.u32bufp=null;this.u8buf=null;this.u8bufp=null;this.s = "";this.lsp = null;this.sp = null;this.sl = null;this.c = new TextDecoder();this.u16buf=null;this.u16bufp=null;this.el = [];
};this.el = [];
this.el_cache_hit = null;
this.el_cache_idx;
this.get_el = function() {
Expand All @@ -66,7 +66,7 @@
else{
return this.el[this.el_cache_idx&4294967167];
}
};this.evt = [];
};this.u32buf=null;this.u32bufp=null;this.evt = [];
this.evt_cache_hit = null;
this.evt_cache_idx;
this.get_evt = function() {
Expand All @@ -79,7 +79,7 @@
else{
return this.evt[this.evt_cache_idx&4294967167];
}
};
};this.u8buf=null;this.u8bufp=null;
}

update_memory(b){
Expand All @@ -92,15 +92,7 @@
this.ls=this.m.getUint32(this.d+6*4,true);
}
this.p=this.ls;
if ((this.metaflags>>>3)&1){
this.t = this.m.getUint32(this.d+3*4,true);
this.u32buf=new Uint32Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%4)/4);
}
this.u32bufp=0;if ((this.metaflags>>>5)&1){
this.t = this.m.getUint32(this.d+5*4,true);
this.u8buf=new Uint8Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%1)/1);
}
this.u8bufp=0;if (this.metaflags&1){
if (this.metaflags&1){
this.lsp = this.m.getUint32(this.d+1*4,true);
}
if ((this.metaflags>>>2)&1) {
Expand Down Expand Up @@ -130,7 +122,15 @@
this.t = this.m.getUint32(this.d+4*4,true);
this.u16buf=new Uint16Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%2)/2);
}
this.u16bufp=0;
this.u16bufp=0;if ((this.metaflags>>>3)&1){
this.t = this.m.getUint32(this.d+3*4,true);
this.u32buf=new Uint32Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%4)/4);
}
this.u32bufp=0;if ((this.metaflags>>>5)&1){
this.t = this.m.getUint32(this.d+5*4,true);
this.u8buf=new Uint8Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%1)/1);
}
this.u8bufp=0;
for(;;){
this.op=this.m.getUint32(this.p,true);
this.p+=4;
Expand Down
Binary file added dioxusnewmov23764fdd84acacf6.mov
Binary file not shown.
3 changes: 1 addition & 2 deletions index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions learn/0.5/contributing/walkthrough_readme/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion learn/0.5/cookbook/custom_renderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
</span><span style="color:#c0c5ce;"> }
</span><span style="color:#c0c5ce;">}
</span></pre>
</div><button style="position: absolute; top: 0; right: 0; background: rgba(0, 0, 0, 0.75); color: white; border: 1px solid white; padding: 0.25em;" onclick="navigator.clipboard.writeText(this.previousElementSibling.innerText)">Copy</button></div><p data-node-hydration="339">In this tree, the color depends on the parent&#x27;s color. The layout depends on the children&#x27;s layout, the current text, and the text size. The border depends on only the current node.</p><p data-node-hydration="340">In the following diagram arrows represent dataflow:</p><p data-node-hydration="341"><a href="https://mermaid.live/edit#pako:eNqllV1vgjAUhv8K6W4wkQVa2QdLdrHsdlfukmSptEhjoaSWqTH-9xVwONAKst70g5739JzzlO5BJAgFAYi52EQJlsr6fAszS7d1sVhKnCdWJDJFt6peLVs5-9owohK7HFrVcFJ_pxnpmK8VVvRkTJikkWIiaxy1dhP23bUwW1WW5WbPrrqJ4ziR4EJ6dtVN2ls5y1ZztePUcrWZFCvqVEcPPDffvlyS1XoLIQnVgnVvVPR6FU9Zc-6dV453ojjOPbuetRJ57gIeXQR3cez7rjtteZyZQ2j5MqmjqwE0ZW0VKx9RKtgpFewp1aw3sXXFy6TWgiYlv8mfq1scD8ofbBCAfQg8_AMBOAyBxzEIwA4CxgQ99QbQkjnD2KT7_CfxGF8_9WXQEsq5sDZCcjICOXRCri4h6r3NA38Q6Jdi1EOx5w3DGDYYI6MUvJFjM3VoGHUeGoMd6mBnDmh2E3fo7O4Yhf0x4OkBmIKUyhQzol_GfbkcApXQlIYg0EOC5SoEYXbQ-3ChxHyXRSBQsqBTUOREx_7OsAY3BUGM-VqvUsKUkB_1U6vf05gtweEHTk4_HQ"><img src="/pakoeNqllV1vgjAUhv8K6W4wkQVa2QdLdrHsdlfukmSptEhjoaSWqTH9xVwONAKst70g5739JzzlO5BJAgFAYi52EQJlsr6fAszS7d1sVhK2b613541afeb07d4.avif" alt="" title=""/></a></p><p data-node-hydration="342">To help in building a Dom, native-core provides the State trait and a RealDom struct. The State trait provides a way to describe how states in a node depend on other states in its relatives. By describing how to update a single node from its relations, native-core will derive a way to update the states of all nodes for you. Once you have a state you can provide it as a generic to RealDom. RealDom provides all of the methods to interact and update your new dom.</p><p data-node-hydration="343">Native Core cannot create all of the required methods for the State trait, but it can derive some of them. To implement the State trait, you must implement the following methods and let the <code>#[partial_derive_state]</code> macro handle the rest:</p><div style="position: relative;" data-node-hydration="344"><div><pre style="background-color:#2b303b;">
</div><button style="position: absolute; top: 0; right: 0; background: rgba(0, 0, 0, 0.75); color: white; border: 1px solid white; padding: 0.25em;" onclick="navigator.clipboard.writeText(this.previousElementSibling.innerText)">Copy</button></div><p data-node-hydration="339">In this tree, the color depends on the parent&#x27;s color. The layout depends on the children&#x27;s layout, the current text, and the text size. The border depends on only the current node.</p><p data-node-hydration="340">In the following diagram arrows represent dataflow:</p><p data-node-hydration="341"><a href="https://mermaid.live/edit#pako:eNqllV1vgjAUhv8K6W4wkQVa2QdLdrHsdlfukmSptEhjoaSWqTH-9xVwONAKst70g5739JzzlO5BJAgFAYi52EQJlsr6fAszS7d1sVhKnCdWJDJFt6peLVs5-9owohK7HFrVcFJ_pxnpmK8VVvRkTJikkWIiaxy1dhP23bUwW1WW5WbPrrqJ4ziR4EJ6dtVN2ls5y1ZztePUcrWZFCvqVEcPPDffvlyS1XoLIQnVgnVvVPR6FU9Zc-6dV453ojjOPbuetRJ57gIeXQR3cez7rjtteZyZQ2j5MqmjqwE0ZW0VKx9RKtgpFewp1aw3sXXFy6TWgiYlv8mfq1scD8ofbBCAfQg8_AMBOAyBxzEIwA4CxgQ99QbQkjnD2KT7_CfxGF8_9WXQEsq5sDZCcjICOXRCri4h6r3NA38Q6Jdi1EOx5w3DGDYYI6MUvJFjM3VoGHUeGoMd6mBnDmh2E3fo7O4Yhf0x4OkBmIKUyhQzol_GfbkcApXQlIYg0EOC5SoEYXbQ-3ChxHyXRSBQsqBTUOREx_7OsAY3BUGM-VqvUsKUkB_1U6vf05gtweEHTk4_HQ"><img src="/pakoeNqllV1vgjAUhv8K6W4wkQVa2QdLdrHsdlfukmSptEhjoaSWqTH9xVwONAKst70g5739JzzlO5BJAgFAYi52EQJlsr6fAszS7d1sVhKe58bd3cfdf9caf4c.avif" alt="" title=""/></a></p><p data-node-hydration="342">To help in building a Dom, native-core provides the State trait and a RealDom struct. The State trait provides a way to describe how states in a node depend on other states in its relatives. By describing how to update a single node from its relations, native-core will derive a way to update the states of all nodes for you. Once you have a state you can provide it as a generic to RealDom. RealDom provides all of the methods to interact and update your new dom.</p><p data-node-hydration="343">Native Core cannot create all of the required methods for the State trait, but it can derive some of them. To implement the State trait, you must implement the following methods and let the <code>#[partial_derive_state]</code> macro handle the rest:</p><div style="position: relative;" data-node-hydration="344"><div><pre style="background-color:#2b303b;">
<span style="color:#65737e;">// All states must derive Component (https://docs.rs/shipyard/latest/shipyard/derive.Component.html)
</span><span style="color:#65737e;">// They also must implement Default or provide a custom implementation of create in the State trait
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">derive</span><span style="color:#c0c5ce;">(Default, Component)]
Expand Down
Loading

0 comments on commit 966d665

Please sign in to comment.