@axerity/cli 0.1.4 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/axerity.js +70 -218
- 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/Dt_5ZQE2.js +1 -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/O1MNaiG9.js +3 -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/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/wCc4pE4l.js +3 -0
- package/dist/client/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/client/_app/immutable/entry/app.D6KBNU0y.js +2 -0
- package/dist/client/_app/immutable/entry/start.CQdeQUt-.js +1 -0
- package/dist/client/_app/immutable/nodes/0.DBZ13WOO.js +1 -0
- package/dist/client/_app/immutable/nodes/1.B_AZbN4M.js +1 -0
- package/dist/client/_app/immutable/nodes/2.OqcLisIf.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-oTZ8HCk-.js +40 -0
- package/dist/server/chunks/0-oTZ8HCk-.js.map +1 -0
- package/dist/server/chunks/1-nu6YvZRQ.js +9 -0
- package/dist/server/chunks/1-nu6YvZRQ.js.map +1 -0
- package/dist/server/chunks/2-YpqcBGyH.js +54 -0
- package/dist/server/chunks/2-YpqcBGyH.js.map +1 -0
- package/dist/server/chunks/Icon-D37LtZZG.js +186 -0
- package/dist/server/chunks/Icon-D37LtZZG.js.map +1 -0
- package/dist/server/chunks/_error.svelte-NKP81ks-.js +48 -0
- package/dist/server/chunks/_error.svelte-NKP81ks-.js.map +1 -0
- package/dist/server/chunks/_layout.svelte-2Eq-_AqW.js +31 -0
- package/dist/server/chunks/_layout.svelte-2Eq-_AqW.js.map +1 -0
- package/dist/server/chunks/_page.svelte-Chjw6C-d.js +2206 -0
- package/dist/server/chunks/_page.svelte-Chjw6C-d.js.map +1 -0
- package/dist/server/chunks/_server.ts-5K31OG2_.js +31 -0
- package/dist/server/chunks/_server.ts-5K31OG2_.js.map +1 -0
- package/dist/server/chunks/_server.ts-BRaXDyO1.js +29 -0
- package/dist/server/chunks/_server.ts-BRaXDyO1.js.map +1 -0
- package/dist/server/chunks/_server.ts-BuDGLKUC.js +213 -0
- package/dist/server/chunks/_server.ts-BuDGLKUC.js.map +1 -0
- package/dist/server/chunks/_server.ts-Bx1daJ1-.js +53 -0
- package/dist/server/chunks/_server.ts-Bx1daJ1-.js.map +1 -0
- package/dist/server/chunks/_server.ts-By7FRFNB.js +37 -0
- package/dist/server/chunks/_server.ts-By7FRFNB.js.map +1 -0
- package/dist/server/chunks/_server.ts-DIxsjlQ0.js +32 -0
- package/dist/server/chunks/_server.ts-DIxsjlQ0.js.map +1 -0
- package/dist/server/chunks/_server.ts-Dgpc__Yz.js +41 -0
- package/dist/server/chunks/_server.ts-Dgpc__Yz.js.map +1 -0
- package/dist/server/chunks/_server.ts-kWOJv5IZ.js +26 -0
- package/dist/server/chunks/_server.ts-kWOJv5IZ.js.map +1 -0
- package/dist/server/chunks/content-store-DV5Rlfo3.js +5252 -0
- package/dist/server/chunks/content-store-DV5Rlfo3.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-C0PApeP1.js +758 -0
- package/dist/server/chunks/exports-C0PApeP1.js.map +1 -0
- package/dist/server/chunks/hooks.server-BnfZljxX.js +42 -0
- package/dist/server/chunks/hooks.server-BnfZljxX.js.map +1 -0
- package/dist/server/chunks/internal-pc3wKdix.js +5374 -0
- package/dist/server/chunks/internal-pc3wKdix.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-CmugjRXT.js +57 -0
- package/dist/server/chunks/site-CmugjRXT.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 +58 -0
- package/runtime/preview.js +42 -0
- package/runtime/serve.js +78 -0
- package/runtime/static.js +76 -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 -67
- /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
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Markdown & MDX
|
|
3
|
-
description: Write content in Markdown, enhanced with Svelte.
|
|
4
|
-
icon: file-text
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Markdown & MDX
|
|
8
|
-
|
|
9
|
-
Axerity renders content with [mdsvex](https://mdsvex.pngwn.io), so every page is
|
|
10
|
-
Markdown that can also embed live Svelte components.
|
|
11
|
-
|
|
12
|
-
## Standard Markdown
|
|
13
|
-
|
|
14
|
-
All the usual Markdown works, **bold**, _italic_, `inline code`, and
|
|
15
|
-
[links](/).
|
|
16
|
-
|
|
17
|
-
- Bullet lists
|
|
18
|
-
- With multiple items
|
|
19
|
-
- And nested ones
|
|
20
|
-
|
|
21
|
-
1. Ordered lists
|
|
22
|
-
2. Work too
|
|
23
|
-
|
|
24
|
-
> Blockquotes are styled to match the theme.
|
|
25
|
-
|
|
26
|
-
## Headings become anchors
|
|
27
|
-
|
|
28
|
-
Every heading gets an id automatically, which powers the table of contents and
|
|
29
|
-
lets you deep-link to any section.
|
|
30
|
-
|
|
31
|
-
## Tables
|
|
32
|
-
|
|
33
|
-
Standard Markdown tables are styled as a rounded, scrollable card.
|
|
34
|
-
|
|
35
|
-
| Feature | Status |
|
|
36
|
-
| ------- | -------- |
|
|
37
|
-
| Tables | Built in |
|
|
38
|
-
| Search | Built in |
|
|
39
|
-
|
|
40
|
-
## External links
|
|
41
|
-
|
|
42
|
-
Links to another site open in a new tab automatically. Internal links navigate
|
|
43
|
-
in place.
|
|
44
|
-
|
|
45
|
-
## Components
|
|
46
|
-
|
|
47
|
-
Import a component in a `<script>` block at the top of the page, then use it
|
|
48
|
-
anywhere in the Markdown:
|
|
49
|
-
|
|
50
|
-
```svelte
|
|
51
|
-
<script>
|
|
52
|
-
import { Callout } from '$lib';
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<Callout type="tip">
|
|
56
|
-
Leave a blank line between the tags and the content so the inner Markdown is parsed.
|
|
57
|
-
</Callout>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
The blank line around the content matters. Without it the inner text is treated
|
|
61
|
-
as plain text, not Markdown. See the [Components](/components/callout)
|
|
62
|
-
section for everything available.
|
package/src/hooks.server.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { site } from '$lib/config/site';
|
|
2
|
-
import type { BrandConfig } from '$lib/types';
|
|
3
|
-
import type { Handle } from '@sveltejs/kit';
|
|
4
|
-
|
|
5
|
-
const theme = site.theme ?? 'neutral';
|
|
6
|
-
|
|
7
|
-
// Reject anything that could break out of the <style> block. Config is authored
|
|
8
|
-
// by the site owner, but this keeps a stray brace or tag from corrupting the CSS.
|
|
9
|
-
const clean = (value: string) => value.replace(/[<>{}]/g, '').trim();
|
|
10
|
-
|
|
11
|
-
function brandStyle(brand?: BrandConfig): string {
|
|
12
|
-
if (!brand) return '';
|
|
13
|
-
|
|
14
|
-
const light: string[] = [];
|
|
15
|
-
const dark: string[] = [];
|
|
16
|
-
|
|
17
|
-
if (brand.accent) {
|
|
18
|
-
const accent = clean(brand.accent);
|
|
19
|
-
const accentDark = clean(brand.accentDark ?? brand.accent);
|
|
20
|
-
light.push(`--accent:${accent}!important`);
|
|
21
|
-
light.push(`--accent-hover:color-mix(in oklab, ${accent} 85%, #000)!important`);
|
|
22
|
-
dark.push(`--accent:${accentDark}!important`);
|
|
23
|
-
dark.push(`--accent-hover:color-mix(in oklab, ${accentDark} 85%, #fff)!important`);
|
|
24
|
-
}
|
|
25
|
-
if (brand.accentContrast) {
|
|
26
|
-
light.push(`--accent-contrast:${clean(brand.accentContrast)}!important`);
|
|
27
|
-
}
|
|
28
|
-
if (brand.radius) {
|
|
29
|
-
const r = clean(brand.radius);
|
|
30
|
-
light.push(`--theme-radius-sm:calc(${r} * 0.25)!important`);
|
|
31
|
-
light.push(`--theme-radius-md:calc(${r} * 0.5)!important`);
|
|
32
|
-
light.push(`--theme-radius-lg:${r}!important`);
|
|
33
|
-
light.push(`--theme-radius-xl:calc(${r} * 1.5)!important`);
|
|
34
|
-
light.push(`--theme-radius-2xl:calc(${r} * 2)!important`);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (!light.length && !dark.length) return '';
|
|
38
|
-
const css = `:root{${light.join(';')}}${dark.length ? `.dark{${dark.join(';')}}` : ''}`;
|
|
39
|
-
return `<style>${css}</style>`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const brandTag = brandStyle(site.brand);
|
|
43
|
-
|
|
44
|
-
export const handle: Handle = ({ event, resolve }) => {
|
|
45
|
-
return resolve(event, {
|
|
46
|
-
transformPageChunk: ({ html }) =>
|
|
47
|
-
html.replace('<html', `<html data-theme="${theme}"`).replace('</head>', `${brandTag}</head>`)
|
|
48
|
-
});
|
|
49
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo</title><path d="M94.157 22.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282 29.608A29.92 29.92 0 0 0 8.764 49.65a31.5 31.5 0 0 0 3.108 20.231 30 30 0 0 0-4.477 11.183 31.9 31.9 0 0 0 5.448 24.116c10.402 14.887 30.942 19.297 45.791 9.835l26.083-16.624A29.92 29.92 0 0 0 98.235 78.35a31.53 31.53 0 0 0-3.105-20.232 30 30 0 0 0 4.474-11.182 31.88 31.88 0 0 0-5.447-24.116" style="fill:#ff3e00"/><path d="M45.817 106.582a20.72 20.72 0 0 1-22.237-8.243 19.17 19.17 0 0 1-3.277-14.503 18 18 0 0 1 .624-2.435l.49-1.498 1.337.981a33.6 33.6 0 0 0 10.203 5.098l.97.294-.09.968a5.85 5.85 0 0 0 1.052 3.878 6.24 6.24 0 0 0 6.695 2.485 5.8 5.8 0 0 0 1.603-.704L69.27 76.28a5.43 5.43 0 0 0 2.45-3.631 5.8 5.8 0 0 0-.987-4.371 6.24 6.24 0 0 0-6.698-2.487 5.7 5.7 0 0 0-1.6.704l-9.953 6.345a19 19 0 0 1-5.296 2.326 20.72 20.72 0 0 1-22.237-8.243 19.17 19.17 0 0 1-3.277-14.502 17.99 17.99 0 0 1 8.13-12.052l26.081-16.623a19 19 0 0 1 5.3-2.329 20.72 20.72 0 0 1 22.237 8.243 19.17 19.17 0 0 1 3.277 14.503 18 18 0 0 1-.624 2.435l-.49 1.498-1.337-.98a33.6 33.6 0 0 0-10.203-5.1l-.97-.294.09-.968a5.86 5.86 0 0 0-1.052-3.878 6.24 6.24 0 0 0-6.696-2.485 5.8 5.8 0 0 0-1.602.704L37.73 51.72a5.42 5.42 0 0 0-2.449 3.63 5.79 5.79 0 0 0 .986 4.372 6.24 6.24 0 0 0 6.698 2.486 5.8 5.8 0 0 0 1.602-.704l9.952-6.342a19 19 0 0 1 5.295-2.328 20.72 20.72 0 0 1 22.237 8.242 19.17 19.17 0 0 1 3.277 14.503 18 18 0 0 1-8.13 12.053l-26.081 16.622a19 19 0 0 1-5.3 2.328" style="fill:#fff"/></svg>
|
package/src/lib/base.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { base } from '$app/paths';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Prefix an internal absolute link with the configured base path. External
|
|
5
|
-
* links, anchors, and already-prefixed links are returned unchanged. Used by
|
|
6
|
-
* components that render author-written hrefs so they work under a sub-path.
|
|
7
|
-
*/
|
|
8
|
-
export function withBase(href?: string): string | undefined {
|
|
9
|
-
if (!href || !base) return href;
|
|
10
|
-
if (!href.startsWith('/') || href.startsWith('//') || href.startsWith(`${base}/`)) return href;
|
|
11
|
-
return base + href;
|
|
12
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
import { icons } from 'lucide';
|
|
3
|
-
|
|
4
|
-
type IconNode = [string, Record<string, string | number>][];
|
|
5
|
-
const registry = icons as unknown as Record<string, IconNode>;
|
|
6
|
-
|
|
7
|
-
const pascal = (name: string) =>
|
|
8
|
-
name
|
|
9
|
-
.split(/[-_]/)
|
|
10
|
-
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
11
|
-
.join('');
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<script lang="ts">
|
|
15
|
-
let {
|
|
16
|
-
name,
|
|
17
|
-
size = 16,
|
|
18
|
-
class: className = ''
|
|
19
|
-
}: { name?: string; size?: number; class?: string } = $props();
|
|
20
|
-
|
|
21
|
-
const node = $derived(name ? registry[pascal(name)] : undefined);
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
{#if node}
|
|
25
|
-
<svg
|
|
26
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
-
width={size}
|
|
28
|
-
height={size}
|
|
29
|
-
viewBox="0 0 24 24"
|
|
30
|
-
fill="none"
|
|
31
|
-
stroke="currentColor"
|
|
32
|
-
stroke-width="2"
|
|
33
|
-
stroke-linecap="round"
|
|
34
|
-
stroke-linejoin="round"
|
|
35
|
-
class={`lucide ${className}`}
|
|
36
|
-
>
|
|
37
|
-
{#each node as [tag, attrs], i (i)}
|
|
38
|
-
<svelte:element this={tag} {...attrs} />
|
|
39
|
-
{/each}
|
|
40
|
-
</svg>
|
|
41
|
-
{/if}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { browser } from '$app/environment';
|
|
3
|
-
import { site } from '$lib/config/site';
|
|
4
|
-
|
|
5
|
-
$effect(() => {
|
|
6
|
-
if (!browser || !site.analytics) return;
|
|
7
|
-
const added: HTMLScriptElement[] = [];
|
|
8
|
-
|
|
9
|
-
if (site.analytics.plausible) {
|
|
10
|
-
const script = document.createElement('script');
|
|
11
|
-
script.defer = true;
|
|
12
|
-
script.setAttribute('data-domain', site.analytics.plausible);
|
|
13
|
-
script.src = 'https://plausible.io/js/script.js';
|
|
14
|
-
document.head.appendChild(script);
|
|
15
|
-
added.push(script);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (site.analytics.googleAnalytics) {
|
|
19
|
-
const id = site.analytics.googleAnalytics;
|
|
20
|
-
const loader = document.createElement('script');
|
|
21
|
-
loader.async = true;
|
|
22
|
-
loader.src = `https://www.googletagmanager.com/gtag/js?id=${id}`;
|
|
23
|
-
document.head.appendChild(loader);
|
|
24
|
-
added.push(loader);
|
|
25
|
-
|
|
26
|
-
const inline = document.createElement('script');
|
|
27
|
-
inline.textContent =
|
|
28
|
-
`window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}` +
|
|
29
|
-
`gtag('js',new Date());gtag('config','${id}');`;
|
|
30
|
-
document.head.appendChild(inline);
|
|
31
|
-
added.push(inline);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return () => {
|
|
35
|
-
for (const script of added) script.remove();
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
</script>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { browser } from '$app/environment';
|
|
3
|
-
import X from '@lucide/svelte/icons/x';
|
|
4
|
-
import type { Banner } from '$lib/types';
|
|
5
|
-
|
|
6
|
-
let { banner }: { banner: Banner } = $props();
|
|
7
|
-
|
|
8
|
-
const storageKey = $derived(`axerity-banner:${banner.id ?? banner.text}`);
|
|
9
|
-
let dismissed = $state(false);
|
|
10
|
-
|
|
11
|
-
$effect(() => {
|
|
12
|
-
if (browser && banner.dismissible) {
|
|
13
|
-
dismissed = localStorage.getItem(storageKey) === '1';
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
function dismiss() {
|
|
18
|
-
dismissed = true;
|
|
19
|
-
if (browser) localStorage.setItem(storageKey, '1');
|
|
20
|
-
}
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
{#if !dismissed}
|
|
24
|
-
<div
|
|
25
|
-
data-banner-key={storageKey}
|
|
26
|
-
class="banner relative flex items-center justify-center gap-2 bg-fg px-10 py-2 text-center text-sm font-medium text-surface"
|
|
27
|
-
>
|
|
28
|
-
{#if banner.href}
|
|
29
|
-
<a href={banner.href} class="hover:underline">{banner.text}</a>
|
|
30
|
-
{:else}
|
|
31
|
-
<span>{banner.text}</span>
|
|
32
|
-
{/if}
|
|
33
|
-
{#if banner.dismissible}
|
|
34
|
-
<button
|
|
35
|
-
type="button"
|
|
36
|
-
onclick={dismiss}
|
|
37
|
-
aria-label="Dismiss announcement"
|
|
38
|
-
class="absolute right-3 inline-flex h-6 w-6 items-center justify-center rounded-md text-surface/70 transition hover:bg-surface/15 hover:text-surface"
|
|
39
|
-
>
|
|
40
|
-
<X size={15} />
|
|
41
|
-
</button>
|
|
42
|
-
{/if}
|
|
43
|
-
</div>
|
|
44
|
-
{/if}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { page } from '$app/state';
|
|
3
|
-
import ChevronRight from '@lucide/svelte/icons/chevron-right';
|
|
4
|
-
import type { NavEntry, NavSection } from '$lib/types';
|
|
5
|
-
|
|
6
|
-
let { sidebar }: { sidebar: NavSection[] } = $props();
|
|
7
|
-
|
|
8
|
-
function findTrail(entries: NavEntry[], acc: string[], path: string): string[] | null {
|
|
9
|
-
for (const entry of entries) {
|
|
10
|
-
if ('href' in entry) {
|
|
11
|
-
if (entry.href === path) return [...acc, entry.title];
|
|
12
|
-
} else {
|
|
13
|
-
const nested = findTrail(entry.items, [...acc, entry.title], path);
|
|
14
|
-
if (nested) return nested;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const trail = $derived.by(() => {
|
|
21
|
-
for (const section of sidebar) {
|
|
22
|
-
const found = findTrail(section.items, [section.title], page.url.pathname);
|
|
23
|
-
if (found) return found;
|
|
24
|
-
}
|
|
25
|
-
return [];
|
|
26
|
-
});
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
{#if trail.length > 1}
|
|
30
|
-
<nav class="flex min-w-0 items-center gap-1.5 text-xs text-fg-subtle" aria-label="Breadcrumb">
|
|
31
|
-
{#each trail as crumb, index (index)}
|
|
32
|
-
{#if index > 0}
|
|
33
|
-
<ChevronRight size={12} class="shrink-0" />
|
|
34
|
-
{/if}
|
|
35
|
-
<span class="truncate {index === trail.length - 1 ? 'text-fg-muted' : ''}">{crumb}</span>
|
|
36
|
-
{/each}
|
|
37
|
-
</nav>
|
|
38
|
-
{/if}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { page } from '$app/state';
|
|
3
|
-
import { base } from '$app/paths';
|
|
4
|
-
import { fade } from 'svelte/transition';
|
|
5
|
-
import Copy from '@lucide/svelte/icons/copy';
|
|
6
|
-
import Check from '@lucide/svelte/icons/check';
|
|
7
|
-
import ChevronDown from '@lucide/svelte/icons/chevron-down';
|
|
8
|
-
import FileText from '@lucide/svelte/icons/file-text';
|
|
9
|
-
import ExternalLink from '@lucide/svelte/icons/external-link';
|
|
10
|
-
import { getRawMarkdown } from '$lib/content/raw';
|
|
11
|
-
|
|
12
|
-
let open = $state(false);
|
|
13
|
-
let copied = $state(false);
|
|
14
|
-
|
|
15
|
-
const slug = $derived(page.url.pathname.slice(base.length).replace(/^\//, ''));
|
|
16
|
-
|
|
17
|
-
async function copyPage() {
|
|
18
|
-
const markdown = await getRawMarkdown(slug);
|
|
19
|
-
if (markdown == null) return;
|
|
20
|
-
try {
|
|
21
|
-
await navigator.clipboard.writeText(markdown);
|
|
22
|
-
copied = true;
|
|
23
|
-
setTimeout(() => (copied = false), 1500);
|
|
24
|
-
} catch {
|
|
25
|
-
copied = false;
|
|
26
|
-
}
|
|
27
|
-
open = false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function viewMarkdown() {
|
|
31
|
-
window.open(`${page.url.pathname.replace(/\/$/, '')}.md`, '_blank');
|
|
32
|
-
open = false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function ask(endpoint: string) {
|
|
36
|
-
const prompt = `Read ${page.url.href} and help me with questions about this page.`;
|
|
37
|
-
window.open(`${endpoint}${encodeURIComponent(prompt)}`, '_blank');
|
|
38
|
-
open = false;
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<div class="relative">
|
|
43
|
-
<div class="flex items-center rounded-md border border-border bg-surface text-sm">
|
|
44
|
-
<button
|
|
45
|
-
type="button"
|
|
46
|
-
onclick={copyPage}
|
|
47
|
-
class="flex items-center gap-2 py-1.5 pr-2 pl-3 text-fg-muted transition hover:text-fg"
|
|
48
|
-
>
|
|
49
|
-
{#if copied}
|
|
50
|
-
<Check size={15} class="text-fg" />
|
|
51
|
-
{:else}
|
|
52
|
-
<Copy size={15} />
|
|
53
|
-
{/if}
|
|
54
|
-
<span>{copied ? 'Copied' : 'Copy page'}</span>
|
|
55
|
-
</button>
|
|
56
|
-
<button
|
|
57
|
-
type="button"
|
|
58
|
-
onclick={() => (open = !open)}
|
|
59
|
-
aria-label="More options"
|
|
60
|
-
aria-expanded={open}
|
|
61
|
-
class="border-l border-border px-1.5 py-1.5 text-fg-subtle transition hover:text-fg"
|
|
62
|
-
>
|
|
63
|
-
<ChevronDown size={15} class="transition-transform {open ? 'rotate-180' : ''}" />
|
|
64
|
-
</button>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
{#if open}
|
|
68
|
-
<button
|
|
69
|
-
type="button"
|
|
70
|
-
class="fixed inset-0 z-40 cursor-default"
|
|
71
|
-
aria-label="Close menu"
|
|
72
|
-
onclick={() => (open = false)}
|
|
73
|
-
></button>
|
|
74
|
-
<div
|
|
75
|
-
class="absolute right-0 z-50 mt-1.5 w-72 overflow-hidden rounded-lg border border-border bg-surface-raised p-1 shadow-lg"
|
|
76
|
-
transition:fade={{ duration: 100 }}
|
|
77
|
-
>
|
|
78
|
-
{#snippet item(
|
|
79
|
-
Icon: typeof Copy,
|
|
80
|
-
title: string,
|
|
81
|
-
subtitle: string,
|
|
82
|
-
onclick: () => void,
|
|
83
|
-
external = false
|
|
84
|
-
)}
|
|
85
|
-
<button
|
|
86
|
-
type="button"
|
|
87
|
-
{onclick}
|
|
88
|
-
class="flex w-full items-start gap-3 rounded-md px-2.5 py-2 text-left transition hover:bg-bg-subtle"
|
|
89
|
-
>
|
|
90
|
-
<Icon size={17} class="mt-0.5 shrink-0 text-fg-muted" />
|
|
91
|
-
<span class="min-w-0 flex-1">
|
|
92
|
-
<span class="flex items-center gap-1 text-sm font-medium text-fg">
|
|
93
|
-
{title}
|
|
94
|
-
{#if external}<ExternalLink size={12} class="text-fg-subtle" />{/if}
|
|
95
|
-
</span>
|
|
96
|
-
<span class="block text-xs text-fg-subtle">{subtitle}</span>
|
|
97
|
-
</span>
|
|
98
|
-
</button>
|
|
99
|
-
{/snippet}
|
|
100
|
-
|
|
101
|
-
{@render item(Copy, 'Copy page', 'Copy page as Markdown for LLMs', copyPage)}
|
|
102
|
-
{@render item(FileText, 'View as Markdown', 'Open the raw Markdown', viewMarkdown)}
|
|
103
|
-
{@render item(
|
|
104
|
-
ExternalLink,
|
|
105
|
-
'Open in ChatGPT',
|
|
106
|
-
'Ask questions about this page',
|
|
107
|
-
() => ask('https://chatgpt.com/?q='),
|
|
108
|
-
true
|
|
109
|
-
)}
|
|
110
|
-
{@render item(
|
|
111
|
-
ExternalLink,
|
|
112
|
-
'Open in Claude',
|
|
113
|
-
'Ask questions about this page',
|
|
114
|
-
() => ask('https://claude.ai/new?q='),
|
|
115
|
-
true
|
|
116
|
-
)}
|
|
117
|
-
</div>
|
|
118
|
-
{/if}
|
|
119
|
-
</div>
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { fade, fly } from 'svelte/transition';
|
|
4
|
-
import { afterNavigate } from '$app/navigation';
|
|
5
|
-
import type { NavLink, NavSection, SiteConfig } from '$lib/types';
|
|
6
|
-
import Banner from './Banner.svelte';
|
|
7
|
-
import Mermaid from './Mermaid.svelte';
|
|
8
|
-
import Navbar from './Navbar.svelte';
|
|
9
|
-
import Sidebar from './Sidebar.svelte';
|
|
10
|
-
import TableOfContents from './TableOfContents.svelte';
|
|
11
|
-
import PageNav from './PageNav.svelte';
|
|
12
|
-
import PageMeta from './PageMeta.svelte';
|
|
13
|
-
import Footer from './Footer.svelte';
|
|
14
|
-
import CopyPageMenu from './CopyPageMenu.svelte';
|
|
15
|
-
import SearchDialog from './SearchDialog.svelte';
|
|
16
|
-
import Breadcrumbs from './Breadcrumbs.svelte';
|
|
17
|
-
import SidebarFooterLinks from './SidebarFooterLinks.svelte';
|
|
18
|
-
|
|
19
|
-
let {
|
|
20
|
-
site,
|
|
21
|
-
sidebar,
|
|
22
|
-
flatPages = [],
|
|
23
|
-
wide = false,
|
|
24
|
-
editUrl,
|
|
25
|
-
updated,
|
|
26
|
-
resolveVersion,
|
|
27
|
-
children
|
|
28
|
-
}: {
|
|
29
|
-
site: SiteConfig;
|
|
30
|
-
sidebar: NavSection[];
|
|
31
|
-
flatPages?: NavLink[];
|
|
32
|
-
wide?: boolean;
|
|
33
|
-
editUrl?: string;
|
|
34
|
-
updated?: string;
|
|
35
|
-
resolveVersion?: (pathname: string, versionPath: string) => string;
|
|
36
|
-
children: Snippet;
|
|
37
|
-
} = $props();
|
|
38
|
-
|
|
39
|
-
// 'boxed' centers the whole shell in a max-width container; 'flat' (default)
|
|
40
|
-
// is full-bleed with the sidebar flush against the left edge.
|
|
41
|
-
const containerClass = $derived(
|
|
42
|
-
(site.layout ?? 'flat') === 'boxed'
|
|
43
|
-
? 'mx-auto flex w-full max-w-400 px-0 sm:px-6'
|
|
44
|
-
: 'flex w-full px-0 sm:px-6'
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const sidebarVariants = {
|
|
48
|
-
flush:
|
|
49
|
-
'sticky top-(--spacing-header) h-[calc(100vh-var(--spacing-header))] border-r border-border bg-sidebar px-4',
|
|
50
|
-
card: 'sticky top-[calc(var(--spacing-header)_+_1rem)] my-4 mr-3 h-[calc(100vh_-_var(--spacing-header)_-_2rem)] overflow-hidden rounded-xl border border-border bg-sidebar px-3',
|
|
51
|
-
floating:
|
|
52
|
-
'sticky top-[calc(var(--spacing-header)_+_0.75rem)] my-3 mr-2 h-[calc(100vh_-_var(--spacing-header)_-_1.5rem)] overflow-hidden rounded-2xl border border-border bg-sidebar px-3 shadow-sm'
|
|
53
|
-
} as const;
|
|
54
|
-
|
|
55
|
-
const asideClass = $derived(
|
|
56
|
-
`hidden w-sidebar shrink-0 flex-col lg:flex ${sidebarVariants[site.sidebar?.variant ?? 'flush']}`
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
let mobileOpen = $state(false);
|
|
60
|
-
|
|
61
|
-
// Close the mobile drawer after navigating to a new page.
|
|
62
|
-
afterNavigate(() => {
|
|
63
|
-
mobileOpen = false;
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
// Delegated copy-to-clipboard for code blocks. One listener handles every
|
|
67
|
-
// block (including those rendered after client-side navigation), since the
|
|
68
|
-
// buttons are static markup from the Shiki highlighter.
|
|
69
|
-
$effect(() => {
|
|
70
|
-
async function onClick(event: MouseEvent) {
|
|
71
|
-
const target = event.target;
|
|
72
|
-
if (!(target instanceof Element)) return;
|
|
73
|
-
const button = target.closest('.copy-button');
|
|
74
|
-
if (!button) return;
|
|
75
|
-
|
|
76
|
-
// Lines are separate elements (the "\n" text nodes are stripped), so
|
|
77
|
-
// rejoin them with newlines for a faithful copy.
|
|
78
|
-
const pre = button.closest('.code-block')?.querySelector('pre');
|
|
79
|
-
const lines = pre?.querySelectorAll('.line');
|
|
80
|
-
const code =
|
|
81
|
-
lines && lines.length
|
|
82
|
-
? Array.from(lines)
|
|
83
|
-
.map((line) => line.textContent)
|
|
84
|
-
.join('\n')
|
|
85
|
-
: (pre?.textContent ?? '');
|
|
86
|
-
try {
|
|
87
|
-
await navigator.clipboard.writeText(code);
|
|
88
|
-
button.setAttribute('data-copied', 'true');
|
|
89
|
-
setTimeout(() => button.removeAttribute('data-copied'), 1500);
|
|
90
|
-
} catch {
|
|
91
|
-
// Clipboard unavailable (e.g. insecure context) — fail quietly.
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
document.addEventListener('click', onClick);
|
|
96
|
-
return () => document.removeEventListener('click', onClick);
|
|
97
|
-
});
|
|
98
|
-
</script>
|
|
99
|
-
|
|
100
|
-
<div class="min-h-screen bg-bg">
|
|
101
|
-
{#if site.banner}
|
|
102
|
-
<Banner banner={site.banner} />
|
|
103
|
-
{/if}
|
|
104
|
-
<Navbar {site} {resolveVersion} onMenuClick={() => (mobileOpen = true)} />
|
|
105
|
-
<SearchDialog />
|
|
106
|
-
<Mermaid />
|
|
107
|
-
|
|
108
|
-
<div class={containerClass}>
|
|
109
|
-
<!-- Sidebar (desktop) -->
|
|
110
|
-
<aside class={asideClass}>
|
|
111
|
-
<div class="min-h-0 flex-1 overflow-y-auto py-8">
|
|
112
|
-
<Sidebar sections={sidebar} dropdowns={site.dropdowns} />
|
|
113
|
-
</div>
|
|
114
|
-
{#if site.sidebarLinks && site.sidebarLinks.length}
|
|
115
|
-
<div class="shrink-0 pb-6">
|
|
116
|
-
<SidebarFooterLinks links={site.sidebarLinks} />
|
|
117
|
-
</div>
|
|
118
|
-
{/if}
|
|
119
|
-
</aside>
|
|
120
|
-
|
|
121
|
-
<!-- Content -->
|
|
122
|
-
<main
|
|
123
|
-
class="flex min-h-[calc(100vh-var(--spacing-header))] min-w-0 flex-1 flex-col px-4 py-8 sm:px-8 lg:px-12"
|
|
124
|
-
>
|
|
125
|
-
<div class="mx-auto w-full {wide ? 'max-w-7xl' : 'max-w-content'}">
|
|
126
|
-
<div class="mb-3 flex items-center gap-3 {wide ? 'lg:max-w-[calc(100%-30.5rem)]' : ''}">
|
|
127
|
-
<Breadcrumbs {sidebar} />
|
|
128
|
-
<div class="ml-auto shrink-0">
|
|
129
|
-
<CopyPageMenu />
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
<article
|
|
134
|
-
id="doc-content"
|
|
135
|
-
class="doc-content mx-auto w-full {wide ? 'doc-api max-w-7xl' : 'max-w-content'}"
|
|
136
|
-
>
|
|
137
|
-
{@render children()}
|
|
138
|
-
</article>
|
|
139
|
-
|
|
140
|
-
<!-- Prev/next + footer are pushed to the bottom of the viewport on short
|
|
141
|
-
pages (mt-auto on the first block). On API (wide) pages they stay
|
|
142
|
-
aligned to the content column, not under the code rail. -->
|
|
143
|
-
<div class="mx-auto mt-auto w-full {wide ? 'max-w-7xl' : 'max-w-content'}">
|
|
144
|
-
<div class={wide ? 'lg:max-w-[calc(100%-30.5rem)]' : ''}>
|
|
145
|
-
<PageMeta {editUrl} {updated} />
|
|
146
|
-
<PageNav pages={flatPages} />
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<div class="mx-auto w-full {wide ? 'max-w-7xl' : 'max-w-content'}">
|
|
151
|
-
<div class={wide ? 'lg:max-w-[calc(100%-30.5rem)]' : ''}>
|
|
152
|
-
<Footer {site} />
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
</main>
|
|
156
|
-
|
|
157
|
-
<!-- Table of contents (hidden in wide/API mode, which has no room for it) -->
|
|
158
|
-
{#if !wide}
|
|
159
|
-
<aside
|
|
160
|
-
class="sticky top-(--spacing-header) hidden h-[calc(100vh-var(--spacing-header))] w-toc shrink-0 overflow-y-auto py-8 pl-4 xl:block"
|
|
161
|
-
>
|
|
162
|
-
<TableOfContents />
|
|
163
|
-
</aside>
|
|
164
|
-
{/if}
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
<!-- Mobile sidebar drawer -->
|
|
169
|
-
{#if mobileOpen}
|
|
170
|
-
<div class="fixed inset-0 z-50 lg:hidden">
|
|
171
|
-
<button
|
|
172
|
-
type="button"
|
|
173
|
-
class="absolute inset-0 bg-black/40 backdrop-blur-sm"
|
|
174
|
-
aria-label="Close navigation"
|
|
175
|
-
onclick={() => (mobileOpen = false)}
|
|
176
|
-
transition:fade={{ duration: 150 }}
|
|
177
|
-
></button>
|
|
178
|
-
<div
|
|
179
|
-
class="absolute top-0 left-0 flex h-full w-72 max-w-[85%] flex-col border-r border-border bg-sidebar"
|
|
180
|
-
transition:fly={{ x: -300, duration: 200 }}
|
|
181
|
-
>
|
|
182
|
-
<div class="min-h-0 flex-1 overflow-y-auto p-6">
|
|
183
|
-
<Sidebar sections={sidebar} dropdowns={site.dropdowns} />
|
|
184
|
-
</div>
|
|
185
|
-
{#if site.sidebarLinks && site.sidebarLinks.length}
|
|
186
|
-
<div class="shrink-0 px-6 pb-6">
|
|
187
|
-
<SidebarFooterLinks links={site.sidebarLinks} />
|
|
188
|
-
</div>
|
|
189
|
-
{/if}
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
{/if}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { SiteConfig } from '$lib/types';
|
|
3
|
-
import DynamicIcon from '$lib/components/DynamicIcon.svelte';
|
|
4
|
-
|
|
5
|
-
let { site }: { site: SiteConfig } = $props();
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<footer
|
|
9
|
-
class="mt-10 flex flex-col items-start justify-between gap-4 border-t border-border pt-6 text-sm text-fg-subtle sm:flex-row sm:items-center"
|
|
10
|
-
>
|
|
11
|
-
<div class="flex flex-col gap-3">
|
|
12
|
-
<div class="flex items-center gap-3">
|
|
13
|
-
{#if site.github}
|
|
14
|
-
<a
|
|
15
|
-
href={site.github}
|
|
16
|
-
target="_blank"
|
|
17
|
-
rel="noreferrer"
|
|
18
|
-
class="transition hover:text-fg"
|
|
19
|
-
aria-label="GitHub"
|
|
20
|
-
>
|
|
21
|
-
<svg width="17" height="17" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
22
|
-
<path
|
|
23
|
-
d="M12 1.27a11 11 0 0 0-3.48 21.46c.55.09.73-.24.73-.53v-1.85c-3.03.66-3.67-1.45-3.67-1.45-.5-1.27-1.21-1.61-1.21-1.61-.99-.68.07-.66.07-.66 1.1.08 1.67 1.13 1.67 1.13.97 1.67 2.55 1.19 3.17.91.1-.71.38-1.19.69-1.46-2.42-.28-4.96-1.21-4.96-5.38 0-1.19.42-2.16 1.13-2.92-.11-.28-.49-1.39.11-2.89 0 0 .92-.3 3.02 1.12a10.4 10.4 0 0 1 5.5 0c2.1-1.42 3.02-1.12 3.02-1.12.6 1.5.22 2.61.11 2.89.71.76 1.13 1.73 1.13 2.92 0 4.18-2.55 5.1-4.98 5.37.39.34.74 1 .74 2.03v3.01c0 .29.18.63.74.52A11 11 0 0 0 12 1.27"
|
|
24
|
-
/>
|
|
25
|
-
</svg>
|
|
26
|
-
</a>
|
|
27
|
-
{/if}
|
|
28
|
-
{#each site.social ?? [] as link (link.href)}
|
|
29
|
-
<a
|
|
30
|
-
href={link.href}
|
|
31
|
-
target="_blank"
|
|
32
|
-
rel="noreferrer"
|
|
33
|
-
class="transition hover:text-fg"
|
|
34
|
-
aria-label={link.label ?? link.icon}
|
|
35
|
-
>
|
|
36
|
-
<DynamicIcon name={link.icon} size={17} />
|
|
37
|
-
</a>
|
|
38
|
-
{/each}
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
{#if site.footer?.links?.length}
|
|
42
|
-
<nav class="flex flex-wrap items-center gap-x-4 gap-y-1" aria-label="Footer">
|
|
43
|
-
{#each site.footer.links as link (link.href)}
|
|
44
|
-
<a href={link.href} class="transition hover:text-fg">{link.title}</a>
|
|
45
|
-
{/each}
|
|
46
|
-
</nav>
|
|
47
|
-
{/if}
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
{#if site.footer?.note}
|
|
51
|
-
<p>{site.footer.note}</p>
|
|
52
|
-
{:else}
|
|
53
|
-
<p>
|
|
54
|
-
Powered by
|
|
55
|
-
<a href="https://axerity.com" class="font-semibold text-fg-muted transition hover:text-fg">
|
|
56
|
-
Axerity
|
|
57
|
-
</a>
|
|
58
|
-
</p>
|
|
59
|
-
{/if}
|
|
60
|
-
</footer>
|