@xyd-js/components 0.1.0-xyd.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/README.md +3 -0
- package/coder.ts +1 -0
- package/content.ts +3 -0
- package/dist/CTABanner-CWX9isVG.js +1 -0
- package/dist/CodeSample-C5YaEpAi.js +1 -0
- package/dist/HomeView-CnAj-VYl.js +1 -0
- package/dist/UnderlineNav-C8onw9Na.js +1 -0
- package/dist/_rollupPluginBabelHelpers-DfQAiTCw.js +1 -0
- package/dist/abap-kIO_7z1o.js +1 -0
- package/dist/actionscript-3-DiaraCXE.js +1 -0
- package/dist/ada-aNFKX2pl.js +1 -0
- package/dist/angular-html-y0qIEhS2.js +1 -0
- package/dist/angular-ts-Bn_6f37o.js +1 -0
- package/dist/apache-Cx7e0H64.js +1 -0
- package/dist/apex-CdSCJjuL.js +1 -0
- package/dist/apl-BDzWBUim.js +1 -0
- package/dist/applescript-CJFkzk5i.js +1 -0
- package/dist/ara-BC9R9M5c.js +1 -0
- package/dist/asciidoc-lqQQs4M0.js +1 -0
- package/dist/asm-QQeI-gwp.js +1 -0
- package/dist/astro-BPstp8LF.js +1 -0
- package/dist/awk-Cxb7Sqvk.js +1 -0
- package/dist/ballerina-G8TyVc6O.js +1 -0
- package/dist/bat-UDEmXz-g.js +1 -0
- package/dist/beancount-BWg86rhE.js +1 -0
- package/dist/berry-5E5uGOYg.js +1 -0
- package/dist/bibtex-CZn_FFnb.js +1 -0
- package/dist/bicep-D_G0XT5J.js +1 -0
- package/dist/blade-7dxmctkK.js +1 -0
- package/dist/brand.d.ts +30 -0
- package/dist/brand.js +1 -0
- package/dist/c-CrEz-oYf.js +1 -0
- package/dist/cadence-BulSIR1A.js +1 -0
- package/dist/clarity-m2OigCMT.js +1 -0
- package/dist/clojure-Bpes2rhL.js +1 -0
- package/dist/cmake-C4Tr1SQC.js +1 -0
- package/dist/cobol-Dp8xGW1S.js +1 -0
- package/dist/codeowners-Bs3mpoau.js +1 -0
- package/dist/codeql-CvQzaisq.js +1 -0
- package/dist/coder.d.ts +19 -0
- package/dist/coder.js +1 -0
- package/dist/coffee-DOjtyJj_.js +1 -0
- package/dist/common-lisp-DGVR8DFi.js +1 -0
- package/dist/content.d.ts +225 -0
- package/dist/content.js +1 -0
- package/dist/cpp-BUT7C4Bo.js +1 -0
- package/dist/crystal-BJh9OJ1_.js +1 -0
- package/dist/csharp-BhZuAD8H.js +1 -0
- package/dist/css-8_G4_UCW.js +1 -0
- package/dist/csv-DLRyYdMG.js +1 -0
- package/dist/cue-DAgMCCsT.js +1 -0
- package/dist/cypher-CtSiSKRh.js +1 -0
- package/dist/d-feZJOTtr.js +1 -0
- package/dist/dark-plus-Dcn2h2HL.js +1 -0
- package/dist/dart-CNOu4aud.js +1 -0
- package/dist/dax-Dkp1Uj6t.js +1 -0
- package/dist/desktop-CAGQzotA.js +1 -0
- package/dist/diff-D6yk3_ZG.js +1 -0
- package/dist/docker-BdTrQq0b.js +1 -0
- package/dist/dotenv-BeHGAMs7.js +1 -0
- package/dist/dracula-BUaMrXr0.js +1 -0
- package/dist/dracula-soft-CBx6n76m.js +1 -0
- package/dist/dream-maker-BU0sZZmb.js +1 -0
- package/dist/edge-D2Tk5tmg.js +1 -0
- package/dist/elixir-B-l3Nz-G.js +1 -0
- package/dist/elm-Bqm7aRpV.js +1 -0
- package/dist/emacs-lisp-BSvpfolf.js +1 -0
- package/dist/erb-CwBHxfFV.js +1 -0
- package/dist/erlang-B0PtHWg2.js +1 -0
- package/dist/fennel-CdN4E9Xo.js +1 -0
- package/dist/fish-XrbYjeRx.js +1 -0
- package/dist/fluent-zYsEgElv.js +1 -0
- package/dist/fortran-fixed-form-CPwX6okW.js +1 -0
- package/dist/fortran-free-form-B6Kk9658.js +1 -0
- package/dist/fsharp-CbMfVCMr.js +1 -0
- package/dist/gdresource-CdRUpBQO.js +1 -0
- package/dist/gdscript-CYXv_Ac9.js +1 -0
- package/dist/gdshader-CtiaGYI5.js +1 -0
- package/dist/genie-C-gOIth7.js +1 -0
- package/dist/gherkin-uGsOfG-k.js +1 -0
- package/dist/git-commit-CWQvkRNX.js +1 -0
- package/dist/git-rebase-BZ0YVJ-O.js +1 -0
- package/dist/github-dark-DCm4kydX.js +1 -0
- package/dist/github-dark-dimmed-CsRUrOJA.js +1 -0
- package/dist/github-from-css-CTRi6tFC.js +1 -0
- package/dist/github-light-B2ofRYMU.js +1 -0
- package/dist/gleam-C9ZZ3Vp2.js +1 -0
- package/dist/glimmer-js-Cuwfndkm.js +1 -0
- package/dist/glimmer-ts-D8nR8_k2.js +1 -0
- package/dist/glsl-qc_rLvzz.js +1 -0
- package/dist/gnuplot-BgHAcd--.js +1 -0
- package/dist/go-Dm8VBUM2.js +1 -0
- package/dist/graphql-CRmnB6D5.js +1 -0
- package/dist/groovy-DJcw8dX4.js +1 -0
- package/dist/hack-DYOVz52F.js +1 -0
- package/dist/haml-j8Vx_P4q.js +1 -0
- package/dist/handlebars-Qz3hgrPG.js +1 -0
- package/dist/haskell-DE3vVmXn.js +1 -0
- package/dist/haxe-DpuNPTTj.js +1 -0
- package/dist/hcl-BvV3VZ9s.js +1 -0
- package/dist/hjson-CsTZvU0B.js +1 -0
- package/dist/hlsl-BLZumTGu.js +1 -0
- package/dist/html-BJsWDmIe.js +1 -0
- package/dist/html-derivative-zDWJvwg5.js +1 -0
- package/dist/http-BiMppEBd.js +1 -0
- package/dist/hxml-DG2jWwyK.js +1 -0
- package/dist/hy-C9zVJlJf.js +1 -0
- package/dist/imba-DGD1mm8E.js +1 -0
- package/dist/index-TKJ66_wI.js +1 -0
- package/dist/index.css +135 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/ini-CU7wgrgh.js +1 -0
- package/dist/java-DyOZhX5L.js +1 -0
- package/dist/javascript-C0AWZ4eK.js +1 -0
- package/dist/jinja-Lc82IfGI.js +1 -0
- package/dist/jison-DT7Oqeqm.js +1 -0
- package/dist/json-Zoq3rK60.js +1 -0
- package/dist/json5-BOFh3mt2.js +1 -0
- package/dist/jsonc-CPutX9W5.js +1 -0
- package/dist/jsonl-xWfKSBhV.js +1 -0
- package/dist/jsonnet-UcnvaLwK.js +1 -0
- package/dist/jssm-BRT8_Uqd.js +1 -0
- package/dist/jsx-B4WNxrCK.js +1 -0
- package/dist/julia-i7_3XSV_.js +1 -0
- package/dist/kotlin-B_s0KNy5.js +1 -0
- package/dist/kusto-CDr4m-xT.js +1 -0
- package/dist/latex-BNB6MZrj.js +1 -0
- package/dist/layouts.d.ts +19 -0
- package/dist/layouts.js +1 -0
- package/dist/lean-2dBp1asm.js +1 -0
- package/dist/less-CfPPFFsV.js +1 -0
- package/dist/light-plus-glPHycm5.js +1 -0
- package/dist/liquid-Bj1DN66U.js +1 -0
- package/dist/log-CKSz9t_o.js +1 -0
- package/dist/logo-D3UPVeLP.js +1 -0
- package/dist/lua-C1EFGxtA.js +1 -0
- package/dist/luau-Dvb2LLsw.js +1 -0
- package/dist/make-TqphZF-7.js +1 -0
- package/dist/markdown-yX62Igf3.js +1 -0
- package/dist/marko-LH6NoP97.js +1 -0
- package/dist/material-darker-D6whucX3.js +1 -0
- package/dist/material-default-DYqS7fqa.js +1 -0
- package/dist/material-from-css-DlWo_ZDV.js +1 -0
- package/dist/material-lighter-CYQaMsGh.js +1 -0
- package/dist/material-ocean-Dl_zLA-F.js +1 -0
- package/dist/material-palenight-Cd4X9kqy.js +1 -0
- package/dist/matlab-Dy9K5GW8.js +1 -0
- package/dist/mdc-DhAfBnnn.js +1 -0
- package/dist/mdx-tnT2uTqR.js +1 -0
- package/dist/mermaid-aEaCok9S.js +1 -0
- package/dist/min-dark-CpapYCVz.js +1 -0
- package/dist/min-light-plRN0zW-.js +1 -0
- package/dist/mojo-BanaVmFY.js +1 -0
- package/dist/monokai-Cs2_BG4b.js +1 -0
- package/dist/move-B_kaWhAV.js +1 -0
- package/dist/narrat-6tChrAmV.js +1 -0
- package/dist/nextflow-BYB6CU6V.js +1 -0
- package/dist/nginx-Clr7XfzW.js +1 -0
- package/dist/nim-gLesixmv.js +1 -0
- package/dist/nix-DCgUXh-o.js +1 -0
- package/dist/nord-BHSE8FbR.js +1 -0
- package/dist/nushell-DDKGkuZY.js +1 -0
- package/dist/objective-c-BsQdhSk0.js +1 -0
- package/dist/objective-cpp-B-VZlBXW.js +1 -0
- package/dist/ocaml-B19L2xxl.js +1 -0
- package/dist/one-dark-pro-AWPQgJbJ.js +1 -0
- package/dist/pages.d.ts +30 -0
- package/dist/pages.js +1 -0
- package/dist/pascal-B0kVBVTU.js +1 -0
- package/dist/perl-Bs2cXIO6.js +1 -0
- package/dist/php-BgaH_AHK.js +1 -0
- package/dist/plsql-CPY7hT9n.js +1 -0
- package/dist/po-BszTsnLZ.js +1 -0
- package/dist/poimandres-CZF4JUv5.js +1 -0
- package/dist/postcss-DQ0frX96.js +1 -0
- package/dist/powerquery-BitONm6p.js +1 -0
- package/dist/powershell-B_lVHVgu.js +1 -0
- package/dist/prisma-CqkE3olT.js +1 -0
- package/dist/prolog-Bpuon3aK.js +1 -0
- package/dist/proto-C349dup0.js +1 -0
- package/dist/pug-Bbf3g_hT.js +1 -0
- package/dist/puppet-qDtDc0so.js +1 -0
- package/dist/purescript-C03CHyrT.js +1 -0
- package/dist/python-D5e4BtVB.js +1 -0
- package/dist/qml-LVCeHqxw.js +1 -0
- package/dist/qmldir-BEg8Q-XX.js +1 -0
- package/dist/qss-vq-U9k0N.js +1 -0
- package/dist/r-DnCIdoUu.js +1 -0
- package/dist/racket-BQt8mf2o.js +1 -0
- package/dist/raku-ChTHpuBS.js +1 -0
- package/dist/razor-CjFZSXD2.js +1 -0
- package/dist/reg-12gGsscy.js +1 -0
- package/dist/regexp-zLCCZKTi.js +1 -0
- package/dist/rel-aZ4oe34Q.js +1 -0
- package/dist/riscv-BA9R8KI2.js +1 -0
- package/dist/rose-pine-8QECO0Ox.js +1 -0
- package/dist/rose-pine-dawn-DT77ObZh.js +1 -0
- package/dist/rose-pine-moon-D3-I8ETF.js +1 -0
- package/dist/rst-DFKlxnrd.js +1 -0
- package/dist/ruby-BypI_hk5.js +1 -0
- package/dist/rust-tE6tRkqD.js +1 -0
- package/dist/sas-D1sMUJql.js +1 -0
- package/dist/sass-DBEOLVv3.js +1 -0
- package/dist/scala-DUzir4os.js +1 -0
- package/dist/scheme-dsSqVZz3.js +1 -0
- package/dist/scss-B0kJw1gM.js +1 -0
- package/dist/shaderlab-Cd8Cbryn.js +1 -0
- package/dist/shellscript-BL-Ihj2z.js +1 -0
- package/dist/shellsession-C5KJPcFG.js +1 -0
- package/dist/slack-dark-JbsLGggd.js +1 -0
- package/dist/slack-ochin-hTeCADjA.js +1 -0
- package/dist/smalltalk-DQ23HuGh.js +1 -0
- package/dist/solarized-dark-D2bQRcX7.js +1 -0
- package/dist/solarized-light-6xrOKoxI.js +1 -0
- package/dist/solidity-DUCwohjn.js +1 -0
- package/dist/soy-Cy4pRjbu.js +1 -0
- package/dist/sparql-D7gNTkUq.js +1 -0
- package/dist/splunk-Dvl5Xm98.js +1 -0
- package/dist/sql-BfoT44Al.js +1 -0
- package/dist/ssh-config-C-ZFySPN.js +1 -0
- package/dist/stata-Dpw9jvge.js +1 -0
- package/dist/stylus-mJ9_5M6n.js +1 -0
- package/dist/svelte-DD5dtnEi.js +1 -0
- package/dist/swift-DDernUpH.js +1 -0
- package/dist/system-verilog-DeXSd9Py.js +1 -0
- package/dist/systemd-NetTuLPL.js +1 -0
- package/dist/tasl-BCm9L3tI.js +1 -0
- package/dist/tcl-DmWVgxCm.js +1 -0
- package/dist/templ-B7wt_K-d.js +1 -0
- package/dist/terraform-DYIIsq8p.js +1 -0
- package/dist/tex-DFj0qpOD.js +1 -0
- package/dist/toml-CFu3vY0Q.js +1 -0
- package/dist/ts-tags-BvMEeGTJ.js +1 -0
- package/dist/tslib.es6-C3PNVQlC.js +1 -0
- package/dist/tsv-DnenRF8k.js +1 -0
- package/dist/tsx-DooqfEr1.js +1 -0
- package/dist/turtle-DKlxyehf.js +1 -0
- package/dist/twig-DpQc8FUF.js +1 -0
- package/dist/txt-C4tHEtDr.js +1 -0
- package/dist/typescript-DtE5sB_4.js +1 -0
- package/dist/typespec-B69vp3jc.js +1 -0
- package/dist/typst-BzEngGMo.js +1 -0
- package/dist/v-Dy6tTX8K.js +1 -0
- package/dist/vala-DQnmDtkE.js +1 -0
- package/dist/vb-CqTjXY4K.js +1 -0
- package/dist/verilog-D6Zfe00a.js +1 -0
- package/dist/vhdl-Dxu0BOr9.js +1 -0
- package/dist/views.d.ts +17 -0
- package/dist/views.js +1 -0
- package/dist/viml-eXtfIM-m.js +1 -0
- package/dist/vue-D3vey6Cu.js +1 -0
- package/dist/vue-html-DyaqvCGV.js +1 -0
- package/dist/vyper-C6AULW8C.js +1 -0
- package/dist/wasm-Cl39COlm.js +1 -0
- package/dist/wenyan-DJGdsiXE.js +1 -0
- package/dist/wgsl-CDhIPMwJ.js +1 -0
- package/dist/wikitext-D05PpJ8X.js +1 -0
- package/dist/wolfram-JgWnd2g7.js +1 -0
- package/dist/writer.d.ts +157 -0
- package/dist/writer.js +1 -0
- package/dist/xml-Cc1Sy-d4.js +1 -0
- package/dist/xsl-CEYTrbD0.js +1 -0
- package/dist/yaml-NvTdC05o.js +1 -0
- package/dist/zenscript-De0mU_BW.js +1 -0
- package/dist/zig-D9TJVGyp.js +1 -0
- package/index.ts +1 -0
- package/layouts.ts +1 -0
- package/package.json +58 -0
- package/postcss.config.cjs +5 -0
- package/rollup.config.js +149 -0
- package/src/brand/Button/Button.tsx +48 -0
- package/src/brand/Button/index.ts +7 -0
- package/src/brand/CTABanner/CTABanner.tsx +127 -0
- package/src/brand/CTABanner/index.ts +8 -0
- package/src/brand/Footer/Footer.tsx +36 -0
- package/src/brand/Footer/index.ts +3 -0
- package/src/brand/index.ts +5 -0
- package/src/coder/CodeCopy/CodeCopy.style.tsx +21 -0
- package/src/coder/CodeCopy/CodeCopy.tsx +32 -0
- package/src/coder/CodeCopy/index.ts +7 -0
- package/src/coder/CodeSample/CodeSample.styles.tsx +137 -0
- package/src/coder/CodeSample/CodeSample.tsx +150 -0
- package/src/coder/CodeSample/default-theme.ts +266 -0
- package/src/coder/CodeSample/index.ts +12 -0
- package/src/coder/CodeSample/withLocalStored.tsx +50 -0
- package/src/coder/README.md +1 -0
- package/src/coder/index.ts +3 -0
- package/src/content/Anchor/Anchor.tsx +63 -0
- package/src/content/Anchor/index.tsx +3 -0
- package/src/content/Content/Content.tsx +20 -0
- package/src/content/Content/index.tsx +3 -0
- package/src/content/Content.tsx +137 -0
- package/src/content/Subtitle/Subtitle.tsx +21 -0
- package/src/content/Subtitle/index.tsx +3 -0
- package/src/content/index.ts +3 -0
- package/src/layouts/Layout.styles.tsx +151 -0
- package/src/layouts/Layout.tsx +121 -0
- package/src/layouts/index.ts +7 -0
- package/src/pages/HomePage/HomePage.tsx +93 -0
- package/src/pages/HomePage/index.ts +5 -0
- package/src/pages/HomePage/types.ts +41 -0
- package/src/pages/index.ts +1 -0
- package/src/views/HomeView/HomeView.tsx +74 -0
- package/src/views/HomeView/index.ts +3 -0
- package/src/views/index.ts +1 -0
- package/src/writer/Badge/Badge.styles.tsx +29 -0
- package/src/writer/Badge/Badge.tsx +28 -0
- package/src/writer/Badge/index.ts +7 -0
- package/src/writer/Blockquote/Blockquote.styles.tsx +10 -0
- package/src/writer/Blockquote/Blockquote.tsx +13 -0
- package/src/writer/Blockquote/index.ts +7 -0
- package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +28 -0
- package/src/writer/Breadcrumbs/Breadcrumbs.tsx +46 -0
- package/src/writer/Breadcrumbs/index.ts +7 -0
- package/src/writer/Callout/Callout.styles.tsx +50 -0
- package/src/writer/Callout/Callout.tsx +37 -0
- package/src/writer/Callout/index.tsx +3 -0
- package/src/writer/Code/Code.styles.tsx +17 -0
- package/src/writer/Code/Code.tsx +13 -0
- package/src/writer/Code/index.ts +3 -0
- package/src/writer/Details/Details.styles.tsx +76 -0
- package/src/writer/Details/Details.tsx +122 -0
- package/src/writer/Details/index.ts +3 -0
- package/src/writer/GuideCard/GuideCard.styles.tsx +115 -0
- package/src/writer/GuideCard/GuideCard.tsx +81 -0
- package/src/writer/GuideCard/index.ts +1 -0
- package/src/writer/Heading/Heading.styles.tsx +73 -0
- package/src/writer/Heading/Heading.tsx +53 -0
- package/src/writer/Heading/index.ts +7 -0
- package/src/writer/Hr/Hr.styles.tsx +7 -0
- package/src/writer/Hr/Hr.tsx +13 -0
- package/src/writer/Hr/index.ts +3 -0
- package/src/writer/Icon/index.tsx +112 -0
- package/src/writer/NavLinks/NavLinks.styles.ts +32 -0
- package/src/writer/NavLinks/NavLinks.tsx +48 -0
- package/src/writer/NavLinks/index.ts +7 -0
- package/src/writer/Pre/Pre.styles.tsx +13 -0
- package/src/writer/Pre/Pre.tsx +13 -0
- package/src/writer/Pre/index.ts +3 -0
- package/src/writer/README.md +1 -0
- package/src/writer/Steps/Steps.styles.tsx +36 -0
- package/src/writer/Steps/Steps.tsx +24 -0
- package/src/writer/Steps/index.ts +5 -0
- package/src/writer/Table/Table.styles.tsx +39 -0
- package/src/writer/Table/Table.tsx +45 -0
- package/src/writer/Table/index.ts +10 -0
- package/src/writer/Tabs/Tabs.styles.tsx +77 -0
- package/src/writer/Tabs/Tabs.tsx +104 -0
- package/src/writer/Tabs/index.ts +7 -0
- package/src/writer/UnderlineNav/UnderlineNav.styles.tsx +45 -0
- package/src/writer/UnderlineNav/UnderlineNav.tsx +38 -0
- package/src/writer/UnderlineNav/index.ts +1 -0
- package/src/writer/index.ts +32 -0
- package/tsconfig.json +41 -0
- package/writer.ts +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {css} from "@linaria/core";
|
|
3
|
+
|
|
4
|
+
const $footer = {
|
|
5
|
+
host: css`
|
|
6
|
+
position: relative;
|
|
7
|
+
border-top: 1px solid #f0f0f0;
|
|
8
|
+
padding: 32px;
|
|
9
|
+
background-color: #fff;
|
|
10
|
+
`,
|
|
11
|
+
container: css`
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
max-width: 1200px;
|
|
14
|
+
text-align: center;
|
|
15
|
+
`,
|
|
16
|
+
textContainer: css`
|
|
17
|
+
line-height: 24px;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
color: rgba(60, 60, 67, .78);
|
|
21
|
+
`
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface FooterProps {
|
|
25
|
+
children?: React.ReactNode
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function Footer({children}: FooterProps) {
|
|
29
|
+
return <footer className={$footer.host}>
|
|
30
|
+
<div className={$footer.container}>
|
|
31
|
+
<div className={$footer.textContainer}>
|
|
32
|
+
{children}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</footer>
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {css} from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
export const $copy = {
|
|
4
|
+
host: css`
|
|
5
|
+
all: unset;
|
|
6
|
+
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
|
|
13
|
+
border-radius: 6px;
|
|
14
|
+
padding: 6px;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
transition: ease-in 0.1s;
|
|
18
|
+
background: #e3e3eb;
|
|
19
|
+
}
|
|
20
|
+
`
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, {useState} from "react"
|
|
2
|
+
import {Copy, CheckCheck} from "lucide-react"
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
$copy
|
|
6
|
+
} from "./CodeCopy.style"
|
|
7
|
+
|
|
8
|
+
export interface CodeCopyProps {
|
|
9
|
+
text: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function CodeCopy({text}: CodeCopyProps) {
|
|
13
|
+
const [copied, setCopied] = useState(false)
|
|
14
|
+
|
|
15
|
+
function onClick() {
|
|
16
|
+
navigator.clipboard.writeText(text)
|
|
17
|
+
setCopied(true)
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
setCopied(false)
|
|
20
|
+
}, 1200)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<button
|
|
25
|
+
aria-label="Copy to clipboard"
|
|
26
|
+
onClick={onClick}
|
|
27
|
+
className={$copy.host}
|
|
28
|
+
>
|
|
29
|
+
{copied ? <CheckCheck size={16}/> : <Copy size={16}/>}
|
|
30
|
+
</button>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {css} from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
export const $sample = {
|
|
4
|
+
host: css`
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
//flex: 1 1 0;
|
|
8
|
+
//max-width: 512px;
|
|
9
|
+
|
|
10
|
+
border: 1px solid rgb(236, 236, 241);
|
|
11
|
+
border-radius: 16px;
|
|
12
|
+
`,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const $languages = {
|
|
16
|
+
host: css`
|
|
17
|
+
display: flex;
|
|
18
|
+
flex: 1 1 0%;
|
|
19
|
+
//padding: 8px 0px;
|
|
20
|
+
|
|
21
|
+
background: linear-gradient(45deg, rgb(247, 247, 248) 0%, rgb(247, 247, 248) 100%) !important;
|
|
22
|
+
|
|
23
|
+
border-top-right-radius: 10px;
|
|
24
|
+
border-top-left-radius: 10px;
|
|
25
|
+
border-bottom: 0px;
|
|
26
|
+
|
|
27
|
+
min-width: 0;
|
|
28
|
+
`,
|
|
29
|
+
list: css`
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-grow: 1;
|
|
32
|
+
justify-content: end;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
padding: 0 10px;
|
|
35
|
+
`,
|
|
36
|
+
button: css`
|
|
37
|
+
all: unset;
|
|
38
|
+
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
|
|
45
|
+
border-radius: 6px;
|
|
46
|
+
padding: 6px;
|
|
47
|
+
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
color: rgb(53, 55, 64);
|
|
50
|
+
|
|
51
|
+
&[data-state="active"] {
|
|
52
|
+
color: rgb(112, 81, 212);
|
|
53
|
+
border-bottom: 1px solid rgb(112, 81, 212);
|
|
54
|
+
border-bottom-left-radius: 0px;
|
|
55
|
+
border-bottom-right-radius: 0px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
transition: ease-in 0.1s;
|
|
60
|
+
background: #e3e3eb;
|
|
61
|
+
}
|
|
62
|
+
`,
|
|
63
|
+
description: css`
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: 4px;
|
|
67
|
+
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
color: rgb(53, 55, 64);
|
|
70
|
+
|
|
71
|
+
margin-left: 4px;
|
|
72
|
+
margin-right: 4px;
|
|
73
|
+
`,
|
|
74
|
+
description$item: css`
|
|
75
|
+
display: flex;
|
|
76
|
+
padding-left: 16px;
|
|
77
|
+
padding-right: 16px;
|
|
78
|
+
flex: 1 1 0%;
|
|
79
|
+
gap: 16px;
|
|
80
|
+
border-radius: 4px;
|
|
81
|
+
`,
|
|
82
|
+
copy: css`
|
|
83
|
+
display: flex;
|
|
84
|
+
padding-left: 8px;
|
|
85
|
+
padding-right: 8px;
|
|
86
|
+
align-items: center;
|
|
87
|
+
`
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const $code = {
|
|
91
|
+
host: css`
|
|
92
|
+
max-height: 400px;
|
|
93
|
+
background: linear-gradient(45deg, rgb(247, 247, 248) 0%, rgb(247, 247, 248) 100%) !important;
|
|
94
|
+
|
|
95
|
+
margin: 0;
|
|
96
|
+
padding: 8px 16px;
|
|
97
|
+
|
|
98
|
+
border-top: 1px solid rgb(236, 236, 241);
|
|
99
|
+
border-bottom-left-radius: 10px;
|
|
100
|
+
border-bottom-right-radius: 10px;
|
|
101
|
+
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
line-height: 20px;
|
|
104
|
+
white-space: pre-wrap;
|
|
105
|
+
word-break: break-all;
|
|
106
|
+
|
|
107
|
+
overflow-y: scroll;
|
|
108
|
+
`,
|
|
109
|
+
host$$full: css`
|
|
110
|
+
max-height: 100%;
|
|
111
|
+
`
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export const $mark = {
|
|
115
|
+
host: css`
|
|
116
|
+
display: flex;
|
|
117
|
+
border-left-width: 4px;
|
|
118
|
+
border-color: transparent;
|
|
119
|
+
margin: 4px 0;
|
|
120
|
+
`,
|
|
121
|
+
line: css`
|
|
122
|
+
flex: 1 1 0%;
|
|
123
|
+
`,
|
|
124
|
+
$$annotated: css`
|
|
125
|
+
border-color: #60A5FA;
|
|
126
|
+
background-color: #EEF2FF;
|
|
127
|
+
`
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const $lineNumber = {
|
|
131
|
+
host: css`
|
|
132
|
+
margin: 0 4px;
|
|
133
|
+
//text-align: right;
|
|
134
|
+
user-select: none;
|
|
135
|
+
opacity: 0.5;
|
|
136
|
+
`
|
|
137
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React, {useEffect, useState} from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs"; // TODO: remove and use separation
|
|
3
|
+
import {
|
|
4
|
+
AnnotationHandler,
|
|
5
|
+
InnerLine,
|
|
6
|
+
Pre,
|
|
7
|
+
highlight,
|
|
8
|
+
HighlightedCode,
|
|
9
|
+
} from "codehike/code"
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
CodeCopy,
|
|
13
|
+
} from "../CodeCopy";
|
|
14
|
+
import {theme as defaultTheme} from "./default-theme" // TODO: support multiple themes
|
|
15
|
+
import {withLocalStored} from "./withLocalStored";
|
|
16
|
+
import {
|
|
17
|
+
$sample,
|
|
18
|
+
$languages,
|
|
19
|
+
$code,
|
|
20
|
+
$mark,
|
|
21
|
+
$lineNumber
|
|
22
|
+
} from "./CodeSample.styles";
|
|
23
|
+
|
|
24
|
+
// TODO: try to use codehiki in build time / ASYNC !!! - we need rr server-components
|
|
25
|
+
// TODO: separate highlight
|
|
26
|
+
|
|
27
|
+
export interface MDXCodeSampleBlock {
|
|
28
|
+
/** This is the raw code. May include annotation comments. */
|
|
29
|
+
value: string;
|
|
30
|
+
/** The programming language. */
|
|
31
|
+
lang: string;
|
|
32
|
+
/** Metadata string (the content after the language name in a markdown codeblock). */
|
|
33
|
+
meta: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface CodeSampleProps {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
codeblocks: MDXCodeSampleBlock[];
|
|
40
|
+
size?: "full"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function CodeSample(props: CodeSampleProps) {
|
|
44
|
+
const [highlighted, setHighlighted] = useState<HighlightedCode[]>([]);
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
async function fetchHighlight() {
|
|
48
|
+
const result = await Promise.all(
|
|
49
|
+
props.codeblocks?.map((codeblock) => highlight(codeblock, defaultTheme))
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
setHighlighted(result);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
fetchHighlight();
|
|
56
|
+
}, [props.codeblocks]);
|
|
57
|
+
|
|
58
|
+
if (highlighted.length === 0) {
|
|
59
|
+
return <div>Loading</div>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (!highlighted) {
|
|
63
|
+
return <div>Loading</div>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<TabsPrimitive.Root
|
|
68
|
+
className={$sample.host}
|
|
69
|
+
style={highlighted[0]?.style}
|
|
70
|
+
defaultValue={highlighted[0]?.meta}
|
|
71
|
+
// localStorageKey={`preferredLanguage[${name}]`}
|
|
72
|
+
>
|
|
73
|
+
<div className={$languages.host}>
|
|
74
|
+
<$Description description={props.description}/>
|
|
75
|
+
|
|
76
|
+
<TabsPrimitive.List className={$languages.list}>
|
|
77
|
+
{props.codeblocks?.map(({meta}, i) => (
|
|
78
|
+
<TabsPrimitive.Trigger value={meta!} key={i} className={$languages.button}>
|
|
79
|
+
{meta}
|
|
80
|
+
</TabsPrimitive.Trigger>
|
|
81
|
+
))}
|
|
82
|
+
</TabsPrimitive.List>
|
|
83
|
+
|
|
84
|
+
<div className={$languages.copy}>
|
|
85
|
+
{props.codeblocks?.map((codeblock, i) => (
|
|
86
|
+
<TabsPrimitive.Content value={codeblock.meta!} asChild key={i}>
|
|
87
|
+
<CodeCopy text={codeblock.value}/>
|
|
88
|
+
</TabsPrimitive.Content>
|
|
89
|
+
))}
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
{highlighted?.map((codeblock, i) => (
|
|
94
|
+
<TabsPrimitive.Content value={codeblock.meta} key={i}>
|
|
95
|
+
<Pre
|
|
96
|
+
className={`
|
|
97
|
+
${$code.host}
|
|
98
|
+
${props?.size === "full" && $code.host$$full}
|
|
99
|
+
`}
|
|
100
|
+
style={codeblock?.style || codeblock?.style}
|
|
101
|
+
code={codeblock}
|
|
102
|
+
handlers={[mark, lineNumber]}
|
|
103
|
+
/>
|
|
104
|
+
</TabsPrimitive.Content>
|
|
105
|
+
))}
|
|
106
|
+
</TabsPrimitive.Root>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function $Description(props: { description: string }) {
|
|
111
|
+
return <div className={$languages.description}>
|
|
112
|
+
<div className={$languages.description$item}>
|
|
113
|
+
{props.description}
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const mark: AnnotationHandler = {
|
|
119
|
+
name: "Mark",
|
|
120
|
+
Line: ({annotation, ...props}) => {
|
|
121
|
+
return (
|
|
122
|
+
<div className={`${$mark.host} ${annotation && $mark.$$annotated}`}>
|
|
123
|
+
<InnerLine
|
|
124
|
+
merge={props}
|
|
125
|
+
className={$mark.line}
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
)
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const lineNumber: AnnotationHandler = {
|
|
133
|
+
name: "LineNumber",
|
|
134
|
+
Line: ({annotation, ...props}) => {
|
|
135
|
+
const width = props.totalLines.toString().length + 1
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<>
|
|
139
|
+
<span
|
|
140
|
+
style={{minWidth: `${width}ch`}}
|
|
141
|
+
className={$lineNumber.host}
|
|
142
|
+
>
|
|
143
|
+
{props.lineNumber}
|
|
144
|
+
</span>
|
|
145
|
+
<InnerLine merge={props}/>
|
|
146
|
+
</>
|
|
147
|
+
)
|
|
148
|
+
},
|
|
149
|
+
}
|
|
150
|
+
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
// from: https://marketplace.visualstudio.com/items?itemName=smockle.xcode-default-theme
|
|
2
|
+
|
|
3
|
+
import {Theme} from "@code-hike/lighter";
|
|
4
|
+
|
|
5
|
+
export const theme: Theme = {
|
|
6
|
+
type: "light",
|
|
7
|
+
colors: {
|
|
8
|
+
"list.focusForeground": "#FFFFFF",
|
|
9
|
+
"scrollbar.shadow": "#ffffff00",
|
|
10
|
+
"tab.activeBorder": "#ffffff",
|
|
11
|
+
"widget.shadow": "#ffffff00",
|
|
12
|
+
"activityBar.border": "#D9D7D5",
|
|
13
|
+
"editorGroup.border": "#D9D7D5",
|
|
14
|
+
"editorGroupHeader.tabsBorder": "#D9D7D5",
|
|
15
|
+
"editorWidget.border": "#D9D7D5",
|
|
16
|
+
"editorWidget.resizeBorder": "#D9D7D5",
|
|
17
|
+
"input.border": "#D9D7D5",
|
|
18
|
+
"notificationCenter.border": "#D9D7D5",
|
|
19
|
+
"notifications.border": "#D9D7D5",
|
|
20
|
+
"panel.border": "#D9D7D5",
|
|
21
|
+
"sideBar.border": "#D9D7D5",
|
|
22
|
+
"statusBar.border": "#D9D7D5",
|
|
23
|
+
"tab.border": "#D9D7D5",
|
|
24
|
+
"activityBar.background": "#ECECEC",
|
|
25
|
+
"statusBar.background": "#ECECEC",
|
|
26
|
+
"statusBar.noFolderBackground": "#ECECEC",
|
|
27
|
+
"statusBar.debuggingBackground": "#ECECEC",
|
|
28
|
+
"editorGroupHeader.tabsBackground": "#F5F5F5",
|
|
29
|
+
"editorWidget.background": "#F5F5F5",
|
|
30
|
+
"sideBar.background": "#F5F5F5",
|
|
31
|
+
"sideBarSectionHeader.background": "#F5F5F5",
|
|
32
|
+
"tab.inactiveBackground": "#F5F5F5",
|
|
33
|
+
"activityBarBadge.background": "#282828",
|
|
34
|
+
"activityBar.foreground": "#282828",
|
|
35
|
+
"statusBar.foreground": "#565456",
|
|
36
|
+
"input.placeholderForeground": "#C7C6C5",
|
|
37
|
+
"editorLineNumber.foreground": "#A6A6A6",
|
|
38
|
+
"editorLineNumber.activeForeground": "#282828",
|
|
39
|
+
foreground: "#282828",
|
|
40
|
+
"panelTitle.activeForeground": "#282828",
|
|
41
|
+
"sideBarTitle.foreground": "#282828",
|
|
42
|
+
"sideBarSectionHeader.foreground": "#282828",
|
|
43
|
+
"panelTitle.inactiveForeground": "#242424",
|
|
44
|
+
"tab.inactiveForeground": "#242424",
|
|
45
|
+
"list.highlightForeground": "#242424",
|
|
46
|
+
"editor.lineHighlightBackground": "#EEF5FE",
|
|
47
|
+
focusBorder: "#82ADF3",
|
|
48
|
+
"button.background": "#3C93FD",
|
|
49
|
+
"list.activeSelectionBackground": "#3C93FD",
|
|
50
|
+
"list.focusBackground": "#3C93FD",
|
|
51
|
+
"selection.background": "#B3D7FF",
|
|
52
|
+
"list.inactiveSelectionBackground": "#CECECE",
|
|
53
|
+
"terminal.ansiBlack": "#000000",
|
|
54
|
+
"terminal.ansiBrightBlack": "#000000",
|
|
55
|
+
"terminal.ansiRed": "#C41A16",
|
|
56
|
+
"terminal.ansiBrightRed": "#C41A16",
|
|
57
|
+
"terminal.ansiGreen": "#007400",
|
|
58
|
+
"terminal.ansiBrightGreen": "#007400",
|
|
59
|
+
"terminal.ansiYellow": "#643820",
|
|
60
|
+
"terminal.ansiBrightYellow": "#643820",
|
|
61
|
+
"terminal.ansiBlue": "#272AD8",
|
|
62
|
+
"terminal.ansiBrightBlue": "#272AD8",
|
|
63
|
+
"terminal.ansiMagenta": "#AA0D91",
|
|
64
|
+
"terminal.ansiBrightMagenta": "#AA0D91",
|
|
65
|
+
"terminal.ansiCyan": "#3F6E74",
|
|
66
|
+
"terminal.ansiBrightCyan": "#3F6E74",
|
|
67
|
+
},
|
|
68
|
+
tokenColors: [
|
|
69
|
+
{
|
|
70
|
+
scope: "new.expr entity.name",
|
|
71
|
+
settings: {
|
|
72
|
+
foreground: "#713DA9",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "Comments",
|
|
77
|
+
scope: ["comment", "comment storage.type"],
|
|
78
|
+
settings: {
|
|
79
|
+
foreground: "#536579",
|
|
80
|
+
fontStyle: "italic",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "CSS",
|
|
85
|
+
scope: [
|
|
86
|
+
"entity.other.attribute-name.pseudo-class.css",
|
|
87
|
+
"entity.other.attribute-name.pseudo-class.scss",
|
|
88
|
+
"entity.other.attribute-name.pseudo-element.css",
|
|
89
|
+
"entity.other.attribute-name.pseudo-element.scss",
|
|
90
|
+
"support.function.calc.css",
|
|
91
|
+
"support.function.calc.scss",
|
|
92
|
+
"support.type.property-name.css",
|
|
93
|
+
"support.type.property-name.scss",
|
|
94
|
+
"support.type.vendored.property-name.css",
|
|
95
|
+
"support.type.vendored.property-name.scss",
|
|
96
|
+
"meta.property-value.css support.constant",
|
|
97
|
+
"meta.property-value.scss support.constant",
|
|
98
|
+
"meta.property-value.css support.constant.property-value",
|
|
99
|
+
"meta.property-value.scss support.constant.property-value",
|
|
100
|
+
"support.function.transform.css",
|
|
101
|
+
"support.function.transform.scss",
|
|
102
|
+
],
|
|
103
|
+
settings: {
|
|
104
|
+
foreground: "#AA0D91",
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "Decorator",
|
|
109
|
+
scope: [
|
|
110
|
+
"meta.decorator",
|
|
111
|
+
"meta.decorator punctuation.decorator",
|
|
112
|
+
"meta.decorator variable.other.readwrite",
|
|
113
|
+
"meta.decorator meta.function-call entity.name.function",
|
|
114
|
+
],
|
|
115
|
+
settings: {
|
|
116
|
+
foreground: "#643820",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "Doctype",
|
|
121
|
+
scope: ["meta.tag.sgml.html"],
|
|
122
|
+
settings: {
|
|
123
|
+
foreground: "#A6A6A6",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "Functions",
|
|
128
|
+
scope: ["entity.name.function", "support.function"],
|
|
129
|
+
settings: {
|
|
130
|
+
foreground: "#7051d4",
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "Keys",
|
|
135
|
+
scope: [
|
|
136
|
+
"meta.property-list meta.property-name",
|
|
137
|
+
"support.type.property-name",
|
|
138
|
+
"support.type.map.key",
|
|
139
|
+
"entity.name.tag.yaml",
|
|
140
|
+
],
|
|
141
|
+
settings: {
|
|
142
|
+
foreground: "#7051d4",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "Keywords",
|
|
147
|
+
scope: [
|
|
148
|
+
"keyword.control",
|
|
149
|
+
"keyword.declaration",
|
|
150
|
+
"keyword.expressions-and-types",
|
|
151
|
+
"keyword.operator.new",
|
|
152
|
+
"keyword.reserved",
|
|
153
|
+
"keyword.statement",
|
|
154
|
+
"storage.type",
|
|
155
|
+
"storage.modifier",
|
|
156
|
+
"constant.language",
|
|
157
|
+
"variable.language.super",
|
|
158
|
+
"variable.language.this",
|
|
159
|
+
"text.html entity.name.tag",
|
|
160
|
+
"meta.tag entity.name.tag",
|
|
161
|
+
"meta.tag support.class",
|
|
162
|
+
"string.regexp keyword.other",
|
|
163
|
+
],
|
|
164
|
+
settings: {
|
|
165
|
+
foreground: "#AD3DA4",
|
|
166
|
+
fontStyle: "bold",
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "Operators",
|
|
171
|
+
scope: [
|
|
172
|
+
"storage.type.function.arrow",
|
|
173
|
+
"meta.template.expression punctuation",
|
|
174
|
+
"punctuation.separator.key-value",
|
|
175
|
+
"meta.object-literal.key meta.brace.square",
|
|
176
|
+
"meta.template.expression keyword.operator",
|
|
177
|
+
"keyword.operator.or.regexp",
|
|
178
|
+
"keyword.operator.quantifier",
|
|
179
|
+
"punctuation.definition.group.regexp",
|
|
180
|
+
"punctuation.definition.character-class",
|
|
181
|
+
],
|
|
182
|
+
settings: {
|
|
183
|
+
foreground: "#000000",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
scope: [
|
|
188
|
+
"meta.tag entity.other.attribute-name",
|
|
189
|
+
"constant.character.escape.backslash",
|
|
190
|
+
],
|
|
191
|
+
settings: {
|
|
192
|
+
foreground: "#816927",
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "Numbers",
|
|
197
|
+
scope: ["constant.numeric", "keyword.other.unit", "constant.other.color"],
|
|
198
|
+
settings: {
|
|
199
|
+
foreground: "#272AD8",
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "Strings",
|
|
204
|
+
scope: [
|
|
205
|
+
"string",
|
|
206
|
+
"variable.parameter.url.scss",
|
|
207
|
+
"markup.heading.markdown",
|
|
208
|
+
"beginning.punctuation.definition.list.markdown",
|
|
209
|
+
"meta.template.expression meta.embedded punctuation.definition.string.begin",
|
|
210
|
+
"meta.template.expression meta.embedded punctuation.definition.string.end",
|
|
211
|
+
],
|
|
212
|
+
settings: {
|
|
213
|
+
foreground: "#D12F1B",
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: "Types",
|
|
218
|
+
scope: [
|
|
219
|
+
"meta.type",
|
|
220
|
+
"meta.return.type",
|
|
221
|
+
"entity.name.type",
|
|
222
|
+
"support.type.primitive",
|
|
223
|
+
],
|
|
224
|
+
settings: {
|
|
225
|
+
foreground: "#713DA9",
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
scope: [
|
|
230
|
+
"meta.objectliteral variable.other.object",
|
|
231
|
+
"entity.name.type.module",
|
|
232
|
+
"entity.other.inherited-class",
|
|
233
|
+
"variable.scss",
|
|
234
|
+
"variable.other.bracket.shell",
|
|
235
|
+
"entity.name.function.scss",
|
|
236
|
+
],
|
|
237
|
+
settings: {
|
|
238
|
+
foreground: "#3F6E74",
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
scope: [
|
|
243
|
+
"keyword.control.at-rule",
|
|
244
|
+
"meta.import variable.other.readwrite",
|
|
245
|
+
"meta.definition.variable variable.other.readwrite",
|
|
246
|
+
"meta.definition.variable variable.other.constant",
|
|
247
|
+
"meta.template.expression variable.other.readwrite",
|
|
248
|
+
"meta.template.expression variable.other.constant",
|
|
249
|
+
"support.constant.property-value",
|
|
250
|
+
],
|
|
251
|
+
settings: {
|
|
252
|
+
foreground: "#000000",
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
scope: [
|
|
257
|
+
"variable.other.property",
|
|
258
|
+
"variable.other.object.property",
|
|
259
|
+
"support.variable.property",
|
|
260
|
+
],
|
|
261
|
+
settings: {
|
|
262
|
+
foreground: "#713DA9",
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
}
|