@weftui/dom 0.22.0 → 0.23.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/dist/server/index.js +1 -1
- package/package.json +4 -3
package/dist/server/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"../data-Bk62ePeP.js";import{d as t,f as n,m as r,n as i,o as a,p as o,r as s,s as c,t as l}from"../boundary-replay-BR26_puM.js";import{Cause as u,Context as d,Effect as f,ExecutionStrategy as p,Exit as m,Option as h,Queue as g,Ref as _,Schema as v,Scope as y,Stream as b,Subscribable as x}from"effect";import{AppRpcClientTag as ee,FAILURE_BOUNDARY as S,FRAGMENT as C,LIST as w,SERVER_BOUNDARY as T,SUSPENSE_BOUNDARY as E,Source as D,getElementDescriptor as O,isStream as k,toStream as A}from"@weftui/core";function te(e){if(e.length<=2||!e.startsWith(`on`))return!1;let t=e[2];return t!==void 0&&t>=`a`&&t<=`z`}const j=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),M={'"':`"`,"&":`&`,"'":`'`,"<":`<`,">":`>`};function N(e){return e.replace(/["'&<>]/g,e=>M[e]??e)}const ne=new Set([38,60,62,8232,8233]);function P(e){let t=JSON.stringify(e),n=``;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e);ne.has(r)?n+=`\\u${r.toString(16).padStart(4,`0`)}`:n+=t[e]}return n}function re(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function F(e){return f.gen(function*(){let t=``;for(let[n,r]of Object.entries(e))if(!(n===`children`||n===`ref`||te(n))){if(n===`style`){t+=yield*R(r);continue}t+=yield*L(n,r)}return t})}function I(e){return k(e)||f.isEffect(e)?A(e).pipe(b.runHead,f.map(h.getOrElse(()=>void 0))):f.succeed(e)}function L(e,t){return f.gen(function*(){let n=yield*I(t);return n==null?``:typeof n==`boolean`?n?` ${e}=""`:``:` ${e}="${N(String(n))}"`})}function R(e){return f.gen(function*(){let t=yield*I(e);if(t==null)return``;if(typeof t==`string`)return t===``?``:` style="${N(t)}"`;if(typeof t==`object`){let e=[];for(let[n,r]of Object.entries(t)){let t=yield*I(r);t!=null&&e.push(`${re(n)}: ${String(t)}`)}return e.length===0?``:` style="${N(e.join(`; `))}"`}return``})}var z=class extends d.Tag(`@weftui/dom/SuspenseFailureHandler`)(){};function B(e,t,n=!1,i){let a=r(e),c=o(e),l=n?`var m=document.createElement("meta");m.setAttribute("name","robots");m.setAttribute("content","noindex");document.head.appendChild(m);`:``,u=i!==void 0,d=u?`<script type="application/json" ${s}>`+P({error:i})+`<\/script>`+t:t,f=u?``:`p.removeChild(s);p.removeChild(e);`;return`<template id="ef-s-${e}">${d}</template><script>(function(){`+l+`var w=document.createTreeWalker(document,128),s,e;while(w.nextNode()){var d=w.currentNode.data;if(d==="${a}")s=w.currentNode;if(d==="${c}"){e=w.currentNode;break;}}if(!s||!e)return;var p=s.parentNode,c=s.nextSibling,n;while(c&&c!==e){n=c.nextSibling;p.removeChild(c);c=n;}var t=document.getElementById("ef-s-${e}");p.insertBefore(t.content,e);`+f+`t.remove();document.currentScript.remove();})();<\/script>`}function V(e,t,n){return b.unwrap(f.gen(function*(){let i=++t.idCounter.current;yield*_.update(t.pendingCount,e=>e+1);let a=e.children===void 0?null:(Array.isArray(e.children),e.children),s=f.gen(function*(){let e=yield*b.mkString(n(a));yield*g.offer(t.patchQueue,h.some(B(i,e)))}).pipe(f.catchAllCause(e=>u.isInterruptedOnly(e)?f.failCause(e):f.gen(function*(){let r=yield*f.serviceOption(z);if(h.isNone(r))return;let a=r.value.handle(e);if(h.isNone(a))return;let o=yield*b.mkString(n(a.value.content));yield*g.offer(t.patchQueue,h.some(B(i,o,a.value.markNoindex,a.value.failureReplay)))})),f.ensuring(_.updateAndGet(t.pendingCount,e=>e-1).pipe(f.flatMap(e=>e<=0?g.offer(t.patchQueue,h.none()).pipe(f.asVoid):f.void))),f.ignore);yield*f.forkIn(s,t.scope);let c=`<!--${r(i)}-->`,l=`<!--${o(i)}-->`,d=e.fallback??null;return b.make(c).pipe(b.concat(n(d)),b.concat(b.make(l)))}))}function H(e,t,n){let r=e.children.length===0?null:e.children.length===1?e.children[0]:e.children;return b.unwrapScoped(f.gen(function*(){let a=yield*b.mkString(n(r)).pipe(f.catchAllCause(r=>f.gen(function*(){let a=e.match(r);if(a===null)return yield*f.failCause(r);let o=yield*b.mkString(n(a));if(t===null)return o;let s=yield*_.getAndSet(t,h.none());return h.isNone(s)?o:`<script type="application/json" ${l}>${P({index:i(e.children).indexOf(s.value.owner),error:s.value.encoded})}<\/script>`+o})));return b.make(a)}))}function ie(e,t,n){if(t===null)return f.failCause(n);let r=u.failureOption(n);return h.isNone(r)?f.failCause(n):v.encode(e.errorSchema)(r.value).pipe(f.flatMap(n=>_.set(t,h.some({owner:e,encoded:n}))),f.matchCauseEffect({onFailure:()=>f.failCause(n),onSuccess:()=>f.failCause(n)}))}function U(e){return{value:x.make({get:f.succeed(e),changes:b.make(e)}),refetch:f.void,pending:x.make({get:f.succeed(!1),changes:b.make(!1)}),error:x.make({get:f.succeed(h.none()),changes:b.make(h.none())})}}function W(e,t,n,r){return b.unwrap(f.gen(function*(){let i=yield*(yield*ee).call(e.tag,e.payload()).pipe(f.catchAllCause(t=>ie(e,n,t))),a=r(e.render(U(i)));if(!t)return a;let o=`<script type="application/json">${P(yield*v.encode(e.successSchema)(i))}<\/script>`;return b.make(o).pipe(b.concat(a))}))}function G(e){return f.scoped(D.toSubscribable(e).pipe(f.flatMap(e=>e.get),f.map(e=>Array.from(e)),f.catchTag(`NoPropValue`,()=>f.succeed([]))))}function K(t,n){if(t==null||typeof t==`boolean`)return b.empty;if(typeof t==`string`||typeof t==`number`||typeof t==`bigint`)return b.make(N(String(t)));if(k(t)||f.isEffect(t)){let e=O(t);if(e!==void 0)return K(e,n);if(f.isEffect(t)){let e=f.runSyncExit(t);if(m.isSuccess(e))return K(e.value,n)}return A(t).pipe(b.runHead,f.map(h.match({onNone:()=>b.empty,onSome:e=>K(e,n)})),b.unwrap)}if(typeof t==`object`&&Symbol.iterator in t&&!(`type`in t))return b.flatMap(b.fromIterable(t),e=>K(e,n));if(typeof t==`object`&&`type`in t&&!(Symbol.iterator in t)){let{type:e,props:r}=t;if(e===C)return J(r,n);if(e===E){let e=r;return n===null?K(e.fallback??null,null):V(e,n,e=>K(e,n))}if(e===S)return H(r,null,e=>K(e,n));if(e===T)return W(r,!1,null,e=>K(e,n));if(e===w)return q(r,n);if(typeof e==`string`){let t=b.fromEffect(F(r).pipe(f.map(t=>`<${e}${t}>`)));return j.has(e)?t:t.pipe(b.concat(J(r,n)),b.concat(b.make(`</${e}>`)))}if(typeof e==`function`)return K(e(r),n)}return b.fail(new e({type:t.type,message:`Invalid Renderable type: expected string, FRAGMENT, or function, got ${typeof t.type}`}))}function q(e,t){return b.unwrap(f.gen(function*(){let n=yield*G(e.of),r=b.empty;return n.forEach((n,i)=>{r=r.pipe(b.concat(K(e.render(n,i),t)))}),r}))}function J(e,t){let n=`children`in e?e.children:void 0;if(n==null)return b.empty;let r=Array.isArray(n)?n:[n];return b.flatMap(b.fromIterable(r),e=>K(e,t))}function Y(r,i,a){if(r==null||typeof r==`boolean`)return b.empty;if(typeof r==`string`||typeof r==`number`||typeof r==`bigint`)return b.make(N(String(r)));if(k(r)||f.isEffect(r)){let e=O(r);if(e!==void 0)return Y(e,i,a);if(f.isEffect(r)){let e=f.runSyncExit(r);if(m.isSuccess(e))return Y(e.value,i,a)}return A(r).pipe(b.runHead,f.map(e=>{let r=++i.current,o=h.match(e,{onNone:()=>b.empty,onSome:e=>Y(e,i,a)});return b.make(`<!--${n(r)}-->`).pipe(b.concat(o),b.concat(b.make(`<!--${t(r)}-->`)))}),b.unwrap)}if(typeof r==`object`&&Symbol.iterator in r&&!(`type`in r))return b.flatMap(b.fromIterable(r),e=>Y(e,i,a));if(typeof r==`object`&&`type`in r&&!(Symbol.iterator in r)){let{type:e,props:t}=r;if(e===C)return X(t,i,a);if(e===E){let e=t;return a===null?Y(e.fallback??null,i,null):V(e,a,e=>Y(e,i,a))}if(e===S)return H(t,a?.failureCollector??null,e=>Y(e,i,a));if(e===T)return W(t,!0,a?.failureCollector??null,e=>Y(e,i,a));if(e===w)return ae(t,i,a);if(typeof e==`string`){let n=b.fromEffect(F(t).pipe(f.map(t=>`<${e}${t}>`)));return j.has(e)?n:n.pipe(b.concat(X(t,i,a)),b.concat(b.make(`</${e}>`)))}if(typeof e==`function`)return Y(e(t),i,a)}return b.fail(new e({type:r.type,message:`Invalid Renderable type: expected string, FRAGMENT, or function, got ${typeof r.type}`}))}function ae(e,r,i){return b.unwrap(f.gen(function*(){let o=++r.current,s=yield*G(e.of),l=b.empty;return s.forEach((t,n)=>{let o=++r.current;l=l.pipe(b.concat(b.make(`<!--${c(o)}-->`)),b.concat(Y(e.render(t,n),r,i)),b.concat(b.make(`<!--${a(o)}-->`)))}),b.make(`<!--${n(o)}-->`).pipe(b.concat(l),b.concat(b.make(`<!--${t(o)}-->`)))}))}function X(e,t,n){let r=`children`in e?e.children:void 0;if(r==null)return b.empty;let i=Array.isArray(r)?r:[r];return b.flatMap(b.fromIterable(i),e=>Y(e,t,n))}const oe=e=>K(e,null),se=e=>b.unwrapScoped(f.gen(function*(){let t=yield*g.unbounded(),n=yield*_.make(0),r=K(e,{patchQueue:t,pendingCount:n,idCounter:{current:0},scope:yield*f.scope,failureCollector:null}).pipe(b.ensuring(_.get(n).pipe(f.flatMap(e=>e===0?g.offer(t,h.none()).pipe(f.asVoid):f.void))));return b.concat(r,Z(t))})),Z=e=>b.fromQueue(e).pipe(b.takeWhile(h.isSome),b.map(e=>e.value)),Q=(e,t)=>f.gen(function*(){let n=yield*g.unbounded(),r=yield*_.make(0);return{mainStream:Y(e,{current:0},{patchQueue:n,pendingCount:r,idCounter:{current:0},scope:t,failureCollector:yield*_.make(h.none())}).pipe(b.ensuring(_.get(r).pipe(f.flatMap(e=>e===0?g.offer(n,h.none()).pipe(f.asVoid):f.void)))),patches:Z(n)}}),$=e=>b.unwrapScoped(f.gen(function*(){let{mainStream:
|
|
1
|
+
import{s as e}from"../data-Bk62ePeP.js";import{d as t,f as n,m as r,n as i,o as a,p as o,r as s,s as c,t as l}from"../boundary-replay-BR26_puM.js";import{Cause as u,Context as d,Effect as f,ExecutionStrategy as p,Exit as m,Option as h,Queue as g,Ref as _,Schema as v,Scope as y,Stream as b,Subscribable as x}from"effect";import{AppRpcClientTag as ee,FAILURE_BOUNDARY as S,FRAGMENT as C,LIST as w,SERVER_BOUNDARY as T,SUSPENSE_BOUNDARY as E,Source as D,getElementDescriptor as O,isStream as k,toStream as A}from"@weftui/core";function te(e){if(e.length<=2||!e.startsWith(`on`))return!1;let t=e[2];return t!==void 0&&t>=`a`&&t<=`z`}const j=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),M={'"':`"`,"&":`&`,"'":`'`,"<":`<`,">":`>`};function N(e){return e.replace(/["'&<>]/g,e=>M[e]??e)}const ne=new Set([38,60,62,8232,8233]);function P(e){let t=JSON.stringify(e),n=``;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e);ne.has(r)?n+=`\\u${r.toString(16).padStart(4,`0`)}`:n+=t[e]}return n}function re(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function F(e){return f.gen(function*(){let t=``;for(let[n,r]of Object.entries(e))if(!(n===`children`||n===`ref`||te(n))){if(n===`style`){t+=yield*R(r);continue}t+=yield*L(n,r)}return t})}function I(e){return k(e)||f.isEffect(e)?A(e).pipe(b.runHead,f.map(h.getOrElse(()=>void 0))):f.succeed(e)}function L(e,t){return f.gen(function*(){let n=yield*I(t);return n==null?``:typeof n==`boolean`?n?` ${e}=""`:``:` ${e}="${N(String(n))}"`})}function R(e){return f.gen(function*(){let t=yield*I(e);if(t==null)return``;if(typeof t==`string`)return t===``?``:` style="${N(t)}"`;if(typeof t==`object`){let e=[];for(let[n,r]of Object.entries(t)){let t=yield*I(r);t!=null&&e.push(`${re(n)}: ${String(t)}`)}return e.length===0?``:` style="${N(e.join(`; `))}"`}return``})}var z=class extends d.Tag(`@weftui/dom/SuspenseFailureHandler`)(){};function B(e,t,n=!1,i){let a=r(e),c=o(e),l=n?`var m=document.createElement("meta");m.setAttribute("name","robots");m.setAttribute("content","noindex");document.head.appendChild(m);`:``,u=i!==void 0,d=u?`<script type="application/json" ${s}>`+P({error:i})+`<\/script>`+t:t,f=u?``:`p.removeChild(s);p.removeChild(e);`;return`<template id="ef-s-${e}">${d}</template><script>(function(){`+l+`var w=document.createTreeWalker(document,128),s,e;while(w.nextNode()){var d=w.currentNode.data;if(d==="${a}")s=w.currentNode;if(d==="${c}"){e=w.currentNode;break;}}if(!s||!e)return;var p=s.parentNode,c=s.nextSibling,n;while(c&&c!==e){n=c.nextSibling;p.removeChild(c);c=n;}var t=document.getElementById("ef-s-${e}");p.insertBefore(t.content,e);`+f+`t.remove();document.currentScript.remove();})();<\/script>`}function V(e,t,n){return b.unwrap(f.gen(function*(){let i=++t.idCounter.current;yield*_.update(t.pendingCount,e=>e+1);let a=e.children===void 0?null:(Array.isArray(e.children),e.children),s=f.gen(function*(){let e=yield*b.mkString(n(a));yield*g.offer(t.patchQueue,h.some(B(i,e)))}).pipe(f.catchAllCause(e=>u.isInterruptedOnly(e)?f.failCause(e):f.gen(function*(){let r=yield*f.serviceOption(z);if(h.isNone(r))return;let a=r.value.handle(e);if(h.isNone(a))return;let o=yield*b.mkString(n(a.value.content));yield*g.offer(t.patchQueue,h.some(B(i,o,a.value.markNoindex,a.value.failureReplay)))})),f.ensuring(_.updateAndGet(t.pendingCount,e=>e-1).pipe(f.flatMap(e=>e<=0?g.offer(t.patchQueue,h.none()).pipe(f.asVoid):f.void))),f.ignore);yield*f.forkIn(s,t.scope);let c=`<!--${r(i)}-->`,l=`<!--${o(i)}-->`,d=e.fallback??null;return b.make(c).pipe(b.concat(n(d)),b.concat(b.make(l)))}))}function H(e,t,n){let r=e.children.length===0?null:e.children.length===1?e.children[0]:e.children;return b.unwrapScoped(f.gen(function*(){let a=yield*b.mkString(n(r)).pipe(f.catchAllCause(r=>f.gen(function*(){let a=e.match(r);if(a===null)return yield*f.failCause(r);let o=yield*b.mkString(n(a));if(t===null)return o;let s=yield*_.getAndSet(t,h.none());return h.isNone(s)?o:`<script type="application/json" ${l}>${P({index:i(e.children).indexOf(s.value.owner),error:s.value.encoded})}<\/script>`+o})));return b.make(a)}))}function ie(e,t,n){if(t===null)return f.failCause(n);let r=u.failureOption(n);return h.isNone(r)?f.failCause(n):v.encode(e.errorSchema)(r.value).pipe(f.flatMap(n=>_.set(t,h.some({owner:e,encoded:n}))),f.matchCauseEffect({onFailure:()=>f.failCause(n),onSuccess:()=>f.failCause(n)}))}function U(e){return{value:x.make({get:f.succeed(e),changes:b.make(e)}),refetch:f.void,pending:x.make({get:f.succeed(!1),changes:b.make(!1)}),error:x.make({get:f.succeed(h.none()),changes:b.make(h.none())})}}function W(e,t,n,r){return b.unwrap(f.gen(function*(){let i=yield*(yield*ee).call(e.tag,e.payload()).pipe(f.catchAllCause(t=>ie(e,n,t))),a=r(e.render(U(i)));if(!t)return a;let o=`<script type="application/json">${P(yield*v.encode(e.successSchema)(i))}<\/script>`;return b.make(o).pipe(b.concat(a))}))}function G(e){return f.scoped(D.toSubscribable(e).pipe(f.flatMap(e=>e.get),f.map(e=>Array.from(e)),f.catchTag(`NoPropValue`,()=>f.succeed([]))))}function K(t,n){if(t==null||typeof t==`boolean`)return b.empty;if(typeof t==`string`||typeof t==`number`||typeof t==`bigint`)return b.make(N(String(t)));if(k(t)||f.isEffect(t)){let e=O(t);if(e!==void 0)return K(e,n);if(f.isEffect(t)){let e=f.runSyncExit(t);if(m.isSuccess(e))return K(e.value,n)}return A(t).pipe(b.runHead,f.map(h.match({onNone:()=>b.empty,onSome:e=>K(e,n)})),b.unwrap)}if(typeof t==`object`&&Symbol.iterator in t&&!(`type`in t))return b.flatMap(b.fromIterable(t),e=>K(e,n));if(typeof t==`object`&&`type`in t&&!(Symbol.iterator in t)){let{type:e,props:r}=t;if(e===C)return J(r,n);if(e===E){let e=r;return n===null?K(e.fallback??null,null):V(e,n,e=>K(e,n))}if(e===S)return H(r,null,e=>K(e,n));if(e===T)return W(r,!1,null,e=>K(e,n));if(e===w)return q(r,n);if(typeof e==`string`){let t=b.fromEffect(F(r).pipe(f.map(t=>`<${e}${t}>`)));return j.has(e)?t:t.pipe(b.concat(J(r,n)),b.concat(b.make(`</${e}>`)))}if(typeof e==`function`)return K(e(r),n)}return b.fail(new e({type:t.type,message:`Invalid Renderable type: expected string, FRAGMENT, or function, got ${typeof t.type}`}))}function q(e,t){return b.unwrap(f.gen(function*(){let n=yield*G(e.of),r=b.empty;return n.forEach((n,i)=>{r=r.pipe(b.concat(K(e.render(n,i),t)))}),r}))}function J(e,t){let n=`children`in e?e.children:void 0;if(n==null)return b.empty;let r=Array.isArray(n)?n:[n];return b.flatMap(b.fromIterable(r),e=>K(e,t))}function Y(r,i,a){if(r==null||typeof r==`boolean`)return b.empty;if(typeof r==`string`||typeof r==`number`||typeof r==`bigint`)return b.make(N(String(r)));if(k(r)||f.isEffect(r)){let e=O(r);if(e!==void 0)return Y(e,i,a);if(f.isEffect(r)){let e=f.runSyncExit(r);if(m.isSuccess(e))return Y(e.value,i,a)}return A(r).pipe(b.runHead,f.map(e=>{let r=++i.current,o=h.match(e,{onNone:()=>b.empty,onSome:e=>Y(e,i,a)});return b.make(`<!--${n(r)}-->`).pipe(b.concat(o),b.concat(b.make(`<!--${t(r)}-->`)))}),b.unwrap)}if(typeof r==`object`&&Symbol.iterator in r&&!(`type`in r))return b.flatMap(b.fromIterable(r),e=>Y(e,i,a));if(typeof r==`object`&&`type`in r&&!(Symbol.iterator in r)){let{type:e,props:t}=r;if(e===C)return X(t,i,a);if(e===E){let e=t;return a===null?Y(e.fallback??null,i,null):V(e,a,e=>Y(e,i,a))}if(e===S)return H(t,a?.failureCollector??null,e=>Y(e,i,a));if(e===T)return W(t,!0,a?.failureCollector??null,e=>Y(e,i,a));if(e===w)return ae(t,i,a);if(typeof e==`string`){let n=b.fromEffect(F(t).pipe(f.map(t=>`<${e}${t}>`)));return j.has(e)?n:n.pipe(b.concat(X(t,i,a)),b.concat(b.make(`</${e}>`)))}if(typeof e==`function`)return Y(e(t),i,a)}return b.fail(new e({type:r.type,message:`Invalid Renderable type: expected string, FRAGMENT, or function, got ${typeof r.type}`}))}function ae(e,r,i){return b.unwrap(f.gen(function*(){let o=++r.current,s=yield*G(e.of),l=b.empty;return s.forEach((t,n)=>{let o=++r.current;l=l.pipe(b.concat(b.make(`<!--${c(o)}-->`)),b.concat(Y(e.render(t,n),r,i)),b.concat(b.make(`<!--${a(o)}-->`)))}),b.make(`<!--${n(o)}-->`).pipe(b.concat(l),b.concat(b.make(`<!--${t(o)}-->`)))}))}function X(e,t,n){let r=`children`in e?e.children:void 0;if(r==null)return b.empty;let i=Array.isArray(r)?r:[r];return b.flatMap(b.fromIterable(i),e=>Y(e,t,n))}const oe=e=>K(e,null),se=e=>b.unwrapScoped(f.gen(function*(){let t=yield*g.unbounded(),n=yield*_.make(0),r=K(e,{patchQueue:t,pendingCount:n,idCounter:{current:0},scope:yield*f.scope,failureCollector:null}).pipe(b.ensuring(_.get(n).pipe(f.flatMap(e=>e===0?g.offer(t,h.none()).pipe(f.asVoid):f.void))));return b.concat(r,Z(t))})),Z=e=>b.fromQueue(e).pipe(b.takeWhile(h.isSome),b.map(e=>e.value)),Q=(e,t)=>f.gen(function*(){let n=yield*g.unbounded(),r=yield*_.make(0);return{mainStream:Y(e,{current:0},{patchQueue:n,pendingCount:r,idCounter:{current:0},scope:t,failureCollector:yield*_.make(h.none())}).pipe(b.ensuring(_.get(r).pipe(f.flatMap(e=>e===0?g.offer(n,h.none()).pipe(f.asVoid):f.void)))),patches:Z(n)}}),$=e=>b.unwrapScoped(f.gen(function*(){let t=yield*f.scope,{mainStream:n,patches:r}=yield*Q(e,t);return b.concat(n,r)})),ce=e=>oe(e).pipe(b.mkString),le=e=>$(e).pipe(b.mkString),ue=e=>f.gen(function*(){let t=yield*f.scope,n=yield*y.fork(t,p.sequential),{mainStream:r,patches:i}=yield*Q(e,n);return{shell:yield*b.mkString(r).pipe(f.onError(e=>y.close(n,m.failCause(e)))),patches:i}});export{z as SuspenseFailureHandlerTag,ue as renderToHydratableShell,se as renderToStream,$ as renderToStreamHydratable,ce as renderToString,le as renderToStringHydratable};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weftui/dom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Client-side DOM renderer for Weft",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Stef van Wijchen",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@weftui/core": "0.
|
|
33
|
+
"@weftui/core": "0.23.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@effect/rpc": "^0.75.1",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"jsdom": "^29.1.1",
|
|
41
41
|
"tsx": "^4.22.4",
|
|
42
42
|
"typescript": "^6.0.3",
|
|
43
|
-
"vite
|
|
43
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.2",
|
|
44
|
+
"vite-plus": "0.2.2"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"effect": "^3.21"
|