ssovee-os-web-ui 0.1.86 → 0.1.88
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/README.md +0 -2
- package/dist/index.cjs +9 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +9 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -181,8 +181,6 @@ export function PluginPreview() {
|
|
|
181
181
|
return (
|
|
182
182
|
<PluginPlayground
|
|
183
183
|
metadata={pluginMetadata}
|
|
184
|
-
onClose={() => console.log("Playground closed")}
|
|
185
|
-
onMinimize={(isMinimized) => console.log("Minimized:", isMinimized)}
|
|
186
184
|
>
|
|
187
185
|
<div>
|
|
188
186
|
<Typography variant="h6">Plugin Content</Typography>
|
package/dist/index.cjs
CHANGED
|
@@ -2306,8 +2306,7 @@ function PluginPlayground({
|
|
|
2306
2306
|
children,
|
|
2307
2307
|
metadata,
|
|
2308
2308
|
backgroundImage,
|
|
2309
|
-
|
|
2310
|
-
onMinimize
|
|
2309
|
+
api
|
|
2311
2310
|
}) {
|
|
2312
2311
|
const [mockUser] = React23.useState(DEFAULT_MOCK_USER);
|
|
2313
2312
|
const [mockToken] = React23.useState(DEFAULT_TOKEN);
|
|
@@ -2318,7 +2317,9 @@ function PluginPlayground({
|
|
|
2318
2317
|
React23.useEffect(() => {
|
|
2319
2318
|
if (typeof window === "undefined") return;
|
|
2320
2319
|
const storedTheme = window.localStorage.getItem("plugin-playground-theme");
|
|
2321
|
-
const prefersDark = window.matchMedia(
|
|
2320
|
+
const prefersDark = window.matchMedia(
|
|
2321
|
+
"(prefers-color-scheme: dark)"
|
|
2322
|
+
).matches;
|
|
2322
2323
|
const shouldUseDark = storedTheme ? storedTheme === "dark" : prefersDark;
|
|
2323
2324
|
setIsNightMode(shouldUseDark);
|
|
2324
2325
|
}, []);
|
|
@@ -2339,22 +2340,19 @@ function PluginPlayground({
|
|
|
2339
2340
|
setIsActive(false);
|
|
2340
2341
|
setIsMinimized(true);
|
|
2341
2342
|
setIsClosed(false);
|
|
2342
|
-
|
|
2343
|
-
}, [onMinimize]);
|
|
2343
|
+
}, []);
|
|
2344
2344
|
const closeWindow = React23.useCallback(() => {
|
|
2345
2345
|
setIsActive(false);
|
|
2346
2346
|
setIsClosed(true);
|
|
2347
2347
|
setIsMinimized(false);
|
|
2348
|
-
|
|
2349
|
-
}, [onClose]);
|
|
2348
|
+
}, []);
|
|
2350
2349
|
const restoreWindow = React23.useCallback(() => {
|
|
2351
2350
|
setIsActive(true);
|
|
2352
2351
|
setIsClosed(false);
|
|
2353
2352
|
setIsMinimized(false);
|
|
2354
|
-
|
|
2355
|
-
}, [onMinimize]);
|
|
2353
|
+
}, []);
|
|
2356
2354
|
const mockApi = React23.useMemo(
|
|
2357
|
-
() =>
|
|
2355
|
+
() => api ? api : {
|
|
2358
2356
|
showToast: (message, type) => {
|
|
2359
2357
|
console.info(`[playground:${type}] ${message}`);
|
|
2360
2358
|
},
|
|
@@ -2368,7 +2366,7 @@ function PluginPlayground({
|
|
|
2368
2366
|
return mockToken;
|
|
2369
2367
|
},
|
|
2370
2368
|
isDarkTheme: true
|
|
2371
|
-
}
|
|
2369
|
+
},
|
|
2372
2370
|
[mockToken, mockUser]
|
|
2373
2371
|
);
|
|
2374
2372
|
const appProps = React23.useMemo(
|