@imperosoft/cris-webui-components 1.1.3-beta.0 → 1.1.3-beta.1

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.js CHANGED
@@ -29,6 +29,7 @@ __export(index_exports, {
29
29
  CrisSlider: () => CrisSlider,
30
30
  CrisSpinner: () => CrisSpinner,
31
31
  CrisText: () => CrisText,
32
+ CrisTextInput: () => CrisTextInput,
32
33
  configureIcons: () => configureIcons,
33
34
  getIconConfig: () => getIconConfig,
34
35
  getIconFilter: () => getIconFilter,
@@ -1160,9 +1161,149 @@ function CrisOfflinePage({
1160
1161
  ] }) });
1161
1162
  }
1162
1163
 
1163
- // src/components/CrisCoDebug.tsx
1164
+ // src/components/CrisTextInput.tsx
1165
+ var import_react4 = require("react");
1164
1166
  var import_cris_webui_ch5_core7 = require("@imperosoft/cris-webui-ch5-core");
1165
1167
  var import_jsx_runtime7 = require("react/jsx-runtime");
1168
+ var colors = {
1169
+ bg: "#4f5152",
1170
+ bgFocused: "#3a3c3d",
1171
+ text: "#ffffff",
1172
+ placeholder: "#9ca3af",
1173
+ border: "#6b7280",
1174
+ borderFocused: "#007ca0"
1175
+ };
1176
+ var defaults = {
1177
+ container: {
1178
+ display: "inline-flex",
1179
+ alignItems: "center",
1180
+ borderRadius: "0.5rem",
1181
+ background: colors.bg,
1182
+ border: `1px solid ${colors.border}`,
1183
+ transition: "border-color 0.15s, background 0.15s",
1184
+ overflow: "hidden"
1185
+ },
1186
+ containerFocused: {
1187
+ borderColor: colors.borderFocused,
1188
+ background: colors.bgFocused
1189
+ },
1190
+ input: {
1191
+ flex: 1,
1192
+ background: "transparent",
1193
+ border: "none",
1194
+ outline: "none",
1195
+ color: colors.text,
1196
+ fontSize: "1em",
1197
+ fontWeight: 500,
1198
+ padding: "0.6rem 0.9rem",
1199
+ width: "100%",
1200
+ fontFamily: "inherit"
1201
+ }
1202
+ };
1203
+ function CrisTextInput({
1204
+ join,
1205
+ joinFeedback,
1206
+ joinEnable,
1207
+ joinVisible,
1208
+ placeholder = "",
1209
+ maxLength,
1210
+ type = "text",
1211
+ submitOnEnter = true,
1212
+ submitOnBlur = false,
1213
+ submitOnChange = false,
1214
+ clearOnSubmit = false,
1215
+ className,
1216
+ style,
1217
+ inputClassName,
1218
+ inputStyle,
1219
+ classDisabled,
1220
+ classFocused: classFocusedProp
1221
+ }) {
1222
+ const feedbackJoin = joinFeedback ?? join;
1223
+ const feedback = (0, import_cris_webui_ch5_core7.useSerial)(feedbackJoin);
1224
+ const enabled = (0, import_cris_webui_ch5_core7.useDigital)(joinEnable ?? 0);
1225
+ const visible = (0, import_cris_webui_ch5_core7.useDigital)(joinVisible ?? 0);
1226
+ const sSet = (0, import_cris_webui_ch5_core7.useJoinsStore)((state) => state.sSet);
1227
+ const isEnabled = joinEnable == null ? true : enabled;
1228
+ const isVisible = joinVisible == null ? true : visible;
1229
+ const [localValue, setLocalValue] = (0, import_react4.useState)("");
1230
+ const [isFocused, setIsFocused] = (0, import_react4.useState)(false);
1231
+ const inputRef = (0, import_react4.useRef)(null);
1232
+ (0, import_react4.useEffect)(() => {
1233
+ if (!isFocused) {
1234
+ setLocalValue(feedback);
1235
+ }
1236
+ }, [feedback, isFocused]);
1237
+ if (!isVisible) return null;
1238
+ const submit = (value) => {
1239
+ sSet(join, value);
1240
+ if (clearOnSubmit) {
1241
+ setLocalValue("");
1242
+ }
1243
+ };
1244
+ const handleChange = (e) => {
1245
+ const val = e.target.value;
1246
+ setLocalValue(val);
1247
+ if (submitOnChange) {
1248
+ submit(val);
1249
+ }
1250
+ };
1251
+ const handleKeyDown = (e) => {
1252
+ if (submitOnEnter && e.key === "Enter") {
1253
+ submit(localValue);
1254
+ inputRef.current?.blur();
1255
+ }
1256
+ };
1257
+ const handleFocus = () => {
1258
+ setIsFocused(true);
1259
+ };
1260
+ const handleBlur = () => {
1261
+ setIsFocused(false);
1262
+ if (submitOnBlur) {
1263
+ submit(localValue);
1264
+ }
1265
+ };
1266
+ const useDefaults = !className;
1267
+ const containerClasses = [
1268
+ "cris-text-input",
1269
+ className,
1270
+ !isEnabled && (classDisabled || "disabled"),
1271
+ isFocused && (classFocusedProp || "focused")
1272
+ ].filter(Boolean).join(" ");
1273
+ const containerStyle = useDefaults ? {
1274
+ ...defaults.container,
1275
+ ...isFocused ? defaults.containerFocused : void 0,
1276
+ ...style,
1277
+ opacity: isEnabled ? 1 : 0.4,
1278
+ pointerEvents: isEnabled ? "auto" : "none"
1279
+ } : {
1280
+ ...style,
1281
+ opacity: isEnabled ? 1 : 0.4,
1282
+ pointerEvents: isEnabled ? "auto" : "none"
1283
+ };
1284
+ const computedInputStyle = inputClassName ? { ...inputStyle } : { ...defaults.input, ...inputStyle };
1285
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: containerClasses, style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1286
+ "input",
1287
+ {
1288
+ ref: inputRef,
1289
+ type,
1290
+ value: localValue,
1291
+ placeholder,
1292
+ maxLength,
1293
+ disabled: !isEnabled,
1294
+ className: inputClassName,
1295
+ style: computedInputStyle,
1296
+ onChange: handleChange,
1297
+ onKeyDown: handleKeyDown,
1298
+ onFocus: handleFocus,
1299
+ onBlur: handleBlur
1300
+ }
1301
+ ) });
1302
+ }
1303
+
1304
+ // src/components/CrisCoDebug.tsx
1305
+ var import_cris_webui_ch5_core8 = require("@imperosoft/cris-webui-ch5-core");
1306
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1166
1307
  var defaultStyles = {
1167
1308
  container: {
1168
1309
  display: "flex",
@@ -1222,7 +1363,7 @@ var defaultStyles = {
1222
1363
  };
1223
1364
  function ConnectionIcon({ on, type }) {
1224
1365
  const label = type === "eth" ? "ETH" : "RS";
1225
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1366
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1226
1367
  "div",
1227
1368
  {
1228
1369
  style: {
@@ -1230,12 +1371,12 @@ function ConnectionIcon({ on, type }) {
1230
1371
  opacity: on ? 1 : 0.4
1231
1372
  },
1232
1373
  title: `${type === "eth" ? "Ethernet" : "RS232"}: ${on ? "Connected" : "Disconnected"}`,
1233
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", children: [
1234
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "1", y: "4", width: "18", height: "12", rx: "2", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
1235
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("text", { x: "10", y: "12.5", textAnchor: "middle", fontSize: "7", fontWeight: "bold", fill: "currentColor", children: label }),
1236
- on ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "16", cy: "5", r: "3.5", fill: "#4caf50", stroke: "none" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1237
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "16", cy: "5", r: "3.5", fill: "#f44336", stroke: "none" }),
1238
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "14", y1: "3", x2: "18", y2: "7", stroke: "white", strokeWidth: "1.5" })
1374
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", children: [
1375
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "1", y: "4", width: "18", height: "12", rx: "2", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
1376
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("text", { x: "10", y: "12.5", textAnchor: "middle", fontSize: "7", fontWeight: "bold", fill: "currentColor", children: label }),
1377
+ on ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "16", cy: "5", r: "3.5", fill: "#4caf50", stroke: "none" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1378
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "16", cy: "5", r: "3.5", fill: "#f44336", stroke: "none" }),
1379
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "14", y1: "3", x2: "18", y2: "7", stroke: "white", strokeWidth: "1.5" })
1239
1380
  ] })
1240
1381
  ] })
1241
1382
  }
@@ -1254,22 +1395,22 @@ function DebugModuleItem({
1254
1395
  iconRs232Off
1255
1396
  }) {
1256
1397
  const name = module2.lb ? `${module2.id} (${module2.lb})` : module2.id;
1257
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1398
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1258
1399
  "div",
1259
1400
  {
1260
1401
  className: itemClassName,
1261
1402
  style: itemClassName ? itemStyle : { ...defaultStyles.item, ...itemStyle },
1262
1403
  children: [
1263
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: defaultStyles.info, children: [
1264
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: defaultStyles.moduleName, children: name }),
1265
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: defaultStyles.moduleType, children: module2.tp })
1404
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: defaultStyles.info, children: [
1405
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: defaultStyles.moduleName, children: name }),
1406
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: defaultStyles.moduleType, children: module2.tp })
1266
1407
  ] }),
1267
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: defaultStyles.icons, children: [
1268
- module2.et.vs && (iconEthOn && iconEthOff ? module2.et.on ? iconEthOn : iconEthOff : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ConnectionIcon, { on: module2.et.on, type: "eth" })),
1269
- module2.rs.vs && (iconRs232On && iconRs232Off ? module2.rs.on ? iconRs232On : iconRs232Off : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ConnectionIcon, { on: module2.rs.on, type: "rs232" }))
1408
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: defaultStyles.icons, children: [
1409
+ module2.et.vs && (iconEthOn && iconEthOff ? module2.et.on ? iconEthOn : iconEthOff : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ConnectionIcon, { on: module2.et.on, type: "eth" })),
1410
+ module2.rs.vs && (iconRs232On && iconRs232Off ? module2.rs.on ? iconRs232On : iconRs232Off : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ConnectionIcon, { on: module2.rs.on, type: "rs232" }))
1270
1411
  ] }),
1271
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: defaultStyles.buttons, children: [
1272
- module2.md.vs && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1412
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: defaultStyles.buttons, children: [
1413
+ module2.md.vs && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1273
1414
  CrisButton,
1274
1415
  {
1275
1416
  selected: module2.md.on,
@@ -1279,7 +1420,7 @@ function DebugModuleItem({
1279
1420
  onPress: () => onAction("toggleMod", module2.id)
1280
1421
  }
1281
1422
  ),
1282
- module2.cm.vs && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1423
+ module2.cm.vs && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1283
1424
  CrisButton,
1284
1425
  {
1285
1426
  selected: module2.cm.on,
@@ -1308,8 +1449,8 @@ function CrisCoDebug({
1308
1449
  iconRs232On,
1309
1450
  iconRs232Off
1310
1451
  }) {
1311
- const modules = (0, import_cris_webui_ch5_core7.useCustomObject)(oid);
1312
- const send = (0, import_cris_webui_ch5_core7.useCustomObjectSend)();
1452
+ const modules = (0, import_cris_webui_ch5_core8.useCustomObject)(oid);
1453
+ const send = (0, import_cris_webui_ch5_core8.useCustomObjectSend)();
1313
1454
  const handleAction = (action, id) => {
1314
1455
  send(oid, { action, id });
1315
1456
  };
@@ -1317,14 +1458,14 @@ function CrisCoDebug({
1317
1458
  return null;
1318
1459
  }
1319
1460
  const visibleModules = modules.filter((m) => m.vs);
1320
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1461
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1321
1462
  "div",
1322
1463
  {
1323
1464
  className,
1324
1465
  style: className ? style : { ...defaultStyles.container, ...style },
1325
1466
  children: [
1326
- title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: defaultStyles.title, children: title }),
1327
- visibleModules.map((module2) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1467
+ title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: defaultStyles.title, children: title }),
1468
+ visibleModules.map((module2) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1328
1469
  DebugModuleItem,
1329
1470
  {
1330
1471
  module: module2,
@@ -1346,15 +1487,15 @@ function CrisCoDebug({
1346
1487
  }
1347
1488
 
1348
1489
  // src/components/CrisCoList.tsx
1349
- var import_cris_webui_ch5_core8 = require("@imperosoft/cris-webui-ch5-core");
1350
- var import_jsx_runtime8 = require("react/jsx-runtime");
1351
- var colors = {
1490
+ var import_cris_webui_ch5_core9 = require("@imperosoft/cris-webui-ch5-core");
1491
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1492
+ var colors2 = {
1352
1493
  itemBg: "#4f5152",
1353
1494
  itemActiveBg: "#007ca0",
1354
1495
  text: "#ffffff",
1355
1496
  headerText: "#6b7280"
1356
1497
  };
1357
- var defaults = {
1498
+ var defaults2 = {
1358
1499
  container: {
1359
1500
  display: "flex",
1360
1501
  flexDirection: "column",
@@ -1370,7 +1511,7 @@ var defaults = {
1370
1511
  padding: "0.5rem 0.75rem",
1371
1512
  textTransform: "uppercase",
1372
1513
  letterSpacing: "0.05em",
1373
- color: colors.headerText,
1514
+ color: colors2.headerText,
1374
1515
  flexShrink: 0,
1375
1516
  textAlign: "center"
1376
1517
  },
@@ -1390,12 +1531,12 @@ var defaults = {
1390
1531
  minHeight: "3.7rem",
1391
1532
  cursor: "pointer",
1392
1533
  userSelect: "none",
1393
- background: colors.itemBg,
1534
+ background: colors2.itemBg,
1394
1535
  borderRadius: "0.5rem",
1395
1536
  transition: "background 0.15s"
1396
1537
  },
1397
1538
  itemActive: {
1398
- background: colors.itemActiveBg
1539
+ background: colors2.itemActiveBg
1399
1540
  },
1400
1541
  itemBtn: {
1401
1542
  flex: 1,
@@ -1405,7 +1546,7 @@ var defaults = {
1405
1546
  background: "transparent",
1406
1547
  border: "none",
1407
1548
  textAlign: "left",
1408
- color: colors.text,
1549
+ color: colors2.text,
1409
1550
  height: "100%",
1410
1551
  borderRadius: "0.5rem",
1411
1552
  cursor: "pointer"
@@ -1433,7 +1574,7 @@ var defaults = {
1433
1574
  whiteSpace: "nowrap",
1434
1575
  overflow: "hidden",
1435
1576
  textOverflow: "ellipsis",
1436
- color: colors.text
1577
+ color: colors2.text
1437
1578
  }
1438
1579
  };
1439
1580
  var INJECTED_CSS = `
@@ -1470,13 +1611,13 @@ function ListItemRow({
1470
1611
  !isEnabled && (itemDisabledClassName || "disabled")
1471
1612
  ].filter(Boolean).join(" ");
1472
1613
  const computedStyle = useDefaults ? {
1473
- ...defaults.item,
1614
+ ...defaults2.item,
1474
1615
  ...itemStyleProp,
1475
- ...selected ? { ...defaults.itemActive, ...itemActiveStyle } : void 0,
1616
+ ...selected ? { ...defaults2.itemActive, ...itemActiveStyle } : void 0,
1476
1617
  opacity: isEnabled ? 1 : 0.4
1477
1618
  } : { ...itemStyleProp };
1478
1619
  if (renderItem) {
1479
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: classes, style: computedStyle, children: useDefaults ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: defaults.itemBtn, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1620
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: classes, style: computedStyle, children: useDefaults ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: defaults2.itemBtn, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1480
1621
  CrisButton,
1481
1622
  {
1482
1623
  selected,
@@ -1485,7 +1626,7 @@ function ListItemRow({
1485
1626
  showLocalFeedback: false,
1486
1627
  children: renderItem(item, selected, settings)
1487
1628
  }
1488
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1629
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1489
1630
  CrisButton,
1490
1631
  {
1491
1632
  selected,
@@ -1497,19 +1638,19 @@ function ListItemRow({
1497
1638
  }
1498
1639
  ) });
1499
1640
  }
1500
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: classes, style: computedStyle, children: useDefaults ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: defaults.itemBtn, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1641
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: classes, style: computedStyle, children: useDefaults ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: defaults2.itemBtn, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1501
1642
  CrisButton,
1502
1643
  {
1503
1644
  selected,
1504
1645
  enabled: isEnabled,
1505
1646
  onPress: onSelect,
1506
1647
  showLocalFeedback: false,
1507
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: defaults.itemBtnInner, children: [
1508
- showIds && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "cris-co-list-id", style: defaults.idNum, children: item.id }),
1509
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: defaults.itemLabel, children: item.lb || `Item ${item.id}` })
1648
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: defaults2.itemBtnInner, children: [
1649
+ showIds && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cris-co-list-id", style: defaults2.idNum, children: item.id }),
1650
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: defaults2.itemLabel, children: item.lb || `Item ${item.id}` })
1510
1651
  ] })
1511
1652
  }
1512
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1653
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1513
1654
  CrisButton,
1514
1655
  {
1515
1656
  selected,
@@ -1517,9 +1658,9 @@ function ListItemRow({
1517
1658
  onPress: onSelect,
1518
1659
  className: `cris-co-list-item-btn ${itemActiveClassName ?? ""}`,
1519
1660
  classActive: itemActiveClassName,
1520
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem", width: "100%" }, children: [
1521
- showIds && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "cris-co-list-id", style: { flexShrink: 0, opacity: 0.6 }, children: item.id }),
1522
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { flex: 1, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: item.lb || `Item ${item.id}` })
1661
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem", width: "100%" }, children: [
1662
+ showIds && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cris-co-list-id", style: { flexShrink: 0, opacity: 0.6 }, children: item.id }),
1663
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: { flex: 1, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: item.lb || `Item ${item.id}` })
1523
1664
  ] })
1524
1665
  }
1525
1666
  ) });
@@ -1540,8 +1681,8 @@ function CrisCoList({
1540
1681
  itemActiveStyle,
1541
1682
  itemDisabledClassName
1542
1683
  }) {
1543
- const list = (0, import_cris_webui_ch5_core8.useCustomObject)(oid);
1544
- const send = (0, import_cris_webui_ch5_core8.useCustomObjectSend)();
1684
+ const list = (0, import_cris_webui_ch5_core9.useCustomObject)(oid);
1685
+ const send = (0, import_cris_webui_ch5_core9.useCustomObjectSend)();
1545
1686
  injectStyle();
1546
1687
  if (!list) return null;
1547
1688
  const { st: settings, si, it: items } = list;
@@ -1549,21 +1690,21 @@ function CrisCoList({
1549
1690
  const handleSelect = (id) => {
1550
1691
  send(oid, { action: selectAction, id });
1551
1692
  };
1552
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1693
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1553
1694
  "div",
1554
1695
  {
1555
1696
  className,
1556
- style: className ? style : { ...defaults.container, ...style },
1697
+ style: className ? style : { ...defaults2.container, ...style },
1557
1698
  children: [
1558
- title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1699
+ title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1559
1700
  "div",
1560
1701
  {
1561
1702
  className: headerClassName,
1562
- style: headerClassName ? headerStyle : { ...defaults.header, ...headerStyle },
1703
+ style: headerClassName ? headerStyle : { ...defaults2.header, ...headerStyle },
1563
1704
  children: title
1564
1705
  }
1565
1706
  ),
1566
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "cris-co-list-scroll", style: defaults.scroll, children: visibleItems?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1707
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "cris-co-list-scroll", style: defaults2.scroll, children: visibleItems?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1567
1708
  ListItemRow,
1568
1709
  {
1569
1710
  item,
@@ -1586,9 +1727,9 @@ function CrisCoList({
1586
1727
  }
1587
1728
 
1588
1729
  // src/components/CrisCoMatrixListsTie.tsx
1589
- var import_cris_webui_ch5_core9 = require("@imperosoft/cris-webui-ch5-core");
1590
- var import_jsx_runtime9 = require("react/jsx-runtime");
1591
- var colors2 = {
1730
+ var import_cris_webui_ch5_core10 = require("@imperosoft/cris-webui-ch5-core");
1731
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1732
+ var colors3 = {
1592
1733
  itemBg: "#4f5152",
1593
1734
  itemActiveBg: "#007ca0",
1594
1735
  vmActiveBg: "#dc2626",
@@ -1599,7 +1740,7 @@ var colors2 = {
1599
1740
  sgOn: "#2196f3",
1600
1741
  sgOff: "#666666"
1601
1742
  };
1602
- var defaults2 = {
1743
+ var defaults3 = {
1603
1744
  container: {
1604
1745
  display: "flex",
1605
1746
  flexDirection: "row",
@@ -1621,7 +1762,7 @@ var defaults2 = {
1621
1762
  padding: "0.5rem 0.75rem",
1622
1763
  textTransform: "uppercase",
1623
1764
  letterSpacing: "0.05em",
1624
- color: colors2.headerText,
1765
+ color: colors3.headerText,
1625
1766
  flexShrink: 0,
1626
1767
  textAlign: "center"
1627
1768
  },
@@ -1643,12 +1784,12 @@ var defaults2 = {
1643
1784
  minHeight: "3.7rem",
1644
1785
  cursor: "pointer",
1645
1786
  userSelect: "none",
1646
- background: colors2.itemBg,
1787
+ background: colors3.itemBg,
1647
1788
  borderRadius: "0.5rem",
1648
1789
  transition: "background 0.15s"
1649
1790
  },
1650
1791
  itemActive: {
1651
- background: colors2.itemActiveBg
1792
+ background: colors3.itemActiveBg
1652
1793
  },
1653
1794
  itemBtn: {
1654
1795
  flex: 1,
@@ -1658,7 +1799,7 @@ var defaults2 = {
1658
1799
  background: "transparent",
1659
1800
  border: "none",
1660
1801
  textAlign: "left",
1661
- color: colors2.text,
1802
+ color: colors3.text,
1662
1803
  height: "100%",
1663
1804
  borderRadius: "0.5rem",
1664
1805
  cursor: "pointer"
@@ -1686,7 +1827,7 @@ var defaults2 = {
1686
1827
  whiteSpace: "nowrap",
1687
1828
  overflow: "hidden",
1688
1829
  textOverflow: "ellipsis",
1689
- color: colors2.text
1830
+ color: colors3.text
1690
1831
  },
1691
1832
  indicators: {
1692
1833
  display: "flex",
@@ -1704,8 +1845,8 @@ var defaults2 = {
1704
1845
  alignSelf: "stretch",
1705
1846
  display: "flex",
1706
1847
  alignItems: "center",
1707
- background: colors2.itemBg,
1708
- color: colors2.text,
1848
+ background: colors3.itemBg,
1849
+ color: colors3.text,
1709
1850
  border: "none",
1710
1851
  borderRadius: "0.4rem",
1711
1852
  padding: "0 0.6rem",
@@ -1716,8 +1857,8 @@ var defaults2 = {
1716
1857
  transition: "background 0.15s"
1717
1858
  },
1718
1859
  vmBtnActive: {
1719
- background: colors2.vmActiveBg,
1720
- color: colors2.text
1860
+ background: colors3.vmActiveBg,
1861
+ color: colors3.text
1721
1862
  }
1722
1863
  };
1723
1864
  var INJECTED_CSS2 = `
@@ -1733,24 +1874,24 @@ function injectScrollbarStyle() {
1733
1874
  document.head.appendChild(style);
1734
1875
  }
1735
1876
  function DefaultIoIndicator({ on }) {
1736
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1877
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1737
1878
  "div",
1738
1879
  {
1739
1880
  style: {
1740
- ...defaults2.indicator,
1741
- backgroundColor: on ? colors2.ioOn : colors2.ioOff
1881
+ ...defaults3.indicator,
1882
+ backgroundColor: on ? colors3.ioOn : colors3.ioOff
1742
1883
  },
1743
1884
  title: on ? "Online" : "Offline"
1744
1885
  }
1745
1886
  );
1746
1887
  }
1747
1888
  function DefaultSignalIndicator({ on }) {
1748
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1889
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1749
1890
  "div",
1750
1891
  {
1751
1892
  style: {
1752
- ...defaults2.indicator,
1753
- backgroundColor: on ? colors2.sgOn : colors2.sgOff
1893
+ ...defaults3.indicator,
1894
+ backgroundColor: on ? colors3.sgOn : colors3.sgOff
1754
1895
  },
1755
1896
  title: on ? "Signal detected" : "No signal"
1756
1897
  }
@@ -1784,29 +1925,29 @@ function MatrixItemRow({
1784
1925
  !isEnabled && (itemDisabledClassName || "disabled")
1785
1926
  ].filter(Boolean).join(" ");
1786
1927
  const computedStyle = useDefaults ? {
1787
- ...defaults2.item,
1928
+ ...defaults3.item,
1788
1929
  ...itemStyleProp,
1789
- ...isActive ? { ...defaults2.itemActive, ...itemActiveStyle } : void 0,
1930
+ ...isActive ? { ...defaults3.itemActive, ...itemActiveStyle } : void 0,
1790
1931
  opacity: isEnabled ? 1 : 0.4
1791
1932
  } : { ...itemStyleProp };
1792
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: classes, style: computedStyle, children: [
1793
- useDefaults ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: defaults2.itemBtn, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1933
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: classes, style: computedStyle, children: [
1934
+ useDefaults ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: defaults3.itemBtn, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1794
1935
  CrisButton,
1795
1936
  {
1796
1937
  selected: isActive,
1797
1938
  enabled: isEnabled,
1798
1939
  onPress: onSelect,
1799
1940
  showLocalFeedback: false,
1800
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: defaults2.itemBtnInner, children: [
1801
- showChannels && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cris-co-matrix-ch", style: defaults2.channelNum, children: item.id }),
1802
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: defaults2.itemLabel, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
1803
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: defaults2.indicators, children: [
1804
- item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DefaultIoIndicator, { on: item.io.on })),
1805
- item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DefaultSignalIndicator, { on: item.sg.on }))
1941
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: defaults3.itemBtnInner, children: [
1942
+ showChannels && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "cris-co-matrix-ch", style: defaults3.channelNum, children: item.id }),
1943
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: defaults3.itemLabel, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
1944
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: defaults3.indicators, children: [
1945
+ item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DefaultIoIndicator, { on: item.io.on })),
1946
+ item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DefaultSignalIndicator, { on: item.sg.on }))
1806
1947
  ] })
1807
1948
  ] })
1808
1949
  }
1809
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1950
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1810
1951
  CrisButton,
1811
1952
  {
1812
1953
  selected: isActive,
@@ -1814,22 +1955,22 @@ function MatrixItemRow({
1814
1955
  onPress: onSelect,
1815
1956
  className: `cris-co-matrix-item-btn ${itemActiveClassName ?? ""}`,
1816
1957
  classActive: itemActiveClassName,
1817
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem", width: "100%" }, children: [
1818
- showChannels && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cris-co-matrix-ch", style: { flexShrink: 0, opacity: 0.6 }, children: item.id }),
1819
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: { flex: 1, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
1820
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: defaults2.indicators, children: [
1821
- item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DefaultIoIndicator, { on: item.io.on })),
1822
- item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DefaultSignalIndicator, { on: item.sg.on }))
1958
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem", width: "100%" }, children: [
1959
+ showChannels && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "cris-co-matrix-ch", style: { flexShrink: 0, opacity: 0.6 }, children: item.id }),
1960
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { flex: 1, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
1961
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: defaults3.indicators, children: [
1962
+ item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DefaultIoIndicator, { on: item.io.on })),
1963
+ item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DefaultSignalIndicator, { on: item.sg.on }))
1823
1964
  ] })
1824
1965
  ] })
1825
1966
  }
1826
1967
  ),
1827
- item.vm.vs && (useDefaults && !vmButtonClassName ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: {
1828
- ...defaults2.vmBtn,
1829
- ...item.vm.on ? defaults2.vmBtnActive : void 0,
1968
+ item.vm.vs && (useDefaults && !vmButtonClassName ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: {
1969
+ ...defaults3.vmBtn,
1970
+ ...item.vm.on ? defaults3.vmBtnActive : void 0,
1830
1971
  opacity: item.vm.en ? 1 : 0.4,
1831
1972
  pointerEvents: item.vm.en ? "auto" : "none"
1832
- }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1973
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1833
1974
  CrisButton,
1834
1975
  {
1835
1976
  selected: item.vm.on,
@@ -1838,7 +1979,7 @@ function MatrixItemRow({
1838
1979
  onPress: onToggleVideoMute,
1839
1980
  showLocalFeedback: false
1840
1981
  }
1841
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1982
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1842
1983
  CrisButton,
1843
1984
  {
1844
1985
  selected: item.vm.on,
@@ -1873,8 +2014,8 @@ function CrisCoMatrixListsTie({
1873
2014
  renderIoIndicator,
1874
2015
  renderSignalIndicator
1875
2016
  }) {
1876
- const matrix = (0, import_cris_webui_ch5_core9.useCustomObject)(oid);
1877
- const send = (0, import_cris_webui_ch5_core9.useCustomObjectSend)();
2017
+ const matrix = (0, import_cris_webui_ch5_core10.useCustomObject)(oid);
2018
+ const send = (0, import_cris_webui_ch5_core10.useCustomObjectSend)();
1878
2019
  injectScrollbarStyle();
1879
2020
  if (!matrix) return null;
1880
2021
  const { si, ip: inputs, op: outputs } = matrix;
@@ -1887,27 +2028,27 @@ function CrisCoMatrixListsTie({
1887
2028
  const handleToggleVideoMute = (type, id) => {
1888
2029
  send(oid, { action: "toggleVideoMute", type, id });
1889
2030
  };
1890
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2031
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1891
2032
  "div",
1892
2033
  {
1893
2034
  className,
1894
- style: className ? style : { ...defaults2.container, ...style },
2035
+ style: className ? style : { ...defaults3.container, ...style },
1895
2036
  children: [
1896
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2037
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1897
2038
  "div",
1898
2039
  {
1899
2040
  className: listClassName,
1900
- style: listClassName ? listStyle : { ...defaults2.list, ...listStyle },
2041
+ style: listClassName ? listStyle : { ...defaults3.list, ...listStyle },
1901
2042
  children: [
1902
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2043
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1903
2044
  "div",
1904
2045
  {
1905
2046
  className: headerClassName,
1906
- style: headerClassName ? headerStyle : { ...defaults2.header, ...headerStyle },
2047
+ style: headerClassName ? headerStyle : { ...defaults3.header, ...headerStyle },
1907
2048
  children: inputTitle
1908
2049
  }
1909
2050
  ),
1910
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "cris-co-matrix-scroll", style: defaults2.scroll, children: inputs?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2051
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "cris-co-matrix-scroll", style: defaults3.scroll, children: inputs?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1911
2052
  MatrixItemRow,
1912
2053
  {
1913
2054
  item,
@@ -1932,21 +2073,21 @@ function CrisCoMatrixListsTie({
1932
2073
  ]
1933
2074
  }
1934
2075
  ),
1935
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2076
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1936
2077
  "div",
1937
2078
  {
1938
2079
  className: listClassName,
1939
- style: listClassName ? listStyle : { ...defaults2.list, ...listStyle },
2080
+ style: listClassName ? listStyle : { ...defaults3.list, ...listStyle },
1940
2081
  children: [
1941
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2082
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1942
2083
  "div",
1943
2084
  {
1944
2085
  className: headerClassName,
1945
- style: headerClassName ? headerStyle : { ...defaults2.header, ...headerStyle },
2086
+ style: headerClassName ? headerStyle : { ...defaults3.header, ...headerStyle },
1946
2087
  children: outputTitle
1947
2088
  }
1948
2089
  ),
1949
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "cris-co-matrix-scroll", style: defaults2.scroll, children: outputs?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2090
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "cris-co-matrix-scroll", style: defaults3.scroll, children: outputs?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1950
2091
  MatrixItemRow,
1951
2092
  {
1952
2093
  item,
@@ -1986,6 +2127,7 @@ function CrisCoMatrixListsTie({
1986
2127
  CrisSlider,
1987
2128
  CrisSpinner,
1988
2129
  CrisText,
2130
+ CrisTextInput,
1989
2131
  configureIcons,
1990
2132
  getIconConfig,
1991
2133
  getIconFilter,