@dnzn/dxkit 0.1.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/LICENSE +21 -0
- package/README.md +130 -0
- package/dist/index.cjs +589 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +425 -0
- package/dist/index.d.ts +425 -0
- package/dist/index.global.js +582 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +557 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
/** Defines a single configurable setting for a dapp. */
|
|
2
|
+
interface SettingDefinition {
|
|
3
|
+
/** Unique key within the dapp, e.g. 'defaultCategory'. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Human-readable label. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Input type for form generation. */
|
|
8
|
+
type: 'text' | 'number' | 'boolean' | 'select' | 'multiselect';
|
|
9
|
+
/** Default value. */
|
|
10
|
+
default: unknown;
|
|
11
|
+
/** Help text shown below the input. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Options for select/multiselect types. */
|
|
14
|
+
options?: {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[];
|
|
18
|
+
/** Validation constraints. */
|
|
19
|
+
validation?: {
|
|
20
|
+
required?: boolean;
|
|
21
|
+
min?: number;
|
|
22
|
+
max?: number;
|
|
23
|
+
pattern?: string;
|
|
24
|
+
};
|
|
25
|
+
/** Key of a boolean setting in the same section that this field depends on. When the referenced setting is falsy, this field is disabled/grayed out. */
|
|
26
|
+
dependsOn?: string;
|
|
27
|
+
}
|
|
28
|
+
/** A group of setting definitions with identity and display label. */
|
|
29
|
+
interface SettingsSection {
|
|
30
|
+
/** Section identifier (dapp ID, plugin name, or reserved namespace like '_shell'). */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Human-readable section heading. */
|
|
33
|
+
label: string;
|
|
34
|
+
/** Setting definitions in this section. */
|
|
35
|
+
definitions: SettingDefinition[];
|
|
36
|
+
}
|
|
37
|
+
/** Settings API exposed on DxKit context. */
|
|
38
|
+
interface Settings {
|
|
39
|
+
/** Get a setting value. Returns the default from the manifest if not explicitly set. */
|
|
40
|
+
get<T = unknown>(dappId: string, key: string): T | undefined;
|
|
41
|
+
/** Set a setting value. */
|
|
42
|
+
set(dappId: string, key: string, value: unknown): void;
|
|
43
|
+
/** Get all settings for a dapp as a key-value map. */
|
|
44
|
+
getAll(dappId: string): Record<string, unknown>;
|
|
45
|
+
/** Get all setting sections (dapps, plugins, shell-level). */
|
|
46
|
+
getSections(): SettingsSection[];
|
|
47
|
+
/** Subscribe to changes for a specific setting. Returns unsubscribe. */
|
|
48
|
+
onChange(dappId: string, key: string, handler: (value: unknown) => void): () => void;
|
|
49
|
+
/** Subscribe to any setting change for a dapp. Returns unsubscribe. */
|
|
50
|
+
onAnyChange(dappId: string, handler: (key: string, value: unknown) => void): () => void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Declares a dapp's identity, routing, and navigation metadata. */
|
|
54
|
+
interface DappManifest {
|
|
55
|
+
/** Unique slug, e.g. 'token-sender'. */
|
|
56
|
+
id: string;
|
|
57
|
+
/** Human-readable display name. */
|
|
58
|
+
name: string;
|
|
59
|
+
/** Short description of what this dapp does. */
|
|
60
|
+
description?: string;
|
|
61
|
+
/** Semver version string. */
|
|
62
|
+
version: string;
|
|
63
|
+
/** Path prefix this dapp owns, e.g. '/tools/token-sender'. */
|
|
64
|
+
route: string;
|
|
65
|
+
/** Compiled JS entry point, relative to dapp root. */
|
|
66
|
+
entry: string;
|
|
67
|
+
/** CSS stylesheet path, relative to dapp root. Lazy-loaded on first mount. */
|
|
68
|
+
styles?: string;
|
|
69
|
+
nav: {
|
|
70
|
+
/** Menu text. */
|
|
71
|
+
label: string;
|
|
72
|
+
/** Icon identifier (SVG name, URL, or inline SVG). */
|
|
73
|
+
icon?: string;
|
|
74
|
+
/** Nav grouping, e.g. 'tools', 'defi', 'admin'. */
|
|
75
|
+
group?: string;
|
|
76
|
+
/** Sort order within group. */
|
|
77
|
+
order?: number;
|
|
78
|
+
/** Registered but not shown in nav. */
|
|
79
|
+
hidden?: boolean;
|
|
80
|
+
};
|
|
81
|
+
/** Declare what this dapp needs from the shell. */
|
|
82
|
+
requires?: {
|
|
83
|
+
/** Plugin names that must be registered before mount, e.g. ['wallet', 'auth']. */
|
|
84
|
+
plugins?: string[];
|
|
85
|
+
};
|
|
86
|
+
/** Configurable settings declared by this dapp. */
|
|
87
|
+
settings?: SettingDefinition[];
|
|
88
|
+
/** Whether the end-user can toggle this dapp on or off (default: false = always on). */
|
|
89
|
+
optional?: boolean;
|
|
90
|
+
/** Initial enabled state (default: true). Only meaningful when `optional` is true. */
|
|
91
|
+
enabled?: boolean;
|
|
92
|
+
/** Whether this dapp can run outside the shell (default: true). */
|
|
93
|
+
standalone?: boolean;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Built-in shell event names mapped to their payload types.
|
|
98
|
+
*
|
|
99
|
+
* Plugin events use the `dx:plugin:<name>:<action>` convention and are
|
|
100
|
+
* registered at runtime via `EventRegistry.registerEvent()`. Developer/dapp
|
|
101
|
+
* events use any name that does not start with `dx:`.
|
|
102
|
+
*/
|
|
103
|
+
interface EventMap {
|
|
104
|
+
'dx:ready': Record<string, never>;
|
|
105
|
+
'dx:route:changed': {
|
|
106
|
+
path: string;
|
|
107
|
+
manifest?: DappManifest;
|
|
108
|
+
};
|
|
109
|
+
'dx:dapp:mounted': {
|
|
110
|
+
id: string;
|
|
111
|
+
};
|
|
112
|
+
'dx:dapp:unmounted': {
|
|
113
|
+
id: string;
|
|
114
|
+
};
|
|
115
|
+
'dx:dapp:enabled': {
|
|
116
|
+
id: string;
|
|
117
|
+
};
|
|
118
|
+
'dx:dapp:disabled': {
|
|
119
|
+
id: string;
|
|
120
|
+
};
|
|
121
|
+
'dx:mount': {
|
|
122
|
+
id: string;
|
|
123
|
+
container: HTMLElement;
|
|
124
|
+
path: string;
|
|
125
|
+
};
|
|
126
|
+
'dx:unmount': {
|
|
127
|
+
id: string;
|
|
128
|
+
};
|
|
129
|
+
'dx:error': {
|
|
130
|
+
source: string;
|
|
131
|
+
error: Error;
|
|
132
|
+
};
|
|
133
|
+
'dx:plugin:registered': {
|
|
134
|
+
name: string;
|
|
135
|
+
};
|
|
136
|
+
'dx:event:registered': {
|
|
137
|
+
source: string;
|
|
138
|
+
events: string[];
|
|
139
|
+
};
|
|
140
|
+
/** Index signature — allows custom events registered at runtime. */
|
|
141
|
+
[event: string]: unknown;
|
|
142
|
+
}
|
|
143
|
+
/** Input descriptor for `EventRegistry.registerEvent()`. */
|
|
144
|
+
interface EventRegistration {
|
|
145
|
+
/** Event name, e.g. `'dx:plugin:wallet:connected'` or `'myapp:loaded'`. */
|
|
146
|
+
name: string;
|
|
147
|
+
/** Optional human-readable description for introspection. */
|
|
148
|
+
description?: string;
|
|
149
|
+
}
|
|
150
|
+
/** Describes a registered custom event (returned by `getRegisteredEvents()`). */
|
|
151
|
+
interface RegisteredEvent {
|
|
152
|
+
/** Full event name. */
|
|
153
|
+
name: string;
|
|
154
|
+
/** Which plugin or dapp registered this event. */
|
|
155
|
+
source: string;
|
|
156
|
+
/** Optional description. */
|
|
157
|
+
description?: string;
|
|
158
|
+
}
|
|
159
|
+
/** Handle returned by EventBus.on() for managing a listener. */
|
|
160
|
+
interface Listener {
|
|
161
|
+
/** Remove the listener permanently. */
|
|
162
|
+
off(): void;
|
|
163
|
+
/** Whether the listener is currently paused. */
|
|
164
|
+
readonly paused: boolean;
|
|
165
|
+
/** Temporarily stop delivering events to this listener. */
|
|
166
|
+
pause(): void;
|
|
167
|
+
/** Resume delivering events after a pause. */
|
|
168
|
+
resume(): void;
|
|
169
|
+
}
|
|
170
|
+
/** Typed event bus for DxKit communication. */
|
|
171
|
+
interface EventBus {
|
|
172
|
+
emit<K extends keyof EventMap>(event: K, detail: EventMap[K]): void;
|
|
173
|
+
on<K extends keyof EventMap>(event: K, handler: (detail: EventMap[K]) => void): Listener;
|
|
174
|
+
once<K extends keyof EventMap>(event: K, handler: (detail: EventMap[K]) => void): void;
|
|
175
|
+
off<K extends keyof EventMap>(event: K, handler: (detail: EventMap[K]) => void): void;
|
|
176
|
+
}
|
|
177
|
+
/** Registry for runtime event registration and introspection. */
|
|
178
|
+
interface EventRegistry {
|
|
179
|
+
/**
|
|
180
|
+
* Register one or more custom events.
|
|
181
|
+
*
|
|
182
|
+
* - Plugins: event names MUST match `dx:plugin:<source>:<action>`.
|
|
183
|
+
* - Dapps/devs: event names MUST NOT start with `dx:`.
|
|
184
|
+
* - Duplicate from same source is a no-op.
|
|
185
|
+
* - Different source for same event name throws.
|
|
186
|
+
* - Built-in shell events cannot be registered.
|
|
187
|
+
*/
|
|
188
|
+
registerEvent(source: string, events: EventRegistration[]): void;
|
|
189
|
+
/** Get all registered custom events (excludes static shell events). */
|
|
190
|
+
getRegisteredEvents(): RegisteredEvent[];
|
|
191
|
+
/** Check whether an event name has been registered. */
|
|
192
|
+
isRegistered(event: string): boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Base interface that all DxKit plugins implement. */
|
|
196
|
+
interface Plugin {
|
|
197
|
+
/** Unique name identifying this plugin in the registry. */
|
|
198
|
+
readonly name: string;
|
|
199
|
+
/** Called once during shell init with the DxKit context. */
|
|
200
|
+
init?(context: Context): Promise<void>;
|
|
201
|
+
/** Called on shell teardown for cleanup. */
|
|
202
|
+
destroy?(): Promise<void>;
|
|
203
|
+
/** Optional settings definitions — exposed via the settings plugin. */
|
|
204
|
+
settings?: SettingDefinition[];
|
|
205
|
+
}
|
|
206
|
+
interface WalletState {
|
|
207
|
+
connected: boolean;
|
|
208
|
+
address: string | null;
|
|
209
|
+
chainId: number | null;
|
|
210
|
+
/** Raw provider reference — intentionally loose, plugin decides the type. */
|
|
211
|
+
provider: unknown;
|
|
212
|
+
}
|
|
213
|
+
interface Wallet extends Plugin {
|
|
214
|
+
/** Connect a wallet. Optionally specify a provider by ID. */
|
|
215
|
+
connect(providerId?: string): Promise<WalletState>;
|
|
216
|
+
disconnect(): Promise<void>;
|
|
217
|
+
getState(): WalletState;
|
|
218
|
+
sign(message: string): Promise<string>;
|
|
219
|
+
onStateChange(handler: (state: WalletState) => void): () => void;
|
|
220
|
+
/** Get all registered wallet providers. */
|
|
221
|
+
getProviders(): WalletProvider[];
|
|
222
|
+
/** Get the currently active provider (null if disconnected). */
|
|
223
|
+
getActiveProvider(): WalletProvider | null;
|
|
224
|
+
}
|
|
225
|
+
/** Pluggable wallet backend. Implementations: EIP-1193, local dev, WalletConnect, etc. */
|
|
226
|
+
interface WalletProvider {
|
|
227
|
+
/** Unique provider ID, e.g. 'eip1193', 'local', 'walletconnect'. */
|
|
228
|
+
readonly id: string;
|
|
229
|
+
/** Human-readable name, e.g. 'Browser Wallet', 'Local (Dev)'. */
|
|
230
|
+
readonly name: string;
|
|
231
|
+
/** Whether this provider can work in the current environment. */
|
|
232
|
+
available(): boolean;
|
|
233
|
+
/** Connect and return the resulting wallet state. */
|
|
234
|
+
connect(): Promise<WalletState>;
|
|
235
|
+
/** Disconnect and clear state. */
|
|
236
|
+
disconnect(): Promise<void>;
|
|
237
|
+
/** Sign a message with the connected account. */
|
|
238
|
+
sign(message: string): Promise<string>;
|
|
239
|
+
/** Subscribe to state changes. Returns unsubscribe function. */
|
|
240
|
+
onStateChange(handler: (state: WalletState) => void): () => void;
|
|
241
|
+
}
|
|
242
|
+
interface AuthState {
|
|
243
|
+
authenticated: boolean;
|
|
244
|
+
address: string | null;
|
|
245
|
+
/** SIWE token, JWT, or null. */
|
|
246
|
+
token: string | null;
|
|
247
|
+
/** Unix timestamp, or null if no expiry. */
|
|
248
|
+
expiresAt: number | null;
|
|
249
|
+
}
|
|
250
|
+
interface Auth extends Plugin {
|
|
251
|
+
authenticate(): Promise<AuthState>;
|
|
252
|
+
deauthenticate(): Promise<void>;
|
|
253
|
+
getState(): AuthState;
|
|
254
|
+
isAuthenticated(): boolean;
|
|
255
|
+
onStateChange(handler: (state: AuthState) => void): () => void;
|
|
256
|
+
}
|
|
257
|
+
type ThemeMode = 'light' | 'dark' | 'system';
|
|
258
|
+
interface Theme extends Plugin {
|
|
259
|
+
/** Current mode setting (may be 'system'). */
|
|
260
|
+
getMode(): ThemeMode;
|
|
261
|
+
/** Set mode to light, dark, or system. */
|
|
262
|
+
setMode(mode: ThemeMode): void;
|
|
263
|
+
/** Cycle: system → light → dark → system. */
|
|
264
|
+
toggleMode(): void;
|
|
265
|
+
/** The resolved mode actually applied to the DOM ('light' or 'dark'). */
|
|
266
|
+
getResolvedMode(): 'light' | 'dark';
|
|
267
|
+
onModeChange(handler: (mode: ThemeMode, resolved: 'light' | 'dark') => void): () => void;
|
|
268
|
+
/** Current theme name (e.g. 'default', 'cyberpunk'). */
|
|
269
|
+
getTheme(): string;
|
|
270
|
+
setTheme(theme: string): void;
|
|
271
|
+
getAvailableThemes(): string[];
|
|
272
|
+
onThemeChange(handler: (theme: string) => void): () => void;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** The public surface area dapps interact with via window.__DXKIT__. */
|
|
276
|
+
interface Context {
|
|
277
|
+
/** DxKit event bus for typed pub/sub. */
|
|
278
|
+
events: EventBus;
|
|
279
|
+
/** Event registration for plugins and dapps. */
|
|
280
|
+
eventRegistry: EventRegistry;
|
|
281
|
+
/** Router — navigate and read current path. */
|
|
282
|
+
router: {
|
|
283
|
+
navigate: (path: string) => void;
|
|
284
|
+
getCurrentPath: () => string;
|
|
285
|
+
};
|
|
286
|
+
/** Retrieve a registered plugin by name. */
|
|
287
|
+
getPlugin: <T extends Plugin>(name: string) => T | undefined;
|
|
288
|
+
/** Get all registered plugins as a name→plugin map. */
|
|
289
|
+
getPlugins: () => Record<string, Plugin>;
|
|
290
|
+
/** Get all loaded dapp manifests. */
|
|
291
|
+
getManifests: () => DappManifest[];
|
|
292
|
+
/** Get only enabled dapp manifests (respects optional/enabled state). */
|
|
293
|
+
getEnabledManifests: () => DappManifest[];
|
|
294
|
+
/** Enable an optional dapp by ID. No-op if already enabled or not optional. */
|
|
295
|
+
enableDapp: (id: string) => void;
|
|
296
|
+
/** Disable an optional dapp by ID. No-op if already disabled or not optional. */
|
|
297
|
+
disableDapp: (id: string) => void;
|
|
298
|
+
/** Check whether a dapp is currently enabled. Non-optional dapps always return true. */
|
|
299
|
+
isDappEnabled: (id: string) => boolean;
|
|
300
|
+
/** Injected at runtime by settings plugin if registered. */
|
|
301
|
+
settings?: Settings;
|
|
302
|
+
}
|
|
303
|
+
declare global {
|
|
304
|
+
interface Window {
|
|
305
|
+
__DXKIT__?: Context;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** A dapp entry in the shell config — path to manifest.json plus optional overrides. */
|
|
310
|
+
interface DappEntry {
|
|
311
|
+
/** Path to the dapp's manifest.json (fetched at init). */
|
|
312
|
+
manifest: string;
|
|
313
|
+
/** Partial overrides deep-merged on top of the fetched manifest. */
|
|
314
|
+
overrides?: Partial<DappManifest>;
|
|
315
|
+
}
|
|
316
|
+
/** Configuration passed to createShell(). */
|
|
317
|
+
interface ShellConfig {
|
|
318
|
+
/** Named plugin instances. */
|
|
319
|
+
plugins?: Record<string, Plugin>;
|
|
320
|
+
/** Dapp entries — each points to a manifest.json with optional overrides. */
|
|
321
|
+
dapps?: DappEntry[];
|
|
322
|
+
/** Inline manifests (fully specified, no fetch). Takes precedence over registry.json. */
|
|
323
|
+
manifests?: DappManifest[];
|
|
324
|
+
/** URL to fetch registry.json from. Default: '/registry.json'. */
|
|
325
|
+
registryUrl?: string;
|
|
326
|
+
/** Base path for routing. Default: '/'. */
|
|
327
|
+
basePath?: string;
|
|
328
|
+
/** Routing mode. Default: 'history'. */
|
|
329
|
+
mode?: 'history' | 'hash';
|
|
330
|
+
/** Override the script loader (useful for testing). */
|
|
331
|
+
scriptLoader?: (src: string) => Promise<void>;
|
|
332
|
+
/** Override the style loader (useful for testing). */
|
|
333
|
+
styleLoader?: (href: string) => Promise<void>;
|
|
334
|
+
}
|
|
335
|
+
/** The shell instance returned by createShell(). */
|
|
336
|
+
interface Shell {
|
|
337
|
+
/** Initialize plugins, load manifests, resolve initial route. */
|
|
338
|
+
init(): Promise<void>;
|
|
339
|
+
/** Retrieve a registered plugin by name. */
|
|
340
|
+
getPlugin<T extends Plugin>(name: string): T | undefined;
|
|
341
|
+
/** Get all loaded dapp manifests. */
|
|
342
|
+
getManifests(): DappManifest[];
|
|
343
|
+
/** Get only enabled dapp manifests. */
|
|
344
|
+
getEnabledManifests(): DappManifest[];
|
|
345
|
+
/** Enable an optional dapp by ID. */
|
|
346
|
+
enableDapp(id: string): void;
|
|
347
|
+
/** Disable an optional dapp by ID. */
|
|
348
|
+
disableDapp(id: string): void;
|
|
349
|
+
/** Check whether a dapp is currently enabled. */
|
|
350
|
+
isDappEnabled(id: string): boolean;
|
|
351
|
+
/** Navigate to a path. */
|
|
352
|
+
navigate(path: string): void;
|
|
353
|
+
/** Get the current resolved route path. */
|
|
354
|
+
getCurrentRoute(): string;
|
|
355
|
+
/** Tear down the shell — destroy plugins, remove listeners. */
|
|
356
|
+
destroy(): void;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Creates a typed event bus backed by window.CustomEvent.
|
|
361
|
+
*
|
|
362
|
+
* All events are dispatched on the provided target (defaults to window)
|
|
363
|
+
* using the `dx:*` namespace. Handlers receive the typed `detail` payload.
|
|
364
|
+
*/
|
|
365
|
+
declare function createEventBus(target?: EventTarget): EventBus;
|
|
366
|
+
/**
|
|
367
|
+
* Creates an event registry for runtime event registration and introspection.
|
|
368
|
+
*
|
|
369
|
+
* Namespace rules:
|
|
370
|
+
* - `dx:plugin:<name>:<action>` — plugin events, name must match source
|
|
371
|
+
* - No `dx:` prefix — dapp/developer events, any source
|
|
372
|
+
* - `dx:*` without `dx:plugin:` prefix — reserved, rejected
|
|
373
|
+
*/
|
|
374
|
+
declare function createEventRegistry(bus: EventBus): EventRegistry;
|
|
375
|
+
|
|
376
|
+
interface LifecycleManager {
|
|
377
|
+
mount(manifest: DappManifest, container: HTMLElement, path?: string): Promise<void>;
|
|
378
|
+
unmount(): void;
|
|
379
|
+
getCurrentDapp(): string | null;
|
|
380
|
+
destroy(): void;
|
|
381
|
+
}
|
|
382
|
+
type ScriptLoader = (src: string) => Promise<void>;
|
|
383
|
+
type StyleLoader = (href: string) => Promise<void>;
|
|
384
|
+
interface LifecycleManagerOptions {
|
|
385
|
+
/** Override the script loader (useful for testing). */
|
|
386
|
+
scriptLoader?: ScriptLoader;
|
|
387
|
+
/** Override the style loader (useful for testing). */
|
|
388
|
+
styleLoader?: StyleLoader;
|
|
389
|
+
/** Check if a named plugin is registered. Used for permission enforcement. */
|
|
390
|
+
hasPlugin?: (name: string) => boolean;
|
|
391
|
+
}
|
|
392
|
+
declare function createLifecycleManager(events: EventBus, options?: LifecycleManagerOptions): LifecycleManager;
|
|
393
|
+
|
|
394
|
+
interface PluginRegistry {
|
|
395
|
+
register(name: string, plugin: Plugin): void;
|
|
396
|
+
get<T extends Plugin>(name: string): T | undefined;
|
|
397
|
+
has(name: string): boolean;
|
|
398
|
+
getAll(): Record<string, Plugin>;
|
|
399
|
+
}
|
|
400
|
+
declare function createPluginRegistry(): PluginRegistry;
|
|
401
|
+
|
|
402
|
+
interface Router {
|
|
403
|
+
resolve(path: string): DappManifest | null;
|
|
404
|
+
navigate(path: string): void;
|
|
405
|
+
getCurrentPath(): string;
|
|
406
|
+
onRouteChange(handler: (manifest: DappManifest | null) => void): () => void;
|
|
407
|
+
destroy(): void;
|
|
408
|
+
}
|
|
409
|
+
interface RouterConfig {
|
|
410
|
+
mode: 'history' | 'hash';
|
|
411
|
+
basePath: string;
|
|
412
|
+
manifests: DappManifest[];
|
|
413
|
+
}
|
|
414
|
+
declare function createRouter(config: RouterConfig): Router;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Creates a shell instance for composable dapp development.
|
|
418
|
+
*
|
|
419
|
+
* The shell manages routing, plugin lifecycle, event bus, and dapp
|
|
420
|
+
* mount/unmount orchestration. It owns zero DOM — the developer provides
|
|
421
|
+
* the layout and mount container.
|
|
422
|
+
*/
|
|
423
|
+
declare function createShell(config?: ShellConfig): Shell;
|
|
424
|
+
|
|
425
|
+
export { type Auth, type AuthState, type Context, type DappEntry, type DappManifest, type EventBus, type EventMap, type EventRegistration, type EventRegistry, type LifecycleManagerOptions, type Listener, type Plugin, type RegisteredEvent, type ScriptLoader, type SettingDefinition, type Settings, type SettingsSection, type Shell, type ShellConfig, type StyleLoader, type Theme, type ThemeMode, type Wallet, type WalletProvider, type WalletState, createEventBus, createEventRegistry, createLifecycleManager, createPluginRegistry, createRouter, createShell };
|