@astrojs/starlight 0.41.11 → 0.42.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/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/components/MobileMenuToggle.astro +65 -0
- package/{components → dist/components}/PageFrame.astro +32 -8
- package/dist/components-internals/Icons.d.ts +415 -0
- package/dist/components-internals/Icons.js +140 -0
- package/dist/components-internals/SidebarPersistState.d.ts +1 -0
- package/dist/components-internals/SidebarPersistState.js +53 -0
- package/dist/components-internals/TableOfContents/starlight-toc.d.ts +18 -0
- package/dist/components-internals/TableOfContents/starlight-toc.js +88 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +4 -0
- package/{expressive-code.d.ts → dist/expressive-code.d.ts} +6 -13
- package/dist/expressive-code.js +31 -0
- package/dist/global.d.ts +62 -0
- package/dist/global.js +2 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +109 -0
- package/dist/integrations/aside-utils.d.ts +9 -0
- package/dist/integrations/aside-utils.js +35 -0
- package/dist/integrations/expressive-code/hast.d.ts +1 -0
- package/dist/integrations/expressive-code/hast.js +2 -0
- package/dist/integrations/expressive-code/index.d.ts +60 -0
- package/dist/integrations/expressive-code/index.js +48 -0
- package/dist/integrations/expressive-code/preprocessor.d.ts +17 -0
- package/dist/integrations/expressive-code/preprocessor.js +76 -0
- package/dist/integrations/expressive-code/themes/night-owl-dark.js +4 -0
- package/dist/integrations/expressive-code/themes/night-owl-light.js +4 -0
- package/dist/integrations/expressive-code/theming.d.ts +16 -0
- package/dist/integrations/expressive-code/theming.js +71 -0
- package/dist/integrations/expressive-code/translations.d.ts +8 -0
- package/dist/integrations/expressive-code/translations.js +26 -0
- package/dist/integrations/markdown-icon.d.ts +8 -0
- package/dist/integrations/markdown-icon.js +14 -0
- package/dist/integrations/markdown-plugins.d.ts +18 -0
- package/dist/integrations/markdown-plugins.js +36 -0
- package/dist/integrations/markdown-processor.d.ts +29 -0
- package/dist/integrations/markdown-processor.js +44 -0
- package/dist/integrations/pagefind.d.ts +7 -0
- package/dist/integrations/pagefind.js +34 -0
- package/dist/integrations/rehype-code-rtl-support.d.ts +21 -0
- package/dist/integrations/rehype-code-rtl-support.js +36 -0
- package/dist/integrations/rehype-heading-links.d.ts +10 -0
- package/dist/integrations/rehype-heading-links.js +57 -0
- package/dist/integrations/remark-asides.d.ts +32 -0
- package/dist/integrations/remark-asides.js +166 -0
- package/dist/integrations/remark-rehype.d.ts +17 -0
- package/dist/integrations/remark-rehype.js +51 -0
- package/dist/integrations/satteri.d.ts +13 -0
- package/dist/integrations/satteri.js +209 -0
- package/dist/integrations/shared/absolutePathToLang.d.ts +10 -0
- package/dist/integrations/shared/absolutePathToLang.js +13 -0
- package/dist/integrations/shared/localeToLang.d.ts +10 -0
- package/dist/integrations/shared/localeToLang.js +13 -0
- package/dist/integrations/shared/slugToLocale.d.ts +12 -0
- package/dist/integrations/shared/slugToLocale.js +15 -0
- package/dist/integrations/sitemap.d.ts +12 -0
- package/dist/integrations/sitemap.js +19 -0
- package/dist/integrations/vite-layer-order.d.ts +15 -0
- package/dist/integrations/vite-layer-order.js +56 -0
- package/dist/integrations/vite-lazy-barrel-optimization.d.ts +12 -0
- package/dist/integrations/vite-lazy-barrel-optimization.js +33 -0
- package/dist/integrations/vite-virtual-modules.d.ts +14 -0
- package/dist/integrations/vite-virtual-modules.js +108 -0
- package/dist/internal.d.ts +3 -0
- package/dist/internal.js +3 -0
- package/dist/loaders.d.ts +20 -0
- package/dist/loaders.js +49 -0
- package/dist/locals.d.ts +15 -0
- package/dist/locals.js +33 -0
- package/dist/package.js +4 -0
- package/{props.ts → dist/props.d.ts} +6 -4
- package/dist/props.js +1 -0
- package/dist/route-data.d.ts +7 -0
- package/dist/route-data.js +6 -0
- package/dist/schema.d.ts +426 -0
- package/dist/schema.js +103 -0
- package/dist/schemas/badge.d.ts +86 -0
- package/dist/schemas/badge.js +39 -0
- package/dist/schemas/components.d.ts +236 -0
- package/dist/schemas/components.js +36 -0
- package/dist/schemas/expressiveCode.d.ts +7 -0
- package/dist/schemas/expressiveCode.js +5 -0
- package/dist/schemas/favicon.d.ts +9 -0
- package/dist/schemas/favicon.js +32 -0
- package/dist/schemas/head.d.ts +33 -0
- package/dist/schemas/head.js +41 -0
- package/dist/schemas/hero.d.ts +319 -0
- package/dist/schemas/hero.js +73 -0
- package/dist/schemas/i18n.d.ts +125 -0
- package/dist/schemas/i18n.js +76 -0
- package/dist/schemas/icon.d.ts +284 -0
- package/dist/schemas/icon.js +7 -0
- package/dist/schemas/locale.d.ts +20 -0
- package/dist/schemas/locale.js +11 -0
- package/dist/schemas/logo.d.ts +32 -0
- package/dist/schemas/logo.js +14 -0
- package/dist/schemas/pagefind.d.ts +166 -0
- package/dist/schemas/pagefind.js +31 -0
- package/dist/schemas/prevNextLink.d.ts +10 -0
- package/dist/schemas/prevNextLink.js +14 -0
- package/dist/schemas/sidebar.d.ts +205 -0
- package/dist/schemas/sidebar.js +71 -0
- package/dist/schemas/site-title.d.ts +7 -0
- package/dist/schemas/site-title.js +17 -0
- package/dist/schemas/social.d.ts +292 -0
- package/dist/schemas/social.js +18 -0
- package/dist/schemas/tableOfContents.d.ts +24 -0
- package/dist/schemas/tableOfContents.js +16 -0
- package/dist/translations/ar.js +36 -0
- package/dist/translations/ca.js +46 -0
- package/dist/translations/cs.js +46 -0
- package/dist/translations/da.js +33 -0
- package/dist/translations/de.js +33 -0
- package/dist/translations/el.js +33 -0
- package/dist/translations/en.js +33 -0
- package/dist/translations/es.js +46 -0
- package/dist/translations/fa.js +33 -0
- package/dist/translations/fi.js +33 -0
- package/dist/translations/fr.js +36 -0
- package/dist/translations/gl.js +46 -0
- package/dist/translations/he.js +33 -0
- package/dist/translations/hi.js +36 -0
- package/dist/translations/hu.js +46 -0
- package/dist/translations/id.js +33 -0
- package/dist/translations/index.d.ts +48 -0
- package/dist/translations/index.js +75 -0
- package/dist/translations/it.js +36 -0
- package/dist/translations/ja.js +36 -0
- package/dist/translations/ko.js +36 -0
- package/dist/translations/lv.js +33 -0
- package/dist/translations/nb.js +33 -0
- package/dist/translations/nl.js +33 -0
- package/dist/translations/pl.js +36 -0
- package/dist/translations/pt.js +36 -0
- package/dist/translations/ro.js +33 -0
- package/dist/translations/ru.js +36 -0
- package/dist/translations/sk.js +33 -0
- package/dist/translations/sv.js +33 -0
- package/dist/translations/th.js +33 -0
- package/dist/translations/tr.js +33 -0
- package/dist/translations/uk.js +33 -0
- package/dist/translations/vi.js +33 -0
- package/dist/translations/zh-CN.js +36 -0
- package/dist/translations/zh-TW.js +36 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +1 -0
- package/{user-components → dist/user-components}/FileTree.astro +1 -1
- package/{user-components → dist/user-components}/Steps.astro +1 -1
- package/{user-components → dist/user-components}/TabItem.astro +1 -1
- package/{user-components → dist/user-components}/Tabs.astro +1 -1
- package/dist/user-components/file-tree-icons.d.ts +178 -0
- package/dist/user-components/file-tree-icons.js +632 -0
- package/dist/user-components/file-tree-processor.d.ts +16 -0
- package/dist/user-components/file-tree-processor.js +132 -0
- package/dist/user-components/steps-processor.d.ts +10 -0
- package/dist/user-components/steps-processor.js +39 -0
- package/dist/user-components/tabs-processor.d.ts +23 -0
- package/dist/user-components/tabs-processor.js +70 -0
- package/dist/utils/base.d.ts +7 -0
- package/dist/utils/base.js +15 -0
- package/dist/utils/canonical.d.ts +10 -0
- package/dist/utils/canonical.js +14 -0
- package/dist/utils/collection-fs.d.ts +13 -0
- package/dist/utils/collection-fs.js +19 -0
- package/{utils/collection.ts → dist/utils/collection.d.ts} +9 -20
- package/dist/utils/collection.js +26 -0
- package/dist/utils/createPathFormatter.d.ts +9 -0
- package/dist/utils/createPathFormatter.js +35 -0
- package/dist/utils/createTranslationSystem.d.ts +23 -0
- package/dist/utils/createTranslationSystem.js +84 -0
- package/dist/utils/error-map.d.ts +23 -0
- package/dist/utils/error-map.js +125 -0
- package/dist/utils/format-path.d.ts +4 -0
- package/dist/utils/format-path.js +9 -0
- package/dist/utils/generateToC.d.ts +14 -0
- package/dist/utils/generateToC.js +25 -0
- package/dist/utils/git.d.ts +12 -0
- package/dist/utils/git.js +71 -0
- package/dist/utils/gitInlined.d.ts +6 -0
- package/dist/utils/gitInlined.js +11 -0
- package/dist/utils/head.d.ts +7 -0
- package/dist/utils/head.js +233 -0
- package/dist/utils/i18n.d.ts +50 -0
- package/dist/utils/i18n.js +141 -0
- package/dist/utils/localizedUrl.d.ts +8 -0
- package/dist/utils/localizedUrl.js +28 -0
- package/dist/utils/navigation.d.ts +19 -0
- package/dist/utils/navigation.js +353 -0
- package/dist/utils/path.d.ts +21 -0
- package/dist/utils/path.js +51 -0
- package/dist/utils/plugins.d.ts +721 -0
- package/dist/utils/plugins.js +174 -0
- package/dist/utils/routing/data.d.ts +20 -0
- package/dist/utils/routing/data.js +127 -0
- package/dist/utils/routing/index.d.ts +21 -0
- package/dist/utils/routing/index.js +106 -0
- package/dist/utils/routing/middleware.d.ts +11 -0
- package/dist/utils/routing/middleware.js +65 -0
- package/dist/utils/routing/types.d.ts +93 -0
- package/dist/utils/routing/types.js +1 -0
- package/dist/utils/slugs.d.ts +45 -0
- package/dist/utils/slugs.js +104 -0
- package/dist/utils/starlight-page.d.ts +36 -0
- package/dist/utils/starlight-page.js +120 -0
- package/dist/utils/translations-fs.d.ts +15 -0
- package/dist/utils/translations-fs.js +39 -0
- package/dist/utils/translations.d.ts +20 -0
- package/dist/utils/translations.js +29 -0
- package/dist/utils/types.d.ts +5 -0
- package/dist/utils/types.js +1 -0
- package/dist/utils/url.d.ts +7 -0
- package/{utils/url.ts → dist/utils/url.js} +5 -4
- package/dist/utils/user-config.d.ts +2055 -0
- package/dist/utils/user-config.js +136 -0
- package/dist/utils/validateLogoImports.d.ts +5 -0
- package/dist/utils/validateLogoImports.js +16 -0
- package/dist/utils/zodDeepMerge.d.ts +16 -0
- package/dist/utils/zodDeepMerge.js +53 -0
- package/package.json +60 -34
- package/CHANGELOG.md +0 -3051
- package/components/MobileMenuToggle.astro +0 -114
- package/components-internals/Icons.ts +0 -248
- package/components-internals/SidebarPersistState.ts +0 -71
- package/components-internals/TableOfContents/starlight-toc.ts +0 -127
- package/constants.ts +0 -4
- package/expressive-code.mjs +0 -23
- package/global.d.ts +0 -11
- package/i18n.d.ts +0 -18
- package/index.ts +0 -200
- package/integrations/aside-utils.ts +0 -41
- package/integrations/expressive-code/hast.d.ts +0 -5
- package/integrations/expressive-code/hast.mjs +0 -9
- package/integrations/expressive-code/index.ts +0 -125
- package/integrations/expressive-code/preprocessor.ts +0 -126
- package/integrations/expressive-code/themes/night-owl-dark.jsonc +0 -1796
- package/integrations/expressive-code/themes/night-owl-light.jsonc +0 -1695
- package/integrations/expressive-code/theming.ts +0 -105
- package/integrations/expressive-code/translations.ts +0 -36
- package/integrations/markdown-icon.ts +0 -13
- package/integrations/markdown-plugins.ts +0 -71
- package/integrations/markdown-processor.ts +0 -64
- package/integrations/pagefind.ts +0 -60
- package/integrations/rehype-code-rtl-support.ts +0 -37
- package/integrations/rehype-heading-links.ts +0 -79
- package/integrations/remark-asides.ts +0 -219
- package/integrations/remark-rehype.ts +0 -87
- package/integrations/satteri.ts +0 -265
- package/integrations/shared/absolutePathToLang.ts +0 -26
- package/integrations/shared/localeToLang.ts +0 -15
- package/integrations/shared/slugToLocale.ts +0 -18
- package/integrations/sitemap.ts +0 -23
- package/integrations/vite-layer-order.ts +0 -69
- package/integrations/vite-lazy-barrel-optimization.ts +0 -40
- package/integrations/vite-virtual-modules.ts +0 -175
- package/internal.ts +0 -6
- package/loaders.ts +0 -63
- package/locals.d.ts +0 -43
- package/locals.ts +0 -43
- package/route-data.ts +0 -11
- package/schema.ts +0 -167
- package/schemas/badge.ts +0 -40
- package/schemas/components.ts +0 -265
- package/schemas/expressiveCode.ts +0 -12
- package/schemas/favicon.ts +0 -40
- package/schemas/head.ts +0 -50
- package/schemas/hero.ts +0 -69
- package/schemas/i18n.ts +0 -244
- package/schemas/icon.ts +0 -7
- package/schemas/logo.ts +0 -28
- package/schemas/pagefind.ts +0 -128
- package/schemas/prevNextLink.ts +0 -18
- package/schemas/sidebar.ts +0 -163
- package/schemas/site-title.ts +0 -20
- package/schemas/social.ts +0 -23
- package/schemas/tableOfContents.ts +0 -21
- package/translations/README.md +0 -14
- package/translations/ar.json +0 -33
- package/translations/ca.json +0 -43
- package/translations/cs.json +0 -43
- package/translations/da.json +0 -30
- package/translations/de.json +0 -30
- package/translations/el.json +0 -30
- package/translations/en.json +0 -30
- package/translations/es.json +0 -43
- package/translations/fa.json +0 -30
- package/translations/fi.json +0 -30
- package/translations/fr.json +0 -33
- package/translations/gl.json +0 -43
- package/translations/he.json +0 -30
- package/translations/hi.json +0 -33
- package/translations/hu.json +0 -43
- package/translations/id.json +0 -30
- package/translations/index.ts +0 -76
- package/translations/it.json +0 -33
- package/translations/ja.json +0 -33
- package/translations/ko.json +0 -33
- package/translations/lv.json +0 -30
- package/translations/nb.json +0 -30
- package/translations/nl.json +0 -30
- package/translations/pl.json +0 -33
- package/translations/pt.json +0 -33
- package/translations/ro.json +0 -30
- package/translations/ru.json +0 -33
- package/translations/sk.json +0 -30
- package/translations/sv.json +0 -30
- package/translations/th.json +0 -30
- package/translations/tr.json +0 -30
- package/translations/uk.json +0 -30
- package/translations/vi.json +0 -30
- package/translations/zh-CN.json +0 -33
- package/translations/zh-TW.json +0 -33
- package/types.ts +0 -7
- package/user-components/file-tree-icons.ts +0 -782
- package/user-components/rehype-file-tree.ts +0 -251
- package/user-components/rehype-steps.ts +0 -85
- package/user-components/rehype-tabs.ts +0 -121
- package/utils/base.ts +0 -15
- package/utils/canonical.ts +0 -19
- package/utils/collection-fs.ts +0 -20
- package/utils/createPathFormatter.ts +0 -60
- package/utils/createTranslationSystem.ts +0 -137
- package/utils/error-map.ts +0 -222
- package/utils/format-path.ts +0 -7
- package/utils/generateToC.ts +0 -33
- package/utils/git.ts +0 -121
- package/utils/gitInlined.ts +0 -20
- package/utils/head.ts +0 -235
- package/utils/i18n.ts +0 -221
- package/utils/localizedUrl.ts +0 -51
- package/utils/navigation.ts +0 -574
- package/utils/path.ts +0 -58
- package/utils/plugins.ts +0 -498
- package/utils/routing/data.ts +0 -154
- package/utils/routing/index.ts +0 -139
- package/utils/routing/middleware.ts +0 -81
- package/utils/routing/types.ts +0 -101
- package/utils/slugs.ts +0 -119
- package/utils/starlight-page.ts +0 -205
- package/utils/translations-fs.ts +0 -54
- package/utils/translations.ts +0 -57
- package/utils/types.ts +0 -15
- package/utils/user-config.ts +0 -348
- package/utils/validateLogoImports.ts +0 -21
- package/utils/zodDeepMerge.ts +0 -144
- package/virtual-internal.d.ts +0 -149
- package/virtual.d.ts +0 -27
- /package/{components → dist/components}/AnchorHeading.astro +0 -0
- /package/{components → dist/components}/Banner.astro +0 -0
- /package/{components → dist/components}/ContentNotice.astro +0 -0
- /package/{components → dist/components}/ContentPanel.astro +0 -0
- /package/{components → dist/components}/DraftContentNotice.astro +0 -0
- /package/{components → dist/components}/EditLink.astro +0 -0
- /package/{components → dist/components}/FallbackContentNotice.astro +0 -0
- /package/{components → dist/components}/Footer.astro +0 -0
- /package/{components → dist/components}/Head.astro +0 -0
- /package/{components → dist/components}/Header.astro +0 -0
- /package/{components → dist/components}/Hero.astro +0 -0
- /package/{components → dist/components}/LanguageSelect.astro +0 -0
- /package/{components → dist/components}/LastUpdated.astro +0 -0
- /package/{components → dist/components}/MarkdownContent.astro +0 -0
- /package/{components → dist/components}/MobileMenuFooter.astro +0 -0
- /package/{components → dist/components}/MobileTableOfContents.astro +0 -0
- /package/{components → dist/components}/Page.astro +0 -0
- /package/{components → dist/components}/PageSidebar.astro +0 -0
- /package/{components → dist/components}/PageTitle.astro +0 -0
- /package/{components → dist/components}/Pagination.astro +0 -0
- /package/{components → dist/components}/Search.astro +0 -0
- /package/{components → dist/components}/Select.astro +0 -0
- /package/{components → dist/components}/Sidebar.astro +0 -0
- /package/{components → dist/components}/SidebarPersister.astro +0 -0
- /package/{components → dist/components}/SidebarRestorePoint.astro +0 -0
- /package/{components → dist/components}/SidebarSublist.astro +0 -0
- /package/{components → dist/components}/SiteTitle.astro +0 -0
- /package/{components → dist/components}/SkipLink.astro +0 -0
- /package/{components → dist/components}/SocialIcons.astro +0 -0
- /package/{components → dist/components}/StarlightPage.astro +0 -0
- /package/{components → dist/components}/TableOfContents.astro +0 -0
- /package/{components → dist/components}/ThemeProvider.astro +0 -0
- /package/{components → dist/components}/ThemeSelect.astro +0 -0
- /package/{components → dist/components}/TwoColumnContent.astro +0 -0
- /package/{components-internals → dist/components-internals}/TableOfContents/TableOfContentsList.astro +0 -0
- /package/{components.ts → dist/components.ts} +0 -0
- /package/{routes → dist/routes}/common.astro +0 -0
- /package/{routes → dist/routes}/ssr/404.astro +0 -0
- /package/{routes → dist/routes}/ssr/index.astro +0 -0
- /package/{routes → dist/routes}/static/404.astro +0 -0
- /package/{routes → dist/routes}/static/index.astro +0 -0
- /package/{style → dist/style}/anchor-links.css +0 -0
- /package/{style → dist/style}/asides.css +0 -0
- /package/{style → dist/style}/layers.css +0 -0
- /package/{style → dist/style}/markdown.css +0 -0
- /package/{style → dist/style}/print.css +0 -0
- /package/{style → dist/style}/props.css +0 -0
- /package/{style → dist/style}/reset.css +0 -0
- /package/{style → dist/style}/util.css +0 -0
- /package/{user-components → dist/user-components}/Aside.astro +0 -0
- /package/{user-components → dist/user-components}/Badge.astro +0 -0
- /package/{user-components → dist/user-components}/Card.astro +0 -0
- /package/{user-components → dist/user-components}/CardGrid.astro +0 -0
- /package/{user-components → dist/user-components}/Icon.astro +0 -0
- /package/{user-components → dist/user-components}/LinkButton.astro +0 -0
- /package/{user-components → dist/user-components}/LinkCard.astro +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/integrations/expressive-code/themes/night-owl-light.jsonc?raw
|
|
2
|
+
var night_owl_light_default = "/**\n * Night Owl VS Code Theme - https://github.com/sdras/night-owl-vscode-theme\n *\n * MIT License\n *\n * Copyright (c) 2018 Sarah Drasner\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n{\n \"name\": \"Night Owl Light\",\n \"type\": \"light\",\n \"semanticHighlighting\": false,\n \"colors\": {\n \"foreground\": \"#403f53\",\n \"focusBorder\": \"#93A1A1\",\n \"errorForeground\": \"#403f53\",\n \"selection.background\": \"#7a8181ad\",\n \"descriptionForeground\": \"#403f53\",\n \"widget.shadow\": \"#d9d9d9\",\n \"titleBar.activeBackground\": \"#F0F0F0\",\n \"notifications.background\": \"#F0F0F0\",\n \"notifications.foreground\": \"#403f53\",\n \"notificationLink.foreground\": \"#994cc3\",\n \"notifications.border\": \"#CCCCCC\",\n \"notificationCenter.border\": \"#CCCCCC\",\n \"notificationToast.border\": \"#CCCCCC\",\n \"notificationCenterHeader.foreground\": \"#403f53\",\n \"notificationCenterHeader.background\": \"#F0F0F0\",\n \"button.background\": \"#2AA298\",\n \"button.foreground\": \"#F0F0F0\",\n \"dropdown.background\": \"#F0F0F0\",\n \"dropdown.foreground\": \"#403f53\",\n \"dropdown.border\": \"#d9d9d9\",\n \"input.background\": \"#F0F0F0\",\n \"input.foreground\": \"#403f53\",\n \"input.border\": \"#d9d9d9\",\n \"input.placeholderForeground\": \"#93A1A1\",\n \"inputOption.activeBorder\": \"#2AA298\",\n \"inputValidation.infoBorder\": \"#D0D0D0\",\n \"inputValidation.infoBackground\": \"#F0F0F0\",\n \"inputValidation.warningBackground\": \"#daaa01\",\n \"inputValidation.warningBorder\": \"#E0AF02\",\n \"inputValidation.errorBackground\": \"#f76e6e\",\n \"inputValidation.errorBorder\": \"#de3d3b\",\n \"badge.background\": \"#2AA298\",\n \"badge.foreground\": \"#F0F0F0\",\n \"progressBar.background\": \"#2AA298\",\n \"list.activeSelectionBackground\": \"#d3e8f8\",\n \"list.activeSelectionForeground\": \"#403f53\",\n \"list.inactiveSelectionBackground\": \"#E0E7EA\",\n \"list.inactiveSelectionForeground\": \"#403f53\",\n \"list.focusBackground\": \"#d3e8f8\",\n \"list.hoverBackground\": \"#d3e8f8\",\n \"list.focusForeground\": \"#403f53\",\n \"list.hoverForeground\": \"#403f53\",\n \"list.highlightForeground\": \"#403f53\",\n \"list.errorForeground\": \"#E64D49\",\n \"list.warningForeground\": \"#daaa01\",\n \"activityBar.background\": \"#F0F0F0\",\n \"activityBar.foreground\": \"#403f53\",\n \"activityBar.dropBackground\": \"#D0D0D0\",\n \"activityBarBadge.background\": \"#403f53\",\n \"activityBarBadge.foreground\": \"#F0F0F0\",\n \"activityBar.border\": \"#F0F0F0\",\n \"sideBar.background\": \"#F0F0F0\",\n \"sideBar.foreground\": \"#403f53\",\n \"sideBarTitle.foreground\": \"#403f53\",\n \"sideBar.border\": \"#F0F0F0\",\n \"scrollbar.shadow\": \"#CCCCCC\",\n \"tab.border\": \"#F0F0F0\",\n \"tab.activeBackground\": \"#F6F6F6\",\n \"tab.activeForeground\": \"#403f53\",\n \"tab.inactiveForeground\": \"#403f53\",\n \"tab.inactiveBackground\": \"#F0F0F0\",\n \"editorGroup.border\": \"#F0F0F0\",\n \"editorGroup.background\": \"#F6F6F6\",\n \"editorGroupHeader.tabsBackground\": \"#F0F0F0\",\n \"editorGroupHeader.tabsBorder\": \"#F0F0F0\",\n \"editorGroupHeader.noTabsBackground\": \"#F0F0F0\",\n \"tab.activeModifiedBorder\": \"#2AA298\",\n \"tab.inactiveModifiedBorder\": \"#93A1A1\",\n \"tab.unfocusedActiveModifiedBorder\": \"#93A1A1\",\n \"tab.unfocusedInactiveModifiedBorder\": \"#93A1A1\",\n \"editor.background\": \"#FBFBFB\",\n \"editor.foreground\": \"#403f53\",\n \"editorCursor.foreground\": \"#90A7B2\",\n \"editorLineNumber.foreground\": \"#90A7B2\",\n \"editorLineNumber.activeForeground\": \"#403f53\",\n \"editor.selectionBackground\": \"#E0E0E0\",\n \"editor.selectionHighlightBackground\": \"#339cec33\",\n \"editor.wordHighlightBackground\": \"#339cec33\",\n \"editor.wordHighlightStrongBackground\": \"#007dd659\",\n \"editor.findMatchBackground\": \"#93A1A16c\",\n \"editor.findMatchHighlightBackground\": \"#93a1a16c\",\n \"editor.findRangeHighlightBackground\": \"#7497a633\",\n \"editor.hoverHighlightBackground\": \"#339cec33\",\n \"editor.lineHighlightBackground\": \"#F0F0F0\",\n \"editor.rangeHighlightBackground\": \"#7497a633\",\n \"editorWhitespace.foreground\": \"#d9d9d9\",\n \"editorIndentGuide.background\": \"#d9d9d9\",\n \"editorCodeLens.foreground\": \"#403f53\",\n \"editorBracketMatch.background\": \"#d3e8f8\",\n \"editorBracketMatch.border\": \"#2AA298\",\n \"editorError.foreground\": \"#E64D49\",\n \"editorError.border\": \"#FBFBFB\",\n \"editorWarning.foreground\": \"#daaa01\",\n \"editorWarning.border\": \"#daaa01\",\n \"editorGutter.addedBackground\": \"#49d0c5\",\n \"editorGutter.modifiedBackground\": \"#6fbef6\",\n \"editorGutter.deletedBackground\": \"#f76e6e\",\n \"editorRuler.foreground\": \"#d9d9d9\",\n \"editorOverviewRuler.errorForeground\": \"#E64D49\",\n \"editorOverviewRuler.warningForeground\": \"#daaa01\",\n \"editorWidget.background\": \"#F0F0F0\",\n \"editorWidget.border\": \"#d9d9d9\",\n \"editorSuggestWidget.background\": \"#F0F0F0\",\n \"editorSuggestWidget.foreground\": \"#403f53\",\n \"editorSuggestWidget.highlightForeground\": \"#403f53\",\n \"editorSuggestWidget.selectedBackground\": \"#d3e8f8\",\n \"editorSuggestWidget.border\": \"#d9d9d9\",\n \"editorHoverWidget.background\": \"#F0F0F0\",\n \"editorHoverWidget.border\": \"#d9d9d9\",\n \"debugExceptionWidget.background\": \"#F0F0F0\",\n \"debugExceptionWidget.border\": \"#d9d9d9\",\n \"editorMarkerNavigation.background\": \"#D0D0D0\",\n \"editorMarkerNavigationError.background\": \"#f76e6e\",\n \"editorMarkerNavigationWarning.background\": \"#daaa01\",\n \"debugToolBar.background\": \"#F0F0F0\",\n \"pickerGroup.border\": \"#d9d9d9\",\n \"pickerGroup.foreground\": \"#403f53\",\n \"extensionButton.prominentBackground\": \"#2AA298\",\n \"extensionButton.prominentForeground\": \"#F0F0F0\",\n \"statusBar.background\": \"#F0F0F0\",\n \"statusBar.border\": \"#F0F0F0\",\n \"statusBar.debuggingBackground\": \"#F0F0F0\",\n \"statusBar.debuggingForeground\": \"#403f53\",\n \"statusBar.foreground\": \"#403f53\",\n \"statusBar.noFolderBackground\": \"#F0F0F0\",\n \"statusBar.noFolderForeground\": \"#403f53\",\n \"panel.background\": \"#F0F0F0\",\n \"panel.border\": \"#d9d9d9\",\n \"peekView.border\": \"#d9d9d9\",\n \"peekViewEditor.background\": \"#F6F6F6\",\n \"peekViewEditorGutter.background\": \"#F6F6F6\",\n \"peekViewEditor.matchHighlightBackground\": \"#49d0c5\",\n \"peekViewResult.background\": \"#F0F0F0\",\n \"peekViewResult.fileForeground\": \"#403f53\",\n \"peekViewResult.lineForeground\": \"#403f53\",\n \"peekViewResult.matchHighlightBackground\": \"#49d0c5\",\n \"peekViewResult.selectionBackground\": \"#E0E7EA\",\n \"peekViewResult.selectionForeground\": \"#403f53\",\n \"peekViewTitle.background\": \"#F0F0F0\",\n \"peekViewTitleLabel.foreground\": \"#403f53\",\n \"peekViewTitleDescription.foreground\": \"#403f53\",\n \"terminal.ansiBrightBlack\": \"#403f53\",\n \"terminal.ansiBlack\": \"#403f53\",\n \"terminal.ansiBrightBlue\": \"#288ed7\",\n \"terminal.ansiBlue\": \"#288ed7\",\n \"terminal.ansiBrightCyan\": \"#2AA298\",\n \"terminal.ansiCyan\": \"#2AA298\",\n \"terminal.ansiBrightGreen\": \"#08916a\",\n \"terminal.ansiGreen\": \"#08916a\",\n \"terminal.ansiBrightMagenta\": \"#d6438a\",\n \"terminal.ansiMagenta\": \"#d6438a\",\n \"terminal.ansiBrightRed\": \"#de3d3b\",\n \"terminal.ansiRed\": \"#de3d3b\",\n \"terminal.ansiBrightWhite\": \"#F0F0F0\",\n \"terminal.ansiWhite\": \"#F0F0F0\",\n \"terminal.ansiBrightYellow\": \"#daaa01\",\n \"terminal.ansiYellow\": \"#E0AF02\",\n \"terminal.background\": \"#F6F6F6\",\n \"terminal.foreground\": \"#403f53\",\n },\n \"tokenColors\": [\n {\n \"name\": \"Changed\",\n \"scope\": [\n \"markup.changed\",\n \"meta.diff.header.git\",\n \"meta.diff.header.from-file\",\n \"meta.diff.header.to-file\",\n ],\n \"settings\": {\n \"foreground\": \"#a2bffc\",\n },\n },\n {\n \"name\": \"Deleted\",\n \"scope\": \"markup.deleted.diff\",\n \"settings\": {\n \"foreground\": \"#EF535090\",\n },\n },\n {\n \"name\": \"Inserted\",\n \"scope\": \"markup.inserted.diff\",\n \"settings\": {\n \"foreground\": \"#4876d6ff\",\n },\n },\n {\n \"name\": \"Global settings\",\n \"settings\": {\n \"background\": \"#011627\",\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"Comment\",\n \"scope\": \"comment\",\n \"settings\": {\n \"foreground\": \"#989fb1\",\n },\n },\n {\n \"name\": \"String\",\n \"scope\": \"string\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"String Quoted\",\n \"scope\": [\"string.quoted\", \"variable.other.readwrite.js\"],\n \"settings\": {\n \"foreground\": \"#c96765\",\n },\n },\n {\n \"name\": \"Support Constant Math\",\n \"scope\": \"support.constant.math\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Number\",\n \"scope\": [\"constant.numeric\", \"constant.character.numeric\"],\n \"settings\": {\n \"foreground\": \"#aa0982\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Built-in constant\",\n \"scope\": [\"constant.language\", \"punctuation.definition.constant\", \"variable.other.constant\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"User-defined constant\",\n \"scope\": [\"constant.character\", \"constant.other\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Constant Character Escape\",\n \"scope\": \"constant.character.escape\",\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"RegExp String\",\n \"scope\": [\"string.regexp\", \"string.regexp keyword.other\"],\n \"settings\": {\n \"foreground\": \"#5ca7e4\",\n },\n },\n {\n \"name\": \"Comma in functions\",\n \"scope\": \"meta.function punctuation.separator.comma\",\n \"settings\": {\n \"foreground\": \"#5f7e97\",\n },\n },\n {\n \"name\": \"Variable\",\n \"scope\": \"variable\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Keyword\",\n \"scope\": [\"punctuation.accessor\", \"keyword\"],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Storage\",\n \"scope\": [\n \"storage\",\n \"meta.var.expr\",\n \"meta.class meta.method.declaration meta.var.expr storage.type.js\",\n \"storage.type.property.js\",\n \"storage.type.property.ts\",\n \"storage.type.property.tsx\",\n ],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Storage type\",\n \"scope\": \"storage.type\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Storage type\",\n \"scope\": \"storage.type.function.arrow.js\",\n \"settings\": {\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Class name\",\n \"scope\": [\"entity.name.class\", \"meta.class entity.name.type.class\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Inherited class\",\n \"scope\": \"entity.other.inherited-class\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Function name\",\n \"scope\": \"entity.name.function\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Meta Tag\",\n \"scope\": [\"punctuation.definition.tag\", \"meta.tag\"],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"HTML Tag names\",\n \"scope\": [\n \"entity.name.tag\",\n \"meta.tag.other.html\",\n \"meta.tag.other.js\",\n \"meta.tag.other.tsx\",\n \"entity.name.tag.tsx\",\n \"entity.name.tag.js\",\n \"entity.name.tag\",\n \"meta.tag.js\",\n \"meta.tag.tsx\",\n \"meta.tag.html\",\n ],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Tag attribute\",\n \"scope\": \"entity.other.attribute-name\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Entity Name Tag Custom\",\n \"scope\": \"entity.name.tag.custom\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Library (function & constant)\",\n \"scope\": [\"support.function\", \"support.constant\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Support Constant Property Value meta\",\n \"scope\": \"support.constant.meta.property-value\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Library class/type\",\n \"scope\": [\"support.type\", \"support.class\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Support Variable DOM\",\n \"scope\": \"support.variable.dom\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Invalid\",\n \"scope\": \"invalid\",\n \"settings\": {\n \"foreground\": \"#ff2c83\",\n },\n },\n {\n \"name\": \"Invalid deprecated\",\n \"scope\": \"invalid.deprecated\",\n \"settings\": {\n \"foreground\": \"#d3423e\",\n },\n },\n {\n \"name\": \"Keyword Operator\",\n \"scope\": \"keyword.operator\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Keyword Operator Relational\",\n \"scope\": \"keyword.operator.relational\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Keyword Operator Assignment\",\n \"scope\": \"keyword.operator.assignment\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Keyword Operator Arithmetic\",\n \"scope\": \"keyword.operator.arithmetic\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Keyword Operator Bitwise\",\n \"scope\": \"keyword.operator.bitwise\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Keyword Operator Increment\",\n \"scope\": \"keyword.operator.increment\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Keyword Operator Ternary\",\n \"scope\": \"keyword.operator.ternary\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Double-Slashed Comment\",\n \"scope\": \"comment.line.double-slash\",\n \"settings\": {\n \"foreground\": \"#939dbb\",\n },\n },\n {\n \"name\": \"Object\",\n \"scope\": \"object\",\n \"settings\": {\n \"foreground\": \"#cdebf7\",\n },\n },\n {\n \"name\": \"Null\",\n \"scope\": \"constant.language.null\",\n \"settings\": {\n \"foreground\": \"#bc5454\",\n },\n },\n {\n \"name\": \"Meta Brace\",\n \"scope\": \"meta.brace\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"Meta Delimiter Period\",\n \"scope\": \"meta.delimiter.period\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Punctuation Definition String\",\n \"scope\": \"punctuation.definition.string\",\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Punctuation Definition String Markdown\",\n \"scope\": \"punctuation.definition.string.begin.markdown\",\n \"settings\": {\n \"foreground\": \"#bc5454\",\n },\n },\n {\n \"name\": \"Boolean\",\n \"scope\": \"constant.language.boolean\",\n \"settings\": {\n \"foreground\": \"#bc5454\",\n },\n },\n {\n \"name\": \"Object Comma\",\n \"scope\": \"object.comma\",\n \"settings\": {\n \"foreground\": \"#ffffff\",\n },\n },\n {\n \"name\": \"Variable Parameter Function\",\n \"scope\": \"variable.parameter.function\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Support Type Property Name & entity name tags\",\n \"scope\": [\n \"support.type.vendor.property-name\",\n \"support.constant.vendor.property-value\",\n \"support.type.property-name\",\n \"meta.property-list entity.name.tag\",\n ],\n \"settings\": {\n \"foreground\": \"#0c969b\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Entity Name tag reference in stylesheets\",\n \"scope\": \"meta.property-list entity.name.tag.reference\",\n \"settings\": {\n \"foreground\": \"#57eaf1\",\n },\n },\n {\n \"name\": \"Constant Other Color RGB Value Punctuation Definition Constant\",\n \"scope\": \"constant.other.color.rgb-value punctuation.definition.constant\",\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Constant Other Color\",\n \"scope\": \"constant.other.color\",\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Keyword Other Unit\",\n \"scope\": \"keyword.other.unit\",\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Meta Selector\",\n \"scope\": \"meta.selector\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Entity Other Attribute Name Id\",\n \"scope\": \"entity.other.attribute-name.id\",\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Meta Property Name\",\n \"scope\": \"meta.property-name\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Doctypes\",\n \"scope\": [\"entity.name.tag.doctype\", \"meta.tag.sgml.doctype\"],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Punctuation Definition Parameters\",\n \"scope\": \"punctuation.definition.parameters\",\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Keyword Control Operator\",\n \"scope\": \"keyword.control.operator\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Keyword Operator Logical\",\n \"scope\": \"keyword.operator.logical\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Variable Instances\",\n \"scope\": [\n \"variable.instance\",\n \"variable.other.instance\",\n \"variable.readwrite.instance\",\n \"variable.other.readwrite.instance\",\n \"variable.other.property\",\n ],\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Variable Property Other object property\",\n \"scope\": [\"variable.other.object.property\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Variable Property Other object\",\n \"scope\": [\"variable.other.object.js\"],\n \"settings\": {\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Entity Name Function\",\n \"scope\": [\"entity.name.function\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Keyword Operator Comparison, imports, returns and Keyword Operator Ruby\",\n \"scope\": [\n \"keyword.operator.comparison\",\n \"keyword.control.flow.js\",\n \"keyword.control.flow.ts\",\n \"keyword.control.flow.tsx\",\n \"keyword.control.ruby\",\n \"keyword.control.module.ruby\",\n \"keyword.control.class.ruby\",\n \"keyword.control.def.ruby\",\n \"keyword.control.loop.js\",\n \"keyword.control.loop.ts\",\n \"keyword.control.import.js\",\n \"keyword.control.import.ts\",\n \"keyword.control.import.tsx\",\n \"keyword.control.from.js\",\n \"keyword.control.from.ts\",\n \"keyword.control.from.tsx\",\n \"keyword.operator.instanceof.js\",\n \"keyword.operator.expression.instanceof.ts\",\n \"keyword.operator.expression.instanceof.tsx\",\n ],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Keyword Control Conditional\",\n \"scope\": [\n \"keyword.control.conditional.js\",\n \"keyword.control.conditional.ts\",\n \"keyword.control.switch.js\",\n \"keyword.control.switch.ts\",\n ],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Support Constant, `new` keyword, Special Method Keyword, `debugger`, other keywords\",\n \"scope\": [\n \"support.constant\",\n \"keyword.other.special-method\",\n \"keyword.other.new\",\n \"keyword.other.debugger\",\n \"keyword.control\",\n ],\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Support Function\",\n \"scope\": \"support.function\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Invalid Broken\",\n \"scope\": \"invalid.broken\",\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Invalid Unimplemented\",\n \"scope\": \"invalid.unimplemented\",\n \"settings\": {\n \"foreground\": \"#8BD649\",\n },\n },\n {\n \"name\": \"Invalid Illegal\",\n \"scope\": \"invalid.illegal\",\n \"settings\": {\n \"foreground\": \"#c96765\",\n },\n },\n {\n \"name\": \"Language Variable\",\n \"scope\": \"variable.language\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Support Variable Property\",\n \"scope\": \"support.variable.property\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Variable Function\",\n \"scope\": \"variable.function\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Variable Interpolation\",\n \"scope\": \"variable.interpolation\",\n \"settings\": {\n \"foreground\": \"#ec5f67\",\n },\n },\n {\n \"name\": \"Meta Function Call\",\n \"scope\": \"meta.function-call\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Punctuation Section Embedded\",\n \"scope\": \"punctuation.section.embedded\",\n \"settings\": {\n \"foreground\": \"#d3423e\",\n },\n },\n {\n \"name\": \"Punctuation Tweaks\",\n \"scope\": [\n \"punctuation.terminator.expression\",\n \"punctuation.definition.arguments\",\n \"punctuation.definition.array\",\n \"punctuation.section.array\",\n \"meta.array\",\n ],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"More Punctuation Tweaks\",\n \"scope\": [\n \"punctuation.definition.list.begin\",\n \"punctuation.definition.list.end\",\n \"punctuation.separator.arguments\",\n \"punctuation.definition.list\",\n ],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Template Strings\",\n \"scope\": \"string.template meta.template.expression\",\n \"settings\": {\n \"foreground\": \"#d3423e\",\n },\n },\n {\n \"name\": \"Backticks(``) in Template Strings\",\n \"scope\": \"string.template punctuation.definition.string\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"Italics\",\n \"scope\": \"italic\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n \"fontStyle\": \"italic\",\n },\n },\n {\n \"name\": \"Bold\",\n \"scope\": \"bold\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n \"fontStyle\": \"bold\",\n },\n },\n {\n \"name\": \"Quote\",\n \"scope\": \"quote\",\n \"settings\": {\n \"foreground\": \"#697098\",\n },\n },\n {\n \"name\": \"Raw Code\",\n \"scope\": \"raw\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"CoffeeScript Variable Assignment\",\n \"scope\": \"variable.assignment.coffee\",\n \"settings\": {\n \"foreground\": \"#31e1eb\",\n },\n },\n {\n \"name\": \"CoffeeScript Parameter Function\",\n \"scope\": \"variable.parameter.function.coffee\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"CoffeeScript Assignments\",\n \"scope\": \"variable.assignment.coffee\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"C# Readwrite Variables\",\n \"scope\": \"variable.other.readwrite.cs\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"C# Classes & Storage types\",\n \"scope\": [\"entity.name.type.class.cs\", \"storage.type.cs\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"C# Namespaces\",\n \"scope\": \"entity.name.type.namespace.cs\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Tag names in Stylesheets\",\n \"scope\": [\n \"entity.name.tag.css\",\n \"entity.name.tag.less\",\n \"entity.name.tag.custom.css\",\n \"support.constant.property-value.css\",\n ],\n \"settings\": {\n \"foreground\": \"#c96765\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Wildcard(*) selector in Stylesheets\",\n \"scope\": [\n \"entity.name.tag.wildcard.css\",\n \"entity.name.tag.wildcard.less\",\n \"entity.name.tag.wildcard.scss\",\n \"entity.name.tag.wildcard.sass\",\n ],\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"CSS Keyword Other Unit\",\n \"scope\": \"keyword.other.unit.css\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Attribute Name for CSS\",\n \"scope\": [\n \"meta.attribute-selector.css entity.other.attribute-name.attribute\",\n \"variable.other.readwrite.js\",\n ],\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Elixir Classes\",\n \"scope\": [\n \"source.elixir support.type.elixir\",\n \"source.elixir meta.module.elixir entity.name.class.elixir\",\n ],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Elixir Functions\",\n \"scope\": \"source.elixir entity.name.function\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Elixir Constants\",\n \"scope\": [\n \"source.elixir constant.other.symbol.elixir\",\n \"source.elixir constant.other.keywords.elixir\",\n ],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Elixir String Punctuations\",\n \"scope\": \"source.elixir punctuation.definition.string\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Elixir\",\n \"scope\": [\n \"source.elixir variable.other.readwrite.module.elixir\",\n \"source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir\",\n ],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Elixir Binary Punctuations\",\n \"scope\": \"source.elixir .punctuation.binary.elixir\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Closure Constant Keyword\",\n \"scope\": \"constant.keyword.clojure\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Go Function Calls\",\n \"scope\": \"source.go meta.function-call.go\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Go Keywords\",\n \"scope\": [\n \"source.go keyword.package.go\",\n \"source.go keyword.import.go\",\n \"source.go keyword.function.go\",\n \"source.go keyword.type.go\",\n \"source.go keyword.struct.go\",\n \"source.go keyword.interface.go\",\n \"source.go keyword.const.go\",\n \"source.go keyword.var.go\",\n \"source.go keyword.map.go\",\n \"source.go keyword.channel.go\",\n \"source.go keyword.control.go\",\n ],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"Go Constants e.g. nil, string format (%s, %d, etc.)\",\n \"scope\": [\"source.go constant.language.go\", \"source.go constant.other.placeholder.go\"],\n \"settings\": {\n \"foreground\": \"#bc5454\",\n },\n },\n {\n \"name\": \"C++ Functions\",\n \"scope\": [\"entity.name.function.preprocessor.cpp\", \"entity.scope.name.cpp\"],\n \"settings\": {\n \"foreground\": \"#0c969bff\",\n },\n },\n {\n \"name\": \"C++ Meta Namespace\",\n \"scope\": [\"meta.namespace-block.cpp\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"C++ Language Primitive Storage\",\n \"scope\": [\"storage.type.language.primitive.cpp\"],\n \"settings\": {\n \"foreground\": \"#bc5454\",\n },\n },\n {\n \"name\": \"C++ Preprocessor Macro\",\n \"scope\": [\"meta.preprocessor.macro.cpp\"],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"C++ Variable Parameter\",\n \"scope\": [\"variable.parameter\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Powershell Variables\",\n \"scope\": [\"variable.other.readwrite.powershell\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Powershell Function\",\n \"scope\": [\"support.function.powershell\"],\n \"settings\": {\n \"foreground\": \"#0c969bff\",\n },\n },\n {\n \"name\": \"ID Attribute Name in HTML\",\n \"scope\": \"entity.other.attribute-name.id.html\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"HTML Punctuation Definition Tag\",\n \"scope\": \"punctuation.definition.tag.html\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"HTML Doctype\",\n \"scope\": \"meta.tag.sgml.doctype.html\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"JavaScript Classes\",\n \"scope\": \"meta.class entity.name.type.class.js\",\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"JavaScript Method Declaration e.g. `constructor`\",\n \"scope\": \"meta.method.declaration storage.type.js\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"JavaScript Terminator\",\n \"scope\": \"terminator.js\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"JavaScript Meta Punctuation Definition\",\n \"scope\": \"meta.js punctuation.definition.js\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"Entity Names in Code Documentations\",\n \"scope\": [\"entity.name.type.instance.jsdoc\", \"entity.name.type.instance.phpdoc\"],\n \"settings\": {\n \"foreground\": \"#5f7e97\",\n },\n },\n {\n \"name\": \"Other Variables in Code Documentations\",\n \"scope\": [\"variable.other.jsdoc\", \"variable.other.phpdoc\"],\n \"settings\": {\n \"foreground\": \"#78ccf0\",\n },\n },\n {\n \"name\": \"JavaScript module imports and exports\",\n \"scope\": [\n \"variable.other.meta.import.js\",\n \"meta.import.js variable.other\",\n \"variable.other.meta.export.js\",\n \"meta.export.js variable.other\",\n ],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"JavaScript Variable Parameter Function\",\n \"scope\": \"variable.parameter.function.js\",\n \"settings\": {\n \"foreground\": \"#7986E7\",\n },\n },\n {\n \"name\": \"JavaScript[React] Variable Other Object\",\n \"scope\": [\n \"variable.other.object.js\",\n \"variable.other.object.jsx\",\n \"variable.object.property.js\",\n \"variable.object.property.jsx\",\n ],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"JavaScript Variables\",\n \"scope\": [\"variable.js\", \"variable.other.js\"],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"JavaScript Entity Name Type\",\n \"scope\": [\"entity.name.type.js\", \"entity.name.type.module.js\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"JavaScript Support Classes\",\n \"scope\": \"support.class.js\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"JSON Property Names\",\n \"scope\": \"support.type.property-name.json\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"JSON Support Constants\",\n \"scope\": \"support.constant.json\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"JSON Property values (string)\",\n \"scope\": \"meta.structure.dictionary.value.json string.quoted.double\",\n \"settings\": {\n \"foreground\": \"#c789d6\",\n },\n },\n {\n \"name\": \"Strings in JSON values\",\n \"scope\": \"string.quoted.double.json punctuation.definition.string.json\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Specific JSON Property values like null\",\n \"scope\": \"meta.structure.dictionary.json meta.structure.dictionary.value constant.language\",\n \"settings\": {\n \"foreground\": \"#bc5454\",\n },\n },\n {\n \"name\": \"JavaScript Other Variable\",\n \"scope\": \"variable.other.object.js\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Ruby Variables\",\n \"scope\": [\"variable.other.ruby\"],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"Ruby Class\",\n \"scope\": [\"entity.name.type.class.ruby\"],\n \"settings\": {\n \"foreground\": \"#c96765\",\n },\n },\n {\n \"name\": \"Ruby Hashkeys\",\n \"scope\": \"constant.language.symbol.hashkey.ruby\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Ruby Symbols\",\n \"scope\": \"constant.language.symbol.ruby\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"LESS Tag names\",\n \"scope\": \"entity.name.tag.less\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"LESS Keyword Other Unit\",\n \"scope\": \"keyword.other.unit.css\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Attribute Name for LESS\",\n \"scope\": \"meta.attribute-selector.less entity.other.attribute-name.attribute\",\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Markdown Headings\",\n \"scope\": [\n \"markup.heading.markdown\",\n \"markup.heading.setext.1.markdown\",\n \"markup.heading.setext.2.markdown\",\n ],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Markdown Italics\",\n \"scope\": \"markup.italic.markdown\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n \"fontStyle\": \"italic\",\n },\n },\n {\n \"name\": \"Markdown Bold\",\n \"scope\": \"markup.bold.markdown\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n \"fontStyle\": \"bold\",\n },\n },\n {\n \"name\": \"Markdown Quote + others\",\n \"scope\": \"markup.quote.markdown\",\n \"settings\": {\n \"foreground\": \"#697098\",\n },\n },\n {\n \"name\": \"Markdown Raw Code + others\",\n \"scope\": \"markup.inline.raw.markdown\",\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Markdown Links\",\n \"scope\": [\"markup.underline.link.markdown\", \"markup.underline.link.image.markdown\"],\n \"settings\": {\n \"foreground\": \"#ff869a\",\n },\n },\n {\n \"name\": \"Markdown Link Title and Description\",\n \"scope\": [\"string.other.link.title.markdown\", \"string.other.link.description.markdown\"],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"Markdown Punctuation\",\n \"scope\": [\n \"punctuation.definition.string.markdown\",\n \"punctuation.definition.string.begin.markdown\",\n \"punctuation.definition.string.end.markdown\",\n \"meta.link.inline.markdown punctuation.definition.string\",\n ],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Markdown MetaData Punctuation\",\n \"scope\": [\"punctuation.definition.metadata.markdown\"],\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Markdown List Punctuation\",\n \"scope\": [\"beginning.punctuation.definition.list.markdown\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Markdown Inline Raw String\",\n \"scope\": \"markup.inline.raw.string.markdown\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"PHP Variables\",\n \"scope\": [\"variable.other.php\", \"variable.other.property.php\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Support Classes in PHP\",\n \"scope\": \"support.class.php\",\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Punctuations in PHP function calls\",\n \"scope\": \"meta.function-call.php punctuation\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"PHP Global Variables\",\n \"scope\": \"variable.other.global.php\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Declaration Punctuation in PHP Global Variables\",\n \"scope\": \"variable.other.global.php punctuation.definition.variable\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Language Constants in Python\",\n \"scope\": \"constant.language.python\",\n \"settings\": {\n \"foreground\": \"#bc5454\",\n },\n },\n {\n \"name\": \"Python Function Parameter and Arguments\",\n \"scope\": [\"variable.parameter.function.python\", \"meta.function-call.arguments.python\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Python Function Call\",\n \"scope\": [\"meta.function-call.python\", \"meta.function-call.generic.python\"],\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"Punctuations in Python\",\n \"scope\": \"punctuation.python\",\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"Decorator Functions in Python\",\n \"scope\": \"entity.name.function.decorator.python\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Python Language Variable\",\n \"scope\": \"source.python variable.language.special\",\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Python import control keyword\",\n \"scope\": \"keyword.control\",\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"SCSS Variable\",\n \"scope\": [\n \"variable.scss\",\n \"variable.sass\",\n \"variable.parameter.url.scss\",\n \"variable.parameter.url.sass\",\n ],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Variables in SASS At-Rules\",\n \"scope\": [\"source.css.scss meta.at-rule variable\", \"source.css.sass meta.at-rule variable\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"Variables in SASS At-Rules\",\n \"scope\": [\"source.css.scss meta.at-rule variable\", \"source.css.sass meta.at-rule variable\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"Attribute Name for SASS\",\n \"scope\": [\n \"meta.attribute-selector.scss entity.other.attribute-name.attribute\",\n \"meta.attribute-selector.sass entity.other.attribute-name.attribute\",\n ],\n \"settings\": {\n \"foreground\": \"#aa0982\",\n },\n },\n {\n \"name\": \"Tag names in SASS\",\n \"scope\": [\"entity.name.tag.scss\", \"entity.name.tag.sass\"],\n \"settings\": {\n \"foreground\": \"#0c969b\",\n },\n },\n {\n \"name\": \"SASS Keyword Other Unit\",\n \"scope\": [\"keyword.other.unit.scss\", \"keyword.other.unit.sass\"],\n \"settings\": {\n \"foreground\": \"#994cc3\",\n },\n },\n {\n \"name\": \"TypeScript[React] Variables and Object Properties\",\n \"scope\": [\n \"variable.other.readwrite.alias.ts\",\n \"variable.other.readwrite.alias.tsx\",\n \"variable.other.readwrite.ts\",\n \"variable.other.readwrite.tsx\",\n \"variable.other.object.ts\",\n \"variable.other.object.tsx\",\n \"variable.object.property.ts\",\n \"variable.object.property.tsx\",\n \"variable.other.ts\",\n \"variable.other.tsx\",\n \"variable.tsx\",\n \"variable.ts\",\n ],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"TypeScript[React] Entity Name Types\",\n \"scope\": [\"entity.name.type.ts\", \"entity.name.type.tsx\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"TypeScript[React] Node Classes\",\n \"scope\": [\"support.class.node.ts\", \"support.class.node.tsx\"],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"TypeScript[React] Entity Name Types as Parameters\",\n \"scope\": [\n \"meta.type.parameters.ts entity.name.type\",\n \"meta.type.parameters.tsx entity.name.type\",\n ],\n \"settings\": {\n \"foreground\": \"#5f7e97\",\n },\n },\n {\n \"name\": \"TypeScript[React] Import/Export Punctuations\",\n \"scope\": [\n \"meta.import.ts punctuation.definition.block\",\n \"meta.import.tsx punctuation.definition.block\",\n \"meta.export.ts punctuation.definition.block\",\n \"meta.export.tsx punctuation.definition.block\",\n ],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"TypeScript[React] Punctuation Decorators\",\n \"scope\": [\n \"meta.decorator punctuation.decorator.ts\",\n \"meta.decorator punctuation.decorator.tsx\",\n ],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"TypeScript[React] Punctuation Decorators\",\n \"scope\": \"meta.tag.js meta.jsx.children.tsx\",\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"YAML Entity Name Tags\",\n \"scope\": \"entity.name.tag.yaml\",\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"JavaScript Variable Other ReadWrite\",\n \"scope\": [\"variable.other.readwrite.js\", \"variable.parameter\"],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"Support Class Component\",\n \"scope\": [\"support.class.component.js\", \"support.class.component.tsx\"],\n \"settings\": {\n \"foreground\": \"#aa0982\",\n \"fontStyle\": \"\",\n },\n },\n {\n \"name\": \"Text nested in React tags\",\n \"scope\": [\"meta.jsx.children\", \"meta.jsx.children.js\", \"meta.jsx.children.tsx\"],\n \"settings\": {\n \"foreground\": \"#403f53\",\n },\n },\n {\n \"name\": \"TypeScript Classes\",\n \"scope\": \"meta.class entity.name.type.class.tsx\",\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"TypeScript Entity Name Type\",\n \"scope\": [\"entity.name.type.tsx\", \"entity.name.type.module.tsx\"],\n \"settings\": {\n \"foreground\": \"#111111\",\n },\n },\n {\n \"name\": \"TypeScript Class Variable Keyword\",\n \"scope\": [\n \"meta.class.ts meta.var.expr.ts storage.type.ts\",\n \"meta.class.tsx meta.var.expr.tsx storage.type.tsx\",\n ],\n \"settings\": {\n \"foreground\": \"#C792EA\",\n },\n },\n {\n \"name\": \"TypeScript Method Declaration e.g. `constructor`\",\n \"scope\": [\n \"meta.method.declaration storage.type.ts\",\n \"meta.method.declaration storage.type.tsx\",\n ],\n \"settings\": {\n \"foreground\": \"#4876d6\",\n },\n },\n {\n \"name\": \"normalize font style of certain components\",\n \"scope\": [\n \"meta.property-list.css meta.property-value.css variable.other.less\",\n \"meta.property-list.scss variable.scss\",\n \"meta.property-list.sass variable.sass\",\n \"meta.brace\",\n \"keyword.operator.operator\",\n \"keyword.operator.or.regexp\",\n \"keyword.operator.expression.in\",\n \"keyword.operator.relational\",\n \"keyword.operator.assignment\",\n \"keyword.operator.comparison\",\n \"keyword.operator.type\",\n \"keyword.operator\",\n \"keyword\",\n \"punctuation.definition.string\",\n \"punctuation\",\n \"variable.other.readwrite.js\",\n \"storage.type\",\n \"source.css\",\n \"string.quoted\",\n ],\n \"settings\": {\n \"fontStyle\": \"\",\n },\n },\n ],\n}\n";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { night_owl_light_default as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ExpressiveCodeTheme, ThemeObjectOrShikiThemeName } from "astro-expressive-code";
|
|
2
|
+
//#region src/integrations/expressive-code/theming.d.ts
|
|
3
|
+
type BundledThemeName = 'starlight-dark' | 'starlight-light';
|
|
4
|
+
type ThemeObjectOrBundledThemeName = ThemeObjectOrShikiThemeName | BundledThemeName;
|
|
5
|
+
/**
|
|
6
|
+
* Converts the Starlight `themes` config option into a format understood by Expressive Code,
|
|
7
|
+
* loading any bundled themes and using the Starlight defaults if no themes were provided.
|
|
8
|
+
*/
|
|
9
|
+
declare function preprocessThemes(themes: ThemeObjectOrBundledThemeName[] | undefined): ThemeObjectOrShikiThemeName[];
|
|
10
|
+
/**
|
|
11
|
+
* Modifies the given theme by applying Starlight's CSS variables to the colors of UI elements
|
|
12
|
+
* (backgrounds, buttons, shadows etc.). This ensures that code blocks match the site's theme.
|
|
13
|
+
*/
|
|
14
|
+
declare function applyStarlightUiThemeColors(theme: ExpressiveCodeTheme): ExpressiveCodeTheme;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BundledThemeName, ThemeObjectOrBundledThemeName, applyStarlightUiThemeColors, preprocessThemes };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import night_owl_dark_default from "./themes/night-owl-dark.js";
|
|
2
|
+
import night_owl_light_default from "./themes/night-owl-light.js";
|
|
3
|
+
import { ExpressiveCodeTheme } from "astro-expressive-code";
|
|
4
|
+
//#region src/integrations/expressive-code/theming.ts
|
|
5
|
+
/**
|
|
6
|
+
* Converts the Starlight `themes` config option into a format understood by Expressive Code,
|
|
7
|
+
* loading any bundled themes and using the Starlight defaults if no themes were provided.
|
|
8
|
+
*/
|
|
9
|
+
function preprocessThemes(themes) {
|
|
10
|
+
themes = themes && !Array.isArray(themes) ? [themes] : themes;
|
|
11
|
+
if (!themes || !themes.length) themes = ["starlight-dark", "starlight-light"];
|
|
12
|
+
return themes.map((theme) => {
|
|
13
|
+
if (theme === "starlight-dark" || theme === "starlight-light") {
|
|
14
|
+
const bundledTheme = theme === "starlight-dark" ? night_owl_dark_default : night_owl_light_default;
|
|
15
|
+
return customizeBundledTheme(ExpressiveCodeTheme.fromJSONString(bundledTheme));
|
|
16
|
+
}
|
|
17
|
+
return theme;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Customizes some settings of the bundled theme to make it fit better with Starlight.
|
|
22
|
+
*/
|
|
23
|
+
function customizeBundledTheme(theme) {
|
|
24
|
+
theme.colors["titleBar.border"] = theme.colors["tab.activeBackground"];
|
|
25
|
+
theme.colors["editorGroupHeader.tabsBorder"] = theme.colors["tab.activeBackground"];
|
|
26
|
+
theme.settings.forEach((s) => {
|
|
27
|
+
if (s.name?.includes("Link")) s.settings.fontStyle = "underline";
|
|
28
|
+
});
|
|
29
|
+
return theme;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Modifies the given theme by applying Starlight's CSS variables to the colors of UI elements
|
|
33
|
+
* (backgrounds, buttons, shadows etc.). This ensures that code blocks match the site's theme.
|
|
34
|
+
*/
|
|
35
|
+
function applyStarlightUiThemeColors(theme) {
|
|
36
|
+
const isDark = theme.type === "dark";
|
|
37
|
+
const neutralMinimal = isDark ? "#ffffff17" : "#0000001a";
|
|
38
|
+
const neutralDimmed = isDark ? "#ffffff40" : "#00000055";
|
|
39
|
+
const borderColor = "color-mix(in srgb, var(--sl-color-gray-5), transparent 25%)";
|
|
40
|
+
theme.colors["titleBar.border"] = borderColor;
|
|
41
|
+
theme.colors["editorGroupHeader.tabsBorder"] = borderColor;
|
|
42
|
+
const backgroundColor = isDark ? "var(--sl-color-black)" : "var(--sl-color-gray-6)";
|
|
43
|
+
theme.colors["titleBar.activeBackground"] = backgroundColor;
|
|
44
|
+
theme.colors["editorGroupHeader.tabsBackground"] = backgroundColor;
|
|
45
|
+
theme.colors["titleBar.activeForeground"] = "var(--sl-color-text)";
|
|
46
|
+
theme.colors["tab.activeForeground"] = "var(--sl-color-text)";
|
|
47
|
+
const activeBorderColor = isDark ? "var(--sl-color-accent-high)" : "var(--sl-color-accent)";
|
|
48
|
+
theme.colors["tab.activeBorder"] = "transparent";
|
|
49
|
+
theme.colors["tab.activeBorderTop"] = activeBorderColor;
|
|
50
|
+
theme.colors["scrollbarSlider.background"] = neutralMinimal;
|
|
51
|
+
theme.colors["scrollbarSlider.hoverBackground"] = neutralDimmed;
|
|
52
|
+
theme.bg = isDark ? "#23262f" : "#f6f7f9";
|
|
53
|
+
theme.colors["editor.background"] = theme.bg;
|
|
54
|
+
const editorBackgroundColor = isDark ? "var(--sl-color-gray-6)" : "var(--sl-color-gray-7)";
|
|
55
|
+
theme.styleOverrides.frames = {
|
|
56
|
+
editorBackground: editorBackgroundColor,
|
|
57
|
+
terminalBackground: editorBackgroundColor,
|
|
58
|
+
editorActiveTabBackground: editorBackgroundColor,
|
|
59
|
+
terminalTitlebarDotsForeground: borderColor,
|
|
60
|
+
terminalTitlebarDotsOpacity: "0.75",
|
|
61
|
+
inlineButtonForeground: "var(--sl-color-text)",
|
|
62
|
+
frameBoxShadowCssValue: "none"
|
|
63
|
+
};
|
|
64
|
+
theme.styleOverrides.textMarkers = {
|
|
65
|
+
markBackground: neutralMinimal,
|
|
66
|
+
markBorderColor: neutralDimmed
|
|
67
|
+
};
|
|
68
|
+
return theme;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { applyStarlightUiThemeColors, preprocessThemes };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StarlightConfig } from "../../utils/user-config.js";
|
|
2
|
+
import { createTranslationSystemFromFs } from "../../utils/translations-fs.js";
|
|
3
|
+
import "../../types.js";
|
|
4
|
+
//#region src/integrations/expressive-code/translations.d.ts
|
|
5
|
+
declare function addTranslations(config: StarlightConfig, useTranslations: UseTranslations): void;
|
|
6
|
+
type UseTranslations = Awaited<ReturnType<typeof createTranslationSystemFromFs>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { addTranslations };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { localeToLang } from "../shared/localeToLang.js";
|
|
2
|
+
import { pluginFramesTexts } from "astro-expressive-code";
|
|
3
|
+
//#region src/integrations/expressive-code/translations.ts
|
|
4
|
+
function addTranslations(config, useTranslations) {
|
|
5
|
+
addTranslationsForLocale(config.defaultLocale.locale, config, useTranslations);
|
|
6
|
+
if (config.isMultilingual) for (const locale in config.locales) {
|
|
7
|
+
if (locale === config.defaultLocale.locale || locale === "root") continue;
|
|
8
|
+
addTranslationsForLocale(locale, config, useTranslations);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function addTranslationsForLocale(locale, config, useTranslations) {
|
|
12
|
+
const lang = localeToLang(config, locale);
|
|
13
|
+
const t = useTranslations(lang);
|
|
14
|
+
[
|
|
15
|
+
"expressiveCode.copyButtonCopied",
|
|
16
|
+
"expressiveCode.copyButtonTooltip",
|
|
17
|
+
"expressiveCode.terminalWindowFallbackTitle"
|
|
18
|
+
].forEach((key) => {
|
|
19
|
+
const translation = t.exists(key) ? t(key) : void 0;
|
|
20
|
+
if (!translation) return;
|
|
21
|
+
const ecId = key.replace(/^expressiveCode\./, "");
|
|
22
|
+
pluginFramesTexts.overrideTexts(lang, { [ecId]: translation });
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { addTranslations };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementContent } from "hast";
|
|
2
|
+
//#region src/integrations/markdown-icon.d.ts
|
|
3
|
+
declare const headingLinkIconSvgChildrenHtml: string;
|
|
4
|
+
declare const headingLinkIconChildren: ElementContent[];
|
|
5
|
+
/** Parse a Starlight icon SVG fragment as children of an `<svg>` element. */
|
|
6
|
+
declare function parseIconChildren(icon: string): ElementContent[];
|
|
7
|
+
//#endregion
|
|
8
|
+
export { headingLinkIconChildren, headingLinkIconSvgChildrenHtml, parseIconChildren };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Icons } from "../components-internals/Icons.js";
|
|
2
|
+
import { htmlToHast } from "satteri";
|
|
3
|
+
//#region src/integrations/markdown-icon.ts
|
|
4
|
+
const headingLinkIconSvgChildrenHtml = Icons["link-alt"];
|
|
5
|
+
const headingLinkIconChildren = parseIconChildren(headingLinkIconSvgChildrenHtml);
|
|
6
|
+
/** Parse a Starlight icon SVG fragment as children of an `<svg>` element. */
|
|
7
|
+
function parseIconChildren(icon) {
|
|
8
|
+
return htmlToHast(icon, {
|
|
9
|
+
fragment: true,
|
|
10
|
+
space: "svg"
|
|
11
|
+
}).children;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { headingLinkIconChildren, headingLinkIconSvgChildrenHtml, parseIconChildren };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MarkdownProcessorPluginOptions } from "./markdown-processor.js";
|
|
2
|
+
import { remark_rehype_d_exports } from "./remark-rehype.js";
|
|
3
|
+
import { AstroConfig, AstroIntegration, AstroIntegrationLogger } from "astro";
|
|
4
|
+
//#region src/integrations/markdown-plugins.d.ts
|
|
5
|
+
declare const unifiedIntegration: Promise<typeof remark_rehype_d_exports | null>;
|
|
6
|
+
type UnifiedIntegration = Awaited<typeof unifiedIntegration>;
|
|
7
|
+
type MarkdownProcessor = NonNullable<AstroConfig['markdown']['processor']>;
|
|
8
|
+
/** Registers Starlight's Markdown transforms, picking the plugin set for the configured engine. */
|
|
9
|
+
declare function applyStarlightMarkdownPlugins(processor: MarkdownProcessor, options: MarkdownProcessorPluginOptions, unified: UnifiedIntegration, logger: Pick<AstroIntegrationLogger, 'warn'>): void;
|
|
10
|
+
/** Registers the directive-restoration plugin. */
|
|
11
|
+
declare function registerDirectivesRestoration(processor: MarkdownProcessor, unified: UnifiedIntegration): void;
|
|
12
|
+
/**
|
|
13
|
+
* Run directive-restoration last so plugins added by Starlight plugins (via their own Astro
|
|
14
|
+
* integrations) get to handle text/leaf directives first.
|
|
15
|
+
*/
|
|
16
|
+
declare function starlightDirectivesRestorationIntegration(): AstroIntegration;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { applyStarlightMarkdownPlugins, registerDirectivesRestoration, starlightDirectivesRestorationIntegration, unifiedIntegration };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { satteriDirectivesRestoration, starlightSatteriPlugins } from "./satteri.js";
|
|
2
|
+
import { isSatteriProcessor } from "@astrojs/markdown-satteri";
|
|
3
|
+
//#region src/integrations/markdown-plugins.ts
|
|
4
|
+
const unifiedIntegration = import("./remark-rehype.js").catch(() => null);
|
|
5
|
+
/** Registers Starlight's Markdown transforms, picking the plugin set for the configured engine. */
|
|
6
|
+
function applyStarlightMarkdownPlugins(processor, options, unified, logger) {
|
|
7
|
+
if (isSatteriProcessor(processor)) {
|
|
8
|
+
processor.options.features.directive = true;
|
|
9
|
+
const { mdastPlugins, hastPlugins } = starlightSatteriPlugins(options);
|
|
10
|
+
processor.options.mdastPlugins.push(...mdastPlugins);
|
|
11
|
+
processor.options.hastPlugins.push(...hastPlugins);
|
|
12
|
+
} else if (unified?.isUnifiedProcessor(processor)) {
|
|
13
|
+
processor.options.remarkPlugins.push(...unified.starlightRemarkPlugins(options));
|
|
14
|
+
processor.options.rehypePlugins.push(...unified.starlightRehypePlugins(options));
|
|
15
|
+
} else logger.warn(`The configured \`markdown.processor\` ("${processor.name}") is not supported by Starlight. Starlight's Markdown transforms (asides, heading anchor links, RTL code support) won't run on your content. Switch to \`satteri()\` from \`@astrojs/markdown-satteri\` or \`unified()\` from \`@astrojs/markdown-remark\`.`);
|
|
16
|
+
}
|
|
17
|
+
/** Registers the directive-restoration plugin. */
|
|
18
|
+
function registerDirectivesRestoration(processor, unified) {
|
|
19
|
+
if (isSatteriProcessor(processor)) processor.options.mdastPlugins.push(satteriDirectivesRestoration());
|
|
20
|
+
else if (unified?.isUnifiedProcessor(processor)) processor.options.remarkPlugins.push(unified.remarkDirectivesRestoration);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Run directive-restoration last so plugins added by Starlight plugins (via their own Astro
|
|
24
|
+
* integrations) get to handle text/leaf directives first.
|
|
25
|
+
*/
|
|
26
|
+
function starlightDirectivesRestorationIntegration() {
|
|
27
|
+
return {
|
|
28
|
+
name: "starlight-directives-restoration",
|
|
29
|
+
hooks: { "astro:config:setup": async ({ config }) => {
|
|
30
|
+
const unified = await unifiedIntegration;
|
|
31
|
+
registerDirectivesRestoration(config.markdown?.processor, unified);
|
|
32
|
+
} }
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { applyStarlightMarkdownPlugins, registerDirectivesRestoration, starlightDirectivesRestorationIntegration, unifiedIntegration };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StarlightConfig } from "../utils/user-config.js";
|
|
2
|
+
import { HookParameters as HookParameters$1 } from "../utils/plugins.js";
|
|
3
|
+
import "../types.js";
|
|
4
|
+
import { AstroConfig } from "astro";
|
|
5
|
+
//#region src/integrations/markdown-processor.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Options shared by the plugin factories of both Markdown processors Starlight supports (the unified
|
|
8
|
+
* `remark`/`rehype` pipeline and Sätteri).
|
|
9
|
+
*/
|
|
10
|
+
interface MarkdownProcessorPluginOptions {
|
|
11
|
+
starlightConfig: Pick<StarlightConfig, 'defaultLocale' | 'locales' | 'markdown'>;
|
|
12
|
+
astroConfig: Pick<AstroConfig, 'root' | 'srcDir'>;
|
|
13
|
+
useTranslations: HookParameters$1<'config:setup'>['useTranslations'];
|
|
14
|
+
absolutePathToLang: HookParameters$1<'config:setup'>['absolutePathToLang'];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the paths to the Starlight docs collection and any additional paths defined in the
|
|
18
|
+
* `starlightConfig.markdown.processedDirs` option that can be used with the {@link shouldTransformPath}
|
|
19
|
+
* utility to determine if a file should be transformed by a plugin or not.
|
|
20
|
+
*/
|
|
21
|
+
declare function getMarkdownProcessorPaths(options: MarkdownProcessorPluginOptions): string[];
|
|
22
|
+
/**
|
|
23
|
+
* Determines if a file should be transformed by a Markdown plugin, e.g. files without a known path
|
|
24
|
+
* or files that are not part of the allowed paths are skipped. Accepts a path string (as the unified
|
|
25
|
+
* pipeline exposes via `VFile`) or a `URL` (as Sätteri exposes via `ctx.fileURL`).
|
|
26
|
+
*/
|
|
27
|
+
declare function shouldTransformPath(path: string | URL | undefined, allowedPaths: string[]): boolean;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { MarkdownProcessorPluginOptions, getMarkdownProcessorPaths, shouldTransformPath };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { resolveCollectionPath } from "../utils/collection-fs.js";
|
|
2
|
+
import { ensureTrailingSlash } from "../utils/path.js";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
//#region src/integrations/markdown-processor.ts
|
|
6
|
+
/**
|
|
7
|
+
* Returns the paths to the Starlight docs collection and any additional paths defined in the
|
|
8
|
+
* `starlightConfig.markdown.processedDirs` option that can be used with the {@link shouldTransformPath}
|
|
9
|
+
* utility to determine if a file should be transformed by a plugin or not.
|
|
10
|
+
*/
|
|
11
|
+
function getMarkdownProcessorPaths(options) {
|
|
12
|
+
const paths = [normalizeDirectoryPath(resolveCollectionPath("docs", options.astroConfig.srcDir))];
|
|
13
|
+
for (const processedDir of options.starlightConfig.markdown.processedDirs) paths.push(normalizeDirectoryPath(resolve(fileURLToPath(options.astroConfig.root), processedDir)));
|
|
14
|
+
return paths;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Determines if a file should be transformed by a Markdown plugin, e.g. files without a known path
|
|
18
|
+
* or files that are not part of the allowed paths are skipped. Accepts a path string (as the unified
|
|
19
|
+
* pipeline exposes via `VFile`) or a `URL` (as Sätteri exposes via `ctx.fileURL`).
|
|
20
|
+
*/
|
|
21
|
+
function shouldTransformPath(path, allowedPaths) {
|
|
22
|
+
if (!path) return false;
|
|
23
|
+
const normalizedPath = normalizePath(path instanceof URL ? fileURLToPath(path) : path);
|
|
24
|
+
return allowedPaths.some((p) => normalizedPath.startsWith(p));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* File path separators seems to be inconsistent on Windows between remark/rehype plugins used on
|
|
28
|
+
* Markdown vs MDX files.
|
|
29
|
+
* For the time being, we normalize all paths to unix style paths.
|
|
30
|
+
*/
|
|
31
|
+
const backSlashRegex = /\\/g;
|
|
32
|
+
function normalizePath(path) {
|
|
33
|
+
return path.replace(backSlashRegex, "/");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Allowed paths are directory prefixes compared with `startsWith()` in {@link shouldTransformPath},
|
|
37
|
+
* so we ensure they have a trailing slash to avoid matching sibling directories with the same
|
|
38
|
+
* prefix.
|
|
39
|
+
*/
|
|
40
|
+
function normalizeDirectoryPath(path) {
|
|
41
|
+
return ensureTrailingSlash(normalizePath(path));
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { getMarkdownProcessorPaths, shouldTransformPath };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HookParameters } from "astro";
|
|
2
|
+
//#region src/integrations/pagefind.d.ts
|
|
3
|
+
/** Run Pagefind to generate search index files based on the build output directory. */
|
|
4
|
+
declare function starlightPagefind({ dir, logger: starlightLogger }: PagefindIntegrationOptions): Promise<void>;
|
|
5
|
+
type PagefindIntegrationOptions = Pick<HookParameters<'astro:build:done'>, 'dir' | 'logger'>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { starlightPagefind };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import * as pagefind from "pagefind";
|
|
3
|
+
//#region src/integrations/pagefind.ts
|
|
4
|
+
/** Run Pagefind to generate search index files based on the build output directory. */
|
|
5
|
+
async function starlightPagefind({ dir, logger: starlightLogger }) {
|
|
6
|
+
const logger = starlightLogger.fork("starlight:pagefind");
|
|
7
|
+
const options = {
|
|
8
|
+
dir,
|
|
9
|
+
logger
|
|
10
|
+
};
|
|
11
|
+
try {
|
|
12
|
+
const now = performance.now();
|
|
13
|
+
logger.info("Building search index with Pagefind...");
|
|
14
|
+
const { index } = assertPagefindResponse(await pagefind.createIndex(), options);
|
|
15
|
+
const { page_count } = assertPagefindResponse(await index.addDirectory({ path: fileURLToPath(dir) }), options);
|
|
16
|
+
logger.info(`Found ${page_count} HTML files.`);
|
|
17
|
+
assertPagefindResponse(await index.writeFiles({ outputPath: fileURLToPath(new URL("./pagefind/", dir)) }), options);
|
|
18
|
+
const pagefindTime = performance.now() - now;
|
|
19
|
+
logger.info(`Finished building search index in ${pagefindTime < 750 ? `${Math.round(pagefindTime)}ms` : `${(pagefindTime / 1e3).toFixed(2)}s`}.`);
|
|
20
|
+
} catch (cause) {
|
|
21
|
+
throw new Error("Failed to run Pagefind.", { cause });
|
|
22
|
+
} finally {
|
|
23
|
+
await pagefind.close();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function assertPagefindResponse(response, { logger }) {
|
|
27
|
+
if (response.errors.length > 0) {
|
|
28
|
+
for (const error of response.errors) logger.error(`Pagefind error: ${error}`);
|
|
29
|
+
throw new Error("Pagefind response contained errors.");
|
|
30
|
+
}
|
|
31
|
+
return response;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { starlightPagefind };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MarkdownProcessorPluginOptions } from "./markdown-processor.js";
|
|
2
|
+
import { Root } from "hast";
|
|
3
|
+
import { Transformer } from "unified";
|
|
4
|
+
//#region src/integrations/rehype-code-rtl-support.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* rehype plugin that adds `dir` attributes to `<code>` and `<pre>`
|
|
7
|
+
* elements that don’t already have them.
|
|
8
|
+
*
|
|
9
|
+
* `<code>` will become `<code dir="auto">`
|
|
10
|
+
* `<pre>` will become `<pre dir="ltr">`
|
|
11
|
+
*
|
|
12
|
+
* `<code>` _inside_ `<pre>` is skipped, so respects the `ltr` on its parent.
|
|
13
|
+
*
|
|
14
|
+
* Reasoning:
|
|
15
|
+
* - `<pre>` is usually a code block and code should be LTR even in an RTL document
|
|
16
|
+
* - `<code>` is often LTR, but could also be RTL. `dir="auto"` ensures the bidirectional
|
|
17
|
+
* algorithm treats the contents of `<code>` in isolation and gives its best guess.
|
|
18
|
+
*/
|
|
19
|
+
declare function rehypeRtlCodeSupport(_options: MarkdownProcessorPluginOptions): () => Transformer<Root>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { rehypeRtlCodeSupport };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CONTINUE, SKIP, visit } from "unist-util-visit";
|
|
2
|
+
//#region src/integrations/rehype-code-rtl-support.ts
|
|
3
|
+
/**
|
|
4
|
+
* rehype plugin that adds `dir` attributes to `<code>` and `<pre>`
|
|
5
|
+
* elements that don’t already have them.
|
|
6
|
+
*
|
|
7
|
+
* `<code>` will become `<code dir="auto">`
|
|
8
|
+
* `<pre>` will become `<pre dir="ltr">`
|
|
9
|
+
*
|
|
10
|
+
* `<code>` _inside_ `<pre>` is skipped, so respects the `ltr` on its parent.
|
|
11
|
+
*
|
|
12
|
+
* Reasoning:
|
|
13
|
+
* - `<pre>` is usually a code block and code should be LTR even in an RTL document
|
|
14
|
+
* - `<code>` is often LTR, but could also be RTL. `dir="auto"` ensures the bidirectional
|
|
15
|
+
* algorithm treats the contents of `<code>` in isolation and gives its best guess.
|
|
16
|
+
*/
|
|
17
|
+
function rehypeRtlCodeSupport(_options) {
|
|
18
|
+
const transformer = (tree) => {
|
|
19
|
+
visit(tree, "element", (el) => {
|
|
20
|
+
if (el.tagName === "pre" || el.tagName === "code") {
|
|
21
|
+
el.properties ||= {};
|
|
22
|
+
if (!("dir" in el.properties)) el.properties.dir = {
|
|
23
|
+
pre: "ltr",
|
|
24
|
+
code: "auto"
|
|
25
|
+
}[el.tagName];
|
|
26
|
+
return SKIP;
|
|
27
|
+
}
|
|
28
|
+
return CONTINUE;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
return function attacher() {
|
|
32
|
+
return transformer;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { rehypeRtlCodeSupport };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MarkdownProcessorPluginOptions } from "./markdown-processor.js";
|
|
2
|
+
import { Root } from "hast";
|
|
3
|
+
import { Transformer } from "unified";
|
|
4
|
+
//#region src/integrations/rehype-heading-links.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Add anchor links to headings.
|
|
7
|
+
*/
|
|
8
|
+
declare function rehypeAutolinkHeadings({ absolutePathToLang, useTranslations }: MarkdownProcessorPluginOptions): () => Transformer<Root>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { rehypeAutolinkHeadings as default };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { headingLinkIconChildren } from "./markdown-icon.js";
|
|
2
|
+
import { SKIP, visit } from "unist-util-visit";
|
|
3
|
+
import { toString } from "hast-util-to-string";
|
|
4
|
+
import { h, s } from "hastscript";
|
|
5
|
+
//#region src/integrations/rehype-heading-links.ts
|
|
6
|
+
const AnchorLinkIcon = h("span", {
|
|
7
|
+
ariaHidden: "true",
|
|
8
|
+
class: "sl-anchor-icon"
|
|
9
|
+
}, s("svg", {
|
|
10
|
+
width: 16,
|
|
11
|
+
height: 16,
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
fill: "currentColor"
|
|
14
|
+
}, headingLinkIconChildren));
|
|
15
|
+
/**
|
|
16
|
+
* Add anchor links to headings.
|
|
17
|
+
*/
|
|
18
|
+
function rehypeAutolinkHeadings({ absolutePathToLang, useTranslations }) {
|
|
19
|
+
const transformer = (tree, file) => {
|
|
20
|
+
const t = useTranslations(absolutePathToLang(file.path));
|
|
21
|
+
visit(tree, "element", function(node, index, parent) {
|
|
22
|
+
if (!headingRank(node) || !node.properties.id || typeof index !== "number" || !parent) return;
|
|
23
|
+
const accessibleLabel = t("heading.anchorLabel", {
|
|
24
|
+
title: toString(node),
|
|
25
|
+
interpolation: { escapeValue: false }
|
|
26
|
+
});
|
|
27
|
+
parent.children[index] = h("div", { class: `sl-heading-wrapper level-${node.tagName}` }, node, {
|
|
28
|
+
type: "element",
|
|
29
|
+
tagName: "a",
|
|
30
|
+
properties: {
|
|
31
|
+
class: "sl-anchor-link",
|
|
32
|
+
href: "#" + String(node.properties.id)
|
|
33
|
+
},
|
|
34
|
+
children: [AnchorLinkIcon, h("span", {
|
|
35
|
+
class: "sr-only",
|
|
36
|
+
"data-pagefind-ignore": true
|
|
37
|
+
}, accessibleLabel)]
|
|
38
|
+
});
|
|
39
|
+
return SKIP;
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
return function attacher() {
|
|
43
|
+
return transformer;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get the rank (`1` to `6`) of headings (`h1` to `h6`).
|
|
48
|
+
* @param node Node to check.
|
|
49
|
+
* @returns Rank of the heading or `undefined` if not a heading.
|
|
50
|
+
*/
|
|
51
|
+
function headingRank(node) {
|
|
52
|
+
const name = node.type === "element" ? node.tagName.toLowerCase() : "";
|
|
53
|
+
const code = name.length === 2 && name.charCodeAt(0) === 104 ? name.charCodeAt(1) : 0;
|
|
54
|
+
return code > 48 && code < 55 ? code - 48 : void 0;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { rehypeAutolinkHeadings as default };
|