@wippy-fe/types-global-proxy 0.0.37 → 0.0.39
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/index.d.ts +21 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -111,6 +111,12 @@ type HostFloatingDef = HostOverlayContent & HostOverlayBase & {
|
|
|
111
111
|
minimizable?: boolean;
|
|
112
112
|
maximizable?: boolean;
|
|
113
113
|
zIndex?: number;
|
|
114
|
+
/**
|
|
115
|
+
* Window chrome toggle (default `true`). Set `false` for a bare,
|
|
116
|
+
* content-only "flap" — no header/close/grips/drag/border. See
|
|
117
|
+
* `FloatingPanelDef.chrome` in `@wippy-fe/layout`.
|
|
118
|
+
*/
|
|
119
|
+
chrome?: boolean;
|
|
114
120
|
};
|
|
115
121
|
/**
|
|
116
122
|
* Modal def — centered overlay. Size is either a single `ModalSize`
|
|
@@ -498,6 +504,7 @@ interface AppEnv {
|
|
|
498
504
|
APP_AUTH_API_URL: string;
|
|
499
505
|
APP_WEBSOCKET_URL: string;
|
|
500
506
|
}
|
|
507
|
+
type ThemeMode = 'auto' | 'light' | 'dark';
|
|
501
508
|
interface AppConfig {
|
|
502
509
|
$schema: string;
|
|
503
510
|
auth: AppAuthConfig;
|
|
@@ -505,6 +512,7 @@ interface AppConfig {
|
|
|
505
512
|
axiosDefaults?: Partial<AxiosDefaults>;
|
|
506
513
|
routePrefix?: string;
|
|
507
514
|
apiRoutes?: ApiRoutesOverride;
|
|
515
|
+
themeMode?: ThemeMode;
|
|
508
516
|
theming: {
|
|
509
517
|
global?: ThemingScope;
|
|
510
518
|
host?: HostThemingScope;
|
|
@@ -531,6 +539,7 @@ interface AppConfigOverrides {
|
|
|
531
539
|
axiosDefaults?: Partial<AxiosDefaults>;
|
|
532
540
|
routePrefix?: string;
|
|
533
541
|
apiRoutes?: ApiRoutesOverride;
|
|
542
|
+
themeMode?: ThemeMode;
|
|
534
543
|
}
|
|
535
544
|
|
|
536
545
|
/**
|
|
@@ -1151,7 +1160,7 @@ interface LayoutApi {
|
|
|
1151
1160
|
on: (channel: string, handler: (env: BroadcastEnvelope) => void) => () => void;
|
|
1152
1161
|
}
|
|
1153
1162
|
|
|
1154
|
-
type KnownTopics = '@history' | '@visibility' | '@message' | '@state-error' | '@layout-change' | '@layout-breakpoint';
|
|
1163
|
+
type KnownTopics = '@history' | '@visibility' | '@message' | '@state-error' | '@layout-change' | '@layout-breakpoint' | '@theme';
|
|
1155
1164
|
type Events = {
|
|
1156
1165
|
/** Emitted when pages are updated */
|
|
1157
1166
|
'@history': (data: {
|
|
@@ -1169,6 +1178,8 @@ type Events = {
|
|
|
1169
1178
|
name: string;
|
|
1170
1179
|
width: number;
|
|
1171
1180
|
}) => void;
|
|
1181
|
+
/** Forced theme mode changed (broadcast via SetConfig from the host). */
|
|
1182
|
+
'@theme': (mode: 'auto' | 'light' | 'dark') => void;
|
|
1172
1183
|
} & {
|
|
1173
1184
|
[K in string as K extends KnownTopics ? never : K]: (data: WsMessage) => void;
|
|
1174
1185
|
};
|
|
@@ -1344,6 +1355,14 @@ interface ProxyApiInstance {
|
|
|
1344
1355
|
layout: LayoutApi;
|
|
1345
1356
|
bridge: ProxyBridgeApi;
|
|
1346
1357
|
logout: () => void;
|
|
1358
|
+
/**
|
|
1359
|
+
* Force the host theme mode ('auto' follows the OS; 'light'/'dark' force a
|
|
1360
|
+
* theme). Propagates to the host, all sibling/child iframes, and the parent
|
|
1361
|
+
* website. Subscribe to changes with `on('@theme', mode => ...)`.
|
|
1362
|
+
*/
|
|
1363
|
+
setThemeMode: (mode: 'auto' | 'light' | 'dark') => void;
|
|
1364
|
+
/** Current forced theme mode (defaults to 'auto'). */
|
|
1365
|
+
getThemeMode: () => 'auto' | 'light' | 'dark';
|
|
1347
1366
|
};
|
|
1348
1367
|
api: AxiosInstance;
|
|
1349
1368
|
/** @deprecated, use api calls instead */
|
|
@@ -1407,6 +1426,7 @@ declare global {
|
|
|
1407
1426
|
/** @type {import('tailwindcss').Config} */
|
|
1408
1427
|
declare const _default: {
|
|
1409
1428
|
presets: {
|
|
1429
|
+
darkMode: ["variant", string[]];
|
|
1410
1430
|
theme: {
|
|
1411
1431
|
extend: {
|
|
1412
1432
|
colors: {
|
package/package.json
CHANGED