@camstack/addon-import-alexa 0.2.153 → 0.2.155
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/CHANGELOG.md +2 -4
- package/README.md +31 -9
- package/dist/{SceneMonitorEditor-3Nx49OE2.mjs → SceneMonitorEditor-BL8xJKp6.mjs} +122 -123
- package/dist/_stub.js +9 -9
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_import_alexa_page-Yxzd8sJD.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_import_alexa_page-DIPd9Gv5.mjs} +4 -4
- package/dist/addon-import-alexa.css +1 -1
- package/dist/addon.js +3 -3
- package/dist/addon.mjs +3 -3
- package/dist/{hostInit-U2MikdrL.mjs → hostInit-M4qqEmdk.mjs} +3 -3
- package/dist/remoteEntry.js +1 -1
- package/dist/{scene-monitor-copy-BLy8yxxd.mjs → scene-monitor-copy-ciy3zaiU.mjs} +63 -50
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-OqMWqeF3.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-FpscgjXK.mjs} +1 -1
- package/package.json +3 -3
package/dist/addon.js
CHANGED
|
@@ -44624,7 +44624,7 @@ var NetworkAccessStatusSchema = object({
|
|
|
44624
44624
|
});
|
|
44625
44625
|
/**
|
|
44626
44626
|
* Optional, richer endpoint shape returned by providers that expose
|
|
44627
|
-
* MORE than one ingress concurrently (Tailscale
|
|
44627
|
+
* MORE than one ingress concurrently (Tailscale Funnel with mixed
|
|
44628
44628
|
* serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
|
|
44629
44629
|
* the originating provider config (mode + sourcePort) so the
|
|
44630
44630
|
* orchestrator UI can label rows distinctly. Providers that expose only
|
|
@@ -132921,7 +132921,7 @@ function buildAlexaBrokerProvider(deps) {
|
|
|
132921
132921
|
addonId: ownerAddonId,
|
|
132922
132922
|
kinds: [{
|
|
132923
132923
|
kind: ALEXA_KIND,
|
|
132924
|
-
label: "Alexa
|
|
132924
|
+
label: "Alexa",
|
|
132925
132925
|
signIn: { basePath: "/addon/import-alexa/login" }
|
|
132926
132926
|
}]
|
|
132927
132927
|
}],
|
|
@@ -135426,7 +135426,7 @@ var ALEXA_DEVICE_TYPES = [
|
|
|
135426
135426
|
*/
|
|
135427
135427
|
var AlexaImportAddon = class extends BaseDeviceProvider {
|
|
135428
135428
|
addonId = "import-alexa";
|
|
135429
|
-
providerName = "Alexa
|
|
135429
|
+
providerName = "Alexa";
|
|
135430
135430
|
deviceClasses = Object.fromEntries(ALEXA_DEVICE_TYPES.map((t) => [t, AlexaDevice]));
|
|
135431
135431
|
registry = null;
|
|
135432
135432
|
proxyLogin = null;
|
package/dist/addon.mjs
CHANGED
|
@@ -44623,7 +44623,7 @@ var NetworkAccessStatusSchema = object({
|
|
|
44623
44623
|
});
|
|
44624
44624
|
/**
|
|
44625
44625
|
* Optional, richer endpoint shape returned by providers that expose
|
|
44626
|
-
* MORE than one ingress concurrently (Tailscale
|
|
44626
|
+
* MORE than one ingress concurrently (Tailscale Funnel with mixed
|
|
44627
44627
|
* serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
|
|
44628
44628
|
* the originating provider config (mode + sourcePort) so the
|
|
44629
44629
|
* orchestrator UI can label rows distinctly. Providers that expose only
|
|
@@ -132920,7 +132920,7 @@ function buildAlexaBrokerProvider(deps) {
|
|
|
132920
132920
|
addonId: ownerAddonId,
|
|
132921
132921
|
kinds: [{
|
|
132922
132922
|
kind: ALEXA_KIND,
|
|
132923
|
-
label: "Alexa
|
|
132923
|
+
label: "Alexa",
|
|
132924
132924
|
signIn: { basePath: "/addon/import-alexa/login" }
|
|
132925
132925
|
}]
|
|
132926
132926
|
}],
|
|
@@ -135425,7 +135425,7 @@ var ALEXA_DEVICE_TYPES = [
|
|
|
135425
135425
|
*/
|
|
135426
135426
|
var AlexaImportAddon = class extends BaseDeviceProvider {
|
|
135427
135427
|
addonId = "import-alexa";
|
|
135428
|
-
providerName = "Alexa
|
|
135428
|
+
providerName = "Alexa";
|
|
135429
135429
|
deviceClasses = Object.fromEntries(ALEXA_DEVICE_TYPES.map((t) => [t, AlexaDevice]));
|
|
135430
135430
|
registry = null;
|
|
135431
135431
|
proxyLogin = null;
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.428",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -45,7 +45,7 @@ async function r() {
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@camstack/sdk": {
|
|
48
|
-
version: "1.2.
|
|
48
|
+
version: "1.2.154",
|
|
49
49
|
scope: "default",
|
|
50
50
|
shareConfig: {
|
|
51
51
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.337",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
package/dist/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-
|
|
1
|
+
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-FpscgjXK.mjs";
|
|
2
2
|
export { t as get, e as init };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { S as e, g as t, l as n,
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { S as e, g as t, l as n, u as r, v as i } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react__loadShare__.js-DwXXYAlk.mjs";
|
|
2
|
+
import "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-CUiVYNMY.mjs";
|
|
3
|
+
import { n as a } from "./ui-text-B5YO4hoJ.mjs";
|
|
4
|
+
import { h as o, m as s } from "./responsive-CLpz8rKp.mjs";
|
|
5
|
+
var c = o("camera", [["path", {
|
|
5
6
|
d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
|
|
6
7
|
key: "18u6gg"
|
|
7
8
|
}], ["circle", {
|
|
@@ -9,7 +10,7 @@ var o = a("camera", [["path", {
|
|
|
9
10
|
cy: "13",
|
|
10
11
|
r: "3",
|
|
11
12
|
key: "1vg3eu"
|
|
12
|
-
}]]),
|
|
13
|
+
}]]), l = o("image-off", [
|
|
13
14
|
["line", {
|
|
14
15
|
x1: "2",
|
|
15
16
|
x2: "22",
|
|
@@ -43,7 +44,7 @@ var o = a("camera", [["path", {
|
|
|
43
44
|
d: "M21 15V5a2 2 0 0 0-2-2H9",
|
|
44
45
|
key: "43el77"
|
|
45
46
|
}]
|
|
46
|
-
]),
|
|
47
|
+
]), u = o("rotate-ccw", [["path", {
|
|
47
48
|
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
48
49
|
key: "1357e3"
|
|
49
50
|
}], ["path", {
|
|
@@ -51,53 +52,65 @@ var o = a("camera", [["path", {
|
|
|
51
52
|
key: "1xhq8a"
|
|
52
53
|
}]]);
|
|
53
54
|
//#endregion
|
|
54
|
-
//#region ../ui-library/src/
|
|
55
|
+
//#region ../ui-library/src/composites/confirm-dialog.tsx
|
|
55
56
|
e();
|
|
56
|
-
var
|
|
57
|
-
function f(
|
|
57
|
+
var d = s("camstack:confirm-dialog", null);
|
|
58
|
+
function f() {
|
|
59
|
+
let e = r(d);
|
|
60
|
+
if (!e) throw Error("useConfirm must be used within ConfirmDialogProvider");
|
|
61
|
+
return e;
|
|
62
|
+
}
|
|
63
|
+
function p() {
|
|
64
|
+
return f().confirm;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region ../ui-library/src/lib/hub-mount.ts
|
|
68
|
+
var m = "camstack-mount", h = /^\/(?:[A-Za-z0-9_\-.]+\/)*$/, g = null;
|
|
69
|
+
function _(e) {
|
|
58
70
|
if (e == null || e === "") return null;
|
|
59
71
|
let t = e.endsWith("/") ? e : `${e}/`;
|
|
60
|
-
return !
|
|
72
|
+
return !h.test(t) || t.includes("/../") || t.includes("/./") ? null : t;
|
|
61
73
|
}
|
|
62
|
-
function
|
|
74
|
+
function v() {
|
|
63
75
|
if (typeof document > "u") return "/";
|
|
64
|
-
let e =
|
|
76
|
+
let e = _(document.querySelector(`meta[name="${m}"]`)?.getAttribute("content"));
|
|
65
77
|
if (e !== null) return e;
|
|
66
78
|
if (document.querySelector("base[href]") !== null) try {
|
|
67
79
|
let e = new URL(document.baseURI);
|
|
68
80
|
if (e.origin === window.location.origin) {
|
|
69
|
-
let t =
|
|
81
|
+
let t = _(e.pathname);
|
|
70
82
|
if (t !== null) return t;
|
|
71
83
|
}
|
|
72
84
|
} catch {}
|
|
73
85
|
return "/";
|
|
74
86
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
87
|
+
function y() {
|
|
88
|
+
return g === null && (g = v()), g;
|
|
77
89
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
90
|
+
function b() {
|
|
91
|
+
return y().replace(/\/$/, "");
|
|
80
92
|
}
|
|
81
|
-
function
|
|
93
|
+
function x(e) {
|
|
82
94
|
return /^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("//");
|
|
83
95
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
86
|
-
let t =
|
|
87
|
-
return t !== "/" && (e ===
|
|
96
|
+
function S(e) {
|
|
97
|
+
if (x(e)) return e;
|
|
98
|
+
let t = y(), n = e.replace(/^\/+/, "");
|
|
99
|
+
return t !== "/" && (e === b() || e.startsWith(t)) ? e : `${t}${n}`;
|
|
88
100
|
}
|
|
89
101
|
//#endregion
|
|
90
102
|
//#region ../ui-library/src/hooks/use-device-snapshot.ts
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
103
|
+
e();
|
|
104
|
+
var C = "/addon/snapshot/media";
|
|
105
|
+
function w(e, r = {}) {
|
|
106
|
+
let { width: a, baseUrl: o } = r, [s, c] = i(0);
|
|
94
107
|
return {
|
|
95
108
|
src: t(() => {
|
|
96
109
|
if (e === null || e <= 0) return null;
|
|
97
|
-
let t = o === void 0 ?
|
|
110
|
+
let t = o === void 0 ? b() : o.replace(/\/+$/, ""), n = new URLSearchParams();
|
|
98
111
|
a !== void 0 && Number.isInteger(a) && a > 0 && n.set("w", String(a)), s > 0 && (n.set("force", "1"), n.set("r", String(s)));
|
|
99
112
|
let r = n.toString();
|
|
100
|
-
return `${t}${
|
|
113
|
+
return `${t}${C}/${String(e)}.jpg${r.length > 0 ? `?${r}` : ""}`;
|
|
101
114
|
}, [
|
|
102
115
|
e,
|
|
103
116
|
a,
|
|
@@ -112,7 +125,7 @@ function y(e, i = {}) {
|
|
|
112
125
|
}
|
|
113
126
|
//#endregion
|
|
114
127
|
//#region ../ui-library/src/composites/cap-settings/scene-monitor-copy.ts
|
|
115
|
-
var
|
|
128
|
+
var T = ["day", "ir"], E = {
|
|
116
129
|
day: {
|
|
117
130
|
labelKey: "uiLibrary.sceneMonitor.variant.day",
|
|
118
131
|
labelFallback: "Daylight"
|
|
@@ -134,17 +147,17 @@ var b = ["day", "ir"], x = {
|
|
|
134
147
|
labelFallback: "Dusk"
|
|
135
148
|
}
|
|
136
149
|
};
|
|
137
|
-
function
|
|
138
|
-
let n =
|
|
150
|
+
function D(e, t = a) {
|
|
151
|
+
let n = E[e];
|
|
139
152
|
return n === void 0 ? e : t(n.labelKey, n.labelFallback);
|
|
140
153
|
}
|
|
141
|
-
function
|
|
142
|
-
let n = new Set(e.coveredConditions), r =
|
|
143
|
-
for (let e of
|
|
144
|
-
let o =
|
|
154
|
+
function O(e, t = a) {
|
|
155
|
+
let n = new Set(e.coveredConditions), r = T.map((e) => `${D(e, t)} ${n.has(e) ? "✓" : "✗"}`), i = [...n].filter((e) => !T.some((t) => t === e));
|
|
156
|
+
for (let e of i) r.push(`${D(e, t)} ✓`);
|
|
157
|
+
let o = T.filter((e) => !n.has(e));
|
|
145
158
|
if (o.length === 0) return r.join(" · ");
|
|
146
159
|
if (n.size === 0) return t("uiLibrary.sceneMonitor.coverage.empty", "{{parts}} — nothing captured yet, so this scene is not watching.", { parts: r.join(" · ") });
|
|
147
|
-
let [s = "", c] = o.map((e) =>
|
|
160
|
+
let [s = "", c] = o.map((e) => D(e, t).toLowerCase()), l = c === void 0 ? s : t("uiLibrary.sceneMonitor.coverage.namesJoin", "{{first}} and {{second}}", {
|
|
148
161
|
first: s,
|
|
149
162
|
second: c
|
|
150
163
|
}), u = {
|
|
@@ -153,10 +166,10 @@ function C(e, t = i) {
|
|
|
153
166
|
};
|
|
154
167
|
return e.onUncoveredCondition === "judge-anyway" ? t("uiLibrary.sceneMonitor.coverage.judgeAnyway", "{{parts}} — {{names}} judged against the references you do have.", u) : t("uiLibrary.sceneMonitor.coverage.skip", "{{parts}} — optional; checks in {{names}} are skipped.", u);
|
|
155
168
|
}
|
|
156
|
-
function
|
|
157
|
-
return e.suspendedCondition === null ? null : t("uiLibrary.sceneMonitor.suspension", "Paused — nothing was captured in {{light}}, so checks are on hold until the light changes back. Capture {{light}} if you want it watched around the clock.", { light:
|
|
169
|
+
function k(e, t = a) {
|
|
170
|
+
return e.suspendedCondition === null ? null : t("uiLibrary.sceneMonitor.suspension", "Paused — nothing was captured in {{light}}, so checks are on hold until the light changes back. Capture {{light}} if you want it watched around the clock.", { light: D(e.suspendedCondition, t).toLowerCase() });
|
|
158
171
|
}
|
|
159
|
-
var
|
|
172
|
+
var A = {
|
|
160
173
|
"no-reference-for-condition": {
|
|
161
174
|
key: "uiLibrary.sceneMonitor.unavailable.no_reference_for_condition",
|
|
162
175
|
fallback: "can’t tell — nothing has been captured for this scene yet. Press “Capture daylight” to photograph what normal looks like."
|
|
@@ -178,19 +191,19 @@ var T = {
|
|
|
178
191
|
fallback: "can’t tell — this camera did not return a frame."
|
|
179
192
|
}
|
|
180
193
|
};
|
|
181
|
-
function
|
|
194
|
+
function j(e, t, n = a) {
|
|
182
195
|
if (e.states.length === 0) return n("uiLibrary.sceneMonitor.status.notArmed", "Not armed yet — capture the initial state to start watching.");
|
|
183
196
|
if (e.verdict === "unknown") {
|
|
184
197
|
if (e.unavailable === null) return n("uiLibrary.sceneMonitor.status.cantTellNow", "can’t tell right now.");
|
|
185
|
-
let t =
|
|
198
|
+
let t = A[e.unavailable];
|
|
186
199
|
return n(t.key, t.fallback);
|
|
187
200
|
}
|
|
188
|
-
let r = e.verdict === "diverged" ? e.divergedAt : e.armedAt,
|
|
189
|
-
if (e.latched) return e.verdict === "diverged" ? n("uiLibrary.sceneMonitor.status.changedLatched", "CHANGED{{held}} — press Reset when you have dealt with it.", { held:
|
|
190
|
-
let o =
|
|
191
|
-
return o === null ? e.verdict === "diverged" ? n("uiLibrary.sceneMonitor.status.changed", "CHANGED{{held}}", { held:
|
|
201
|
+
let r = e.verdict === "diverged" ? e.divergedAt : e.armedAt, i = r === null ? "" : ` ${n("uiLibrary.sceneMonitor.status.heldFor", "for {{duration}}", { duration: F(Math.max(0, t - r)) })}`;
|
|
202
|
+
if (e.latched) return e.verdict === "diverged" ? n("uiLibrary.sceneMonitor.status.changedLatched", "CHANGED{{held}} — press Reset when you have dealt with it.", { held: i }) : n("uiLibrary.sceneMonitor.status.backToNormal", "Back to normal, but still flagged as changed{{held}}. Press Reset to clear it.", { held: i });
|
|
203
|
+
let o = k(e, n);
|
|
204
|
+
return o === null ? e.verdict === "diverged" ? n("uiLibrary.sceneMonitor.status.changed", "CHANGED{{held}}", { held: i }) : n("uiLibrary.sceneMonitor.status.normal", "Normal{{held}}", { held: i }) : o;
|
|
192
205
|
}
|
|
193
|
-
function
|
|
206
|
+
function M(e, t = a) {
|
|
194
207
|
return e.states.length === 0 ? {
|
|
195
208
|
text: t("uiLibrary.sceneMonitor.badge.notArmed", "Not armed"),
|
|
196
209
|
tone: "unknown"
|
|
@@ -211,11 +224,11 @@ function D(e, t = i) {
|
|
|
211
224
|
tone: "unknown"
|
|
212
225
|
};
|
|
213
226
|
}
|
|
214
|
-
var
|
|
215
|
-
function
|
|
216
|
-
return e.width * e.height >
|
|
227
|
+
var N = .4;
|
|
228
|
+
function P(e) {
|
|
229
|
+
return e.width * e.height > N;
|
|
217
230
|
}
|
|
218
|
-
function
|
|
231
|
+
function F(e) {
|
|
219
232
|
let t = Math.floor(e / 1e3);
|
|
220
233
|
if (t < 60) return `${t}s`;
|
|
221
234
|
let n = Math.floor(t / 60);
|
|
@@ -224,4 +237,4 @@ function A(e) {
|
|
|
224
237
|
return r < 48 ? `${r}h` : `${Math.floor(r / 24)}d`;
|
|
225
238
|
}
|
|
226
239
|
//#endregion
|
|
227
|
-
export {
|
|
240
|
+
export { j as a, S as c, l as d, c as f, P as i, p as l, M as n, D as o, O as r, w as s, T as t, u };
|
|
@@ -2753,7 +2753,7 @@ async function rr(e) {
|
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
2755
2755
|
async function ir() {
|
|
2756
|
-
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_import_alexa_page-
|
|
2756
|
+
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_import_alexa_page-DIPd9Gv5.mjs")).catch((e) => {
|
|
2757
2757
|
throw tr = void 0, e;
|
|
2758
2758
|
}), tr;
|
|
2759
2759
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-import-alexa",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.155",
|
|
4
4
|
"description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"./package.json": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
"camstack": {
|
|
34
|
-
"displayName": "Alexa
|
|
34
|
+
"displayName": "Alexa",
|
|
35
35
|
"addons": [
|
|
36
36
|
{
|
|
37
37
|
"id": "import-alexa",
|
|
38
38
|
"category": "providers",
|
|
39
|
-
"name": "Alexa
|
|
39
|
+
"name": "Alexa",
|
|
40
40
|
"version": "0.1.0",
|
|
41
41
|
"description": "Import smart-home devices from an Amazon Alexa account (unofficial cookie/token client; poll-based state sync). The same account can speak a notification aloud on Echo devices.",
|
|
42
42
|
"entry": "./dist/addon.js",
|