@gooddata/sdk-pluggable-application-model 11.27.0-alpha.0 → 11.27.0-alpha.2

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/esm/index.d.ts CHANGED
@@ -6,4 +6,5 @@
6
6
  export { type EmbeddingMode, type IOrganization, type IOrganizationPermissions, type IPlatformContext, type IPlatformContextV1, type IPluggableApplicationNavigation, PantherTier, isPlatformContextV1, } from "./platformContext.js";
7
7
  export { type ILocale } from "@gooddata/sdk-model";
8
8
  export { type IAppInstance, type IPluggableApp, type IPluggableApplicationMountHandle, type IPluggableApplicationMountOptions, type IPluggableAppEvent, type PluggableApplicationMount, } from "./mount.js";
9
+ export { type IShellUiModule, type IShellUiMountHandle, type IShellUiMountOptions, type ShellUiMount, } from "./shellUi.js";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,WAAW,EACX,mBAAmB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,GACjC,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,WAAW,EACX,mBAAmB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,GACjC,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GACpB,MAAM,cAAc,CAAC"}
@@ -14,6 +14,7 @@ import { IUserSettings } from '@gooddata/sdk-backend-spi';
14
14
  import { IWhiteLabeling } from '@gooddata/sdk-model';
15
15
  import { IWorkspacePermissions } from '@gooddata/sdk-model';
16
16
  import { ObjRef } from '@gooddata/sdk-model';
17
+ import { PluggableApplicationRegistryItem } from '@gooddata/sdk-model';
17
18
 
18
19
  /**
19
20
  * Pluggable application embedding mode.
@@ -180,6 +181,108 @@ export declare interface IPluggableApplicationNavigation {
180
181
  openApp(id: string, path?: string): void;
181
182
  }
182
183
 
184
+ /**
185
+ * Shell UI module contract.
186
+ *
187
+ * @remarks
188
+ * Implementations loaded via module federation or provided locally must conform
189
+ * to this interface. The shell application uses the `mount` function to render
190
+ * the application chrome and obtain the container for the active pluggable application.
191
+ *
192
+ * @alpha
193
+ */
194
+ export declare interface IShellUiModule {
195
+ mount: ShellUiMount;
196
+ }
197
+
198
+ /**
199
+ * Handle returned from a shell UI mount for lifecycle management.
200
+ *
201
+ * @alpha
202
+ */
203
+ export declare interface IShellUiMountHandle {
204
+ /**
205
+ * Unmounts the shell UI and releases all resources.
206
+ */
207
+ unmount(): void;
208
+ /**
209
+ * Pushes an updated platform context into the shell UI.
210
+ *
211
+ * @remarks
212
+ * Called by the host whenever the context changes after initial mount.
213
+ */
214
+ updateContext?(ctx: IPlatformContext): void;
215
+ /**
216
+ * Pushes an updated list of resolved applications into the shell UI.
217
+ *
218
+ * @remarks
219
+ * Called by the host whenever the application list changes after initial mount.
220
+ */
221
+ updateApplications?(apps: PluggableApplicationRegistryItem[]): void;
222
+ /**
223
+ * Pushes the current pathname into the shell UI.
224
+ *
225
+ * @remarks
226
+ * Called by the host whenever the URL changes (e.g. after navigation or popstate).
227
+ * The shell UI uses this to update the active state of navigation items.
228
+ */
229
+ updatePathname?(pathname: string): void;
230
+ /**
231
+ * Returns the DOM element where the active pluggable application should be rendered.
232
+ *
233
+ * @remarks
234
+ * The host uses this element as the mount container for the currently active
235
+ * pluggable application. The shell UI is responsible for creating and managing
236
+ * this element as part of its layout.
237
+ */
238
+ getAppContainer(): HTMLElement;
239
+ }
240
+
241
+ /**
242
+ * Options passed by the host into a shell UI module's mount function.
243
+ *
244
+ * @alpha
245
+ */
246
+ export declare interface IShellUiMountOptions {
247
+ /**
248
+ * DOM element into which the shell UI should render itself.
249
+ */
250
+ container: HTMLElement;
251
+ /**
252
+ * Platform context snapshot provided by the host.
253
+ */
254
+ ctx: IPlatformContext;
255
+ /**
256
+ * Resolved and filtered list of pluggable applications to render in the navigation.
257
+ */
258
+ resolvedApplications: PluggableApplicationRegistryItem[];
259
+ /**
260
+ * Current pathname of the host application.
261
+ *
262
+ * @remarks
263
+ * The shell UI uses this to determine which navigation item is active.
264
+ * Updated via {@link IShellUiMountHandle.updatePathname} when the URL changes.
265
+ */
266
+ pathname: string;
267
+ /**
268
+ * Callback for requesting client-side navigation (push).
269
+ *
270
+ * @remarks
271
+ * The host owns the router. When the shell UI needs to navigate (e.g. menu item click),
272
+ * it calls this callback and the host performs the actual navigation. The host then pushes
273
+ * the new pathname back via {@link IShellUiMountHandle.updatePathname}.
274
+ */
275
+ navigate: (url: string) => void;
276
+ /**
277
+ * Callback for requesting client-side navigation with history replacement.
278
+ *
279
+ * @remarks
280
+ * Works like {@link IShellUiMountOptions.navigate} but replaces the current history
281
+ * entry instead of pushing a new one.
282
+ */
283
+ replace: (url: string) => void;
284
+ }
285
+
183
286
  /**
184
287
  * Type guard for {@link IPlatformContextV1}.
185
288
  *
@@ -207,4 +310,19 @@ export declare enum PantherTier {
207
310
  */
208
311
  export declare type PluggableApplicationMount = (options: IPluggableApplicationMountOptions) => IPluggableApplicationMountHandle;
209
312
 
313
+ /**
314
+ * Shell UI mount function signature.
315
+ *
316
+ * @remarks
317
+ * A shell UI module must export a `mount` function conforming to this signature.
318
+ * The function receives a container element and context data, renders the application
319
+ * shell (header, navigation, layout), and returns a handle for lifecycle management.
320
+ *
321
+ * The implementation is framework-agnostic — a module can use React, vanilla DOM,
322
+ * or any other rendering approach internally.
323
+ *
324
+ * @alpha
325
+ */
326
+ export declare type ShellUiMount = (options: IShellUiMountOptions) => IShellUiMountHandle;
327
+
210
328
  export { }
@@ -0,0 +1,116 @@
1
+ import { type PluggableApplicationRegistryItem } from "@gooddata/sdk-model";
2
+ import { type IPlatformContext } from "./platformContext.js";
3
+ /**
4
+ * Options passed by the host into a shell UI module's mount function.
5
+ *
6
+ * @alpha
7
+ */
8
+ export interface IShellUiMountOptions {
9
+ /**
10
+ * DOM element into which the shell UI should render itself.
11
+ */
12
+ container: HTMLElement;
13
+ /**
14
+ * Platform context snapshot provided by the host.
15
+ */
16
+ ctx: IPlatformContext;
17
+ /**
18
+ * Resolved and filtered list of pluggable applications to render in the navigation.
19
+ */
20
+ resolvedApplications: PluggableApplicationRegistryItem[];
21
+ /**
22
+ * Current pathname of the host application.
23
+ *
24
+ * @remarks
25
+ * The shell UI uses this to determine which navigation item is active.
26
+ * Updated via {@link IShellUiMountHandle.updatePathname} when the URL changes.
27
+ */
28
+ pathname: string;
29
+ /**
30
+ * Callback for requesting client-side navigation (push).
31
+ *
32
+ * @remarks
33
+ * The host owns the router. When the shell UI needs to navigate (e.g. menu item click),
34
+ * it calls this callback and the host performs the actual navigation. The host then pushes
35
+ * the new pathname back via {@link IShellUiMountHandle.updatePathname}.
36
+ */
37
+ navigate: (url: string) => void;
38
+ /**
39
+ * Callback for requesting client-side navigation with history replacement.
40
+ *
41
+ * @remarks
42
+ * Works like {@link IShellUiMountOptions.navigate} but replaces the current history
43
+ * entry instead of pushing a new one.
44
+ */
45
+ replace: (url: string) => void;
46
+ }
47
+ /**
48
+ * Handle returned from a shell UI mount for lifecycle management.
49
+ *
50
+ * @alpha
51
+ */
52
+ export interface IShellUiMountHandle {
53
+ /**
54
+ * Unmounts the shell UI and releases all resources.
55
+ */
56
+ unmount(): void;
57
+ /**
58
+ * Pushes an updated platform context into the shell UI.
59
+ *
60
+ * @remarks
61
+ * Called by the host whenever the context changes after initial mount.
62
+ */
63
+ updateContext?(ctx: IPlatformContext): void;
64
+ /**
65
+ * Pushes an updated list of resolved applications into the shell UI.
66
+ *
67
+ * @remarks
68
+ * Called by the host whenever the application list changes after initial mount.
69
+ */
70
+ updateApplications?(apps: PluggableApplicationRegistryItem[]): void;
71
+ /**
72
+ * Pushes the current pathname into the shell UI.
73
+ *
74
+ * @remarks
75
+ * Called by the host whenever the URL changes (e.g. after navigation or popstate).
76
+ * The shell UI uses this to update the active state of navigation items.
77
+ */
78
+ updatePathname?(pathname: string): void;
79
+ /**
80
+ * Returns the DOM element where the active pluggable application should be rendered.
81
+ *
82
+ * @remarks
83
+ * The host uses this element as the mount container for the currently active
84
+ * pluggable application. The shell UI is responsible for creating and managing
85
+ * this element as part of its layout.
86
+ */
87
+ getAppContainer(): HTMLElement;
88
+ }
89
+ /**
90
+ * Shell UI mount function signature.
91
+ *
92
+ * @remarks
93
+ * A shell UI module must export a `mount` function conforming to this signature.
94
+ * The function receives a container element and context data, renders the application
95
+ * shell (header, navigation, layout), and returns a handle for lifecycle management.
96
+ *
97
+ * The implementation is framework-agnostic — a module can use React, vanilla DOM,
98
+ * or any other rendering approach internally.
99
+ *
100
+ * @alpha
101
+ */
102
+ export type ShellUiMount = (options: IShellUiMountOptions) => IShellUiMountHandle;
103
+ /**
104
+ * Shell UI module contract.
105
+ *
106
+ * @remarks
107
+ * Implementations loaded via module federation or provided locally must conform
108
+ * to this interface. The shell application uses the `mount` function to render
109
+ * the application chrome and obtain the container for the active pluggable application.
110
+ *
111
+ * @alpha
112
+ */
113
+ export interface IShellUiModule {
114
+ mount: ShellUiMount;
115
+ }
116
+ //# sourceMappingURL=shellUi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shellUi.d.ts","sourceRoot":"","sources":["../src/shellUi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,GAAG,EAAE,gBAAgB,CAAC;IAEtB;;OAEG;IACH,oBAAoB,EAAE,gCAAgC,EAAE,CAAC;IAEzD;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhC;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;IAEhB;;;;;OAKG;IACH,aAAa,CAAC,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAE5C;;;;;OAKG;IACH,kBAAkB,CAAC,CAAC,IAAI,EAAE,gCAAgC,EAAE,GAAG,IAAI,CAAC;IAEpE;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;;;;;;OAOG;IACH,eAAe,IAAI,WAAW,CAAC;CAClC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,oBAAoB,KAAK,mBAAmB,CAAC;AAElF;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,YAAY,CAAC;CACvB"}
package/esm/shellUi.js ADDED
@@ -0,0 +1,3 @@
1
+ // (C) 2026 GoodData Corporation
2
+ export {};
3
+ //# sourceMappingURL=shellUi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shellUi.js","sourceRoot":"","sources":["../src/shellUi.ts"],"names":[],"mappings":"AAAA,gCAAgC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-pluggable-application-model",
3
- "version": "11.27.0-alpha.0",
3
+ "version": "11.27.0-alpha.2",
4
4
  "description": "GoodData SDK model contracts for pluggable applications",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -23,8 +23,8 @@
23
23
  "dependencies": {
24
24
  "ts-invariant": "0.10.3",
25
25
  "tslib": "2.8.1",
26
- "@gooddata/sdk-backend-spi": "11.27.0-alpha.0",
27
- "@gooddata/sdk-model": "11.27.0-alpha.0"
26
+ "@gooddata/sdk-backend-spi": "11.27.0-alpha.2",
27
+ "@gooddata/sdk-model": "11.27.0-alpha.2"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@microsoft/api-documenter": "^7.17.0",
@@ -48,8 +48,8 @@
48
48
  "oxlint-tsgolint": "0.11.4",
49
49
  "typescript": "5.9.3",
50
50
  "vitest": "4.1.0",
51
- "@gooddata/eslint-config": "11.27.0-alpha.0",
52
- "@gooddata/oxlint-config": "11.27.0-alpha.0"
51
+ "@gooddata/eslint-config": "11.27.0-alpha.2",
52
+ "@gooddata/oxlint-config": "11.27.0-alpha.2"
53
53
  },
54
54
  "scripts": {
55
55
  "_phase:build": "npm run build",