docs-i18n 0.9.2 → 0.10.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/dist/server/server.js +20 -20
- 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/dist/client/assets/{Doc-CGhUfH9r.js → Doc-CbmLeLjl.js} +1 -1
- package/template/dist/client/assets/{DocsLayout-CoPL9BM9.js → DocsLayout-ERG7nrAc.js} +1 -1
- package/template/dist/client/assets/{FileTabs-DsPkEUu7.js → FileTabs-CCynw0nL.js} +1 -1
- package/template/dist/client/assets/{Footer-4faHyha8.js → Footer-l6Y8-ltB.js} +1 -1
- package/template/dist/client/assets/{FrameworkContent-Cxg_X_EP.js → FrameworkContent-pNf68F7f.js} +1 -1
- package/template/dist/client/assets/{MarkdownHeadingContext-CwDqQdSh.js → MarkdownHeadingContext-6I862CKH.js} +4 -4
- package/template/dist/client/assets/{PostNotFound-1ZaWdycM.js → PostNotFound-ScC0039d.js} +1 -1
- package/template/dist/client/assets/{_basePickBy-FbrKkfHa.js → _basePickBy-B-GcvGxW.js} +1 -1
- package/template/dist/client/assets/{_baseUniq-g6ljCkn8.js → _baseUniq-C1WySGZQ.js} +1 -1
- package/template/dist/client/assets/_lang-B3tRf7os.js +1 -0
- package/template/dist/client/assets/_lang._project-CH0inpmY.js +1 -0
- package/template/dist/client/assets/_lang._project._version-CESvrqds.js +1 -0
- package/template/dist/client/assets/{_lang._project._version.docs-DjZ_USgK.js → _lang._project._version.docs-aw08dKvN.js} +1 -1
- package/template/dist/client/assets/{_lang._project._version.docs._-CNb1EMFX.js → _lang._project._version.docs._-B4Vb_S0V.js} +1 -1
- package/template/dist/client/assets/_lang._project._version.docs._-BexMyJr9.js +1 -0
- package/template/dist/client/assets/_lang._project._version.docs.framework._framework._-BbQgUWTH.js +1 -0
- package/template/dist/client/assets/{_lang._project._version.docs.framework._framework.index-CqyVy6eq.js → _lang._project._version.docs.framework._framework.index-DInYPTXM.js} +1 -1
- package/template/dist/client/assets/{_lang._project._version.docs.framework.index-S3Frbfn4.js → _lang._project._version.docs.framework.index-B7EvJmBI.js} +1 -1
- package/template/dist/client/assets/{_lang._project.docs-CkmM5v1V.js → _lang._project.docs-4oX3ADgu.js} +1 -1
- package/template/dist/client/assets/_lang._project.docs._-R9bOn492.js +1 -0
- package/template/dist/client/assets/{_lang._project.docs._-BHYKQj_2.js → _lang._project.docs._-emq0IsQw.js} +1 -1
- package/template/dist/client/assets/_lang.blog-BViCs72M.js +1 -0
- package/template/dist/client/assets/_lang.blog-DhVkwYEk.js +1 -0
- package/template/dist/client/assets/_lang.blog._-BHdaHDBU.js +1 -0
- package/template/dist/client/assets/{_lang.blog._-bXJwKw9E.js → _lang.blog._-DErizs7q.js} +1 -1
- package/template/dist/client/assets/_lang.blog.index-CELEUrkj.js +1 -0
- package/template/dist/client/assets/{_lang.blog.index-CdR5PZOo.js → _lang.blog.index-DZDuDkQr.js} +1 -1
- package/template/dist/client/assets/{_lang.docs-Cp3wmc9k.js → _lang.docs-CQK0rfqt.js} +1 -1
- package/template/dist/client/assets/{_lang.docs._-0bwIpeOn.js → _lang.docs._-BiCvgeV1.js} +1 -1
- package/template/dist/client/assets/_lang.docs._-axvS_dfl.js +1 -0
- package/template/dist/client/assets/_lang.docs.framework._framework._-D2FAQ0gW.js +1 -0
- package/template/dist/client/assets/{_lang.docs.framework._framework.index-BLgwIvQA.js → _lang.docs.framework._framework.index-Bu5p5Q_r.js} +1 -1
- package/template/dist/client/assets/{_lang.docs.framework.index-CzW7Dul3.js → _lang.docs.framework.index-uTDFLagP.js} +1 -1
- package/template/dist/client/assets/{arc-B4lRpBfi.js → arc-C16C7aa3.js} +1 -1
- package/template/dist/client/assets/{architectureDiagram-2XIMDMQ5-Coq1Gceq.js → architectureDiagram-2XIMDMQ5-DgSSDH9Z.js} +1 -1
- package/template/dist/client/assets/{blockDiagram-WCTKOSBZ-C7BGTzDN.js → blockDiagram-WCTKOSBZ-Bs8e58Or.js} +1 -1
- package/template/dist/client/assets/{c4Diagram-IC4MRINW-xTBVTs0q.js → c4Diagram-IC4MRINW-DsGaAPtm.js} +1 -1
- package/template/dist/client/assets/channel-Clrp6Lr4.js +1 -0
- package/template/dist/client/assets/{chunk-4BX2VUAB-DUUHBu75.js → chunk-4BX2VUAB-BQdq93Vq.js} +1 -1
- package/template/dist/client/assets/{chunk-55IACEB6-MUxF_n9_.js → chunk-55IACEB6-zjp4uUiZ.js} +1 -1
- package/template/dist/client/assets/{chunk-FMBD7UC4-BWh6wvYo.js → chunk-FMBD7UC4-CEdYlBOF.js} +1 -1
- package/template/dist/client/assets/{chunk-JSJVCQXG-CLUdUV5u.js → chunk-JSJVCQXG-CVkDw9ls.js} +1 -1
- package/template/dist/client/assets/{chunk-KX2RTZJC-CAlz_cXA.js → chunk-KX2RTZJC--1vKv-mr.js} +1 -1
- package/template/dist/client/assets/{chunk-NQ4KR5QH-BaYKfUVy.js → chunk-NQ4KR5QH-Cpo-W18l.js} +1 -1
- package/template/dist/client/assets/{chunk-QZHKN3VN-NxDloxi5.js → chunk-QZHKN3VN-BizWJuB4.js} +1 -1
- package/template/dist/client/assets/{chunk-WL4C6EOR-C2Ncbi5S.js → chunk-WL4C6EOR-6lLYa9R1.js} +1 -1
- package/template/dist/client/assets/classDiagram-VBA2DB6C-Beq6_jEy.js +1 -0
- package/template/dist/client/assets/classDiagram-v2-RAHNMMFH-Beq6_jEy.js +1 -0
- package/template/dist/client/assets/clone-BbBu6MzK.js +1 -0
- package/template/dist/client/assets/{cose-bilkent-S5V4N54A-Ct9-ZJcv.js → cose-bilkent-S5V4N54A-CaD0EGPJ.js} +1 -1
- package/template/dist/client/assets/{dagre-KLK3FWXG-u9dz8dcq.js → dagre-KLK3FWXG-h4F9WtDQ.js} +1 -1
- package/template/dist/client/assets/{diagram-E7M64L7V-BXmcaktT.js → diagram-E7M64L7V-CBUSWzH5.js} +1 -1
- package/template/dist/client/assets/{diagram-IFDJBPK2-CRlP5SeV.js → diagram-IFDJBPK2-C5oMubv0.js} +1 -1
- package/template/dist/client/assets/{diagram-P4PSJMXO-B9rJcj_H.js → diagram-P4PSJMXO-DdPwwhHR.js} +1 -1
- package/template/dist/client/assets/{erDiagram-INFDFZHY-DX-vee6w.js → erDiagram-INFDFZHY-0U5A-RF0.js} +1 -1
- package/template/dist/client/assets/{flowDiagram-PKNHOUZH-CoBCSOFc.js → flowDiagram-PKNHOUZH-CXN3pvSW.js} +1 -1
- package/template/dist/client/assets/{ganttDiagram-A5KZAMGK-BlqU_ghi.js → ganttDiagram-A5KZAMGK-DlovlSO7.js} +1 -1
- package/template/dist/client/assets/{gitGraphDiagram-K3NZZRJ6-CntCsuti.js → gitGraphDiagram-K3NZZRJ6-Bo-Jjy7v.js} +1 -1
- package/template/dist/client/assets/{graph-CZaxZzO8.js → graph-C0TauvuO.js} +1 -1
- package/template/dist/client/assets/{index-XelhTkgl.js → index-iATq4LEm.js} +1 -1
- package/template/dist/client/assets/{infoDiagram-LFFYTUFH-_jCC8Jtt.js → infoDiagram-LFFYTUFH-BbvPzztn.js} +1 -1
- package/template/dist/client/assets/{ishikawaDiagram-PHBUUO56-D3m_r2ig.js → ishikawaDiagram-PHBUUO56-DKCMONMO.js} +1 -1
- package/template/dist/client/assets/{journeyDiagram-4ABVD52K-CvRNm03C.js → journeyDiagram-4ABVD52K-D9NP_vvu.js} +1 -1
- package/template/dist/client/assets/{kanban-definition-K7BYSVSG-nQcLuNSy.js → kanban-definition-K7BYSVSG-X-u_nWxK.js} +1 -1
- package/template/dist/client/assets/{layout-DZIdDq97.js → layout-IeRzBrUX.js} +1 -1
- package/template/dist/client/assets/{linear-C2JcF5ss.js → linear-DEzVUeiK.js} +1 -1
- package/template/dist/client/assets/{main-C8MldI1o.js → main-Csj9i19C.js} +2 -2
- package/template/dist/client/assets/{mermaid.core-DlB0QBo2.js → mermaid.core-CCnh2DG0.js} +4 -4
- package/template/dist/client/assets/{mindmap-definition-YRQLILUH-D9OjtrBW.js → mindmap-definition-YRQLILUH-DgyN4Ft-.js} +1 -1
- package/template/dist/client/assets/{pieDiagram-SKSYHLDU-DoYJZfNJ.js → pieDiagram-SKSYHLDU-DDVqU_2Q.js} +1 -1
- package/template/dist/client/assets/{quadrantDiagram-337W2JSQ-Bs71YHJr.js → quadrantDiagram-337W2JSQ-BeUxMqle.js} +1 -1
- package/template/dist/client/assets/{react-C0klD_r9.js → react-os8EX6z1.js} +1 -1
- package/template/dist/client/assets/{requirementDiagram-Z7DCOOCP-BWvQcALn.js → requirementDiagram-Z7DCOOCP-CpzdlyEd.js} +1 -1
- package/template/dist/client/assets/{sankeyDiagram-WA2Y5GQK-CiGy1SQP.js → sankeyDiagram-WA2Y5GQK-CmSWF6XU.js} +1 -1
- package/template/dist/client/assets/{sequenceDiagram-2WXFIKYE-DRZim8vR.js → sequenceDiagram-2WXFIKYE-DarofLka.js} +1 -1
- package/template/dist/client/assets/{stateDiagram-RAJIS63D-BoqzJeL7.js → stateDiagram-RAJIS63D-CEio2h-7.js} +1 -1
- package/template/dist/client/assets/stateDiagram-v2-FVOUBMTO-CbfK0_BD.js +1 -0
- package/template/dist/client/assets/{timeline-definition-YZTLITO2-CyvR95Wz.js → timeline-definition-YZTLITO2-By_Wk6uc.js} +1 -1
- package/template/dist/client/assets/{treemap-KZPCXAKY-DkXgGvs_.js → treemap-KZPCXAKY-mKcaMbv9.js} +1 -1
- package/template/dist/client/assets/{vennDiagram-LZ73GAT5-CVpGZu6p.js → vennDiagram-LZ73GAT5-Dx_Fh7nH.js} +1 -1
- package/template/dist/client/assets/{xychartDiagram-JWTSCODW-Cjqbi_DU.js → xychartDiagram-JWTSCODW-DSAwWbBw.js} +1 -1
- package/template/dist/server/assets/{Doc-DKBxQduk.js → Doc-B8TJBEmx.js} +3 -3
- package/template/dist/server/assets/{DocsLayout-CQfCTal3.js → DocsLayout-CnWgvk8u.js} +2 -2
- package/template/dist/server/assets/{Footer-Dcw5XVqX.js → Footer-WapWK45U.js} +1 -1
- package/template/dist/server/assets/{FrameworkContent-OJfvCBHi.js → FrameworkContent-gzqT-Q1n.js} +2 -2
- package/template/dist/server/assets/{MarkdownHeadingContext-h4SfZq-C.js → MarkdownHeadingContext-Iyk66Y4x.js} +7 -3
- package/template/dist/server/assets/{PostNotFound-DRJpnWrj.js → PostNotFound-GKdNuzsX.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs-sJvASz_e.js → _lang._project._version.docs-BOZ34yW7.js} +3 -3
- 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._-B2vf_QGY.js → _lang._project._version.docs._-5W2jN7Re.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._-DeN_oA8l.js} +5 -5
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework.index-COKb9ffR.js → _lang._project._version.docs.framework._framework.index-jWKDCQSE.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs.framework.index-DoEddI6Z.js → _lang._project._version.docs.framework.index-DOT4MtjZ.js} +1 -1
- 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-BjOhmwp6.js → _lang._project.docs-r4V9TXuu.js} +3 -3
- package/template/dist/server/assets/{_lang._project.docs._-hSRVM-U7.js → _lang._project.docs._-Bge7JaYE.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-DJOfiyA8.js} +2 -2
- package/template/dist/server/assets/{_lang.blog._-A8h17fpC.js → _lang.blog._-C7iqMj9O.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._-Cm8zXsPs.js → _lang.blog._-yJSqbX08.js} +2 -2
- package/template/dist/server/assets/{_lang.blog.index-orWcAgbi.js → _lang.blog.index-CrdyROhK.js} +2 -2
- package/template/dist/server/assets/{_lang.blog.index-ZhMds6Jp.js → _lang.blog.index-Df_6_IKx.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.docs-CB1sGjRO.js → _lang.docs-DSB3iI6a.js} +1 -1
- package/template/dist/server/assets/{_lang.docs-CAEkhcnT.js → _lang.docs-Jwt4deTW.js} +3 -3
- package/template/dist/server/assets/{_lang.docs._-Zbv8OwJU.js → _lang.docs._-D_DdKLAV.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._-BkQaZ_1f.js} +5 -5
- package/template/dist/server/assets/{_lang.docs.framework._framework.index-BLryfsl2.js → _lang.docs.framework._framework.index-BLx8p8IS.js} +1 -1
- package/template/dist/server/assets/{_lang.docs.framework.index-DGxWQH6q.js → _lang.docs.framework.index-BytQ_q8T.js} +1 -1
- package/template/dist/server/assets/{_tanstack-start-manifest_v-CURwM8Tc.js → _tanstack-start-manifest_v-RX6ItZ5S.js} +1 -1
- package/template/dist/server/assets/{blog.server-Bbk2Ifog.js → blog.server-WqzZ00iA.js} +1 -1
- package/template/dist/server/assets/{docs.server-7EUAkSBN.js → docs.server-BSH7IvIU.js} +3884 -444
- package/template/dist/server/assets/{index-BvagF3L5.js → index-DvBGSZeA.js} +2 -2
- package/template/dist/server/assets/{router-DK1vpPhv.js → router-DPPgDicW.js} +18 -18
- package/template/dist/server/server.js +14 -14
- package/template/package.json +2 -0
- package/template/vite.config.ts +33 -18
- package/template/wrangler.jsonc +2 -2
- 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/stateDiagram-v2-FVOUBMTO-CJYWvllO.js +0 -1
|
@@ -15570,26 +15570,6 @@ async function getStartManifest(matchedRoutes) {
|
|
|
15570
15570
|
//#endregion
|
|
15571
15571
|
//#region \0#tanstack-start-server-fn-resolver
|
|
15572
15572
|
var manifest = {
|
|
15573
|
-
"a3d81974aeece150d4b02be5b91590b8187442ebea56be4a89dcbf053626d22b": {
|
|
15574
|
-
functionName: "fetchVersion_createServerFn_handler",
|
|
15575
|
-
importer: () => import("./assets/misc-DOk3t9vs.js")
|
|
15576
|
-
},
|
|
15577
|
-
"3bf4ba50ca8ccc3c8c60d8f2e53307a320940d68c478df494552066904c5cd74": {
|
|
15578
|
-
functionName: "fetchLlmConfig_createServerFn_handler",
|
|
15579
|
-
importer: () => import("./assets/misc-DOk3t9vs.js")
|
|
15580
|
-
},
|
|
15581
|
-
"e0b4116f6b2c8d096830102e36458acf9c616a056fcdddda956a4d66984ef58c": {
|
|
15582
|
-
functionName: "fetchConfig_createServerFn_handler",
|
|
15583
|
-
importer: () => import("./assets/misc-DOk3t9vs.js")
|
|
15584
|
-
},
|
|
15585
|
-
"a054a04356fe9987891efee8b7a11cd2dedb00f6b2e8f26d1c642e001e553d53": {
|
|
15586
|
-
functionName: "openFile_createServerFn_handler",
|
|
15587
|
-
importer: () => import("./assets/misc-DOk3t9vs.js")
|
|
15588
|
-
},
|
|
15589
|
-
"5080dc3f2f2309ec6981b94c431969637130c657e8a1dfb10400b4614eecc1ea": {
|
|
15590
|
-
functionName: "fetchModels_createServerFn_handler",
|
|
15591
|
-
importer: () => import("./assets/models-CBb8Owe5.js")
|
|
15592
|
-
},
|
|
15593
15573
|
"4e218d79545765572808c7eab33b7663d4496209c15406d0b449366905b6b83f": {
|
|
15594
15574
|
functionName: "fetchStatus_createServerFn_handler",
|
|
15595
15575
|
importer: () => import("./assets/status-CZz8Rs_7.js")
|
|
@@ -15610,6 +15590,10 @@ var manifest = {
|
|
|
15610
15590
|
functionName: "rescanVersion_createServerFn_handler",
|
|
15611
15591
|
importer: () => import("./assets/status-CZz8Rs_7.js")
|
|
15612
15592
|
},
|
|
15593
|
+
"5080dc3f2f2309ec6981b94c431969637130c657e8a1dfb10400b4614eecc1ea": {
|
|
15594
|
+
functionName: "fetchModels_createServerFn_handler",
|
|
15595
|
+
importer: () => import("./assets/models-CBb8Owe5.js")
|
|
15596
|
+
},
|
|
15613
15597
|
"421de02ce39dde6e27cf4689e837ec072cbd01e63f8cdd5c2a3f42f0bd5ca613": {
|
|
15614
15598
|
functionName: "fetchJobs_createServerFn_handler",
|
|
15615
15599
|
importer: () => import("./assets/jobs-bQfYqSk7.js")
|
|
@@ -15625,6 +15609,22 @@ var manifest = {
|
|
|
15625
15609
|
"88c2855c84e91504070bfecc50ddfa50339d22c305626800b6d9b05d79385d71": {
|
|
15626
15610
|
functionName: "deleteJob_createServerFn_handler",
|
|
15627
15611
|
importer: () => import("./assets/jobs-bQfYqSk7.js")
|
|
15612
|
+
},
|
|
15613
|
+
"a3d81974aeece150d4b02be5b91590b8187442ebea56be4a89dcbf053626d22b": {
|
|
15614
|
+
functionName: "fetchVersion_createServerFn_handler",
|
|
15615
|
+
importer: () => import("./assets/misc-DOk3t9vs.js")
|
|
15616
|
+
},
|
|
15617
|
+
"3bf4ba50ca8ccc3c8c60d8f2e53307a320940d68c478df494552066904c5cd74": {
|
|
15618
|
+
functionName: "fetchLlmConfig_createServerFn_handler",
|
|
15619
|
+
importer: () => import("./assets/misc-DOk3t9vs.js")
|
|
15620
|
+
},
|
|
15621
|
+
"e0b4116f6b2c8d096830102e36458acf9c616a056fcdddda956a4d66984ef58c": {
|
|
15622
|
+
functionName: "fetchConfig_createServerFn_handler",
|
|
15623
|
+
importer: () => import("./assets/misc-DOk3t9vs.js")
|
|
15624
|
+
},
|
|
15625
|
+
"a054a04356fe9987891efee8b7a11cd2dedb00f6b2e8f26d1c642e001e553d53": {
|
|
15626
|
+
functionName: "openFile_createServerFn_handler",
|
|
15627
|
+
importer: () => import("./assets/misc-DOk3t9vs.js")
|
|
15628
15628
|
}
|
|
15629
15629
|
};
|
|
15630
15630
|
async function getServerFnById(id) {
|
package/package.json
CHANGED
|
@@ -211,6 +211,12 @@ export const Markdown = React.memo(function Markdown({
|
|
|
211
211
|
return null
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
|
|
214
|
+
try {
|
|
215
|
+
return parse(rendered.markup, options)
|
|
216
|
+
} catch {
|
|
217
|
+
// Fallback: render raw HTML when DOM-based parser is unavailable (e.g., CF Workers)
|
|
218
|
+
// Client-side hydration will re-render correctly with full DOM APIs
|
|
219
|
+
return <div dangerouslySetInnerHTML={{ __html: rendered.markup }} />
|
|
220
|
+
}
|
|
215
221
|
}, [rendered.markup, options])
|
|
216
222
|
})
|
|
@@ -9,8 +9,9 @@ import { readFileSync, existsSync, readdirSync, statSync } from 'node:fs'
|
|
|
9
9
|
import { resolve, relative, join } from 'node:path'
|
|
10
10
|
import matter from 'gray-matter'
|
|
11
11
|
import type { LoadedDoc, DocsConfig, DocsConfigItem, ProjectConfig } from '~/types'
|
|
12
|
-
import { type ContentLoader, createFsLoader } from './content-loader'
|
|
12
|
+
import { type ContentLoader, createFsLoader, createD1Loader } from './content-loader'
|
|
13
13
|
import { generateSidebarFromFilesystem } from './sidebar-generator'
|
|
14
|
+
import { createDb } from '~/db'
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Get the project root directory.
|
|
@@ -60,6 +61,38 @@ export function setContentLoader(loader: ContentLoader) {
|
|
|
60
61
|
_loader = loader
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
/** Cached D1 reference (or false if not available). */
|
|
65
|
+
let _d1Cache: D1Database | false | undefined
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Try to get D1 binding from Cloudflare Workers environment.
|
|
69
|
+
* Returns null if not running on CF Workers.
|
|
70
|
+
*/
|
|
71
|
+
function getD1(): D1Database | null {
|
|
72
|
+
if (_d1Cache !== undefined) return _d1Cache || null
|
|
73
|
+
try {
|
|
74
|
+
// globalThis.__D1_DB is set by the worker entry (app/worker.ts)
|
|
75
|
+
const db = (globalThis as any).__D1_DB
|
|
76
|
+
if (db) {
|
|
77
|
+
_d1Cache = db
|
|
78
|
+
return db
|
|
79
|
+
}
|
|
80
|
+
} catch {}
|
|
81
|
+
_d1Cache = false
|
|
82
|
+
return null
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Get a content loader, auto-detecting D1 on CF Workers.
|
|
87
|
+
*/
|
|
88
|
+
function getContentLoader(docsRoot?: string, urlMapper?: (filePath: string) => string): ContentLoader {
|
|
89
|
+
const d1 = getD1()
|
|
90
|
+
if (d1) {
|
|
91
|
+
return createD1Loader(createDb(d1))
|
|
92
|
+
}
|
|
93
|
+
return createFsLoader(getProjectRoot(), docsRoot, urlMapper)
|
|
94
|
+
}
|
|
95
|
+
|
|
63
96
|
/**
|
|
64
97
|
* Load a document with i18n fallback.
|
|
65
98
|
* Uses docsRoot from projectConfig to resolve content paths.
|
|
@@ -72,7 +105,7 @@ export async function loadDoc(
|
|
|
72
105
|
projectConfig?: ProjectConfig,
|
|
73
106
|
): Promise<LoadedDoc> {
|
|
74
107
|
const docsRoot = projectConfig?.docsRoot || 'content'
|
|
75
|
-
const loader =
|
|
108
|
+
const loader = getContentLoader(docsRoot, projectConfig?.urlMapper)
|
|
76
109
|
return loader.loadDoc(project, version, lang, slug)
|
|
77
110
|
}
|
|
78
111
|
|
|
@@ -90,11 +123,11 @@ export async function loadDocsConfig(
|
|
|
90
123
|
}
|
|
91
124
|
|
|
92
125
|
const docsRoot = projectConfig?.docsRoot || 'content'
|
|
93
|
-
const loader =
|
|
126
|
+
const loader = getContentLoader(docsRoot)
|
|
94
127
|
const config = await loader.loadDocsConfig(project, version)
|
|
95
128
|
if (config) return config
|
|
96
129
|
|
|
97
|
-
// Auto-scan fallback (filesystem only)
|
|
130
|
+
// Auto-scan fallback (filesystem only, won't work on CF Workers)
|
|
98
131
|
return autoScanDocs(getProjectRoot(), docsRoot, project, version)
|
|
99
132
|
}
|
|
100
133
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloudflare Workers entry point.
|
|
3
|
+
* Re-exports TanStack Start's server entry as a CF Worker fetch handler.
|
|
4
|
+
* Injects D1 binding into globalThis for server-side content loading.
|
|
5
|
+
*/
|
|
6
|
+
import handler from '@tanstack/react-start/server-entry'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
async fetch(request: Request, env: any, ctx: any) {
|
|
10
|
+
// Expose D1 binding to server-side code via globalThis
|
|
11
|
+
if (env?.DB) {
|
|
12
|
+
;(globalThis as any).__D1_DB = env.DB
|
|
13
|
+
}
|
|
14
|
+
return handler.fetch(request)
|
|
15
|
+
},
|
|
16
|
+
}
|
|
@@ -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-Csj9i19C.js";import{u as S,a as L,b as T}from"./DocsLayout-ERG7nrAc.js";import{B as O,r as U,F as $,M as V,a as _}from"./MarkdownHeadingContext-6I862CKH.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-Csj9i19C.js";import{F as he}from"./Footer-l6Y8-ltB.js";import{c as X}from"./react-os8EX6z1.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-Csj9i19C.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-Csj9i19C.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-pNf68F7f.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-Csj9i19C.js";import{T as k}from"./MarkdownHeadingContext-6I862CKH.js";import"./react-os8EX6z1.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};
|