@wippy-fe/types-global-proxy 0.0.36 → 0.0.38
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 +15 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -498,6 +498,7 @@ interface AppEnv {
|
|
|
498
498
|
APP_AUTH_API_URL: string;
|
|
499
499
|
APP_WEBSOCKET_URL: string;
|
|
500
500
|
}
|
|
501
|
+
type ThemeMode = 'auto' | 'light' | 'dark';
|
|
501
502
|
interface AppConfig {
|
|
502
503
|
$schema: string;
|
|
503
504
|
auth: AppAuthConfig;
|
|
@@ -505,6 +506,7 @@ interface AppConfig {
|
|
|
505
506
|
axiosDefaults?: Partial<AxiosDefaults>;
|
|
506
507
|
routePrefix?: string;
|
|
507
508
|
apiRoutes?: ApiRoutesOverride;
|
|
509
|
+
themeMode?: ThemeMode;
|
|
508
510
|
theming: {
|
|
509
511
|
global?: ThemingScope;
|
|
510
512
|
host?: HostThemingScope;
|
|
@@ -531,6 +533,7 @@ interface AppConfigOverrides {
|
|
|
531
533
|
axiosDefaults?: Partial<AxiosDefaults>;
|
|
532
534
|
routePrefix?: string;
|
|
533
535
|
apiRoutes?: ApiRoutesOverride;
|
|
536
|
+
themeMode?: ThemeMode;
|
|
534
537
|
}
|
|
535
538
|
|
|
536
539
|
/**
|
|
@@ -1151,7 +1154,7 @@ interface LayoutApi {
|
|
|
1151
1154
|
on: (channel: string, handler: (env: BroadcastEnvelope) => void) => () => void;
|
|
1152
1155
|
}
|
|
1153
1156
|
|
|
1154
|
-
type KnownTopics = '@history' | '@visibility' | '@message' | '@state-error' | '@layout-change' | '@layout-breakpoint';
|
|
1157
|
+
type KnownTopics = '@history' | '@visibility' | '@message' | '@state-error' | '@layout-change' | '@layout-breakpoint' | '@theme';
|
|
1155
1158
|
type Events = {
|
|
1156
1159
|
/** Emitted when pages are updated */
|
|
1157
1160
|
'@history': (data: {
|
|
@@ -1169,6 +1172,8 @@ type Events = {
|
|
|
1169
1172
|
name: string;
|
|
1170
1173
|
width: number;
|
|
1171
1174
|
}) => void;
|
|
1175
|
+
/** Forced theme mode changed (broadcast via SetConfig from the host). */
|
|
1176
|
+
'@theme': (mode: 'auto' | 'light' | 'dark') => void;
|
|
1172
1177
|
} & {
|
|
1173
1178
|
[K in string as K extends KnownTopics ? never : K]: (data: WsMessage) => void;
|
|
1174
1179
|
};
|
|
@@ -1344,6 +1349,14 @@ interface ProxyApiInstance {
|
|
|
1344
1349
|
layout: LayoutApi;
|
|
1345
1350
|
bridge: ProxyBridgeApi;
|
|
1346
1351
|
logout: () => void;
|
|
1352
|
+
/**
|
|
1353
|
+
* Force the host theme mode ('auto' follows the OS; 'light'/'dark' force a
|
|
1354
|
+
* theme). Propagates to the host, all sibling/child iframes, and the parent
|
|
1355
|
+
* website. Subscribe to changes with `on('@theme', mode => ...)`.
|
|
1356
|
+
*/
|
|
1357
|
+
setThemeMode: (mode: 'auto' | 'light' | 'dark') => void;
|
|
1358
|
+
/** Current forced theme mode (defaults to 'auto'). */
|
|
1359
|
+
getThemeMode: () => 'auto' | 'light' | 'dark';
|
|
1347
1360
|
};
|
|
1348
1361
|
api: AxiosInstance;
|
|
1349
1362
|
/** @deprecated, use api calls instead */
|
|
@@ -1407,6 +1420,7 @@ declare global {
|
|
|
1407
1420
|
/** @type {import('tailwindcss').Config} */
|
|
1408
1421
|
declare const _default: {
|
|
1409
1422
|
presets: {
|
|
1423
|
+
darkMode: ["variant", string[]];
|
|
1410
1424
|
theme: {
|
|
1411
1425
|
extend: {
|
|
1412
1426
|
colors: {
|
package/package.json
CHANGED