@vincle/flow 0.10.0 → 0.10.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/CHANGELOG.md +7 -0
- package/dist/adapters/index.d.ts +1 -1
- package/dist/context.d.ts +1 -1
- package/dist/http.d.ts +1 -1
- package/dist/http.js +1 -1
- package/dist/{index-CkR-2s9P.d.ts → index-CEUr1Ok8.d.ts} +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/render-CftVQY1L.js +5 -0
- package/dist/utils.d.ts +1 -1
- package/package.json +2 -2
- package/dist/render-BkqdRPBk.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @vincle/flow
|
|
2
2
|
|
|
3
|
+
## 0.10.1 — 2026-10-08
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Stop waiting for a pending shell render when the request is cancelled, allowing the stream to close and fragment storage to be cleared.
|
|
8
|
+
- Give error fallbacks a fresh render deadline using the fragment timeout or default timeout, and interrupt them on request cancellation. Preserve the original content error if fallback rendering fails or times out, without invoking the error handler again.
|
|
9
|
+
|
|
3
10
|
## 0.10.0 — 2026-10-05
|
|
4
11
|
|
|
5
12
|
### Breaking changes
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as withPolyfill, c as TurboAdapter, d as createAdapter, i as WebPlatformAdapter, l as Adapter, n as HtmxAdapter, o as NATIVE_POLYFILL, r as NativeAdapter, s as nativePolyfillHash, t as EsiAdapter, u as ShellContext } from "../index-
|
|
1
|
+
import { a as withPolyfill, c as TurboAdapter, d as createAdapter, i as WebPlatformAdapter, l as Adapter, n as HtmxAdapter, o as NATIVE_POLYFILL, r as NativeAdapter, s as nativePolyfillHash, t as EsiAdapter, u as ShellContext } from "../index-CEUr1Ok8.js";
|
|
2
2
|
export { type Adapter, EsiAdapter, HtmxAdapter, NATIVE_POLYFILL, NativeAdapter, type ShellContext, TurboAdapter, WebPlatformAdapter, createAdapter, nativePolyfillHash, withPolyfill };
|
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as OnError, m as FlowConfig, p as DeferContent, y as MergeType } from "./index-
|
|
1
|
+
import { S as OnError, m as FlowConfig, p as DeferContent, y as MergeType } from "./index-CEUr1Ok8.js";
|
|
2
2
|
import { JSX, ScopeKey, renderToString } from "@vincle/core";
|
|
3
3
|
//#region src/assets.d.ts
|
|
4
4
|
type AssetType = "style" | "script";
|
package/dist/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as FlowOptions, b as Negotiate, w as StreamingAdapter, x as Negotiation } from "./index-
|
|
1
|
+
import { _ as FlowOptions, b as Negotiate, w as StreamingAdapter, x as Negotiation } from "./index-CEUr1Ok8.js";
|
|
2
2
|
import { JSX } from "@vincle/core";
|
|
3
3
|
//#region src/http.d.ts
|
|
4
4
|
/**
|
package/dist/http.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./render-
|
|
1
|
+
import{n as e}from"./render-CftVQY1L.js";function t(e,t){let n=/* @__PURE__ */ new Set,r=[],i=e=>{if(e)for(let t of e.split(`,`)){let e=t.trim(),i=e.toLowerCase();e&&!n.has(i)&&(n.add(i),r.push(e))}};i(e.get(`vary`)),i(t),e.set(`vary`,r.join(`, `))}function n(e,n,r){let i=new Headers(e);for(let e of[n,r])for(let[n,r]of new Headers(e??{}))n===`vary`?t(i,r):i.set(n,r);return i}async function r(t,r,i,a){let o=a?.negotiate?.(t)??{},s=e(()=>r(o),i,{...a,signal:a?.signal?AbortSignal.any([t.signal,a.signal]):t.signal,mode:a?.mode??o.mode}).pipeThrough(new TextEncoderStream),c=n({"content-type":`text/html; charset=utf-8`},a?.headers,o.headers);return new Response(s,{...a,headers:c})}function i(e){return{headers:{Vary:`HX-Target`},target:e.headers.get(`HX-Target`)??void 0}}export{i as negotiateHtmx,r as serve};
|
|
@@ -40,6 +40,7 @@ type OnError = (error: unknown, info: FlowErrorInfo) => JSX.Element | void;
|
|
|
40
40
|
interface FlowOptions {
|
|
41
41
|
signal?: AbortSignal;
|
|
42
42
|
onError?: OnError;
|
|
43
|
+
/** Render deadline in ms; error fallbacks receive a fresh deadline of the same duration. */
|
|
43
44
|
defaultTimeout?: number;
|
|
44
45
|
}
|
|
45
46
|
type FlowConfig = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./jsx-augment-Da8Va85F.js";
|
|
2
|
-
import { C as Shell, S as OnError, _ as FlowOptions, b as Negotiate, f as AdapterCapabilities, g as FlowEvent, h as FlowErrorInfo, l as Adapter, m as FlowConfig, p as DeferContent, v as Fragment, w as StreamingAdapter, x as Negotiation, y as MergeType } from "./index-
|
|
2
|
+
import { C as Shell, S as OnError, _ as FlowOptions, b as Negotiate, f as AdapterCapabilities, g as FlowEvent, h as FlowErrorInfo, l as Adapter, m as FlowConfig, p as DeferContent, v as Fragment, w as StreamingAdapter, x as Negotiation, y as MergeType } from "./index-CEUr1Ok8.js";
|
|
3
3
|
import { JSX } from "@vincle/core";
|
|
4
4
|
//#region src/components/Slot.d.ts
|
|
5
5
|
interface SlotProps {
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,o as r,r as i,s as a,t as o}from"./context-CLpgp0eJ.js";import{_ as s,a as c,d as l,h as u,i as d,l as f,m as p,s as m}from"./utils-yayEbXmr.js";import{n as h,r as g,t as _}from"./render-
|
|
1
|
+
import{a as e,c as t,i as n,o as r,r as i,s as a,t as o}from"./context-CLpgp0eJ.js";import{_ as s,a as c,d as l,h as u,i as d,l as f,m as p,s as m}from"./utils-yayEbXmr.js";import{n as h,r as g,t as _}from"./render-CftVQY1L.js";import{Scope as v,raw as y,renderToString as b,snapshotContext as x}from"@vincle/core";import{Fragment as S,jsx as C,jsxs as w}from"@vincle/core/jsx-runtime";function T(e){let{name:t,children:n}=e;return v.get(o).slots.names.add(t),r(t,n)}function E(e){let{registerFragment:t,nextId:i,slots:a}=v.get(o),{children:s,merge:c,timeout:l,onError:u,fallback:d}=e,f=e.target??i();if(t(f,{content:s,treeScope:x(),merge:c??`replace`,timeout:l,onError:u,fallback:d}),a.names.has(f))return null;let p=r(f,d);if(e.target===void 0)return p;let[m,h]=n(a,f);return/* @__PURE__ */ w(S,{children:[y(m),p,y(h)]})}const D=e=>`/fragments/${e}.html`;function O(t,n,r){return{renderPage:r=>v.with(async()=>{i();let a=await e(r());return n?.transformShell?n.transformShell(a,t):a},v.snapshot()),emitFragments:async e=>{if(!n)throw s(`${d} emitFragments(): emitFragments requires an adapter: fragments cannot be framed into standalone files without one. Pass { adapter: ... } to renderToStatic. Example: renderToStatic(handler, { adapter: NativeAdapter })`,p);await v.with(async()=>{a(),await g(t,async t=>{if(t.type===`fragment`){let i=await b(n.Frame({id:t.id,children:y(t.html)}));await e(t.id,r(t.id),i)}})},v.snapshot()),t.fragments.clear()}}}async function k(e,n){let r=n?.adapter,i=n?.generatePath??D;if(c(r,`renderToStatic`),n?.generatePath!==void 0&&typeof n.generatePath!=`function`)throw s(`${d} renderToStatic: generatePath must be a function (id) => string, got ${f(n.generatePath)}. Example: (id) => \`/fragments/\${id}.html\`.`,l);return t(t=>e(O(t,r,i)),{adapter:r,mode:`static`,generatePath:i})}async function A(e,t,n){if(n.adapter===void 0)throw s(`${d} renderFragment: opts.adapter is required: pass the same adapter the site's full build uses (e.g. TurboAdapter).`,p);c(n.adapter,`renderFragment`),m(n,`renderFragment`);let r;if(await k(async i=>{await i.renderPage(()=>/* @__PURE__ */ C(E,{target:e,timeout:n.timeout,onError:n.onError,children:t})),await i.emitFragments((t,n,i)=>{t===e&&(r={url:n,html:i})})},{adapter:n.adapter,generatePath:n.generatePath}),!r)throw s(`${d} renderFragment("${e}"): produced no output for this id. The fragment was never registered or rendered: its content may have thrown or timed out (check the onError/console log), or the id differs from the <Defer target> that was rendered. Verify the id matches and that the content renders.`,u);return r}export{E as Defer,T as Slot,A as renderFragment,_ as renderToFlowEvents,k as renderToStatic,h as renderToStream};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as e,c as t}from"./context-CLpgp0eJ.js";import{_ as n,a as r,g as i,i as a,s as o}from"./utils-yayEbXmr.js";import{raw as s,renderToString as c}from"@vincle/core";import{isAsyncIterable as l}from"@vincle/core/html";async function u(e,t){let n,r=new Promise((e,r)=>{n=()=>r(t.reason),t.aborted?n():t.addEventListener(`abort`,n,{once:!0})});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}}function d(e,t){let n=new AbortController,r=t?.signal?AbortSignal.any([t.signal,n.signal]):n.signal,i,a=[],o=()=>{for(let e of a.splice(0))e()};r.addEventListener(`abort`,o,{once:!0});let s=async e=>{if(!r.aborted){for(;(i.desiredSize??1)<=0&&!r.aborted;)await new Promise(e=>a.push(e));r.aborted||i.enqueue(e)}};return new ReadableStream({start(t){i=t,e(s,r).then(()=>{try{t.close()}catch{}},e=>{try{t.error(e)}catch{}})},pull(){o()},cancel(e){n.abort(e)}})}function f(e,t,n){let r=e;if(r==null)return{signal:t??new AbortController().signal,cleanup:()=>{}};let i=new AbortController,o=setTimeout(()=>i.abort(/* @__PURE__ */ Error(`${a} Fragment "${n}" timed out after ${r}ms: its content did not finish in time. Increase the timeout (the fragment's timeout prop or defaultTimeout), or make the content finish faster, e.g. by forwarding the abort signal to fetch().`)),r);return{signal:t?AbortSignal.any([t,i.signal]):i.signal,cleanup:()=>clearTimeout(o)}}const p=e=>typeof e==`function`;function m(e,t){try{let n=p(e.content)?e.content(t):e.content;return l(n)?{kind:`stream`,iterable:n}:{kind:`value`,value:n}}catch(e){return{kind:`sync-error`,error:e}}}async function h(t,n,r,i,a,o){if(console.error(`[vincle/flow] Error rendering ${i} "${r}"`,a),o.signal?.aborted)return;let s=n?.(a,{id:r,kind:i});if(s!=null){let{signal:n,cleanup:i}=f(o.defaultTimeout,o.signal,r),a;try{a=await u(e(s),n)}finally{i()}if(n.aborted)throw n.reason;await t({type:`fragment`,id:r,html:a,merge:`replace`})}}async function g(e,t,n,r,i,a){try{await h(e,t,n,r,i,a)}catch{throw i}}function _(e,t,n,r){return t.treeScope?t.treeScope(()=>v(e,t,n,r)):v(e,t,n,r)}function v(e,t,n,r){let i=t.onError??r.onError,a={...r,defaultTimeout:t.timeout??r.defaultTimeout},o=(t,r)=>g(n,i,e,t,r,a),{signal:s,cleanup:c}=f(t.timeout??r.defaultTimeout,r.signal,e),l=m(t,s);switch(l.kind){case`sync-error`:return c(),{isStreaming:!1,done:o(`fragment`,l.error)};case`stream`:return{isStreaming:!0,done:b(e,l.iterable,t.merge,n,o,s).finally(c)};case`value`:return{isStreaming:!1,done:y(e,l.value,t.merge,n,o,s,c)}}}async function y(t,n,r,i,a,o,s){let c;try{c=await u(e(n),o)}catch(e){await a(`fragment`,e);return}finally{s()}if(o.aborted){await a(`fragment`,o.reason);return}try{await i({type:`fragment`,id:t,html:c,merge:r})}catch(e){throw console.error(`[vincle/flow] Failed to emit fragment "${t}"`,e),e}}async function b(t,n,r,i,a,o){let s=n[Symbol.asyncIterator](),c=!1,l=!1;try{for(;!o.aborted;){let n=await u(Promise.resolve(s.next()),o);if(n.done){l=!0;break}let d;try{d=await u(e(n.value),o)}catch(e){try{await a(`stream`,e)}catch(e){throw c=!0,e}if(o.aborted)break;continue}try{await i({type:`fragment`,id:t,html:d,merge:r})}catch(e){throw console.error(`[vincle/flow] Failed to emit stream chunk for "${t}"`,e),c=!0,e}}}catch(e){if(c)throw e;await a(`stream`,e)}finally{if(!l)try{let e=Promise.resolve(s.return?.(void 0)).catch(()=>{});o.aborted||await e}catch{}}}async function x(e){if(e.length===0)return;let t=await Promise.allSettled(e);for(let e of t)if(e.status===`rejected`)throw e.reason}function S(e){let t=Promise.resolve();return{emit:n=>{let r=t.then(()=>e(n));return t=r.catch(()=>{}),r},drain:()=>t}}async function C(e,t,n={}){let r=e.fragments.cursor(),i=[],a=S(t);for(;!n.signal?.aborted;){let e=r.outstanding();if(e.length>0){let t=[];for(let[r,o]of e){let{isStreaming:e,done:s}=_(r,o,a.emit,n);(e?i:t).push(s)}await x(t);continue}if(i.length===0||(await x(i),i.length=0,!r.hasOutstanding()))break}i.length>0&&await x(i),await a.drain()}function w(e){let t=e.trimEnd();if(!t.endsWith(`</html>`))return{body:e,closingTag:``};let n=t.slice(0,-7).trimEnd(),r=n.endsWith(`</body>`)?n.length-7:n.length;return{body:e.slice(0,r),closingTag:e.slice(r)}}function T(e){let t=!1;return new TransformStream({async transform(n,r){if(n.type===`shell`){t=!0,r.enqueue(n.html);return}let i=``;if(t&&(t=!1,i=`
|
|
2
|
+
`),n.type===`fragment`){let t=await c(e.Patch({id:n.id,children:s(n.html),merge:n.merge}));r.enqueue(i+t+`
|
|
3
|
+
`)}else r.enqueue(i+n.html+`
|
|
4
|
+
`)},flush(e){t&&e.enqueue(`
|
|
5
|
+
`)}})}async function E(t,n,r){let{body:i,closingTag:a}=w(await e(t()));return{shellBody:n.transformShell?n.transformShell(i,r):i,closingTag:a}}async function D(e,n,r,i,a){await t(async t=>{let{fragments:o}=t;try{if(n.aborted)return;let s;try{s=await u(E(r,i,t),n)}catch(e){if(n.aborted)return;throw e}let{shellBody:c,closingTag:l}=s;a.mode!==`fragment`&&c!==``&&await e({type:`shell`,html:c}),await C({fragments:o},e,{...a,signal:n}),a.mode!==`fragment`&&l&&await e({type:`close`,html:l})}finally{o.clear()}},{adapter:i,mode:`streaming`})}function O(e,t,n){o(n,e),r(t,e)}function k(e,t,n={}){return O(`renderToFlowEvents`,t,n),d((r,i)=>D(r,i,e,t,n),{signal:n.signal})}function A(e,t,r){if(O(`renderToStream`,t,r),t.capabilities.streaming!==!0)throw n(`[vincle/flow] renderToStream(): this adapter does not stream: capabilities.streaming is false, so it can only produce static output. Use renderToStatic() with this adapter, or pass a streaming adapter (TurboAdapter, NativeAdapter, HtmxAdapter, WebPlatformAdapter).`,i);return k(e,t,r).pipeThrough(T(t))}export{A as n,C as r,k as t};
|
package/dist/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincle/flow",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "HTML document orchestration layer for @vincle/core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deferred",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/bun": "^1.4.2",
|
|
77
77
|
"@vincle/core": "0.9.1",
|
|
78
78
|
"happy-dom": "^20.14.5",
|
|
79
|
-
"oxc-parser": "^0.
|
|
79
|
+
"oxc-parser": "^0.153.0",
|
|
80
80
|
"tsdown": "^0.23.0",
|
|
81
81
|
"typescript": "^6.0.3"
|
|
82
82
|
},
|
package/dist/render-BkqdRPBk.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t}from"./context-CLpgp0eJ.js";import{_ as n,a as r,g as i,i as a,s as o}from"./utils-yayEbXmr.js";import{raw as s,renderToString as c}from"@vincle/core";import{isAsyncIterable as l}from"@vincle/core/html";function u(e,t){let n=new AbortController,r=t?.signal?AbortSignal.any([t.signal,n.signal]):n.signal,i,a=[],o=()=>{for(let e of a.splice(0))e()};r.addEventListener(`abort`,o,{once:!0});let s=async e=>{if(!r.aborted){for(;(i.desiredSize??1)<=0&&!r.aborted;)await new Promise(e=>a.push(e));r.aborted||i.enqueue(e)}};return new ReadableStream({start(t){i=t,e(s,r).then(()=>{try{t.close()}catch{}},e=>{try{t.error(e)}catch{}})},pull(){o()},cancel(e){n.abort(e)}})}function d(e,t,n){let r=e;if(r==null)return{signal:t??new AbortController().signal,cleanup:()=>{}};let i=new AbortController,o=setTimeout(()=>i.abort(/* @__PURE__ */ Error(`${a} Fragment "${n}" timed out after ${r}ms: its content did not finish in time. Increase the timeout (the fragment's timeout prop or defaultTimeout), or make the content finish faster, e.g. by forwarding the abort signal to fetch().`)),r);return{signal:t?AbortSignal.any([t,i.signal]):i.signal,cleanup:()=>clearTimeout(o)}}const f=e=>typeof e==`function`;function p(e,t){try{let n=f(e.content)?e.content(t):e.content;return l(n)?{kind:`stream`,iterable:n}:{kind:`value`,value:n}}catch(e){return{kind:`sync-error`,error:e}}}async function m(e,t){let n,r=new Promise((e,r)=>{n=()=>r(t.reason),t.aborted?n():t.addEventListener(`abort`,n,{once:!0})});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}}async function h(t,n,r,i,a){console.error(`[vincle/flow] Error rendering ${i} "${r}"`,a);let o=n?.(a,{id:r,kind:i});o!=null&&await t({type:`fragment`,id:r,html:await e(o),merge:`replace`})}async function g(e,t,n,r,i){try{await h(e,t,n,r,i)}catch{throw i}}function _(e,t,n,r){return t.treeScope?t.treeScope(()=>v(e,t,n,r)):v(e,t,n,r)}function v(e,t,n,r){let i=t.onError??r.onError,{signal:a,cleanup:o}=d(t.timeout??r.defaultTimeout,r.signal,e),s=p(t,a);switch(s.kind){case`sync-error`:return o(),{isStreaming:!1,done:h(n,i,e,`fragment`,s.error)};case`stream`:return{isStreaming:!0,done:b(e,s.iterable,t.merge,n,i,a).finally(o)};case`value`:return{isStreaming:!1,done:y(e,s.value,t.merge,n,i,a,o)}}}async function y(t,n,r,i,a,o,s){let c;try{c=await m(e(n),o)}catch(e){await g(i,a,t,`fragment`,e);return}finally{s()}if(o.aborted){await g(i,a,t,`fragment`,o.reason);return}try{await i({type:`fragment`,id:t,html:c,merge:r})}catch(e){throw console.error(`[vincle/flow] Failed to emit fragment "${t}"`,e),e}}async function b(t,n,r,i,a,o){let s=n[Symbol.asyncIterator](),c=!1,l=!1;try{for(;!o.aborted;){let n=await m(Promise.resolve(s.next()),o);if(n.done){l=!0;break}let u;try{u=await m(e(n.value),o)}catch(e){if(await g(i,a,t,`stream`,e),o.aborted)break;continue}try{await i({type:`fragment`,id:t,html:u,merge:r})}catch(e){throw console.error(`[vincle/flow] Failed to emit stream chunk for "${t}"`,e),c=!0,e}}}catch(e){if(c)throw e;await g(i,a,t,`stream`,e)}finally{if(!l)try{let e=Promise.resolve(s.return?.(void 0)).catch(()=>{});o.aborted||await e}catch{}}}async function x(e){if(e.length===0)return;let t=await Promise.allSettled(e);for(let e of t)if(e.status===`rejected`)throw e.reason}function S(e){let t=Promise.resolve();return{emit:n=>{let r=t.then(()=>e(n));return t=r.catch(()=>{}),r},drain:()=>t}}async function C(e,t,n={}){let r=e.fragments.cursor(),i=[],a=S(t);for(;!n.signal?.aborted;){let e=r.outstanding();if(e.length>0){let t=[];for(let[r,o]of e){let{isStreaming:e,done:s}=_(r,o,a.emit,n);(e?i:t).push(s)}await x(t);continue}if(i.length===0||(await x(i),i.length=0,!r.hasOutstanding()))break}i.length>0&&await x(i),await a.drain()}function w(e){let t=e.trimEnd();if(!t.endsWith(`</html>`))return{body:e,closingTag:``};let n=t.slice(0,-7).trimEnd(),r=n.endsWith(`</body>`)?n.length-7:n.length;return{body:e.slice(0,r),closingTag:e.slice(r)}}function T(e){let t=!1;return new TransformStream({async transform(n,r){if(n.type===`shell`){t=!0,r.enqueue(n.html);return}let i=``;if(t&&(t=!1,i=`
|
|
2
|
-
`),n.type===`fragment`){let t=await c(e.Patch({id:n.id,children:s(n.html),merge:n.merge}));r.enqueue(i+t+`
|
|
3
|
-
`)}else r.enqueue(i+n.html+`
|
|
4
|
-
`)},flush(e){t&&e.enqueue(`
|
|
5
|
-
`)}})}async function E(t,n,r){let{body:i,closingTag:a}=w(await e(t()));return{shellBody:n.transformShell?n.transformShell(i,r):i,closingTag:a}}async function D(e,n,r,i,a){await t(async t=>{let{fragments:o}=t;try{if(n.aborted)return;let{shellBody:s,closingTag:c}=await E(r,i,t);a.mode!==`fragment`&&s!==``&&await e({type:`shell`,html:s}),await C({fragments:o},e,{...a,signal:n}),a.mode!==`fragment`&&c&&await e({type:`close`,html:c})}finally{o.clear()}},{adapter:i,mode:`streaming`})}function O(e,t,n){o(n,e),r(t,e)}function k(e,t,n={}){return O(`renderToFlowEvents`,t,n),u((r,i)=>D(r,i,e,t,n),{signal:n.signal})}function A(e,t,r){if(O(`renderToStream`,t,r),t.capabilities.streaming!==!0)throw n(`[vincle/flow] renderToStream(): this adapter does not stream: capabilities.streaming is false, so it can only produce static output. Use renderToStatic() with this adapter, or pass a streaming adapter (TurboAdapter, NativeAdapter, HtmxAdapter, WebPlatformAdapter).`,i);return k(e,t,r).pipeThrough(T(t))}export{A as n,C as r,k as t};
|