@tearleads/windowing 0.2.40 → 0.2.42
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 +4 -3
- package/display/DisplayProperties.css +94 -0
- package/display/DisplayProperties.d.ts +6 -4
- package/display/DisplayProperties.js +23 -5
- package/display/DisplayProperties.js.map +1 -1
- package/docs/appearance.md +44 -4
- package/docs/launcher.md +9 -0
- package/docs/screensavers.md +3 -1
- package/docs/windows.md +7 -1
- package/index.d.ts +4 -1
- package/index.js +8 -5
- package/index.js.map +1 -1
- package/launcher/LauncherNavigationProvider.d.ts +9 -3
- package/launcher/LauncherNavigationProvider.js +10 -8
- package/launcher/LauncherNavigationProvider.js.map +1 -1
- package/launcher/useWindowedEntryWindows.d.ts +17 -0
- package/launcher/useWindowedEntryWindows.js +76 -0
- package/launcher/useWindowedEntryWindows.js.map +1 -0
- package/menu/useLongPress.d.ts +15 -2
- package/menu/useLongPress.js +43 -14
- package/menu/useLongPress.js.map +1 -1
- package/package.json +1 -1
- package/routed/RoutedPaneNav.css +2 -1
- package/screensaver/ScreensaverProvider.d.ts +2 -2
- package/screensaver/ScreensaverProvider.js +4 -2
- package/screensaver/ScreensaverProvider.js.map +1 -1
- package/tray/SystemTray.css +20 -0
- package/tray/SystemTray.d.ts +23 -0
- package/tray/SystemTray.js +54 -0
- package/tray/SystemTray.js.map +1 -0
- package/tray/SystemTrayProvider.d.ts +26 -0
- package/tray/SystemTrayProvider.js +62 -0
- package/tray/SystemTrayProvider.js.map +1 -0
- package/tray/systemTrayDefinition.d.ts +19 -0
- package/tray/systemTrayDefinition.js +2 -0
- package/tray/systemTrayDefinition.js.map +1 -0
- package/launcher/useDefaultWindow.d.ts +0 -15
- package/launcher/useDefaultWindow.js +0 -28
- package/launcher/useDefaultWindow.js.map +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
2
|
-
import { isLauncherAppId } from "./launcherDefinition.js";
|
|
3
|
-
/**
|
|
4
|
-
* Opens the host's default windows, in order so the last is in front, once
|
|
5
|
-
* per entry into an empty windowed desktop.
|
|
6
|
-
*/
|
|
7
|
-
export function useDefaultWindow({ definition, enabled, mode, openMiniApp, windowCount, }) {
|
|
8
|
-
const handledWindowedEntry = useRef(false);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
if (mode !== "windowed") {
|
|
11
|
-
handledWindowedEntry.current = false;
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (!enabled || handledWindowedEntry.current)
|
|
15
|
-
return;
|
|
16
|
-
// Record the entry before opening, including across StrictMode effects.
|
|
17
|
-
handledWindowedEntry.current = true;
|
|
18
|
-
if (windowCount > 0)
|
|
19
|
-
return;
|
|
20
|
-
// Each app once: the launcher's open requests within this pass cannot see
|
|
21
|
-
// the windows the earlier ones created.
|
|
22
|
-
for (const appId of new Set(definition.defaultWindowAppIds)) {
|
|
23
|
-
if (isLauncherAppId(definition, appId))
|
|
24
|
-
openMiniApp({ appId });
|
|
25
|
-
}
|
|
26
|
-
}, [definition, enabled, mode, openMiniApp, windowCount]);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=useDefaultWindow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDefaultWindow.js","sourceRoot":"","sources":["../../../home/runner/work/tearleads/tearleads/packages/windowing/src/launcher/useDefaultWindow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,eAAe,EAA2B,MAAM,sBAAsB,CAAC;AAGhF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,UAAU,EACV,OAAO,EACP,IAAI,EACJ,WAAW,EACX,WAAW,GAOZ;IACC,MAAM,oBAAoB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE3C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;YACxB,oBAAoB,CAAC,OAAO,GAAG,KAAK,CAAC;YACrC,OAAO;QACT,CAAC;QACD,IAAI,CAAC,OAAO,IAAI,oBAAoB,CAAC,OAAO;YAAE,OAAO;QACrD,wEAAwE;QACxE,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAC;QACpC,IAAI,WAAW,GAAG,CAAC;YAAE,OAAO;QAC5B,0EAA0E;QAC1E,wCAAwC;QACxC,KAAK,MAAM,KAAK,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAC5D,IAAI,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC;gBAAE,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAC5D,CAAC","sourcesContent":["import { useEffect, useRef } from \"react\";\nimport { isLauncherAppId, type LauncherDefinition } from \"./launcherDefinition\";\nimport type { NavigationMode } from \"./navigationMode\";\n\n/**\n * Opens the host's default windows, in order so the last is in front, once\n * per entry into an empty windowed desktop.\n */\nexport function useDefaultWindow({\n definition,\n enabled,\n mode,\n openMiniApp,\n windowCount,\n}: {\n definition: LauncherDefinition;\n enabled: boolean;\n mode: NavigationMode;\n openMiniApp: (request: { appId: string }) => string | null;\n windowCount: number;\n}) {\n const handledWindowedEntry = useRef(false);\n\n useEffect(() => {\n if (mode !== \"windowed\") {\n handledWindowedEntry.current = false;\n return;\n }\n if (!enabled || handledWindowedEntry.current) return;\n // Record the entry before opening, including across StrictMode effects.\n handledWindowedEntry.current = true;\n if (windowCount > 0) return;\n // Each app once: the launcher's open requests within this pass cannot see\n // the windows the earlier ones created.\n for (const appId of new Set(definition.defaultWindowAppIds)) {\n if (isLauncherAppId(definition, appId)) openMiniApp({ appId });\n }\n }, [definition, enabled, mode, openMiniApp, windowCount]);\n}\n"]}
|