@hai3/framework 0.2.0-alpha.3 → 0.4.0-alpha.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/CLAUDE.md +194 -19
- package/dist/index.cjs +470 -521
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +308 -81
- package/dist/index.d.ts +308 -81
- package/dist/index.js +458 -504
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +30 -117
- package/dist/types.d.ts +30 -117
- package/llms.txt +122 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { HAI3Config, HAI3AppBuilder,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export { LayoutDomain,
|
|
1
|
+
import { HAI3Config, HAI3AppBuilder, HAI3Plugin, ThemesConfig, Presets, HAI3App, ScreensetsConfig, ChangeThemePayload, ShowPopupPayload, SetLanguagePayload, ThemeRegistry } from './types.js';
|
|
2
|
+
export { HAI3Store, PluginFactory, PluginLifecycle, PluginProvides, Preset, RouterMode, ThemeApplyFn, ThemeConfig, UikitTheme } from './types.js';
|
|
3
|
+
import { Extension, ExtensionDomain, MfeHandler } from '@hai3/screensets';
|
|
4
|
+
export { Action, ActionsChain, ChildMfeBridge, ContainerProvider, Extension, ExtensionDomain, ExtensionPresentation, HAI3_ACTION_LOAD_EXT, HAI3_ACTION_MOUNT_EXT, HAI3_ACTION_UNMOUNT_EXT, HAI3_SCREEN_EXTENSION_TYPE, HAI3_SHARED_PROPERTY_LANGUAGE, HAI3_SHARED_PROPERTY_THEME, JSONSchema, LayoutDomain, LifecycleHook, LifecycleStage, LoadExtPayload, MfeBridgeFactory, MfeEntry, MfeEntryLifecycle, MfeEntryMF, MfeHandler, MountExtPayload, ParentMfeBridge, ScreenExtension, ScreensetsRegistry, ScreensetsRegistryConfig, ScreensetsRegistryFactory, SharedProperty, TypeSystemPlugin, UnmountExtPayload, ValidationError, ValidationResult, createShadowRoot, extractGtsPackage, injectCssVariables, screensetsRegistryFactory } from '@hai3/screensets';
|
|
5
|
+
export { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
6
|
+
export { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
5
7
|
import * as _hai3_state from '@hai3/state';
|
|
6
|
-
export { AppDispatch, EffectInitializer, EventHandler, EventPayloadMap, ReducerPayload, RootState, SliceObject, Subscription, createSlice, createStore, eventBus, getStore, hasSlice, registerSlice } from '@hai3/state';
|
|
8
|
+
export { AppDispatch, EffectInitializer, EventBus, EventHandler, EventPayloadMap, ReducerPayload, RootState, SliceObject, Subscription, createSlice, createStore, eventBus, getStore, hasSlice, registerSlice } from '@hai3/state';
|
|
7
9
|
import * as redux from 'redux';
|
|
8
10
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
9
11
|
import { Reducer } from '@reduxjs/toolkit';
|
|
10
12
|
export { ApiPlugin, ApiPluginBase, ApiPluginErrorContext, ApiProtocol, ApiRequestContext, ApiResponseContext, ApiServiceConfig, BaseApiService, BasePluginHooks, EventSourceLike, JsonCompatible, JsonObject, JsonPrimitive, JsonValue, MOCK_PLUGIN, MockEventSource, MockMap, PluginClass, ProtocolClass, ProtocolPluginType, RestMockConfig, RestMockPlugin, RestPlugin, RestPluginHooks, RestPluginWithConfig, RestProtocol, RestProtocolConfig, RestRequestContext, RestResponseContext, RestShortCircuitResponse, ShortCircuitResponse, SseConnectContext, SseMockConfig, SseMockEvent, SseMockPlugin, SsePlugin, SsePluginHooks, SsePluginWithConfig, SseProtocol, SseProtocolConfig, SseShortCircuitResponse, apiRegistry, isMockPlugin, isRestShortCircuit, isShortCircuit, isSseShortCircuit } from '@hai3/api';
|
|
11
|
-
export { I18nConfig, I18nRegistryImpl as I18nRegistry, I18nRegistryImpl, I18nRegistry as I18nRegistryType, Language, LanguageDisplayMode, LanguageMetadata, SUPPORTED_LANGUAGES, TextDirection, TranslationDictionary, TranslationLoader, TranslationMap, createI18nRegistry, getLanguageMetadata, i18nRegistry } from '@hai3/i18n';
|
|
12
|
-
import 'path-to-regexp';
|
|
13
|
+
export { DateFormatStyle, DateInput, Formatters, I18nConfig, I18nRegistryImpl as I18nRegistry, I18nRegistryImpl, I18nRegistry as I18nRegistryType, Language, LanguageDisplayMode, LanguageMetadata, SUPPORTED_LANGUAGES, TextDirection, TimeFormatStyle, TranslationDictionary, TranslationLoader, TranslationMap, compareStrings, createCollator, createI18nRegistry, formatCompact, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelative, formatTime, getLanguageMetadata, i18nRegistry } from '@hai3/i18n';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* createHAI3 - App Builder Factory
|
|
@@ -36,6 +37,287 @@ import 'path-to-regexp';
|
|
|
36
37
|
*/
|
|
37
38
|
declare function createHAI3(config?: HAI3Config): HAI3AppBuilder;
|
|
38
39
|
|
|
40
|
+
/**
|
|
41
|
+
* MFE Actions
|
|
42
|
+
*
|
|
43
|
+
* Action functions for MFE lifecycle and registration operations.
|
|
44
|
+
* Lifecycle actions call executeActionsChain() directly (fire-and-forget).
|
|
45
|
+
* Registration actions emit events that MFE effects handle.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/** Payload for register extension event */
|
|
49
|
+
interface RegisterExtensionPayload {
|
|
50
|
+
extension: Extension;
|
|
51
|
+
}
|
|
52
|
+
/** Payload for unregister extension event */
|
|
53
|
+
interface UnregisterExtensionPayload {
|
|
54
|
+
extensionId: string;
|
|
55
|
+
}
|
|
56
|
+
declare module '@hai3/state' {
|
|
57
|
+
interface EventPayloadMap {
|
|
58
|
+
'mfe/registerExtensionRequested': RegisterExtensionPayload;
|
|
59
|
+
'mfe/unregisterExtensionRequested': UnregisterExtensionPayload;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Load an MFE extension bundle.
|
|
64
|
+
* Calls executeActionsChain() directly (fire-and-forget).
|
|
65
|
+
*
|
|
66
|
+
* @param extensionId - Extension to load
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* import { loadExtension } from '@hai3/framework';
|
|
71
|
+
* loadExtension('gts.hai3.mfes.ext.extension.v1~my.extension.v1');
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
declare function loadExtension(extensionId: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* Mount an MFE extension.
|
|
77
|
+
* Auto-loads the extension if not already loaded.
|
|
78
|
+
* The container is provided by the domain's ContainerProvider (registered at domain registration time).
|
|
79
|
+
* Calls executeActionsChain() directly (fire-and-forget).
|
|
80
|
+
*
|
|
81
|
+
* @param extensionId - Extension to mount
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* import { mountExtension } from '@hai3/framework';
|
|
86
|
+
* mountExtension('gts.hai3.mfes.ext.extension.v1~my.extension.v1');
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
declare function mountExtension(extensionId: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* Unmount an MFE extension from its container.
|
|
92
|
+
* Calls executeActionsChain() directly (fire-and-forget).
|
|
93
|
+
*
|
|
94
|
+
* @param extensionId - Extension to unmount
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* import { unmountExtension } from '@hai3/framework';
|
|
99
|
+
* unmountExtension('gts.hai3.mfes.ext.extension.v1~my.extension.v1');
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
declare function unmountExtension(extensionId: string): void;
|
|
103
|
+
/**
|
|
104
|
+
* Register an extension dynamically at runtime.
|
|
105
|
+
* Emits event that MFE effects handle via runtime.registerExtension().
|
|
106
|
+
*
|
|
107
|
+
* @param extension - Extension instance to register
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```typescript
|
|
111
|
+
* import { registerExtension } from '@hai3/framework';
|
|
112
|
+
* const extension: Extension = {
|
|
113
|
+
* id: 'gts.hai3.mfes.ext.extension.v1~my.extension.v1',
|
|
114
|
+
* domain: 'gts.hai3.mfes.ext.domain.v1~hai3.screensets.layout.sidebar.v1',
|
|
115
|
+
* entry: 'gts.hai3.mfes.mfe.entry.v1~my.entry.v1',
|
|
116
|
+
* };
|
|
117
|
+
* registerExtension(extension);
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
declare function registerExtension(extension: Extension): void;
|
|
121
|
+
/**
|
|
122
|
+
* Unregister an extension dynamically at runtime.
|
|
123
|
+
* Emits event that MFE effects handle via runtime.unregisterExtension().
|
|
124
|
+
*
|
|
125
|
+
* @param extensionId - Extension ID to unregister
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```typescript
|
|
129
|
+
* import { unregisterExtension } from '@hai3/framework';
|
|
130
|
+
* unregisterExtension('gts.hai3.mfes.ext.extension.v1~my.extension.v1');
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
declare function unregisterExtension(extensionId: string): void;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* MFE Slice
|
|
137
|
+
*
|
|
138
|
+
* Store slice for managing MFE registration states.
|
|
139
|
+
* Tracks registration state (unregistered, registering, registered, error) and error messages per extension.
|
|
140
|
+
*/
|
|
141
|
+
/** Extension registration state */
|
|
142
|
+
type ExtensionRegistrationState = 'unregistered' | 'registering' | 'registered' | 'error';
|
|
143
|
+
/** MFE slice state */
|
|
144
|
+
interface MfeState {
|
|
145
|
+
registrationStates: Record<string, ExtensionRegistrationState>;
|
|
146
|
+
errors: Record<string, string>;
|
|
147
|
+
/** Tracks which extension is mounted in each domain. Used as a notification signal for React hooks. */
|
|
148
|
+
mountedExtensions: Record<string, string | undefined>;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Select extension registration state for an extension.
|
|
152
|
+
* Returns 'unregistered' if extension is not tracked.
|
|
153
|
+
*/
|
|
154
|
+
declare function selectExtensionState(state: {
|
|
155
|
+
mfe: MfeState;
|
|
156
|
+
}, extensionId: string): ExtensionRegistrationState;
|
|
157
|
+
/**
|
|
158
|
+
* Select all registered extensions.
|
|
159
|
+
* Returns array of extension IDs with 'registered' state.
|
|
160
|
+
*/
|
|
161
|
+
declare function selectRegisteredExtensions(state: {
|
|
162
|
+
mfe: MfeState;
|
|
163
|
+
}): string[];
|
|
164
|
+
/**
|
|
165
|
+
* Select extension error for an extension.
|
|
166
|
+
* Returns undefined if no error.
|
|
167
|
+
*/
|
|
168
|
+
declare function selectExtensionError(state: {
|
|
169
|
+
mfe: MfeState;
|
|
170
|
+
}, extensionId: string): string | undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* HAI3 Layout Domain Constants (Framework L2)
|
|
174
|
+
*
|
|
175
|
+
* Instance IDs for HAI3 base layout domains.
|
|
176
|
+
* These constants live in @hai3/framework because layout domains
|
|
177
|
+
* are runtime configuration owned by the framework layer.
|
|
178
|
+
*
|
|
179
|
+
* @packageDocumentation
|
|
180
|
+
*/
|
|
181
|
+
/**
|
|
182
|
+
* Popup domain instance ID.
|
|
183
|
+
* Extension domain for popup/modal dialogs.
|
|
184
|
+
*/
|
|
185
|
+
declare const HAI3_POPUP_DOMAIN = "gts.hai3.mfes.ext.domain.v1~hai3.screensets.layout.popup.v1";
|
|
186
|
+
/**
|
|
187
|
+
* Sidebar domain instance ID.
|
|
188
|
+
* Extension domain for collapsible side panels.
|
|
189
|
+
*/
|
|
190
|
+
declare const HAI3_SIDEBAR_DOMAIN = "gts.hai3.mfes.ext.domain.v1~hai3.screensets.layout.sidebar.v1";
|
|
191
|
+
/**
|
|
192
|
+
* Screen domain instance ID.
|
|
193
|
+
* Extension domain for main content area screens.
|
|
194
|
+
*/
|
|
195
|
+
declare const HAI3_SCREEN_DOMAIN = "gts.hai3.mfes.ext.domain.v1~hai3.screensets.layout.screen.v1";
|
|
196
|
+
/**
|
|
197
|
+
* Overlay domain instance ID.
|
|
198
|
+
* Extension domain for full-screen overlays.
|
|
199
|
+
*/
|
|
200
|
+
declare const HAI3_OVERLAY_DOMAIN = "gts.hai3.mfes.ext.domain.v1~hai3.screensets.layout.overlay.v1";
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Base ExtensionDomain Constants (Framework L2)
|
|
204
|
+
*
|
|
205
|
+
* Defines the 4 well-known extension domains as constant objects satisfying
|
|
206
|
+
* the ExtensionDomain interface. These constants are used by the host
|
|
207
|
+
* application to register domains via registerDomain() without hand-authoring
|
|
208
|
+
* JSON.
|
|
209
|
+
*
|
|
210
|
+
* Relationship to string constants:
|
|
211
|
+
* - HAI3_SCREEN_DOMAIN, HAI3_SIDEBAR_DOMAIN, etc. (in constants.ts) are
|
|
212
|
+
* domain ID strings used as action targets in executeActionsChain() calls.
|
|
213
|
+
* - screenDomain, sidebarDomain, etc. (here) are full ExtensionDomain objects
|
|
214
|
+
* whose .id fields reference the same domain ID strings.
|
|
215
|
+
* - Consumers use HAI3_SCREEN_DOMAIN for action targets and screenDomain
|
|
216
|
+
* for registerDomain().
|
|
217
|
+
*
|
|
218
|
+
* Domain Action Support Matrix (from mfe-ext-lifecycle-actions.md):
|
|
219
|
+
* - screen: 2 actions (load_ext, mount_ext) -- NO unmount_ext (swap semantics)
|
|
220
|
+
* - sidebar/popup/overlay: 3 actions (load_ext, mount_ext, unmount_ext) -- toggle semantics
|
|
221
|
+
*
|
|
222
|
+
* @packageDocumentation
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Screen domain constant.
|
|
227
|
+
*
|
|
228
|
+
* Extension domain for main content area screens.
|
|
229
|
+
* Uses swap semantics: mounting a new screen implicitly unmounts the previous one.
|
|
230
|
+
* Actions: load_ext, mount_ext (NO unmount_ext).
|
|
231
|
+
* Extensions must use extension_screen.v1~ derived type (adds presentation metadata).
|
|
232
|
+
*
|
|
233
|
+
* lifecycleStages: [init] only. The screen domain is a permanent fixture --
|
|
234
|
+
* always visible, never destroyed during the application lifespan. Extensions
|
|
235
|
+
* within the screen domain still go through all 4 stages (extensionsLifecycleStages).
|
|
236
|
+
*/
|
|
237
|
+
declare const screenDomain: ExtensionDomain;
|
|
238
|
+
/**
|
|
239
|
+
* Sidebar domain constant.
|
|
240
|
+
*
|
|
241
|
+
* Extension domain for collapsible side panels.
|
|
242
|
+
* Uses toggle semantics: extensions can be explicitly mounted and unmounted.
|
|
243
|
+
* 3 actions: load_ext, mount_ext, unmount_ext.
|
|
244
|
+
*/
|
|
245
|
+
declare const sidebarDomain: ExtensionDomain;
|
|
246
|
+
/**
|
|
247
|
+
* Popup domain constant.
|
|
248
|
+
*
|
|
249
|
+
* Extension domain for popup/modal dialogs.
|
|
250
|
+
* Uses toggle semantics: extensions can be explicitly mounted and unmounted.
|
|
251
|
+
* 3 actions: load_ext, mount_ext, unmount_ext.
|
|
252
|
+
*/
|
|
253
|
+
declare const popupDomain: ExtensionDomain;
|
|
254
|
+
/**
|
|
255
|
+
* Overlay domain constant.
|
|
256
|
+
*
|
|
257
|
+
* Extension domain for full-screen overlays.
|
|
258
|
+
* Uses toggle semantics: extensions can be explicitly mounted and unmounted.
|
|
259
|
+
* 3 actions: load_ext, mount_ext, unmount_ext.
|
|
260
|
+
*/
|
|
261
|
+
declare const overlayDomain: ExtensionDomain;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Microfrontends Plugin
|
|
265
|
+
*
|
|
266
|
+
* Enables MFE capabilities in HAI3 applications.
|
|
267
|
+
* This plugin accepts NO configuration parameters.
|
|
268
|
+
* All MFE registration happens dynamically at runtime.
|
|
269
|
+
*
|
|
270
|
+
* @packageDocumentation
|
|
271
|
+
*/
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Configuration for the microfrontends plugin.
|
|
275
|
+
*/
|
|
276
|
+
interface MicrofrontendsConfig {
|
|
277
|
+
/**
|
|
278
|
+
* Optional MFE handlers to register with the screensets registry.
|
|
279
|
+
* Handlers enable loading of specific MFE entry types (e.g., MfeEntryMF).
|
|
280
|
+
*
|
|
281
|
+
* If not provided, no handlers are registered. Applications must register
|
|
282
|
+
* handlers manually via screensetsRegistry API.
|
|
283
|
+
*/
|
|
284
|
+
mfeHandlers?: MfeHandler[];
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Microfrontends plugin factory.
|
|
288
|
+
*
|
|
289
|
+
* Enables MFE capabilities in HAI3 applications. Optionally accepts MFE handlers
|
|
290
|
+
* for registration at plugin initialization.
|
|
291
|
+
*
|
|
292
|
+
* **Key Principles:**
|
|
293
|
+
* - Optional mfeHandlers config for handler registration
|
|
294
|
+
* - NO static domain registration - domains are registered at runtime
|
|
295
|
+
* - Builds screensetsRegistry with GTS plugin at plugin initialization
|
|
296
|
+
* - Same TypeSystemPlugin instance is propagated throughout
|
|
297
|
+
* - Integrates MFE lifecycle with Flux data flow (actions, effects, slice)
|
|
298
|
+
*
|
|
299
|
+
* @param config - Optional configuration with mfeHandlers array
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* ```typescript
|
|
303
|
+
* import { createHAI3, microfrontends } from '@hai3/framework';
|
|
304
|
+
* import { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
305
|
+
* import { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
306
|
+
*
|
|
307
|
+
* const app = createHAI3()
|
|
308
|
+
* .use(microfrontends({ mfeHandlers: [new MfeHandlerMF(gtsPlugin)] }))
|
|
309
|
+
* .build();
|
|
310
|
+
*
|
|
311
|
+
* // Register domains dynamically at runtime:
|
|
312
|
+
* app.screensetsRegistry.registerDomain(sidebarDomain, containerProvider);
|
|
313
|
+
*
|
|
314
|
+
* // Use MFE actions:
|
|
315
|
+
* app.actions.loadExtension('my.extension.v1');
|
|
316
|
+
* app.actions.mountExtension('my.extension.v1');
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
declare function microfrontends(config?: MicrofrontendsConfig): HAI3Plugin;
|
|
320
|
+
|
|
39
321
|
/**
|
|
40
322
|
* Presets - Pre-configured plugin combinations
|
|
41
323
|
*
|
|
@@ -48,6 +330,8 @@ declare function createHAI3(config?: HAI3Config): HAI3AppBuilder;
|
|
|
48
330
|
interface FullPresetConfig {
|
|
49
331
|
/** Configuration for themes plugin */
|
|
50
332
|
themes?: ThemesConfig;
|
|
333
|
+
/** Configuration for microfrontends plugin */
|
|
334
|
+
microfrontends?: MicrofrontendsConfig;
|
|
51
335
|
}
|
|
52
336
|
/**
|
|
53
337
|
* Full preset - All plugins for the complete HAI3 experience.
|
|
@@ -57,20 +341,24 @@ interface FullPresetConfig {
|
|
|
57
341
|
* - screensets (screenset registry, screen slice)
|
|
58
342
|
* - themes (theme registry, changeTheme action)
|
|
59
343
|
* - layout (all layout domain slices and effects)
|
|
60
|
-
* - navigation (navigateToScreen, navigateToScreenset actions)
|
|
61
|
-
* - routing (route registry auto-synced from screensets)
|
|
62
344
|
* - i18n (i18n registry, setLanguage action)
|
|
63
345
|
* - effects (effect coordination)
|
|
64
346
|
* - mock (mock mode control for API services)
|
|
347
|
+
* - microfrontends (MFE registry, actions, effects)
|
|
65
348
|
*
|
|
66
349
|
* @param config - Optional preset configuration
|
|
67
350
|
*
|
|
68
351
|
* @example
|
|
69
352
|
* ```typescript
|
|
70
353
|
* import { applyTheme } from '@hai3/uikit';
|
|
354
|
+
* import { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
355
|
+
* import { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
71
356
|
*
|
|
72
357
|
* const app = createHAI3()
|
|
73
|
-
* .use(full({
|
|
358
|
+
* .use(full({
|
|
359
|
+
* themes: { applyFn: applyTheme },
|
|
360
|
+
* microfrontends: { mfeHandlers: [new MfeHandlerMF(gtsPlugin)] }
|
|
361
|
+
* }))
|
|
74
362
|
* .build();
|
|
75
363
|
* ```
|
|
76
364
|
*/
|
|
@@ -162,7 +450,7 @@ declare function createHAI3App(config?: HAI3AppConfig): HAI3App;
|
|
|
162
450
|
* .build();
|
|
163
451
|
* ```
|
|
164
452
|
*/
|
|
165
|
-
declare function screensets(
|
|
453
|
+
declare function screensets(_config?: ScreensetsConfig): HAI3Plugin<ScreensetsConfig>;
|
|
166
454
|
|
|
167
455
|
/**
|
|
168
456
|
* Themes Plugin - Provides theme registry and changeTheme action
|
|
@@ -234,62 +522,6 @@ declare module '@hai3/state' {
|
|
|
234
522
|
*/
|
|
235
523
|
declare function layout(): HAI3Plugin;
|
|
236
524
|
|
|
237
|
-
/**
|
|
238
|
-
* Navigation Plugin - Provides navigation actions and URL sync
|
|
239
|
-
*
|
|
240
|
-
* Framework Layer: L2
|
|
241
|
-
*
|
|
242
|
-
* NOTE: Uses layout slices from @hai3/framework (not @hai3/uicore which is deprecated)
|
|
243
|
-
*/
|
|
244
|
-
|
|
245
|
-
declare module '@hai3/state' {
|
|
246
|
-
interface EventPayloadMap {
|
|
247
|
-
'navigation/screen/navigated': NavigateToScreenPayload;
|
|
248
|
-
'navigation/screenset/navigated': NavigateToScreensetPayload;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Navigation plugin factory.
|
|
253
|
-
*
|
|
254
|
-
* @param config - Optional navigation configuration
|
|
255
|
-
* @returns Navigation plugin
|
|
256
|
-
*
|
|
257
|
-
* @example
|
|
258
|
-
* ```typescript
|
|
259
|
-
* const app = createHAI3()
|
|
260
|
-
* .use(screensets())
|
|
261
|
-
* .use(navigation({ base: '/app' }))
|
|
262
|
-
* .build();
|
|
263
|
-
*
|
|
264
|
-
* app.actions.navigateToScreen({ screensetId: 'demo', screenId: 'home' });
|
|
265
|
-
* ```
|
|
266
|
-
*/
|
|
267
|
-
declare function navigation(config?: NavigationConfig): HAI3Plugin;
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Routing Plugin - Provides route registry auto-synced from screensets
|
|
271
|
-
*
|
|
272
|
-
* Framework Layer: L2
|
|
273
|
-
*/
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Routing plugin factory.
|
|
277
|
-
*
|
|
278
|
-
* @returns Routing plugin
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
* ```typescript
|
|
282
|
-
* const app = createHAI3()
|
|
283
|
-
* .use(screensets())
|
|
284
|
-
* .use(routing())
|
|
285
|
-
* .build();
|
|
286
|
-
*
|
|
287
|
-
* // Check if a screen exists
|
|
288
|
-
* const exists = app.routeRegistry.hasScreen('demo', 'home');
|
|
289
|
-
* ```
|
|
290
|
-
*/
|
|
291
|
-
declare function routing(): HAI3Plugin;
|
|
292
|
-
|
|
293
525
|
/**
|
|
294
526
|
* I18n Plugin - Provides i18n registry wiring and setLanguage action
|
|
295
527
|
*
|
|
@@ -397,19 +629,6 @@ declare function mock(config?: MockPluginConfig): HAI3Plugin;
|
|
|
397
629
|
*/
|
|
398
630
|
declare function createThemeRegistry(config?: ThemesConfig): ThemeRegistry;
|
|
399
631
|
|
|
400
|
-
/**
|
|
401
|
-
* Route Registry - Manages routes auto-synced from screensets
|
|
402
|
-
*
|
|
403
|
-
* Framework Layer: L2
|
|
404
|
-
*/
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Create a new route registry instance.
|
|
408
|
-
*
|
|
409
|
-
* @param screensetRegistry - Screenset registry to sync from
|
|
410
|
-
*/
|
|
411
|
-
declare function createRouteRegistry(screensetRegistry: ScreensetRegistry): RouteRegistry;
|
|
412
|
-
|
|
413
632
|
/**
|
|
414
633
|
* Layout State Types
|
|
415
634
|
*
|
|
@@ -714,6 +933,14 @@ declare module '@hai3/state' {
|
|
|
714
933
|
* Call this once during app bootstrap to start listening for tenant events.
|
|
715
934
|
*/
|
|
716
935
|
declare function initTenantEffects(): () => void;
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Tenant Actions
|
|
939
|
+
*
|
|
940
|
+
* Action functions for setting and clearing tenant.
|
|
941
|
+
* These emit events that are consumed by tenantEffects.
|
|
942
|
+
*/
|
|
943
|
+
|
|
717
944
|
/**
|
|
718
945
|
* Set tenant via event bus
|
|
719
946
|
* This is the recommended way for consuming apps to set tenant.
|
|
@@ -918,4 +1145,4 @@ declare function hasLegacyUicoreState(state: unknown): state is LegacyRootState;
|
|
|
918
1145
|
*/
|
|
919
1146
|
declare function hasNewLayoutState(state: unknown): state is RootStateWithLayout;
|
|
920
1147
|
|
|
921
|
-
export { ACCOUNTS_DOMAIN, ChangeThemePayload, type FooterConfig, type FooterState, type FullPresetConfig, HAI3App, HAI3AppBuilder, type HAI3AppConfig, HAI3Config, HAI3Plugin, type HeaderConfig, type HeaderState, type HeaderUser, LAYOUT_SLICE_NAME, type LayoutDomainReducers, type LayoutDomainState, type LayoutState, type LegacyRootState, type LegacyUicoreState, type MenuItem, type MenuState, MockEvents, type MockPluginConfig, type MockState, type MockTogglePayload,
|
|
1148
|
+
export { ACCOUNTS_DOMAIN, ChangeThemePayload, type ExtensionRegistrationState, type FooterConfig, type FooterState, type FullPresetConfig, HAI3App, HAI3AppBuilder, type HAI3AppConfig, HAI3Config, HAI3Plugin, HAI3_OVERLAY_DOMAIN, HAI3_POPUP_DOMAIN, HAI3_SCREEN_DOMAIN, HAI3_SIDEBAR_DOMAIN, type HeaderConfig, type HeaderState, type HeaderUser, LAYOUT_SLICE_NAME, type LayoutDomainReducers, type LayoutDomainState, type LayoutState, type LegacyRootState, type LegacyUicoreState, type MenuItem, type MenuState, type MfeState, type MicrofrontendsConfig, MockEvents, type MockPluginConfig, type MockState, type MockTogglePayload, type OverlayConfig, type OverlayState, type PopupConfig, type PopupSliceState, type PopupState, Presets, type RegisterExtensionPayload, type RootStateWithLayout, STATE_PATH_MAPPING, type ScreenState, ScreensetsConfig, type Selector, SetLanguagePayload, ShowPopupPayload, type SidebarPosition, type SidebarState, TENANT_SLICE_NAME, type Tenant, type TenantChangedPayload, type TenantClearedPayload, TenantEvents, type TenantState, ThemeRegistry, ThemesConfig, type UnregisterExtensionPayload, changeTenant, clearActiveScreen, clearTenant, clearTenantAction, clearUser, closeAllPopups, closePopup, closeTopPopup, createHAI3, createHAI3App, createLegacySelector, createThemeRegistry, effects, footerActions, footerSlice, full, getLayoutDomainState, hasLegacyUicoreState, hasNewLayoutState, headerActions, headerSlice, headless, hideOverlay, i18n, initMockEffects, initTenantEffects, isDeprecationWarningsEnabled, layout, layoutDomainReducers, layoutReducer, loadExtension, menuActions, menuSlice, microfrontends, minimal, mock, mockActions, mockSlice, mountExtension, navigateTo, openPopup, overlayActions, overlayDomain, overlaySlice, popupActions, popupDomain, popupSlice, presets, registerExtension, screenActions, screenDomain, screenSlice, screensets, selectExtensionError, selectExtensionState, selectRegisteredExtensions, setActiveScreen, setDeprecationWarnings, setFooterConfig, setFooterVisible, setLoading as setHeaderLoading, setMenuCollapsed, setMenuConfig, setMenuItems, setMenuVisible, setMockEnabled, setOverlayVisible, setScreenLoading, setSidebarCollapsed, setSidebarConfig, setSidebarContent, setSidebarPosition, setSidebarTitle, setSidebarVisible, setSidebarWidth, setTenant, setTenantLoading, setTenantLoadingState, setUser, showOverlay, sidebarActions, sidebarDomain, sidebarSlice, tenantActions, _default as tenantReducer, tenantSlice, themes, toggleMenu, toggleMockMode, toggleSidebar, unmountExtension, unregisterExtension };
|