@decky/ui 4.7.3 → 4.7.4
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.
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const DialogCheckbox =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
return false;
|
|
10
|
-
})).find((m) => m?.prototype?.SetChecked &&
|
|
11
|
-
m?.prototype?.Toggle &&
|
|
12
|
-
m?.prototype?.GetPanelElementProps &&
|
|
13
|
-
(m?.prototype?.render?.toString().includes('="DialogCheckbox"') || (m.contextType &&
|
|
14
|
-
m.prototype?.render.toString().includes('fallback:'))));
|
|
1
|
+
import { findModuleExport } from '../webpack';
|
|
2
|
+
export const DialogCheckbox = findModuleExport(e => e.prototype &&
|
|
3
|
+
"GetPanelElementProps" in e?.prototype &&
|
|
4
|
+
"SetChecked" in e?.prototype &&
|
|
5
|
+
"Toggle" in e?.prototype &&
|
|
6
|
+
(e?.prototype?.render?.toString().includes('="DialogCheckbox"') || (e.contextType &&
|
|
7
|
+
e.prototype?.render?.toString().includes('fallback:'))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { findModuleExport } from '../webpack';
|
|
4
4
|
import { DialogCommonProps } from './Dialog';
|
|
5
5
|
import { FooterLegendProps } from './FooterLegend';
|
|
6
6
|
|
|
@@ -18,22 +18,15 @@ export interface DialogCheckboxProps extends DialogCommonProps, FooterLegendProp
|
|
|
18
18
|
onClick?(evt: Event): void;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
m?.prototype?.Toggle &&
|
|
33
|
-
m?.prototype?.GetPanelElementProps &&
|
|
34
|
-
// beta || stable as of oct 2 2024
|
|
35
|
-
(m?.prototype?.render?.toString().includes('="DialogCheckbox"') || (
|
|
36
|
-
m.contextType &&
|
|
37
|
-
m.prototype?.render.toString().includes('fallback:')
|
|
38
|
-
))
|
|
21
|
+
// Do not access KeyDown, SetChecked, Toggle here as they are getters and accessing them outside of a render breaks them globally
|
|
22
|
+
export const DialogCheckbox = findModuleExport(e =>
|
|
23
|
+
e.prototype &&
|
|
24
|
+
"GetPanelElementProps" in e?.prototype &&
|
|
25
|
+
"SetChecked" in e?.prototype &&
|
|
26
|
+
"Toggle" in e?.prototype &&
|
|
27
|
+
// beta || stable as of oct 2 2024
|
|
28
|
+
(e?.prototype?.render?.toString().includes('="DialogCheckbox"') || (
|
|
29
|
+
e.contextType &&
|
|
30
|
+
e.prototype?.render?.toString().includes('fallback:')
|
|
31
|
+
))
|
|
39
32
|
) as FC<DialogCheckboxProps>;
|