@onerjs/shared-ui-components 8.48.3 → 8.48.5
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/fluent/hoc/buttonLine.js +2 -1
- package/fluent/hoc/buttonLine.js.map +1 -1
- package/fluent/primitives/contextMenu.js.map +1 -1
- package/fluent/primitives/popover.js.map +1 -1
- package/modularTool/components/errorBoundary.d.ts +31 -0
- package/modularTool/components/errorBoundary.js +91 -0
- package/modularTool/components/errorBoundary.js.map +1 -0
- package/modularTool/components/extensibleAccordion.d.ts +67 -0
- package/modularTool/components/extensibleAccordion.js +148 -0
- package/modularTool/components/extensibleAccordion.js.map +1 -0
- package/modularTool/components/pane.d.ts +4 -0
- package/modularTool/components/pane.js +20 -0
- package/modularTool/components/pane.js.map +1 -0
- package/modularTool/components/teachingMoment.d.ts +20 -0
- package/modularTool/components/teachingMoment.js +17 -0
- package/modularTool/components/teachingMoment.js.map +1 -0
- package/modularTool/components/theme.d.ts +10 -0
- package/modularTool/components/theme.js +24 -0
- package/modularTool/components/theme.js.map +1 -0
- package/modularTool/components/uxContextProvider.d.ts +2 -0
- package/modularTool/components/uxContextProvider.js +19 -0
- package/modularTool/components/uxContextProvider.js.map +1 -0
- package/modularTool/contexts/extensionManagerContext.d.ts +6 -0
- package/modularTool/contexts/extensionManagerContext.js +6 -0
- package/modularTool/contexts/extensionManagerContext.js.map +1 -0
- package/modularTool/contexts/settingsContext.d.ts +3 -0
- package/modularTool/contexts/settingsContext.js +6 -0
- package/modularTool/contexts/settingsContext.js.map +1 -0
- package/modularTool/extensibility/builtInsExtensionFeed.d.ts +21 -0
- package/modularTool/extensibility/builtInsExtensionFeed.js +26 -0
- package/modularTool/extensibility/builtInsExtensionFeed.js.map +1 -0
- package/modularTool/extensibility/extensionFeed.d.ts +113 -0
- package/modularTool/extensibility/extensionFeed.js +2 -0
- package/modularTool/extensibility/extensionFeed.js.map +1 -0
- package/modularTool/extensibility/extensionManager.d.ts +111 -0
- package/modularTool/extensibility/extensionManager.js +277 -0
- package/modularTool/extensibility/extensionManager.js.map +1 -0
- package/modularTool/hooks/observableHooks.d.ts +35 -0
- package/modularTool/hooks/observableHooks.js +84 -0
- package/modularTool/hooks/observableHooks.js.map +1 -0
- package/modularTool/hooks/resourceHooks.d.ts +20 -0
- package/modularTool/hooks/resourceHooks.js +101 -0
- package/modularTool/hooks/resourceHooks.js.map +1 -0
- package/modularTool/hooks/settingsHooks.d.ts +8 -0
- package/modularTool/hooks/settingsHooks.js +40 -0
- package/modularTool/hooks/settingsHooks.js.map +1 -0
- package/modularTool/hooks/teachingMomentHooks.d.ts +34 -0
- package/modularTool/hooks/teachingMomentHooks.js +89 -0
- package/modularTool/hooks/teachingMomentHooks.js.map +1 -0
- package/modularTool/hooks/themeHooks.d.ts +17 -0
- package/modularTool/hooks/themeHooks.js +38 -0
- package/modularTool/hooks/themeHooks.js.map +1 -0
- package/modularTool/hooks/useResizeHandle.d.ts +35 -0
- package/modularTool/hooks/useResizeHandle.js +75 -0
- package/modularTool/hooks/useResizeHandle.js.map +1 -0
- package/modularTool/misc/assert.d.ts +5 -0
- package/modularTool/misc/assert.js +10 -0
- package/modularTool/misc/assert.js.map +1 -0
- package/modularTool/misc/graphUtils.d.ts +44 -0
- package/modularTool/misc/graphUtils.js +90 -0
- package/modularTool/misc/graphUtils.js.map +1 -0
- package/modularTool/misc/observableCollection.d.ts +23 -0
- package/modularTool/misc/observableCollection.js +43 -0
- package/modularTool/misc/observableCollection.js.map +1 -0
- package/modularTool/modularTool.d.ts +42 -0
- package/modularTool/modularTool.js +223 -0
- package/modularTool/modularTool.js.map +1 -0
- package/modularTool/modularity/serviceContainer.d.ts +64 -0
- package/modularTool/modularity/serviceContainer.js +181 -0
- package/modularTool/modularity/serviceContainer.js.map +1 -0
- package/modularTool/modularity/serviceDefinition.d.ts +64 -0
- package/modularTool/modularity/serviceDefinition.js +11 -0
- package/modularTool/modularity/serviceDefinition.js.map +1 -0
- package/modularTool/services/extensionsListService.d.ts +3 -0
- package/modularTool/services/extensionsListService.js +202 -0
- package/modularTool/services/extensionsListService.js.map +1 -0
- package/modularTool/services/globalSettings.d.ts +3 -0
- package/modularTool/services/globalSettings.js +9 -0
- package/modularTool/services/globalSettings.js.map +1 -0
- package/modularTool/services/reactContextService.d.ts +18 -0
- package/modularTool/services/reactContextService.js +5 -0
- package/modularTool/services/reactContextService.js.map +1 -0
- package/modularTool/services/settingsService.d.ts +24 -0
- package/modularTool/services/settingsService.js +41 -0
- package/modularTool/services/settingsService.js.map +1 -0
- package/modularTool/services/settingsStore.d.ts +55 -0
- package/modularTool/services/settingsStore.js +35 -0
- package/modularTool/services/settingsStore.js.map +1 -0
- package/modularTool/services/shellService.d.ts +256 -0
- package/modularTool/services/shellService.js +729 -0
- package/modularTool/services/shellService.js.map +1 -0
- package/modularTool/services/shellSettingsService.d.ts +3 -0
- package/modularTool/services/shellSettingsService.js +35 -0
- package/modularTool/services/shellSettingsService.js.map +1 -0
- package/modularTool/services/themeSelectorService.d.ts +3 -0
- package/modularTool/services/themeSelectorService.js +42 -0
- package/modularTool/services/themeSelectorService.js.map +1 -0
- package/modularTool/services/themeService.d.ts +60 -0
- package/modularTool/services/themeService.js +69 -0
- package/modularTool/services/themeService.js.map +1 -0
- package/modularTool/themes/babylonTheme.d.ts +3 -0
- package/modularTool/themes/babylonTheme.js +36 -0
- package/modularTool/themes/babylonTheme.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { type ComponentType } from "react";
|
|
2
|
+
import { type IDisposable, type Nullable } from "@onerjs/core/index.js";
|
|
3
|
+
import { type IService, type ServiceDefinition } from "../modularity/serviceDefinition.js";
|
|
4
|
+
import { type SettingDescriptor } from "./settingsStore.js";
|
|
5
|
+
/**
|
|
6
|
+
* Setting descriptor for persisting side pane dock location overrides.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SidePaneDockOverridesSettingDescriptor: SettingDescriptor<Record<string, Readonly<{
|
|
9
|
+
horizontalLocation: HorizontalLocation;
|
|
10
|
+
verticalLocation: VerticalLocation;
|
|
11
|
+
}> | undefined>>;
|
|
12
|
+
/**
|
|
13
|
+
* Setting descriptor for persisting the left side pane width adjustment.
|
|
14
|
+
*/
|
|
15
|
+
export declare const LeftSidePaneWidthAdjustSettingDescriptor: SettingDescriptor<number>;
|
|
16
|
+
/**
|
|
17
|
+
* Setting descriptor for persisting the left side pane height adjustment.
|
|
18
|
+
*/
|
|
19
|
+
export declare const LeftSidePaneHeightAdjustSettingDescriptor: SettingDescriptor<number>;
|
|
20
|
+
/**
|
|
21
|
+
* Setting descriptor for persisting the right side pane width adjustment.
|
|
22
|
+
*/
|
|
23
|
+
export declare const RightSidePaneWidthAdjustSettingDescriptor: SettingDescriptor<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Setting descriptor for persisting the right side pane height adjustment.
|
|
26
|
+
*/
|
|
27
|
+
export declare const RightSidePaneHeightAdjustSettingDescriptor: SettingDescriptor<number>;
|
|
28
|
+
/**
|
|
29
|
+
* Represents a horizontal location in the shell layout.
|
|
30
|
+
*/
|
|
31
|
+
export type HorizontalLocation = "left" | "right";
|
|
32
|
+
/**
|
|
33
|
+
* Represents a vertical location in the shell layout.
|
|
34
|
+
*/
|
|
35
|
+
export type VerticalLocation = "top" | "bottom";
|
|
36
|
+
type TeachingMomentInfo = boolean | {
|
|
37
|
+
readonly title: string;
|
|
38
|
+
readonly description: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Describes an item that can be added to one of the shell's toolbars.
|
|
42
|
+
*/
|
|
43
|
+
export type ToolbarItemDefinition = {
|
|
44
|
+
/**
|
|
45
|
+
* A unique key for the toolbar item.
|
|
46
|
+
*/
|
|
47
|
+
key: string;
|
|
48
|
+
/**
|
|
49
|
+
* The component to render for the toolbar item.
|
|
50
|
+
*/
|
|
51
|
+
component: ComponentType;
|
|
52
|
+
/**
|
|
53
|
+
* An optional order for the toolbar item, relative to other items.
|
|
54
|
+
* Defaults to 0.
|
|
55
|
+
*/
|
|
56
|
+
order?: number;
|
|
57
|
+
/**
|
|
58
|
+
* The horizontal location of the toolbar item.
|
|
59
|
+
* Can be either "left" or "right".
|
|
60
|
+
* In "compact" toolbar mode, "left" and "right" mean the "compact" toolbars at the top/bottom of the left/right side panes.
|
|
61
|
+
* In "full" toolbar mode, "left" and "right" mean the left side and right side of the full width toolbars above/below the side panes.
|
|
62
|
+
*/
|
|
63
|
+
horizontalLocation: HorizontalLocation;
|
|
64
|
+
/**
|
|
65
|
+
* The vertical location of the toolbar item.
|
|
66
|
+
* Can be either "top" or "bottom".
|
|
67
|
+
*/
|
|
68
|
+
verticalLocation: VerticalLocation;
|
|
69
|
+
/**
|
|
70
|
+
* An optional display name for the toolbar item, used for teaching moments, tooltips, etc.
|
|
71
|
+
*/
|
|
72
|
+
displayName?: string;
|
|
73
|
+
/**
|
|
74
|
+
* An optional teaching moment info. The default assumes the toolbar item was added by an extension and provides a generic title and description based on the display name or id, which is helpful for discoverability of new items.
|
|
75
|
+
* Set this to false to suppress the teaching moment, which may be desirable for built in items or items that are added in a non-dynamic way.
|
|
76
|
+
* Set it to an object with a title and description to provide a custom teaching moment, which may be desirable if the generic title and description are not sufficient.
|
|
77
|
+
* Teaching moments are more helpful for dynamically added items, possibly from extensions.
|
|
78
|
+
*/
|
|
79
|
+
teachingMoment?: TeachingMomentInfo;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Describes a side pane that can be added to the shell's left or right side.
|
|
83
|
+
*/
|
|
84
|
+
export type SidePaneDefinition = {
|
|
85
|
+
/**
|
|
86
|
+
* A unique key for the side pane.
|
|
87
|
+
*/
|
|
88
|
+
key: string;
|
|
89
|
+
/**
|
|
90
|
+
* An icon component to render for the pane tab.
|
|
91
|
+
*/
|
|
92
|
+
icon: ComponentType;
|
|
93
|
+
/**
|
|
94
|
+
* The component to render for the side pane's content.
|
|
95
|
+
*/
|
|
96
|
+
content: ComponentType;
|
|
97
|
+
/**
|
|
98
|
+
* An optional order for the side pane, relative to other panes.
|
|
99
|
+
* Defaults to 0.
|
|
100
|
+
*/
|
|
101
|
+
order?: number;
|
|
102
|
+
/**
|
|
103
|
+
* The horizontal location of the side pane.
|
|
104
|
+
* Can be either "left" or "right".
|
|
105
|
+
*/
|
|
106
|
+
horizontalLocation: HorizontalLocation;
|
|
107
|
+
/**
|
|
108
|
+
* The vertical location of the side pane.
|
|
109
|
+
* Can be either "top" or "bottom".
|
|
110
|
+
*/
|
|
111
|
+
verticalLocation: VerticalLocation;
|
|
112
|
+
/**
|
|
113
|
+
* The title of the side pane, displayed as a standardized header at the top of the pane.
|
|
114
|
+
*/
|
|
115
|
+
title: string;
|
|
116
|
+
/**
|
|
117
|
+
* An optional teaching moment info. The default assumes the side pane was added by an extension and provides a generic title and description based on the display name or id, which is helpful for discoverability of new items.
|
|
118
|
+
* Set this to false to suppress the teaching moment, which may be desirable for built in items or items that are added in a non-dynamic way.
|
|
119
|
+
* Set it to an object with a title and description to provide a custom teaching moment, which may be desirable if the generic title and description are not sufficient.
|
|
120
|
+
* Teaching moments are more helpful for dynamically added panes, possibly from extensions.
|
|
121
|
+
*/
|
|
122
|
+
teachingMoment?: TeachingMomentInfo;
|
|
123
|
+
/**
|
|
124
|
+
* Keep the pane mounted even when it is not visible. This is useful if you don't want the
|
|
125
|
+
* user to lose the complex visual state when switching between tabs.
|
|
126
|
+
*/
|
|
127
|
+
keepMounted?: boolean;
|
|
128
|
+
};
|
|
129
|
+
type RegisteredSidePane = {
|
|
130
|
+
readonly key: string;
|
|
131
|
+
select(): void;
|
|
132
|
+
};
|
|
133
|
+
type SidePaneContainer = {
|
|
134
|
+
readonly isDocked: boolean;
|
|
135
|
+
dock(): void;
|
|
136
|
+
undock(): void;
|
|
137
|
+
readonly isCollapsed: boolean;
|
|
138
|
+
collapse(): void;
|
|
139
|
+
expand(): void;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Describes content that can be added to the shell's central area (between the side panes and toolbars - e.g. the main content).
|
|
143
|
+
*/
|
|
144
|
+
export type CentralContentDefinition = {
|
|
145
|
+
/**
|
|
146
|
+
* A unique key for the central content.
|
|
147
|
+
*/
|
|
148
|
+
key: string;
|
|
149
|
+
/**
|
|
150
|
+
* The component to render for the central content.
|
|
151
|
+
*/
|
|
152
|
+
component: ComponentType;
|
|
153
|
+
/**
|
|
154
|
+
* An optional order for content, relative to other central content.
|
|
155
|
+
* Defaults to 0.
|
|
156
|
+
*/
|
|
157
|
+
order?: number;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* The unique identity symbol for the root component service.
|
|
161
|
+
*/
|
|
162
|
+
export declare const RootComponentServiceIdentity: unique symbol;
|
|
163
|
+
/**
|
|
164
|
+
* Exposes a top level component that should be rendered as the React root.
|
|
165
|
+
*/
|
|
166
|
+
export interface IRootComponentService extends IService<typeof RootComponentServiceIdentity> {
|
|
167
|
+
/**
|
|
168
|
+
* The root component that should be rendered as the React root.
|
|
169
|
+
*/
|
|
170
|
+
readonly rootComponent: ComponentType;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* The unique identity symbol for the shell service.
|
|
174
|
+
*/
|
|
175
|
+
export declare const ShellServiceIdentity: unique symbol;
|
|
176
|
+
/**
|
|
177
|
+
* Provides a shell for the application, including toolbars, side panes, and central content.
|
|
178
|
+
* This service allows adding toolbar items, side panes, and central content dynamically.
|
|
179
|
+
*/
|
|
180
|
+
export interface IShellService extends IService<typeof ShellServiceIdentity> {
|
|
181
|
+
/**
|
|
182
|
+
* Adds a new item to one of the shell's toolbars.
|
|
183
|
+
* @param item Defines the item to add.
|
|
184
|
+
*/
|
|
185
|
+
addToolbarItem(item: Readonly<ToolbarItemDefinition>): IDisposable;
|
|
186
|
+
/**
|
|
187
|
+
* Adds a new side pane to the shell.
|
|
188
|
+
* @param pane Defines the side pane to add.
|
|
189
|
+
*/
|
|
190
|
+
addSidePane(pane: Readonly<SidePaneDefinition>): IDisposable;
|
|
191
|
+
/**
|
|
192
|
+
* Adds new central content to the shell.
|
|
193
|
+
* @param content Defines the content area to add.
|
|
194
|
+
*/
|
|
195
|
+
addCentralContent(content: Readonly<CentralContentDefinition>): IDisposable;
|
|
196
|
+
/**
|
|
197
|
+
* The left side pane container.
|
|
198
|
+
*/
|
|
199
|
+
readonly leftSidePaneContainer: Nullable<SidePaneContainer>;
|
|
200
|
+
/**
|
|
201
|
+
* The right side pane container.
|
|
202
|
+
*/
|
|
203
|
+
readonly rightSidePaneContainer: Nullable<SidePaneContainer>;
|
|
204
|
+
/**
|
|
205
|
+
* The side panes currently present in the shell.
|
|
206
|
+
*/
|
|
207
|
+
readonly sidePanes: readonly RegisteredSidePane[];
|
|
208
|
+
}
|
|
209
|
+
type ToolbarMode = "full" | "compact";
|
|
210
|
+
/**
|
|
211
|
+
* Options for configuring the shell service.
|
|
212
|
+
*/
|
|
213
|
+
export type ShellServiceOptions = {
|
|
214
|
+
/**
|
|
215
|
+
* The default width of the left side pane.
|
|
216
|
+
*/
|
|
217
|
+
leftPaneDefaultWidth?: number;
|
|
218
|
+
/**
|
|
219
|
+
* The minimum width of the left side pane.
|
|
220
|
+
*/
|
|
221
|
+
leftPaneMinWidth?: number;
|
|
222
|
+
/**
|
|
223
|
+
* The default width of the right side pane.
|
|
224
|
+
*/
|
|
225
|
+
rightPaneDefaultWidth?: number;
|
|
226
|
+
/**
|
|
227
|
+
* The minimum width of the right side pane.
|
|
228
|
+
*/
|
|
229
|
+
rightPaneMinWidth?: number;
|
|
230
|
+
/**
|
|
231
|
+
* The mode of the toolbars.
|
|
232
|
+
* Can be either "full" (default) or "compact".
|
|
233
|
+
* In "full" mode, toolbars are displayed above and below the side panes.
|
|
234
|
+
* In "compact" mode, toolbars are displayed at the top and bottom of the left and right side panes.
|
|
235
|
+
*/
|
|
236
|
+
toolbarMode?: ToolbarMode;
|
|
237
|
+
/**
|
|
238
|
+
* Whether the left side pane should start collapsed. Default is false.
|
|
239
|
+
*/
|
|
240
|
+
leftPaneDefaultCollapsed?: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Whether the right side pane should start collapsed. Default is false.
|
|
243
|
+
*/
|
|
244
|
+
rightPaneDefaultCollapsed?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* A function that can remap the default location of side panes.
|
|
247
|
+
* @param sidePane The side pane to remap.
|
|
248
|
+
* @returns The new location for the side pane.
|
|
249
|
+
*/
|
|
250
|
+
sidePaneRemapper?: (sidePane: Readonly<SidePaneDefinition>) => Nullable<{
|
|
251
|
+
horizontalLocation: HorizontalLocation;
|
|
252
|
+
verticalLocation: VerticalLocation;
|
|
253
|
+
}>;
|
|
254
|
+
};
|
|
255
|
+
export declare function MakeShellServiceDefinition({ leftPaneDefaultWidth, leftPaneMinWidth, rightPaneDefaultWidth, rightPaneMinWidth, leftPaneDefaultCollapsed, rightPaneDefaultCollapsed, toolbarMode, sidePaneRemapper, }?: ShellServiceOptions): ServiceDefinition<[IShellService, IRootComponentService], []>;
|
|
256
|
+
export {};
|