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.
- package/.prettierrc.mjs +6 -0
- package/.vscodeignore +5 -32
- package/CHANGELOG.md +25 -1
- package/README.md +10 -40
- package/assets/screenshots/default.jpg +0 -0
- package/dist/extension.js +1 -1
- package/dist/types/webview.d.js +0 -0
- package/dist/utils.js +1 -0
- package/dist/webviewController.js +1 -0
- package/dist/webviews/availableWebviews.js +1 -0
- package/dist/webviews/showChangelog.js +1 -0
- package/package.json +19 -22
- package/src/extension.ts +10 -4
- package/src/types/webview.d.ts +15 -0
- package/src/utils.ts +9 -0
- package/src/webviewController.ts +52 -0
- package/src/webviews/availableWebviews.ts +4 -0
- package/src/webviews/showChangelog.ts +20 -0
- package/themes/default.json +434 -289
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +2 -22
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -12
- package/.changeset/pre.json +0 -10
- package/.changeset/wise-cows-feel.md +0 -5
- package/.editorconfig +0 -15
- package/.github/FUNDING.yml +0 -6
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -5
- package/.github/actions/setup-git-commiter/action.yml +0 -49
- package/.github/actions/setup-pnpm/action.yml +0 -42
- package/.github/issue_labeler.yml +0 -2
- package/.github/labeler.yml +0 -9
- package/.github/renovate.json5 +0 -48
- package/.github/workflows/check_merge.yml +0 -109
- package/.github/workflows/cleanup_cache.yml +0 -46
- package/.github/workflows/diff_dependencies.yml +0 -26
- package/.github/workflows/format.yml +0 -45
- package/.github/workflows/label_issue.yml +0 -18
- package/.github/workflows/label_pr.yml +0 -16
- package/.github/workflows/lint_pr_title.yml +0 -49
- package/.github/workflows/release.yml +0 -69
- package/.prettierignore +0 -25
- package/.vscode/extensions.json +0 -10
- package/.vscode/launch.json +0 -25
- package/.vscode/settings.json +0 -13
- package/.vscode/tasks.json +0 -17
- package/CODE_OF_CONDUCT.md +0 -65
- package/CONTRIBUTING.md +0 -86
- package/assets/icon.svg +0 -1
- package/assets/preview.png +0 -0
- package/biome.jsonc +0 -113
- package/eslint.config.js +0 -91
- package/pnpm-workspace.yaml +0 -4
- package/prettier.config.mjs +0 -17
- package/scripts/build.js +0 -107
package/.prettierrc.mjs
ADDED
package/.vscodeignore
CHANGED
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
5
|
+
## Preview
|
|
22
6
|
|
|
23
|
-

|
|
24
8
|
|
|
25
9
|
## Installation
|
|
26
10
|
|
|
27
|
-
|
|
11
|
+
### Preferred method of installation
|
|
28
12
|
|
|
29
|
-
|
|
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
|
-
|
|
15
|
+
- [Open-VSX](https://open-vsx.org/extension/hadez8877/pascal-vscode)
|
|
35
16
|
|
|
36
|
-
|
|
17
|
+
### Manual method for installation
|
|
37
18
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
55
|
+
"eslint": "^10.7.0",
|
|
55
56
|
"eslint-plugin-regexp": "^3.1.1",
|
|
56
57
|
"ovsx": "^0.10.12",
|
|
57
|
-
"
|
|
58
|
-
"prettier": "^3.
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
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": "
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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,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
|
+
});
|