@matter-server/dashboard 0.7.0-alpha.0-20260512-b404bea → 0.7.0

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.
Files changed (171) hide show
  1. package/dist/esm/client/client-context.d.ts +3 -0
  2. package/dist/esm/client/client-context.d.ts.map +1 -1
  3. package/dist/esm/client/client-context.js +3 -1
  4. package/dist/esm/client/client-context.js.map +1 -1
  5. package/dist/esm/client/models/descriptions.js +45 -45
  6. package/dist/esm/components/avsum-ptz-strip.d.ts +41 -0
  7. package/dist/esm/components/avsum-ptz-strip.d.ts.map +1 -0
  8. package/dist/esm/components/avsum-ptz-strip.js +379 -0
  9. package/dist/esm/components/avsum-ptz-strip.js.map +6 -0
  10. package/dist/esm/components/dialogs/binding/node-binding-dialog.js +1 -1
  11. package/dist/esm/components/dialogs/binding/show-node-binding-dialog.d.ts +2 -2
  12. package/dist/esm/components/dialogs/binding/show-node-binding-dialog.d.ts.map +1 -1
  13. package/dist/esm/components/dialogs/binding/show-node-binding-dialog.js +1 -2
  14. package/dist/esm/components/dialogs/binding/show-node-binding-dialog.js.map +1 -1
  15. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.d.ts +1 -0
  16. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.d.ts.map +1 -1
  17. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.js +12 -3
  18. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.js.map +1 -1
  19. package/dist/esm/components/dialogs/commission-node-dialog/show-commission-node-dialog.d.ts +1 -2
  20. package/dist/esm/components/dialogs/commission-node-dialog/show-commission-node-dialog.d.ts.map +1 -1
  21. package/dist/esm/components/dialogs/commission-node-dialog/show-commission-node-dialog.js +1 -2
  22. package/dist/esm/components/dialogs/commission-node-dialog/show-commission-node-dialog.js.map +1 -1
  23. package/dist/esm/components/dialogs/settings/log-level-dialog.d.ts +0 -2
  24. package/dist/esm/components/dialogs/settings/log-level-dialog.d.ts.map +1 -1
  25. package/dist/esm/components/dialogs/settings/log-level-dialog.js +2 -8
  26. package/dist/esm/components/dialogs/settings/log-level-dialog.js.map +1 -1
  27. package/dist/esm/components/dialogs/settings/log-level-section.d.ts +2 -1
  28. package/dist/esm/components/dialogs/settings/log-level-section.d.ts.map +1 -1
  29. package/dist/esm/components/dialogs/settings/log-level-section.js +10 -2
  30. package/dist/esm/components/dialogs/settings/log-level-section.js.map +1 -1
  31. package/dist/esm/components/dialogs/settings/settings-dialog.d.ts +1 -0
  32. package/dist/esm/components/dialogs/settings/settings-dialog.d.ts.map +1 -1
  33. package/dist/esm/components/dialogs/settings/settings-dialog.js +8 -2
  34. package/dist/esm/components/dialogs/settings/settings-dialog.js.map +1 -1
  35. package/dist/esm/components/dialogs/settings/show-log-level-dialog.d.ts +1 -2
  36. package/dist/esm/components/dialogs/settings/show-log-level-dialog.d.ts.map +1 -1
  37. package/dist/esm/components/dialogs/settings/show-log-level-dialog.js +1 -2
  38. package/dist/esm/components/dialogs/settings/show-log-level-dialog.js.map +1 -1
  39. package/dist/esm/components/dialogs/settings/show-settings-dialog.d.ts +1 -2
  40. package/dist/esm/components/dialogs/settings/show-settings-dialog.d.ts.map +1 -1
  41. package/dist/esm/components/dialogs/settings/show-settings-dialog.js +1 -2
  42. package/dist/esm/components/dialogs/settings/show-settings-dialog.js.map +1 -1
  43. package/dist/esm/components/webrtc-stream-view.d.ts +97 -0
  44. package/dist/esm/components/webrtc-stream-view.d.ts.map +1 -0
  45. package/dist/esm/components/webrtc-stream-view.js +878 -0
  46. package/dist/esm/components/webrtc-stream-view.js.map +6 -0
  47. package/dist/esm/pages/camera-overlay.d.ts +63 -0
  48. package/dist/esm/pages/camera-overlay.d.ts.map +1 -0
  49. package/dist/esm/pages/camera-overlay.js +546 -0
  50. package/dist/esm/pages/camera-overlay.js.map +6 -0
  51. package/dist/esm/pages/cluster-commands/base-cluster-commands.d.ts +1 -0
  52. package/dist/esm/pages/cluster-commands/base-cluster-commands.d.ts.map +1 -1
  53. package/dist/esm/pages/cluster-commands/base-cluster-commands.js +11 -1
  54. package/dist/esm/pages/cluster-commands/base-cluster-commands.js.map +1 -1
  55. package/dist/esm/pages/cluster-commands/clusters/avsum-commands.d.ts +38 -0
  56. package/dist/esm/pages/cluster-commands/clusters/avsum-commands.d.ts.map +1 -0
  57. package/dist/esm/pages/cluster-commands/clusters/avsum-commands.js +534 -0
  58. package/dist/esm/pages/cluster-commands/clusters/avsum-commands.js.map +6 -0
  59. package/dist/esm/pages/cluster-commands/clusters/chime-commands.d.ts +32 -0
  60. package/dist/esm/pages/cluster-commands/clusters/chime-commands.d.ts.map +1 -0
  61. package/dist/esm/pages/cluster-commands/clusters/chime-commands.js +261 -0
  62. package/dist/esm/pages/cluster-commands/clusters/chime-commands.js.map +6 -0
  63. package/dist/esm/pages/cluster-commands/index.d.ts +2 -0
  64. package/dist/esm/pages/cluster-commands/index.d.ts.map +1 -1
  65. package/dist/esm/pages/cluster-commands/index.js +2 -0
  66. package/dist/esm/pages/cluster-commands/index.js.map +1 -1
  67. package/dist/esm/pages/components/header.d.ts +1 -0
  68. package/dist/esm/pages/components/header.d.ts.map +1 -1
  69. package/dist/esm/pages/components/header.js +10 -3
  70. package/dist/esm/pages/components/header.js.map +1 -1
  71. package/dist/esm/pages/components/node-details.d.ts +3 -0
  72. package/dist/esm/pages/components/node-details.d.ts.map +1 -1
  73. package/dist/esm/pages/components/node-details.js +34 -4
  74. package/dist/esm/pages/components/node-details.js.map +1 -1
  75. package/dist/esm/pages/components/server-details.d.ts +1 -0
  76. package/dist/esm/pages/components/server-details.d.ts.map +1 -1
  77. package/dist/esm/pages/components/server-details.js +11 -2
  78. package/dist/esm/pages/components/server-details.js.map +1 -1
  79. package/dist/esm/pages/matter-cluster-view.d.ts +1 -0
  80. package/dist/esm/pages/matter-cluster-view.d.ts.map +1 -1
  81. package/dist/esm/pages/matter-cluster-view.js +15 -8
  82. package/dist/esm/pages/matter-cluster-view.js.map +1 -1
  83. package/dist/esm/pages/matter-dashboard-app.d.ts +3 -1
  84. package/dist/esm/pages/matter-dashboard-app.d.ts.map +1 -1
  85. package/dist/esm/pages/matter-dashboard-app.js +12 -16
  86. package/dist/esm/pages/matter-dashboard-app.js.map +1 -1
  87. package/dist/esm/pages/matter-endpoint-view.d.ts +2 -1
  88. package/dist/esm/pages/matter-endpoint-view.d.ts.map +1 -1
  89. package/dist/esm/pages/matter-endpoint-view.js +17 -3
  90. package/dist/esm/pages/matter-endpoint-view.js.map +1 -1
  91. package/dist/esm/pages/matter-network-view.d.ts.map +1 -1
  92. package/dist/esm/pages/matter-network-view.js +5 -1
  93. package/dist/esm/pages/matter-network-view.js.map +1 -1
  94. package/dist/esm/pages/matter-node-view.d.ts +1 -0
  95. package/dist/esm/pages/matter-node-view.d.ts.map +1 -1
  96. package/dist/esm/pages/matter-node-view.js +15 -7
  97. package/dist/esm/pages/matter-node-view.js.map +1 -1
  98. package/dist/esm/pages/matter-server-view.d.ts +1 -0
  99. package/dist/esm/pages/matter-server-view.d.ts.map +1 -1
  100. package/dist/esm/pages/matter-server-view.js +13 -2
  101. package/dist/esm/pages/matter-server-view.js.map +1 -1
  102. package/dist/esm/pages/network/network-details.d.ts.map +1 -1
  103. package/dist/esm/pages/network/network-details.js +0 -3
  104. package/dist/esm/pages/network/network-details.js.map +1 -1
  105. package/dist/esm/pages/network/update-connections-dialog.d.ts +1 -0
  106. package/dist/esm/pages/network/update-connections-dialog.d.ts.map +1 -1
  107. package/dist/esm/pages/network/update-connections-dialog.js +7 -1
  108. package/dist/esm/pages/network/update-connections-dialog.js.map +1 -1
  109. package/dist/esm/util/attribute-shapes.d.ts +11 -0
  110. package/dist/esm/util/attribute-shapes.d.ts.map +1 -0
  111. package/dist/esm/util/attribute-shapes.js +37 -0
  112. package/dist/esm/util/attribute-shapes.js.map +6 -0
  113. package/dist/esm/util/avsum.d.ts +69 -0
  114. package/dist/esm/util/avsum.d.ts.map +1 -0
  115. package/dist/esm/util/avsum.js +150 -0
  116. package/dist/esm/util/avsum.js.map +6 -0
  117. package/dist/esm/util/chime.d.ts +20 -0
  118. package/dist/esm/util/chime.d.ts.map +1 -0
  119. package/dist/esm/util/chime.js +60 -0
  120. package/dist/esm/util/chime.js.map +6 -0
  121. package/dist/web/js/{attribute-write-dialog-DzMWN_T3.js → attribute-write-dialog-DLRP2hlx.js} +1 -1
  122. package/dist/web/js/{command-invoke-dialog-BhAOXzjX.js → command-invoke-dialog-BcCfT1sn.js} +1 -1
  123. package/dist/web/js/{commission-node-dialog-DF87YIqR.js → commission-node-dialog-BfldkUxD.js} +16 -8
  124. package/dist/web/js/{commission-node-existing-DLcWvJTL.js → commission-node-existing-omW-An0J.js} +2 -2
  125. package/dist/web/js/{commission-node-thread-m2fqED-2.js → commission-node-thread-BZpJIxlI.js} +2 -2
  126. package/dist/web/js/{commission-node-wifi-PCsot-CX.js → commission-node-wifi-HA2pYTW2.js} +2 -2
  127. package/dist/web/js/{dialog-box-DiqYXM8c.js → dialog-box-BjDID9j4.js} +1 -1
  128. package/dist/web/js/{fire_event-BnpND_gK.js → fire_event-CChLgSiV.js} +1 -1
  129. package/dist/web/js/main.js +39 -1
  130. package/dist/web/js/{matter-dashboard-app-BZOhBELR.js → matter-dashboard-app-XUWBcruM.js} +8265 -2035
  131. package/dist/web/js/{node-binding-dialog-B3lVN-FU.js → node-binding-dialog-_yHtf7WP.js} +2 -2
  132. package/dist/web/js/settings-dialog-BFPfOSOI.js +607 -0
  133. package/package.json +4 -4
  134. package/src/client/client-context.ts +1 -0
  135. package/src/client/models/descriptions.ts +45 -45
  136. package/src/components/avsum-ptz-strip.ts +388 -0
  137. package/src/components/dialogs/binding/node-binding-dialog.ts +1 -1
  138. package/src/components/dialogs/binding/show-node-binding-dialog.ts +2 -3
  139. package/src/components/dialogs/commission-node-dialog/commission-node-dialog.ts +10 -4
  140. package/src/components/dialogs/commission-node-dialog/show-commission-node-dialog.ts +1 -4
  141. package/src/components/dialogs/settings/log-level-dialog.ts +2 -9
  142. package/src/components/dialogs/settings/log-level-section.ts +11 -4
  143. package/src/components/dialogs/settings/settings-dialog.ts +8 -3
  144. package/src/components/dialogs/settings/show-log-level-dialog.ts +1 -4
  145. package/src/components/dialogs/settings/show-settings-dialog.ts +1 -4
  146. package/src/components/webrtc-stream-view.ts +999 -0
  147. package/src/pages/camera-overlay.ts +562 -0
  148. package/src/pages/cluster-commands/base-cluster-commands.ts +7 -1
  149. package/src/pages/cluster-commands/clusters/avsum-commands.ts +562 -0
  150. package/src/pages/cluster-commands/clusters/chime-commands.ts +272 -0
  151. package/src/pages/cluster-commands/index.ts +2 -0
  152. package/src/pages/components/header.ts +7 -3
  153. package/src/pages/components/node-details.ts +33 -3
  154. package/src/pages/components/server-details.ts +8 -2
  155. package/src/pages/matter-cluster-view.ts +13 -9
  156. package/src/pages/matter-dashboard-app.ts +11 -16
  157. package/src/pages/matter-endpoint-view.ts +13 -5
  158. package/src/pages/matter-network-view.ts +3 -1
  159. package/src/pages/matter-node-view.ts +9 -7
  160. package/src/pages/matter-server-view.ts +7 -2
  161. package/src/pages/network/network-details.ts +0 -3
  162. package/src/pages/network/update-connections-dialog.ts +6 -1
  163. package/src/util/attribute-shapes.ts +34 -0
  164. package/src/util/avsum.ts +212 -0
  165. package/src/util/chime.ts +82 -0
  166. package/dist/esm/util/clone_class.d.ts +0 -7
  167. package/dist/esm/util/clone_class.d.ts.map +0 -1
  168. package/dist/esm/util/clone_class.js +0 -10
  169. package/dist/esm/util/clone_class.js.map +0 -6
  170. package/dist/web/js/settings-dialog-D75IAPKe.js +0 -4039
  171. package/src/util/clone_class.ts +0 -7
@@ -1,4 +1,4 @@
1
- import { q as i, T as c, U as clientContext, n, d as e, i as i$1, W as showPromptDialog, J as showAlertDialog, A, j as b, K as handleAsync, t } from './matter-dashboard-app-BZOhBELR.js';
1
+ import { i, c, a as clientContext, q as n, e, j as i$1, t as showPromptDialog, s as showAlertDialog, A, b, h as handleAsync, v as t } from './matter-dashboard-app-XUWBcruM.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -416,7 +416,7 @@ let NodeBindingDialog = class extends i$1 {
416
416
  deviceType: void 0
417
417
  };
418
418
  const acl_entry = {
419
- privilege: 5,
419
+ privilege: 3,
420
420
  authMode: 2,
421
421
  subjects: [this.node.node_id],
422
422
  targets: [targets],
@@ -0,0 +1,607 @@
1
+ import { i, c, a as clientContext, w as tickContext, r, e, j as i$1, f as fireAndForget, s as showAlertDialog, b, A, h as handleAsync, v as t, q as n, D as DevModeService, o as mdiWifi, k as mdiAccessPoint, n as mdiEyeOff, l as mdiEye } from './matter-dashboard-app-XUWBcruM.js';
2
+ import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
+ import './main.js';
4
+
5
+ var __defProp$1 = Object.defineProperty;
6
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
7
+ var __decorateClass$1 = (decorators, target, key, kind) => {
8
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
9
+ for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10
+ if (kind && result) __defProp$1(target, key, result);
11
+ return result;
12
+ };
13
+ const LOG_LEVELS = [{
14
+ value: "critical",
15
+ label: "Critical"
16
+ }, {
17
+ value: "error",
18
+ label: "Error"
19
+ }, {
20
+ value: "warning",
21
+ label: "Warning"
22
+ }, {
23
+ value: "info",
24
+ label: "Info"
25
+ }, {
26
+ value: "debug",
27
+ label: "Debug"
28
+ }];
29
+ let LogLevelSection = class extends i$1 {
30
+ constructor() {
31
+ super(...arguments);
32
+ this._tick = 0;
33
+ this._consoleLevel = "info";
34
+ this._fileLevel = null;
35
+ this._loading = true;
36
+ this._applying = false;
37
+ }
38
+ connectedCallback() {
39
+ super.connectedCallback();
40
+ fireAndForget(this._loadLogLevels());
41
+ }
42
+ async _loadLogLevels() {
43
+ if (!this.client) return;
44
+ try {
45
+ const result = await this.client.getLogLevel();
46
+ this._consoleLevel = result.console_loglevel;
47
+ this._fileLevel = result.file_loglevel;
48
+ } catch (err) {
49
+ console.error("Failed to load log levels:", err);
50
+ } finally {
51
+ this._loading = false;
52
+ }
53
+ }
54
+ async _apply() {
55
+ if (!this.client) return;
56
+ this._applying = true;
57
+ try {
58
+ var _this$_fileSelect;
59
+ const consoleLevel = this._consoleSelect.value;
60
+ const fileLevel = (_this$_fileSelect = this._fileSelect) === null || _this$_fileSelect === void 0 ? void 0 : _this$_fileSelect.value;
61
+ const result = await this.client.setLogLevel(consoleLevel, this._fileLevel !== null ? fileLevel : void 0);
62
+ this._consoleLevel = result.console_loglevel;
63
+ this._fileLevel = result.file_loglevel;
64
+ this.dispatchEvent(new CustomEvent("log-level-applied", {
65
+ bubbles: true,
66
+ composed: true
67
+ }));
68
+ } catch (err) {
69
+ console.error("Failed to apply log levels:", err);
70
+ showAlertDialog({
71
+ title: "Error",
72
+ text: "Failed to apply log levels"
73
+ });
74
+ } finally {
75
+ this._applying = false;
76
+ }
77
+ }
78
+ render() {
79
+ if (this._loading) {
80
+ return b` <p class="loading">Loading...</p> `;
81
+ }
82
+ return b`
83
+ <p class="hint">Changes are temporary and will be reset on the next server restart.</p>
84
+ <div class="form-field">
85
+ <label>Console Log Level</label>
86
+ <md-outlined-select name="console" .value=${this._consoleLevel}>
87
+ ${LOG_LEVELS.map(level => b`
88
+ <md-select-option value=${level.value} ?selected=${level.value === this._consoleLevel}>
89
+ <div slot="headline">${level.label}</div>
90
+ </md-select-option>
91
+ `)}
92
+ </md-outlined-select>
93
+ </div>
94
+ ${this._fileLevel !== null ? b`
95
+ <div class="form-field">
96
+ <label>File Log Level</label>
97
+ <md-outlined-select name="file" .value=${this._fileLevel}>
98
+ ${LOG_LEVELS.map(level => b`
99
+ <md-select-option
100
+ value=${level.value}
101
+ ?selected=${level.value === this._fileLevel}
102
+ >
103
+ <div slot="headline">${level.label}</div>
104
+ </md-select-option>
105
+ `)}
106
+ </md-outlined-select>
107
+ </div>
108
+ ` : A}
109
+ <div class="actions">
110
+ <md-text-button @click=${handleAsync(() => this._apply())} ?disabled=${this._applying}>
111
+ ${this._applying ? "Applying..." : "Apply"}
112
+ </md-text-button>
113
+ </div>
114
+ `;
115
+ }
116
+ };
117
+ LogLevelSection.styles = i`
118
+ :host {
119
+ display: block;
120
+ }
121
+
122
+ .loading {
123
+ text-align: center;
124
+ padding: 24px;
125
+ color: var(--md-sys-color-on-surface-variant);
126
+ }
127
+
128
+ .hint {
129
+ font-size: 0.875rem;
130
+ color: var(--md-sys-color-on-surface-variant);
131
+ margin: 0 0 16px 0;
132
+ font-style: italic;
133
+ }
134
+
135
+ .form-field {
136
+ margin-bottom: 16px;
137
+ }
138
+
139
+ .form-field label {
140
+ display: block;
141
+ margin-bottom: 8px;
142
+ font-weight: 500;
143
+ color: var(--md-sys-color-on-surface);
144
+ }
145
+
146
+ md-outlined-select {
147
+ width: 100%;
148
+ }
149
+
150
+ .actions {
151
+ display: flex;
152
+ justify-content: flex-end;
153
+ margin-top: 8px;
154
+ }
155
+ `;
156
+ __decorateClass$1([c({
157
+ context: clientContext
158
+ })], LogLevelSection.prototype, "client", 2);
159
+ __decorateClass$1([c({
160
+ context: tickContext,
161
+ subscribe: true
162
+ })], LogLevelSection.prototype, "_tick", 2);
163
+ __decorateClass$1([r()], LogLevelSection.prototype, "_consoleLevel", 2);
164
+ __decorateClass$1([r()], LogLevelSection.prototype, "_fileLevel", 2);
165
+ __decorateClass$1([r()], LogLevelSection.prototype, "_loading", 2);
166
+ __decorateClass$1([r()], LogLevelSection.prototype, "_applying", 2);
167
+ __decorateClass$1([e("md-outlined-select[name='console']")], LogLevelSection.prototype, "_consoleSelect", 2);
168
+ __decorateClass$1([e("md-outlined-select[name='file']")], LogLevelSection.prototype, "_fileSelect", 2);
169
+ LogLevelSection = __decorateClass$1([t("log-level-section")], LogLevelSection);
170
+
171
+ var __defProp = Object.defineProperty;
172
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
173
+ var __decorateClass = (decorators, target, key, kind) => {
174
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
175
+ for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
176
+ if (kind && result) __defProp(target, key, result);
177
+ return result;
178
+ };
179
+ let SettingsDialog = class extends i$1 {
180
+ constructor() {
181
+ super(...arguments);
182
+ this._tick = 0;
183
+ this._devMode = DevModeService.active;
184
+ this._expandedRow = null;
185
+ this._credLoading = false;
186
+ this._showPassword = false;
187
+ }
188
+ connectedCallback() {
189
+ super.connectedCallback();
190
+ this._unsubscribeDev = DevModeService.subscribe(active => {
191
+ this._devMode = active;
192
+ });
193
+ }
194
+ disconnectedCallback() {
195
+ var _this$_unsubscribeDev;
196
+ super.disconnectedCallback();
197
+ (_this$_unsubscribeDev = this._unsubscribeDev) === null || _this$_unsubscribeDev === void 0 || _this$_unsubscribeDev.call(this);
198
+ }
199
+ firstUpdated() {
200
+ const knownSections = /* @__PURE__ */new Set(["network-credentials"]);
201
+ if (this.scrollToSection && knownSections.has(this.scrollToSection)) {
202
+ requestAnimationFrame(() => {
203
+ var _this$renderRoot$quer;
204
+ (_this$renderRoot$quer = this.renderRoot.querySelector(`#${this.scrollToSection}`)) === null || _this$renderRoot$quer === void 0 || _this$renderRoot$quer.scrollIntoView({
205
+ behavior: "smooth",
206
+ block: "start"
207
+ });
208
+ });
209
+ }
210
+ }
211
+ _close() {
212
+ this.shadowRoot.querySelector("md-dialog").close();
213
+ }
214
+ _handleClosed() {
215
+ this.parentNode.removeChild(this);
216
+ }
217
+ _onDevToggle(event) {
218
+ const target = event.target;
219
+ DevModeService.setActive(target.selected);
220
+ }
221
+ _copyDevLink() {
222
+ var _navigator$clipboard;
223
+ const url = new URL(window.location.href);
224
+ url.searchParams.set("dev", "on");
225
+ (_navigator$clipboard = navigator.clipboard) === null || _navigator$clipboard === void 0 || _navigator$clipboard.writeText(url.toString()).catch(() => {});
226
+ }
227
+ _toggleExpand(row) {
228
+ this._expandedRow = this._expandedRow === row ? null : row;
229
+ this._showPassword = false;
230
+ }
231
+ _cancelCred() {
232
+ this._expandedRow = null;
233
+ this._showPassword = false;
234
+ }
235
+ _togglePassword() {
236
+ this._showPassword = !this._showPassword;
237
+ }
238
+ async _saveWifi() {
239
+ const ssid = this._wifiSsidField.value.trim();
240
+ if (!ssid) {
241
+ showAlertDialog({
242
+ title: "Validation error",
243
+ text: "SSID is required"
244
+ });
245
+ return;
246
+ }
247
+ const password = this._wifiPasswordField.value;
248
+ if (!password) {
249
+ showAlertDialog({
250
+ title: "Validation error",
251
+ text: "Password is required"
252
+ });
253
+ return;
254
+ }
255
+ this._credLoading = true;
256
+ try {
257
+ await this.client.setWifiCredentials(ssid, password);
258
+ this._expandedRow = null;
259
+ this._showPassword = false;
260
+ } catch (err) {
261
+ showAlertDialog({
262
+ title: "Error saving WiFi credentials",
263
+ text: err.message
264
+ });
265
+ } finally {
266
+ this._credLoading = false;
267
+ }
268
+ }
269
+ async _removeWifi() {
270
+ this._credLoading = true;
271
+ try {
272
+ await this.client.removeWifiCredentials();
273
+ this._expandedRow = null;
274
+ this._showPassword = false;
275
+ } catch (err) {
276
+ showAlertDialog({
277
+ title: "Error removing WiFi credentials",
278
+ text: err.message
279
+ });
280
+ } finally {
281
+ this._credLoading = false;
282
+ }
283
+ }
284
+ async _saveThread() {
285
+ const dataset = this._threadDatasetField.value.trim();
286
+ if (!dataset) {
287
+ showAlertDialog({
288
+ title: "Validation error",
289
+ text: "Thread dataset is required"
290
+ });
291
+ return;
292
+ }
293
+ if (!/^[0-9a-fA-F]*$/.test(dataset) || dataset.length % 2 !== 0) {
294
+ showAlertDialog({
295
+ title: "Invalid Thread dataset",
296
+ text: "Must be a hex string with even length (each byte is two hex characters)"
297
+ });
298
+ return;
299
+ }
300
+ this._credLoading = true;
301
+ try {
302
+ await this.client.setThreadOperationalDataset(dataset);
303
+ this._expandedRow = null;
304
+ } catch (err) {
305
+ showAlertDialog({
306
+ title: "Error saving Thread dataset",
307
+ text: err.message
308
+ });
309
+ } finally {
310
+ this._credLoading = false;
311
+ }
312
+ }
313
+ async _removeThread() {
314
+ this._credLoading = true;
315
+ try {
316
+ await this.client.removeThreadDataset();
317
+ this._expandedRow = null;
318
+ this._showPassword = false;
319
+ } catch (err) {
320
+ showAlertDialog({
321
+ title: "Error removing Thread dataset",
322
+ text: err.message
323
+ });
324
+ } finally {
325
+ this._credLoading = false;
326
+ }
327
+ }
328
+ render() {
329
+ return b`
330
+ <md-dialog open @cancel=${preventDefault} @closed=${this._handleClosed}>
331
+ <div slot="headline">Settings</div>
332
+ <div slot="content">
333
+ <section class="section">
334
+ <h3 class="section-title">Developer mode</h3>
335
+ <div class="toggle-row">
336
+ <label for="dev-switch" class="toggle-label">
337
+ Enable developer mode
338
+ <span class="hint">
339
+ Adds raw read/write buttons and a generic command invoker to cluster views.
340
+ Activation is reflected in the URL (<code>?dev=on</code>) and does not persist.
341
+ </span>
342
+ </label>
343
+ <md-switch
344
+ id="dev-switch"
345
+ ?selected=${this._devMode}
346
+ @change=${this._onDevToggle}
347
+ ></md-switch>
348
+ </div>
349
+ <div class="aux-row">
350
+ <md-text-button @click=${this._copyDevLink}>Copy URL with dev enabled</md-text-button>
351
+ </div>
352
+ </section>
353
+
354
+ <md-divider></md-divider>
355
+
356
+ <section class="section">
357
+ <h3 class="section-title">Server log levels</h3>
358
+ <log-level-section></log-level-section>
359
+ </section>
360
+
361
+ <md-divider></md-divider>
362
+
363
+ <section id="network-credentials" class="section">
364
+ <h3 class="section-title">Network credentials</h3>
365
+
366
+ <div class="cred-row">
367
+ <div class="cred-info">
368
+ <ha-svg-icon .path=${mdiWifi}></ha-svg-icon>
369
+ <span class="cred-label">WiFi</span>
370
+ ${this.client.serverInfo.wifi_credentials_set ? b`<span class="cred-value">${this.client.serverInfo.wifi_ssid}</span>` : b`<span class="cred-unset">Not configured</span>`}
371
+ </div>
372
+ <md-text-button @click=${() => this._toggleExpand("wifi")} .disabled=${this._credLoading}
373
+ >Edit</md-text-button
374
+ >
375
+ </div>
376
+
377
+ ${this._expandedRow === "wifi" ? b` <div class="cred-form">
378
+ <md-outlined-text-field
379
+ id="cred-wifi-ssid"
380
+ label="SSID"
381
+ .value=${this.client.serverInfo.wifi_ssid ?? ""}
382
+ .disabled=${this._credLoading}
383
+ ></md-outlined-text-field>
384
+ <div class="password-row">
385
+ <md-outlined-text-field
386
+ id="cred-wifi-password"
387
+ label="Password"
388
+ .type=${this._showPassword ? "text" : "password"}
389
+ .disabled=${this._credLoading}
390
+ ></md-outlined-text-field>
391
+ <md-icon-button @click=${this._togglePassword}>
392
+ <ha-svg-icon .path=${this._showPassword ? mdiEyeOff : mdiEye}></ha-svg-icon>
393
+ </md-icon-button>
394
+ </div>
395
+ <div class="form-actions">
396
+ <md-text-button @click=${this._cancelCred} .disabled=${this._credLoading}
397
+ >Cancel</md-text-button
398
+ >
399
+ ${this.client.serverInfo.wifi_credentials_set ? b`<md-text-button
400
+ @click=${handleAsync(() => this._removeWifi())}
401
+ .disabled=${this._credLoading}
402
+ >Remove</md-text-button
403
+ >` : A}
404
+ <md-filled-button
405
+ @click=${handleAsync(() => this._saveWifi())}
406
+ .disabled=${this._credLoading}
407
+ >Save</md-filled-button
408
+ >
409
+ </div>
410
+ </div>` : A}
411
+
412
+ <div class="cred-row cred-row-thread">
413
+ <div class="cred-info">
414
+ <ha-svg-icon .path=${mdiAccessPoint}></ha-svg-icon>
415
+ <span class="cred-label">Thread</span>
416
+ ${this.client.serverInfo.thread_credentials_set ? b`<span class="cred-value">Thread network set</span>` : b`<span class="cred-unset">Not configured</span>`}
417
+ </div>
418
+ <md-text-button @click=${() => this._toggleExpand("thread")} .disabled=${this._credLoading}
419
+ >Edit</md-text-button
420
+ >
421
+ </div>
422
+
423
+ ${this._expandedRow === "thread" ? b` <div class="cred-form">
424
+ <md-outlined-text-field
425
+ id="cred-thread-dataset"
426
+ label="Thread dataset"
427
+ supporting-text="Hex string (e.g. 0E080000...)"
428
+ .disabled=${this._credLoading}
429
+ ></md-outlined-text-field>
430
+ <div class="form-actions">
431
+ <md-text-button @click=${this._cancelCred} .disabled=${this._credLoading}
432
+ >Cancel</md-text-button
433
+ >
434
+ ${this.client.serverInfo.thread_credentials_set ? b`<md-text-button
435
+ @click=${handleAsync(() => this._removeThread())}
436
+ .disabled=${this._credLoading}
437
+ >Remove</md-text-button
438
+ >` : A}
439
+ <md-filled-button
440
+ @click=${handleAsync(() => this._saveThread())}
441
+ .disabled=${this._credLoading}
442
+ >Save</md-filled-button
443
+ >
444
+ </div>
445
+ </div>` : A}
446
+
447
+ <p class="cred-hint">Used when commissioning new devices. Existing devices are not affected.</p>
448
+ </section>
449
+ </div>
450
+ <div slot="actions">
451
+ <md-text-button @click=${this._close}>Close</md-text-button>
452
+ </div>
453
+ </md-dialog>
454
+ `;
455
+ }
456
+ };
457
+ SettingsDialog.styles = i`
458
+ md-dialog {
459
+ min-width: 480px;
460
+ max-width: 600px;
461
+ }
462
+
463
+ .section {
464
+ padding: 8px 0 16px 0;
465
+ }
466
+
467
+ .section-title {
468
+ margin: 0 0 12px 0;
469
+ font-size: 0.95rem;
470
+ font-weight: 500;
471
+ color: var(--md-sys-color-on-surface);
472
+ text-transform: uppercase;
473
+ letter-spacing: 0.08em;
474
+ }
475
+
476
+ .toggle-row {
477
+ display: flex;
478
+ align-items: center;
479
+ gap: 16px;
480
+ justify-content: space-between;
481
+ }
482
+
483
+ .toggle-label {
484
+ display: flex;
485
+ flex-direction: column;
486
+ gap: 4px;
487
+ color: var(--md-sys-color-on-surface);
488
+ font-size: 0.95rem;
489
+ }
490
+
491
+ .hint {
492
+ font-size: 0.825rem;
493
+ color: var(--md-sys-color-on-surface-variant);
494
+ font-weight: 400;
495
+ }
496
+
497
+ .hint code {
498
+ font-family: var(--monospace-font);
499
+ background: var(--md-sys-color-surface-container-high);
500
+ padding: 0 4px;
501
+ border-radius: 3px;
502
+ }
503
+
504
+ .aux-row {
505
+ margin-top: 8px;
506
+ display: flex;
507
+ justify-content: flex-end;
508
+ }
509
+
510
+ md-divider {
511
+ margin: 12px 0;
512
+ }
513
+
514
+ .cred-row {
515
+ display: flex;
516
+ align-items: center;
517
+ justify-content: space-between;
518
+ padding: 4px 0;
519
+ }
520
+
521
+ .cred-row-thread {
522
+ margin-top: 8px;
523
+ }
524
+
525
+ .cred-info {
526
+ display: flex;
527
+ align-items: center;
528
+ gap: 10px;
529
+ font-size: 0.9rem;
530
+ color: var(--md-sys-color-on-surface);
531
+ }
532
+
533
+ .cred-label {
534
+ font-weight: 500;
535
+ min-width: 52px;
536
+ }
537
+
538
+ .cred-value {
539
+ color: var(--md-sys-color-on-surface-variant);
540
+ }
541
+
542
+ .cred-unset {
543
+ color: var(--md-sys-color-on-surface-variant);
544
+ font-style: italic;
545
+ }
546
+
547
+ .cred-form {
548
+ display: flex;
549
+ flex-direction: column;
550
+ gap: 10px;
551
+ padding: 8px 0 4px 0;
552
+ }
553
+
554
+ .password-row {
555
+ display: flex;
556
+ align-items: center;
557
+ gap: 4px;
558
+ }
559
+
560
+ .password-row md-outlined-text-field {
561
+ flex: 1;
562
+ }
563
+
564
+ .form-actions {
565
+ display: flex;
566
+ gap: 4px;
567
+ justify-content: flex-end;
568
+ }
569
+
570
+ .cred-hint {
571
+ margin: 10px 0 0 0;
572
+ font-size: 0.8rem;
573
+ color: var(--md-sys-color-on-surface-variant);
574
+ }
575
+
576
+ .cred-info ha-svg-icon {
577
+ width: 18px;
578
+ height: 18px;
579
+ color: var(--md-sys-color-on-surface-variant);
580
+ }
581
+
582
+ .password-row ha-svg-icon {
583
+ width: 18px;
584
+ height: 18px;
585
+ color: var(--md-sys-color-on-surface-variant);
586
+ }
587
+ `;
588
+ __decorateClass([c({
589
+ context: clientContext
590
+ })], SettingsDialog.prototype, "client", 2);
591
+ __decorateClass([c({
592
+ context: tickContext,
593
+ subscribe: true
594
+ })], SettingsDialog.prototype, "_tick", 2);
595
+ __decorateClass([r()], SettingsDialog.prototype, "_devMode", 2);
596
+ __decorateClass([n({
597
+ attribute: false
598
+ })], SettingsDialog.prototype, "scrollToSection", 2);
599
+ __decorateClass([r()], SettingsDialog.prototype, "_expandedRow", 2);
600
+ __decorateClass([r()], SettingsDialog.prototype, "_credLoading", 2);
601
+ __decorateClass([r()], SettingsDialog.prototype, "_showPassword", 2);
602
+ __decorateClass([e("#cred-wifi-ssid")], SettingsDialog.prototype, "_wifiSsidField", 2);
603
+ __decorateClass([e("#cred-wifi-password")], SettingsDialog.prototype, "_wifiPasswordField", 2);
604
+ __decorateClass([e("#cred-thread-dataset")], SettingsDialog.prototype, "_threadDatasetField", 2);
605
+ SettingsDialog = __decorateClass([t("settings-dialog")], SettingsDialog);
606
+
607
+ export { SettingsDialog };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter-server/dashboard",
3
- "version": "0.7.0-alpha.0-20260512-b404bea",
3
+ "version": "0.7.0",
4
4
  "description": "Dashboard for OHF Matter Server",
5
5
  "homepage": "https://github.com/matter-js/matterjs-server",
6
6
  "bugs": {
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "@lit/context": "^1.1.6",
35
35
  "@material/web": "^2.4.1",
36
- "@matter-server/custom-clusters": "0.7.0-alpha.0-20260512-b404bea",
37
- "@matter-server/ws-client": "0.7.0-alpha.0-20260512-b404bea",
36
+ "@matter-server/custom-clusters": "0.7.0",
37
+ "@matter-server/ws-client": "0.7.0",
38
38
  "@mdi/js": "^7.4.47",
39
39
  "lit": "^3.3.2",
40
40
  "tslib": "^2.8.1",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "@babel/preset-env": "^7.29.5",
45
- "@matter/main": "0.17.0-alpha.0-20260512-576f5796c",
45
+ "@matter/main": "0.17.0-alpha.0-20260518-7f13c7285",
46
46
  "@rollup/plugin-babel": "^7.0.0",
47
47
  "@rollup/plugin-commonjs": "^29.0.2",
48
48
  "@rollup/plugin-json": "^6.1.0",
@@ -8,3 +8,4 @@ import { createContext } from "@lit/context";
8
8
  import type { MatterClient } from "@matter-server/ws-client";
9
9
 
10
10
  export const clientContext = createContext<MatterClient>("client");
11
+ export const tickContext = createContext<number>("client-tick");