@neurocode-ai/web 1.18.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/astro.config.mjs +324 -0
- package/config.mjs +14 -0
- package/package.json +44 -0
- package/public/apple-touch-icon-v3.png +1 -0
- package/public/apple-touch-icon.png +1 -0
- package/public/favicon-96x96-v3.png +1 -0
- package/public/favicon-96x96.png +1 -0
- package/public/favicon-v3.ico +1 -0
- package/public/favicon-v3.svg +1 -0
- package/public/favicon.ico +1 -0
- package/public/favicon.svg +1 -0
- package/public/robots.txt +6 -0
- package/public/site.webmanifest +1 -0
- package/public/social-share-zen.png +1 -0
- package/public/social-share.png +1 -0
- package/public/theme.json +183 -0
- package/public/web-app-manifest-192x192.png +1 -0
- package/public/web-app-manifest-512x512.png +1 -0
- package/src/assets/lander/check.svg +2 -0
- package/src/assets/lander/copy.svg +2 -0
- package/src/assets/lander/screenshot-github.png +0 -0
- package/src/assets/lander/screenshot-splash.png +0 -0
- package/src/assets/lander/screenshot-vscode.png +0 -0
- package/src/assets/lander/screenshot.png +0 -0
- package/src/assets/logo-dark.svg +18 -0
- package/src/assets/logo-light.svg +18 -0
- package/src/assets/logo-ornate-dark.svg +18 -0
- package/src/assets/logo-ornate-light.svg +18 -0
- package/src/assets/web/web-homepage-active-session.png +0 -0
- package/src/assets/web/web-homepage-new-session.png +0 -0
- package/src/assets/web/web-homepage-see-servers.png +0 -0
- package/src/components/Footer.astro +125 -0
- package/src/components/Head.astro +54 -0
- package/src/components/Header.astro +136 -0
- package/src/components/Hero.astro +11 -0
- package/src/components/Lander.astro +721 -0
- package/src/components/LanguageSelect.astro +29 -0
- package/src/components/Share.tsx +644 -0
- package/src/components/SiteTitle.astro +59 -0
- package/src/components/icons/custom.tsx +87 -0
- package/src/components/icons/index.tsx +4454 -0
- package/src/components/share/common.tsx +128 -0
- package/src/components/share/content-bash.module.css +85 -0
- package/src/components/share/content-bash.tsx +67 -0
- package/src/components/share/content-code.module.css +26 -0
- package/src/components/share/content-code.tsx +30 -0
- package/src/components/share/content-diff.module.css +153 -0
- package/src/components/share/content-diff.tsx +240 -0
- package/src/components/share/content-error.module.css +64 -0
- package/src/components/share/content-error.tsx +25 -0
- package/src/components/share/content-markdown.module.css +154 -0
- package/src/components/share/content-markdown.tsx +74 -0
- package/src/components/share/content-text.module.css +63 -0
- package/src/components/share/content-text.tsx +38 -0
- package/src/components/share/copy-button.module.css +30 -0
- package/src/components/share/copy-button.tsx +36 -0
- package/src/components/share/part.module.css +428 -0
- package/src/components/share/part.tsx +816 -0
- package/src/components/share.module.css +832 -0
- package/src/content/docs/acp.mdx +156 -0
- package/src/content/docs/agents.mdx +781 -0
- package/src/content/docs/ar/acp.mdx +156 -0
- package/src/content/docs/ar/agents.mdx +754 -0
- package/src/content/docs/ar/cli.mdx +616 -0
- package/src/content/docs/ar/commands.mdx +322 -0
- package/src/content/docs/ar/config.mdx +685 -0
- package/src/content/docs/ar/custom-tools.mdx +196 -0
- package/src/content/docs/ar/ecosystem.mdx +78 -0
- package/src/content/docs/ar/enterprise.mdx +165 -0
- package/src/content/docs/ar/formatters.mdx +131 -0
- package/src/content/docs/ar/github.mdx +321 -0
- package/src/content/docs/ar/gitlab.mdx +195 -0
- package/src/content/docs/ar/go.mdx +224 -0
- package/src/content/docs/ar/ide.mdx +48 -0
- package/src/content/docs/ar/index.mdx +344 -0
- package/src/content/docs/ar/keybinds.mdx +194 -0
- package/src/content/docs/ar/lsp.mdx +207 -0
- package/src/content/docs/ar/mcp-servers.mdx +511 -0
- package/src/content/docs/ar/models.mdx +222 -0
- package/src/content/docs/ar/network.mdx +57 -0
- package/src/content/docs/ar/permissions.mdx +235 -0
- package/src/content/docs/ar/plugins.mdx +385 -0
- package/src/content/docs/ar/providers.mdx +1983 -0
- package/src/content/docs/ar/rules.mdx +180 -0
- package/src/content/docs/ar/sdk.mdx +463 -0
- package/src/content/docs/ar/server.mdx +287 -0
- package/src/content/docs/ar/share.mdx +127 -0
- package/src/content/docs/ar/skills.mdx +222 -0
- package/src/content/docs/ar/themes.mdx +369 -0
- package/src/content/docs/ar/tools.mdx +341 -0
- package/src/content/docs/ar/troubleshooting.mdx +299 -0
- package/src/content/docs/ar/tui.mdx +426 -0
- package/src/content/docs/ar/web.mdx +142 -0
- package/src/content/docs/ar/windows-wsl.mdx +113 -0
- package/src/content/docs/ar/zen.mdx +332 -0
- package/src/content/docs/bs/acp.mdx +156 -0
- package/src/content/docs/bs/agents.mdx +754 -0
- package/src/content/docs/bs/cli.mdx +614 -0
- package/src/content/docs/bs/commands.mdx +316 -0
- package/src/content/docs/bs/config.mdx +685 -0
- package/src/content/docs/bs/custom-tools.mdx +195 -0
- package/src/content/docs/bs/ecosystem.mdx +78 -0
- package/src/content/docs/bs/enterprise.mdx +165 -0
- package/src/content/docs/bs/formatters.mdx +124 -0
- package/src/content/docs/bs/github.mdx +311 -0
- package/src/content/docs/bs/gitlab.mdx +188 -0
- package/src/content/docs/bs/go.mdx +238 -0
- package/src/content/docs/bs/ide.mdx +47 -0
- package/src/content/docs/bs/index.mdx +323 -0
- package/src/content/docs/bs/keybinds.mdx +194 -0
- package/src/content/docs/bs/lsp.mdx +204 -0
- package/src/content/docs/bs/mcp-servers.mdx +482 -0
- package/src/content/docs/bs/models.mdx +201 -0
- package/src/content/docs/bs/network.mdx +51 -0
- package/src/content/docs/bs/permissions.mdx +228 -0
- package/src/content/docs/bs/plugins.mdx +371 -0
- package/src/content/docs/bs/providers.mdx +1993 -0
- package/src/content/docs/bs/rules.mdx +180 -0
- package/src/content/docs/bs/sdk.mdx +463 -0
- package/src/content/docs/bs/server.mdx +284 -0
- package/src/content/docs/bs/share.mdx +127 -0
- package/src/content/docs/bs/skills.mdx +222 -0
- package/src/content/docs/bs/themes.mdx +369 -0
- package/src/content/docs/bs/tools.mdx +341 -0
- package/src/content/docs/bs/troubleshooting.mdx +300 -0
- package/src/content/docs/bs/tui.mdx +432 -0
- package/src/content/docs/bs/web.mdx +142 -0
- package/src/content/docs/bs/windows-wsl.mdx +113 -0
- package/src/content/docs/bs/zen.mdx +350 -0
- package/src/content/docs/cli.mdx +733 -0
- package/src/content/docs/commands.mdx +323 -0
- package/src/content/docs/config.mdx +941 -0
- package/src/content/docs/custom-tools.mdx +196 -0
- package/src/content/docs/da/acp.mdx +156 -0
- package/src/content/docs/da/agents.mdx +755 -0
- package/src/content/docs/da/cli.mdx +617 -0
- package/src/content/docs/da/commands.mdx +323 -0
- package/src/content/docs/da/config.mdx +688 -0
- package/src/content/docs/da/custom-tools.mdx +196 -0
- package/src/content/docs/da/ecosystem.mdx +78 -0
- package/src/content/docs/da/enterprise.mdx +170 -0
- package/src/content/docs/da/formatters.mdx +131 -0
- package/src/content/docs/da/github.mdx +321 -0
- package/src/content/docs/da/gitlab.mdx +195 -0
- package/src/content/docs/da/go.mdx +238 -0
- package/src/content/docs/da/ide.mdx +48 -0
- package/src/content/docs/da/index.mdx +360 -0
- package/src/content/docs/da/keybinds.mdx +194 -0
- package/src/content/docs/da/lsp.mdx +208 -0
- package/src/content/docs/da/mcp-servers.mdx +511 -0
- package/src/content/docs/da/models.mdx +223 -0
- package/src/content/docs/da/network.mdx +57 -0
- package/src/content/docs/da/permissions.mdx +235 -0
- package/src/content/docs/da/plugins.mdx +389 -0
- package/src/content/docs/da/providers.mdx +1981 -0
- package/src/content/docs/da/rules.mdx +180 -0
- package/src/content/docs/da/sdk.mdx +463 -0
- package/src/content/docs/da/server.mdx +287 -0
- package/src/content/docs/da/share.mdx +128 -0
- package/src/content/docs/da/skills.mdx +222 -0
- package/src/content/docs/da/themes.mdx +369 -0
- package/src/content/docs/da/tools.mdx +341 -0
- package/src/content/docs/da/troubleshooting.mdx +300 -0
- package/src/content/docs/da/tui.mdx +426 -0
- package/src/content/docs/da/web.mdx +142 -0
- package/src/content/docs/da/windows-wsl.mdx +113 -0
- package/src/content/docs/da/zen.mdx +345 -0
- package/src/content/docs/de/acp.mdx +156 -0
- package/src/content/docs/de/agents.mdx +741 -0
- package/src/content/docs/de/cli.mdx +616 -0
- package/src/content/docs/de/commands.mdx +323 -0
- package/src/content/docs/de/config.mdx +684 -0
- package/src/content/docs/de/custom-tools.mdx +170 -0
- package/src/content/docs/de/ecosystem.mdx +78 -0
- package/src/content/docs/de/enterprise.mdx +170 -0
- package/src/content/docs/de/formatters.mdx +131 -0
- package/src/content/docs/de/github.mdx +321 -0
- package/src/content/docs/de/gitlab.mdx +195 -0
- package/src/content/docs/de/go.mdx +226 -0
- package/src/content/docs/de/ide.mdx +48 -0
- package/src/content/docs/de/index.mdx +356 -0
- package/src/content/docs/de/keybinds.mdx +194 -0
- package/src/content/docs/de/lsp.mdx +207 -0
- package/src/content/docs/de/mcp-servers.mdx +511 -0
- package/src/content/docs/de/models.mdx +223 -0
- package/src/content/docs/de/network.mdx +57 -0
- package/src/content/docs/de/permissions.mdx +235 -0
- package/src/content/docs/de/plugins.mdx +384 -0
- package/src/content/docs/de/providers.mdx +1987 -0
- package/src/content/docs/de/rules.mdx +190 -0
- package/src/content/docs/de/sdk.mdx +465 -0
- package/src/content/docs/de/server.mdx +291 -0
- package/src/content/docs/de/share.mdx +130 -0
- package/src/content/docs/de/skills.mdx +222 -0
- package/src/content/docs/de/themes.mdx +372 -0
- package/src/content/docs/de/tools.mdx +352 -0
- package/src/content/docs/de/troubleshooting.mdx +300 -0
- package/src/content/docs/de/tui.mdx +429 -0
- package/src/content/docs/de/web.mdx +142 -0
- package/src/content/docs/de/windows-wsl.mdx +115 -0
- package/src/content/docs/de/zen.mdx +327 -0
- package/src/content/docs/ecosystem.mdx +83 -0
- package/src/content/docs/enterprise.mdx +169 -0
- package/src/content/docs/es/acp.mdx +156 -0
- package/src/content/docs/es/agents.mdx +755 -0
- package/src/content/docs/es/cli.mdx +616 -0
- package/src/content/docs/es/commands.mdx +323 -0
- package/src/content/docs/es/config.mdx +685 -0
- package/src/content/docs/es/custom-tools.mdx +196 -0
- package/src/content/docs/es/ecosystem.mdx +78 -0
- package/src/content/docs/es/enterprise.mdx +170 -0
- package/src/content/docs/es/formatters.mdx +131 -0
- package/src/content/docs/es/github.mdx +321 -0
- package/src/content/docs/es/gitlab.mdx +195 -0
- package/src/content/docs/es/go.mdx +238 -0
- package/src/content/docs/es/ide.mdx +48 -0
- package/src/content/docs/es/index.mdx +345 -0
- package/src/content/docs/es/keybinds.mdx +194 -0
- package/src/content/docs/es/lsp.mdx +208 -0
- package/src/content/docs/es/mcp-servers.mdx +511 -0
- package/src/content/docs/es/models.mdx +223 -0
- package/src/content/docs/es/network.mdx +57 -0
- package/src/content/docs/es/permissions.mdx +235 -0
- package/src/content/docs/es/plugins.mdx +389 -0
- package/src/content/docs/es/providers.mdx +1989 -0
- package/src/content/docs/es/rules.mdx +180 -0
- package/src/content/docs/es/sdk.mdx +463 -0
- package/src/content/docs/es/server.mdx +287 -0
- package/src/content/docs/es/share.mdx +128 -0
- package/src/content/docs/es/skills.mdx +222 -0
- package/src/content/docs/es/themes.mdx +369 -0
- package/src/content/docs/es/tools.mdx +341 -0
- package/src/content/docs/es/troubleshooting.mdx +300 -0
- package/src/content/docs/es/tui.mdx +429 -0
- package/src/content/docs/es/web.mdx +142 -0
- package/src/content/docs/es/windows-wsl.mdx +113 -0
- package/src/content/docs/es/zen.mdx +345 -0
- package/src/content/docs/formatters.mdx +143 -0
- package/src/content/docs/fr/acp.mdx +156 -0
- package/src/content/docs/fr/agents.mdx +755 -0
- package/src/content/docs/fr/cli.mdx +617 -0
- package/src/content/docs/fr/commands.mdx +322 -0
- package/src/content/docs/fr/config.mdx +686 -0
- package/src/content/docs/fr/custom-tools.mdx +170 -0
- package/src/content/docs/fr/ecosystem.mdx +78 -0
- package/src/content/docs/fr/enterprise.mdx +165 -0
- package/src/content/docs/fr/formatters.mdx +131 -0
- package/src/content/docs/fr/github.mdx +322 -0
- package/src/content/docs/fr/gitlab.mdx +195 -0
- package/src/content/docs/fr/go.mdx +224 -0
- package/src/content/docs/fr/ide.mdx +48 -0
- package/src/content/docs/fr/index.mdx +344 -0
- package/src/content/docs/fr/keybinds.mdx +194 -0
- package/src/content/docs/fr/lsp.mdx +208 -0
- package/src/content/docs/fr/mcp-servers.mdx +511 -0
- package/src/content/docs/fr/models.mdx +222 -0
- package/src/content/docs/fr/network.mdx +57 -0
- package/src/content/docs/fr/permissions.mdx +235 -0
- package/src/content/docs/fr/plugins.mdx +384 -0
- package/src/content/docs/fr/providers.mdx +1996 -0
- package/src/content/docs/fr/rules.mdx +180 -0
- package/src/content/docs/fr/sdk.mdx +463 -0
- package/src/content/docs/fr/server.mdx +287 -0
- package/src/content/docs/fr/share.mdx +128 -0
- package/src/content/docs/fr/skills.mdx +222 -0
- package/src/content/docs/fr/themes.mdx +369 -0
- package/src/content/docs/fr/tools.mdx +341 -0
- package/src/content/docs/fr/troubleshooting.mdx +300 -0
- package/src/content/docs/fr/tui.mdx +429 -0
- package/src/content/docs/fr/web.mdx +142 -0
- package/src/content/docs/fr/windows-wsl.mdx +113 -0
- package/src/content/docs/fr/zen.mdx +327 -0
- package/src/content/docs/github.mdx +321 -0
- package/src/content/docs/gitlab.mdx +195 -0
- package/src/content/docs/go.mdx +238 -0
- package/src/content/docs/ide.mdx +48 -0
- package/src/content/docs/index.mdx +360 -0
- package/src/content/docs/it/acp.mdx +155 -0
- package/src/content/docs/it/agents.mdx +753 -0
- package/src/content/docs/it/cli.mdx +617 -0
- package/src/content/docs/it/commands.mdx +322 -0
- package/src/content/docs/it/config.mdx +685 -0
- package/src/content/docs/it/custom-tools.mdx +196 -0
- package/src/content/docs/it/ecosystem.mdx +78 -0
- package/src/content/docs/it/enterprise.mdx +165 -0
- package/src/content/docs/it/formatters.mdx +132 -0
- package/src/content/docs/it/github.mdx +321 -0
- package/src/content/docs/it/gitlab.mdx +195 -0
- package/src/content/docs/it/go.mdx +236 -0
- package/src/content/docs/it/ide.mdx +48 -0
- package/src/content/docs/it/index.mdx +344 -0
- package/src/content/docs/it/keybinds.mdx +194 -0
- package/src/content/docs/it/lsp.mdx +208 -0
- package/src/content/docs/it/mcp-servers.mdx +511 -0
- package/src/content/docs/it/models.mdx +222 -0
- package/src/content/docs/it/network.mdx +57 -0
- package/src/content/docs/it/permissions.mdx +235 -0
- package/src/content/docs/it/plugins.mdx +388 -0
- package/src/content/docs/it/providers.mdx +1964 -0
- package/src/content/docs/it/rules.mdx +180 -0
- package/src/content/docs/it/sdk.mdx +463 -0
- package/src/content/docs/it/server.mdx +284 -0
- package/src/content/docs/it/share.mdx +127 -0
- package/src/content/docs/it/skills.mdx +222 -0
- package/src/content/docs/it/themes.mdx +369 -0
- package/src/content/docs/it/tools.mdx +341 -0
- package/src/content/docs/it/troubleshooting.mdx +299 -0
- package/src/content/docs/it/tui.mdx +426 -0
- package/src/content/docs/it/web.mdx +142 -0
- package/src/content/docs/it/windows-wsl.mdx +113 -0
- package/src/content/docs/it/zen.mdx +345 -0
- package/src/content/docs/ja/acp.mdx +155 -0
- package/src/content/docs/ja/agents.mdx +751 -0
- package/src/content/docs/ja/cli.mdx +616 -0
- package/src/content/docs/ja/commands.mdx +322 -0
- package/src/content/docs/ja/config.mdx +684 -0
- package/src/content/docs/ja/custom-tools.mdx +196 -0
- package/src/content/docs/ja/ecosystem.mdx +78 -0
- package/src/content/docs/ja/enterprise.mdx +166 -0
- package/src/content/docs/ja/formatters.mdx +132 -0
- package/src/content/docs/ja/github.mdx +322 -0
- package/src/content/docs/ja/gitlab.mdx +195 -0
- package/src/content/docs/ja/go.mdx +224 -0
- package/src/content/docs/ja/ide.mdx +48 -0
- package/src/content/docs/ja/index.mdx +350 -0
- package/src/content/docs/ja/keybinds.mdx +194 -0
- package/src/content/docs/ja/lsp.mdx +208 -0
- package/src/content/docs/ja/mcp-servers.mdx +511 -0
- package/src/content/docs/ja/models.mdx +221 -0
- package/src/content/docs/ja/network.mdx +55 -0
- package/src/content/docs/ja/permissions.mdx +282 -0
- package/src/content/docs/ja/plugins.mdx +461 -0
- package/src/content/docs/ja/providers.mdx +1998 -0
- package/src/content/docs/ja/rules.mdx +179 -0
- package/src/content/docs/ja/sdk.mdx +463 -0
- package/src/content/docs/ja/server.mdx +282 -0
- package/src/content/docs/ja/share.mdx +128 -0
- package/src/content/docs/ja/skills.mdx +222 -0
- package/src/content/docs/ja/themes.mdx +667 -0
- package/src/content/docs/ja/tools.mdx +341 -0
- package/src/content/docs/ja/troubleshooting.mdx +300 -0
- package/src/content/docs/ja/tui.mdx +423 -0
- package/src/content/docs/ja/web.mdx +143 -0
- package/src/content/docs/ja/windows-wsl.mdx +116 -0
- package/src/content/docs/ja/zen.mdx +327 -0
- package/src/content/docs/keybinds.mdx +299 -0
- package/src/content/docs/ko/acp.mdx +156 -0
- package/src/content/docs/ko/agents.mdx +754 -0
- package/src/content/docs/ko/cli.mdx +616 -0
- package/src/content/docs/ko/commands.mdx +323 -0
- package/src/content/docs/ko/config.mdx +685 -0
- package/src/content/docs/ko/custom-tools.mdx +196 -0
- package/src/content/docs/ko/ecosystem.mdx +78 -0
- package/src/content/docs/ko/enterprise.mdx +165 -0
- package/src/content/docs/ko/formatters.mdx +132 -0
- package/src/content/docs/ko/github.mdx +321 -0
- package/src/content/docs/ko/gitlab.mdx +195 -0
- package/src/content/docs/ko/go.mdx +224 -0
- package/src/content/docs/ko/ide.mdx +48 -0
- package/src/content/docs/ko/index.mdx +344 -0
- package/src/content/docs/ko/keybinds.mdx +194 -0
- package/src/content/docs/ko/lsp.mdx +208 -0
- package/src/content/docs/ko/mcp-servers.mdx +511 -0
- package/src/content/docs/ko/models.mdx +223 -0
- package/src/content/docs/ko/network.mdx +57 -0
- package/src/content/docs/ko/permissions.mdx +235 -0
- package/src/content/docs/ko/plugins.mdx +388 -0
- package/src/content/docs/ko/providers.mdx +1984 -0
- package/src/content/docs/ko/rules.mdx +179 -0
- package/src/content/docs/ko/sdk.mdx +463 -0
- package/src/content/docs/ko/server.mdx +287 -0
- package/src/content/docs/ko/share.mdx +128 -0
- package/src/content/docs/ko/skills.mdx +222 -0
- package/src/content/docs/ko/themes.mdx +369 -0
- package/src/content/docs/ko/tools.mdx +341 -0
- package/src/content/docs/ko/troubleshooting.mdx +303 -0
- package/src/content/docs/ko/tui.mdx +425 -0
- package/src/content/docs/ko/web.mdx +142 -0
- package/src/content/docs/ko/windows-wsl.mdx +119 -0
- package/src/content/docs/ko/zen.mdx +327 -0
- package/src/content/docs/lsp.mdx +214 -0
- package/src/content/docs/mcp-servers.mdx +512 -0
- package/src/content/docs/models.mdx +223 -0
- package/src/content/docs/nb/acp.mdx +156 -0
- package/src/content/docs/nb/agents.mdx +754 -0
- package/src/content/docs/nb/cli.mdx +617 -0
- package/src/content/docs/nb/commands.mdx +323 -0
- package/src/content/docs/nb/config.mdx +688 -0
- package/src/content/docs/nb/custom-tools.mdx +196 -0
- package/src/content/docs/nb/ecosystem.mdx +78 -0
- package/src/content/docs/nb/enterprise.mdx +170 -0
- package/src/content/docs/nb/formatters.mdx +131 -0
- package/src/content/docs/nb/github.mdx +325 -0
- package/src/content/docs/nb/gitlab.mdx +195 -0
- package/src/content/docs/nb/go.mdx +238 -0
- package/src/content/docs/nb/ide.mdx +48 -0
- package/src/content/docs/nb/index.mdx +359 -0
- package/src/content/docs/nb/keybinds.mdx +194 -0
- package/src/content/docs/nb/lsp.mdx +208 -0
- package/src/content/docs/nb/mcp-servers.mdx +624 -0
- package/src/content/docs/nb/models.mdx +223 -0
- package/src/content/docs/nb/network.mdx +57 -0
- package/src/content/docs/nb/permissions.mdx +235 -0
- package/src/content/docs/nb/plugins.mdx +389 -0
- package/src/content/docs/nb/providers.mdx +1956 -0
- package/src/content/docs/nb/rules.mdx +180 -0
- package/src/content/docs/nb/sdk.mdx +463 -0
- package/src/content/docs/nb/server.mdx +287 -0
- package/src/content/docs/nb/share.mdx +128 -0
- package/src/content/docs/nb/skills.mdx +222 -0
- package/src/content/docs/nb/themes.mdx +369 -0
- package/src/content/docs/nb/tools.mdx +341 -0
- package/src/content/docs/nb/troubleshooting.mdx +225 -0
- package/src/content/docs/nb/tui.mdx +429 -0
- package/src/content/docs/nb/web.mdx +105 -0
- package/src/content/docs/nb/windows-wsl.mdx +113 -0
- package/src/content/docs/nb/zen.mdx +345 -0
- package/src/content/docs/network.mdx +57 -0
- package/src/content/docs/permissions.mdx +256 -0
- package/src/content/docs/pl/acp.mdx +158 -0
- package/src/content/docs/pl/agents.mdx +754 -0
- package/src/content/docs/pl/cli.mdx +617 -0
- package/src/content/docs/pl/commands.mdx +323 -0
- package/src/content/docs/pl/config.mdx +680 -0
- package/src/content/docs/pl/custom-tools.mdx +196 -0
- package/src/content/docs/pl/ecosystem.mdx +78 -0
- package/src/content/docs/pl/enterprise.mdx +170 -0
- package/src/content/docs/pl/formatters.mdx +131 -0
- package/src/content/docs/pl/github.mdx +321 -0
- package/src/content/docs/pl/gitlab.mdx +195 -0
- package/src/content/docs/pl/go.mdx +230 -0
- package/src/content/docs/pl/ide.mdx +48 -0
- package/src/content/docs/pl/index.mdx +347 -0
- package/src/content/docs/pl/keybinds.mdx +194 -0
- package/src/content/docs/pl/lsp.mdx +208 -0
- package/src/content/docs/pl/mcp-servers.mdx +511 -0
- package/src/content/docs/pl/models.mdx +223 -0
- package/src/content/docs/pl/network.mdx +57 -0
- package/src/content/docs/pl/permissions.mdx +235 -0
- package/src/content/docs/pl/plugins.mdx +385 -0
- package/src/content/docs/pl/providers.mdx +1986 -0
- package/src/content/docs/pl/rules.mdx +180 -0
- package/src/content/docs/pl/sdk.mdx +463 -0
- package/src/content/docs/pl/server.mdx +287 -0
- package/src/content/docs/pl/share.mdx +128 -0
- package/src/content/docs/pl/skills.mdx +222 -0
- package/src/content/docs/pl/themes.mdx +369 -0
- package/src/content/docs/pl/tools.mdx +341 -0
- package/src/content/docs/pl/troubleshooting.mdx +300 -0
- package/src/content/docs/pl/tui.mdx +429 -0
- package/src/content/docs/pl/web.mdx +142 -0
- package/src/content/docs/pl/windows-wsl.mdx +113 -0
- package/src/content/docs/pl/zen.mdx +344 -0
- package/src/content/docs/plugins.mdx +389 -0
- package/src/content/docs/policies.mdx +137 -0
- package/src/content/docs/providers.mdx +2501 -0
- package/src/content/docs/pt-br/acp.mdx +156 -0
- package/src/content/docs/pt-br/agents.mdx +755 -0
- package/src/content/docs/pt-br/cli.mdx +616 -0
- package/src/content/docs/pt-br/commands.mdx +322 -0
- package/src/content/docs/pt-br/config.mdx +687 -0
- package/src/content/docs/pt-br/custom-tools.mdx +196 -0
- package/src/content/docs/pt-br/ecosystem.mdx +78 -0
- package/src/content/docs/pt-br/enterprise.mdx +166 -0
- package/src/content/docs/pt-br/formatters.mdx +131 -0
- package/src/content/docs/pt-br/github.mdx +321 -0
- package/src/content/docs/pt-br/gitlab.mdx +195 -0
- package/src/content/docs/pt-br/go.mdx +238 -0
- package/src/content/docs/pt-br/ide.mdx +48 -0
- package/src/content/docs/pt-br/index.mdx +344 -0
- package/src/content/docs/pt-br/keybinds.mdx +194 -0
- package/src/content/docs/pt-br/lsp.mdx +208 -0
- package/src/content/docs/pt-br/mcp-servers.mdx +511 -0
- package/src/content/docs/pt-br/models.mdx +222 -0
- package/src/content/docs/pt-br/network.mdx +57 -0
- package/src/content/docs/pt-br/permissions.mdx +235 -0
- package/src/content/docs/pt-br/plugins.mdx +388 -0
- package/src/content/docs/pt-br/providers.mdx +1989 -0
- package/src/content/docs/pt-br/rules.mdx +180 -0
- package/src/content/docs/pt-br/sdk.mdx +463 -0
- package/src/content/docs/pt-br/server.mdx +284 -0
- package/src/content/docs/pt-br/share.mdx +127 -0
- package/src/content/docs/pt-br/skills.mdx +222 -0
- package/src/content/docs/pt-br/themes.mdx +369 -0
- package/src/content/docs/pt-br/tools.mdx +341 -0
- package/src/content/docs/pt-br/troubleshooting.mdx +299 -0
- package/src/content/docs/pt-br/tui.mdx +426 -0
- package/src/content/docs/pt-br/web.mdx +142 -0
- package/src/content/docs/pt-br/windows-wsl.mdx +113 -0
- package/src/content/docs/pt-br/zen.mdx +327 -0
- package/src/content/docs/references.mdx +157 -0
- package/src/content/docs/ru/acp.mdx +156 -0
- package/src/content/docs/ru/agents.mdx +754 -0
- package/src/content/docs/ru/cli.mdx +617 -0
- package/src/content/docs/ru/commands.mdx +323 -0
- package/src/content/docs/ru/config.mdx +685 -0
- package/src/content/docs/ru/custom-tools.mdx +170 -0
- package/src/content/docs/ru/ecosystem.mdx +78 -0
- package/src/content/docs/ru/enterprise.mdx +168 -0
- package/src/content/docs/ru/formatters.mdx +119 -0
- package/src/content/docs/ru/github.mdx +321 -0
- package/src/content/docs/ru/gitlab.mdx +195 -0
- package/src/content/docs/ru/go.mdx +238 -0
- package/src/content/docs/ru/ide.mdx +48 -0
- package/src/content/docs/ru/index.mdx +356 -0
- package/src/content/docs/ru/keybinds.mdx +194 -0
- package/src/content/docs/ru/lsp.mdx +207 -0
- package/src/content/docs/ru/mcp-servers.mdx +511 -0
- package/src/content/docs/ru/models.mdx +223 -0
- package/src/content/docs/ru/network.mdx +57 -0
- package/src/content/docs/ru/permissions.mdx +235 -0
- package/src/content/docs/ru/plugins.mdx +385 -0
- package/src/content/docs/ru/providers.mdx +1987 -0
- package/src/content/docs/ru/rules.mdx +180 -0
- package/src/content/docs/ru/sdk.mdx +463 -0
- package/src/content/docs/ru/server.mdx +287 -0
- package/src/content/docs/ru/share.mdx +128 -0
- package/src/content/docs/ru/skills.mdx +222 -0
- package/src/content/docs/ru/themes.mdx +369 -0
- package/src/content/docs/ru/tools.mdx +341 -0
- package/src/content/docs/ru/troubleshooting.mdx +300 -0
- package/src/content/docs/ru/tui.mdx +429 -0
- package/src/content/docs/ru/web.mdx +142 -0
- package/src/content/docs/ru/windows-wsl.mdx +113 -0
- package/src/content/docs/ru/zen.mdx +345 -0
- package/src/content/docs/rules.mdx +188 -0
- package/src/content/docs/sdk.mdx +463 -0
- package/src/content/docs/server.mdx +287 -0
- package/src/content/docs/share.mdx +128 -0
- package/src/content/docs/skills.mdx +222 -0
- package/src/content/docs/th/acp.mdx +156 -0
- package/src/content/docs/th/agents.mdx +744 -0
- package/src/content/docs/th/cli.mdx +618 -0
- package/src/content/docs/th/commands.mdx +320 -0
- package/src/content/docs/th/config.mdx +690 -0
- package/src/content/docs/th/custom-tools.mdx +196 -0
- package/src/content/docs/th/ecosystem.mdx +78 -0
- package/src/content/docs/th/enterprise.mdx +170 -0
- package/src/content/docs/th/formatters.mdx +131 -0
- package/src/content/docs/th/github.mdx +321 -0
- package/src/content/docs/th/gitlab.mdx +195 -0
- package/src/content/docs/th/go.mdx +224 -0
- package/src/content/docs/th/ide.mdx +48 -0
- package/src/content/docs/th/index.mdx +360 -0
- package/src/content/docs/th/keybinds.mdx +194 -0
- package/src/content/docs/th/lsp.mdx +208 -0
- package/src/content/docs/th/mcp-servers.mdx +511 -0
- package/src/content/docs/th/models.mdx +223 -0
- package/src/content/docs/th/network.mdx +57 -0
- package/src/content/docs/th/permissions.mdx +235 -0
- package/src/content/docs/th/plugins.mdx +389 -0
- package/src/content/docs/th/providers.mdx +2532 -0
- package/src/content/docs/th/rules.mdx +180 -0
- package/src/content/docs/th/sdk.mdx +463 -0
- package/src/content/docs/th/server.mdx +287 -0
- package/src/content/docs/th/share.mdx +128 -0
- package/src/content/docs/th/skills.mdx +222 -0
- package/src/content/docs/th/themes.mdx +369 -0
- package/src/content/docs/th/tools.mdx +341 -0
- package/src/content/docs/th/troubleshooting.mdx +300 -0
- package/src/content/docs/th/tui.mdx +429 -0
- package/src/content/docs/th/web.mdx +142 -0
- package/src/content/docs/th/windows-wsl.mdx +113 -0
- package/src/content/docs/th/zen.mdx +329 -0
- package/src/content/docs/themes.mdx +369 -0
- package/src/content/docs/tools.mdx +345 -0
- package/src/content/docs/tr/acp.mdx +156 -0
- package/src/content/docs/tr/agents.mdx +754 -0
- package/src/content/docs/tr/cli.mdx +617 -0
- package/src/content/docs/tr/commands.mdx +323 -0
- package/src/content/docs/tr/config.mdx +687 -0
- package/src/content/docs/tr/custom-tools.mdx +196 -0
- package/src/content/docs/tr/ecosystem.mdx +78 -0
- package/src/content/docs/tr/enterprise.mdx +170 -0
- package/src/content/docs/tr/formatters.mdx +131 -0
- package/src/content/docs/tr/github.mdx +321 -0
- package/src/content/docs/tr/gitlab.mdx +195 -0
- package/src/content/docs/tr/go.mdx +224 -0
- package/src/content/docs/tr/ide.mdx +48 -0
- package/src/content/docs/tr/index.mdx +347 -0
- package/src/content/docs/tr/keybinds.mdx +194 -0
- package/src/content/docs/tr/lsp.mdx +208 -0
- package/src/content/docs/tr/mcp-servers.mdx +511 -0
- package/src/content/docs/tr/models.mdx +223 -0
- package/src/content/docs/tr/network.mdx +57 -0
- package/src/content/docs/tr/permissions.mdx +235 -0
- package/src/content/docs/tr/plugins.mdx +388 -0
- package/src/content/docs/tr/providers.mdx +1988 -0
- package/src/content/docs/tr/rules.mdx +180 -0
- package/src/content/docs/tr/sdk.mdx +463 -0
- package/src/content/docs/tr/server.mdx +285 -0
- package/src/content/docs/tr/share.mdx +127 -0
- package/src/content/docs/tr/skills.mdx +222 -0
- package/src/content/docs/tr/themes.mdx +369 -0
- package/src/content/docs/tr/tools.mdx +341 -0
- package/src/content/docs/tr/troubleshooting.mdx +299 -0
- package/src/content/docs/tr/tui.mdx +427 -0
- package/src/content/docs/tr/web.mdx +142 -0
- package/src/content/docs/tr/windows-wsl.mdx +113 -0
- package/src/content/docs/tr/zen.mdx +327 -0
- package/src/content/docs/troubleshooting.mdx +314 -0
- package/src/content/docs/tui.mdx +427 -0
- package/src/content/docs/web.mdx +142 -0
- package/src/content/docs/windows-wsl.mdx +112 -0
- package/src/content/docs/zen.mdx +345 -0
- package/src/content/docs/zh-cn/acp.mdx +156 -0
- package/src/content/docs/zh-cn/agents.mdx +754 -0
- package/src/content/docs/zh-cn/cli.mdx +617 -0
- package/src/content/docs/zh-cn/commands.mdx +322 -0
- package/src/content/docs/zh-cn/config.mdx +683 -0
- package/src/content/docs/zh-cn/custom-tools.mdx +196 -0
- package/src/content/docs/zh-cn/ecosystem.mdx +78 -0
- package/src/content/docs/zh-cn/enterprise.mdx +165 -0
- package/src/content/docs/zh-cn/formatters.mdx +132 -0
- package/src/content/docs/zh-cn/github.mdx +321 -0
- package/src/content/docs/zh-cn/gitlab.mdx +194 -0
- package/src/content/docs/zh-cn/go.mdx +224 -0
- package/src/content/docs/zh-cn/ide.mdx +48 -0
- package/src/content/docs/zh-cn/index.mdx +343 -0
- package/src/content/docs/zh-cn/keybinds.mdx +194 -0
- package/src/content/docs/zh-cn/lsp.mdx +208 -0
- package/src/content/docs/zh-cn/mcp-servers.mdx +511 -0
- package/src/content/docs/zh-cn/models.mdx +222 -0
- package/src/content/docs/zh-cn/network.mdx +57 -0
- package/src/content/docs/zh-cn/permissions.mdx +235 -0
- package/src/content/docs/zh-cn/plugins.mdx +388 -0
- package/src/content/docs/zh-cn/providers.mdx +1949 -0
- package/src/content/docs/zh-cn/rules.mdx +180 -0
- package/src/content/docs/zh-cn/sdk.mdx +463 -0
- package/src/content/docs/zh-cn/server.mdx +284 -0
- package/src/content/docs/zh-cn/share.mdx +127 -0
- package/src/content/docs/zh-cn/skills.mdx +222 -0
- package/src/content/docs/zh-cn/themes.mdx +369 -0
- package/src/content/docs/zh-cn/tools.mdx +341 -0
- package/src/content/docs/zh-cn/troubleshooting.mdx +299 -0
- package/src/content/docs/zh-cn/tui.mdx +426 -0
- package/src/content/docs/zh-cn/web.mdx +142 -0
- package/src/content/docs/zh-cn/windows-wsl.mdx +112 -0
- package/src/content/docs/zh-cn/zen.mdx +327 -0
- package/src/content/docs/zh-tw/acp.mdx +156 -0
- package/src/content/docs/zh-tw/agents.mdx +754 -0
- package/src/content/docs/zh-tw/cli.mdx +617 -0
- package/src/content/docs/zh-tw/commands.mdx +322 -0
- package/src/content/docs/zh-tw/config.mdx +687 -0
- package/src/content/docs/zh-tw/custom-tools.mdx +196 -0
- package/src/content/docs/zh-tw/ecosystem.mdx +78 -0
- package/src/content/docs/zh-tw/enterprise.mdx +165 -0
- package/src/content/docs/zh-tw/formatters.mdx +132 -0
- package/src/content/docs/zh-tw/github.mdx +321 -0
- package/src/content/docs/zh-tw/gitlab.mdx +194 -0
- package/src/content/docs/zh-tw/go.mdx +224 -0
- package/src/content/docs/zh-tw/ide.mdx +48 -0
- package/src/content/docs/zh-tw/index.mdx +343 -0
- package/src/content/docs/zh-tw/keybinds.mdx +194 -0
- package/src/content/docs/zh-tw/lsp.mdx +208 -0
- package/src/content/docs/zh-tw/mcp-servers.mdx +511 -0
- package/src/content/docs/zh-tw/models.mdx +222 -0
- package/src/content/docs/zh-tw/network.mdx +57 -0
- package/src/content/docs/zh-tw/permissions.mdx +235 -0
- package/src/content/docs/zh-tw/plugins.mdx +388 -0
- package/src/content/docs/zh-tw/providers.mdx +1970 -0
- package/src/content/docs/zh-tw/rules.mdx +180 -0
- package/src/content/docs/zh-tw/sdk.mdx +463 -0
- package/src/content/docs/zh-tw/server.mdx +284 -0
- package/src/content/docs/zh-tw/share.mdx +127 -0
- package/src/content/docs/zh-tw/skills.mdx +222 -0
- package/src/content/docs/zh-tw/themes.mdx +369 -0
- package/src/content/docs/zh-tw/tools.mdx +341 -0
- package/src/content/docs/zh-tw/troubleshooting.mdx +299 -0
- package/src/content/docs/zh-tw/tui.mdx +426 -0
- package/src/content/docs/zh-tw/web.mdx +142 -0
- package/src/content/docs/zh-tw/windows-wsl.mdx +112 -0
- package/src/content/docs/zh-tw/zen.mdx +333 -0
- package/src/content/i18n/ar.json +75 -0
- package/src/content/i18n/bs.json +75 -0
- package/src/content/i18n/da.json +75 -0
- package/src/content/i18n/de.json +75 -0
- package/src/content/i18n/en.json +75 -0
- package/src/content/i18n/es.json +75 -0
- package/src/content/i18n/fr.json +75 -0
- package/src/content/i18n/it.json +75 -0
- package/src/content/i18n/ja.json +75 -0
- package/src/content/i18n/ko.json +75 -0
- package/src/content/i18n/nb.json +75 -0
- package/src/content/i18n/pl.json +75 -0
- package/src/content/i18n/pt-BR.json +75 -0
- package/src/content/i18n/ru.json +75 -0
- package/src/content/i18n/th.json +75 -0
- package/src/content/i18n/tr.json +75 -0
- package/src/content/i18n/zh-CN.json +75 -0
- package/src/content/i18n/zh-TW.json +75 -0
- package/src/content.config.ts +16 -0
- package/src/i18n/locales.ts +117 -0
- package/src/middleware.ts +94 -0
- package/src/pages/[...slug].md.ts +34 -0
- package/src/pages/s/[id].astro +164 -0
- package/src/styles/custom.css +405 -0
- package/src/types/lang-map.d.ts +27 -0
- package/src/types/starlight-virtual.d.ts +14 -0
- package/sst-env.d.ts +10 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { parsePatch } from "diff"
|
|
2
|
+
import { createMemo, For } from "solid-js"
|
|
3
|
+
import { ContentCode } from "./content-code"
|
|
4
|
+
import styles from "./content-diff.module.css"
|
|
5
|
+
|
|
6
|
+
type DiffRow = {
|
|
7
|
+
left: string
|
|
8
|
+
right: string
|
|
9
|
+
type: "added" | "removed" | "unchanged" | "modified"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
diff: string
|
|
14
|
+
lang?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function ContentDiff(props: Props) {
|
|
18
|
+
const rows = createMemo(() => {
|
|
19
|
+
const diffRows: DiffRow[] = []
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
const patches = parsePatch(props.diff)
|
|
23
|
+
|
|
24
|
+
for (const patch of patches) {
|
|
25
|
+
for (const hunk of patch.hunks) {
|
|
26
|
+
const lines = hunk.lines
|
|
27
|
+
let i = 0
|
|
28
|
+
|
|
29
|
+
while (i < lines.length) {
|
|
30
|
+
const line = lines[i]
|
|
31
|
+
const content = line.slice(1)
|
|
32
|
+
const prefix = line[0]
|
|
33
|
+
|
|
34
|
+
if (prefix === "-") {
|
|
35
|
+
// Look ahead for consecutive additions to pair with removals
|
|
36
|
+
const removals: string[] = [content]
|
|
37
|
+
let j = i + 1
|
|
38
|
+
|
|
39
|
+
// Collect all consecutive removals
|
|
40
|
+
while (j < lines.length && lines[j][0] === "-") {
|
|
41
|
+
removals.push(lines[j].slice(1))
|
|
42
|
+
j++
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Collect all consecutive additions that follow
|
|
46
|
+
const additions: string[] = []
|
|
47
|
+
while (j < lines.length && lines[j][0] === "+") {
|
|
48
|
+
additions.push(lines[j].slice(1))
|
|
49
|
+
j++
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Pair removals with additions
|
|
53
|
+
const maxLength = Math.max(removals.length, additions.length)
|
|
54
|
+
for (let k = 0; k < maxLength; k++) {
|
|
55
|
+
const hasLeft = k < removals.length
|
|
56
|
+
const hasRight = k < additions.length
|
|
57
|
+
|
|
58
|
+
if (hasLeft && hasRight) {
|
|
59
|
+
// Replacement - left is removed, right is added
|
|
60
|
+
diffRows.push({
|
|
61
|
+
left: removals[k],
|
|
62
|
+
right: additions[k],
|
|
63
|
+
type: "modified",
|
|
64
|
+
})
|
|
65
|
+
} else if (hasLeft) {
|
|
66
|
+
// Pure removal
|
|
67
|
+
diffRows.push({
|
|
68
|
+
left: removals[k],
|
|
69
|
+
right: "",
|
|
70
|
+
type: "removed",
|
|
71
|
+
})
|
|
72
|
+
} else if (hasRight) {
|
|
73
|
+
// Pure addition - only create if we actually have content
|
|
74
|
+
diffRows.push({
|
|
75
|
+
left: "",
|
|
76
|
+
right: additions[k],
|
|
77
|
+
type: "added",
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
i = j
|
|
83
|
+
} else if (prefix === "+") {
|
|
84
|
+
// Standalone addition (not paired with removal)
|
|
85
|
+
diffRows.push({
|
|
86
|
+
left: "",
|
|
87
|
+
right: content,
|
|
88
|
+
type: "added",
|
|
89
|
+
})
|
|
90
|
+
i++
|
|
91
|
+
} else if (prefix === " ") {
|
|
92
|
+
diffRows.push({
|
|
93
|
+
left: content === "" ? " " : content,
|
|
94
|
+
right: content === "" ? " " : content,
|
|
95
|
+
type: "unchanged",
|
|
96
|
+
})
|
|
97
|
+
i++
|
|
98
|
+
} else {
|
|
99
|
+
i++
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
} catch (error) {
|
|
105
|
+
console.error("Failed to parse patch:", error)
|
|
106
|
+
return []
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return diffRows
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
const mobileRows = createMemo(() => {
|
|
113
|
+
const mobileBlocks: {
|
|
114
|
+
type: "removed" | "added" | "unchanged"
|
|
115
|
+
lines: string[]
|
|
116
|
+
}[] = []
|
|
117
|
+
const currentRows = rows()
|
|
118
|
+
|
|
119
|
+
let i = 0
|
|
120
|
+
while (i < currentRows.length) {
|
|
121
|
+
const removedLines: string[] = []
|
|
122
|
+
const addedLines: string[] = []
|
|
123
|
+
|
|
124
|
+
// Collect consecutive modified/removed/added rows
|
|
125
|
+
while (
|
|
126
|
+
i < currentRows.length &&
|
|
127
|
+
(currentRows[i].type === "modified" || currentRows[i].type === "removed" || currentRows[i].type === "added")
|
|
128
|
+
) {
|
|
129
|
+
const row = currentRows[i]
|
|
130
|
+
if (row.left && (row.type === "removed" || row.type === "modified")) {
|
|
131
|
+
removedLines.push(row.left)
|
|
132
|
+
}
|
|
133
|
+
if (row.right && (row.type === "added" || row.type === "modified")) {
|
|
134
|
+
addedLines.push(row.right)
|
|
135
|
+
}
|
|
136
|
+
i++
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Add grouped blocks
|
|
140
|
+
if (removedLines.length > 0) {
|
|
141
|
+
mobileBlocks.push({ type: "removed", lines: removedLines })
|
|
142
|
+
}
|
|
143
|
+
if (addedLines.length > 0) {
|
|
144
|
+
mobileBlocks.push({ type: "added", lines: addedLines })
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Add unchanged rows as-is
|
|
148
|
+
if (i < currentRows.length && currentRows[i].type === "unchanged") {
|
|
149
|
+
mobileBlocks.push({
|
|
150
|
+
type: "unchanged",
|
|
151
|
+
lines: [currentRows[i].left],
|
|
152
|
+
})
|
|
153
|
+
i++
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return mobileBlocks
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<div class={styles.root}>
|
|
162
|
+
<div data-component="desktop">
|
|
163
|
+
<For each={rows()}>
|
|
164
|
+
{(row) => (
|
|
165
|
+
<div data-component="diff-row" data-type={row.type}>
|
|
166
|
+
<div
|
|
167
|
+
data-slot="before"
|
|
168
|
+
data-diff-type={row.type === "removed" || row.type === "modified" ? "removed" : ""}
|
|
169
|
+
>
|
|
170
|
+
<ContentCode code={row.left} flush lang={props.lang} />
|
|
171
|
+
</div>
|
|
172
|
+
<div data-slot="after" data-diff-type={row.type === "added" || row.type === "modified" ? "added" : ""}>
|
|
173
|
+
<ContentCode code={row.right} lang={props.lang} flush />
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
)}
|
|
177
|
+
</For>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<div data-component="mobile">
|
|
181
|
+
<For each={mobileRows()}>
|
|
182
|
+
{(block) => (
|
|
183
|
+
<div data-component="diff-block" data-type={block.type}>
|
|
184
|
+
<For each={block.lines}>
|
|
185
|
+
{(line) => (
|
|
186
|
+
<div data-diff-type={block.type === "removed" ? "removed" : block.type === "added" ? "added" : ""}>
|
|
187
|
+
<ContentCode code={line} lang={props.lang} flush />
|
|
188
|
+
</div>
|
|
189
|
+
)}
|
|
190
|
+
</For>
|
|
191
|
+
</div>
|
|
192
|
+
)}
|
|
193
|
+
</For>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// const testDiff = `--- combined_before.txt 2025-06-24 16:38:08
|
|
200
|
+
// +++ combined_after.txt 2025-06-24 16:38:12
|
|
201
|
+
// @@ -1,21 +1,25 @@
|
|
202
|
+
// unchanged line
|
|
203
|
+
// -deleted line
|
|
204
|
+
// -old content
|
|
205
|
+
// +added line
|
|
206
|
+
// +new content
|
|
207
|
+
//
|
|
208
|
+
// -removed empty line below
|
|
209
|
+
// +added empty line above
|
|
210
|
+
//
|
|
211
|
+
// - tab indented
|
|
212
|
+
// -trailing spaces
|
|
213
|
+
// -very long line that will definitely wrap in most editors and cause potential alignment issues when displayed in a two column diff view
|
|
214
|
+
// -unicode content: 🚀 ✨ 中文
|
|
215
|
+
// -mixed content with tabs and spaces
|
|
216
|
+
// + space indented
|
|
217
|
+
// +no trailing spaces
|
|
218
|
+
// +short line
|
|
219
|
+
// +very long replacement line that will also wrap and test how the diff viewer handles long line additions after short line removals
|
|
220
|
+
// +different unicode: 🎉 💻 日本語
|
|
221
|
+
// +normalized content with consistent spacing
|
|
222
|
+
// +newline to content
|
|
223
|
+
//
|
|
224
|
+
// -content to remove
|
|
225
|
+
// -whitespace only:
|
|
226
|
+
// -multiple
|
|
227
|
+
// -consecutive
|
|
228
|
+
// -deletions
|
|
229
|
+
// -single deletion
|
|
230
|
+
// +
|
|
231
|
+
// +single addition
|
|
232
|
+
// +first addition
|
|
233
|
+
// +second addition
|
|
234
|
+
// +third addition
|
|
235
|
+
// line before addition
|
|
236
|
+
// +first added line
|
|
237
|
+
// +
|
|
238
|
+
// +third added line
|
|
239
|
+
// line after addition
|
|
240
|
+
// final unchanged line`
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
background-color: var(--sl-color-bg-surface);
|
|
3
|
+
padding: 0.5rem calc(0.5rem + 3px);
|
|
4
|
+
border-radius: 0.25rem;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
gap: 1rem;
|
|
9
|
+
align-self: flex-start;
|
|
10
|
+
|
|
11
|
+
[data-section="content"] {
|
|
12
|
+
pre {
|
|
13
|
+
margin-bottom: 0.5rem;
|
|
14
|
+
line-height: 1.5;
|
|
15
|
+
font-size: 0.75rem;
|
|
16
|
+
white-space: pre-wrap;
|
|
17
|
+
word-break: break-word;
|
|
18
|
+
|
|
19
|
+
&:last-child {
|
|
20
|
+
margin-bottom: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
span {
|
|
24
|
+
margin-right: 0.25rem;
|
|
25
|
+
&:last-child {
|
|
26
|
+
margin-right: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
span[data-color="red"] {
|
|
30
|
+
color: var(--sl-color-red);
|
|
31
|
+
}
|
|
32
|
+
span[data-color="dimmed"] {
|
|
33
|
+
color: var(--sl-color-text-dimmed);
|
|
34
|
+
}
|
|
35
|
+
span[data-marker="label"] {
|
|
36
|
+
text-transform: uppercase;
|
|
37
|
+
letter-spacing: -0.5px;
|
|
38
|
+
}
|
|
39
|
+
span[data-separator] {
|
|
40
|
+
margin-right: 0.375rem;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&[data-expanded="true"] {
|
|
46
|
+
[data-section="content"] {
|
|
47
|
+
display: block;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
&[data-expanded="false"] {
|
|
51
|
+
[data-section="content"] {
|
|
52
|
+
display: -webkit-box;
|
|
53
|
+
-webkit-box-orient: vertical;
|
|
54
|
+
-webkit-line-clamp: 7;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
button {
|
|
60
|
+
flex: 0 0 auto;
|
|
61
|
+
padding: 2px 0;
|
|
62
|
+
font-size: 0.75rem;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import style from "./content-error.module.css"
|
|
2
|
+
import { type JSX, createSignal } from "solid-js"
|
|
3
|
+
import { createOverflow, useShareMessages } from "./common"
|
|
4
|
+
|
|
5
|
+
interface Props extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
expand?: boolean
|
|
7
|
+
}
|
|
8
|
+
export function ContentError(props: Props) {
|
|
9
|
+
const [expanded, setExpanded] = createSignal(false)
|
|
10
|
+
const overflow = createOverflow()
|
|
11
|
+
const messages = useShareMessages()
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div class={style.root} data-expanded={expanded() || props.expand === true ? true : undefined}>
|
|
15
|
+
<div data-section="content" ref={overflow.ref}>
|
|
16
|
+
{props.children}
|
|
17
|
+
</div>
|
|
18
|
+
{((!props.expand && overflow.status) || expanded()) && (
|
|
19
|
+
<button type="button" data-element-button-text onClick={() => setExpanded((e) => !e)}>
|
|
20
|
+
{expanded() ? messages.show_less : messages.show_more}
|
|
21
|
+
</button>
|
|
22
|
+
)}
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
gap: 1rem;
|
|
7
|
+
|
|
8
|
+
[data-slot="expand-button"] {
|
|
9
|
+
flex: 0 0 auto;
|
|
10
|
+
padding: 2px 0;
|
|
11
|
+
font-size: 0.857em;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[data-slot="markdown"] {
|
|
15
|
+
display: -webkit-box;
|
|
16
|
+
-webkit-box-orient: vertical;
|
|
17
|
+
-webkit-line-clamp: 3;
|
|
18
|
+
line-clamp: 3;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
|
|
21
|
+
[data-expanded] & {
|
|
22
|
+
display: block;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
font-size: 1em;
|
|
26
|
+
line-height: 1.5;
|
|
27
|
+
|
|
28
|
+
p,
|
|
29
|
+
blockquote,
|
|
30
|
+
ul,
|
|
31
|
+
ol,
|
|
32
|
+
dl,
|
|
33
|
+
table,
|
|
34
|
+
pre {
|
|
35
|
+
margin-bottom: 1rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
ul,
|
|
39
|
+
ol {
|
|
40
|
+
margin-bottom: 0.5rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Add spacing between top-level list items */
|
|
44
|
+
ol > li {
|
|
45
|
+
margin-bottom: 0.5rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
strong {
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
ol {
|
|
53
|
+
list-style-position: outside;
|
|
54
|
+
padding-left: 1.5rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
ul {
|
|
58
|
+
padding-left: 1.5rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Nested list spacing */
|
|
62
|
+
li ul,
|
|
63
|
+
li ol {
|
|
64
|
+
margin-top: 0.25rem;
|
|
65
|
+
margin-bottom: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
h1,
|
|
69
|
+
h2,
|
|
70
|
+
h3,
|
|
71
|
+
h4,
|
|
72
|
+
h5,
|
|
73
|
+
h6 {
|
|
74
|
+
font-size: 1em;
|
|
75
|
+
font-weight: 600;
|
|
76
|
+
margin-bottom: 0.5rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
& > *:last-child {
|
|
80
|
+
margin-bottom: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
pre {
|
|
84
|
+
--shiki-dark-bg: var(--sl-color-bg-surface) !important;
|
|
85
|
+
background-color: var(--sl-color-bg-surface) !important;
|
|
86
|
+
padding: 0.5rem 0.75rem;
|
|
87
|
+
line-height: 1.6;
|
|
88
|
+
font-size: 0.857em;
|
|
89
|
+
white-space: pre-wrap;
|
|
90
|
+
word-break: break-word;
|
|
91
|
+
|
|
92
|
+
span {
|
|
93
|
+
white-space: break-spaces;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
code {
|
|
98
|
+
font-weight: 500;
|
|
99
|
+
|
|
100
|
+
&:not(pre code) {
|
|
101
|
+
&::before {
|
|
102
|
+
content: "`";
|
|
103
|
+
font-weight: 700;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&::after {
|
|
107
|
+
content: "`";
|
|
108
|
+
font-weight: 700;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
table {
|
|
114
|
+
border-collapse: collapse;
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
th,
|
|
119
|
+
td {
|
|
120
|
+
border: 1px solid var(--sl-color-border);
|
|
121
|
+
padding: 0.5rem 0.75rem;
|
|
122
|
+
text-align: left;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
th {
|
|
126
|
+
border-bottom: 1px solid var(--sl-color-border);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Remove outer borders */
|
|
130
|
+
table tr:first-child th,
|
|
131
|
+
table tr:first-child td {
|
|
132
|
+
border-top: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
table tr:last-child td {
|
|
136
|
+
border-bottom: none;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
table th:first-child,
|
|
140
|
+
table td:first-child {
|
|
141
|
+
border-left: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
table th:last-child,
|
|
145
|
+
table td:last-child {
|
|
146
|
+
border-right: none;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[data-component="copy-button"] {
|
|
151
|
+
top: 0;
|
|
152
|
+
right: 0;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { marked } from "marked"
|
|
2
|
+
import { codeToHtml } from "shiki"
|
|
3
|
+
import markedShiki from "marked-shiki"
|
|
4
|
+
import { createOverflow, useShareMessages } from "./common"
|
|
5
|
+
import { CopyButton } from "./copy-button"
|
|
6
|
+
import { createResource, createSignal } from "solid-js"
|
|
7
|
+
import style from "./content-markdown.module.css"
|
|
8
|
+
|
|
9
|
+
const markedWithShiki = marked.use(
|
|
10
|
+
{
|
|
11
|
+
renderer: {
|
|
12
|
+
link({ href, title, text }) {
|
|
13
|
+
const titleAttr = title ? ` title="${title}"` : ""
|
|
14
|
+
return `<a href="${href}"${titleAttr} target="_blank" rel="noopener noreferrer">${text}</a>`
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
markedShiki({
|
|
19
|
+
highlight(code, lang) {
|
|
20
|
+
return codeToHtml(code, {
|
|
21
|
+
lang: lang || "text",
|
|
22
|
+
themes: {
|
|
23
|
+
light: "github-light",
|
|
24
|
+
dark: "github-dark",
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
interface Props {
|
|
32
|
+
text: string
|
|
33
|
+
expand?: boolean
|
|
34
|
+
highlight?: boolean
|
|
35
|
+
}
|
|
36
|
+
export function ContentMarkdown(props: Props) {
|
|
37
|
+
const [html] = createResource(
|
|
38
|
+
() => strip(props.text),
|
|
39
|
+
async (markdown) => {
|
|
40
|
+
return markedWithShiki.parse(markdown)
|
|
41
|
+
},
|
|
42
|
+
)
|
|
43
|
+
const [expanded, setExpanded] = createSignal(false)
|
|
44
|
+
const overflow = createOverflow()
|
|
45
|
+
const messages = useShareMessages()
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<div
|
|
49
|
+
class={style.root}
|
|
50
|
+
data-highlight={props.highlight === true ? true : undefined}
|
|
51
|
+
data-expanded={expanded() || props.expand === true ? true : undefined}
|
|
52
|
+
>
|
|
53
|
+
<div data-slot="markdown" ref={overflow.ref} innerHTML={html()} />
|
|
54
|
+
|
|
55
|
+
{!props.expand && overflow.status && (
|
|
56
|
+
<button
|
|
57
|
+
type="button"
|
|
58
|
+
data-component="text-button"
|
|
59
|
+
data-slot="expand-button"
|
|
60
|
+
onClick={() => setExpanded((e) => !e)}
|
|
61
|
+
>
|
|
62
|
+
{expanded() ? messages.show_less : messages.show_more}
|
|
63
|
+
</button>
|
|
64
|
+
)}
|
|
65
|
+
<CopyButton text={props.text} />
|
|
66
|
+
</div>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function strip(text: string): string {
|
|
71
|
+
const wrappedRe = /^\s*<([A-Za-z]\w*)>\s*([\s\S]*?)\s*<\/\1>\s*$/
|
|
72
|
+
const match = text.match(wrappedRe)
|
|
73
|
+
return match ? match[2] : text
|
|
74
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
position: relative;
|
|
3
|
+
color: var(--sl-color-text);
|
|
4
|
+
background-color: var(--sl-color-bg-surface);
|
|
5
|
+
padding: 0.5rem calc(0.5rem + 3px);
|
|
6
|
+
padding-right: calc(1rem + 18px);
|
|
7
|
+
border-radius: 0.25rem;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
gap: 1rem;
|
|
12
|
+
align-self: flex-start;
|
|
13
|
+
font-size: 0.875rem;
|
|
14
|
+
|
|
15
|
+
&[data-compact] {
|
|
16
|
+
font-size: 0.75rem;
|
|
17
|
+
color: var(--sl-color-text-dimmed);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-slot="text"] {
|
|
21
|
+
line-height: 1.5;
|
|
22
|
+
white-space: pre-wrap;
|
|
23
|
+
overflow-wrap: anywhere;
|
|
24
|
+
display: -webkit-box;
|
|
25
|
+
-webkit-box-orient: vertical;
|
|
26
|
+
-webkit-line-clamp: 3;
|
|
27
|
+
line-clamp: 3;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
|
|
30
|
+
[data-expanded] & {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[data-slot="expand-button"] {
|
|
36
|
+
flex: 0 0 auto;
|
|
37
|
+
padding: 2px 0;
|
|
38
|
+
font-size: 0.75rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[data-theme="invert"] {
|
|
42
|
+
background-color: var(--sl-color-blue-high);
|
|
43
|
+
color: var(--sl-color-text-invert);
|
|
44
|
+
|
|
45
|
+
[data-slot="expand-button"] {
|
|
46
|
+
opacity: 0.85;
|
|
47
|
+
color: var(--sl-color-text-invert);
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[data-theme="blue"] {
|
|
56
|
+
background-color: var(--sl-color-blue-low);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-component="copy-button"] {
|
|
60
|
+
top: 0.5rem;
|
|
61
|
+
right: calc(0.5rem - 1px);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import style from "./content-text.module.css"
|
|
2
|
+
import { createSignal } from "solid-js"
|
|
3
|
+
import { createOverflow, useShareMessages } from "./common"
|
|
4
|
+
import { CopyButton } from "./copy-button"
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
text: string
|
|
8
|
+
expand?: boolean
|
|
9
|
+
compact?: boolean
|
|
10
|
+
}
|
|
11
|
+
export function ContentText(props: Props) {
|
|
12
|
+
const [expanded, setExpanded] = createSignal(false)
|
|
13
|
+
const overflow = createOverflow()
|
|
14
|
+
const messages = useShareMessages()
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div
|
|
18
|
+
class={style.root}
|
|
19
|
+
data-expanded={expanded() || props.expand === true ? true : undefined}
|
|
20
|
+
data-compact={props.compact === true ? true : undefined}
|
|
21
|
+
>
|
|
22
|
+
<pre data-slot="text" ref={overflow.ref}>
|
|
23
|
+
{props.text}
|
|
24
|
+
</pre>
|
|
25
|
+
{((!props.expand && overflow.status) || expanded()) && (
|
|
26
|
+
<button
|
|
27
|
+
type="button"
|
|
28
|
+
data-component="text-button"
|
|
29
|
+
data-slot="expand-button"
|
|
30
|
+
onClick={() => setExpanded((e) => !e)}
|
|
31
|
+
>
|
|
32
|
+
{expanded() ? messages.show_less : messages.show_more}
|
|
33
|
+
</button>
|
|
34
|
+
)}
|
|
35
|
+
<CopyButton text={props.text} />
|
|
36
|
+
</div>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
position: absolute;
|
|
3
|
+
opacity: 0;
|
|
4
|
+
visibility: hidden;
|
|
5
|
+
transition: opacity 0.15s ease;
|
|
6
|
+
|
|
7
|
+
button {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
background: none;
|
|
10
|
+
border: none;
|
|
11
|
+
padding: 0.125rem;
|
|
12
|
+
color: var(--sl-color-text-secondary);
|
|
13
|
+
|
|
14
|
+
svg {
|
|
15
|
+
display: block;
|
|
16
|
+
width: 1rem;
|
|
17
|
+
height: 1rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&[data-copied="true"] {
|
|
21
|
+
color: var(--sl-color-green-high);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Show copy button when parent is hovered */
|
|
27
|
+
*:hover > .root {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
visibility: visible;
|
|
30
|
+
}
|