pascal-vscode 0.0.2 → 0.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.prettierrc.mjs +6 -0
  2. package/.vscodeignore +5 -32
  3. package/CHANGELOG.md +25 -1
  4. package/README.md +10 -40
  5. package/assets/screenshots/default.jpg +0 -0
  6. package/dist/extension.js +1 -1
  7. package/dist/types/webview.d.js +0 -0
  8. package/dist/utils.js +1 -0
  9. package/dist/webviewController.js +1 -0
  10. package/dist/webviews/availableWebviews.js +1 -0
  11. package/dist/webviews/showChangelog.js +1 -0
  12. package/package.json +19 -22
  13. package/src/extension.ts +10 -4
  14. package/src/types/webview.d.ts +15 -0
  15. package/src/utils.ts +9 -0
  16. package/src/webviewController.ts +52 -0
  17. package/src/webviews/availableWebviews.ts +4 -0
  18. package/src/webviews/showChangelog.ts +20 -0
  19. package/themes/default.json +434 -289
  20. package/tsconfig.build.json +4 -0
  21. package/tsconfig.json +2 -22
  22. package/.changeset/README.md +0 -8
  23. package/.changeset/config.json +0 -12
  24. package/.changeset/pre.json +0 -10
  25. package/.changeset/wise-cows-feel.md +0 -5
  26. package/.editorconfig +0 -15
  27. package/.github/FUNDING.yml +0 -6
  28. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
  29. package/.github/PULL_REQUEST_TEMPLATE.md +0 -5
  30. package/.github/actions/setup-git-commiter/action.yml +0 -49
  31. package/.github/actions/setup-pnpm/action.yml +0 -42
  32. package/.github/issue_labeler.yml +0 -2
  33. package/.github/labeler.yml +0 -9
  34. package/.github/renovate.json5 +0 -48
  35. package/.github/workflows/check_merge.yml +0 -109
  36. package/.github/workflows/cleanup_cache.yml +0 -46
  37. package/.github/workflows/diff_dependencies.yml +0 -26
  38. package/.github/workflows/format.yml +0 -45
  39. package/.github/workflows/label_issue.yml +0 -18
  40. package/.github/workflows/label_pr.yml +0 -16
  41. package/.github/workflows/lint_pr_title.yml +0 -49
  42. package/.github/workflows/release.yml +0 -69
  43. package/.prettierignore +0 -25
  44. package/.vscode/extensions.json +0 -10
  45. package/.vscode/launch.json +0 -25
  46. package/.vscode/settings.json +0 -13
  47. package/.vscode/tasks.json +0 -17
  48. package/CODE_OF_CONDUCT.md +0 -65
  49. package/CONTRIBUTING.md +0 -86
  50. package/assets/icon.svg +0 -1
  51. package/assets/preview.png +0 -0
  52. package/biome.jsonc +0 -113
  53. package/eslint.config.js +0 -91
  54. package/pnpm-workspace.yaml +0 -4
  55. package/prettier.config.mjs +0 -17
  56. package/scripts/build.js +0 -107
@@ -0,0 +1,6 @@
1
+ import baseConfig from '../../../prettier.config.mjs';
2
+
3
+ /** @type {import('prettier').Config} */
4
+ export default {
5
+ ...baseConfig
6
+ };
package/.vscodeignore CHANGED
@@ -1,32 +1,5 @@
1
- # IDE and test files
2
- .vscode/**
3
- .vscode-test/**
4
-
5
- # Source files
6
- src/**
7
- scripts/**
8
-
9
- # Configuration files
10
- .gitignore
11
- .yarnrc
12
- **/tsconfig.json
13
- **/eslint.config.js
14
- **/biome.jsonc
15
- **/prettier.config.mjs
16
- .eslintcache
17
- .prettierignore
18
-
19
- # Build artifacts
20
- **/*.map
21
-
22
- # Documentation
23
- vsc-extension-quickstart.md
24
-
25
- # Version control and CI
26
- .github/**
27
- .changeset/**
28
-
29
- # Dependencies
30
- node_modules/**
31
- pnpm-lock.yaml
32
-
1
+ scripts
2
+ src
3
+ tsconfig.json
4
+ tsconfig.tsbuildinfo
5
+ .turbo
package/CHANGELOG.md CHANGED
@@ -1,4 +1,28 @@
1
- # pascal
1
+ # pascal-vscode
2
+
3
+ ## 0.1.0-beta.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3bd2631`](https://github.com/hadez8877/pascal/commit/3bd26319b9fcca77dd3223095b42d54ff62c3c62) Thanks [@hadez8877](https://github.com/hadez8877)! - Overhauls the default theme palette with new dark tokens across editor, UI, and terminal surfaces
8
+
9
+ If you relied on the previous color scheme, update your theme selection:
10
+
11
+ ```json
12
+ {
13
+ "workbench.colorTheme": "Pascal (Default)"
14
+ }
15
+ ```
16
+
17
+ The new palette replaces `semanticTokenColors` with `tokenColors`-only and adds scopes for markup, diff, and bracket pairs.
18
+
19
+ Adds a webview system with a **Show Changelog** command to view the CHANGELOG directly in a panel.
20
+
21
+ ## 0.1.0-beta.0
22
+
23
+ ### Minor Changes
24
+
25
+ - [`4fef37c`](https://github.com/hadez8877/pascal/commit/4fef37ce0e07a2d6b7cd102a9b38fed48c6f4287) Thanks [@hadez8877](https://github.com/hadez8877)! - Retry failed bump
2
26
 
3
27
  ## 0.0.1
4
28
 
package/README.md CHANGED
@@ -1,51 +1,21 @@
1
- <div align="center">
2
- <img alt="Pascal logo" src="assets/icon.png" height="200px" />
3
- <h1>Pascal</h1>
4
- <p>
5
- A modern dark theme for your favorite editors, shells and more
6
- <br/>
7
- by <a href="https://github.com/hadez8877">@Hadez</a>
8
- </p>
9
-
10
- <p align="center">
11
- <img alt="Version" src="https://img.shields.io/open-vsx/v/hadez8877/pascal?style=for-the-badge">
12
- <img alt="Downloads" src="https://img.shields.io/open-vsx/dt/hadez8877/pascal?style=for-the-badge">
13
- <img alt="Rating" src="https://img.shields.io/open-vsx/stars/hadez8877/pascal?style=for-the-badge">
14
- </p>
15
- </div>
16
-
17
- ## What is Pascal?
1
+ # Pascal for [VSCode](https://code.visualstudio.com)
18
2
 
19
3
  Pascal is a dark theme for editors, shells, and more. The palette is tuned for long coding sessions: enough contrast to read code clearly, not so intense that your eyes notice it after an hour.
20
4
 
21
- ### Preview
5
+ ## Preview
22
6
 
23
- ![Preview](assets/preview.png)
7
+ ![Preview](./assets/screenshots/default.jpg)
24
8
 
25
9
  ## Installation
26
10
 
27
- #### Install using Command Palette
11
+ ### Preferred method of installation
28
12
 
29
- 1. Go to `View -> Command Palette` or press `Ctrl+Shift+P`
30
- 2. Then enter `Install Extension`
31
- 3. Write `Pascal`
32
- 4. Select it or press Enter to install
13
+ Install the extension from a Marketplace:
33
14
 
34
- #### Install using Git
15
+ - [Open-VSX](https://open-vsx.org/extension/hadez8877/pascal-vscode)
35
16
 
36
- If you are a git user, you can install the theme and keep up to date by cloning the repo:
17
+ ### Manual method for installation
37
18
 
38
- ```shell
39
- git clone https://github.com/hadez8877/pascal.git ~/.<your-editor>/extensions/pascal
40
- cd ~/.<your-editor>/extensions/pascal
41
-
42
- # Install dependencies
43
- pnpm install
44
-
45
- # Build the theme
46
- pnpm run build
47
- ```
48
-
49
- #### Activating theme
50
-
51
- Run your editor. The Pascal theme will be available from `File -> Preferences -> Color Theme` dropdown menu.
19
+ Download the VSIX from
20
+ [the latest GitHub release](https://github.com/hadez8877/pascal/releases/latest).
21
+ Open the Command Palette and select "Extensions: Install from VSIX...", then open the file you just downloaded.
Binary file
package/dist/extension.js CHANGED
@@ -1 +1 @@
1
- const t=async()=>{};export{t as activate};
1
+ import{commands as o}from"vscode";import{availableWebviews as r}from"./webviews/availableWebviews.js";function t(){r.forEach(a=>{o.registerCommand(a.id,async()=>{await a.run()})})}export{t as activate};
File without changes
package/dist/utils.js ADDED
@@ -0,0 +1 @@
1
+ import r from"node:path";import{fileURLToPath as o}from"node:url";const e=o(import.meta.url),i=r.dirname(e);function a(...t){return r.join(i,...t)}export{a as resolvePath};
@@ -0,0 +1 @@
1
+ import{Uri as l,ViewColumn as r,window as a}from"vscode";import{resolvePath as p}from"./utils.js";function u({id:n,displayName:t,run:s}){let e,i;return{id:n,displayName:t,dispose(){i&&(i.dispose(),i=void 0),e&&(e.dispose(),e=void 0)},async run(){const o=await s();if(e!==void 0)return e.webview.html=o,e.reveal(r.Active);e=a.createWebviewPanel(n,t,r.Active,{enableCommandUris:!0,enableFindWidget:!0,enableScripts:!0,retainContextWhenHidden:!0});const d=p("../assets/icon.png");e.iconPath=l.file(d),e.onDidDispose(()=>{e=void 0,i=void 0}),e.webview.html=o}}}export{u as webviewController};
@@ -0,0 +1 @@
1
+ import{showChangelog as e}from"./showChangelog.js";const r=[e];export{r as availableWebviews};
@@ -0,0 +1 @@
1
+ import{TextDecoder as a}from"node:util";import{marked as t}from"marked";import{Uri as s,workspace as n}from"vscode";import{resolvePath as i}from"../utils.js";import{webviewController as m}from"../webviewController.js";const f=m({id:"pascal.showChangelog",displayName:"Pascal Changelog",run:async()=>{const o=i("../CHANGELOG.md"),r=await n.fs.readFile(s.file(o)).then(e=>new a().decode(e)).then(e=>t.parse(e));return Promise.resolve(r)}});export{f as showChangelog};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Pascal",
4
4
  "publisher": "hadez8877",
5
5
  "description": "A modern dark theme for many editors, shells, and more!",
6
- "version": "0.0.2",
6
+ "version": "0.1.0-beta.1",
7
7
  "type": "module",
8
8
  "main": "dist/extension.js",
9
9
  "browser": "dist/browser.js",
@@ -21,6 +21,12 @@
21
21
  "uiTheme": "vs-dark",
22
22
  "path": "themes/default.json"
23
23
  }
24
+ ],
25
+ "commands": [
26
+ {
27
+ "command": "pascal.showChangelog",
28
+ "title": "Pascal: Show Changelog"
29
+ }
24
30
  ]
25
31
  },
26
32
  "configuration": {
@@ -38,40 +44,31 @@
38
44
  },
39
45
  "repository": {
40
46
  "type": "git",
41
- "url": "https://github.com/hadez8877/pascal.git"
42
- },
43
- "bugs": {
44
- "url": "https://github.com/hadez8877/pascal/issues"
47
+ "url": "git+https://github.com/hadez8877/pascal.git",
48
+ "directory": "packages/editors/vscode"
45
49
  },
46
50
  "devDependencies": {
47
- "@biomejs/biome": "2.4.15",
48
- "@changesets/changelog-github": "^0.5.2",
49
- "@changesets/cli": "^2.29.8",
50
51
  "@types/node": "^24.10.1",
51
52
  "@types/vscode": "^1.88.0",
52
53
  "@vscode/vsce": "^3.9.2",
53
54
  "esbuild": "0.27.3",
54
- "eslint": "^10.4.0",
55
+ "eslint": "^10.7.0",
55
56
  "eslint-plugin-regexp": "^3.1.1",
56
57
  "ovsx": "^0.10.12",
57
- "piccolore": "0.1.3",
58
- "prettier": "^3.8.4",
59
- "tinyglobby": "0.2.16",
60
- "tsdown": "^0.22.2",
61
- "typescript": "~6.0.3",
62
- "typescript-eslint": "^8.56.1"
58
+ "pascal-scripts": "1.0.0-beta.0",
59
+ "prettier": "^3.9.5",
60
+ "turbo": "2.10.4",
61
+ "typescript": "^6.0.3"
62
+ },
63
+ "dependencies": {
64
+ "marked": "^18.0.6"
63
65
  },
64
66
  "license": "MIT",
65
67
  "engines": {
66
- "node": ">=22.12.0",
67
68
  "vscode": "^1.88.0"
68
69
  },
69
70
  "scripts": {
70
- "build": "tsc -b && node scripts/build.js --minify",
71
- "lint": "biome lint . && eslint --cache --concurrency=auto .",
72
- "format": "pnpm run format:code && pnpm run format:imports",
73
- "format:code": "biome format --write && prettier -w \"**/*\" --ignore-unknown --cache",
74
- "format:imports": "biome check --formatter-enabled=false --write",
75
- "version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run format"
71
+ "build": "pascal-scripts build \"src/**/*.{ts,js}\" --copy-wasm --minify",
72
+ "lint": "biome lint . && eslint --cache --concurrency=auto ."
76
73
  }
77
74
  }
package/src/extension.ts CHANGED
@@ -1,4 +1,10 @@
1
- export const activate = async () => {
2
- // vsce not support PNPM. For now, I can't create a webview
3
- // Please fix them as quickly as possible: https://github.com/microsoft/vscode-vsce/issues/421
4
- };
1
+ import { commands } from 'vscode';
2
+ import { availableWebviews } from './webviews/availableWebviews.js';
3
+
4
+ export function activate() {
5
+ availableWebviews.forEach((webview) => {
6
+ commands.registerCommand(webview.id, async () => {
7
+ await webview.run();
8
+ });
9
+ });
10
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The options for a webview controller
3
+ */
4
+ export type WebviewControllerOptions = {
5
+ id: string;
6
+ displayName: string;
7
+ run(): Promise<string>;
8
+ };
9
+
10
+ export interface WebviewControllerInfo extends WebviewControllerOptions {
11
+ id: string;
12
+ displayName: string;
13
+ dispose(): void;
14
+ run(): Promise<void>;
15
+ }
package/src/utils.ts ADDED
@@ -0,0 +1,9 @@
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ const __filename = fileURLToPath(import.meta.url);
5
+ const __dirname = path.dirname(__filename);
6
+
7
+ export function resolvePath(...paths: string[]) {
8
+ return path.join(__dirname, ...paths);
9
+ }
@@ -0,0 +1,52 @@
1
+ import type { Disposable, WebviewPanel } from 'vscode';
2
+ import { Uri, ViewColumn, window } from 'vscode';
3
+ import type { WebviewControllerOptions } from './types/webview.js';
4
+ import { resolvePath } from './utils.js';
5
+
6
+ export function webviewController({ id, displayName, run }: WebviewControllerOptions) {
7
+ let panel: WebviewPanel | undefined;
8
+ let disposablePanel: Disposable | undefined;
9
+
10
+ return {
11
+ id,
12
+ displayName,
13
+
14
+ dispose() {
15
+ if (disposablePanel) {
16
+ disposablePanel.dispose();
17
+ disposablePanel = undefined;
18
+ }
19
+
20
+ if (panel) {
21
+ panel.dispose();
22
+ panel = undefined;
23
+ }
24
+ },
25
+
26
+ async run(): Promise<void> {
27
+ const content = await run();
28
+
29
+ if (panel !== undefined) {
30
+ panel.webview.html = content;
31
+ return panel.reveal(ViewColumn.Active);
32
+ }
33
+
34
+ panel = window.createWebviewPanel(id, displayName, ViewColumn.Active, {
35
+ enableCommandUris: true,
36
+ enableFindWidget: true,
37
+ enableScripts: true,
38
+ retainContextWhenHidden: true
39
+ });
40
+
41
+ const ICON_PATH = resolvePath('../assets/icon.png');
42
+ panel.iconPath = Uri.file(ICON_PATH);
43
+
44
+ panel.onDidDispose(() => {
45
+ panel = undefined;
46
+ disposablePanel = undefined;
47
+ });
48
+
49
+ panel.webview.html = content;
50
+ }
51
+ };
52
+ }
@@ -0,0 +1,4 @@
1
+ import type { WebviewControllerInfo } from '../types/webview.js';
2
+ import { showChangelog } from './showChangelog.js';
3
+
4
+ export const availableWebviews: WebviewControllerInfo[] = [showChangelog];
@@ -0,0 +1,20 @@
1
+ import { TextDecoder } from 'node:util';
2
+ import { marked } from 'marked';
3
+ import { Uri, workspace } from 'vscode';
4
+ import { resolvePath } from '../utils.js';
5
+ import { webviewController } from '../webviewController.js';
6
+
7
+ export const showChangelog = webviewController({
8
+ id: 'pascal.showChangelog',
9
+ displayName: 'Pascal Changelog',
10
+
11
+ run: async () => {
12
+ const CHANGELOG_PATH = resolvePath('../CHANGELOG.md');
13
+ const displayContent = await workspace.fs
14
+ .readFile(Uri.file(CHANGELOG_PATH))
15
+ .then((data) => new TextDecoder().decode(data))
16
+ .then((content) => marked.parse(content));
17
+
18
+ return Promise.resolve(displayContent);
19
+ }
20
+ });