@ai-matrx/agents 0.41.1 → 0.42.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.
@@ -297,7 +297,9 @@ interface ContextRulesTableProps {
297
297
  className?: string;
298
298
  }
299
299
  /**
300
- * The context rules table: Item | Include | Chars | Inline max. Presentational
300
+ * The context rules table: Item | Include | Chars | Inline max, under nested
301
+ * heading rows — section ("Marketing"), page ("Marketing Brand Cockpit"), the
302
+ * page's own groups — each heading full width with its switch. Presentational
301
303
  * and state-agnostic — every edit goes out through `onChange`.
302
304
  */
303
305
  declare function ContextRulesTable({ rows, cap, readOnly, mismatches, onChange, onOpenRow, density, selectedKey, hierarchy, onSetInclude, renderRowLead, renderRowTrail, className, }: ContextRulesTableProps): react.JSX.Element;
@@ -297,7 +297,9 @@ interface ContextRulesTableProps {
297
297
  className?: string;
298
298
  }
299
299
  /**
300
- * The context rules table: Item | Include | Chars | Inline max. Presentational
300
+ * The context rules table: Item | Include | Chars | Inline max, under nested
301
+ * heading rows — section ("Marketing"), page ("Marketing Brand Cockpit"), the
302
+ * page's own groups — each heading full width with its switch. Presentational
301
303
  * and state-agnostic — every edit goes out through `onChange`.
302
304
  */
303
305
  declare function ContextRulesTable({ rows, cap, readOnly, mismatches, onChange, onOpenRow, density, selectedKey, hierarchy, onSetInclude, renderRowLead, renderRowTrail, className, }: ContextRulesTableProps): react.JSX.Element;
@@ -3,6 +3,9 @@
3
3
  // context/react/ContextRulesTable.tsx
4
4
  import * as React2 from "react";
5
5
  import {
6
+ Popover,
7
+ PopoverContent,
8
+ PopoverTrigger,
6
9
  Switch,
7
10
  Tooltip as Tooltip2,
8
11
  TooltipContent as TooltipContent2,
@@ -456,10 +459,43 @@ function summarizeContextRows(rows) {
456
459
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
457
460
  var CONTEXT_RULES_GRID = {
458
461
  compact: "grid grid-cols-[minmax(0,1fr)_2.75rem_4rem_6.5rem] items-center gap-x-2 px-2",
459
- // Phone widths (375px): the fixed columns stay compact so Item always keeps
460
- // the remaining width — ~125px at 375 — and truncates with an ellipsis.
461
462
  comfortable: "grid grid-cols-[minmax(0,1fr)_2.75rem_3.5rem_6.75rem] items-center gap-x-1.5 px-3"
462
463
  };
464
+ var NARROW_GRID = {
465
+ compact: "grid grid-cols-[minmax(0,1fr)_auto_auto_auto] items-center gap-x-1.5 px-2",
466
+ comfortable: "grid grid-cols-[minmax(0,1fr)_auto_auto_auto] items-center gap-x-1.5 px-3"
467
+ };
468
+ var CONTEXT_RULES_NARROW_BELOW = 400;
469
+ var useIsoLayoutEffect = typeof window === "undefined" ? React2.useEffect : React2.useLayoutEffect;
470
+ function useNarrow(ref) {
471
+ const [narrow, setNarrow] = React2.useState(false);
472
+ useIsoLayoutEffect(() => {
473
+ const el = ref.current;
474
+ if (!el) return void 0;
475
+ const fit = () => {
476
+ const width = el.clientWidth;
477
+ if (width > 0) setNarrow(width < CONTEXT_RULES_NARROW_BELOW);
478
+ };
479
+ fit();
480
+ if (typeof ResizeObserver === "undefined") return void 0;
481
+ const observer = new ResizeObserver(fit);
482
+ observer.observe(el);
483
+ return () => observer.disconnect();
484
+ }, [ref]);
485
+ return narrow;
486
+ }
487
+ var INDENT = ["", "pl-2", "pl-4", "pl-6"];
488
+ var indent = (depth) => INDENT[Math.min(depth, INDENT.length - 1)];
489
+ function sectionsOf(levels) {
490
+ const out = [];
491
+ for (const level of levels) {
492
+ const label = level.ref.path.length > 1 ? level.ref.path[0] : null;
493
+ const last = out[out.length - 1];
494
+ if (label !== null && last && last.label === label) last.levels.push(level);
495
+ else out.push({ id: label === null ? `level:${level.ref.id}` : `section:${label}`, label, levels: [level] });
496
+ }
497
+ return out;
498
+ }
463
499
  function ContextRulesTable({
464
500
  rows,
465
501
  cap,
@@ -476,14 +512,23 @@ function ContextRulesTable({
476
512
  className
477
513
  }) {
478
514
  const comfortable = density === "comfortable";
515
+ const rootRef = React2.useRef(null);
516
+ const narrow = useNarrow(rootRef);
517
+ const grid = narrow ? NARROW_GRID[density] : CONTEXT_RULES_GRID[density];
479
518
  const levels = buildContextLevels(rows, hierarchy);
480
519
  const headed = Boolean(hierarchy) || levels.length > 1;
520
+ const bulkChanges = (list, next) => includeChanges(list, next, cap);
521
+ const bulk = (list) => onSetInclude && !readOnly ? (next) => {
522
+ const changes = bulkChanges(list, next);
523
+ if (changes.length > 0) onSetInclude(changes);
524
+ } : void 0;
481
525
  const renderRow = (row, depth) => /* @__PURE__ */ jsx3(
482
526
  ContextRuleRow,
483
527
  {
484
528
  row,
485
529
  cap,
486
- density,
530
+ grid,
531
+ narrow,
487
532
  depth: headed ? depth : 0,
488
533
  readOnly,
489
534
  selected: selectedKey === row.key,
@@ -496,161 +541,135 @@ function ContextRulesTable({
496
541
  },
497
542
  rowId(row)
498
543
  );
499
- const bulk = (list) => onSetInclude && !readOnly ? (next) => {
500
- const changes = includeChanges(list, next, cap);
501
- if (changes.length > 0) onSetInclude(changes);
502
- } : void 0;
503
- return /* @__PURE__ */ jsx3(TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs3("div", { role: "table", "aria-label": "Values", "data-density": density, className: cn2("text-xs", className), children: [
504
- /* @__PURE__ */ jsxs3(
505
- "div",
506
- {
507
- role: "row",
508
- className: cn2(
509
- CONTEXT_RULES_GRID[density],
510
- "sticky top-0 z-10 h-7 border-b border-border bg-card font-medium text-muted-foreground"
511
- ),
512
- children: [
513
- /* @__PURE__ */ jsx3("span", { role: "columnheader", children: "Item" }),
514
- /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "text-center", children: "Include" }),
515
- /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "text-right", children: "Chars" }),
516
- /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "pr-6 text-right", children: "Inline max" })
517
- ]
518
- }
519
- ),
520
- levels.length === 0 ? /* @__PURE__ */ jsx3("div", { className: "px-2 py-3 text-center text-muted-foreground", children: "None" }) : levels.map((level) => {
521
- const all = levelRows(level);
522
- const name = level.ref.path.join(" \u203A ");
523
- return /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": headed ? name : void 0, "data-level": level.ref.id, children: [
524
- headed ? /* @__PURE__ */ jsx3(
525
- LevelHeading,
526
- {
527
- kind: "level",
528
- path: level.ref.path,
529
- rows: all,
530
- density,
531
- readOnly,
532
- ...levelSwitch(level, bulk(all))
533
- }
534
- ) : null,
535
- level.rows.map((row) => renderRow(row, 1)),
536
- level.groups.map((group) => /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": group.ref.label, "data-group": group.ref.id, children: [
537
- /* @__PURE__ */ jsx3(
538
- LevelHeading,
539
- {
540
- kind: "group",
541
- path: [group.ref.label],
542
- rows: group.rows,
543
- density,
544
- readOnly,
545
- onToggle: bulk(group.rows),
546
- checked: group.rows.some((r) => r.include)
547
- }
548
- ),
549
- group.rows.map((row) => renderRow(row, 2))
550
- ] }, group.ref.id))
551
- ] }, level.ref.id);
552
- })
553
- ] }) });
554
- }
555
- function levelSwitch(level, bulk) {
556
- if (level.master) return { checked: level.master.on, onToggle: level.master.onToggle };
557
- return { checked: levelRows(level).some((r) => r.include), onToggle: bulk };
558
- }
559
- var useIsoLayoutEffect = typeof window === "undefined" ? React2.useEffect : React2.useLayoutEffect;
560
- function HeadingPath({ path, name }) {
561
- const boxRef = React2.useRef(null);
562
- const fullRef = React2.useRef(null);
563
- const [compact, setCompact] = React2.useState(false);
564
- const multi = path.length > 1;
565
- useIsoLayoutEffect(() => {
566
- const box = boxRef.current;
567
- const full = fullRef.current;
568
- if (!multi || !box || !full) return void 0;
569
- const fit = () => setCompact(full.scrollWidth > box.clientWidth);
570
- fit();
571
- if (typeof ResizeObserver === "undefined") return void 0;
572
- const observer = new ResizeObserver(fit);
573
- observer.observe(box);
574
- return () => observer.disconnect();
575
- }, [multi, name]);
576
- const shown = multi && compact ? path.slice(-1) : path;
577
- return /* @__PURE__ */ jsxs3(
578
- "span",
544
+ const heading = (props) => /* @__PURE__ */ jsx3(Heading, { ...props, comfortable, readOnly }, props.id);
545
+ const renderLevel = (level, depth) => {
546
+ const all = levelRows(level);
547
+ const name = level.ref.path[level.ref.path.length - 1] ?? "";
548
+ return /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": headed ? level.ref.path.join(" \u203A ") : void 0, "data-level": level.ref.id, children: [
549
+ headed ? heading({
550
+ id: `h:${level.ref.id}`,
551
+ kind: "level",
552
+ label: name,
553
+ switchName: level.ref.path.join(" \u203A "),
554
+ depth,
555
+ rows: all,
556
+ ...levelSwitch(level, bulk(all))
557
+ }) : null,
558
+ level.rows.map((row) => renderRow(row, depth + 1)),
559
+ level.groups.map((group) => /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": group.ref.label, "data-group": group.ref.id, children: [
560
+ heading({
561
+ id: `h:${group.ref.id}`,
562
+ kind: "group",
563
+ label: group.ref.label,
564
+ switchName: group.ref.label,
565
+ depth: depth + 1,
566
+ rows: group.rows,
567
+ checked: group.rows.some((r) => r.include),
568
+ onToggle: bulk(group.rows)
569
+ }),
570
+ group.rows.map((row) => renderRow(row, depth + 2))
571
+ ] }, group.ref.id))
572
+ ] }, level.ref.id);
573
+ };
574
+ return /* @__PURE__ */ jsx3(TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs3(
575
+ "div",
579
576
  {
580
- ref: boxRef,
581
- "data-compact": multi && compact ? "true" : void 0,
582
- className: "relative flex min-w-0 flex-1 items-center gap-1 overflow-hidden",
583
- title: name,
577
+ ref: rootRef,
578
+ role: "table",
579
+ "aria-label": "Values",
580
+ "data-density": density,
581
+ "data-layout": narrow ? "narrow" : "wide",
582
+ className: cn2("text-xs", className),
584
583
  children: [
585
- multi ? /* @__PURE__ */ jsx3(
586
- "span",
584
+ narrow ? null : /* @__PURE__ */ jsxs3(
585
+ "div",
587
586
  {
588
- ref: fullRef,
589
- "aria-hidden": true,
590
- className: "pointer-events-none invisible absolute left-0 top-0 flex items-center gap-1 whitespace-nowrap",
591
- children: path.map((part, i) => /* @__PURE__ */ jsxs3(React2.Fragment, { children: [
592
- i > 0 ? /* @__PURE__ */ jsx3("span", { children: "\u203A" }) : null,
593
- /* @__PURE__ */ jsx3("span", { children: part })
594
- ] }, `${i}:${part}`))
587
+ role: "row",
588
+ className: cn2(grid, "sticky top-0 z-10 h-7 border-b border-border bg-card font-medium text-muted-foreground"),
589
+ children: [
590
+ /* @__PURE__ */ jsx3("span", { role: "columnheader", children: "Item" }),
591
+ /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "text-center", children: "Include" }),
592
+ /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "text-right", children: "Chars" }),
593
+ /* @__PURE__ */ jsx3("span", { role: "columnheader", className: "pr-6 text-right", children: "Inline max" })
594
+ ]
595
595
  }
596
- ) : null,
597
- shown.map((part, i) => /* @__PURE__ */ jsxs3(React2.Fragment, { children: [
598
- i > 0 ? /* @__PURE__ */ jsx3("span", { className: "shrink-0 text-muted-foreground", children: "\u203A" }) : null,
599
- /* @__PURE__ */ jsx3(
600
- "span",
601
- {
602
- className: cn2(
603
- i < shown.length - 1 ? "shrink-0 whitespace-nowrap text-muted-foreground" : "min-w-0 truncate"
604
- ),
605
- children: part
596
+ ),
597
+ levels.length === 0 ? /* @__PURE__ */ jsx3("div", { className: "px-2 py-3 text-center text-muted-foreground", children: "None" }) : sectionsOf(levels).map((section) => {
598
+ if (section.label === null || !headed) return renderLevel(section.levels[0], 0);
599
+ const all = section.levels.flatMap(levelRows);
600
+ const several = section.levels.length > 1;
601
+ const toggleSection = several && !readOnly ? (next) => {
602
+ const changes = [];
603
+ for (const level of section.levels) {
604
+ if (level.master) level.master.onToggle?.(next);
605
+ else changes.push(...bulkChanges(levelRows(level), next));
606
606
  }
607
- )
608
- ] }, `${i}:${part}`))
607
+ if (changes.length > 0) onSetInclude?.(changes);
608
+ } : void 0;
609
+ return /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": section.label, "data-section": section.label, children: [
610
+ heading({
611
+ id: `h:${section.id}`,
612
+ kind: "section",
613
+ label: section.label,
614
+ switchName: section.label,
615
+ depth: 0,
616
+ rows: all,
617
+ checked: section.levels.some((l) => l.master ? l.master.on : levelRows(l).some((r) => r.include)),
618
+ onToggle: toggleSection,
619
+ noSwitch: !several
620
+ }),
621
+ section.levels.map((level) => renderLevel(level, 1))
622
+ ] }, section.id);
623
+ })
609
624
  ]
610
625
  }
611
- );
626
+ ) });
612
627
  }
613
- function LevelHeading({
628
+ function levelSwitch(level, bulk) {
629
+ if (level.master) return { checked: level.master.on, onToggle: level.master.onToggle };
630
+ return { checked: levelRows(level).some((r) => r.include), onToggle: bulk };
631
+ }
632
+ function Heading({
614
633
  kind,
615
- path,
634
+ label,
635
+ switchName,
636
+ depth,
616
637
  rows,
617
- density,
618
- readOnly,
619
638
  checked,
620
- onToggle
639
+ onToggle,
640
+ noSwitch,
641
+ comfortable,
642
+ readOnly
621
643
  }) {
622
- const name = path.join(" \u203A ");
623
644
  const { count, charsLabel } = summarizeContextRows(rows);
624
645
  const total = rows.length;
625
- const showSwitch = Boolean(onToggle) || readOnly && total > 0;
646
+ const showSwitch = !noSwitch && (Boolean(onToggle) || readOnly && total > 0);
626
647
  return /* @__PURE__ */ jsxs3(
627
648
  "div",
628
649
  {
629
650
  role: "row",
630
651
  "data-heading": kind,
631
652
  className: cn2(
632
- CONTEXT_RULES_GRID[density],
633
- "border-b border-border/50 font-medium",
634
- density === "comfortable" ? "min-h-11" : "h-7",
635
- kind === "level" ? "bg-muted/60 text-foreground" : "bg-muted/25 text-muted-foreground"
653
+ "flex items-center gap-2 border-b border-border/50 font-medium",
654
+ comfortable ? "min-h-11 px-3" : "h-7 px-2",
655
+ kind === "group" ? "bg-muted/25 text-muted-foreground" : "bg-muted/60 text-foreground"
636
656
  ),
637
657
  children: [
638
- /* @__PURE__ */ jsxs3("div", { role: "cell", className: cn2("flex min-w-0 items-center gap-1", kind === "group" && "pl-2"), children: [
639
- /* @__PURE__ */ jsx3(HeadingPath, { path, name }),
640
- total > 0 ? /* @__PURE__ */ jsx3("span", { className: "shrink-0 font-normal tabular-nums text-muted-foreground", children: count === total ? total : `${count}/${total}` }) : null
641
- ] }),
642
- /* @__PURE__ */ jsx3("div", { role: "cell", className: "flex justify-center", children: showSwitch ? /* @__PURE__ */ jsx3(
643
- Switch,
644
- {
645
- size: "sm",
646
- "aria-label": `Include ${name}`,
647
- checked,
648
- disabled: readOnly || !onToggle,
649
- onCheckedChange: (next) => onToggle?.(next)
650
- }
651
- ) : null }),
652
- /* @__PURE__ */ jsx3("div", { role: "cell", className: "text-right font-normal tabular-nums text-muted-foreground", children: total > 0 ? charsLabel : null }),
653
- /* @__PURE__ */ jsx3("div", { role: "cell" })
658
+ /* @__PURE__ */ jsx3("div", { role: "cell", className: cn2("flex min-w-0 flex-1 items-center", indent(depth)), children: /* @__PURE__ */ jsx3("span", { className: "min-w-0 truncate", title: label, children: label }) }),
659
+ /* @__PURE__ */ jsxs3("div", { role: "cell", className: "flex shrink-0 items-center gap-2 font-normal tabular-nums text-muted-foreground", children: [
660
+ total > 0 ? /* @__PURE__ */ jsx3("span", { children: count === total ? total : `${count}/${total}` }) : null,
661
+ total > 0 ? /* @__PURE__ */ jsx3("span", { children: charsLabel }) : null,
662
+ showSwitch ? /* @__PURE__ */ jsx3(
663
+ Switch,
664
+ {
665
+ size: "sm",
666
+ "aria-label": `Include ${switchName}`,
667
+ checked,
668
+ disabled: readOnly || !onToggle,
669
+ onCheckedChange: (next) => onToggle?.(next)
670
+ }
671
+ ) : null
672
+ ] })
654
673
  ]
655
674
  }
656
675
  );
@@ -658,7 +677,8 @@ function LevelHeading({
658
677
  function ContextRuleRow({
659
678
  row,
660
679
  cap,
661
- density,
680
+ grid,
681
+ narrow,
662
682
  depth,
663
683
  comfortable,
664
684
  readOnly,
@@ -691,7 +711,7 @@ function ContextRuleRow({
691
711
  "data-mismatch": mismatches.length > 0 ? "true" : void 0,
692
712
  "aria-selected": selected || void 0,
693
713
  className: cn2(
694
- CONTEXT_RULES_GRID[density],
714
+ grid,
695
715
  "border-b border-border/50",
696
716
  comfortable ? "min-h-11" : "h-7",
697
717
  selected && "bg-accent"
@@ -703,8 +723,7 @@ function ContextRuleRow({
703
723
  role: "cell",
704
724
  className: cn2(
705
725
  "flex min-w-0 items-center gap-1.5",
706
- depth === 1 && "pl-2",
707
- depth === 2 && "pl-4",
726
+ indent(depth),
708
727
  !row.include && "opacity-50"
709
728
  ),
710
729
  children: [
@@ -756,7 +775,7 @@ function ContextRuleRow({
756
775
  ]
757
776
  }
758
777
  ),
759
- /* @__PURE__ */ jsx3("div", { role: "cell", children: /* @__PURE__ */ jsx3(
778
+ /* @__PURE__ */ jsx3("div", { role: "cell", children: narrow ? /* @__PURE__ */ jsx3(InlineMaxButton, { row, cap, readOnly, comfortable, onChange }) : /* @__PURE__ */ jsx3(
760
779
  InlineMaxInput,
761
780
  {
762
781
  label: row.label,
@@ -773,14 +792,60 @@ function ContextRuleRow({
773
792
  }
774
793
  );
775
794
  }
795
+ function InlineMaxButton({
796
+ row,
797
+ cap,
798
+ readOnly,
799
+ comfortable,
800
+ onChange
801
+ }) {
802
+ const [open, setOpen] = React2.useState(false);
803
+ const own = row.userRule?.max_inline_chars ?? null;
804
+ const text = own !== null ? formatLimit(own) : limitPlaceholder(row, cap);
805
+ return /* @__PURE__ */ jsxs3(Popover, { open, onOpenChange: setOpen, children: [
806
+ /* @__PURE__ */ jsx3(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs3(
807
+ "button",
808
+ {
809
+ type: "button",
810
+ "aria-label": `Inline max ${row.label}: ${text}`,
811
+ disabled: readOnly,
812
+ className: cn2(
813
+ "relative inline-flex min-w-[2.25rem] items-center justify-end gap-1 rounded px-1 tabular-nums hover:bg-accent disabled:opacity-60",
814
+ comfortable ? "h-8 after:absolute after:-inset-y-1.5 after:inset-x-0 after:content-['']" : "h-6",
815
+ own === null ? "text-muted-foreground" : "text-foreground"
816
+ ),
817
+ children: [
818
+ own !== null ? /* @__PURE__ */ jsx3("span", { "aria-hidden": true, className: "h-1 w-1 rounded-full bg-primary" }) : null,
819
+ text
820
+ ]
821
+ }
822
+ ) }),
823
+ /* @__PURE__ */ jsx3(PopoverContent, { align: "end", className: "w-auto p-2", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 text-xs", children: [
824
+ /* @__PURE__ */ jsx3("span", { className: "text-muted-foreground", children: "Inline max" }),
825
+ /* @__PURE__ */ jsx3(
826
+ InlineMaxInput,
827
+ {
828
+ label: row.label,
829
+ value: own,
830
+ inherited: inheritedLimit(row, cap),
831
+ placeholder: limitPlaceholder(row, cap),
832
+ cap,
833
+ disabled: readOnly,
834
+ comfortable,
835
+ onCommit: (next) => onChange(row.key, row.surfaceKey, withLimit(row, next))
836
+ }
837
+ )
838
+ ] }) })
839
+ ] });
840
+ }
776
841
 
777
842
  // context/react/ContextRulesChip.tsx
778
843
  import * as React3 from "react";
779
844
  import {
780
845
  BottomSheet,
781
- Popover,
782
- PopoverContent,
783
- PopoverTrigger,
846
+ Popover as Popover2,
847
+ PopoverContent as PopoverContent2,
848
+ PopoverTrigger as PopoverTrigger2,
784
849
  Switch as Switch2,
785
850
  Tooltip as Tooltip3,
786
851
  TooltipContent as TooltipContent3,
@@ -946,13 +1011,13 @@ function ContextRulesChip({
946
1011
  /* @__PURE__ */ jsx4(BottomSheet, { open, onOpenChange: setOpen, title: name || faceName, surface: "solid", children: body })
947
1012
  ] });
948
1013
  }
949
- return /* @__PURE__ */ jsx4(TooltipProvider2, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs4(Popover, { open, onOpenChange: setOpen, children: [
950
- withBlindTip(/* @__PURE__ */ jsx4(PopoverTrigger, { asChild: true, children: faceButton })),
1014
+ return /* @__PURE__ */ jsx4(TooltipProvider2, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs4(Popover2, { open, onOpenChange: setOpen, children: [
1015
+ withBlindTip(/* @__PURE__ */ jsx4(PopoverTrigger2, { asChild: true, children: faceButton })),
951
1016
  /* @__PURE__ */ jsx4(
952
- PopoverContent,
1017
+ PopoverContent2,
953
1018
  {
954
1019
  align: "end",
955
- className: "w-[26rem] max-w-[calc(100vw-1rem)] overflow-hidden p-0",
1020
+ className: "w-[30rem] max-w-[calc(100vw-1rem)] overflow-hidden p-0",
956
1021
  children: body
957
1022
  }
958
1023
  )
@@ -1182,7 +1247,7 @@ function ContextReceiptBlockDetail({
1182
1247
  }
1183
1248
 
1184
1249
  // context/react/ContextRulesPanelBody.tsx
1185
- import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1250
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1186
1251
  function layerCells(row) {
1187
1252
  const { surface, agent, default_max } = row.layers ?? {};
1188
1253
  const declared = agent?.declared === true;
@@ -1389,7 +1454,7 @@ function ContextRulesPanelBody({
1389
1454
  }
1390
1455
  ) : null;
1391
1456
  if (isMobile) {
1392
- return /* @__PURE__ */ jsx7(TooltipProvider3, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsx7("div", { className: cn6("flex h-full min-h-0 flex-col", className), children: detail ? /* @__PURE__ */ jsxs7(Fragment3, { children: [
1457
+ return /* @__PURE__ */ jsx7(TooltipProvider3, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsx7("div", { className: cn6("flex h-full min-h-0 flex-col", className), children: detail ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
1393
1458
  /* @__PURE__ */ jsx7("div", { className: "flex h-12 shrink-0 items-center border-b border-border px-1", children: /* @__PURE__ */ jsxs7(
1394
1459
  "button",
1395
1460
  {
@@ -1403,7 +1468,7 @@ function ContextRulesPanelBody({
1403
1468
  }
1404
1469
  ) }),
1405
1470
  /* @__PURE__ */ jsx7("div", { className: "min-h-0 flex-1 overflow-y-auto", children: detail })
1406
- ] }) : /* @__PURE__ */ jsxs7(Fragment3, { children: [
1471
+ ] }) : /* @__PURE__ */ jsxs7(Fragment2, { children: [
1407
1472
  search,
1408
1473
  table
1409
1474
  ] }) }) });