@ag2/weave 0.2.0 → 0.4.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/CHANGELOG.md +9 -0
- package/README.md +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/review-card/CurrentReviewCard.d.ts +15 -0
- package/dist/components/review-card/index.d.ts +2 -0
- package/dist/components/review-card/types.d.ts +24 -0
- package/dist/current/ActionGroup.d.ts +13 -0
- package/dist/current/CurrentProvider.d.ts +13 -0
- package/dist/current/Disclosure.d.ts +7 -0
- package/dist/current/Icon.d.ts +18 -0
- package/dist/current/index.d.ts +8 -0
- package/dist/current/palette.d.ts +94 -0
- package/dist/current/primitives.css.d.ts +38 -0
- package/dist/current/theme.css.d.ts +96 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +492 -9
- package/dist/index.js.map +1 -1
- package/dist/style.css +481 -1
- package/package.json +19 -21
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$
|
|
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$
|
|
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:
|
|
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,478 @@ 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 primitives_css = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4938
|
+
__proto__: null,
|
|
4939
|
+
action,
|
|
4940
|
+
actionGroup,
|
|
4941
|
+
actionSection,
|
|
4942
|
+
author,
|
|
4943
|
+
authorMissing,
|
|
4944
|
+
authorName,
|
|
4945
|
+
badge,
|
|
4946
|
+
boundary,
|
|
4947
|
+
card,
|
|
4948
|
+
chevron,
|
|
4949
|
+
control,
|
|
4950
|
+
details,
|
|
4951
|
+
finding,
|
|
4952
|
+
findingBody,
|
|
4953
|
+
findingTitle,
|
|
4954
|
+
findingToggle,
|
|
4955
|
+
findings,
|
|
4956
|
+
header,
|
|
4957
|
+
hint,
|
|
4958
|
+
icon,
|
|
4959
|
+
identity,
|
|
4960
|
+
member,
|
|
4961
|
+
mentionLabel,
|
|
4962
|
+
mentions,
|
|
4963
|
+
meta,
|
|
4964
|
+
mono,
|
|
4965
|
+
overview,
|
|
4966
|
+
ownMention,
|
|
4967
|
+
ownedCard,
|
|
4968
|
+
paragraph,
|
|
4969
|
+
prLink,
|
|
4970
|
+
prRef,
|
|
4971
|
+
primaryAction,
|
|
4972
|
+
severity: severity$1,
|
|
4973
|
+
summary,
|
|
4974
|
+
tones,
|
|
4975
|
+
typeIcon,
|
|
4976
|
+
verdictIcon
|
|
4977
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4978
|
+
const fonts = "";
|
|
4979
|
+
const Context = createContext({
|
|
4980
|
+
mode: "light",
|
|
4981
|
+
accent: blueAccent
|
|
4982
|
+
});
|
|
4983
|
+
function CurrentProvider({
|
|
4984
|
+
mode,
|
|
4985
|
+
accent = blueAccent,
|
|
4986
|
+
children
|
|
4987
|
+
}) {
|
|
4988
|
+
const value = useMemo(() => ({ mode, accent }), [mode, accent]);
|
|
4989
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
4990
|
+
}
|
|
4991
|
+
function CurrentBoundary({
|
|
4992
|
+
children,
|
|
4993
|
+
className
|
|
4994
|
+
}) {
|
|
4995
|
+
const { mode, accent } = useContext(Context);
|
|
4996
|
+
const style = Object.fromEntries(
|
|
4997
|
+
Object.entries(current.accent).map(([key, variable]) => [
|
|
4998
|
+
variable.slice(4, -1),
|
|
4999
|
+
accent[mode][key]
|
|
5000
|
+
])
|
|
5001
|
+
);
|
|
5002
|
+
return /* @__PURE__ */ jsx(
|
|
5003
|
+
"div",
|
|
5004
|
+
{
|
|
5005
|
+
className: `${mode === "dark" ? darkClass : lightClass} ${boundary}${className ? ` ${className}` : ""}`,
|
|
5006
|
+
style,
|
|
5007
|
+
"data-ag2-design": "current",
|
|
5008
|
+
children
|
|
5009
|
+
}
|
|
5010
|
+
);
|
|
5011
|
+
}
|
|
5012
|
+
function Disclosure({
|
|
5013
|
+
open,
|
|
5014
|
+
id,
|
|
5015
|
+
children
|
|
5016
|
+
}) {
|
|
5017
|
+
const ref = useRef(null);
|
|
5018
|
+
const animation = useRef();
|
|
5019
|
+
const [mounted, setMounted] = useState(open);
|
|
5020
|
+
useLayoutEffect(() => {
|
|
5021
|
+
var _a;
|
|
5022
|
+
if (open && !mounted) {
|
|
5023
|
+
setMounted(true);
|
|
5024
|
+
return;
|
|
5025
|
+
}
|
|
5026
|
+
const element = ref.current;
|
|
5027
|
+
if (!element)
|
|
5028
|
+
return;
|
|
5029
|
+
const { height } = element.getBoundingClientRect();
|
|
5030
|
+
const { opacity } = getComputedStyle(element);
|
|
5031
|
+
(_a = animation.current) == null ? void 0 : _a.cancel();
|
|
5032
|
+
const finish = () => {
|
|
5033
|
+
element.style.height = open ? "auto" : "0px";
|
|
5034
|
+
element.style.opacity = open ? "1" : "0";
|
|
5035
|
+
if (!open)
|
|
5036
|
+
setMounted(false);
|
|
5037
|
+
};
|
|
5038
|
+
if (!element.animate || matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
5039
|
+
finish();
|
|
5040
|
+
return;
|
|
5041
|
+
}
|
|
5042
|
+
element.style.height = open ? "auto" : "0px";
|
|
5043
|
+
const target = open ? element.scrollHeight : 0;
|
|
5044
|
+
element.style.height = `${height}px`;
|
|
5045
|
+
const run = element.animate(
|
|
5046
|
+
[
|
|
5047
|
+
{ height: `${height}px`, opacity },
|
|
5048
|
+
{ height: `${target}px`, opacity: open ? 1 : 0 }
|
|
5049
|
+
],
|
|
5050
|
+
{
|
|
5051
|
+
duration: open ? motion.open : motion.close,
|
|
5052
|
+
easing: open ? motion.openEasing : motion.closeEasing,
|
|
5053
|
+
fill: "forwards"
|
|
5054
|
+
}
|
|
5055
|
+
);
|
|
5056
|
+
animation.current = run;
|
|
5057
|
+
run.onfinish = () => {
|
|
5058
|
+
finish();
|
|
5059
|
+
run.cancel();
|
|
5060
|
+
};
|
|
5061
|
+
}, [open, mounted]);
|
|
5062
|
+
useLayoutEffect(() => () => {
|
|
5063
|
+
var _a;
|
|
5064
|
+
return (_a = animation.current) == null ? void 0 : _a.cancel();
|
|
5065
|
+
}, []);
|
|
5066
|
+
return /* @__PURE__ */ jsx(
|
|
5067
|
+
"div",
|
|
5068
|
+
{
|
|
5069
|
+
ref,
|
|
5070
|
+
id,
|
|
5071
|
+
"aria-hidden": !open,
|
|
5072
|
+
...!open ? { inert: "" } : {},
|
|
5073
|
+
style: { overflow: "hidden", height: 0, opacity: 0 },
|
|
5074
|
+
children: mounted && children
|
|
5075
|
+
}
|
|
5076
|
+
);
|
|
5077
|
+
}
|
|
5078
|
+
const paths = {
|
|
5079
|
+
"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",
|
|
5080
|
+
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",
|
|
5081
|
+
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",
|
|
5082
|
+
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",
|
|
5083
|
+
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",
|
|
5084
|
+
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",
|
|
5085
|
+
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",
|
|
5086
|
+
"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",
|
|
5087
|
+
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"
|
|
5088
|
+
};
|
|
5089
|
+
function Icon({
|
|
5090
|
+
name,
|
|
5091
|
+
size = 16,
|
|
5092
|
+
verdict = false
|
|
5093
|
+
}) {
|
|
5094
|
+
return /* @__PURE__ */ jsx(
|
|
5095
|
+
"svg",
|
|
5096
|
+
{
|
|
5097
|
+
width: size,
|
|
5098
|
+
height: size,
|
|
5099
|
+
viewBox: verdict ? "20 20 216 216" : "0 0 256 256",
|
|
5100
|
+
style: verdict && name === "check" ? { stroke: "currentColor", strokeWidth: 5, strokeLinejoin: "round" } : void 0,
|
|
5101
|
+
className: icon,
|
|
5102
|
+
"aria-hidden": "true",
|
|
5103
|
+
focusable: "false",
|
|
5104
|
+
children: /* @__PURE__ */ jsx("path", { d: paths[name] })
|
|
5105
|
+
}
|
|
5106
|
+
);
|
|
5107
|
+
}
|
|
5108
|
+
const verdicts = {
|
|
5109
|
+
approve: { label: "Approved", tone: "success", icon: "check" },
|
|
5110
|
+
request_changes: { label: "Changes requested", tone: "warning", icon: "warning" },
|
|
5111
|
+
comment: { label: "Comment", tone: "info", icon: "comment" }
|
|
5112
|
+
};
|
|
5113
|
+
const freshness = {
|
|
5114
|
+
current: "Current when reviewed",
|
|
5115
|
+
outdated: "Older commit",
|
|
5116
|
+
unknown: "Freshness unknown"
|
|
5117
|
+
};
|
|
5118
|
+
const severity = { high: "critical", medium: "warning", low: "neutral", info: "info" };
|
|
5119
|
+
function Chevron() {
|
|
5120
|
+
return /* @__PURE__ */ jsx("span", { className: chevron, children: /* @__PURE__ */ jsx(Icon, { name: "chevron", size: 12 }) });
|
|
5121
|
+
}
|
|
5122
|
+
function Finding({ finding: finding$1 }) {
|
|
5123
|
+
const [open, setOpen] = useState(false);
|
|
5124
|
+
const id = useId();
|
|
5125
|
+
return /* @__PURE__ */ jsxs("div", { className: `${finding} ${tones[severity[finding$1.severity]]}`, children: [
|
|
5126
|
+
/* @__PURE__ */ jsxs(
|
|
5127
|
+
"button",
|
|
5128
|
+
{
|
|
5129
|
+
type: "button",
|
|
5130
|
+
className: findingToggle,
|
|
5131
|
+
"aria-expanded": open,
|
|
5132
|
+
"aria-controls": id,
|
|
5133
|
+
onClick: () => setOpen(!open),
|
|
5134
|
+
children: [
|
|
5135
|
+
/* @__PURE__ */ jsx("span", { className: severity$1, children: finding$1.severity }),
|
|
5136
|
+
/* @__PURE__ */ jsx("span", { className: findingTitle, children: finding$1.title }),
|
|
5137
|
+
/* @__PURE__ */ jsx(Chevron, {})
|
|
5138
|
+
]
|
|
5139
|
+
}
|
|
5140
|
+
),
|
|
5141
|
+
/* @__PURE__ */ jsx(Disclosure, { id, open, children: /* @__PURE__ */ jsxs("div", { className: findingBody, children: [
|
|
5142
|
+
finding$1.location && /* @__PURE__ */ jsxs("code", { className: mono, children: [
|
|
5143
|
+
finding$1.location.path,
|
|
5144
|
+
":",
|
|
5145
|
+
finding$1.location.line
|
|
5146
|
+
] }),
|
|
5147
|
+
/* @__PURE__ */ jsx("p", { className: paragraph, children: finding$1.description }),
|
|
5148
|
+
finding$1.requested_change && /* @__PURE__ */ jsxs("p", { className: paragraph, children: [
|
|
5149
|
+
/* @__PURE__ */ jsx("strong", { children: "Requested change: " }),
|
|
5150
|
+
finding$1.requested_change
|
|
5151
|
+
] })
|
|
5152
|
+
] }) })
|
|
5153
|
+
] });
|
|
5154
|
+
}
|
|
5155
|
+
function CurrentReviewCard({
|
|
5156
|
+
authorLogin,
|
|
5157
|
+
owned = false,
|
|
5158
|
+
review,
|
|
5159
|
+
actions,
|
|
5160
|
+
members = []
|
|
5161
|
+
}) {
|
|
5162
|
+
var _a;
|
|
5163
|
+
const [expanded, setExpanded] = useState(false);
|
|
5164
|
+
const detailsId = useId();
|
|
5165
|
+
const verdict = verdicts[review.verdict];
|
|
5166
|
+
const title = (_a = review.title) == null ? void 0 : _a.trim();
|
|
5167
|
+
const ref = `${review.repo} #${review.number}`;
|
|
5168
|
+
return /* @__PURE__ */ jsx(CurrentBoundary, { children: /* @__PURE__ */ jsxs(
|
|
5169
|
+
"section",
|
|
5170
|
+
{
|
|
5171
|
+
className: `${card} ${tones[verdict.tone]} ${owned ? ownedCard : ""}`,
|
|
5172
|
+
"aria-label": owned ? "PR review of your pull request" : "PR review",
|
|
5173
|
+
"data-owned": owned,
|
|
5174
|
+
children: [
|
|
5175
|
+
/* @__PURE__ */ jsxs("div", { className: header, children: [
|
|
5176
|
+
/* @__PURE__ */ jsxs("div", { className: identity, children: [
|
|
5177
|
+
/* @__PURE__ */ jsx("span", { className: typeIcon, children: /* @__PURE__ */ jsx(Icon, { name: "pull-request", size: 20 }) }),
|
|
5178
|
+
review.url ? /* @__PURE__ */ jsx(
|
|
5179
|
+
"a",
|
|
5180
|
+
{
|
|
5181
|
+
className: prLink,
|
|
5182
|
+
"data-expanded": expanded,
|
|
5183
|
+
title: expanded ? void 0 : title || ref,
|
|
5184
|
+
href: review.url,
|
|
5185
|
+
target: "_blank",
|
|
5186
|
+
rel: "noopener noreferrer",
|
|
5187
|
+
children: title || ref
|
|
5188
|
+
}
|
|
5189
|
+
) : /* @__PURE__ */ jsx(
|
|
5190
|
+
"span",
|
|
5191
|
+
{
|
|
5192
|
+
className: prLink,
|
|
5193
|
+
"data-expanded": expanded,
|
|
5194
|
+
title: expanded ? void 0 : title,
|
|
5195
|
+
children: title || ref
|
|
5196
|
+
}
|
|
5197
|
+
),
|
|
5198
|
+
/* @__PURE__ */ jsx("span", { className: badge, children: verdict.label })
|
|
5199
|
+
] }),
|
|
5200
|
+
/* @__PURE__ */ jsx("span", { className: verdictIcon, children: /* @__PURE__ */ jsx(
|
|
5201
|
+
Icon,
|
|
5202
|
+
{
|
|
5203
|
+
name: review.verdict === "comment" ? "comment-bold" : verdict.icon,
|
|
5204
|
+
size: 32,
|
|
5205
|
+
verdict: true
|
|
5206
|
+
}
|
|
5207
|
+
) }),
|
|
5208
|
+
/* @__PURE__ */ jsxs("div", { className: author, children: [
|
|
5209
|
+
title && /* @__PURE__ */ jsx("span", { className: prRef, children: ref }),
|
|
5210
|
+
authorLogin ? /* @__PURE__ */ jsxs("span", { className: authorName, children: [
|
|
5211
|
+
"@",
|
|
5212
|
+
authorLogin.replace(/^@/, "")
|
|
5213
|
+
] }) : /* @__PURE__ */ jsx("span", { className: authorMissing, children: "PR author unavailable" })
|
|
5214
|
+
] }),
|
|
5215
|
+
/* @__PURE__ */ jsxs("div", { className: overview, children: [
|
|
5216
|
+
/* @__PURE__ */ jsx(
|
|
5217
|
+
"p",
|
|
5218
|
+
{
|
|
5219
|
+
className: summary,
|
|
5220
|
+
"data-expanded": expanded,
|
|
5221
|
+
title: expanded ? void 0 : review.summary,
|
|
5222
|
+
children: review.summary
|
|
5223
|
+
}
|
|
5224
|
+
),
|
|
5225
|
+
/* @__PURE__ */ jsxs(
|
|
5226
|
+
"button",
|
|
5227
|
+
{
|
|
5228
|
+
type: "button",
|
|
5229
|
+
className: control,
|
|
5230
|
+
"aria-expanded": expanded,
|
|
5231
|
+
"aria-controls": detailsId,
|
|
5232
|
+
"aria-label": `${expanded ? "Collapse" : "Expand"} review, ${review.findings.length} findings`,
|
|
5233
|
+
onClick: () => setExpanded(!expanded),
|
|
5234
|
+
children: [
|
|
5235
|
+
review.findings.length,
|
|
5236
|
+
" finding",
|
|
5237
|
+
review.findings.length === 1 ? "" : "s",
|
|
5238
|
+
/* @__PURE__ */ jsx(Chevron, {})
|
|
5239
|
+
]
|
|
5240
|
+
}
|
|
5241
|
+
)
|
|
5242
|
+
] })
|
|
5243
|
+
] }),
|
|
5244
|
+
/* @__PURE__ */ jsx(Disclosure, { id: detailsId, open: expanded, children: /* @__PURE__ */ jsxs("div", { className: details, children: [
|
|
5245
|
+
review.findings.length > 0 && /* @__PURE__ */ jsx("div", { className: findings, children: review.findings.map((finding2) => /* @__PURE__ */ jsx(Finding, { finding: finding2 }, finding2.id)) }),
|
|
5246
|
+
/* @__PURE__ */ jsxs("div", { className: meta, children: [
|
|
5247
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
5248
|
+
"Reviewed ",
|
|
5249
|
+
/* @__PURE__ */ jsx("code", { className: mono, children: review.reviewed_commit.slice(0, 12) })
|
|
5250
|
+
] }),
|
|
5251
|
+
/* @__PURE__ */ jsx("span", { children: freshness[review.freshness] }),
|
|
5252
|
+
/* @__PURE__ */ jsx("span", { children: "Room review only · not submitted to GitHub" })
|
|
5253
|
+
] }),
|
|
5254
|
+
actions
|
|
5255
|
+
] }) }),
|
|
5256
|
+
members.length > 0 && /* @__PURE__ */ jsxs("div", { className: mentions, children: [
|
|
5257
|
+
/* @__PURE__ */ jsx("span", { className: mentionLabel, children: "Mentions" }),
|
|
5258
|
+
members.map((member$1) => /* @__PURE__ */ jsxs(
|
|
5259
|
+
"span",
|
|
5260
|
+
{
|
|
5261
|
+
title: member$1.id,
|
|
5262
|
+
className: `${member} ${member$1.isSelf ? ownMention : ""}`,
|
|
5263
|
+
children: [
|
|
5264
|
+
"@",
|
|
5265
|
+
member$1.name
|
|
5266
|
+
]
|
|
5267
|
+
},
|
|
5268
|
+
member$1.id
|
|
5269
|
+
))
|
|
5270
|
+
] })
|
|
5271
|
+
]
|
|
5272
|
+
}
|
|
5273
|
+
) });
|
|
5274
|
+
}
|
|
5275
|
+
function ActionGroup({ actions, hint: hint$1 }) {
|
|
5276
|
+
return /* @__PURE__ */ jsxs("div", { className: actionSection, children: [
|
|
5277
|
+
/* @__PURE__ */ jsx("div", { className: actionGroup, role: "group", "aria-label": "Draft a PR request", children: actions.map((action$1) => /* @__PURE__ */ jsxs(
|
|
5278
|
+
"button",
|
|
5279
|
+
{
|
|
5280
|
+
type: "button",
|
|
5281
|
+
className: `${action} ${action$1.primary ? primaryAction : ""}`,
|
|
5282
|
+
title: action$1.title,
|
|
5283
|
+
onClick: action$1.onClick,
|
|
5284
|
+
children: [
|
|
5285
|
+
/* @__PURE__ */ jsx(Icon, { name: action$1.icon }),
|
|
5286
|
+
action$1.label
|
|
5287
|
+
]
|
|
5288
|
+
},
|
|
5289
|
+
action$1.id
|
|
5290
|
+
)) }),
|
|
5291
|
+
/* @__PURE__ */ jsx("p", { className: hint, role: "status", children: hint$1 })
|
|
5292
|
+
] });
|
|
5293
|
+
}
|
|
4824
5294
|
export {
|
|
5295
|
+
ActionGroup,
|
|
4825
5296
|
AgentGlyph,
|
|
4826
5297
|
AgentMark,
|
|
4827
5298
|
AgentNameTag,
|
|
@@ -4836,13 +5307,18 @@ export {
|
|
|
4836
5307
|
Chip,
|
|
4837
5308
|
ComposeIcon,
|
|
4838
5309
|
CrossSizeVariant,
|
|
5310
|
+
CurrentBoundary,
|
|
5311
|
+
Icon as CurrentIcon,
|
|
5312
|
+
CurrentProvider,
|
|
5313
|
+
CurrentReviewCard,
|
|
4839
5314
|
CutoutCard,
|
|
4840
5315
|
DefaultReset,
|
|
4841
5316
|
Dialog,
|
|
4842
5317
|
Disabled,
|
|
5318
|
+
Disclosure,
|
|
4843
5319
|
FocusOutline,
|
|
4844
5320
|
Header,
|
|
4845
|
-
Icon,
|
|
5321
|
+
Icon$1 as Icon,
|
|
4846
5322
|
IconButton,
|
|
4847
5323
|
Icons,
|
|
4848
5324
|
InfoCard,
|
|
@@ -4907,16 +5383,23 @@ export {
|
|
|
4907
5383
|
TooltipProvider,
|
|
4908
5384
|
TypingIndicator,
|
|
4909
5385
|
as,
|
|
5386
|
+
blueAccent,
|
|
4910
5387
|
color,
|
|
4911
5388
|
config,
|
|
4912
5389
|
configClass,
|
|
5390
|
+
current,
|
|
5391
|
+
primitives_css as currentPrimitives,
|
|
5392
|
+
darkClass,
|
|
4913
5393
|
getRelativeFixedPosition,
|
|
4914
5394
|
getResizeObserverEntry,
|
|
4915
5395
|
getScreenSize,
|
|
5396
|
+
lightClass,
|
|
4916
5397
|
lightTheme,
|
|
5398
|
+
motion,
|
|
4917
5399
|
mountAliveMark,
|
|
4918
5400
|
percent,
|
|
4919
5401
|
pxToRem,
|
|
5402
|
+
resolveCurrentPalette,
|
|
4920
5403
|
toRem,
|
|
4921
5404
|
useElementSizeObserver,
|
|
4922
5405
|
useOverlayContainer,
|