├── .npmrc ├── packages ├── shaku-ui │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── package.json ├── shaku-code-annotate-core │ ├── src │ │ ├── index.ts │ │ └── __tests__ │ │ │ └── parseDataEntries.test.ts │ ├── docs │ │ └── static │ │ │ └── shaku-code-annotate-screenshot.png │ ├── vitest.config.ts │ ├── tsconfig.json │ └── README.md ├── shaku-code-annotate-sugar-high │ ├── src │ │ ├── types.mts │ │ └── escapeHtml.mts │ ├── vitest.config.ts │ └── tsconfig.json ├── shaku-code-annotate-shiki │ ├── docs │ │ └── static │ │ │ └── shaku-code-annotate-screenshot.png │ ├── src │ │ ├── index.ts │ │ ├── escapeHtml.ts │ │ └── __tests__ │ │ │ └── langs │ │ │ ├── coffee │ │ │ └── output.txt │ │ │ ├── crystal │ │ │ └── output.txt │ │ │ ├── f# │ │ │ └── output.txt │ │ │ ├── elixir │ │ │ └── output.txt │ │ │ ├── elm │ │ │ └── output.txt │ │ │ ├── fish │ │ │ └── output.txt │ │ │ ├── glsl │ │ │ └── output.txt │ │ │ ├── gnuplot │ │ │ └── output.txt │ │ │ ├── groovy │ │ │ └── output.txt │ │ │ ├── imba │ │ │ └── output.txt │ │ │ ├── jison │ │ │ └── output.txt │ │ │ ├── jssm │ │ │ └── output.txt │ │ │ ├── git-commit │ │ │ └── output.txt │ │ │ ├── properties │ │ │ └── output.txt │ │ │ ├── bicep │ │ │ └── output.txt │ │ │ ├── d │ │ │ └── output.txt │ │ │ ├── markdown │ │ │ └── output.txt │ │ │ ├── cue │ │ │ └── output.txt │ │ │ ├── dart │ │ │ └── output.txt │ │ │ ├── dax │ │ │ └── output.txt │ │ │ ├── clojure │ │ │ └── output.txt │ │ │ ├── dream-maker │ │ │ └── output.txt │ │ │ ├── haskell │ │ │ └── output.txt │ │ │ ├── clarity │ │ │ └── output.txt │ │ │ ├── latex │ │ │ └── output.txt │ │ │ ├── hcl │ │ │ └── output.txt │ │ │ ├── hlsl │ │ │ └── output.txt │ │ │ ├── dockerfile │ │ │ └── output.txt │ │ │ ├── powerquery │ │ │ └── output.txt │ │ │ ├── batch │ │ │ └── output.txt │ │ │ ├── raku │ │ │ └── output.txt │ │ │ ├── ini │ │ │ └── output.txt │ │ │ ├── cmake │ │ │ └── output.txt │ │ │ ├── pascal │ │ │ └── output.txt │ │ │ ├── rel │ │ │ └── output.txt │ │ │ ├── applescript │ │ │ └── output.txt │ │ │ ├── json │ │ │ └── output.txt │ │ │ ├── make │ │ │ └── output.txt │ │ │ ├── makefile │ │ │ └── output.txt │ │ │ ├── cobol │ │ │ └── output.txt │ │ │ ├── zsh │ │ │ └── output.txt │ │ │ ├── bash │ │ │ └── output.txt │ │ │ ├── erb │ │ │ └── output.txt │ │ │ ├── ruby │ │ │ └── output.txt │ │ │ ├── shell │ │ │ └── output.txt │ │ │ ├── blade │ │ │ └── output.txt │ │ │ ├── shellscript │ │ │ └── output.txt │ │ │ ├── graphql │ │ │ └── output.txt │ │ │ ├── abap │ │ │ └── output.txt │ │ │ ├── css │ │ │ └── output.txt │ │ │ ├── r │ │ │ └── output.txt │ │ │ ├── sass │ │ │ └── output.txt │ │ │ ├── stata │ │ │ └── output.txt │ │ │ ├── html │ │ │ └── output.txt │ │ │ ├── objc │ │ │ └── output.txt │ │ │ ├── razor │ │ │ └── output.txt │ │ │ ├── matlab │ │ │ └── output.txt │ │ │ ├── zenscript │ │ │ └── output.txt │ │ │ ├── liquid │ │ │ └── output.txt │ │ │ └── logo │ │ │ └── output.txt │ ├── vitest.config.ts │ └── tsconfig.json ├── tsconfig │ ├── package.json │ ├── react-library.json │ ├── nextjs.json │ └── base.json ├── remark-shaku-code-annotate │ ├── docs │ │ └── static │ │ │ └── shaku-code-annotate-screenshot.png │ ├── src │ │ └── __tests__ │ │ │ └── langs │ │ │ ├── rst │ │ │ └── output.txt │ │ │ ├── coffe │ │ │ └── output.txt │ │ │ ├── coffee │ │ │ └── output.txt │ │ │ ├── crystal │ │ │ └── output.txt │ │ │ ├── bibtex │ │ │ └── output.txt │ │ │ ├── fsharp │ │ │ └── output.txt │ │ │ ├── jade │ │ │ └── output.txt │ │ │ ├── elm │ │ │ └── output.txt │ │ │ ├── f# │ │ │ └── output.txt │ │ │ ├── fish │ │ │ └── output.txt │ │ │ ├── glsl │ │ │ └── output.txt │ │ │ ├── imba │ │ │ └── output.txt │ │ │ ├── jssm │ │ │ └── output.txt │ │ │ ├── elixir │ │ │ └── output.txt │ │ │ ├── git-commit │ │ │ └── output.txt │ │ │ ├── gnuplot │ │ │ └── output.txt │ │ │ ├── groovy │ │ │ └── output.txt │ │ │ ├── jison │ │ │ └── output.txt │ │ │ ├── properties │ │ │ └── output.txt │ │ │ ├── bicep │ │ │ └── output.txt │ │ │ ├── cue │ │ │ └── output.txt │ │ │ ├── d │ │ │ └── output.txt │ │ │ ├── dax │ │ │ └── output.txt │ │ │ ├── markdown │ │ │ └── output.txt │ │ │ ├── dart │ │ │ └── output.txt │ │ │ ├── clarity │ │ │ └── output.txt │ │ │ ├── clojure │ │ │ └── output.txt │ │ │ ├── dream-maker │ │ │ └── output.txt │ │ │ ├── haskell │ │ │ └── output.txt │ │ │ ├── latex │ │ │ └── output.txt │ │ │ ├── hcl │ │ │ └── output.txt │ │ │ ├── hlsl │ │ │ └── output.txt │ │ │ ├── dockerfile │ │ │ └── output.txt │ │ │ ├── powerquery │ │ │ └── output.txt │ │ │ ├── batch │ │ │ └── output.txt │ │ │ ├── raku │ │ │ └── output.txt │ │ │ ├── ini │ │ │ └── output.txt │ │ │ ├── cmake │ │ │ └── output.txt │ │ │ ├── pascal │ │ │ └── output.txt │ │ │ ├── pug │ │ │ └── output.txt │ │ │ ├── rel │ │ │ └── output.txt │ │ │ ├── applescript │ │ │ └── output.txt │ │ │ ├── fsl │ │ │ └── output.txt │ │ │ ├── make │ │ │ └── output.txt │ │ │ ├── makefile │ │ │ └── output.txt │ │ │ ├── bash │ │ │ └── output.txt │ │ │ ├── cobol │ │ │ └── output.txt │ │ │ ├── shell │ │ │ └── output.txt │ │ │ ├── zsh │ │ │ └── output.txt │ │ │ ├── blade │ │ │ └── output.txt │ │ │ ├── erb │ │ │ └── output.txt │ │ │ ├── liquid │ │ │ └── output.txt │ │ │ ├── ruby │ │ │ └── output.txt │ │ │ ├── graphql │ │ │ └── output.txt │ │ │ ├── shellscript │ │ │ └── output.txt │ │ │ ├── abap │ │ │ └── output.txt │ │ │ ├── css │ │ │ └── output.txt │ │ │ ├── r │ │ │ └── output.txt │ │ │ ├── sass │ │ │ └── output.txt │ │ │ ├── jinja-html │ │ │ └── output.txt │ │ │ ├── stata │ │ │ └── output.txt │ │ │ ├── html │ │ │ └── output.txt │ │ │ ├── objc │ │ │ └── output.txt │ │ │ ├── matlab │ │ │ └── output.txt │ │ │ └── zenscript │ │ │ └── output.txt │ ├── vitest.config.ts │ └── tsconfig.json ├── shaku-code-annotate-shiki-transformer │ ├── docs │ │ └── static │ │ │ └── shaku-code-annotate-screenshot.png │ ├── vitest.config.ts │ ├── src │ │ └── __tests__ │ │ │ └── langs │ │ │ ├── coffee │ │ │ └── output.txt │ │ │ ├── crystal │ │ │ └── output.txt │ │ │ ├── elixir │ │ │ └── output.txt │ │ │ ├── elm │ │ │ └── output.txt │ │ │ ├── f# │ │ │ └── output.txt │ │ │ ├── fish │ │ │ └── output.txt │ │ │ ├── glsl │ │ │ └── output.txt │ │ │ ├── hcl │ │ │ └── output.txt │ │ │ ├── hlsl │ │ │ └── output.txt │ │ │ ├── imba │ │ │ └── output.txt │ │ │ ├── jison │ │ │ └── output.txt │ │ │ ├── jssm │ │ │ └── output.txt │ │ │ ├── git-commit │ │ │ └── output.txt │ │ │ ├── gnuplot │ │ │ └── output.txt │ │ │ ├── groovy │ │ │ └── output.txt │ │ │ ├── properties │ │ │ └── output.txt │ │ │ ├── bicep │ │ │ └── output.txt │ │ │ ├── cue │ │ │ └── output.txt │ │ │ ├── d │ │ │ └── output.txt │ │ │ ├── dart │ │ │ └── output.txt │ │ │ ├── dax │ │ │ └── output.txt │ │ │ ├── cmake │ │ │ └── output.txt │ │ │ ├── haskell │ │ │ └── output.txt │ │ │ ├── clarity │ │ │ └── output.txt │ │ │ ├── clojure │ │ │ └── output.txt │ │ │ ├── dream-maker │ │ │ └── output.txt │ │ │ ├── latex │ │ │ └── output.txt │ │ │ ├── markdown │ │ │ └── output.txt │ │ │ ├── dockerfile │ │ │ └── output.txt │ │ │ ├── powerquery │ │ │ └── output.txt │ │ │ ├── batch │ │ │ └── output.txt │ │ │ ├── stata │ │ │ └── output.txt │ │ │ ├── raku │ │ │ └── output.txt │ │ │ ├── applescript │ │ │ └── output.txt │ │ │ ├── ini │ │ │ └── output.txt │ │ │ ├── rel │ │ │ └── output.txt │ │ │ ├── pascal │ │ │ └── output.txt │ │ │ ├── proto │ │ │ └── output.txt │ │ │ ├── graphql │ │ │ └── output.txt │ │ │ ├── css │ │ │ └── output.txt │ │ │ ├── html │ │ │ └── output.txt │ │ │ ├── make │ │ │ └── output.txt │ │ │ ├── r │ │ │ └── output.txt │ │ │ ├── bash │ │ │ └── output.txt │ │ │ ├── makefile │ │ │ └── output.txt │ │ │ ├── shell │ │ │ └── output.txt │ │ │ ├── zsh │ │ │ └── output.txt │ │ │ ├── cobol │ │ │ └── output.txt │ │ │ ├── erb │ │ │ └── output.txt │ │ │ ├── objc │ │ │ └── output.txt │ │ │ ├── shellscript │ │ │ └── output.txt │ │ │ ├── blade │ │ │ └── output.txt │ │ │ ├── ruby │ │ │ └── output.txt │ │ │ ├── liquid │ │ │ └── output.txt │ │ │ ├── abap │ │ │ └── output.txt │ │ │ ├── kql │ │ │ └── output.txt │ │ │ ├── sas │ │ │ └── output.txt │ │ │ ├── perl │ │ │ └── output.txt │ │ │ ├── perl6 │ │ │ └── output.txt │ │ │ ├── sass │ │ │ └── output.txt │ │ │ ├── awk │ │ │ └── output.txt │ │ │ ├── zenscript │ │ │ └── output.txt │ │ │ ├── asm │ │ │ └── output.txt │ │ │ ├── matlab │ │ │ └── output.txt │ │ │ ├── logo │ │ │ └── output.txt │ │ │ ├── erlang │ │ │ └── output.txt │ │ │ ├── plsql │ │ │ └── output.txt │ │ │ ├── tcl │ │ │ └── output.txt │ │ │ ├── reg │ │ │ └── output.txt │ │ │ └── marko │ │ │ └── output.txt │ └── tsconfig.json ├── marked-shaku-code-annotate │ ├── vitest.config.ts │ ├── tsconfig.json │ └── src │ │ └── __tests__ │ │ ├── langs │ │ ├── coffee │ │ │ └── output.txt │ │ ├── crystal │ │ │ └── output.txt │ │ ├── elm │ │ │ └── output.txt │ │ ├── f# │ │ │ └── output.txt │ │ ├── fish │ │ │ └── output.txt │ │ ├── glsl │ │ │ └── output.txt │ │ ├── imba │ │ │ └── output.txt │ │ ├── jssm │ │ │ └── output.txt │ │ ├── elixir │ │ │ └── output.txt │ │ ├── git-commit │ │ │ └── output.txt │ │ ├── gnuplot │ │ │ └── output.txt │ │ ├── groovy │ │ │ └── output.txt │ │ ├── jison │ │ │ └── output.txt │ │ ├── properties │ │ │ └── output.txt │ │ ├── bicep │ │ │ └── output.txt │ │ ├── cue │ │ │ └── output.txt │ │ ├── d │ │ │ └── output.txt │ │ ├── dax │ │ │ └── output.txt │ │ ├── markdown │ │ │ └── output.txt │ │ ├── dart │ │ │ └── output.txt │ │ ├── clarity │ │ │ └── output.txt │ │ ├── clojure │ │ │ └── output.txt │ │ ├── dream-maker │ │ │ └── output.txt │ │ ├── haskell │ │ │ └── output.txt │ │ ├── latex │ │ │ └── output.txt │ │ ├── hcl │ │ │ └── output.txt │ │ ├── hlsl │ │ │ └── output.txt │ │ ├── dockerfile │ │ │ └── output.txt │ │ ├── powerquery │ │ │ └── output.txt │ │ ├── batch │ │ │ └── output.txt │ │ ├── raku │ │ │ └── output.txt │ │ ├── ini │ │ │ └── output.txt │ │ ├── cmake │ │ │ └── output.txt │ │ ├── pascal │ │ │ └── output.txt │ │ ├── rel │ │ │ └── output.txt │ │ ├── applescript │ │ │ └── output.txt │ │ ├── make │ │ │ └── output.txt │ │ ├── makefile │ │ │ └── output.txt │ │ ├── bash │ │ │ └── output.txt │ │ ├── cobol │ │ │ └── output.txt │ │ ├── shell │ │ │ └── output.txt │ │ ├── zsh │ │ │ └── output.txt │ │ ├── blade │ │ │ └── output.txt │ │ ├── erb │ │ │ └── output.txt │ │ ├── liquid │ │ │ └── output.txt │ │ ├── ruby │ │ │ └── output.txt │ │ ├── graphql │ │ │ └── output.txt │ │ ├── shellscript │ │ │ └── output.txt │ │ ├── abap │ │ │ └── output.txt │ │ ├── css │ │ │ └── output.txt │ │ ├── r │ │ │ └── output.txt │ │ ├── sass │ │ │ └── output.txt │ │ ├── stata │ │ │ └── output.txt │ │ ├── objc │ │ │ └── output.txt │ │ ├── html │ │ │ └── output.txt │ │ ├── matlab │ │ │ └── output.txt │ │ ├── zenscript │ │ │ └── output.txt │ │ └── logo │ │ │ └── output.txt │ │ └── languages.test.ts └── eslint-config-custom │ ├── index.js │ └── package.json ├── .vscode └── settings.json ├── examples └── web │ ├── .eslintrc.js │ ├── app │ ├── ui │ │ ├── page.tsx │ │ └── demo.mdx │ ├── layout.tsx │ ├── sugar-high-token-inspector │ │ ├── SugarHighTokenVisualizer.module.css │ │ └── page.tsx │ ├── playground │ │ └── page.tsx │ └── sugar-high │ │ └── page.tsx │ ├── components │ ├── Heading.module.css │ ├── filterNonNull.ts │ ├── CodeSnippet.module.css │ ├── debouce.ts │ ├── CodeEditor.tsx │ ├── ShikiTokenInspector │ │ └── ShikiTokenVisualizer.module.css │ ├── useDebouncedCallback.ts │ └── Fetcher.ts │ ├── public │ └── static │ │ └── img │ │ └── favicon.jpg │ ├── .vscode │ └── settings.json │ ├── mdx-component.tsx │ ├── next-env.d.ts │ ├── tsconfig.json │ ├── .gitignore │ ├── mdx-components.tsx │ └── css │ └── sugar-high.css ├── .eslintrc.js ├── .changeset └── config.json ├── turbo.json ├── .npmignore ├── .gitignore └── .github └── ISSUE_TEMPLATE ├── bug_report.md └── feature_request.md /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers = true 2 | -------------------------------------------------------------------------------- /packages/shaku-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./Reveal"; 2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-core/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./parser"; 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": ["jser", "migacss", "shaku", "shiki"] 3 | } 4 | -------------------------------------------------------------------------------- /examples/web/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["custom"], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-sugar-high/src/types.mts: -------------------------------------------------------------------------------- 1 | export type Token = { 2 | type: string; 3 | content: string; 4 | }; 5 | -------------------------------------------------------------------------------- /examples/web/app/ui/page.tsx: -------------------------------------------------------------------------------- 1 | import Demo from "./demo.mdx"; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /examples/web/components/Heading.module.css: -------------------------------------------------------------------------------- 1 | .heading a { 2 | opacity: 0; 3 | } 4 | 5 | .heading:hover a { 6 | opacity: 1; 7 | } 8 | -------------------------------------------------------------------------------- /examples/web/public/static/img/favicon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JSerZANP/shaku/HEAD/examples/web/public/static/img/favicon.jpg -------------------------------------------------------------------------------- /examples/web/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "../../node_modules/typescript/lib", 3 | "typescript.enablePromptUseWorkspaceTsdk": true 4 | } -------------------------------------------------------------------------------- /examples/web/components/filterNonNull.ts: -------------------------------------------------------------------------------- 1 | export function filterNonNull(arr: Array): Array> { 2 | return arr.filter((item): item is NonNullable => Boolean(item)); 3 | } 4 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-core/docs/static/shaku-code-annotate-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JSerZANP/shaku/HEAD/packages/shaku-code-annotate-core/docs/static/shaku-code-annotate-screenshot.png -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/docs/static/shaku-code-annotate-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JSerZANP/shaku/HEAD/packages/shaku-code-annotate-shiki/docs/static/shaku-code-annotate-screenshot.png -------------------------------------------------------------------------------- /packages/tsconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tsconfig", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "MIT", 6 | "publishConfig": { 7 | "access": "public" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/docs/static/shaku-code-annotate-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JSerZANP/shaku/HEAD/packages/remark-shaku-code-annotate/docs/static/shaku-code-annotate-screenshot.png -------------------------------------------------------------------------------- /examples/web/mdx-component.tsx: -------------------------------------------------------------------------------- 1 | import type { MDXComponents } from "mdx/types"; 2 | 3 | export function useMDXComponents(components: MDXComponents): MDXComponents { 4 | return { 5 | ...components, 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/index.ts: -------------------------------------------------------------------------------- 1 | export { defaultCode, supportedLangs } from "./defaultCode"; 2 | export { 3 | getShakuHighlighters, 4 | type ShakuHighlighterOptions, 5 | } from "./getHighlighters"; 6 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/rst/output.txt: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /examples/web/components/CodeSnippet.module.css: -------------------------------------------------------------------------------- 1 | .code pre { 2 | border: 0; 3 | margin: 0; 4 | font-size: 14px; 5 | /* for code snippet, only dark snippet, so have to force display */ 6 | display: block !important; 7 | } 8 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/docs/static/shaku-code-annotate-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JSerZANP/shaku/HEAD/packages/shaku-code-annotate-shiki-transformer/docs/static/shaku-code-annotate-screenshot.png -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | /// 3 | export default defineConfig({ 4 | test: { 5 | testTimeout: 1000 * 60 * 20, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | /// 3 | export default defineConfig({ 4 | test: { 5 | testTimeout: 1000 * 60 * 20, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-core/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | /// 3 | export default defineConfig({ 4 | test: { 5 | testTimeout: 1000 * 60 * 20, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | /// 3 | export default defineConfig({ 4 | test: { 5 | testTimeout: 1000 * 60 * 20, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /examples/web/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-sugar-high/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | /// 3 | export default defineConfig({ 4 | test: { 5 | testTimeout: 1000 * 60 * 20, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | /// 3 | export default defineConfig({ 4 | test: { 5 | testTimeout: 1000 * 60 * 20, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /examples/web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/nextjs.json", 3 | "include": [ 4 | "next-env.d.ts", 5 | "**/*.ts", 6 | "**/*.tsx", 7 | ".next/types/**/*.ts" 8 | ], 9 | "exclude": [ 10 | "node_modules" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | // This tells ESLint to load the config from the package `eslint-config-custom` 4 | extends: ["custom"], 5 | settings: { 6 | next: { 7 | rootDir: ["apps/*/"], 8 | }, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/escapeHtml.ts: -------------------------------------------------------------------------------- 1 | export function escapeHtml(html: string) { 2 | return html 3 | .replace(/&/g, "&") 4 | .replace(//g, ">") 6 | .replace(/"/g, """) 7 | .replace(/'/g, "'"); 8 | } 9 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-sugar-high/src/escapeHtml.mts: -------------------------------------------------------------------------------- 1 | export function escapeHtml(html: string) { 2 | return html 3 | .replace(/&/g, "&") 4 | .replace(//g, ">") 6 | .replace(/"/g, """) 7 | .replace(/'/g, "'"); 8 | } 9 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["next", "turbo", "prettier"], 3 | rules: { 4 | "@next/next/no-html-link-for-pages": "off", 5 | }, 6 | parserOptions: { 7 | babelOptions: { 8 | presets: [require.resolve("next/babel")], 9 | }, 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/tsconfig/react-library.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "React Library", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "react-jsx", 7 | "lib": ["ES2015"], 8 | "module": "ESNext", 9 | "target": "es6" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /examples/web/components/debouce.ts: -------------------------------------------------------------------------------- 1 | export function debounce(func: (...args: unknown[]) => unknown, wait = 1000) { 2 | let timer: number = 0; 3 | 4 | return function (this: any, ...args: unknown[]) { 5 | clearTimeout(timer); 6 | timer = window.setTimeout(() => { 7 | func.apply(this, args); 8 | }, wait); 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/coffe/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "noEmit": true, 10 | "strict": true 11 | }, 12 | "exclude": ["node_modules"] 13 | } -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "noEmit": true, 10 | "strict": true 11 | }, 12 | "exclude": ["node_modules"] 13 | } 14 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "globalDependencies": ["**/.env.*local"], 4 | "pipeline": { 5 | "build": { 6 | "outputs": [".next/**", "!.next/cache/**", "dist/**"], 7 | "dependsOn": ["^build"] 8 | }, 9 | "lint": {}, 10 | "dev": { 11 | "cache": false, 12 | "persistent": true 13 | }, 14 | "test": {} 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/coffee/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/crystal/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "noEmit": true, 10 | "strict": true, 11 | "target": "ES2015" 12 | }, 13 | "exclude": ["node_modules"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-custom", 3 | "version": "0.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "dependencies": { 7 | "eslint-config-next": "latest", 8 | "eslint-config-prettier": "^8.3.0", 9 | "eslint-plugin-react": "7.28.0", 10 | "eslint-config-turbo": "latest" 11 | }, 12 | "publishConfig": { 13 | "access": "public" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "noEmit": true, 10 | "strict": true, 11 | "target": "ES2015" 12 | }, 13 | "exclude": ["node_modules"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/coffee/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/crystal/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-sugar-high/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node16", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "noEmit": true, 10 | "strict": true, 11 | "target": "ES2015" 12 | }, 13 | "exclude": ["node_modules"] 14 | } 15 | -------------------------------------------------------------------------------- /examples/web/components/CodeEditor.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import Editor from "@monaco-editor/react"; 4 | 5 | export function CodeEditor({ 6 | defaultValue, 7 | onChange, 8 | }: { 9 | defaultValue: string; 10 | onChange: (value: string) => void; 11 | }) { 12 | return ( 13 | {}} 17 | /> 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-core/README.md: -------------------------------------------------------------------------------- 1 | # shaku-code-annotate-core 2 | 3 | The parser of comments for Shaku. 4 | 5 | ## Usage 6 | 7 | ```ts 8 | import { parseLine } from "shaku-code-annotate-core"; 9 | 10 | const shakuLine = parseLine("@highlight"); 11 | // { 12 | // type: "DirectiveHighlight"; 13 | // config: { 14 | // isEscaped: boolean; 15 | // mark: "start" | "end" | "below"; 16 | // }; 17 | // }; 18 | ``` 19 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "noEmit": true, 10 | "strict": true, 11 | "target": "ES2018" 12 | }, 13 | "exclude": ["node_modules"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/coffee/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/crystal/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee

Hello!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/coffee/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/crystal/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/bibtex/output.txt: -------------------------------------------------------------------------------- 1 |
% Another reference

Hello!

2 | -------------------------------------------------------------------------------- /examples/web/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import "../css/global.css"; 2 | export default function RootLayout({ 3 | // Layouts must accept a children prop. 4 | // This will be populated with nested layouts or pages 5 | children, 6 | }: { 7 | children: React.ReactNode; 8 | }) { 9 | return ( 10 | 11 | Shaku 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /examples/web/components/ShikiTokenInspector/ShikiTokenVisualizer.module.css: -------------------------------------------------------------------------------- 1 | .code pre { 2 | border: 0; 3 | margin: 0; 4 | font-size: 14px; 5 | border: 1px solid var(--color-line-3rd); 6 | } 7 | 8 | .token { 9 | border: 1px solid rgb(218 145 31 / 73%); 10 | margin: 0 1px; 11 | border-radius: 3px; 12 | } 13 | 14 | .token.selected, 15 | .token:hover { 16 | background-color: rgba(255, 255, 0, 0.334); 17 | cursor: pointer; 18 | } 19 | 20 | .line { 21 | line-height: 1.5; 22 | } 23 | -------------------------------------------------------------------------------- /packages/shaku-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "strict": true, 10 | "target": "esnext", 11 | "jsx": "react", 12 | "outDir": "dist", 13 | "declaration": true 14 | }, 15 | "include": ["src/**/*"], 16 | "exclude": ["node_modules"] 17 | } 18 | -------------------------------------------------------------------------------- /examples/web/app/sugar-high-token-inspector/SugarHighTokenVisualizer.module.css: -------------------------------------------------------------------------------- 1 | .code pre { 2 | border: 0; 3 | margin: 0; 4 | font-size: 14px; 5 | border: 1px solid var(--color-line-3rd); 6 | } 7 | 8 | .token { 9 | border: 1px solid rgb(218 145 31 / 73%); 10 | margin: 0 1px; 11 | border-radius: 3px; 12 | min-width: 3px; 13 | } 14 | 15 | .token.selected, 16 | .token:hover { 17 | background-color: rgba(255, 255, 0, 0.334); 18 | cursor: pointer; 19 | } 20 | 21 | .line { 22 | line-height: 1.5; 23 | } 24 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/fsharp/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/elixir/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/elm/output.txt: -------------------------------------------------------------------------------- 1 |
-- coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/f#/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/fish/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/glsl/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/hcl/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/hlsl/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/imba/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/jison/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/jssm/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/git-commit/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/gnuplot/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/groovy/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/properties/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/bicep/output.txt: -------------------------------------------------------------------------------- 1 |
// Define a storage
----

Hello!

-------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # next.js 12 | .next/ 13 | out/ 14 | build 15 | 16 | # misc 17 | .DS_Store 18 | *.pem 19 | 20 | # debug 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | # local env files 26 | .env 27 | .env.local 28 | .env.development.local 29 | .env.test.local 30 | .env.production.local 31 | 32 | # turbo 33 | .turbo 34 | 35 | # vercel 36 | .vercel 37 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/cue/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/d/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/dart/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/dax/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /examples/web/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | -------------------------------------------------------------------------------- /examples/web/components/useDebouncedCallback.ts: -------------------------------------------------------------------------------- 1 | import { useMemo, useRef } from "react"; 2 | 3 | export default function useDebouncedCallback( 4 | callback: (...args: T[]) => void, 5 | delay: number 6 | ) { 7 | const ref = useRef(0); 8 | 9 | const debouncedCallback = useMemo(() => { 10 | const run = (...args: T[]) => { 11 | window.clearTimeout(ref.current); 12 | ref.current = window.setTimeout(() => callback(...args), delay); 13 | }; 14 | return run; 15 | }, [callback, delay]); 16 | 17 | return debouncedCallback; 18 | } 19 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/jade/output.txt: -------------------------------------------------------------------------------- 1 |
body
// This is a comment in Jade
// ----
2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/cmake/output.txt: -------------------------------------------------------------------------------- 1 |
# This is a single-line comment
----

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/haskell/output.txt: -------------------------------------------------------------------------------- 1 |
-- This is a single-line
---

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/f#/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/clarity/output.txt: -------------------------------------------------------------------------------- 1 |
;; This is a single-line comment 
---

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/clojure/output.txt: -------------------------------------------------------------------------------- 1 |
; This is a single-line comment 
---

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/dream-maker/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/elixir/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/elm/output.txt: -------------------------------------------------------------------------------- 1 |
-- coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/fish/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/glsl/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/gnuplot/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/groovy/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/imba/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/jison/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/jssm/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/elm/output.txt: -------------------------------------------------------------------------------- 1 |
-- coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/f#/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/fish/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/glsl/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/imba/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/jssm/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/latex/output.txt: -------------------------------------------------------------------------------- 1 |
documentclass{article}
-------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/markdown/output.txt: -------------------------------------------------------------------------------- 1 |
# Markdown Comments
----

Hello

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/git-commit/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/properties/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/elixir/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/git-commit/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/gnuplot/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/groovy/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/jison/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/properties/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/elm/output.txt: -------------------------------------------------------------------------------- 1 |
-- coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/f#/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/fish/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/glsl/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/imba/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/jssm/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/bicep/output.txt: -------------------------------------------------------------------------------- 1 |
// Define a storage
----
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/d/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/markdown/output.txt: -------------------------------------------------------------------------------- 1 |
# Markdown Comments
----
Hello
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/bicep/output.txt: -------------------------------------------------------------------------------- 1 |
// Define a storage
----

Hello!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/elixir/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/git-commit/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/gnuplot/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/groovy/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/jison/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/properties/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/dockerfile/output.txt: -------------------------------------------------------------------------------- 1 |
FROM node:14
---

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/powerquery/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a single-line comment
-----------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/cue/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/dart/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/dax/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----
Hello!
-------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # next.js 12 | .next/ 13 | out/ 14 | build 15 | 16 | # misc 17 | .DS_Store 18 | *.pem 19 | 20 | # debug 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | # local env files 26 | .env 27 | .env.local 28 | .env.development.local 29 | .env.test.local 30 | .env.production.local 31 | 32 | # turbo 33 | .turbo 34 | 35 | # vercel 36 | .vercel 37 | 38 | # build 39 | dist 40 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/cue/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/d/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/dax/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/markdown/output.txt: -------------------------------------------------------------------------------- 1 |
# Markdown Comments
----

Hello

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/bicep/output.txt: -------------------------------------------------------------------------------- 1 |
// Define a storage
----

Hello!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/clojure/output.txt: -------------------------------------------------------------------------------- 1 |
; This is a single-line comment
---
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/dream-maker/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/haskell/output.txt: -------------------------------------------------------------------------------- 1 |
-- This is a single-line
---
Hello World!
-------------------------------------------------------------------------------- /examples/web/components/Fetcher.ts: -------------------------------------------------------------------------------- 1 | export class Fetcher { 2 | data: null | K; 3 | promise: null | Promise; 4 | error: any; 5 | constructor(private fetcher: () => Promise) {} 6 | fetch() { 7 | if (this.data != null) return this.data; 8 | if (this.error != null) throw this.error; 9 | if (!this.promise) { 10 | this.promise = this.fetcher() 11 | .then((data) => { 12 | this.data = data; 13 | }) 14 | .catch((error) => { 15 | this.error = error; 16 | }); 17 | } 18 | throw this.promise; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/dart/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/cue/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/d/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/dax/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/markdown/output.txt: -------------------------------------------------------------------------------- 1 |
# Markdown Comments
----

Hello

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/batch/output.txt: -------------------------------------------------------------------------------- 1 |
echo Batch Script Example
-----

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/stata/output.txt: -------------------------------------------------------------------------------- 1 |
use "mydata.dta"
------

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/clarity/output.txt: -------------------------------------------------------------------------------- 1 |
;; This is a single-line comment
---
Hello!
-------------------------------------------------------------------------------- /examples/web/app/playground/page.tsx: -------------------------------------------------------------------------------- 1 | import Head from "next/head"; 2 | import { Playground } from "../../components/Playground"; 3 | 4 | export default async function Page({ 5 | searchParams, 6 | }: { 7 | searchParams: { [key: string]: string | string[] | undefined }; 8 | }) { 9 | const codeFromParams = searchParams?.code; 10 | const code = typeof codeFromParams === "string" ? codeFromParams : null; 11 | return ( 12 | <> 13 | 14 | shaku-code-annotate playground 15 | 16 | 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/clarity/output.txt: -------------------------------------------------------------------------------- 1 |
;; This is a single-line comment
---

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/clojure/output.txt: -------------------------------------------------------------------------------- 1 |
; This is a single-line comment
---

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/dream-maker/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/haskell/output.txt: -------------------------------------------------------------------------------- 1 |
-- This is a single-line
---

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/dart/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/raku/output.txt: -------------------------------------------------------------------------------- 1 |
my $variable = 42;  
---------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/latex/output.txt: -------------------------------------------------------------------------------- 1 |
documentclass{article}
-------
Hello World!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/latex/output.txt: -------------------------------------------------------------------------------- 1 |
documentclass{article}
-------

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/clarity/output.txt: -------------------------------------------------------------------------------- 1 |
;; This is a single-line comment
---

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/clojure/output.txt: -------------------------------------------------------------------------------- 1 |
; This is a single-line comment
---

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/dream-maker/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a configuration
-----

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/haskell/output.txt: -------------------------------------------------------------------------------- 1 |
-- This is a single-line
---

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/hcl/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/hlsl/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/tsconfig/nextjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Next.js", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "allowJs": true, 7 | "declaration": false, 8 | "declarationMap": false, 9 | "incremental": true, 10 | "jsx": "preserve", 11 | "lib": ["dom", "dom.iterable", "esnext"], 12 | "module": "esnext", 13 | "noEmit": true, 14 | "resolveJsonModule": true, 15 | "strict": false, 16 | "target": "es5" 17 | }, 18 | "include": ["src", "next-env.d.ts"], 19 | "exclude": ["node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/latex/output.txt: -------------------------------------------------------------------------------- 1 |
documentclass{article}
-------

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/dockerfile/output.txt: -------------------------------------------------------------------------------- 1 |
FROM node:14
---
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/powerquery/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a single-line comment
-----------
Hello World!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/hcl/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/hlsl/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/applescript/output.txt: -------------------------------------------------------------------------------- 1 |
display dialog "Hello, World!"
------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/ini/output.txt: -------------------------------------------------------------------------------- 1 |
[section1]; coffee
------

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/batch/output.txt: -------------------------------------------------------------------------------- 1 |
echo Batch Script Example
-----
Hello World!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/dockerfile/output.txt: -------------------------------------------------------------------------------- 1 |
FROM node:14
---

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/powerquery/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a single-line comment
-----------

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/hcl/output.txt: -------------------------------------------------------------------------------- 1 |
# coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/hlsl/output.txt: -------------------------------------------------------------------------------- 1 |
// coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/batch/output.txt: -------------------------------------------------------------------------------- 1 |
echo Batch Script Example
-----

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/dockerfile/output.txt: -------------------------------------------------------------------------------- 1 |
FROM node:14
---

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/powerquery/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a single-line comment
-----------

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/rel/output.txt: -------------------------------------------------------------------------------- 1 |
name: "John"; 
-----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/raku/output.txt: -------------------------------------------------------------------------------- 1 |
my $variable = 42;
---------
Hello World!
-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/batch/output.txt: -------------------------------------------------------------------------------- 1 |
echo Batch Script Example
-----

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/pascal/output.txt: -------------------------------------------------------------------------------- 1 |
uses  crt;
---

This is a single-line comment

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/raku/output.txt: -------------------------------------------------------------------------------- 1 |
my $variable = 42;
---------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/ini/output.txt: -------------------------------------------------------------------------------- 1 |
[section1]
; coffee
------
Hello!
-------------------------------------------------------------------------------- /packages/tsconfig/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Default", 4 | "compilerOptions": { 5 | "composite": false, 6 | "declaration": true, 7 | "declarationMap": true, 8 | "esModuleInterop": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "inlineSources": false, 11 | "isolatedModules": true, 12 | "moduleResolution": "node", 13 | "noUnusedLocals": false, 14 | "noUnusedParameters": false, 15 | "preserveWatchOutput": true, 16 | "skipLibCheck": true, 17 | "strict": true 18 | }, 19 | "exclude": ["node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/raku/output.txt: -------------------------------------------------------------------------------- 1 |
my $variable = 42;
---------

Hello World!

2 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/ini/output.txt: -------------------------------------------------------------------------------- 1 |
[section1]
; coffee
------

Hello!

-------------------------------------------------------------------------------- /examples/web/mdx-components.tsx: -------------------------------------------------------------------------------- 1 | import type { MDXComponents } from "mdx/types"; 2 | 3 | // This file allows you to provide custom React components 4 | // to be used in MDX files. You can import and use any 5 | // React component you want, including components from 6 | // other libraries. 7 | 8 | // This file is required to use MDX in `app` directory. 9 | export function useMDXComponents(components: MDXComponents): MDXComponents { 10 | return { 11 | // Allows customizing built-in components, e.g. to add styling. 12 | // h1: ({ children }) =>

{children}

, 13 | ...components, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/ini/output.txt: -------------------------------------------------------------------------------- 1 |
[section1]
; coffee
------

Hello!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/cmake/output.txt: -------------------------------------------------------------------------------- 1 |
# This is a single-line comment
----
Hello!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/pascal/output.txt: -------------------------------------------------------------------------------- 1 |
uses
crt;
---
This is a single-line comment
-------------------------------------------------------------------------------- /examples/web/css/sugar-high.css: -------------------------------------------------------------------------------- 1 | @import url("./shaku-sugar-high.css"); 2 | 3 | :root { 4 | --sh-class: #2d5e9d; 5 | --sh-identifier: #354150; 6 | --sh-sign: #8996a3; 7 | --sh-string: #00a99a; 8 | --sh-keyword: #f47067; 9 | --sh-comment: #a19595; 10 | --sh-jsxliterals: #6266d1; 11 | } 12 | 13 | @media (prefers-color-scheme: dark) { 14 | :root { 15 | --sh-class: #b392f0; 16 | --sh-identifier: #79b8ff; 17 | --sh-sign: #e1e4e8; 18 | --sh-string: #9ecbff; 19 | --sh-keyword: #f97583; 20 | --sh-comment: #6a737d; 21 | --sh-jsxliterals: #85e89d; 22 | } 23 | } 24 | 25 | .sh__line { 26 | line-height: 1.5; 27 | } 28 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/cmake/output.txt: -------------------------------------------------------------------------------- 1 |
# This is a single-line comment
----

Hello!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/pascal/output.txt: -------------------------------------------------------------------------------- 1 |
uses
crt;
---

This is a single-line comment

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/rel/output.txt: -------------------------------------------------------------------------------- 1 |
name: "John";
-----
Hello Shaku!
-------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Please repro on [shaku playground](https://shaku-web.vercel.app/) and copy the link there. 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Screenshots** 20 | If applicable, add screenshots to help explain your problem. 21 | 22 | 23 | **Additional context** 24 | Add any other context about the problem here. 25 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/cmake/output.txt: -------------------------------------------------------------------------------- 1 |
# This is a single-line comment
----

Hello!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/pascal/output.txt: -------------------------------------------------------------------------------- 1 |
uses
crt;
---

This is a single-line comment

2 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/rel/output.txt: -------------------------------------------------------------------------------- 1 |
name: "John";
-----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/proto/output.txt: -------------------------------------------------------------------------------- 1 |
syntax = "proto3";
--------

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/pug/output.txt: -------------------------------------------------------------------------------- 1 |
// @dim
body
// This is a single-line comment
// -------
// ^
//[Hello Shaku!]
2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/rel/output.txt: -------------------------------------------------------------------------------- 1 |
name: "John";
-----

Hello Shaku!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-core/src/__tests__/parseDataEntries.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "vitest"; 2 | import { parseDataEntries, tokenizeDataEntries } from "../parseDataEntries"; 3 | 4 | describe("parseDataEntries()", () => { 5 | const inputs = [ 6 | "key1=value1", 7 | " key1=value1 ", 8 | " key1=value1 key2=value2", 9 | " key1=value1 key2=value2 ", 10 | " key1=value1 key2=value2 key3=value3 ", 11 | ' key1="value1" key2="value 2 2 " key3=value3 ', 12 | ]; 13 | for (const input of inputs) { 14 | test(input, () => { 15 | expect(parseDataEntries(input)).toMatchSnapshot(); 16 | }); 17 | } 18 | }); 19 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/applescript/output.txt: -------------------------------------------------------------------------------- 1 |
display dialog "Hello, World!"
------
Hello World!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/graphql/output.txt: -------------------------------------------------------------------------------- 1 |
type Query {
-----

Hello world!

}
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/applescript/output.txt: -------------------------------------------------------------------------------- 1 |
display dialog "Hello, World!"
------

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/applescript/output.txt: -------------------------------------------------------------------------------- 1 |
display dialog "Hello, World!"
------

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/css/output.txt: -------------------------------------------------------------------------------- 1 |
.a {  /* hello */
---

Hello!

}
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/html/output.txt: -------------------------------------------------------------------------------- 1 |
<p>coffeee</p>   
-----

Hello

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/make/output.txt: -------------------------------------------------------------------------------- 1 |
# VariablesCC = gccCFLAGS = -Wall -g
-----

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/r/output.txt: -------------------------------------------------------------------------------- 1 |
# Variablesvariable <- 123
--

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/bash/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignmentname="Alice"
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/makefile/output.txt: -------------------------------------------------------------------------------- 1 |
# VariablesCC = gccCFLAGS = -Wall -g
-----

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/shell/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignmentname="John"
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/zsh/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignmentname="John"
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/cobol/output.txt: -------------------------------------------------------------------------------- 1 |
ENVIRONMENT DIVISION.DATA DIVISION.
--------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/erb/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
---

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/objc/output.txt: -------------------------------------------------------------------------------- 1 |
#import <Foundation/Foundation.h>// This is a single-line comment
------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/shellscript/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignmentname="John"
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/blade/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
----

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/ruby/output.txt: -------------------------------------------------------------------------------- 1 |
square = variable * variable 
--------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/json/output.txt: -------------------------------------------------------------------------------- 1 |
{
"name": "John",
"age": 30,
"isStudent": false
}
-------------------------------------------------------------------------------- /packages/shaku-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shaku-ui", 3 | "version": "0.0.1", 4 | "devDependencies": { 5 | "typescript": "latest", 6 | "vitest": "^0.30.1" 7 | }, 8 | "files": [ 9 | "dist", 10 | "docs" 11 | ], 12 | "main": "./dist/index.js", 13 | "module": "./dist/index.js", 14 | "types": "./dist/index.d.ts", 15 | "scripts": { 16 | "build": "tsc --project tsconfig.json", 17 | "dev": "npm run build -- --watch" 18 | }, 19 | "license": "MIT", 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/JSerZANP/shaku.git", 23 | "directory": "packages/shaku-ui" 24 | }, 25 | "dependencies": { 26 | "react": "^18.2.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/fsl/output.txt: -------------------------------------------------------------------------------- 1 |
-- @dim
-- coffee
-- ------
-- ^
-- [Hello!]
2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/make/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
CC = gcc
CFLAGS = -Wall -g
-----
Hello World!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/liquid/output.txt: -------------------------------------------------------------------------------- 1 |
This is a multi-line comment {% comment %}          ----------     ^  [Hello World!]{% endcomment %}
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/makefile/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
CC = gcc
CFLAGS = -Wall -g
-----
Hello World!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/make/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
CC = gcc
CFLAGS = -Wall -g
-----

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/abap/output.txt: -------------------------------------------------------------------------------- 1 |
REPORT Z_SAMPLE_REPORT.REPORT Z_SAMPLE_REPORT.
---------------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/kql/output.txt: -------------------------------------------------------------------------------- 1 |
// This is a single-line commentprint "Hello, world!";
---------

Hello world!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/sas/output.txt: -------------------------------------------------------------------------------- 1 |
/* This is a single-line comment */data mydata;  set inputdata;
----------

Hello World

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/makefile/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
CC = gcc
CFLAGS = -Wall -g
-----

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/make/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
CC = gcc
CFLAGS = -Wall -g
-----

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/perl/output.txt: -------------------------------------------------------------------------------- 1 |
# This is a single-line comment in Perlprint "Hello, World!";
-----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/perl6/output.txt: -------------------------------------------------------------------------------- 1 |
# This is a single-line comment in Perlprint "Hello, World!";
-----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/sass/output.txt: -------------------------------------------------------------------------------- 1 |
// Example Sass code with comments$primary-color: #3498db;
-------

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/cobol/output.txt: -------------------------------------------------------------------------------- 1 |
ENVIRONMENT DIVISION.
DATA DIVISION.
--------
Hello World!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/zsh/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----
Hello Shaku!
-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/makefile/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
CC = gcc
CFLAGS = -Wall -g
-----

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/bash/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="Alice"
----
Hello Shaku!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/erb/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
---
Hello World!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/ruby/output.txt: -------------------------------------------------------------------------------- 1 |
square = variable * variable
--------
Hello World!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/shell/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----
Hello Shaku!
-------------------------------------------------------------------------------- /examples/web/app/sugar-high/page.tsx: -------------------------------------------------------------------------------- 1 | import Head from "next/head"; 2 | import { SugarHigh } from "../../components/SugarHigh/SugarHigh"; 3 | 4 | export default async function Page({ 5 | searchParams, 6 | }: { 7 | searchParams: { [key: string]: string | string[] | undefined }; 8 | }) { 9 | const codeFromParams = searchParams?.code; 10 | const langFromParams = searchParams?.lang; 11 | const code = typeof codeFromParams === "string" ? codeFromParams : null; 12 | const lang = typeof langFromParams === "string" ? langFromParams : null; 13 | 14 | return ( 15 | <> 16 | 17 | Shaku x Sugar High 18 | 19 | 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/bash/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="Alice"
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/cobol/output.txt: -------------------------------------------------------------------------------- 1 |
ENVIRONMENT DIVISION.
DATA DIVISION.
--------

Hello World!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/shell/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/zsh/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/awk/output.txt: -------------------------------------------------------------------------------- 1 |
sum = 0sum = 1
--

Hello!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/zenscript/output.txt: -------------------------------------------------------------------------------- 1 |
// Helloprint("This line is commented out")
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/blade/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
----
Hello World!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/shellscript/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----
Hello Shaku!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/blade/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
----

Hello World!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/erb/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
---

Hello World!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/liquid/output.txt: -------------------------------------------------------------------------------- 1 |
This is a multi-line comment
{% comment %}
----------

Hello World!

{% endcomment %}
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/ruby/output.txt: -------------------------------------------------------------------------------- 1 |
square = variable * variable
--------

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/bash/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="Alice"
----

Hello Shaku!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/cobol/output.txt: -------------------------------------------------------------------------------- 1 |
ENVIRONMENT DIVISION.
DATA DIVISION.
--------

Hello World!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/shell/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----

Hello Shaku!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/zsh/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----

Hello Shaku!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/graphql/output.txt: -------------------------------------------------------------------------------- 1 |
type Query {
-----
Hello world!
}
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/graphql/output.txt: -------------------------------------------------------------------------------- 1 |
type Query {
-----

Hello world!

}
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/shellscript/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/blade/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
----

Hello World!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/erb/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
---

Hello World!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/liquid/output.txt: -------------------------------------------------------------------------------- 1 |
This is a multi-line comment
{% comment %}
----------

Hello World!

{% endcomment %}
2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/ruby/output.txt: -------------------------------------------------------------------------------- 1 |
square = variable * variable
--------

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/asm/output.txt: -------------------------------------------------------------------------------- 1 |
section .data    message db 'Hello, World!', 0
-------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/matlab/output.txt: -------------------------------------------------------------------------------- 1 |
% This is a single-line comment in MATLAB.variable = 10; 
--

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/abap/output.txt: -------------------------------------------------------------------------------- 1 |
REPORT Z_SAMPLE_REPORT.
REPORT Z_SAMPLE_REPORT.
---------------
Hello World!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/css/output.txt: -------------------------------------------------------------------------------- 1 |
.a {
/* hello */
---
Hello!
}
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/r/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
variable <- 123
--
Hello World!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/abap/output.txt: -------------------------------------------------------------------------------- 1 |
REPORT Z_SAMPLE_REPORT.
REPORT Z_SAMPLE_REPORT.
---------------

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/graphql/output.txt: -------------------------------------------------------------------------------- 1 |
type Query {
-----

Hello world!

}
2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/shellscript/output.txt: -------------------------------------------------------------------------------- 1 |
# Variable assignment
name="John"
----

Hello Shaku!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/sass/output.txt: -------------------------------------------------------------------------------- 1 |
// Example Sass code with comments
$primary-color: #3498db;
-------
Hello Shaku!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/css/output.txt: -------------------------------------------------------------------------------- 1 |
.a {
/* hello */
---

Hello!

}
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/r/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
variable <- 123
--

Hello World!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/sass/output.txt: -------------------------------------------------------------------------------- 1 |
// Example Sass code with comments
$primary-color: #3498db;
-------

Hello Shaku!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/abap/output.txt: -------------------------------------------------------------------------------- 1 |
REPORT Z_SAMPLE_REPORT.
REPORT Z_SAMPLE_REPORT.
---------------

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/logo/output.txt: -------------------------------------------------------------------------------- 1 |
REPEAT 4 [  FORWARD 100 
-------

Hello World!

RIGHT 90 ]
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/stata/output.txt: -------------------------------------------------------------------------------- 1 |
* @highlight
use "mydata.dta"
------
Hello Shaku!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/stata/output.txt: -------------------------------------------------------------------------------- 1 |
* @highlight
use "mydata.dta"
------

Hello Shaku!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/languages.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from "vitest"; 2 | import { Marked } from "marked"; 3 | import markedShakuCodeAnnotate from "../index"; 4 | import { defaultCode } from "shaku-code-annotate-shiki"; 5 | 6 | const marked = new Marked(markedShakuCodeAnnotate()); 7 | 8 | test("should support popular languages", async () => { 9 | for (const [lang, code] of Object.entries(defaultCode)) { 10 | const processed = await marked.parse( 11 | ` 12 | \`\`\`${lang} annotate 13 | ${code} 14 | \`\`\` 15 | ` 16 | ); 17 | console.log("checking lang:" + lang); 18 | await expect(String(processed)).toMatchFileSnapshot( 19 | __dirname + "/langs/" + lang + "/output.txt" 20 | ); 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/css/output.txt: -------------------------------------------------------------------------------- 1 |
.a {
/* hello */
---

Hello!

}
2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/r/output.txt: -------------------------------------------------------------------------------- 1 |
# Variables
variable <- 123
--

Hello World!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/sass/output.txt: -------------------------------------------------------------------------------- 1 |
// Example Sass code with comments
$primary-color: #3498db;
-------

Hello Shaku!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/html/output.txt: -------------------------------------------------------------------------------- 1 |
<p>coffeee</p>
-----
Hello
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/objc/output.txt: -------------------------------------------------------------------------------- 1 |
#import <Foundation/Foundation.h>
// This is a single-line comment
------
Hello World!
-------------------------------------------------------------------------------- /examples/web/app/sugar-high-token-inspector/page.tsx: -------------------------------------------------------------------------------- 1 | import Head from "next/head"; 2 | import { SugarHighTokenInspector } from "./SugarHighTokenInspector"; 3 | 4 | export default async function Page({ 5 | searchParams, 6 | }: { 7 | searchParams: { [key: string]: string | string[] | undefined }; 8 | }) { 9 | const codeFromParams = searchParams?.code; 10 | const langFromParams = searchParams?.lang; 11 | const code = typeof codeFromParams === "string" ? codeFromParams : null; 12 | const lang = typeof langFromParams === "string" ? langFromParams : null; 13 | 14 | return ( 15 | <> 16 | 17 | Sugar High Token Visualizer 18 | 19 | 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /examples/web/app/ui/demo.mdx: -------------------------------------------------------------------------------- 1 | import { Reveal } from "shaku-ui"; 2 | 3 | # Demo of Shaku UI 4 | 5 | Shaku UI contains components that are built for tech writers. 6 | 7 | 8 | Lorem ipsum dolor sit amet, 9 | 10 | consectetur adipiscing elit, 11 | 12 | sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 13 | 14 | Ut enim ad minim veniam, 15 | 16 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 17 | 18 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 19 | 20 | Excepteur sint occaecat cupidatat non proident, 21 | 22 | sunt in culpa qui officia deserunt mollit anim id est laborum. 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/objc/output.txt: -------------------------------------------------------------------------------- 1 |
#import <Foundation/Foundation.h>
// This is a single-line comment
------

Hello World!

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/jinja-html/output.txt: -------------------------------------------------------------------------------- 1 |
{# @dim #}
<p>This is a regular paragraph.</p>
{# ---- #}
{# ^ #}
{# [Hello!] #}
2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/stata/output.txt: -------------------------------------------------------------------------------- 1 |
* @highlight
use "mydata.dta"
------

Hello Shaku!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/erlang/output.txt: -------------------------------------------------------------------------------- 1 |
-export([add/2]).
-------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/plsql/output.txt: -------------------------------------------------------------------------------- 1 |
DECLARE  v_name VARCHAR2(50);
--------

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/tcl/output.txt: -------------------------------------------------------------------------------- 1 |
set variable_name 42;# Another comment explaining the above line
-------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/razor/output.txt: -------------------------------------------------------------------------------- 1 |
<h1>Welcome to our website!</h1>
@{
// ----
// ^
//[Hello World!]
}
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/html/output.txt: -------------------------------------------------------------------------------- 1 |
<p>coffeee</p>
-----

Hello

-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/html/output.txt: -------------------------------------------------------------------------------- 1 |
<p>coffeee</p>
-----

Hello

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/objc/output.txt: -------------------------------------------------------------------------------- 1 |
#import <Foundation/Foundation.h>
// This is a single-line comment
------

Hello World!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/matlab/output.txt: -------------------------------------------------------------------------------- 1 |
% This is a single-line comment in MATLAB.
variable = 10;
--
Hello World!
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/zenscript/output.txt: -------------------------------------------------------------------------------- 1 |
// Hello
print("This line is commented out")
----
Hello Shaku!
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/matlab/output.txt: -------------------------------------------------------------------------------- 1 |
% This is a single-line comment in MATLAB.
variable = 10;
--

Hello World!

-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/zenscript/output.txt: -------------------------------------------------------------------------------- 1 |
// Hello
print("This line is commented out")
----

Hello Shaku!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/reg/output.txt: -------------------------------------------------------------------------------- 1 |
"CompletionChar"=dword:00000040 
--------

Hello World!

-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/liquid/output.txt: -------------------------------------------------------------------------------- 1 |
This is a multi-line comment
{% comment %}
----------
^
[Hello World!]
{% endcomment %}
-------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki/src/__tests__/langs/logo/output.txt: -------------------------------------------------------------------------------- 1 |
REPEAT 4 [
FORWARD 100
-------
Hello World!
RIGHT 90
]
-------------------------------------------------------------------------------- /packages/marked-shaku-code-annotate/src/__tests__/langs/logo/output.txt: -------------------------------------------------------------------------------- 1 |
REPEAT 4 [
FORWARD 100
-------

Hello World!

RIGHT 90
]
-------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/matlab/output.txt: -------------------------------------------------------------------------------- 1 |
% This is a single-line comment in MATLAB.
variable = 10;
--

Hello World!

2 | -------------------------------------------------------------------------------- /packages/remark-shaku-code-annotate/src/__tests__/langs/zenscript/output.txt: -------------------------------------------------------------------------------- 1 |
// Hello
print("This line is commented out")
----

Hello Shaku!

2 | -------------------------------------------------------------------------------- /packages/shaku-code-annotate-shiki-transformer/src/__tests__/langs/marko/output.txt: -------------------------------------------------------------------------------- 1 |
<div>Shaku Snippet!</div>
-----

Hello Shaku!

--------------------------------------------------------------------------------