gemi 0.58.0 → 0.58.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/dist/{chunk-mkfpnymy.js → chunk-01e3gk86.js} +1 -1
- package/dist/{chunk-3aa287k7.js → chunk-4sz6pwtn.js} +2 -2
- package/dist/{chunk-3aa287k7.js.map → chunk-4sz6pwtn.js.map} +1 -1
- package/dist/{chunk-8gew8b9a.js → chunk-vj6f2bmb.js} +1 -1
- package/dist/chunks/{ThemeProvider-li1J_igh.js → ThemeProvider-ByU4BQdL.js} +68 -2
- package/dist/chunks/{ThemeProvider-li1J_igh.js.map → ThemeProvider-ByU4BQdL.js.map} +1 -1
- package/dist/client/ComponentContext.d.ts +46 -0
- package/dist/client/ComponentContext.d.ts.map +1 -1
- package/dist/client/index.js +9 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/init.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-mkfpnymy.js.map → chunk-01e3gk86.js.map} +0 -0
- /package/dist/{chunk-8gew8b9a.js.map → chunk-vj6f2bmb.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$ as D,Z as x}from"./chunk-
|
|
2
|
+
import{$ as D,Z as x}from"./chunk-4sz6pwtn.js";import{ia as y,ja as I}from"./chunk-v7y8zm61.js";import"./chunk-5ad8era8.js";import"./chunk-ejrcyzx8.js";import"./chunk-tkdxv6cq.js";import"./chunk-xnytbrda.js";import"./chunk-jhkjz9jr.js";import{IncomingMessage as T,ServerResponse as g}from"http";import{Socket as w}from"net";import{join as E}from"path";import{createServer as k}from"vite";function N(H){return H.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
|
|
3
3
|
`).split(`
|
|
4
4
|
`).map((J)=>J.trim()).filter((J)=>J.length>0).join(`
|
|
5
5
|
`).trim()}function R(H){return`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{pa as h}from"./chunk-tkdxv6cq.js";import{createElement as x}from"react";function j(i,n){let s=Object.keys(n).sort((u,b)=>b.length-u.length).map((u)=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r=new RegExp(s.join("|"),"g");return i.replace(r,(u)=>n[u])}async function J(i,n,s=[]){let r=[...s.map((t)=>`${i}/views/${t}.tsx`),`${i}/views/RootLayout.tsx`],u=new Set;for(let t of r){let e=n.moduleGraph.getModulesByFile(t);if(e)for(let d of e)u.add(d)}let b=[],p=[],c={};for(let t of u)if(t)for(let e of t.importedModules){if(e.file.includes("module.css"))c[e.file]=e.ssrTransformResult.map.sourcesContent.join("");if(e.file.includes(".css"))p.push(e.file)}for(let t of p){let e=await n.transformRequest(t+"?direct"),d=t.includes("module.css"),o="";if(d)o=j(c[t],e.default);b.push({isDev:!0,id:t,content:d?o:e.code})}return b.map((t,e)=>{return x("style",{key:e,type:"text/css","data-vite-dev-id":t.id,dangerouslySetInnerHTML:{__html:t.content}})})}async function L(i=[]){return i.map((n,s)=>{return x("style",{key:s,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as f}from"fs";import{basename as v}from"path";import{networkInterfaces as k}from"os";var y={name:"gemi",version:"0.58.
|
|
2
|
+
import{pa as h}from"./chunk-tkdxv6cq.js";import{createElement as x}from"react";function j(i,n){let s=Object.keys(n).sort((u,b)=>b.length-u.length).map((u)=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r=new RegExp(s.join("|"),"g");return i.replace(r,(u)=>n[u])}async function J(i,n,s=[]){let r=[...s.map((t)=>`${i}/views/${t}.tsx`),`${i}/views/RootLayout.tsx`],u=new Set;for(let t of r){let e=n.moduleGraph.getModulesByFile(t);if(e)for(let d of e)u.add(d)}let b=[],p=[],c={};for(let t of u)if(t)for(let e of t.importedModules){if(e.file.includes("module.css"))c[e.file]=e.ssrTransformResult.map.sourcesContent.join("");if(e.file.includes(".css"))p.push(e.file)}for(let t of p){let e=await n.transformRequest(t+"?direct"),d=t.includes("module.css"),o="";if(d)o=j(c[t],e.default);b.push({isDev:!0,id:t,content:d?o:e.code})}return b.map((t,e)=>{return x("style",{key:e,type:"text/css","data-vite-dev-id":t.id,dangerouslySetInnerHTML:{__html:t.content}})})}async function L(i=[]){return i.map((n,s)=>{return x("style",{key:s,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as f}from"fs";import{basename as v}from"path";import{networkInterfaces as k}from"os";var y={name:"gemi",version:"0.58.1",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js","gemi-orm-generator":"./dist/bin/orm-generator.js"},files:["dist/**/*","ide/typescript-plugin/package.json"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./testing":"./testing/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./broadcasting":"./broadcasting/index.ts","./i18n":"./i18n/index.ts","./dictionary":"./i18n/dictionaryRuntime.ts","./server":"./server/index.ts","./config":"./config/index.ts","./container":"./container/index.ts","./foundation":"./foundation/index.ts","./database":"./database/index.ts","./orm":"./orm/index.ts","./support":"./support/index.ts","./console/run":"./console/run.ts","./ide/typescript-plugin":"./ide/typescript-plugin/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts"},scripts:{lint:"oxlint",typecheck:"tsc --noEmit -p tsconfig.json && tsc --noEmit -p ide/typescript-plugin/tsconfig.json",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:ts-plugin && bun run build:client-types && bun run build:augmentation","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --sourcemap ./bin/gemi.ts ./bin/orm-generator.ts && bun ./scripts/prepare-bin.ts","build:client":"rm -rf dist/client dist/testing dist/chunks && vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:ts-plugin":"bun ./scripts/build-ts-plugin.ts","build:types":"tsc","build:client-types":"tsc -p tsconfig.browser.json",test:"bun --bun vitest","test:types":"vitest run --typecheck.only","test:packaging":"bun --bun vitest run --config vitest.packaging.config.ts","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1","build:augmentation":"bun ./scripts/wire-augmentation.ts"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1","magic-string":"^0.30.17",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@prisma/generator-helper":"^6.5.0","@repo/typescript-config":"*","@testing-library/react":"^16.3.2","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0",jsdom:"^30.0.1",oxlint:"^1.39.0",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",vite:"^8.0.0"},peerDependenciesMeta:{"@azure/storage-blob":{optional:!0}}};var z=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],O=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,g=(i,n)=>O?`\x1B[${i}m${n}\x1B[0m`:n,T=(i)=>g("1",i),l=(i)=>g("2",i),a=(i)=>g("36",i),q=(i)=>g("32",i),E=(i)=>g("35",i);function R(){return y.version??"?"}function _(i){for(let n of Object.values(k()))for(let s of n??[])if((s.family==="IPv4"||s.family===4)&&!s.internal)return`http://${s.address}:${i}`;return null}function G(i){return h(i).filter((n)=>f(n)).map((n)=>v(n))}function A(i){let{port:n,rootDir:s}=i,r=`http://localhost:${n}`,u=_(n),b=G(s),p=(t,e)=>` ${q("\u279C")} ${T(t.padEnd(9))}${e}`,c=["",...z.map((t)=>E(t)),"",` ${l("gemi")} ${a(`v${R()}`)}`,"",p("Local:",a(r)),p("Network:",u?a(u):l("unavailable")),p("Env:",b.length?b.join(", "):l("none")),""];console.log(c.join(`
|
|
3
3
|
`))}
|
|
4
4
|
export{J as Z,L as _,A as $};
|
|
5
5
|
|
|
6
|
-
//# debugId=
|
|
6
|
+
//# debugId=3C46E83CE32D242D64756E2164756E21
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
"import { existsSync } from \"node:fs\";\nimport { basename } from \"node:path\";\nimport { networkInterfaces } from \"node:os\";\nimport { envFiles } from \"./watchEnv\";\nimport pkg from \"../package.json\";\n\n// \"GEMI\" — ANSI Shadow figlet font.\nconst ART = [\n \" ██████╗ ███████╗███╗ ███╗██╗\",\n \"██╔════╝ ██╔════╝████╗ ████║██║\",\n \"██║ ███╗█████╗ ██╔████╔██║██║\",\n \"██║ ██║██╔══╝ ██║╚██╔╝██║██║\",\n \"╚██████╔╝███████╗██║ ╚═╝ ██║██║\",\n \" ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝\",\n];\n\nconst useColor = Boolean(process.stdout.isTTY) && !process.env.NO_COLOR;\nconst paint = (code: string, text: string) =>\n useColor ? `\\x1b[${code}m${text}\\x1b[0m` : text;\nconst bold = (t: string) => paint(\"1\", t);\nconst dim = (t: string) => paint(\"2\", t);\nconst cyan = (t: string) => paint(\"36\", t);\nconst green = (t: string) => paint(\"32\", t);\nconst magenta = (t: string) => paint(\"35\", t);\n\nfunction gemiVersion(): string {\n return (pkg as { version?: string }).version ?? \"?\";\n}\n\nfunction networkUrl(port: number | string): string | null {\n for (const ifaces of Object.values(networkInterfaces())) {\n for (const iface of ifaces ?? []) {\n // Node <18 reported `family` as the number 4; newer Bun/Node use \"IPv4\".\n const isV4 = iface.family === \"IPv4\" || (iface.family as unknown) === 4;\n if (isV4 && !iface.internal) return `http://${iface.address}:${port}`;\n }\n }\n return null;\n}\n\nfunction loadedEnvFiles(rootDir: string): string[] {\n return envFiles(rootDir)\n .filter((file) => existsSync(file))\n .map((file) => basename(file));\n}\n\nexport function printStartupBanner(params: {\n port: number | string;\n rootDir: string;\n}) {\n const { port, rootDir } = params;\n const local = `http://localhost:${port}`;\n const network = networkUrl(port);\n const env = loadedEnvFiles(rootDir);\n\n const row = (label: string, value: string) =>\n ` ${green(\"➜\")} ${bold(label.padEnd(9))}${value}`;\n\n const out = [\n \"\",\n ...ART.map((line) => magenta(line)),\n \"\",\n ` ${dim(\"gemi\")} ${cyan(`v${gemiVersion()}`)}`,\n \"\",\n row(\"Local:\", cyan(local)),\n row(\"Network:\", network ? cyan(network) : dim(\"unavailable\")),\n row(\"Env:\", env.length ? env.join(\", \") : dim(\"none\")),\n \"\",\n ];\n\n console.log(out.join(\"\\n\"));\n}\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": "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",
|
|
9
|
-
"debugId": "
|
|
9
|
+
"debugId": "3C46E83CE32D242D64756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$ as v,_ as D}from"./chunk-
|
|
2
|
+
import{$ as v,_ as D}from"./chunk-4sz6pwtn.js";import"./chunk-tkdxv6cq.js";import{Vb as q}from"./chunk-fjm4y8bn.js";import{Dc as V,sc as P}from"./chunk-hwa5sqw5.js";import"./chunk-86jebsm4.js";import"./chunk-y6a8r2bn.js";import"./chunk-7j6wbv12.js";import"./chunk-hxf1re93.js";import"./chunk-qb5mv6pj.js";import"./chunk-3g5bjvdf.js";import"./chunk-sy7jbdeb.js";import"./chunk-cyaz97p5.js";import"./chunk-d125j8t0.js";import"./chunk-dgsgjg53.js";import"./chunk-jhkjz9jr.js";import{join as E}from"path";import{Duplex as o}from"stream";import{constants as T,createBrotliCompress as l,createGzip as n}from"zlib";var i=["br","gzip"],t=1024,a=5,s=19,r=6;function e($){if($===void 0)return 1;if(!/^\d+(\.\d{0,3})?$/.test($.trim()))return 1;let J=Number($.trim());return Number.isFinite(J)?Math.min(J,1):1}function JJ($){if($===null||$===void 0)return null;let J=new Map;for(let H of $.split(",")){let[Z,...X]=H.split(";"),j=Z.trim().toLowerCase();if(j==="")continue;let x=1;for(let K of X){let O=K.indexOf("=");if(O===-1)continue;if(K.slice(0,O).trim().toLowerCase()==="q"){x=e(K.slice(O+1));break}}J.set(j,x)}return J}function $J($,J=i){let H=JJ($);if(!H)return null;let Z=H.get("*"),X=null,j=0;for(let x of J){let K=H.get(x)??Z??0;if(K>j)X=x,j=K}return X}function HJ($,J){if(!$)return!1;return $.split(",").some((H)=>H.trim().toLowerCase().split("=")[0].trim()===J)}function UJ($,J){if($==="HEAD")return!1;if(!J.body)return!1;if(J.status<200||J.status===204||J.status===206||J.status===304)return!1;if(J.headers.has("Content-Range"))return!1;let H=J.headers.get("Content-Type");if(!H||!/^\s*text\/html\s*(;|$)/i.test(H))return!1;let Z=J.headers.get("Content-Encoding");if(Z&&Z.trim().toLowerCase()!=="identity")return!1;if(HJ(J.headers.get("Cache-Control"),"no-transform"))return!1;let X=J.headers.get("Content-Length");if(X!==null&&Number(X)<t)return!1;return!0}function ZJ($){let J=$==="br"?l({params:{[T.BROTLI_PARAM_QUALITY]:a,[T.BROTLI_PARAM_LGWIN]:s},flush:T.BROTLI_OPERATION_FLUSH}):n({level:r,flush:T.Z_SYNC_FLUSH});return o.toWeb(J)}function zJ($){let J=$.get("Vary");if(!J){$.set("Vary","Accept-Encoding");return}let H=J.split(",").map((Z)=>Z.trim().toLowerCase());if(H.includes("*")||H.includes("accept-encoding"))return;$.append("Vary","Accept-Encoding")}function F($,J){if(!UJ($.method,J))return J;let H=new Headers(J.headers);zJ(H);let Z=$J($.headers.get("Accept-Encoding"));if(!Z)return new Response(J.body,{status:J.status,statusText:J.statusText,headers:H});let X;try{X=ZJ(Z)}catch{return new Response(J.body,{status:J.status,statusText:J.statusText,headers:H})}return H.set("Content-Encoding",Z),H.delete("Content-Length"),new Response(J.body.pipeThrough(X),{status:J.status,statusText:J.statusText,headers:H})}function y($){let J=$.toString(),H=new Bun.CryptoHasher("sha1");return H.update(J),H.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=P;import{exists as GJ}from"fs/promises";var g="app/client.tsx";function w($){let J=$["app/client.tsx"]?.file;if(!J)return;return{module:`/${J}`,preload:S($,"app/client.tsx")}}function S($,J){let H=[],Z=new Set,X=(j)=>{if(Z.has(j))return;Z.add(j);let x=$[j];if(!x?.file)return;H.push(`/${x.file}`);for(let K of x.imports??[])X(K)};return X(J),H}var I=q(),XJ=E(I,"app"),L=E(I,"dist");async function VJ($,J){let H=await import(`${L}/client/.vite/manifest.json`),Z=await import(`${L}/server/.vite/manifest.json`);process.env.ROOT_DIR=I,process.env.APP_DIR=XJ,process.env.DIST_DIR=L;let X={},j={},x={},K={},O={},f=(U,G)=>`"${U}": () => import("${G}")`,k=[];for(let U of["404",...$.getFlatComponentTree.call($)]){let G=Z[`app/views/${U}.tsx`];if(!G?.file){console.log(`Server file not found for ${U}`),console.log(G);let W=Object.keys(Z),A=`app/views/${U}.tsx`;console.log(`${A} not found in server manifest`),console.log(W)}let Q=await import(`${process.env.DIST_DIR}/server/${G?.file}`);X[U]=Q.default,j[U]=Q.OpenGraph,x[U]=Q;let z=H[`app/views/${U}.tsx`];if(z?.css&&z?.css.length>0)K[U]=z?.css;if(z)k.push(f(U,`/${z?.file}`)),O[U]=S(H,`app/views/${U}.tsx`)}let u=`{${k.join(",")}}`,N=w(H);if(!N)console.error(`Client manifest has no "${g}" entry \u2014 dist/client is incomplete, so documents will render but never hydrate.`);let m=H["app/client.tsx"]?.css??[],h=(await Promise.all(m.map((U)=>Bun.file(`${L}/client/${U}`).text()))).join(`
|
|
3
3
|
`),c=new P({pathname:"/*.:filetype(png|txt|js|css|jpg|svg|jpeg|avif|webp|ico|ttf|map)"});async function p(U){let{pathname:G}=new URL(U.url),Q=G.startsWith("/.well-known"),z=c.test({pathname:G})||Q,W=G.startsWith("/api");if(z&&!W){let A=new URL(U.url),b=U.url.replace(A.origin,"").split("?")[0],B=`${L}/client${b.replace("/assets/assets","/assets")}`,C=await GJ(B);if(!C&&A.pathname.includes(".js"))return new Response(`if(caches){caches?.delete("${B}")}window.location.reload();export {}`,{headers:{"Content-Type":"application/javascript"}});if(!C){if(G===V||G.startsWith(`${V}/`))return new Response("Not found",{status:404});return await R(U,G)}try{let Y=Bun.file(B),_=y(Y.lastModified);return new Response(Y.stream(),{headers:{"Content-Type":Y.type,"Cache-Control":"public, max-age=31536000, must-revalidate","Content-Length":String(Y.size),ETag:_}})}catch(Y){return $.onException?.(Y),new Response("Not found",{status:404})}}return await R(U,G)}async function R(U,G){let Q=$.fetch.bind($);try{let z=await Q(U);if(z instanceof Response)return z;else{let W=[];return W.push({content:h}),await z({getStyles:async(b)=>{if(!b)return D([]);for(let B of b){let C=H[`app/views/${B}.tsx`];for(let Y of C?.css??[]){let _=Bun.file(`${process.env.DIST_DIR}/client/${Y}`);W.push({id:Y,content:await _.text()})}}return D(W)},clientEntry:N,modulePreloadManifest:O,loaders:u,viewImportMap:X,viewModules:x,ogMap:j,cssManifest:K})}}catch(z){if(console.error(z),G.startsWith("/api"))return new Response(JSON.stringify({error:z.message}),{status:500,headers:{"Content-Type":"application/json"}});return $.onException?.(z),new Response(z.stack,{status:500})}}let d=(process.env.GEMI_COMPRESSION??"auto").toLowerCase()!=="off",M=Bun.serve({maxRequestBodySize:10737418240,fetch:async(U,G)=>{if(!U.headers.get("x-forwarded-for")){let z=G.requestIP(U);if(z)U.headers.set("x-forwarded-for",z.address)}let Q=await J(U,p);return d?F(U,Q):Q},idleTimeout:Number(process.env.SERVER_IDLE_TIMEOUT??10),port:process.env.PORT||5173});return v({port:M.port,rootDir:I}),M}export{VJ as httpProd};
|
|
4
4
|
|
|
5
5
|
//# debugId=5BD3C85C09F63E1D64756E2164756E21
|
|
@@ -2502,6 +2502,72 @@ if (typeof window !== "undefined" && process.env.NODE_ENV !== "test") {
|
|
|
2502
2502
|
const { componentTree = [] } = window.__GEMI_DATA__ ?? {};
|
|
2503
2503
|
for (const viewName of flattenComponentTree(componentTree)) viewImportMap[viewName] = lazy(() => loadViewModule(viewName));
|
|
2504
2504
|
}
|
|
2505
|
+
/**
|
|
2506
|
+
* How long hydration will wait for those modules before giving up on them.
|
|
2507
|
+
*
|
|
2508
|
+
* Only a load that never *settles* reaches this — a stalled HTTP/2 stream, a
|
|
2509
|
+
* service worker that never answers. A rejection is already handled. Without
|
|
2510
|
+
* a deadline that case costs the whole document: nothing hydrates, and
|
|
2511
|
+
* nothing is raised. Expiring it just puts the page back on the pre-#352 path
|
|
2512
|
+
* for one route, which is a bad outcome and not a dead one.
|
|
2513
|
+
*/
|
|
2514
|
+
var INITIAL_VIEW_MODULES_DEADLINE_MS = 2e3;
|
|
2515
|
+
/**
|
|
2516
|
+
* Resolves once the views the document was server-rendered with are in the
|
|
2517
|
+
* registry — which is what `init` waits for before it hydrates.
|
|
2518
|
+
*
|
|
2519
|
+
* Hydrating before then is what made a cold load blank its own content. The
|
|
2520
|
+
* server renders each route segment through a real component, so the shell
|
|
2521
|
+
* ships complete `<Suspense>` boundaries; the browser renders the same
|
|
2522
|
+
* segments through `lazy()`, so on the first client render every one of them
|
|
2523
|
+
* suspends. React keeps the server HTML up while a boundary is merely
|
|
2524
|
+
* suspended, but the moment any update reaches one — the module registry
|
|
2525
|
+
* announcing the chunk, an effect, a settling query — it gives up on that
|
|
2526
|
+
* boundary and shows the fallback instead, which for a view without a
|
|
2527
|
+
* `Loading` export is `null`. The page then sits with its layout and no
|
|
2528
|
+
* content until the chunk's `import()` and dictionaries resolve.
|
|
2529
|
+
*
|
|
2530
|
+
* What this buys is NOT a synchronous `lazy()`. `lazy` suspends on its first
|
|
2531
|
+
* render no matter what: the initializer calls the ctor, attaches `.then`,
|
|
2532
|
+
* and re-reads a status its callback only sets a microtask later, so even an
|
|
2533
|
+
* already-settled promise goes to `Pending` and throws. The render still
|
|
2534
|
+
* suspends here — it just suspends *untouched*. `loadViewModule` notifies its
|
|
2535
|
+
* listeners only on a view's FIRST registration, so once the module is in
|
|
2536
|
+
* `viewModules` the call `lazy` makes during hydration is a silent one, the
|
|
2537
|
+
* boundary sees no update, and React keeps the server HTML until it settles.
|
|
2538
|
+
*
|
|
2539
|
+
* The invariant to preserve, then, is "no first registration for a mounted
|
|
2540
|
+
* view happens during hydration" — not anything about how `lazy` resolves.
|
|
2541
|
+
* Notifying on every call, or memoizing the promise so the `isNew` guard
|
|
2542
|
+
* stops being the discriminator, would reintroduce the flash while leaving
|
|
2543
|
+
* this preload apparently intact.
|
|
2544
|
+
*
|
|
2545
|
+
* It is not free. The view chunks themselves are already `modulepreload`ed by
|
|
2546
|
+
* the shell, but `loadViewModule` also awaits `preloadDictionaries`, and
|
|
2547
|
+
* dictionary locale chunks are dynamic imports, which `collectModulePreloads`
|
|
2548
|
+
* deliberately leaves out of those hints. So hydration is gated on a
|
|
2549
|
+
* serially-discovered round trip — view chunk, parse, dictionary chunk — and
|
|
2550
|
+
* the layout's own handlers stay dead across it. That wait is deliberate
|
|
2551
|
+
* rather than incidental: a view whose dictionary is still in flight suspends
|
|
2552
|
+
* on `use()` inside this same boundary, which is the same blank arriving by a
|
|
2553
|
+
* different route. Warming the current locale's dictionaries from the shell
|
|
2554
|
+
* would buy the interactivity back; awaiting less here would not.
|
|
2555
|
+
*
|
|
2556
|
+
* Never rejects and never waits forever: a chunk that fails or hangs must
|
|
2557
|
+
* still leave the app to hydrate and surface the error through the route's
|
|
2558
|
+
* error boundary.
|
|
2559
|
+
*/
|
|
2560
|
+
var initialViewModulesReady = typeof window !== "undefined" && process.env.NODE_ENV !== "test" ? Promise.race([Promise.all(initialViewNames(window.__GEMI_DATA__).map((name) => loadViewModule(name).catch(() => null))), new Promise((resolve) => setTimeout(resolve, INITIAL_VIEW_MODULES_DEADLINE_MS))]) : Promise.resolve();
|
|
2561
|
+
/**
|
|
2562
|
+
* The view names the server rendered this document with — the same lookup
|
|
2563
|
+
* `ClientRouterProvider` seeds its route state from, so the two agree on what
|
|
2564
|
+
* the first render is going to mount.
|
|
2565
|
+
*/
|
|
2566
|
+
function initialViewNames(data) {
|
|
2567
|
+
if (!data?.router) return [];
|
|
2568
|
+
if (data.router.is404) return ["404"];
|
|
2569
|
+
return data.routeManifest?.[data.router.pathname] ?? ["404"];
|
|
2570
|
+
}
|
|
2505
2571
|
var ComponentsContext = createContext({
|
|
2506
2572
|
viewImportMap,
|
|
2507
2573
|
getViewModule
|
|
@@ -2920,6 +2986,6 @@ function useTheme() {
|
|
|
2920
2986
|
return context;
|
|
2921
2987
|
}
|
|
2922
2988
|
//#endregion
|
|
2923
|
-
export {
|
|
2989
|
+
export { Action as A, DEFAULT_STALE_TIME as B, useNavigate as C, ServerDataProvider as D, ServerDataContext as E, toVariantKey as F, Subject as H, applyParams as I, QueryConfigContext as L, useParams as M, RouteStateContext as N, useLocation as O, RouteStateProvider as P, QueryManagerContext as R, useSearchParams as S, I18nProvider as T, QueryError as V, registerDictionary as _, m as a, routeDataUrl as b, ClientRouterContext as c, ComponentsProvider as d, initialViewModulesReady as f, loadDictionaryForRender as g, loadDictionary as h, WebSocketContextProvider as i, createMemoryHistory as j, ProgressManager as k, ClientRouterProvider as l, subscribeViewModules as m, useTheme as n, RouteTransitionProvider as o, loadViewModule as p, WebSocketContext as r, useRouteTransition as s, ThemeProvider as t, ComponentsContext as u, setActiveLocale as v, I18nContext as w, useRoute as x, readRoutePayload as y, QueryManagerProvider as z };
|
|
2924
2990
|
|
|
2925
|
-
//# sourceMappingURL=ThemeProvider-
|
|
2991
|
+
//# sourceMappingURL=ThemeProvider-ByU4BQdL.js.map
|