@photon-os/react 1.0.0-alpha.4 → 1.0.0-alpha.6
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/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +56 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,6 +6,7 @@ type AppDefinition = {
|
|
|
6
6
|
name: string;
|
|
7
7
|
author: string;
|
|
8
8
|
url: string;
|
|
9
|
+
icon?: string;
|
|
9
10
|
};
|
|
10
11
|
type RunningAppInstance = {
|
|
11
12
|
definition: AppDefinition;
|
|
@@ -21,6 +22,18 @@ declare function useInstalledApps(): {
|
|
|
21
22
|
error: Error | null;
|
|
22
23
|
};
|
|
23
24
|
|
|
25
|
+
declare function useApplyScale(): {
|
|
26
|
+
scale: number | null;
|
|
27
|
+
loading: boolean;
|
|
28
|
+
error: Error | null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare function useScale(): {
|
|
32
|
+
scale: number | null;
|
|
33
|
+
loading: boolean;
|
|
34
|
+
error: Error | null;
|
|
35
|
+
};
|
|
36
|
+
|
|
24
37
|
declare const VERSION = "1.0.0";
|
|
25
38
|
|
|
26
|
-
export { type AppBundleId, type AppDefinition, type RunningAppInstance, VERSION, useInstalledApps };
|
|
39
|
+
export { type AppBundleId, type AppDefinition, type RunningAppInstance, VERSION, useApplyScale, useInstalledApps, useScale };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ type AppDefinition = {
|
|
|
6
6
|
name: string;
|
|
7
7
|
author: string;
|
|
8
8
|
url: string;
|
|
9
|
+
icon?: string;
|
|
9
10
|
};
|
|
10
11
|
type RunningAppInstance = {
|
|
11
12
|
definition: AppDefinition;
|
|
@@ -21,6 +22,18 @@ declare function useInstalledApps(): {
|
|
|
21
22
|
error: Error | null;
|
|
22
23
|
};
|
|
23
24
|
|
|
25
|
+
declare function useApplyScale(): {
|
|
26
|
+
scale: number | null;
|
|
27
|
+
loading: boolean;
|
|
28
|
+
error: Error | null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare function useScale(): {
|
|
32
|
+
scale: number | null;
|
|
33
|
+
loading: boolean;
|
|
34
|
+
error: Error | null;
|
|
35
|
+
};
|
|
36
|
+
|
|
24
37
|
declare const VERSION = "1.0.0";
|
|
25
38
|
|
|
26
|
-
export { type AppBundleId, type AppDefinition, type RunningAppInstance, VERSION, useInstalledApps };
|
|
39
|
+
export { type AppBundleId, type AppDefinition, type RunningAppInstance, VERSION, useApplyScale, useInstalledApps, useScale };
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
VERSION: () => VERSION,
|
|
24
|
-
|
|
24
|
+
useApplyScale: () => useApplyScale,
|
|
25
|
+
useInstalledApps: () => useInstalledApps,
|
|
26
|
+
useScale: () => useScale
|
|
25
27
|
});
|
|
26
28
|
module.exports = __toCommonJS(index_exports);
|
|
27
29
|
|
|
@@ -56,11 +58,63 @@ function useInstalledApps() {
|
|
|
56
58
|
return { installedApps, refresh, loading, refreshing, error };
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
// src/hooks/useApplyScale.ts
|
|
62
|
+
var import_sdk2 = require("@photon-os/sdk");
|
|
63
|
+
var import_react2 = require("react");
|
|
64
|
+
function useApplyScale() {
|
|
65
|
+
const [scale, setScale] = (0, import_react2.useState)(null);
|
|
66
|
+
const [loading, setLoading] = (0, import_react2.useState)(true);
|
|
67
|
+
const [error, setError] = (0, import_react2.useState)(null);
|
|
68
|
+
(0, import_react2.useEffect)(() => {
|
|
69
|
+
const os = new import_sdk2.OS();
|
|
70
|
+
const applyScale = async () => {
|
|
71
|
+
try {
|
|
72
|
+
setError(null);
|
|
73
|
+
const result = await os.system.applyScale();
|
|
74
|
+
setScale(result);
|
|
75
|
+
} catch (err) {
|
|
76
|
+
setError(err);
|
|
77
|
+
} finally {
|
|
78
|
+
setLoading(false);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
applyScale();
|
|
82
|
+
}, []);
|
|
83
|
+
return { scale, loading, error };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// src/hooks/useScale.ts
|
|
87
|
+
var import_sdk3 = require("@photon-os/sdk");
|
|
88
|
+
var import_react3 = require("react");
|
|
89
|
+
function useScale() {
|
|
90
|
+
const [scale, setScale] = (0, import_react3.useState)(null);
|
|
91
|
+
const [loading, setLoading] = (0, import_react3.useState)(true);
|
|
92
|
+
const [error, setError] = (0, import_react3.useState)(null);
|
|
93
|
+
(0, import_react3.useEffect)(() => {
|
|
94
|
+
const os = new import_sdk3.OS();
|
|
95
|
+
const fetchScale = async () => {
|
|
96
|
+
try {
|
|
97
|
+
setError(null);
|
|
98
|
+
const result = await os.system.getScale();
|
|
99
|
+
setScale(result);
|
|
100
|
+
} catch (err) {
|
|
101
|
+
setError(err);
|
|
102
|
+
} finally {
|
|
103
|
+
setLoading(false);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
fetchScale();
|
|
107
|
+
}, []);
|
|
108
|
+
return { scale, loading, error };
|
|
109
|
+
}
|
|
110
|
+
|
|
59
111
|
// src/index.tsx
|
|
60
112
|
var VERSION = "1.0.0";
|
|
61
113
|
// Annotate the CommonJS export names for ESM import in node:
|
|
62
114
|
0 && (module.exports = {
|
|
63
115
|
VERSION,
|
|
64
|
-
|
|
116
|
+
useApplyScale,
|
|
117
|
+
useInstalledApps,
|
|
118
|
+
useScale
|
|
65
119
|
});
|
|
66
120
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.tsx","../src/hooks/useInstalledApps.ts"],"sourcesContent":["export const VERSION = \"1.0.0\";\n\nexport * from \"./types/app\";\nexport * from \"./hooks/useInstalledApps\";\n","import { AppDefinition, OS } from \"@photon-os/sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport function useInstalledApps() {\n const [installedApps, setInstalledApps] = useState<AppDefinition[]>([]);\n const [loading, setLoading] = useState(true);\n const [refreshing, setRefreshing] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n const os = new OS();\n\n const refresh = async () => {\n try {\n setError(null);\n setRefreshing(true);\n setInstalledApps(await os.apps.getInstalledApps());\n } catch (err) {\n setError(err as Error);\n } finally {\n setRefreshing(false);\n setLoading(false);\n }\n };\n\n useEffect(() => {\n const interval = setInterval(() => {\n refresh();\n }, 5000);\n\n refresh();\n\n return () => clearInterval(interval);\n }, []);\n\n return { installedApps, refresh, loading, refreshing, error };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBAAkC;AAClC,mBAAoC;AAE7B,SAAS,mBAAmB;AACjC,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAA0B,CAAC,CAAC;AACtE,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,IAAI;AAC3C,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAS,IAAI;AACjD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAuB,IAAI;AACrD,QAAM,KAAK,IAAI,cAAG;AAElB,QAAM,UAAU,YAAY;AAC1B,QAAI;AACF,eAAS,IAAI;AACb,oBAAc,IAAI;AAClB,uBAAiB,MAAM,GAAG,KAAK,iBAAiB,CAAC;AAAA,IACnD,SAAS,KAAK;AACZ,eAAS,GAAY;AAAA,IACvB,UAAE;AACA,oBAAc,KAAK;AACnB,iBAAW,KAAK;AAAA,IAClB;AAAA,EACF;AAEA,8BAAU,MAAM;AACd,UAAM,WAAW,YAAY,MAAM;AACjC,cAAQ;AAAA,IACV,GAAG,GAAI;AAEP,YAAQ;AAER,WAAO,MAAM,cAAc,QAAQ;AAAA,EACrC,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,eAAe,SAAS,SAAS,YAAY,MAAM;AAC9D;;;
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx","../src/hooks/useInstalledApps.ts","../src/hooks/useApplyScale.ts","../src/hooks/useScale.ts"],"sourcesContent":["export const VERSION = \"1.0.0\";\n\nexport * from \"./types/app\";\nexport * from \"./hooks/useInstalledApps\";\nexport * from \"./hooks/useApplyScale\";\nexport * from \"./hooks/useScale\";\n","import { AppDefinition, OS } from \"@photon-os/sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport function useInstalledApps() {\n const [installedApps, setInstalledApps] = useState<AppDefinition[]>([]);\n const [loading, setLoading] = useState(true);\n const [refreshing, setRefreshing] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n const os = new OS();\n\n const refresh = async () => {\n try {\n setError(null);\n setRefreshing(true);\n setInstalledApps(await os.apps.getInstalledApps());\n } catch (err) {\n setError(err as Error);\n } finally {\n setRefreshing(false);\n setLoading(false);\n }\n };\n\n useEffect(() => {\n const interval = setInterval(() => {\n refresh();\n }, 5000);\n\n refresh();\n\n return () => clearInterval(interval);\n }, []);\n\n return { installedApps, refresh, loading, refreshing, error };\n}\n","import { OS } from \"@photon-os/sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport function useApplyScale() {\n const [scale, setScale] = useState<number | null>(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n const os = new OS();\n\n const applyScale = async () => {\n try {\n setError(null);\n const result = await os.system.applyScale();\n setScale(result);\n } catch (err) {\n setError(err as Error);\n } finally {\n setLoading(false);\n }\n };\n\n applyScale();\n }, []);\n\n return { scale, loading, error };\n}\n","import { OS } from \"@photon-os/sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport function useScale() {\n const [scale, setScale] = useState<number | null>(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n const os = new OS();\n\n const fetchScale = async () => {\n try {\n setError(null);\n const result = await os.system.getScale();\n setScale(result);\n } catch (err) {\n setError(err as Error);\n } finally {\n setLoading(false);\n }\n };\n\n fetchScale();\n }, []);\n\n return { scale, loading, error };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBAAkC;AAClC,mBAAoC;AAE7B,SAAS,mBAAmB;AACjC,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAA0B,CAAC,CAAC;AACtE,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,IAAI;AAC3C,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAS,IAAI;AACjD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAuB,IAAI;AACrD,QAAM,KAAK,IAAI,cAAG;AAElB,QAAM,UAAU,YAAY;AAC1B,QAAI;AACF,eAAS,IAAI;AACb,oBAAc,IAAI;AAClB,uBAAiB,MAAM,GAAG,KAAK,iBAAiB,CAAC;AAAA,IACnD,SAAS,KAAK;AACZ,eAAS,GAAY;AAAA,IACvB,UAAE;AACA,oBAAc,KAAK;AACnB,iBAAW,KAAK;AAAA,IAClB;AAAA,EACF;AAEA,8BAAU,MAAM;AACd,UAAM,WAAW,YAAY,MAAM;AACjC,cAAQ;AAAA,IACV,GAAG,GAAI;AAEP,YAAQ;AAER,WAAO,MAAM,cAAc,QAAQ;AAAA,EACrC,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,eAAe,SAAS,SAAS,YAAY,MAAM;AAC9D;;;AClCA,IAAAA,cAAmB;AACnB,IAAAC,gBAAoC;AAE7B,SAAS,gBAAgB;AAC9B,QAAM,CAAC,OAAO,QAAQ,QAAI,wBAAwB,IAAI;AACtD,QAAM,CAAC,SAAS,UAAU,QAAI,wBAAS,IAAI;AAC3C,QAAM,CAAC,OAAO,QAAQ,QAAI,wBAAuB,IAAI;AAErD,+BAAU,MAAM;AACd,UAAM,KAAK,IAAI,eAAG;AAElB,UAAM,aAAa,YAAY;AAC7B,UAAI;AACF,iBAAS,IAAI;AACb,cAAM,SAAS,MAAM,GAAG,OAAO,WAAW;AAC1C,iBAAS,MAAM;AAAA,MACjB,SAAS,KAAK;AACZ,iBAAS,GAAY;AAAA,MACvB,UAAE;AACA,mBAAW,KAAK;AAAA,MAClB;AAAA,IACF;AAEA,eAAW;AAAA,EACb,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,OAAO,SAAS,MAAM;AACjC;;;AC3BA,IAAAC,cAAmB;AACnB,IAAAC,gBAAoC;AAE7B,SAAS,WAAW;AACzB,QAAM,CAAC,OAAO,QAAQ,QAAI,wBAAwB,IAAI;AACtD,QAAM,CAAC,SAAS,UAAU,QAAI,wBAAS,IAAI;AAC3C,QAAM,CAAC,OAAO,QAAQ,QAAI,wBAAuB,IAAI;AAErD,+BAAU,MAAM;AACd,UAAM,KAAK,IAAI,eAAG;AAElB,UAAM,aAAa,YAAY;AAC7B,UAAI;AACF,iBAAS,IAAI;AACb,cAAM,SAAS,MAAM,GAAG,OAAO,SAAS;AACxC,iBAAS,MAAM;AAAA,MACjB,SAAS,KAAK;AACZ,iBAAS,GAAY;AAAA,MACvB,UAAE;AACA,mBAAW,KAAK;AAAA,MAClB;AAAA,IACF;AAEA,eAAW;AAAA,EACb,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,OAAO,SAAS,MAAM;AACjC;;;AH3BO,IAAM,UAAU;","names":["import_sdk","import_react","import_sdk","import_react"]}
|
package/dist/index.mjs
CHANGED
|
@@ -29,10 +29,62 @@ function useInstalledApps() {
|
|
|
29
29
|
return { installedApps, refresh, loading, refreshing, error };
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
// src/hooks/useApplyScale.ts
|
|
33
|
+
import { OS as OS2 } from "@photon-os/sdk";
|
|
34
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
35
|
+
function useApplyScale() {
|
|
36
|
+
const [scale, setScale] = useState2(null);
|
|
37
|
+
const [loading, setLoading] = useState2(true);
|
|
38
|
+
const [error, setError] = useState2(null);
|
|
39
|
+
useEffect2(() => {
|
|
40
|
+
const os = new OS2();
|
|
41
|
+
const applyScale = async () => {
|
|
42
|
+
try {
|
|
43
|
+
setError(null);
|
|
44
|
+
const result = await os.system.applyScale();
|
|
45
|
+
setScale(result);
|
|
46
|
+
} catch (err) {
|
|
47
|
+
setError(err);
|
|
48
|
+
} finally {
|
|
49
|
+
setLoading(false);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
applyScale();
|
|
53
|
+
}, []);
|
|
54
|
+
return { scale, loading, error };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// src/hooks/useScale.ts
|
|
58
|
+
import { OS as OS3 } from "@photon-os/sdk";
|
|
59
|
+
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
60
|
+
function useScale() {
|
|
61
|
+
const [scale, setScale] = useState3(null);
|
|
62
|
+
const [loading, setLoading] = useState3(true);
|
|
63
|
+
const [error, setError] = useState3(null);
|
|
64
|
+
useEffect3(() => {
|
|
65
|
+
const os = new OS3();
|
|
66
|
+
const fetchScale = async () => {
|
|
67
|
+
try {
|
|
68
|
+
setError(null);
|
|
69
|
+
const result = await os.system.getScale();
|
|
70
|
+
setScale(result);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
setError(err);
|
|
73
|
+
} finally {
|
|
74
|
+
setLoading(false);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
fetchScale();
|
|
78
|
+
}, []);
|
|
79
|
+
return { scale, loading, error };
|
|
80
|
+
}
|
|
81
|
+
|
|
32
82
|
// src/index.tsx
|
|
33
83
|
var VERSION = "1.0.0";
|
|
34
84
|
export {
|
|
35
85
|
VERSION,
|
|
36
|
-
|
|
86
|
+
useApplyScale,
|
|
87
|
+
useInstalledApps,
|
|
88
|
+
useScale
|
|
37
89
|
};
|
|
38
90
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useInstalledApps.ts","../src/index.tsx"],"sourcesContent":["import { AppDefinition, OS } from \"@photon-os/sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport function useInstalledApps() {\n const [installedApps, setInstalledApps] = useState<AppDefinition[]>([]);\n const [loading, setLoading] = useState(true);\n const [refreshing, setRefreshing] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n const os = new OS();\n\n const refresh = async () => {\n try {\n setError(null);\n setRefreshing(true);\n setInstalledApps(await os.apps.getInstalledApps());\n } catch (err) {\n setError(err as Error);\n } finally {\n setRefreshing(false);\n setLoading(false);\n }\n };\n\n useEffect(() => {\n const interval = setInterval(() => {\n refresh();\n }, 5000);\n\n refresh();\n\n return () => clearInterval(interval);\n }, []);\n\n return { installedApps, refresh, loading, refreshing, error };\n}\n","export const VERSION = \"1.0.0\";\n\nexport * from \"./types/app\";\nexport * from \"./hooks/useInstalledApps\";\n"],"mappings":";AAAA,SAAwB,UAAU;AAClC,SAAS,WAAW,gBAAgB;AAE7B,SAAS,mBAAmB;AACjC,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAA0B,CAAC,CAAC;AACtE,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,IAAI;AAC3C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,IAAI;AACjD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAuB,IAAI;AACrD,QAAM,KAAK,IAAI,GAAG;AAElB,QAAM,UAAU,YAAY;AAC1B,QAAI;AACF,eAAS,IAAI;AACb,oBAAc,IAAI;AAClB,uBAAiB,MAAM,GAAG,KAAK,iBAAiB,CAAC;AAAA,IACnD,SAAS,KAAK;AACZ,eAAS,GAAY;AAAA,IACvB,UAAE;AACA,oBAAc,KAAK;AACnB,iBAAW,KAAK;AAAA,IAClB;AAAA,EACF;AAEA,YAAU,MAAM;AACd,UAAM,WAAW,YAAY,MAAM;AACjC,cAAQ;AAAA,IACV,GAAG,GAAI;AAEP,YAAQ;AAER,WAAO,MAAM,cAAc,QAAQ;AAAA,EACrC,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,eAAe,SAAS,SAAS,YAAY,MAAM;AAC9D;;;
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useInstalledApps.ts","../src/hooks/useApplyScale.ts","../src/hooks/useScale.ts","../src/index.tsx"],"sourcesContent":["import { AppDefinition, OS } from \"@photon-os/sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport function useInstalledApps() {\n const [installedApps, setInstalledApps] = useState<AppDefinition[]>([]);\n const [loading, setLoading] = useState(true);\n const [refreshing, setRefreshing] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n const os = new OS();\n\n const refresh = async () => {\n try {\n setError(null);\n setRefreshing(true);\n setInstalledApps(await os.apps.getInstalledApps());\n } catch (err) {\n setError(err as Error);\n } finally {\n setRefreshing(false);\n setLoading(false);\n }\n };\n\n useEffect(() => {\n const interval = setInterval(() => {\n refresh();\n }, 5000);\n\n refresh();\n\n return () => clearInterval(interval);\n }, []);\n\n return { installedApps, refresh, loading, refreshing, error };\n}\n","import { OS } from \"@photon-os/sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport function useApplyScale() {\n const [scale, setScale] = useState<number | null>(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n const os = new OS();\n\n const applyScale = async () => {\n try {\n setError(null);\n const result = await os.system.applyScale();\n setScale(result);\n } catch (err) {\n setError(err as Error);\n } finally {\n setLoading(false);\n }\n };\n\n applyScale();\n }, []);\n\n return { scale, loading, error };\n}\n","import { OS } from \"@photon-os/sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport function useScale() {\n const [scale, setScale] = useState<number | null>(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n const os = new OS();\n\n const fetchScale = async () => {\n try {\n setError(null);\n const result = await os.system.getScale();\n setScale(result);\n } catch (err) {\n setError(err as Error);\n } finally {\n setLoading(false);\n }\n };\n\n fetchScale();\n }, []);\n\n return { scale, loading, error };\n}\n","export const VERSION = \"1.0.0\";\n\nexport * from \"./types/app\";\nexport * from \"./hooks/useInstalledApps\";\nexport * from \"./hooks/useApplyScale\";\nexport * from \"./hooks/useScale\";\n"],"mappings":";AAAA,SAAwB,UAAU;AAClC,SAAS,WAAW,gBAAgB;AAE7B,SAAS,mBAAmB;AACjC,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAA0B,CAAC,CAAC;AACtE,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,IAAI;AAC3C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,IAAI;AACjD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAuB,IAAI;AACrD,QAAM,KAAK,IAAI,GAAG;AAElB,QAAM,UAAU,YAAY;AAC1B,QAAI;AACF,eAAS,IAAI;AACb,oBAAc,IAAI;AAClB,uBAAiB,MAAM,GAAG,KAAK,iBAAiB,CAAC;AAAA,IACnD,SAAS,KAAK;AACZ,eAAS,GAAY;AAAA,IACvB,UAAE;AACA,oBAAc,KAAK;AACnB,iBAAW,KAAK;AAAA,IAClB;AAAA,EACF;AAEA,YAAU,MAAM;AACd,UAAM,WAAW,YAAY,MAAM;AACjC,cAAQ;AAAA,IACV,GAAG,GAAI;AAEP,YAAQ;AAER,WAAO,MAAM,cAAc,QAAQ;AAAA,EACrC,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,eAAe,SAAS,SAAS,YAAY,MAAM;AAC9D;;;AClCA,SAAS,MAAAA,WAAU;AACnB,SAAS,aAAAC,YAAW,YAAAC,iBAAgB;AAE7B,SAAS,gBAAgB;AAC9B,QAAM,CAAC,OAAO,QAAQ,IAAIA,UAAwB,IAAI;AACtD,QAAM,CAAC,SAAS,UAAU,IAAIA,UAAS,IAAI;AAC3C,QAAM,CAAC,OAAO,QAAQ,IAAIA,UAAuB,IAAI;AAErD,EAAAD,WAAU,MAAM;AACd,UAAM,KAAK,IAAID,IAAG;AAElB,UAAM,aAAa,YAAY;AAC7B,UAAI;AACF,iBAAS,IAAI;AACb,cAAM,SAAS,MAAM,GAAG,OAAO,WAAW;AAC1C,iBAAS,MAAM;AAAA,MACjB,SAAS,KAAK;AACZ,iBAAS,GAAY;AAAA,MACvB,UAAE;AACA,mBAAW,KAAK;AAAA,MAClB;AAAA,IACF;AAEA,eAAW;AAAA,EACb,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,OAAO,SAAS,MAAM;AACjC;;;AC3BA,SAAS,MAAAG,WAAU;AACnB,SAAS,aAAAC,YAAW,YAAAC,iBAAgB;AAE7B,SAAS,WAAW;AACzB,QAAM,CAAC,OAAO,QAAQ,IAAIA,UAAwB,IAAI;AACtD,QAAM,CAAC,SAAS,UAAU,IAAIA,UAAS,IAAI;AAC3C,QAAM,CAAC,OAAO,QAAQ,IAAIA,UAAuB,IAAI;AAErD,EAAAD,WAAU,MAAM;AACd,UAAM,KAAK,IAAID,IAAG;AAElB,UAAM,aAAa,YAAY;AAC7B,UAAI;AACF,iBAAS,IAAI;AACb,cAAM,SAAS,MAAM,GAAG,OAAO,SAAS;AACxC,iBAAS,MAAM;AAAA,MACjB,SAAS,KAAK;AACZ,iBAAS,GAAY;AAAA,MACvB,UAAE;AACA,mBAAW,KAAK;AAAA,MAClB;AAAA,IACF;AAEA,eAAW;AAAA,EACb,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,OAAO,SAAS,MAAM;AACjC;;;AC3BO,IAAM,UAAU;","names":["OS","useEffect","useState","OS","useEffect","useState"]}
|