@decky/ui 4.11.0 → 4.11.2
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/dist/components/Dialog.js +5 -2
- package/dist/components/ProgressBar.js +1 -1
- package/dist/components/Scroll.js +1 -1
- package/dist/components/Spinner.d.ts +1 -2
- package/dist/components/Spinner.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/react/fc.js +19 -0
- package/dist/webpack.js +15 -6
- package/package.json +2 -2
- package/src/components/Dialog.ts +11 -2
- package/src/components/ProgressBar.ts +2 -1
- package/src/components/Scroll.ts +2 -1
- package/src/components/Spinner.ts +2 -2
- package/src/utils/react/fc.ts +19 -0
- package/src/webpack.ts +16 -7
- /package/src/components/{Tabs.tsx → Tabs.ts} +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CommonUIModule } from '../webpack';
|
|
2
|
-
const CommonDialogDivs = Object.values(CommonUIModule).filter((m) => typeof m === 'object' &&
|
|
3
|
-
m?.render?.toString().includes('
|
|
2
|
+
const CommonDialogDivs = Object.values(CommonUIModule).filter((m) => typeof m === 'object' &&
|
|
3
|
+
(m?.render?.toString().includes('jsx)("div",{...') ||
|
|
4
|
+
m?.render?.toString().includes('jsx)("div",Object.assign({},')) ||
|
|
5
|
+
(m?.render?.toString().includes('createElement("div",{...') ||
|
|
6
|
+
m?.render?.toString().includes('createElement("div",Object.assign({},')));
|
|
4
7
|
const MappedDialogDivs = new Map(Object.values(CommonDialogDivs).map((m) => {
|
|
5
8
|
try {
|
|
6
9
|
const renderedDiv = m.render({});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findModuleExport } from '../webpack';
|
|
2
2
|
import { createPropListRegex } from '../utils';
|
|
3
3
|
export const ProgressBar = findModuleExport((e) => e?.toString?.()?.includes('.ProgressBar,"standard"=='));
|
|
4
|
-
export const ProgressBarWithInfo = findModuleExport((e) => e?.toString?.()?.includes('.ProgressBarFieldStatus},'));
|
|
4
|
+
export const ProgressBarWithInfo = findModuleExport((e) => e?.toString?.()?.includes('.ProgressBarFieldStatus,children') || e?.toString?.()?.includes('.ProgressBarFieldStatus},'));
|
|
5
5
|
const progressBarItemRegex = createPropListRegex(["indeterminate", "nTransitionSec", "nProgress"]);
|
|
6
6
|
export const ProgressBarItem = findModuleExport((e) => e?.toString && progressBarItemRegex.test(e.toString()));
|
|
@@ -2,4 +2,4 @@ import { findModuleByExport, findModuleExport } from '../webpack';
|
|
|
2
2
|
const ScrollingModule = findModuleByExport((e) => e?.render?.toString?.().includes('{case"x":'));
|
|
3
3
|
const ScrollingModuleProps = ScrollingModule ? Object.values(ScrollingModule) : [];
|
|
4
4
|
export const ScrollPanel = ScrollingModuleProps.find((prop) => prop?.render?.toString?.().includes('{case"x":'));
|
|
5
|
-
export const ScrollPanelGroup = findModuleExport((e) => e?.render?.toString().includes('.FocusVisibleChild()),[])'));
|
|
5
|
+
export const ScrollPanelGroup = findModuleExport((e) => e?.render?.toString().includes('.FocusVisibleChild(),[])') || e?.render?.toString().includes('.FocusVisibleChild()),[])'));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Spinner: FC<SVGAttributes<SVGElement>>;
|
|
1
|
+
export declare const Spinner: any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IconsModule } from '../webpack';
|
|
2
|
-
export const Spinner = Object.values(IconsModule)?.find((mod) => mod?.toString && /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(mod.toString()));
|
|
2
|
+
export const Spinner = IconsModule && Object.values(IconsModule)?.find((mod) => mod?.toString && /Spinner\),children:\[\(0,\w+\.jsx\)\("path",\{d:"M18 /.test(mod.toString()) || /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(mod.toString()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/class-mapper.ts","../src/index.ts","../src/logger.ts","../src/webpack.ts","../src/components/Button.ts","../src/components/ButtonItem.ts","../src/components/Carousel.ts","../src/components/ControlsList.ts","../src/components/Dialog.ts","../src/components/DialogCheckbox.ts","../src/components/Dropdown.ts","../src/components/ErrorBoundary.ts","../src/components/Field.ts","../src/components/FocusRing.ts","../src/components/Focusable.ts","../src/components/FooterLegend.ts","../src/components/Item.ts","../src/components/Marquee.ts","../src/components/Menu.ts","../src/components/Modal.ts","../src/components/Panel.ts","../src/components/ProgressBar.ts","../src/components/Scroll.ts","../src/components/SidebarNavigation.ts","../src/components/SliderField.ts","../src/components/Spinner.ts","../src/components/SteamSpinner.ts","../src/components/Tabs.
|
|
1
|
+
{"root":["../src/class-mapper.ts","../src/index.ts","../src/logger.ts","../src/webpack.ts","../src/components/Button.ts","../src/components/ButtonItem.ts","../src/components/Carousel.ts","../src/components/ControlsList.ts","../src/components/Dialog.ts","../src/components/DialogCheckbox.ts","../src/components/Dropdown.ts","../src/components/ErrorBoundary.ts","../src/components/Field.ts","../src/components/FocusRing.ts","../src/components/Focusable.ts","../src/components/FooterLegend.ts","../src/components/Item.ts","../src/components/Marquee.ts","../src/components/Menu.ts","../src/components/Modal.ts","../src/components/Panel.ts","../src/components/ProgressBar.ts","../src/components/Scroll.ts","../src/components/SidebarNavigation.ts","../src/components/SliderField.ts","../src/components/Spinner.ts","../src/components/SteamSpinner.ts","../src/components/Tabs.ts","../src/components/TextField.ts","../src/components/Toggle.ts","../src/components/ToggleField.ts","../src/components/index.ts","../src/custom-components/ColorPickerModal.tsx","../src/custom-components/ReorderableList.tsx","../src/custom-components/SuspensefulImage.tsx","../src/custom-components/index.ts","../src/custom-hooks/index.ts","../src/custom-hooks/useQuickAccessVisible.ts","../src/deck-hooks/index.ts","../src/deck-hooks/useParams.ts","../src/globals/SteamClient.ts","../src/globals/index.ts","../src/globals/stores.ts","../src/globals/steam-client/App.ts","../src/globals/steam-client/Auth.ts","../src/globals/steam-client/Broadcast.ts","../src/globals/steam-client/Browser.ts","../src/globals/steam-client/ClientNotifications.ts","../src/globals/steam-client/Cloud.ts","../src/globals/steam-client/CommunityItems.ts","../src/globals/steam-client/Console.ts","../src/globals/steam-client/Customization.ts","../src/globals/steam-client/Downloads.ts","../src/globals/steam-client/FamilySharing.ts","../src/globals/steam-client/FriendSettings.ts","../src/globals/steam-client/Friends.ts","../src/globals/steam-client/GameNotes.ts","../src/globals/steam-client/GameRecording.ts","../src/globals/steam-client/GameSessions.ts","../src/globals/steam-client/Input.ts","../src/globals/steam-client/InstallFolder.ts","../src/globals/steam-client/Installs.ts","../src/globals/steam-client/Messaging.ts","../src/globals/steam-client/Music.ts","../src/globals/steam-client/Notifications.ts","../src/globals/steam-client/OpenVR.ts","../src/globals/steam-client/Overlay.ts","../src/globals/steam-client/Parental.ts","../src/globals/steam-client/RemotePlay.ts","../src/globals/steam-client/Screenshots.ts","../src/globals/steam-client/ServerBrowser.ts","../src/globals/steam-client/Settings.ts","../src/globals/steam-client/SharedConnection.ts","../src/globals/steam-client/Stats.ts","../src/globals/steam-client/SteamChina.ts","../src/globals/steam-client/Storage.ts","../src/globals/steam-client/Streaming.ts","../src/globals/steam-client/UI.ts","../src/globals/steam-client/URL.ts","../src/globals/steam-client/Updates.ts","../src/globals/steam-client/User.ts","../src/globals/steam-client/WebChat.ts","../src/globals/steam-client/WebUITransport.ts","../src/globals/steam-client/Window.ts","../src/globals/steam-client/index.ts","../src/globals/steam-client/shared.ts","../src/globals/steam-client/browser-view/BrowserViewPopup.ts","../src/globals/steam-client/browser-view/index.ts","../src/globals/steam-client/system/Audio.ts","../src/globals/steam-client/system/AudioDevice.ts","../src/globals/steam-client/system/Bluetooth.ts","../src/globals/steam-client/system/Devkit.ts","../src/globals/steam-client/system/Display.ts","../src/globals/steam-client/system/DisplayManager.ts","../src/globals/steam-client/system/Dock.ts","../src/globals/steam-client/system/Perf.ts","../src/globals/steam-client/system/Report.ts","../src/globals/steam-client/system/UI.ts","../src/globals/steam-client/system/index.ts","../src/globals/steam-client/system/network/Device.ts","../src/globals/steam-client/system/network/index.ts","../src/modules/Router.ts","../src/modules/index.ts","../src/utils/index.ts","../src/utils/patcher.ts","../src/utils/static-classes.ts","../src/utils/react/fc.ts","../src/utils/react/react.ts","../src/utils/react/treepatcher.ts"],"version":"5.9.2"}
|
package/dist/utils/react/fc.js
CHANGED
|
@@ -17,6 +17,9 @@ export function injectFCTrampoline(component, customHooks) {
|
|
|
17
17
|
};
|
|
18
18
|
component.prototype.isReactComponent = true;
|
|
19
19
|
let stubsApplied = false;
|
|
20
|
+
const patchJsx = window.SP_REACTDOM.version.startsWith("19.");
|
|
21
|
+
let oldJsx = window.SP_JSX?.jsx;
|
|
22
|
+
let oldJsxs = window.SP_JSX?.jsxs;
|
|
20
23
|
let oldCreateElement = window.SP_REACT.createElement;
|
|
21
24
|
const applyStubsIfNeeded = () => {
|
|
22
25
|
if (!stubsApplied) {
|
|
@@ -28,6 +31,18 @@ export function injectFCTrampoline(component, customHooks) {
|
|
|
28
31
|
loggingEnabled && console.trace("createElement trace");
|
|
29
32
|
return Object.create(component.prototype);
|
|
30
33
|
};
|
|
34
|
+
if (patchJsx) {
|
|
35
|
+
window.SP_JSX.jsx = () => {
|
|
36
|
+
loggingEnabled && logger.debug("jsx hook called");
|
|
37
|
+
loggingEnabled && console.trace("jsx trace");
|
|
38
|
+
return Object.create(component.prototype);
|
|
39
|
+
};
|
|
40
|
+
window.SP_JSX.jsxs = () => {
|
|
41
|
+
loggingEnabled && logger.debug("jsxs hook called");
|
|
42
|
+
loggingEnabled && console.trace("jsxs trace");
|
|
43
|
+
return Object.create(component.prototype);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
31
46
|
}
|
|
32
47
|
};
|
|
33
48
|
const removeStubsIfNeeded = () => {
|
|
@@ -36,6 +51,10 @@ export function injectFCTrampoline(component, customHooks) {
|
|
|
36
51
|
stubsApplied = false;
|
|
37
52
|
removeHookStubs();
|
|
38
53
|
window.SP_REACT.createElement = oldCreateElement;
|
|
54
|
+
if (patchJsx) {
|
|
55
|
+
window.SP_JSX.jsx = oldJsx;
|
|
56
|
+
window.SP_JSX.jsxs = oldJsxs;
|
|
57
|
+
}
|
|
39
58
|
}
|
|
40
59
|
};
|
|
41
60
|
let renderHookStep = 0;
|
package/dist/webpack.js
CHANGED
|
@@ -43,16 +43,23 @@ export const findModuleDetailsByExport = (filter, minExports) => {
|
|
|
43
43
|
for (const mod of [m.default, m]) {
|
|
44
44
|
if (typeof mod !== 'object')
|
|
45
45
|
continue;
|
|
46
|
+
if (mod == window)
|
|
47
|
+
continue;
|
|
46
48
|
if (minExports && Object.keys(mod).length < minExports)
|
|
47
49
|
continue;
|
|
48
50
|
for (let exportName in mod) {
|
|
49
51
|
if (mod?.[exportName]) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
try {
|
|
53
|
+
const filterRes = filter(mod[exportName], exportName);
|
|
54
|
+
if (filterRes) {
|
|
55
|
+
return [mod, mod[exportName], exportName, id];
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
53
60
|
}
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
catch (e) {
|
|
62
|
+
logger.warn("Webpack filter threw exception: ", e);
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
}
|
|
@@ -67,6 +74,7 @@ export const findModuleExport = (filter, minExports) => {
|
|
|
67
74
|
return findModuleDetailsByExport(filter, minExports)?.[1];
|
|
68
75
|
};
|
|
69
76
|
export const findModuleChild = (filter) => {
|
|
77
|
+
logger.warn("findModuleChild is deprecated and will be removed soon. Use findModuleExport instead. Used in:", new Error().stack?.substring(5));
|
|
70
78
|
for (const m of modules.values()) {
|
|
71
79
|
for (const mod of [m.default, m]) {
|
|
72
80
|
const filterRes = filter(mod);
|
|
@@ -80,6 +88,7 @@ export const findModuleChild = (filter) => {
|
|
|
80
88
|
}
|
|
81
89
|
};
|
|
82
90
|
export const findAllModules = (filter) => {
|
|
91
|
+
logger.warn("findAllModules is deprecated and will be removed soon. Use createModuleMapping instead. Used in:", new Error().stack?.substring(5));
|
|
83
92
|
const out = [];
|
|
84
93
|
for (const m of modules.values()) {
|
|
85
94
|
if (m.default && filter(m.default))
|
|
@@ -108,5 +117,5 @@ export const CommonUIModule = findModule((m) => {
|
|
|
108
117
|
}
|
|
109
118
|
return false;
|
|
110
119
|
});
|
|
111
|
-
export const IconsModule = findModuleByExport((e) => e?.toString && /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(e.toString()));
|
|
120
|
+
export const IconsModule = findModuleByExport((e) => e?.toString && /Spinner\),children:\[\(0,\w+\.jsx\)\("path",\{d:"M18 /.test(e.toString()) || /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(e.toString()));
|
|
112
121
|
export const ReactRouter = findModuleByExport((e) => e.computeRootMatch);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decky/ui",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.2",
|
|
4
4
|
"description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"minimist": "^1.2.8",
|
|
58
58
|
"prettier": "^3.6.2",
|
|
59
59
|
"prettier-plugin-import-sort": "^0.0.7",
|
|
60
|
-
"semantic-release": "^
|
|
60
|
+
"semantic-release": "^25.0.3",
|
|
61
61
|
"shx": "^0.3.4",
|
|
62
62
|
"ts-jest": "^29.4.1",
|
|
63
63
|
"typedoc": "^0.25.13",
|
package/src/components/Dialog.ts
CHANGED
|
@@ -52,8 +52,17 @@ export interface DialogButtonProps extends DialogCommonProps, FooterLegendProps
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
const CommonDialogDivs = Object.values(CommonUIModule).filter(
|
|
55
|
-
(m: any) => typeof m === 'object' &&
|
|
56
|
-
|
|
55
|
+
(m: any) => typeof m === 'object' &&
|
|
56
|
+
// New
|
|
57
|
+
(
|
|
58
|
+
m?.render?.toString().includes('jsx)("div",{...') ||
|
|
59
|
+
m?.render?.toString().includes('jsx)("div",Object.assign({},')
|
|
60
|
+
) ||
|
|
61
|
+
// Old
|
|
62
|
+
(
|
|
63
|
+
m?.render?.toString().includes('createElement("div",{...') ||
|
|
64
|
+
m?.render?.toString().includes('createElement("div",Object.assign({},')
|
|
65
|
+
)
|
|
57
66
|
);
|
|
58
67
|
const MappedDialogDivs = new Map(
|
|
59
68
|
Object.values(CommonDialogDivs).map((m: any) => {
|
|
@@ -28,7 +28,8 @@ export const ProgressBar = findModuleExport((e: Export) =>
|
|
|
28
28
|
) as FC<ProgressBarProps>;
|
|
29
29
|
|
|
30
30
|
export const ProgressBarWithInfo = findModuleExport((e: Export) =>
|
|
31
|
-
|
|
31
|
+
// new || old
|
|
32
|
+
e?.toString?.()?.includes('.ProgressBarFieldStatus,children') || e?.toString?.()?.includes('.ProgressBarFieldStatus},'),
|
|
32
33
|
) as FC<ProgressBarWithInfoProps>;
|
|
33
34
|
|
|
34
35
|
const progressBarItemRegex = createPropListRegex(["indeterminate", "nTransitionSec", "nProgress"]);
|
package/src/components/Scroll.ts
CHANGED
|
@@ -11,5 +11,6 @@ export const ScrollPanel = ScrollingModuleProps.find((prop: any) =>
|
|
|
11
11
|
) as FC<{ children?: ReactNode }>;
|
|
12
12
|
|
|
13
13
|
export const ScrollPanelGroup: FC<{ children?: ReactNode }> = findModuleExport((e: Export) =>
|
|
14
|
-
|
|
14
|
+
// new || old
|
|
15
|
+
e?.render?.toString().includes('.FocusVisibleChild(),[])') || e?.render?.toString().includes('.FocusVisibleChild()),[])'),
|
|
15
16
|
);
|
|
@@ -3,6 +3,6 @@ import { FC, SVGAttributes } from 'react';
|
|
|
3
3
|
import { IconsModule } from '../webpack';
|
|
4
4
|
|
|
5
5
|
// TODO type this and other icons?
|
|
6
|
-
export const Spinner = Object.values(IconsModule)?.find(
|
|
7
|
-
(mod: any) => mod?.toString && /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(mod.toString()),
|
|
6
|
+
export const Spinner = IconsModule && Object.values(IconsModule)?.find(
|
|
7
|
+
(mod: any) => mod?.toString && /Spinner\),children:\[\(0,\w+\.jsx\)\("path",\{d:"M18 /.test(mod.toString()) || /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(mod.toString()),
|
|
8
8
|
) as FC<SVGAttributes<SVGElement>>;
|
package/src/utils/react/fc.ts
CHANGED
|
@@ -42,6 +42,9 @@ export function injectFCTrampoline(component: FC, customHooks?: any): FCTrampoli
|
|
|
42
42
|
};
|
|
43
43
|
component.prototype.isReactComponent = true;
|
|
44
44
|
let stubsApplied = false;
|
|
45
|
+
const patchJsx = window.SP_REACTDOM.version.startsWith("19.");
|
|
46
|
+
let oldJsx = window.SP_JSX?.jsx;
|
|
47
|
+
let oldJsxs = window.SP_JSX?.jsxs;
|
|
45
48
|
let oldCreateElement = window.SP_REACT.createElement;
|
|
46
49
|
|
|
47
50
|
const applyStubsIfNeeded = () => {
|
|
@@ -55,6 +58,18 @@ export function injectFCTrampoline(component: FC, customHooks?: any): FCTrampoli
|
|
|
55
58
|
loggingEnabled && console.trace("createElement trace");
|
|
56
59
|
return Object.create(component.prototype);
|
|
57
60
|
};
|
|
61
|
+
if (patchJsx) {
|
|
62
|
+
window.SP_JSX.jsx = () => {
|
|
63
|
+
loggingEnabled && logger.debug("jsx hook called");
|
|
64
|
+
loggingEnabled && console.trace("jsx trace");
|
|
65
|
+
return Object.create(component.prototype);
|
|
66
|
+
}
|
|
67
|
+
window.SP_JSX.jsxs = () => {
|
|
68
|
+
loggingEnabled && logger.debug("jsxs hook called");
|
|
69
|
+
loggingEnabled && console.trace("jsxs trace");
|
|
70
|
+
return Object.create(component.prototype);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
58
73
|
}
|
|
59
74
|
}
|
|
60
75
|
|
|
@@ -64,6 +79,10 @@ export function injectFCTrampoline(component: FC, customHooks?: any): FCTrampoli
|
|
|
64
79
|
stubsApplied = false;
|
|
65
80
|
removeHookStubs();
|
|
66
81
|
window.SP_REACT.createElement = oldCreateElement;
|
|
82
|
+
if (patchJsx) {
|
|
83
|
+
window.SP_JSX.jsx = oldJsx;
|
|
84
|
+
window.SP_JSX.jsxs = oldJsxs;
|
|
85
|
+
}
|
|
67
86
|
}
|
|
68
87
|
}
|
|
69
88
|
|
package/src/webpack.ts
CHANGED
|
@@ -21,7 +21,7 @@ export let modules = new Map<ModuleID, Module>();
|
|
|
21
21
|
function initModuleCache() {
|
|
22
22
|
const startTime = performance.now();
|
|
23
23
|
logger.group('Webpack Module Init');
|
|
24
|
-
// Webpack 5
|
|
24
|
+
// Webpack 5
|
|
25
25
|
// Generate a fake module ID
|
|
26
26
|
const id = Symbol("@decky/ui");
|
|
27
27
|
let webpackRequire!: ((id: any) => Module) & { m: object };
|
|
@@ -70,15 +70,22 @@ export const findModuleDetailsByExport = (
|
|
|
70
70
|
for (const [id, m] of modules) {
|
|
71
71
|
if (!m) continue;
|
|
72
72
|
for (const mod of [m.default, m]) {
|
|
73
|
+
// special cases
|
|
73
74
|
if (typeof mod !== 'object') continue;
|
|
75
|
+
if (mod == window) continue; // wtf
|
|
74
76
|
if (minExports && Object.keys(mod).length < minExports) continue;
|
|
77
|
+
|
|
75
78
|
for (let exportName in mod) {
|
|
76
79
|
if (mod?.[exportName]) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
try {
|
|
81
|
+
const filterRes = filter(mod[exportName], exportName);
|
|
82
|
+
if (filterRes) {
|
|
83
|
+
return [mod, mod[exportName], exportName, id];
|
|
84
|
+
} else {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
} catch (e) {
|
|
88
|
+
logger.warn("Webpack filter threw exception: ", e);
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
91
|
}
|
|
@@ -99,6 +106,7 @@ export const findModuleExport = (filter: ExportFilterFn, minExports?: number) =>
|
|
|
99
106
|
* @deprecated use findModuleExport instead
|
|
100
107
|
*/
|
|
101
108
|
export const findModuleChild = (filter: FindFn) => {
|
|
109
|
+
logger.warn("findModuleChild is deprecated and will be removed soon. Use findModuleExport instead. Used in:", new Error().stack?.substring(5))
|
|
102
110
|
for (const m of modules.values()) {
|
|
103
111
|
for (const mod of [m.default, m]) {
|
|
104
112
|
const filterRes = filter(mod);
|
|
@@ -115,6 +123,7 @@ export const findModuleChild = (filter: FindFn) => {
|
|
|
115
123
|
* @deprecated use createModuleMapping instead
|
|
116
124
|
*/
|
|
117
125
|
export const findAllModules = (filter: FilterFn) => {
|
|
126
|
+
logger.warn("findAllModules is deprecated and will be removed soon. Use createModuleMapping instead. Used in:", new Error().stack?.substring(5))
|
|
118
127
|
const out = [];
|
|
119
128
|
|
|
120
129
|
for (const m of modules.values()) {
|
|
@@ -145,7 +154,7 @@ export const CommonUIModule = findModule((m: Module) => {
|
|
|
145
154
|
});
|
|
146
155
|
|
|
147
156
|
export const IconsModule = findModuleByExport(
|
|
148
|
-
(e) => e?.toString && /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(e.toString()),
|
|
157
|
+
(e) => e?.toString && /Spinner\),children:\[\(0,\w+\.jsx\)\("path",\{d:"M18 /.test(e.toString()) || /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(e.toString()),
|
|
149
158
|
);
|
|
150
159
|
|
|
151
160
|
export const ReactRouter = findModuleByExport((e) => e.computeRootMatch);
|
|
File without changes
|