docs-i18n 0.9.2 → 0.11.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/admin/app/lib/auth-client.ts +21 -0
- package/admin/app/lib/auth.server.ts +62 -0
- package/admin/app/routeTree.gen.ts +21 -3
- package/admin/app/routes/index.tsx +68 -8
- package/admin/app/routes/login.tsx +207 -0
- package/admin/app/server.ts +23 -0
- package/admin/app/styles.css +146 -0
- package/admin/app/worker.ts +18 -0
- package/admin/dist/client/assets/auth-client-DqJZaFZR.js +3 -0
- package/admin/dist/client/assets/login-CQjkiBAF.js +1 -0
- package/admin/dist/client/assets/main-bc5tcdGg.js +18 -0
- package/admin/dist/client/assets/routes-CTPOG_v1.js +3 -0
- package/admin/dist/client/assets/{styles-DJ6QEJmN.css → styles-zS0BbO7e.css} +1 -1
- package/admin/dist/client/assets/useNavigate-CEOVvMjz.js +1 -0
- package/admin/dist/server/assets/{react-dom-CpO9xk_L.js → __tanstack-start-server-fn-resolver-qK0Yfvti.js} +83 -507
- package/admin/dist/server/assets/_tanstack-start-manifest_v-BgMVPPt2.js +21 -0
- package/admin/dist/server/assets/adapter-DjXlUL1J.js +2253 -0
- package/admin/dist/server/assets/auth-client-CoUpyQIM.js +807 -0
- package/admin/dist/server/assets/auth-dSAIPjBw.js +72 -0
- package/admin/dist/server/assets/auth.server-BLVDnTCZ.js +31352 -0
- package/admin/dist/server/assets/bun-sqlite-dialect-C8OaCWSL-BNNY-FoT.js +154 -0
- package/admin/dist/server/assets/compiled-query-CnFG_BVV.js +6967 -0
- package/admin/dist/server/assets/d1-sqlite-dialect-sYHNqBte-Bjz-cybU.js +115 -0
- package/admin/dist/server/assets/dist-C3-e8E2B.js +215 -0
- package/admin/dist/server/assets/dist-CUzFWZag.js +6039 -0
- package/admin/dist/server/assets/{init-DJr2glb3.js → dist-DBv71kqn.js} +21 -381
- package/admin/dist/server/assets/error-CASJ5tIm.js +457 -0
- package/admin/dist/server/assets/error-codes-BhMTGvV6.js +1153 -0
- package/admin/dist/server/assets/init-CJJUsPDL.js +49 -0
- package/admin/dist/server/assets/job-manager-D9Ab9hgu.js +179 -0
- package/admin/dist/server/assets/{jobs-bQfYqSk7.js → jobs-DrEe9YOj.js} +18 -5
- package/admin/dist/server/assets/kysely-adapter-YC8RFPyc.js +2 -0
- package/admin/dist/server/assets/login-SqzTMYOZ.js +228 -0
- package/admin/dist/server/assets/migrator-ZpVZslbq.js +2926 -0
- package/admin/dist/server/assets/{misc-DOk3t9vs.js → misc-BSoYldBT.js} +22 -9
- package/admin/dist/server/assets/{models-CBb8Owe5.js → models-CoviNHUP.js} +1 -1
- package/admin/dist/server/assets/node-sqlite-dialect-BJIaP6lL.js +154 -0
- package/admin/dist/server/assets/{router-DlU_fGDK.js → router-D-82slI-.js} +23 -11
- package/admin/dist/server/assets/{routes-BcfX6iub.js → routes-B1pNmxF3.js} +43 -29
- package/admin/dist/server/assets/{routes-pIM0fgUO.js → routes-C9huiZHw.js} +56 -22
- package/admin/dist/server/assets/sqlite-adapter-CL2EidjD.js +69 -0
- package/admin/dist/server/assets/{start-BS52hm79.js → start-BiybVoR2.js} +1 -1
- package/admin/dist/server/assets/status-B1AGLvHn.js +162 -0
- package/admin/dist/server/assets/status-D7PU72hm.js +262 -0
- package/admin/dist/server/assets/string-B4XlckmJ.js +6 -0
- package/admin/dist/server/assets/useNavigate-0H08s_Q2.js +29 -0
- package/admin/dist/server/assets/useRouter-BXJvr8to.js +508 -0
- package/admin/dist/server/server.js +70 -90
- package/admin/package.json +6 -1
- package/admin/server/functions/auth.ts +89 -0
- package/admin/server/functions/jobs.ts +30 -2
- package/admin/server/functions/misc.ts +25 -5
- package/admin/server/functions/status.ts +52 -3
- package/admin/server/index.ts +1 -1
- package/admin/server/init.ts +21 -9
- package/admin/server/services/d1-status.ts +282 -0
- package/admin/vite.config.ts +29 -15
- package/admin/wrangler.jsonc +16 -0
- package/package.json +1 -1
- package/template/app/components/markdown/Markdown.tsx +7 -1
- package/template/app/utils/docs.server.ts +37 -4
- package/template/app/worker.ts +16 -0
- package/template/content/docs-i18n/en/cli.md +9 -5
- package/template/content/docs-i18n/en/deployment.md +85 -68
- package/template/dist/client/assets/{Doc-CGhUfH9r.js → Doc-BKO69_nz.js} +1 -1
- package/template/dist/client/assets/{DocsLayout-CoPL9BM9.js → DocsLayout-BGugXxEQ.js} +1 -1
- package/template/dist/client/assets/{FileTabs-DsPkEUu7.js → FileTabs-4fZriOj4.js} +1 -1
- package/template/dist/client/assets/{Footer-4faHyha8.js → Footer-DYh1AfWA.js} +1 -1
- package/template/dist/client/assets/{FrameworkContent-Cxg_X_EP.js → FrameworkContent-rVvjxASn.js} +1 -1
- package/template/dist/client/assets/{MarkdownHeadingContext-CwDqQdSh.js → MarkdownHeadingContext-CdvUDZFU.js} +4 -4
- package/template/dist/client/assets/{PostNotFound-1ZaWdycM.js → PostNotFound-WoSYGsGu.js} +1 -1
- package/template/dist/client/assets/{_basePickBy-FbrKkfHa.js → _basePickBy-Dd7GuR7A.js} +1 -1
- package/template/dist/client/assets/{_baseUniq-g6ljCkn8.js → _baseUniq-DMxQLGFI.js} +1 -1
- package/template/dist/client/assets/_lang-3AqGszEy.js +1 -0
- package/template/dist/client/assets/_lang._project-COkrIqzH.js +1 -0
- package/template/dist/client/assets/_lang._project._version-B8vRZczu.js +1 -0
- package/template/dist/client/assets/{_lang._project._version.docs-DjZ_USgK.js → _lang._project._version.docs-DokNGgvU.js} +1 -1
- package/template/dist/client/assets/{_lang._project._version.docs._-CNb1EMFX.js → _lang._project._version.docs._-CXCNZzOb.js} +1 -1
- package/template/dist/client/assets/_lang._project._version.docs._-DR0WSQEb.js +1 -0
- package/template/dist/client/assets/_lang._project._version.docs.framework._framework._-C_Grro8r.js +1 -0
- package/template/dist/client/assets/{_lang._project._version.docs.framework._framework.index-CqyVy6eq.js → _lang._project._version.docs.framework._framework.index-DsYjXRdj.js} +1 -1
- package/template/dist/client/assets/{_lang._project._version.docs.framework.index-S3Frbfn4.js → _lang._project._version.docs.framework.index-DQX1lBi3.js} +1 -1
- package/template/dist/client/assets/{_lang._project.docs-CkmM5v1V.js → _lang._project.docs-DsYQj9jI.js} +1 -1
- package/template/dist/client/assets/_lang._project.docs._-DlM_D6DD.js +1 -0
- package/template/dist/client/assets/{_lang._project.docs._-BHYKQj_2.js → _lang._project.docs._-l2tTjx80.js} +1 -1
- package/template/dist/client/assets/_lang.blog-CEwEtalL.js +1 -0
- package/template/dist/client/assets/_lang.blog-D6YGC3tK.js +1 -0
- package/template/dist/client/assets/_lang.blog._-DgHu4oLy.js +1 -0
- package/template/dist/client/assets/{_lang.blog._-bXJwKw9E.js → _lang.blog._-Umz18sQE.js} +1 -1
- package/template/dist/client/assets/_lang.blog.index-C8LKUFtD.js +1 -0
- package/template/dist/client/assets/{_lang.blog.index-CdR5PZOo.js → _lang.blog.index-DzUqpOBE.js} +1 -1
- package/template/dist/client/assets/{_lang.docs-Cp3wmc9k.js → _lang.docs-CUh3R7DD.js} +1 -1
- package/template/dist/client/assets/{_lang.docs._-0bwIpeOn.js → _lang.docs._-DlgTPy3s.js} +1 -1
- package/template/dist/client/assets/_lang.docs._-DmaQE7lx.js +1 -0
- package/template/dist/client/assets/_lang.docs.framework._framework._-B4C4uDFp.js +1 -0
- package/template/dist/client/assets/{_lang.docs.framework._framework.index-BLgwIvQA.js → _lang.docs.framework._framework.index-DTg6Xd3p.js} +1 -1
- package/template/dist/client/assets/{_lang.docs.framework.index-CzW7Dul3.js → _lang.docs.framework.index-BQ2enasl.js} +1 -1
- package/template/dist/client/assets/{arc-B4lRpBfi.js → arc-DGPgC_QF.js} +1 -1
- package/template/dist/client/assets/{architectureDiagram-2XIMDMQ5-Coq1Gceq.js → architectureDiagram-2XIMDMQ5-yI53_GAi.js} +1 -1
- package/template/dist/client/assets/{blockDiagram-WCTKOSBZ-C7BGTzDN.js → blockDiagram-WCTKOSBZ-C3tr24zy.js} +1 -1
- package/template/dist/client/assets/{c4Diagram-IC4MRINW-xTBVTs0q.js → c4Diagram-IC4MRINW-DOA-mowm.js} +1 -1
- package/template/dist/client/assets/channel-DzZD7dUQ.js +1 -0
- package/template/dist/client/assets/{chunk-4BX2VUAB-DUUHBu75.js → chunk-4BX2VUAB-B6NSnNJJ.js} +1 -1
- package/template/dist/client/assets/{chunk-55IACEB6-MUxF_n9_.js → chunk-55IACEB6-CWYwArBH.js} +1 -1
- package/template/dist/client/assets/{chunk-FMBD7UC4-BWh6wvYo.js → chunk-FMBD7UC4-DSyn2wIW.js} +1 -1
- package/template/dist/client/assets/{chunk-JSJVCQXG-CLUdUV5u.js → chunk-JSJVCQXG-D83nm5W0.js} +1 -1
- package/template/dist/client/assets/{chunk-KX2RTZJC-CAlz_cXA.js → chunk-KX2RTZJC-DD7fN9e9.js} +1 -1
- package/template/dist/client/assets/{chunk-NQ4KR5QH-BaYKfUVy.js → chunk-NQ4KR5QH-C3YlYiU5.js} +1 -1
- package/template/dist/client/assets/{chunk-QZHKN3VN-NxDloxi5.js → chunk-QZHKN3VN-B7wBEuCG.js} +1 -1
- package/template/dist/client/assets/{chunk-WL4C6EOR-C2Ncbi5S.js → chunk-WL4C6EOR-ByA1FloT.js} +1 -1
- package/template/dist/client/assets/classDiagram-VBA2DB6C-CRozKaUD.js +1 -0
- package/template/dist/client/assets/classDiagram-v2-RAHNMMFH-CRozKaUD.js +1 -0
- package/template/dist/client/assets/clone-CGnOEl4E.js +1 -0
- package/template/dist/client/assets/{cose-bilkent-S5V4N54A-Ct9-ZJcv.js → cose-bilkent-S5V4N54A-nt_sXfWc.js} +1 -1
- package/template/dist/client/assets/{dagre-KLK3FWXG-u9dz8dcq.js → dagre-KLK3FWXG-DUsyMTPd.js} +1 -1
- package/template/dist/client/assets/{diagram-E7M64L7V-BXmcaktT.js → diagram-E7M64L7V-D5SAypX0.js} +1 -1
- package/template/dist/client/assets/{diagram-IFDJBPK2-CRlP5SeV.js → diagram-IFDJBPK2-WhP5c8Vz.js} +1 -1
- package/template/dist/client/assets/{diagram-P4PSJMXO-B9rJcj_H.js → diagram-P4PSJMXO-AMrwIlhf.js} +1 -1
- package/template/dist/client/assets/{erDiagram-INFDFZHY-DX-vee6w.js → erDiagram-INFDFZHY-BxifSpCV.js} +1 -1
- package/template/dist/client/assets/{flowDiagram-PKNHOUZH-CoBCSOFc.js → flowDiagram-PKNHOUZH-BMAowE9I.js} +1 -1
- package/template/dist/client/assets/{ganttDiagram-A5KZAMGK-BlqU_ghi.js → ganttDiagram-A5KZAMGK-Bay-0iRq.js} +1 -1
- package/template/dist/client/assets/{gitGraphDiagram-K3NZZRJ6-CntCsuti.js → gitGraphDiagram-K3NZZRJ6-Va91W3gw.js} +1 -1
- package/template/dist/client/assets/{graph-CZaxZzO8.js → graph-CbBYObK_.js} +1 -1
- package/template/dist/client/assets/{index-XelhTkgl.js → index-CF6qz2tX.js} +1 -1
- package/template/dist/client/assets/{infoDiagram-LFFYTUFH-_jCC8Jtt.js → infoDiagram-LFFYTUFH-Byd5C-4U.js} +1 -1
- package/template/dist/client/assets/{ishikawaDiagram-PHBUUO56-D3m_r2ig.js → ishikawaDiagram-PHBUUO56-DxOKnE1v.js} +1 -1
- package/template/dist/client/assets/{journeyDiagram-4ABVD52K-CvRNm03C.js → journeyDiagram-4ABVD52K-IRmt7RI4.js} +1 -1
- package/template/dist/client/assets/{kanban-definition-K7BYSVSG-nQcLuNSy.js → kanban-definition-K7BYSVSG-BjTVXn-R.js} +1 -1
- package/template/dist/client/assets/{layout-DZIdDq97.js → layout-Bbx6A0bC.js} +1 -1
- package/template/dist/client/assets/{linear-C2JcF5ss.js → linear-Df2eAW4A.js} +1 -1
- package/template/dist/client/assets/{main-C8MldI1o.js → main-DqZtiCro.js} +2 -2
- package/template/dist/client/assets/{mermaid.core-DlB0QBo2.js → mermaid.core-BIoiBcAA.js} +4 -4
- package/template/dist/client/assets/{mindmap-definition-YRQLILUH-D9OjtrBW.js → mindmap-definition-YRQLILUH-Btzz0iIP.js} +1 -1
- package/template/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/template/dist/client/assets/{pieDiagram-SKSYHLDU-DoYJZfNJ.js → pieDiagram-SKSYHLDU-C2amrGtU.js} +1 -1
- package/template/dist/client/assets/{quadrantDiagram-337W2JSQ-Bs71YHJr.js → quadrantDiagram-337W2JSQ-EVgH9VuN.js} +1 -1
- package/template/dist/client/assets/{react-C0klD_r9.js → react-qvbbiZob.js} +1 -1
- package/template/dist/client/assets/{requirementDiagram-Z7DCOOCP-BWvQcALn.js → requirementDiagram-Z7DCOOCP-BkYPbRis.js} +1 -1
- package/template/dist/client/assets/{sankeyDiagram-WA2Y5GQK-CiGy1SQP.js → sankeyDiagram-WA2Y5GQK-B5EIaP-h.js} +1 -1
- package/template/dist/client/assets/{sequenceDiagram-2WXFIKYE-DRZim8vR.js → sequenceDiagram-2WXFIKYE-BC33VGOc.js} +1 -1
- package/template/dist/client/assets/{stateDiagram-RAJIS63D-BoqzJeL7.js → stateDiagram-RAJIS63D-DiKvWUYb.js} +1 -1
- package/template/dist/client/assets/stateDiagram-v2-FVOUBMTO-DjKMPYGe.js +1 -0
- package/template/dist/client/assets/{timeline-definition-YZTLITO2-CyvR95Wz.js → timeline-definition-YZTLITO2-QiFlgbRA.js} +1 -1
- package/template/dist/client/assets/{treemap-KZPCXAKY-DkXgGvs_.js → treemap-KZPCXAKY-BOYbyS9G.js} +1 -1
- package/template/dist/client/assets/{vennDiagram-LZ73GAT5-CVpGZu6p.js → vennDiagram-LZ73GAT5-CqmW7j4r.js} +1 -1
- package/template/dist/client/assets/{xychartDiagram-JWTSCODW-Cjqbi_DU.js → xychartDiagram-JWTSCODW-gj6oWX8l.js} +1 -1
- package/template/dist/server/assets/{Doc-DKBxQduk.js → Doc-9tJiX5y6.js} +3 -3
- package/template/dist/server/assets/{DocsLayout-CQfCTal3.js → DocsLayout-BTjhU_W5.js} +2 -2
- package/template/dist/server/assets/{Footer-Dcw5XVqX.js → Footer-CefTi2yh.js} +1 -1
- package/template/dist/server/assets/{FrameworkContent-OJfvCBHi.js → FrameworkContent-BkJvuP04.js} +2 -2
- package/template/dist/server/assets/{MarkdownHeadingContext-h4SfZq-C.js → MarkdownHeadingContext-37oQpb36.js} +8 -4
- package/template/dist/server/assets/{PostNotFound-DRJpnWrj.js → PostNotFound-BqBZf83v.js} +1 -1
- package/template/dist/server/assets/{_basePickBy-DJ9gzwF8.js → _basePickBy-DZ3TPUta.js} +2 -2
- package/template/dist/server/assets/{_baseUniq-CezmbvU2.js → _baseUniq-DKicWTQT.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs-CE_Z2zvG.js → _lang._project._version.docs-DOTNQiDb.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs-sJvASz_e.js → _lang._project._version.docs-U-t4mk5_.js} +3 -3
- package/template/dist/server/assets/{_lang._project._version.docs._-B2vf_QGY.js → _lang._project._version.docs._-DMgnElWM.js} +5 -5
- package/template/dist/server/assets/{_lang._project._version.docs._-CQcamDns.js → _lang._project._version.docs._-DSg82-Ug.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework._-54LEIllb.js → _lang._project._version.docs.framework._framework._-DbeN6toN.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework._-Dmn8xCf0.js → _lang._project._version.docs.framework._framework._-kBw_9L-F.js} +5 -5
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework.index-COKb9ffR.js → _lang._project._version.docs.framework._framework.index-Bsyj0DD5.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs.framework.index-DoEddI6Z.js → _lang._project._version.docs.framework.index-CmLAP_Io.js} +1 -1
- package/template/dist/server/assets/{_lang._project.docs-BjOhmwp6.js → _lang._project.docs-Bb4ZZ_jr.js} +3 -3
- package/template/dist/server/assets/{_lang._project.docs-dl8MxaGg.js → _lang._project.docs-BsnkRf-R.js} +1 -1
- package/template/dist/server/assets/{_lang._project.docs._-hSRVM-U7.js → _lang._project.docs._-ChrpJ61j.js} +5 -5
- package/template/dist/server/assets/{_lang._project.docs._-Bq0ajlaH.js → _lang._project.docs._-axRfm8vS.js} +1 -1
- package/template/dist/server/assets/{_lang.blog-Dk36D6Ol.js → _lang.blog-8j6IvzvQ.js} +2 -2
- package/template/dist/server/assets/{_lang.blog._-Cm8zXsPs.js → _lang.blog._-BPzP97Ac.js} +2 -2
- package/template/dist/server/assets/{_lang.blog._-D4CEjSkM.js → _lang.blog._-CjgFipz7.js} +1 -1
- package/template/dist/server/assets/{_lang.blog.index-orWcAgbi.js → _lang.blog._-DNX8UglA.js} +2 -2
- package/template/dist/server/assets/{_lang.blog.index-ZhMds6Jp.js → _lang.blog.index-CeZnMJBi.js} +1 -1
- package/template/dist/server/assets/{_lang.blog.index-Dfy48Gbt.js → _lang.blog.index-Dk5fYp4Q.js} +1 -1
- package/template/dist/server/assets/{_lang.blog._-A8h17fpC.js → _lang.blog.index-DzVKqoC4.js} +2 -2
- package/template/dist/server/assets/{_lang.docs-CAEkhcnT.js → _lang.docs-B4StnHMb.js} +3 -3
- package/template/dist/server/assets/{_lang.docs-CB1sGjRO.js → _lang.docs-DSB3iI6a.js} +1 -1
- package/template/dist/server/assets/{_lang.docs._-Zbv8OwJU.js → _lang.docs._--c0In1AT.js} +5 -5
- package/template/dist/server/assets/{_lang.docs._-DEX6FutM.js → _lang.docs._-S-y4-3Qn.js} +1 -1
- package/template/dist/server/assets/{_lang.docs.framework._framework._-BnpTV3KM.js → _lang.docs.framework._framework._-BFWLyU2h.js} +1 -1
- package/template/dist/server/assets/{_lang.docs.framework._framework._-4s4-ZCYh.js → _lang.docs.framework._framework._-Be0U7cDg.js} +5 -5
- package/template/dist/server/assets/{_lang.docs.framework._framework.index-BLryfsl2.js → _lang.docs.framework._framework.index-BZ512aSk.js} +1 -1
- package/template/dist/server/assets/{_lang.docs.framework.index-DGxWQH6q.js → _lang.docs.framework.index-U8z3j4kz.js} +1 -1
- package/template/dist/server/assets/{_tanstack-start-manifest_v-CURwM8Tc.js → _tanstack-start-manifest_v-DXpQ8503.js} +1 -1
- package/template/dist/server/assets/{arc-BwftnT5H.js → arc-B4h6h_n6.js} +1 -1
- package/template/dist/server/assets/{architecture-PBZL5I3N-KbDVC6gM.js → architecture-PBZL5I3N-CUwqLXkR.js} +6 -6
- package/template/dist/server/assets/{architectureDiagram-2XIMDMQ5-BoLvWxb3.js → architectureDiagram-2XIMDMQ5-CuCoxdBe.js} +6 -6
- package/template/dist/server/assets/{blockDiagram-WCTKOSBZ-GPFcXs-f.js → blockDiagram-WCTKOSBZ-D5PsUOim.js} +6 -6
- package/template/dist/server/assets/{blog.server-Bbk2Ifog.js → blog.server-WqzZ00iA.js} +1 -1
- package/template/dist/server/assets/{c4Diagram-IC4MRINW-EQwQCspo.js → c4Diagram-IC4MRINW-CXy5xO3o.js} +2 -2
- package/template/dist/server/assets/{channel-CxvwuPH7.js → channel-D0l-mWaF.js} +1 -1
- package/template/dist/server/assets/{chunk-4BX2VUAB-DUgcw5ei.js → chunk-4BX2VUAB-M7FVHMss.js} +1 -1
- package/template/dist/server/assets/{chunk-55IACEB6-Cn15uD91.js → chunk-55IACEB6-D_gDAje5.js} +1 -1
- package/template/dist/server/assets/{chunk-FMBD7UC4-Ck3iyLPu.js → chunk-FMBD7UC4-B5Bebx-Y.js} +1 -1
- package/template/dist/server/assets/{chunk-JSJVCQXG-VAT8yncE.js → chunk-JSJVCQXG-DxBkq-uB.js} +1 -1
- package/template/dist/server/assets/{chunk-KX2RTZJC-B1bd2VmA.js → chunk-KX2RTZJC-BMHm1EGi.js} +1 -1
- package/template/dist/server/assets/{chunk-NQ4KR5QH-CR67GG9C.js → chunk-NQ4KR5QH-Cp28pTwT.js} +3 -3
- package/template/dist/server/assets/{chunk-QZHKN3VN-B9SSazM4.js → chunk-QZHKN3VN-Bq5GZqaR.js} +1 -1
- package/template/dist/server/assets/{chunk-WL4C6EOR-DZ4Pjuao.js → chunk-WL4C6EOR-C9Nj5GdW.js} +5 -5
- package/template/dist/server/assets/{classDiagram-VBA2DB6C-CA6_4Wb2.js → classDiagram-VBA2DB6C-CUchv9T5.js} +6 -6
- package/template/dist/server/assets/{classDiagram-v2-RAHNMMFH-CA6_4Wb2.js → classDiagram-v2-RAHNMMFH-CUchv9T5.js} +6 -6
- package/template/dist/server/assets/{clone-DJHP_iVy.js → clone-CJcTi58S.js} +1 -1
- package/template/dist/server/assets/{cose-bilkent-S5V4N54A-DtU-cN6W.js → cose-bilkent-S5V4N54A-CxvCMhN_.js} +1 -1
- package/template/dist/server/assets/{dagre-KLK3FWXG-yZYrVU4p.js → dagre-KLK3FWXG-B5bQP7FL.js} +6 -6
- package/template/dist/server/assets/{diagram-E7M64L7V-8Yyz0aw0.js → diagram-E7M64L7V-NjHca90S.js} +8 -8
- package/template/dist/server/assets/{diagram-IFDJBPK2-DcxFYI3M.js → diagram-IFDJBPK2-CoTCfBKd.js} +6 -6
- package/template/dist/server/assets/{diagram-P4PSJMXO-CehxUcI0.js → diagram-P4PSJMXO-DHvGgYjH.js} +6 -6
- package/template/dist/server/assets/{docs.server-7EUAkSBN.js → docs.server-BSH7IvIU.js} +3884 -444
- package/template/dist/server/assets/{erDiagram-INFDFZHY-Bu2p1_Pj.js → erDiagram-INFDFZHY-01crajKr.js} +4 -4
- package/template/dist/server/assets/{flowDiagram-PKNHOUZH-B_eKR7I0.js → flowDiagram-PKNHOUZH-BkUQ_vxg.js} +6 -6
- package/template/dist/server/assets/{ganttDiagram-A5KZAMGK-DP6YEZof.js → ganttDiagram-A5KZAMGK-DvrO-w2P.js} +2 -2
- package/template/dist/server/assets/{gitGraph-HDMCJU4V-Bt0qhVL4.js → gitGraph-HDMCJU4V-h9JNaxB7.js} +6 -6
- package/template/dist/server/assets/{gitGraphDiagram-K3NZZRJ6-DwvkdYrg.js → gitGraphDiagram-K3NZZRJ6-BoKm6Fm-.js} +7 -7
- package/template/dist/server/assets/{graph-BVFNe_k5.js → graph-BoxbfI7Z.js} +2 -2
- package/template/dist/server/assets/{index-BvagF3L5.js → index-Jfzi6SZW.js} +2 -2
- package/template/dist/server/assets/{info-3K5VOQVL-CFejRnvB.js → info-3K5VOQVL-DgaSHqkS.js} +6 -6
- package/template/dist/server/assets/{infoDiagram-LFFYTUFH-D0v9uyXI.js → infoDiagram-LFFYTUFH-DgV5W8-I.js} +5 -5
- package/template/dist/server/assets/{ishikawaDiagram-PHBUUO56-DZumspL4.js → ishikawaDiagram-PHBUUO56-CqlMQ0Fq.js} +1 -1
- package/template/dist/server/assets/{journeyDiagram-4ABVD52K-nRp_-qZp.js → journeyDiagram-4ABVD52K-D6ySTub8.js} +4 -4
- package/template/dist/server/assets/{kanban-definition-K7BYSVSG-BMKyyzjt.js → kanban-definition-K7BYSVSG-BT8m7Cwk.js} +2 -2
- package/template/dist/server/assets/{layout-mpiN5R-5.js → layout-CkYcErfn.js} +4 -4
- package/template/dist/server/assets/{linear-CqNYgjEx.js → linear-F_0dWGZL.js} +1 -1
- package/template/dist/server/assets/{mermaid-parser.core-B8Uu3QZY.js → mermaid-parser.core-q5MdUJuo.js} +11 -11
- package/template/dist/server/assets/{mermaid.core-BI3nMhNO.js → mermaid.core-DOWTODR1.js} +31 -31
- package/template/dist/server/assets/{mindmap-definition-YRQLILUH-DCoFqLPh.js → mindmap-definition-YRQLILUH-BQxlQqn-.js} +3 -3
- package/template/dist/server/assets/{ordinal-Bcam90FY.js → ordinal-CxptdPJm.js} +1 -1
- package/template/dist/server/assets/{packet-RMMSAZCW-djgonfKN.js → packet-RMMSAZCW-D8FkLZuP.js} +6 -6
- package/template/dist/server/assets/{pie-UPGHQEXC-Dug2t-PE.js → pie-UPGHQEXC-Diw2fHLk.js} +6 -6
- package/template/dist/server/assets/{pieDiagram-SKSYHLDU-CS0_hW4w.js → pieDiagram-SKSYHLDU-B1J4UJZ7.js} +8 -8
- package/template/dist/server/assets/{quadrantDiagram-337W2JSQ-BpQNM0zu.js → quadrantDiagram-337W2JSQ-BvjKLapg.js} +2 -2
- package/template/dist/server/assets/{radar-KQ55EAFF-3ir2W9Wi.js → radar-KQ55EAFF-CcBdPU3n.js} +6 -6
- package/template/dist/server/assets/{requirementDiagram-Z7DCOOCP-D92RyjV4.js → requirementDiagram-Z7DCOOCP-Bgr_wnAs.js} +3 -3
- package/template/dist/server/assets/{router-DK1vpPhv.js → router-DxwPl-Dc.js} +18 -18
- package/template/dist/server/assets/{sankeyDiagram-WA2Y5GQK-DCPRB-xO.js → sankeyDiagram-WA2Y5GQK-B0UwtyW3.js} +2 -2
- package/template/dist/server/assets/{sequenceDiagram-2WXFIKYE-C1ab2VvU.js → sequenceDiagram-2WXFIKYE-BbxQJHjO.js} +3 -3
- package/template/dist/server/assets/{stateDiagram-RAJIS63D-GhG1G3ff.js → stateDiagram-RAJIS63D-Cg-uJ_UO.js} +8 -8
- package/template/dist/server/assets/{stateDiagram-v2-FVOUBMTO-C-KtMadV.js → stateDiagram-v2-FVOUBMTO-BWVPrqfa.js} +4 -4
- package/template/dist/server/assets/{timeline-definition-YZTLITO2-DyfAQCd4.js → timeline-definition-YZTLITO2-DCSJT2WT.js} +2 -2
- package/template/dist/server/assets/{treemap-KZPCXAKY-Cn0Cw4Cl.js → treemap-KZPCXAKY-a0nhlKgx.js} +6 -6
- package/template/dist/server/assets/{vennDiagram-LZ73GAT5-D2Ak5JUa.js → vennDiagram-LZ73GAT5-Bk2HQEQq.js} +1 -1
- package/template/dist/server/assets/{xychartDiagram-JWTSCODW-DqoBOs1L.js → xychartDiagram-JWTSCODW-C4svHkt_.js} +3 -3
- package/template/dist/server/server.js +16 -16
- package/template/package.json +2 -0
- package/template/vite.config.ts +33 -18
- package/template/wrangler.jsonc +2 -2
- package/admin/dist/client/assets/main-CSFhgz4p.js +0 -17
- package/admin/dist/client/assets/routes-C6bCOSX-.js +0 -3
- package/admin/dist/server/assets/_tanstack-start-manifest_v-BE5XHVZ2.js +0 -17
- package/admin/dist/server/assets/redirect-DtfSYi2g.js +0 -51
- package/admin/dist/server/assets/status-CZz8Rs_7.js +0 -81
- package/template/dist/client/assets/_lang-Cpuy5xmU.js +0 -1
- package/template/dist/client/assets/_lang._project-DBdR04In.js +0 -1
- package/template/dist/client/assets/_lang._project._version-CtCLMJs2.js +0 -1
- package/template/dist/client/assets/_lang._project._version.docs._-CxgRZ17Q.js +0 -1
- package/template/dist/client/assets/_lang._project._version.docs.framework._framework._-Qph6wahA.js +0 -1
- package/template/dist/client/assets/_lang._project.docs._-C_ZfXEJ7.js +0 -1
- package/template/dist/client/assets/_lang.blog-BcRmhv23.js +0 -1
- package/template/dist/client/assets/_lang.blog-C5Aa7k5r.js +0 -1
- package/template/dist/client/assets/_lang.blog._-BVw4vhtF.js +0 -1
- package/template/dist/client/assets/_lang.blog.index-Y35iFzkp.js +0 -1
- package/template/dist/client/assets/_lang.docs._-B9hwwoTY.js +0 -1
- package/template/dist/client/assets/_lang.docs.framework._framework._-BENbKZIu.js +0 -1
- package/template/dist/client/assets/channel-C_1F7tzH.js +0 -1
- package/template/dist/client/assets/classDiagram-VBA2DB6C-CqViWWFw.js +0 -1
- package/template/dist/client/assets/classDiagram-v2-RAHNMMFH-CqViWWFw.js +0 -1
- package/template/dist/client/assets/clone-EeiNAO_N.js +0 -1
- package/template/dist/client/assets/ordinal-BENe2yWM.js +0 -1
- package/template/dist/client/assets/stateDiagram-v2-FVOUBMTO-CJYWvllO.js +0 -1
- /package/admin/dist/server/assets/{createServerRpc-DJq9yo-B.js → createServerRpc-Cyyxq9HQ.js} +0 -0
|
@@ -107,22 +107,31 @@ jobs:
|
|
|
107
107
|
│ Development (local) │
|
|
108
108
|
│ │
|
|
109
109
|
│ docs-i18n admin ──→ Pre-built Node.js server (port 3456)│
|
|
110
|
-
│ docs-i18n site ──→
|
|
110
|
+
│ docs-i18n site ──→ Pre-built Node.js server (port 3000)│
|
|
111
|
+
│ docs-i18n site --custom ──→ Vite dev server (port 3000) │
|
|
111
112
|
│ ↕ reads content/ + .cache/ │
|
|
112
113
|
└──────────────────────────────────────────────────────────┘
|
|
113
114
|
|
|
114
115
|
┌──────────────────────────────────────────────────────────┐
|
|
115
116
|
│ Production (Cloudflare Workers) │
|
|
116
117
|
│ │
|
|
117
|
-
│ docs-i18n site
|
|
118
|
-
│
|
|
119
|
-
│
|
|
118
|
+
│ docs-i18n site upload ──→ D1 (content + translations) │
|
|
119
|
+
│ DOCS_I18N_CF=1 vite build ──→ CF Workers bundle │
|
|
120
|
+
│ wrangler deploy ──→ CF Workers (SSR + D1) │
|
|
120
121
|
│ │
|
|
121
|
-
│ Request → Worker →
|
|
122
|
-
│
|
|
122
|
+
│ Request → Worker → D1 content → SSR render → response │
|
|
123
|
+
│ CF Assets serves static files │
|
|
123
124
|
└──────────────────────────────────────────────────────────┘
|
|
124
125
|
```
|
|
125
126
|
|
|
127
|
+
### Site startup modes
|
|
128
|
+
|
|
129
|
+
| Mode | Command | Speed | Use case |
|
|
130
|
+
| --- | --- | --- | --- |
|
|
131
|
+
| Pre-built | `docs-i18n site` | Instant (<1s) | Default for local dev, reads filesystem |
|
|
132
|
+
| Custom/dev | `docs-i18n site --custom` | ~3s | When you need Vite HMR or custom components |
|
|
133
|
+
| CF Workers | `DOCS_I18N_CF=1 vite build` + `wrangler deploy` | Production | SSR on the edge with D1 |
|
|
134
|
+
|
|
126
135
|
## Admin Dashboard
|
|
127
136
|
|
|
128
137
|
The admin dashboard is pre-built and requires no additional dependencies. It runs as a local Node.js server.
|
|
@@ -135,88 +144,96 @@ npx docs-i18n admin --port 4000
|
|
|
135
144
|
|
|
136
145
|
It reads your `docs-i18n.config.ts` to discover projects, versions, and languages.
|
|
137
146
|
|
|
138
|
-
##
|
|
147
|
+
## Deploying to Cloudflare Workers
|
|
139
148
|
|
|
140
|
-
|
|
149
|
+
The documentation site can be deployed to Cloudflare Workers for production SSR with edge performance. Content is served from D1, static assets from CF Assets.
|
|
141
150
|
|
|
142
|
-
###
|
|
151
|
+
### Step-by-step deployment
|
|
143
152
|
|
|
144
|
-
|
|
153
|
+
#### 1. Create a D1 database
|
|
145
154
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
4. The content is reassembled: translated nodes use the D1 cache value, untranslated nodes fall back to the original English text.
|
|
150
|
-
|
|
151
|
-
### Setup
|
|
155
|
+
```bash
|
|
156
|
+
wrangler d1 create docs-i18n-db
|
|
157
|
+
```
|
|
152
158
|
|
|
153
|
-
|
|
159
|
+
Note the `database_id` from the output.
|
|
160
|
+
|
|
161
|
+
#### 2. Create `wrangler.jsonc` in your project root
|
|
162
|
+
|
|
163
|
+
```jsonc
|
|
164
|
+
{
|
|
165
|
+
"name": "my-docs-site",
|
|
166
|
+
"compatibility_date": "2025-01-01",
|
|
167
|
+
"compatibility_flags": ["nodejs_compat_v2"],
|
|
168
|
+
"main": "./app/worker.ts",
|
|
169
|
+
"assets": {
|
|
170
|
+
"directory": "dist/client"
|
|
171
|
+
},
|
|
172
|
+
"d1_databases": [
|
|
173
|
+
{
|
|
174
|
+
"binding": "DB",
|
|
175
|
+
"database_name": "docs-i18n-db",
|
|
176
|
+
"database_id": "your-database-id-here"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
```
|
|
154
181
|
|
|
155
|
-
|
|
182
|
+
#### 3. Upload content to D1
|
|
156
183
|
|
|
157
184
|
```bash
|
|
158
|
-
|
|
159
|
-
|
|
185
|
+
docs-i18n site upload --db docs-i18n-db
|
|
186
|
+
```
|
|
160
187
|
|
|
161
|
-
|
|
162
|
-
sqlite3 .cache/translations.db ".dump translations" > translations.sql
|
|
188
|
+
This walks your `content/` directory and inserts all markdown files + config into the D1 database.
|
|
163
189
|
|
|
164
|
-
|
|
165
|
-
|
|
190
|
+
#### 4. Build for CF Workers
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
DOCS_I18N_CF=1 docs-i18n site build
|
|
166
194
|
```
|
|
167
195
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
value TEXT NOT NULL,
|
|
175
|
-
created_at INTEGER NOT NULL DEFAULT (unixepoch()),
|
|
176
|
-
updated_at INTEGER NOT NULL DEFAULT (unixepoch()),
|
|
177
|
-
PRIMARY KEY (lang, key)
|
|
178
|
-
);
|
|
196
|
+
The `DOCS_I18N_CF=1` flag enables the `@cloudflare/vite-plugin`, producing a CF Workers-compatible bundle instead of a Node.js one.
|
|
197
|
+
|
|
198
|
+
#### 5. Deploy
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
wrangler deploy
|
|
179
202
|
```
|
|
180
203
|
|
|
181
|
-
|
|
204
|
+
Your site is now live on `https://your-worker.workers.dev`.
|
|
182
205
|
|
|
183
|
-
|
|
184
|
-
import { createTranslator } from 'docs-i18n/serve';
|
|
206
|
+
### How it works
|
|
185
207
|
|
|
186
|
-
|
|
208
|
+
- **Worker entry** (`app/worker.ts`): Receives requests, injects the D1 binding into `globalThis.__D1_DB`, then delegates to TanStack Start's server entry for SSR.
|
|
209
|
+
- **Content loading**: The server auto-detects D1 via `globalThis.__D1_DB`. When available, it uses `createD1Loader` instead of the filesystem loader.
|
|
210
|
+
- **Static assets**: CSS, JS, fonts, and images are served directly by CF Assets from `dist/client/`.
|
|
211
|
+
- **SSR**: Full server-side rendering with streamed HTML responses. The markdown rendering uses `dangerouslySetInnerHTML` as a fallback on CF Workers (since `html-react-parser`'s DOM-based parser isn't available), with full client-side hydration.
|
|
187
212
|
|
|
188
|
-
|
|
189
|
-
export async function getTranslatedDoc(
|
|
190
|
-
repo: string,
|
|
191
|
-
branch: string,
|
|
192
|
-
filePath: string,
|
|
193
|
-
lang: string,
|
|
194
|
-
env: { DB: D1Database },
|
|
195
|
-
) {
|
|
196
|
-
// Fetch the English markdown from GitHub
|
|
197
|
-
const enMarkdown = await fetchFromGitHub(repo, branch, filePath);
|
|
213
|
+
### Performance
|
|
198
214
|
|
|
199
|
-
|
|
200
|
-
|
|
215
|
+
- D1 content queries typically complete in <10ms.
|
|
216
|
+
- Worker startup time is ~15-20ms (cold start).
|
|
217
|
+
- Static assets are served from CF's edge CDN with long cache headers.
|
|
218
|
+
- SSR responses include full HTML content for SEO and fast initial render.
|
|
201
219
|
|
|
202
|
-
|
|
203
|
-
const translated = await translator.translate(enMarkdown, lang, env.DB);
|
|
204
|
-
return translated;
|
|
205
|
-
}
|
|
206
|
-
```
|
|
220
|
+
## Runtime Translation with D1
|
|
207
221
|
|
|
208
|
-
|
|
222
|
+
For non-English content, docs-i18n provides runtime translation assembly. The site loads English source from D1, then assembles translated content by looking up cached translations.
|
|
209
223
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
224
|
+
### How it works
|
|
225
|
+
|
|
226
|
+
1. The English markdown is loaded from the D1 `content` table.
|
|
227
|
+
2. For non-English requests, the `assemble()` function from `docs-i18n` parses the markdown into nodes and looks up translations by MD5 key in the `translations` table.
|
|
228
|
+
3. Translated nodes use the cached value; untranslated nodes fall back to the original English text.
|
|
229
|
+
4. The assembled content is rendered via SSR.
|
|
230
|
+
|
|
231
|
+
### Uploading translations
|
|
216
232
|
|
|
217
|
-
|
|
233
|
+
After running `docs-i18n translate` locally, upload the translation cache to D1:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
docs-i18n site upload --db docs-i18n-db
|
|
237
|
+
```
|
|
218
238
|
|
|
219
|
-
|
|
220
|
-
- English content (`lang === 'en'`) short-circuits immediately without parsing or querying.
|
|
221
|
-
- The parser runs on every request since the English source is fetched at runtime. For heavy traffic, consider caching the translated output at the edge.
|
|
222
|
-
- Untranslated nodes gracefully fall back to English, so partial translations work without errors.
|
|
239
|
+
This uploads both content files and the translation cache (sources + translations tables).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as C,o as E,j as e,r as l,s as W,t as A}from"./main-
|
|
1
|
+
import{z as C,o as E,j as e,r as l,s as W,t as A}from"./main-DqZtiCro.js";import{u as S,a as L,b as T}from"./DocsLayout-BGugXxEQ.js";import{B as O,r as U,F as $,M as V,a as _}from"./MarkdownHeadingContext-CdvUDZFU.js";const G=C("FoldHorizontal",[["path",{d:"M2 12h6",key:"1wqiqv"}],["path",{d:"M22 12h-6",key:"1eg9hc"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m19 9-3 3 3 3",key:"12ol22"}],["path",{d:"m5 15 3-3-3-3",key:"1kdhjc"}]]);const J=C("UnfoldHorizontal",[["path",{d:"M16 12h6",key:"15xry1"}],["path",{d:"M8 12H2",key:"1jqql6"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m19 15 3-3-3-3",key:"wjy7rq"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}]]);function K(i,n){for(const t of i.sections){for(const r of t.children)if(r.to===n)return t.label;if(t.frameworks){for(const r of t.frameworks)for(const o of r.children)if(o.to===n)return t.label}}return null}function P({config:i,headings:n}){const{_splat:t,framework:r}=E({strict:!1}),o=r?`framework/${r}/${t}`:t,h=o?K(i,o):null;return h?e.jsx(O,{section:h,headings:n,tocHiddenBreakpoint:"lg"}):null}function ee({title:i,content:n,repo:t,branch:r,filePath:o,shouldRenderToc:h=!0,colorFrom:H,colorTo:N,textColor:q,config:w,footer:B,framework:g,isFallback:D=!1,locale:y}){const{headings:u,markup:R}=l.useMemo(()=>U(n),[n]),{framework:v}=E({strict:!1}),j=S(),M=l.useMemo(()=>{const s=g||v||j.currentFramework||"react";return typeof s=="string"?s.toLowerCase():s},[g,v,j.currentFramework]),f=h&&u.length>1,b=l.useRef(null),[z,I]=l.useState([]),m=l.useRef({});let c=!1,k;try{const s=L();c=s.isFullWidth,k=s.setIsFullWidth}catch{}return l.useEffect(()=>{const s=x=>{m.current=x.reduce((a,d)=>(a[d.target.id]=d,a),m.current);const p=[];Object.keys(m.current).forEach(a=>{const d=m.current[a];d.isIntersecting&&p.push(d)}),p.length>=1&&I(p.map(a=>a.target.id))},F=new IntersectionObserver(s,{rootMargin:"0px",threshold:.2});return Array.from(b.current?.querySelectorAll("h2[id], h3[id], h4[id], h5[id], h6[id]")??[]).forEach(x=>F.observe(x)),()=>F.disconnect()},[u]),e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col pt-4 lg:pt-6 xl:pt-8",children:[D&&y&&e.jsx($,{locale:y}),e.jsxs("div",{className:A("w-full flex mx-auto max-w-[768px]",(f||c)&&"max-w-full"),children:[e.jsxs("div",{className:"flex flex-col w-full min-w-0",children:[w&&e.jsx("div",{className:"mb-3",children:e.jsx(P,{config:w,headings:f?u:void 0})}),e.jsx(V,{title:i,repo:t,branch:r,filePath:o,htmlMarkup:R,containerRef:b,currentFramework:M,customComponents:W.components,titleBarActions:k?e.jsx("button",{onClick:()=>k(!c),className:"p-2 mr-4 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors shrink-0 hidden [@media(min-width:1535px)]:inline-flex",title:c?"Constrain width":"Expand width",children:c?e.jsx(G,{className:"w-4 h-4"}):e.jsx(J,{className:"w-4 h-4"})}):null}),B??e.jsx(T,{})]}),f&&e.jsx("div",{className:"pl-4 w-32 lg:w-36 xl:w-44 2xl:w-56 3xl:w-64 shrink-0 hidden lg:block transition-all",children:e.jsx(_,{headings:u,activeHeadings:z,colorFrom:H,colorTo:N,textColor:q,currentFramework:M})})]})]})}export{ee as D};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{z as L,r as n,B as K,o as I,j as e,S as Q,D as fe,L as E,q as w,t as b,E as xe,F as H,G as ge,M as U,C as J}from"./main-C8MldI1o.js";import{F as he}from"./Footer-4faHyha8.js";import{c as X}from"./react-C0klD_r9.js";const pe=L("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const ve=L("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const be=L("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);function we(r){if(typeof window>"u")return;const t=localStorage.getItem(r);if(t)try{const l=JSON.parse(t);if(!l.ttl)return l.value;if(new Date().getTime()>l.ttl){localStorage.removeItem(r);return}return l.value}catch{localStorage.removeItem(r);return}}function ke(r,t,l){const[a,s]=n.useState(t);return n.useEffect(()=>{const d=we(r);d!==void 0&&s(d)},[r]),n.useEffect(()=>{localStorage.setItem(r,JSON.stringify({value:a,ttl:null}))},[r,a,l]),[a,s]}function je(r){return r[r.length-1]}const Y=[{label:"React",value:"react",logo:"/images/frameworks/react-logo.svg",color:"bg-blue-500",fontColor:"text-sky-500"},{label:"Preact",value:"preact",logo:"/images/frameworks/preact-logo.svg",color:"bg-purple-500",fontColor:"text-purple-500"},{label:"Vue",value:"vue",logo:"/images/frameworks/vue-logo.svg",color:"bg-green-500",fontColor:"text-green-500"},{label:"Angular",value:"angular",logo:"/images/frameworks/angular-logo.svg",color:"bg-red-500",fontColor:"text-fuchsia-500"},{label:"Solid",value:"solid",logo:"/images/frameworks/solid-logo.svg",color:"bg-blue-600",fontColor:"text-blue-600"},{label:"Lit",value:"lit",logo:"/images/frameworks/lit-logo.svg",color:"bg-emerald-500",fontColor:"text-emerald-500"},{label:"Svelte",value:"svelte",logo:"/images/frameworks/svelte-logo.svg",color:"bg-orange-600",fontColor:"text-orange-600"},{label:"Qwik",value:"qwik",logo:"/images/frameworks/qwik-logo.svg",color:"bg-indigo-500",fontColor:"text-indigo-500"},{label:"Vanilla",value:"vanilla",logo:"/images/frameworks/js-logo.svg",color:"bg-yellow-500",fontColor:"text-yellow-500"}];function ye(r){return Y.filter(t=>r.includes(t.value))}function _({frameworks:r}){const t=Ce({frameworks:r}),l=t.available.find(a=>a.value===t.selected);return e.jsx(Q,{className:"w-full",icon:l?.logo?e.jsx("img",{src:l.logo,alt:l.label,className:"w-4 h-4"}):void 0,selected:t.selected,available:t.available,onSelect:t.onSelect})}const Ne=X(r=>({currentFramework:typeof document<"u"&&localStorage.getItem("framework")||void 0,setCurrentFramework:t=>{localStorage.setItem("framework",t),r({currentFramework:t})}}));function Ce({frameworks:r}){const t=O(r);return n.useMemo(()=>({label:"Framework",selected:r.includes(t.framework)?t.framework:"react",available:ye(r),onSelect:a=>{t.setFramework(a.value)}}),[r,t])}function O(r){const t=K(),{framework:l}=I({strict:!1}),a=Ne();let s=l||a.currentFramework||"react";s=r.includes(s)?s:"react";const d=n.useCallback(i=>{t({params:{framework:i}}),a.setCurrentFramework(i)},[a,t]);return n.useEffect(()=>{a.currentFramework||a.setCurrentFramework(s),l&&l!==a.currentFramework&&a.setCurrentFramework(l)}),{framework:s,setFramework:d}}function B({versions:r}){const t=Ie({versions:r});return e.jsx(Q,{className:"w-full",icon:e.jsx(be,{className:"w-3.5 h-3.5 opacity-60"}),selected:t.selected,available:t.available,onSelect:t.onSelect})}const Se=X(r=>({currentVersion:typeof document<"u"&&localStorage.getItem("version")||void 0,setCurrentVersion:t=>{localStorage.setItem("version",t),r({currentVersion:t})}}));function Fe(r){const t=K(),{version:l}=I({strict:!1}),a=Se();let s=l||a.currentVersion||"latest";s=r.includes(s)?s:"latest";const d=n.useCallback(i=>{t({params:{version:i}}),a.setCurrentVersion(i)},[a,t]);return n.useEffect(()=>{a.currentVersion||a.setCurrentVersion(s),l&&l!==a.currentVersion&&a.setCurrentVersion(l)}),{version:s,setVersion:d}}function Ie({versions:r}){const t=Fe(r);return n.useMemo(()=>{const a=r.reduce((s,d)=>(s.push({label:d,value:d}),s),[{label:"Latest",value:"latest"}]);return{label:"Version",selected:r.includes(t.version)?t.version:"latest",available:a,onSelect:s=>{t.setVersion(s.value)}}},[t,r])}function Me({menuConfig:r,activeItem:t,fullPathname:l,colorFrom:a,colorTo:s,frameworkLogo:d,version:i,onHover:y,onClick:N}){const f=[];r.forEach(c=>{f.push({label:c.label,isSection:!0}),c.children?.forEach(x=>{f.push({to:x.to,label:x.label,isSection:!1})})});const h=c=>{if(!c||c.startsWith("http"))return!1;if(c===t)return!0;if(c==="..")return l.match(/^\/[^/]+\/[^/]+\/?$/)!==null;if(c==="./framework")return l.includes("/docs/framework")&&!l.match(/\/docs\/framework\/[^/]+/);if(c.includes("/$libraryId")){const x=c.split("/docs/")[1];if(x&&l.includes(`/docs/${x}`))return!0}return!1};return e.jsxs("button",{type:"button",className:"flex flex-col gap-2 py-2 px-2 cursor-pointer h-full w-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-gray-400/50",onPointerEnter:y,onFocus:y,onClick:N,"aria-label":"Open documentation menu",children:[e.jsxs("div",{className:"flex flex-col gap-2 shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("span",{className:"flex items-center justify-center w-6 h-6",children:d?e.jsx("img",{src:d,alt:"",className:"w-4 h-4"}):e.jsx(U,{className:"w-3.5 h-3.5 opacity-60"})})}),e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("span",{className:"flex items-center justify-center px-1 py-0.5 text-[9px] font-medium opacity-60 border border-gray-500/30 rounded",children:i})})]}),e.jsx("div",{className:"flex-1 flex flex-col gap-1 min-h-0",children:f.map((c,x)=>{const p=!c.isSection&&h(c.to);return e.jsx("div",{className:b("flex-1 min-h-[4px] max-h-[9px] min-w-[20px] rounded-sm",c.isSection?"w-full bg-current opacity-15":p?"ml-2 w-[calc(100%-0.5rem)]":"ml-2 w-[calc(100%-0.5rem)] bg-current opacity-[0.06]"),style:!c.isSection&&p?{backgroundImage:`linear-gradient(to right, ${w(a)}, ${w(s)})`}:void 0,title:typeof c.label=="string"?c.label:`Item ${x+1}`},x)})})]})}const Z=n.createContext(null),De=()=>{const r=n.useContext(Z);if(!r)throw new Error("useWidthToggle must be used within a WidthToggleProvider");return r},ee=n.createContext(null),Ve=()=>n.useContext(ee);function Ae(){const r=Ve();if(!r)return null;const{prevItem:t,nextItem:l,colorFrom:a,colorTo:s,textColor:d,docsBasePath:i}=r;return!t&&!l?null:e.jsxs("div",{className:"sticky flex items-stretch bottom-2 z-10 right-0 text-[10px] sm:text-xs md:text-sm print:hidden",children:[e.jsx("div",{className:"flex-1 flex justify-start",children:t?e.jsxs(J,{as:E,from:i,to:t.to,params:!0,className:"py-1 px-2 sm:py-2 sm:px-3 flex items-center gap-1 sm:gap-2",children:[e.jsx(pe,{className:"w-3 h-3 sm:w-4 sm:h-4"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"hidden sm:block text-[10px] uppercase tracking-wider opacity-60 mb-0.5",children:"Previous"}),e.jsx("span",{className:"font-bold",children:t.label})]})]}):null}),e.jsx("div",{className:"flex-1 flex justify-end",children:l?e.jsxs(J,{as:E,from:i,to:l.to,params:!0,className:"py-1 px-2 sm:py-2 sm:px-3 flex items-center gap-1 sm:gap-2",children:[e.jsxs("div",{className:"flex flex-col items-end",children:[e.jsx("span",{className:"hidden sm:block text-[10px] uppercase tracking-wider opacity-60 mb-0.5",children:"Next"}),e.jsx("span",{className:"font-bold text-right bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(to right, ${w(a)}, ${w(s)})`},children:l.label})]}),e.jsx(ve,{className:"w-3 h-3 sm:w-4 sm:h-4",style:{color:w(d)}})]}):null})]})}const $e=({config:r,repo:t,frameworks:l,libraryId:a})=>{const s=O(l);return[{label:"Menu",children:[{label:"Home",to:".."},...l.length>1?[{label:"Frameworks",to:"./framework"}]:[],{label:e.jsxs("div",{className:"flex items-center gap-2",children:["GitHub ",e.jsx(ge,{className:"opacity-20"})]}),to:`https://github.com/${t}`}]},...r.sections.map(i=>{const N=i.frameworks?.find(h=>h.label===s.framework)?.children??[],f=[...(i.children??[]).map(h=>({...h,badge:"core"})),...N.map(h=>({...h,badge:s.framework}))];if(f.length!==0)return{label:i.label,children:f,collapsible:i.collapsible??!1,defaultCollapsed:i.defaultCollapsed??!1}})].filter(i=>i!==void 0)};function Te({colorFrom:r,colorTo:t,textColor:l,config:a,frameworks:s,versions:d,repo:i,children:y,version:N,isLandingPage:f=!1,docsBasePath:h="/$lang/$project/$version/docs"}){const{project:c}=I({strict:!1}),{_splat:x}=I({strict:!1}),p=$e({config:a,frameworks:s,repo:i,libraryId:c}),C=fe(),D=je(C),te=C.some(o=>o.pathname.includes("/examples/")),re=C.some(o=>o.pathname.includes("/docs/npm-stats")),A=n.useRef(null),T=n.useMemo(()=>p.flatMap(o=>o?.children),[p]),M=n.useMemo(()=>T.filter(o=>o&&!o.to.startsWith("http")),[T]),le=C.find(o=>o.pathname.includes("/docs"))?.pathname??"",R=D.pathname.replace(le+"/",""),z=M.findIndex(o=>o?.to===R),ae=M[z-1],se=M[z+1],oe=O(s),ne=Y.find(o=>o.value===oe.framework),[P,ie]=ke("docsFullWidth",!1),V=n.useMemo(()=>p.reduce((o,u,g)=>{const v=u.children.some(k=>k.to===x),m=`${g}:${String(u.label)}`;return o[m]=v?!0:typeof u.defaultCollapsed<"u"?!u.defaultCollapsed:!1,o},{}),[p,x]),[ce,q]=n.useState(V);n.useEffect(()=>{q(o=>{let u=!1;const g={...o};return Object.entries(V).forEach(([v,m])=>{if(!(v in g)){g[v]=m,u=!0;return}m&&!g[v]&&(g[v]=!0,u=!0)}),u?g:o})},[V]);const G=p.map((o,u)=>{const g=`${u}:${String(o.label)}`,v=e.jsxs(e.Fragment,{children:[o.collapsible?e.jsx("summary",{className:"text-[.8em] font-bold leading-4 px-2 ts-sidebar-label",children:o.label}):e.jsx("div",{className:"text-[.8em] font-bold leading-4 px-2 ts-sidebar-label",children:o.label}),e.jsx("div",{className:"h-2"}),e.jsx("ul",{className:"text-[.85em] leading-snug list-none",children:o?.children?.map((m,k)=>{const j="flex gap-2 items-center justify-between group px-2 py-1.5 rounded-lg hover:bg-gray-500/10 opacity-60 hover:opacity-100";return e.jsx("li",{children:m.to.startsWith("http")?e.jsx("a",{href:m.to,className:j,target:"_blank",rel:"noopener noreferrer",children:m.label}):e.jsx(E,{from:h,to:m.to,params:!0,onClick:()=>{A.current.removeAttribute("open")},preload:!1,activeOptions:{exact:!0,includeHash:!1,includeSearch:!1},className:"relative",children:W=>e.jsx("div",{className:b(j,W.isActive&&"opacity-100"),children:e.jsx("div",{className:b("w-full",W.isActive?"font-bold text-transparent bg-clip-text":""),style:W.isActive?{backgroundImage:`linear-gradient(to right, ${w(r)}, ${w(t)})`}:void 0,children:m.label})})})},k)})})]});return o.collapsible?e.jsx("details",{className:"[&>summary]:before:mr-1 [&>summary]:marker:text-[0.8em] [&>summary]:marker:leading-4 relative select-none",open:ce[g]??!1,onToggle:m=>{const k=m.currentTarget.open;q(j=>j[g]===k?j:{...j,[g]:k})},children:v},`group-${u}`):e.jsx("div",{className:"[&>summary]:before:mr-1 [&>summary]:marker:text-[0.8em] [&>summary]:marker:leading-4 relative select-none",children:v},`group-${u}`)}),de=e.jsx("div",{className:`md:hidden bg-white/50 sticky top-[var(--navbar-height)]
|
|
1
|
+
import{z as L,r as n,B as K,o as I,j as e,S as Q,D as fe,L as E,q as w,t as b,E as xe,F as H,G as ge,M as U,C as J}from"./main-DqZtiCro.js";import{F as he}from"./Footer-DYh1AfWA.js";import{c as X}from"./react-qvbbiZob.js";const pe=L("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const ve=L("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const be=L("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);function we(r){if(typeof window>"u")return;const t=localStorage.getItem(r);if(t)try{const l=JSON.parse(t);if(!l.ttl)return l.value;if(new Date().getTime()>l.ttl){localStorage.removeItem(r);return}return l.value}catch{localStorage.removeItem(r);return}}function ke(r,t,l){const[a,s]=n.useState(t);return n.useEffect(()=>{const d=we(r);d!==void 0&&s(d)},[r]),n.useEffect(()=>{localStorage.setItem(r,JSON.stringify({value:a,ttl:null}))},[r,a,l]),[a,s]}function je(r){return r[r.length-1]}const Y=[{label:"React",value:"react",logo:"/images/frameworks/react-logo.svg",color:"bg-blue-500",fontColor:"text-sky-500"},{label:"Preact",value:"preact",logo:"/images/frameworks/preact-logo.svg",color:"bg-purple-500",fontColor:"text-purple-500"},{label:"Vue",value:"vue",logo:"/images/frameworks/vue-logo.svg",color:"bg-green-500",fontColor:"text-green-500"},{label:"Angular",value:"angular",logo:"/images/frameworks/angular-logo.svg",color:"bg-red-500",fontColor:"text-fuchsia-500"},{label:"Solid",value:"solid",logo:"/images/frameworks/solid-logo.svg",color:"bg-blue-600",fontColor:"text-blue-600"},{label:"Lit",value:"lit",logo:"/images/frameworks/lit-logo.svg",color:"bg-emerald-500",fontColor:"text-emerald-500"},{label:"Svelte",value:"svelte",logo:"/images/frameworks/svelte-logo.svg",color:"bg-orange-600",fontColor:"text-orange-600"},{label:"Qwik",value:"qwik",logo:"/images/frameworks/qwik-logo.svg",color:"bg-indigo-500",fontColor:"text-indigo-500"},{label:"Vanilla",value:"vanilla",logo:"/images/frameworks/js-logo.svg",color:"bg-yellow-500",fontColor:"text-yellow-500"}];function ye(r){return Y.filter(t=>r.includes(t.value))}function _({frameworks:r}){const t=Ce({frameworks:r}),l=t.available.find(a=>a.value===t.selected);return e.jsx(Q,{className:"w-full",icon:l?.logo?e.jsx("img",{src:l.logo,alt:l.label,className:"w-4 h-4"}):void 0,selected:t.selected,available:t.available,onSelect:t.onSelect})}const Ne=X(r=>({currentFramework:typeof document<"u"&&localStorage.getItem("framework")||void 0,setCurrentFramework:t=>{localStorage.setItem("framework",t),r({currentFramework:t})}}));function Ce({frameworks:r}){const t=O(r);return n.useMemo(()=>({label:"Framework",selected:r.includes(t.framework)?t.framework:"react",available:ye(r),onSelect:a=>{t.setFramework(a.value)}}),[r,t])}function O(r){const t=K(),{framework:l}=I({strict:!1}),a=Ne();let s=l||a.currentFramework||"react";s=r.includes(s)?s:"react";const d=n.useCallback(i=>{t({params:{framework:i}}),a.setCurrentFramework(i)},[a,t]);return n.useEffect(()=>{a.currentFramework||a.setCurrentFramework(s),l&&l!==a.currentFramework&&a.setCurrentFramework(l)}),{framework:s,setFramework:d}}function B({versions:r}){const t=Ie({versions:r});return e.jsx(Q,{className:"w-full",icon:e.jsx(be,{className:"w-3.5 h-3.5 opacity-60"}),selected:t.selected,available:t.available,onSelect:t.onSelect})}const Se=X(r=>({currentVersion:typeof document<"u"&&localStorage.getItem("version")||void 0,setCurrentVersion:t=>{localStorage.setItem("version",t),r({currentVersion:t})}}));function Fe(r){const t=K(),{version:l}=I({strict:!1}),a=Se();let s=l||a.currentVersion||"latest";s=r.includes(s)?s:"latest";const d=n.useCallback(i=>{t({params:{version:i}}),a.setCurrentVersion(i)},[a,t]);return n.useEffect(()=>{a.currentVersion||a.setCurrentVersion(s),l&&l!==a.currentVersion&&a.setCurrentVersion(l)}),{version:s,setVersion:d}}function Ie({versions:r}){const t=Fe(r);return n.useMemo(()=>{const a=r.reduce((s,d)=>(s.push({label:d,value:d}),s),[{label:"Latest",value:"latest"}]);return{label:"Version",selected:r.includes(t.version)?t.version:"latest",available:a,onSelect:s=>{t.setVersion(s.value)}}},[t,r])}function Me({menuConfig:r,activeItem:t,fullPathname:l,colorFrom:a,colorTo:s,frameworkLogo:d,version:i,onHover:y,onClick:N}){const f=[];r.forEach(c=>{f.push({label:c.label,isSection:!0}),c.children?.forEach(x=>{f.push({to:x.to,label:x.label,isSection:!1})})});const h=c=>{if(!c||c.startsWith("http"))return!1;if(c===t)return!0;if(c==="..")return l.match(/^\/[^/]+\/[^/]+\/?$/)!==null;if(c==="./framework")return l.includes("/docs/framework")&&!l.match(/\/docs\/framework\/[^/]+/);if(c.includes("/$libraryId")){const x=c.split("/docs/")[1];if(x&&l.includes(`/docs/${x}`))return!0}return!1};return e.jsxs("button",{type:"button",className:"flex flex-col gap-2 py-2 px-2 cursor-pointer h-full w-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-gray-400/50",onPointerEnter:y,onFocus:y,onClick:N,"aria-label":"Open documentation menu",children:[e.jsxs("div",{className:"flex flex-col gap-2 shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("span",{className:"flex items-center justify-center w-6 h-6",children:d?e.jsx("img",{src:d,alt:"",className:"w-4 h-4"}):e.jsx(U,{className:"w-3.5 h-3.5 opacity-60"})})}),e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("span",{className:"flex items-center justify-center px-1 py-0.5 text-[9px] font-medium opacity-60 border border-gray-500/30 rounded",children:i})})]}),e.jsx("div",{className:"flex-1 flex flex-col gap-1 min-h-0",children:f.map((c,x)=>{const p=!c.isSection&&h(c.to);return e.jsx("div",{className:b("flex-1 min-h-[4px] max-h-[9px] min-w-[20px] rounded-sm",c.isSection?"w-full bg-current opacity-15":p?"ml-2 w-[calc(100%-0.5rem)]":"ml-2 w-[calc(100%-0.5rem)] bg-current opacity-[0.06]"),style:!c.isSection&&p?{backgroundImage:`linear-gradient(to right, ${w(a)}, ${w(s)})`}:void 0,title:typeof c.label=="string"?c.label:`Item ${x+1}`},x)})})]})}const Z=n.createContext(null),De=()=>{const r=n.useContext(Z);if(!r)throw new Error("useWidthToggle must be used within a WidthToggleProvider");return r},ee=n.createContext(null),Ve=()=>n.useContext(ee);function Ae(){const r=Ve();if(!r)return null;const{prevItem:t,nextItem:l,colorFrom:a,colorTo:s,textColor:d,docsBasePath:i}=r;return!t&&!l?null:e.jsxs("div",{className:"sticky flex items-stretch bottom-2 z-10 right-0 text-[10px] sm:text-xs md:text-sm print:hidden",children:[e.jsx("div",{className:"flex-1 flex justify-start",children:t?e.jsxs(J,{as:E,from:i,to:t.to,params:!0,className:"py-1 px-2 sm:py-2 sm:px-3 flex items-center gap-1 sm:gap-2",children:[e.jsx(pe,{className:"w-3 h-3 sm:w-4 sm:h-4"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"hidden sm:block text-[10px] uppercase tracking-wider opacity-60 mb-0.5",children:"Previous"}),e.jsx("span",{className:"font-bold",children:t.label})]})]}):null}),e.jsx("div",{className:"flex-1 flex justify-end",children:l?e.jsxs(J,{as:E,from:i,to:l.to,params:!0,className:"py-1 px-2 sm:py-2 sm:px-3 flex items-center gap-1 sm:gap-2",children:[e.jsxs("div",{className:"flex flex-col items-end",children:[e.jsx("span",{className:"hidden sm:block text-[10px] uppercase tracking-wider opacity-60 mb-0.5",children:"Next"}),e.jsx("span",{className:"font-bold text-right bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(to right, ${w(a)}, ${w(s)})`},children:l.label})]}),e.jsx(ve,{className:"w-3 h-3 sm:w-4 sm:h-4",style:{color:w(d)}})]}):null})]})}const $e=({config:r,repo:t,frameworks:l,libraryId:a})=>{const s=O(l);return[{label:"Menu",children:[{label:"Home",to:".."},...l.length>1?[{label:"Frameworks",to:"./framework"}]:[],{label:e.jsxs("div",{className:"flex items-center gap-2",children:["GitHub ",e.jsx(ge,{className:"opacity-20"})]}),to:`https://github.com/${t}`}]},...r.sections.map(i=>{const N=i.frameworks?.find(h=>h.label===s.framework)?.children??[],f=[...(i.children??[]).map(h=>({...h,badge:"core"})),...N.map(h=>({...h,badge:s.framework}))];if(f.length!==0)return{label:i.label,children:f,collapsible:i.collapsible??!1,defaultCollapsed:i.defaultCollapsed??!1}})].filter(i=>i!==void 0)};function Te({colorFrom:r,colorTo:t,textColor:l,config:a,frameworks:s,versions:d,repo:i,children:y,version:N,isLandingPage:f=!1,docsBasePath:h="/$lang/$project/$version/docs"}){const{project:c}=I({strict:!1}),{_splat:x}=I({strict:!1}),p=$e({config:a,frameworks:s,repo:i,libraryId:c}),C=fe(),D=je(C),te=C.some(o=>o.pathname.includes("/examples/")),re=C.some(o=>o.pathname.includes("/docs/npm-stats")),A=n.useRef(null),T=n.useMemo(()=>p.flatMap(o=>o?.children),[p]),M=n.useMemo(()=>T.filter(o=>o&&!o.to.startsWith("http")),[T]),le=C.find(o=>o.pathname.includes("/docs"))?.pathname??"",R=D.pathname.replace(le+"/",""),z=M.findIndex(o=>o?.to===R),ae=M[z-1],se=M[z+1],oe=O(s),ne=Y.find(o=>o.value===oe.framework),[P,ie]=ke("docsFullWidth",!1),V=n.useMemo(()=>p.reduce((o,u,g)=>{const v=u.children.some(k=>k.to===x),m=`${g}:${String(u.label)}`;return o[m]=v?!0:typeof u.defaultCollapsed<"u"?!u.defaultCollapsed:!1,o},{}),[p,x]),[ce,q]=n.useState(V);n.useEffect(()=>{q(o=>{let u=!1;const g={...o};return Object.entries(V).forEach(([v,m])=>{if(!(v in g)){g[v]=m,u=!0;return}m&&!g[v]&&(g[v]=!0,u=!0)}),u?g:o})},[V]);const G=p.map((o,u)=>{const g=`${u}:${String(o.label)}`,v=e.jsxs(e.Fragment,{children:[o.collapsible?e.jsx("summary",{className:"text-[.8em] font-bold leading-4 px-2 ts-sidebar-label",children:o.label}):e.jsx("div",{className:"text-[.8em] font-bold leading-4 px-2 ts-sidebar-label",children:o.label}),e.jsx("div",{className:"h-2"}),e.jsx("ul",{className:"text-[.85em] leading-snug list-none",children:o?.children?.map((m,k)=>{const j="flex gap-2 items-center justify-between group px-2 py-1.5 rounded-lg hover:bg-gray-500/10 opacity-60 hover:opacity-100";return e.jsx("li",{children:m.to.startsWith("http")?e.jsx("a",{href:m.to,className:j,target:"_blank",rel:"noopener noreferrer",children:m.label}):e.jsx(E,{from:h,to:m.to,params:!0,onClick:()=>{A.current.removeAttribute("open")},preload:!1,activeOptions:{exact:!0,includeHash:!1,includeSearch:!1},className:"relative",children:W=>e.jsx("div",{className:b(j,W.isActive&&"opacity-100"),children:e.jsx("div",{className:b("w-full",W.isActive?"font-bold text-transparent bg-clip-text":""),style:W.isActive?{backgroundImage:`linear-gradient(to right, ${w(r)}, ${w(t)})`}:void 0,children:m.label})})})},k)})})]});return o.collapsible?e.jsx("details",{className:"[&>summary]:before:mr-1 [&>summary]:marker:text-[0.8em] [&>summary]:marker:leading-4 relative select-none",open:ce[g]??!1,onToggle:m=>{const k=m.currentTarget.open;q(j=>j[g]===k?j:{...j,[g]:k})},children:v},`group-${u}`):e.jsx("div",{className:"[&>summary]:before:mr-1 [&>summary]:marker:text-[0.8em] [&>summary]:marker:leading-4 relative select-none",children:v},`group-${u}`)}),de=e.jsx("div",{className:`md:hidden bg-white/50 sticky top-[var(--navbar-height)]
|
|
2
2
|
max-h-[calc(100dvh-var(--navbar-height))] overflow-y-auto z-20 dark:bg-black/60 backdrop-blur-lg`,children:e.jsxs("details",{ref:A,id:"docs-details",className:"border-b border-gray-500/20",children:[e.jsxs("summary",{className:"py-2 px-4 flex gap-2 items-center",children:[e.jsxs("div",{className:"flex gap-2 items-center shrink-0 pr-2",children:[e.jsx(U,{className:"cursor-pointer"}),"Docs"]}),e.jsx("div",{className:"w-px h-6 bg-gray-300 dark:bg-gray-600 shrink-0"}),e.jsx("div",{className:"flex-1 flex items-center gap-2 min-w-0"})]}),e.jsxs("div",{className:"flex flex-col gap-4 p-4 overflow-y-auto border-t border-gray-500/20 bg-white/20 text-lg dark:bg-black/20",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(_,{frameworks:s}),e.jsx(B,{versions:d}),e.jsx(H,{})]}),G]})]})}),[$,S]=n.useState(!1),F=n.useRef(void 0),ue=xe({enabled:$&&typeof window<"u"&&window.innerWidth<1280,onClickOutside:()=>S(!1)}),me=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:b("hidden md:flex xl:hidden flex-col overflow-hidden","sticky top-[var(--navbar-height)] h-[calc(100dvh-var(--navbar-height))]","z-10 border-r border-gray-500/20","bg-white/50 dark:bg-black/30","w-10"),children:e.jsx(Me,{menuConfig:p,activeItem:R,fullPathname:D.pathname,colorFrom:r,colorTo:t,frameworkLogo:ne?.logo,version:N,onHover:()=>{window.innerWidth<1280&&(clearTimeout(F.current),S(!0))},onClick:()=>{window.innerWidth<1280&&(clearTimeout(F.current),S(!0))}})}),e.jsx("div",{ref:ue,className:b("max-w-[250px] xl:max-w-[300px] 2xl:max-w-[400px]","flex-col overflow-hidden","h-[calc(100dvh-var(--navbar-height))] top-[var(--navbar-height)]","z-20 border-r border-gray-500/20","transition-all duration-300","hidden md:flex","md:fixed md:left-0 md:bg-white md:dark:bg-black/95 md:backdrop-blur-lg md:shadow-xl","xl:sticky xl:bg-transparent xl:dark:bg-transparent xl:backdrop-blur-none xl:shadow-none",!$&&"md:-translate-x-full xl:translate-x-0",$&&"md:translate-x-0"),onPointerEnter:o=>{o.pointerType!=="touch"&&window.innerWidth<1280&&clearTimeout(F.current)},onPointerLeave:o=>{o.pointerType!=="touch"&&window.innerWidth<1280&&(F.current=setTimeout(()=>{S(!1)},300))},children:e.jsxs("div",{className:"flex-1 flex flex-col overflow-y-auto",children:[e.jsxs("div",{className:"flex flex-col gap-1 p-4",children:[e.jsx(_,{frameworks:s}),e.jsx(B,{versions:d}),e.jsx(H,{})]}),e.jsx("div",{className:"flex-1 flex flex-col gap-4 text-base px-4 pt-0 pb-4",children:G})]})})]});return e.jsx(Z.Provider,{value:{isFullWidth:P,setIsFullWidth:ie},children:e.jsx(ee.Provider,{value:{prevItem:ae,nextItem:se,colorFrom:r,colorTo:t,textColor:l,docsBasePath:h},children:e.jsxs("div",{className:`
|
|
3
3
|
md:min-h-[calc(100dvh-var(--navbar-height))]
|
|
4
4
|
flex flex-col md:flex-row
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as e}from"./main-
|
|
1
|
+
import{r as n,j as e}from"./main-DqZtiCro.js";function c({tabs:t,children:o}){const s=n.useId(),d=n.Children.toArray(o),[l,i]=n.useState(t[0]?.slug??"");return t.length===0?null:e.jsxs("div",{className:"not-prose my-4",children:[e.jsx("div",{className:"flex items-center justify-start gap-0 overflow-x-auto overflow-y-hidden bg-gray-100 dark:bg-gray-900 border border-b-0 border-gray-500/20 rounded-t-md",children:t.map(r=>e.jsx("button",{type:"button",onClick:()=>i(r.slug),"aria-label":r.name,title:r.name,className:`px-3 py-1.5 text-sm font-medium transition-colors border-b-2 -mb-[1px] ${l===r.slug?"border-current text-current bg-white dark:bg-gray-950":"border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-800"}`,children:r.name},`${s}-${r.slug}`))}),e.jsx("div",{children:d.map((r,g)=>{const a=t[g];return a?e.jsx("div",{"data-tab":a.slug,hidden:a.slug!==l,className:"file-tabs-panel",children:r},`${s}-${a.slug}-panel`):null})})]})}export{c as FileTabs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,C as t,L as r}from"./main-
|
|
1
|
+
import{j as e,C as t,L as r}from"./main-DqZtiCro.js";function a(){return e.jsxs(t,{className:`relative flex flex-col items-start justify-center gap-4 p-8
|
|
2
2
|
max-w-(--breakpoint-lg) mx-auto text-sm`,children:[e.jsxs("div",{className:"grid gap-1 sm:grid-cols-2 md:grid-cols-3",children:[e.jsx("div",{children:e.jsx(r,{to:"/",children:"Home"})}),e.jsx("div",{children:e.jsx("a",{href:"https://github.com/tanstack",target:"_blank",rel:"noreferrer",children:"GitHub"})})]}),e.jsxs("div",{className:"text-center opacity-60",children:["© ",new Date().getFullYear()," TanStack"]})]})}export{a as F};
|
package/template/dist/client/assets/{FrameworkContent-Cxg_X_EP.js → FrameworkContent-rVvjxASn.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as u,j as e,r as d}from"./main-
|
|
1
|
+
import{o as u,j as e,r as d}from"./main-DqZtiCro.js";import{T as k}from"./MarkdownHeadingContext-CdvUDZFU.js";import"./react-qvbbiZob.js";function w(){if(!(typeof document>"u"))return localStorage.getItem("framework")||void 0}function j({codeBlocksByFramework:a,panelsByFramework:n}){const{framework:s}=u({strict:!1}),c=w(),o=(s||c||"react").toLowerCase(),t=a[o]||[],r=n[o];if(!r)return null;if(t.length===0)return e.jsx("div",{className:"framework-content",children:r});if(t.length===1)return e.jsx("div",{className:"framework-content",children:r});const m=t.map((i,f)=>({slug:`file-${f}`,name:i.title||"Untitled"})),l=d.Children.toArray(r);return e.jsx("div",{className:"framework-content",children:e.jsx(k,{tabs:m,children:l})})}export{j as FrameworkContent};
|