@ag2/weave 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { forwardRef, createContext, useContext, useRef, useCallback, useEffect, useLayoutEffect, useState, useMemo } from "react";
1
+ import { forwardRef, createContext, useContext, useRef, useCallback, useEffect, useLayoutEffect, useState, useMemo, useId } from "react";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import classNames from "classnames";
4
4
  import { createPortal } from "react-dom";
@@ -385,12 +385,12 @@ const Button = as(
385
385
  )
386
386
  );
387
387
  const Icon_css_ts_vanilla = "";
388
- var Icon$1 = createRuntimeFn({ defaultClassName: "b6us30 _8nex5a1 _8nex5a0", variantClassNames: { size: { "50": "ebramc7", "100": "ebramc8", "200": "ebramc9", "300": "ebramca", "400": "ebramcb", "500": "ebramcc", "600": "ebramcd", Inherit: "ebramc6" } }, defaultVariants: { size: "400" }, compoundVariants: [] });
389
- const Icon = forwardRef(
388
+ var Icon$2 = createRuntimeFn({ defaultClassName: "b6us30 _8nex5a1 _8nex5a0", variantClassNames: { size: { "50": "ebramc7", "100": "ebramc8", "200": "ebramc9", "300": "ebramca", "400": "ebramcb", "500": "ebramcc", "600": "ebramcd", Inherit: "ebramc6" } }, defaultVariants: { size: "400" }, compoundVariants: [] });
389
+ const Icon$1 = forwardRef(
390
390
  ({ className, size, filled = false, src, ...props }, ref) => /* @__PURE__ */ jsx(
391
391
  "svg",
392
392
  {
393
- className: classNames(Icon$1({ size }), className),
393
+ className: classNames(Icon$2({ size }), className),
394
394
  focusable: "false",
395
395
  viewBox: "0 0 24 24",
396
396
  fill: "none",
@@ -3057,7 +3057,7 @@ var CheckboxInput = "_1q56jo2g _8nex5a1 _8nex5a0 x4g6300 x4g6301";
3057
3057
  const Checkbox = forwardRef(
3058
3058
  ({ className, variant, size, style, ...props }, ref) => /* @__PURE__ */ jsxs("span", { className: classNames(Checkbox$1({ variant, size }), className), style, children: [
3059
3059
  /* @__PURE__ */ jsx("input", { className: CheckboxInput, type: "checkbox", ...props, ref }),
3060
- /* @__PURE__ */ jsx(Icon, { className: CheckboxIcon, "aria-hidden": true, size, src: Icons.Check })
3060
+ /* @__PURE__ */ jsx(Icon$1, { className: CheckboxIcon, "aria-hidden": true, size, src: Icons.Check })
3061
3061
  ] })
3062
3062
  );
3063
3063
  const Chip_css_ts_vanilla = "";
@@ -3447,7 +3447,7 @@ const Switch = forwardRef(
3447
3447
  onClick: handleClick,
3448
3448
  ...props,
3449
3449
  ref,
3450
- children: /* @__PURE__ */ jsx("span", { className: SwitchThumb, "aria-hidden": true, children: /* @__PURE__ */ jsx(Icon, { src: Icons.Check, size: "100" }) })
3450
+ children: /* @__PURE__ */ jsx("span", { className: SwitchThumb, "aria-hidden": true, children: /* @__PURE__ */ jsx(Icon$1, { src: Icons.Check, size: "100" }) })
3451
3451
  }
3452
3452
  );
3453
3453
  }
@@ -4777,12 +4777,12 @@ const PageHeroSection = as(
4777
4777
  )
4778
4778
  );
4779
4779
  const PageHero = ({
4780
- icon,
4780
+ icon: icon2,
4781
4781
  title,
4782
4782
  subTitle,
4783
4783
  children
4784
4784
  }) => /* @__PURE__ */ jsxs(Box, { direction: "Column", gap: "400", children: [
4785
- /* @__PURE__ */ jsx(Box, { direction: "Column", alignItems: "Center", gap: "200", children: icon }),
4785
+ /* @__PURE__ */ jsx(Box, { direction: "Column", alignItems: "Center", gap: "200", children: icon2 }),
4786
4786
  /* @__PURE__ */ jsxs(Box, { as: "h2", direction: "Column", gap: "200", alignItems: "Center", children: [
4787
4787
  /* @__PURE__ */ jsx(Text, { align: "Center", size: "H2", children: title }),
4788
4788
  /* @__PURE__ */ jsx(Text, { align: "Center", priority: "400", children: subTitle })
@@ -4821,7 +4821,437 @@ const NavCollapseRow = () => {
4821
4821
  }
4822
4822
  );
4823
4823
  };
4824
+ const blueAccent = {
4825
+ dark: {
4826
+ solid: "#2c72cf",
4827
+ onSolid: "#ffffff",
4828
+ hover: "#2364bc",
4829
+ pressed: "#194e96",
4830
+ secondary: "#294e7b",
4831
+ onSecondary: "#f1f6ff",
4832
+ secondaryHover: "#203f66",
4833
+ secondaryPressed: "#172f4e",
4834
+ focus: "#7cc4ff",
4835
+ mention: "#203447",
4836
+ onMention: "#b8dcff"
4837
+ },
4838
+ light: {
4839
+ solid: "#2469c2",
4840
+ onSolid: "#ffffff",
4841
+ hover: "#1c58a5",
4842
+ pressed: "#174886",
4843
+ secondary: "#294e7b",
4844
+ onSecondary: "#f1f6ff",
4845
+ secondaryHover: "#203f66",
4846
+ secondaryPressed: "#172f4e",
4847
+ focus: "#1f6fd0",
4848
+ mention: "#e1edfc",
4849
+ onMention: "#18579f"
4850
+ }
4851
+ };
4852
+ const fixed = {
4853
+ dark: {
4854
+ surface: "#111318",
4855
+ inset: "#171a20",
4856
+ line: "#232830",
4857
+ text: "#e6e8ec",
4858
+ body: "#c9ced6",
4859
+ secondary: "#9aa3ad",
4860
+ status: {
4861
+ success: { solid: "#74c596", onSolid: "#0b2315", soft: "#233d32" },
4862
+ warning: { solid: "#f0ad67", onSolid: "#201408", soft: "#453322" },
4863
+ info: { solid: "#74b9f5", onSolid: "#0b2136", soft: "#243b55" },
4864
+ critical: { solid: "#e0806f", onSolid: "#281411", soft: "#302224" },
4865
+ neutral: { solid: "#9aa3ad", onSolid: "#111318", soft: "#242830" }
4866
+ }
4867
+ },
4868
+ light: {
4869
+ surface: "#ffffff",
4870
+ inset: "#f0f1f4",
4871
+ line: "#e1e4e9",
4872
+ text: "#14171c",
4873
+ body: "#3a414b",
4874
+ secondary: "#5f6873",
4875
+ status: {
4876
+ success: { solid: "#28764b", onSolid: "#ffffff", soft: "#e7f0eb" },
4877
+ warning: { solid: "#9b5417", onSolid: "#ffffff", soft: "#f6eee6" },
4878
+ info: { solid: "#246ab8", onSolid: "#ffffff", soft: "#e7eff7" },
4879
+ critical: { solid: "#a94332", onSolid: "#ffffff", soft: "#f8e8e4" },
4880
+ neutral: { solid: "#5f6873", onSolid: "#ffffff", soft: "#eceef1" }
4881
+ }
4882
+ }
4883
+ };
4884
+ const resolveCurrentPalette = (mode, accent = blueAccent) => ({
4885
+ ...fixed[mode],
4886
+ accent: accent[mode]
4887
+ });
4888
+ const motion = {
4889
+ open: 240,
4890
+ close: 180,
4891
+ openEasing: "cubic-bezier(.2,0,0,1)",
4892
+ closeEasing: "cubic-bezier(.4,0,1,1)"
4893
+ };
4894
+ const theme_css_ts_vanilla = "";
4895
+ var current = { surface: "var(--_1fitmnc1)", inset: "var(--_1fitmnc2)", line: "var(--_1fitmnc3)", text: "var(--_1fitmnc4)", body: "var(--_1fitmnc5)", secondary: "var(--_1fitmnc6)", status: { success: { solid: "var(--_1fitmnc7)", onSolid: "var(--_1fitmnc8)", soft: "var(--_1fitmnc9)" }, warning: { solid: "var(--_1fitmnca)", onSolid: "var(--_1fitmncb)", soft: "var(--_1fitmncc)" }, info: { solid: "var(--_1fitmncd)", onSolid: "var(--_1fitmnce)", soft: "var(--_1fitmncf)" }, critical: { solid: "var(--_1fitmncg)", onSolid: "var(--_1fitmnch)", soft: "var(--_1fitmnci)" }, neutral: { solid: "var(--_1fitmncj)", onSolid: "var(--_1fitmnck)", soft: "var(--_1fitmncl)" } }, accent: { solid: "var(--_1fitmncm)", onSolid: "var(--_1fitmncn)", hover: "var(--_1fitmnco)", pressed: "var(--_1fitmncp)", secondary: "var(--_1fitmncq)", onSecondary: "var(--_1fitmncr)", secondaryHover: "var(--_1fitmncs)", secondaryPressed: "var(--_1fitmnct)", focus: "var(--_1fitmncu)", mention: "var(--_1fitmncv)", onMention: "var(--_1fitmncw)" } };
4896
+ var darkClass = "_1fitmnc0";
4897
+ var lightClass = "_1fitmncx";
4898
+ const primitives_css_ts_vanilla = "";
4899
+ var action = "_9yk004z";
4900
+ var actionGroup = "_9yk004y";
4901
+ var actionSection = "_9yk004x";
4902
+ var author = "_9yk0040";
4903
+ var authorMissing = "_9yk0042";
4904
+ var authorName = "_9yk0041";
4905
+ var badge = "_9yk004j";
4906
+ var boundary = "_9yk0044";
4907
+ var card = "_9yk0045";
4908
+ var chevron = "_9yk004n";
4909
+ var control = "_9yk004m";
4910
+ var details = "_9yk004o";
4911
+ var finding = "_9yk004q";
4912
+ var findingBody = "_9yk004u";
4913
+ var findingTitle = "_9yk004s";
4914
+ var findingToggle = "_9yk004r _9yk004m";
4915
+ var findings = "_9yk004p";
4916
+ var header = "_9yk004d";
4917
+ var hint = "_9yk00411";
4918
+ var icon = "_9yk004h";
4919
+ var identity = "_9yk004e";
4920
+ var member = "_9yk00414";
4921
+ var mentionLabel = "_9yk00413";
4922
+ var mentions = "_9yk00412";
4923
+ var meta = "_9yk004w";
4924
+ var mono = "_9yk004g";
4925
+ var overview = "_9yk004k";
4926
+ var ownMention = "_9yk00415";
4927
+ var ownedCard = "_9yk0046";
4928
+ var paragraph = "_9yk004v";
4929
+ var prLink = "_9yk004f";
4930
+ var prRef = "_9yk0043";
4931
+ var primaryAction = "_9yk00410";
4932
+ var severity$1 = "_9yk004t";
4933
+ var summary = "_9yk004l";
4934
+ var tones = { success: "_9yk0048", warning: "_9yk0049", info: "_9yk004a", critical: "_9yk004b", neutral: "_9yk004c" };
4935
+ var typeIcon = "_9yk004i";
4936
+ var verdictIcon = "_9yk0047";
4937
+ const fonts = "";
4938
+ const Context = createContext({
4939
+ mode: "light",
4940
+ accent: blueAccent
4941
+ });
4942
+ function CurrentProvider({
4943
+ mode,
4944
+ accent = blueAccent,
4945
+ children
4946
+ }) {
4947
+ const value = useMemo(() => ({ mode, accent }), [mode, accent]);
4948
+ return /* @__PURE__ */ jsx(Context.Provider, { value, children });
4949
+ }
4950
+ function CurrentBoundary({
4951
+ children,
4952
+ className
4953
+ }) {
4954
+ const { mode, accent } = useContext(Context);
4955
+ const style = Object.fromEntries(
4956
+ Object.entries(current.accent).map(([key, variable]) => [
4957
+ variable.slice(4, -1),
4958
+ accent[mode][key]
4959
+ ])
4960
+ );
4961
+ return /* @__PURE__ */ jsx(
4962
+ "div",
4963
+ {
4964
+ className: `${mode === "dark" ? darkClass : lightClass} ${boundary}${className ? ` ${className}` : ""}`,
4965
+ style,
4966
+ "data-ag2-design": "current",
4967
+ children
4968
+ }
4969
+ );
4970
+ }
4971
+ function Disclosure({
4972
+ open,
4973
+ id,
4974
+ children
4975
+ }) {
4976
+ const ref = useRef(null);
4977
+ const animation = useRef();
4978
+ const [mounted, setMounted] = useState(open);
4979
+ useLayoutEffect(() => {
4980
+ var _a;
4981
+ if (open && !mounted) {
4982
+ setMounted(true);
4983
+ return;
4984
+ }
4985
+ const element = ref.current;
4986
+ if (!element)
4987
+ return;
4988
+ const { height } = element.getBoundingClientRect();
4989
+ const { opacity } = getComputedStyle(element);
4990
+ (_a = animation.current) == null ? void 0 : _a.cancel();
4991
+ const finish = () => {
4992
+ element.style.height = open ? "auto" : "0px";
4993
+ element.style.opacity = open ? "1" : "0";
4994
+ if (!open)
4995
+ setMounted(false);
4996
+ };
4997
+ if (!element.animate || matchMedia("(prefers-reduced-motion: reduce)").matches) {
4998
+ finish();
4999
+ return;
5000
+ }
5001
+ element.style.height = open ? "auto" : "0px";
5002
+ const target = open ? element.scrollHeight : 0;
5003
+ element.style.height = `${height}px`;
5004
+ const run = element.animate(
5005
+ [
5006
+ { height: `${height}px`, opacity },
5007
+ { height: `${target}px`, opacity: open ? 1 : 0 }
5008
+ ],
5009
+ {
5010
+ duration: open ? motion.open : motion.close,
5011
+ easing: open ? motion.openEasing : motion.closeEasing,
5012
+ fill: "forwards"
5013
+ }
5014
+ );
5015
+ animation.current = run;
5016
+ run.onfinish = () => {
5017
+ finish();
5018
+ run.cancel();
5019
+ };
5020
+ }, [open, mounted]);
5021
+ useLayoutEffect(() => () => {
5022
+ var _a;
5023
+ return (_a = animation.current) == null ? void 0 : _a.cancel();
5024
+ }, []);
5025
+ return /* @__PURE__ */ jsx(
5026
+ "div",
5027
+ {
5028
+ ref,
5029
+ id,
5030
+ "aria-hidden": !open,
5031
+ ...!open ? { inert: "" } : {},
5032
+ style: { overflow: "hidden", height: 0, opacity: 0 },
5033
+ children: mounted && children
5034
+ }
5035
+ );
5036
+ }
5037
+ const paths = {
5038
+ "comment-bold": "M172,108a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,108Zm-12,28H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24Zm76-8A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z",
5039
+ chevron: "M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z",
5040
+ check: "M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z",
5041
+ warning: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z",
5042
+ comment: "M168,112a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,112Zm-8,24H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm72-8A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z",
5043
+ agent: "M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16Zm-52-56H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Z",
5044
+ people: "M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z",
5045
+ "pull-request": "M104,64A32,32,0,1,0,64,95v66a32,32,0,1,0,16,0V95A32.06,32.06,0,0,0,104,64ZM56,64A16,16,0,1,1,72,80,16,16,0,0,1,56,64ZM88,192a16,16,0,1,1-16-16A16,16,0,0,1,88,192Zm120-31V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,200,208Z",
5046
+ clock: "M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z"
5047
+ };
5048
+ function Icon({
5049
+ name,
5050
+ size = 16,
5051
+ verdict = false
5052
+ }) {
5053
+ return /* @__PURE__ */ jsx(
5054
+ "svg",
5055
+ {
5056
+ width: size,
5057
+ height: size,
5058
+ viewBox: verdict ? "20 20 216 216" : "0 0 256 256",
5059
+ style: verdict && name === "check" ? { stroke: "currentColor", strokeWidth: 5, strokeLinejoin: "round" } : void 0,
5060
+ className: icon,
5061
+ "aria-hidden": "true",
5062
+ focusable: "false",
5063
+ children: /* @__PURE__ */ jsx("path", { d: paths[name] })
5064
+ }
5065
+ );
5066
+ }
5067
+ const verdicts = {
5068
+ approve: { label: "Approved", tone: "success", icon: "check" },
5069
+ request_changes: { label: "Changes requested", tone: "warning", icon: "warning" },
5070
+ comment: { label: "Comment", tone: "info", icon: "comment" }
5071
+ };
5072
+ const freshness = {
5073
+ current: "Current when reviewed",
5074
+ outdated: "Older commit",
5075
+ unknown: "Freshness unknown"
5076
+ };
5077
+ const severity = { high: "critical", medium: "warning", low: "neutral", info: "info" };
5078
+ function Chevron() {
5079
+ return /* @__PURE__ */ jsx("span", { className: chevron, children: /* @__PURE__ */ jsx(Icon, { name: "chevron", size: 12 }) });
5080
+ }
5081
+ function Finding({ finding: finding$1 }) {
5082
+ const [open, setOpen] = useState(false);
5083
+ const id = useId();
5084
+ return /* @__PURE__ */ jsxs("div", { className: `${finding} ${tones[severity[finding$1.severity]]}`, children: [
5085
+ /* @__PURE__ */ jsxs(
5086
+ "button",
5087
+ {
5088
+ type: "button",
5089
+ className: findingToggle,
5090
+ "aria-expanded": open,
5091
+ "aria-controls": id,
5092
+ onClick: () => setOpen(!open),
5093
+ children: [
5094
+ /* @__PURE__ */ jsx("span", { className: severity$1, children: finding$1.severity }),
5095
+ /* @__PURE__ */ jsx("span", { className: findingTitle, children: finding$1.title }),
5096
+ /* @__PURE__ */ jsx(Chevron, {})
5097
+ ]
5098
+ }
5099
+ ),
5100
+ /* @__PURE__ */ jsx(Disclosure, { id, open, children: /* @__PURE__ */ jsxs("div", { className: findingBody, children: [
5101
+ finding$1.location && /* @__PURE__ */ jsxs("code", { className: mono, children: [
5102
+ finding$1.location.path,
5103
+ ":",
5104
+ finding$1.location.line
5105
+ ] }),
5106
+ /* @__PURE__ */ jsx("p", { className: paragraph, children: finding$1.description }),
5107
+ finding$1.requested_change && /* @__PURE__ */ jsxs("p", { className: paragraph, children: [
5108
+ /* @__PURE__ */ jsx("strong", { children: "Requested change: " }),
5109
+ finding$1.requested_change
5110
+ ] })
5111
+ ] }) })
5112
+ ] });
5113
+ }
5114
+ function CurrentReviewCard({
5115
+ authorLogin,
5116
+ owned = false,
5117
+ review,
5118
+ actions,
5119
+ members = []
5120
+ }) {
5121
+ var _a;
5122
+ const [expanded, setExpanded] = useState(false);
5123
+ const detailsId = useId();
5124
+ const verdict = verdicts[review.verdict];
5125
+ const title = (_a = review.title) == null ? void 0 : _a.trim();
5126
+ const ref = `${review.repo} #${review.number}`;
5127
+ return /* @__PURE__ */ jsx(CurrentBoundary, { children: /* @__PURE__ */ jsxs(
5128
+ "section",
5129
+ {
5130
+ className: `${card} ${tones[verdict.tone]} ${owned ? ownedCard : ""}`,
5131
+ "aria-label": owned ? "PR review of your pull request" : "PR review",
5132
+ "data-owned": owned,
5133
+ children: [
5134
+ /* @__PURE__ */ jsxs("div", { className: header, children: [
5135
+ /* @__PURE__ */ jsxs("div", { className: identity, children: [
5136
+ /* @__PURE__ */ jsx("span", { className: typeIcon, children: /* @__PURE__ */ jsx(Icon, { name: "pull-request", size: 20 }) }),
5137
+ review.url ? /* @__PURE__ */ jsx(
5138
+ "a",
5139
+ {
5140
+ className: prLink,
5141
+ "data-expanded": expanded,
5142
+ title: expanded ? void 0 : title || ref,
5143
+ href: review.url,
5144
+ target: "_blank",
5145
+ rel: "noopener noreferrer",
5146
+ children: title || ref
5147
+ }
5148
+ ) : /* @__PURE__ */ jsx(
5149
+ "span",
5150
+ {
5151
+ className: prLink,
5152
+ "data-expanded": expanded,
5153
+ title: expanded ? void 0 : title,
5154
+ children: title || ref
5155
+ }
5156
+ ),
5157
+ /* @__PURE__ */ jsx("span", { className: badge, children: verdict.label })
5158
+ ] }),
5159
+ /* @__PURE__ */ jsx("span", { className: verdictIcon, children: /* @__PURE__ */ jsx(
5160
+ Icon,
5161
+ {
5162
+ name: review.verdict === "comment" ? "comment-bold" : verdict.icon,
5163
+ size: 32,
5164
+ verdict: true
5165
+ }
5166
+ ) }),
5167
+ /* @__PURE__ */ jsxs("div", { className: author, children: [
5168
+ title && /* @__PURE__ */ jsx("span", { className: prRef, children: ref }),
5169
+ authorLogin ? /* @__PURE__ */ jsxs("span", { className: authorName, children: [
5170
+ "@",
5171
+ authorLogin.replace(/^@/, "")
5172
+ ] }) : /* @__PURE__ */ jsx("span", { className: authorMissing, children: "PR author unavailable" })
5173
+ ] }),
5174
+ /* @__PURE__ */ jsxs("div", { className: overview, children: [
5175
+ /* @__PURE__ */ jsx(
5176
+ "p",
5177
+ {
5178
+ className: summary,
5179
+ "data-expanded": expanded,
5180
+ title: expanded ? void 0 : review.summary,
5181
+ children: review.summary
5182
+ }
5183
+ ),
5184
+ /* @__PURE__ */ jsxs(
5185
+ "button",
5186
+ {
5187
+ type: "button",
5188
+ className: control,
5189
+ "aria-expanded": expanded,
5190
+ "aria-controls": detailsId,
5191
+ "aria-label": `${expanded ? "Collapse" : "Expand"} review, ${review.findings.length} findings`,
5192
+ onClick: () => setExpanded(!expanded),
5193
+ children: [
5194
+ review.findings.length,
5195
+ " finding",
5196
+ review.findings.length === 1 ? "" : "s",
5197
+ /* @__PURE__ */ jsx(Chevron, {})
5198
+ ]
5199
+ }
5200
+ )
5201
+ ] })
5202
+ ] }),
5203
+ /* @__PURE__ */ jsx(Disclosure, { id: detailsId, open: expanded, children: /* @__PURE__ */ jsxs("div", { className: details, children: [
5204
+ review.findings.length > 0 && /* @__PURE__ */ jsx("div", { className: findings, children: review.findings.map((finding2) => /* @__PURE__ */ jsx(Finding, { finding: finding2 }, finding2.id)) }),
5205
+ /* @__PURE__ */ jsxs("div", { className: meta, children: [
5206
+ /* @__PURE__ */ jsxs("span", { children: [
5207
+ "Reviewed ",
5208
+ /* @__PURE__ */ jsx("code", { className: mono, children: review.reviewed_commit.slice(0, 12) })
5209
+ ] }),
5210
+ /* @__PURE__ */ jsx("span", { children: freshness[review.freshness] }),
5211
+ /* @__PURE__ */ jsx("span", { children: "Room review only · not submitted to GitHub" })
5212
+ ] }),
5213
+ actions
5214
+ ] }) }),
5215
+ members.length > 0 && /* @__PURE__ */ jsxs("div", { className: mentions, children: [
5216
+ /* @__PURE__ */ jsx("span", { className: mentionLabel, children: "Mentions" }),
5217
+ members.map((member$1) => /* @__PURE__ */ jsxs(
5218
+ "span",
5219
+ {
5220
+ title: member$1.id,
5221
+ className: `${member} ${member$1.isSelf ? ownMention : ""}`,
5222
+ children: [
5223
+ "@",
5224
+ member$1.name
5225
+ ]
5226
+ },
5227
+ member$1.id
5228
+ ))
5229
+ ] })
5230
+ ]
5231
+ }
5232
+ ) });
5233
+ }
5234
+ function ActionGroup({ actions, hint: hint$1 }) {
5235
+ return /* @__PURE__ */ jsxs("div", { className: actionSection, children: [
5236
+ /* @__PURE__ */ jsx("div", { className: actionGroup, role: "group", "aria-label": "Draft a PR request", children: actions.map((action$1) => /* @__PURE__ */ jsxs(
5237
+ "button",
5238
+ {
5239
+ type: "button",
5240
+ className: `${action} ${action$1.primary ? primaryAction : ""}`,
5241
+ title: action$1.title,
5242
+ onClick: action$1.onClick,
5243
+ children: [
5244
+ /* @__PURE__ */ jsx(Icon, { name: action$1.icon }),
5245
+ action$1.label
5246
+ ]
5247
+ },
5248
+ action$1.id
5249
+ )) }),
5250
+ /* @__PURE__ */ jsx("p", { className: hint, role: "status", children: hint$1 })
5251
+ ] });
5252
+ }
4824
5253
  export {
5254
+ ActionGroup,
4825
5255
  AgentGlyph,
4826
5256
  AgentMark,
4827
5257
  AgentNameTag,
@@ -4836,13 +5266,18 @@ export {
4836
5266
  Chip,
4837
5267
  ComposeIcon,
4838
5268
  CrossSizeVariant,
5269
+ CurrentBoundary,
5270
+ Icon as CurrentIcon,
5271
+ CurrentProvider,
5272
+ CurrentReviewCard,
4839
5273
  CutoutCard,
4840
5274
  DefaultReset,
4841
5275
  Dialog,
4842
5276
  Disabled,
5277
+ Disclosure,
4843
5278
  FocusOutline,
4844
5279
  Header,
4845
- Icon,
5280
+ Icon$1 as Icon,
4846
5281
  IconButton,
4847
5282
  Icons,
4848
5283
  InfoCard,
@@ -4907,6 +5342,7 @@ export {
4907
5342
  TooltipProvider,
4908
5343
  TypingIndicator,
4909
5344
  as,
5345
+ blueAccent,
4910
5346
  color,
4911
5347
  config,
4912
5348
  configClass,
@@ -4914,9 +5350,11 @@ export {
4914
5350
  getResizeObserverEntry,
4915
5351
  getScreenSize,
4916
5352
  lightTheme,
5353
+ motion,
4917
5354
  mountAliveMark,
4918
5355
  percent,
4919
5356
  pxToRem,
5357
+ resolveCurrentPalette,
4920
5358
  toRem,
4921
5359
  useElementSizeObserver,
4922
5360
  useOverlayContainer,