@punica/editor 1.0.7 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punica/editor",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -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 & { order?: number };
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'> &
@@ -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;