pascal-vscode 0.1.0-beta.2 → 0.1.0-beta.4
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/extension.js +1 -1
- package/dist/webviewController.d.ts +2 -7
- package/dist/webviewController.js +2 -2
- package/dist/webviewController.js.map +1 -1
- package/dist/webviews/showChangelog.d.ts +1 -6
- package/package.json +2 -2
- package/src/types/webview.d.ts +1 -5
- package/src/webviewController.ts +9 -5
- package/themes/default.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# pascal-vscode
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7fd6b13`](https://github.com/hadez8877/pascal/commit/7fd6b1383e51dacb499ee4b11d451b314259889b) Thanks [@hadez8877](https://github.com/hadez8877)! - Fixes preview image not showing in VS Code Marketplace
|
|
8
|
+
|
|
9
|
+
## 0.1.0-beta.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`5f143cb`](https://github.com/hadez8877/pascal/commit/5f143cbe3b2dde5a98df733434417105c720c647) Thanks [@hadez8877](https://github.com/hadez8877)! - Updates internal metadata and documentation formatting for improved package discoverability
|
|
14
|
+
|
|
3
15
|
## 0.1.0-beta.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
package/dist/extension.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{commands as
|
|
1
|
+
import{commands as g}from"vscode";import{TextDecoder as C}from"node:util";import{marked as h}from"marked";import{Uri as P,workspace as W}from"vscode";import l from"node:path";import{fileURLToPath as c}from"node:url";var w=c(import.meta.url),v=l.dirname(w);function i(...o){return l.join(v,...o)}import{Uri as b,ViewColumn as s,window as u}from"vscode";function m({id:o,displayName:t,run:n}){let e,r;return{id:o,displayName:t,dispose(){r&&(r.dispose(),r=void 0),e&&(e.dispose(),e=void 0)},async run(){let a=await n();if(e!==void 0)return e.webview.html=a||"No content available",e.reveal(s.Active);e=u.createWebviewPanel(o,t,s.Active,{enableCommandUris:!0,enableFindWidget:!0,enableScripts:!0,retainContextWhenHidden:!0});let f=i("../assets/icon.png");e.iconPath=b.file(f),e.onDidDispose(()=>{e=void 0,r=void 0}),e.webview.html=a||"No content available"}}}var p=m({id:"pascal.showChangelog",displayName:"Pascal Changelog",run:async()=>{let o=i("../CHANGELOG.md"),t=await W.fs.readFile(P.file(o)).then(n=>new C().decode(n)).then(n=>h.parse(n));return Promise.resolve(t)}});var d=[p];function F(){d.forEach(o=>{g.registerCommand(o.id,async()=>{await o.run()})})}export{F as activate};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import type { WebviewControllerOptions } from './types/webview.js';
|
|
2
|
-
export declare function webviewController({ id, displayName, run }: WebviewControllerOptions):
|
|
3
|
-
id: string;
|
|
4
|
-
displayName: string;
|
|
5
|
-
dispose(): void;
|
|
6
|
-
run(): Promise<void>;
|
|
7
|
-
};
|
|
1
|
+
import type { WebviewControllerInfo, WebviewControllerOptions } from './types/webview.js';
|
|
2
|
+
export declare function webviewController({ id, displayName, run }: WebviewControllerOptions): WebviewControllerInfo;
|
|
@@ -19,7 +19,7 @@ export function webviewController({ id, displayName, run }) {
|
|
|
19
19
|
async run() {
|
|
20
20
|
const content = await run();
|
|
21
21
|
if (panel !== undefined) {
|
|
22
|
-
panel.webview.html = content;
|
|
22
|
+
panel.webview.html = content || 'No content available';
|
|
23
23
|
return panel.reveal(ViewColumn.Active);
|
|
24
24
|
}
|
|
25
25
|
panel = window.createWebviewPanel(id, displayName, ViewColumn.Active, {
|
|
@@ -34,7 +34,7 @@ export function webviewController({ id, displayName, run }) {
|
|
|
34
34
|
panel = undefined;
|
|
35
35
|
disposablePanel = undefined;
|
|
36
36
|
});
|
|
37
|
-
panel.webview.html = content;
|
|
37
|
+
panel.webview.html = content || 'No content available';
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webviewController.js","sourceRoot":"","sources":["../src/webviewController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,UAAU,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"webviewController.js","sourceRoot":"","sources":["../src/webviewController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,UAAU,iBAAiB,CAAC,EACjC,EAAE,EACF,WAAW,EACX,GAAG,EACuB;IAC1B,IAAI,KAA+B,CAAC;IACpC,IAAI,eAAuC,CAAC;IAE5C,OAAO;QACN,EAAE;QACF,WAAW;QAEX,OAAO;YACN,IAAI,eAAe,EAAE,CAAC;gBACrB,eAAe,CAAC,OAAO,EAAE,CAAC;gBAC1B,eAAe,GAAG,SAAS,CAAC;YAC7B,CAAC;YAED,IAAI,KAAK,EAAE,CAAC;gBACX,KAAK,CAAC,OAAO,EAAE,CAAC;gBAChB,KAAK,GAAG,SAAS,CAAC;YACnB,CAAC;QACF,CAAC;QAED,KAAK,CAAC,GAAG;YACR,MAAM,OAAO,GAAG,MAAM,GAAG,EAAE,CAAC;YAE5B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACzB,KAAK,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,IAAI,sBAAsB,CAAC;gBACvD,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACxC,CAAC;YAED,KAAK,GAAG,MAAM,CAAC,kBAAkB,CAAC,EAAE,EAAE,WAAW,EAAE,UAAU,CAAC,MAAM,EAAE;gBACrE,iBAAiB,EAAE,IAAI;gBACvB,gBAAgB,EAAE,IAAI;gBACtB,aAAa,EAAE,IAAI;gBACnB,uBAAuB,EAAE,IAAI;aAC7B,CAAC,CAAC;YAEH,MAAM,SAAS,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;YACpD,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAErC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE;gBACvB,KAAK,GAAG,SAAS,CAAC;gBAClB,eAAe,GAAG,SAAS,CAAC;YAC7B,CAAC,CAAC,CAAC;YAEH,KAAK,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,IAAI,sBAAsB,CAAC;QACxD,CAAC;KACD,CAAC;AACH,CAAC"}
|
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.1.0-beta.
|
|
6
|
+
"version": "0.1.0-beta.4",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/extension.js",
|
|
9
9
|
"browser": "dist/browser.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"repository": {
|
|
46
46
|
"type": "git",
|
|
47
|
-
"url": "
|
|
47
|
+
"url": "https://github.com/hadez8877/pascal.git",
|
|
48
48
|
"directory": "packages/editors/vscode"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
package/src/types/webview.d.ts
CHANGED
|
@@ -4,12 +4,8 @@
|
|
|
4
4
|
export type WebviewControllerOptions = {
|
|
5
5
|
id: string;
|
|
6
6
|
displayName: string;
|
|
7
|
-
run(): Promise<string>;
|
|
7
|
+
run(): Promise<void | string>;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
9
|
export interface WebviewControllerInfo extends WebviewControllerOptions {
|
|
11
|
-
id: string;
|
|
12
|
-
displayName: string;
|
|
13
10
|
dispose(): void;
|
|
14
|
-
run(): Promise<void>;
|
|
15
11
|
}
|
package/src/webviewController.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { Disposable, WebviewPanel } from 'vscode';
|
|
2
2
|
import { Uri, ViewColumn, window } from 'vscode';
|
|
3
|
-
import type { WebviewControllerOptions } from './types/webview.js';
|
|
3
|
+
import type { WebviewControllerInfo, WebviewControllerOptions } from './types/webview.js';
|
|
4
4
|
import { resolvePath } from './utils.js';
|
|
5
5
|
|
|
6
|
-
export function webviewController({
|
|
6
|
+
export function webviewController({
|
|
7
|
+
id,
|
|
8
|
+
displayName,
|
|
9
|
+
run
|
|
10
|
+
}: WebviewControllerOptions): WebviewControllerInfo {
|
|
7
11
|
let panel: WebviewPanel | undefined;
|
|
8
12
|
let disposablePanel: Disposable | undefined;
|
|
9
13
|
|
|
@@ -23,11 +27,11 @@ export function webviewController({ id, displayName, run }: WebviewControllerOpt
|
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
|
|
26
|
-
async run()
|
|
30
|
+
async run() {
|
|
27
31
|
const content = await run();
|
|
28
32
|
|
|
29
33
|
if (panel !== undefined) {
|
|
30
|
-
panel.webview.html = content;
|
|
34
|
+
panel.webview.html = content || 'No content available';
|
|
31
35
|
return panel.reveal(ViewColumn.Active);
|
|
32
36
|
}
|
|
33
37
|
|
|
@@ -46,7 +50,7 @@ export function webviewController({ id, displayName, run }: WebviewControllerOpt
|
|
|
46
50
|
disposablePanel = undefined;
|
|
47
51
|
});
|
|
48
52
|
|
|
49
|
-
panel.webview.html = content;
|
|
53
|
+
panel.webview.html = content || 'No content available';
|
|
50
54
|
}
|
|
51
55
|
};
|
|
52
56
|
}
|
package/themes/default.json
CHANGED
|
@@ -402,10 +402,10 @@
|
|
|
402
402
|
"input.placeholderForeground": "#c4c4c4",
|
|
403
403
|
"list.activeSelectionBackground": "#2a2a2a",
|
|
404
404
|
"list.activeSelectionForeground": "#f1f1f1",
|
|
405
|
-
"list.focusBackground": "#
|
|
405
|
+
"list.focusBackground": "#212121",
|
|
406
406
|
"list.hoverBackground": "#1d1d1d",
|
|
407
407
|
"list.hoverForeground": "#f1f1f1",
|
|
408
|
-
"list.inactiveFocusBackground": "#
|
|
408
|
+
"list.inactiveFocusBackground": "#3b3b3b",
|
|
409
409
|
"list.inactiveSelectionBackground": "#1d1d1d",
|
|
410
410
|
"list.inactiveSelectionForeground": "#f1f1f1",
|
|
411
411
|
"notificationCenterHeader.background": "#121212",
|