@nice2dev/ui-iot 1.0.28 → 1.1.5
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.cjs +27 -1
- package/dist/index.mjs +2462 -750
- package/dist/ui-iot.css +1 -0
- package/package.json +16 -12
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
const
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useCallback as w, useContext as ie, createContext as b, memo as ce, useEffect as ne } from "react";
|
|
3
|
+
const F = [
|
|
4
4
|
{ type: "device-list", label: "Device List", icon: "📋" },
|
|
5
5
|
{ type: "device-status", label: "Device Status", icon: "🟢" },
|
|
6
6
|
{ type: "telemetry-chart", label: "Telemetry Chart", icon: "📈" },
|
|
@@ -12,157 +12,157 @@ const $ = [
|
|
|
12
12
|
{ type: "kpi", label: "KPI Card", icon: "🎯" },
|
|
13
13
|
{ type: "camera-feed", label: "Camera Feed", icon: "📹" }
|
|
14
14
|
];
|
|
15
|
-
function
|
|
16
|
-
devices:
|
|
17
|
-
widgets:
|
|
18
|
-
alarms:
|
|
19
|
-
onDeviceSelect:
|
|
20
|
-
onWidgetChange:
|
|
21
|
-
onCommand:
|
|
22
|
-
onAlarmAcknowledge:
|
|
23
|
-
fetchTelemetry:
|
|
24
|
-
className:
|
|
15
|
+
function Ee({
|
|
16
|
+
devices: r = [],
|
|
17
|
+
widgets: i = [],
|
|
18
|
+
alarms: c = [],
|
|
19
|
+
onDeviceSelect: n,
|
|
20
|
+
onWidgetChange: o,
|
|
21
|
+
onCommand: d,
|
|
22
|
+
onAlarmAcknowledge: t,
|
|
23
|
+
fetchTelemetry: l,
|
|
24
|
+
className: g = ""
|
|
25
25
|
}) {
|
|
26
|
-
const [
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
return
|
|
26
|
+
const [m, C] = h(i), [N, v] = h(null), [u, _] = h("dashboard"), [H, P] = h(!1), [x, R] = h(""), y = w(
|
|
27
|
+
(f) => {
|
|
28
|
+
C((S) => {
|
|
29
|
+
const T = f(S);
|
|
30
|
+
return o == null || o(T), T;
|
|
31
31
|
});
|
|
32
32
|
},
|
|
33
|
-
[
|
|
34
|
-
), k =
|
|
35
|
-
(
|
|
36
|
-
var
|
|
37
|
-
const
|
|
33
|
+
[o]
|
|
34
|
+
), k = w(
|
|
35
|
+
(f) => {
|
|
36
|
+
var T;
|
|
37
|
+
const S = {
|
|
38
38
|
id: crypto.randomUUID(),
|
|
39
|
-
type:
|
|
40
|
-
title: ((
|
|
41
|
-
position: { x: 0, y:
|
|
39
|
+
type: f,
|
|
40
|
+
title: ((T = F.find((B) => B.type === f)) == null ? void 0 : T.label) || f,
|
|
41
|
+
position: { x: 0, y: oe(m), width: 4, height: 3 },
|
|
42
42
|
config: {}
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
y((B) => [...B, S]);
|
|
45
45
|
},
|
|
46
|
-
[
|
|
47
|
-
),
|
|
48
|
-
(
|
|
49
|
-
f
|
|
46
|
+
[m, y]
|
|
47
|
+
), L = w(
|
|
48
|
+
(f) => {
|
|
49
|
+
v(f), n == null || n(f);
|
|
50
50
|
},
|
|
51
|
-
[
|
|
52
|
-
),
|
|
53
|
-
(
|
|
54
|
-
|
|
51
|
+
[n]
|
|
52
|
+
), $ = w(
|
|
53
|
+
(f) => {
|
|
54
|
+
t == null || t(f);
|
|
55
55
|
},
|
|
56
|
-
[
|
|
57
|
-
),
|
|
58
|
-
(
|
|
59
|
-
), I =
|
|
60
|
-
(
|
|
56
|
+
[t]
|
|
57
|
+
), M = r.filter(
|
|
58
|
+
(f) => !x || f.name.toLowerCase().includes(x.toLowerCase()) || f.type.toLowerCase().includes(x.toLowerCase())
|
|
59
|
+
), I = c.filter((f) => !f.cleared), z = I.filter(
|
|
60
|
+
(f) => f.severity === "critical" || f.severity === "high"
|
|
61
61
|
);
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ a("div", { className: `nice-iot-dashboard ${g}`, children: [
|
|
63
|
+
/* @__PURE__ */ a("header", { className: "nice-iot-dashboard__header", children: [
|
|
64
64
|
/* @__PURE__ */ e("h1", { children: "IoT Dashboard" }),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__stats", children: [
|
|
66
|
+
/* @__PURE__ */ a("span", { className: "nice-iot-dashboard__stat", children: [
|
|
67
67
|
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: "📱" }),
|
|
68
|
-
|
|
68
|
+
r.length,
|
|
69
69
|
" Devices"
|
|
70
70
|
] }),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ a("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--online", children: [
|
|
72
72
|
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: "🟢" }),
|
|
73
|
-
|
|
73
|
+
r.filter((f) => f.status === "online").length,
|
|
74
74
|
" Online"
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ a("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--offline", children: [
|
|
77
77
|
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: "⚫" }),
|
|
78
|
-
|
|
78
|
+
r.filter((f) => f.status === "offline").length,
|
|
79
79
|
" Offline"
|
|
80
80
|
] }),
|
|
81
|
-
|
|
81
|
+
z.length > 0 && /* @__PURE__ */ a("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--alarms", children: [
|
|
82
82
|
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: "🚨" }),
|
|
83
|
-
|
|
83
|
+
z.length,
|
|
84
84
|
" Alarms"
|
|
85
85
|
] })
|
|
86
86
|
] }),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ a("nav", { className: "nice-iot-dashboard__nav", children: [
|
|
88
88
|
/* @__PURE__ */ e(
|
|
89
89
|
"button",
|
|
90
90
|
{
|
|
91
|
-
className:
|
|
92
|
-
onClick: () =>
|
|
91
|
+
className: u === "dashboard" ? "active" : "",
|
|
92
|
+
onClick: () => _("dashboard"),
|
|
93
93
|
children: "Dashboard"
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
|
-
/* @__PURE__ */ e("button", { className:
|
|
97
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ e("button", { className: u === "devices" ? "active" : "", onClick: () => _("devices"), children: "Devices" }),
|
|
97
|
+
/* @__PURE__ */ a("button", { className: u === "alarms" ? "active" : "", onClick: () => _("alarms"), children: [
|
|
98
98
|
"Alarms ",
|
|
99
99
|
I.length > 0 && `(${I.length})`
|
|
100
100
|
] })
|
|
101
101
|
] }),
|
|
102
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__actions", children:
|
|
102
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__actions", children: u === "dashboard" && /* @__PURE__ */ e("button", { onClick: () => P(!H), children: H ? "✓ Done" : "✏️ Edit" }) })
|
|
103
103
|
] }),
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
u === "dashboard" && /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__main", children: [
|
|
105
|
+
H && /* @__PURE__ */ a("aside", { className: "nice-iot-dashboard__palette", children: [
|
|
106
106
|
/* @__PURE__ */ e("h4", { children: "Add Widget" }),
|
|
107
|
-
|
|
107
|
+
F.map((f) => /* @__PURE__ */ a(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
className: "nice-iot-dashboard__palette-item",
|
|
111
|
-
onClick: () => k(
|
|
111
|
+
onClick: () => k(f.type),
|
|
112
112
|
children: [
|
|
113
|
-
/* @__PURE__ */ e("span", { children:
|
|
114
|
-
/* @__PURE__ */ e("span", { children:
|
|
113
|
+
/* @__PURE__ */ e("span", { children: f.icon }),
|
|
114
|
+
/* @__PURE__ */ e("span", { children: f.label })
|
|
115
115
|
]
|
|
116
116
|
},
|
|
117
|
-
|
|
117
|
+
f.type
|
|
118
118
|
))
|
|
119
119
|
] }),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__grid", children: [
|
|
121
|
+
m.map((f) => /* @__PURE__ */ e(
|
|
122
|
+
de,
|
|
123
123
|
{
|
|
124
|
-
widget:
|
|
125
|
-
devices:
|
|
126
|
-
alarms:
|
|
127
|
-
isEditing:
|
|
128
|
-
onCommand:
|
|
129
|
-
onDelete: () =>
|
|
124
|
+
widget: f,
|
|
125
|
+
devices: r,
|
|
126
|
+
alarms: c,
|
|
127
|
+
isEditing: H,
|
|
128
|
+
onCommand: d,
|
|
129
|
+
onDelete: () => y((S) => S.filter((T) => T.id !== f.id))
|
|
130
130
|
},
|
|
131
|
-
|
|
131
|
+
f.id
|
|
132
132
|
)),
|
|
133
|
-
|
|
133
|
+
m.length === 0 && /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__empty", children: H ? "Add widgets from the palette" : "No widgets configured. Click Edit to add widgets." })
|
|
134
134
|
] })
|
|
135
135
|
] }),
|
|
136
|
-
|
|
136
|
+
u === "devices" && /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__devices", children: [
|
|
137
137
|
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__devices-toolbar", children: /* @__PURE__ */ e(
|
|
138
138
|
"input",
|
|
139
139
|
{
|
|
140
140
|
type: "search",
|
|
141
141
|
placeholder: "Search devices...",
|
|
142
|
-
value:
|
|
143
|
-
onChange: (
|
|
142
|
+
value: x,
|
|
143
|
+
onChange: (f) => R(f.target.value)
|
|
144
144
|
}
|
|
145
145
|
) }),
|
|
146
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-grid", children:
|
|
147
|
-
|
|
146
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-grid", children: M.map((f) => /* @__PURE__ */ e(
|
|
147
|
+
se,
|
|
148
148
|
{
|
|
149
|
-
device:
|
|
150
|
-
isSelected: (
|
|
151
|
-
onSelect: () =>
|
|
149
|
+
device: f,
|
|
150
|
+
isSelected: (N == null ? void 0 : N.id) === f.id,
|
|
151
|
+
onSelect: () => L(f)
|
|
152
152
|
},
|
|
153
|
-
|
|
153
|
+
f.id
|
|
154
154
|
)) }),
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
N && /* @__PURE__ */ e(
|
|
156
|
+
le,
|
|
157
157
|
{
|
|
158
|
-
device:
|
|
159
|
-
onCommand:
|
|
160
|
-
onClose: () =>
|
|
158
|
+
device: N,
|
|
159
|
+
onCommand: d,
|
|
160
|
+
onClose: () => v(null)
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
163
|
] }),
|
|
164
|
-
|
|
165
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
164
|
+
u === "alarms" && /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarms", children: /* @__PURE__ */ a("table", { className: "nice-iot-dashboard__alarm-table", children: [
|
|
165
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
166
166
|
/* @__PURE__ */ e("th", { children: "Severity" }),
|
|
167
167
|
/* @__PURE__ */ e("th", { children: "Device" }),
|
|
168
168
|
/* @__PURE__ */ e("th", { children: "Message" }),
|
|
@@ -170,38 +170,38 @@ function re({
|
|
|
170
170
|
/* @__PURE__ */ e("th", { children: "Status" }),
|
|
171
171
|
/* @__PURE__ */ e("th", { children: "Actions" })
|
|
172
172
|
] }) }),
|
|
173
|
-
/* @__PURE__ */ e("tbody", { children: I.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 6, className: "nice-iot-dashboard__no-alarms", children: "No active alarms" }) }) : I.map((
|
|
174
|
-
const
|
|
175
|
-
return /* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ e("tbody", { children: I.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 6, className: "nice-iot-dashboard__no-alarms", children: "No active alarms" }) }) : I.map((f) => {
|
|
174
|
+
const S = r.find((T) => T.id === f.deviceId);
|
|
175
|
+
return /* @__PURE__ */ a(
|
|
176
176
|
"tr",
|
|
177
177
|
{
|
|
178
|
-
className: `nice-iot-dashboard__alarm-row nice-iot-dashboard__alarm-row--${
|
|
178
|
+
className: `nice-iot-dashboard__alarm-row nice-iot-dashboard__alarm-row--${f.severity}`,
|
|
179
179
|
children: [
|
|
180
180
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
|
|
181
181
|
"span",
|
|
182
182
|
{
|
|
183
|
-
className: `nice-iot-dashboard__severity nice-iot-dashboard__severity--${
|
|
184
|
-
children:
|
|
183
|
+
className: `nice-iot-dashboard__severity nice-iot-dashboard__severity--${f.severity}`,
|
|
184
|
+
children: f.severity
|
|
185
185
|
}
|
|
186
186
|
) }),
|
|
187
|
-
/* @__PURE__ */ e("td", { children: (
|
|
188
|
-
/* @__PURE__ */ e("td", { children:
|
|
189
|
-
/* @__PURE__ */ e("td", { children:
|
|
190
|
-
/* @__PURE__ */ e("td", { children:
|
|
191
|
-
/* @__PURE__ */ e("td", { children: !
|
|
187
|
+
/* @__PURE__ */ e("td", { children: (S == null ? void 0 : S.name) || f.deviceId }),
|
|
188
|
+
/* @__PURE__ */ e("td", { children: f.message }),
|
|
189
|
+
/* @__PURE__ */ e("td", { children: f.timestamp.toLocaleString() }),
|
|
190
|
+
/* @__PURE__ */ e("td", { children: f.acknowledged ? "Acknowledged" : "Active" }),
|
|
191
|
+
/* @__PURE__ */ e("td", { children: !f.acknowledged && /* @__PURE__ */ e("button", { onClick: () => $(f.id), children: "Acknowledge" }) })
|
|
192
192
|
]
|
|
193
193
|
},
|
|
194
|
-
|
|
194
|
+
f.id
|
|
195
195
|
);
|
|
196
196
|
}) })
|
|
197
197
|
] }) })
|
|
198
198
|
] });
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
return
|
|
200
|
+
function oe(r) {
|
|
201
|
+
return r.length === 0 ? 0 : Math.max(...r.map((i) => i.position.y + i.position.height));
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
switch (
|
|
203
|
+
function A(r) {
|
|
204
|
+
switch (r) {
|
|
205
205
|
case "online":
|
|
206
206
|
return "var(--nice-success, #28a745)";
|
|
207
207
|
case "offline":
|
|
@@ -216,76 +216,76 @@ function U(a) {
|
|
|
216
216
|
return "var(--nice-text-secondary, #6c757d)";
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
widget:
|
|
221
|
-
devices:
|
|
222
|
-
alarms:
|
|
223
|
-
isEditing:
|
|
224
|
-
onCommand:
|
|
225
|
-
onDelete:
|
|
219
|
+
function de({
|
|
220
|
+
widget: r,
|
|
221
|
+
devices: i,
|
|
222
|
+
alarms: c,
|
|
223
|
+
isEditing: n,
|
|
224
|
+
onCommand: o,
|
|
225
|
+
onDelete: d
|
|
226
226
|
}) {
|
|
227
|
-
const
|
|
228
|
-
return /* @__PURE__ */
|
|
227
|
+
const t = F.find((l) => l.type === r.type);
|
|
228
|
+
return /* @__PURE__ */ a(
|
|
229
229
|
"div",
|
|
230
230
|
{
|
|
231
|
-
className: `nice-iot-dashboard__widget nice-iot-dashboard__widget--${
|
|
231
|
+
className: `nice-iot-dashboard__widget nice-iot-dashboard__widget--${r.type}`,
|
|
232
232
|
style: {
|
|
233
|
-
gridColumn: `span ${
|
|
234
|
-
gridRow: `span ${
|
|
233
|
+
gridColumn: `span ${r.position.width}`,
|
|
234
|
+
gridRow: `span ${r.position.height}`
|
|
235
235
|
},
|
|
236
236
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-icon", children:
|
|
239
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-title", children:
|
|
240
|
-
|
|
237
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__widget-header", children: [
|
|
238
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-icon", children: t == null ? void 0 : t.icon }),
|
|
239
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-title", children: r.title }),
|
|
240
|
+
n && /* @__PURE__ */ e("button", { className: "nice-iot-dashboard__widget-delete", onClick: d, children: "×" })
|
|
241
241
|
] }),
|
|
242
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-content", children: /* @__PURE__ */ e(
|
|
242
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-content", children: /* @__PURE__ */ e(te, { widget: r, devices: i, alarms: c, onCommand: o }) })
|
|
243
243
|
]
|
|
244
244
|
}
|
|
245
245
|
);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
widget:
|
|
249
|
-
devices:
|
|
250
|
-
alarms:
|
|
251
|
-
onCommand:
|
|
247
|
+
function te({
|
|
248
|
+
widget: r,
|
|
249
|
+
devices: i,
|
|
250
|
+
alarms: c,
|
|
251
|
+
onCommand: n
|
|
252
252
|
}) {
|
|
253
|
-
switch (
|
|
253
|
+
switch (r.type) {
|
|
254
254
|
case "device-list":
|
|
255
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-list", children:
|
|
255
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-list", children: i.slice(0, 10).map((o) => /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__device-list-item", children: [
|
|
256
256
|
/* @__PURE__ */ e(
|
|
257
257
|
"span",
|
|
258
258
|
{
|
|
259
259
|
className: "nice-iot-dashboard__device-status",
|
|
260
|
-
style: { background:
|
|
260
|
+
style: { background: A(o.status) }
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
|
-
/* @__PURE__ */ e("span", { children:
|
|
264
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__device-type", children:
|
|
265
|
-
] },
|
|
263
|
+
/* @__PURE__ */ e("span", { children: o.name }),
|
|
264
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__device-type", children: o.type })
|
|
265
|
+
] }, o.id)) });
|
|
266
266
|
case "device-status":
|
|
267
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__status-grid", children: ["online", "offline", "warning", "error"].map((
|
|
268
|
-
const
|
|
269
|
-
return /* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__status-grid", children: ["online", "offline", "warning", "error"].map((o) => {
|
|
268
|
+
const d = i.filter((t) => t.status === o).length;
|
|
269
|
+
return /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__status-card", children: [
|
|
270
270
|
/* @__PURE__ */ e(
|
|
271
271
|
"span",
|
|
272
272
|
{
|
|
273
273
|
className: "nice-iot-dashboard__status-indicator",
|
|
274
|
-
style: { background:
|
|
274
|
+
style: { background: A(o) }
|
|
275
275
|
}
|
|
276
276
|
),
|
|
277
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-count", children:
|
|
278
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-label", children:
|
|
279
|
-
] },
|
|
277
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-count", children: d }),
|
|
278
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-label", children: o })
|
|
279
|
+
] }, o);
|
|
280
280
|
}) });
|
|
281
281
|
case "telemetry-chart":
|
|
282
|
-
return /* @__PURE__ */
|
|
282
|
+
return /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__chart-placeholder", children: [
|
|
283
283
|
/* @__PURE__ */ e("span", { children: "📈" }),
|
|
284
284
|
/* @__PURE__ */ e("span", { children: "Telemetry Chart" }),
|
|
285
285
|
/* @__PURE__ */ e("small", { children: "Configure device and capability" })
|
|
286
286
|
] });
|
|
287
287
|
case "gauge":
|
|
288
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__gauge", children: /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__gauge", children: /* @__PURE__ */ a("svg", { viewBox: "0 0 100 60", children: [
|
|
289
289
|
/* @__PURE__ */ e("path", { d: "M 10 55 A 40 40 0 0 1 90 55", fill: "none", stroke: "var(--nice-border, #e0e0e0)", strokeWidth: "8" }),
|
|
290
290
|
/* @__PURE__ */ e(
|
|
291
291
|
"path",
|
|
@@ -300,80 +300,80 @@ function V({
|
|
|
300
300
|
/* @__PURE__ */ e("text", { x: "50", y: "50", textAnchor: "middle", fontSize: "14", fontWeight: "bold", children: "50%" })
|
|
301
301
|
] }) });
|
|
302
302
|
case "map":
|
|
303
|
-
return /* @__PURE__ */
|
|
303
|
+
return /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__map-placeholder", children: [
|
|
304
304
|
/* @__PURE__ */ e("span", { children: "🗺️" }),
|
|
305
305
|
/* @__PURE__ */ e("span", { children: "Device Map" }),
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
|
|
306
|
+
/* @__PURE__ */ a("small", { children: [
|
|
307
|
+
i.filter((o) => o.location).length,
|
|
308
308
|
" devices with location"
|
|
309
309
|
] })
|
|
310
310
|
] });
|
|
311
311
|
case "alarms": {
|
|
312
|
-
const
|
|
313
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-list", children:
|
|
312
|
+
const o = c.filter((d) => !d.cleared).slice(0, 5);
|
|
313
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-list", children: o.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-empty", children: "No active alarms" }) : o.map((d) => /* @__PURE__ */ a(
|
|
314
314
|
"div",
|
|
315
315
|
{
|
|
316
|
-
className: `nice-iot-dashboard__alarm-item nice-iot-dashboard__alarm-item--${
|
|
316
|
+
className: `nice-iot-dashboard__alarm-item nice-iot-dashboard__alarm-item--${d.severity}`,
|
|
317
317
|
children: [
|
|
318
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__alarm-severity", children:
|
|
319
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__alarm-message", children:
|
|
318
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__alarm-severity", children: d.severity }),
|
|
319
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__alarm-message", children: d.message })
|
|
320
320
|
]
|
|
321
321
|
},
|
|
322
|
-
|
|
322
|
+
d.id
|
|
323
323
|
)) });
|
|
324
324
|
}
|
|
325
325
|
case "control-panel":
|
|
326
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__control-placeholder", children: [
|
|
327
327
|
/* @__PURE__ */ e("span", { children: "🎛️" }),
|
|
328
328
|
/* @__PURE__ */ e("span", { children: "Control Panel" }),
|
|
329
329
|
/* @__PURE__ */ e("small", { children: "Configure device controls" })
|
|
330
330
|
] });
|
|
331
331
|
case "kpi":
|
|
332
|
-
return /* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-value", children:
|
|
332
|
+
return /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__kpi", children: [
|
|
333
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-value", children: i.length }),
|
|
334
334
|
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-label", children: "Total Devices" })
|
|
335
335
|
] });
|
|
336
336
|
default:
|
|
337
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-placeholder", children:
|
|
337
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-placeholder", children: r.type });
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
return /* @__PURE__ */
|
|
340
|
+
function se({ device: r, isSelected: i, onSelect: c }) {
|
|
341
|
+
return /* @__PURE__ */ a(
|
|
342
342
|
"div",
|
|
343
343
|
{
|
|
344
|
-
className: `nice-iot-dashboard__device-card ${
|
|
345
|
-
onClick:
|
|
344
|
+
className: `nice-iot-dashboard__device-card ${i ? "nice-iot-dashboard__device-card--selected" : ""}`,
|
|
345
|
+
onClick: c,
|
|
346
346
|
children: [
|
|
347
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__device-card-header", children: [
|
|
348
348
|
/* @__PURE__ */ e(
|
|
349
349
|
"span",
|
|
350
350
|
{
|
|
351
351
|
className: "nice-iot-dashboard__device-status",
|
|
352
|
-
style: { background:
|
|
352
|
+
style: { background: A(r.status) }
|
|
353
353
|
}
|
|
354
354
|
),
|
|
355
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__device-name", children:
|
|
355
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__device-name", children: r.name })
|
|
356
356
|
] }),
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__device-card-body", children: [
|
|
358
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__device-info", children: [
|
|
359
|
+
/* @__PURE__ */ a("span", { children: [
|
|
360
360
|
"Type: ",
|
|
361
|
-
|
|
361
|
+
r.type
|
|
362
362
|
] }),
|
|
363
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ a("span", { children: [
|
|
364
364
|
"Protocol: ",
|
|
365
|
-
|
|
365
|
+
r.protocol
|
|
366
366
|
] })
|
|
367
367
|
] }),
|
|
368
|
-
|
|
368
|
+
r.lastSeen && /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__device-lastseen", children: [
|
|
369
369
|
"Last seen: ",
|
|
370
|
-
|
|
370
|
+
r.lastSeen.toLocaleString()
|
|
371
371
|
] }),
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__device-capabilities", children: [
|
|
373
|
+
r.capabilities.slice(0, 3).map((n) => /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-badge", children: n.name }, n.id)),
|
|
374
|
+
r.capabilities.length > 3 && /* @__PURE__ */ a("span", { className: "nice-iot-dashboard__capability-more", children: [
|
|
375
375
|
"+",
|
|
376
|
-
|
|
376
|
+
r.capabilities.length - 3
|
|
377
377
|
] })
|
|
378
378
|
] })
|
|
379
379
|
] })
|
|
@@ -381,80 +381,80 @@ function j({ device: a, isSelected: t, onSelect: n }) {
|
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
device:
|
|
386
|
-
onCommand:
|
|
387
|
-
onClose:
|
|
384
|
+
function le({
|
|
385
|
+
device: r,
|
|
386
|
+
onCommand: i,
|
|
387
|
+
onClose: c
|
|
388
388
|
}) {
|
|
389
|
-
return /* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */ e("h3", { children:
|
|
392
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
389
|
+
return /* @__PURE__ */ a("aside", { className: "nice-iot-dashboard__device-detail", children: [
|
|
390
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__device-detail-header", children: [
|
|
391
|
+
/* @__PURE__ */ e("h3", { children: r.name }),
|
|
392
|
+
/* @__PURE__ */ e("button", { onClick: c, children: "×" })
|
|
393
393
|
] }),
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__device-detail-content", children: [
|
|
395
|
+
/* @__PURE__ */ a("section", { children: [
|
|
396
396
|
/* @__PURE__ */ e("h4", { children: "Status" }),
|
|
397
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
398
398
|
/* @__PURE__ */ e("span", { children: "Status:" }),
|
|
399
399
|
/* @__PURE__ */ e(
|
|
400
400
|
"span",
|
|
401
401
|
{
|
|
402
402
|
className: "nice-iot-dashboard__status-badge",
|
|
403
|
-
style: { background:
|
|
404
|
-
children:
|
|
403
|
+
style: { background: A(r.status) },
|
|
404
|
+
children: r.status
|
|
405
405
|
}
|
|
406
406
|
)
|
|
407
407
|
] }),
|
|
408
|
-
|
|
408
|
+
r.lastSeen && /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
409
409
|
/* @__PURE__ */ e("span", { children: "Last Seen:" }),
|
|
410
|
-
/* @__PURE__ */ e("span", { children:
|
|
410
|
+
/* @__PURE__ */ e("span", { children: r.lastSeen.toLocaleString() })
|
|
411
411
|
] })
|
|
412
412
|
] }),
|
|
413
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ a("section", { children: [
|
|
414
414
|
/* @__PURE__ */ e("h4", { children: "Connection" }),
|
|
415
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ a("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
416
416
|
/* @__PURE__ */ e("span", { children: "Protocol:" }),
|
|
417
|
-
/* @__PURE__ */ e("span", { children:
|
|
417
|
+
/* @__PURE__ */ e("span", { children: r.protocol })
|
|
418
418
|
] }),
|
|
419
|
-
|
|
419
|
+
r.connectionInfo.host && /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
420
420
|
/* @__PURE__ */ e("span", { children: "Host:" }),
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
|
|
421
|
+
/* @__PURE__ */ a("span", { children: [
|
|
422
|
+
r.connectionInfo.host,
|
|
423
423
|
":",
|
|
424
|
-
|
|
424
|
+
r.connectionInfo.port
|
|
425
425
|
] })
|
|
426
426
|
] })
|
|
427
427
|
] }),
|
|
428
|
-
|
|
428
|
+
r.metadata && /* @__PURE__ */ a("section", { children: [
|
|
429
429
|
/* @__PURE__ */ e("h4", { children: "Metadata" }),
|
|
430
|
-
|
|
430
|
+
r.metadata.manufacturer && /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
431
431
|
/* @__PURE__ */ e("span", { children: "Manufacturer:" }),
|
|
432
|
-
/* @__PURE__ */ e("span", { children:
|
|
432
|
+
/* @__PURE__ */ e("span", { children: r.metadata.manufacturer })
|
|
433
433
|
] }),
|
|
434
|
-
|
|
434
|
+
r.metadata.model && /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
435
435
|
/* @__PURE__ */ e("span", { children: "Model:" }),
|
|
436
|
-
/* @__PURE__ */ e("span", { children:
|
|
436
|
+
/* @__PURE__ */ e("span", { children: r.metadata.model })
|
|
437
437
|
] })
|
|
438
438
|
] }),
|
|
439
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ a("section", { children: [
|
|
440
440
|
/* @__PURE__ */ e("h4", { children: "Capabilities" }),
|
|
441
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__capabilities-list", children:
|
|
442
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-name", children:
|
|
443
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-type", children:
|
|
444
|
-
|
|
441
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__capabilities-list", children: r.capabilities.map((n) => /* @__PURE__ */ a("div", { className: "nice-iot-dashboard__capability-item", children: [
|
|
442
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-name", children: n.name }),
|
|
443
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-type", children: n.type }),
|
|
444
|
+
n.writable && i && /* @__PURE__ */ e(
|
|
445
445
|
"button",
|
|
446
446
|
{
|
|
447
447
|
className: "nice-iot-dashboard__capability-control",
|
|
448
|
-
onClick: () =>
|
|
448
|
+
onClick: () => i(r.id, n.id, !0),
|
|
449
449
|
children: "Control"
|
|
450
450
|
}
|
|
451
451
|
)
|
|
452
|
-
] },
|
|
452
|
+
] }, n.id)) })
|
|
453
453
|
] })
|
|
454
454
|
] })
|
|
455
455
|
] });
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const fe = [
|
|
458
458
|
{ name: "MQTT Broker", image: "eclipse-mosquitto:latest" },
|
|
459
459
|
{ name: "Node-RED", image: "nodered/node-red:latest" },
|
|
460
460
|
{ name: "InfluxDB", image: "influxdb:latest" },
|
|
@@ -462,110 +462,110 @@ const K = [
|
|
|
462
462
|
{ name: "Telegraf", image: "telegraf:latest" },
|
|
463
463
|
{ name: "Protocol Adapter", image: "nice2dev/protocol-adapter:latest" }
|
|
464
464
|
];
|
|
465
|
-
function
|
|
466
|
-
nodes:
|
|
467
|
-
modules:
|
|
468
|
-
onNodeSelect:
|
|
469
|
-
onModuleDeploy:
|
|
470
|
-
onModuleAction:
|
|
471
|
-
onNodeSync:
|
|
472
|
-
className:
|
|
465
|
+
function Ue({
|
|
466
|
+
nodes: r = [],
|
|
467
|
+
modules: i = [],
|
|
468
|
+
onNodeSelect: c,
|
|
469
|
+
onModuleDeploy: n,
|
|
470
|
+
onModuleAction: o,
|
|
471
|
+
onNodeSync: d,
|
|
472
|
+
className: t = ""
|
|
473
473
|
}) {
|
|
474
|
-
const [
|
|
474
|
+
const [l, g] = h(null), [m, C] = h("nodes"), [N, v] = h(!1), [u, _] = h({
|
|
475
475
|
name: "",
|
|
476
476
|
image: "",
|
|
477
477
|
status: "pending"
|
|
478
|
-
}),
|
|
479
|
-
(
|
|
480
|
-
|
|
478
|
+
}), H = w(
|
|
479
|
+
(y) => {
|
|
480
|
+
g(y), c == null || c(y);
|
|
481
481
|
},
|
|
482
|
-
[
|
|
483
|
-
),
|
|
484
|
-
!
|
|
485
|
-
}, [
|
|
486
|
-
async (
|
|
487
|
-
|
|
482
|
+
[c]
|
|
483
|
+
), P = w(async () => {
|
|
484
|
+
!l || !u.name || !u.image || (await (n == null ? void 0 : n(l.id, u)), v(!1), _({ name: "", image: "", status: "pending" }));
|
|
485
|
+
}, [l, u, n]), x = w(
|
|
486
|
+
async (y, k) => {
|
|
487
|
+
l && await (o == null ? void 0 : o(l.id, y, k));
|
|
488
488
|
},
|
|
489
|
-
[
|
|
490
|
-
),
|
|
491
|
-
|
|
492
|
-
}, [
|
|
493
|
-
return /* @__PURE__ */
|
|
494
|
-
/* @__PURE__ */
|
|
489
|
+
[l, o]
|
|
490
|
+
), R = w(async () => {
|
|
491
|
+
l && await (d == null ? void 0 : d(l.id));
|
|
492
|
+
}, [l, d]);
|
|
493
|
+
return /* @__PURE__ */ a("div", { className: `nice-edge-manager ${t}`, children: [
|
|
494
|
+
/* @__PURE__ */ a("header", { className: "nice-edge-manager__header", children: [
|
|
495
495
|
/* @__PURE__ */ e("h1", { children: "Edge Manager" }),
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ a("nav", { className: "nice-edge-manager__nav", children: [
|
|
497
|
+
/* @__PURE__ */ a("button", { className: m === "nodes" ? "active" : "", onClick: () => C("nodes"), children: [
|
|
498
498
|
"Nodes (",
|
|
499
|
-
|
|
499
|
+
r.length,
|
|
500
500
|
")"
|
|
501
501
|
] }),
|
|
502
|
-
/* @__PURE__ */ e("button", { className:
|
|
502
|
+
/* @__PURE__ */ e("button", { className: m === "modules" ? "active" : "", onClick: () => C("modules"), children: "Modules" })
|
|
503
503
|
] })
|
|
504
504
|
] }),
|
|
505
|
-
/* @__PURE__ */
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
505
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__main", children: [
|
|
506
|
+
m === "nodes" && /* @__PURE__ */ e("div", { className: "nice-edge-manager__nodes", children: /* @__PURE__ */ a("div", { className: "nice-edge-manager__node-grid", children: [
|
|
507
|
+
r.map((y) => /* @__PURE__ */ e(
|
|
508
|
+
pe,
|
|
509
509
|
{
|
|
510
|
-
node:
|
|
511
|
-
isSelected: (
|
|
512
|
-
onSelect: () =>
|
|
510
|
+
node: y,
|
|
511
|
+
isSelected: (l == null ? void 0 : l.id) === y.id,
|
|
512
|
+
onSelect: () => H(y)
|
|
513
513
|
},
|
|
514
|
-
|
|
514
|
+
y.id
|
|
515
515
|
)),
|
|
516
|
-
|
|
516
|
+
r.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: "No edge nodes configured" })
|
|
517
517
|
] }) }),
|
|
518
|
-
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
518
|
+
m === "modules" && l && /* @__PURE__ */ a("div", { className: "nice-edge-manager__modules", children: [
|
|
519
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__modules-header", children: [
|
|
520
|
+
/* @__PURE__ */ a("h3", { children: [
|
|
521
521
|
"Modules on ",
|
|
522
|
-
|
|
522
|
+
l.name
|
|
523
523
|
] }),
|
|
524
524
|
/* @__PURE__ */ e(
|
|
525
525
|
"button",
|
|
526
526
|
{
|
|
527
527
|
className: "nice-edge-manager__deploy-btn",
|
|
528
|
-
onClick: () =>
|
|
528
|
+
onClick: () => v(!0),
|
|
529
529
|
children: "+ Deploy Module"
|
|
530
530
|
}
|
|
531
531
|
)
|
|
532
532
|
] }),
|
|
533
|
-
/* @__PURE__ */
|
|
534
|
-
|
|
535
|
-
|
|
533
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__module-grid", children: [
|
|
534
|
+
l.deployedModules.map((y) => /* @__PURE__ */ e(
|
|
535
|
+
ye,
|
|
536
536
|
{
|
|
537
|
-
module:
|
|
538
|
-
onAction: (k) =>
|
|
537
|
+
module: y,
|
|
538
|
+
onAction: (k) => x(y.id, k)
|
|
539
539
|
},
|
|
540
|
-
|
|
540
|
+
y.id
|
|
541
541
|
)),
|
|
542
|
-
|
|
542
|
+
l.deployedModules.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: "No modules deployed on this node" })
|
|
543
543
|
] })
|
|
544
544
|
] }),
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
545
|
+
m === "modules" && !l && /* @__PURE__ */ e("div", { className: "nice-edge-manager__no-selection", children: "Select a node from the Nodes tab to manage modules" }),
|
|
546
|
+
l && /* @__PURE__ */ e(
|
|
547
|
+
he,
|
|
548
548
|
{
|
|
549
|
-
node:
|
|
550
|
-
onSync:
|
|
551
|
-
onClose: () =>
|
|
549
|
+
node: l,
|
|
550
|
+
onSync: R,
|
|
551
|
+
onClose: () => g(null)
|
|
552
552
|
}
|
|
553
553
|
)
|
|
554
554
|
] }),
|
|
555
|
-
|
|
556
|
-
|
|
555
|
+
N && /* @__PURE__ */ e(
|
|
556
|
+
ue,
|
|
557
557
|
{
|
|
558
|
-
config:
|
|
559
|
-
templates:
|
|
560
|
-
onChange:
|
|
561
|
-
onDeploy:
|
|
562
|
-
onClose: () =>
|
|
558
|
+
config: u,
|
|
559
|
+
templates: fe,
|
|
560
|
+
onChange: _,
|
|
561
|
+
onDeploy: P,
|
|
562
|
+
onClose: () => v(!1)
|
|
563
563
|
}
|
|
564
564
|
)
|
|
565
565
|
] });
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
switch (
|
|
567
|
+
function J(r) {
|
|
568
|
+
switch (r) {
|
|
569
569
|
case "running":
|
|
570
570
|
return "var(--nice-success, #28a745)";
|
|
571
571
|
case "stopped":
|
|
@@ -580,75 +580,75 @@ function q(a) {
|
|
|
580
580
|
return "var(--nice-text-secondary, #6c757d)";
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
return
|
|
583
|
+
function W(r) {
|
|
584
|
+
return r < 1024 ? `${r} B` : r < 1024 * 1024 ? `${(r / 1024).toFixed(1)} KB` : r < 1024 * 1024 * 1024 ? `${(r / 1024 / 1024).toFixed(1)} MB` : `${(r / 1024 / 1024 / 1024).toFixed(2)} GB`;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
587
|
-
const
|
|
588
|
-
return
|
|
586
|
+
function me(r) {
|
|
587
|
+
const i = Math.floor(r / 86400), c = Math.floor(r % 86400 / 3600), n = Math.floor(r % 3600 / 60);
|
|
588
|
+
return i > 0 ? `${i}d ${c}h` : c > 0 ? `${c}h ${n}m` : `${n}m`;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
591
|
-
return /* @__PURE__ */
|
|
590
|
+
function pe({ node: r, isSelected: i, onSelect: c }) {
|
|
591
|
+
return /* @__PURE__ */ a(
|
|
592
592
|
"div",
|
|
593
593
|
{
|
|
594
|
-
className: `nice-edge-manager__node-card ${
|
|
595
|
-
onClick:
|
|
594
|
+
className: `nice-edge-manager__node-card ${i ? "nice-edge-manager__node-card--selected" : ""}`,
|
|
595
|
+
onClick: c,
|
|
596
596
|
children: [
|
|
597
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__node-header", children: [
|
|
598
598
|
/* @__PURE__ */ e(
|
|
599
599
|
"span",
|
|
600
600
|
{
|
|
601
601
|
className: "nice-edge-manager__node-status",
|
|
602
|
-
style: { background:
|
|
602
|
+
style: { background: J(r.status) }
|
|
603
603
|
}
|
|
604
604
|
),
|
|
605
|
-
/* @__PURE__ */ e("span", { className: "nice-edge-manager__node-name", children:
|
|
606
|
-
/* @__PURE__ */ e("span", { className: "nice-edge-manager__node-type", children:
|
|
605
|
+
/* @__PURE__ */ e("span", { className: "nice-edge-manager__node-name", children: r.name }),
|
|
606
|
+
/* @__PURE__ */ e("span", { className: "nice-edge-manager__node-type", children: r.type })
|
|
607
607
|
] }),
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__node-body", children: [
|
|
609
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__node-info", children: [
|
|
610
|
+
/* @__PURE__ */ a("span", { children: [
|
|
611
611
|
"🖥️ ",
|
|
612
|
-
|
|
612
|
+
r.hardware.cpu
|
|
613
613
|
] }),
|
|
614
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ a("span", { children: [
|
|
615
615
|
"💾 ",
|
|
616
|
-
(
|
|
616
|
+
(r.hardware.memoryMB / 1024).toFixed(1),
|
|
617
617
|
" GB"
|
|
618
618
|
] })
|
|
619
619
|
] }),
|
|
620
|
-
/* @__PURE__ */ e("div", { className: "nice-edge-manager__node-metrics", children:
|
|
621
|
-
/* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ e("div", { className: "nice-edge-manager__node-metrics", children: r.metrics && /* @__PURE__ */ a(E, { children: [
|
|
621
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__metric", children: [
|
|
622
622
|
/* @__PURE__ */ e("span", { className: "nice-edge-manager__metric-label", children: "CPU" }),
|
|
623
623
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__metric-bar", children: /* @__PURE__ */ e(
|
|
624
624
|
"div",
|
|
625
625
|
{
|
|
626
626
|
className: "nice-edge-manager__metric-fill",
|
|
627
|
-
style: { width: `${
|
|
627
|
+
style: { width: `${r.metrics.cpuUsage}%` }
|
|
628
628
|
}
|
|
629
629
|
) }),
|
|
630
|
-
/* @__PURE__ */
|
|
631
|
-
|
|
630
|
+
/* @__PURE__ */ a("span", { className: "nice-edge-manager__metric-value", children: [
|
|
631
|
+
r.metrics.cpuUsage.toFixed(0),
|
|
632
632
|
"%"
|
|
633
633
|
] })
|
|
634
634
|
] }),
|
|
635
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__metric", children: [
|
|
636
636
|
/* @__PURE__ */ e("span", { className: "nice-edge-manager__metric-label", children: "MEM" }),
|
|
637
637
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__metric-bar", children: /* @__PURE__ */ e(
|
|
638
638
|
"div",
|
|
639
639
|
{
|
|
640
640
|
className: "nice-edge-manager__metric-fill",
|
|
641
|
-
style: { width: `${
|
|
641
|
+
style: { width: `${r.metrics.memoryUsage}%` }
|
|
642
642
|
}
|
|
643
643
|
) }),
|
|
644
|
-
/* @__PURE__ */
|
|
645
|
-
|
|
644
|
+
/* @__PURE__ */ a("span", { className: "nice-edge-manager__metric-value", children: [
|
|
645
|
+
r.metrics.memoryUsage.toFixed(0),
|
|
646
646
|
"%"
|
|
647
647
|
] })
|
|
648
648
|
] })
|
|
649
649
|
] }) }),
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
|
|
650
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__node-modules", children: [
|
|
651
|
+
r.deployedModules.length,
|
|
652
652
|
" modules deployed"
|
|
653
653
|
] })
|
|
654
654
|
] })
|
|
@@ -656,9 +656,9 @@ function z({ node: a, isSelected: t, onSelect: n }) {
|
|
|
656
656
|
}
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
return /* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
659
|
+
function ye({ module: r, onAction: i }) {
|
|
660
|
+
return /* @__PURE__ */ a("div", { className: "nice-edge-manager__module-card", children: [
|
|
661
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__module-header", children: [
|
|
662
662
|
/* @__PURE__ */ e(
|
|
663
663
|
"span",
|
|
664
664
|
{
|
|
@@ -668,284 +668,1992 @@ function J({ module: a, onAction: t }) {
|
|
|
668
668
|
stopped: "var(--nice-text-secondary, #6c757d)",
|
|
669
669
|
error: "var(--nice-danger, #dc3545)",
|
|
670
670
|
pending: "var(--nice-warning, #ffc107)"
|
|
671
|
-
}[
|
|
671
|
+
}[r.status] || "var(--nice-text-secondary, #6c757d)" }
|
|
672
672
|
}
|
|
673
673
|
),
|
|
674
|
-
/* @__PURE__ */ e("span", { className: "nice-edge-manager__module-name", children:
|
|
675
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ e("span", { className: "nice-edge-manager__module-name", children: r.name }),
|
|
675
|
+
/* @__PURE__ */ a("span", { className: "nice-edge-manager__module-version", children: [
|
|
676
676
|
"v",
|
|
677
|
-
|
|
677
|
+
r.version
|
|
678
678
|
] })
|
|
679
679
|
] }),
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */ e("div", { className: "nice-edge-manager__module-image", children:
|
|
682
|
-
|
|
683
|
-
|
|
680
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__module-body", children: [
|
|
681
|
+
/* @__PURE__ */ e("div", { className: "nice-edge-manager__module-image", children: r.image }),
|
|
682
|
+
r.resources && /* @__PURE__ */ a("div", { className: "nice-edge-manager__module-resources", children: [
|
|
683
|
+
r.resources.cpuLimit && /* @__PURE__ */ a("span", { children: [
|
|
684
684
|
"CPU: ",
|
|
685
|
-
|
|
685
|
+
r.resources.cpuLimit
|
|
686
686
|
] }),
|
|
687
|
-
|
|
687
|
+
r.resources.memoryLimitMB && /* @__PURE__ */ a("span", { children: [
|
|
688
688
|
"RAM: ",
|
|
689
|
-
|
|
689
|
+
r.resources.memoryLimitMB,
|
|
690
690
|
" MB"
|
|
691
691
|
] })
|
|
692
692
|
] }),
|
|
693
|
-
|
|
693
|
+
r.ports && r.ports.length > 0 && /* @__PURE__ */ a("div", { className: "nice-edge-manager__module-ports", children: [
|
|
694
694
|
"Ports: ",
|
|
695
|
-
|
|
695
|
+
r.ports.map((n) => `${n.host}:${n.container}`).join(", ")
|
|
696
696
|
] })
|
|
697
697
|
] }),
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
|
|
700
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
701
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
698
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__module-actions", children: [
|
|
699
|
+
r.status === "running" && /* @__PURE__ */ a(E, { children: [
|
|
700
|
+
/* @__PURE__ */ e("button", { onClick: () => i("stop"), children: "Stop" }),
|
|
701
|
+
/* @__PURE__ */ e("button", { onClick: () => i("restart"), children: "Restart" })
|
|
702
702
|
] }),
|
|
703
|
-
|
|
704
|
-
/* @__PURE__ */ e("button", { className: "nice-edge-manager__module-remove", onClick: () =>
|
|
703
|
+
r.status === "stopped" && /* @__PURE__ */ e("button", { onClick: () => i("start"), children: "Start" }),
|
|
704
|
+
/* @__PURE__ */ e("button", { className: "nice-edge-manager__module-remove", onClick: () => i("remove"), children: "Remove" })
|
|
705
705
|
] })
|
|
706
706
|
] });
|
|
707
707
|
}
|
|
708
|
-
function
|
|
709
|
-
return /* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */ e("h3", { children:
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
714
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
708
|
+
function he({ node: r, onSync: i, onClose: c }) {
|
|
709
|
+
return /* @__PURE__ */ a("aside", { className: "nice-edge-manager__detail", children: [
|
|
710
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-header", children: [
|
|
711
|
+
/* @__PURE__ */ e("h3", { children: r.name }),
|
|
712
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-actions", children: [
|
|
713
|
+
/* @__PURE__ */ e("button", { onClick: i, children: "🔄 Sync" }),
|
|
714
|
+
/* @__PURE__ */ e("button", { onClick: c, children: "×" })
|
|
715
715
|
] })
|
|
716
716
|
] }),
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-content", children: [
|
|
718
|
+
/* @__PURE__ */ a("section", { children: [
|
|
719
719
|
/* @__PURE__ */ e("h4", { children: "Status" }),
|
|
720
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
721
721
|
/* @__PURE__ */ e("span", { children: "Status:" }),
|
|
722
722
|
/* @__PURE__ */ e(
|
|
723
723
|
"span",
|
|
724
724
|
{
|
|
725
725
|
className: "nice-edge-manager__status-badge",
|
|
726
|
-
style: { background:
|
|
727
|
-
children:
|
|
726
|
+
style: { background: J(r.status) },
|
|
727
|
+
children: r.status
|
|
728
728
|
}
|
|
729
729
|
)
|
|
730
730
|
] }),
|
|
731
|
-
|
|
731
|
+
r.metrics && /* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
732
732
|
/* @__PURE__ */ e("span", { children: "Uptime:" }),
|
|
733
|
-
/* @__PURE__ */ e("span", { children:
|
|
733
|
+
/* @__PURE__ */ e("span", { children: me(r.metrics.uptime) })
|
|
734
734
|
] })
|
|
735
735
|
] }),
|
|
736
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ a("section", { children: [
|
|
737
737
|
/* @__PURE__ */ e("h4", { children: "Hardware" }),
|
|
738
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
739
739
|
/* @__PURE__ */ e("span", { children: "CPU:" }),
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
|
|
740
|
+
/* @__PURE__ */ a("span", { children: [
|
|
741
|
+
r.hardware.cpu,
|
|
742
742
|
" (",
|
|
743
|
-
|
|
743
|
+
r.hardware.cores,
|
|
744
744
|
" cores)"
|
|
745
745
|
] })
|
|
746
746
|
] }),
|
|
747
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
748
748
|
/* @__PURE__ */ e("span", { children: "Memory:" }),
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
-
(
|
|
749
|
+
/* @__PURE__ */ a("span", { children: [
|
|
750
|
+
(r.hardware.memoryMB / 1024).toFixed(1),
|
|
751
751
|
" GB"
|
|
752
752
|
] })
|
|
753
753
|
] }),
|
|
754
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
755
755
|
/* @__PURE__ */ e("span", { children: "Storage:" }),
|
|
756
|
-
/* @__PURE__ */
|
|
757
|
-
(
|
|
756
|
+
/* @__PURE__ */ a("span", { children: [
|
|
757
|
+
(r.hardware.storageMB / 1024).toFixed(1),
|
|
758
758
|
" GB"
|
|
759
759
|
] })
|
|
760
760
|
] }),
|
|
761
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
762
762
|
/* @__PURE__ */ e("span", { children: "Architecture:" }),
|
|
763
|
-
/* @__PURE__ */ e("span", { children:
|
|
763
|
+
/* @__PURE__ */ e("span", { children: r.hardware.architecture })
|
|
764
764
|
] })
|
|
765
765
|
] }),
|
|
766
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ a("section", { children: [
|
|
767
767
|
/* @__PURE__ */ e("h4", { children: "Software" }),
|
|
768
|
-
/* @__PURE__ */
|
|
768
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
769
769
|
/* @__PURE__ */ e("span", { children: "OS:" }),
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
|
|
770
|
+
/* @__PURE__ */ a("span", { children: [
|
|
771
|
+
r.software.os,
|
|
772
772
|
" ",
|
|
773
|
-
|
|
773
|
+
r.software.osVersion
|
|
774
774
|
] })
|
|
775
775
|
] }),
|
|
776
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
777
777
|
/* @__PURE__ */ e("span", { children: "Runtime:" }),
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
|
|
778
|
+
/* @__PURE__ */ a("span", { children: [
|
|
779
|
+
r.software.runtime,
|
|
780
780
|
" ",
|
|
781
|
-
|
|
781
|
+
r.software.runtimeVersion
|
|
782
782
|
] })
|
|
783
783
|
] }),
|
|
784
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
785
785
|
/* @__PURE__ */ e("span", { children: "Agent:" }),
|
|
786
|
-
/* @__PURE__ */
|
|
787
|
-
|
|
786
|
+
/* @__PURE__ */ a("span", { children: [
|
|
787
|
+
r.software.agent,
|
|
788
788
|
" v",
|
|
789
|
-
|
|
789
|
+
r.software.agentVersion
|
|
790
790
|
] })
|
|
791
791
|
] })
|
|
792
792
|
] }),
|
|
793
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ a("section", { children: [
|
|
794
794
|
/* @__PURE__ */ e("h4", { children: "Connectivity" }),
|
|
795
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
796
796
|
/* @__PURE__ */ e("span", { children: "Cloud:" }),
|
|
797
|
-
/* @__PURE__ */ e("span", { children:
|
|
797
|
+
/* @__PURE__ */ e("span", { children: r.connectivity.cloudConnected ? "✓ Connected" : "✗ Disconnected" })
|
|
798
798
|
] }),
|
|
799
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
800
800
|
/* @__PURE__ */ e("span", { children: "Network:" }),
|
|
801
|
-
/* @__PURE__ */ e("span", { children:
|
|
801
|
+
/* @__PURE__ */ e("span", { children: r.connectivity.localNetwork })
|
|
802
802
|
] }),
|
|
803
|
-
|
|
803
|
+
r.connectivity.publicIP && /* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
804
804
|
/* @__PURE__ */ e("span", { children: "Public IP:" }),
|
|
805
|
-
/* @__PURE__ */ e("span", { children:
|
|
805
|
+
/* @__PURE__ */ e("span", { children: r.connectivity.publicIP })
|
|
806
806
|
] }),
|
|
807
|
-
|
|
807
|
+
r.connectivity.lastSync && /* @__PURE__ */ a("div", { className: "nice-edge-manager__detail-row", children: [
|
|
808
808
|
/* @__PURE__ */ e("span", { children: "Last Sync:" }),
|
|
809
|
-
/* @__PURE__ */ e("span", { children:
|
|
809
|
+
/* @__PURE__ */ e("span", { children: r.connectivity.lastSync.toLocaleString() })
|
|
810
810
|
] })
|
|
811
811
|
] }),
|
|
812
|
-
|
|
812
|
+
r.metrics && /* @__PURE__ */ a("section", { children: [
|
|
813
813
|
/* @__PURE__ */ e("h4", { children: "Resource Usage" }),
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__resource-chart", children: [
|
|
815
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__resource-item", children: [
|
|
816
816
|
/* @__PURE__ */ e("span", { children: "CPU" }),
|
|
817
817
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
|
|
818
818
|
"div",
|
|
819
819
|
{
|
|
820
820
|
className: "nice-edge-manager__resource-fill",
|
|
821
|
-
style: { width: `${
|
|
821
|
+
style: { width: `${r.metrics.cpuUsage}%` }
|
|
822
822
|
}
|
|
823
823
|
) }),
|
|
824
|
-
/* @__PURE__ */
|
|
825
|
-
|
|
824
|
+
/* @__PURE__ */ a("span", { children: [
|
|
825
|
+
r.metrics.cpuUsage.toFixed(1),
|
|
826
826
|
"%"
|
|
827
827
|
] })
|
|
828
828
|
] }),
|
|
829
|
-
/* @__PURE__ */
|
|
829
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__resource-item", children: [
|
|
830
830
|
/* @__PURE__ */ e("span", { children: "Memory" }),
|
|
831
831
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
|
|
832
832
|
"div",
|
|
833
833
|
{
|
|
834
834
|
className: "nice-edge-manager__resource-fill",
|
|
835
|
-
style: { width: `${
|
|
835
|
+
style: { width: `${r.metrics.memoryUsage}%` }
|
|
836
836
|
}
|
|
837
837
|
) }),
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
|
|
838
|
+
/* @__PURE__ */ a("span", { children: [
|
|
839
|
+
r.metrics.memoryUsage.toFixed(1),
|
|
840
840
|
"%"
|
|
841
841
|
] })
|
|
842
842
|
] }),
|
|
843
|
-
/* @__PURE__ */
|
|
843
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__resource-item", children: [
|
|
844
844
|
/* @__PURE__ */ e("span", { children: "Disk" }),
|
|
845
845
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
|
|
846
846
|
"div",
|
|
847
847
|
{
|
|
848
848
|
className: "nice-edge-manager__resource-fill",
|
|
849
|
-
style: { width: `${
|
|
849
|
+
style: { width: `${r.metrics.diskUsage}%` }
|
|
850
850
|
}
|
|
851
851
|
) }),
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
|
|
852
|
+
/* @__PURE__ */ a("span", { children: [
|
|
853
|
+
r.metrics.diskUsage.toFixed(1),
|
|
854
854
|
"%"
|
|
855
855
|
] })
|
|
856
856
|
] })
|
|
857
857
|
] }),
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__network-stats", children: [
|
|
859
|
+
/* @__PURE__ */ a("span", { children: [
|
|
860
860
|
"↓ ",
|
|
861
|
-
|
|
861
|
+
W(r.metrics.networkIn)
|
|
862
862
|
] }),
|
|
863
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ a("span", { children: [
|
|
864
864
|
"↑ ",
|
|
865
|
-
|
|
865
|
+
W(r.metrics.networkOut)
|
|
866
866
|
] })
|
|
867
867
|
] })
|
|
868
868
|
] })
|
|
869
869
|
] })
|
|
870
870
|
] });
|
|
871
871
|
}
|
|
872
|
-
function
|
|
873
|
-
config:
|
|
874
|
-
templates:
|
|
875
|
-
onChange:
|
|
876
|
-
onDeploy:
|
|
877
|
-
onClose:
|
|
872
|
+
function ue({
|
|
873
|
+
config: r,
|
|
874
|
+
templates: i,
|
|
875
|
+
onChange: c,
|
|
876
|
+
onDeploy: n,
|
|
877
|
+
onClose: o
|
|
878
878
|
}) {
|
|
879
|
-
return /* @__PURE__ */ e("div", { className: "nice-edge-manager__dialog-overlay", children: /* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
879
|
+
return /* @__PURE__ */ e("div", { className: "nice-edge-manager__dialog-overlay", children: /* @__PURE__ */ a("div", { className: "nice-edge-manager__dialog", children: [
|
|
880
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__dialog-header", children: [
|
|
881
881
|
/* @__PURE__ */ e("h3", { children: "Deploy Module" }),
|
|
882
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
882
|
+
/* @__PURE__ */ e("button", { onClick: o, children: "×" })
|
|
883
883
|
] }),
|
|
884
|
-
/* @__PURE__ */
|
|
885
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__dialog-content", children: [
|
|
885
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__field", children: [
|
|
886
886
|
/* @__PURE__ */ e("label", { children: "Template (optional)" }),
|
|
887
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ a(
|
|
888
888
|
"select",
|
|
889
889
|
{
|
|
890
890
|
value: "",
|
|
891
|
-
onChange: (
|
|
892
|
-
const
|
|
893
|
-
|
|
894
|
-
...
|
|
895
|
-
name:
|
|
896
|
-
image:
|
|
891
|
+
onChange: (d) => {
|
|
892
|
+
const t = i.find((l) => l.image === d.target.value);
|
|
893
|
+
t && c({
|
|
894
|
+
...r,
|
|
895
|
+
name: t.name,
|
|
896
|
+
image: t.image
|
|
897
897
|
});
|
|
898
898
|
},
|
|
899
899
|
children: [
|
|
900
900
|
/* @__PURE__ */ e("option", { value: "", children: "Select a template..." }),
|
|
901
|
-
|
|
901
|
+
i.map((d) => /* @__PURE__ */ e("option", { value: d.image, children: d.name }, d.image))
|
|
902
902
|
]
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
905
|
] }),
|
|
906
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__field", children: [
|
|
907
907
|
/* @__PURE__ */ e("label", { children: "Module Name" }),
|
|
908
908
|
/* @__PURE__ */ e(
|
|
909
909
|
"input",
|
|
910
910
|
{
|
|
911
911
|
type: "text",
|
|
912
|
-
value:
|
|
913
|
-
onChange: (
|
|
912
|
+
value: r.name || "",
|
|
913
|
+
onChange: (d) => c({ ...r, name: d.target.value }),
|
|
914
914
|
placeholder: "e.g., my-module"
|
|
915
915
|
}
|
|
916
916
|
)
|
|
917
917
|
] }),
|
|
918
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__field", children: [
|
|
919
919
|
/* @__PURE__ */ e("label", { children: "Container Image" }),
|
|
920
920
|
/* @__PURE__ */ e(
|
|
921
921
|
"input",
|
|
922
922
|
{
|
|
923
923
|
type: "text",
|
|
924
|
-
value:
|
|
925
|
-
onChange: (
|
|
924
|
+
value: r.image || "",
|
|
925
|
+
onChange: (d) => c({ ...r, image: d.target.value }),
|
|
926
926
|
placeholder: "e.g., nginx:latest"
|
|
927
927
|
}
|
|
928
928
|
)
|
|
929
929
|
] }),
|
|
930
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__field", children: [
|
|
931
931
|
/* @__PURE__ */ e("label", { children: "Version" }),
|
|
932
932
|
/* @__PURE__ */ e(
|
|
933
933
|
"input",
|
|
934
934
|
{
|
|
935
935
|
type: "text",
|
|
936
|
-
value:
|
|
937
|
-
onChange: (
|
|
936
|
+
value: r.version || "1.0.0",
|
|
937
|
+
onChange: (d) => c({ ...r, version: d.target.value })
|
|
938
938
|
}
|
|
939
939
|
)
|
|
940
940
|
] })
|
|
941
941
|
] }),
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
944
|
-
/* @__PURE__ */ e("button", { className: "nice-edge-manager__deploy-confirm", onClick:
|
|
942
|
+
/* @__PURE__ */ a("div", { className: "nice-edge-manager__dialog-footer", children: [
|
|
943
|
+
/* @__PURE__ */ e("button", { onClick: o, children: "Cancel" }),
|
|
944
|
+
/* @__PURE__ */ e("button", { className: "nice-edge-manager__deploy-confirm", onClick: n, children: "Deploy" })
|
|
945
945
|
] })
|
|
946
946
|
] }) });
|
|
947
947
|
}
|
|
948
|
-
const
|
|
948
|
+
const be = (r, i) => i, ve = b(be);
|
|
949
|
+
function U() {
|
|
950
|
+
return { t: ie(ve) };
|
|
951
|
+
}
|
|
952
|
+
b({
|
|
953
|
+
dir: "ltr",
|
|
954
|
+
isRTL: !1,
|
|
955
|
+
flip: (r) => r,
|
|
956
|
+
value: (r) => r.ltr
|
|
957
|
+
});
|
|
958
|
+
b(null);
|
|
959
|
+
b(null);
|
|
960
|
+
const ge = {
|
|
961
|
+
radius: "md",
|
|
962
|
+
shadow: "md",
|
|
963
|
+
fill: "solid",
|
|
964
|
+
buttonStyle: "flat",
|
|
965
|
+
inputStyle: "bordered",
|
|
966
|
+
cardStyle: "elevated",
|
|
967
|
+
badgeStyle: "solid",
|
|
968
|
+
tabStyle: "underline",
|
|
969
|
+
toggleStyle: "default",
|
|
970
|
+
tooltipStyle: "dark",
|
|
971
|
+
modalStyle: "default",
|
|
972
|
+
tableStyle: "default",
|
|
973
|
+
menuStyle: "default",
|
|
974
|
+
animation: "normal",
|
|
975
|
+
density: "normal"
|
|
976
|
+
};
|
|
977
|
+
b({
|
|
978
|
+
displayStyle: "default",
|
|
979
|
+
variantConfig: ge,
|
|
980
|
+
setDisplayStyle: () => {
|
|
981
|
+
}
|
|
982
|
+
});
|
|
983
|
+
b({});
|
|
984
|
+
b({
|
|
985
|
+
direction: "ltr",
|
|
986
|
+
isRTL: !1,
|
|
987
|
+
flip: (r) => r,
|
|
988
|
+
flipStyle: (r, i) => ({ [r]: i })
|
|
989
|
+
});
|
|
990
|
+
b({
|
|
991
|
+
permissions: {},
|
|
992
|
+
getAccessMode: () => "full"
|
|
993
|
+
});
|
|
994
|
+
b(null);
|
|
995
|
+
const _e = process.env.NODE_ENV === "development";
|
|
996
|
+
let K = {
|
|
997
|
+
enabled: _e,
|
|
998
|
+
slowRenderThreshold: 16
|
|
999
|
+
};
|
|
1000
|
+
const X = [], O = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
|
|
1001
|
+
function Ne() {
|
|
1002
|
+
X.length = 0, O.clear(), Y.clear();
|
|
1003
|
+
}
|
|
1004
|
+
function we(r) {
|
|
1005
|
+
const i = K.slowRenderThreshold;
|
|
1006
|
+
return X.filter((c) => c.actualDuration > i);
|
|
1007
|
+
}
|
|
1008
|
+
function D(r) {
|
|
1009
|
+
return r < 1 ? `${(r * 1e3).toFixed(0)}μs` : r < 1e3 ? `${r.toFixed(2)}ms` : `${(r / 1e3).toFixed(2)}s`;
|
|
1010
|
+
}
|
|
1011
|
+
function Ce() {
|
|
1012
|
+
const r = Array.from(O.values()), i = we(), c = r.reduce((d, t) => d + t.renderCount, 0), n = r.length > 0 ? r.reduce((d, t) => d + t.avgRenderTime, 0) / r.length : 0, o = Array.from(Y.values());
|
|
1013
|
+
return { stats: r, slowRenders: i, totalRenders: c, avgRenderTime: n, marks: o };
|
|
1014
|
+
}
|
|
1015
|
+
function xe() {
|
|
1016
|
+
const r = Ce();
|
|
1017
|
+
console.group(
|
|
1018
|
+
"%c[Nice2Dev Performance Report]",
|
|
1019
|
+
"color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"
|
|
1020
|
+
), console.log(`Total renders: ${r.totalRenders}`), console.log(`Average render time: ${D(r.avgRenderTime)}`), console.log(`Slow renders: ${r.slowRenders.length}`), console.group("Component Stats"), console.table(
|
|
1021
|
+
r.stats.sort((i, c) => c.totalRenderTime - i.totalRenderTime).map((i) => ({
|
|
1022
|
+
Name: i.componentName,
|
|
1023
|
+
Renders: i.renderCount,
|
|
1024
|
+
"Avg Time": D(i.avgRenderTime),
|
|
1025
|
+
"Max Time": D(i.maxRenderTime),
|
|
1026
|
+
"Total Time": D(i.totalRenderTime),
|
|
1027
|
+
"Slow Renders": i.slowRenderCount
|
|
1028
|
+
}))
|
|
1029
|
+
), console.groupEnd(), r.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
|
|
1030
|
+
r.slowRenders.slice(-10).map((i) => ({
|
|
1031
|
+
Component: i.componentName,
|
|
1032
|
+
Phase: i.phase,
|
|
1033
|
+
Duration: D(i.actualDuration),
|
|
1034
|
+
Time: new Date(i.timestamp).toLocaleTimeString()
|
|
1035
|
+
}))
|
|
1036
|
+
), console.groupEnd()), r.marks.length > 0 && (console.group("Custom Marks"), console.table(
|
|
1037
|
+
r.marks.filter((i) => i.duration).map((i) => ({
|
|
1038
|
+
Name: i.name,
|
|
1039
|
+
Duration: D(i.duration)
|
|
1040
|
+
}))
|
|
1041
|
+
), console.groupEnd()), console.groupEnd();
|
|
1042
|
+
}
|
|
1043
|
+
const ke = ce(
|
|
1044
|
+
({ position: r = "bottom-right", defaultCollapsed: i = !0 }) => {
|
|
1045
|
+
const [c, n] = h(i), [o, d] = h([]), [t, l] = h({ used: 0, total: 0 });
|
|
1046
|
+
if (ne(() => {
|
|
1047
|
+
const m = () => {
|
|
1048
|
+
const N = Array.from(O.values());
|
|
1049
|
+
d(N.sort((u, _) => _.totalRenderTime - u.totalRenderTime).slice(0, 10));
|
|
1050
|
+
const v = window.performance;
|
|
1051
|
+
v.memory && l({
|
|
1052
|
+
used: v.memory.usedJSHeapSize / 1024 / 1024,
|
|
1053
|
+
total: v.memory.totalJSHeapSize / 1024 / 1024
|
|
1054
|
+
});
|
|
1055
|
+
};
|
|
1056
|
+
m();
|
|
1057
|
+
const C = setInterval(m, 2e3);
|
|
1058
|
+
return () => clearInterval(C);
|
|
1059
|
+
}, []), !K.enabled)
|
|
1060
|
+
return null;
|
|
1061
|
+
const g = {
|
|
1062
|
+
position: "fixed",
|
|
1063
|
+
zIndex: 99999,
|
|
1064
|
+
...r.includes("top") ? { top: 8 } : { bottom: 8 },
|
|
1065
|
+
...r.includes("left") ? { left: 8 } : { right: 8 }
|
|
1066
|
+
};
|
|
1067
|
+
return /* @__PURE__ */ a(
|
|
1068
|
+
"div",
|
|
1069
|
+
{
|
|
1070
|
+
style: {
|
|
1071
|
+
...g,
|
|
1072
|
+
background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
|
|
1073
|
+
color: "var(--bg-primary, #fff)",
|
|
1074
|
+
borderRadius: 8,
|
|
1075
|
+
fontSize: 11,
|
|
1076
|
+
fontFamily: "Monaco, Consolas, monospace",
|
|
1077
|
+
padding: c ? "4px 8px" : 8,
|
|
1078
|
+
maxWidth: c ? "auto" : 300,
|
|
1079
|
+
maxHeight: c ? "auto" : 400,
|
|
1080
|
+
overflow: "auto"
|
|
1081
|
+
},
|
|
1082
|
+
children: [
|
|
1083
|
+
/* @__PURE__ */ a(
|
|
1084
|
+
"div",
|
|
1085
|
+
{
|
|
1086
|
+
style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 8 },
|
|
1087
|
+
onClick: () => n((m) => !m),
|
|
1088
|
+
children: [
|
|
1089
|
+
/* @__PURE__ */ e("span", { style: { color: "var(--color-success, #22c55e)" }, children: "●" }),
|
|
1090
|
+
/* @__PURE__ */ e("span", { children: "Profiler" }),
|
|
1091
|
+
t.used > 0 && /* @__PURE__ */ a(
|
|
1092
|
+
"span",
|
|
1093
|
+
{
|
|
1094
|
+
style: {
|
|
1095
|
+
color: t.used > 100 ? "var(--color-warning, #f59e0b)" : "var(--text-muted, #64748b)"
|
|
1096
|
+
},
|
|
1097
|
+
children: [
|
|
1098
|
+
t.used.toFixed(0),
|
|
1099
|
+
"MB"
|
|
1100
|
+
]
|
|
1101
|
+
}
|
|
1102
|
+
),
|
|
1103
|
+
/* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: c ? "▼" : "▲" })
|
|
1104
|
+
]
|
|
1105
|
+
}
|
|
1106
|
+
),
|
|
1107
|
+
!c && /* @__PURE__ */ a("div", { style: { marginTop: 8 }, children: [
|
|
1108
|
+
/* @__PURE__ */ e(
|
|
1109
|
+
"div",
|
|
1110
|
+
{
|
|
1111
|
+
style: {
|
|
1112
|
+
borderBottom: "1px solid var(--border-color, #333)",
|
|
1113
|
+
paddingBottom: 4,
|
|
1114
|
+
marginBottom: 8
|
|
1115
|
+
},
|
|
1116
|
+
children: /* @__PURE__ */ e("strong", { children: "Top Components" })
|
|
1117
|
+
}
|
|
1118
|
+
),
|
|
1119
|
+
o.map((m) => /* @__PURE__ */ a("div", { style: { marginBottom: 4, display: "flex", gap: 8 }, children: [
|
|
1120
|
+
/* @__PURE__ */ e("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, children: m.componentName }),
|
|
1121
|
+
/* @__PURE__ */ e(
|
|
1122
|
+
"span",
|
|
1123
|
+
{
|
|
1124
|
+
style: {
|
|
1125
|
+
color: m.avgRenderTime > 16 ? "var(--color-warning, #f59e0b)" : "var(--color-success, #22c55e)"
|
|
1126
|
+
},
|
|
1127
|
+
children: D(m.avgRenderTime)
|
|
1128
|
+
}
|
|
1129
|
+
),
|
|
1130
|
+
/* @__PURE__ */ a(
|
|
1131
|
+
"span",
|
|
1132
|
+
{
|
|
1133
|
+
style: { color: "var(--text-muted, #64748b)", minWidth: 30, textAlign: "right" },
|
|
1134
|
+
children: [
|
|
1135
|
+
"x",
|
|
1136
|
+
m.renderCount
|
|
1137
|
+
]
|
|
1138
|
+
}
|
|
1139
|
+
)
|
|
1140
|
+
] }, m.componentName)),
|
|
1141
|
+
/* @__PURE__ */ a("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
|
|
1142
|
+
/* @__PURE__ */ e(
|
|
1143
|
+
"button",
|
|
1144
|
+
{
|
|
1145
|
+
onClick: xe,
|
|
1146
|
+
style: {
|
|
1147
|
+
flex: 1,
|
|
1148
|
+
padding: "4px 8px",
|
|
1149
|
+
background: "var(--bg-tertiary, #333)",
|
|
1150
|
+
border: "none",
|
|
1151
|
+
borderRadius: 4,
|
|
1152
|
+
color: "var(--bg-primary, #fff)",
|
|
1153
|
+
cursor: "pointer",
|
|
1154
|
+
fontSize: 10
|
|
1155
|
+
},
|
|
1156
|
+
children: "Print Report"
|
|
1157
|
+
}
|
|
1158
|
+
),
|
|
1159
|
+
/* @__PURE__ */ e(
|
|
1160
|
+
"button",
|
|
1161
|
+
{
|
|
1162
|
+
onClick: Ne,
|
|
1163
|
+
style: {
|
|
1164
|
+
flex: 1,
|
|
1165
|
+
padding: "4px 8px",
|
|
1166
|
+
background: "var(--bg-tertiary, #333)",
|
|
1167
|
+
border: "none",
|
|
1168
|
+
borderRadius: 4,
|
|
1169
|
+
color: "var(--bg-primary, #fff)",
|
|
1170
|
+
cursor: "pointer",
|
|
1171
|
+
fontSize: 10
|
|
1172
|
+
},
|
|
1173
|
+
children: "Clear"
|
|
1174
|
+
}
|
|
1175
|
+
)
|
|
1176
|
+
] })
|
|
1177
|
+
] })
|
|
1178
|
+
]
|
|
1179
|
+
}
|
|
1180
|
+
);
|
|
1181
|
+
}
|
|
1182
|
+
);
|
|
1183
|
+
ke.displayName = "ProfilerOverlay";
|
|
1184
|
+
process.env.NODE_ENV;
|
|
1185
|
+
b(null);
|
|
1186
|
+
b({
|
|
1187
|
+
enabled: !0,
|
|
1188
|
+
active: !1,
|
|
1189
|
+
run: () => {
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
const q = "nice-tutorial-button-styles";
|
|
1193
|
+
if (typeof document < "u" && !document.getElementById(q)) {
|
|
1194
|
+
const r = document.createElement("style");
|
|
1195
|
+
r.id = q, r.textContent = `
|
|
1196
|
+
.nice-tutorial-button {
|
|
1197
|
+
display: inline-flex;
|
|
1198
|
+
align-items: center;
|
|
1199
|
+
justify-content: center;
|
|
1200
|
+
border: 1px solid var(--nice-border, #cbd5e1);
|
|
1201
|
+
background: var(--nice-bg, #fff);
|
|
1202
|
+
color: var(--nice-text-secondary, #475569);
|
|
1203
|
+
border-radius: var(--nice-radius-full, 9999px);
|
|
1204
|
+
cursor: help;
|
|
1205
|
+
font-weight: 700;
|
|
1206
|
+
line-height: 1;
|
|
1207
|
+
padding: 0;
|
|
1208
|
+
transition: background var(--nice-transition, 200ms ease), color var(--nice-transition, 200ms ease), border-color var(--nice-transition, 200ms ease);
|
|
1209
|
+
}
|
|
1210
|
+
.nice-tutorial-button:hover {
|
|
1211
|
+
background: var(--nice-primary, #2563eb);
|
|
1212
|
+
border-color: var(--nice-primary, #2563eb);
|
|
1213
|
+
color: var(--nice-text-inverse, #fff);
|
|
1214
|
+
}
|
|
1215
|
+
.nice-tutorial-button:focus-visible {
|
|
1216
|
+
outline: none;
|
|
1217
|
+
box-shadow: 0 0 0 2px var(--nice-bg, #fff), 0 0 0 4px var(--nice-primary, #2563eb);
|
|
1218
|
+
}
|
|
1219
|
+
.nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
|
|
1220
|
+
.nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
|
|
1221
|
+
`, document.head.appendChild(r);
|
|
1222
|
+
}
|
|
1223
|
+
b(null);
|
|
1224
|
+
b(null);
|
|
1225
|
+
b(null);
|
|
1226
|
+
const Z = {
|
|
1227
|
+
space1: "4px",
|
|
1228
|
+
space2: "8px",
|
|
1229
|
+
space3: "12px",
|
|
1230
|
+
space4: "16px",
|
|
1231
|
+
space5: "20px",
|
|
1232
|
+
space6: "24px",
|
|
1233
|
+
space8: "32px"
|
|
1234
|
+
}, ee = {
|
|
1235
|
+
fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
|
|
1236
|
+
fontSizeXs: "0.75rem",
|
|
1237
|
+
fontSizeSm: "0.8125rem",
|
|
1238
|
+
fontSizeMd: "0.875rem",
|
|
1239
|
+
fontSizeLg: "1rem",
|
|
1240
|
+
fontSizeXl: "1.125rem",
|
|
1241
|
+
fontWeightNormal: 400,
|
|
1242
|
+
fontWeightMedium: 500,
|
|
1243
|
+
fontWeightSemibold: 600,
|
|
1244
|
+
fontWeightBold: 700,
|
|
1245
|
+
lineHeight: 1.5
|
|
1246
|
+
}, re = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, ae = (r) => ({
|
|
1247
|
+
color: r,
|
|
1248
|
+
radiusSm: "4px",
|
|
1249
|
+
radiusMd: "6px",
|
|
1250
|
+
radiusLg: "8px",
|
|
1251
|
+
radiusXl: "12px",
|
|
1252
|
+
radiusFull: "9999px"
|
|
1253
|
+
}), He = {
|
|
1254
|
+
sm: "0 1px 2px rgba(0,0,0,0.05)",
|
|
1255
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
1256
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
1257
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
1258
|
+
}, Se = {
|
|
1259
|
+
sm: "0 1px 2px rgba(0,0,0,0.3)",
|
|
1260
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.4)",
|
|
1261
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
|
|
1262
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
|
|
1263
|
+
};
|
|
1264
|
+
function s(r, i, c, n, o) {
|
|
1265
|
+
return {
|
|
1266
|
+
name: r,
|
|
1267
|
+
darkMode: "light",
|
|
1268
|
+
colors: {
|
|
1269
|
+
...i,
|
|
1270
|
+
surface: i.surface ?? c.primary,
|
|
1271
|
+
surfaceHover: i.surfaceHover ?? c.secondary
|
|
1272
|
+
},
|
|
1273
|
+
backgrounds: {
|
|
1274
|
+
...c,
|
|
1275
|
+
elevated: c.elevated ?? c.primary,
|
|
1276
|
+
inset: c.inset ?? c.tertiary,
|
|
1277
|
+
canvas: c.canvas ?? c.primary
|
|
1278
|
+
},
|
|
1279
|
+
text: { ...n, inverse: n.inverse ?? "#ffffff" },
|
|
1280
|
+
borders: ae(o),
|
|
1281
|
+
shadows: He,
|
|
1282
|
+
spacing: Z,
|
|
1283
|
+
typography: ee,
|
|
1284
|
+
transitions: re
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
function p(r, i, c, n, o) {
|
|
1288
|
+
return {
|
|
1289
|
+
name: r,
|
|
1290
|
+
darkMode: "dark",
|
|
1291
|
+
colors: {
|
|
1292
|
+
...i,
|
|
1293
|
+
surface: i.surface ?? c.secondary,
|
|
1294
|
+
surfaceHover: i.surfaceHover ?? c.tertiary
|
|
1295
|
+
},
|
|
1296
|
+
backgrounds: {
|
|
1297
|
+
...c,
|
|
1298
|
+
elevated: c.elevated ?? c.secondary,
|
|
1299
|
+
inset: c.inset ?? c.primary,
|
|
1300
|
+
canvas: c.canvas ?? c.primary
|
|
1301
|
+
},
|
|
1302
|
+
text: { ...n, inverse: n.inverse ?? "#0f172a" },
|
|
1303
|
+
borders: ae(o),
|
|
1304
|
+
shadows: Se,
|
|
1305
|
+
spacing: Z,
|
|
1306
|
+
typography: ee,
|
|
1307
|
+
transitions: re
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
s(
|
|
1311
|
+
"Slate",
|
|
1312
|
+
{
|
|
1313
|
+
primary: "#64748b",
|
|
1314
|
+
primaryHover: "#475569",
|
|
1315
|
+
success: "#10b981",
|
|
1316
|
+
warning: "#f59e0b",
|
|
1317
|
+
error: "#ef4444",
|
|
1318
|
+
info: "#06b6d4"
|
|
1319
|
+
},
|
|
1320
|
+
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
1321
|
+
{ primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
|
|
1322
|
+
"#cbd5e1"
|
|
1323
|
+
);
|
|
1324
|
+
s(
|
|
1325
|
+
"Zinc",
|
|
1326
|
+
{
|
|
1327
|
+
primary: "#71717a",
|
|
1328
|
+
primaryHover: "#52525b",
|
|
1329
|
+
success: "#22c55e",
|
|
1330
|
+
warning: "#eab308",
|
|
1331
|
+
error: "#ef4444",
|
|
1332
|
+
info: "#06b6d4"
|
|
1333
|
+
},
|
|
1334
|
+
{ primary: "#fafafa", secondary: "#f4f4f5", tertiary: "#e4e4e7", hover: "#e4e4e7" },
|
|
1335
|
+
{ primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
|
|
1336
|
+
"#d4d4d8"
|
|
1337
|
+
);
|
|
1338
|
+
s(
|
|
1339
|
+
"Stone",
|
|
1340
|
+
{
|
|
1341
|
+
primary: "#78716c",
|
|
1342
|
+
primaryHover: "#57534e",
|
|
1343
|
+
success: "#16a34a",
|
|
1344
|
+
warning: "#ca8a04",
|
|
1345
|
+
error: "#dc2626",
|
|
1346
|
+
info: "#0891b2"
|
|
1347
|
+
},
|
|
1348
|
+
{ primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
|
|
1349
|
+
{ primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
|
|
1350
|
+
"#d6d3d1"
|
|
1351
|
+
);
|
|
1352
|
+
s(
|
|
1353
|
+
"Cool Gray",
|
|
1354
|
+
{
|
|
1355
|
+
primary: "#6b7280",
|
|
1356
|
+
primaryHover: "#4b5563",
|
|
1357
|
+
success: "#10b981",
|
|
1358
|
+
warning: "#f59e0b",
|
|
1359
|
+
error: "#ef4444",
|
|
1360
|
+
info: "#3b82f6"
|
|
1361
|
+
},
|
|
1362
|
+
{ primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
|
|
1363
|
+
{ primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
|
|
1364
|
+
"#d1d5db"
|
|
1365
|
+
);
|
|
1366
|
+
s(
|
|
1367
|
+
"Warm Gray",
|
|
1368
|
+
{
|
|
1369
|
+
primary: "#7c7568",
|
|
1370
|
+
primaryHover: "#5c564c",
|
|
1371
|
+
success: "#4d7c0f",
|
|
1372
|
+
warning: "#a16207",
|
|
1373
|
+
error: "#b91c1c",
|
|
1374
|
+
info: "#0e7490"
|
|
1375
|
+
},
|
|
1376
|
+
{ primary: "#faf9f7", secondary: "#f5f4f0", tertiary: "#e8e6e1", hover: "#e8e6e1" },
|
|
1377
|
+
{ primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
|
|
1378
|
+
"#d4d0c8"
|
|
1379
|
+
);
|
|
1380
|
+
s(
|
|
1381
|
+
"Silver",
|
|
1382
|
+
{
|
|
1383
|
+
primary: "#94a3b8",
|
|
1384
|
+
primaryHover: "#64748b",
|
|
1385
|
+
success: "#10b981",
|
|
1386
|
+
warning: "#f59e0b",
|
|
1387
|
+
error: "#ef4444",
|
|
1388
|
+
info: "#38bdf8"
|
|
1389
|
+
},
|
|
1390
|
+
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
1391
|
+
{ primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
|
|
1392
|
+
"#cbd5e1"
|
|
1393
|
+
);
|
|
1394
|
+
s(
|
|
1395
|
+
"Charcoal",
|
|
1396
|
+
{
|
|
1397
|
+
primary: "#374151",
|
|
1398
|
+
primaryHover: "#1f2937",
|
|
1399
|
+
success: "#059669",
|
|
1400
|
+
warning: "#d97706",
|
|
1401
|
+
error: "#dc2626",
|
|
1402
|
+
info: "#0284c7"
|
|
1403
|
+
},
|
|
1404
|
+
{ primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
|
|
1405
|
+
{ primary: "#111827", secondary: "#374151", muted: "#6b7280" },
|
|
1406
|
+
"#d1d5db"
|
|
1407
|
+
);
|
|
1408
|
+
s(
|
|
1409
|
+
"Ivory",
|
|
1410
|
+
{
|
|
1411
|
+
primary: "#92876d",
|
|
1412
|
+
primaryHover: "#7a6f55",
|
|
1413
|
+
success: "#4d7c0f",
|
|
1414
|
+
warning: "#a16207",
|
|
1415
|
+
error: "#b91c1c",
|
|
1416
|
+
info: "#0e7490"
|
|
1417
|
+
},
|
|
1418
|
+
{ primary: "#fffef7", secondary: "#faf6eb", tertiary: "#f0ead6", hover: "#f0ead6" },
|
|
1419
|
+
{ primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
|
|
1420
|
+
"#ddd8c4"
|
|
1421
|
+
);
|
|
1422
|
+
s(
|
|
1423
|
+
"Rose",
|
|
1424
|
+
{
|
|
1425
|
+
primary: "#e11d48",
|
|
1426
|
+
primaryHover: "#be123c",
|
|
1427
|
+
success: "#16a34a",
|
|
1428
|
+
warning: "#ea580c",
|
|
1429
|
+
error: "#dc2626",
|
|
1430
|
+
info: "#0891b2"
|
|
1431
|
+
},
|
|
1432
|
+
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
1433
|
+
{ primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
|
|
1434
|
+
"#fda4af"
|
|
1435
|
+
);
|
|
1436
|
+
s(
|
|
1437
|
+
"Emerald",
|
|
1438
|
+
{
|
|
1439
|
+
primary: "#059669",
|
|
1440
|
+
primaryHover: "#047857",
|
|
1441
|
+
success: "#16a34a",
|
|
1442
|
+
warning: "#d97706",
|
|
1443
|
+
error: "#dc2626",
|
|
1444
|
+
info: "#0891b2"
|
|
1445
|
+
},
|
|
1446
|
+
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
1447
|
+
{ primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
|
|
1448
|
+
"#6ee7b7"
|
|
1449
|
+
);
|
|
1450
|
+
s(
|
|
1451
|
+
"Amber",
|
|
1452
|
+
{
|
|
1453
|
+
primary: "#d97706",
|
|
1454
|
+
primaryHover: "#b45309",
|
|
1455
|
+
success: "#16a34a",
|
|
1456
|
+
warning: "#ca8a04",
|
|
1457
|
+
error: "#dc2626",
|
|
1458
|
+
info: "#0284c7"
|
|
1459
|
+
},
|
|
1460
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1461
|
+
{ primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
|
|
1462
|
+
"#fcd34d"
|
|
1463
|
+
);
|
|
1464
|
+
s(
|
|
1465
|
+
"Violet",
|
|
1466
|
+
{
|
|
1467
|
+
primary: "#7c3aed",
|
|
1468
|
+
primaryHover: "#6d28d9",
|
|
1469
|
+
success: "#10b981",
|
|
1470
|
+
warning: "#f59e0b",
|
|
1471
|
+
error: "#ef4444",
|
|
1472
|
+
info: "#06b6d4"
|
|
1473
|
+
},
|
|
1474
|
+
{ primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
|
|
1475
|
+
{ primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
|
|
1476
|
+
"#c4b5fd"
|
|
1477
|
+
);
|
|
1478
|
+
s(
|
|
1479
|
+
"Teal",
|
|
1480
|
+
{
|
|
1481
|
+
primary: "#0d9488",
|
|
1482
|
+
primaryHover: "#0f766e",
|
|
1483
|
+
success: "#16a34a",
|
|
1484
|
+
warning: "#d97706",
|
|
1485
|
+
error: "#dc2626",
|
|
1486
|
+
info: "#0284c7"
|
|
1487
|
+
},
|
|
1488
|
+
{ primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
|
|
1489
|
+
{ primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
|
|
1490
|
+
"#5eead4"
|
|
1491
|
+
);
|
|
1492
|
+
s(
|
|
1493
|
+
"Indigo",
|
|
1494
|
+
{
|
|
1495
|
+
primary: "#4f46e5",
|
|
1496
|
+
primaryHover: "#4338ca",
|
|
1497
|
+
success: "#10b981",
|
|
1498
|
+
warning: "#f59e0b",
|
|
1499
|
+
error: "#ef4444",
|
|
1500
|
+
info: "#06b6d4"
|
|
1501
|
+
},
|
|
1502
|
+
{ primary: "#eef2ff", secondary: "#e0e7ff", tertiary: "#c7d2fe", hover: "#e0e7ff" },
|
|
1503
|
+
{ primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
|
|
1504
|
+
"#a5b4fc"
|
|
1505
|
+
);
|
|
1506
|
+
s(
|
|
1507
|
+
"Cyan",
|
|
1508
|
+
{
|
|
1509
|
+
primary: "#0891b2",
|
|
1510
|
+
primaryHover: "#0e7490",
|
|
1511
|
+
success: "#10b981",
|
|
1512
|
+
warning: "#f59e0b",
|
|
1513
|
+
error: "#ef4444",
|
|
1514
|
+
info: "#0284c7"
|
|
1515
|
+
},
|
|
1516
|
+
{ primary: "#ecfeff", secondary: "#cffafe", tertiary: "#a5f3fc", hover: "#cffafe" },
|
|
1517
|
+
{ primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
|
|
1518
|
+
"#67e8f9"
|
|
1519
|
+
);
|
|
1520
|
+
s(
|
|
1521
|
+
"Lime",
|
|
1522
|
+
{
|
|
1523
|
+
primary: "#65a30d",
|
|
1524
|
+
primaryHover: "#4d7c0f",
|
|
1525
|
+
success: "#16a34a",
|
|
1526
|
+
warning: "#ca8a04",
|
|
1527
|
+
error: "#dc2626",
|
|
1528
|
+
info: "#0891b2"
|
|
1529
|
+
},
|
|
1530
|
+
{ primary: "#f7fee7", secondary: "#ecfccb", tertiary: "#d9f99d", hover: "#ecfccb" },
|
|
1531
|
+
{ primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
|
|
1532
|
+
"#bef264"
|
|
1533
|
+
);
|
|
1534
|
+
s(
|
|
1535
|
+
"Pink",
|
|
1536
|
+
{
|
|
1537
|
+
primary: "#db2777",
|
|
1538
|
+
primaryHover: "#be185d",
|
|
1539
|
+
success: "#10b981",
|
|
1540
|
+
warning: "#f59e0b",
|
|
1541
|
+
error: "#dc2626",
|
|
1542
|
+
info: "#06b6d4"
|
|
1543
|
+
},
|
|
1544
|
+
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
1545
|
+
{ primary: "#500724", secondary: "#831843", muted: "#f472b6" },
|
|
1546
|
+
"#f9a8d4"
|
|
1547
|
+
);
|
|
1548
|
+
s(
|
|
1549
|
+
"Orange",
|
|
1550
|
+
{
|
|
1551
|
+
primary: "#ea580c",
|
|
1552
|
+
primaryHover: "#c2410c",
|
|
1553
|
+
success: "#16a34a",
|
|
1554
|
+
warning: "#ca8a04",
|
|
1555
|
+
error: "#dc2626",
|
|
1556
|
+
info: "#0891b2"
|
|
1557
|
+
},
|
|
1558
|
+
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
1559
|
+
{ primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
|
|
1560
|
+
"#fdba74"
|
|
1561
|
+
);
|
|
1562
|
+
s(
|
|
1563
|
+
"Fuchsia",
|
|
1564
|
+
{
|
|
1565
|
+
primary: "#c026d3",
|
|
1566
|
+
primaryHover: "#a21caf",
|
|
1567
|
+
success: "#10b981",
|
|
1568
|
+
warning: "#eab308",
|
|
1569
|
+
error: "#ef4444",
|
|
1570
|
+
info: "#06b6d4"
|
|
1571
|
+
},
|
|
1572
|
+
{ primary: "#fdf4ff", secondary: "#fae8ff", tertiary: "#f5d0fe", hover: "#fae8ff" },
|
|
1573
|
+
{ primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
|
|
1574
|
+
"#e879f9"
|
|
1575
|
+
);
|
|
1576
|
+
s(
|
|
1577
|
+
"Sky",
|
|
1578
|
+
{
|
|
1579
|
+
primary: "#0284c7",
|
|
1580
|
+
primaryHover: "#0369a1",
|
|
1581
|
+
success: "#10b981",
|
|
1582
|
+
warning: "#f59e0b",
|
|
1583
|
+
error: "#ef4444",
|
|
1584
|
+
info: "#06b6d4"
|
|
1585
|
+
},
|
|
1586
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
1587
|
+
{ primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
|
|
1588
|
+
"#7dd3fc"
|
|
1589
|
+
);
|
|
1590
|
+
s(
|
|
1591
|
+
"Ruby",
|
|
1592
|
+
{
|
|
1593
|
+
primary: "#be123c",
|
|
1594
|
+
primaryHover: "#9f1239",
|
|
1595
|
+
success: "#059669",
|
|
1596
|
+
warning: "#d97706",
|
|
1597
|
+
error: "#dc2626",
|
|
1598
|
+
info: "#0284c7"
|
|
1599
|
+
},
|
|
1600
|
+
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
1601
|
+
{ primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
|
|
1602
|
+
"#fda4af"
|
|
1603
|
+
);
|
|
1604
|
+
s(
|
|
1605
|
+
"Coral",
|
|
1606
|
+
{
|
|
1607
|
+
primary: "#f97316",
|
|
1608
|
+
primaryHover: "#ea580c",
|
|
1609
|
+
success: "#10b981",
|
|
1610
|
+
warning: "#eab308",
|
|
1611
|
+
error: "#ef4444",
|
|
1612
|
+
info: "#06b6d4"
|
|
1613
|
+
},
|
|
1614
|
+
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
1615
|
+
{ primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
|
|
1616
|
+
"#fdba74"
|
|
1617
|
+
);
|
|
1618
|
+
p(
|
|
1619
|
+
"Midnight",
|
|
1620
|
+
{
|
|
1621
|
+
primary: "#818cf8",
|
|
1622
|
+
primaryHover: "#6366f1",
|
|
1623
|
+
success: "#34d399",
|
|
1624
|
+
warning: "#fbbf24",
|
|
1625
|
+
error: "#f87171",
|
|
1626
|
+
info: "#22d3ee"
|
|
1627
|
+
},
|
|
1628
|
+
{ primary: "#020617", secondary: "#0f172a", tertiary: "#1e293b", hover: "#1e293b" },
|
|
1629
|
+
{ primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
|
|
1630
|
+
"#1e293b"
|
|
1631
|
+
);
|
|
1632
|
+
p(
|
|
1633
|
+
"Obsidian",
|
|
1634
|
+
{
|
|
1635
|
+
primary: "#a78bfa",
|
|
1636
|
+
primaryHover: "#8b5cf6",
|
|
1637
|
+
success: "#4ade80",
|
|
1638
|
+
warning: "#facc15",
|
|
1639
|
+
error: "#fb7185",
|
|
1640
|
+
info: "#38bdf8"
|
|
1641
|
+
},
|
|
1642
|
+
{ primary: "#09090b", secondary: "#18181b", tertiary: "#27272a", hover: "#27272a" },
|
|
1643
|
+
{ primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
|
|
1644
|
+
"#3f3f46"
|
|
1645
|
+
);
|
|
1646
|
+
p(
|
|
1647
|
+
"Eclipse",
|
|
1648
|
+
{
|
|
1649
|
+
primary: "#c084fc",
|
|
1650
|
+
primaryHover: "#a855f7",
|
|
1651
|
+
success: "#34d399",
|
|
1652
|
+
warning: "#fbbf24",
|
|
1653
|
+
error: "#f87171",
|
|
1654
|
+
info: "#67e8f9"
|
|
1655
|
+
},
|
|
1656
|
+
{ primary: "#0c0a1d", secondary: "#1a1533", tertiary: "#2a2248", hover: "#2a2248" },
|
|
1657
|
+
{ primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
|
|
1658
|
+
"#3b3266"
|
|
1659
|
+
);
|
|
1660
|
+
p(
|
|
1661
|
+
"Onyx",
|
|
1662
|
+
{
|
|
1663
|
+
primary: "#60a5fa",
|
|
1664
|
+
primaryHover: "#3b82f6",
|
|
1665
|
+
success: "#4ade80",
|
|
1666
|
+
warning: "#fbbf24",
|
|
1667
|
+
error: "#f87171",
|
|
1668
|
+
info: "#22d3ee"
|
|
1669
|
+
},
|
|
1670
|
+
{ primary: "#000000", secondary: "#0a0a0a", tertiary: "#171717", hover: "#171717" },
|
|
1671
|
+
{ primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
|
|
1672
|
+
"#262626"
|
|
1673
|
+
);
|
|
1674
|
+
p(
|
|
1675
|
+
"Carbon",
|
|
1676
|
+
{
|
|
1677
|
+
primary: "#38bdf8",
|
|
1678
|
+
primaryHover: "#0ea5e9",
|
|
1679
|
+
success: "#4ade80",
|
|
1680
|
+
warning: "#facc15",
|
|
1681
|
+
error: "#f87171",
|
|
1682
|
+
info: "#67e8f9"
|
|
1683
|
+
},
|
|
1684
|
+
{ primary: "#161616", secondary: "#262626", tertiary: "#393939", hover: "#393939" },
|
|
1685
|
+
{ primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
|
|
1686
|
+
"#525252"
|
|
1687
|
+
);
|
|
1688
|
+
p(
|
|
1689
|
+
"Cosmos",
|
|
1690
|
+
{
|
|
1691
|
+
primary: "#6366f1",
|
|
1692
|
+
primaryHover: "#4f46e5",
|
|
1693
|
+
success: "#34d399",
|
|
1694
|
+
warning: "#fbbf24",
|
|
1695
|
+
error: "#f87171",
|
|
1696
|
+
info: "#22d3ee"
|
|
1697
|
+
},
|
|
1698
|
+
{ primary: "#030712", secondary: "#111827", tertiary: "#1f2937", hover: "#1f2937" },
|
|
1699
|
+
{ primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
|
|
1700
|
+
"#374151"
|
|
1701
|
+
);
|
|
1702
|
+
p(
|
|
1703
|
+
"Nebula",
|
|
1704
|
+
{
|
|
1705
|
+
primary: "#e879f9",
|
|
1706
|
+
primaryHover: "#d946ef",
|
|
1707
|
+
success: "#4ade80",
|
|
1708
|
+
warning: "#fbbf24",
|
|
1709
|
+
error: "#fb7185",
|
|
1710
|
+
info: "#67e8f9"
|
|
1711
|
+
},
|
|
1712
|
+
{ primary: "#0d0117", secondary: "#1a0533", tertiary: "#2d0a52", hover: "#2d0a52" },
|
|
1713
|
+
{ primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
|
|
1714
|
+
"#581c87"
|
|
1715
|
+
);
|
|
1716
|
+
p(
|
|
1717
|
+
"Abyss",
|
|
1718
|
+
{
|
|
1719
|
+
primary: "#22d3ee",
|
|
1720
|
+
primaryHover: "#06b6d4",
|
|
1721
|
+
success: "#34d399",
|
|
1722
|
+
warning: "#fbbf24",
|
|
1723
|
+
error: "#f87171",
|
|
1724
|
+
info: "#38bdf8"
|
|
1725
|
+
},
|
|
1726
|
+
{ primary: "#001219", secondary: "#002a3a", tertiary: "#003e54", hover: "#003e54" },
|
|
1727
|
+
{ primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
|
|
1728
|
+
"#075985"
|
|
1729
|
+
);
|
|
1730
|
+
p(
|
|
1731
|
+
"Shadow",
|
|
1732
|
+
{
|
|
1733
|
+
primary: "#a3a3a3",
|
|
1734
|
+
primaryHover: "#737373",
|
|
1735
|
+
success: "#4ade80",
|
|
1736
|
+
warning: "#facc15",
|
|
1737
|
+
error: "#f87171",
|
|
1738
|
+
info: "#38bdf8"
|
|
1739
|
+
},
|
|
1740
|
+
{ primary: "#171717", secondary: "#1f1f1f", tertiary: "#2a2a2a", hover: "#2a2a2a" },
|
|
1741
|
+
{ primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
|
|
1742
|
+
"#404040"
|
|
1743
|
+
);
|
|
1744
|
+
p(
|
|
1745
|
+
"Emerald Dark",
|
|
1746
|
+
{
|
|
1747
|
+
primary: "#34d399",
|
|
1748
|
+
primaryHover: "#10b981",
|
|
1749
|
+
success: "#4ade80",
|
|
1750
|
+
warning: "#fbbf24",
|
|
1751
|
+
error: "#f87171",
|
|
1752
|
+
info: "#22d3ee"
|
|
1753
|
+
},
|
|
1754
|
+
{ primary: "#022c22", secondary: "#064e3b", tertiary: "#065f46", hover: "#065f46" },
|
|
1755
|
+
{ primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
|
|
1756
|
+
"#047857"
|
|
1757
|
+
);
|
|
1758
|
+
s(
|
|
1759
|
+
"Forest",
|
|
1760
|
+
{
|
|
1761
|
+
primary: "#166534",
|
|
1762
|
+
primaryHover: "#14532d",
|
|
1763
|
+
success: "#22c55e",
|
|
1764
|
+
warning: "#ca8a04",
|
|
1765
|
+
error: "#dc2626",
|
|
1766
|
+
info: "#0891b2"
|
|
1767
|
+
},
|
|
1768
|
+
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
1769
|
+
{ primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
|
|
1770
|
+
"#86efac"
|
|
1771
|
+
);
|
|
1772
|
+
s(
|
|
1773
|
+
"Ocean",
|
|
1774
|
+
{
|
|
1775
|
+
primary: "#0369a1",
|
|
1776
|
+
primaryHover: "#075985",
|
|
1777
|
+
success: "#059669",
|
|
1778
|
+
warning: "#d97706",
|
|
1779
|
+
error: "#dc2626",
|
|
1780
|
+
info: "#0284c7"
|
|
1781
|
+
},
|
|
1782
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
1783
|
+
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
|
|
1784
|
+
"#7dd3fc"
|
|
1785
|
+
);
|
|
1786
|
+
s(
|
|
1787
|
+
"Desert",
|
|
1788
|
+
{
|
|
1789
|
+
primary: "#b45309",
|
|
1790
|
+
primaryHover: "#92400e",
|
|
1791
|
+
success: "#4d7c0f",
|
|
1792
|
+
warning: "#a16207",
|
|
1793
|
+
error: "#b91c1c",
|
|
1794
|
+
info: "#0e7490"
|
|
1795
|
+
},
|
|
1796
|
+
{ primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
|
|
1797
|
+
{ primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
|
|
1798
|
+
"#fde047"
|
|
1799
|
+
);
|
|
1800
|
+
s(
|
|
1801
|
+
"Sunset",
|
|
1802
|
+
{
|
|
1803
|
+
primary: "#ea580c",
|
|
1804
|
+
primaryHover: "#c2410c",
|
|
1805
|
+
success: "#16a34a",
|
|
1806
|
+
warning: "#d97706",
|
|
1807
|
+
error: "#dc2626",
|
|
1808
|
+
info: "#0891b2"
|
|
1809
|
+
},
|
|
1810
|
+
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
1811
|
+
{ primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
|
|
1812
|
+
"#fdba74"
|
|
1813
|
+
);
|
|
1814
|
+
s(
|
|
1815
|
+
"Aurora",
|
|
1816
|
+
{
|
|
1817
|
+
primary: "#0d9488",
|
|
1818
|
+
primaryHover: "#0f766e",
|
|
1819
|
+
success: "#22c55e",
|
|
1820
|
+
warning: "#eab308",
|
|
1821
|
+
error: "#ef4444",
|
|
1822
|
+
info: "#06b6d4"
|
|
1823
|
+
},
|
|
1824
|
+
{ primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
|
|
1825
|
+
{ primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
|
|
1826
|
+
"#5eead4"
|
|
1827
|
+
);
|
|
1828
|
+
s(
|
|
1829
|
+
"Lavender",
|
|
1830
|
+
{
|
|
1831
|
+
primary: "#7e22ce",
|
|
1832
|
+
primaryHover: "#6b21a8",
|
|
1833
|
+
success: "#16a34a",
|
|
1834
|
+
warning: "#d97706",
|
|
1835
|
+
error: "#dc2626",
|
|
1836
|
+
info: "#0891b2"
|
|
1837
|
+
},
|
|
1838
|
+
{ primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
|
|
1839
|
+
{ primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
|
|
1840
|
+
"#d8b4fe"
|
|
1841
|
+
);
|
|
1842
|
+
s(
|
|
1843
|
+
"Autumn",
|
|
1844
|
+
{
|
|
1845
|
+
primary: "#c2410c",
|
|
1846
|
+
primaryHover: "#9a3412",
|
|
1847
|
+
success: "#4d7c0f",
|
|
1848
|
+
warning: "#a16207",
|
|
1849
|
+
error: "#b91c1c",
|
|
1850
|
+
info: "#0e7490"
|
|
1851
|
+
},
|
|
1852
|
+
{ primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
|
|
1853
|
+
{ primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
|
|
1854
|
+
"#fca5a5"
|
|
1855
|
+
);
|
|
1856
|
+
s(
|
|
1857
|
+
"Spring",
|
|
1858
|
+
{
|
|
1859
|
+
primary: "#16a34a",
|
|
1860
|
+
primaryHover: "#15803d",
|
|
1861
|
+
success: "#22c55e",
|
|
1862
|
+
warning: "#eab308",
|
|
1863
|
+
error: "#ef4444",
|
|
1864
|
+
info: "#06b6d4"
|
|
1865
|
+
},
|
|
1866
|
+
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
1867
|
+
{ primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
|
|
1868
|
+
"#86efac"
|
|
1869
|
+
);
|
|
1870
|
+
s(
|
|
1871
|
+
"Arctic",
|
|
1872
|
+
{
|
|
1873
|
+
primary: "#0ea5e9",
|
|
1874
|
+
primaryHover: "#0284c7",
|
|
1875
|
+
success: "#10b981",
|
|
1876
|
+
warning: "#f59e0b",
|
|
1877
|
+
error: "#ef4444",
|
|
1878
|
+
info: "#06b6d4"
|
|
1879
|
+
},
|
|
1880
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
1881
|
+
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
1882
|
+
"#bae6fd"
|
|
1883
|
+
);
|
|
1884
|
+
s(
|
|
1885
|
+
"Tropical",
|
|
1886
|
+
{
|
|
1887
|
+
primary: "#0d9488",
|
|
1888
|
+
primaryHover: "#0f766e",
|
|
1889
|
+
success: "#16a34a",
|
|
1890
|
+
warning: "#f59e0b",
|
|
1891
|
+
error: "#ef4444",
|
|
1892
|
+
info: "#06b6d4"
|
|
1893
|
+
},
|
|
1894
|
+
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
1895
|
+
{ primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
|
|
1896
|
+
"#a7f3d0"
|
|
1897
|
+
);
|
|
1898
|
+
s(
|
|
1899
|
+
"Pastel Rose",
|
|
1900
|
+
{
|
|
1901
|
+
primary: "#f472b6",
|
|
1902
|
+
primaryHover: "#ec4899",
|
|
1903
|
+
success: "#4ade80",
|
|
1904
|
+
warning: "#fcd34d",
|
|
1905
|
+
error: "#fb7185",
|
|
1906
|
+
info: "#67e8f9"
|
|
1907
|
+
},
|
|
1908
|
+
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
1909
|
+
{ primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
|
|
1910
|
+
"#f9a8d4"
|
|
1911
|
+
);
|
|
1912
|
+
s(
|
|
1913
|
+
"Pastel Sky",
|
|
1914
|
+
{
|
|
1915
|
+
primary: "#38bdf8",
|
|
1916
|
+
primaryHover: "#0ea5e9",
|
|
1917
|
+
success: "#4ade80",
|
|
1918
|
+
warning: "#fcd34d",
|
|
1919
|
+
error: "#fb7185",
|
|
1920
|
+
info: "#67e8f9"
|
|
1921
|
+
},
|
|
1922
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
1923
|
+
{ primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
1924
|
+
"#bae6fd"
|
|
1925
|
+
);
|
|
1926
|
+
s(
|
|
1927
|
+
"Pastel Mint",
|
|
1928
|
+
{
|
|
1929
|
+
primary: "#34d399",
|
|
1930
|
+
primaryHover: "#10b981",
|
|
1931
|
+
success: "#4ade80",
|
|
1932
|
+
warning: "#fcd34d",
|
|
1933
|
+
error: "#fb7185",
|
|
1934
|
+
info: "#67e8f9"
|
|
1935
|
+
},
|
|
1936
|
+
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
1937
|
+
{ primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
|
|
1938
|
+
"#a7f3d0"
|
|
1939
|
+
);
|
|
1940
|
+
s(
|
|
1941
|
+
"Pastel Peach",
|
|
1942
|
+
{
|
|
1943
|
+
primary: "#fb923c",
|
|
1944
|
+
primaryHover: "#f97316",
|
|
1945
|
+
success: "#4ade80",
|
|
1946
|
+
warning: "#fcd34d",
|
|
1947
|
+
error: "#fb7185",
|
|
1948
|
+
info: "#67e8f9"
|
|
1949
|
+
},
|
|
1950
|
+
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
1951
|
+
{ primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
|
|
1952
|
+
"#fed7aa"
|
|
1953
|
+
);
|
|
1954
|
+
s(
|
|
1955
|
+
"Pastel Lavender",
|
|
1956
|
+
{
|
|
1957
|
+
primary: "#a78bfa",
|
|
1958
|
+
primaryHover: "#8b5cf6",
|
|
1959
|
+
success: "#4ade80",
|
|
1960
|
+
warning: "#fcd34d",
|
|
1961
|
+
error: "#fb7185",
|
|
1962
|
+
info: "#67e8f9"
|
|
1963
|
+
},
|
|
1964
|
+
{ primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
|
|
1965
|
+
{ primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
|
|
1966
|
+
"#ddd6fe"
|
|
1967
|
+
);
|
|
1968
|
+
s(
|
|
1969
|
+
"Pastel Lemon",
|
|
1970
|
+
{
|
|
1971
|
+
primary: "#facc15",
|
|
1972
|
+
primaryHover: "#eab308",
|
|
1973
|
+
success: "#4ade80",
|
|
1974
|
+
warning: "#fcd34d",
|
|
1975
|
+
error: "#fb7185",
|
|
1976
|
+
info: "#67e8f9"
|
|
1977
|
+
},
|
|
1978
|
+
{ primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
|
|
1979
|
+
{ primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
|
|
1980
|
+
"#fef08a"
|
|
1981
|
+
);
|
|
1982
|
+
s(
|
|
1983
|
+
"Pastel Sage",
|
|
1984
|
+
{
|
|
1985
|
+
primary: "#86efac",
|
|
1986
|
+
primaryHover: "#4ade80",
|
|
1987
|
+
success: "#22c55e",
|
|
1988
|
+
warning: "#fcd34d",
|
|
1989
|
+
error: "#fb7185",
|
|
1990
|
+
info: "#67e8f9"
|
|
1991
|
+
},
|
|
1992
|
+
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
1993
|
+
{ primary: "#166534", secondary: "#15803d", muted: "#86efac" },
|
|
1994
|
+
"#bbf7d0"
|
|
1995
|
+
);
|
|
1996
|
+
s(
|
|
1997
|
+
"Pastel Coral",
|
|
1998
|
+
{
|
|
1999
|
+
primary: "#fb7185",
|
|
2000
|
+
primaryHover: "#f43f5e",
|
|
2001
|
+
success: "#4ade80",
|
|
2002
|
+
warning: "#fcd34d",
|
|
2003
|
+
error: "#ef4444",
|
|
2004
|
+
info: "#67e8f9"
|
|
2005
|
+
},
|
|
2006
|
+
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
2007
|
+
{ primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
|
|
2008
|
+
"#fecdd3"
|
|
2009
|
+
);
|
|
2010
|
+
s(
|
|
2011
|
+
"Banking",
|
|
2012
|
+
{
|
|
2013
|
+
primary: "#1e3a5f",
|
|
2014
|
+
primaryHover: "#152c4a",
|
|
2015
|
+
success: "#059669",
|
|
2016
|
+
warning: "#d97706",
|
|
2017
|
+
error: "#dc2626",
|
|
2018
|
+
info: "#0891b2"
|
|
2019
|
+
},
|
|
2020
|
+
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
2021
|
+
{ primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
|
|
2022
|
+
"#cbd5e1"
|
|
2023
|
+
);
|
|
2024
|
+
s(
|
|
2025
|
+
"Healthcare",
|
|
2026
|
+
{
|
|
2027
|
+
primary: "#0891b2",
|
|
2028
|
+
primaryHover: "#0e7490",
|
|
2029
|
+
success: "#059669",
|
|
2030
|
+
warning: "#d97706",
|
|
2031
|
+
error: "#dc2626",
|
|
2032
|
+
info: "#0284c7"
|
|
2033
|
+
},
|
|
2034
|
+
{ primary: "#f0fdfa", secondary: "#e0f7fa", tertiary: "#b2ebf2", hover: "#e0f7fa" },
|
|
2035
|
+
{ primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
|
|
2036
|
+
"#b2dfdb"
|
|
2037
|
+
);
|
|
2038
|
+
s(
|
|
2039
|
+
"Legal",
|
|
2040
|
+
{
|
|
2041
|
+
primary: "#1e293b",
|
|
2042
|
+
primaryHover: "#0f172a",
|
|
2043
|
+
success: "#059669",
|
|
2044
|
+
warning: "#d97706",
|
|
2045
|
+
error: "#dc2626",
|
|
2046
|
+
info: "#0284c7"
|
|
2047
|
+
},
|
|
2048
|
+
{ primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
|
|
2049
|
+
{ primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
|
|
2050
|
+
"#d6d3d1"
|
|
2051
|
+
);
|
|
2052
|
+
s(
|
|
2053
|
+
"Tech Startup",
|
|
2054
|
+
{
|
|
2055
|
+
primary: "#7c3aed",
|
|
2056
|
+
primaryHover: "#6d28d9",
|
|
2057
|
+
success: "#10b981",
|
|
2058
|
+
warning: "#f59e0b",
|
|
2059
|
+
error: "#ef4444",
|
|
2060
|
+
info: "#06b6d4"
|
|
2061
|
+
},
|
|
2062
|
+
{ primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
|
|
2063
|
+
{ primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
|
|
2064
|
+
"#c4b5fd"
|
|
2065
|
+
);
|
|
2066
|
+
s(
|
|
2067
|
+
"Enterprise",
|
|
2068
|
+
{
|
|
2069
|
+
primary: "#1e40af",
|
|
2070
|
+
primaryHover: "#1e3a8a",
|
|
2071
|
+
success: "#059669",
|
|
2072
|
+
warning: "#d97706",
|
|
2073
|
+
error: "#dc2626",
|
|
2074
|
+
info: "#0891b2"
|
|
2075
|
+
},
|
|
2076
|
+
{ primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
|
|
2077
|
+
{ primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
|
|
2078
|
+
"#93c5fd"
|
|
2079
|
+
);
|
|
2080
|
+
s(
|
|
2081
|
+
"Government",
|
|
2082
|
+
{
|
|
2083
|
+
primary: "#1d4ed8",
|
|
2084
|
+
primaryHover: "#1e40af",
|
|
2085
|
+
success: "#059669",
|
|
2086
|
+
warning: "#d97706",
|
|
2087
|
+
error: "#dc2626",
|
|
2088
|
+
info: "#0891b2"
|
|
2089
|
+
},
|
|
2090
|
+
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
2091
|
+
{ primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
|
|
2092
|
+
"#cbd5e1"
|
|
2093
|
+
);
|
|
2094
|
+
s(
|
|
2095
|
+
"Education",
|
|
2096
|
+
{
|
|
2097
|
+
primary: "#059669",
|
|
2098
|
+
primaryHover: "#047857",
|
|
2099
|
+
success: "#16a34a",
|
|
2100
|
+
warning: "#f59e0b",
|
|
2101
|
+
error: "#ef4444",
|
|
2102
|
+
info: "#0891b2"
|
|
2103
|
+
},
|
|
2104
|
+
{ primary: "#f0fdf9", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
2105
|
+
{ primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
|
|
2106
|
+
"#a7f3d0"
|
|
2107
|
+
);
|
|
2108
|
+
s(
|
|
2109
|
+
"Real Estate",
|
|
2110
|
+
{
|
|
2111
|
+
primary: "#92400e",
|
|
2112
|
+
primaryHover: "#78350f",
|
|
2113
|
+
success: "#059669",
|
|
2114
|
+
warning: "#b45309",
|
|
2115
|
+
error: "#dc2626",
|
|
2116
|
+
info: "#0891b2"
|
|
2117
|
+
},
|
|
2118
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
2119
|
+
{ primary: "#422006", secondary: "#713f12", muted: "#d97706" },
|
|
2120
|
+
"#fcd34d"
|
|
2121
|
+
);
|
|
2122
|
+
s(
|
|
2123
|
+
"Nord",
|
|
2124
|
+
{
|
|
2125
|
+
primary: "#5e81ac",
|
|
2126
|
+
primaryHover: "#4c6b90",
|
|
2127
|
+
success: "#a3be8c",
|
|
2128
|
+
warning: "#ebcb8b",
|
|
2129
|
+
error: "#bf616a",
|
|
2130
|
+
info: "#88c0d0"
|
|
2131
|
+
},
|
|
2132
|
+
{ primary: "#eceff4", secondary: "#e5e9f0", tertiary: "#d8dee9", hover: "#d8dee9" },
|
|
2133
|
+
{ primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
|
|
2134
|
+
"#d8dee9"
|
|
2135
|
+
);
|
|
2136
|
+
p(
|
|
2137
|
+
"Dracula",
|
|
2138
|
+
{
|
|
2139
|
+
primary: "#bd93f9",
|
|
2140
|
+
primaryHover: "#9d79d9",
|
|
2141
|
+
success: "#50fa7b",
|
|
2142
|
+
warning: "#f1fa8c",
|
|
2143
|
+
error: "#ff5555",
|
|
2144
|
+
info: "#8be9fd"
|
|
2145
|
+
},
|
|
2146
|
+
{ primary: "#282a36", secondary: "#343746", tertiary: "#44475a", hover: "#44475a" },
|
|
2147
|
+
{ primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
|
|
2148
|
+
"#44475a"
|
|
2149
|
+
);
|
|
2150
|
+
s(
|
|
2151
|
+
"Solarized Light",
|
|
2152
|
+
{
|
|
2153
|
+
primary: "#268bd2",
|
|
2154
|
+
primaryHover: "#1a6da0",
|
|
2155
|
+
success: "#859900",
|
|
2156
|
+
warning: "#b58900",
|
|
2157
|
+
error: "#dc322f",
|
|
2158
|
+
info: "#2aa198"
|
|
2159
|
+
},
|
|
2160
|
+
{ primary: "#fdf6e3", secondary: "#eee8d5", tertiary: "#e0dbc7", hover: "#eee8d5" },
|
|
2161
|
+
{ primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
|
|
2162
|
+
"#eee8d5"
|
|
2163
|
+
);
|
|
2164
|
+
p(
|
|
2165
|
+
"Solarized Dark",
|
|
2166
|
+
{
|
|
2167
|
+
primary: "#268bd2",
|
|
2168
|
+
primaryHover: "#3d98db",
|
|
2169
|
+
success: "#859900",
|
|
2170
|
+
warning: "#b58900",
|
|
2171
|
+
error: "#dc322f",
|
|
2172
|
+
info: "#2aa198"
|
|
2173
|
+
},
|
|
2174
|
+
{ primary: "#002b36", secondary: "#073642", tertiary: "#0a4858", hover: "#073642" },
|
|
2175
|
+
{ primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
|
|
2176
|
+
"#073642"
|
|
2177
|
+
);
|
|
2178
|
+
p(
|
|
2179
|
+
"Monokai",
|
|
2180
|
+
{
|
|
2181
|
+
primary: "#66d9ef",
|
|
2182
|
+
primaryHover: "#45c0d6",
|
|
2183
|
+
success: "#a6e22e",
|
|
2184
|
+
warning: "#e6db74",
|
|
2185
|
+
error: "#f92672",
|
|
2186
|
+
info: "#66d9ef"
|
|
2187
|
+
},
|
|
2188
|
+
{ primary: "#272822", secondary: "#34352e", tertiary: "#3e3d32", hover: "#3e3d32" },
|
|
2189
|
+
{ primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
|
|
2190
|
+
"#3e3d32"
|
|
2191
|
+
);
|
|
2192
|
+
p(
|
|
2193
|
+
"One Dark",
|
|
2194
|
+
{
|
|
2195
|
+
primary: "#61afef",
|
|
2196
|
+
primaryHover: "#4b9ee0",
|
|
2197
|
+
success: "#98c379",
|
|
2198
|
+
warning: "#e5c07b",
|
|
2199
|
+
error: "#e06c75",
|
|
2200
|
+
info: "#56b6c2"
|
|
2201
|
+
},
|
|
2202
|
+
{ primary: "#282c34", secondary: "#2c313a", tertiary: "#353b45", hover: "#353b45" },
|
|
2203
|
+
{ primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
|
|
2204
|
+
"#3e4452"
|
|
2205
|
+
);
|
|
2206
|
+
p(
|
|
2207
|
+
"Synthwave",
|
|
2208
|
+
{
|
|
2209
|
+
primary: "#ff7edb",
|
|
2210
|
+
primaryHover: "#e660c2",
|
|
2211
|
+
success: "#72f1b8",
|
|
2212
|
+
warning: "#fede5d",
|
|
2213
|
+
error: "#fe4450",
|
|
2214
|
+
info: "#36f9f6"
|
|
2215
|
+
},
|
|
2216
|
+
{ primary: "#241b2f", secondary: "#2d2140", tertiary: "#362a50", hover: "#362a50" },
|
|
2217
|
+
{ primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
|
|
2218
|
+
"#4a3866"
|
|
2219
|
+
);
|
|
2220
|
+
s(
|
|
2221
|
+
"Vaporwave",
|
|
2222
|
+
{
|
|
2223
|
+
primary: "#ff71ce",
|
|
2224
|
+
primaryHover: "#e655b5",
|
|
2225
|
+
success: "#78dcca",
|
|
2226
|
+
warning: "#ffb86c",
|
|
2227
|
+
error: "#ff5555",
|
|
2228
|
+
info: "#76e8fc"
|
|
2229
|
+
},
|
|
2230
|
+
{ primary: "#fce4f7", secondary: "#e8d0f4", tertiary: "#d4bcf0", hover: "#e8d0f4" },
|
|
2231
|
+
{ primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
|
|
2232
|
+
"#d8a8e8"
|
|
2233
|
+
);
|
|
2234
|
+
p(
|
|
2235
|
+
"Terminal Green",
|
|
2236
|
+
{
|
|
2237
|
+
primary: "#00ff41",
|
|
2238
|
+
primaryHover: "#00cc34",
|
|
2239
|
+
success: "#00ff41",
|
|
2240
|
+
warning: "#ffff00",
|
|
2241
|
+
error: "#ff0000",
|
|
2242
|
+
info: "#00ffff"
|
|
2243
|
+
},
|
|
2244
|
+
{ primary: "#0a0a0a", secondary: "#0d1a0d", tertiary: "#1a2e1a", hover: "#1a2e1a" },
|
|
2245
|
+
{ primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
|
|
2246
|
+
"#003300"
|
|
2247
|
+
);
|
|
2248
|
+
s(
|
|
2249
|
+
"Sepia",
|
|
2250
|
+
{
|
|
2251
|
+
primary: "#8b6914",
|
|
2252
|
+
primaryHover: "#704f10",
|
|
2253
|
+
success: "#6b8e23",
|
|
2254
|
+
warning: "#cd853f",
|
|
2255
|
+
error: "#b22222",
|
|
2256
|
+
info: "#5f9ea0"
|
|
2257
|
+
},
|
|
2258
|
+
{ primary: "#faf0e6", secondary: "#f5e6d3", tertiary: "#eddcc7", hover: "#f5e6d3" },
|
|
2259
|
+
{ primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
|
|
2260
|
+
"#d7ccc8"
|
|
2261
|
+
);
|
|
2262
|
+
s(
|
|
2263
|
+
"Vintage",
|
|
2264
|
+
{
|
|
2265
|
+
primary: "#8d6e63",
|
|
2266
|
+
primaryHover: "#6d4c41",
|
|
2267
|
+
success: "#66bb6a",
|
|
2268
|
+
warning: "#ffb300",
|
|
2269
|
+
error: "#e53935",
|
|
2270
|
+
info: "#29b6f6"
|
|
2271
|
+
},
|
|
2272
|
+
{ primary: "#efebe9", secondary: "#d7ccc8", tertiary: "#bcaaa4", hover: "#d7ccc8" },
|
|
2273
|
+
{ primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
|
|
2274
|
+
"#bcaaa4"
|
|
2275
|
+
);
|
|
2276
|
+
p(
|
|
2277
|
+
"Cyberpunk",
|
|
2278
|
+
{
|
|
2279
|
+
primary: "#00f0ff",
|
|
2280
|
+
primaryHover: "#00c8d4",
|
|
2281
|
+
success: "#39ff14",
|
|
2282
|
+
warning: "#ffff00",
|
|
2283
|
+
error: "#ff003c",
|
|
2284
|
+
info: "#bf00ff"
|
|
2285
|
+
},
|
|
2286
|
+
{ primary: "#0a0e17", secondary: "#131824", tertiary: "#1c2333", hover: "#1c2333" },
|
|
2287
|
+
{ primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
|
|
2288
|
+
"#1c3a44"
|
|
2289
|
+
);
|
|
2290
|
+
p(
|
|
2291
|
+
"Neon",
|
|
2292
|
+
{
|
|
2293
|
+
primary: "#ff00ff",
|
|
2294
|
+
primaryHover: "#cc00cc",
|
|
2295
|
+
success: "#00ff00",
|
|
2296
|
+
warning: "#ffff00",
|
|
2297
|
+
error: "#ff0000",
|
|
2298
|
+
info: "#00ffff"
|
|
2299
|
+
},
|
|
2300
|
+
{ primary: "#0d0d0d", secondary: "#1a1a1a", tertiary: "#262626", hover: "#262626" },
|
|
2301
|
+
{ primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
|
|
2302
|
+
"#333333"
|
|
2303
|
+
);
|
|
2304
|
+
p(
|
|
2305
|
+
"Retrowave",
|
|
2306
|
+
{
|
|
2307
|
+
primary: "#f77fbe",
|
|
2308
|
+
primaryHover: "#e462a3",
|
|
2309
|
+
success: "#72f1b8",
|
|
2310
|
+
warning: "#ffe261",
|
|
2311
|
+
error: "#ff4444",
|
|
2312
|
+
info: "#79e8fb"
|
|
2313
|
+
},
|
|
2314
|
+
{ primary: "#1b0a2e", secondary: "#261440", tertiary: "#321e52", hover: "#321e52" },
|
|
2315
|
+
{ primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
|
|
2316
|
+
"#4a2d66"
|
|
2317
|
+
);
|
|
2318
|
+
s(
|
|
2319
|
+
"Christmas",
|
|
2320
|
+
{
|
|
2321
|
+
primary: "#c41e3a",
|
|
2322
|
+
primaryHover: "#a01830",
|
|
2323
|
+
success: "#228b22",
|
|
2324
|
+
warning: "#ffd700",
|
|
2325
|
+
error: "#dc2626",
|
|
2326
|
+
info: "#0891b2"
|
|
2327
|
+
},
|
|
2328
|
+
{ primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
|
|
2329
|
+
{ primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
|
|
2330
|
+
"#e8a0a0"
|
|
2331
|
+
);
|
|
2332
|
+
p(
|
|
2333
|
+
"Halloween",
|
|
2334
|
+
{
|
|
2335
|
+
primary: "#ff6600",
|
|
2336
|
+
primaryHover: "#e05500",
|
|
2337
|
+
success: "#4ade80",
|
|
2338
|
+
warning: "#fbbf24",
|
|
2339
|
+
error: "#ff0000",
|
|
2340
|
+
info: "#9333ea"
|
|
2341
|
+
},
|
|
2342
|
+
{ primary: "#1a0a00", secondary: "#2d1500", tertiary: "#402000", hover: "#402000" },
|
|
2343
|
+
{ primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
|
|
2344
|
+
"#5c3400"
|
|
2345
|
+
);
|
|
2346
|
+
s(
|
|
2347
|
+
"Valentine",
|
|
2348
|
+
{
|
|
2349
|
+
primary: "#e11d48",
|
|
2350
|
+
primaryHover: "#be123c",
|
|
2351
|
+
success: "#10b981",
|
|
2352
|
+
warning: "#f59e0b",
|
|
2353
|
+
error: "#dc2626",
|
|
2354
|
+
info: "#ec4899"
|
|
2355
|
+
},
|
|
2356
|
+
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
2357
|
+
{ primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
|
|
2358
|
+
"#fda4af"
|
|
2359
|
+
);
|
|
2360
|
+
s(
|
|
2361
|
+
"Easter",
|
|
2362
|
+
{
|
|
2363
|
+
primary: "#a78bfa",
|
|
2364
|
+
primaryHover: "#8b5cf6",
|
|
2365
|
+
success: "#4ade80",
|
|
2366
|
+
warning: "#fcd34d",
|
|
2367
|
+
error: "#fb7185",
|
|
2368
|
+
info: "#67e8f9"
|
|
2369
|
+
},
|
|
2370
|
+
{ primary: "#fef9ff", secondary: "#f3e8ff", tertiary: "#e8d5ff", hover: "#f3e8ff" },
|
|
2371
|
+
{ primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
|
|
2372
|
+
"#ddd6fe"
|
|
2373
|
+
);
|
|
2374
|
+
s(
|
|
2375
|
+
"Summer Beach",
|
|
2376
|
+
{
|
|
2377
|
+
primary: "#0ea5e9",
|
|
2378
|
+
primaryHover: "#0284c7",
|
|
2379
|
+
success: "#10b981",
|
|
2380
|
+
warning: "#f59e0b",
|
|
2381
|
+
error: "#ef4444",
|
|
2382
|
+
info: "#06b6d4"
|
|
2383
|
+
},
|
|
2384
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
2385
|
+
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
2386
|
+
"#fcd34d"
|
|
2387
|
+
);
|
|
2388
|
+
s(
|
|
2389
|
+
"Winter Frost",
|
|
2390
|
+
{
|
|
2391
|
+
primary: "#3b82f6",
|
|
2392
|
+
primaryHover: "#2563eb",
|
|
2393
|
+
success: "#10b981",
|
|
2394
|
+
warning: "#f59e0b",
|
|
2395
|
+
error: "#ef4444",
|
|
2396
|
+
info: "#06b6d4"
|
|
2397
|
+
},
|
|
2398
|
+
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
2399
|
+
{ primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
|
|
2400
|
+
"#bfdbfe"
|
|
2401
|
+
);
|
|
2402
|
+
s(
|
|
2403
|
+
"Cherry Blossom",
|
|
2404
|
+
{
|
|
2405
|
+
primary: "#ec4899",
|
|
2406
|
+
primaryHover: "#db2777",
|
|
2407
|
+
success: "#10b981",
|
|
2408
|
+
warning: "#f59e0b",
|
|
2409
|
+
error: "#ef4444",
|
|
2410
|
+
info: "#06b6d4"
|
|
2411
|
+
},
|
|
2412
|
+
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
2413
|
+
{ primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
|
|
2414
|
+
"#fbcfe8"
|
|
2415
|
+
);
|
|
2416
|
+
s(
|
|
2417
|
+
"Harvest",
|
|
2418
|
+
{
|
|
2419
|
+
primary: "#b45309",
|
|
2420
|
+
primaryHover: "#92400e",
|
|
2421
|
+
success: "#4d7c0f",
|
|
2422
|
+
warning: "#a16207",
|
|
2423
|
+
error: "#b91c1c",
|
|
2424
|
+
info: "#0e7490"
|
|
2425
|
+
},
|
|
2426
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
2427
|
+
{ primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
|
|
2428
|
+
"#fcd34d"
|
|
2429
|
+
);
|
|
2430
|
+
s(
|
|
2431
|
+
"Japanese Zen",
|
|
2432
|
+
{
|
|
2433
|
+
primary: "#6b7280",
|
|
2434
|
+
primaryHover: "#4b5563",
|
|
2435
|
+
success: "#6b8e23",
|
|
2436
|
+
warning: "#d4a017",
|
|
2437
|
+
error: "#c0392b",
|
|
2438
|
+
info: "#5f9ea0"
|
|
2439
|
+
},
|
|
2440
|
+
{ primary: "#faf9f6", secondary: "#f0ece3", tertiary: "#e6e0d4", hover: "#f0ece3" },
|
|
2441
|
+
{ primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
|
|
2442
|
+
"#d5cec0"
|
|
2443
|
+
);
|
|
2444
|
+
s(
|
|
2445
|
+
"Moroccan",
|
|
2446
|
+
{
|
|
2447
|
+
primary: "#c2410c",
|
|
2448
|
+
primaryHover: "#9a3412",
|
|
2449
|
+
success: "#15803d",
|
|
2450
|
+
warning: "#ca8a04",
|
|
2451
|
+
error: "#b91c1c",
|
|
2452
|
+
info: "#0e7490"
|
|
2453
|
+
},
|
|
2454
|
+
{ primary: "#fffbf0", secondary: "#fef3e0", tertiary: "#fde6c4", hover: "#fef3e0" },
|
|
2455
|
+
{ primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
|
|
2456
|
+
"#f5d0a0"
|
|
2457
|
+
);
|
|
2458
|
+
s(
|
|
2459
|
+
"Scandinavian",
|
|
2460
|
+
{
|
|
2461
|
+
primary: "#4b5563",
|
|
2462
|
+
primaryHover: "#374151",
|
|
2463
|
+
success: "#059669",
|
|
2464
|
+
warning: "#d97706",
|
|
2465
|
+
error: "#dc2626",
|
|
2466
|
+
info: "#0891b2"
|
|
2467
|
+
},
|
|
2468
|
+
{ primary: "#ffffff", secondary: "#f9fafb", tertiary: "#f3f4f6", hover: "#f3f4f6" },
|
|
2469
|
+
{ primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
|
|
2470
|
+
"#e5e7eb"
|
|
2471
|
+
);
|
|
2472
|
+
s(
|
|
2473
|
+
"Mediterranean",
|
|
2474
|
+
{
|
|
2475
|
+
primary: "#1e40af",
|
|
2476
|
+
primaryHover: "#1e3a8a",
|
|
2477
|
+
success: "#059669",
|
|
2478
|
+
warning: "#d97706",
|
|
2479
|
+
error: "#dc2626",
|
|
2480
|
+
info: "#0891b2"
|
|
2481
|
+
},
|
|
2482
|
+
{ primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
|
|
2483
|
+
{ primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
|
|
2484
|
+
"#bfdbfe"
|
|
2485
|
+
);
|
|
2486
|
+
s(
|
|
2487
|
+
"Chinese New Year",
|
|
2488
|
+
{
|
|
2489
|
+
primary: "#dc2626",
|
|
2490
|
+
primaryHover: "#b91c1c",
|
|
2491
|
+
success: "#16a34a",
|
|
2492
|
+
warning: "#d4a017",
|
|
2493
|
+
error: "#ef4444",
|
|
2494
|
+
info: "#0891b2"
|
|
2495
|
+
},
|
|
2496
|
+
{ primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
|
|
2497
|
+
{ primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
|
|
2498
|
+
"#fca5a5"
|
|
2499
|
+
);
|
|
2500
|
+
s(
|
|
2501
|
+
"Indian Festive",
|
|
2502
|
+
{
|
|
2503
|
+
primary: "#d97706",
|
|
2504
|
+
primaryHover: "#b45309",
|
|
2505
|
+
success: "#16a34a",
|
|
2506
|
+
warning: "#ca8a04",
|
|
2507
|
+
error: "#dc2626",
|
|
2508
|
+
info: "#7c3aed"
|
|
2509
|
+
},
|
|
2510
|
+
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
2511
|
+
{ primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
|
|
2512
|
+
"#fcd34d"
|
|
2513
|
+
);
|
|
2514
|
+
s(
|
|
2515
|
+
"Brazilian Carnival",
|
|
2516
|
+
{
|
|
2517
|
+
primary: "#16a34a",
|
|
2518
|
+
primaryHover: "#15803d",
|
|
2519
|
+
success: "#22c55e",
|
|
2520
|
+
warning: "#facc15",
|
|
2521
|
+
error: "#ef4444",
|
|
2522
|
+
info: "#0ea5e9"
|
|
2523
|
+
},
|
|
2524
|
+
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
2525
|
+
{ primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
|
|
2526
|
+
"#86efac"
|
|
2527
|
+
);
|
|
2528
|
+
s(
|
|
2529
|
+
"African Earth",
|
|
2530
|
+
{
|
|
2531
|
+
primary: "#92400e",
|
|
2532
|
+
primaryHover: "#78350f",
|
|
2533
|
+
success: "#4d7c0f",
|
|
2534
|
+
warning: "#a16207",
|
|
2535
|
+
error: "#b91c1c",
|
|
2536
|
+
info: "#0e7490"
|
|
2537
|
+
},
|
|
2538
|
+
{ primary: "#faf5f0", secondary: "#f0e6d6", tertiary: "#e6d5bb", hover: "#f0e6d6" },
|
|
2539
|
+
{ primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
|
|
2540
|
+
"#d4b896"
|
|
2541
|
+
);
|
|
2542
|
+
p(
|
|
2543
|
+
"High Contrast Dark",
|
|
2544
|
+
{
|
|
2545
|
+
primary: "#ffff00",
|
|
2546
|
+
primaryHover: "#cccc00",
|
|
2547
|
+
success: "#00ff00",
|
|
2548
|
+
warning: "#ff8c00",
|
|
2549
|
+
error: "#ff0000",
|
|
2550
|
+
info: "#00ffff"
|
|
2551
|
+
},
|
|
2552
|
+
{ primary: "#000000", secondary: "#1a1a1a", tertiary: "#333333", hover: "#333333" },
|
|
2553
|
+
{ primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
|
|
2554
|
+
"#ffffff"
|
|
2555
|
+
);
|
|
2556
|
+
s(
|
|
2557
|
+
"Monochrome",
|
|
2558
|
+
{
|
|
2559
|
+
primary: "#404040",
|
|
2560
|
+
primaryHover: "#262626",
|
|
2561
|
+
success: "#4d7c0f",
|
|
2562
|
+
warning: "#a16207",
|
|
2563
|
+
error: "#b91c1c",
|
|
2564
|
+
info: "#0e7490"
|
|
2565
|
+
},
|
|
2566
|
+
{ primary: "#fafafa", secondary: "#f0f0f0", tertiary: "#e0e0e0", hover: "#e0e0e0" },
|
|
2567
|
+
{ primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
|
|
2568
|
+
"#c0c0c0"
|
|
2569
|
+
);
|
|
2570
|
+
s(
|
|
2571
|
+
"Enhanced Contrast",
|
|
2572
|
+
{
|
|
2573
|
+
primary: "#0050b3",
|
|
2574
|
+
primaryHover: "#003d8c",
|
|
2575
|
+
success: "#006400",
|
|
2576
|
+
warning: "#cc7000",
|
|
2577
|
+
error: "#cc0000",
|
|
2578
|
+
info: "#006680"
|
|
2579
|
+
},
|
|
2580
|
+
{ primary: "#ffffff", secondary: "#f5f5f5", tertiary: "#ebebeb", hover: "#ebebeb" },
|
|
2581
|
+
{ primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
|
|
2582
|
+
"#8c8c8c"
|
|
2583
|
+
);
|
|
2584
|
+
s(
|
|
2585
|
+
"Minimalist",
|
|
2586
|
+
{
|
|
2587
|
+
primary: "#18181b",
|
|
2588
|
+
primaryHover: "#27272a",
|
|
2589
|
+
success: "#22c55e",
|
|
2590
|
+
warning: "#eab308",
|
|
2591
|
+
error: "#ef4444",
|
|
2592
|
+
info: "#3b82f6"
|
|
2593
|
+
},
|
|
2594
|
+
{ primary: "#ffffff", secondary: "#fafafa", tertiary: "#f5f5f5", hover: "#f5f5f5" },
|
|
2595
|
+
{ primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
|
|
2596
|
+
"#e5e5e5"
|
|
2597
|
+
);
|
|
2598
|
+
p(
|
|
2599
|
+
"Warm Dark",
|
|
2600
|
+
{
|
|
2601
|
+
primary: "#f59e0b",
|
|
2602
|
+
primaryHover: "#d97706",
|
|
2603
|
+
success: "#10b981",
|
|
2604
|
+
warning: "#fbbf24",
|
|
2605
|
+
error: "#f87171",
|
|
2606
|
+
info: "#38bdf8"
|
|
2607
|
+
},
|
|
2608
|
+
{ primary: "#1c1917", secondary: "#292524", tertiary: "#44403c", hover: "#44403c" },
|
|
2609
|
+
{ primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
|
|
2610
|
+
"#57534e"
|
|
2611
|
+
);
|
|
2612
|
+
p(
|
|
2613
|
+
"Soft Dark",
|
|
2614
|
+
{
|
|
2615
|
+
primary: "#a78bfa",
|
|
2616
|
+
primaryHover: "#8b5cf6",
|
|
2617
|
+
success: "#34d399",
|
|
2618
|
+
warning: "#fcd34d",
|
|
2619
|
+
error: "#fb7185",
|
|
2620
|
+
info: "#67e8f9"
|
|
2621
|
+
},
|
|
2622
|
+
{ primary: "#1e1e2e", secondary: "#262637", tertiary: "#313147", hover: "#313147" },
|
|
2623
|
+
{ primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
|
|
2624
|
+
"#3e3e58"
|
|
2625
|
+
);
|
|
2626
|
+
s(
|
|
2627
|
+
"Coffee",
|
|
2628
|
+
{
|
|
2629
|
+
primary: "#6f4e37",
|
|
2630
|
+
primaryHover: "#5c3d28",
|
|
2631
|
+
success: "#4d7c0f",
|
|
2632
|
+
warning: "#a16207",
|
|
2633
|
+
error: "#b91c1c",
|
|
2634
|
+
info: "#0e7490"
|
|
2635
|
+
},
|
|
2636
|
+
{ primary: "#faf6f1", secondary: "#f0e8dc", tertiary: "#e6d8c6", hover: "#f0e8dc" },
|
|
2637
|
+
{ primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
|
|
2638
|
+
"#d4c4a8"
|
|
2639
|
+
);
|
|
2640
|
+
s(
|
|
2641
|
+
"Wine",
|
|
2642
|
+
{
|
|
2643
|
+
primary: "#7f1d1d",
|
|
2644
|
+
primaryHover: "#641717",
|
|
2645
|
+
success: "#059669",
|
|
2646
|
+
warning: "#d97706",
|
|
2647
|
+
error: "#dc2626",
|
|
2648
|
+
info: "#0891b2"
|
|
2649
|
+
},
|
|
2650
|
+
{ primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
|
|
2651
|
+
{ primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
|
|
2652
|
+
"#e8a0a0"
|
|
2653
|
+
);
|
|
2654
|
+
b(null);
|
|
2655
|
+
b(null);
|
|
2656
|
+
const G = {
|
|
949
2657
|
broker: "localhost",
|
|
950
2658
|
port: 1883,
|
|
951
2659
|
clientId: `nice2dev-${Date.now()}`,
|
|
@@ -953,260 +2661,261 @@ const B = {
|
|
|
953
2661
|
keepAlive: 60,
|
|
954
2662
|
cleanSession: !0,
|
|
955
2663
|
topics: []
|
|
956
|
-
},
|
|
2664
|
+
}, V = {
|
|
957
2665
|
host: "localhost",
|
|
958
2666
|
port: 5683,
|
|
959
2667
|
useDTLS: !1,
|
|
960
2668
|
resources: []
|
|
961
|
-
},
|
|
2669
|
+
}, Q = {
|
|
962
2670
|
type: "tcp",
|
|
963
2671
|
host: "localhost",
|
|
964
2672
|
port: 502,
|
|
965
2673
|
slaveId: 1,
|
|
966
2674
|
timeout: 1e3,
|
|
967
2675
|
registers: []
|
|
968
|
-
},
|
|
2676
|
+
}, j = {
|
|
969
2677
|
endpointUrl: "opc.tcp://localhost:4840",
|
|
970
2678
|
securityMode: "None",
|
|
971
2679
|
authentication: "anonymous",
|
|
972
2680
|
applicationName: "Nice2Dev IoT Client",
|
|
973
2681
|
nodes: []
|
|
974
2682
|
};
|
|
975
|
-
function
|
|
976
|
-
protocol:
|
|
977
|
-
config:
|
|
978
|
-
onSave:
|
|
979
|
-
onTest:
|
|
980
|
-
className:
|
|
2683
|
+
function Ae({
|
|
2684
|
+
protocol: r = "mqtt",
|
|
2685
|
+
config: i,
|
|
2686
|
+
onSave: c,
|
|
2687
|
+
onTest: n,
|
|
2688
|
+
className: o = ""
|
|
981
2689
|
}) {
|
|
982
|
-
const [
|
|
983
|
-
(
|
|
984
|
-
), [
|
|
985
|
-
(
|
|
986
|
-
), [
|
|
987
|
-
(
|
|
988
|
-
), [
|
|
989
|
-
(
|
|
990
|
-
), [
|
|
991
|
-
switch (
|
|
2690
|
+
const { t: d } = U(), [t, l] = h(r), [g, m] = h(
|
|
2691
|
+
(i == null ? void 0 : i.type) === "mqtt" ? { ...G, ...i.config } : G
|
|
2692
|
+
), [C, N] = h(
|
|
2693
|
+
(i == null ? void 0 : i.type) === "coap" ? { ...V, ...i.config } : V
|
|
2694
|
+
), [v, u] = h(
|
|
2695
|
+
(i == null ? void 0 : i.type) === "modbus" ? { ...Q, ...i.config } : Q
|
|
2696
|
+
), [_, H] = h(
|
|
2697
|
+
(i == null ? void 0 : i.type) === "opcua" ? { ...j, ...i.config } : j
|
|
2698
|
+
), [P, x] = h(null), [R, y] = h(!1), k = w(() => {
|
|
2699
|
+
switch (t) {
|
|
992
2700
|
case "mqtt":
|
|
993
|
-
return
|
|
2701
|
+
return g;
|
|
994
2702
|
case "coap":
|
|
995
|
-
return
|
|
2703
|
+
return C;
|
|
996
2704
|
case "modbus-tcp":
|
|
997
2705
|
case "modbus-rtu":
|
|
998
|
-
return
|
|
2706
|
+
return v;
|
|
999
2707
|
case "opcua":
|
|
1000
|
-
return
|
|
2708
|
+
return _;
|
|
1001
2709
|
default:
|
|
1002
|
-
return
|
|
2710
|
+
return g;
|
|
1003
2711
|
}
|
|
1004
|
-
}, [
|
|
1005
|
-
|
|
1006
|
-
}, [
|
|
1007
|
-
if (
|
|
1008
|
-
|
|
2712
|
+
}, [t, g, C, v, _]), L = w(() => {
|
|
2713
|
+
c == null || c(k());
|
|
2714
|
+
}, [k, c]), $ = w(async () => {
|
|
2715
|
+
if (n) {
|
|
2716
|
+
y(!0), x(null);
|
|
1009
2717
|
try {
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1012
|
-
} catch (
|
|
1013
|
-
|
|
2718
|
+
const M = await n(k());
|
|
2719
|
+
x(M);
|
|
2720
|
+
} catch (M) {
|
|
2721
|
+
x({ success: !1, message: String(M) });
|
|
1014
2722
|
} finally {
|
|
1015
|
-
|
|
2723
|
+
y(!1);
|
|
1016
2724
|
}
|
|
1017
2725
|
}
|
|
1018
|
-
}, [
|
|
1019
|
-
return /* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
1021
|
-
/* @__PURE__ */ e("h2", { children: "Protocol Configuration" }),
|
|
1022
|
-
/* @__PURE__ */
|
|
2726
|
+
}, [k, n]);
|
|
2727
|
+
return /* @__PURE__ */ a("div", { className: `nice-protocol-config ${o}`, children: [
|
|
2728
|
+
/* @__PURE__ */ a("header", { className: "nice-protocol-config__header", children: [
|
|
2729
|
+
/* @__PURE__ */ e("h2", { children: d("protocolConfig.title", "Protocol Configuration") }),
|
|
2730
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__protocol-selector", children: [
|
|
1023
2731
|
/* @__PURE__ */ e("label", { children: "Protocol:" }),
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */ e("option", { value: "mqtt", children: "MQTT" }),
|
|
1026
|
-
/* @__PURE__ */ e("option", { value: "coap", children: "CoAP" }),
|
|
1027
|
-
/* @__PURE__ */ e("option", { value: "modbus-tcp", children: "Modbus TCP" }),
|
|
1028
|
-
/* @__PURE__ */ e("option", { value: "modbus-rtu", children: "Modbus RTU" }),
|
|
1029
|
-
/* @__PURE__ */ e("option", { value: "opcua", children: "OPC-UA" })
|
|
2732
|
+
/* @__PURE__ */ a("select", { value: t, onChange: (M) => l(M.target.value), children: [
|
|
2733
|
+
/* @__PURE__ */ e("option", { value: "mqtt", children: d("protocolConfig.mqtt", "MQTT") }),
|
|
2734
|
+
/* @__PURE__ */ e("option", { value: "coap", children: d("protocolConfig.coap", "CoAP") }),
|
|
2735
|
+
/* @__PURE__ */ e("option", { value: "modbus-tcp", children: d("protocolConfig.modbusTcp", "Modbus TCP") }),
|
|
2736
|
+
/* @__PURE__ */ e("option", { value: "modbus-rtu", children: d("protocolConfig.modbusRtu", "Modbus RTU") }),
|
|
2737
|
+
/* @__PURE__ */ e("option", { value: "opcua", children: d("protocolConfig.opcUa", "OPC-UA") })
|
|
1030
2738
|
] })
|
|
1031
2739
|
] })
|
|
1032
2740
|
] }),
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
(
|
|
1037
|
-
|
|
2741
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__content", children: [
|
|
2742
|
+
t === "mqtt" && /* @__PURE__ */ e(Te, { config: g, onChange: m }),
|
|
2743
|
+
t === "coap" && /* @__PURE__ */ e(Pe, { config: C, onChange: N }),
|
|
2744
|
+
(t === "modbus-tcp" || t === "modbus-rtu") && /* @__PURE__ */ e(
|
|
2745
|
+
Me,
|
|
1038
2746
|
{
|
|
1039
|
-
config:
|
|
1040
|
-
type:
|
|
1041
|
-
onChange:
|
|
2747
|
+
config: v,
|
|
2748
|
+
type: t === "modbus-rtu" ? "rtu" : "tcp",
|
|
2749
|
+
onChange: u
|
|
1042
2750
|
}
|
|
1043
2751
|
),
|
|
1044
|
-
|
|
2752
|
+
t === "opcua" && /* @__PURE__ */ e(De, { config: _, onChange: H })
|
|
1045
2753
|
] }),
|
|
1046
|
-
|
|
2754
|
+
P && /* @__PURE__ */ a(
|
|
1047
2755
|
"div",
|
|
1048
2756
|
{
|
|
1049
|
-
className: `nice-protocol-config__test-result nice-protocol-config__test-result--${
|
|
2757
|
+
className: `nice-protocol-config__test-result nice-protocol-config__test-result--${P.success ? "success" : "error"}`,
|
|
1050
2758
|
children: [
|
|
1051
|
-
|
|
2759
|
+
P.success ? "✓" : "✗",
|
|
1052
2760
|
" ",
|
|
1053
|
-
|
|
2761
|
+
P.message
|
|
1054
2762
|
]
|
|
1055
2763
|
}
|
|
1056
2764
|
),
|
|
1057
|
-
/* @__PURE__ */
|
|
2765
|
+
/* @__PURE__ */ a("footer", { className: "nice-protocol-config__footer", children: [
|
|
1058
2766
|
/* @__PURE__ */ e(
|
|
1059
2767
|
"button",
|
|
1060
2768
|
{
|
|
1061
2769
|
className: "nice-protocol-config__test-btn",
|
|
1062
|
-
onClick:
|
|
1063
|
-
disabled:
|
|
1064
|
-
children:
|
|
2770
|
+
onClick: $,
|
|
2771
|
+
disabled: R || !n,
|
|
2772
|
+
children: R ? "Testing..." : "🔌 Test Connection"
|
|
1065
2773
|
}
|
|
1066
2774
|
),
|
|
1067
|
-
/* @__PURE__ */ e("button", { className: "nice-protocol-config__save-btn", onClick:
|
|
2775
|
+
/* @__PURE__ */ e("button", { className: "nice-protocol-config__save-btn", onClick: L, children: "💾 Save" })
|
|
1068
2776
|
] })
|
|
1069
2777
|
] });
|
|
1070
2778
|
}
|
|
1071
|
-
function
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
|
|
1076
|
-
|
|
2779
|
+
function Te({ config: r, onChange: i }) {
|
|
2780
|
+
const { t: c } = U();
|
|
2781
|
+
return /* @__PURE__ */ a("div", { className: "nice-protocol-config__section", children: [
|
|
2782
|
+
/* @__PURE__ */ e("h3", { children: c("protocolConfig.mqttConfiguration", "MQTT Configuration") }),
|
|
2783
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__grid", children: [
|
|
2784
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
2785
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.broker", "Broker") }),
|
|
1077
2786
|
/* @__PURE__ */ e(
|
|
1078
2787
|
"input",
|
|
1079
2788
|
{
|
|
1080
2789
|
type: "text",
|
|
1081
|
-
value:
|
|
1082
|
-
onChange: (n) =>
|
|
2790
|
+
value: r.broker,
|
|
2791
|
+
onChange: (n) => i({ ...r, broker: n.target.value }),
|
|
1083
2792
|
placeholder: "localhost"
|
|
1084
2793
|
}
|
|
1085
2794
|
)
|
|
1086
2795
|
] }),
|
|
1087
|
-
/* @__PURE__ */
|
|
1088
|
-
/* @__PURE__ */ e("label", { children: "Port" }),
|
|
2796
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
2797
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.port", "Port") }),
|
|
1089
2798
|
/* @__PURE__ */ e(
|
|
1090
2799
|
"input",
|
|
1091
2800
|
{
|
|
1092
2801
|
type: "number",
|
|
1093
|
-
value:
|
|
1094
|
-
onChange: (n) =>
|
|
2802
|
+
value: r.port,
|
|
2803
|
+
onChange: (n) => i({ ...r, port: parseInt(n.target.value, 10) || 1883 })
|
|
1095
2804
|
}
|
|
1096
2805
|
)
|
|
1097
2806
|
] }),
|
|
1098
|
-
/* @__PURE__ */
|
|
1099
|
-
/* @__PURE__ */ e("label", { children: "Client ID" }),
|
|
2807
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
2808
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.clientId", "Client ID") }),
|
|
1100
2809
|
/* @__PURE__ */ e(
|
|
1101
2810
|
"input",
|
|
1102
2811
|
{
|
|
1103
2812
|
type: "text",
|
|
1104
|
-
value:
|
|
1105
|
-
onChange: (n) =>
|
|
2813
|
+
value: r.clientId,
|
|
2814
|
+
onChange: (n) => i({ ...r, clientId: n.target.value })
|
|
1106
2815
|
}
|
|
1107
2816
|
)
|
|
1108
2817
|
] }),
|
|
1109
|
-
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ a("label", { children: [
|
|
1110
2819
|
/* @__PURE__ */ e(
|
|
1111
2820
|
"input",
|
|
1112
2821
|
{
|
|
1113
2822
|
type: "checkbox",
|
|
1114
|
-
checked:
|
|
1115
|
-
onChange: (n) =>
|
|
2823
|
+
checked: r.useTLS,
|
|
2824
|
+
onChange: (n) => i({ ...r, useTLS: n.target.checked })
|
|
1116
2825
|
}
|
|
1117
2826
|
),
|
|
1118
|
-
"Use TLS"
|
|
2827
|
+
c("protocolConfig.useTls", "Use TLS")
|
|
1119
2828
|
] }) }),
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */ e("label", { children: "Username" }),
|
|
2829
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
2830
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.username", "Username") }),
|
|
1122
2831
|
/* @__PURE__ */ e(
|
|
1123
2832
|
"input",
|
|
1124
2833
|
{
|
|
1125
2834
|
type: "text",
|
|
1126
|
-
value:
|
|
1127
|
-
onChange: (n) =>
|
|
2835
|
+
value: r.username || "",
|
|
2836
|
+
onChange: (n) => i({ ...r, username: n.target.value })
|
|
1128
2837
|
}
|
|
1129
2838
|
)
|
|
1130
2839
|
] }),
|
|
1131
|
-
/* @__PURE__ */
|
|
1132
|
-
/* @__PURE__ */ e("label", { children: "Password" }),
|
|
2840
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
2841
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.password", "Password") }),
|
|
1133
2842
|
/* @__PURE__ */ e(
|
|
1134
2843
|
"input",
|
|
1135
2844
|
{
|
|
1136
2845
|
type: "password",
|
|
1137
|
-
value:
|
|
1138
|
-
onChange: (n) =>
|
|
2846
|
+
value: r.password || "",
|
|
2847
|
+
onChange: (n) => i({ ...r, password: n.target.value })
|
|
1139
2848
|
}
|
|
1140
2849
|
)
|
|
1141
2850
|
] }),
|
|
1142
|
-
/* @__PURE__ */
|
|
2851
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
1143
2852
|
/* @__PURE__ */ e("label", { children: "Keep Alive (seconds)" }),
|
|
1144
2853
|
/* @__PURE__ */ e(
|
|
1145
2854
|
"input",
|
|
1146
2855
|
{
|
|
1147
2856
|
type: "number",
|
|
1148
|
-
value:
|
|
1149
|
-
onChange: (n) =>
|
|
2857
|
+
value: r.keepAlive,
|
|
2858
|
+
onChange: (n) => i({ ...r, keepAlive: parseInt(n.target.value, 10) || 60 })
|
|
1150
2859
|
}
|
|
1151
2860
|
)
|
|
1152
2861
|
] }),
|
|
1153
|
-
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */
|
|
2862
|
+
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ a("label", { children: [
|
|
1154
2863
|
/* @__PURE__ */ e(
|
|
1155
2864
|
"input",
|
|
1156
2865
|
{
|
|
1157
2866
|
type: "checkbox",
|
|
1158
|
-
checked:
|
|
1159
|
-
onChange: (n) =>
|
|
2867
|
+
checked: r.cleanSession,
|
|
2868
|
+
onChange: (n) => i({ ...r, cleanSession: n.target.checked })
|
|
1160
2869
|
}
|
|
1161
2870
|
),
|
|
1162
|
-
"Clean Session"
|
|
2871
|
+
c("protocolConfig.cleanSession", "Clean Session")
|
|
1163
2872
|
] }) })
|
|
1164
2873
|
] }),
|
|
1165
|
-
/* @__PURE__ */ e("h4", { children: "Topics" }),
|
|
1166
|
-
/* @__PURE__ */
|
|
1167
|
-
|
|
2874
|
+
/* @__PURE__ */ e("h4", { children: c("protocolConfig.topics", "Topics") }),
|
|
2875
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__topics", children: [
|
|
2876
|
+
r.topics.map((n, o) => /* @__PURE__ */ a("div", { className: "nice-protocol-config__topic-row", children: [
|
|
1168
2877
|
/* @__PURE__ */ e(
|
|
1169
2878
|
"input",
|
|
1170
2879
|
{
|
|
1171
2880
|
type: "text",
|
|
1172
2881
|
value: n.pattern,
|
|
1173
|
-
onChange: (
|
|
1174
|
-
const
|
|
1175
|
-
|
|
2882
|
+
onChange: (d) => {
|
|
2883
|
+
const t = [...r.topics];
|
|
2884
|
+
t[o] = { ...t[o], pattern: d.target.value }, i({ ...r, topics: t });
|
|
1176
2885
|
},
|
|
1177
|
-
placeholder: "e.g., sensors/+/data"
|
|
2886
|
+
placeholder: c("protocolConfig.topicPatternPlaceholder", "e.g., sensors/+/data")
|
|
1178
2887
|
}
|
|
1179
2888
|
),
|
|
1180
|
-
/* @__PURE__ */
|
|
2889
|
+
/* @__PURE__ */ a(
|
|
1181
2890
|
"select",
|
|
1182
2891
|
{
|
|
1183
2892
|
value: n.qos,
|
|
1184
|
-
onChange: (
|
|
1185
|
-
const
|
|
1186
|
-
|
|
2893
|
+
onChange: (d) => {
|
|
2894
|
+
const t = [...r.topics];
|
|
2895
|
+
t[o] = { ...t[o], qos: parseInt(d.target.value, 10) }, i({ ...r, topics: t });
|
|
1187
2896
|
},
|
|
1188
2897
|
children: [
|
|
1189
|
-
/* @__PURE__ */ e("option", { value: 0, children: "QoS 0" }),
|
|
1190
|
-
/* @__PURE__ */ e("option", { value: 1, children: "QoS 1" }),
|
|
1191
|
-
/* @__PURE__ */ e("option", { value: 2, children: "QoS 2" })
|
|
2898
|
+
/* @__PURE__ */ e("option", { value: 0, children: c("protocolConfig.qos0", "QoS 0") }),
|
|
2899
|
+
/* @__PURE__ */ e("option", { value: 1, children: c("protocolConfig.qos1", "QoS 1") }),
|
|
2900
|
+
/* @__PURE__ */ e("option", { value: 2, children: c("protocolConfig.qos2", "QoS 2") })
|
|
1192
2901
|
]
|
|
1193
2902
|
}
|
|
1194
2903
|
),
|
|
1195
|
-
/* @__PURE__ */
|
|
2904
|
+
/* @__PURE__ */ a(
|
|
1196
2905
|
"select",
|
|
1197
2906
|
{
|
|
1198
2907
|
value: n.direction,
|
|
1199
|
-
onChange: (
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
...
|
|
1203
|
-
direction:
|
|
1204
|
-
},
|
|
2908
|
+
onChange: (d) => {
|
|
2909
|
+
const t = [...r.topics];
|
|
2910
|
+
t[o] = {
|
|
2911
|
+
...t[o],
|
|
2912
|
+
direction: d.target.value
|
|
2913
|
+
}, i({ ...r, topics: t });
|
|
1205
2914
|
},
|
|
1206
2915
|
children: [
|
|
1207
|
-
/* @__PURE__ */ e("option", { value: "subscribe", children: "Subscribe" }),
|
|
1208
|
-
/* @__PURE__ */ e("option", { value: "publish", children: "Publish" }),
|
|
1209
|
-
/* @__PURE__ */ e("option", { value: "both", children: "Both" })
|
|
2916
|
+
/* @__PURE__ */ e("option", { value: "subscribe", children: c("protocolConfig.subscribe", "Subscribe") }),
|
|
2917
|
+
/* @__PURE__ */ e("option", { value: "publish", children: c("protocolConfig.publish", "Publish") }),
|
|
2918
|
+
/* @__PURE__ */ e("option", { value: "both", children: c("protocolConfig.both", "Both") })
|
|
1210
2919
|
]
|
|
1211
2920
|
}
|
|
1212
2921
|
),
|
|
@@ -1214,21 +2923,21 @@ function ee({ config: a, onChange: t }) {
|
|
|
1214
2923
|
"button",
|
|
1215
2924
|
{
|
|
1216
2925
|
onClick: () => {
|
|
1217
|
-
const
|
|
1218
|
-
|
|
2926
|
+
const d = r.topics.filter((t, l) => l !== o);
|
|
2927
|
+
i({ ...r, topics: d });
|
|
1219
2928
|
},
|
|
1220
2929
|
children: "×"
|
|
1221
2930
|
}
|
|
1222
2931
|
)
|
|
1223
|
-
] },
|
|
2932
|
+
] }, o)),
|
|
1224
2933
|
/* @__PURE__ */ e(
|
|
1225
2934
|
"button",
|
|
1226
2935
|
{
|
|
1227
2936
|
onClick: () => {
|
|
1228
|
-
|
|
1229
|
-
...
|
|
2937
|
+
i({
|
|
2938
|
+
...r,
|
|
1230
2939
|
topics: [
|
|
1231
|
-
...
|
|
2940
|
+
...r.topics,
|
|
1232
2941
|
{ pattern: "", qos: 0, direction: "subscribe", payloadFormat: "json" }
|
|
1233
2942
|
]
|
|
1234
2943
|
});
|
|
@@ -1239,66 +2948,67 @@ function ee({ config: a, onChange: t }) {
|
|
|
1239
2948
|
] })
|
|
1240
2949
|
] });
|
|
1241
2950
|
}
|
|
1242
|
-
function
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
/* @__PURE__ */
|
|
1246
|
-
|
|
1247
|
-
|
|
2951
|
+
function Pe({ config: r, onChange: i }) {
|
|
2952
|
+
const { t: c } = U();
|
|
2953
|
+
return /* @__PURE__ */ a("div", { className: "nice-protocol-config__section", children: [
|
|
2954
|
+
/* @__PURE__ */ e("h3", { children: c("protocolConfig.coapConfiguration", "CoAP Configuration") }),
|
|
2955
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__grid", children: [
|
|
2956
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
2957
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.host", "Host") }),
|
|
1248
2958
|
/* @__PURE__ */ e(
|
|
1249
2959
|
"input",
|
|
1250
2960
|
{
|
|
1251
2961
|
type: "text",
|
|
1252
|
-
value:
|
|
1253
|
-
onChange: (n) =>
|
|
2962
|
+
value: r.host,
|
|
2963
|
+
onChange: (n) => i({ ...r, host: n.target.value })
|
|
1254
2964
|
}
|
|
1255
2965
|
)
|
|
1256
2966
|
] }),
|
|
1257
|
-
/* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */ e("label", { children: "Port" }),
|
|
2967
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
2968
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.port", "Port") }),
|
|
1259
2969
|
/* @__PURE__ */ e(
|
|
1260
2970
|
"input",
|
|
1261
2971
|
{
|
|
1262
2972
|
type: "number",
|
|
1263
|
-
value:
|
|
1264
|
-
onChange: (n) =>
|
|
2973
|
+
value: r.port,
|
|
2974
|
+
onChange: (n) => i({ ...r, port: parseInt(n.target.value, 10) || 5683 })
|
|
1265
2975
|
}
|
|
1266
2976
|
)
|
|
1267
2977
|
] }),
|
|
1268
|
-
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */
|
|
2978
|
+
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ a("label", { children: [
|
|
1269
2979
|
/* @__PURE__ */ e(
|
|
1270
2980
|
"input",
|
|
1271
2981
|
{
|
|
1272
2982
|
type: "checkbox",
|
|
1273
|
-
checked:
|
|
1274
|
-
onChange: (n) =>
|
|
2983
|
+
checked: r.useDTLS,
|
|
2984
|
+
onChange: (n) => i({ ...r, useDTLS: n.target.checked })
|
|
1275
2985
|
}
|
|
1276
2986
|
),
|
|
1277
|
-
"Use DTLS"
|
|
2987
|
+
c("protocolConfig.useDtls", "Use DTLS")
|
|
1278
2988
|
] }) }),
|
|
1279
|
-
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */
|
|
2989
|
+
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ a("label", { children: [
|
|
1280
2990
|
/* @__PURE__ */ e(
|
|
1281
2991
|
"input",
|
|
1282
2992
|
{
|
|
1283
2993
|
type: "checkbox",
|
|
1284
|
-
checked:
|
|
1285
|
-
onChange: (n) =>
|
|
2994
|
+
checked: r.observe || !1,
|
|
2995
|
+
onChange: (n) => i({ ...r, observe: n.target.checked })
|
|
1286
2996
|
}
|
|
1287
2997
|
),
|
|
1288
|
-
"Enable Observe"
|
|
2998
|
+
c("protocolConfig.enableObserve", "Enable Observe")
|
|
1289
2999
|
] }) })
|
|
1290
3000
|
] }),
|
|
1291
|
-
/* @__PURE__ */ e("h4", { children: "Resources" }),
|
|
1292
|
-
/* @__PURE__ */
|
|
1293
|
-
|
|
3001
|
+
/* @__PURE__ */ e("h4", { children: c("protocolConfig.resources", "Resources") }),
|
|
3002
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__resources", children: [
|
|
3003
|
+
r.resources.map((n, o) => /* @__PURE__ */ a("div", { className: "nice-protocol-config__resource-row", children: [
|
|
1294
3004
|
/* @__PURE__ */ e(
|
|
1295
3005
|
"input",
|
|
1296
3006
|
{
|
|
1297
3007
|
type: "text",
|
|
1298
3008
|
value: n.path,
|
|
1299
|
-
onChange: (
|
|
1300
|
-
const
|
|
1301
|
-
|
|
3009
|
+
onChange: (d) => {
|
|
3010
|
+
const t = [...r.resources];
|
|
3011
|
+
t[o] = { ...t[o], path: d.target.value }, i({ ...r, resources: t });
|
|
1302
3012
|
},
|
|
1303
3013
|
placeholder: "/sensors/temperature"
|
|
1304
3014
|
}
|
|
@@ -1307,21 +3017,21 @@ function ae({ config: a, onChange: t }) {
|
|
|
1307
3017
|
"button",
|
|
1308
3018
|
{
|
|
1309
3019
|
onClick: () => {
|
|
1310
|
-
const
|
|
1311
|
-
|
|
3020
|
+
const d = r.resources.filter((t, l) => l !== o);
|
|
3021
|
+
i({ ...r, resources: d });
|
|
1312
3022
|
},
|
|
1313
3023
|
children: "×"
|
|
1314
3024
|
}
|
|
1315
3025
|
)
|
|
1316
|
-
] },
|
|
3026
|
+
] }, o)),
|
|
1317
3027
|
/* @__PURE__ */ e(
|
|
1318
3028
|
"button",
|
|
1319
3029
|
{
|
|
1320
3030
|
onClick: () => {
|
|
1321
|
-
|
|
1322
|
-
...
|
|
3031
|
+
i({
|
|
3032
|
+
...r,
|
|
1323
3033
|
resources: [
|
|
1324
|
-
...
|
|
3034
|
+
...r.resources,
|
|
1325
3035
|
{ path: "", methods: ["GET"], mediaType: "application/json", observable: !1 }
|
|
1326
3036
|
]
|
|
1327
3037
|
});
|
|
@@ -1332,62 +3042,63 @@ function ae({ config: a, onChange: t }) {
|
|
|
1332
3042
|
] })
|
|
1333
3043
|
] });
|
|
1334
3044
|
}
|
|
1335
|
-
function
|
|
1336
|
-
config:
|
|
1337
|
-
type:
|
|
1338
|
-
onChange:
|
|
3045
|
+
function Me({
|
|
3046
|
+
config: r,
|
|
3047
|
+
type: i,
|
|
3048
|
+
onChange: c
|
|
1339
3049
|
}) {
|
|
1340
|
-
|
|
1341
|
-
|
|
3050
|
+
const { t: n } = U();
|
|
3051
|
+
return /* @__PURE__ */ a("div", { className: "nice-protocol-config__section", children: [
|
|
3052
|
+
/* @__PURE__ */ a("h3", { children: [
|
|
1342
3053
|
"Modbus ",
|
|
1343
|
-
|
|
3054
|
+
i.toUpperCase(),
|
|
1344
3055
|
" Configuration"
|
|
1345
3056
|
] }),
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */ e("label", { children: "Host" }),
|
|
3057
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__grid", children: [
|
|
3058
|
+
i === "tcp" && /* @__PURE__ */ a(E, { children: [
|
|
3059
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3060
|
+
/* @__PURE__ */ e("label", { children: n("protocolConfig.host", "Host") }),
|
|
1350
3061
|
/* @__PURE__ */ e(
|
|
1351
3062
|
"input",
|
|
1352
3063
|
{
|
|
1353
3064
|
type: "text",
|
|
1354
|
-
value:
|
|
1355
|
-
onChange: (
|
|
3065
|
+
value: r.host || "",
|
|
3066
|
+
onChange: (o) => c({ ...r, host: o.target.value })
|
|
1356
3067
|
}
|
|
1357
3068
|
)
|
|
1358
3069
|
] }),
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */ e("label", { children: "Port" }),
|
|
3070
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3071
|
+
/* @__PURE__ */ e("label", { children: n("protocolConfig.port", "Port") }),
|
|
1361
3072
|
/* @__PURE__ */ e(
|
|
1362
3073
|
"input",
|
|
1363
3074
|
{
|
|
1364
3075
|
type: "number",
|
|
1365
|
-
value:
|
|
1366
|
-
onChange: (
|
|
3076
|
+
value: r.port || 502,
|
|
3077
|
+
onChange: (o) => c({ ...r, port: parseInt(o.target.value, 10) || 502 })
|
|
1367
3078
|
}
|
|
1368
3079
|
)
|
|
1369
3080
|
] })
|
|
1370
3081
|
] }),
|
|
1371
|
-
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
/* @__PURE__ */ e("label", { children: "Serial Port" }),
|
|
3082
|
+
i === "rtu" && /* @__PURE__ */ a(E, { children: [
|
|
3083
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3084
|
+
/* @__PURE__ */ e("label", { children: n("protocolConfig.serialPort", "Serial Port") }),
|
|
1374
3085
|
/* @__PURE__ */ e(
|
|
1375
3086
|
"input",
|
|
1376
3087
|
{
|
|
1377
3088
|
type: "text",
|
|
1378
|
-
value:
|
|
1379
|
-
onChange: (
|
|
1380
|
-
placeholder: "COM1 or /dev/ttyUSB0"
|
|
3089
|
+
value: r.serialPort || "",
|
|
3090
|
+
onChange: (o) => c({ ...r, serialPort: o.target.value }),
|
|
3091
|
+
placeholder: n("protocolConfig.serialPortPlaceholder", "COM1 or /dev/ttyUSB0")
|
|
1381
3092
|
}
|
|
1382
3093
|
)
|
|
1383
3094
|
] }),
|
|
1384
|
-
/* @__PURE__ */
|
|
1385
|
-
/* @__PURE__ */ e("label", { children: "Baud Rate" }),
|
|
1386
|
-
/* @__PURE__ */
|
|
3095
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3096
|
+
/* @__PURE__ */ e("label", { children: n("protocolConfig.baudRate", "Baud Rate") }),
|
|
3097
|
+
/* @__PURE__ */ a(
|
|
1387
3098
|
"select",
|
|
1388
3099
|
{
|
|
1389
|
-
value:
|
|
1390
|
-
onChange: (
|
|
3100
|
+
value: r.baudRate || 9600,
|
|
3101
|
+
onChange: (o) => c({ ...r, baudRate: parseInt(o.target.value, 10) }),
|
|
1391
3102
|
children: [
|
|
1392
3103
|
/* @__PURE__ */ e("option", { value: 9600, children: "9600" }),
|
|
1393
3104
|
/* @__PURE__ */ e("option", { value: 19200, children: "19200" }),
|
|
@@ -1398,66 +3109,66 @@ function ie({
|
|
|
1398
3109
|
}
|
|
1399
3110
|
)
|
|
1400
3111
|
] }),
|
|
1401
|
-
/* @__PURE__ */
|
|
1402
|
-
/* @__PURE__ */ e("label", { children: "Parity" }),
|
|
1403
|
-
/* @__PURE__ */
|
|
3112
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3113
|
+
/* @__PURE__ */ e("label", { children: n("protocolConfig.parity", "Parity") }),
|
|
3114
|
+
/* @__PURE__ */ a(
|
|
1404
3115
|
"select",
|
|
1405
3116
|
{
|
|
1406
|
-
value:
|
|
1407
|
-
onChange: (
|
|
3117
|
+
value: r.parity || "none",
|
|
3118
|
+
onChange: (o) => c({ ...r, parity: o.target.value }),
|
|
1408
3119
|
children: [
|
|
1409
|
-
/* @__PURE__ */ e("option", { value: "none", children: "None" }),
|
|
1410
|
-
/* @__PURE__ */ e("option", { value: "even", children: "Even" }),
|
|
3120
|
+
/* @__PURE__ */ e("option", { value: "none", children: n("protocolConfig.none", "None") }),
|
|
3121
|
+
/* @__PURE__ */ e("option", { value: "even", children: n("protocolConfig.even", "Even") }),
|
|
1411
3122
|
/* @__PURE__ */ e("option", { value: "odd", children: "Odd" })
|
|
1412
3123
|
]
|
|
1413
3124
|
}
|
|
1414
3125
|
)
|
|
1415
3126
|
] })
|
|
1416
3127
|
] }),
|
|
1417
|
-
/* @__PURE__ */
|
|
1418
|
-
/* @__PURE__ */ e("label", { children: "Slave ID" }),
|
|
3128
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3129
|
+
/* @__PURE__ */ e("label", { children: n("protocolConfig.slaveId", "Slave ID") }),
|
|
1419
3130
|
/* @__PURE__ */ e(
|
|
1420
3131
|
"input",
|
|
1421
3132
|
{
|
|
1422
3133
|
type: "number",
|
|
1423
|
-
value:
|
|
1424
|
-
onChange: (
|
|
3134
|
+
value: r.slaveId,
|
|
3135
|
+
onChange: (o) => c({ ...r, slaveId: parseInt(o.target.value, 10) || 1 }),
|
|
1425
3136
|
min: 1,
|
|
1426
3137
|
max: 247
|
|
1427
3138
|
}
|
|
1428
3139
|
)
|
|
1429
3140
|
] }),
|
|
1430
|
-
/* @__PURE__ */
|
|
3141
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
1431
3142
|
/* @__PURE__ */ e("label", { children: "Timeout (ms)" }),
|
|
1432
3143
|
/* @__PURE__ */ e(
|
|
1433
3144
|
"input",
|
|
1434
3145
|
{
|
|
1435
3146
|
type: "number",
|
|
1436
|
-
value:
|
|
1437
|
-
onChange: (
|
|
3147
|
+
value: r.timeout,
|
|
3148
|
+
onChange: (o) => c({ ...r, timeout: parseInt(o.target.value, 10) || 1e3 })
|
|
1438
3149
|
}
|
|
1439
3150
|
)
|
|
1440
3151
|
] })
|
|
1441
3152
|
] }),
|
|
1442
|
-
/* @__PURE__ */ e("h4", { children: "Registers" }),
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */ e("th", { children: "Name" }),
|
|
1446
|
-
/* @__PURE__ */ e("th", { children: "Address" }),
|
|
1447
|
-
/* @__PURE__ */ e("th", { children: "Type" }),
|
|
1448
|
-
/* @__PURE__ */ e("th", { children: "Data Type" }),
|
|
3153
|
+
/* @__PURE__ */ e("h4", { children: n("protocolConfig.registers", "Registers") }),
|
|
3154
|
+
/* @__PURE__ */ a("table", { className: "nice-protocol-config__registers-table", children: [
|
|
3155
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
3156
|
+
/* @__PURE__ */ e("th", { children: n("protocolConfig.name", "Name") }),
|
|
3157
|
+
/* @__PURE__ */ e("th", { children: n("protocolConfig.address", "Address") }),
|
|
3158
|
+
/* @__PURE__ */ e("th", { children: n("protocolConfig.type", "Type") }),
|
|
3159
|
+
/* @__PURE__ */ e("th", { children: n("protocolConfig.dataType", "Data Type") }),
|
|
1449
3160
|
/* @__PURE__ */ e("th", { children: "R/W" }),
|
|
1450
3161
|
/* @__PURE__ */ e("th", {})
|
|
1451
3162
|
] }) }),
|
|
1452
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
3163
|
+
/* @__PURE__ */ e("tbody", { children: r.registers.map((o, d) => /* @__PURE__ */ a("tr", { children: [
|
|
1453
3164
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
|
|
1454
3165
|
"input",
|
|
1455
3166
|
{
|
|
1456
3167
|
type: "text",
|
|
1457
|
-
value:
|
|
1458
|
-
onChange: (
|
|
1459
|
-
const
|
|
1460
|
-
d
|
|
3168
|
+
value: o.name,
|
|
3169
|
+
onChange: (t) => {
|
|
3170
|
+
const l = [...r.registers];
|
|
3171
|
+
l[d] = { ...l[d], name: t.target.value }, c({ ...r, registers: l });
|
|
1461
3172
|
}
|
|
1462
3173
|
}
|
|
1463
3174
|
) }),
|
|
@@ -1465,79 +3176,79 @@ function ie({
|
|
|
1465
3176
|
"input",
|
|
1466
3177
|
{
|
|
1467
3178
|
type: "number",
|
|
1468
|
-
value:
|
|
1469
|
-
onChange: (
|
|
1470
|
-
const
|
|
1471
|
-
d
|
|
1472
|
-
...d
|
|
1473
|
-
address: parseInt(
|
|
1474
|
-
},
|
|
3179
|
+
value: o.address,
|
|
3180
|
+
onChange: (t) => {
|
|
3181
|
+
const l = [...r.registers];
|
|
3182
|
+
l[d] = {
|
|
3183
|
+
...l[d],
|
|
3184
|
+
address: parseInt(t.target.value, 10) || 0
|
|
3185
|
+
}, c({ ...r, registers: l });
|
|
1475
3186
|
}
|
|
1476
3187
|
}
|
|
1477
3188
|
) }),
|
|
1478
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */
|
|
3189
|
+
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ a(
|
|
1479
3190
|
"select",
|
|
1480
3191
|
{
|
|
1481
|
-
value:
|
|
1482
|
-
onChange: (
|
|
1483
|
-
const
|
|
1484
|
-
d
|
|
1485
|
-
...d
|
|
1486
|
-
type:
|
|
1487
|
-
},
|
|
3192
|
+
value: o.type,
|
|
3193
|
+
onChange: (t) => {
|
|
3194
|
+
const l = [...r.registers];
|
|
3195
|
+
l[d] = {
|
|
3196
|
+
...l[d],
|
|
3197
|
+
type: t.target.value
|
|
3198
|
+
}, c({ ...r, registers: l });
|
|
1488
3199
|
},
|
|
1489
3200
|
children: [
|
|
1490
|
-
/* @__PURE__ */ e("option", { value: "coil", children: "Coil" }),
|
|
1491
|
-
/* @__PURE__ */ e("option", { value: "discrete", children: "Discrete" }),
|
|
1492
|
-
/* @__PURE__ */ e("option", { value: "holding", children: "Holding" }),
|
|
1493
|
-
/* @__PURE__ */ e("option", { value: "input", children: "Input" })
|
|
3201
|
+
/* @__PURE__ */ e("option", { value: "coil", children: n("protocolConfig.coil", "Coil") }),
|
|
3202
|
+
/* @__PURE__ */ e("option", { value: "discrete", children: n("protocolConfig.discrete", "Discrete") }),
|
|
3203
|
+
/* @__PURE__ */ e("option", { value: "holding", children: n("protocolConfig.holding", "Holding") }),
|
|
3204
|
+
/* @__PURE__ */ e("option", { value: "input", children: n("protocolConfig.input", "Input") })
|
|
1494
3205
|
]
|
|
1495
3206
|
}
|
|
1496
3207
|
) }),
|
|
1497
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */
|
|
3208
|
+
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ a(
|
|
1498
3209
|
"select",
|
|
1499
3210
|
{
|
|
1500
|
-
value:
|
|
1501
|
-
onChange: (
|
|
1502
|
-
const
|
|
1503
|
-
d
|
|
1504
|
-
...d
|
|
1505
|
-
dataType:
|
|
1506
|
-
},
|
|
3211
|
+
value: o.dataType,
|
|
3212
|
+
onChange: (t) => {
|
|
3213
|
+
const l = [...r.registers];
|
|
3214
|
+
l[d] = {
|
|
3215
|
+
...l[d],
|
|
3216
|
+
dataType: t.target.value
|
|
3217
|
+
}, c({ ...r, registers: l });
|
|
1507
3218
|
},
|
|
1508
3219
|
children: [
|
|
1509
|
-
/* @__PURE__ */ e("option", { value: "bool", children: "Bool" }),
|
|
1510
|
-
/* @__PURE__ */ e("option", { value: "int16", children: "Int16" }),
|
|
1511
|
-
/* @__PURE__ */ e("option", { value: "uint16", children: "UInt16" }),
|
|
1512
|
-
/* @__PURE__ */ e("option", { value: "int32", children: "Int32" }),
|
|
1513
|
-
/* @__PURE__ */ e("option", { value: "uint32", children: "UInt32" }),
|
|
1514
|
-
/* @__PURE__ */ e("option", { value: "float32", children: "Float32" })
|
|
3220
|
+
/* @__PURE__ */ e("option", { value: "bool", children: n("protocolConfig.bool", "Bool") }),
|
|
3221
|
+
/* @__PURE__ */ e("option", { value: "int16", children: n("protocolConfig.int16", "Int16") }),
|
|
3222
|
+
/* @__PURE__ */ e("option", { value: "uint16", children: n("protocolConfig.uint16", "UInt16") }),
|
|
3223
|
+
/* @__PURE__ */ e("option", { value: "int32", children: n("protocolConfig.int32", "Int32") }),
|
|
3224
|
+
/* @__PURE__ */ e("option", { value: "uint32", children: n("protocolConfig.uint32", "UInt32") }),
|
|
3225
|
+
/* @__PURE__ */ e("option", { value: "float32", children: n("protocolConfig.float32", "Float32") })
|
|
1515
3226
|
]
|
|
1516
3227
|
}
|
|
1517
3228
|
) }),
|
|
1518
|
-
/* @__PURE__ */
|
|
3229
|
+
/* @__PURE__ */ a("td", { children: [
|
|
1519
3230
|
/* @__PURE__ */ e(
|
|
1520
3231
|
"input",
|
|
1521
3232
|
{
|
|
1522
3233
|
type: "checkbox",
|
|
1523
|
-
checked:
|
|
1524
|
-
onChange: (
|
|
1525
|
-
const
|
|
1526
|
-
d
|
|
3234
|
+
checked: o.readable,
|
|
3235
|
+
onChange: (t) => {
|
|
3236
|
+
const l = [...r.registers];
|
|
3237
|
+
l[d] = { ...l[d], readable: t.target.checked }, c({ ...r, registers: l });
|
|
1527
3238
|
},
|
|
1528
|
-
title: "Readable"
|
|
3239
|
+
title: n("protocolConfig.readable", "Readable")
|
|
1529
3240
|
}
|
|
1530
3241
|
),
|
|
1531
3242
|
/* @__PURE__ */ e(
|
|
1532
3243
|
"input",
|
|
1533
3244
|
{
|
|
1534
3245
|
type: "checkbox",
|
|
1535
|
-
checked:
|
|
1536
|
-
onChange: (
|
|
1537
|
-
const
|
|
1538
|
-
d
|
|
3246
|
+
checked: o.writable,
|
|
3247
|
+
onChange: (t) => {
|
|
3248
|
+
const l = [...r.registers];
|
|
3249
|
+
l[d] = { ...l[d], writable: t.target.checked }, c({ ...r, registers: l });
|
|
1539
3250
|
},
|
|
1540
|
-
title: "Writable"
|
|
3251
|
+
title: n("protocolConfig.writable", "Writable")
|
|
1541
3252
|
}
|
|
1542
3253
|
)
|
|
1543
3254
|
] }),
|
|
@@ -1545,22 +3256,22 @@ function ie({
|
|
|
1545
3256
|
"button",
|
|
1546
3257
|
{
|
|
1547
3258
|
onClick: () => {
|
|
1548
|
-
const
|
|
1549
|
-
|
|
3259
|
+
const t = r.registers.filter((l, g) => g !== d);
|
|
3260
|
+
c({ ...r, registers: t });
|
|
1550
3261
|
},
|
|
1551
3262
|
children: "×"
|
|
1552
3263
|
}
|
|
1553
3264
|
) })
|
|
1554
|
-
] },
|
|
3265
|
+
] }, d)) })
|
|
1555
3266
|
] }),
|
|
1556
3267
|
/* @__PURE__ */ e(
|
|
1557
3268
|
"button",
|
|
1558
3269
|
{
|
|
1559
3270
|
onClick: () => {
|
|
1560
|
-
|
|
1561
|
-
...
|
|
3271
|
+
c({
|
|
3272
|
+
...r,
|
|
1562
3273
|
registers: [
|
|
1563
|
-
...
|
|
3274
|
+
...r.registers,
|
|
1564
3275
|
{
|
|
1565
3276
|
name: "",
|
|
1566
3277
|
address: 0,
|
|
@@ -1577,107 +3288,108 @@ function ie({
|
|
|
1577
3288
|
)
|
|
1578
3289
|
] });
|
|
1579
3290
|
}
|
|
1580
|
-
function
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
/* @__PURE__ */
|
|
1584
|
-
|
|
1585
|
-
|
|
3291
|
+
function De({ config: r, onChange: i }) {
|
|
3292
|
+
const { t: c } = U();
|
|
3293
|
+
return /* @__PURE__ */ a("div", { className: "nice-protocol-config__section", children: [
|
|
3294
|
+
/* @__PURE__ */ e("h3", { children: c("protocolConfig.opcUaConfiguration", "OPC-UA Configuration") }),
|
|
3295
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__grid", children: [
|
|
3296
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field nice-protocol-config__field--full", children: [
|
|
3297
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.endpointUrl", "Endpoint URL") }),
|
|
1586
3298
|
/* @__PURE__ */ e(
|
|
1587
3299
|
"input",
|
|
1588
3300
|
{
|
|
1589
3301
|
type: "text",
|
|
1590
|
-
value:
|
|
1591
|
-
onChange: (n) =>
|
|
1592
|
-
placeholder: "opc.tcp://localhost:4840"
|
|
3302
|
+
value: r.endpointUrl,
|
|
3303
|
+
onChange: (n) => i({ ...r, endpointUrl: n.target.value }),
|
|
3304
|
+
placeholder: c("protocolConfig.endpointUrlPlaceholder", "opc.tcp://localhost:4840")
|
|
1593
3305
|
}
|
|
1594
3306
|
)
|
|
1595
3307
|
] }),
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
/* @__PURE__ */ e("label", { children: "Security Mode" }),
|
|
1598
|
-
/* @__PURE__ */
|
|
3308
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3309
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.securityMode", "Security Mode") }),
|
|
3310
|
+
/* @__PURE__ */ a(
|
|
1599
3311
|
"select",
|
|
1600
3312
|
{
|
|
1601
|
-
value:
|
|
1602
|
-
onChange: (n) =>
|
|
1603
|
-
...
|
|
3313
|
+
value: r.securityMode,
|
|
3314
|
+
onChange: (n) => i({
|
|
3315
|
+
...r,
|
|
1604
3316
|
securityMode: n.target.value
|
|
1605
3317
|
}),
|
|
1606
3318
|
children: [
|
|
1607
|
-
/* @__PURE__ */ e("option", { value: "None", children: "None" }),
|
|
1608
|
-
/* @__PURE__ */ e("option", { value: "Sign", children: "Sign" }),
|
|
1609
|
-
/* @__PURE__ */ e("option", { value: "SignAndEncrypt", children: "Sign and Encrypt" })
|
|
3319
|
+
/* @__PURE__ */ e("option", { value: "None", children: c("protocolConfig.securityNone", "None") }),
|
|
3320
|
+
/* @__PURE__ */ e("option", { value: "Sign", children: c("protocolConfig.sign", "Sign") }),
|
|
3321
|
+
/* @__PURE__ */ e("option", { value: "SignAndEncrypt", children: c("protocolConfig.signAndEncrypt", "Sign and Encrypt") })
|
|
1610
3322
|
]
|
|
1611
3323
|
}
|
|
1612
3324
|
)
|
|
1613
3325
|
] }),
|
|
1614
|
-
/* @__PURE__ */
|
|
1615
|
-
/* @__PURE__ */ e("label", { children: "Authentication" }),
|
|
1616
|
-
/* @__PURE__ */
|
|
3326
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3327
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.authentication", "Authentication") }),
|
|
3328
|
+
/* @__PURE__ */ a(
|
|
1617
3329
|
"select",
|
|
1618
3330
|
{
|
|
1619
|
-
value:
|
|
1620
|
-
onChange: (n) =>
|
|
1621
|
-
...
|
|
3331
|
+
value: r.authentication,
|
|
3332
|
+
onChange: (n) => i({
|
|
3333
|
+
...r,
|
|
1622
3334
|
authentication: n.target.value
|
|
1623
3335
|
}),
|
|
1624
3336
|
children: [
|
|
1625
|
-
/* @__PURE__ */ e("option", { value: "anonymous", children: "Anonymous" }),
|
|
3337
|
+
/* @__PURE__ */ e("option", { value: "anonymous", children: c("protocolConfig.anonymous", "Anonymous") }),
|
|
1626
3338
|
/* @__PURE__ */ e("option", { value: "username", children: "Username/Password" }),
|
|
1627
|
-
/* @__PURE__ */ e("option", { value: "certificate", children: "Certificate" })
|
|
3339
|
+
/* @__PURE__ */ e("option", { value: "certificate", children: c("protocolConfig.certificate", "Certificate") })
|
|
1628
3340
|
]
|
|
1629
3341
|
}
|
|
1630
3342
|
)
|
|
1631
3343
|
] }),
|
|
1632
|
-
|
|
1633
|
-
/* @__PURE__ */
|
|
1634
|
-
/* @__PURE__ */ e("label", { children: "Username" }),
|
|
3344
|
+
r.authentication === "username" && /* @__PURE__ */ a(E, { children: [
|
|
3345
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3346
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.username", "Username") }),
|
|
1635
3347
|
/* @__PURE__ */ e(
|
|
1636
3348
|
"input",
|
|
1637
3349
|
{
|
|
1638
3350
|
type: "text",
|
|
1639
|
-
value:
|
|
1640
|
-
onChange: (n) =>
|
|
3351
|
+
value: r.username || "",
|
|
3352
|
+
onChange: (n) => i({ ...r, username: n.target.value })
|
|
1641
3353
|
}
|
|
1642
3354
|
)
|
|
1643
3355
|
] }),
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
-
/* @__PURE__ */ e("label", { children: "Password" }),
|
|
3356
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field", children: [
|
|
3357
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.password", "Password") }),
|
|
1646
3358
|
/* @__PURE__ */ e(
|
|
1647
3359
|
"input",
|
|
1648
3360
|
{
|
|
1649
3361
|
type: "password",
|
|
1650
|
-
value:
|
|
1651
|
-
onChange: (n) =>
|
|
3362
|
+
value: r.password || "",
|
|
3363
|
+
onChange: (n) => i({ ...r, password: n.target.value })
|
|
1652
3364
|
}
|
|
1653
3365
|
)
|
|
1654
3366
|
] })
|
|
1655
3367
|
] }),
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
/* @__PURE__ */ e("label", { children: "Application Name" }),
|
|
3368
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__field nice-protocol-config__field--full", children: [
|
|
3369
|
+
/* @__PURE__ */ e("label", { children: c("protocolConfig.applicationName", "Application Name") }),
|
|
1658
3370
|
/* @__PURE__ */ e(
|
|
1659
3371
|
"input",
|
|
1660
3372
|
{
|
|
1661
3373
|
type: "text",
|
|
1662
|
-
value:
|
|
1663
|
-
onChange: (n) =>
|
|
3374
|
+
value: r.applicationName,
|
|
3375
|
+
onChange: (n) => i({ ...r, applicationName: n.target.value })
|
|
1664
3376
|
}
|
|
1665
3377
|
)
|
|
1666
3378
|
] })
|
|
1667
3379
|
] }),
|
|
1668
|
-
/* @__PURE__ */ e("h4", { children: "Nodes" }),
|
|
1669
|
-
/* @__PURE__ */
|
|
1670
|
-
|
|
3380
|
+
/* @__PURE__ */ e("h4", { children: c("protocolConfig.nodes", "Nodes") }),
|
|
3381
|
+
/* @__PURE__ */ a("div", { className: "nice-protocol-config__nodes", children: [
|
|
3382
|
+
r.nodes.map((n, o) => /* @__PURE__ */ a("div", { className: "nice-protocol-config__node-row", children: [
|
|
1671
3383
|
/* @__PURE__ */ e(
|
|
1672
3384
|
"input",
|
|
1673
3385
|
{
|
|
1674
3386
|
type: "text",
|
|
1675
3387
|
value: n.nodeId,
|
|
1676
|
-
onChange: (
|
|
1677
|
-
const
|
|
1678
|
-
|
|
3388
|
+
onChange: (d) => {
|
|
3389
|
+
const t = [...r.nodes];
|
|
3390
|
+
t[o] = { ...t[o], nodeId: d.target.value }, i({ ...r, nodes: t });
|
|
1679
3391
|
},
|
|
1680
|
-
placeholder: "ns=2;s=Temperature"
|
|
3392
|
+
placeholder: c("protocolConfig.nodeIdPlaceholder", "ns=2;s=Temperature")
|
|
1681
3393
|
}
|
|
1682
3394
|
),
|
|
1683
3395
|
/* @__PURE__ */ e(
|
|
@@ -1685,32 +3397,32 @@ function ne({ config: a, onChange: t }) {
|
|
|
1685
3397
|
{
|
|
1686
3398
|
type: "text",
|
|
1687
3399
|
value: n.displayName,
|
|
1688
|
-
onChange: (
|
|
1689
|
-
const
|
|
1690
|
-
|
|
3400
|
+
onChange: (d) => {
|
|
3401
|
+
const t = [...r.nodes];
|
|
3402
|
+
t[o] = { ...t[o], displayName: d.target.value }, i({ ...r, nodes: t });
|
|
1691
3403
|
},
|
|
1692
|
-
placeholder: "Display Name"
|
|
3404
|
+
placeholder: c("protocolConfig.displayNamePlaceholder", "Display Name")
|
|
1693
3405
|
}
|
|
1694
3406
|
),
|
|
1695
3407
|
/* @__PURE__ */ e(
|
|
1696
3408
|
"button",
|
|
1697
3409
|
{
|
|
1698
3410
|
onClick: () => {
|
|
1699
|
-
const
|
|
1700
|
-
|
|
3411
|
+
const d = r.nodes.filter((t, l) => l !== o);
|
|
3412
|
+
i({ ...r, nodes: d });
|
|
1701
3413
|
},
|
|
1702
3414
|
children: "×"
|
|
1703
3415
|
}
|
|
1704
3416
|
)
|
|
1705
|
-
] },
|
|
3417
|
+
] }, o)),
|
|
1706
3418
|
/* @__PURE__ */ e(
|
|
1707
3419
|
"button",
|
|
1708
3420
|
{
|
|
1709
3421
|
onClick: () => {
|
|
1710
|
-
|
|
1711
|
-
...
|
|
3422
|
+
i({
|
|
3423
|
+
...r,
|
|
1712
3424
|
nodes: [
|
|
1713
|
-
...
|
|
3425
|
+
...r.nodes,
|
|
1714
3426
|
{ nodeId: "", displayName: "", dataType: "Double", read: !0 }
|
|
1715
3427
|
]
|
|
1716
3428
|
});
|
|
@@ -1722,7 +3434,7 @@ function ne({ config: a, onChange: t }) {
|
|
|
1722
3434
|
] });
|
|
1723
3435
|
}
|
|
1724
3436
|
export {
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
3437
|
+
Ue as NiceEdgeManager,
|
|
3438
|
+
Ee as NiceIoTDashboard,
|
|
3439
|
+
Ae as NiceProtocolConfig
|
|
1728
3440
|
};
|