@imperosoft/cris-webui-components 1.1.3-beta.0 → 1.1.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +248 -106
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +226 -85
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1122,9 +1122,149 @@ function CrisOfflinePage({
|
|
|
1122
1122
|
] }) });
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
|
+
// src/components/CrisTextInput.tsx
|
|
1126
|
+
import { useState as useState4, useEffect as useEffect4, useRef as useRef3 } from "react";
|
|
1127
|
+
import { useDigital as useDigital6, useSerial as useSerial2, useJoinsStore as useJoinsStore3 } from "@imperosoft/cris-webui-ch5-core";
|
|
1128
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1129
|
+
var colors = {
|
|
1130
|
+
bg: "#4f5152",
|
|
1131
|
+
bgFocused: "#3a3c3d",
|
|
1132
|
+
text: "#ffffff",
|
|
1133
|
+
placeholder: "#9ca3af",
|
|
1134
|
+
border: "#6b7280",
|
|
1135
|
+
borderFocused: "#007ca0"
|
|
1136
|
+
};
|
|
1137
|
+
var defaults = {
|
|
1138
|
+
container: {
|
|
1139
|
+
display: "inline-flex",
|
|
1140
|
+
alignItems: "center",
|
|
1141
|
+
borderRadius: "0.5rem",
|
|
1142
|
+
background: colors.bg,
|
|
1143
|
+
border: `1px solid ${colors.border}`,
|
|
1144
|
+
transition: "border-color 0.15s, background 0.15s",
|
|
1145
|
+
overflow: "hidden"
|
|
1146
|
+
},
|
|
1147
|
+
containerFocused: {
|
|
1148
|
+
borderColor: colors.borderFocused,
|
|
1149
|
+
background: colors.bgFocused
|
|
1150
|
+
},
|
|
1151
|
+
input: {
|
|
1152
|
+
flex: 1,
|
|
1153
|
+
background: "transparent",
|
|
1154
|
+
border: "none",
|
|
1155
|
+
outline: "none",
|
|
1156
|
+
color: colors.text,
|
|
1157
|
+
fontSize: "1em",
|
|
1158
|
+
fontWeight: 500,
|
|
1159
|
+
padding: "0.6rem 0.9rem",
|
|
1160
|
+
width: "100%",
|
|
1161
|
+
fontFamily: "inherit"
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
function CrisTextInput({
|
|
1165
|
+
join,
|
|
1166
|
+
joinFeedback,
|
|
1167
|
+
joinEnable,
|
|
1168
|
+
joinVisible,
|
|
1169
|
+
placeholder = "",
|
|
1170
|
+
maxLength,
|
|
1171
|
+
type = "text",
|
|
1172
|
+
submitOnEnter = true,
|
|
1173
|
+
submitOnBlur = false,
|
|
1174
|
+
submitOnChange = true,
|
|
1175
|
+
clearOnSubmit = false,
|
|
1176
|
+
className,
|
|
1177
|
+
style,
|
|
1178
|
+
inputClassName,
|
|
1179
|
+
inputStyle,
|
|
1180
|
+
classDisabled,
|
|
1181
|
+
classFocused: classFocusedProp
|
|
1182
|
+
}) {
|
|
1183
|
+
const feedbackJoin = joinFeedback ?? join;
|
|
1184
|
+
const feedback = useSerial2(feedbackJoin);
|
|
1185
|
+
const enabled = useDigital6(joinEnable ?? 0);
|
|
1186
|
+
const visible = useDigital6(joinVisible ?? 0);
|
|
1187
|
+
const sSet = useJoinsStore3((state) => state.sSet);
|
|
1188
|
+
const isEnabled = joinEnable == null ? true : enabled;
|
|
1189
|
+
const isVisible = joinVisible == null ? true : visible;
|
|
1190
|
+
const [localValue, setLocalValue] = useState4("");
|
|
1191
|
+
const [isFocused, setIsFocused] = useState4(false);
|
|
1192
|
+
const inputRef = useRef3(null);
|
|
1193
|
+
useEffect4(() => {
|
|
1194
|
+
if (!isFocused) {
|
|
1195
|
+
setLocalValue(feedback);
|
|
1196
|
+
}
|
|
1197
|
+
}, [feedback, isFocused]);
|
|
1198
|
+
if (!isVisible) return null;
|
|
1199
|
+
const submit = (value) => {
|
|
1200
|
+
sSet(join, value);
|
|
1201
|
+
if (clearOnSubmit) {
|
|
1202
|
+
setLocalValue("");
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
const handleChange = (e) => {
|
|
1206
|
+
const val = e.target.value;
|
|
1207
|
+
setLocalValue(val);
|
|
1208
|
+
if (submitOnChange) {
|
|
1209
|
+
submit(val);
|
|
1210
|
+
}
|
|
1211
|
+
};
|
|
1212
|
+
const handleKeyDown = (e) => {
|
|
1213
|
+
if (submitOnEnter && e.key === "Enter") {
|
|
1214
|
+
submit(localValue);
|
|
1215
|
+
inputRef.current?.blur();
|
|
1216
|
+
}
|
|
1217
|
+
};
|
|
1218
|
+
const handleFocus = () => {
|
|
1219
|
+
setIsFocused(true);
|
|
1220
|
+
};
|
|
1221
|
+
const handleBlur = () => {
|
|
1222
|
+
setIsFocused(false);
|
|
1223
|
+
if (submitOnBlur) {
|
|
1224
|
+
submit(localValue);
|
|
1225
|
+
}
|
|
1226
|
+
};
|
|
1227
|
+
const useDefaults = !className;
|
|
1228
|
+
const containerClasses = [
|
|
1229
|
+
"cris-text-input",
|
|
1230
|
+
className,
|
|
1231
|
+
!isEnabled && (classDisabled || "disabled"),
|
|
1232
|
+
isFocused && (classFocusedProp || "focused")
|
|
1233
|
+
].filter(Boolean).join(" ");
|
|
1234
|
+
const containerStyle = useDefaults ? {
|
|
1235
|
+
...defaults.container,
|
|
1236
|
+
...isFocused ? defaults.containerFocused : void 0,
|
|
1237
|
+
...style,
|
|
1238
|
+
opacity: isEnabled ? 1 : 0.4,
|
|
1239
|
+
pointerEvents: isEnabled ? "auto" : "none"
|
|
1240
|
+
} : {
|
|
1241
|
+
...style,
|
|
1242
|
+
opacity: isEnabled ? 1 : 0.4,
|
|
1243
|
+
pointerEvents: isEnabled ? "auto" : "none"
|
|
1244
|
+
};
|
|
1245
|
+
const computedInputStyle = inputClassName ? { ...inputStyle } : { ...defaults.input, ...inputStyle };
|
|
1246
|
+
return /* @__PURE__ */ jsx7("div", { className: containerClasses, style: containerStyle, children: /* @__PURE__ */ jsx7(
|
|
1247
|
+
"input",
|
|
1248
|
+
{
|
|
1249
|
+
ref: inputRef,
|
|
1250
|
+
type,
|
|
1251
|
+
value: localValue,
|
|
1252
|
+
placeholder,
|
|
1253
|
+
maxLength,
|
|
1254
|
+
disabled: !isEnabled,
|
|
1255
|
+
className: inputClassName,
|
|
1256
|
+
style: computedInputStyle,
|
|
1257
|
+
onChange: handleChange,
|
|
1258
|
+
onKeyDown: handleKeyDown,
|
|
1259
|
+
onFocus: handleFocus,
|
|
1260
|
+
onBlur: handleBlur
|
|
1261
|
+
}
|
|
1262
|
+
) });
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1125
1265
|
// src/components/CrisCoDebug.tsx
|
|
1126
1266
|
import { useCustomObject, useCustomObjectSend } from "@imperosoft/cris-webui-ch5-core";
|
|
1127
|
-
import { Fragment as Fragment2, jsx as
|
|
1267
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1128
1268
|
var defaultStyles = {
|
|
1129
1269
|
container: {
|
|
1130
1270
|
display: "flex",
|
|
@@ -1184,7 +1324,7 @@ var defaultStyles = {
|
|
|
1184
1324
|
};
|
|
1185
1325
|
function ConnectionIcon({ on, type }) {
|
|
1186
1326
|
const label = type === "eth" ? "ETH" : "RS";
|
|
1187
|
-
return /* @__PURE__ */
|
|
1327
|
+
return /* @__PURE__ */ jsx8(
|
|
1188
1328
|
"div",
|
|
1189
1329
|
{
|
|
1190
1330
|
style: {
|
|
@@ -1193,11 +1333,11 @@ function ConnectionIcon({ on, type }) {
|
|
|
1193
1333
|
},
|
|
1194
1334
|
title: `${type === "eth" ? "Ethernet" : "RS232"}: ${on ? "Connected" : "Disconnected"}`,
|
|
1195
1335
|
children: /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 20 20", children: [
|
|
1196
|
-
/* @__PURE__ */
|
|
1197
|
-
/* @__PURE__ */
|
|
1198
|
-
on ? /* @__PURE__ */
|
|
1199
|
-
/* @__PURE__ */
|
|
1200
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ jsx8("rect", { x: "1", y: "4", width: "18", height: "12", rx: "2", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
1337
|
+
/* @__PURE__ */ jsx8("text", { x: "10", y: "12.5", textAnchor: "middle", fontSize: "7", fontWeight: "bold", fill: "currentColor", children: label }),
|
|
1338
|
+
on ? /* @__PURE__ */ jsx8("circle", { cx: "16", cy: "5", r: "3.5", fill: "#4caf50", stroke: "none" }) : /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1339
|
+
/* @__PURE__ */ jsx8("circle", { cx: "16", cy: "5", r: "3.5", fill: "#f44336", stroke: "none" }),
|
|
1340
|
+
/* @__PURE__ */ jsx8("line", { x1: "14", y1: "3", x2: "18", y2: "7", stroke: "white", strokeWidth: "1.5" })
|
|
1201
1341
|
] })
|
|
1202
1342
|
] })
|
|
1203
1343
|
}
|
|
@@ -1223,15 +1363,15 @@ function DebugModuleItem({
|
|
|
1223
1363
|
style: itemClassName ? itemStyle : { ...defaultStyles.item, ...itemStyle },
|
|
1224
1364
|
children: [
|
|
1225
1365
|
/* @__PURE__ */ jsxs6("div", { style: defaultStyles.info, children: [
|
|
1226
|
-
/* @__PURE__ */
|
|
1227
|
-
/* @__PURE__ */
|
|
1366
|
+
/* @__PURE__ */ jsx8("div", { style: defaultStyles.moduleName, children: name }),
|
|
1367
|
+
/* @__PURE__ */ jsx8("div", { style: defaultStyles.moduleType, children: module.tp })
|
|
1228
1368
|
] }),
|
|
1229
1369
|
/* @__PURE__ */ jsxs6("div", { style: defaultStyles.icons, children: [
|
|
1230
|
-
module.et.vs && (iconEthOn && iconEthOff ? module.et.on ? iconEthOn : iconEthOff : /* @__PURE__ */
|
|
1231
|
-
module.rs.vs && (iconRs232On && iconRs232Off ? module.rs.on ? iconRs232On : iconRs232Off : /* @__PURE__ */
|
|
1370
|
+
module.et.vs && (iconEthOn && iconEthOff ? module.et.on ? iconEthOn : iconEthOff : /* @__PURE__ */ jsx8(ConnectionIcon, { on: module.et.on, type: "eth" })),
|
|
1371
|
+
module.rs.vs && (iconRs232On && iconRs232Off ? module.rs.on ? iconRs232On : iconRs232Off : /* @__PURE__ */ jsx8(ConnectionIcon, { on: module.rs.on, type: "rs232" }))
|
|
1232
1372
|
] }),
|
|
1233
1373
|
/* @__PURE__ */ jsxs6("div", { style: defaultStyles.buttons, children: [
|
|
1234
|
-
module.md.vs && /* @__PURE__ */
|
|
1374
|
+
module.md.vs && /* @__PURE__ */ jsx8(
|
|
1235
1375
|
CrisButton,
|
|
1236
1376
|
{
|
|
1237
1377
|
selected: module.md.on,
|
|
@@ -1241,7 +1381,7 @@ function DebugModuleItem({
|
|
|
1241
1381
|
onPress: () => onAction("toggleMod", module.id)
|
|
1242
1382
|
}
|
|
1243
1383
|
),
|
|
1244
|
-
module.cm.vs && /* @__PURE__ */
|
|
1384
|
+
module.cm.vs && /* @__PURE__ */ jsx8(
|
|
1245
1385
|
CrisButton,
|
|
1246
1386
|
{
|
|
1247
1387
|
selected: module.cm.on,
|
|
@@ -1285,8 +1425,8 @@ function CrisCoDebug({
|
|
|
1285
1425
|
className,
|
|
1286
1426
|
style: className ? style : { ...defaultStyles.container, ...style },
|
|
1287
1427
|
children: [
|
|
1288
|
-
title && /* @__PURE__ */
|
|
1289
|
-
visibleModules.map((module) => /* @__PURE__ */
|
|
1428
|
+
title && /* @__PURE__ */ jsx8("div", { style: defaultStyles.title, children: title }),
|
|
1429
|
+
visibleModules.map((module) => /* @__PURE__ */ jsx8(
|
|
1290
1430
|
DebugModuleItem,
|
|
1291
1431
|
{
|
|
1292
1432
|
module,
|
|
@@ -1309,14 +1449,14 @@ function CrisCoDebug({
|
|
|
1309
1449
|
|
|
1310
1450
|
// src/components/CrisCoList.tsx
|
|
1311
1451
|
import { useCustomObject as useCustomObject2, useCustomObjectSend as useCustomObjectSend2 } from "@imperosoft/cris-webui-ch5-core";
|
|
1312
|
-
import { jsx as
|
|
1313
|
-
var
|
|
1452
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1453
|
+
var colors2 = {
|
|
1314
1454
|
itemBg: "#4f5152",
|
|
1315
1455
|
itemActiveBg: "#007ca0",
|
|
1316
1456
|
text: "#ffffff",
|
|
1317
1457
|
headerText: "#6b7280"
|
|
1318
1458
|
};
|
|
1319
|
-
var
|
|
1459
|
+
var defaults2 = {
|
|
1320
1460
|
container: {
|
|
1321
1461
|
display: "flex",
|
|
1322
1462
|
flexDirection: "column",
|
|
@@ -1332,7 +1472,7 @@ var defaults = {
|
|
|
1332
1472
|
padding: "0.5rem 0.75rem",
|
|
1333
1473
|
textTransform: "uppercase",
|
|
1334
1474
|
letterSpacing: "0.05em",
|
|
1335
|
-
color:
|
|
1475
|
+
color: colors2.headerText,
|
|
1336
1476
|
flexShrink: 0,
|
|
1337
1477
|
textAlign: "center"
|
|
1338
1478
|
},
|
|
@@ -1352,12 +1492,12 @@ var defaults = {
|
|
|
1352
1492
|
minHeight: "3.7rem",
|
|
1353
1493
|
cursor: "pointer",
|
|
1354
1494
|
userSelect: "none",
|
|
1355
|
-
background:
|
|
1495
|
+
background: colors2.itemBg,
|
|
1356
1496
|
borderRadius: "0.5rem",
|
|
1357
1497
|
transition: "background 0.15s"
|
|
1358
1498
|
},
|
|
1359
1499
|
itemActive: {
|
|
1360
|
-
background:
|
|
1500
|
+
background: colors2.itemActiveBg
|
|
1361
1501
|
},
|
|
1362
1502
|
itemBtn: {
|
|
1363
1503
|
flex: 1,
|
|
@@ -1367,7 +1507,7 @@ var defaults = {
|
|
|
1367
1507
|
background: "transparent",
|
|
1368
1508
|
border: "none",
|
|
1369
1509
|
textAlign: "left",
|
|
1370
|
-
color:
|
|
1510
|
+
color: colors2.text,
|
|
1371
1511
|
height: "100%",
|
|
1372
1512
|
borderRadius: "0.5rem",
|
|
1373
1513
|
cursor: "pointer"
|
|
@@ -1395,7 +1535,7 @@ var defaults = {
|
|
|
1395
1535
|
whiteSpace: "nowrap",
|
|
1396
1536
|
overflow: "hidden",
|
|
1397
1537
|
textOverflow: "ellipsis",
|
|
1398
|
-
color:
|
|
1538
|
+
color: colors2.text
|
|
1399
1539
|
}
|
|
1400
1540
|
};
|
|
1401
1541
|
var INJECTED_CSS = `
|
|
@@ -1432,13 +1572,13 @@ function ListItemRow({
|
|
|
1432
1572
|
!isEnabled && (itemDisabledClassName || "disabled")
|
|
1433
1573
|
].filter(Boolean).join(" ");
|
|
1434
1574
|
const computedStyle = useDefaults ? {
|
|
1435
|
-
...
|
|
1575
|
+
...defaults2.item,
|
|
1436
1576
|
...itemStyleProp,
|
|
1437
|
-
...selected ? { ...
|
|
1577
|
+
...selected ? { ...defaults2.itemActive, ...itemActiveStyle } : void 0,
|
|
1438
1578
|
opacity: isEnabled ? 1 : 0.4
|
|
1439
1579
|
} : { ...itemStyleProp };
|
|
1440
1580
|
if (renderItem) {
|
|
1441
|
-
return /* @__PURE__ */
|
|
1581
|
+
return /* @__PURE__ */ jsx9("div", { className: classes, style: computedStyle, children: useDefaults ? /* @__PURE__ */ jsx9("div", { style: defaults2.itemBtn, children: /* @__PURE__ */ jsx9(
|
|
1442
1582
|
CrisButton,
|
|
1443
1583
|
{
|
|
1444
1584
|
selected,
|
|
@@ -1447,7 +1587,7 @@ function ListItemRow({
|
|
|
1447
1587
|
showLocalFeedback: false,
|
|
1448
1588
|
children: renderItem(item, selected, settings)
|
|
1449
1589
|
}
|
|
1450
|
-
) }) : /* @__PURE__ */
|
|
1590
|
+
) }) : /* @__PURE__ */ jsx9(
|
|
1451
1591
|
CrisButton,
|
|
1452
1592
|
{
|
|
1453
1593
|
selected,
|
|
@@ -1459,19 +1599,19 @@ function ListItemRow({
|
|
|
1459
1599
|
}
|
|
1460
1600
|
) });
|
|
1461
1601
|
}
|
|
1462
|
-
return /* @__PURE__ */
|
|
1602
|
+
return /* @__PURE__ */ jsx9("div", { className: classes, style: computedStyle, children: useDefaults ? /* @__PURE__ */ jsx9("div", { style: defaults2.itemBtn, children: /* @__PURE__ */ jsx9(
|
|
1463
1603
|
CrisButton,
|
|
1464
1604
|
{
|
|
1465
1605
|
selected,
|
|
1466
1606
|
enabled: isEnabled,
|
|
1467
1607
|
onPress: onSelect,
|
|
1468
1608
|
showLocalFeedback: false,
|
|
1469
|
-
children: /* @__PURE__ */ jsxs7("div", { style:
|
|
1470
|
-
showIds && /* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1609
|
+
children: /* @__PURE__ */ jsxs7("div", { style: defaults2.itemBtnInner, children: [
|
|
1610
|
+
showIds && /* @__PURE__ */ jsx9("span", { className: "cris-co-list-id", style: defaults2.idNum, children: item.id }),
|
|
1611
|
+
/* @__PURE__ */ jsx9("span", { style: defaults2.itemLabel, children: item.lb || `Item ${item.id}` })
|
|
1472
1612
|
] })
|
|
1473
1613
|
}
|
|
1474
|
-
) }) : /* @__PURE__ */
|
|
1614
|
+
) }) : /* @__PURE__ */ jsx9(
|
|
1475
1615
|
CrisButton,
|
|
1476
1616
|
{
|
|
1477
1617
|
selected,
|
|
@@ -1480,8 +1620,8 @@ function ListItemRow({
|
|
|
1480
1620
|
className: `cris-co-list-item-btn ${itemActiveClassName ?? ""}`,
|
|
1481
1621
|
classActive: itemActiveClassName,
|
|
1482
1622
|
children: /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem", width: "100%" }, children: [
|
|
1483
|
-
showIds && /* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */
|
|
1623
|
+
showIds && /* @__PURE__ */ jsx9("span", { className: "cris-co-list-id", style: { flexShrink: 0, opacity: 0.6 }, children: item.id }),
|
|
1624
|
+
/* @__PURE__ */ jsx9("span", { style: { flex: 1, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: item.lb || `Item ${item.id}` })
|
|
1485
1625
|
] })
|
|
1486
1626
|
}
|
|
1487
1627
|
) });
|
|
@@ -1515,17 +1655,17 @@ function CrisCoList({
|
|
|
1515
1655
|
"div",
|
|
1516
1656
|
{
|
|
1517
1657
|
className,
|
|
1518
|
-
style: className ? style : { ...
|
|
1658
|
+
style: className ? style : { ...defaults2.container, ...style },
|
|
1519
1659
|
children: [
|
|
1520
|
-
title && /* @__PURE__ */
|
|
1660
|
+
title && /* @__PURE__ */ jsx9(
|
|
1521
1661
|
"div",
|
|
1522
1662
|
{
|
|
1523
1663
|
className: headerClassName,
|
|
1524
|
-
style: headerClassName ? headerStyle : { ...
|
|
1664
|
+
style: headerClassName ? headerStyle : { ...defaults2.header, ...headerStyle },
|
|
1525
1665
|
children: title
|
|
1526
1666
|
}
|
|
1527
1667
|
),
|
|
1528
|
-
/* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ jsx9("div", { className: "cris-co-list-scroll", style: defaults2.scroll, children: visibleItems?.map((item) => /* @__PURE__ */ jsx9(
|
|
1529
1669
|
ListItemRow,
|
|
1530
1670
|
{
|
|
1531
1671
|
item,
|
|
@@ -1549,8 +1689,8 @@ function CrisCoList({
|
|
|
1549
1689
|
|
|
1550
1690
|
// src/components/CrisCoMatrixListsTie.tsx
|
|
1551
1691
|
import { useCustomObject as useCustomObject3, useCustomObjectSend as useCustomObjectSend3 } from "@imperosoft/cris-webui-ch5-core";
|
|
1552
|
-
import { jsx as
|
|
1553
|
-
var
|
|
1692
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1693
|
+
var colors3 = {
|
|
1554
1694
|
itemBg: "#4f5152",
|
|
1555
1695
|
itemActiveBg: "#007ca0",
|
|
1556
1696
|
vmActiveBg: "#dc2626",
|
|
@@ -1561,7 +1701,7 @@ var colors2 = {
|
|
|
1561
1701
|
sgOn: "#2196f3",
|
|
1562
1702
|
sgOff: "#666666"
|
|
1563
1703
|
};
|
|
1564
|
-
var
|
|
1704
|
+
var defaults3 = {
|
|
1565
1705
|
container: {
|
|
1566
1706
|
display: "flex",
|
|
1567
1707
|
flexDirection: "row",
|
|
@@ -1583,7 +1723,7 @@ var defaults2 = {
|
|
|
1583
1723
|
padding: "0.5rem 0.75rem",
|
|
1584
1724
|
textTransform: "uppercase",
|
|
1585
1725
|
letterSpacing: "0.05em",
|
|
1586
|
-
color:
|
|
1726
|
+
color: colors3.headerText,
|
|
1587
1727
|
flexShrink: 0,
|
|
1588
1728
|
textAlign: "center"
|
|
1589
1729
|
},
|
|
@@ -1605,12 +1745,12 @@ var defaults2 = {
|
|
|
1605
1745
|
minHeight: "3.7rem",
|
|
1606
1746
|
cursor: "pointer",
|
|
1607
1747
|
userSelect: "none",
|
|
1608
|
-
background:
|
|
1748
|
+
background: colors3.itemBg,
|
|
1609
1749
|
borderRadius: "0.5rem",
|
|
1610
1750
|
transition: "background 0.15s"
|
|
1611
1751
|
},
|
|
1612
1752
|
itemActive: {
|
|
1613
|
-
background:
|
|
1753
|
+
background: colors3.itemActiveBg
|
|
1614
1754
|
},
|
|
1615
1755
|
itemBtn: {
|
|
1616
1756
|
flex: 1,
|
|
@@ -1620,7 +1760,7 @@ var defaults2 = {
|
|
|
1620
1760
|
background: "transparent",
|
|
1621
1761
|
border: "none",
|
|
1622
1762
|
textAlign: "left",
|
|
1623
|
-
color:
|
|
1763
|
+
color: colors3.text,
|
|
1624
1764
|
height: "100%",
|
|
1625
1765
|
borderRadius: "0.5rem",
|
|
1626
1766
|
cursor: "pointer"
|
|
@@ -1648,7 +1788,7 @@ var defaults2 = {
|
|
|
1648
1788
|
whiteSpace: "nowrap",
|
|
1649
1789
|
overflow: "hidden",
|
|
1650
1790
|
textOverflow: "ellipsis",
|
|
1651
|
-
color:
|
|
1791
|
+
color: colors3.text
|
|
1652
1792
|
},
|
|
1653
1793
|
indicators: {
|
|
1654
1794
|
display: "flex",
|
|
@@ -1666,8 +1806,8 @@ var defaults2 = {
|
|
|
1666
1806
|
alignSelf: "stretch",
|
|
1667
1807
|
display: "flex",
|
|
1668
1808
|
alignItems: "center",
|
|
1669
|
-
background:
|
|
1670
|
-
color:
|
|
1809
|
+
background: colors3.itemBg,
|
|
1810
|
+
color: colors3.text,
|
|
1671
1811
|
border: "none",
|
|
1672
1812
|
borderRadius: "0.4rem",
|
|
1673
1813
|
padding: "0 0.6rem",
|
|
@@ -1678,8 +1818,8 @@ var defaults2 = {
|
|
|
1678
1818
|
transition: "background 0.15s"
|
|
1679
1819
|
},
|
|
1680
1820
|
vmBtnActive: {
|
|
1681
|
-
background:
|
|
1682
|
-
color:
|
|
1821
|
+
background: colors3.vmActiveBg,
|
|
1822
|
+
color: colors3.text
|
|
1683
1823
|
}
|
|
1684
1824
|
};
|
|
1685
1825
|
var INJECTED_CSS2 = `
|
|
@@ -1695,24 +1835,24 @@ function injectScrollbarStyle() {
|
|
|
1695
1835
|
document.head.appendChild(style);
|
|
1696
1836
|
}
|
|
1697
1837
|
function DefaultIoIndicator({ on }) {
|
|
1698
|
-
return /* @__PURE__ */
|
|
1838
|
+
return /* @__PURE__ */ jsx10(
|
|
1699
1839
|
"div",
|
|
1700
1840
|
{
|
|
1701
1841
|
style: {
|
|
1702
|
-
...
|
|
1703
|
-
backgroundColor: on ?
|
|
1842
|
+
...defaults3.indicator,
|
|
1843
|
+
backgroundColor: on ? colors3.ioOn : colors3.ioOff
|
|
1704
1844
|
},
|
|
1705
1845
|
title: on ? "Online" : "Offline"
|
|
1706
1846
|
}
|
|
1707
1847
|
);
|
|
1708
1848
|
}
|
|
1709
1849
|
function DefaultSignalIndicator({ on }) {
|
|
1710
|
-
return /* @__PURE__ */
|
|
1850
|
+
return /* @__PURE__ */ jsx10(
|
|
1711
1851
|
"div",
|
|
1712
1852
|
{
|
|
1713
1853
|
style: {
|
|
1714
|
-
...
|
|
1715
|
-
backgroundColor: on ?
|
|
1854
|
+
...defaults3.indicator,
|
|
1855
|
+
backgroundColor: on ? colors3.sgOn : colors3.sgOff
|
|
1716
1856
|
},
|
|
1717
1857
|
title: on ? "Signal detected" : "No signal"
|
|
1718
1858
|
}
|
|
@@ -1746,29 +1886,29 @@ function MatrixItemRow({
|
|
|
1746
1886
|
!isEnabled && (itemDisabledClassName || "disabled")
|
|
1747
1887
|
].filter(Boolean).join(" ");
|
|
1748
1888
|
const computedStyle = useDefaults ? {
|
|
1749
|
-
...
|
|
1889
|
+
...defaults3.item,
|
|
1750
1890
|
...itemStyleProp,
|
|
1751
|
-
...isActive ? { ...
|
|
1891
|
+
...isActive ? { ...defaults3.itemActive, ...itemActiveStyle } : void 0,
|
|
1752
1892
|
opacity: isEnabled ? 1 : 0.4
|
|
1753
1893
|
} : { ...itemStyleProp };
|
|
1754
1894
|
return /* @__PURE__ */ jsxs8("div", { className: classes, style: computedStyle, children: [
|
|
1755
|
-
useDefaults ? /* @__PURE__ */
|
|
1895
|
+
useDefaults ? /* @__PURE__ */ jsx10("div", { style: defaults3.itemBtn, children: /* @__PURE__ */ jsx10(
|
|
1756
1896
|
CrisButton,
|
|
1757
1897
|
{
|
|
1758
1898
|
selected: isActive,
|
|
1759
1899
|
enabled: isEnabled,
|
|
1760
1900
|
onPress: onSelect,
|
|
1761
1901
|
showLocalFeedback: false,
|
|
1762
|
-
children: /* @__PURE__ */ jsxs8("div", { style:
|
|
1763
|
-
showChannels && /* @__PURE__ */
|
|
1764
|
-
/* @__PURE__ */
|
|
1765
|
-
/* @__PURE__ */ jsxs8("div", { style:
|
|
1766
|
-
item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */
|
|
1767
|
-
item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */
|
|
1902
|
+
children: /* @__PURE__ */ jsxs8("div", { style: defaults3.itemBtnInner, children: [
|
|
1903
|
+
showChannels && /* @__PURE__ */ jsx10("span", { className: "cris-co-matrix-ch", style: defaults3.channelNum, children: item.id }),
|
|
1904
|
+
/* @__PURE__ */ jsx10("span", { style: defaults3.itemLabel, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
|
|
1905
|
+
/* @__PURE__ */ jsxs8("div", { style: defaults3.indicators, children: [
|
|
1906
|
+
item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ jsx10(DefaultIoIndicator, { on: item.io.on })),
|
|
1907
|
+
item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ jsx10(DefaultSignalIndicator, { on: item.sg.on }))
|
|
1768
1908
|
] })
|
|
1769
1909
|
] })
|
|
1770
1910
|
}
|
|
1771
|
-
) }) : /* @__PURE__ */
|
|
1911
|
+
) }) : /* @__PURE__ */ jsx10(
|
|
1772
1912
|
CrisButton,
|
|
1773
1913
|
{
|
|
1774
1914
|
selected: isActive,
|
|
@@ -1777,21 +1917,21 @@ function MatrixItemRow({
|
|
|
1777
1917
|
className: `cris-co-matrix-item-btn ${itemActiveClassName ?? ""}`,
|
|
1778
1918
|
classActive: itemActiveClassName,
|
|
1779
1919
|
children: /* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem", width: "100%" }, children: [
|
|
1780
|
-
showChannels && /* @__PURE__ */
|
|
1781
|
-
/* @__PURE__ */
|
|
1782
|
-
/* @__PURE__ */ jsxs8("div", { style:
|
|
1783
|
-
item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */
|
|
1784
|
-
item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */
|
|
1920
|
+
showChannels && /* @__PURE__ */ jsx10("span", { className: "cris-co-matrix-ch", style: { flexShrink: 0, opacity: 0.6 }, children: item.id }),
|
|
1921
|
+
/* @__PURE__ */ jsx10("span", { style: { flex: 1, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
|
|
1922
|
+
/* @__PURE__ */ jsxs8("div", { style: defaults3.indicators, children: [
|
|
1923
|
+
item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ jsx10(DefaultIoIndicator, { on: item.io.on })),
|
|
1924
|
+
item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ jsx10(DefaultSignalIndicator, { on: item.sg.on }))
|
|
1785
1925
|
] })
|
|
1786
1926
|
] })
|
|
1787
1927
|
}
|
|
1788
1928
|
),
|
|
1789
|
-
item.vm.vs && (useDefaults && !vmButtonClassName ? /* @__PURE__ */
|
|
1790
|
-
...
|
|
1791
|
-
...item.vm.on ?
|
|
1929
|
+
item.vm.vs && (useDefaults && !vmButtonClassName ? /* @__PURE__ */ jsx10("div", { style: {
|
|
1930
|
+
...defaults3.vmBtn,
|
|
1931
|
+
...item.vm.on ? defaults3.vmBtnActive : void 0,
|
|
1792
1932
|
opacity: item.vm.en ? 1 : 0.4,
|
|
1793
1933
|
pointerEvents: item.vm.en ? "auto" : "none"
|
|
1794
|
-
}, children: /* @__PURE__ */
|
|
1934
|
+
}, children: /* @__PURE__ */ jsx10(
|
|
1795
1935
|
CrisButton,
|
|
1796
1936
|
{
|
|
1797
1937
|
selected: item.vm.on,
|
|
@@ -1800,7 +1940,7 @@ function MatrixItemRow({
|
|
|
1800
1940
|
onPress: onToggleVideoMute,
|
|
1801
1941
|
showLocalFeedback: false
|
|
1802
1942
|
}
|
|
1803
|
-
) }) : /* @__PURE__ */
|
|
1943
|
+
) }) : /* @__PURE__ */ jsx10(
|
|
1804
1944
|
CrisButton,
|
|
1805
1945
|
{
|
|
1806
1946
|
selected: item.vm.on,
|
|
@@ -1853,23 +1993,23 @@ function CrisCoMatrixListsTie({
|
|
|
1853
1993
|
"div",
|
|
1854
1994
|
{
|
|
1855
1995
|
className,
|
|
1856
|
-
style: className ? style : { ...
|
|
1996
|
+
style: className ? style : { ...defaults3.container, ...style },
|
|
1857
1997
|
children: [
|
|
1858
1998
|
/* @__PURE__ */ jsxs8(
|
|
1859
1999
|
"div",
|
|
1860
2000
|
{
|
|
1861
2001
|
className: listClassName,
|
|
1862
|
-
style: listClassName ? listStyle : { ...
|
|
2002
|
+
style: listClassName ? listStyle : { ...defaults3.list, ...listStyle },
|
|
1863
2003
|
children: [
|
|
1864
|
-
/* @__PURE__ */
|
|
2004
|
+
/* @__PURE__ */ jsx10(
|
|
1865
2005
|
"div",
|
|
1866
2006
|
{
|
|
1867
2007
|
className: headerClassName,
|
|
1868
|
-
style: headerClassName ? headerStyle : { ...
|
|
2008
|
+
style: headerClassName ? headerStyle : { ...defaults3.header, ...headerStyle },
|
|
1869
2009
|
children: inputTitle
|
|
1870
2010
|
}
|
|
1871
2011
|
),
|
|
1872
|
-
/* @__PURE__ */
|
|
2012
|
+
/* @__PURE__ */ jsx10("div", { className: "cris-co-matrix-scroll", style: defaults3.scroll, children: inputs?.map((item) => /* @__PURE__ */ jsx10(
|
|
1873
2013
|
MatrixItemRow,
|
|
1874
2014
|
{
|
|
1875
2015
|
item,
|
|
@@ -1898,17 +2038,17 @@ function CrisCoMatrixListsTie({
|
|
|
1898
2038
|
"div",
|
|
1899
2039
|
{
|
|
1900
2040
|
className: listClassName,
|
|
1901
|
-
style: listClassName ? listStyle : { ...
|
|
2041
|
+
style: listClassName ? listStyle : { ...defaults3.list, ...listStyle },
|
|
1902
2042
|
children: [
|
|
1903
|
-
/* @__PURE__ */
|
|
2043
|
+
/* @__PURE__ */ jsx10(
|
|
1904
2044
|
"div",
|
|
1905
2045
|
{
|
|
1906
2046
|
className: headerClassName,
|
|
1907
|
-
style: headerClassName ? headerStyle : { ...
|
|
2047
|
+
style: headerClassName ? headerStyle : { ...defaults3.header, ...headerStyle },
|
|
1908
2048
|
children: outputTitle
|
|
1909
2049
|
}
|
|
1910
2050
|
),
|
|
1911
|
-
/* @__PURE__ */
|
|
2051
|
+
/* @__PURE__ */ jsx10("div", { className: "cris-co-matrix-scroll", style: defaults3.scroll, children: outputs?.map((item) => /* @__PURE__ */ jsx10(
|
|
1912
2052
|
MatrixItemRow,
|
|
1913
2053
|
{
|
|
1914
2054
|
item,
|
|
@@ -1947,6 +2087,7 @@ export {
|
|
|
1947
2087
|
CrisSlider,
|
|
1948
2088
|
CrisSpinner,
|
|
1949
2089
|
CrisText,
|
|
2090
|
+
CrisTextInput,
|
|
1950
2091
|
configureIcons,
|
|
1951
2092
|
getIconConfig,
|
|
1952
2093
|
getIconFilter,
|