@axerity/cli 0.1.3 → 0.2.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/bin/axerity.js +67 -194
- package/dist/client/_app/immutable/assets/0.jCJXzoiy.css +1 -0
- package/dist/client/_app/immutable/assets/2.DZRzHaE1.css +1 -0
- package/dist/client/_app/immutable/assets/geist-cyrillic-ext-wght-normal.DjL33-gN.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-cyrillic-wght-normal.BEAKL7Jp.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-latin-ext-wght-normal.DC-KSUi6.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-latin-wght-normal.BgDaEnEv.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-cyrillic-ext-wght-normal.I4S5GZfc.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-cyrillic-wght-normal.BmXc_FBt.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-latin-ext-wght-normal.DrnZ1wKl.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-latin-wght-normal.B_7UjwxQ.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-symbols2-wght-normal.GZpp1pK2.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-vietnamese-wght-normal.D8KDMBhC.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-vietnamese-wght-normal.6IgcOCM7.woff2 +0 -0
- package/dist/client/_app/immutable/chunks/0CIKaoUA.js +139 -0
- package/dist/client/_app/immutable/chunks/0tC8Ubqr.js +2 -0
- package/dist/client/_app/immutable/chunks/29nvmPLe2.js +1 -0
- package/dist/client/_app/immutable/chunks/9IV9o0dV2.js +4 -0
- package/dist/client/_app/immutable/chunks/B-elEOLV.js +24 -0
- package/dist/client/_app/immutable/chunks/B1R9-4vu.js +89 -0
- package/dist/client/_app/immutable/chunks/B1eXHGII2.js +10 -0
- package/dist/client/_app/immutable/chunks/B2NKIbe62.js +206 -0
- package/dist/client/_app/immutable/chunks/B5Brrqz92.js +1 -0
- package/dist/client/_app/immutable/chunks/B6nymVS3.js +1 -0
- package/dist/client/_app/immutable/chunks/B8E5l9fg2.js +1 -0
- package/dist/client/_app/immutable/chunks/B8gBHxth2.js +1 -0
- package/dist/client/_app/immutable/chunks/BC8A8xkk.js +2 -0
- package/dist/client/_app/immutable/chunks/BGU5ZGjx.js +1 -0
- package/dist/client/_app/immutable/chunks/BLhBgXDr2.js +1 -0
- package/dist/client/_app/immutable/chunks/BNdlLOgu2.js +2 -0
- package/dist/client/_app/immutable/chunks/BQyPqLag.js +84 -0
- package/dist/client/_app/immutable/chunks/BRQspS80.js +162 -0
- package/dist/client/_app/immutable/chunks/BVz-DmJs2.js +132 -0
- package/dist/client/_app/immutable/chunks/BWPyau1x.js +1 -0
- package/dist/client/_app/immutable/chunks/BXD4L9Ly.js +9 -0
- package/dist/client/_app/immutable/chunks/B_Yg36qy2.js +1 -0
- package/dist/client/_app/immutable/chunks/BcuUc08l.js +292 -0
- package/dist/client/_app/immutable/chunks/BdsP84LY.js +231 -0
- package/dist/client/_app/immutable/chunks/Bie0X5s02.js +62 -0
- package/dist/client/_app/immutable/chunks/BifhSqXX.js +1 -0
- package/dist/client/_app/immutable/chunks/BjVjgMFk2.js +15 -0
- package/dist/client/_app/immutable/chunks/BpwmCo88.js +1 -0
- package/dist/client/_app/immutable/chunks/BxQVBtgJ.js +1 -0
- package/dist/client/_app/immutable/chunks/C2oEw9bf.js +34 -0
- package/dist/client/_app/immutable/chunks/C6Oj8XFW.js +1 -0
- package/dist/client/_app/immutable/chunks/C6v0vZRT2.js +36 -0
- package/dist/client/_app/immutable/chunks/C7H7uo1r.js +70 -0
- package/dist/client/_app/immutable/chunks/C8Fc0cco.js +1 -0
- package/dist/client/_app/immutable/chunks/CDfHwfr9.js +1 -0
- package/dist/client/_app/immutable/chunks/CEW3xh3M.js +124 -0
- package/dist/client/_app/immutable/chunks/CFNmf5NX.js +1 -0
- package/dist/client/_app/immutable/chunks/CGhzzHe4.js +1 -0
- package/dist/client/_app/immutable/chunks/CJMWL00f.js +1 -0
- package/dist/client/_app/immutable/chunks/CLrCY0qQ2.js +1 -0
- package/dist/client/_app/immutable/chunks/COu5VFF2.js +78 -0
- package/dist/client/_app/immutable/chunks/CSKSodPl2.js +1 -0
- package/dist/client/_app/immutable/chunks/CVNFCEpi.js +1 -0
- package/dist/client/_app/immutable/chunks/CWUJwgR2.js +1 -0
- package/dist/client/_app/immutable/chunks/CXC42hVj.js +70 -0
- package/dist/client/_app/immutable/chunks/CZqBFf11.js +30 -0
- package/dist/client/_app/immutable/chunks/CaWcga612.js +1 -0
- package/dist/client/_app/immutable/chunks/CcX7Oofq.js +1 -0
- package/dist/client/_app/immutable/chunks/Chn8RaCU2.js +1 -0
- package/dist/client/_app/immutable/chunks/CtmfIXf-.js +161 -0
- package/dist/client/_app/immutable/chunks/D0Co2O6p.js +7 -0
- package/dist/client/_app/immutable/chunks/D1O9pT8r.js +1 -0
- package/dist/client/_app/immutable/chunks/D1z0eUZA.js +3 -0
- package/dist/client/_app/immutable/chunks/D5KVydqU.js +1 -0
- package/dist/client/_app/immutable/chunks/D6jRqBbL.js +1 -0
- package/dist/client/_app/immutable/chunks/DDXR3Aw12.js +1 -0
- package/dist/client/_app/immutable/chunks/DG5yTEkY.js +1 -0
- package/dist/client/_app/immutable/chunks/DGHybmkM2.js +1 -0
- package/dist/client/_app/immutable/chunks/DITdNjTm.js +7 -0
- package/dist/client/_app/immutable/chunks/D_nZbl6c.js +162 -0
- package/dist/client/_app/immutable/chunks/Dg6QheNk.js +85 -0
- package/dist/client/_app/immutable/chunks/Dn1BfjD4.js +1 -0
- package/dist/client/_app/immutable/chunks/DpEnPnBc.js +1 -0
- package/dist/client/_app/immutable/chunks/Drl36yuV.js +40 -0
- package/dist/client/_app/immutable/chunks/ED9-GWAc2.js +10 -0
- package/dist/client/_app/immutable/chunks/FqbQrHcz2.js +321 -0
- package/dist/client/_app/immutable/chunks/PLsDE8Xa.js +24 -0
- package/dist/client/_app/immutable/chunks/PwGqCEPd.js +106 -0
- package/dist/client/_app/immutable/chunks/QmWylQL4.js +96 -0
- package/dist/client/_app/immutable/chunks/SbORYBuH.js +1 -0
- package/dist/client/_app/immutable/chunks/Vhh-h91d.js +257 -0
- package/dist/client/_app/immutable/chunks/Y3d8lUBM.js +120 -0
- package/dist/client/_app/immutable/chunks/aheLp5ES.js +32 -0
- package/dist/client/_app/immutable/chunks/dcFrWhgf.js +1 -0
- package/dist/client/_app/immutable/chunks/dqbyyLvi2.js +10 -0
- package/dist/client/_app/immutable/chunks/hFfQmBrk2.js +1 -0
- package/dist/client/_app/immutable/chunks/m89wIWMZ.js +1 -0
- package/dist/client/_app/immutable/chunks/mktnrgVa.js +1 -0
- package/dist/client/_app/immutable/chunks/qD2cSsUD2.js +1 -0
- package/dist/client/_app/immutable/chunks/v-V-aVm52.js +43 -0
- package/dist/client/_app/immutable/chunks/v97jXyQK.js +3 -0
- package/dist/client/_app/immutable/chunks/wCc4pE4l.js +3 -0
- package/dist/client/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/client/_app/immutable/entry/app.BxBJhrll.js +2 -0
- package/dist/client/_app/immutable/entry/start.mAPciu1x.js +1 -0
- package/dist/client/_app/immutable/nodes/0.C7MOOY8s.js +1 -0
- package/dist/client/_app/immutable/nodes/1.C1SZKZS6.js +1 -0
- package/dist/client/_app/immutable/nodes/2.C9w6NQmI.js +28 -0
- package/dist/client/_app/version.json +1 -0
- package/dist/env.js +94 -0
- package/dist/handler.js +1494 -0
- package/dist/index.js +345 -0
- package/dist/server/chunks/0-lMxIppsX.js +40 -0
- package/dist/server/chunks/0-lMxIppsX.js.map +1 -0
- package/dist/server/chunks/1-CyLqCHnY.js +9 -0
- package/dist/server/chunks/1-CyLqCHnY.js.map +1 -0
- package/dist/server/chunks/2-B-CcMKoh.js +54 -0
- package/dist/server/chunks/2-B-CcMKoh.js.map +1 -0
- package/dist/server/chunks/Icon-B5VFrlh0.js +186 -0
- package/dist/server/chunks/Icon-B5VFrlh0.js.map +1 -0
- package/dist/server/chunks/_error.svelte-COifK9P1.js +48 -0
- package/dist/server/chunks/_error.svelte-COifK9P1.js.map +1 -0
- package/dist/server/chunks/_layout.svelte-DTQwWfEr.js +31 -0
- package/dist/server/chunks/_layout.svelte-DTQwWfEr.js.map +1 -0
- package/dist/server/chunks/_page.svelte-gMTRy91w.js +2206 -0
- package/dist/server/chunks/_page.svelte-gMTRy91w.js.map +1 -0
- package/dist/server/chunks/_server.ts-BBt3KS4Z.js +32 -0
- package/dist/server/chunks/_server.ts-BBt3KS4Z.js.map +1 -0
- package/dist/server/chunks/_server.ts-BaIDzhzq.js +26 -0
- package/dist/server/chunks/_server.ts-BaIDzhzq.js.map +1 -0
- package/dist/server/chunks/_server.ts-BtzVXaCw.js +29 -0
- package/dist/server/chunks/_server.ts-BtzVXaCw.js.map +1 -0
- package/dist/server/chunks/_server.ts-BuKSyj8m.js +37 -0
- package/dist/server/chunks/_server.ts-BuKSyj8m.js.map +1 -0
- package/dist/server/chunks/_server.ts-Cfw-nQ4-.js +31 -0
- package/dist/server/chunks/_server.ts-Cfw-nQ4-.js.map +1 -0
- package/dist/server/chunks/_server.ts-DlaxEvWB.js +53 -0
- package/dist/server/chunks/_server.ts-DlaxEvWB.js.map +1 -0
- package/dist/server/chunks/_server.ts-DnjaLdrg.js +195 -0
- package/dist/server/chunks/_server.ts-DnjaLdrg.js.map +1 -0
- package/dist/server/chunks/_server.ts-T58MO2wL.js +41 -0
- package/dist/server/chunks/_server.ts-T58MO2wL.js.map +1 -0
- package/dist/server/chunks/content-store-DPJsj8gD.js +5252 -0
- package/dist/server/chunks/content-store-DPJsj8gD.js.map +1 -0
- package/dist/server/chunks/docpage-BkHysAhp.js +5 -0
- package/dist/server/chunks/docpage-BkHysAhp.js.map +1 -0
- package/dist/server/chunks/exports-ZnEJ4gG9.js +758 -0
- package/dist/server/chunks/exports-ZnEJ4gG9.js.map +1 -0
- package/dist/server/chunks/hooks.server-nz527EC9.js +42 -0
- package/dist/server/chunks/hooks.server-nz527EC9.js.map +1 -0
- package/dist/server/chunks/internal-CvDbuC7W.js +5374 -0
- package/dist/server/chunks/internal-CvDbuC7W.js.map +1 -0
- package/dist/server/chunks/mdfile-DBiwGtNY.js +5 -0
- package/dist/server/chunks/mdfile-DBiwGtNY.js.map +1 -0
- package/dist/server/chunks/site-BfALkgJ-.js +52 -0
- package/dist/server/chunks/site-BfALkgJ-.js.map +1 -0
- package/dist/server/index.js +4356 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/manifest.js +103 -0
- package/dist/server/manifest.js.map +1 -0
- package/dist/shims.js +32 -0
- package/package.json +24 -16
- package/runtime/crawl.js +48 -0
- package/runtime/preview.js +42 -0
- package/runtime/serve.js +69 -0
- package/mdsvex.config.js +0 -261
- package/scripts/prepare-engine.mjs +0 -20
- package/src/app.d.ts +0 -17
- package/src/app.html +0 -39
- package/src/content/demo/api/meta.json +0 -5
- package/src/content/demo/api/pet/add-pet.md +0 -105
- package/src/content/demo/api/pet/delete-pet.md +0 -70
- package/src/content/demo/api/pet/find-by-status.md +0 -72
- package/src/content/demo/api/pet/find-by-tags.md +0 -64
- package/src/content/demo/api/pet/get-pet.md +0 -99
- package/src/content/demo/api/pet/meta.json +0 -15
- package/src/content/demo/api/pet/pet-object.md +0 -112
- package/src/content/demo/api/pet/update-pet-with-form.md +0 -69
- package/src/content/demo/api/pet/update-pet.md +0 -79
- package/src/content/demo/api/pet/upload-image.md +0 -79
- package/src/content/demo/api/store/delete-order.md +0 -62
- package/src/content/demo/api/store/get-order.md +0 -70
- package/src/content/demo/api/store/inventory.md +0 -54
- package/src/content/demo/api/store/meta.json +0 -5
- package/src/content/demo/api/store/order-object.md +0 -77
- package/src/content/demo/api/store/place-order.md +0 -83
- package/src/content/demo/api/user/create-user.md +0 -69
- package/src/content/demo/api/user/create-with-list.md +0 -57
- package/src/content/demo/api/user/delete-user.md +0 -61
- package/src/content/demo/api/user/get-user.md +0 -69
- package/src/content/demo/api/user/login.md +0 -80
- package/src/content/demo/api/user/logout.md +0 -45
- package/src/content/demo/api/user/meta.json +0 -14
- package/src/content/demo/api/user/update-user.md +0 -69
- package/src/content/demo/api/user/user-object.md +0 -85
- package/src/content/demo/changelog.md +0 -44
- package/src/content/demo/components/accordion.md +0 -70
- package/src/content/demo/components/api.md +0 -185
- package/src/content/demo/components/badge.md +0 -34
- package/src/content/demo/components/callout.md +0 -83
- package/src/content/demo/components/cards.md +0 -88
- package/src/content/demo/components/code-group.md +0 -55
- package/src/content/demo/components/columns.md +0 -42
- package/src/content/demo/components/frame.md +0 -51
- package/src/content/demo/components/icon.md +0 -54
- package/src/content/demo/components/kbd.md +0 -28
- package/src/content/demo/components/meta.json +0 -26
- package/src/content/demo/components/roadmap.md +0 -86
- package/src/content/demo/components/steps.md +0 -72
- package/src/content/demo/components/tabs.md +0 -146
- package/src/content/demo/components/tooltip.md +0 -44
- package/src/content/demo/components/tree.md +0 -83
- package/src/content/demo/components/type-table.md +0 -77
- package/src/content/demo/components/update.md +0 -48
- package/src/content/demo/components/video.md +0 -56
- package/src/content/demo/components/webhooks.md +0 -109
- package/src/content/demo/components/websockets.md +0 -101
- package/src/content/demo/configuration/ai.md +0 -40
- package/src/content/demo/configuration/cli.md +0 -48
- package/src/content/demo/configuration/deployment.md +0 -105
- package/src/content/demo/configuration/index.md +0 -92
- package/src/content/demo/configuration/layouts.md +0 -51
- package/src/content/demo/configuration/meta.json +0 -5
- package/src/content/demo/configuration/navigation.md +0 -167
- package/src/content/demo/configuration/openapi.md +0 -103
- package/src/content/demo/configuration/search.md +0 -36
- package/src/content/demo/index.md +0 -59
- package/src/content/demo/installation.md +0 -66
- package/src/content/demo/meta.json +0 -15
- package/src/content/demo/quick-start.md +0 -47
- package/src/content/demo/theming/advanced.md +0 -116
- package/src/content/demo/theming/code.md +0 -66
- package/src/content/demo/theming/colors.md +0 -103
- package/src/content/demo/theming/index.md +0 -88
- package/src/content/demo/theming/layout.md +0 -71
- package/src/content/demo/theming/meta.json +0 -5
- package/src/content/demo/theming/themes.md +0 -99
- package/src/content/demo/theming/typography.md +0 -83
- package/src/content/demo/writing/code-blocks.md +0 -154
- package/src/content/demo/writing/diagrams.md +0 -44
- package/src/content/demo/writing/frontmatter.md +0 -33
- package/src/content/demo/writing/markdown.md +0 -62
- package/src/content/demo/writing/meta.json +0 -5
- package/src/hooks.server.ts +0 -49
- package/src/lib/assets/favicon.svg +0 -1
- package/src/lib/base.ts +0 -12
- package/src/lib/components/DynamicIcon.svelte +0 -41
- package/src/lib/components/docs/Analytics.svelte +0 -38
- package/src/lib/components/docs/Banner.svelte +0 -44
- package/src/lib/components/docs/Breadcrumbs.svelte +0 -38
- package/src/lib/components/docs/CopyPageMenu.svelte +0 -119
- package/src/lib/components/docs/DocsLayout.svelte +0 -192
- package/src/lib/components/docs/Footer.svelte +0 -60
- package/src/lib/components/docs/Mermaid.svelte +0 -39
- package/src/lib/components/docs/Navbar.svelte +0 -144
- package/src/lib/components/docs/PageMeta.svelte +0 -35
- package/src/lib/components/docs/PageNav.svelte +0 -44
- package/src/lib/components/docs/SearchDialog.svelte +0 -182
- package/src/lib/components/docs/Sidebar.svelte +0 -85
- package/src/lib/components/docs/SidebarDropdown.svelte +0 -56
- package/src/lib/components/docs/SidebarFooterLinks.svelte +0 -19
- package/src/lib/components/docs/SidebarGroup.svelte +0 -54
- package/src/lib/components/docs/SidebarLink.svelte +0 -67
- package/src/lib/components/docs/TableOfContents.svelte +0 -77
- package/src/lib/components/docs/ThemeToggle.svelte +0 -19
- package/src/lib/components/docs/VersionSwitcher.svelte +0 -80
- package/src/lib/components/kit/Accordion.svelte +0 -60
- package/src/lib/components/kit/AccordionGroup.svelte +0 -13
- package/src/lib/components/kit/Badge.svelte +0 -32
- package/src/lib/components/kit/Callout.svelte +0 -51
- package/src/lib/components/kit/Card.svelte +0 -72
- package/src/lib/components/kit/CardGroup.svelte +0 -21
- package/src/lib/components/kit/CodeGroup.svelte +0 -65
- package/src/lib/components/kit/Columns.svelte +0 -26
- package/src/lib/components/kit/Event.svelte +0 -23
- package/src/lib/components/kit/EventList.svelte +0 -9
- package/src/lib/components/kit/File.svelte +0 -15
- package/src/lib/components/kit/Folder.svelte +0 -46
- package/src/lib/components/kit/Frame.svelte +0 -81
- package/src/lib/components/kit/Icon.svelte +0 -17
- package/src/lib/components/kit/Kbd.svelte +0 -11
- package/src/lib/components/kit/Roadmap.svelte +0 -15
- package/src/lib/components/kit/RoadmapItem.svelte +0 -109
- package/src/lib/components/kit/Step.svelte +0 -63
- package/src/lib/components/kit/Steps.svelte +0 -16
- package/src/lib/components/kit/Tab.svelte +0 -27
- package/src/lib/components/kit/Tabs.svelte +0 -75
- package/src/lib/components/kit/Tooltip.svelte +0 -33
- package/src/lib/components/kit/Tree.svelte +0 -11
- package/src/lib/components/kit/TypeTable.svelte +0 -187
- package/src/lib/components/kit/Update.svelte +0 -32
- package/src/lib/components/kit/Video.svelte +0 -64
- package/src/lib/components/kit/accordion-context.ts +0 -1
- package/src/lib/components/kit/api/Api.svelte +0 -80
- package/src/lib/components/kit/api/ApiExamplePanel.svelte +0 -100
- package/src/lib/components/kit/api/ApiField.svelte +0 -124
- package/src/lib/components/kit/api/Channel.svelte +0 -121
- package/src/lib/components/kit/api/Endpoint.svelte +0 -116
- package/src/lib/components/kit/api/Enum.svelte +0 -44
- package/src/lib/components/kit/api/EnumValues.svelte +0 -35
- package/src/lib/components/kit/api/Expandable.svelte +0 -70
- package/src/lib/components/kit/api/Message.svelte +0 -67
- package/src/lib/components/kit/api/ObjectExample.svelte +0 -11
- package/src/lib/components/kit/api/RequestExample.svelte +0 -11
- package/src/lib/components/kit/api/ResponseExample.svelte +0 -11
- package/src/lib/components/kit/api/Webhook.svelte +0 -115
- package/src/lib/components/kit/api/api-context.ts +0 -15
- package/src/lib/components/kit/tabs-context.ts +0 -8
- package/src/lib/components/kit/tabs-store.svelte.ts +0 -28
- package/src/lib/config/site.ts +0 -34
- package/src/lib/content/index.ts +0 -50
- package/src/lib/content/raw.ts +0 -21
- package/src/lib/content/tree.ts +0 -169
- package/src/lib/index.ts +0 -79
- package/src/lib/nav-match.ts +0 -23
- package/src/lib/openapi/generate.ts +0 -629
- package/src/lib/server/og.ts +0 -140
- package/src/lib/state/search.svelte.ts +0 -9
- package/src/lib/state/theme.svelte.ts +0 -58
- package/src/lib/types.ts +0 -216
- package/src/params/docpage.ts +0 -3
- package/src/params/mdfile.ts +0 -3
- package/src/routes/+error.svelte +0 -46
- package/src/routes/+layout.svelte +0 -25
- package/src/routes/[...path=mdfile]/+server.ts +0 -21
- package/src/routes/[...slug=docpage]/+page.svelte +0 -63
- package/src/routes/[...slug=docpage]/+page.ts +0 -44
- package/src/routes/layout.css +0 -897
- package/src/routes/llms-full.txt/+server.ts +0 -22
- package/src/routes/llms.txt/+server.ts +0 -20
- package/src/routes/og/[...slug]/+server.ts +0 -77
- package/src/routes/rss.xml/+server.ts +0 -65
- package/src/routes/search.json/+server.ts +0 -54
- package/src/routes/sitemap.xml/+server.ts +0 -21
- package/svelte.config.js +0 -35
- package/tsconfig.json +0 -20
- package/vite.config.ts +0 -46
- /package/{static → dist/client}/favicon-dark.svg +0 -0
- /package/{static → dist/client}/favicon-light.svg +0 -0
- /package/{static → dist/client}/favicon.svg +0 -0
- /package/{static → dist/client}/fonts/geist-400.ttf +0 -0
- /package/{static → dist/client}/fonts/geist-600.ttf +0 -0
- /package/{static → dist/client}/fonts/geist-700.ttf +0 -0
- /package/{static → dist/client}/og-image.png +0 -0
- /package/{static → dist/client}/robots.txt +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const manifest = (() => {
|
|
2
|
+
function __memo(fn) {
|
|
3
|
+
let value;
|
|
4
|
+
return () => value ??= (value = fn());
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
return {
|
|
8
|
+
appDir: "_app",
|
|
9
|
+
appPath: "_app",
|
|
10
|
+
assets: new Set(["favicon-dark.svg","favicon-light.svg","favicon.svg","fonts/geist-400.ttf","fonts/geist-600.ttf","fonts/geist-700.ttf","og-image.png","robots.txt"]),
|
|
11
|
+
mimeTypes: {".svg":"image/svg+xml",".ttf":"font/ttf",".png":"image/png",".txt":"text/plain"},
|
|
12
|
+
_: {
|
|
13
|
+
client: {start:"_app/immutable/entry/start.mAPciu1x.js",app:"_app/immutable/entry/app.BxBJhrll.js",imports:["_app/immutable/entry/start.mAPciu1x.js","_app/immutable/chunks/v97jXyQK.js","_app/immutable/chunks/wCc4pE4l.js","_app/immutable/entry/app.BxBJhrll.js","_app/immutable/chunks/wCc4pE4l.js","_app/immutable/chunks/xihTtKlq.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
14
|
+
nodes: [
|
|
15
|
+
__memo(() => import('./chunks/0-lMxIppsX.js')),
|
|
16
|
+
__memo(() => import('./chunks/1-CyLqCHnY.js')),
|
|
17
|
+
__memo(() => import('./chunks/2-B-CcMKoh.js'))
|
|
18
|
+
],
|
|
19
|
+
remotes: {
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
routes: [
|
|
23
|
+
{
|
|
24
|
+
id: "/__manifest",
|
|
25
|
+
pattern: /^\/__manifest\/?$/,
|
|
26
|
+
params: [],
|
|
27
|
+
page: null,
|
|
28
|
+
endpoint: __memo(() => import('./chunks/_server.ts-BuKSyj8m.js'))
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "/llms-full.txt",
|
|
32
|
+
pattern: /^\/llms-full\.txt\/?$/,
|
|
33
|
+
params: [],
|
|
34
|
+
page: null,
|
|
35
|
+
endpoint: __memo(() => import('./chunks/_server.ts-Cfw-nQ4-.js'))
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "/llms.txt",
|
|
39
|
+
pattern: /^\/llms\.txt\/?$/,
|
|
40
|
+
params: [],
|
|
41
|
+
page: null,
|
|
42
|
+
endpoint: __memo(() => import('./chunks/_server.ts-BBt3KS4Z.js'))
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "/og/[...slug]",
|
|
46
|
+
pattern: /^\/og(?:\/([^]*))?\/?$/,
|
|
47
|
+
params: [{"name":"slug","optional":false,"rest":true,"chained":true}],
|
|
48
|
+
page: null,
|
|
49
|
+
endpoint: __memo(() => import('./chunks/_server.ts-DnjaLdrg.js'))
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "/rss.xml",
|
|
53
|
+
pattern: /^\/rss\.xml\/?$/,
|
|
54
|
+
params: [],
|
|
55
|
+
page: null,
|
|
56
|
+
endpoint: __memo(() => import('./chunks/_server.ts-DlaxEvWB.js'))
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "/search.json",
|
|
60
|
+
pattern: /^\/search\.json\/?$/,
|
|
61
|
+
params: [],
|
|
62
|
+
page: null,
|
|
63
|
+
endpoint: __memo(() => import('./chunks/_server.ts-T58MO2wL.js'))
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "/sitemap.xml",
|
|
67
|
+
pattern: /^\/sitemap\.xml\/?$/,
|
|
68
|
+
params: [],
|
|
69
|
+
page: null,
|
|
70
|
+
endpoint: __memo(() => import('./chunks/_server.ts-BtzVXaCw.js'))
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "/[...path=mdfile]",
|
|
74
|
+
pattern: /^(?:\/([^]*))?\/?$/,
|
|
75
|
+
params: [{"name":"path","matcher":"mdfile","optional":false,"rest":true,"chained":true}],
|
|
76
|
+
page: null,
|
|
77
|
+
endpoint: __memo(() => import('./chunks/_server.ts-BaIDzhzq.js'))
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "/[...slug=docpage]",
|
|
81
|
+
pattern: /^(?:\/([^]*))?\/?$/,
|
|
82
|
+
params: [{"name":"slug","matcher":"docpage","optional":false,"rest":true,"chained":true}],
|
|
83
|
+
page: { layouts: [0,], errors: [1,], leaf: 2 },
|
|
84
|
+
endpoint: null
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
prerendered_routes: new Set([]),
|
|
88
|
+
matchers: async () => {
|
|
89
|
+
const { match: mdfile } = await import ('./chunks/mdfile-DBiwGtNY.js');
|
|
90
|
+
const { match: docpage } = await import ('./chunks/docpage-BkHysAhp.js');
|
|
91
|
+
return { mdfile, docpage };
|
|
92
|
+
},
|
|
93
|
+
server_assets: {}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
})();
|
|
97
|
+
|
|
98
|
+
const prerendered = new Set([]);
|
|
99
|
+
|
|
100
|
+
const base = "";
|
|
101
|
+
|
|
102
|
+
export { base, manifest, prerendered };
|
|
103
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sources":["../../.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([\"favicon-dark.svg\",\"favicon-light.svg\",\"favicon.svg\",\"fonts/geist-400.ttf\",\"fonts/geist-600.ttf\",\"fonts/geist-700.ttf\",\"og-image.png\",\"robots.txt\"]),\n\tmimeTypes: {\".svg\":\"image/svg+xml\",\".ttf\":\"font/ttf\",\".png\":\"image/png\",\".txt\":\"text/plain\"},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.mAPciu1x.js\",app:\"_app/immutable/entry/app.BxBJhrll.js\",imports:[\"_app/immutable/entry/start.mAPciu1x.js\",\"_app/immutable/chunks/v97jXyQK.js\",\"_app/immutable/chunks/wCc4pE4l.js\",\"_app/immutable/entry/app.BxBJhrll.js\",\"_app/immutable/chunks/wCc4pE4l.js\",\"_app/immutable/chunks/xihTtKlq.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js'))\n\t\t],\n\t\tremotes: {\n\t\t\t\n\t\t},\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/__manifest\",\n\t\t\t\tpattern: /^\\/__manifest\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/__manifest/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/llms-full.txt\",\n\t\t\t\tpattern: /^\\/llms-full\\.txt\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/llms-full.txt/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/llms.txt\",\n\t\t\t\tpattern: /^\\/llms\\.txt\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/llms.txt/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/og/[...slug]\",\n\t\t\t\tpattern: /^\\/og(?:\\/([^]*))?\\/?$/,\n\t\t\t\tparams: [{\"name\":\"slug\",\"optional\":false,\"rest\":true,\"chained\":true}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/og/_...slug_/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/rss.xml\",\n\t\t\t\tpattern: /^\\/rss\\.xml\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/rss.xml/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/search.json\",\n\t\t\t\tpattern: /^\\/search\\.json\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/search.json/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/sitemap.xml\",\n\t\t\t\tpattern: /^\\/sitemap\\.xml\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/sitemap.xml/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/[...path=mdfile]\",\n\t\t\t\tpattern: /^(?:\\/([^]*))?\\/?$/,\n\t\t\t\tparams: [{\"name\":\"path\",\"matcher\":\"mdfile\",\"optional\":false,\"rest\":true,\"chained\":true}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/_...path_mdfile_/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/[...slug=docpage]\",\n\t\t\t\tpattern: /^(?:\\/([^]*))?\\/?$/,\n\t\t\t\tparams: [{\"name\":\"slug\",\"matcher\":\"docpage\",\"optional\":false,\"rest\":true,\"chained\":true}],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async () => {\n\t\t\tconst { match: mdfile } = await import ('./entries/matchers/mdfile.js')\n\t\t\tconst { match: docpage } = await import ('./entries/matchers/docpage.js')\n\t\t\treturn { mdfile, docpage };\n\t\t},\n\t\tserver_assets: {}\n\t}\n}\n})();\n\nexport const prerendered = new Set([]);\n\nexport const base = \"\";"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,MAAM;AAC/B,SAAS,MAAM,CAAC,EAAE,EAAE;AACpB,CAAC,IAAI,KAAK;AACV,CAAC,OAAO,MAAM,KAAK,MAAM,KAAK,GAAG,EAAE,EAAE,CAAC;AACtC;;AAEA,OAAO;AACP,CAAC,MAAM,EAAE,MAAM;AACf,CAAC,OAAO,EAAE,MAAM;AAChB,CAAC,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,aAAa,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;AACtK,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC;AAC7F,CAAC,CAAC,EAAE;AACJ,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,wCAAwC,CAAC,GAAG,CAAC,sCAAsC,CAAC,OAAO,CAAC,CAAC,wCAAwC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,sCAAsC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC;AACrY,EAAE,KAAK,EAAE;AACT,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC;AACtC,GAAG;AACH,EAAE,OAAO,EAAE;AACX;AACA,GAAG;AACH,EAAE,MAAM,EAAE;AACV,GAAG;AACH,IAAI,EAAE,EAAE,aAAa;AACrB,IAAI,OAAO,EAAE,mBAAmB;AAChC,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAA8C,CAAC;AACjF,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,gBAAgB;AACxB,IAAI,OAAO,EAAE,uBAAuB;AACpC,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAAiD,CAAC;AACpF,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,WAAW;AACnB,IAAI,OAAO,EAAE,kBAAkB;AAC/B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAA4C,CAAC;AAC/E,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,eAAe;AACvB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACzE,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAAgD,CAAC;AACnF,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,UAAU;AAClB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAA2C,CAAC;AAC9E,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,cAAc;AACtB,IAAI,OAAO,EAAE,qBAAqB;AAClC,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAA+C,CAAC;AAClF,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,cAAc;AACtB,IAAI,OAAO,EAAE,qBAAqB;AAClC,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAA+C,CAAC;AAClF,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,mBAAmB;AAC3B,IAAI,OAAO,EAAE,oBAAoB;AACjC,IAAI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC5F,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAAoD,CAAC;AACvF,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,oBAAoB;AAC5B,IAAI,OAAO,EAAE,oBAAoB;AACjC,IAAI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC7F,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd;AACA,GAAG;AACH,EAAE,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,QAAQ,6BAA8B;AACzE,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,8BAA+B;AAC3E,GAAG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;AAC7B,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;AAEW,MAAC,WAAW,GAAG,IAAI,GAAG,CAAC,EAAE;;AAEzB,MAAC,IAAI,GAAG;;;;"}
|
package/dist/shims.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import buffer from 'node:buffer';
|
|
2
|
+
import { webcrypto } from 'node:crypto';
|
|
3
|
+
|
|
4
|
+
// `buffer.File` was added in Node 18.13.0 while the `File` global was added in Node 20.0.0
|
|
5
|
+
const File = /** @type {import('node:buffer') & { File?: File}} */ (buffer).File;
|
|
6
|
+
|
|
7
|
+
/** @type {Record<string, any>} */
|
|
8
|
+
const globals = {
|
|
9
|
+
crypto: webcrypto,
|
|
10
|
+
File
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// exported for dev/preview and node environments
|
|
14
|
+
/**
|
|
15
|
+
* Make various web APIs available as globals:
|
|
16
|
+
* - `crypto`
|
|
17
|
+
* - `File`
|
|
18
|
+
*/
|
|
19
|
+
function installPolyfills() {
|
|
20
|
+
for (const name in globals) {
|
|
21
|
+
if (name in globalThis) continue;
|
|
22
|
+
|
|
23
|
+
Object.defineProperty(globalThis, name, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: globals[name]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
installPolyfills();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axerity/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A documentation site generator built with Svelte.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,13 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"bin",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"static",
|
|
41
|
-
"svelte.config.js",
|
|
42
|
-
"vite.config.ts",
|
|
43
|
-
"mdsvex.config.js",
|
|
44
|
-
"tsconfig.json",
|
|
38
|
+
"dist",
|
|
39
|
+
"runtime",
|
|
45
40
|
"axerity.default.json",
|
|
46
41
|
"axerity.schema.json",
|
|
47
42
|
"README.md"
|
|
@@ -53,36 +48,49 @@
|
|
|
53
48
|
"@orama/orama": "^3.1.18",
|
|
54
49
|
"@resvg/resvg-js": "^2.6.2",
|
|
55
50
|
"@shikijs/twoslash": "^4.1.0",
|
|
56
|
-
"@sveltejs/adapter-static": "^3.0.10",
|
|
57
51
|
"@sveltejs/kit": "^2.61.1",
|
|
58
52
|
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
|
59
53
|
"@tailwindcss/forms": "^0.5.11",
|
|
60
54
|
"@tailwindcss/typography": "^0.5.19",
|
|
61
55
|
"@tailwindcss/vite": "^4.3.0",
|
|
56
|
+
"acorn": "^8.16.0",
|
|
57
|
+
"chokidar": "^5.0.0",
|
|
62
58
|
"lucide": "^1.17.0",
|
|
63
|
-
"
|
|
59
|
+
"mdast-util-mdx-jsx": "^3.2.0",
|
|
64
60
|
"mermaid": "^11.15.0",
|
|
61
|
+
"micromark-extension-mdx-jsx": "^3.0.2",
|
|
65
62
|
"rehype-slug": "^6.0.0",
|
|
63
|
+
"remark-frontmatter": "^5.0.0",
|
|
64
|
+
"remark-gfm": "^4.0.1",
|
|
65
|
+
"remark-parse": "^11.0.0",
|
|
66
|
+
"remark-rehype": "^11.1.2",
|
|
66
67
|
"satori": "^0.26.0",
|
|
67
68
|
"shiki": "^4.1.0",
|
|
68
69
|
"svelte": "^5.56.0",
|
|
69
70
|
"tailwindcss": "^4.3.0",
|
|
70
71
|
"twoslash": "^0.3.8",
|
|
71
72
|
"typescript": "^6.0.3",
|
|
73
|
+
"unified": "^11.0.5",
|
|
72
74
|
"vite": "^8.0.14",
|
|
73
75
|
"yaml": "^2.9.0"
|
|
74
76
|
},
|
|
75
77
|
"devDependencies": {
|
|
76
78
|
"@eslint/compat": "^2.1.0",
|
|
77
79
|
"@eslint/js": "^10.0.1",
|
|
80
|
+
"@sveltejs/adapter-node": "^5.5.4",
|
|
81
|
+
"@types/hast": "^3.0.4",
|
|
82
|
+
"@types/mdast": "^4.0.4",
|
|
78
83
|
"@types/node": "^25.9.1",
|
|
79
84
|
"eslint": "^10.4.1",
|
|
80
85
|
"eslint-config-prettier": "^10.1.8",
|
|
81
86
|
"eslint-plugin-svelte": "^3.19.0",
|
|
87
|
+
"github-slugger": "^2.0.0",
|
|
82
88
|
"globals": "^17.6.0",
|
|
89
|
+
"mdast-util-to-hast": "^13.2.1",
|
|
83
90
|
"prettier": "^3.8.3",
|
|
84
91
|
"prettier-plugin-svelte": "^4.0.1",
|
|
85
92
|
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
93
|
+
"remark-smartypants": "^3.0.2",
|
|
86
94
|
"svelte-check": "^4.4.8",
|
|
87
95
|
"typescript-eslint": "^8.60.0"
|
|
88
96
|
},
|
|
@@ -90,12 +98,12 @@
|
|
|
90
98
|
"axerity": "node ./bin/axerity.js",
|
|
91
99
|
"postversion": "git push --follow-tags",
|
|
92
100
|
"prepare-engine": "node scripts/prepare-engine.mjs",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"preview": "
|
|
101
|
+
"build:engine": "vite build",
|
|
102
|
+
"predev": "node scripts/prepare-engine.mjs && vite build",
|
|
103
|
+
"dev": "node ./bin/axerity.js dev",
|
|
104
|
+
"prebuild": "node scripts/prepare-engine.mjs && vite build",
|
|
105
|
+
"build": "node ./bin/axerity.js build",
|
|
106
|
+
"preview": "node ./bin/axerity.js preview",
|
|
99
107
|
"check": "node scripts/prepare-engine.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
100
108
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
101
109
|
"lint": "prettier --check . --ignore-path .gitignore --ignore-path .prettierignore && eslint .",
|
package/runtime/crawl.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createServer } from 'node:http';
|
|
2
|
+
import { cpSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { handler } from '../dist/handler.js';
|
|
5
|
+
|
|
6
|
+
const OUT = process.env.AXERITY_OUT ?? 'build';
|
|
7
|
+
|
|
8
|
+
const server = createServer((req, res) =>
|
|
9
|
+
handler(req, res, () => {
|
|
10
|
+
res.statusCode = 404;
|
|
11
|
+
res.end('Not found');
|
|
12
|
+
})
|
|
13
|
+
);
|
|
14
|
+
await new Promise((resolve) => server.listen(0, resolve));
|
|
15
|
+
const origin = `http://localhost:${server.address().port}`;
|
|
16
|
+
const get = (path) => fetch(origin + path);
|
|
17
|
+
const bytes = async (res) => Buffer.from(await res.arrayBuffer());
|
|
18
|
+
|
|
19
|
+
const write = (rel, data) => {
|
|
20
|
+
const file = join(OUT, rel);
|
|
21
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
22
|
+
writeFileSync(file, data);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
rmSync(OUT, { recursive: true, force: true });
|
|
26
|
+
mkdirSync(OUT, { recursive: true });
|
|
27
|
+
cpSync('dist/client', OUT, { recursive: true });
|
|
28
|
+
|
|
29
|
+
const manifest = await (await get('/__manifest')).json();
|
|
30
|
+
const { base } = manifest;
|
|
31
|
+
const relOf = (path) => path.slice(base.length).replace(/^\//, '');
|
|
32
|
+
|
|
33
|
+
for (const path of manifest.pages) {
|
|
34
|
+
const rel = relOf(path);
|
|
35
|
+
write(rel === '' ? 'index.html' : `${rel}.html`, await bytes(await get(path)));
|
|
36
|
+
const dataUrl = rel === '' ? `${base}/__data.json` : `${base}/${rel}/__data.json`;
|
|
37
|
+
const dataRes = await get(dataUrl);
|
|
38
|
+
if (dataRes.ok) write(rel === '' ? '__data.json' : `${rel}/__data.json`, await bytes(dataRes));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
for (const path of [...manifest.md, ...manifest.og, ...manifest.fixed]) {
|
|
42
|
+
write(relOf(path), await bytes(await get(path)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
write('404.html', await bytes(await get(`${base}/__axerity_not_found__`)));
|
|
46
|
+
|
|
47
|
+
server.close();
|
|
48
|
+
console.log(`crawled ${manifest.pages.length} pages to ./${OUT}`);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createServer } from 'node:http';
|
|
2
|
+
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
3
|
+
import { extname, join } from 'node:path';
|
|
4
|
+
|
|
5
|
+
const OUT = process.env.AXERITY_OUT ?? 'build';
|
|
6
|
+
const PORT = Number(process.env.PORT ?? 4173);
|
|
7
|
+
|
|
8
|
+
const TYPES = {
|
|
9
|
+
'.html': 'text/html',
|
|
10
|
+
'.js': 'text/javascript',
|
|
11
|
+
'.css': 'text/css',
|
|
12
|
+
'.json': 'application/json',
|
|
13
|
+
'.svg': 'image/svg+xml',
|
|
14
|
+
'.png': 'image/png',
|
|
15
|
+
'.txt': 'text/plain; charset=utf-8',
|
|
16
|
+
'.xml': 'application/xml',
|
|
17
|
+
'.md': 'text/plain; charset=utf-8',
|
|
18
|
+
'.ttf': 'font/ttf',
|
|
19
|
+
'.woff2': 'font/woff2'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const resolveFile = (urlPath) => {
|
|
23
|
+
const clean = decodeURIComponent(urlPath.split('?')[0]);
|
|
24
|
+
const candidates = [join(OUT, clean)];
|
|
25
|
+
if (existsSync(candidates[0]) && statSync(candidates[0]).isDirectory()) {
|
|
26
|
+
candidates.push(join(candidates[0], 'index.html'));
|
|
27
|
+
}
|
|
28
|
+
candidates.push(join(OUT, `${clean}.html`));
|
|
29
|
+
candidates.push(join(OUT, 'index.html'));
|
|
30
|
+
return candidates.find((file) => existsSync(file) && statSync(file).isFile());
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
createServer((req, res) => {
|
|
34
|
+
const file = resolveFile(req.url) ?? join(OUT, '404.html');
|
|
35
|
+
if (!existsSync(file)) {
|
|
36
|
+
res.statusCode = 404;
|
|
37
|
+
res.end('Not found');
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
res.setHeader('content-type', TYPES[extname(file)] ?? 'application/octet-stream');
|
|
41
|
+
res.end(readFileSync(file));
|
|
42
|
+
}).listen(PORT, () => console.log(`axerity preview → http://localhost:${PORT}`));
|
package/runtime/serve.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { createServer } from 'node:http';
|
|
2
|
+
import { basename, relative, resolve } from 'node:path';
|
|
3
|
+
import chokidar from 'chokidar';
|
|
4
|
+
import { handler } from '../dist/handler.js';
|
|
5
|
+
|
|
6
|
+
const PORT = Number(process.env.PORT ?? 5173);
|
|
7
|
+
const CONTENT_DIR = resolve(process.env.AXERITY_CONTENT_DIR ?? 'src/content/docs');
|
|
8
|
+
const CONFIG = resolve(process.env.AXERITY_CONFIG ?? 'axerity.json');
|
|
9
|
+
|
|
10
|
+
const tty = process.stdout.isTTY;
|
|
11
|
+
const paint = (code) => (s) => (tty ? `\x1b[${code}m${s}\x1b[0m` : s);
|
|
12
|
+
const dim = paint('2');
|
|
13
|
+
const brand = (s) => (tty ? `\x1b[38;2;124;108;246m${s}\x1b[0m` : s);
|
|
14
|
+
const strip = (s) => s.replace(/\x1b\[[0-9;]*m/g, '');
|
|
15
|
+
|
|
16
|
+
const clients = new Set();
|
|
17
|
+
|
|
18
|
+
const server = createServer((req, res) => {
|
|
19
|
+
if (req.url === '/__axerity_livereload') {
|
|
20
|
+
res.writeHead(200, {
|
|
21
|
+
'content-type': 'text/event-stream',
|
|
22
|
+
'cache-control': 'no-cache',
|
|
23
|
+
connection: 'keep-alive'
|
|
24
|
+
});
|
|
25
|
+
res.write(':ok\n\n');
|
|
26
|
+
clients.add(res);
|
|
27
|
+
req.on('close', () => clients.delete(res));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
handler(req, res, () => {
|
|
31
|
+
res.statusCode = 404;
|
|
32
|
+
res.end('Not found');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const label = (path) => {
|
|
37
|
+
if (resolve(path) === CONFIG) return 'axerity.json';
|
|
38
|
+
const rel = relative(CONTENT_DIR, resolve(path));
|
|
39
|
+
return rel && !rel.startsWith('..') ? rel : basename(path);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
let timer = null;
|
|
43
|
+
let count = 0;
|
|
44
|
+
const changed = new Set();
|
|
45
|
+
const reload = () => {
|
|
46
|
+
if (timer) clearTimeout(timer);
|
|
47
|
+
timer = setTimeout(() => {
|
|
48
|
+
const files = [...changed];
|
|
49
|
+
changed.clear();
|
|
50
|
+
if (files.length > 25) return;
|
|
51
|
+
count += 1;
|
|
52
|
+
for (const res of clients) res.write('data: reload\n\n');
|
|
53
|
+
const what = files.length === 1 ? label(files[0]) : `${files.length} files`;
|
|
54
|
+
const line = ` ${brand('↻')} ${dim('reloaded')} ${dim('·')} ${what} ${dim(`· ${count}×`)}`;
|
|
55
|
+
if (tty) process.stdout.write(`\r\x1b[K${line}`);
|
|
56
|
+
else process.stdout.write(`${strip(line)}\n`);
|
|
57
|
+
}, 60);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
chokidar.watch([CONTENT_DIR, CONFIG], { ignoreInitial: true }).on('all', (event, path) => {
|
|
61
|
+
changed.add(path);
|
|
62
|
+
reload();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
server.listen(PORT, () => {
|
|
66
|
+
const url = `http://localhost:${PORT}`;
|
|
67
|
+
process.stdout.write(` ${dim('ready at')} ${brand(url)}\n`);
|
|
68
|
+
process.stdout.write(` ${dim('watching for changes · Ctrl+C to stop')}\n\n`);
|
|
69
|
+
});
|
package/mdsvex.config.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { defineMDSveXConfig } from 'mdsvex';
|
|
3
|
-
import { escapeSvelte } from 'mdsvex';
|
|
4
|
-
import rehypeSlug from 'rehype-slug';
|
|
5
|
-
import { createHighlighter } from 'shiki';
|
|
6
|
-
import { transformerTwoslash } from '@shikijs/twoslash';
|
|
7
|
-
|
|
8
|
-
let basePath = '';
|
|
9
|
-
try {
|
|
10
|
-
basePath = JSON.parse(readFileSync('./axerity.json', 'utf8')).basePath ?? '';
|
|
11
|
-
} catch {
|
|
12
|
-
// no config
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function rehypeBasePath() {
|
|
16
|
-
return (tree) => {
|
|
17
|
-
const walk = (node) => {
|
|
18
|
-
if (node.type === 'element' && node.tagName === 'a') {
|
|
19
|
-
const href = node.properties?.href;
|
|
20
|
-
if (
|
|
21
|
-
typeof href === 'string' &&
|
|
22
|
-
href.startsWith('/') &&
|
|
23
|
-
!href.startsWith('//') &&
|
|
24
|
-
!href.startsWith(`${basePath}/`)
|
|
25
|
-
) {
|
|
26
|
-
node.properties.href = basePath + href;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
node.children?.forEach(walk);
|
|
30
|
-
};
|
|
31
|
-
if (basePath) walk(tree);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Wrap every `<table>` in a `<div class="table-wrapper">` so it can be a rounded,
|
|
37
|
-
* horizontally-scrollable card (a bare table can't clip rounded corners while
|
|
38
|
-
* also scrolling on overflow).
|
|
39
|
-
*/
|
|
40
|
-
function rehypeTableWrapper() {
|
|
41
|
-
return (tree) => {
|
|
42
|
-
const walk = (node) => {
|
|
43
|
-
if (!node.children) return;
|
|
44
|
-
node.children = node.children.map((child) => {
|
|
45
|
-
if (child.type === 'element' && child.tagName === 'table') {
|
|
46
|
-
return {
|
|
47
|
-
type: 'element',
|
|
48
|
-
tagName: 'div',
|
|
49
|
-
properties: { className: ['table-wrapper'] },
|
|
50
|
-
children: [child]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
walk(child);
|
|
54
|
-
return child;
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
walk(tree);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function rehypeExternalLinks() {
|
|
62
|
-
return (tree) => {
|
|
63
|
-
const walk = (node) => {
|
|
64
|
-
if (node.type === 'element' && node.tagName === 'a') {
|
|
65
|
-
const href = node.properties?.href;
|
|
66
|
-
if (typeof href === 'string' && /^https?:\/\//.test(href)) {
|
|
67
|
-
node.properties.target = '_blank';
|
|
68
|
-
node.properties.rel = 'noreferrer noopener';
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
node.children?.forEach(walk);
|
|
72
|
-
};
|
|
73
|
-
walk(tree);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Dual theme: light tokens are inlined, dark tokens exposed as CSS vars that
|
|
78
|
-
// `layout.css` switches on under `.dark`.
|
|
79
|
-
const themes = { light: 'github-light', dark: 'vesper' };
|
|
80
|
-
|
|
81
|
-
// Languages preloaded into the highlighter. Anything else falls back to plain
|
|
82
|
-
// text (see the try/catch below).
|
|
83
|
-
const langs = [
|
|
84
|
-
'svelte',
|
|
85
|
-
'typescript',
|
|
86
|
-
'javascript',
|
|
87
|
-
'json',
|
|
88
|
-
'yaml',
|
|
89
|
-
'bash',
|
|
90
|
-
'shell',
|
|
91
|
-
'html',
|
|
92
|
-
'css',
|
|
93
|
-
'markdown'
|
|
94
|
-
];
|
|
95
|
-
|
|
96
|
-
// Lazily create a single shared highlighter (loading grammars + themes is
|
|
97
|
-
// expensive, so do it once).
|
|
98
|
-
let highlighterPromise;
|
|
99
|
-
function getHighlighter() {
|
|
100
|
-
if (!highlighterPromise) {
|
|
101
|
-
highlighterPromise = createHighlighter({ themes: Object.values(themes), langs });
|
|
102
|
-
}
|
|
103
|
-
return highlighterPromise;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** Escape HTML special chars for safe interpolation into the title bar. */
|
|
107
|
-
function escapeHtml(str) {
|
|
108
|
-
return str
|
|
109
|
-
.replace(/&/g, '&')
|
|
110
|
-
.replace(/</g, '<')
|
|
111
|
-
.replace(/>/g, '>')
|
|
112
|
-
.replace(/"/g, '"');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/** Pull `title="…"` (or single-quoted) out of a fence's meta string. */
|
|
116
|
-
function parseTitle(meta) {
|
|
117
|
-
const match = meta.match(/title=(?:"([^"]*)"|'([^']*)')/);
|
|
118
|
-
return match ? (match[1] ?? match[2]) : null;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Parse a `{1,3-5}` line-range expression from a fence's meta into a Set of
|
|
123
|
-
* 1-based line numbers to highlight.
|
|
124
|
-
*/
|
|
125
|
-
function parseHighlightLines(meta) {
|
|
126
|
-
const match = meta.match(/\{([\d,\s-]+)\}/);
|
|
127
|
-
const lines = new Set();
|
|
128
|
-
if (!match) return lines;
|
|
129
|
-
for (const part of match[1].split(',')) {
|
|
130
|
-
const range = part.trim();
|
|
131
|
-
if (!range) continue;
|
|
132
|
-
const [start, end] = range.split('-').map((n) => parseInt(n, 10));
|
|
133
|
-
for (let i = start; i <= (end ?? start); i++) lines.add(i);
|
|
134
|
-
}
|
|
135
|
-
return lines;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/** Whether the fence asked for line numbers (```ts showLineNumbers). */
|
|
139
|
-
function hasLineNumbers(meta) {
|
|
140
|
-
return /\bshowLineNumbers\b/.test(meta);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/** Whether the fence asked for Twoslash type annotations (```ts twoslash). */
|
|
144
|
-
function hasTwoslash(meta) {
|
|
145
|
-
return /\btwoslash\b/.test(meta);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const twoslash = transformerTwoslash({ explicitTrigger: true });
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* The YAML grammar gives the `---` document markers no scope, so they inherit
|
|
152
|
-
* the bright default foreground and read as unhighlighted. Dim them to a subtle
|
|
153
|
-
* token that adapts to both themes.
|
|
154
|
-
*/
|
|
155
|
-
function transformerDimYamlMarkers() {
|
|
156
|
-
return {
|
|
157
|
-
name: 'axerity:dim-yaml-markers',
|
|
158
|
-
span(node) {
|
|
159
|
-
const text = node.children?.[0];
|
|
160
|
-
if (text && text.type === 'text' && text.value.trim() === '---') {
|
|
161
|
-
node.properties = { ...node.properties, style: 'color:var(--fg-subtle)' };
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/** Shiki transformer: tag the requested lines with a `highlighted` class. */
|
|
168
|
-
function transformerHighlightLines(lines) {
|
|
169
|
-
return {
|
|
170
|
-
name: 'axerity:highlight-lines',
|
|
171
|
-
line(node, lineNumber) {
|
|
172
|
-
if (lines.has(lineNumber)) this.addClassToHast(node, 'highlighted');
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Shiki separates lines with literal "\n" text nodes. With block-level lines
|
|
179
|
-
* (needed for full-width highlights) those render as blank lines, so strip
|
|
180
|
-
* them — the copy handler rejoins lines with newlines itself.
|
|
181
|
-
*/
|
|
182
|
-
function transformerRemoveLineBreaks() {
|
|
183
|
-
return {
|
|
184
|
-
name: 'axerity:remove-line-breaks',
|
|
185
|
-
code(node) {
|
|
186
|
-
node.children = node.children.filter(
|
|
187
|
-
(child) => !(child.type === 'text' && child.value === '\n')
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/** Shiki transformer: flag the block so CSS counters can number the lines. */
|
|
194
|
-
function transformerLineNumbers() {
|
|
195
|
-
return {
|
|
196
|
-
name: 'axerity:line-numbers',
|
|
197
|
-
pre(node) {
|
|
198
|
-
this.addClassToHast(node, 'has-line-numbers');
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Static copy button injected into every code block; clicks are handled by a
|
|
204
|
-
// delegated listener in DocsLayout (the markup carries no state itself).
|
|
205
|
-
const COPY_BUTTON =
|
|
206
|
-
'<button class="copy-button" type="button" aria-label="Copy code">' +
|
|
207
|
-
'<svg class="icon-copy" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>' +
|
|
208
|
-
'<svg class="icon-check" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>' +
|
|
209
|
-
'</button>';
|
|
210
|
-
|
|
211
|
-
export default defineMDSveXConfig({
|
|
212
|
-
extensions: ['.svx', '.md'],
|
|
213
|
-
// Give every heading a stable id so the TOC can anchor + scroll-spy to it.
|
|
214
|
-
rehypePlugins: [rehypeSlug, rehypeTableWrapper, rehypeExternalLinks, rehypeBasePath],
|
|
215
|
-
highlight: {
|
|
216
|
-
highlighter: async (code, lang, meta) => {
|
|
217
|
-
if (lang === 'mermaid') {
|
|
218
|
-
const graph = escapeSvelte(
|
|
219
|
-
code.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
|
220
|
-
);
|
|
221
|
-
return `{@html \`<pre class="mermaid">${graph}</pre>\`}`;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
const highlighter = await getHighlighter();
|
|
225
|
-
const language = (lang && highlighter.getLoadedLanguages().includes(lang) && lang) || 'text';
|
|
226
|
-
meta = meta || '';
|
|
227
|
-
|
|
228
|
-
const title = parseTitle(meta);
|
|
229
|
-
const highlightLines = parseHighlightLines(meta);
|
|
230
|
-
const twoslashEnabled = hasTwoslash(meta);
|
|
231
|
-
|
|
232
|
-
const transformers = [];
|
|
233
|
-
if (twoslashEnabled) transformers.push(twoslash);
|
|
234
|
-
if (language === 'yaml') transformers.push(transformerDimYamlMarkers());
|
|
235
|
-
transformers.push(transformerRemoveLineBreaks());
|
|
236
|
-
if (highlightLines.size) transformers.push(transformerHighlightLines(highlightLines));
|
|
237
|
-
if (hasLineNumbers(meta)) transformers.push(transformerLineNumbers());
|
|
238
|
-
|
|
239
|
-
const html = highlighter.codeToHtml(code, {
|
|
240
|
-
lang: language,
|
|
241
|
-
meta: { __raw: meta },
|
|
242
|
-
themes,
|
|
243
|
-
defaultColor: 'light',
|
|
244
|
-
transformers
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
// With a title, the copy button lives in the header bar; otherwise it
|
|
248
|
-
// floats in the top-right corner of the block.
|
|
249
|
-
const header = title
|
|
250
|
-
? `<div class="code-header"><span class="code-title">${escapeHtml(title)}</span>${COPY_BUTTON}</div>`
|
|
251
|
-
: '';
|
|
252
|
-
const blockClass =
|
|
253
|
-
(title ? 'code-block has-header' : 'code-block') + (twoslashEnabled ? ' has-twoslash' : '');
|
|
254
|
-
const floatingButton = title ? '' : COPY_BUTTON;
|
|
255
|
-
const wrapped = `<div class="${blockClass}">${header}${floatingButton}${html}</div>`;
|
|
256
|
-
|
|
257
|
-
// Escape so Svelte doesn't try to parse `{`, `}`, or backticks in the code.
|
|
258
|
-
return `{@html \`${escapeSvelte(wrapped)}\`}`;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
});
|