@punica/editor 1.8.0 → 1.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punica/editor",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -76,8 +76,24 @@ declare module 'punica' {
76
76
  */
77
77
  showOnStartup?: boolean;
78
78
  };
79
- activityBar?: Pick<BaseView, 'id' | 'name'> &
80
- Required<Pick<BaseView, 'title' | 'icon' | 'alignment'>>;
79
+ activityBar?: Pick<BaseView, 'id' | 'name' | 'capability'> &
80
+ Required<Pick<BaseView, 'title' | 'icon' | 'alignment'>> & {
81
+ /**
82
+ * Draw this item together with every other item declaring the same
83
+ * `group.id`: one icon, and a flyout listing the members once there
84
+ * is more than one. Lets a family of extensions (marketplaces,
85
+ * database providers, …) grow without taking a bar slot each.
86
+ * The group's identity lives here, in the manifests — the substrate
87
+ * knows only "same id, same icon". Ignored by older shells.
88
+ */
89
+ group?: {
90
+ id: string;
91
+ /** Tooltip of the group icon. First member to declare it wins. */
92
+ title?: string;
93
+ /** Group icon (raw HTML). First member to declare it wins. */
94
+ icon?: string;
95
+ };
96
+ };
81
97
  statusBar?: Pick<BaseView, 'id' | 'name'> &
82
98
  Required<Pick<BaseView, 'title' | 'label' | 'icon' | 'alignment'>>;
83
99
  }
@@ -4,6 +4,20 @@ declare module 'punica' {
4
4
  type Alignment = 'primary' | 'secondary';
5
5
  type ItemType = 'normal' | 'menu';
6
6
 
7
+ /**
8
+ * Groups several activity items behind one icon. Declared per member —
9
+ * the substrate has no group table of its own, so what a group means
10
+ * (marketplaces, databases, …) stays in the manifests that opt in.
11
+ */
12
+ interface IItemGroup {
13
+ /** Members sharing this id are drawn as a single icon. */
14
+ id: string;
15
+ /** Tooltip of the group icon. First member to declare it wins; defaults to `id`. */
16
+ title?: string;
17
+ /** Group icon (raw HTML). First member to declare it wins; defaults to the first member's icon. */
18
+ icon?: string;
19
+ }
20
+
7
21
  interface IItem {
8
22
  id: string;
9
23
  name: string;
@@ -31,6 +45,14 @@ declare module 'punica' {
31
45
  * and the Capability Catalog. See `IActivityBarManager.syncContentTool`.
32
46
  */
33
47
  contentViewType?: string;
48
+ /**
49
+ * Collect this item into a group. While the group has one member the
50
+ * shell draws that member's own icon and click behaviour; when a
51
+ * second member joins, the icon becomes the group's and clicking it
52
+ * opens a flyout listing the members. Shells that predate grouping
53
+ * ignore the field and draw the item on its own, as before.
54
+ */
55
+ group?: IItemGroup;
34
56
  }
35
57
 
36
58
  interface IActivityBarManager {