@tangle-network/charts 2.0.12 → 2.0.14

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.
@@ -1,6 +1,8 @@
1
- import { C as isRefusal, J as hatchPath, O as duration, S as markName, Z as markerPath, i as timeline, n as reportedCount, p as MARK_HEADS, r as sumReportedCounts, t as finiteNumber, v as eventsGap } from "../flow-trace-k097Ukvs.js";
1
+ import { G as hatchPath, J as markerPath, T as duration, b as isRefusal, ct as wrap, h as eventsGap, st as textWidth, t as timeline, u as MARK_HEADS, y as markName } from "../timeline-B7c-cede.js";
2
+ import { n as reportedCount, r as sumReportedCounts } from "../flow-trace-DRluIYw8.js";
3
+ import { C as visibleFlowWaterfallRows, D as statusMeta, E as runStatus, S as totalsAt, T as RunStatusIcon, _ as slowestRow, a as costSummary, b as spanRunning, c as drawnRow, d as formatCount, f as formatSpanDuration, g as searchMatchIds, h as rowCostText, i as busyMs, l as flowWaterfallRows, n as agentSummary, o as criticalPathIds, p as quietActivity, r as agentViewRows, s as defaultOpenFamilies, t as agentCallouts, u as formatCost, v as spanFact, w as workKind, x as toneKey, y as spanFailed } from "../flow-waterfall-model-DvrgPLGS.js";
2
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { Fragment as Fragment$1, createContext, createElement, forwardRef, memo, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
5
+ import { Fragment as Fragment$1, memo, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
4
6
  //#region src/react/sparkline.tsx
5
7
  const DEFAULT_SPARKLINE_WIDTH = 96;
6
8
  const DEFAULT_SPARKLINE_HEIGHT = 24;
@@ -652,9 +654,9 @@ const durationStyle = {
652
654
  fontFamily: "var(--font-mono, monospace)",
653
655
  fontVariantNumeric: "tabular-nums"
654
656
  };
655
- const ordered$1 = (start, end) => Number.isFinite(start) && Number.isFinite(end) && end >= start;
657
+ const ordered = (start, end) => Number.isFinite(start) && Number.isFinite(end) && end >= start;
656
658
  function WaterfallTimeAxis({ windowMs, originMs = 0, widthPx = 208, formatDuration = formatWaterfallDuration, className, fluid = false }) {
657
- if (!ordered$1(0, windowMs) || !Number.isFinite(originMs)) return null;
659
+ if (!ordered(0, windowMs) || !Number.isFinite(originMs)) return null;
658
660
  const ticks = waterfallTicks(windowMs, widthPx);
659
661
  if (windowMs === 0) return null;
660
662
  return /* @__PURE__ */ jsx("div", {
@@ -706,7 +708,7 @@ function WaterfallBar({ startMs, endMs, window, tone = "default", formatDuration
706
708
  minWidth: 0,
707
709
  flex: "1 1 0%"
708
710
  } : timingCell;
709
- if (!ordered$1(startMs, endMs) || !ordered$1(window.startMs, window.endMs)) return /* @__PURE__ */ jsx("span", {
711
+ if (!ordered(startMs, endMs) || !ordered(window.startMs, window.endMs)) return /* @__PURE__ */ jsx("span", {
710
712
  className,
711
713
  "data-waterfall-track": "",
712
714
  "data-unavailable": "true",
@@ -779,7 +781,7 @@ function WaterfallRow({ label, attribution, startMs, endMs, window, tone, format
779
781
  "data-waterfall-duration": "",
780
782
  className: durationClassName,
781
783
  style: durationStyle,
782
- children: durationLabel ?? (ordered$1(startMs, endMs) ? formatDuration(endMs - startMs) : "—")
784
+ children: durationLabel ?? (ordered(startMs, endMs) ? formatDuration(endMs - startMs) : "—")
783
785
  })
784
786
  ]
785
787
  });
@@ -869,22 +871,37 @@ function ticksFor(max) {
869
871
  };
870
872
  }
871
873
  function Tooltip({ tip }) {
874
+ const ref = useRef(null);
875
+ const [position, setPosition] = useState({
876
+ left: 0,
877
+ top: 0
878
+ });
879
+ useLayoutEffect(() => {
880
+ const node = ref.current, parent = node?.parentElement;
881
+ if (!tip || !node || !parent) return;
882
+ const place = () => {
883
+ const next = {
884
+ left: Math.max(0, Math.min(tip.x, parent.clientWidth - node.offsetWidth)),
885
+ top: Math.max(0, Math.min(tip.y, parent.clientHeight - node.offsetHeight))
886
+ };
887
+ setPosition((old) => old.left === next.left && old.top === next.top ? old : next);
888
+ };
889
+ place();
890
+ const observer = new ResizeObserver(place);
891
+ observer.observe(node);
892
+ observer.observe(parent);
893
+ return () => observer.disconnect();
894
+ }, [tip]);
872
895
  if (!tip) return null;
873
896
  return /* @__PURE__ */ jsxs("div", {
897
+ ref,
874
898
  className: "ov-tip",
875
899
  role: "tooltip",
876
- style: {
877
- left: tip.x,
878
- top: tip.y
879
- },
880
- children: [/* @__PURE__ */ jsx("strong", { children: tip.title }), tip.lines.map((line) => /* @__PURE__ */ jsxs("span", {
900
+ style: position,
901
+ children: [/* @__PURE__ */ jsx("strong", { children: tip.title }), tip.lines.map((line, i) => /* @__PURE__ */ jsxs("span", {
881
902
  className: "ov-tip-line",
882
- children: [
883
- line.color && /* @__PURE__ */ jsx("i", { style: { background: line.color } }),
884
- /* @__PURE__ */ jsx("span", { children: line.label }),
885
- /* @__PURE__ */ jsx("b", { children: line.value })
886
- ]
887
- }, line.label))]
903
+ children: [/* @__PURE__ */ jsxs("span", { children: [line.color && /* @__PURE__ */ jsx("i", { style: { background: line.color } }), line.label] }), /* @__PURE__ */ jsx("b", { children: line.value })]
904
+ }, `${line.label}:${i}`))]
888
905
  });
889
906
  }
890
907
  /** Bars per day (or per any label: `tick` shortens it on the axis), stacked by series, on one axis; hovering a bar lists
@@ -1394,7 +1411,13 @@ function Meter({ used, total, format = formatCompact, tone, text, segments, step
1394
1411
  children: steps.map((step, i) => /* @__PURE__ */ jsxs("li", {
1395
1412
  "data-state": step.state,
1396
1413
  "aria-current": i === current ? "step" : void 0,
1397
- children: [/* @__PURE__ */ jsx("strong", { children: i + 1 }), /* @__PURE__ */ jsx("span", { children: step.label })]
1414
+ children: [/* @__PURE__ */ jsxs("div", {
1415
+ className: "ov-step-head",
1416
+ children: [/* @__PURE__ */ jsx("strong", { children: i + 1 }), /* @__PURE__ */ jsx("small", {
1417
+ className: "ov-step-state",
1418
+ children: step.state === "pass" ? "Pass" : step.state === "fail" ? "Stuck" : "Unchecked"
1419
+ })]
1420
+ }), /* @__PURE__ */ jsx("span", { children: step.label })]
1398
1421
  }, i))
1399
1422
  });
1400
1423
  }
@@ -1653,6 +1676,16 @@ function Gantt({ rows, lanes: laneInput, colors, axis, span, marks = [], now, ha
1653
1676
  const plotW = Math.max(0, width - labelW - 10);
1654
1677
  const x = (t) => labelW + (t - t0) / (t1 - t0) * plotW;
1655
1678
  const fallback = colors.unknown ?? "var(--chart-live-faint, var(--chart-muted))";
1679
+ const orderedMarks = [...marks].sort((a, b) => a.at - b.at);
1680
+ const best = orderedMarks.find((mark) => mark.label === bestMark);
1681
+ const labelled = new Set(best ? [best] : []), positions = best ? [x(best.at)] : [];
1682
+ const every = Math.max(1, Math.ceil(marks.length / Math.max(1, Math.floor(plotW / (6 * em)))));
1683
+ orderedMarks.forEach((mark, i) => {
1684
+ if (i % every === 0 && positions.every((at) => Math.abs(at - x(mark.at)) >= 5 * em)) {
1685
+ labelled.add(mark);
1686
+ positions.push(x(mark.at));
1687
+ }
1688
+ });
1656
1689
  const hatched = new Set(hatch);
1657
1690
  const plotBottom = top + lanes.length * rowH;
1658
1691
  const first = maxHeight && lanes.length > 100 ? Math.max(0, Math.floor((scrollTop - top) / rowH) - 6) : 0;
@@ -1677,7 +1710,11 @@ function Gantt({ rows, lanes: laneInput, colors, axis, span, marks = [], now, ha
1677
1710
  width,
1678
1711
  height: 52,
1679
1712
  "aria-label": "Releases and time axis",
1680
- children: [marks.map((mark, i) => /* @__PURE__ */ jsxs("g", {
1713
+ children: [orderedMarks.map((mark, i) => /* @__PURE__ */ jsxs("g", {
1714
+ tabIndex: 0,
1715
+ role: "img",
1716
+ "aria-label": markName(mark),
1717
+ "data-labelled": bestMark ? labelled.has(mark) : void 0,
1681
1718
  "data-best": mark.label === bestMark || void 0,
1682
1719
  children: [/* @__PURE__ */ jsx(Mark, {
1683
1720
  mark,
@@ -1735,6 +1772,10 @@ function Gantt({ rows, lanes: laneInput, colors, axis, span, marks = [], now, ha
1735
1772
  })] }, f)),
1736
1773
  visible.map((lane, offset) => {
1737
1774
  const i = first + offset, y = top + i * rowH;
1775
+ const suffix = typeof lane.count === "number" && Number.isFinite(lane.count) ? ` · ${lane.count.toLocaleString()}` : "";
1776
+ const label = wrap(lane.label, Math.max(40, (phone ? width - 16 : labelW - em) - textWidth(suffix, 13)), 13, "sans", 1).lines[0];
1777
+ const final = lane.spans.length ? lane.spans.reduce((last, s) => ends(s) >= ends(last) ? s : last) : void 0;
1778
+ const endLabel = selectedId === lane.id && final?.endLabel ? wrap(final.endLabel, Math.max(40, plotW - 16), 13, "sans", 1).lines[0] : void 0;
1738
1779
  return /* @__PURE__ */ jsxs("g", {
1739
1780
  "data-lane": lane.id,
1740
1781
  "data-lane-index": i,
@@ -1778,14 +1819,21 @@ function Gantt({ rows, lanes: laneInput, colors, axis, span, marks = [], now, ha
1778
1819
  x: tipX(x(ends(lane.spans.at(-1) ?? { end: t1 }))),
1779
1820
  y: tipY(y),
1780
1821
  title: lane.label,
1781
- lines: lane.spans.flatMap((s) => [{
1782
- label: s.end === null ? `${s.state} (open)` : s.state,
1783
- value: span(s.start, ends(s)),
1784
- color: hatched.has(s.state) ? void 0 : colors[s.state] ?? fallback
1785
- }, ...s.note ? [{
1786
- label: s.note,
1787
- value: ""
1788
- }] : []])
1822
+ lines: lane.spans.flatMap((s) => [
1823
+ {
1824
+ label: s.end === null ? `${s.state} (open)` : s.state,
1825
+ value: span(s.start, ends(s)),
1826
+ color: hatched.has(s.state) ? void 0 : colors[s.state] ?? fallback
1827
+ },
1828
+ ...s.note ? [{
1829
+ label: s.note,
1830
+ value: ""
1831
+ }] : [],
1832
+ ...s.endLabel ? [{
1833
+ label: "Duration / cost",
1834
+ value: s.endLabel
1835
+ }] : []
1836
+ ])
1789
1837
  })
1790
1838
  }),
1791
1839
  /* @__PURE__ */ jsxs("text", {
@@ -1794,7 +1842,18 @@ function Gantt({ rows, lanes: laneInput, colors, axis, span, marks = [], now, ha
1794
1842
  dominantBaseline: "middle",
1795
1843
  textAnchor: phone ? "start" : "end",
1796
1844
  className: "ov-axis ov-gantt-label",
1797
- children: [/* @__PURE__ */ jsx("title", { children: lane.label }), lane.label.length > 26 ? `${lane.label.slice(0, 25)}…` : lane.label]
1845
+ children: [
1846
+ /* @__PURE__ */ jsxs("title", { children: [
1847
+ lane.label,
1848
+ suffix,
1849
+ suffix && lane.countLabel ? ` ${lane.countLabel}` : ""
1850
+ ] }),
1851
+ label,
1852
+ suffix && /* @__PURE__ */ jsx("tspan", {
1853
+ className: "ov-gantt-count",
1854
+ children: suffix
1855
+ })
1856
+ ]
1798
1857
  }),
1799
1858
  lane.spans.map((s, j) => {
1800
1859
  const color = colors[s.state] ?? fallback;
@@ -1808,14 +1867,21 @@ function Gantt({ rows, lanes: laneInput, colors, axis, span, marks = [], now, ha
1808
1867
  x: tipX(bx + bw),
1809
1868
  y: tipY(y),
1810
1869
  title: lane.label,
1811
- lines: [{
1812
- label: open ? `${s.state} (open)` : s.state,
1813
- value: span(s.start, ends(s)),
1814
- color: hatched.has(s.state) ? void 0 : color
1815
- }, ...s.note ? [{
1816
- label: s.note,
1817
- value: ""
1818
- }] : []]
1870
+ lines: [
1871
+ {
1872
+ label: open ? `${s.state} (open)` : s.state,
1873
+ value: span(s.start, ends(s)),
1874
+ color: hatched.has(s.state) ? void 0 : color
1875
+ },
1876
+ ...s.note ? [{
1877
+ label: s.note,
1878
+ value: ""
1879
+ }] : [],
1880
+ ...s.endLabel ? [{
1881
+ label: "Duration / cost",
1882
+ value: s.endLabel
1883
+ }] : []
1884
+ ]
1819
1885
  }),
1820
1886
  children: hatched.has(s.state) ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
1821
1887
  x: bx,
@@ -1836,6 +1902,13 @@ function Gantt({ rows, lanes: laneInput, colors, axis, span, marks = [], now, ha
1836
1902
  className: open ? "ov-gantt-open" : void 0
1837
1903
  })
1838
1904
  }, j);
1905
+ }),
1906
+ endLabel && /* @__PURE__ */ jsxs("text", {
1907
+ className: "ov-gantt-end",
1908
+ x: Math.max(labelW + 8, Math.min(x(ends(final)) + 8, width - textWidth(endLabel, 13) - 8)),
1909
+ y: y + (phone ? 24 : rowH * .25) + rowH * .25,
1910
+ dominantBaseline: "middle",
1911
+ children: [/* @__PURE__ */ jsx("title", { children: final?.endLabel }), endLabel]
1839
1912
  })
1840
1913
  ]
1841
1914
  }, lane.id);
@@ -1848,8 +1921,9 @@ function Gantt({ rows, lanes: laneInput, colors, axis, span, marks = [], now, ha
1848
1921
  className: "ov-now",
1849
1922
  "data-now": "true"
1850
1923
  }),
1851
- [...marks].sort((a, b) => a.at - b.at).map((mark, i) => /* @__PURE__ */ jsxs("g", {
1924
+ orderedMarks.map((mark, i) => /* @__PURE__ */ jsxs("g", {
1852
1925
  className: mark.verdict ? `ov-verdict-${mark.verdict}` : void 0,
1926
+ "data-labelled": !maxHeight && bestMark ? labelled.has(mark) : void 0,
1853
1927
  "data-best": mark.label === bestMark || void 0,
1854
1928
  style: maxHeight ? { pointerEvents: "none" } : void 0,
1855
1929
  children: [
@@ -2549,4742 +2623,6 @@ function DotMap({ positions, radii, colors, palette, extent, rects, labels, dimm
2549
2623
  });
2550
2624
  }
2551
2625
  //#endregion
2552
- //#region node_modules/clsx/dist/clsx.mjs
2553
- function r(e) {
2554
- var t, f, n = "";
2555
- if ("string" == typeof e || "number" == typeof e) n += e;
2556
- else if ("object" == typeof e) if (Array.isArray(e)) {
2557
- var o = e.length;
2558
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
2559
- } else for (f in e) e[f] && (n && (n += " "), n += f);
2560
- return n;
2561
- }
2562
- function clsx() {
2563
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
2564
- return n;
2565
- }
2566
- //#endregion
2567
- //#region node_modules/tailwind-merge/dist/bundle-mjs.mjs
2568
- /**
2569
- * Concatenates two arrays faster than the array spread operator.
2570
- */
2571
- const concatArrays = (array1, array2) => {
2572
- const combinedArray = new Array(array1.length + array2.length);
2573
- for (let i = 0; i < array1.length; i++) combinedArray[i] = array1[i];
2574
- for (let i = 0; i < array2.length; i++) combinedArray[array1.length + i] = array2[i];
2575
- return combinedArray;
2576
- };
2577
- const createClassValidatorObject = (classGroupId, validator) => ({
2578
- classGroupId,
2579
- validator
2580
- });
2581
- const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
2582
- nextPart,
2583
- validators,
2584
- classGroupId
2585
- });
2586
- const CLASS_PART_SEPARATOR = "-";
2587
- const EMPTY_CONFLICTS = [];
2588
- const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
2589
- const createClassGroupUtils = (config) => {
2590
- const classMap = createClassMap(config);
2591
- const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
2592
- const getClassGroupId = (className) => {
2593
- if (className.startsWith("[") && className.endsWith("]")) return getGroupIdForArbitraryProperty(className);
2594
- const classParts = className.split(CLASS_PART_SEPARATOR);
2595
- const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
2596
- return getGroupRecursive(classParts, startIndex, classMap);
2597
- };
2598
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
2599
- if (hasPostfixModifier) {
2600
- const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
2601
- const baseConflicts = conflictingClassGroups[classGroupId];
2602
- if (modifierConflicts) {
2603
- if (baseConflicts) return concatArrays(baseConflicts, modifierConflicts);
2604
- return modifierConflicts;
2605
- }
2606
- return baseConflicts || EMPTY_CONFLICTS;
2607
- }
2608
- return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
2609
- };
2610
- return {
2611
- getClassGroupId,
2612
- getConflictingClassGroupIds
2613
- };
2614
- };
2615
- const getGroupRecursive = (classParts, startIndex, classPartObject) => {
2616
- if (classParts.length - startIndex === 0) return classPartObject.classGroupId;
2617
- const currentClassPart = classParts[startIndex];
2618
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
2619
- if (nextClassPartObject) {
2620
- const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
2621
- if (result) return result;
2622
- }
2623
- const validators = classPartObject.validators;
2624
- if (validators === null) return;
2625
- const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
2626
- const validatorsLength = validators.length;
2627
- for (let i = 0; i < validatorsLength; i++) {
2628
- const validatorObj = validators[i];
2629
- if (validatorObj.validator(classRest)) return validatorObj.classGroupId;
2630
- }
2631
- };
2632
- /**
2633
- * Get the class group ID for an arbitrary property.
2634
- *
2635
- * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
2636
- */
2637
- const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
2638
- const content = className.slice(1, -1);
2639
- const colonIndex = content.indexOf(":");
2640
- const property = content.slice(0, colonIndex);
2641
- return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
2642
- })();
2643
- /**
2644
- * Exported for testing only
2645
- */
2646
- const createClassMap = (config) => {
2647
- const { theme, classGroups } = config;
2648
- return processClassGroups(classGroups, theme);
2649
- };
2650
- const processClassGroups = (classGroups, theme) => {
2651
- const classMap = createClassPartObject();
2652
- for (const classGroupId in classGroups) {
2653
- const group = classGroups[classGroupId];
2654
- processClassesRecursively(group, classMap, classGroupId, theme);
2655
- }
2656
- return classMap;
2657
- };
2658
- const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
2659
- const len = classGroup.length;
2660
- for (let i = 0; i < len; i++) {
2661
- const classDefinition = classGroup[i];
2662
- processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
2663
- }
2664
- };
2665
- const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
2666
- if (typeof classDefinition === "string") {
2667
- processStringDefinition(classDefinition, classPartObject, classGroupId);
2668
- return;
2669
- }
2670
- if (typeof classDefinition === "function") {
2671
- processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
2672
- return;
2673
- }
2674
- processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
2675
- };
2676
- const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
2677
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
2678
- classPartObjectToEdit.classGroupId = classGroupId;
2679
- };
2680
- const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
2681
- if (isThemeGetter(classDefinition)) {
2682
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
2683
- return;
2684
- }
2685
- if (classPartObject.validators === null) classPartObject.validators = [];
2686
- classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
2687
- };
2688
- const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
2689
- const entries = Object.entries(classDefinition);
2690
- const len = entries.length;
2691
- for (let i = 0; i < len; i++) {
2692
- const [key, value] = entries[i];
2693
- processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
2694
- }
2695
- };
2696
- const getPart = (classPartObject, path) => {
2697
- let current = classPartObject;
2698
- const parts = path.split(CLASS_PART_SEPARATOR);
2699
- const len = parts.length;
2700
- for (let i = 0; i < len; i++) {
2701
- const part = parts[i];
2702
- let next = current.nextPart.get(part);
2703
- if (!next) {
2704
- next = createClassPartObject();
2705
- current.nextPart.set(part, next);
2706
- }
2707
- current = next;
2708
- }
2709
- return current;
2710
- };
2711
- const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
2712
- const createLruCache = (maxCacheSize) => {
2713
- if (maxCacheSize < 1) return {
2714
- get: () => void 0,
2715
- set: () => {}
2716
- };
2717
- let cacheSize = 0;
2718
- let cache = Object.create(null);
2719
- let previousCache = Object.create(null);
2720
- const update = (key, value) => {
2721
- cache[key] = value;
2722
- cacheSize++;
2723
- if (cacheSize > maxCacheSize) {
2724
- cacheSize = 0;
2725
- previousCache = cache;
2726
- cache = Object.create(null);
2727
- }
2728
- };
2729
- return {
2730
- get(key) {
2731
- let value = cache[key];
2732
- if (value !== void 0) return value;
2733
- if ((value = previousCache[key]) !== void 0) {
2734
- update(key, value);
2735
- return value;
2736
- }
2737
- },
2738
- set(key, value) {
2739
- if (key in cache) cache[key] = value;
2740
- else update(key, value);
2741
- }
2742
- };
2743
- };
2744
- const IMPORTANT_MODIFIER = "!";
2745
- const MODIFIER_SEPARATOR = ":";
2746
- const EMPTY_MODIFIERS = [];
2747
- const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
2748
- modifiers,
2749
- hasImportantModifier,
2750
- baseClassName,
2751
- maybePostfixModifierPosition,
2752
- isExternal
2753
- });
2754
- const createParseClassName = (config) => {
2755
- const { prefix, experimentalParseClassName } = config;
2756
- /**
2757
- * Parse class name into parts.
2758
- *
2759
- * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
2760
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
2761
- */
2762
- let parseClassName = (className) => {
2763
- const modifiers = [];
2764
- let bracketDepth = 0;
2765
- let parenDepth = 0;
2766
- let modifierStart = 0;
2767
- let postfixModifierPosition;
2768
- const len = className.length;
2769
- for (let index = 0; index < len; index++) {
2770
- const currentCharacter = className[index];
2771
- if (bracketDepth === 0 && parenDepth === 0) {
2772
- if (currentCharacter === MODIFIER_SEPARATOR) {
2773
- modifiers.push(className.slice(modifierStart, index));
2774
- modifierStart = index + 1;
2775
- continue;
2776
- }
2777
- if (currentCharacter === "/") {
2778
- postfixModifierPosition = index;
2779
- continue;
2780
- }
2781
- }
2782
- if (currentCharacter === "[") bracketDepth++;
2783
- else if (currentCharacter === "]") bracketDepth--;
2784
- else if (currentCharacter === "(") parenDepth++;
2785
- else if (currentCharacter === ")") parenDepth--;
2786
- }
2787
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
2788
- let baseClassName = baseClassNameWithImportantModifier;
2789
- let hasImportantModifier = false;
2790
- if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
2791
- baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
2792
- hasImportantModifier = true;
2793
- } else if (baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
2794
- baseClassName = baseClassNameWithImportantModifier.slice(1);
2795
- hasImportantModifier = true;
2796
- }
2797
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
2798
- return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
2799
- };
2800
- if (prefix) {
2801
- const fullPrefix = prefix + MODIFIER_SEPARATOR;
2802
- const parseClassNameOriginal = parseClassName;
2803
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
2804
- }
2805
- if (experimentalParseClassName) {
2806
- const parseClassNameOriginal = parseClassName;
2807
- parseClassName = (className) => experimentalParseClassName({
2808
- className,
2809
- parseClassName: parseClassNameOriginal
2810
- });
2811
- }
2812
- return parseClassName;
2813
- };
2814
- /**
2815
- * Sorts modifiers according to following schema:
2816
- * - Predefined modifiers are sorted alphabetically
2817
- * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
2818
- */
2819
- const createSortModifiers = (config) => {
2820
- const modifierWeights = /* @__PURE__ */ new Map();
2821
- config.orderSensitiveModifiers.forEach((mod, index) => {
2822
- modifierWeights.set(mod, 1e6 + index);
2823
- });
2824
- return (modifiers) => {
2825
- const result = [];
2826
- let currentSegment = [];
2827
- for (let i = 0; i < modifiers.length; i++) {
2828
- const modifier = modifiers[i];
2829
- const isArbitrary = modifier[0] === "[";
2830
- const isOrderSensitive = modifierWeights.has(modifier);
2831
- if (isArbitrary || isOrderSensitive) {
2832
- if (currentSegment.length > 0) {
2833
- currentSegment.sort();
2834
- result.push(...currentSegment);
2835
- currentSegment = [];
2836
- }
2837
- result.push(modifier);
2838
- } else currentSegment.push(modifier);
2839
- }
2840
- if (currentSegment.length > 0) {
2841
- currentSegment.sort();
2842
- result.push(...currentSegment);
2843
- }
2844
- return result;
2845
- };
2846
- };
2847
- const createConfigUtils = (config) => ({
2848
- cache: createLruCache(config.cacheSize),
2849
- parseClassName: createParseClassName(config),
2850
- sortModifiers: createSortModifiers(config),
2851
- postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),
2852
- ...createClassGroupUtils(config)
2853
- });
2854
- const createPostfixLookupClassGroupIds = (config) => {
2855
- const lookup = Object.create(null);
2856
- const classGroupIds = config.postfixLookupClassGroups;
2857
- if (classGroupIds) for (let i = 0; i < classGroupIds.length; i++) lookup[classGroupIds[i]] = true;
2858
- return lookup;
2859
- };
2860
- const SPLIT_CLASSES_REGEX = /\s+/;
2861
- const mergeClassList = (classList, configUtils) => {
2862
- const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers, postfixLookupClassGroupIds } = configUtils;
2863
- /**
2864
- * Set of classGroupIds in following format:
2865
- * `{importantModifier}{variantModifiers}{classGroupId}`
2866
- * @example 'float'
2867
- * @example 'hover:focus:bg-color'
2868
- * @example 'md:!pr'
2869
- */
2870
- const classGroupsInConflict = [];
2871
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
2872
- let result = "";
2873
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
2874
- const originalClassName = classNames[index];
2875
- const { isExternal, modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName);
2876
- if (isExternal) {
2877
- result = originalClassName + (result.length > 0 ? " " + result : result);
2878
- continue;
2879
- }
2880
- let hasPostfixModifier = !!maybePostfixModifierPosition;
2881
- let classGroupId;
2882
- if (hasPostfixModifier) {
2883
- classGroupId = getClassGroupId(baseClassName.substring(0, maybePostfixModifierPosition));
2884
- const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : void 0;
2885
- if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
2886
- classGroupId = classGroupIdWithPostfix;
2887
- hasPostfixModifier = false;
2888
- }
2889
- } else classGroupId = getClassGroupId(baseClassName);
2890
- if (!classGroupId) {
2891
- if (!hasPostfixModifier) {
2892
- result = originalClassName + (result.length > 0 ? " " + result : result);
2893
- continue;
2894
- }
2895
- classGroupId = getClassGroupId(baseClassName);
2896
- if (!classGroupId) {
2897
- result = originalClassName + (result.length > 0 ? " " + result : result);
2898
- continue;
2899
- }
2900
- hasPostfixModifier = false;
2901
- }
2902
- const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
2903
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
2904
- const classId = modifierId + classGroupId;
2905
- if (classGroupsInConflict.indexOf(classId) > -1) continue;
2906
- classGroupsInConflict.push(classId);
2907
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
2908
- for (let i = 0; i < conflictGroups.length; ++i) {
2909
- const group = conflictGroups[i];
2910
- classGroupsInConflict.push(modifierId + group);
2911
- }
2912
- result = originalClassName + (result.length > 0 ? " " + result : result);
2913
- }
2914
- return result;
2915
- };
2916
- /**
2917
- * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
2918
- *
2919
- * Specifically:
2920
- * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
2921
- * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
2922
- *
2923
- * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
2924
- */
2925
- const twJoin = (...classLists) => {
2926
- let index = 0;
2927
- let argument;
2928
- let resolvedValue;
2929
- let string = "";
2930
- while (index < classLists.length) if (argument = classLists[index++]) {
2931
- if (resolvedValue = toValue(argument)) {
2932
- string && (string += " ");
2933
- string += resolvedValue;
2934
- }
2935
- }
2936
- return string;
2937
- };
2938
- const toValue = (mix) => {
2939
- if (typeof mix === "string") return mix;
2940
- let resolvedValue;
2941
- let string = "";
2942
- for (let k = 0; k < mix.length; k++) if (mix[k]) {
2943
- if (resolvedValue = toValue(mix[k])) {
2944
- string && (string += " ");
2945
- string += resolvedValue;
2946
- }
2947
- }
2948
- return string;
2949
- };
2950
- const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
2951
- let configUtils;
2952
- let cacheGet;
2953
- let cacheSet;
2954
- let functionToCall;
2955
- const initTailwindMerge = (classList) => {
2956
- const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
2957
- configUtils = createConfigUtils(config);
2958
- cacheGet = configUtils.cache.get;
2959
- cacheSet = configUtils.cache.set;
2960
- functionToCall = tailwindMerge;
2961
- return tailwindMerge(classList);
2962
- };
2963
- const tailwindMerge = (classList) => {
2964
- const cachedResult = cacheGet(classList);
2965
- if (cachedResult) return cachedResult;
2966
- const result = mergeClassList(classList, configUtils);
2967
- cacheSet(classList, result);
2968
- return result;
2969
- };
2970
- functionToCall = initTailwindMerge;
2971
- return (...args) => functionToCall(twJoin(...args));
2972
- };
2973
- const fallbackThemeArr = [];
2974
- const fromTheme = (key) => {
2975
- const themeGetter = (theme) => theme[key] || fallbackThemeArr;
2976
- themeGetter.isThemeGetter = true;
2977
- themeGetter.themeKey = key;
2978
- return themeGetter;
2979
- };
2980
- const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
2981
- const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
2982
- const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
2983
- const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
2984
- const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
2985
- const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/;
2986
- const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
2987
- const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
2988
- const isFraction = (value) => fractionRegex.test(value);
2989
- const isNumber = (value) => !!value && !Number.isNaN(Number(value));
2990
- const isInteger = (value) => !!value && Number.isInteger(Number(value));
2991
- const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
2992
- const isTshirtSize = (value) => tshirtUnitRegex.test(value);
2993
- const isAny = () => true;
2994
- const isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
2995
- const isNever = () => false;
2996
- const isShadow = (value) => shadowRegex.test(value);
2997
- const isImage = (value) => imageRegex.test(value);
2998
- const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
2999
- const isNamedContainerQuery = (value) => value.startsWith("@container") && (value[10] === "/" && value[11] !== void 0 || value[11] === "s" && value[16] !== void 0 && value.startsWith("-size/", 10) || value[11] === "n" && value[18] !== void 0 && value.startsWith("-normal/", 10));
3000
- const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
3001
- const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
3002
- const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
3003
- const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
3004
- const isArbitraryWeight = (value) => getIsArbitraryValue(value, isLabelWeight, isAny);
3005
- const isArbitraryFamilyName = (value) => getIsArbitraryValue(value, isLabelFamilyName, isNever);
3006
- const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
3007
- const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
3008
- const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
3009
- const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
3010
- const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
3011
- const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
3012
- const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
3013
- const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
3014
- const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
3015
- const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
3016
- const isArbitraryVariableWeight = (value) => getIsArbitraryVariable(value, isLabelWeight, true);
3017
- const getIsArbitraryValue = (value, testLabel, testValue) => {
3018
- const result = arbitraryValueRegex.exec(value);
3019
- if (result) {
3020
- if (result[1]) return testLabel(result[1]);
3021
- return testValue(result[2]);
3022
- }
3023
- return false;
3024
- };
3025
- const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
3026
- const result = arbitraryVariableRegex.exec(value);
3027
- if (result) {
3028
- if (result[1]) return testLabel(result[1]);
3029
- return shouldMatchNoLabel;
3030
- }
3031
- return false;
3032
- };
3033
- const isLabelPosition = (label) => label === "position" || label === "percentage";
3034
- const isLabelImage = (label) => label === "image" || label === "url";
3035
- const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
3036
- const isLabelLength = (label) => label === "length";
3037
- const isLabelNumber = (label) => label === "number";
3038
- const isLabelFamilyName = (label) => label === "family-name";
3039
- const isLabelWeight = (label) => label === "number" || label === "weight";
3040
- const isLabelShadow = (label) => label === "shadow";
3041
- const getDefaultConfig = () => {
3042
- /**
3043
- * Theme getters for theme variable namespaces
3044
- * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
3045
- */
3046
- const themeColor = fromTheme("color");
3047
- const themeFont = fromTheme("font");
3048
- const themeText = fromTheme("text");
3049
- const themeFontWeight = fromTheme("font-weight");
3050
- const themeTracking = fromTheme("tracking");
3051
- const themeLeading = fromTheme("leading");
3052
- const themeBreakpoint = fromTheme("breakpoint");
3053
- const themeContainer = fromTheme("container");
3054
- const themeSpacing = fromTheme("spacing");
3055
- const themeRadius = fromTheme("radius");
3056
- const themeShadow = fromTheme("shadow");
3057
- const themeInsetShadow = fromTheme("inset-shadow");
3058
- const themeTextShadow = fromTheme("text-shadow");
3059
- const themeDropShadow = fromTheme("drop-shadow");
3060
- const themeBlur = fromTheme("blur");
3061
- const themePerspective = fromTheme("perspective");
3062
- const themeAspect = fromTheme("aspect");
3063
- const themeEase = fromTheme("ease");
3064
- const themeAnimate = fromTheme("animate");
3065
- /**
3066
- * Helpers to avoid repeating the same scales
3067
- *
3068
- * We use functions that create a new array every time they're called instead of static arrays.
3069
- * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
3070
- */
3071
- const scaleBreak = () => [
3072
- "auto",
3073
- "avoid",
3074
- "all",
3075
- "avoid-page",
3076
- "page",
3077
- "left",
3078
- "right",
3079
- "column"
3080
- ];
3081
- const scalePosition = () => [
3082
- "center",
3083
- "top",
3084
- "bottom",
3085
- "left",
3086
- "right",
3087
- "top-left",
3088
- "left-top",
3089
- "top-right",
3090
- "right-top",
3091
- "bottom-right",
3092
- "right-bottom",
3093
- "bottom-left",
3094
- "left-bottom"
3095
- ];
3096
- const scalePositionWithArbitrary = () => [
3097
- ...scalePosition(),
3098
- isArbitraryVariable,
3099
- isArbitraryValue
3100
- ];
3101
- const scaleOverflow = () => [
3102
- "auto",
3103
- "hidden",
3104
- "clip",
3105
- "visible",
3106
- "scroll"
3107
- ];
3108
- const scaleOverscroll = () => [
3109
- "auto",
3110
- "contain",
3111
- "none"
3112
- ];
3113
- const scaleUnambiguousSpacing = () => [
3114
- isArbitraryVariable,
3115
- isArbitraryValue,
3116
- themeSpacing
3117
- ];
3118
- const scaleInset = () => [
3119
- isFraction,
3120
- "full",
3121
- "auto",
3122
- ...scaleUnambiguousSpacing()
3123
- ];
3124
- const scaleGridTemplateColsRows = () => [
3125
- isInteger,
3126
- "none",
3127
- "subgrid",
3128
- isArbitraryVariable,
3129
- isArbitraryValue
3130
- ];
3131
- const scaleGridColRowStartAndEnd = () => [
3132
- "auto",
3133
- { span: [
3134
- "full",
3135
- isInteger,
3136
- isArbitraryVariable,
3137
- isArbitraryValue
3138
- ] },
3139
- isInteger,
3140
- isArbitraryVariable,
3141
- isArbitraryValue
3142
- ];
3143
- const scaleGridColRowStartOrEnd = () => [
3144
- isInteger,
3145
- "auto",
3146
- isArbitraryVariable,
3147
- isArbitraryValue
3148
- ];
3149
- const scaleGridAutoColsRows = () => [
3150
- "auto",
3151
- "min",
3152
- "max",
3153
- "fr",
3154
- isArbitraryVariable,
3155
- isArbitraryValue
3156
- ];
3157
- const scaleAlignPrimaryAxis = () => [
3158
- "start",
3159
- "end",
3160
- "center",
3161
- "between",
3162
- "around",
3163
- "evenly",
3164
- "stretch",
3165
- "baseline",
3166
- "center-safe",
3167
- "end-safe"
3168
- ];
3169
- const scaleAlignSecondaryAxis = () => [
3170
- "start",
3171
- "end",
3172
- "center",
3173
- "stretch",
3174
- "center-safe",
3175
- "end-safe"
3176
- ];
3177
- const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
3178
- const scaleSizing = () => [
3179
- isFraction,
3180
- "auto",
3181
- "full",
3182
- "dvw",
3183
- "dvh",
3184
- "lvw",
3185
- "lvh",
3186
- "svw",
3187
- "svh",
3188
- "min",
3189
- "max",
3190
- "fit",
3191
- ...scaleUnambiguousSpacing()
3192
- ];
3193
- const scaleSizingInline = () => [
3194
- themeContainer,
3195
- isFraction,
3196
- "screen",
3197
- "full",
3198
- "dvw",
3199
- "lvw",
3200
- "svw",
3201
- "min",
3202
- "max",
3203
- "fit",
3204
- ...scaleUnambiguousSpacing()
3205
- ];
3206
- const scaleSizingBlock = () => [
3207
- isFraction,
3208
- "screen",
3209
- "full",
3210
- "lh",
3211
- "dvh",
3212
- "lvh",
3213
- "svh",
3214
- "min",
3215
- "max",
3216
- "fit",
3217
- ...scaleUnambiguousSpacing()
3218
- ];
3219
- const scaleColor = () => [
3220
- themeColor,
3221
- isArbitraryVariable,
3222
- isArbitraryValue
3223
- ];
3224
- const scaleBgPosition = () => [
3225
- ...scalePosition(),
3226
- isArbitraryVariablePosition,
3227
- isArbitraryPosition,
3228
- { position: [isArbitraryVariable, isArbitraryValue] }
3229
- ];
3230
- const scaleBgRepeat = () => ["no-repeat", { repeat: [
3231
- "",
3232
- "x",
3233
- "y",
3234
- "space",
3235
- "round"
3236
- ] }];
3237
- const scaleBgSize = () => [
3238
- "auto",
3239
- "cover",
3240
- "contain",
3241
- isArbitraryVariableSize,
3242
- isArbitrarySize,
3243
- { size: [isArbitraryVariable, isArbitraryValue] }
3244
- ];
3245
- const scaleGradientStopPosition = () => [
3246
- isPercent,
3247
- isArbitraryVariableLength,
3248
- isArbitraryLength
3249
- ];
3250
- const scaleRadius = () => [
3251
- "",
3252
- "none",
3253
- "full",
3254
- themeRadius,
3255
- isArbitraryVariable,
3256
- isArbitraryValue
3257
- ];
3258
- const scaleBorderWidth = () => [
3259
- "",
3260
- isNumber,
3261
- isArbitraryVariableLength,
3262
- isArbitraryLength
3263
- ];
3264
- const scaleLineStyle = () => [
3265
- "solid",
3266
- "dashed",
3267
- "dotted",
3268
- "double"
3269
- ];
3270
- const scaleBlendMode = () => [
3271
- "normal",
3272
- "multiply",
3273
- "screen",
3274
- "overlay",
3275
- "darken",
3276
- "lighten",
3277
- "color-dodge",
3278
- "color-burn",
3279
- "hard-light",
3280
- "soft-light",
3281
- "difference",
3282
- "exclusion",
3283
- "hue",
3284
- "saturation",
3285
- "color",
3286
- "luminosity"
3287
- ];
3288
- const scaleMaskImagePosition = () => [
3289
- isNumber,
3290
- isPercent,
3291
- isArbitraryVariablePosition,
3292
- isArbitraryPosition
3293
- ];
3294
- const scaleBlur = () => [
3295
- "",
3296
- "none",
3297
- themeBlur,
3298
- isArbitraryVariable,
3299
- isArbitraryValue
3300
- ];
3301
- const scaleRotate = () => [
3302
- "none",
3303
- isNumber,
3304
- isArbitraryVariable,
3305
- isArbitraryValue
3306
- ];
3307
- const scaleScale = () => [
3308
- "none",
3309
- isNumber,
3310
- isArbitraryVariable,
3311
- isArbitraryValue
3312
- ];
3313
- const scaleSkew = () => [
3314
- isNumber,
3315
- isArbitraryVariable,
3316
- isArbitraryValue
3317
- ];
3318
- const scaleTranslate = () => [
3319
- isFraction,
3320
- "full",
3321
- ...scaleUnambiguousSpacing()
3322
- ];
3323
- return {
3324
- cacheSize: 500,
3325
- theme: {
3326
- animate: [
3327
- "spin",
3328
- "ping",
3329
- "pulse",
3330
- "bounce"
3331
- ],
3332
- aspect: ["video"],
3333
- blur: [isTshirtSize],
3334
- breakpoint: [isTshirtSize],
3335
- color: [isAny],
3336
- container: [isTshirtSize],
3337
- "drop-shadow": [isTshirtSize],
3338
- ease: [
3339
- "in",
3340
- "out",
3341
- "in-out"
3342
- ],
3343
- font: [isAnyNonArbitrary],
3344
- "font-weight": [
3345
- "thin",
3346
- "extralight",
3347
- "light",
3348
- "normal",
3349
- "medium",
3350
- "semibold",
3351
- "bold",
3352
- "extrabold",
3353
- "black"
3354
- ],
3355
- "inset-shadow": [isTshirtSize],
3356
- leading: [
3357
- "none",
3358
- "tight",
3359
- "snug",
3360
- "normal",
3361
- "relaxed",
3362
- "loose"
3363
- ],
3364
- perspective: [
3365
- "dramatic",
3366
- "near",
3367
- "normal",
3368
- "midrange",
3369
- "distant",
3370
- "none"
3371
- ],
3372
- radius: [isTshirtSize],
3373
- shadow: [isTshirtSize],
3374
- spacing: ["px", isNumber],
3375
- text: [isTshirtSize],
3376
- "text-shadow": [isTshirtSize],
3377
- tracking: [
3378
- "tighter",
3379
- "tight",
3380
- "normal",
3381
- "wide",
3382
- "wider",
3383
- "widest"
3384
- ]
3385
- },
3386
- classGroups: {
3387
- /**
3388
- * Aspect Ratio
3389
- * @see https://tailwindcss.com/docs/aspect-ratio
3390
- */
3391
- aspect: [{ aspect: [
3392
- "auto",
3393
- "square",
3394
- isFraction,
3395
- isArbitraryValue,
3396
- isArbitraryVariable,
3397
- themeAspect
3398
- ] }],
3399
- /**
3400
- * Container
3401
- * @see https://tailwindcss.com/docs/container
3402
- * @deprecated since Tailwind CSS v4.0.0
3403
- */
3404
- container: ["container"],
3405
- /**
3406
- * Container Type
3407
- * @see https://tailwindcss.com/docs/responsive-design#container-queries
3408
- */
3409
- "container-type": [{ "@container": [
3410
- "",
3411
- "normal",
3412
- "size",
3413
- isArbitraryVariable,
3414
- isArbitraryValue
3415
- ] }],
3416
- /**
3417
- * Container Name
3418
- * @see https://tailwindcss.com/docs/responsive-design#named-containers
3419
- */
3420
- "container-named": [isNamedContainerQuery],
3421
- /**
3422
- * Columns
3423
- * @see https://tailwindcss.com/docs/columns
3424
- */
3425
- columns: [{ columns: [
3426
- isNumber,
3427
- "auto",
3428
- isArbitraryValue,
3429
- isArbitraryVariable,
3430
- themeContainer
3431
- ] }],
3432
- /**
3433
- * Break After
3434
- * @see https://tailwindcss.com/docs/break-after
3435
- */
3436
- "break-after": [{ "break-after": scaleBreak() }],
3437
- /**
3438
- * Break Before
3439
- * @see https://tailwindcss.com/docs/break-before
3440
- */
3441
- "break-before": [{ "break-before": scaleBreak() }],
3442
- /**
3443
- * Break Inside
3444
- * @see https://tailwindcss.com/docs/break-inside
3445
- */
3446
- "break-inside": [{ "break-inside": [
3447
- "auto",
3448
- "avoid",
3449
- "avoid-page",
3450
- "avoid-column"
3451
- ] }],
3452
- /**
3453
- * Box Decoration Break
3454
- * @see https://tailwindcss.com/docs/box-decoration-break
3455
- */
3456
- "box-decoration": [{ "box-decoration": ["slice", "clone"] }],
3457
- /**
3458
- * Box Sizing
3459
- * @see https://tailwindcss.com/docs/box-sizing
3460
- */
3461
- box: [{ box: ["border", "content"] }],
3462
- /**
3463
- * Display
3464
- * @see https://tailwindcss.com/docs/display
3465
- */
3466
- display: [
3467
- "block",
3468
- "inline-block",
3469
- "inline",
3470
- "flex",
3471
- "inline-flex",
3472
- "table",
3473
- "inline-table",
3474
- "table-caption",
3475
- "table-cell",
3476
- "table-column",
3477
- "table-column-group",
3478
- "table-footer-group",
3479
- "table-header-group",
3480
- "table-row-group",
3481
- "table-row",
3482
- "flow-root",
3483
- "grid",
3484
- "inline-grid",
3485
- "contents",
3486
- "list-item",
3487
- "hidden"
3488
- ],
3489
- /**
3490
- * Screen Reader Only
3491
- * @see https://tailwindcss.com/docs/display#screen-reader-only
3492
- */
3493
- sr: ["sr-only", "not-sr-only"],
3494
- /**
3495
- * Floats
3496
- * @see https://tailwindcss.com/docs/float
3497
- */
3498
- float: [{ float: [
3499
- "right",
3500
- "left",
3501
- "none",
3502
- "start",
3503
- "end"
3504
- ] }],
3505
- /**
3506
- * Clear
3507
- * @see https://tailwindcss.com/docs/clear
3508
- */
3509
- clear: [{ clear: [
3510
- "left",
3511
- "right",
3512
- "both",
3513
- "none",
3514
- "start",
3515
- "end"
3516
- ] }],
3517
- /**
3518
- * Isolation
3519
- * @see https://tailwindcss.com/docs/isolation
3520
- */
3521
- isolation: ["isolate", "isolation-auto"],
3522
- /**
3523
- * Object Fit
3524
- * @see https://tailwindcss.com/docs/object-fit
3525
- */
3526
- "object-fit": [{ object: [
3527
- "contain",
3528
- "cover",
3529
- "fill",
3530
- "none",
3531
- "scale-down"
3532
- ] }],
3533
- /**
3534
- * Object Position
3535
- * @see https://tailwindcss.com/docs/object-position
3536
- */
3537
- "object-position": [{ object: scalePositionWithArbitrary() }],
3538
- /**
3539
- * Overflow
3540
- * @see https://tailwindcss.com/docs/overflow
3541
- */
3542
- overflow: [{ overflow: scaleOverflow() }],
3543
- /**
3544
- * Overflow X
3545
- * @see https://tailwindcss.com/docs/overflow
3546
- */
3547
- "overflow-x": [{ "overflow-x": scaleOverflow() }],
3548
- /**
3549
- * Overflow Y
3550
- * @see https://tailwindcss.com/docs/overflow
3551
- */
3552
- "overflow-y": [{ "overflow-y": scaleOverflow() }],
3553
- /**
3554
- * Overscroll Behavior
3555
- * @see https://tailwindcss.com/docs/overscroll-behavior
3556
- */
3557
- overscroll: [{ overscroll: scaleOverscroll() }],
3558
- /**
3559
- * Overscroll Behavior X
3560
- * @see https://tailwindcss.com/docs/overscroll-behavior
3561
- */
3562
- "overscroll-x": [{ "overscroll-x": scaleOverscroll() }],
3563
- /**
3564
- * Overscroll Behavior Y
3565
- * @see https://tailwindcss.com/docs/overscroll-behavior
3566
- */
3567
- "overscroll-y": [{ "overscroll-y": scaleOverscroll() }],
3568
- /**
3569
- * Position
3570
- * @see https://tailwindcss.com/docs/position
3571
- */
3572
- position: [
3573
- "static",
3574
- "fixed",
3575
- "absolute",
3576
- "relative",
3577
- "sticky"
3578
- ],
3579
- /**
3580
- * Inset
3581
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3582
- */
3583
- inset: [{ inset: scaleInset() }],
3584
- /**
3585
- * Inset Inline
3586
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3587
- */
3588
- "inset-x": [{ "inset-x": scaleInset() }],
3589
- /**
3590
- * Inset Block
3591
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3592
- */
3593
- "inset-y": [{ "inset-y": scaleInset() }],
3594
- /**
3595
- * Inset Inline Start
3596
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3597
- * @todo class group will be renamed to `inset-s` in next major release
3598
- */
3599
- start: [{
3600
- "inset-s": scaleInset(),
3601
- /**
3602
- * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
3603
- * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
3604
- */
3605
- start: scaleInset()
3606
- }],
3607
- /**
3608
- * Inset Inline End
3609
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3610
- * @todo class group will be renamed to `inset-e` in next major release
3611
- */
3612
- end: [{
3613
- "inset-e": scaleInset(),
3614
- /**
3615
- * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
3616
- * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
3617
- */
3618
- end: scaleInset()
3619
- }],
3620
- /**
3621
- * Inset Block Start
3622
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3623
- */
3624
- "inset-bs": [{ "inset-bs": scaleInset() }],
3625
- /**
3626
- * Inset Block End
3627
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3628
- */
3629
- "inset-be": [{ "inset-be": scaleInset() }],
3630
- /**
3631
- * Top
3632
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3633
- */
3634
- top: [{ top: scaleInset() }],
3635
- /**
3636
- * Right
3637
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3638
- */
3639
- right: [{ right: scaleInset() }],
3640
- /**
3641
- * Bottom
3642
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3643
- */
3644
- bottom: [{ bottom: scaleInset() }],
3645
- /**
3646
- * Left
3647
- * @see https://tailwindcss.com/docs/top-right-bottom-left
3648
- */
3649
- left: [{ left: scaleInset() }],
3650
- /**
3651
- * Visibility
3652
- * @see https://tailwindcss.com/docs/visibility
3653
- */
3654
- visibility: [
3655
- "visible",
3656
- "invisible",
3657
- "collapse"
3658
- ],
3659
- /**
3660
- * Z-Index
3661
- * @see https://tailwindcss.com/docs/z-index
3662
- */
3663
- z: [{ z: [
3664
- isInteger,
3665
- "auto",
3666
- isArbitraryVariable,
3667
- isArbitraryValue
3668
- ] }],
3669
- /**
3670
- * Flex Basis
3671
- * @see https://tailwindcss.com/docs/flex-basis
3672
- */
3673
- basis: [{ basis: [
3674
- isFraction,
3675
- "full",
3676
- "auto",
3677
- themeContainer,
3678
- ...scaleUnambiguousSpacing()
3679
- ] }],
3680
- /**
3681
- * Flex Direction
3682
- * @see https://tailwindcss.com/docs/flex-direction
3683
- */
3684
- "flex-direction": [{ flex: [
3685
- "row",
3686
- "row-reverse",
3687
- "col",
3688
- "col-reverse"
3689
- ] }],
3690
- /**
3691
- * Flex Wrap
3692
- * @see https://tailwindcss.com/docs/flex-wrap
3693
- */
3694
- "flex-wrap": [{ flex: [
3695
- "nowrap",
3696
- "wrap",
3697
- "wrap-reverse"
3698
- ] }],
3699
- /**
3700
- * Flex
3701
- * @see https://tailwindcss.com/docs/flex
3702
- */
3703
- flex: [{ flex: [
3704
- isNumber,
3705
- isFraction,
3706
- "auto",
3707
- "initial",
3708
- "none",
3709
- isArbitraryValue
3710
- ] }],
3711
- /**
3712
- * Flex Grow
3713
- * @see https://tailwindcss.com/docs/flex-grow
3714
- */
3715
- grow: [{ grow: [
3716
- "",
3717
- isNumber,
3718
- isArbitraryVariable,
3719
- isArbitraryValue
3720
- ] }],
3721
- /**
3722
- * Flex Shrink
3723
- * @see https://tailwindcss.com/docs/flex-shrink
3724
- */
3725
- shrink: [{ shrink: [
3726
- "",
3727
- isNumber,
3728
- isArbitraryVariable,
3729
- isArbitraryValue
3730
- ] }],
3731
- /**
3732
- * Order
3733
- * @see https://tailwindcss.com/docs/order
3734
- */
3735
- order: [{ order: [
3736
- isInteger,
3737
- "first",
3738
- "last",
3739
- "none",
3740
- isArbitraryVariable,
3741
- isArbitraryValue
3742
- ] }],
3743
- /**
3744
- * Grid Template Columns
3745
- * @see https://tailwindcss.com/docs/grid-template-columns
3746
- */
3747
- "grid-cols": [{ "grid-cols": scaleGridTemplateColsRows() }],
3748
- /**
3749
- * Grid Column Start / End
3750
- * @see https://tailwindcss.com/docs/grid-column
3751
- */
3752
- "col-start-end": [{ col: scaleGridColRowStartAndEnd() }],
3753
- /**
3754
- * Grid Column Start
3755
- * @see https://tailwindcss.com/docs/grid-column
3756
- */
3757
- "col-start": [{ "col-start": scaleGridColRowStartOrEnd() }],
3758
- /**
3759
- * Grid Column End
3760
- * @see https://tailwindcss.com/docs/grid-column
3761
- */
3762
- "col-end": [{ "col-end": scaleGridColRowStartOrEnd() }],
3763
- /**
3764
- * Grid Template Rows
3765
- * @see https://tailwindcss.com/docs/grid-template-rows
3766
- */
3767
- "grid-rows": [{ "grid-rows": scaleGridTemplateColsRows() }],
3768
- /**
3769
- * Grid Row Start / End
3770
- * @see https://tailwindcss.com/docs/grid-row
3771
- */
3772
- "row-start-end": [{ row: scaleGridColRowStartAndEnd() }],
3773
- /**
3774
- * Grid Row Start
3775
- * @see https://tailwindcss.com/docs/grid-row
3776
- */
3777
- "row-start": [{ "row-start": scaleGridColRowStartOrEnd() }],
3778
- /**
3779
- * Grid Row End
3780
- * @see https://tailwindcss.com/docs/grid-row
3781
- */
3782
- "row-end": [{ "row-end": scaleGridColRowStartOrEnd() }],
3783
- /**
3784
- * Grid Auto Flow
3785
- * @see https://tailwindcss.com/docs/grid-auto-flow
3786
- */
3787
- "grid-flow": [{ "grid-flow": [
3788
- "row",
3789
- "col",
3790
- "dense",
3791
- "row-dense",
3792
- "col-dense"
3793
- ] }],
3794
- /**
3795
- * Grid Auto Columns
3796
- * @see https://tailwindcss.com/docs/grid-auto-columns
3797
- */
3798
- "auto-cols": [{ "auto-cols": scaleGridAutoColsRows() }],
3799
- /**
3800
- * Grid Auto Rows
3801
- * @see https://tailwindcss.com/docs/grid-auto-rows
3802
- */
3803
- "auto-rows": [{ "auto-rows": scaleGridAutoColsRows() }],
3804
- /**
3805
- * Gap
3806
- * @see https://tailwindcss.com/docs/gap
3807
- */
3808
- gap: [{ gap: scaleUnambiguousSpacing() }],
3809
- /**
3810
- * Gap X
3811
- * @see https://tailwindcss.com/docs/gap
3812
- */
3813
- "gap-x": [{ "gap-x": scaleUnambiguousSpacing() }],
3814
- /**
3815
- * Gap Y
3816
- * @see https://tailwindcss.com/docs/gap
3817
- */
3818
- "gap-y": [{ "gap-y": scaleUnambiguousSpacing() }],
3819
- /**
3820
- * Justify Content
3821
- * @see https://tailwindcss.com/docs/justify-content
3822
- */
3823
- "justify-content": [{ justify: [...scaleAlignPrimaryAxis(), "normal"] }],
3824
- /**
3825
- * Justify Items
3826
- * @see https://tailwindcss.com/docs/justify-items
3827
- */
3828
- "justify-items": [{ "justify-items": [...scaleAlignSecondaryAxis(), "normal"] }],
3829
- /**
3830
- * Justify Self
3831
- * @see https://tailwindcss.com/docs/justify-self
3832
- */
3833
- "justify-self": [{ "justify-self": ["auto", ...scaleAlignSecondaryAxis()] }],
3834
- /**
3835
- * Align Content
3836
- * @see https://tailwindcss.com/docs/align-content
3837
- */
3838
- "align-content": [{ content: ["normal", ...scaleAlignPrimaryAxis()] }],
3839
- /**
3840
- * Align Items
3841
- * @see https://tailwindcss.com/docs/align-items
3842
- */
3843
- "align-items": [{ items: [...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }],
3844
- /**
3845
- * Align Self
3846
- * @see https://tailwindcss.com/docs/align-self
3847
- */
3848
- "align-self": [{ self: [
3849
- "auto",
3850
- ...scaleAlignSecondaryAxis(),
3851
- { baseline: ["", "last"] }
3852
- ] }],
3853
- /**
3854
- * Place Content
3855
- * @see https://tailwindcss.com/docs/place-content
3856
- */
3857
- "place-content": [{ "place-content": scaleAlignPrimaryAxis() }],
3858
- /**
3859
- * Place Items
3860
- * @see https://tailwindcss.com/docs/place-items
3861
- */
3862
- "place-items": [{ "place-items": [...scaleAlignSecondaryAxis(), "baseline"] }],
3863
- /**
3864
- * Place Self
3865
- * @see https://tailwindcss.com/docs/place-self
3866
- */
3867
- "place-self": [{ "place-self": ["auto", ...scaleAlignSecondaryAxis()] }],
3868
- /**
3869
- * Padding
3870
- * @see https://tailwindcss.com/docs/padding
3871
- */
3872
- p: [{ p: scaleUnambiguousSpacing() }],
3873
- /**
3874
- * Padding Inline
3875
- * @see https://tailwindcss.com/docs/padding
3876
- */
3877
- px: [{ px: scaleUnambiguousSpacing() }],
3878
- /**
3879
- * Padding Block
3880
- * @see https://tailwindcss.com/docs/padding
3881
- */
3882
- py: [{ py: scaleUnambiguousSpacing() }],
3883
- /**
3884
- * Padding Inline Start
3885
- * @see https://tailwindcss.com/docs/padding
3886
- */
3887
- ps: [{ ps: scaleUnambiguousSpacing() }],
3888
- /**
3889
- * Padding Inline End
3890
- * @see https://tailwindcss.com/docs/padding
3891
- */
3892
- pe: [{ pe: scaleUnambiguousSpacing() }],
3893
- /**
3894
- * Padding Block Start
3895
- * @see https://tailwindcss.com/docs/padding
3896
- */
3897
- pbs: [{ pbs: scaleUnambiguousSpacing() }],
3898
- /**
3899
- * Padding Block End
3900
- * @see https://tailwindcss.com/docs/padding
3901
- */
3902
- pbe: [{ pbe: scaleUnambiguousSpacing() }],
3903
- /**
3904
- * Padding Top
3905
- * @see https://tailwindcss.com/docs/padding
3906
- */
3907
- pt: [{ pt: scaleUnambiguousSpacing() }],
3908
- /**
3909
- * Padding Right
3910
- * @see https://tailwindcss.com/docs/padding
3911
- */
3912
- pr: [{ pr: scaleUnambiguousSpacing() }],
3913
- /**
3914
- * Padding Bottom
3915
- * @see https://tailwindcss.com/docs/padding
3916
- */
3917
- pb: [{ pb: scaleUnambiguousSpacing() }],
3918
- /**
3919
- * Padding Left
3920
- * @see https://tailwindcss.com/docs/padding
3921
- */
3922
- pl: [{ pl: scaleUnambiguousSpacing() }],
3923
- /**
3924
- * Margin
3925
- * @see https://tailwindcss.com/docs/margin
3926
- */
3927
- m: [{ m: scaleMargin() }],
3928
- /**
3929
- * Margin Inline
3930
- * @see https://tailwindcss.com/docs/margin
3931
- */
3932
- mx: [{ mx: scaleMargin() }],
3933
- /**
3934
- * Margin Block
3935
- * @see https://tailwindcss.com/docs/margin
3936
- */
3937
- my: [{ my: scaleMargin() }],
3938
- /**
3939
- * Margin Inline Start
3940
- * @see https://tailwindcss.com/docs/margin
3941
- */
3942
- ms: [{ ms: scaleMargin() }],
3943
- /**
3944
- * Margin Inline End
3945
- * @see https://tailwindcss.com/docs/margin
3946
- */
3947
- me: [{ me: scaleMargin() }],
3948
- /**
3949
- * Margin Block Start
3950
- * @see https://tailwindcss.com/docs/margin
3951
- */
3952
- mbs: [{ mbs: scaleMargin() }],
3953
- /**
3954
- * Margin Block End
3955
- * @see https://tailwindcss.com/docs/margin
3956
- */
3957
- mbe: [{ mbe: scaleMargin() }],
3958
- /**
3959
- * Margin Top
3960
- * @see https://tailwindcss.com/docs/margin
3961
- */
3962
- mt: [{ mt: scaleMargin() }],
3963
- /**
3964
- * Margin Right
3965
- * @see https://tailwindcss.com/docs/margin
3966
- */
3967
- mr: [{ mr: scaleMargin() }],
3968
- /**
3969
- * Margin Bottom
3970
- * @see https://tailwindcss.com/docs/margin
3971
- */
3972
- mb: [{ mb: scaleMargin() }],
3973
- /**
3974
- * Margin Left
3975
- * @see https://tailwindcss.com/docs/margin
3976
- */
3977
- ml: [{ ml: scaleMargin() }],
3978
- /**
3979
- * Space Between X
3980
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3981
- */
3982
- "space-x": [{ "space-x": scaleUnambiguousSpacing() }],
3983
- /**
3984
- * Space Between X Reverse
3985
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3986
- */
3987
- "space-x-reverse": ["space-x-reverse"],
3988
- /**
3989
- * Space Between Y
3990
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3991
- */
3992
- "space-y": [{ "space-y": scaleUnambiguousSpacing() }],
3993
- /**
3994
- * Space Between Y Reverse
3995
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3996
- */
3997
- "space-y-reverse": ["space-y-reverse"],
3998
- /**
3999
- * Size
4000
- * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
4001
- */
4002
- size: [{ size: scaleSizing() }],
4003
- /**
4004
- * Inline Size
4005
- * @see https://tailwindcss.com/docs/inline-size
4006
- */
4007
- "inline-size": [{ inline: ["auto", ...scaleSizingInline()] }],
4008
- /**
4009
- * Min-Inline Size
4010
- * @see https://tailwindcss.com/docs/min-inline-size
4011
- */
4012
- "min-inline-size": [{ "min-inline": ["auto", ...scaleSizingInline()] }],
4013
- /**
4014
- * Max-Inline Size
4015
- * @see https://tailwindcss.com/docs/max-inline-size
4016
- */
4017
- "max-inline-size": [{ "max-inline": ["none", ...scaleSizingInline()] }],
4018
- /**
4019
- * Block Size
4020
- * @see https://tailwindcss.com/docs/block-size
4021
- */
4022
- "block-size": [{ block: ["auto", ...scaleSizingBlock()] }],
4023
- /**
4024
- * Min-Block Size
4025
- * @see https://tailwindcss.com/docs/min-block-size
4026
- */
4027
- "min-block-size": [{ "min-block": ["auto", ...scaleSizingBlock()] }],
4028
- /**
4029
- * Max-Block Size
4030
- * @see https://tailwindcss.com/docs/max-block-size
4031
- */
4032
- "max-block-size": [{ "max-block": ["none", ...scaleSizingBlock()] }],
4033
- /**
4034
- * Width
4035
- * @see https://tailwindcss.com/docs/width
4036
- */
4037
- w: [{ w: [
4038
- themeContainer,
4039
- "screen",
4040
- ...scaleSizing()
4041
- ] }],
4042
- /**
4043
- * Min-Width
4044
- * @see https://tailwindcss.com/docs/min-width
4045
- */
4046
- "min-w": [{ "min-w": [
4047
- themeContainer,
4048
- "screen",
4049
- "none",
4050
- ...scaleSizing()
4051
- ] }],
4052
- /**
4053
- * Max-Width
4054
- * @see https://tailwindcss.com/docs/max-width
4055
- */
4056
- "max-w": [{ "max-w": [
4057
- themeContainer,
4058
- "screen",
4059
- "none",
4060
- "prose",
4061
- { screen: [themeBreakpoint] },
4062
- ...scaleSizing()
4063
- ] }],
4064
- /**
4065
- * Height
4066
- * @see https://tailwindcss.com/docs/height
4067
- */
4068
- h: [{ h: [
4069
- "screen",
4070
- "lh",
4071
- ...scaleSizing()
4072
- ] }],
4073
- /**
4074
- * Min-Height
4075
- * @see https://tailwindcss.com/docs/min-height
4076
- */
4077
- "min-h": [{ "min-h": [
4078
- "screen",
4079
- "lh",
4080
- "none",
4081
- ...scaleSizing()
4082
- ] }],
4083
- /**
4084
- * Max-Height
4085
- * @see https://tailwindcss.com/docs/max-height
4086
- */
4087
- "max-h": [{ "max-h": [
4088
- "screen",
4089
- "lh",
4090
- "none",
4091
- ...scaleSizing()
4092
- ] }],
4093
- /**
4094
- * Font Size
4095
- * @see https://tailwindcss.com/docs/font-size
4096
- */
4097
- "font-size": [{ text: [
4098
- "base",
4099
- themeText,
4100
- isArbitraryVariableLength,
4101
- isArbitraryLength
4102
- ] }],
4103
- /**
4104
- * Font Smoothing
4105
- * @see https://tailwindcss.com/docs/font-smoothing
4106
- */
4107
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
4108
- /**
4109
- * Font Style
4110
- * @see https://tailwindcss.com/docs/font-style
4111
- */
4112
- "font-style": ["italic", "not-italic"],
4113
- /**
4114
- * Font Weight
4115
- * @see https://tailwindcss.com/docs/font-weight
4116
- */
4117
- "font-weight": [{ font: [
4118
- themeFontWeight,
4119
- isArbitraryVariableWeight,
4120
- isArbitraryWeight
4121
- ] }],
4122
- /**
4123
- * Font Stretch
4124
- * @see https://tailwindcss.com/docs/font-stretch
4125
- */
4126
- "font-stretch": [{ "font-stretch": [
4127
- "ultra-condensed",
4128
- "extra-condensed",
4129
- "condensed",
4130
- "semi-condensed",
4131
- "normal",
4132
- "semi-expanded",
4133
- "expanded",
4134
- "extra-expanded",
4135
- "ultra-expanded",
4136
- isPercent,
4137
- isArbitraryValue
4138
- ] }],
4139
- /**
4140
- * Font Family
4141
- * @see https://tailwindcss.com/docs/font-family
4142
- */
4143
- "font-family": [{ font: [
4144
- isArbitraryVariableFamilyName,
4145
- isArbitraryFamilyName,
4146
- themeFont
4147
- ] }],
4148
- /**
4149
- * Font Feature Settings
4150
- * @see https://tailwindcss.com/docs/font-feature-settings
4151
- */
4152
- "font-features": [{ "font-features": [isArbitraryValue] }],
4153
- /**
4154
- * Font Variant Numeric
4155
- * @see https://tailwindcss.com/docs/font-variant-numeric
4156
- */
4157
- "fvn-normal": ["normal-nums"],
4158
- /**
4159
- * Font Variant Numeric
4160
- * @see https://tailwindcss.com/docs/font-variant-numeric
4161
- */
4162
- "fvn-ordinal": ["ordinal"],
4163
- /**
4164
- * Font Variant Numeric
4165
- * @see https://tailwindcss.com/docs/font-variant-numeric
4166
- */
4167
- "fvn-slashed-zero": ["slashed-zero"],
4168
- /**
4169
- * Font Variant Numeric
4170
- * @see https://tailwindcss.com/docs/font-variant-numeric
4171
- */
4172
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
4173
- /**
4174
- * Font Variant Numeric
4175
- * @see https://tailwindcss.com/docs/font-variant-numeric
4176
- */
4177
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
4178
- /**
4179
- * Font Variant Numeric
4180
- * @see https://tailwindcss.com/docs/font-variant-numeric
4181
- */
4182
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
4183
- /**
4184
- * Letter Spacing
4185
- * @see https://tailwindcss.com/docs/letter-spacing
4186
- */
4187
- tracking: [{ tracking: [
4188
- themeTracking,
4189
- isArbitraryVariable,
4190
- isArbitraryValue
4191
- ] }],
4192
- /**
4193
- * Line Clamp
4194
- * @see https://tailwindcss.com/docs/line-clamp
4195
- */
4196
- "line-clamp": [{ "line-clamp": [
4197
- isNumber,
4198
- "none",
4199
- isArbitraryVariable,
4200
- isArbitraryNumber
4201
- ] }],
4202
- /**
4203
- * Line Height
4204
- * @see https://tailwindcss.com/docs/line-height
4205
- */
4206
- leading: [{ leading: [
4207
- "none",
4208
- themeLeading,
4209
- ...scaleUnambiguousSpacing()
4210
- ] }],
4211
- /**
4212
- * List Style Image
4213
- * @see https://tailwindcss.com/docs/list-style-image
4214
- */
4215
- "list-image": [{ "list-image": [
4216
- "none",
4217
- isArbitraryVariable,
4218
- isArbitraryValue
4219
- ] }],
4220
- /**
4221
- * List Style Position
4222
- * @see https://tailwindcss.com/docs/list-style-position
4223
- */
4224
- "list-style-position": [{ list: ["inside", "outside"] }],
4225
- /**
4226
- * List Style Type
4227
- * @see https://tailwindcss.com/docs/list-style-type
4228
- */
4229
- "list-style-type": [{ list: [
4230
- "disc",
4231
- "decimal",
4232
- "none",
4233
- isArbitraryVariable,
4234
- isArbitraryValue
4235
- ] }],
4236
- /**
4237
- * Text Alignment
4238
- * @see https://tailwindcss.com/docs/text-align
4239
- */
4240
- "text-alignment": [{ text: [
4241
- "left",
4242
- "center",
4243
- "right",
4244
- "justify",
4245
- "start",
4246
- "end"
4247
- ] }],
4248
- /**
4249
- * Placeholder Color
4250
- * @deprecated since Tailwind CSS v3.0.0
4251
- * @see https://v3.tailwindcss.com/docs/placeholder-color
4252
- */
4253
- "placeholder-color": [{ placeholder: scaleColor() }],
4254
- /**
4255
- * Text Color
4256
- * @see https://tailwindcss.com/docs/text-color
4257
- */
4258
- "text-color": [{ text: scaleColor() }],
4259
- /**
4260
- * Text Decoration
4261
- * @see https://tailwindcss.com/docs/text-decoration
4262
- */
4263
- "text-decoration": [
4264
- "underline",
4265
- "overline",
4266
- "line-through",
4267
- "no-underline"
4268
- ],
4269
- /**
4270
- * Text Decoration Style
4271
- * @see https://tailwindcss.com/docs/text-decoration-style
4272
- */
4273
- "text-decoration-style": [{ decoration: [...scaleLineStyle(), "wavy"] }],
4274
- /**
4275
- * Text Decoration Thickness
4276
- * @see https://tailwindcss.com/docs/text-decoration-thickness
4277
- */
4278
- "text-decoration-thickness": [{ decoration: [
4279
- isNumber,
4280
- "from-font",
4281
- "auto",
4282
- isArbitraryVariable,
4283
- isArbitraryLength
4284
- ] }],
4285
- /**
4286
- * Text Decoration Color
4287
- * @see https://tailwindcss.com/docs/text-decoration-color
4288
- */
4289
- "text-decoration-color": [{ decoration: scaleColor() }],
4290
- /**
4291
- * Text Underline Offset
4292
- * @see https://tailwindcss.com/docs/text-underline-offset
4293
- */
4294
- "underline-offset": [{ "underline-offset": [
4295
- isNumber,
4296
- "auto",
4297
- isArbitraryVariable,
4298
- isArbitraryValue
4299
- ] }],
4300
- /**
4301
- * Text Transform
4302
- * @see https://tailwindcss.com/docs/text-transform
4303
- */
4304
- "text-transform": [
4305
- "uppercase",
4306
- "lowercase",
4307
- "capitalize",
4308
- "normal-case"
4309
- ],
4310
- /**
4311
- * Text Overflow
4312
- * @see https://tailwindcss.com/docs/text-overflow
4313
- */
4314
- "text-overflow": [
4315
- "truncate",
4316
- "text-ellipsis",
4317
- "text-clip"
4318
- ],
4319
- /**
4320
- * Text Wrap
4321
- * @see https://tailwindcss.com/docs/text-wrap
4322
- */
4323
- "text-wrap": [{ text: [
4324
- "wrap",
4325
- "nowrap",
4326
- "balance",
4327
- "pretty"
4328
- ] }],
4329
- /**
4330
- * Text Indent
4331
- * @see https://tailwindcss.com/docs/text-indent
4332
- */
4333
- indent: [{ indent: scaleUnambiguousSpacing() }],
4334
- /**
4335
- * Tab Size
4336
- * @see https://tailwindcss.com/docs/tab-size
4337
- */
4338
- "tab-size": [{ tab: [
4339
- isInteger,
4340
- isArbitraryVariable,
4341
- isArbitraryValue
4342
- ] }],
4343
- /**
4344
- * Vertical Alignment
4345
- * @see https://tailwindcss.com/docs/vertical-align
4346
- */
4347
- "vertical-align": [{ align: [
4348
- "baseline",
4349
- "top",
4350
- "middle",
4351
- "bottom",
4352
- "text-top",
4353
- "text-bottom",
4354
- "sub",
4355
- "super",
4356
- isArbitraryVariable,
4357
- isArbitraryValue
4358
- ] }],
4359
- /**
4360
- * Whitespace
4361
- * @see https://tailwindcss.com/docs/whitespace
4362
- */
4363
- whitespace: [{ whitespace: [
4364
- "normal",
4365
- "nowrap",
4366
- "pre",
4367
- "pre-line",
4368
- "pre-wrap",
4369
- "break-spaces"
4370
- ] }],
4371
- /**
4372
- * Word Break
4373
- * @see https://tailwindcss.com/docs/word-break
4374
- */
4375
- break: [{ break: [
4376
- "normal",
4377
- "words",
4378
- "all",
4379
- "keep"
4380
- ] }],
4381
- /**
4382
- * Overflow Wrap
4383
- * @see https://tailwindcss.com/docs/overflow-wrap
4384
- */
4385
- wrap: [{ wrap: [
4386
- "break-word",
4387
- "anywhere",
4388
- "normal"
4389
- ] }],
4390
- /**
4391
- * Hyphens
4392
- * @see https://tailwindcss.com/docs/hyphens
4393
- */
4394
- hyphens: [{ hyphens: [
4395
- "none",
4396
- "manual",
4397
- "auto"
4398
- ] }],
4399
- /**
4400
- * Content
4401
- * @see https://tailwindcss.com/docs/content
4402
- */
4403
- content: [{ content: [
4404
- "none",
4405
- isArbitraryVariable,
4406
- isArbitraryValue
4407
- ] }],
4408
- /**
4409
- * Background Attachment
4410
- * @see https://tailwindcss.com/docs/background-attachment
4411
- */
4412
- "bg-attachment": [{ bg: [
4413
- "fixed",
4414
- "local",
4415
- "scroll"
4416
- ] }],
4417
- /**
4418
- * Background Clip
4419
- * @see https://tailwindcss.com/docs/background-clip
4420
- */
4421
- "bg-clip": [{ "bg-clip": [
4422
- "border",
4423
- "padding",
4424
- "content",
4425
- "text"
4426
- ] }],
4427
- /**
4428
- * Background Origin
4429
- * @see https://tailwindcss.com/docs/background-origin
4430
- */
4431
- "bg-origin": [{ "bg-origin": [
4432
- "border",
4433
- "padding",
4434
- "content"
4435
- ] }],
4436
- /**
4437
- * Background Position
4438
- * @see https://tailwindcss.com/docs/background-position
4439
- */
4440
- "bg-position": [{ bg: scaleBgPosition() }],
4441
- /**
4442
- * Background Repeat
4443
- * @see https://tailwindcss.com/docs/background-repeat
4444
- */
4445
- "bg-repeat": [{ bg: scaleBgRepeat() }],
4446
- /**
4447
- * Background Size
4448
- * @see https://tailwindcss.com/docs/background-size
4449
- */
4450
- "bg-size": [{ bg: scaleBgSize() }],
4451
- /**
4452
- * Background Image
4453
- * @see https://tailwindcss.com/docs/background-image
4454
- */
4455
- "bg-image": [{ bg: [
4456
- "none",
4457
- {
4458
- linear: [
4459
- { to: [
4460
- "t",
4461
- "tr",
4462
- "r",
4463
- "br",
4464
- "b",
4465
- "bl",
4466
- "l",
4467
- "tl"
4468
- ] },
4469
- isInteger,
4470
- isArbitraryVariable,
4471
- isArbitraryValue
4472
- ],
4473
- radial: [
4474
- "",
4475
- isArbitraryVariable,
4476
- isArbitraryValue
4477
- ],
4478
- conic: [
4479
- "",
4480
- isInteger,
4481
- isArbitraryVariable,
4482
- isArbitraryValue
4483
- ]
4484
- },
4485
- isArbitraryVariableImage,
4486
- isArbitraryImage
4487
- ] }],
4488
- /**
4489
- * Background Color
4490
- * @see https://tailwindcss.com/docs/background-color
4491
- */
4492
- "bg-color": [{ bg: scaleColor() }],
4493
- /**
4494
- * Gradient Color Stops From Position
4495
- * @see https://tailwindcss.com/docs/gradient-color-stops
4496
- */
4497
- "gradient-from-pos": [{ from: scaleGradientStopPosition() }],
4498
- /**
4499
- * Gradient Color Stops Via Position
4500
- * @see https://tailwindcss.com/docs/gradient-color-stops
4501
- */
4502
- "gradient-via-pos": [{ via: scaleGradientStopPosition() }],
4503
- /**
4504
- * Gradient Color Stops To Position
4505
- * @see https://tailwindcss.com/docs/gradient-color-stops
4506
- */
4507
- "gradient-to-pos": [{ to: scaleGradientStopPosition() }],
4508
- /**
4509
- * Gradient Color Stops From
4510
- * @see https://tailwindcss.com/docs/gradient-color-stops
4511
- */
4512
- "gradient-from": [{ from: scaleColor() }],
4513
- /**
4514
- * Gradient Color Stops Via
4515
- * @see https://tailwindcss.com/docs/gradient-color-stops
4516
- */
4517
- "gradient-via": [{ via: scaleColor() }],
4518
- /**
4519
- * Gradient Color Stops To
4520
- * @see https://tailwindcss.com/docs/gradient-color-stops
4521
- */
4522
- "gradient-to": [{ to: scaleColor() }],
4523
- /**
4524
- * Border Radius
4525
- * @see https://tailwindcss.com/docs/border-radius
4526
- */
4527
- rounded: [{ rounded: scaleRadius() }],
4528
- /**
4529
- * Border Radius Start
4530
- * @see https://tailwindcss.com/docs/border-radius
4531
- */
4532
- "rounded-s": [{ "rounded-s": scaleRadius() }],
4533
- /**
4534
- * Border Radius End
4535
- * @see https://tailwindcss.com/docs/border-radius
4536
- */
4537
- "rounded-e": [{ "rounded-e": scaleRadius() }],
4538
- /**
4539
- * Border Radius Top
4540
- * @see https://tailwindcss.com/docs/border-radius
4541
- */
4542
- "rounded-t": [{ "rounded-t": scaleRadius() }],
4543
- /**
4544
- * Border Radius Right
4545
- * @see https://tailwindcss.com/docs/border-radius
4546
- */
4547
- "rounded-r": [{ "rounded-r": scaleRadius() }],
4548
- /**
4549
- * Border Radius Bottom
4550
- * @see https://tailwindcss.com/docs/border-radius
4551
- */
4552
- "rounded-b": [{ "rounded-b": scaleRadius() }],
4553
- /**
4554
- * Border Radius Left
4555
- * @see https://tailwindcss.com/docs/border-radius
4556
- */
4557
- "rounded-l": [{ "rounded-l": scaleRadius() }],
4558
- /**
4559
- * Border Radius Start Start
4560
- * @see https://tailwindcss.com/docs/border-radius
4561
- */
4562
- "rounded-ss": [{ "rounded-ss": scaleRadius() }],
4563
- /**
4564
- * Border Radius Start End
4565
- * @see https://tailwindcss.com/docs/border-radius
4566
- */
4567
- "rounded-se": [{ "rounded-se": scaleRadius() }],
4568
- /**
4569
- * Border Radius End End
4570
- * @see https://tailwindcss.com/docs/border-radius
4571
- */
4572
- "rounded-ee": [{ "rounded-ee": scaleRadius() }],
4573
- /**
4574
- * Border Radius End Start
4575
- * @see https://tailwindcss.com/docs/border-radius
4576
- */
4577
- "rounded-es": [{ "rounded-es": scaleRadius() }],
4578
- /**
4579
- * Border Radius Top Left
4580
- * @see https://tailwindcss.com/docs/border-radius
4581
- */
4582
- "rounded-tl": [{ "rounded-tl": scaleRadius() }],
4583
- /**
4584
- * Border Radius Top Right
4585
- * @see https://tailwindcss.com/docs/border-radius
4586
- */
4587
- "rounded-tr": [{ "rounded-tr": scaleRadius() }],
4588
- /**
4589
- * Border Radius Bottom Right
4590
- * @see https://tailwindcss.com/docs/border-radius
4591
- */
4592
- "rounded-br": [{ "rounded-br": scaleRadius() }],
4593
- /**
4594
- * Border Radius Bottom Left
4595
- * @see https://tailwindcss.com/docs/border-radius
4596
- */
4597
- "rounded-bl": [{ "rounded-bl": scaleRadius() }],
4598
- /**
4599
- * Border Width
4600
- * @see https://tailwindcss.com/docs/border-width
4601
- */
4602
- "border-w": [{ border: scaleBorderWidth() }],
4603
- /**
4604
- * Border Width Inline
4605
- * @see https://tailwindcss.com/docs/border-width
4606
- */
4607
- "border-w-x": [{ "border-x": scaleBorderWidth() }],
4608
- /**
4609
- * Border Width Block
4610
- * @see https://tailwindcss.com/docs/border-width
4611
- */
4612
- "border-w-y": [{ "border-y": scaleBorderWidth() }],
4613
- /**
4614
- * Border Width Inline Start
4615
- * @see https://tailwindcss.com/docs/border-width
4616
- */
4617
- "border-w-s": [{ "border-s": scaleBorderWidth() }],
4618
- /**
4619
- * Border Width Inline End
4620
- * @see https://tailwindcss.com/docs/border-width
4621
- */
4622
- "border-w-e": [{ "border-e": scaleBorderWidth() }],
4623
- /**
4624
- * Border Width Block Start
4625
- * @see https://tailwindcss.com/docs/border-width
4626
- */
4627
- "border-w-bs": [{ "border-bs": scaleBorderWidth() }],
4628
- /**
4629
- * Border Width Block End
4630
- * @see https://tailwindcss.com/docs/border-width
4631
- */
4632
- "border-w-be": [{ "border-be": scaleBorderWidth() }],
4633
- /**
4634
- * Border Width Top
4635
- * @see https://tailwindcss.com/docs/border-width
4636
- */
4637
- "border-w-t": [{ "border-t": scaleBorderWidth() }],
4638
- /**
4639
- * Border Width Right
4640
- * @see https://tailwindcss.com/docs/border-width
4641
- */
4642
- "border-w-r": [{ "border-r": scaleBorderWidth() }],
4643
- /**
4644
- * Border Width Bottom
4645
- * @see https://tailwindcss.com/docs/border-width
4646
- */
4647
- "border-w-b": [{ "border-b": scaleBorderWidth() }],
4648
- /**
4649
- * Border Width Left
4650
- * @see https://tailwindcss.com/docs/border-width
4651
- */
4652
- "border-w-l": [{ "border-l": scaleBorderWidth() }],
4653
- /**
4654
- * Divide Width X
4655
- * @see https://tailwindcss.com/docs/border-width#between-children
4656
- */
4657
- "divide-x": [{ "divide-x": scaleBorderWidth() }],
4658
- /**
4659
- * Divide Width X Reverse
4660
- * @see https://tailwindcss.com/docs/border-width#between-children
4661
- */
4662
- "divide-x-reverse": ["divide-x-reverse"],
4663
- /**
4664
- * Divide Width Y
4665
- * @see https://tailwindcss.com/docs/border-width#between-children
4666
- */
4667
- "divide-y": [{ "divide-y": scaleBorderWidth() }],
4668
- /**
4669
- * Divide Width Y Reverse
4670
- * @see https://tailwindcss.com/docs/border-width#between-children
4671
- */
4672
- "divide-y-reverse": ["divide-y-reverse"],
4673
- /**
4674
- * Border Style
4675
- * @see https://tailwindcss.com/docs/border-style
4676
- */
4677
- "border-style": [{ border: [
4678
- ...scaleLineStyle(),
4679
- "hidden",
4680
- "none"
4681
- ] }],
4682
- /**
4683
- * Divide Style
4684
- * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
4685
- */
4686
- "divide-style": [{ divide: [
4687
- ...scaleLineStyle(),
4688
- "hidden",
4689
- "none"
4690
- ] }],
4691
- /**
4692
- * Border Color
4693
- * @see https://tailwindcss.com/docs/border-color
4694
- */
4695
- "border-color": [{ border: scaleColor() }],
4696
- /**
4697
- * Border Color Inline
4698
- * @see https://tailwindcss.com/docs/border-color
4699
- */
4700
- "border-color-x": [{ "border-x": scaleColor() }],
4701
- /**
4702
- * Border Color Block
4703
- * @see https://tailwindcss.com/docs/border-color
4704
- */
4705
- "border-color-y": [{ "border-y": scaleColor() }],
4706
- /**
4707
- * Border Color Inline Start
4708
- * @see https://tailwindcss.com/docs/border-color
4709
- */
4710
- "border-color-s": [{ "border-s": scaleColor() }],
4711
- /**
4712
- * Border Color Inline End
4713
- * @see https://tailwindcss.com/docs/border-color
4714
- */
4715
- "border-color-e": [{ "border-e": scaleColor() }],
4716
- /**
4717
- * Border Color Block Start
4718
- * @see https://tailwindcss.com/docs/border-color
4719
- */
4720
- "border-color-bs": [{ "border-bs": scaleColor() }],
4721
- /**
4722
- * Border Color Block End
4723
- * @see https://tailwindcss.com/docs/border-color
4724
- */
4725
- "border-color-be": [{ "border-be": scaleColor() }],
4726
- /**
4727
- * Border Color Top
4728
- * @see https://tailwindcss.com/docs/border-color
4729
- */
4730
- "border-color-t": [{ "border-t": scaleColor() }],
4731
- /**
4732
- * Border Color Right
4733
- * @see https://tailwindcss.com/docs/border-color
4734
- */
4735
- "border-color-r": [{ "border-r": scaleColor() }],
4736
- /**
4737
- * Border Color Bottom
4738
- * @see https://tailwindcss.com/docs/border-color
4739
- */
4740
- "border-color-b": [{ "border-b": scaleColor() }],
4741
- /**
4742
- * Border Color Left
4743
- * @see https://tailwindcss.com/docs/border-color
4744
- */
4745
- "border-color-l": [{ "border-l": scaleColor() }],
4746
- /**
4747
- * Divide Color
4748
- * @see https://tailwindcss.com/docs/divide-color
4749
- */
4750
- "divide-color": [{ divide: scaleColor() }],
4751
- /**
4752
- * Outline Style
4753
- * @see https://tailwindcss.com/docs/outline-style
4754
- */
4755
- "outline-style": [{ outline: [
4756
- ...scaleLineStyle(),
4757
- "none",
4758
- "hidden"
4759
- ] }],
4760
- /**
4761
- * Outline Offset
4762
- * @see https://tailwindcss.com/docs/outline-offset
4763
- */
4764
- "outline-offset": [{ "outline-offset": [
4765
- isNumber,
4766
- isArbitraryVariable,
4767
- isArbitraryValue
4768
- ] }],
4769
- /**
4770
- * Outline Width
4771
- * @see https://tailwindcss.com/docs/outline-width
4772
- */
4773
- "outline-w": [{ outline: [
4774
- "",
4775
- isNumber,
4776
- isArbitraryVariableLength,
4777
- isArbitraryLength
4778
- ] }],
4779
- /**
4780
- * Outline Color
4781
- * @see https://tailwindcss.com/docs/outline-color
4782
- */
4783
- "outline-color": [{ outline: scaleColor() }],
4784
- /**
4785
- * Box Shadow
4786
- * @see https://tailwindcss.com/docs/box-shadow
4787
- */
4788
- shadow: [{ shadow: [
4789
- "",
4790
- "inner",
4791
- "none",
4792
- themeShadow,
4793
- isArbitraryVariableShadow,
4794
- isArbitraryShadow
4795
- ] }],
4796
- /**
4797
- * Box Shadow Color
4798
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
4799
- */
4800
- "shadow-color": [{ shadow: scaleColor() }],
4801
- /**
4802
- * Inset Box Shadow
4803
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
4804
- */
4805
- "inset-shadow": [{ "inset-shadow": [
4806
- "none",
4807
- themeInsetShadow,
4808
- isArbitraryVariableShadow,
4809
- isArbitraryShadow
4810
- ] }],
4811
- /**
4812
- * Inset Box Shadow Color
4813
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
4814
- */
4815
- "inset-shadow-color": [{ "inset-shadow": scaleColor() }],
4816
- /**
4817
- * Ring Width
4818
- * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
4819
- */
4820
- "ring-w": [{ ring: scaleBorderWidth() }],
4821
- /**
4822
- * Ring Width Inset
4823
- * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
4824
- * @deprecated since Tailwind CSS v4.0.0
4825
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
4826
- */
4827
- "ring-w-inset": ["ring-inset"],
4828
- /**
4829
- * Ring Color
4830
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
4831
- */
4832
- "ring-color": [{ ring: scaleColor() }],
4833
- /**
4834
- * Ring Offset Width
4835
- * @see https://v3.tailwindcss.com/docs/ring-offset-width
4836
- * @deprecated since Tailwind CSS v4.0.0
4837
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
4838
- */
4839
- "ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
4840
- /**
4841
- * Ring Offset Color
4842
- * @see https://v3.tailwindcss.com/docs/ring-offset-color
4843
- * @deprecated since Tailwind CSS v4.0.0
4844
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
4845
- */
4846
- "ring-offset-color": [{ "ring-offset": scaleColor() }],
4847
- /**
4848
- * Inset Ring Width
4849
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
4850
- */
4851
- "inset-ring-w": [{ "inset-ring": scaleBorderWidth() }],
4852
- /**
4853
- * Inset Ring Color
4854
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
4855
- */
4856
- "inset-ring-color": [{ "inset-ring": scaleColor() }],
4857
- /**
4858
- * Text Shadow
4859
- * @see https://tailwindcss.com/docs/text-shadow
4860
- */
4861
- "text-shadow": [{ "text-shadow": [
4862
- "none",
4863
- themeTextShadow,
4864
- isArbitraryVariableShadow,
4865
- isArbitraryShadow
4866
- ] }],
4867
- /**
4868
- * Text Shadow Color
4869
- * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
4870
- */
4871
- "text-shadow-color": [{ "text-shadow": scaleColor() }],
4872
- /**
4873
- * Opacity
4874
- * @see https://tailwindcss.com/docs/opacity
4875
- */
4876
- opacity: [{ opacity: [
4877
- isNumber,
4878
- isArbitraryVariable,
4879
- isArbitraryValue
4880
- ] }],
4881
- /**
4882
- * Mix Blend Mode
4883
- * @see https://tailwindcss.com/docs/mix-blend-mode
4884
- */
4885
- "mix-blend": [{ "mix-blend": [
4886
- ...scaleBlendMode(),
4887
- "plus-darker",
4888
- "plus-lighter"
4889
- ] }],
4890
- /**
4891
- * Background Blend Mode
4892
- * @see https://tailwindcss.com/docs/background-blend-mode
4893
- */
4894
- "bg-blend": [{ "bg-blend": scaleBlendMode() }],
4895
- /**
4896
- * Mask Clip
4897
- * @see https://tailwindcss.com/docs/mask-clip
4898
- */
4899
- "mask-clip": [{ "mask-clip": [
4900
- "border",
4901
- "padding",
4902
- "content",
4903
- "fill",
4904
- "stroke",
4905
- "view"
4906
- ] }, "mask-no-clip"],
4907
- /**
4908
- * Mask Composite
4909
- * @see https://tailwindcss.com/docs/mask-composite
4910
- */
4911
- "mask-composite": [{ mask: [
4912
- "add",
4913
- "subtract",
4914
- "intersect",
4915
- "exclude"
4916
- ] }],
4917
- /**
4918
- * Mask Image
4919
- * @see https://tailwindcss.com/docs/mask-image
4920
- */
4921
- "mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
4922
- "mask-image-linear-from-pos": [{ "mask-linear-from": scaleMaskImagePosition() }],
4923
- "mask-image-linear-to-pos": [{ "mask-linear-to": scaleMaskImagePosition() }],
4924
- "mask-image-linear-from-color": [{ "mask-linear-from": scaleColor() }],
4925
- "mask-image-linear-to-color": [{ "mask-linear-to": scaleColor() }],
4926
- "mask-image-t-from-pos": [{ "mask-t-from": scaleMaskImagePosition() }],
4927
- "mask-image-t-to-pos": [{ "mask-t-to": scaleMaskImagePosition() }],
4928
- "mask-image-t-from-color": [{ "mask-t-from": scaleColor() }],
4929
- "mask-image-t-to-color": [{ "mask-t-to": scaleColor() }],
4930
- "mask-image-r-from-pos": [{ "mask-r-from": scaleMaskImagePosition() }],
4931
- "mask-image-r-to-pos": [{ "mask-r-to": scaleMaskImagePosition() }],
4932
- "mask-image-r-from-color": [{ "mask-r-from": scaleColor() }],
4933
- "mask-image-r-to-color": [{ "mask-r-to": scaleColor() }],
4934
- "mask-image-b-from-pos": [{ "mask-b-from": scaleMaskImagePosition() }],
4935
- "mask-image-b-to-pos": [{ "mask-b-to": scaleMaskImagePosition() }],
4936
- "mask-image-b-from-color": [{ "mask-b-from": scaleColor() }],
4937
- "mask-image-b-to-color": [{ "mask-b-to": scaleColor() }],
4938
- "mask-image-l-from-pos": [{ "mask-l-from": scaleMaskImagePosition() }],
4939
- "mask-image-l-to-pos": [{ "mask-l-to": scaleMaskImagePosition() }],
4940
- "mask-image-l-from-color": [{ "mask-l-from": scaleColor() }],
4941
- "mask-image-l-to-color": [{ "mask-l-to": scaleColor() }],
4942
- "mask-image-x-from-pos": [{ "mask-x-from": scaleMaskImagePosition() }],
4943
- "mask-image-x-to-pos": [{ "mask-x-to": scaleMaskImagePosition() }],
4944
- "mask-image-x-from-color": [{ "mask-x-from": scaleColor() }],
4945
- "mask-image-x-to-color": [{ "mask-x-to": scaleColor() }],
4946
- "mask-image-y-from-pos": [{ "mask-y-from": scaleMaskImagePosition() }],
4947
- "mask-image-y-to-pos": [{ "mask-y-to": scaleMaskImagePosition() }],
4948
- "mask-image-y-from-color": [{ "mask-y-from": scaleColor() }],
4949
- "mask-image-y-to-color": [{ "mask-y-to": scaleColor() }],
4950
- "mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
4951
- "mask-image-radial-from-pos": [{ "mask-radial-from": scaleMaskImagePosition() }],
4952
- "mask-image-radial-to-pos": [{ "mask-radial-to": scaleMaskImagePosition() }],
4953
- "mask-image-radial-from-color": [{ "mask-radial-from": scaleColor() }],
4954
- "mask-image-radial-to-color": [{ "mask-radial-to": scaleColor() }],
4955
- "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
4956
- "mask-image-radial-size": [{ "mask-radial": [{
4957
- closest: ["side", "corner"],
4958
- farthest: ["side", "corner"]
4959
- }] }],
4960
- "mask-image-radial-pos": [{ "mask-radial-at": scalePosition() }],
4961
- "mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
4962
- "mask-image-conic-from-pos": [{ "mask-conic-from": scaleMaskImagePosition() }],
4963
- "mask-image-conic-to-pos": [{ "mask-conic-to": scaleMaskImagePosition() }],
4964
- "mask-image-conic-from-color": [{ "mask-conic-from": scaleColor() }],
4965
- "mask-image-conic-to-color": [{ "mask-conic-to": scaleColor() }],
4966
- /**
4967
- * Mask Mode
4968
- * @see https://tailwindcss.com/docs/mask-mode
4969
- */
4970
- "mask-mode": [{ mask: [
4971
- "alpha",
4972
- "luminance",
4973
- "match"
4974
- ] }],
4975
- /**
4976
- * Mask Origin
4977
- * @see https://tailwindcss.com/docs/mask-origin
4978
- */
4979
- "mask-origin": [{ "mask-origin": [
4980
- "border",
4981
- "padding",
4982
- "content",
4983
- "fill",
4984
- "stroke",
4985
- "view"
4986
- ] }],
4987
- /**
4988
- * Mask Position
4989
- * @see https://tailwindcss.com/docs/mask-position
4990
- */
4991
- "mask-position": [{ mask: scaleBgPosition() }],
4992
- /**
4993
- * Mask Repeat
4994
- * @see https://tailwindcss.com/docs/mask-repeat
4995
- */
4996
- "mask-repeat": [{ mask: scaleBgRepeat() }],
4997
- /**
4998
- * Mask Size
4999
- * @see https://tailwindcss.com/docs/mask-size
5000
- */
5001
- "mask-size": [{ mask: scaleBgSize() }],
5002
- /**
5003
- * Mask Type
5004
- * @see https://tailwindcss.com/docs/mask-type
5005
- */
5006
- "mask-type": [{ "mask-type": ["alpha", "luminance"] }],
5007
- /**
5008
- * Mask Image
5009
- * @see https://tailwindcss.com/docs/mask-image
5010
- */
5011
- "mask-image": [{ mask: [
5012
- "none",
5013
- isArbitraryVariable,
5014
- isArbitraryValue
5015
- ] }],
5016
- /**
5017
- * Filter
5018
- * @see https://tailwindcss.com/docs/filter
5019
- */
5020
- filter: [{ filter: [
5021
- "",
5022
- "none",
5023
- isArbitraryVariable,
5024
- isArbitraryValue
5025
- ] }],
5026
- /**
5027
- * Blur
5028
- * @see https://tailwindcss.com/docs/blur
5029
- */
5030
- blur: [{ blur: scaleBlur() }],
5031
- /**
5032
- * Brightness
5033
- * @see https://tailwindcss.com/docs/brightness
5034
- */
5035
- brightness: [{ brightness: [
5036
- isNumber,
5037
- isArbitraryVariable,
5038
- isArbitraryValue
5039
- ] }],
5040
- /**
5041
- * Contrast
5042
- * @see https://tailwindcss.com/docs/contrast
5043
- */
5044
- contrast: [{ contrast: [
5045
- isNumber,
5046
- isArbitraryVariable,
5047
- isArbitraryValue
5048
- ] }],
5049
- /**
5050
- * Drop Shadow
5051
- * @see https://tailwindcss.com/docs/drop-shadow
5052
- */
5053
- "drop-shadow": [{ "drop-shadow": [
5054
- "",
5055
- "none",
5056
- themeDropShadow,
5057
- isArbitraryVariableShadow,
5058
- isArbitraryShadow
5059
- ] }],
5060
- /**
5061
- * Drop Shadow Color
5062
- * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
5063
- */
5064
- "drop-shadow-color": [{ "drop-shadow": scaleColor() }],
5065
- /**
5066
- * Grayscale
5067
- * @see https://tailwindcss.com/docs/grayscale
5068
- */
5069
- grayscale: [{ grayscale: [
5070
- "",
5071
- isNumber,
5072
- isArbitraryVariable,
5073
- isArbitraryValue
5074
- ] }],
5075
- /**
5076
- * Hue Rotate
5077
- * @see https://tailwindcss.com/docs/hue-rotate
5078
- */
5079
- "hue-rotate": [{ "hue-rotate": [
5080
- isNumber,
5081
- isArbitraryVariable,
5082
- isArbitraryValue
5083
- ] }],
5084
- /**
5085
- * Invert
5086
- * @see https://tailwindcss.com/docs/invert
5087
- */
5088
- invert: [{ invert: [
5089
- "",
5090
- isNumber,
5091
- isArbitraryVariable,
5092
- isArbitraryValue
5093
- ] }],
5094
- /**
5095
- * Saturate
5096
- * @see https://tailwindcss.com/docs/saturate
5097
- */
5098
- saturate: [{ saturate: [
5099
- isNumber,
5100
- isArbitraryVariable,
5101
- isArbitraryValue
5102
- ] }],
5103
- /**
5104
- * Sepia
5105
- * @see https://tailwindcss.com/docs/sepia
5106
- */
5107
- sepia: [{ sepia: [
5108
- "",
5109
- isNumber,
5110
- isArbitraryVariable,
5111
- isArbitraryValue
5112
- ] }],
5113
- /**
5114
- * Backdrop Filter
5115
- * @see https://tailwindcss.com/docs/backdrop-filter
5116
- */
5117
- "backdrop-filter": [{ "backdrop-filter": [
5118
- "",
5119
- "none",
5120
- isArbitraryVariable,
5121
- isArbitraryValue
5122
- ] }],
5123
- /**
5124
- * Backdrop Blur
5125
- * @see https://tailwindcss.com/docs/backdrop-blur
5126
- */
5127
- "backdrop-blur": [{ "backdrop-blur": scaleBlur() }],
5128
- /**
5129
- * Backdrop Brightness
5130
- * @see https://tailwindcss.com/docs/backdrop-brightness
5131
- */
5132
- "backdrop-brightness": [{ "backdrop-brightness": [
5133
- isNumber,
5134
- isArbitraryVariable,
5135
- isArbitraryValue
5136
- ] }],
5137
- /**
5138
- * Backdrop Contrast
5139
- * @see https://tailwindcss.com/docs/backdrop-contrast
5140
- */
5141
- "backdrop-contrast": [{ "backdrop-contrast": [
5142
- isNumber,
5143
- isArbitraryVariable,
5144
- isArbitraryValue
5145
- ] }],
5146
- /**
5147
- * Backdrop Grayscale
5148
- * @see https://tailwindcss.com/docs/backdrop-grayscale
5149
- */
5150
- "backdrop-grayscale": [{ "backdrop-grayscale": [
5151
- "",
5152
- isNumber,
5153
- isArbitraryVariable,
5154
- isArbitraryValue
5155
- ] }],
5156
- /**
5157
- * Backdrop Hue Rotate
5158
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
5159
- */
5160
- "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
5161
- isNumber,
5162
- isArbitraryVariable,
5163
- isArbitraryValue
5164
- ] }],
5165
- /**
5166
- * Backdrop Invert
5167
- * @see https://tailwindcss.com/docs/backdrop-invert
5168
- */
5169
- "backdrop-invert": [{ "backdrop-invert": [
5170
- "",
5171
- isNumber,
5172
- isArbitraryVariable,
5173
- isArbitraryValue
5174
- ] }],
5175
- /**
5176
- * Backdrop Opacity
5177
- * @see https://tailwindcss.com/docs/backdrop-opacity
5178
- */
5179
- "backdrop-opacity": [{ "backdrop-opacity": [
5180
- isNumber,
5181
- isArbitraryVariable,
5182
- isArbitraryValue
5183
- ] }],
5184
- /**
5185
- * Backdrop Saturate
5186
- * @see https://tailwindcss.com/docs/backdrop-saturate
5187
- */
5188
- "backdrop-saturate": [{ "backdrop-saturate": [
5189
- isNumber,
5190
- isArbitraryVariable,
5191
- isArbitraryValue
5192
- ] }],
5193
- /**
5194
- * Backdrop Sepia
5195
- * @see https://tailwindcss.com/docs/backdrop-sepia
5196
- */
5197
- "backdrop-sepia": [{ "backdrop-sepia": [
5198
- "",
5199
- isNumber,
5200
- isArbitraryVariable,
5201
- isArbitraryValue
5202
- ] }],
5203
- /**
5204
- * Border Collapse
5205
- * @see https://tailwindcss.com/docs/border-collapse
5206
- */
5207
- "border-collapse": [{ border: ["collapse", "separate"] }],
5208
- /**
5209
- * Border Spacing
5210
- * @see https://tailwindcss.com/docs/border-spacing
5211
- */
5212
- "border-spacing": [{ "border-spacing": scaleUnambiguousSpacing() }],
5213
- /**
5214
- * Border Spacing X
5215
- * @see https://tailwindcss.com/docs/border-spacing
5216
- */
5217
- "border-spacing-x": [{ "border-spacing-x": scaleUnambiguousSpacing() }],
5218
- /**
5219
- * Border Spacing Y
5220
- * @see https://tailwindcss.com/docs/border-spacing
5221
- */
5222
- "border-spacing-y": [{ "border-spacing-y": scaleUnambiguousSpacing() }],
5223
- /**
5224
- * Table Layout
5225
- * @see https://tailwindcss.com/docs/table-layout
5226
- */
5227
- "table-layout": [{ table: ["auto", "fixed"] }],
5228
- /**
5229
- * Caption Side
5230
- * @see https://tailwindcss.com/docs/caption-side
5231
- */
5232
- caption: [{ caption: ["top", "bottom"] }],
5233
- /**
5234
- * Transition Property
5235
- * @see https://tailwindcss.com/docs/transition-property
5236
- */
5237
- transition: [{ transition: [
5238
- "",
5239
- "all",
5240
- "colors",
5241
- "opacity",
5242
- "shadow",
5243
- "transform",
5244
- "none",
5245
- isArbitraryVariable,
5246
- isArbitraryValue
5247
- ] }],
5248
- /**
5249
- * Transition Behavior
5250
- * @see https://tailwindcss.com/docs/transition-behavior
5251
- */
5252
- "transition-behavior": [{ transition: ["normal", "discrete"] }],
5253
- /**
5254
- * Transition Duration
5255
- * @see https://tailwindcss.com/docs/transition-duration
5256
- */
5257
- duration: [{ duration: [
5258
- isNumber,
5259
- "initial",
5260
- isArbitraryVariable,
5261
- isArbitraryValue
5262
- ] }],
5263
- /**
5264
- * Transition Timing Function
5265
- * @see https://tailwindcss.com/docs/transition-timing-function
5266
- */
5267
- ease: [{ ease: [
5268
- "linear",
5269
- "initial",
5270
- themeEase,
5271
- isArbitraryVariable,
5272
- isArbitraryValue
5273
- ] }],
5274
- /**
5275
- * Transition Delay
5276
- * @see https://tailwindcss.com/docs/transition-delay
5277
- */
5278
- delay: [{ delay: [
5279
- isNumber,
5280
- isArbitraryVariable,
5281
- isArbitraryValue
5282
- ] }],
5283
- /**
5284
- * Animation
5285
- * @see https://tailwindcss.com/docs/animation
5286
- */
5287
- animate: [{ animate: [
5288
- "none",
5289
- themeAnimate,
5290
- isArbitraryVariable,
5291
- isArbitraryValue
5292
- ] }],
5293
- /**
5294
- * Backface Visibility
5295
- * @see https://tailwindcss.com/docs/backface-visibility
5296
- */
5297
- backface: [{ backface: ["hidden", "visible"] }],
5298
- /**
5299
- * Perspective
5300
- * @see https://tailwindcss.com/docs/perspective
5301
- */
5302
- perspective: [{ perspective: [
5303
- themePerspective,
5304
- isArbitraryVariable,
5305
- isArbitraryValue
5306
- ] }],
5307
- /**
5308
- * Perspective Origin
5309
- * @see https://tailwindcss.com/docs/perspective-origin
5310
- */
5311
- "perspective-origin": [{ "perspective-origin": scalePositionWithArbitrary() }],
5312
- /**
5313
- * Rotate
5314
- * @see https://tailwindcss.com/docs/rotate
5315
- */
5316
- rotate: [{ rotate: scaleRotate() }],
5317
- /**
5318
- * Rotate X
5319
- * @see https://tailwindcss.com/docs/rotate
5320
- */
5321
- "rotate-x": [{ "rotate-x": scaleRotate() }],
5322
- /**
5323
- * Rotate Y
5324
- * @see https://tailwindcss.com/docs/rotate
5325
- */
5326
- "rotate-y": [{ "rotate-y": scaleRotate() }],
5327
- /**
5328
- * Rotate Z
5329
- * @see https://tailwindcss.com/docs/rotate
5330
- */
5331
- "rotate-z": [{ "rotate-z": scaleRotate() }],
5332
- /**
5333
- * Scale
5334
- * @see https://tailwindcss.com/docs/scale
5335
- */
5336
- scale: [{ scale: scaleScale() }],
5337
- /**
5338
- * Scale X
5339
- * @see https://tailwindcss.com/docs/scale
5340
- */
5341
- "scale-x": [{ "scale-x": scaleScale() }],
5342
- /**
5343
- * Scale Y
5344
- * @see https://tailwindcss.com/docs/scale
5345
- */
5346
- "scale-y": [{ "scale-y": scaleScale() }],
5347
- /**
5348
- * Scale Z
5349
- * @see https://tailwindcss.com/docs/scale
5350
- */
5351
- "scale-z": [{ "scale-z": scaleScale() }],
5352
- /**
5353
- * Scale 3D
5354
- * @see https://tailwindcss.com/docs/scale
5355
- */
5356
- "scale-3d": ["scale-3d"],
5357
- /**
5358
- * Skew
5359
- * @see https://tailwindcss.com/docs/skew
5360
- */
5361
- skew: [{ skew: scaleSkew() }],
5362
- /**
5363
- * Skew X
5364
- * @see https://tailwindcss.com/docs/skew
5365
- */
5366
- "skew-x": [{ "skew-x": scaleSkew() }],
5367
- /**
5368
- * Skew Y
5369
- * @see https://tailwindcss.com/docs/skew
5370
- */
5371
- "skew-y": [{ "skew-y": scaleSkew() }],
5372
- /**
5373
- * Transform
5374
- * @see https://tailwindcss.com/docs/transform
5375
- */
5376
- transform: [{ transform: [
5377
- isArbitraryVariable,
5378
- isArbitraryValue,
5379
- "",
5380
- "none",
5381
- "gpu",
5382
- "cpu"
5383
- ] }],
5384
- /**
5385
- * Transform Origin
5386
- * @see https://tailwindcss.com/docs/transform-origin
5387
- */
5388
- "transform-origin": [{ origin: scalePositionWithArbitrary() }],
5389
- /**
5390
- * Transform Style
5391
- * @see https://tailwindcss.com/docs/transform-style
5392
- */
5393
- "transform-style": [{ transform: ["3d", "flat"] }],
5394
- /**
5395
- * Translate
5396
- * @see https://tailwindcss.com/docs/translate
5397
- */
5398
- translate: [{ translate: scaleTranslate() }],
5399
- /**
5400
- * Translate X
5401
- * @see https://tailwindcss.com/docs/translate
5402
- */
5403
- "translate-x": [{ "translate-x": scaleTranslate() }],
5404
- /**
5405
- * Translate Y
5406
- * @see https://tailwindcss.com/docs/translate
5407
- */
5408
- "translate-y": [{ "translate-y": scaleTranslate() }],
5409
- /**
5410
- * Translate Z
5411
- * @see https://tailwindcss.com/docs/translate
5412
- */
5413
- "translate-z": [{ "translate-z": scaleTranslate() }],
5414
- /**
5415
- * Translate None
5416
- * @see https://tailwindcss.com/docs/translate
5417
- */
5418
- "translate-none": ["translate-none"],
5419
- /**
5420
- * Zoom
5421
- * @see https://tailwindcss.com/docs/zoom
5422
- */
5423
- zoom: [{ zoom: [
5424
- isInteger,
5425
- isArbitraryVariable,
5426
- isArbitraryValue
5427
- ] }],
5428
- /**
5429
- * Accent Color
5430
- * @see https://tailwindcss.com/docs/accent-color
5431
- */
5432
- accent: [{ accent: scaleColor() }],
5433
- /**
5434
- * Appearance
5435
- * @see https://tailwindcss.com/docs/appearance
5436
- */
5437
- appearance: [{ appearance: ["none", "auto"] }],
5438
- /**
5439
- * Caret Color
5440
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
5441
- */
5442
- "caret-color": [{ caret: scaleColor() }],
5443
- /**
5444
- * Color Scheme
5445
- * @see https://tailwindcss.com/docs/color-scheme
5446
- */
5447
- "color-scheme": [{ scheme: [
5448
- "normal",
5449
- "dark",
5450
- "light",
5451
- "light-dark",
5452
- "only-dark",
5453
- "only-light"
5454
- ] }],
5455
- /**
5456
- * Cursor
5457
- * @see https://tailwindcss.com/docs/cursor
5458
- */
5459
- cursor: [{ cursor: [
5460
- "auto",
5461
- "default",
5462
- "pointer",
5463
- "wait",
5464
- "text",
5465
- "move",
5466
- "help",
5467
- "not-allowed",
5468
- "none",
5469
- "context-menu",
5470
- "progress",
5471
- "cell",
5472
- "crosshair",
5473
- "vertical-text",
5474
- "alias",
5475
- "copy",
5476
- "no-drop",
5477
- "grab",
5478
- "grabbing",
5479
- "all-scroll",
5480
- "col-resize",
5481
- "row-resize",
5482
- "n-resize",
5483
- "e-resize",
5484
- "s-resize",
5485
- "w-resize",
5486
- "ne-resize",
5487
- "nw-resize",
5488
- "se-resize",
5489
- "sw-resize",
5490
- "ew-resize",
5491
- "ns-resize",
5492
- "nesw-resize",
5493
- "nwse-resize",
5494
- "zoom-in",
5495
- "zoom-out",
5496
- isArbitraryVariable,
5497
- isArbitraryValue
5498
- ] }],
5499
- /**
5500
- * Field Sizing
5501
- * @see https://tailwindcss.com/docs/field-sizing
5502
- */
5503
- "field-sizing": [{ "field-sizing": ["fixed", "content"] }],
5504
- /**
5505
- * Pointer Events
5506
- * @see https://tailwindcss.com/docs/pointer-events
5507
- */
5508
- "pointer-events": [{ "pointer-events": ["auto", "none"] }],
5509
- /**
5510
- * Resize
5511
- * @see https://tailwindcss.com/docs/resize
5512
- */
5513
- resize: [{ resize: [
5514
- "none",
5515
- "",
5516
- "y",
5517
- "x"
5518
- ] }],
5519
- /**
5520
- * Scroll Behavior
5521
- * @see https://tailwindcss.com/docs/scroll-behavior
5522
- */
5523
- "scroll-behavior": [{ scroll: ["auto", "smooth"] }],
5524
- /**
5525
- * Scrollbar Thumb Color
5526
- * @see https://tailwindcss.com/docs/scrollbar-color
5527
- */
5528
- "scrollbar-thumb-color": [{ "scrollbar-thumb": scaleColor() }],
5529
- /**
5530
- * Scrollbar Track Color
5531
- * @see https://tailwindcss.com/docs/scrollbar-color
5532
- */
5533
- "scrollbar-track-color": [{ "scrollbar-track": scaleColor() }],
5534
- /**
5535
- * Scrollbar Gutter
5536
- * @see https://tailwindcss.com/docs/scrollbar-gutter
5537
- */
5538
- "scrollbar-gutter": [{ "scrollbar-gutter": [
5539
- "auto",
5540
- "stable",
5541
- "both"
5542
- ] }],
5543
- /**
5544
- * Scrollbar Width
5545
- * @see https://tailwindcss.com/docs/scrollbar-width
5546
- */
5547
- "scrollbar-w": [{ scrollbar: [
5548
- "auto",
5549
- "thin",
5550
- "none"
5551
- ] }],
5552
- /**
5553
- * Scroll Margin
5554
- * @see https://tailwindcss.com/docs/scroll-margin
5555
- */
5556
- "scroll-m": [{ "scroll-m": scaleUnambiguousSpacing() }],
5557
- /**
5558
- * Scroll Margin Inline
5559
- * @see https://tailwindcss.com/docs/scroll-margin
5560
- */
5561
- "scroll-mx": [{ "scroll-mx": scaleUnambiguousSpacing() }],
5562
- /**
5563
- * Scroll Margin Block
5564
- * @see https://tailwindcss.com/docs/scroll-margin
5565
- */
5566
- "scroll-my": [{ "scroll-my": scaleUnambiguousSpacing() }],
5567
- /**
5568
- * Scroll Margin Inline Start
5569
- * @see https://tailwindcss.com/docs/scroll-margin
5570
- */
5571
- "scroll-ms": [{ "scroll-ms": scaleUnambiguousSpacing() }],
5572
- /**
5573
- * Scroll Margin Inline End
5574
- * @see https://tailwindcss.com/docs/scroll-margin
5575
- */
5576
- "scroll-me": [{ "scroll-me": scaleUnambiguousSpacing() }],
5577
- /**
5578
- * Scroll Margin Block Start
5579
- * @see https://tailwindcss.com/docs/scroll-margin
5580
- */
5581
- "scroll-mbs": [{ "scroll-mbs": scaleUnambiguousSpacing() }],
5582
- /**
5583
- * Scroll Margin Block End
5584
- * @see https://tailwindcss.com/docs/scroll-margin
5585
- */
5586
- "scroll-mbe": [{ "scroll-mbe": scaleUnambiguousSpacing() }],
5587
- /**
5588
- * Scroll Margin Top
5589
- * @see https://tailwindcss.com/docs/scroll-margin
5590
- */
5591
- "scroll-mt": [{ "scroll-mt": scaleUnambiguousSpacing() }],
5592
- /**
5593
- * Scroll Margin Right
5594
- * @see https://tailwindcss.com/docs/scroll-margin
5595
- */
5596
- "scroll-mr": [{ "scroll-mr": scaleUnambiguousSpacing() }],
5597
- /**
5598
- * Scroll Margin Bottom
5599
- * @see https://tailwindcss.com/docs/scroll-margin
5600
- */
5601
- "scroll-mb": [{ "scroll-mb": scaleUnambiguousSpacing() }],
5602
- /**
5603
- * Scroll Margin Left
5604
- * @see https://tailwindcss.com/docs/scroll-margin
5605
- */
5606
- "scroll-ml": [{ "scroll-ml": scaleUnambiguousSpacing() }],
5607
- /**
5608
- * Scroll Padding
5609
- * @see https://tailwindcss.com/docs/scroll-padding
5610
- */
5611
- "scroll-p": [{ "scroll-p": scaleUnambiguousSpacing() }],
5612
- /**
5613
- * Scroll Padding Inline
5614
- * @see https://tailwindcss.com/docs/scroll-padding
5615
- */
5616
- "scroll-px": [{ "scroll-px": scaleUnambiguousSpacing() }],
5617
- /**
5618
- * Scroll Padding Block
5619
- * @see https://tailwindcss.com/docs/scroll-padding
5620
- */
5621
- "scroll-py": [{ "scroll-py": scaleUnambiguousSpacing() }],
5622
- /**
5623
- * Scroll Padding Inline Start
5624
- * @see https://tailwindcss.com/docs/scroll-padding
5625
- */
5626
- "scroll-ps": [{ "scroll-ps": scaleUnambiguousSpacing() }],
5627
- /**
5628
- * Scroll Padding Inline End
5629
- * @see https://tailwindcss.com/docs/scroll-padding
5630
- */
5631
- "scroll-pe": [{ "scroll-pe": scaleUnambiguousSpacing() }],
5632
- /**
5633
- * Scroll Padding Block Start
5634
- * @see https://tailwindcss.com/docs/scroll-padding
5635
- */
5636
- "scroll-pbs": [{ "scroll-pbs": scaleUnambiguousSpacing() }],
5637
- /**
5638
- * Scroll Padding Block End
5639
- * @see https://tailwindcss.com/docs/scroll-padding
5640
- */
5641
- "scroll-pbe": [{ "scroll-pbe": scaleUnambiguousSpacing() }],
5642
- /**
5643
- * Scroll Padding Top
5644
- * @see https://tailwindcss.com/docs/scroll-padding
5645
- */
5646
- "scroll-pt": [{ "scroll-pt": scaleUnambiguousSpacing() }],
5647
- /**
5648
- * Scroll Padding Right
5649
- * @see https://tailwindcss.com/docs/scroll-padding
5650
- */
5651
- "scroll-pr": [{ "scroll-pr": scaleUnambiguousSpacing() }],
5652
- /**
5653
- * Scroll Padding Bottom
5654
- * @see https://tailwindcss.com/docs/scroll-padding
5655
- */
5656
- "scroll-pb": [{ "scroll-pb": scaleUnambiguousSpacing() }],
5657
- /**
5658
- * Scroll Padding Left
5659
- * @see https://tailwindcss.com/docs/scroll-padding
5660
- */
5661
- "scroll-pl": [{ "scroll-pl": scaleUnambiguousSpacing() }],
5662
- /**
5663
- * Scroll Snap Align
5664
- * @see https://tailwindcss.com/docs/scroll-snap-align
5665
- */
5666
- "snap-align": [{ snap: [
5667
- "start",
5668
- "end",
5669
- "center",
5670
- "align-none"
5671
- ] }],
5672
- /**
5673
- * Scroll Snap Stop
5674
- * @see https://tailwindcss.com/docs/scroll-snap-stop
5675
- */
5676
- "snap-stop": [{ snap: ["normal", "always"] }],
5677
- /**
5678
- * Scroll Snap Type
5679
- * @see https://tailwindcss.com/docs/scroll-snap-type
5680
- */
5681
- "snap-type": [{ snap: [
5682
- "none",
5683
- "x",
5684
- "y",
5685
- "both"
5686
- ] }],
5687
- /**
5688
- * Scroll Snap Type Strictness
5689
- * @see https://tailwindcss.com/docs/scroll-snap-type
5690
- */
5691
- "snap-strictness": [{ snap: ["mandatory", "proximity"] }],
5692
- /**
5693
- * Touch Action
5694
- * @see https://tailwindcss.com/docs/touch-action
5695
- */
5696
- touch: [{ touch: [
5697
- "auto",
5698
- "none",
5699
- "manipulation"
5700
- ] }],
5701
- /**
5702
- * Touch Action X
5703
- * @see https://tailwindcss.com/docs/touch-action
5704
- */
5705
- "touch-x": [{ "touch-pan": [
5706
- "x",
5707
- "left",
5708
- "right"
5709
- ] }],
5710
- /**
5711
- * Touch Action Y
5712
- * @see https://tailwindcss.com/docs/touch-action
5713
- */
5714
- "touch-y": [{ "touch-pan": [
5715
- "y",
5716
- "up",
5717
- "down"
5718
- ] }],
5719
- /**
5720
- * Touch Action Pinch Zoom
5721
- * @see https://tailwindcss.com/docs/touch-action
5722
- */
5723
- "touch-pz": ["touch-pinch-zoom"],
5724
- /**
5725
- * User Select
5726
- * @see https://tailwindcss.com/docs/user-select
5727
- */
5728
- select: [{ select: [
5729
- "none",
5730
- "text",
5731
- "all",
5732
- "auto"
5733
- ] }],
5734
- /**
5735
- * Will Change
5736
- * @see https://tailwindcss.com/docs/will-change
5737
- */
5738
- "will-change": [{ "will-change": [
5739
- "auto",
5740
- "scroll",
5741
- "contents",
5742
- "transform",
5743
- isArbitraryVariable,
5744
- isArbitraryValue
5745
- ] }],
5746
- /**
5747
- * Fill
5748
- * @see https://tailwindcss.com/docs/fill
5749
- */
5750
- fill: [{ fill: ["none", ...scaleColor()] }],
5751
- /**
5752
- * Stroke Width
5753
- * @see https://tailwindcss.com/docs/stroke-width
5754
- */
5755
- "stroke-w": [{ stroke: [
5756
- isNumber,
5757
- isArbitraryVariableLength,
5758
- isArbitraryLength,
5759
- isArbitraryNumber
5760
- ] }],
5761
- /**
5762
- * Stroke
5763
- * @see https://tailwindcss.com/docs/stroke
5764
- */
5765
- stroke: [{ stroke: ["none", ...scaleColor()] }],
5766
- /**
5767
- * Forced Color Adjust
5768
- * @see https://tailwindcss.com/docs/forced-color-adjust
5769
- */
5770
- "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
5771
- },
5772
- conflictingClassGroups: {
5773
- "container-named": ["container-type"],
5774
- overflow: ["overflow-x", "overflow-y"],
5775
- overscroll: ["overscroll-x", "overscroll-y"],
5776
- inset: [
5777
- "inset-x",
5778
- "inset-y",
5779
- "inset-bs",
5780
- "inset-be",
5781
- "start",
5782
- "end",
5783
- "top",
5784
- "right",
5785
- "bottom",
5786
- "left"
5787
- ],
5788
- "inset-x": [
5789
- "start",
5790
- "end",
5791
- "right",
5792
- "left"
5793
- ],
5794
- "inset-y": [
5795
- "inset-bs",
5796
- "inset-be",
5797
- "top",
5798
- "bottom"
5799
- ],
5800
- flex: [
5801
- "basis",
5802
- "grow",
5803
- "shrink"
5804
- ],
5805
- gap: ["gap-x", "gap-y"],
5806
- p: [
5807
- "px",
5808
- "py",
5809
- "ps",
5810
- "pe",
5811
- "pbs",
5812
- "pbe",
5813
- "pt",
5814
- "pr",
5815
- "pb",
5816
- "pl"
5817
- ],
5818
- px: [
5819
- "ps",
5820
- "pe",
5821
- "pr",
5822
- "pl"
5823
- ],
5824
- py: [
5825
- "pbs",
5826
- "pbe",
5827
- "pt",
5828
- "pb"
5829
- ],
5830
- m: [
5831
- "mx",
5832
- "my",
5833
- "ms",
5834
- "me",
5835
- "mbs",
5836
- "mbe",
5837
- "mt",
5838
- "mr",
5839
- "mb",
5840
- "ml"
5841
- ],
5842
- mx: [
5843
- "ms",
5844
- "me",
5845
- "mr",
5846
- "ml"
5847
- ],
5848
- my: [
5849
- "mbs",
5850
- "mbe",
5851
- "mt",
5852
- "mb"
5853
- ],
5854
- size: ["w", "h"],
5855
- "font-size": ["leading"],
5856
- "fvn-normal": [
5857
- "fvn-ordinal",
5858
- "fvn-slashed-zero",
5859
- "fvn-figure",
5860
- "fvn-spacing",
5861
- "fvn-fraction"
5862
- ],
5863
- "fvn-ordinal": ["fvn-normal"],
5864
- "fvn-slashed-zero": ["fvn-normal"],
5865
- "fvn-figure": ["fvn-normal"],
5866
- "fvn-spacing": ["fvn-normal"],
5867
- "fvn-fraction": ["fvn-normal"],
5868
- "line-clamp": ["display", "overflow"],
5869
- rounded: [
5870
- "rounded-s",
5871
- "rounded-e",
5872
- "rounded-t",
5873
- "rounded-r",
5874
- "rounded-b",
5875
- "rounded-l",
5876
- "rounded-ss",
5877
- "rounded-se",
5878
- "rounded-ee",
5879
- "rounded-es",
5880
- "rounded-tl",
5881
- "rounded-tr",
5882
- "rounded-br",
5883
- "rounded-bl"
5884
- ],
5885
- "rounded-s": ["rounded-ss", "rounded-es"],
5886
- "rounded-e": ["rounded-se", "rounded-ee"],
5887
- "rounded-t": ["rounded-tl", "rounded-tr"],
5888
- "rounded-r": ["rounded-tr", "rounded-br"],
5889
- "rounded-b": ["rounded-br", "rounded-bl"],
5890
- "rounded-l": ["rounded-tl", "rounded-bl"],
5891
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
5892
- "border-w": [
5893
- "border-w-x",
5894
- "border-w-y",
5895
- "border-w-s",
5896
- "border-w-e",
5897
- "border-w-bs",
5898
- "border-w-be",
5899
- "border-w-t",
5900
- "border-w-r",
5901
- "border-w-b",
5902
- "border-w-l"
5903
- ],
5904
- "border-w-x": [
5905
- "border-w-s",
5906
- "border-w-e",
5907
- "border-w-r",
5908
- "border-w-l"
5909
- ],
5910
- "border-w-y": [
5911
- "border-w-bs",
5912
- "border-w-be",
5913
- "border-w-t",
5914
- "border-w-b"
5915
- ],
5916
- "border-color": [
5917
- "border-color-x",
5918
- "border-color-y",
5919
- "border-color-s",
5920
- "border-color-e",
5921
- "border-color-bs",
5922
- "border-color-be",
5923
- "border-color-t",
5924
- "border-color-r",
5925
- "border-color-b",
5926
- "border-color-l"
5927
- ],
5928
- "border-color-x": [
5929
- "border-color-s",
5930
- "border-color-e",
5931
- "border-color-r",
5932
- "border-color-l"
5933
- ],
5934
- "border-color-y": [
5935
- "border-color-bs",
5936
- "border-color-be",
5937
- "border-color-t",
5938
- "border-color-b"
5939
- ],
5940
- translate: [
5941
- "translate-x",
5942
- "translate-y",
5943
- "translate-none"
5944
- ],
5945
- "translate-none": [
5946
- "translate",
5947
- "translate-x",
5948
- "translate-y",
5949
- "translate-z"
5950
- ],
5951
- "scroll-m": [
5952
- "scroll-mx",
5953
- "scroll-my",
5954
- "scroll-ms",
5955
- "scroll-me",
5956
- "scroll-mbs",
5957
- "scroll-mbe",
5958
- "scroll-mt",
5959
- "scroll-mr",
5960
- "scroll-mb",
5961
- "scroll-ml"
5962
- ],
5963
- "scroll-mx": [
5964
- "scroll-ms",
5965
- "scroll-me",
5966
- "scroll-mr",
5967
- "scroll-ml"
5968
- ],
5969
- "scroll-my": [
5970
- "scroll-mbs",
5971
- "scroll-mbe",
5972
- "scroll-mt",
5973
- "scroll-mb"
5974
- ],
5975
- "scroll-p": [
5976
- "scroll-px",
5977
- "scroll-py",
5978
- "scroll-ps",
5979
- "scroll-pe",
5980
- "scroll-pbs",
5981
- "scroll-pbe",
5982
- "scroll-pt",
5983
- "scroll-pr",
5984
- "scroll-pb",
5985
- "scroll-pl"
5986
- ],
5987
- "scroll-px": [
5988
- "scroll-ps",
5989
- "scroll-pe",
5990
- "scroll-pr",
5991
- "scroll-pl"
5992
- ],
5993
- "scroll-py": [
5994
- "scroll-pbs",
5995
- "scroll-pbe",
5996
- "scroll-pt",
5997
- "scroll-pb"
5998
- ],
5999
- touch: [
6000
- "touch-x",
6001
- "touch-y",
6002
- "touch-pz"
6003
- ],
6004
- "touch-x": ["touch"],
6005
- "touch-y": ["touch"],
6006
- "touch-pz": ["touch"]
6007
- },
6008
- conflictingClassGroupModifiers: { "font-size": ["leading"] },
6009
- postfixLookupClassGroups: ["container-type"],
6010
- orderSensitiveModifiers: [
6011
- "*",
6012
- "**",
6013
- "after",
6014
- "backdrop",
6015
- "before",
6016
- "details-content",
6017
- "file",
6018
- "first-letter",
6019
- "first-line",
6020
- "marker",
6021
- "placeholder",
6022
- "selection"
6023
- ]
6024
- };
6025
- };
6026
- const twMerge = /*#__PURE__*/ createTailwindMerge(getDefaultConfig);
6027
- //#endregion
6028
- //#region node_modules/@tangle-network/ui/dist/lib/utils.js
6029
- function cn(...inputs) {
6030
- return twMerge(clsx(inputs));
6031
- }
6032
- //#endregion
6033
- //#region node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
6034
- /**
6035
- * @license lucide-react v1.63.0 - ISC
6036
- *
6037
- * This source code is licensed under the ISC license.
6038
- * See the LICENSE file in the root directory of this source tree.
6039
- */
6040
- const toKebabCase = (string) => string?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
6041
- //#endregion
6042
- //#region node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
6043
- /**
6044
- * @license lucide-react v1.63.0 - ISC
6045
- *
6046
- * This source code is licensed under the ISC license.
6047
- * See the LICENSE file in the root directory of this source tree.
6048
- */
6049
- function toLucideIconData(iconName, iconNode, aliases = []) {
6050
- if (iconNode == null) throw new Error("[lucide]: iconNode is required when icon name is used");
6051
- return {
6052
- name: toKebabCase(iconName),
6053
- size: 24,
6054
- node: iconNode,
6055
- ...aliases.length > 0 ? { aliases } : {}
6056
- };
6057
- }
6058
- //#endregion
6059
- //#region node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
6060
- /**
6061
- * @license lucide-react v1.63.0 - ISC
6062
- *
6063
- * This source code is licensed under the ISC license.
6064
- * See the LICENSE file in the root directory of this source tree.
6065
- */
6066
- const toCamelCase = (string) => {
6067
- let out = "";
6068
- let upperNext = false;
6069
- for (const ch of string) {
6070
- if (ch === "-" || ch === "_" || ch <= " ") {
6071
- upperNext = out.length > 0;
6072
- continue;
6073
- }
6074
- if (out.length === 0) out += ch.toLowerCase();
6075
- else out += upperNext ? ch.toUpperCase() : ch;
6076
- upperNext = false;
6077
- }
6078
- return out;
6079
- };
6080
- //#endregion
6081
- //#region node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
6082
- /**
6083
- * @license lucide-react v1.63.0 - ISC
6084
- *
6085
- * This source code is licensed under the ISC license.
6086
- * See the LICENSE file in the root directory of this source tree.
6087
- */
6088
- const toPascalCase = (string) => {
6089
- const camelCase = toCamelCase(string);
6090
- return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
6091
- };
6092
- //#endregion
6093
- //#region node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
6094
- /**
6095
- * @license lucide-react v1.63.0 - ISC
6096
- *
6097
- * This source code is licensed under the ISC license.
6098
- * See the LICENSE file in the root directory of this source tree.
6099
- */
6100
- const mergeClasses = (...classes) => classes.filter((className, index, array) => {
6101
- return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
6102
- }).join(" ").trim();
6103
- //#endregion
6104
- //#region node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs
6105
- /**
6106
- * @license lucide-react v1.63.0 - ISC
6107
- *
6108
- * This source code is licensed under the ISC license.
6109
- * See the LICENSE file in the root directory of this source tree.
6110
- */
6111
- const defaultAttributes = {
6112
- xmlns: "http://www.w3.org/2000/svg",
6113
- width: 24,
6114
- height: 24,
6115
- viewBox: "0 0 24 24",
6116
- fill: "none",
6117
- stroke: "currentColor",
6118
- "stroke-width": 2,
6119
- "stroke-linecap": "round",
6120
- "stroke-linejoin": "round"
6121
- };
6122
- //#endregion
6123
- //#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
6124
- /**
6125
- * @license lucide-react v1.63.0 - ISC
6126
- *
6127
- * This source code is licensed under the ISC license.
6128
- * See the LICENSE file in the root directory of this source tree.
6129
- */
6130
- function isDefined(value) {
6131
- return value !== null && value !== void 0;
6132
- }
6133
- function buildLucideIconNode(icon, params = {}) {
6134
- const attributeNames = params.attributeNames ?? {};
6135
- const getAttributeName = (attributeName) => attributeNames[attributeName] ?? attributeName;
6136
- const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes["width"];
6137
- const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes["height"];
6138
- const aliasClassNames = icon.aliases?.filter((alias) => typeof alias === "string" && alias.trim() !== "").map((alias) => `lucide-${alias}`) ?? [];
6139
- const iconClassNames = [...icon.name ? [`lucide-${icon.name}`] : [], ...aliasClassNames];
6140
- const classNamesFromClassName = params.className?.split(" ").filter(Boolean) ?? [];
6141
- const className = params.includeDefaultClasses === false ? mergeClasses(...classNamesFromClassName) : mergeClasses("lucide", ...iconClassNames, ...classNamesFromClassName);
6142
- const calculatedStrokeWidth = params.absoluteStrokeWidth ? Number(params.strokeWidth ?? defaultAttributes["stroke-width"]) * Number(icon.size ?? icon.width ?? defaultAttributes["width"]) / Number(params.size ?? params.width ?? defaultAttributes["width"]) : params.strokeWidth ?? defaultAttributes["stroke-width"];
6143
- return [
6144
- "svg",
6145
- {
6146
- ...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {
6147
- attrs[getAttributeName(attrName)] = value;
6148
- return attrs;
6149
- }, {}),
6150
- ..."color" in params && params.color && { [getAttributeName("stroke")]: params.color },
6151
- ..."size" in params && isDefined(params.size) && {
6152
- [getAttributeName("width")]: params.size,
6153
- [getAttributeName("height")]: params.size
6154
- },
6155
- ..."width" in params && isDefined(params.width) && { [getAttributeName("width")]: params.width },
6156
- ..."height" in params && isDefined(params.height) && { [getAttributeName("height")]: params.height },
6157
- [getAttributeName("stroke-width")]: calculatedStrokeWidth,
6158
- ...className && { [getAttributeName("class")]: className },
6159
- [getAttributeName("viewBox")]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,
6160
- ...params.hasA11yProp === false ? { [getAttributeName("aria-hidden")]: "true" } : {},
6161
- ..."attributes" in params && params.attributes
6162
- },
6163
- icon.node.map((child) => {
6164
- const [name, attrs, children] = child;
6165
- const nextAttrs = params.nonScalingStroke ? {
6166
- [getAttributeName("vector-effect")]: "non-scaling-stroke",
6167
- ...attrs
6168
- } : attrs;
6169
- return children ? [
6170
- name,
6171
- nextAttrs,
6172
- children
6173
- ] : [name, nextAttrs];
6174
- })
6175
- ];
6176
- }
6177
- //#endregion
6178
- //#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
6179
- /**
6180
- * @license lucide-react v1.63.0 - ISC
6181
- *
6182
- * This source code is licensed under the ISC license.
6183
- * See the LICENSE file in the root directory of this source tree.
6184
- */
6185
- function buildLucideIconForReact(icon, params = {}) {
6186
- return buildLucideIconNode(icon, {
6187
- ...params,
6188
- attributeNames: {
6189
- ...params.attributeNames,
6190
- class: "className",
6191
- "stroke-width": "strokeWidth",
6192
- "stroke-linecap": "strokeLinecap",
6193
- "stroke-linejoin": "strokeLinejoin",
6194
- "vector-effect": "vectorEffect"
6195
- }
6196
- });
6197
- }
6198
- //#endregion
6199
- //#region node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
6200
- /**
6201
- * @license lucide-react v1.63.0 - ISC
6202
- *
6203
- * This source code is licensed under the ISC license.
6204
- * See the LICENSE file in the root directory of this source tree.
6205
- */
6206
- const hasA11yProp = (props) => {
6207
- for (const prop in props) if (prop.startsWith("aria-") || prop === "role" || prop === "title") return true;
6208
- return false;
6209
- };
6210
- //#endregion
6211
- //#region node_modules/lucide-react/dist/esm/context.mjs
6212
- /**
6213
- * @license lucide-react v1.63.0 - ISC
6214
- *
6215
- * This source code is licensed under the ISC license.
6216
- * See the LICENSE file in the root directory of this source tree.
6217
- */
6218
- const LucideContext = createContext({});
6219
- const useLucideContext = () => useContext(LucideContext);
6220
- //#endregion
6221
- //#region node_modules/lucide-react/dist/esm/Icon.mjs
6222
- /**
6223
- * @license lucide-react v1.63.0 - ISC
6224
- *
6225
- * This source code is licensed under the ISC license.
6226
- * See the LICENSE file in the root directory of this source tree.
6227
- */
6228
- const Icon = forwardRef(({ color, size, width, height, strokeWidth, absoluteStrokeWidth, nonScalingStroke, className = "", children, iconNode = [], icon = {
6229
- node: iconNode,
6230
- aliases: [],
6231
- size: 24
6232
- }, ...rest }, ref) => {
6233
- const { size: contextSize = 24, strokeWidth: contextStrokeWidth = 2, absoluteStrokeWidth: contextAbsoluteStrokeWidth = false, nonScalingStroke: contextNonScalingStroke = false, color: contextColor = "currentColor", className: contextClass = "" } = useLucideContext() ?? {};
6234
- const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);
6235
- const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {
6236
- color: color ?? contextColor,
6237
- width: width ?? size ?? contextSize,
6238
- height: height ?? size ?? contextSize,
6239
- strokeWidth: strokeWidth ?? contextStrokeWidth,
6240
- absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,
6241
- nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,
6242
- className: mergeClasses(contextClass, className),
6243
- hasA11yProp: hasAccessibleProp,
6244
- attributes: rest
6245
- });
6246
- return createElement(name, {
6247
- ref,
6248
- ...svgAttributes
6249
- }, [...builtIconNode.map(([tag, attrs]) => createElement(tag, attrs)), ...Array.isArray(children) ? children : [children]]);
6250
- });
6251
- //#endregion
6252
- //#region node_modules/lucide-react/dist/esm/createLucideIcon.mjs
6253
- /**
6254
- * @license lucide-react v1.63.0 - ISC
6255
- *
6256
- * This source code is licensed under the ISC license.
6257
- * See the LICENSE file in the root directory of this source tree.
6258
- */
6259
- function createLucideIcon(iconDataOrName, iconNode = [], aliases = []) {
6260
- const iconData = typeof iconDataOrName === "string" ? toLucideIconData(iconDataOrName, iconNode, aliases) : iconDataOrName;
6261
- const Component = forwardRef(({ className, ...props }, ref) => createElement(Icon, {
6262
- ref,
6263
- icon: iconData,
6264
- className,
6265
- ...props
6266
- }));
6267
- if (iconData.name) Component.displayName = toPascalCase(iconData.name);
6268
- return Component;
6269
- }
6270
- //#endregion
6271
- //#region node_modules/lucide-react/dist/esm/icons/circle-check.mjs
6272
- /**
6273
- * @license lucide-react v1.63.0 - ISC
6274
- *
6275
- * This source code is licensed under the ISC license.
6276
- * See the LICENSE file in the root directory of this source tree.
6277
- */
6278
- const __iconData$7 = {
6279
- name: "circle-check",
6280
- size: 24,
6281
- node: [["circle", {
6282
- cx: "12",
6283
- cy: "12",
6284
- r: "10",
6285
- key: "1mglay"
6286
- }], ["path", {
6287
- d: "m16 9-5.5 5.5L8 12",
6288
- key: "xofnsj"
6289
- }]],
6290
- aliases: ["check-circle-2"]
6291
- };
6292
- __iconData$7.node;
6293
- const CircleCheck = createLucideIcon(__iconData$7);
6294
- //#endregion
6295
- //#region node_modules/lucide-react/dist/esm/icons/circle-dashed.mjs
6296
- /**
6297
- * @license lucide-react v1.63.0 - ISC
6298
- *
6299
- * This source code is licensed under the ISC license.
6300
- * See the LICENSE file in the root directory of this source tree.
6301
- */
6302
- const __iconData$6 = {
6303
- name: "circle-dashed",
6304
- size: 24,
6305
- node: [
6306
- ["path", {
6307
- d: "M10.1 2.182a10 10 0 0 1 3.8 0",
6308
- key: "5ilxe3"
6309
- }],
6310
- ["path", {
6311
- d: "M13.9 21.818a10 10 0 0 1-3.8 0",
6312
- key: "11zvb9"
6313
- }],
6314
- ["path", {
6315
- d: "M17.609 3.721a10 10 0 0 1 2.69 2.7",
6316
- key: "1iw5b2"
6317
- }],
6318
- ["path", {
6319
- d: "M2.182 13.9a10 10 0 0 1 0-3.8",
6320
- key: "c0bmvh"
6321
- }],
6322
- ["path", {
6323
- d: "M20.279 17.609a10 10 0 0 1-2.7 2.69",
6324
- key: "1ruxm7"
6325
- }],
6326
- ["path", {
6327
- d: "M21.818 10.1a10 10 0 0 1 0 3.8",
6328
- key: "qkgqxc"
6329
- }],
6330
- ["path", {
6331
- d: "M3.721 6.391a10 10 0 0 1 2.7-2.69",
6332
- key: "1mcia2"
6333
- }],
6334
- ["path", {
6335
- d: "M6.391 20.279a10 10 0 0 1-2.69-2.7",
6336
- key: "1fvljs"
6337
- }]
6338
- ]
6339
- };
6340
- __iconData$6.node;
6341
- const CircleDashed = createLucideIcon(__iconData$6);
6342
- //#endregion
6343
- //#region node_modules/lucide-react/dist/esm/icons/circle-dot.mjs
6344
- /**
6345
- * @license lucide-react v1.63.0 - ISC
6346
- *
6347
- * This source code is licensed under the ISC license.
6348
- * See the LICENSE file in the root directory of this source tree.
6349
- */
6350
- const __iconData$5 = {
6351
- name: "circle-dot",
6352
- size: 24,
6353
- node: [["circle", {
6354
- cx: "12",
6355
- cy: "12",
6356
- r: "1",
6357
- key: "41hilf"
6358
- }], ["circle", {
6359
- cx: "12",
6360
- cy: "12",
6361
- r: "10",
6362
- key: "1mglay"
6363
- }]]
6364
- };
6365
- __iconData$5.node;
6366
- const CircleDot = createLucideIcon(__iconData$5);
6367
- //#endregion
6368
- //#region node_modules/lucide-react/dist/esm/icons/circle-question-mark.mjs
6369
- /**
6370
- * @license lucide-react v1.63.0 - ISC
6371
- *
6372
- * This source code is licensed under the ISC license.
6373
- * See the LICENSE file in the root directory of this source tree.
6374
- */
6375
- const __iconData$4 = {
6376
- name: "circle-question-mark",
6377
- size: 24,
6378
- node: [
6379
- ["circle", {
6380
- cx: "12",
6381
- cy: "12",
6382
- r: "10",
6383
- key: "1mglay"
6384
- }],
6385
- ["path", {
6386
- d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",
6387
- key: "1u773s"
6388
- }],
6389
- ["path", {
6390
- d: "M12 17h.01",
6391
- key: "p32p05"
6392
- }]
6393
- ],
6394
- aliases: ["help-circle", "circle-help"]
6395
- };
6396
- __iconData$4.node;
6397
- const CircleQuestionMark = createLucideIcon(__iconData$4);
6398
- //#endregion
6399
- //#region node_modules/lucide-react/dist/esm/icons/circle-stop.mjs
6400
- /**
6401
- * @license lucide-react v1.63.0 - ISC
6402
- *
6403
- * This source code is licensed under the ISC license.
6404
- * See the LICENSE file in the root directory of this source tree.
6405
- */
6406
- const __iconData$3 = {
6407
- name: "circle-stop",
6408
- size: 24,
6409
- node: [["circle", {
6410
- cx: "12",
6411
- cy: "12",
6412
- r: "10",
6413
- key: "1mglay"
6414
- }], ["rect", {
6415
- x: "9",
6416
- y: "9",
6417
- width: "6",
6418
- height: "6",
6419
- rx: "1",
6420
- key: "1ssd4o"
6421
- }]],
6422
- aliases: ["stop-circle"]
6423
- };
6424
- __iconData$3.node;
6425
- const CircleStop = createLucideIcon(__iconData$3);
6426
- //#endregion
6427
- //#region node_modules/lucide-react/dist/esm/icons/circle-x.mjs
6428
- /**
6429
- * @license lucide-react v1.63.0 - ISC
6430
- *
6431
- * This source code is licensed under the ISC license.
6432
- * See the LICENSE file in the root directory of this source tree.
6433
- */
6434
- const __iconData$2 = {
6435
- name: "circle-x",
6436
- size: 24,
6437
- node: [
6438
- ["circle", {
6439
- cx: "12",
6440
- cy: "12",
6441
- r: "10",
6442
- key: "1mglay"
6443
- }],
6444
- ["path", {
6445
- d: "m15 9-6 6",
6446
- key: "1uzhvr"
6447
- }],
6448
- ["path", {
6449
- d: "m9 9 6 6",
6450
- key: "z0biqf"
6451
- }]
6452
- ],
6453
- aliases: ["x-circle"]
6454
- };
6455
- __iconData$2.node;
6456
- const CircleX = createLucideIcon(__iconData$2);
6457
- //#endregion
6458
- //#region node_modules/lucide-react/dist/esm/icons/hand.mjs
6459
- /**
6460
- * @license lucide-react v1.63.0 - ISC
6461
- *
6462
- * This source code is licensed under the ISC license.
6463
- * See the LICENSE file in the root directory of this source tree.
6464
- */
6465
- const __iconData$1 = {
6466
- name: "hand",
6467
- size: 24,
6468
- node: [
6469
- ["path", {
6470
- d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",
6471
- key: "1fvzgz"
6472
- }],
6473
- ["path", {
6474
- d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",
6475
- key: "1kc0my"
6476
- }],
6477
- ["path", {
6478
- d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",
6479
- key: "10h0bg"
6480
- }],
6481
- ["path", {
6482
- d: "M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",
6483
- key: "1s1gnw"
6484
- }]
6485
- ]
6486
- };
6487
- __iconData$1.node;
6488
- const Hand = createLucideIcon(__iconData$1);
6489
- //#endregion
6490
- //#region node_modules/lucide-react/dist/esm/icons/hourglass.mjs
6491
- /**
6492
- * @license lucide-react v1.63.0 - ISC
6493
- *
6494
- * This source code is licensed under the ISC license.
6495
- * See the LICENSE file in the root directory of this source tree.
6496
- */
6497
- const __iconData = {
6498
- name: "hourglass",
6499
- size: 24,
6500
- node: [
6501
- ["path", {
6502
- d: "M5 22h14",
6503
- key: "ehvnwv"
6504
- }],
6505
- ["path", {
6506
- d: "M5 2h14",
6507
- key: "pdyrp9"
6508
- }],
6509
- ["path", {
6510
- d: "M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",
6511
- key: "1d314k"
6512
- }],
6513
- ["path", {
6514
- d: "M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",
6515
- key: "1vvvr6"
6516
- }]
6517
- ]
6518
- };
6519
- __iconData.node;
6520
- const Hourglass = createLucideIcon(__iconData);
6521
- //#endregion
6522
- //#region node_modules/@tangle-network/ui/dist/run/status-meta.js
6523
- const META = {
6524
- running: {
6525
- label: "Running",
6526
- icon: CircleDot,
6527
- token: "--surface-info-text"
6528
- },
6529
- waiting: {
6530
- label: "Waiting",
6531
- icon: Hourglass,
6532
- token: "--surface-neutral-text"
6533
- },
6534
- "needs-you": {
6535
- label: "Needs you",
6536
- icon: Hand,
6537
- token: "--surface-warning-text"
6538
- },
6539
- done: {
6540
- label: "Done",
6541
- icon: CircleCheck,
6542
- token: "--surface-success-text"
6543
- },
6544
- failed: {
6545
- label: "Failed",
6546
- icon: CircleX,
6547
- token: "--surface-danger-text"
6548
- },
6549
- stopped: {
6550
- label: "Stopped",
6551
- icon: CircleStop,
6552
- token: "--surface-neutral-text"
6553
- },
6554
- idle: {
6555
- label: "Idle",
6556
- icon: CircleDashed,
6557
- token: "--surface-neutral-text"
6558
- },
6559
- unknown: {
6560
- label: "Unknown",
6561
- icon: CircleQuestionMark,
6562
- token: "--surface-neutral-text"
6563
- }
6564
- };
6565
- const ALIASES = {
6566
- active: "running",
6567
- in_progress: "running",
6568
- "in-progress": "running",
6569
- streaming: "running",
6570
- pending: "waiting",
6571
- queued: "waiting",
6572
- blocked: "waiting",
6573
- "attention-needed": "needs-you",
6574
- needs_you: "needs-you",
6575
- needs_input: "needs-you",
6576
- awaiting_input: "needs-you",
6577
- completed: "done",
6578
- complete: "done",
6579
- success: "done",
6580
- succeeded: "done",
6581
- shipped: "done",
6582
- error: "failed",
6583
- errored: "failed",
6584
- cancelled: "stopped",
6585
- canceled: "stopped",
6586
- aborted: "stopped"
6587
- };
6588
- /** Any status string as a `RunStatus`; a value nothing names reads as Unknown, never as a guess. */
6589
- function runStatus(status) {
6590
- const key = status.trim().toLowerCase();
6591
- if (Object.hasOwn(META, key)) return key;
6592
- return Object.hasOwn(ALIASES, key) ? ALIASES[key] : "unknown";
6593
- }
6594
- /** The label, glyph and colour token for a status, in every surface. */
6595
- function statusMeta(status) {
6596
- return META[runStatus(status)];
6597
- }
6598
- /**
6599
- * A status glyph on the icon grid, in its token colour and labelled with its
6600
- * word. Pass `aria-hidden` where the label is already printed beside it.
6601
- * Running breathes on `--motion-ambient`, the page's one loop period; the
6602
- * breathe is opacity only, so it is the essential motion reduced motion keeps.
6603
- */
6604
- function RunStatusIcon({ status, className, style, ...props }) {
6605
- const key = runStatus(status);
6606
- const { label, icon: Icon, token } = META[key];
6607
- const running = key === "running";
6608
- return /* @__PURE__ */ jsx(Icon, {
6609
- role: "img",
6610
- "aria-label": label,
6611
- size: 16,
6612
- strokeWidth: 1.75,
6613
- "data-run-status": key,
6614
- "data-motion": running ? "essential" : void 0,
6615
- className: cn("shrink-0", running && "animate-[tangle-breathe_var(--motion-ambient)_infinite]", className),
6616
- style: {
6617
- color: `var(${token})`,
6618
- ...style
6619
- },
6620
- ...props
6621
- });
6622
- }
6623
- //#endregion
6624
- //#region src/react/flow-waterfall-model.ts
6625
- const workKind = (mark) => mark.kind === "model" || mark.modelCall ? "model" : "tool";
6626
- const toolOf = (name) => name?.split(" · ")[0];
6627
- /** The CSS hue slot: 0 is the root agent's neutral, then five agent hues cycle. */
6628
- const toneKey = (tone) => tone > 0 && tone <= 5 ? tone : 0;
6629
- const spanFailed = (span) => span.status === "failed";
6630
- const spanRunning = (span) => span.status === "running";
6631
- const spanFact = (span, label) => new Map((span.facts ?? []).map((fact) => [fact.label.toLowerCase(), fact.value])).get(label.toLowerCase());
6632
- const ordered = (span) => Number.isFinite(span.startMs) && Number.isFinite(span.endMs) && span.endMs >= span.startMs;
6633
- /** 542ms, 6.9s, 23s, 1m 22s, 2h 05m: the precision a reader compares at each scale. */
6634
- function formatSpanDuration(ms) {
6635
- if (!Number.isFinite(ms) || ms < 0) return "—";
6636
- if (ms < 1e3) return `${Math.round(ms)}ms`;
6637
- if (ms < 1e4) return `${(ms / 1e3).toFixed(1)}s`;
6638
- if (ms < 6e4) return `${Math.round(ms / 1e3)}s`;
6639
- if (ms < 36e5) {
6640
- const m = Math.floor(ms / 6e4), s = Math.round(ms % 6e4 / 1e3);
6641
- return s === 60 ? `${m + 1}m` : s ? `${m}m ${s}s` : `${m}m`;
6642
- }
6643
- const h = Math.floor(ms / 36e5), m = Math.round(ms % 36e5 / 6e4);
6644
- return m === 60 ? `${h + 1}h` : `${h}h ${String(m).padStart(2, "0")}m`;
6645
- }
6646
- /** $0.12, $0.005, $12.40; never rounds a recorded nonzero cost to $0.00. */
6647
- function formatCost(usd) {
6648
- if (finiteNumber(usd) === void 0) return "—";
6649
- if (usd === 0) return "$0.00";
6650
- if (usd < .01) return `$${usd.toPrecision(1).replace(/0+$/, "")}`;
6651
- return `$${usd.toFixed(2)}`;
6652
- }
6653
- /** 9.8k, 754.4k, 1.2M with the exact count left to a title. */
6654
- function formatCount(n) {
6655
- if (reportedCount(n) === void 0) return "—";
6656
- if (n < 1e3) return String(n);
6657
- if (n < 1e6) return `${(n / 1e3).toFixed(1)}K`;
6658
- return `${(n / 1e6).toFixed(1)}M`;
6659
- }
6660
- /** Merge marks closer than `gapMs` so a dense row stays a readable strip of at most `cap` marks. Marks narrower
6661
- * than the gap merge across kinds and take the kind that covers more time; failures and retries stay distinct. */
6662
- function mergeSegments(marks, gapMs, cap = 240) {
6663
- marks.sort((a, b) => a.startMs - b.startMs);
6664
- let gap = gapMs;
6665
- for (let pass = 0; pass < 40; pass++, gap *= 2) {
6666
- const out = [];
6667
- const covered = /* @__PURE__ */ new Map();
6668
- for (const mark of marks) {
6669
- const last = out[out.length - 1];
6670
- const width = Math.min(mark.endMs, mark.startMs + gap * 4) - mark.startMs;
6671
- const distinct = (m) => m.retry || m.kind === "failed";
6672
- const small = width < gap || last !== void 0 && last.endMs - last.startMs < gap;
6673
- if (last && !distinct(last) && !distinct(mark) && last.tone === mark.tone && mark.startMs - last.endMs <= gap && (last.kind === mark.kind || small)) {
6674
- const share = covered.get(last) ?? {
6675
- model: last.kind === "model" ? last.endMs - last.startMs : 0,
6676
- tool: last.kind === "tool" ? last.endMs - last.startMs : 0
6677
- };
6678
- share[mark.kind === "model" ? "model" : "tool"] += width;
6679
- covered.set(last, share);
6680
- last.endMs = Math.max(last.endMs, mark.endMs);
6681
- last.count += mark.count;
6682
- if (last.tool !== mark.tool) last.tool = void 0;
6683
- if (mark.costUsd !== void 0) last.costUsd = (last.costUsd ?? 0) + mark.costUsd;
6684
- last.kind = share.model >= share.tool ? "model" : "tool";
6685
- } else out.push({ ...mark });
6686
- }
6687
- if (out.length <= cap) return out;
6688
- }
6689
- return marks;
6690
- }
6691
- /** Hierarchy only; presentation owns geometry.
6692
- * Orphaned parents become roots; cycles are broken without dropping any span. */
6693
- function flowWaterfallRows(trace, resolutionMs) {
6694
- const ids = /* @__PURE__ */ new Set();
6695
- const rows = [...trace.spans].map((recorded, i) => {
6696
- const state = runStatus(recorded.status ?? "unknown");
6697
- const outcome = {
6698
- label: statusMeta(state).label,
6699
- tone: state === "running" ? "live" : state === "done" ? "ok" : state === "needs-you" ? "warn" : state === "failed" ? "failed" : "neutral",
6700
- ...state === "unknown" ? { ring: true } : {}
6701
- };
6702
- const span = {
6703
- ...recorded,
6704
- outcome: recorded.outcome ?? outcome,
6705
- detail: spanFact(recorded, recorded.kind === "tool" ? "Provider" : "Model") ?? recorded.detail
6706
- };
6707
- return {
6708
- span,
6709
- key: span.id ?? `span-${i}`
6710
- };
6711
- }).sort((a, b) => a.span.startMs - b.span.startMs).map(({ span, key }, index) => {
6712
- let id = key;
6713
- let suffix = index;
6714
- while (ids.has(id)) id = `${key}:${suffix++}`;
6715
- ids.add(id);
6716
- return {
6717
- id,
6718
- parentId: span.parentId,
6719
- name: span.name,
6720
- kind: span.kind,
6721
- durationLabel: ordered(span) ? `${formatSpanDuration(span.endMs - span.startMs)}${span.approx ? "~" : ""}` : "—",
6722
- approx: span.approx === true,
6723
- ok: !spanFailed(span),
6724
- depth: 0,
6725
- hasChildren: false,
6726
- span,
6727
- tone: -1,
6728
- descendants: 0,
6729
- segments: [],
6730
- own: [],
6731
- retry: span.retryOf !== void 0,
6732
- hasAgents: false,
6733
- ...span.costBound === "lower" || span.costBound === void 0 && trace.costBound === "lower" ? { costFloor: true } : {}
6734
- };
6735
- });
6736
- const byId = new Map(rows.map((row) => [row.id, row]));
6737
- const children = /* @__PURE__ */ new Map();
6738
- for (const row of rows) {
6739
- const seen = /* @__PURE__ */ new Set([row.id]);
6740
- let parent = row.parentId;
6741
- while (parent && byId.has(parent)) {
6742
- if (seen.has(parent)) {
6743
- row.parentId = void 0;
6744
- break;
6745
- }
6746
- seen.add(parent);
6747
- parent = byId.get(parent)?.parentId;
6748
- }
6749
- if (row.parentId && !byId.has(row.parentId)) row.parentId = void 0;
6750
- if (row.parentId) {
6751
- const siblings = children.get(row.parentId) ?? [];
6752
- siblings.push(row);
6753
- children.set(row.parentId, siblings);
6754
- }
6755
- }
6756
- const total = Math.max(1, Number.isFinite(trace.totalMs) ? trace.totalMs : 1);
6757
- const gap = resolutionMs ?? total / 900;
6758
- const ordered_ = [];
6759
- let agents = 0;
6760
- const visit = (row, depth, tone) => {
6761
- row.depth = depth;
6762
- row.tone = row.kind === "pipeline" ? agents++ : tone;
6763
- const kids = children.get(row.id) ?? [];
6764
- row.hasChildren = kids.length > 0;
6765
- ordered_.push(row);
6766
- const marks = [];
6767
- const own = row.span.promptTokens !== void 0 || row.span.completionTokens !== void 0 || row.span.cachedTokens !== void 0;
6768
- let cost = row.span.costUsd ?? 0;
6769
- let costKnown = row.span.kind !== "model" || row.span.costUsd !== void 0;
6770
- for (const child of kids) {
6771
- for (const mark of visit(child, depth + 1, row.tone)) marks.push(mark);
6772
- row.descendants += 1 + child.descendants;
6773
- if (child.kind === "pipeline") row.hasAgents = true;
6774
- const childCost = child.hasChildren ? child.rollupCostUsd : child.span.costUsd;
6775
- if (childCost === void 0) {
6776
- if (child.kind === "model" || child.hasChildren) costKnown = false;
6777
- } else cost += childCost;
6778
- if (child.kind !== "pipeline" && child.kind !== "waiting" && ordered(child.span)) row.own.push(segmentOf(child));
6779
- }
6780
- Object.assign(row, stepStats(kids));
6781
- const tokens = own ? {
6782
- prompt: reportedCount(row.span.promptTokens),
6783
- completion: reportedCount(row.span.completionTokens),
6784
- cached: reportedCount(row.span.cachedTokens)
6785
- } : sumTokens(kids);
6786
- if (tokens) row.tokens = tokens;
6787
- if (row.hasChildren && costKnown) row.rollupCostUsd = cost;
6788
- if (row.hasChildren) {
6789
- row.segments = mergeSegments(marks.map((mark) => ({ ...mark })), gap);
6790
- row.own = mergeSegments(row.own, gap);
6791
- }
6792
- if (row.kind === "pipeline" || row.kind === "waiting" || !ordered(row.span)) return marks;
6793
- marks.push(segmentOf(row));
6794
- return marks;
6795
- };
6796
- for (const row of rows) if (!row.parentId) visit(row, 0, -1);
6797
- return ordered_;
6798
- }
6799
- /** What a row's direct steps add up to; nothing when it has none. */
6800
- function stepStats(steps) {
6801
- let counts;
6802
- const modelMs = [];
6803
- for (const step of steps) {
6804
- if (step.kind === "pipeline" || step.kind === "waiting" || !ordered(step.span)) continue;
6805
- counts ??= {
6806
- model: 0,
6807
- tool: 0,
6808
- failed: 0,
6809
- retried: 0,
6810
- tools: {}
6811
- };
6812
- if (!step.ok) counts.failed++;
6813
- if (step.retry) counts.retried++;
6814
- if (step.kind === "model") {
6815
- counts.model++;
6816
- if (!spanRunning(step.span)) modelMs.push(step.span.endMs - step.span.startMs);
6817
- } else {
6818
- counts.tool++;
6819
- const tool = toolOf(step.name) || step.kind;
6820
- counts.tools[tool] = (counts.tools[tool] ?? 0) + 1;
6821
- }
6822
- }
6823
- return counts ? {
6824
- counts,
6825
- modelMs: modelMs.sort((a, b) => a - b)
6826
- } : {};
6827
- }
6828
- /** Several rows' steps as one: a family's members or a folded run. */
6829
- function mergeStats(rows) {
6830
- let counts;
6831
- for (const row of rows) {
6832
- if (!row.counts) continue;
6833
- counts ??= {
6834
- model: 0,
6835
- tool: 0,
6836
- failed: 0,
6837
- retried: 0,
6838
- tools: {}
6839
- };
6840
- counts.model += row.counts.model;
6841
- counts.tool += row.counts.tool;
6842
- counts.failed += row.counts.failed;
6843
- counts.retried += row.counts.retried;
6844
- for (const [tool, n] of Object.entries(row.counts.tools)) counts.tools[tool] = (counts.tools[tool] ?? 0) + n;
6845
- }
6846
- const tokens = sumTokens(rows);
6847
- return {
6848
- ...counts ? {
6849
- counts,
6850
- modelMs: rows.flatMap((row) => row.modelMs ?? []).sort((a, b) => a - b)
6851
- } : {},
6852
- ...tokens ? { tokens } : {}
6853
- };
6854
- }
6855
- function sumTokens(rows) {
6856
- let out;
6857
- const sources = rows.filter((row) => row.kind === "model" || row.tokens !== void 0);
6858
- for (const key of [
6859
- "prompt",
6860
- "completion",
6861
- "cached"
6862
- ]) {
6863
- const total = sumReportedCounts(sources.map((row) => row.tokens?.[key]));
6864
- if (total !== void 0) (out ??= {})[key] = total;
6865
- }
6866
- return out;
6867
- }
6868
- function segmentOf(row) {
6869
- return {
6870
- startMs: row.span.startMs,
6871
- endMs: spanRunning(row.span) ? Number.POSITIVE_INFINITY : row.span.endMs,
6872
- kind: !row.ok ? "failed" : row.kind === "model" ? "model" : "tool",
6873
- tone: row.tone,
6874
- id: row.id,
6875
- count: 1,
6876
- retry: row.retry,
6877
- name: row.name,
6878
- tool: toolOf(row.name),
6879
- ...row.span.costUsd === void 0 ? {} : { costUsd: row.span.costUsd },
6880
- ...!row.ok && row.kind === "model" ? { modelCall: true } : {}
6881
- };
6882
- }
6883
- /** The rows a search term matches by themselves, before ancestor context is added. */
6884
- function searchMatchIds(rows, query, matchSpan) {
6885
- const term = query.trim();
6886
- const lower = term.toLowerCase();
6887
- return new Set(rows.filter((row) => matchSpan ? matchSpan(row.span, term) : `${row.name} ${row.span.detail ?? ""} ${row.kind} ${row.ok ? "" : "failed"} ${row.span.status ?? ""}`.toLowerCase().includes(lower)).map((row) => row.id));
6888
- }
6889
- /** Search keeps ancestor context and deliberately reveals matches inside collapsed branches. */
6890
- function visibleFlowWaterfallRows(rows, query, collapsed, matchSpan) {
6891
- const byId = new Map(rows.map((row) => [row.id, row]));
6892
- if (query.trim()) {
6893
- const matching = /* @__PURE__ */ new Set();
6894
- for (const id of searchMatchIds(rows, query, matchSpan)) {
6895
- let cursor = byId.get(id);
6896
- while (cursor && !matching.has(cursor.id)) {
6897
- matching.add(cursor.id);
6898
- cursor = cursor.parentId ? byId.get(cursor.parentId) : void 0;
6899
- }
6900
- }
6901
- return rows.filter((row) => matching.has(row.id));
6902
- }
6903
- const hidden = /* @__PURE__ */ new Set();
6904
- return rows.filter((row) => {
6905
- const isHidden = row.parentId !== void 0 && (collapsed.has(row.parentId) || hidden.has(row.parentId));
6906
- if (isHidden) hidden.add(row.id);
6907
- return !isHidden;
6908
- });
6909
- }
6910
- /** The leaf a reader should look at first: the longest completed or running non-agent step. */
6911
- function slowestRow(rows, clockMs) {
6912
- let best;
6913
- let bestMs = -1;
6914
- for (const row of rows) {
6915
- if (row.hasChildren || row.kind === "pipeline" || row.kind === "waiting" || row.durationLabel === "—") continue;
6916
- if (row.span.startMs > clockMs) continue;
6917
- const ms = (spanRunning(row.span) ? Math.max(row.span.endMs, clockMs) : Math.min(row.span.endMs, clockMs)) - row.span.startMs;
6918
- if (ms > bestMs) {
6919
- best = row;
6920
- bestMs = ms;
6921
- }
6922
- }
6923
- return best;
6924
- }
6925
- /** The chain of steps that gates the trace's end: from each root, descend into the latest-ending child until a leaf; the root whose
6926
- * chain ends last wins. Cutting latency anywhere else leaves the trace's end unchanged. */
6927
- function criticalPathIds(rows) {
6928
- const children = /* @__PURE__ */ new Map();
6929
- for (const row of rows) {
6930
- if (!row.parentId) continue;
6931
- const siblings = children.get(row.parentId);
6932
- if (siblings) siblings.push(row);
6933
- else children.set(row.parentId, [row]);
6934
- }
6935
- let best;
6936
- for (const root of rows) {
6937
- if (root.parentId) continue;
6938
- const chain = [];
6939
- let end = root.span.endMs;
6940
- for (let cursor = root; cursor;) {
6941
- chain.push(cursor.id);
6942
- end = Math.max(end, cursor.span.endMs);
6943
- cursor = children.get(cursor.id)?.reduce((latest, child) => !latest || child.span.endMs > latest.span.endMs ? child : latest, void 0);
6944
- }
6945
- if (!best || end > best.end) best = {
6946
- end,
6947
- chain
6948
- };
6949
- }
6950
- return new Set(best?.chain);
6951
- }
6952
- /** The agents a reader should look at first: the longest one by the clock, and the costliest when two or more are priced. */
6953
- function agentCallouts(agents, clockMs) {
6954
- let slowest, slowestMs = -1, costliest, top = -1, priced = 0, timed = 0;
6955
- for (const row of agents) {
6956
- if (row.durationLabel === "—" || row.span.startMs > clockMs || row.kind !== "pipeline" || row.hasAgents || row.id.startsWith("family:") || row.id.startsWith("run:")) continue;
6957
- const ms = (spanRunning(row.span) ? Math.max(row.span.endMs, clockMs) : Math.min(row.span.endMs, clockMs)) - row.span.startMs;
6958
- if (spanFact(row.span, "Ran for") === void 0) {
6959
- timed += 1;
6960
- if (ms > slowestMs) {
6961
- slowest = row;
6962
- slowestMs = ms;
6963
- }
6964
- }
6965
- const cost = spanFact(row.span, "Cost") === void 0 ? row.span.costUsd ?? row.rollupCostUsd : void 0;
6966
- if (typeof cost !== "number" || !Number.isFinite(cost)) continue;
6967
- priced += 1;
6968
- if (cost > top) {
6969
- costliest = row;
6970
- top = cost;
6971
- }
6972
- }
6973
- return {
6974
- slowestId: timed > 1 ? slowest?.id : void 0,
6975
- costliestId: priced > 1 && top > 0 ? costliest?.id : void 0
6976
- };
6977
- }
6978
- /** Busy time per agent row: the union of its own work. Their sum over wall time is the parallel speedup. */
6979
- function busyMs(row, clockMs) {
6980
- let total = 0, end = -Infinity;
6981
- for (const mark of row.own) {
6982
- const a = Math.max(mark.startMs, end), b = Math.min(mark.endMs, clockMs);
6983
- if (b > a) total += b - a;
6984
- end = Math.max(end, Math.min(mark.endMs, clockMs));
6985
- }
6986
- return total;
6987
- }
6988
- /** Complete per-span usage drives playback; authoritative call/error counts remain trace totals. */
6989
- function totalsAt(trace, clockMs) {
6990
- let cost = 0;
6991
- let costs = false, counted = false;
6992
- const tokens = [];
6993
- for (const span of trace.spans) {
6994
- if (span.startMs > clockMs) continue;
6995
- const aggregate = span.meta?.["cli_bridge.usage.scope"] === "sum_of_children";
6996
- if (span.endMs > clockMs) continue;
6997
- if (span.costUsd !== void 0) {
6998
- cost += span.costUsd;
6999
- costs = true;
7000
- }
7001
- if (!aggregate && (span.kind === "model" || span.promptTokens !== void 0 || span.completionTokens !== void 0)) {
7002
- tokens.push(sumReportedCounts([span.promptTokens, span.completionTokens]));
7003
- counted ||= span.promptTokens !== void 0 || span.completionTokens !== void 0;
7004
- }
7005
- }
7006
- return {
7007
- costUsd: trace.costUsd === void 0 ? void 0 : costs ? cost : trace.costUsd,
7008
- tokens: counted ? sumReportedCounts(tokens) : sumReportedCounts([trace.promptTokens, trace.completionTokens]),
7009
- modelCalls: reportedCount(trace.modelCalls),
7010
- toolCalls: reportedCount(trace.toolCalls),
7011
- errors: reportedCount(trace.errors)
7012
- };
7013
- }
7014
- /** The cost a reader can rely on: a lower bound when some calls are unpriced, a dash only when nothing is priced. */
7015
- function costSummary(costUsd, trace) {
7016
- costUsd = finiteNumber(costUsd);
7017
- const billedUsd = finiteNumber(trace.billedUsd);
7018
- const list = trace.costBasis === "list";
7019
- const label = list ? "Cost · list price" : "Cost";
7020
- if (costUsd === void 0) return billedUsd !== void 0 ? {
7021
- value: `${formatCost(billedUsd)} billed`,
7022
- title: "No list price for these calls; billed is the seat charge",
7023
- label
7024
- } : {
7025
- value: "—",
7026
- title: "No cost source: the harness recorded no cost and no price catalog was given",
7027
- label
7028
- };
7029
- const coverage = trace.costCoverage;
7030
- const partial = coverage !== void 0 && coverage.priced < coverage.total;
7031
- const upper = !partial && trace.costBound === "upper";
7032
- return {
7033
- value: `${partial || trace.costBound === "lower" ? "≥" : upper ? "≤" : list ? "≈" : ""}${formatCost(costUsd)}${billedUsd !== void 0 ? ` · ${formatCost(billedUsd)} billed` : ""}`,
7034
- title: [
7035
- partial ? `${coverage.priced} of ${coverage.total} model calls priced` : coverage ? `all ${coverage.total} model calls priced` : "",
7036
- list ? "at the model catalog list price; not a bill" : "",
7037
- upper ? "cached input is not split out, so it is priced as fresh input: at most this" : "",
7038
- trace.costBound === "lower" ? "a floor: the producer reports at least this" : "",
7039
- billedUsd !== void 0 ? `billed ${formatCost(billedUsd)} (the seat charge)` : ""
7040
- ].filter(Boolean).join("; "),
7041
- label
7042
- };
7043
- }
7044
- /** The role an agent plays: its name without a trailing counter ("memscale-engineer-3", "Subagent 2"). */
7045
- const roleOf = (name) => name.replace(/[-\s]\d+$/, "");
7046
- /**
7047
- * Agents sharing a role fold into one family row until opened: a 17-agent run reads as its few roles, and the bar of a
7048
- * family carries every member's work in each member's hue. Members follow their opened family, marked with `family`.
7049
- */
7050
- /** The families open by default: all of them when every agent fits in `rows`, so a reader sees each agent and its steps (the
7051
- * blind reviews preferred agent rows to `role ×N`); none on bigger runs. `flipped` holds the families the reader toggled. */
7052
- function defaultOpenFamilies(agents, rows, flipped) {
7053
- const unfold = agents.length <= rows;
7054
- const ids = agentFamilies(agents, /* @__PURE__ */ new Set()).filter((row) => row.id.startsWith("family:")).map((row) => row.id);
7055
- return new Set(ids.filter((id) => unfold !== flipped.has(id)));
7056
- }
7057
- function agentFamilies(agents, open) {
7058
- const groups = /* @__PURE__ */ new Map();
7059
- for (const row of agents) {
7060
- const key = row.parentId === void 0 ? `root:${row.id}` : roleOf(row.name);
7061
- groups.set(key, [...groups.get(key) ?? [], row]);
7062
- }
7063
- const out = [];
7064
- let next = 0;
7065
- const hue = (row) => row.tone <= 0 || ++next > 5 ? 0 : 1 + [...roleOf(row.name)].reduce((hash, c) => hash * 31 + c.charCodeAt(0) >>> 0, 0) % 5;
7066
- for (const [role, members] of groups) {
7067
- if (members.length < 2) {
7068
- const row = members[0], tone = hue(row);
7069
- out.push({
7070
- ...row,
7071
- tone,
7072
- own: row.own.map((mark) => ({
7073
- ...mark,
7074
- tone
7075
- }))
7076
- });
7077
- continue;
7078
- }
7079
- const tone = hue(members[0]);
7080
- const id = `family:${role}`;
7081
- const startMs = Math.min(...members.map((row) => row.span.startMs));
7082
- const endMs = Math.max(...members.map((row) => row.span.endMs));
7083
- const running = members.some((row) => spanRunning(row.span));
7084
- const known = members.map((row) => row.span.costUsd ?? (spanFact(row.span, "Cost") === void 0 ? row.rollupCostUsd : void 0)).filter((cost) => cost !== void 0 && Number.isFinite(cost));
7085
- const failed = members.filter((row) => row.span.outcome ? row.span.outcome.tone === "failed" : !row.ok).length;
7086
- const outcome = members.every((row) => row.span.outcome && row.span.outcome.tone === members[0].span.outcome?.tone && !row.span.outcome.ring === !members[0].span.outcome?.ring) ? members[0].span.outcome : void 0;
7087
- const facts = members.flatMap((row) => (row.span.facts ?? []).filter(({ label }) => [
7088
- "model",
7089
- "model calls",
7090
- "tool calls",
7091
- "model latency",
7092
- "failures",
7093
- "retries"
7094
- ].includes(label.toLowerCase()) || label.toLowerCase() === "tokens" && ![
7095
- row.span.promptTokens,
7096
- row.span.completionTokens,
7097
- row.span.cachedTokens
7098
- ].some(Number.isFinite) || label.toLowerCase() === "cost" && known.length === 0)).map(({ label }) => ({
7099
- label,
7100
- value: "Not recorded"
7101
- }));
7102
- out.push({
7103
- costFloor: known.length < members.length || members.some((row) => row.costFloor),
7104
- id,
7105
- parentId: members[0].parentId,
7106
- name: role,
7107
- kind: "pipeline",
7108
- durationLabel: formatSpanDuration(endMs - startMs),
7109
- approx: members.some((row) => row.approx),
7110
- ok: failed === 0,
7111
- depth: 0,
7112
- hasChildren: true,
7113
- tone,
7114
- outcomes: [...new Map(members.map((row) => {
7115
- const state = row.span.outcome ?? {
7116
- tone: "neutral",
7117
- label: "Unknown",
7118
- ring: true
7119
- };
7120
- return [`${state.label}:${state.tone}:${state.ring}`, state];
7121
- })).values()],
7122
- descendants: members.length,
7123
- segments: [],
7124
- retry: false,
7125
- hasAgents: false,
7126
- own: members.flatMap((row, i) => row.own.map((mark) => ({
7127
- ...mark,
7128
- tone,
7129
- alt: i % 2 === 1
7130
- }))).sort((a, b) => a.startMs - b.startMs),
7131
- ...known.length ? { rollupCostUsd: known.reduce((sum, cost) => sum + cost, 0) } : {},
7132
- ...mergeStats(members),
7133
- span: {
7134
- id,
7135
- kind: "pipeline",
7136
- name: role,
7137
- startMs,
7138
- endMs,
7139
- activityAt: members.flatMap((row) => row.span.activityAt ?? row.own.flatMap((mark) => [mark.startMs, mark.endMs])),
7140
- status: running ? "running" : failed ? "failed" : "done",
7141
- ...outcome ? { outcome } : {},
7142
- detail: members.every((row) => row.span.detail === members[0].span.detail) ? members[0].span.detail : void 0,
7143
- facts,
7144
- meta: {
7145
- failedAgents: failed,
7146
- costPartial: known.length < members.length,
7147
- members: members.map((row) => row.id)
7148
- }
7149
- }
7150
- });
7151
- if (open.has(id)) out.push(...members.map((row, i) => ({
7152
- ...row,
7153
- family: id,
7154
- inset: 1,
7155
- tone,
7156
- own: row.own.map((mark) => ({
7157
- ...mark,
7158
- tone,
7159
- alt: i % 2 === 1
7160
- }))
7161
- })));
7162
- }
7163
- return out;
7164
- }
7165
- /** The second line of an agent row in parts: how it ended and how much it did (failed, 3 model calls, 412 tool calls; 6 agents, 4 failed).
7166
- * The row shows the parts in order and drops the last ones whole when the line is full, never half a word. */
7167
- function agentSummary(row) {
7168
- if (row.id.startsWith("family:")) {
7169
- const failed = Number(row.span.meta?.failedAgents ?? 0);
7170
- return [`${row.descendants} agents`, ...failed ? [`${failed} failed`] : []];
7171
- }
7172
- if (row.id.startsWith("run:")) {
7173
- const failed = row.own.filter((mark) => mark.kind === "failed").length;
7174
- return [failed ? `${failed} failed` : "all done"];
7175
- }
7176
- const facts = new Map((row.span.facts ?? []).map(({ label, value }) => [label.toLowerCase(), value]));
7177
- const calls = [[
7178
- "Model calls",
7179
- row.counts?.model,
7180
- "model"
7181
- ], [
7182
- "Tool calls",
7183
- row.counts?.tool,
7184
- "tool"
7185
- ]].map(([label, count, kind]) => facts.has(label.toLowerCase()) ? `${label}: ${facts.get(label.toLowerCase())}` : count ? `${count} ${kind} ${count === 1 ? "call" : "calls"}` : "");
7186
- return [row.span.outcome?.label ?? (spanRunning(row.span) ? "running" : !row.ok ? "failed" : row.kind === "pipeline" ? "" : "done"), ...calls].filter(Boolean);
7187
- }
7188
- /**
7189
- * The agent view's rows: families folded until opened, and an opened agent's own steps (its turns and tool calls, not its
7190
- * child agents) nested beneath it with their icons, durations and costs, as a reader drills from the run into one agent.
7191
- */
7192
- function agentViewRows(agents, rows, openFamilies, openSteps) {
7193
- const base = agentFamilies(agents, openFamilies);
7194
- if (openSteps.size === 0) return base;
7195
- const steps = /* @__PURE__ */ new Map();
7196
- for (const row of rows) {
7197
- if (row.parentId === void 0 || !openSteps.has(row.parentId) || row.kind === "pipeline") continue;
7198
- steps.set(row.parentId, [...steps.get(row.parentId) ?? [], row]);
7199
- }
7200
- return base.flatMap((row) => openSteps.has(row.id) ? [row, ...stepRuns(steps.get(row.id) ?? []).map((step) => ({
7201
- ...step,
7202
- stepOf: row.id,
7203
- inset: (row.inset ?? 0) + 1,
7204
- tone: row.tone,
7205
- own: step.own.map((mark) => ({
7206
- ...mark,
7207
- tone: row.tone
7208
- }))
7209
- }))] : [row]);
7210
- }
7211
- /** Three or more consecutive steps of one kind and name read as one row ("15 model calls · 4h"), each a mark in its bar. */
7212
- function stepRuns(steps) {
7213
- const out = [];
7214
- for (let i = 0; i < steps.length;) {
7215
- let j = i;
7216
- while (j < steps.length && steps[j].kind === steps[i].kind && steps[j].name === steps[i].name) j++;
7217
- const run = steps.slice(i, j);
7218
- if (run.length < 3) {
7219
- out.push(...run);
7220
- i = j;
7221
- continue;
7222
- }
7223
- const first = run[0];
7224
- const startMs = Math.min(...run.map((step) => step.span.startMs));
7225
- const endMs = Math.max(...run.map((step) => step.span.endMs));
7226
- const failed = run.filter((step) => !step.ok).length;
7227
- const costs = run.map((step) => step.span.costUsd ?? step.rollupCostUsd).filter((cost) => cost !== void 0);
7228
- const noun = first.kind === "model" ? "model calls" : first.kind === "tool" ? `${first.name} calls` : `${first.name} steps`;
7229
- out.push({
7230
- ...first,
7231
- id: `run:${first.id}`,
7232
- name: `${run.length} ${noun}`,
7233
- durationLabel: formatSpanDuration(endMs - startMs),
7234
- ok: failed === 0,
7235
- hasChildren: false,
7236
- descendants: 0,
7237
- segments: [],
7238
- ...stepStats(run),
7239
- tokens: sumTokens(run),
7240
- own: run.map((step) => ({
7241
- ...segmentOf(step),
7242
- tone: first.tone
7243
- })),
7244
- ...costs.length ? { rollupCostUsd: costs.reduce((sum, cost) => sum + cost, 0) } : {},
7245
- span: {
7246
- ...first.span,
7247
- id: `run:${first.id}`,
7248
- name: `${run.length} ${noun}`,
7249
- startMs,
7250
- endMs,
7251
- status: failed ? "failed" : first.span.status,
7252
- costUsd: void 0
7253
- }
7254
- });
7255
- i = j;
7256
- }
7257
- return out;
7258
- }
7259
- /** A row as the view draws it: its drawn copy, or for a member of a folded family, itself in the family's hue. */
7260
- function drawnRow(row, visible) {
7261
- const drawn = visible.find((item) => item.id === row.id);
7262
- if (drawn) return drawn;
7263
- const family = visible.find((item) => (item.span.meta?.members)?.includes(row.id));
7264
- return family ? {
7265
- ...row,
7266
- tone: family.tone
7267
- } : row;
7268
- }
7269
- /** A row's cost as printed: "≥" when it is a floor. */
7270
- const rowCostText = (row, cost) => spanFact(row.span, "Cost") ?? (cost === void 0 ? "" : `${row.costFloor ? "≥" : ""}${formatCost(cost)}`);
7271
- /** Quiet is elapsed silence beyond both five minutes and three median event gaps. */
7272
- function quietActivity(row, now) {
7273
- const times = [...row.span.activityAt ?? row.own.flatMap((mark) => [mark.startMs, mark.endMs])].filter(Number.isFinite).sort((a, b) => a - b);
7274
- const last = times.at(-1) ?? NaN;
7275
- const gaps = times.slice(1).map((at, i) => at - times[i]).sort((a, b) => a - b);
7276
- const middle = Math.floor(gaps.length / 2);
7277
- const observedMedian = gaps.length ? gaps.length % 2 ? gaps[middle] : (gaps[middle - 1] + gaps[middle]) / 2 : 0;
7278
- const supplied = row.span.medianEventGapMs;
7279
- const median = typeof supplied === "number" && Number.isFinite(supplied) && supplied >= 0 ? supplied : observedMedian;
7280
- const quietMs = Number.isFinite(last) ? Math.max(0, now - last) : 0;
7281
- return {
7282
- last,
7283
- quietMs,
7284
- quiet: spanRunning(row.span) && Number.isFinite(last) && quietMs > Math.max(3e5, 3 * median)
7285
- };
7286
- }
7287
- //#endregion
7288
2626
  //#region src/react/flow-waterfall-icons.tsx
7289
2627
  const svg = (children, label) => /* @__PURE__ */ jsx("svg", {
7290
2628
  viewBox: "0 0 16 16",