@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,67 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { page } from '$app/state';
|
|
3
|
-
import type { NavLink } from '$lib/types';
|
|
4
|
-
import DynamicIcon from '$lib/components/DynamicIcon.svelte';
|
|
5
|
-
|
|
6
|
-
let { item, depth = 0 }: { item: NavLink; depth?: number } = $props();
|
|
7
|
-
|
|
8
|
-
const active = $derived(page.url.pathname === item.href);
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<a
|
|
12
|
-
href={item.href}
|
|
13
|
-
aria-current={active ? 'page' : undefined}
|
|
14
|
-
style="padding-left: {0.75 + depth * 0.75}rem"
|
|
15
|
-
class="group flex items-center gap-2.5 rounded-md py-1.5 pr-3 text-sm transition
|
|
16
|
-
{active
|
|
17
|
-
? 'bg-accent/10 font-medium text-accent'
|
|
18
|
-
: 'text-fg-muted hover:bg-bg-subtle hover:text-fg'}"
|
|
19
|
-
>
|
|
20
|
-
{#if item.method}
|
|
21
|
-
<span class="method-badge" data-method={item.method.toUpperCase()}>
|
|
22
|
-
{item.method.toUpperCase()}
|
|
23
|
-
</span>
|
|
24
|
-
{:else if item.icon}
|
|
25
|
-
<DynamicIcon
|
|
26
|
-
name={item.icon}
|
|
27
|
-
size={16}
|
|
28
|
-
class={active ? 'text-accent' : 'text-fg-subtle group-hover:text-fg-muted'}
|
|
29
|
-
/>
|
|
30
|
-
{/if}
|
|
31
|
-
<span class="flex-1">{item.title}</span>
|
|
32
|
-
{#if item.badge}
|
|
33
|
-
<span
|
|
34
|
-
class="rounded-full bg-accent/15 px-1.5 py-0.5 text-[10px] font-semibold tracking-wide text-accent uppercase"
|
|
35
|
-
>
|
|
36
|
-
{item.badge}
|
|
37
|
-
</span>
|
|
38
|
-
{/if}
|
|
39
|
-
</a>
|
|
40
|
-
|
|
41
|
-
<style>
|
|
42
|
-
/* Color-coded HTTP method label, mirroring the <Endpoint> badge. */
|
|
43
|
-
.method-badge {
|
|
44
|
-
flex-shrink: 0;
|
|
45
|
-
width: 2.75rem;
|
|
46
|
-
font-family: var(--font-mono);
|
|
47
|
-
font-size: 0.6rem;
|
|
48
|
-
font-weight: 700;
|
|
49
|
-
letter-spacing: 0.02em;
|
|
50
|
-
color: var(--m);
|
|
51
|
-
}
|
|
52
|
-
.method-badge[data-method='GET'] {
|
|
53
|
-
--m: oklch(0.6 0.15 155);
|
|
54
|
-
}
|
|
55
|
-
.method-badge[data-method='POST'] {
|
|
56
|
-
--m: oklch(0.6 0.16 250);
|
|
57
|
-
}
|
|
58
|
-
.method-badge[data-method='PUT'] {
|
|
59
|
-
--m: oklch(0.68 0.15 75);
|
|
60
|
-
}
|
|
61
|
-
.method-badge[data-method='PATCH'] {
|
|
62
|
-
--m: oklch(0.62 0.19 300);
|
|
63
|
-
}
|
|
64
|
-
.method-badge[data-method='DELETE'] {
|
|
65
|
-
--m: oklch(0.62 0.21 25);
|
|
66
|
-
}
|
|
67
|
-
</style>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { page } from '$app/state';
|
|
3
|
-
import { SvelteSet } from 'svelte/reactivity';
|
|
4
|
-
import type { TocEntry } from '$lib/types';
|
|
5
|
-
|
|
6
|
-
// Where to read headings from — the rendered markdown container.
|
|
7
|
-
let { containerId = 'doc-content' }: { containerId?: string } = $props();
|
|
8
|
-
|
|
9
|
-
let entries = $state<TocEntry[]>([]);
|
|
10
|
-
let activeId = $state<string | null>(null);
|
|
11
|
-
|
|
12
|
-
// Extract h2/h3 headings from the rendered content, re-running on navigation.
|
|
13
|
-
$effect(() => {
|
|
14
|
-
// Reading the pathname makes this effect re-run (re-extract) on navigation.
|
|
15
|
-
const pathname = page.url.pathname;
|
|
16
|
-
const container = document.getElementById(containerId);
|
|
17
|
-
if (!container || !pathname) {
|
|
18
|
-
entries = [];
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const headings = container.querySelectorAll<HTMLElement>('h2[id], h3[id]');
|
|
22
|
-
entries = Array.from(headings).map((h) => ({
|
|
23
|
-
id: h.id,
|
|
24
|
-
title: h.textContent?.trim() ?? '',
|
|
25
|
-
depth: h.tagName === 'H3' ? 3 : 2
|
|
26
|
-
}));
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// Scroll-spy: highlight the heading nearest the top of the viewport.
|
|
30
|
-
$effect(() => {
|
|
31
|
-
if (entries.length === 0) return;
|
|
32
|
-
|
|
33
|
-
const elements = entries
|
|
34
|
-
.map((e) => document.getElementById(e.id))
|
|
35
|
-
.filter((el): el is HTMLElement => el !== null);
|
|
36
|
-
|
|
37
|
-
const visible = new SvelteSet<string>();
|
|
38
|
-
const observer = new IntersectionObserver(
|
|
39
|
-
(records) => {
|
|
40
|
-
for (const record of records) {
|
|
41
|
-
if (record.isIntersecting) visible.add(record.target.id);
|
|
42
|
-
else visible.delete(record.target.id);
|
|
43
|
-
}
|
|
44
|
-
const firstVisible = entries.find((e) => visible.has(e.id));
|
|
45
|
-
if (firstVisible) activeId = firstVisible.id;
|
|
46
|
-
},
|
|
47
|
-
{ rootMargin: '0px 0px -70% 0px', threshold: 0 }
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
for (const el of elements) observer.observe(el);
|
|
51
|
-
return () => observer.disconnect();
|
|
52
|
-
});
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
{#if entries.length > 0}
|
|
56
|
-
<nav class="flex flex-col gap-2 text-sm" aria-label="On this page">
|
|
57
|
-
<p class="px-3 text-xs font-semibold tracking-wide text-fg-subtle uppercase">On this page</p>
|
|
58
|
-
<ul class="flex flex-col gap-0.5">
|
|
59
|
-
{#each entries as entry (entry.id)}
|
|
60
|
-
{@const active = activeId === entry.id}
|
|
61
|
-
<li>
|
|
62
|
-
<a
|
|
63
|
-
href="#{entry.id}"
|
|
64
|
-
aria-current={active ? 'location' : undefined}
|
|
65
|
-
class="block border-l-2 py-1 pr-3 transition
|
|
66
|
-
{entry.depth === 3 ? 'pl-6' : 'pl-3'}
|
|
67
|
-
{active
|
|
68
|
-
? 'border-accent font-medium text-accent'
|
|
69
|
-
: 'border-transparent text-fg-subtle hover:text-fg'}"
|
|
70
|
-
>
|
|
71
|
-
{entry.title}
|
|
72
|
-
</a>
|
|
73
|
-
</li>
|
|
74
|
-
{/each}
|
|
75
|
-
</ul>
|
|
76
|
-
</nav>
|
|
77
|
-
{/if}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Sun from '@lucide/svelte/icons/sun';
|
|
3
|
-
import Moon from '@lucide/svelte/icons/moon';
|
|
4
|
-
import { theme } from '$lib/state/theme.svelte';
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<button
|
|
8
|
-
type="button"
|
|
9
|
-
onclick={() => theme.toggle()}
|
|
10
|
-
class="inline-flex h-9 w-9 items-center justify-center rounded-lg border border-border text-fg-muted transition hover:border-border-strong hover:bg-bg-subtle hover:text-fg"
|
|
11
|
-
aria-label="Toggle theme"
|
|
12
|
-
title={theme.resolved === 'dark' ? 'Switch to light' : 'Switch to dark'}
|
|
13
|
-
>
|
|
14
|
-
{#if theme.resolved === 'dark'}
|
|
15
|
-
<Moon size={17} />
|
|
16
|
-
{:else}
|
|
17
|
-
<Sun size={17} />
|
|
18
|
-
{/if}
|
|
19
|
-
</button>
|
|
@@ -1,80 +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 ChevronDown from '@lucide/svelte/icons/chevron-down';
|
|
6
|
-
import Check from '@lucide/svelte/icons/check';
|
|
7
|
-
import type { Version } from '$lib/types';
|
|
8
|
-
|
|
9
|
-
let {
|
|
10
|
-
versions,
|
|
11
|
-
resolveVersion
|
|
12
|
-
}: {
|
|
13
|
-
versions: Version[];
|
|
14
|
-
resolveVersion?: (pathname: string, versionPath: string) => string;
|
|
15
|
-
} = $props();
|
|
16
|
-
|
|
17
|
-
let open = $state(false);
|
|
18
|
-
|
|
19
|
-
const stripBase = (path: string): string =>
|
|
20
|
-
base && path.startsWith(base) ? path.slice(base.length) : path;
|
|
21
|
-
|
|
22
|
-
const sorted = $derived(
|
|
23
|
-
[...versions].sort((a, b) => stripBase(b.href).length - stripBase(a.href).length)
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const current = $derived(
|
|
27
|
-
sorted.find((version) => {
|
|
28
|
-
const vp = stripBase(version.href);
|
|
29
|
-
const path = stripBase(page.url.pathname);
|
|
30
|
-
return vp === '/' ? true : path === vp || path.startsWith(`${vp}/`);
|
|
31
|
-
}) ?? versions[0]
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const hrefFor = (version: Version): string => {
|
|
35
|
-
const vp = stripBase(version.href);
|
|
36
|
-
if (resolveVersion) return resolveVersion(page.url.pathname, vp);
|
|
37
|
-
const cur = stripBase(current.href);
|
|
38
|
-
const rest = vp === '/' || cur === '/' ? '' : stripBase(page.url.pathname).slice(cur.length);
|
|
39
|
-
return base + (vp === '/' ? rest || '/' : vp + rest);
|
|
40
|
-
};
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<div class="relative">
|
|
44
|
-
<button
|
|
45
|
-
type="button"
|
|
46
|
-
onclick={() => (open = !open)}
|
|
47
|
-
aria-expanded={open}
|
|
48
|
-
class="flex items-center gap-1.5 rounded-md border border-border bg-surface px-2.5 py-1.5 text-xs font-medium text-fg-muted transition hover:border-border-strong hover:text-fg"
|
|
49
|
-
>
|
|
50
|
-
{current.label}
|
|
51
|
-
<ChevronDown size={13} class="text-fg-subtle transition-transform {open ? 'rotate-180' : ''}" />
|
|
52
|
-
</button>
|
|
53
|
-
|
|
54
|
-
{#if open}
|
|
55
|
-
<button
|
|
56
|
-
type="button"
|
|
57
|
-
class="fixed inset-0 z-40 cursor-default"
|
|
58
|
-
aria-label="Close versions"
|
|
59
|
-
onclick={() => (open = false)}
|
|
60
|
-
></button>
|
|
61
|
-
<div
|
|
62
|
-
class="absolute left-0 z-50 mt-1.5 w-36 overflow-hidden rounded-lg border border-border bg-surface-raised p-1 shadow-lg"
|
|
63
|
-
transition:fade={{ duration: 100 }}
|
|
64
|
-
>
|
|
65
|
-
{#each versions as version (version.label)}
|
|
66
|
-
<a
|
|
67
|
-
href={hrefFor(version)}
|
|
68
|
-
onclick={() => (open = false)}
|
|
69
|
-
class="flex items-center justify-between rounded-md px-2.5 py-1.5 text-sm transition hover:bg-bg-subtle
|
|
70
|
-
{version === current ? 'text-fg' : 'text-fg-muted'}"
|
|
71
|
-
>
|
|
72
|
-
{version.label}
|
|
73
|
-
{#if version === current}
|
|
74
|
-
<Check size={14} class="text-fg-subtle" />
|
|
75
|
-
{/if}
|
|
76
|
-
</a>
|
|
77
|
-
{/each}
|
|
78
|
-
</div>
|
|
79
|
-
{/if}
|
|
80
|
-
</div>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { getContext, untrack } from 'svelte';
|
|
4
|
-
import { slide } from 'svelte/transition';
|
|
5
|
-
import ChevronDown from '@lucide/svelte/icons/chevron-down';
|
|
6
|
-
import DynamicIcon from '$lib/components/DynamicIcon.svelte';
|
|
7
|
-
import { ACCORDION_GROUP } from './accordion-context';
|
|
8
|
-
|
|
9
|
-
let {
|
|
10
|
-
title,
|
|
11
|
-
icon,
|
|
12
|
-
open = false,
|
|
13
|
-
children
|
|
14
|
-
}: { title: string; icon?: string; open?: boolean; children: Snippet } = $props();
|
|
15
|
-
|
|
16
|
-
// `open` is an uncontrolled initial value; toggling afterwards is internal.
|
|
17
|
-
let isOpen = $state(untrack(() => open));
|
|
18
|
-
|
|
19
|
-
const grouped = getContext(ACCORDION_GROUP) === true;
|
|
20
|
-
|
|
21
|
-
// Standalone accordions are self-contained cards; grouped ones inherit the
|
|
22
|
-
// group's border and dividers.
|
|
23
|
-
const wrapperClass = grouped ? 'bg-surface' : 'my-5 rounded-xl border border-border bg-surface';
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<div class={wrapperClass}>
|
|
27
|
-
<button
|
|
28
|
-
type="button"
|
|
29
|
-
onclick={() => (isOpen = !isOpen)}
|
|
30
|
-
aria-expanded={isOpen}
|
|
31
|
-
class="flex w-full items-center gap-3 px-4 py-3 text-left text-sm font-medium text-fg transition hover:bg-bg-subtle"
|
|
32
|
-
>
|
|
33
|
-
{#if icon}
|
|
34
|
-
<DynamicIcon name={icon} size={18} class="shrink-0 text-accent" />
|
|
35
|
-
{/if}
|
|
36
|
-
<span class="flex-1">{title}</span>
|
|
37
|
-
<ChevronDown
|
|
38
|
-
size={18}
|
|
39
|
-
class="shrink-0 text-fg-subtle transition-transform duration-200 {isOpen ? 'rotate-180' : ''}"
|
|
40
|
-
/>
|
|
41
|
-
</button>
|
|
42
|
-
|
|
43
|
-
{#if isOpen}
|
|
44
|
-
<div transition:slide={{ duration: 200 }}>
|
|
45
|
-
<div class="accordion-body px-4 pb-4 text-sm text-fg-muted">
|
|
46
|
-
{@render children()}
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
{/if}
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<style>
|
|
53
|
-
/* Trim stray margins from markdown rendered inside the panel. */
|
|
54
|
-
.accordion-body :global(> :first-child) {
|
|
55
|
-
margin-top: 0;
|
|
56
|
-
}
|
|
57
|
-
.accordion-body :global(> :last-child) {
|
|
58
|
-
margin-bottom: 0;
|
|
59
|
-
}
|
|
60
|
-
</style>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { setContext } from 'svelte';
|
|
4
|
-
import { ACCORDION_GROUP } from './accordion-context';
|
|
5
|
-
|
|
6
|
-
let { children }: { children: Snippet } = $props();
|
|
7
|
-
|
|
8
|
-
setContext(ACCORDION_GROUP, true);
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div class="my-5 divide-y divide-border overflow-hidden rounded-xl border border-border">
|
|
12
|
-
{@render children()}
|
|
13
|
-
</div>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
type Color = 'neutral' | 'info' | 'success' | 'warn' | 'error';
|
|
5
|
-
|
|
6
|
-
let { color = 'neutral', children }: { color?: Color; children: Snippet } = $props();
|
|
7
|
-
|
|
8
|
-
const variants = {
|
|
9
|
-
neutral: 'border-border bg-bg-subtle text-fg-muted',
|
|
10
|
-
info: 'border-transparent bg-(--c)/15 text-(--c)',
|
|
11
|
-
success: 'border-transparent bg-(--c)/15 text-(--c)',
|
|
12
|
-
warn: 'border-transparent bg-(--c)/15 text-(--c)',
|
|
13
|
-
error: 'border-transparent bg-(--c)/15 text-(--c)'
|
|
14
|
-
} as const;
|
|
15
|
-
|
|
16
|
-
const colors = {
|
|
17
|
-
neutral: 'var(--fg-muted)',
|
|
18
|
-
info: 'oklch(0.62 0.2 250)',
|
|
19
|
-
success: 'oklch(0.6 0.16 155)',
|
|
20
|
-
warn: 'oklch(0.7 0.16 75)',
|
|
21
|
-
error: 'oklch(0.62 0.22 25)'
|
|
22
|
-
} as const;
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<span
|
|
26
|
-
class="inline-flex items-center rounded-full border px-2 py-0.5 align-middle text-xs font-medium {variants[
|
|
27
|
-
color
|
|
28
|
-
]}"
|
|
29
|
-
style="--c: {colors[color]};"
|
|
30
|
-
>
|
|
31
|
-
{@render children()}
|
|
32
|
-
</span>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
import Info from '@lucide/svelte/icons/info';
|
|
5
|
-
import Lightbulb from '@lucide/svelte/icons/lightbulb';
|
|
6
|
-
import CircleCheck from '@lucide/svelte/icons/circle-check';
|
|
7
|
-
import TriangleAlert from '@lucide/svelte/icons/triangle-alert';
|
|
8
|
-
import CircleX from '@lucide/svelte/icons/circle-x';
|
|
9
|
-
|
|
10
|
-
type CalloutType = 'info' | 'tip' | 'success' | 'warn' | 'warning' | 'error';
|
|
11
|
-
|
|
12
|
-
let {
|
|
13
|
-
type = 'info',
|
|
14
|
-
title,
|
|
15
|
-
children
|
|
16
|
-
}: { type?: CalloutType; title?: string; children: Snippet } = $props();
|
|
17
|
-
|
|
18
|
-
const variants = {
|
|
19
|
-
info: { icon: Info, color: 'var(--fg-muted)' },
|
|
20
|
-
tip: { icon: Lightbulb, color: 'oklch(0.62 0.2 300)' },
|
|
21
|
-
success: { icon: CircleCheck, color: 'oklch(0.6 0.16 155)' },
|
|
22
|
-
warn: { icon: TriangleAlert, color: 'oklch(0.7 0.16 75)' },
|
|
23
|
-
error: { icon: CircleX, color: 'oklch(0.62 0.22 25)' }
|
|
24
|
-
} as const;
|
|
25
|
-
|
|
26
|
-
const variant = $derived(variants[type === 'warning' ? 'warn' : type]);
|
|
27
|
-
const Icon = $derived(variant.icon);
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<div
|
|
31
|
-
class="callout my-5 flex gap-2.5 rounded-lg border border-(--c)/25 bg-(--c)/[0.07] px-4 py-3"
|
|
32
|
-
style="--c: {variant.color};"
|
|
33
|
-
role="note"
|
|
34
|
-
>
|
|
35
|
-
<Icon size={18} class="mt-0.5 shrink-0 text-(--c)" />
|
|
36
|
-
<div class="callout-body min-w-0 flex-1 text-sm leading-relaxed text-(--c)">
|
|
37
|
-
{#if title}
|
|
38
|
-
<p class="mb-0.5 font-semibold">{title}</p>
|
|
39
|
-
{/if}
|
|
40
|
-
{@render children()}
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<style>
|
|
45
|
-
.callout-body :global(> :first-child) {
|
|
46
|
-
margin-top: 0;
|
|
47
|
-
}
|
|
48
|
-
.callout-body :global(> :last-child) {
|
|
49
|
-
margin-bottom: 0;
|
|
50
|
-
}
|
|
51
|
-
</style>
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import ArrowRight from '@lucide/svelte/icons/arrow-right';
|
|
4
|
-
import DynamicIcon from '$lib/components/DynamicIcon.svelte';
|
|
5
|
-
import { withBase } from '$lib/base';
|
|
6
|
-
|
|
7
|
-
let {
|
|
8
|
-
title,
|
|
9
|
-
icon,
|
|
10
|
-
href,
|
|
11
|
-
horizontal = false,
|
|
12
|
-
children
|
|
13
|
-
}: {
|
|
14
|
-
title: string;
|
|
15
|
-
icon?: string;
|
|
16
|
-
href?: string;
|
|
17
|
-
horizontal?: boolean;
|
|
18
|
-
children?: Snippet;
|
|
19
|
-
} = $props();
|
|
20
|
-
|
|
21
|
-
const isLink = $derived(!!href);
|
|
22
|
-
const external = $derived(!!href && /^https?:\/\//.test(href));
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<svelte:element
|
|
26
|
-
this={href ? 'a' : 'div'}
|
|
27
|
-
href={withBase(href) || undefined}
|
|
28
|
-
target={external ? '_blank' : undefined}
|
|
29
|
-
rel={external ? 'noreferrer' : undefined}
|
|
30
|
-
class="card-root group block rounded-lg border border-border bg-surface p-4 transition
|
|
31
|
-
{isLink ? 'hover:border-border-strong hover:bg-bg-subtle' : ''}
|
|
32
|
-
{horizontal ? 'flex items-start gap-3.5' : ''}"
|
|
33
|
-
>
|
|
34
|
-
{#if icon}
|
|
35
|
-
<div
|
|
36
|
-
class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-border bg-bg-subtle text-fg
|
|
37
|
-
{horizontal ? '' : 'mb-3'}"
|
|
38
|
-
>
|
|
39
|
-
<DynamicIcon name={icon} size={17} />
|
|
40
|
-
</div>
|
|
41
|
-
{/if}
|
|
42
|
-
|
|
43
|
-
<div class="min-w-0 flex-1">
|
|
44
|
-
<div class="flex items-center gap-1.5">
|
|
45
|
-
<span class="font-semibold text-fg">{title}</span>
|
|
46
|
-
{#if isLink}
|
|
47
|
-
<ArrowRight
|
|
48
|
-
size={15}
|
|
49
|
-
class="text-fg-subtle transition-transform group-hover:translate-x-0.5"
|
|
50
|
-
/>
|
|
51
|
-
{/if}
|
|
52
|
-
</div>
|
|
53
|
-
{#if children}
|
|
54
|
-
<div class="card-body mt-1 text-sm text-fg-muted">
|
|
55
|
-
{@render children()}
|
|
56
|
-
</div>
|
|
57
|
-
{/if}
|
|
58
|
-
</div>
|
|
59
|
-
</svelte:element>
|
|
60
|
-
|
|
61
|
-
<style>
|
|
62
|
-
.card-root,
|
|
63
|
-
.card-root:hover {
|
|
64
|
-
text-decoration: none;
|
|
65
|
-
}
|
|
66
|
-
.card-body :global(> :first-child) {
|
|
67
|
-
margin-top: 0;
|
|
68
|
-
}
|
|
69
|
-
.card-body :global(> :last-child) {
|
|
70
|
-
margin-bottom: 0;
|
|
71
|
-
}
|
|
72
|
-
</style>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
let { cols = 2, children }: { cols?: number; children: Snippet } = $props();
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<div class="card-group my-5 grid gap-3" style="--cols: {cols};">
|
|
8
|
-
{@render children()}
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<style>
|
|
12
|
-
.card-group {
|
|
13
|
-
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@media (min-width: 640px) {
|
|
17
|
-
.card-group {
|
|
18
|
-
grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
</style>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
let { children }: { children: Snippet } = $props();
|
|
5
|
-
|
|
6
|
-
let container = $state<HTMLElement>();
|
|
7
|
-
let tabs = $state<string[]>([]);
|
|
8
|
-
let active = $state(0);
|
|
9
|
-
|
|
10
|
-
let blocks: HTMLElement[] = [];
|
|
11
|
-
let initialized = false;
|
|
12
|
-
|
|
13
|
-
$effect(() => {
|
|
14
|
-
if (!container || initialized) return;
|
|
15
|
-
const found = Array.from(
|
|
16
|
-
container.querySelectorAll('.cg-blocks > .code-block')
|
|
17
|
-
) as HTMLElement[];
|
|
18
|
-
if (!found.length) return;
|
|
19
|
-
|
|
20
|
-
blocks = found;
|
|
21
|
-
tabs = found.map((block, index) => {
|
|
22
|
-
const title = block.querySelector('.code-title')?.textContent?.trim();
|
|
23
|
-
block.querySelector('.code-header')?.classList.add('hidden');
|
|
24
|
-
return title || `Tab ${index + 1}`;
|
|
25
|
-
});
|
|
26
|
-
select(0);
|
|
27
|
-
initialized = true;
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
function select(index: number) {
|
|
31
|
-
active = index;
|
|
32
|
-
blocks.forEach((block, i) => block.classList.toggle('hidden', i !== index));
|
|
33
|
-
}
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<div class="code-group my-5 overflow-hidden rounded-lg border border-border" bind:this={container}>
|
|
37
|
-
{#if tabs.length}
|
|
38
|
-
<div class="cg-tabs flex items-center gap-1 border-b border-border bg-bg-subtle px-1.5 py-1.5">
|
|
39
|
-
{#each tabs as tab, index (index)}
|
|
40
|
-
<button
|
|
41
|
-
type="button"
|
|
42
|
-
onclick={() => select(index)}
|
|
43
|
-
class="rounded-md px-2.5 py-1 font-mono text-xs transition
|
|
44
|
-
{index === active ? 'bg-surface text-fg' : 'text-fg-muted hover:text-fg'}"
|
|
45
|
-
>
|
|
46
|
-
{tab}
|
|
47
|
-
</button>
|
|
48
|
-
{/each}
|
|
49
|
-
</div>
|
|
50
|
-
{/if}
|
|
51
|
-
<div class="cg-blocks">
|
|
52
|
-
{@render children()}
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<style>
|
|
57
|
-
.code-group :global(.code-block) {
|
|
58
|
-
margin: 0;
|
|
59
|
-
border-radius: 0;
|
|
60
|
-
}
|
|
61
|
-
.code-group :global(.code-block pre) {
|
|
62
|
-
border: 0;
|
|
63
|
-
border-radius: 0;
|
|
64
|
-
}
|
|
65
|
-
</style>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
let { cols = 2, children }: { cols?: number; children: Snippet } = $props();
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<div class="columns-grid" style="--cols: {cols};">
|
|
8
|
-
{@render children()}
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<style>
|
|
12
|
-
.columns-grid {
|
|
13
|
-
display: grid;
|
|
14
|
-
gap: 1rem;
|
|
15
|
-
grid-template-columns: 1fr;
|
|
16
|
-
margin: 1.25rem 0;
|
|
17
|
-
}
|
|
18
|
-
@media (min-width: 640px) {
|
|
19
|
-
.columns-grid {
|
|
20
|
-
grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
.columns-grid :global(> *) {
|
|
24
|
-
margin: 0;
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import ArrowRight from '@lucide/svelte/icons/arrow-right';
|
|
4
|
-
import { withBase } from '$lib/base';
|
|
5
|
-
|
|
6
|
-
let { name, href, children }: { name: string; href?: string; children?: Snippet } = $props();
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<svelte:element
|
|
10
|
-
this={href ? 'a' : 'div'}
|
|
11
|
-
href={href ? withBase(href) : undefined}
|
|
12
|
-
class="event-item flex items-center gap-3 px-4 py-3 text-sm transition {href
|
|
13
|
-
? 'hover:bg-bg-subtle'
|
|
14
|
-
: ''}"
|
|
15
|
-
>
|
|
16
|
-
<code class="shrink-0 font-mono text-fg">{name}</code>
|
|
17
|
-
{#if children}
|
|
18
|
-
<span class="min-w-0 flex-1 truncate text-fg-muted">{@render children()}</span>
|
|
19
|
-
{/if}
|
|
20
|
-
{#if href}
|
|
21
|
-
<ArrowRight size={15} class="ml-auto shrink-0 text-fg-subtle" />
|
|
22
|
-
{/if}
|
|
23
|
-
</svelte:element>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
let { children }: { children: Snippet } = $props();
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<div class="event-list my-5 divide-y divide-border overflow-hidden rounded-lg border border-border">
|
|
8
|
-
{@render children()}
|
|
9
|
-
</div>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import FileIcon from '@lucide/svelte/icons/file';
|
|
3
|
-
import DynamicIcon from '$lib/components/DynamicIcon.svelte';
|
|
4
|
-
|
|
5
|
-
let { name, icon }: { name: string; icon?: string } = $props();
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<div class="tree-file flex items-center gap-1.5 rounded-md py-1 pr-1.5 pl-[1.625rem] text-fg-muted">
|
|
9
|
-
{#if icon}
|
|
10
|
-
<DynamicIcon name={icon} size={16} class="shrink-0 text-fg-subtle" />
|
|
11
|
-
{:else}
|
|
12
|
-
<FileIcon size={16} class="shrink-0 text-fg-subtle" />
|
|
13
|
-
{/if}
|
|
14
|
-
<span class="truncate">{name}</span>
|
|
15
|
-
</div>
|