@punica/editor 1.0.7 → 1.1.0
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/dist/index.bundle.esm.js +2 -1
- package/dist/index.bundle.esm.js.map +1 -1
- package/dist/index.bundle.umd.js +2 -1
- package/dist/index.bundle.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/punica.module.extensions.api.d.ts +41 -1
- package/types/punica.module.shell.panelTabs.d.ts +23 -0
package/package.json
CHANGED
|
@@ -15,6 +15,24 @@ declare module 'punica' {
|
|
|
15
15
|
capability?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* A single icon-button action shown in the panel tab bar's toolbar
|
|
20
|
+
* area while the owning view is the active panel view. Clicking the
|
|
21
|
+
* button dispatches `command` through the kernel command manager
|
|
22
|
+
* (the single command choke point — lazy-activates the owning
|
|
23
|
+
* extension when needed).
|
|
24
|
+
*/
|
|
25
|
+
interface PanelToolbarAction {
|
|
26
|
+
/** Unique within the owning view. */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Tooltip / aria-label. */
|
|
29
|
+
title: string;
|
|
30
|
+
/** Raw HTML icon markup, e.g. '<i class="fa-solid fa-plus"></i>'. */
|
|
31
|
+
icon?: string;
|
|
32
|
+
/** Command id dispatched on click. */
|
|
33
|
+
command: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
18
36
|
interface Views {
|
|
19
37
|
primarySidebar?: BaseView;
|
|
20
38
|
secondarySidebar?: BaseView;
|
|
@@ -31,7 +49,15 @@ declare module 'punica' {
|
|
|
31
49
|
* only on reveal — via the extension's ViewProvider, or, for
|
|
32
50
|
* pre-migration extensions, via the bound `capability` command.
|
|
33
51
|
*/
|
|
34
|
-
panel?: BaseView & {
|
|
52
|
+
panel?: BaseView & {
|
|
53
|
+
order?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Toolbar actions rendered in the panel tab bar's right-side
|
|
56
|
+
* toolbar area, visible only while this view is the active
|
|
57
|
+
* panel view. Ignored by older cores.
|
|
58
|
+
*/
|
|
59
|
+
toolbar?: PanelToolbarAction[];
|
|
60
|
+
};
|
|
35
61
|
activityBar?: Pick<BaseView, 'id' | 'name'> &
|
|
36
62
|
Required<Pick<BaseView, 'title' | 'icon' | 'alignment'>>;
|
|
37
63
|
statusBar?: Pick<BaseView, 'id' | 'name'> &
|
|
@@ -473,6 +499,20 @@ declare module 'punica' {
|
|
|
473
499
|
*/
|
|
474
500
|
deactivate(extensionName: string): Promise<void>;
|
|
475
501
|
|
|
502
|
+
/**
|
|
503
|
+
* Unload an extension — the inverse of `load()`. Removes all
|
|
504
|
+
* analysis-phase registrations (metadata, runtime state, capability
|
|
505
|
+
* index, instruction classes, command-activation map, startup sets)
|
|
506
|
+
* so the manager fully forgets the name.
|
|
507
|
+
*
|
|
508
|
+
* Does NOT run runtime disposal — call `deactivate()` first.
|
|
509
|
+
* Precondition: runtime state is `loaded` or `failed` (unknown names
|
|
510
|
+
* are a no-op); rejects while `active`/`activating`/`deactivating`.
|
|
511
|
+
* The dynamically imported ES module is not evicted (inert until the
|
|
512
|
+
* next restart).
|
|
513
|
+
*/
|
|
514
|
+
unload(extensionName: string): Promise<void>;
|
|
515
|
+
|
|
476
516
|
/**
|
|
477
517
|
* Current runtime state of an extension, or undefined when not
|
|
478
518
|
* loaded.
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
declare module 'punica' {
|
|
2
2
|
export namespace shell {
|
|
3
|
+
/**
|
|
4
|
+
* A single icon-button action shown in the panel tab bar's toolbar
|
|
5
|
+
* area while the owning view is the active panel view. Clicking the
|
|
6
|
+
* button dispatches `command` through
|
|
7
|
+
* `punica.kernel.Commands.manager.executeCommand` (the single command
|
|
8
|
+
* choke point — lazy-activates the owning extension when needed).
|
|
9
|
+
*/
|
|
10
|
+
export interface PanelToolbarAction {
|
|
11
|
+
/** Unique within the owning view. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Tooltip / aria-label. */
|
|
14
|
+
title: string;
|
|
15
|
+
/** Raw HTML icon markup, e.g. '<i class="fa-solid fa-plus"></i>'. */
|
|
16
|
+
icon?: string;
|
|
17
|
+
/** Command id dispatched on click. */
|
|
18
|
+
command: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
3
21
|
/**
|
|
4
22
|
* Panel tab management for the bottom panel area (problems, terminals, etc.).
|
|
5
23
|
*/
|
|
@@ -14,6 +32,11 @@ declare module 'punica' {
|
|
|
14
32
|
* When false, the panel tab is added but not activated.
|
|
15
33
|
*/
|
|
16
34
|
autoActivate?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Toolbar actions rendered in the tab bar's right-side toolbar
|
|
37
|
+
* area, visible only while this view is the active panel view.
|
|
38
|
+
*/
|
|
39
|
+
toolbar?: PanelToolbarAction[];
|
|
17
40
|
}): void;
|
|
18
41
|
|
|
19
42
|
close(id: string): void;
|