@imperosoft/cris-webui-components 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -770,11 +770,13 @@ function CrisSlider({
770
770
  }
771
771
  }
772
772
  touchDecidedRef.current = false;
773
+ touchingRef.current = false;
773
774
  };
774
775
  const handleTouchCancel = () => {
775
776
  touchEnd();
776
777
  touchDecidedRef.current = false;
777
778
  if (draggingRef.current) handleDragEnd();
779
+ touchingRef.current = false;
778
780
  };
779
781
  if (!isVisible) return null;
780
782
  const containerClasses = [
@@ -2338,6 +2340,9 @@ function CrisViewComm({ comm, classes, icons, className }) {
2338
2340
 
2339
2341
  // src/components/dsp/CrisViewDspFull.tsx
2340
2342
  import { useState as useState6 } from "react";
2343
+ import { useCustomObject as useCustomObject7, useCustomObjectSend as useCustomObjectSend7 } from "@imperosoft/cris-webui-ch5-core";
2344
+
2345
+ // src/components/dsp/CrisViewDspInputs.tsx
2341
2346
  import { useCustomObject as useCustomObject4, useCustomObjectSend as useCustomObjectSend4 } from "@imperosoft/cris-webui-ch5-core";
2342
2347
 
2343
2348
  // src/components/dsp/DspIoPage.tsx
@@ -2389,6 +2394,127 @@ function collapseStrips(channels, links) {
2389
2394
  function linksFor(ln, io) {
2390
2395
  return io === "in" ? ln?.ip : ln?.op;
2391
2396
  }
2397
+ function groupsFor(dg, io) {
2398
+ return io === "in" ? dg?.ip : dg?.op;
2399
+ }
2400
+ function buildLinkIndex(links) {
2401
+ const idx = /* @__PURE__ */ new Map();
2402
+ for (const raw of links ?? []) {
2403
+ const { label, channels } = normalizeLinked(raw);
2404
+ if (channels.length === 0) continue;
2405
+ const info = { label, channels };
2406
+ for (const id of channels) idx.set(id, info);
2407
+ }
2408
+ return idx;
2409
+ }
2410
+ function collapseWithin(ids, byId, linkIdx, idSet, usedLink, consumed) {
2411
+ const strips = [];
2412
+ for (const id of ids) {
2413
+ if (consumed.has(id)) continue;
2414
+ const link = linkIdx.get(id);
2415
+ const contained = !!link && link.channels.every((m) => idSet.has(m));
2416
+ if (link && contained && !usedLink.has(link)) {
2417
+ usedLink.add(link);
2418
+ link.channels.forEach((m) => consumed.add(m));
2419
+ const primary = link.channels.find((m) => byId.has(m));
2420
+ const ref = primary !== void 0 ? byId.get(primary) : void 0;
2421
+ strips.push({
2422
+ kind: "group",
2423
+ key: `g:${link.channels.join("-")}`,
2424
+ label: link.label || ref?.lb || `Grupo ${link.channels[0]}`,
2425
+ channels: link.channels,
2426
+ lv: clampLevel(ref?.lv),
2427
+ mt: ref?.mt ?? false
2428
+ });
2429
+ } else {
2430
+ consumed.add(id);
2431
+ const c = byId.get(id);
2432
+ if (!c) continue;
2433
+ strips.push({
2434
+ kind: "single",
2435
+ key: `c:${c.id}`,
2436
+ label: c.lb ?? `Canal ${c.id}`,
2437
+ channels: [c.id],
2438
+ lv: clampLevel(c.lv),
2439
+ mt: c.mt
2440
+ });
2441
+ }
2442
+ }
2443
+ return strips;
2444
+ }
2445
+ function buildIoSections(channels, links, groups) {
2446
+ if (!groups || groups.length === 0) {
2447
+ return [{ strips: collapseStrips(channels, links) }];
2448
+ }
2449
+ const byId = new Map(channels.map((c) => [c.id, c]));
2450
+ const linkIdx = buildLinkIndex(links);
2451
+ const usedLink = /* @__PURE__ */ new Set();
2452
+ const consumed = /* @__PURE__ */ new Set();
2453
+ const assigned = /* @__PURE__ */ new Set();
2454
+ const sections = [];
2455
+ for (const g of groups) {
2456
+ g.ch.forEach((id) => assigned.add(id));
2457
+ const present = g.ch.filter((id) => byId.has(id));
2458
+ if (present.length === 0) continue;
2459
+ const strips = collapseWithin(present, byId, linkIdx, new Set(g.ch), usedLink, consumed);
2460
+ if (strips.length) sections.push({ groupName: g.id, strips });
2461
+ }
2462
+ const restIds = channels.filter((c) => !assigned.has(c.id)).map((c) => c.id);
2463
+ if (restIds.length) {
2464
+ const strips = collapseWithin(restIds, byId, linkIdx, new Set(restIds), usedLink, consumed);
2465
+ if (strips.length) sections.push({ strips });
2466
+ }
2467
+ return sections;
2468
+ }
2469
+ function buildMixerAxisGrouped(channels, links, groups) {
2470
+ const byId = new Map(channels.map((c) => [c.id, c]));
2471
+ const ordered = [];
2472
+ const groupOf = /* @__PURE__ */ new Map();
2473
+ const assigned = /* @__PURE__ */ new Set();
2474
+ for (const g of groups ?? []) {
2475
+ for (const id of g.ch) {
2476
+ assigned.add(id);
2477
+ const c = byId.get(id);
2478
+ if (c && !groupOf.has(id)) {
2479
+ ordered.push(c);
2480
+ groupOf.set(id, g.id);
2481
+ }
2482
+ }
2483
+ }
2484
+ for (const c of channels) if (!assigned.has(c.id)) ordered.push(c);
2485
+ const items = ordered.map((c) => ({
2486
+ id: c.id,
2487
+ channelLabel: c.lb ?? `${c.id}`,
2488
+ groupName: groupOf.get(c.id)
2489
+ }));
2490
+ const indexById = new Map(ordered.map((c, idx) => [c.id, idx]));
2491
+ let i = 0;
2492
+ while (i < items.length) {
2493
+ const g = items[i].groupName;
2494
+ if (g === void 0) {
2495
+ i++;
2496
+ continue;
2497
+ }
2498
+ let j = i;
2499
+ while (j < items.length && items[j].groupName === g) j++;
2500
+ items[i].groupStart = true;
2501
+ items[i].groupSpan = j - i;
2502
+ i = j;
2503
+ }
2504
+ for (const raw of links ?? []) {
2505
+ const { label, channels: members } = normalizeLinked(raw);
2506
+ if (members.length < 2) continue;
2507
+ const idxs = members.map((n) => indexById.get(n));
2508
+ if (idxs.some((x) => x === void 0)) continue;
2509
+ const indices = idxs.slice().sort((a, b) => a - b);
2510
+ const consecutive = indices.every((x, k) => k === 0 || x === indices[k - 1] + 1);
2511
+ if (!consecutive) continue;
2512
+ items[indices[0]].linkStart = true;
2513
+ items[indices[0]].linkSpan = indices.length;
2514
+ for (const idx of indices) items[idx].linkCommon = label;
2515
+ }
2516
+ return items;
2517
+ }
2392
2518
  function buildMixerAxis(channels, links) {
2393
2519
  const items = channels.map((c) => ({
2394
2520
  id: c.id,
@@ -2487,53 +2613,205 @@ function useHorizontalWheel(ref) {
2487
2613
  }
2488
2614
 
2489
2615
  // src/components/dsp/DspIoPage.tsx
2490
- import { jsx as jsx13 } from "react/jsx-runtime";
2491
- function DspIoPage({ status, io, oid, send, skip, cls, icons, emptyLabel }) {
2616
+ import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
2617
+ function DspIoPage({
2618
+ status,
2619
+ io,
2620
+ oid,
2621
+ send,
2622
+ show,
2623
+ skip,
2624
+ cls,
2625
+ icons,
2626
+ emptyLabel,
2627
+ bare = false,
2628
+ suppressEmpty = false
2629
+ }) {
2492
2630
  const scrollRef = useRef4(null);
2493
2631
  useHorizontalWheel(scrollRef);
2632
+ const showSet = show ? new Set(show) : null;
2494
2633
  const skipSet = new Set(skip ?? []);
2634
+ const keep = (id) => (!showSet || showSet.has(id)) && !skipSet.has(id);
2495
2635
  const raw = (io === "in" ? status?.ip : status?.op) ?? [];
2496
- const channels = skipSet.size ? raw.filter((c) => !skipSet.has(c.id)) : raw;
2636
+ const channels = raw.filter((c) => keep(c.id));
2497
2637
  const allLinks = linksFor(status?.ln, io);
2498
- const links = skipSet.size ? allLinks?.filter((g) => (g.ch ?? []).some((id) => !skipSet.has(id))) : allLinks;
2499
- const strips = collapseStrips(channels, links);
2500
- if (strips.length === 0) {
2501
- return /* @__PURE__ */ jsx13("div", { className: cls.message, children: emptyLabel });
2638
+ const links = allLinks?.filter((g) => (g.ch ?? []).some((id) => keep(id)));
2639
+ const groups = groupsFor(status?.dg, io)?.filter((g) => (g.ch ?? []).some((id) => keep(id)));
2640
+ const sections = buildIoSections(channels, links, groups);
2641
+ const hasHeaders = sections.some((s) => s.groupName);
2642
+ const totalStrips = sections.reduce((n, s) => n + s.strips.length, 0);
2643
+ if (totalStrips === 0) {
2644
+ return suppressEmpty ? null : /* @__PURE__ */ jsx13("div", { className: cls.message, children: emptyLabel });
2502
2645
  }
2503
- return /* @__PURE__ */ jsx13("div", { ref: scrollRef, className: "w-full h-full overflow-x-auto no-scrollbar", children: /* @__PURE__ */ jsx13(
2646
+ const row = /* @__PURE__ */ jsx13(
2504
2647
  "div",
2505
2648
  {
2506
2649
  className: "flex h-full items-stretch gap-[0.3em] px-[0.5em] py-[0.5em]",
2507
2650
  style: { minWidth: "min-content" },
2508
- children: strips.map((strip) => /* @__PURE__ */ jsx13(
2509
- DspChannelStrip,
2510
- {
2511
- strip,
2512
- io,
2513
- oid,
2514
- send,
2515
- cls,
2516
- icons
2517
- },
2518
- strip.key
2519
- ))
2651
+ children: sections.map((sec, i) => /* @__PURE__ */ jsxs11("div", { className: "flex flex-col h-full", children: [
2652
+ hasHeaders && // Header band: spans this group's strips. The 1px separator lives only
2653
+ // here (between groups), never down the full channel height.
2654
+ /* @__PURE__ */ jsx13(
2655
+ "div",
2656
+ {
2657
+ className: "flex items-center justify-center shrink-0 h-[2.2em]",
2658
+ style: { borderLeft: i > 0 ? "1px solid rgba(0,0,0,0.4)" : void 0 },
2659
+ children: sec.groupName && /* @__PURE__ */ jsx13("span", { className: cls.groupHeader, title: sec.groupName, children: sec.groupName })
2660
+ }
2661
+ ),
2662
+ /* @__PURE__ */ jsx13("div", { className: "flex flex-1 min-h-0 items-stretch gap-[0.3em]", children: sec.strips.map((strip) => /* @__PURE__ */ jsx13(
2663
+ DspChannelStrip,
2664
+ {
2665
+ strip,
2666
+ io,
2667
+ oid,
2668
+ send,
2669
+ cls,
2670
+ icons
2671
+ },
2672
+ strip.key
2673
+ )) })
2674
+ ] }, sec.groupName ?? `rest:${i}`))
2675
+ }
2676
+ );
2677
+ if (bare) return row;
2678
+ return /* @__PURE__ */ jsx13("div", { ref: scrollRef, className: "w-full h-full overflow-x-auto no-scrollbar", children: row });
2679
+ }
2680
+
2681
+ // src/components/dsp/dspClasses.ts
2682
+ var DSP_CLASS_DEFAULTS = {
2683
+ root: "w-full h-full flex flex-col",
2684
+ header: "relative w-full flex items-end justify-center gap-[0.3em] px-[1em] pt-[0.5em]",
2685
+ content: "w-full flex-1 min-h-0",
2686
+ tab: "w-[10.5em] h-[3.25em] rounded-b-none rounded-lg flex items-center justify-center transition-colors bg-[#4f5152] text-white text-[1.4em] font-bold",
2687
+ tabActive: "bg-[#007ca0]",
2688
+ message: "w-full h-full flex items-center justify-center text-gray-400 text-[2em]",
2689
+ presetWrap: "absolute left-[1em] bottom-[0.3em] h-[4.5em] flex flex-col items-center",
2690
+ presetLabel: "text-[#4f5152] text-[1.4em] leading-none",
2691
+ preset: "w-[8em] h-full rounded-lg flex items-center justify-center transition-colors bg-[#4f5152] text-white",
2692
+ presetActive: "bg-[#007ca0]",
2693
+ presetPressed: "bg-[#006080]",
2694
+ savedFlash: "absolute inset-0 flex items-center justify-center rounded bg-[#22c55e] text-white text-[1.2em] font-bold pointer-events-none",
2695
+ groupHeader: "text-[#4f5152] text-center font-semibold leading-tight text-[1.1em] line-clamp-2 px-[0.3em]",
2696
+ // NOTE: no font-size on the mixer chrome/group cells — their `em` sticky
2697
+ // offsets must match the grid's `em` track widths. Text size lives on the
2698
+ // inner label spans (text-[1.1em]) instead.
2699
+ mixerGroup: "sticky flex items-center justify-center text-center bg-[#282C34] text-white font-semibold leading-tight border border-black/30",
2700
+ mixerGroupV: "sticky flex items-center justify-center bg-[#282C34] text-white font-semibold leading-tight border border-black/30",
2701
+ strip: "flex flex-col items-center gap-[0.4em] h-full w-[9em] flex-none px-[0.3em]",
2702
+ stripLabel: "text-[#4f5152] text-center leading-tight text-[1.1em] line-clamp-3",
2703
+ levelReadout: "text-[1.1em] text-[#4f5152] leading-none opacity-70 mt-[0.5em]",
2704
+ faderBar: "bg-[#c0c0c0] rounded",
2705
+ faderFill: "bg-[#007ca0] rounded",
2706
+ faderThumb: "bg-[#4f5152] rounded",
2707
+ mute: "w-full h-full rounded-lg flex items-center justify-center transition-colors bg-[#4f5152] text-white",
2708
+ muteActive: "bg-[#dc2626] text-white",
2709
+ mixerCorner: "sticky z-30 flex items-center justify-center bg-[#282C34] text-[#4f5152] text-[1.1em] font-bold border border-black/30",
2710
+ mixerChrome: "sticky flex items-center justify-center text-center bg-[#282C34] text-white leading-tight border border-black/30",
2711
+ cell: "z-10 flex items-center justify-center border border-black/30",
2712
+ cellOn: "bg-[#22c55e]",
2713
+ cellOff: "bg-[#4f5152]"
2714
+ };
2715
+ var DSP_ICON_DEFAULTS = {
2716
+ crosspointOn: "audio-volume-ok",
2717
+ muteOff: "audio-volume-high",
2718
+ muteOn: "audio-volume-mute",
2719
+ muteOffFilter: "invert(65%) sepia(70%) saturate(500%) hue-rotate(80deg) brightness(110%) contrast(95%)",
2720
+ muteOnFilter: "brightness(0) invert(1)"
2721
+ };
2722
+ function mergeDefined(defaults4, overrides) {
2723
+ if (!overrides) return { ...defaults4 };
2724
+ const out = { ...defaults4 };
2725
+ Object.keys(overrides).forEach((k) => {
2726
+ const v = overrides[k];
2727
+ if (v !== void 0) out[k] = v;
2728
+ });
2729
+ return out;
2730
+ }
2731
+ function resolveDspClasses(classes) {
2732
+ return mergeDefined(DSP_CLASS_DEFAULTS, classes);
2733
+ }
2734
+ function resolveDspIcons(icons) {
2735
+ return mergeDefined(DSP_ICON_DEFAULTS, icons);
2736
+ }
2737
+
2738
+ // src/components/dsp/CrisViewDspInputs.tsx
2739
+ import { jsx as jsx14 } from "react/jsx-runtime";
2740
+ function CrisViewDspInputs({
2741
+ oid,
2742
+ skip,
2743
+ emptyLabel = "Sin entradas",
2744
+ classes,
2745
+ icons,
2746
+ className
2747
+ }) {
2748
+ const status = useCustomObject4(oid, { subscribe: true });
2749
+ const send = useCustomObjectSend4();
2750
+ const cls = resolveDspClasses(classes);
2751
+ const ic = resolveDspIcons(icons);
2752
+ return /* @__PURE__ */ jsx14("div", { className: `w-full h-full ${className ?? ""}`, children: status === void 0 ? /* @__PURE__ */ jsx14("div", { className: cls.message, children: "Conectando\u2026" }) : /* @__PURE__ */ jsx14(
2753
+ DspIoPage,
2754
+ {
2755
+ status,
2756
+ io: "in",
2757
+ oid,
2758
+ send,
2759
+ skip,
2760
+ cls,
2761
+ icons: ic,
2762
+ emptyLabel
2520
2763
  }
2521
2764
  ) });
2522
2765
  }
2523
2766
 
2767
+ // src/components/dsp/CrisViewDspOutputs.tsx
2768
+ import { useCustomObject as useCustomObject5, useCustomObjectSend as useCustomObjectSend5 } from "@imperosoft/cris-webui-ch5-core";
2769
+ import { jsx as jsx15 } from "react/jsx-runtime";
2770
+ function CrisViewDspOutputs({
2771
+ oid,
2772
+ skip,
2773
+ emptyLabel = "Sin salidas",
2774
+ classes,
2775
+ icons,
2776
+ className
2777
+ }) {
2778
+ const status = useCustomObject5(oid, { subscribe: true });
2779
+ const send = useCustomObjectSend5();
2780
+ const cls = resolveDspClasses(classes);
2781
+ const ic = resolveDspIcons(icons);
2782
+ return /* @__PURE__ */ jsx15("div", { className: `w-full h-full ${className ?? ""}`, children: status === void 0 ? /* @__PURE__ */ jsx15("div", { className: cls.message, children: "Conectando\u2026" }) : /* @__PURE__ */ jsx15(
2783
+ DspIoPage,
2784
+ {
2785
+ status,
2786
+ io: "out",
2787
+ oid,
2788
+ send,
2789
+ skip,
2790
+ cls,
2791
+ icons: ic,
2792
+ emptyLabel
2793
+ }
2794
+ ) });
2795
+ }
2796
+
2797
+ // src/components/dsp/CrisViewDspMixer.tsx
2798
+ import { useCustomObject as useCustomObject6, useCustomObjectSend as useCustomObjectSend6 } from "@imperosoft/cris-webui-ch5-core";
2799
+
2524
2800
  // src/components/dsp/DspMixer.tsx
2525
2801
  import { useRef as useRef5 } from "react";
2526
- import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
2802
+ import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
2803
+ var GROUP_W = "2.6em";
2527
2804
  var COMMON_W = "9em";
2528
2805
  var CHAN_W = "3em";
2806
+ var GROUP_H = "2.2em";
2529
2807
  var COMMON_H = "2.4em";
2530
2808
  var CHAN_H = "2.1em";
2531
2809
  var CELL_W = "7.5em";
2532
2810
  var ROW_H = "4.5em";
2533
2811
  var DRAG_FACTOR = 0.6;
2534
2812
  function CrosspointOnIcon({ icon }) {
2535
- if (typeof icon !== "string") return /* @__PURE__ */ jsx14(Fragment3, { children: icon });
2536
- return /* @__PURE__ */ jsx14(
2813
+ if (typeof icon !== "string") return /* @__PURE__ */ jsx16(Fragment3, { children: icon });
2814
+ return /* @__PURE__ */ jsx16(
2537
2815
  "img",
2538
2816
  {
2539
2817
  src: getIconUrl(icon),
@@ -2592,11 +2870,16 @@ function DspMixer({ status, oid, send, cls, icons }) {
2592
2870
  pendingRef.current = null;
2593
2871
  };
2594
2872
  if (inputs.length === 0 || outputs.length === 0) {
2595
- return /* @__PURE__ */ jsx14("div", { className: cls.message, children: "Sin crosspoints" });
2873
+ return /* @__PURE__ */ jsx16("div", { className: cls.message, children: "Sin crosspoints" });
2596
2874
  }
2597
- const inAxis = buildMixerAxis(inputs, linksFor(status?.ln, "in"));
2598
- const outAxis = buildMixerAxis(outputs, linksFor(status?.ln, "out"));
2599
- return /* @__PURE__ */ jsx14(
2875
+ const inAxis = buildMixerAxisGrouped(inputs, linksFor(status?.ln, "in"), groupsFor(status?.dg, "in"));
2876
+ const outAxis = buildMixerAxisGrouped(outputs, linksFor(status?.ln, "out"), groupsFor(status?.dg, "out"));
2877
+ const topLink = GROUP_H;
2878
+ const topChan = `calc(${GROUP_H} + ${COMMON_H})`;
2879
+ const leftLink = GROUP_W;
2880
+ const leftChan = `calc(${GROUP_W} + ${COMMON_W})`;
2881
+ const Z = { corner: 40, group: 30, link: 25, chan: 20 };
2882
+ return /* @__PURE__ */ jsx16(
2600
2883
  "div",
2601
2884
  {
2602
2885
  ref: scrollRef,
@@ -2605,125 +2888,212 @@ function DspMixer({ status, oid, send, cls, icons }) {
2605
2888
  onPointerUp,
2606
2889
  onPointerCancel: onPointerUp,
2607
2890
  className: "w-full h-full overflow-auto no-scrollbar relative touch-none select-none cursor-grab",
2608
- children: /* @__PURE__ */ jsxs11(
2891
+ children: /* @__PURE__ */ jsxs12(
2609
2892
  "div",
2610
2893
  {
2611
2894
  className: "grid",
2612
2895
  style: {
2613
- // cols: [output common][output channel][inputs…] rows: [in common][in channel][outputs…]
2614
- gridTemplateColumns: `${COMMON_W} ${CHAN_W} repeat(${inputs.length}, ${CELL_W})`,
2615
- gridTemplateRows: `${COMMON_H} ${CHAN_H} repeat(${outputs.length}, ${ROW_H})`,
2896
+ // cols: [out group][out link][out channel][inputs…] rows: [in group][in link][in channel][outputs…]
2897
+ gridTemplateColumns: `${GROUP_W} ${COMMON_W} ${CHAN_W} repeat(${inputs.length}, ${CELL_W})`,
2898
+ gridTemplateRows: `${GROUP_H} ${COMMON_H} ${CHAN_H} repeat(${outputs.length}, ${ROW_H})`,
2616
2899
  minWidth: "min-content"
2617
2900
  },
2618
2901
  children: [
2619
- /* @__PURE__ */ jsx14(
2902
+ /* @__PURE__ */ jsx16(
2903
+ "div",
2904
+ {
2905
+ "aria-hidden": true,
2906
+ className: "sticky bg-[#282C34]",
2907
+ style: { top: 0, zIndex: 15, gridColumn: "1 / -1", gridRow: "1 / span 3" }
2908
+ }
2909
+ ),
2910
+ /* @__PURE__ */ jsx16(
2911
+ "div",
2912
+ {
2913
+ "aria-hidden": true,
2914
+ className: "sticky bg-[#282C34]",
2915
+ style: { left: 0, zIndex: 15, gridColumn: "1 / span 3", gridRow: "1 / -1" }
2916
+ }
2917
+ ),
2918
+ /* @__PURE__ */ jsx16(
2620
2919
  "div",
2621
2920
  {
2622
2921
  className: cls.mixerCorner,
2623
- style: { top: 0, left: 0, gridColumn: "1 / span 2", gridRow: "1 / span 2" },
2922
+ style: { top: 0, left: 0, zIndex: Z.corner, gridColumn: "1 / span 3", gridRow: "1 / span 3" },
2624
2923
  children: "OUT \\ IN"
2625
2924
  }
2626
2925
  ),
2627
2926
  inAxis.flatMap((it, ii) => {
2628
- const col = 3 + ii;
2629
- if (it.groupCommon !== void 0) {
2630
- const nodes = [
2631
- /* @__PURE__ */ jsx14(
2927
+ const col = 4 + ii;
2928
+ const nodes = [];
2929
+ if (it.groupStart) {
2930
+ nodes.push(
2931
+ /* @__PURE__ */ jsx16(
2632
2932
  "div",
2633
2933
  {
2634
- className: `${cls.mixerChrome} z-20 px-[0.2em]`,
2635
- style: { top: 0, gridRow: "1 / span 2", gridColumn: col, alignItems: "flex-end", paddingBottom: "0.3em" },
2636
- children: /* @__PURE__ */ jsx14("span", { className: "line-clamp-1", children: it.channelLabel })
2934
+ className: cls.mixerGroup,
2935
+ style: { top: 0, zIndex: Z.group, gridRow: 1, gridColumn: `${col} / span ${it.groupSpan}` },
2936
+ title: it.groupName,
2937
+ children: /* @__PURE__ */ jsx16("span", { className: "text-[1.1em] line-clamp-2 px-[0.2em]", children: it.groupName })
2637
2938
  },
2638
- `ich:${it.id}`
2939
+ `igrp:${it.id}`
2639
2940
  )
2640
- ];
2641
- if (it.groupStart) {
2642
- nodes.unshift(
2643
- /* @__PURE__ */ jsx14(
2941
+ );
2942
+ } else if (it.groupName === void 0) {
2943
+ nodes.push(
2944
+ /* @__PURE__ */ jsx16(
2945
+ "div",
2946
+ {
2947
+ className: cls.mixerChrome,
2948
+ style: { top: 0, zIndex: Z.group, gridRow: 1, gridColumn: col }
2949
+ },
2950
+ `ifill:${it.id}`
2951
+ )
2952
+ );
2953
+ }
2954
+ if (it.linkCommon !== void 0) {
2955
+ if (it.linkStart) {
2956
+ nodes.push(
2957
+ /* @__PURE__ */ jsx16(
2644
2958
  "div",
2645
2959
  {
2646
- className: `${cls.mixerChrome} z-25 px-[0.2em] font-semibold`,
2647
- style: { top: 0, gridRow: 1, gridColumn: `${col} / span ${it.groupSpan}` },
2648
- title: it.groupCommon,
2649
- children: /* @__PURE__ */ jsx14("span", { className: "line-clamp-2", children: it.groupCommon })
2960
+ className: `${cls.mixerChrome} px-[0.2em] font-semibold`,
2961
+ style: { top: topLink, zIndex: Z.link, gridRow: 2, gridColumn: `${col} / span ${it.linkSpan}` },
2962
+ title: it.linkCommon,
2963
+ children: /* @__PURE__ */ jsx16("span", { className: "text-[1.1em] line-clamp-2", children: it.linkCommon })
2650
2964
  },
2651
- `icc:${it.id}`
2965
+ `ilnk:${it.id}`
2652
2966
  )
2653
2967
  );
2654
2968
  }
2655
- return nodes;
2969
+ nodes.push(
2970
+ /* @__PURE__ */ jsx16(
2971
+ "div",
2972
+ {
2973
+ className: `${cls.mixerChrome} px-[0.2em]`,
2974
+ style: { top: topChan, zIndex: Z.chan, gridRow: 3, gridColumn: col },
2975
+ title: it.channelLabel,
2976
+ children: /* @__PURE__ */ jsx16("span", { className: "text-[1.1em] line-clamp-1", children: it.channelLabel })
2977
+ },
2978
+ `ichn:${it.id}`
2979
+ )
2980
+ );
2981
+ } else {
2982
+ nodes.push(
2983
+ /* @__PURE__ */ jsx16(
2984
+ "div",
2985
+ {
2986
+ className: cls.mixerChrome,
2987
+ style: { top: topLink, zIndex: Z.link, gridRow: 2, gridColumn: col }
2988
+ },
2989
+ `ilf:${it.id}`
2990
+ ),
2991
+ /* @__PURE__ */ jsx16(
2992
+ "div",
2993
+ {
2994
+ className: `${cls.mixerChrome} px-[0.2em]`,
2995
+ style: { top: topChan, zIndex: Z.chan, gridRow: 3, gridColumn: col },
2996
+ title: it.channelLabel,
2997
+ children: /* @__PURE__ */ jsx16("span", { className: "text-[1.1em] line-clamp-2", children: it.channelLabel })
2998
+ },
2999
+ `ichn:${it.id}`
3000
+ )
3001
+ );
2656
3002
  }
2657
- return [
2658
- /* @__PURE__ */ jsx14(
2659
- "div",
2660
- {
2661
- className: `${cls.mixerChrome} z-20 px-[0.2em]`,
2662
- style: { top: 0, gridRow: "1 / span 2", gridColumn: col, alignItems: "center" },
2663
- title: it.channelLabel,
2664
- children: /* @__PURE__ */ jsx14("span", { className: "line-clamp-3", children: it.channelLabel })
2665
- },
2666
- `is:${it.id}`
2667
- )
2668
- ];
3003
+ return nodes;
2669
3004
  }),
2670
3005
  outAxis.flatMap((it, oo) => {
2671
- const row = 3 + oo;
2672
- if (it.groupCommon !== void 0) {
2673
- const nodes = [
2674
- /* @__PURE__ */ jsx14(
3006
+ const row = 4 + oo;
3007
+ const nodes = [];
3008
+ if (it.groupStart) {
3009
+ nodes.push(
3010
+ /* @__PURE__ */ jsx16(
3011
+ "div",
3012
+ {
3013
+ className: cls.mixerGroupV,
3014
+ style: {
3015
+ left: 0,
3016
+ zIndex: Z.group,
3017
+ gridColumn: 1,
3018
+ gridRow: `${row} / span ${it.groupSpan}`,
3019
+ writingMode: "vertical-rl",
3020
+ transform: "rotate(180deg)"
3021
+ },
3022
+ title: it.groupName,
3023
+ children: /* @__PURE__ */ jsx16("span", { className: "text-[1.1em] line-clamp-2", children: it.groupName })
3024
+ },
3025
+ `ogrp:${it.id}`
3026
+ )
3027
+ );
3028
+ } else if (it.groupName === void 0) {
3029
+ nodes.push(
3030
+ /* @__PURE__ */ jsx16(
2675
3031
  "div",
2676
3032
  {
2677
- className: `${cls.mixerChrome} z-20`,
2678
- style: { left: 0, gridColumn: "1 / span 2", gridRow: row, justifyContent: "flex-end", paddingRight: "0.6em" },
2679
- children: /* @__PURE__ */ jsx14("span", { className: "line-clamp-1", children: it.channelLabel })
3033
+ className: cls.mixerChrome,
3034
+ style: { left: 0, zIndex: Z.group, gridColumn: 1, gridRow: row }
2680
3035
  },
2681
- `och:${it.id}`
3036
+ `ofill:${it.id}`
2682
3037
  )
2683
- ];
2684
- if (it.groupStart) {
2685
- nodes.unshift(
2686
- /* @__PURE__ */ jsx14(
3038
+ );
3039
+ }
3040
+ if (it.linkCommon !== void 0) {
3041
+ if (it.linkStart) {
3042
+ nodes.push(
3043
+ /* @__PURE__ */ jsx16(
2687
3044
  "div",
2688
3045
  {
2689
- className: `${cls.mixerChrome} z-25 justify-start px-[0.4em] font-semibold`,
2690
- style: { left: 0, gridColumn: 1, gridRow: `${row} / span ${it.groupSpan}` },
2691
- title: it.groupCommon,
2692
- children: /* @__PURE__ */ jsx14("span", { className: "line-clamp-2 text-left", children: it.groupCommon })
3046
+ className: `${cls.mixerChrome} justify-start px-[0.4em] font-semibold`,
3047
+ style: { left: leftLink, zIndex: Z.link, gridColumn: 2, gridRow: `${row} / span ${it.linkSpan}` },
3048
+ title: it.linkCommon,
3049
+ children: /* @__PURE__ */ jsx16("span", { className: "text-[1.1em] line-clamp-2 text-left", children: it.linkCommon })
2693
3050
  },
2694
- `occ:${it.id}`
3051
+ `olnk:${it.id}`
2695
3052
  )
2696
3053
  );
2697
3054
  }
2698
- return nodes;
3055
+ nodes.push(
3056
+ /* @__PURE__ */ jsx16(
3057
+ "div",
3058
+ {
3059
+ className: cls.mixerChrome,
3060
+ style: { left: leftChan, zIndex: Z.chan, gridColumn: 3, gridRow: row },
3061
+ title: it.channelLabel,
3062
+ children: /* @__PURE__ */ jsx16("span", { className: "text-[1.1em] line-clamp-1", children: it.channelLabel })
3063
+ },
3064
+ `ochn:${it.id}`
3065
+ )
3066
+ );
3067
+ } else {
3068
+ nodes.push(
3069
+ /* @__PURE__ */ jsx16(
3070
+ "div",
3071
+ {
3072
+ className: `${cls.mixerChrome} justify-start px-[0.4em]`,
3073
+ style: { left: leftLink, zIndex: Z.chan, gridColumn: "2 / span 2", gridRow: row },
3074
+ title: it.channelLabel,
3075
+ children: /* @__PURE__ */ jsx16("span", { className: "text-[1.1em] line-clamp-2 text-left", children: it.channelLabel })
3076
+ },
3077
+ `ochn:${it.id}`
3078
+ )
3079
+ );
2699
3080
  }
2700
- return [
2701
- /* @__PURE__ */ jsx14(
2702
- "div",
2703
- {
2704
- className: `${cls.mixerChrome} z-20 justify-start px-[0.4em]`,
2705
- style: { left: 0, gridColumn: "1 / span 2", gridRow: row },
2706
- title: it.channelLabel,
2707
- children: /* @__PURE__ */ jsx14("span", { className: "line-clamp-2 text-left", children: it.channelLabel })
2708
- },
2709
- `os:${it.id}`
2710
- )
2711
- ];
3081
+ return nodes;
2712
3082
  }),
2713
- outputs.map(
2714
- (o, oo) => inputs.map((i, ii) => {
2715
- const on = isOn(o.id, i.id);
2716
- return /* @__PURE__ */ jsx14(
3083
+ outAxis.map(
3084
+ (orow, oo) => inAxis.map((icol, ii) => {
3085
+ const on = isOn(orow.id, icol.id);
3086
+ return /* @__PURE__ */ jsx16(
2717
3087
  "div",
2718
3088
  {
2719
3089
  "data-cell": true,
2720
- "data-in": i.id,
2721
- "data-out": o.id,
3090
+ "data-in": icol.id,
3091
+ "data-out": orow.id,
2722
3092
  className: `${cls.cell} ${on ? cls.cellOn : cls.cellOff}`,
2723
- style: { gridColumn: 3 + ii, gridRow: 3 + oo },
2724
- children: on && /* @__PURE__ */ jsx14(CrosspointOnIcon, { icon: icons.crosspointOn })
3093
+ style: { gridColumn: 4 + ii, gridRow: 4 + oo },
3094
+ children: on && /* @__PURE__ */ jsx16(CrosspointOnIcon, { icon: icons.crosspointOn })
2725
3095
  },
2726
- `x:${i.id}:${o.id}`
3096
+ `x:${icol.id}:${orow.id}`
2727
3097
  );
2728
3098
  })
2729
3099
  )
@@ -2734,13 +3104,23 @@ function DspMixer({ status, oid, send, cls, icons }) {
2734
3104
  );
2735
3105
  }
2736
3106
 
3107
+ // src/components/dsp/CrisViewDspMixer.tsx
3108
+ import { jsx as jsx17 } from "react/jsx-runtime";
3109
+ function CrisViewDspMixer({ oid, classes, icons, className }) {
3110
+ const status = useCustomObject6(oid, { subscribe: true });
3111
+ const send = useCustomObjectSend6();
3112
+ const cls = resolveDspClasses(classes);
3113
+ const ic = resolveDspIcons(icons);
3114
+ return /* @__PURE__ */ jsx17("div", { className: `w-full h-full ${className ?? ""}`, children: status === void 0 ? /* @__PURE__ */ jsx17("div", { className: cls.message, children: "Conectando\u2026" }) : /* @__PURE__ */ jsx17(DspMixer, { status, oid, send, cls, icons: ic }) });
3115
+ }
3116
+
2737
3117
  // src/components/dsp/DspPresets.tsx
2738
3118
  import { useRef as useRef6, useState as useState5 } from "react";
2739
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
3119
+ import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
2740
3120
  var HOLD_MS = 2e3;
2741
3121
  var SAVED_MS = 1e3;
2742
3122
  function PresetButton({ num, name, active, onCall, onSave, cls }) {
2743
- return /* @__PURE__ */ jsx15(
3123
+ return /* @__PURE__ */ jsx18(
2744
3124
  CrisButton,
2745
3125
  {
2746
3126
  onTap: onCall,
@@ -2750,9 +3130,9 @@ function PresetButton({ num, name, active, onCall, onSave, cls }) {
2750
3130
  className: cls.preset,
2751
3131
  classActive: cls.presetActive,
2752
3132
  classPressed: cls.presetPressed,
2753
- children: /* @__PURE__ */ jsxs12("span", { className: "flex items-center justify-center gap-[0.5em]", children: [
2754
- /* @__PURE__ */ jsx15("span", { className: "text-[1.6em] font-bold leading-none", children: num }),
2755
- /* @__PURE__ */ jsx15("span", { className: "text-[1.2em] leading-none", children: name })
3133
+ children: /* @__PURE__ */ jsxs13("span", { className: "flex items-center justify-center gap-[0.5em]", children: [
3134
+ /* @__PURE__ */ jsx18("span", { className: "text-[1.6em] font-bold leading-none", children: num }),
3135
+ /* @__PURE__ */ jsx18("span", { className: "text-[1.2em] leading-none", children: name })
2756
3136
  ] })
2757
3137
  }
2758
3138
  );
@@ -2779,10 +3159,10 @@ function DspPresets({
2779
3159
  if (!sustainedFeedback) return false;
2780
3160
  return p.kind === "local" ? activeLocal === p.id : activeDevice === p.id;
2781
3161
  };
2782
- return /* @__PURE__ */ jsxs12("div", { className: cls.presetWrap, children: [
2783
- /* @__PURE__ */ jsx15("span", { className: cls.presetLabel, children: "Preset" }),
2784
- /* @__PURE__ */ jsxs12("div", { className: "relative flex-1 flex items-stretch gap-[0.3em] mt-[0.25em]", children: [
2785
- presets.map((p) => /* @__PURE__ */ jsx15(
3162
+ return /* @__PURE__ */ jsxs13("div", { className: cls.presetWrap, children: [
3163
+ /* @__PURE__ */ jsx18("span", { className: cls.presetLabel, children: "Preset" }),
3164
+ /* @__PURE__ */ jsxs13("div", { className: "relative flex-1 flex items-stretch gap-[0.3em] mt-[0.25em]", children: [
3165
+ presets.map((p) => /* @__PURE__ */ jsx18(
2786
3166
  PresetButton,
2787
3167
  {
2788
3168
  num: p.id,
@@ -2794,64 +3174,13 @@ function DspPresets({
2794
3174
  },
2795
3175
  p.id
2796
3176
  )),
2797
- saved && /* @__PURE__ */ jsx15("div", { className: cls.savedFlash, children: "Saved" })
3177
+ saved && /* @__PURE__ */ jsx18("div", { className: cls.savedFlash, children: "Saved" })
2798
3178
  ] })
2799
3179
  ] });
2800
3180
  }
2801
3181
 
2802
- // src/components/dsp/dspClasses.ts
2803
- var DSP_CLASS_DEFAULTS = {
2804
- root: "w-full h-full flex flex-col",
2805
- header: "relative w-full flex items-end justify-center gap-[0.3em] px-[1em] pt-[0.5em]",
2806
- content: "w-full flex-1 min-h-0",
2807
- tab: "w-[10.5em] h-[3.25em] rounded-b-none rounded-lg flex items-center justify-center transition-colors bg-[#4f5152] text-white text-[1.4em] font-bold",
2808
- tabActive: "bg-[#007ca0]",
2809
- message: "w-full h-full flex items-center justify-center text-gray-400 text-[2em]",
2810
- presetWrap: "absolute left-[1em] bottom-[0.3em] h-[4.5em] flex flex-col items-center",
2811
- presetLabel: "text-[#4f5152] text-[1.4em] leading-none",
2812
- preset: "w-[8em] h-full rounded-lg flex items-center justify-center transition-colors bg-[#4f5152] text-white",
2813
- presetActive: "bg-[#007ca0]",
2814
- presetPressed: "bg-[#006080]",
2815
- savedFlash: "absolute inset-0 flex items-center justify-center rounded bg-[#22c55e] text-white text-[1.2em] font-bold pointer-events-none",
2816
- strip: "flex flex-col items-center gap-[0.4em] h-full w-[9em] flex-none px-[0.3em]",
2817
- stripLabel: "text-[#4f5152] text-center leading-tight text-[1.1em] line-clamp-3",
2818
- levelReadout: "text-[1.1em] text-[#4f5152] leading-none opacity-70 mt-[0.5em]",
2819
- faderBar: "bg-[#c0c0c0] rounded",
2820
- faderFill: "bg-[#007ca0] rounded",
2821
- faderThumb: "bg-[#4f5152] rounded",
2822
- mute: "w-full h-full rounded-lg flex items-center justify-center transition-colors bg-[#4f5152] text-white",
2823
- muteActive: "bg-[#dc2626] text-white",
2824
- mixerCorner: "sticky z-30 flex items-center justify-center bg-[#282C34] text-[#4f5152] text-[1.1em] font-bold border border-black/30",
2825
- mixerChrome: "sticky flex items-center justify-center text-center bg-[#282C34] text-white text-[1.1em] leading-tight border border-black/30",
2826
- cell: "z-10 flex items-center justify-center border border-black/30",
2827
- cellOn: "bg-[#22c55e]",
2828
- cellOff: "bg-[#4f5152]"
2829
- };
2830
- var DSP_ICON_DEFAULTS = {
2831
- crosspointOn: "audio-volume-ok",
2832
- muteOff: "audio-volume-high",
2833
- muteOn: "audio-volume-mute",
2834
- muteOffFilter: "invert(65%) sepia(70%) saturate(500%) hue-rotate(80deg) brightness(110%) contrast(95%)",
2835
- muteOnFilter: "brightness(0) invert(1)"
2836
- };
2837
- function mergeDefined(defaults4, overrides) {
2838
- if (!overrides) return { ...defaults4 };
2839
- const out = { ...defaults4 };
2840
- Object.keys(overrides).forEach((k) => {
2841
- const v = overrides[k];
2842
- if (v !== void 0) out[k] = v;
2843
- });
2844
- return out;
2845
- }
2846
- function resolveDspClasses(classes) {
2847
- return mergeDefined(DSP_CLASS_DEFAULTS, classes);
2848
- }
2849
- function resolveDspIcons(icons) {
2850
- return mergeDefined(DSP_ICON_DEFAULTS, icons);
2851
- }
2852
-
2853
3182
  // src/components/dsp/CrisViewDspFull.tsx
2854
- import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
3183
+ import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
2855
3184
  function CrisViewDspFull({
2856
3185
  oid,
2857
3186
  presets,
@@ -2866,10 +3195,9 @@ function CrisViewDspFull({
2866
3195
  }) {
2867
3196
  const safeInitial = initialTab === "mix" && skipCrosspoints ? "in" : initialTab;
2868
3197
  const [tab, setTab] = useState6(safeInitial);
2869
- const status = useCustomObject4(oid, { subscribe: true });
2870
- const send = useCustomObjectSend4();
3198
+ const status = useCustomObject7(oid, { subscribe: true });
3199
+ const send = useCustomObjectSend7();
2871
3200
  const cls = resolveDspClasses(classes);
2872
- const ic = resolveDspIcons(icons);
2873
3201
  const tabs = [
2874
3202
  { id: "in", label: "Inputs" },
2875
3203
  ...skipCrosspoints ? [] : [{ id: "mix", label: "Mixer" }],
@@ -2878,9 +3206,9 @@ function CrisViewDspFull({
2878
3206
  const hasPresets = !!presets && presets.length > 0;
2879
3207
  const activeDevice = status?.pr?.dv ?? status?.ps?.dv;
2880
3208
  const activeLocal = status?.pr?.lc ?? status?.ps?.lc;
2881
- return /* @__PURE__ */ jsxs13("div", { className: `${cls.root} ${className ?? ""}`, children: [
2882
- /* @__PURE__ */ jsxs13("div", { className: cls.header, children: [
2883
- hasPresets && /* @__PURE__ */ jsx16(
3209
+ return /* @__PURE__ */ jsxs14("div", { className: `${cls.root} ${className ?? ""}`, children: [
3210
+ /* @__PURE__ */ jsxs14("div", { className: cls.header, children: [
3211
+ hasPresets && /* @__PURE__ */ jsx19(
2884
3212
  DspPresets,
2885
3213
  {
2886
3214
  oid,
@@ -2892,7 +3220,7 @@ function CrisViewDspFull({
2892
3220
  cls
2893
3221
  }
2894
3222
  ),
2895
- tabs.map((t) => /* @__PURE__ */ jsx16(
3223
+ tabs.map((t) => /* @__PURE__ */ jsx19(
2896
3224
  CrisButton,
2897
3225
  {
2898
3226
  text: t.label,
@@ -2903,39 +3231,82 @@ function CrisViewDspFull({
2903
3231
  },
2904
3232
  t.id
2905
3233
  )),
2906
- /* @__PURE__ */ jsx16(CrisViewComm, { comm: status?.cm, className: "absolute right-[1em] bottom-[0.3em] text-[1.25em]" })
3234
+ /* @__PURE__ */ jsx19(CrisViewComm, { comm: status?.cm, className: "absolute right-[1em] bottom-[0.3em] text-[1.25em]" })
2907
3235
  ] }),
2908
- /* @__PURE__ */ jsx16("div", { className: cls.content, children: status === void 0 ? /* @__PURE__ */ jsx16("div", { className: cls.message, children: "Conectando\u2026" }) : /* @__PURE__ */ jsxs13(Fragment4, { children: [
2909
- tab === "in" && /* @__PURE__ */ jsx16(
2910
- DspIoPage,
2911
- {
2912
- status,
2913
- io: "in",
2914
- oid,
2915
- send,
2916
- skip: skipShowInput,
2917
- cls,
2918
- icons: ic,
2919
- emptyLabel: "Sin entradas"
2920
- }
2921
- ),
2922
- tab === "mix" && !skipCrosspoints && /* @__PURE__ */ jsx16(DspMixer, { status, oid, send, cls, icons: ic }),
2923
- tab === "out" && /* @__PURE__ */ jsx16(
2924
- DspIoPage,
2925
- {
2926
- status,
2927
- io: "out",
2928
- oid,
2929
- send,
2930
- skip: skipShowOutput,
2931
- cls,
2932
- icons: ic,
2933
- emptyLabel: "Sin salidas"
2934
- }
2935
- )
3236
+ /* @__PURE__ */ jsx19("div", { className: cls.content, children: status === void 0 ? /* @__PURE__ */ jsx19("div", { className: cls.message, children: "Conectando\u2026" }) : /* @__PURE__ */ jsxs14(Fragment4, { children: [
3237
+ tab === "in" && /* @__PURE__ */ jsx19(CrisViewDspInputs, { oid, skip: skipShowInput, classes, icons }),
3238
+ tab === "mix" && !skipCrosspoints && /* @__PURE__ */ jsx19(CrisViewDspMixer, { oid, classes, icons }),
3239
+ tab === "out" && /* @__PURE__ */ jsx19(CrisViewDspOutputs, { oid, skip: skipShowOutput, classes, icons })
2936
3240
  ] }) })
2937
3241
  ] });
2938
3242
  }
3243
+
3244
+ // src/components/dsp/CrisViewDspPresets.tsx
3245
+ import { useCustomObject as useCustomObject8, useCustomObjectSend as useCustomObjectSend8 } from "@imperosoft/cris-webui-ch5-core";
3246
+ import { jsx as jsx20 } from "react/jsx-runtime";
3247
+ function CrisViewDspPresets({
3248
+ oid,
3249
+ presets,
3250
+ sustainedPresetFeedback = true,
3251
+ classes,
3252
+ className
3253
+ }) {
3254
+ const status = useCustomObject8(oid, { subscribe: true });
3255
+ const send = useCustomObjectSend8();
3256
+ const cls = resolveDspClasses({ presetWrap: "flex flex-col items-center", ...classes });
3257
+ const activeDevice = status?.pr?.dv ?? status?.ps?.dv;
3258
+ const activeLocal = status?.pr?.lc ?? status?.ps?.lc;
3259
+ return /* @__PURE__ */ jsx20("div", { className, children: /* @__PURE__ */ jsx20(
3260
+ DspPresets,
3261
+ {
3262
+ oid,
3263
+ send,
3264
+ presets,
3265
+ activeDevice,
3266
+ activeLocal,
3267
+ sustainedFeedback: sustainedPresetFeedback,
3268
+ cls
3269
+ }
3270
+ ) });
3271
+ }
3272
+
3273
+ // src/components/dsp/CrisViewDspChannels.tsx
3274
+ import { useCustomObject as useCustomObject9, useCustomObjectSend as useCustomObjectSend9 } from "@imperosoft/cris-webui-ch5-core";
3275
+ import { jsx as jsx21 } from "react/jsx-runtime";
3276
+ function CrisViewDspChannels({
3277
+ oid,
3278
+ io,
3279
+ show,
3280
+ scroll = false,
3281
+ showEmpty = false,
3282
+ emptyLabel = "",
3283
+ classes,
3284
+ icons,
3285
+ className
3286
+ }) {
3287
+ const status = useCustomObject9(oid, { subscribe: true });
3288
+ const send = useCustomObjectSend9();
3289
+ const cls = resolveDspClasses(classes);
3290
+ const ic = resolveDspIcons(icons);
3291
+ if (status === void 0) {
3292
+ return showEmpty ? /* @__PURE__ */ jsx21("div", { className: cls.message, children: "Conectando\u2026" }) : null;
3293
+ }
3294
+ return /* @__PURE__ */ jsx21("div", { className, children: /* @__PURE__ */ jsx21(
3295
+ DspIoPage,
3296
+ {
3297
+ status,
3298
+ io,
3299
+ oid,
3300
+ send,
3301
+ show,
3302
+ cls,
3303
+ icons: ic,
3304
+ emptyLabel,
3305
+ bare: !scroll,
3306
+ suppressEmpty: !showEmpty
3307
+ }
3308
+ ) });
3309
+ }
2939
3310
  export {
2940
3311
  CrisButton,
2941
3312
  CrisCoDebug,
@@ -2948,8 +3319,15 @@ export {
2948
3319
  CrisText,
2949
3320
  CrisTextInput,
2950
3321
  CrisViewComm,
3322
+ CrisViewDspChannels,
2951
3323
  CrisViewDspFull,
3324
+ CrisViewDspInputs,
3325
+ CrisViewDspMixer,
3326
+ CrisViewDspOutputs,
3327
+ CrisViewDspPresets,
3328
+ buildIoSections,
2952
3329
  buildMixerAxis,
3330
+ buildMixerAxisGrouped,
2953
3331
  clampLevel,
2954
3332
  collapseStrips,
2955
3333
  commIndicators,
@@ -2957,6 +3335,7 @@ export {
2957
3335
  getIconConfig,
2958
3336
  getIconFilter,
2959
3337
  getIconUrl,
3338
+ groupsFor,
2960
3339
  levelToPercent,
2961
3340
  linksFor,
2962
3341
  normalizeLinked