@cjlapao/ui-kit 0.2.13 → 0.2.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.
- package/dist/{CapsuleBlueprint-DY1EmDQu.d.cts → CapsuleBlueprint-sug3nUbg.d.cts} +13 -1
- package/dist/{CapsuleBlueprint-DY1EmDQu.d.ts → CapsuleBlueprint-sug3nUbg.d.ts} +13 -1
- package/dist/index.cjs +249 -246
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +74 -16
- package/dist/index.d.cts +89 -48
- package/dist/index.d.ts +89 -48
- package/dist/index.js +237 -238
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.d.cts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -219,9 +219,12 @@ __export(src_exports, {
|
|
|
219
219
|
OTP_VARIANTS: () => OTP_VARIANTS,
|
|
220
220
|
OrganizationChart: () => OrganizationChart_default,
|
|
221
221
|
PAGED_PANEL_LOADERS: () => PAGED_PANEL_LOADERS,
|
|
222
|
+
PAGE_BODY_LAYOUT_VARIANTS: () => PAGE_BODY_LAYOUT_VARIANTS,
|
|
222
223
|
PAGE_HEADER_VARIANTS: () => SURFACE_VARIANTS,
|
|
223
224
|
PANEL_HERO_TITLE_ELEMENTS: () => PANEL_HERO_TITLE_ELEMENTS,
|
|
224
225
|
PANEL_HERO_VARIANTS: () => PANEL_HERO_VARIANTS,
|
|
226
|
+
PANEL_SLIDE_DURATION_MS: () => PANEL_SLIDE_DURATION_MS,
|
|
227
|
+
PANEL_SLIDE_EASING: () => PANEL_SLIDE_EASING,
|
|
225
228
|
PANEL_TONE_FOR_FIELD: () => PANEL_TONE_FOR_FIELD,
|
|
226
229
|
PANE_EMPTY_STATE_SIZE: () => PANE_EMPTY_STATE_SIZE,
|
|
227
230
|
PILL_CORNERS: () => PILL_CORNERS,
|
|
@@ -612,6 +615,7 @@ __export(src_exports, {
|
|
|
612
615
|
normalizeString: () => normalizeString,
|
|
613
616
|
normalizeStringToUpper: () => normalizeStringToUpper,
|
|
614
617
|
oklchToHex: () => oklchToHex,
|
|
618
|
+
panelSlideTransition: () => panelSlideTransition,
|
|
615
619
|
parseImageSource: () => parseImageSource,
|
|
616
620
|
parseMessage: () => parseMessage,
|
|
617
621
|
parseSmartVariable: () => parseSmartVariable,
|
|
@@ -5974,6 +5978,9 @@ var surfaceCornerRem = {
|
|
|
5974
5978
|
};
|
|
5975
5979
|
var DEFAULT_SURFACE_CORNER = "rounded-md";
|
|
5976
5980
|
var COLLAPSED_RAIL_WIDTH = 56;
|
|
5981
|
+
var PANEL_SLIDE_DURATION_MS = 450;
|
|
5982
|
+
var PANEL_SLIDE_EASING = "cubic-bezier(0.32, 0.72, 0, 1)";
|
|
5983
|
+
var panelSlideTransition = (...properties) => properties.map((property) => `${property} ${PANEL_SLIDE_DURATION_MS}ms ${PANEL_SLIDE_EASING}`).join(", ");
|
|
5977
5984
|
var DEFAULT_CONTROL_CORNER = "rounded-lg";
|
|
5978
5985
|
var SURFACE_VARIANT_FOR_FIELD = {
|
|
5979
5986
|
flat: "outlined",
|
|
@@ -14956,7 +14963,13 @@ var CollapseToggleButton = ({
|
|
|
14956
14963
|
size = "sm",
|
|
14957
14964
|
...rest
|
|
14958
14965
|
}) => {
|
|
14959
|
-
const
|
|
14966
|
+
const towardEdge = !collapsed;
|
|
14967
|
+
const rotation = {
|
|
14968
|
+
right: towardEdge ? "" : "rotate-180",
|
|
14969
|
+
left: towardEdge ? "rotate-180" : "",
|
|
14970
|
+
bottom: towardEdge ? "rotate-90" : "-rotate-90",
|
|
14971
|
+
top: towardEdge ? "-rotate-90" : "rotate-90"
|
|
14972
|
+
}[edge];
|
|
14960
14973
|
return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
14961
14974
|
IconButton_default,
|
|
14962
14975
|
{
|
|
@@ -14965,7 +14978,7 @@ var CollapseToggleButton = ({
|
|
|
14965
14978
|
{
|
|
14966
14979
|
className: (0, import_classnames23.default)(
|
|
14967
14980
|
"transition-transform duration-200 motion-reduce:transition-none",
|
|
14968
|
-
|
|
14981
|
+
rotation
|
|
14969
14982
|
)
|
|
14970
14983
|
}
|
|
14971
14984
|
),
|
|
@@ -23046,7 +23059,8 @@ var PageHeader = ({
|
|
|
23046
23059
|
className = "",
|
|
23047
23060
|
...rest
|
|
23048
23061
|
}) => {
|
|
23049
|
-
const
|
|
23062
|
+
const plain = variant === "none" || variant === "plain";
|
|
23063
|
+
const sharedSurface = !plain && variant !== "default" && variant !== "floating" && variant !== "floating-glass";
|
|
23050
23064
|
const surface = variant === "floating" || variant === "floating-glass" ? getSidebarSurfaceTokens(variant, accentColor) : null;
|
|
23051
23065
|
const pair = surface ? "xs" : "none";
|
|
23052
23066
|
const gutter = {
|
|
@@ -23072,7 +23086,7 @@ var PageHeader = ({
|
|
|
23072
23086
|
surface.border,
|
|
23073
23087
|
surface.shadow,
|
|
23074
23088
|
surface.fill
|
|
23075
|
-
) : !sharedSurface && (0, import_classnames53.default)("border-b", SIDE_MENU_HEADER_FILL, SIDE_MENU_HEADER_SEAM),
|
|
23089
|
+
) : !sharedSurface && !plain && (0, import_classnames53.default)("border-b", SIDE_MENU_HEADER_FILL, SIDE_MENU_HEADER_SEAM),
|
|
23076
23090
|
className
|
|
23077
23091
|
),
|
|
23078
23092
|
children: [
|
|
@@ -43464,6 +43478,21 @@ var InlinePanel_default = InlinePanel;
|
|
|
43464
43478
|
// src/components/SideMenu.tsx
|
|
43465
43479
|
var import_react_router_dom2 = require("react-router-dom");
|
|
43466
43480
|
var import_react246 = __toESM(require("react"), 1);
|
|
43481
|
+
|
|
43482
|
+
// ../common/theme/noise.ts
|
|
43483
|
+
var NOISE_BACKGROUND_IMAGE = `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`;
|
|
43484
|
+
var LIGHT = "mix-blend-multiply opacity-[0.08]";
|
|
43485
|
+
var DARK = "mix-blend-overlay opacity-[0.4]";
|
|
43486
|
+
function getNoiseBlendClasses(scheme = "auto") {
|
|
43487
|
+
if (scheme === "light") return LIGHT;
|
|
43488
|
+
if (scheme === "dark") return DARK;
|
|
43489
|
+
return `${LIGHT} dark:mix-blend-overlay dark:opacity-[0.4]`;
|
|
43490
|
+
}
|
|
43491
|
+
function getNoiseBackgroundSize(scale) {
|
|
43492
|
+
return scale !== void 0 && Number.isFinite(scale) && scale > 0 ? `${200 * scale}px ${200 * scale}px` : void 0;
|
|
43493
|
+
}
|
|
43494
|
+
|
|
43495
|
+
// src/components/SideMenu.tsx
|
|
43467
43496
|
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
43468
43497
|
var EMPTY_VIEW_OPTIONS = [];
|
|
43469
43498
|
var NOISE_STYLE = {
|
|
@@ -43808,6 +43837,7 @@ var SideMenu = ({
|
|
|
43808
43837
|
footerDetails,
|
|
43809
43838
|
footerDetailsTone,
|
|
43810
43839
|
noise = false,
|
|
43840
|
+
noiseScale,
|
|
43811
43841
|
loading = false,
|
|
43812
43842
|
loaderType = "skeleton",
|
|
43813
43843
|
loaderTitle,
|
|
@@ -44458,7 +44488,8 @@ var SideMenu = ({
|
|
|
44458
44488
|
"div",
|
|
44459
44489
|
{
|
|
44460
44490
|
className: `absolute inset-0 opacity-[0.4] pointer-events-none mix-blend-overlay ${surface.radius}`,
|
|
44461
|
-
|
|
44491
|
+
"data-sidemenu-noise": true,
|
|
44492
|
+
style: { ...NOISE_STYLE, backgroundSize: getNoiseBackgroundSize(noiseScale) }
|
|
44462
44493
|
}
|
|
44463
44494
|
),
|
|
44464
44495
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
@@ -44804,18 +44835,6 @@ var import_react251 = require("react");
|
|
|
44804
44835
|
// src/components/SidePanel.tsx
|
|
44805
44836
|
var import_react250 = require("react");
|
|
44806
44837
|
var import_classnames80 = __toESM(require("classnames"), 1);
|
|
44807
|
-
|
|
44808
|
-
// ../common/theme/noise.ts
|
|
44809
|
-
var NOISE_BACKGROUND_IMAGE = `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`;
|
|
44810
|
-
var LIGHT = "mix-blend-multiply opacity-[0.08]";
|
|
44811
|
-
var DARK = "mix-blend-overlay opacity-[0.4]";
|
|
44812
|
-
function getNoiseBlendClasses(scheme = "auto") {
|
|
44813
|
-
if (scheme === "light") return LIGHT;
|
|
44814
|
-
if (scheme === "dark") return DARK;
|
|
44815
|
-
return `${LIGHT} dark:mix-blend-overlay dark:opacity-[0.4]`;
|
|
44816
|
-
}
|
|
44817
|
-
|
|
44818
|
-
// src/components/SidePanel.tsx
|
|
44819
44838
|
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
44820
44839
|
var LEGACY_PANEL_VARIANTS = {
|
|
44821
44840
|
sidebar: "elevated",
|
|
@@ -44825,20 +44844,46 @@ var LEGACY_PANEL_VARIANTS = {
|
|
|
44825
44844
|
};
|
|
44826
44845
|
var resolvePanelVariant2 = (variant) => variant in LEGACY_PANEL_VARIANTS ? LEGACY_PANEL_VARIANTS[variant] : variant;
|
|
44827
44846
|
var getSidePanelTextTokens = (variant) => getSurfaceTextTokens(resolvePanelVariant2(variant));
|
|
44828
|
-
var
|
|
44847
|
+
var INSET_GAP = {
|
|
44848
|
+
xs: { x: "inset-x-1", y: "inset-y-1", px: "px-1", py: "py-1" },
|
|
44849
|
+
sm: { x: "inset-x-2", y: "inset-y-2", px: "px-2", py: "py-2" },
|
|
44850
|
+
md: { x: "inset-x-4", y: "inset-y-4", px: "px-4", py: "py-4" },
|
|
44851
|
+
lg: { x: "inset-x-6", y: "inset-y-6", px: "px-6", py: "py-6" },
|
|
44852
|
+
xl: { x: "inset-x-8", y: "inset-y-8", px: "px-8", py: "py-8" }
|
|
44853
|
+
};
|
|
44854
|
+
var INSET_BORDER = {
|
|
44855
|
+
right: "border-y border-l",
|
|
44856
|
+
left: "border-y border-r",
|
|
44857
|
+
top: "border-x border-b",
|
|
44858
|
+
bottom: "border-x border-t"
|
|
44859
|
+
};
|
|
44860
|
+
var FLUSH_BORDER = {
|
|
44861
|
+
right: "border-l",
|
|
44862
|
+
left: "border-r",
|
|
44863
|
+
top: "border-b",
|
|
44864
|
+
bottom: "border-t"
|
|
44865
|
+
};
|
|
44866
|
+
var BAR_INSET = {
|
|
44867
|
+
none: { x: "inset-x-0", y: "inset-y-0" },
|
|
44868
|
+
rounded: { x: "inset-x-1", y: "inset-y-1" },
|
|
44869
|
+
"rounded-sm": { x: "inset-x-2", y: "inset-y-2" },
|
|
44870
|
+
"rounded-md": { x: "inset-x-4", y: "inset-y-4" },
|
|
44871
|
+
"rounded-lg": { x: "inset-x-6", y: "inset-y-6" },
|
|
44872
|
+
"rounded-xl": { x: "inset-x-8", y: "inset-y-8" }
|
|
44873
|
+
};
|
|
44829
44874
|
var INNER_CORNER = {
|
|
44830
44875
|
// (`"auto"` is absent by design: SidePanel's own default is `rounded`, and
|
|
44831
44876
|
// corner lookups below resolve it to the theme default.)
|
|
44832
|
-
none: { right: "", left: "" },
|
|
44833
|
-
rounded: { right: "rounded-l-sm", left: "rounded-r-sm" },
|
|
44834
|
-
"rounded-sm": { right: "rounded-l-lg", left: "rounded-r-lg" },
|
|
44835
|
-
"rounded-md": { right: "rounded-l-2xl", left: "rounded-r-2xl" },
|
|
44836
|
-
"rounded-lg": { right: "rounded-l-3xl", left: "rounded-r-3xl" },
|
|
44837
|
-
"rounded-xl": { right: "rounded-l-4xl", left: "rounded-r-4xl" }
|
|
44838
|
-
};
|
|
44839
|
-
var SIDE_PANEL_SIDES = ["left", "right"];
|
|
44840
|
-
var OPEN_DURATION_MS =
|
|
44841
|
-
var OPEN_EASING =
|
|
44877
|
+
none: { right: "", left: "", top: "", bottom: "" },
|
|
44878
|
+
rounded: { right: "rounded-l-sm", left: "rounded-r-sm", top: "rounded-b-sm", bottom: "rounded-t-sm" },
|
|
44879
|
+
"rounded-sm": { right: "rounded-l-lg", left: "rounded-r-lg", top: "rounded-b-lg", bottom: "rounded-t-lg" },
|
|
44880
|
+
"rounded-md": { right: "rounded-l-2xl", left: "rounded-r-2xl", top: "rounded-b-2xl", bottom: "rounded-t-2xl" },
|
|
44881
|
+
"rounded-lg": { right: "rounded-l-3xl", left: "rounded-r-3xl", top: "rounded-b-3xl", bottom: "rounded-t-3xl" },
|
|
44882
|
+
"rounded-xl": { right: "rounded-l-4xl", left: "rounded-r-4xl", top: "rounded-b-4xl", bottom: "rounded-t-4xl" }
|
|
44883
|
+
};
|
|
44884
|
+
var SIDE_PANEL_SIDES = ["left", "right", "top", "bottom"];
|
|
44885
|
+
var OPEN_DURATION_MS = PANEL_SLIDE_DURATION_MS;
|
|
44886
|
+
var OPEN_EASING = PANEL_SLIDE_EASING;
|
|
44842
44887
|
var SIZE_TOKENS4 = {
|
|
44843
44888
|
xs: {
|
|
44844
44889
|
pad: "px-2 py-1.5",
|
|
@@ -44879,6 +44924,9 @@ var SidePanel = ({
|
|
|
44879
44924
|
subtitle,
|
|
44880
44925
|
icon,
|
|
44881
44926
|
width = 420,
|
|
44927
|
+
height = 240,
|
|
44928
|
+
minHeight = 120,
|
|
44929
|
+
maxHeight = 600,
|
|
44882
44930
|
headerActions,
|
|
44883
44931
|
footer,
|
|
44884
44932
|
children,
|
|
@@ -44898,6 +44946,7 @@ var SidePanel = ({
|
|
|
44898
44946
|
side = "right",
|
|
44899
44947
|
overlay = false,
|
|
44900
44948
|
noise = false,
|
|
44949
|
+
noiseScale,
|
|
44901
44950
|
inset,
|
|
44902
44951
|
corner = DEFAULT_SURFACE_CORNER,
|
|
44903
44952
|
collapsible = false,
|
|
@@ -44909,6 +44958,7 @@ var SidePanel = ({
|
|
|
44909
44958
|
}) => {
|
|
44910
44959
|
const t = useKitT();
|
|
44911
44960
|
warnIfMissingTitle("SidePanel", title);
|
|
44961
|
+
const vertical = side === "top" || side === "bottom";
|
|
44912
44962
|
const effectiveTone = tone ?? color ?? "neutral";
|
|
44913
44963
|
const sizeToken = SIZE_TOKENS4[size] ?? SIZE_TOKENS4.md;
|
|
44914
44964
|
const legacyVariant = variant in LEGACY_PANEL_VARIANTS;
|
|
@@ -44922,10 +44972,13 @@ var SidePanel = ({
|
|
|
44922
44972
|
surfaceTone
|
|
44923
44973
|
);
|
|
44924
44974
|
const surfaceText = getSidePanelTextTokens(variant);
|
|
44925
|
-
const
|
|
44926
|
-
const
|
|
44927
|
-
const
|
|
44928
|
-
const
|
|
44975
|
+
const insetValue = inset ?? surface.offset !== "";
|
|
44976
|
+
const insetSize = insetValue === true ? "md" : insetValue === false || insetValue === "none" ? null : insetValue;
|
|
44977
|
+
const isInset = insetSize !== null;
|
|
44978
|
+
const insetGap = insetSize ? INSET_GAP[insetSize] : null;
|
|
44979
|
+
const cornerClass = docked ? getSurfaceCornerClass(corner) : INNER_CORNER[corner === "auto" ? DEFAULT_SURFACE_CORNER : corner][side];
|
|
44980
|
+
const borderClass = surface.border ? `${surface.border} ${docked ? "border" : isInset ? INSET_BORDER[side] : surface.borderSides === "all" ? "border" : FLUSH_BORDER[side]}` : "";
|
|
44981
|
+
const shadowClass = side === "right" ? surface.shadowRight : surface.shadow;
|
|
44929
44982
|
const [mounted, setMounted] = (0, import_react250.useState)(isOpen);
|
|
44930
44983
|
const [entered, setEntered] = (0, import_react250.useState)(isOpen);
|
|
44931
44984
|
const prevOpenRef = (0, import_react250.useRef)(isOpen);
|
|
@@ -44946,10 +44999,11 @@ var SidePanel = ({
|
|
|
44946
44999
|
}, [mounted, isOpen, entered]);
|
|
44947
45000
|
const handleTransitionEnd = (event) => {
|
|
44948
45001
|
if (event.target !== event.currentTarget) return;
|
|
44949
|
-
if (event.propertyName !== "width") return;
|
|
45002
|
+
if (event.propertyName !== (vertical ? "height" : "width")) return;
|
|
44950
45003
|
if (!isOpen) setMounted(false);
|
|
44951
45004
|
};
|
|
44952
45005
|
const [currentWidth, setCurrentWidth] = (0, import_react250.useState)(width);
|
|
45006
|
+
const [currentHeight, setCurrentHeight] = (0, import_react250.useState)(height);
|
|
44953
45007
|
const isDraggingRef = (0, import_react250.useRef)(false);
|
|
44954
45008
|
const [isDragging, setIsDragging] = (0, import_react250.useState)(false);
|
|
44955
45009
|
const startXRef = (0, import_react250.useRef)(0);
|
|
@@ -44957,15 +45011,25 @@ var SidePanel = ({
|
|
|
44957
45011
|
(0, import_react250.useEffect)(() => {
|
|
44958
45012
|
if (!isDraggingRef.current) setCurrentWidth(width);
|
|
44959
45013
|
}, [width]);
|
|
45014
|
+
(0, import_react250.useEffect)(() => {
|
|
45015
|
+
if (!isDraggingRef.current) setCurrentHeight(height);
|
|
45016
|
+
}, [height]);
|
|
44960
45017
|
const onMouseDown = (0, import_react250.useCallback)(
|
|
44961
45018
|
(e) => {
|
|
44962
45019
|
if (!resizable) return;
|
|
44963
45020
|
e.preventDefault();
|
|
44964
45021
|
isDraggingRef.current = true;
|
|
44965
45022
|
setIsDragging(true);
|
|
44966
|
-
startXRef.current = e.clientX;
|
|
44967
|
-
startWidthRef.current = currentWidth;
|
|
45023
|
+
startXRef.current = vertical ? e.clientY : e.clientX;
|
|
45024
|
+
startWidthRef.current = vertical ? currentHeight : currentWidth;
|
|
44968
45025
|
const onMouseMove = (ev) => {
|
|
45026
|
+
if (vertical) {
|
|
45027
|
+
const delta2 = side === "bottom" ? startXRef.current - ev.clientY : ev.clientY - startXRef.current;
|
|
45028
|
+
setCurrentHeight(
|
|
45029
|
+
Math.min(maxHeight, Math.max(minHeight, startWidthRef.current + delta2))
|
|
45030
|
+
);
|
|
45031
|
+
return;
|
|
45032
|
+
}
|
|
44969
45033
|
const delta = side === "right" ? startXRef.current - ev.clientX : ev.clientX - startXRef.current;
|
|
44970
45034
|
const next = Math.min(
|
|
44971
45035
|
maxWidth,
|
|
@@ -44974,7 +45038,7 @@ var SidePanel = ({
|
|
|
44974
45038
|
setCurrentWidth(next);
|
|
44975
45039
|
};
|
|
44976
45040
|
document.body.style.userSelect = "none";
|
|
44977
|
-
document.body.style.cursor = "col-resize";
|
|
45041
|
+
document.body.style.cursor = vertical ? "row-resize" : "col-resize";
|
|
44978
45042
|
const onMouseUp = () => {
|
|
44979
45043
|
isDraggingRef.current = false;
|
|
44980
45044
|
setIsDragging(false);
|
|
@@ -44986,9 +45050,10 @@ var SidePanel = ({
|
|
|
44986
45050
|
window.addEventListener("mousemove", onMouseMove);
|
|
44987
45051
|
window.addEventListener("mouseup", onMouseUp);
|
|
44988
45052
|
},
|
|
44989
|
-
[resizable, currentWidth, minWidth, maxWidth, side]
|
|
45053
|
+
[resizable, vertical, currentWidth, currentHeight, minWidth, maxWidth, minHeight, maxHeight, side]
|
|
44990
45054
|
);
|
|
44991
45055
|
const resolvedWidth = resizable ? currentWidth : width;
|
|
45056
|
+
const resolvedHeight = resizable ? currentHeight : height;
|
|
44992
45057
|
const [internalCollapsed, setInternalCollapsed] = (0, import_react250.useState)(defaultCollapsed);
|
|
44993
45058
|
const isCollapsed = collapsible && (collapsed ?? internalCollapsed);
|
|
44994
45059
|
const toggleCollapsed = () => {
|
|
@@ -44997,6 +45062,7 @@ var SidePanel = ({
|
|
|
44997
45062
|
onCollapsedChange?.(next);
|
|
44998
45063
|
};
|
|
44999
45064
|
const shellWidth = isCollapsed ? COLLAPSED_RAIL_WIDTH : resolvedWidth;
|
|
45065
|
+
const shellHeight = isCollapsed ? COLLAPSED_RAIL_WIDTH : resolvedHeight;
|
|
45000
45066
|
const collapseButton = (label) => /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
45001
45067
|
CollapseToggleButton,
|
|
45002
45068
|
{
|
|
@@ -45011,39 +45077,38 @@ var SidePanel = ({
|
|
|
45011
45077
|
(e) => {
|
|
45012
45078
|
if (!resizable) return;
|
|
45013
45079
|
const step = 20;
|
|
45014
|
-
const
|
|
45015
|
-
const
|
|
45080
|
+
const growKey = { right: "ArrowLeft", left: "ArrowRight", bottom: "ArrowUp", top: "ArrowDown" }[side];
|
|
45081
|
+
const shrinkKey = { right: "ArrowRight", left: "ArrowLeft", bottom: "ArrowDown", top: "ArrowUp" }[side];
|
|
45082
|
+
const grow = e.key === growKey;
|
|
45083
|
+
const shrink = e.key === shrinkKey;
|
|
45084
|
+
const [min, max, current, set] = vertical ? [minHeight, maxHeight, currentHeight, setCurrentHeight] : [minWidth, maxWidth, currentWidth, setCurrentWidth];
|
|
45016
45085
|
if (e.key === "Home") {
|
|
45017
45086
|
e.preventDefault();
|
|
45018
|
-
|
|
45087
|
+
set(min);
|
|
45019
45088
|
return;
|
|
45020
45089
|
}
|
|
45021
45090
|
if (e.key === "End") {
|
|
45022
45091
|
e.preventDefault();
|
|
45023
|
-
|
|
45092
|
+
set(max);
|
|
45024
45093
|
return;
|
|
45025
45094
|
}
|
|
45026
45095
|
if (!grow && !shrink) return;
|
|
45027
45096
|
e.preventDefault();
|
|
45028
|
-
|
|
45029
|
-
Math.min(
|
|
45030
|
-
maxWidth,
|
|
45031
|
-
Math.max(minWidth, currentWidth + (grow ? step : -step))
|
|
45032
|
-
)
|
|
45033
|
-
);
|
|
45097
|
+
set(Math.min(max, Math.max(min, current + (grow ? step : -step))));
|
|
45034
45098
|
},
|
|
45035
|
-
[resizable, side, currentWidth, minWidth, maxWidth]
|
|
45099
|
+
[resizable, vertical, side, currentWidth, currentHeight, minWidth, maxWidth, minHeight, maxHeight]
|
|
45036
45100
|
);
|
|
45037
45101
|
if (!mounted || docked && !isOpen) return null;
|
|
45038
|
-
const edgeOffset = entered ? shellWidth : 0;
|
|
45102
|
+
const edgeOffset = entered ? vertical ? shellHeight : shellWidth : 0;
|
|
45039
45103
|
const barTone = isDragging ? `opacity-100 bg-${effectiveTone}-500` : `bg-${effectiveTone}-400 opacity-0 group-hover:opacity-70 group-active:opacity-100`;
|
|
45040
|
-
const
|
|
45104
|
+
const gripTone = isDragging ? `opacity-100 bg-${effectiveTone}-500` : `bg-${effectiveTone}-400 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`;
|
|
45105
|
+
const edgeProperty = side;
|
|
45041
45106
|
const handleStyle = {
|
|
45042
45107
|
[edgeProperty]: edgeOffset,
|
|
45043
45108
|
transition: isDragging ? void 0 : `${edgeProperty} ${OPEN_DURATION_MS}ms ${OPEN_EASING}, opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
|
|
45044
45109
|
};
|
|
45045
45110
|
const handleParked = isCollapsed;
|
|
45046
|
-
|
|
45111
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(import_jsx_runtime263.Fragment, { children: [
|
|
45047
45112
|
/* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
45048
45113
|
"div",
|
|
45049
45114
|
{
|
|
@@ -45051,22 +45116,22 @@ var SidePanel = ({
|
|
|
45051
45116
|
"data-sp-shell": true,
|
|
45052
45117
|
"data-collapsed": collapsible ? isCollapsed : void 0,
|
|
45053
45118
|
className: (0, import_classnames80.default)(
|
|
45054
|
-
docked ? "relative
|
|
45055
|
-
!docked && (
|
|
45056
|
-
|
|
45119
|
+
docked ? (0, import_classnames80.default)("relative shrink-0 overflow-hidden", vertical ? "w-full" : "h-full") : "absolute z-40 overflow-hidden",
|
|
45120
|
+
!docked && (vertical ? insetGap ? insetGap.x : "left-0 w-full" : insetGap ? insetGap.y : "top-0 h-full"),
|
|
45121
|
+
!docked && { right: "right-0", left: "left-0", top: "top-0", bottom: "bottom-0" }[side],
|
|
45057
45122
|
cornerClass,
|
|
45058
45123
|
legacyVariant && borderClass,
|
|
45059
45124
|
legacyVariant ? shadowClass : panelOuterChrome
|
|
45060
45125
|
),
|
|
45061
45126
|
style: {
|
|
45062
|
-
|
|
45127
|
+
...vertical ? { height: entered ? shellHeight : 0 } : { width: entered ? shellWidth : 0 },
|
|
45063
45128
|
// Inline rather than `transition-[width] duration-… ease-…`: an
|
|
45064
45129
|
// arbitrary easing utility would have to survive the safelist, and
|
|
45065
45130
|
// this curve is not themeable anyway. It decelerates hard at the end,
|
|
45066
45131
|
// which is what stops the panel feeling like it snaps into place.
|
|
45067
45132
|
// Suppressed while resizing so the panel tracks the pointer exactly
|
|
45068
45133
|
// rather than lagging a third of a second behind it.
|
|
45069
|
-
transition: isDragging ? void 0 :
|
|
45134
|
+
transition: isDragging ? void 0 : `${vertical ? "height" : "width"} ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
|
|
45070
45135
|
},
|
|
45071
45136
|
onTransitionEnd: handleTransitionEnd,
|
|
45072
45137
|
children: [
|
|
@@ -45106,7 +45171,7 @@ var SidePanel = ({
|
|
|
45106
45171
|
getNoiseBlendClasses(),
|
|
45107
45172
|
cornerClass
|
|
45108
45173
|
),
|
|
45109
|
-
style: { backgroundImage: NOISE_BACKGROUND_IMAGE }
|
|
45174
|
+
style: { backgroundImage: NOISE_BACKGROUND_IMAGE, backgroundSize: getNoiseBackgroundSize(noiseScale) }
|
|
45110
45175
|
}
|
|
45111
45176
|
),
|
|
45112
45177
|
/* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
@@ -45116,12 +45181,13 @@ var SidePanel = ({
|
|
|
45116
45181
|
inert: isCollapsed || void 0,
|
|
45117
45182
|
"aria-hidden": isCollapsed || void 0,
|
|
45118
45183
|
className: (0, import_classnames80.default)(
|
|
45119
|
-
"
|
|
45184
|
+
"flex flex-col transition-opacity duration-200 motion-reduce:transition-none",
|
|
45185
|
+
side === "top" ? "absolute inset-x-0 bottom-0" : "relative h-full",
|
|
45120
45186
|
side === "left" && "ml-auto",
|
|
45121
45187
|
isCollapsed && "opacity-0",
|
|
45122
45188
|
className
|
|
45123
45189
|
),
|
|
45124
|
-
style: {
|
|
45190
|
+
style: vertical ? { height: resolvedHeight } : { width: resolvedWidth },
|
|
45125
45191
|
onKeyDown,
|
|
45126
45192
|
children: [
|
|
45127
45193
|
/* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
@@ -45158,7 +45224,9 @@ var SidePanel = ({
|
|
|
45158
45224
|
)
|
|
45159
45225
|
] }),
|
|
45160
45226
|
/* @__PURE__ */ (0, import_jsx_runtime263.jsxs)("div", { className: "flex shrink-0 items-center gap-1 pt-0.5", children: [
|
|
45161
|
-
collapsible && collapseButton(
|
|
45227
|
+
collapsible && collapseButton(
|
|
45228
|
+
t("kit.sidepanel.collapse")
|
|
45229
|
+
),
|
|
45162
45230
|
headerActions,
|
|
45163
45231
|
onClose && !collapsible && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
45164
45232
|
IconButton_default,
|
|
@@ -45185,10 +45253,10 @@ var SidePanel = ({
|
|
|
45185
45253
|
{
|
|
45186
45254
|
"data-sp-collapsed": true,
|
|
45187
45255
|
className: (0, import_classnames80.default)(
|
|
45188
|
-
"absolute
|
|
45189
|
-
side === "right" ? "left-0" : "right-0"
|
|
45256
|
+
"absolute flex items-center gap-3",
|
|
45257
|
+
vertical ? "inset-x-0 top-0 flex-row px-3" : (0, import_classnames80.default)("inset-y-0 flex-col py-3", side === "right" ? "left-0" : "right-0")
|
|
45190
45258
|
),
|
|
45191
|
-
style: { width: COLLAPSED_RAIL_WIDTH },
|
|
45259
|
+
style: vertical ? { height: COLLAPSED_RAIL_WIDTH } : { width: COLLAPSED_RAIL_WIDTH },
|
|
45192
45260
|
children: [
|
|
45193
45261
|
collapseButton(t("kit.sidepanel.expand")),
|
|
45194
45262
|
(collapsedLabel ?? title) && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
@@ -45196,7 +45264,8 @@ var SidePanel = ({
|
|
|
45196
45264
|
{
|
|
45197
45265
|
"data-sp-collapsed-label": true,
|
|
45198
45266
|
className: (0, import_classnames80.default)(
|
|
45199
|
-
"
|
|
45267
|
+
"truncate text-xs font-semibold uppercase tracking-[0.2em]",
|
|
45268
|
+
vertical ? "min-w-0" : "min-h-0 [writing-mode:vertical-rl]",
|
|
45200
45269
|
surfaceText.muted
|
|
45201
45270
|
),
|
|
45202
45271
|
children: collapsedLabel ?? title
|
|
@@ -45225,7 +45294,7 @@ var SidePanel = ({
|
|
|
45225
45294
|
}
|
|
45226
45295
|
}
|
|
45227
45296
|
),
|
|
45228
|
-
resizable &&
|
|
45297
|
+
resizable && // ARIA 1.2 resizable separator: focusable (tabIndex), arrow keys /
|
|
45229
45298
|
// Home / End resize, aria-valuenow|min|max report the width. Parked
|
|
45230
45299
|
// (collapsed), it drops the role and every aria-* and leaves the tab
|
|
45231
45300
|
// order — see `handleParked`.
|
|
@@ -45237,15 +45306,16 @@ var SidePanel = ({
|
|
|
45237
45306
|
onKeyDown: handleParked ? void 0 : onSeparatorKeyDown,
|
|
45238
45307
|
role: handleParked ? void 0 : "separator",
|
|
45239
45308
|
"aria-hidden": handleParked || void 0,
|
|
45240
|
-
"aria-orientation": handleParked ? void 0 : "vertical",
|
|
45309
|
+
"aria-orientation": handleParked ? void 0 : vertical ? "horizontal" : "vertical",
|
|
45241
45310
|
"aria-label": handleParked ? void 0 : t("kit.sidepanel.resize"),
|
|
45242
|
-
"aria-valuenow": handleParked ? void 0 : resolvedWidth,
|
|
45243
|
-
"aria-valuemin": handleParked ? void 0 : minWidth,
|
|
45244
|
-
"aria-valuemax": handleParked ? void 0 : maxWidth,
|
|
45311
|
+
"aria-valuenow": handleParked ? void 0 : vertical ? resolvedHeight : resolvedWidth,
|
|
45312
|
+
"aria-valuemin": handleParked ? void 0 : vertical ? minHeight : minWidth,
|
|
45313
|
+
"aria-valuemax": handleParked ? void 0 : vertical ? maxHeight : maxWidth,
|
|
45245
45314
|
tabIndex: handleParked ? -1 : 0,
|
|
45246
45315
|
className: (0, import_classnames80.default)(
|
|
45247
|
-
"group absolute z-40
|
|
45248
|
-
|
|
45316
|
+
"group absolute z-40 bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 dark:focus-visible:ring-blue-500",
|
|
45317
|
+
vertical ? "h-3 cursor-row-resize" : "w-3 cursor-col-resize",
|
|
45318
|
+
vertical ? insetGap ? insetGap.x : "inset-x-0" : insetGap ? insetGap.y : "inset-y-0",
|
|
45249
45319
|
handleParked && "pointer-events-none opacity-0"
|
|
45250
45320
|
),
|
|
45251
45321
|
style: handleStyle,
|
|
@@ -45256,8 +45326,16 @@ var SidePanel = ({
|
|
|
45256
45326
|
className: (0, import_classnames80.default)(
|
|
45257
45327
|
// A hairline bar, centred on the panel edge (2px wide at -1px),
|
|
45258
45328
|
// so the grip below sits on it as a bulge on one centre line.
|
|
45259
|
-
|
|
45260
|
-
|
|
45329
|
+
// Inset by the corner radius, so the line stops where the
|
|
45330
|
+
// rounded corner starts instead of running past the curve.
|
|
45331
|
+
"absolute rounded-full transition duration-150",
|
|
45332
|
+
BAR_INSET[corner === "auto" ? DEFAULT_SURFACE_CORNER : corner][vertical ? "x" : "y"],
|
|
45333
|
+
{
|
|
45334
|
+
right: "w-0.5 -right-px",
|
|
45335
|
+
left: "w-0.5 -left-px",
|
|
45336
|
+
bottom: "h-0.5 -bottom-px",
|
|
45337
|
+
top: "h-0.5 -top-px"
|
|
45338
|
+
}[side],
|
|
45261
45339
|
barTone
|
|
45262
45340
|
)
|
|
45263
45341
|
}
|
|
@@ -45268,8 +45346,8 @@ var SidePanel = ({
|
|
|
45268
45346
|
"aria-hidden": "true",
|
|
45269
45347
|
"data-sp-grip": true,
|
|
45270
45348
|
className: (0, import_classnames80.default)(
|
|
45271
|
-
"pointer-events-none absolute
|
|
45272
|
-
side === "right" ? "-right-0.5" : "-left-0.5"
|
|
45349
|
+
"pointer-events-none absolute",
|
|
45350
|
+
vertical ? (0, import_classnames80.default)("left-1/2 h-1 w-10 -translate-x-1/2", side === "bottom" ? "-bottom-0.5" : "-top-0.5") : (0, import_classnames80.default)("top-1/2 h-10 w-1 -translate-y-1/2", side === "right" ? "-right-0.5" : "-left-0.5")
|
|
45273
45351
|
),
|
|
45274
45352
|
children: [
|
|
45275
45353
|
/* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
@@ -45277,8 +45355,8 @@ var SidePanel = ({
|
|
|
45277
45355
|
{
|
|
45278
45356
|
"data-sp-grip-rest": true,
|
|
45279
45357
|
className: (0, import_classnames80.default)(
|
|
45280
|
-
"absolute inset-0 rounded-full bg-neutral-
|
|
45281
|
-
isDragging ? "opacity-0" : "opacity-
|
|
45358
|
+
"absolute inset-0 rounded-full bg-neutral-300 transition-opacity duration-150 dark:bg-neutral-600",
|
|
45359
|
+
isDragging ? "opacity-0" : "opacity-100 group-hover:opacity-0 group-focus-visible:opacity-0"
|
|
45282
45360
|
)
|
|
45283
45361
|
}
|
|
45284
45362
|
),
|
|
@@ -45286,7 +45364,7 @@ var SidePanel = ({
|
|
|
45286
45364
|
"span",
|
|
45287
45365
|
{
|
|
45288
45366
|
"data-sp-grip-active": true,
|
|
45289
|
-
className: (0, import_classnames80.default)("absolute inset-0 rounded-full transition duration-150",
|
|
45367
|
+
className: (0, import_classnames80.default)("absolute inset-0 rounded-full transition duration-150", gripTone)
|
|
45290
45368
|
}
|
|
45291
45369
|
)
|
|
45292
45370
|
]
|
|
@@ -45296,6 +45374,20 @@ var SidePanel = ({
|
|
|
45296
45374
|
}
|
|
45297
45375
|
)
|
|
45298
45376
|
] });
|
|
45377
|
+
return docked ? /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
45378
|
+
"div",
|
|
45379
|
+
{
|
|
45380
|
+
"data-sp-dock": true,
|
|
45381
|
+
className: (0, import_classnames80.default)(
|
|
45382
|
+
"relative flex shrink-0",
|
|
45383
|
+
vertical ? "w-full flex-col" : "h-full",
|
|
45384
|
+
// Inset docked: the gap is padding on the wrapper, so the panel is
|
|
45385
|
+
// shorter (narrower) than its zone; the handle matches it above.
|
|
45386
|
+
insetGap && (vertical ? insetGap.px : insetGap.py)
|
|
45387
|
+
),
|
|
45388
|
+
children: panel
|
|
45389
|
+
}
|
|
45390
|
+
) : panel;
|
|
45299
45391
|
};
|
|
45300
45392
|
var SidePanel_default = SidePanel;
|
|
45301
45393
|
|
|
@@ -66075,6 +66167,7 @@ var WorkflowTrackerRail = ({
|
|
|
66075
66167
|
defaultCollapsed = false,
|
|
66076
66168
|
onCollapsedChange,
|
|
66077
66169
|
fillHeight = false,
|
|
66170
|
+
flush = true,
|
|
66078
66171
|
expandLabel = "Expand workflow rail",
|
|
66079
66172
|
collapseLabel = "Collapse workflow rail",
|
|
66080
66173
|
renderStepPopover,
|
|
@@ -66117,15 +66210,19 @@ var WorkflowTrackerRail = ({
|
|
|
66117
66210
|
scrollable: false,
|
|
66118
66211
|
flexBody: scrollBody,
|
|
66119
66212
|
className: (0, import_classnames115.default)(
|
|
66120
|
-
collapsible && "max-w-full shrink-0
|
|
66213
|
+
collapsible && "max-w-full shrink-0",
|
|
66121
66214
|
fillHeight && "h-full min-h-0 self-stretch",
|
|
66122
66215
|
className,
|
|
66123
66216
|
cardClassName
|
|
66124
66217
|
),
|
|
66125
66218
|
style: collapsible ? {
|
|
66219
|
+
// SidePanel's curve, not `duration-200 ease-in-out` (which read
|
|
66220
|
+
// as a snap). Padding rides it too: collapsing drops it to none,
|
|
66221
|
+
// and snapping it mid-sweep was a visible jump.
|
|
66222
|
+
transition: panelSlideTransition("width", "padding"),
|
|
66126
66223
|
...style,
|
|
66127
66224
|
width: isCollapsed ? COLLAPSED_RAIL_WIDTH : style?.width ?? 360,
|
|
66128
|
-
...
|
|
66225
|
+
...flush ? side === "left" ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
|
|
66129
66226
|
} : style,
|
|
66130
66227
|
"aria-busy": loading || void 0,
|
|
66131
66228
|
"data-collapsed": collapsible ? isCollapsed : void 0,
|
|
@@ -73183,7 +73280,7 @@ function gradientBackdropCss(colors3, s) {
|
|
|
73183
73280
|
var import_jsx_runtime330 = require("react/jsx-runtime");
|
|
73184
73281
|
var GRADIENT_BACKDROP_SCHEMES = ["auto", "light", "dark"];
|
|
73185
73282
|
var GradientBackdrop = import_react306.default.forwardRef(
|
|
73186
|
-
({ theme = "slate", scheme = "auto", noise = false, className, style, children, ...rest }, ref) => {
|
|
73283
|
+
({ theme = "slate", scheme = "auto", noise = false, noiseScale, className, style, children, ...rest }, ref) => {
|
|
73187
73284
|
const themeKey = typeof theme === "string" ? theme : JSON.stringify(theme);
|
|
73188
73285
|
const resolved = (0, import_react306.useMemo)(() => {
|
|
73189
73286
|
const t = resolveGradientBackdropTheme(theme);
|
|
@@ -73217,7 +73314,11 @@ var GradientBackdrop = import_react306.default.forwardRef(
|
|
|
73217
73314
|
"pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",
|
|
73218
73315
|
getNoiseBlendClasses(scheme)
|
|
73219
73316
|
),
|
|
73220
|
-
style: {
|
|
73317
|
+
style: {
|
|
73318
|
+
backgroundImage: NOISE_BACKGROUND_IMAGE,
|
|
73319
|
+
backgroundSize: getNoiseBackgroundSize(noiseScale),
|
|
73320
|
+
backgroundRepeat: "repeat"
|
|
73321
|
+
}
|
|
73221
73322
|
}
|
|
73222
73323
|
),
|
|
73223
73324
|
children
|
|
@@ -73710,136 +73811,34 @@ var TerminalTabs = (0, import_react309.forwardRef)(
|
|
|
73710
73811
|
);
|
|
73711
73812
|
|
|
73712
73813
|
// src/components/PageBodyLayout.tsx
|
|
73713
|
-
var import_react310 = require("react");
|
|
73714
73814
|
var import_classnames141 = __toESM(require("classnames"), 1);
|
|
73715
73815
|
var import_jsx_runtime334 = require("react/jsx-runtime");
|
|
73716
|
-
|
|
73717
|
-
|
|
73718
|
-
const
|
|
73719
|
-
const
|
|
73720
|
-
const collapsed = config.collapsed ?? internalCollapsed;
|
|
73721
|
-
const min = Math.max(0, config.minSize ?? (vertical ? 100 : 160));
|
|
73722
|
-
const max = Math.max(min, config.maxSize ?? (vertical ? 600 : 640));
|
|
73723
|
-
const size = Math.max(min, Math.min(max, config.size ?? internalSize));
|
|
73724
|
-
const collapsedSize = Math.max(0, config.collapsedSize ?? (vertical ? 40 : COLLAPSED_RAIL_WIDTH));
|
|
73725
|
-
const setCollapsed = (next) => {
|
|
73726
|
-
if (config.collapsed === void 0) setInternalCollapsed(next);
|
|
73727
|
-
config.onCollapsedChange?.(next);
|
|
73728
|
-
};
|
|
73729
|
-
const updateSize = (0, import_react310.useCallback)((next) => {
|
|
73730
|
-
const value = Math.max(min, Math.min(max, next));
|
|
73731
|
-
if (config.size === void 0) setInternalSize(value);
|
|
73732
|
-
config.onSizeChange?.(value);
|
|
73733
|
-
}, [min, max, config.size, config.onSizeChange]);
|
|
73734
|
-
const drag = (0, import_react310.useRef)(null);
|
|
73735
|
-
const [dragging, setDragging] = (0, import_react310.useState)(false);
|
|
73736
|
-
(0, import_react310.useEffect)(() => {
|
|
73737
|
-
if (!dragging) return;
|
|
73738
|
-
const previousCursor = document.body.style.cursor;
|
|
73739
|
-
const previousSelect = document.body.style.userSelect;
|
|
73740
|
-
document.body.style.cursor = vertical ? "row-resize" : "col-resize";
|
|
73741
|
-
document.body.style.userSelect = "none";
|
|
73742
|
-
const move = (event) => {
|
|
73743
|
-
if (!drag.current) return;
|
|
73744
|
-
const delta = (vertical ? event.clientY : event.clientX) - drag.current.position;
|
|
73745
|
-
updateSize(drag.current.size + delta * (side === "left" ? 1 : -1));
|
|
73746
|
-
};
|
|
73747
|
-
const stop = () => {
|
|
73748
|
-
drag.current = null;
|
|
73749
|
-
setDragging(false);
|
|
73750
|
-
};
|
|
73751
|
-
window.addEventListener("pointermove", move);
|
|
73752
|
-
window.addEventListener("pointerup", stop);
|
|
73753
|
-
window.addEventListener("pointercancel", stop);
|
|
73754
|
-
return () => {
|
|
73755
|
-
window.removeEventListener("pointermove", move);
|
|
73756
|
-
window.removeEventListener("pointerup", stop);
|
|
73757
|
-
window.removeEventListener("pointercancel", stop);
|
|
73758
|
-
document.body.style.cursor = previousCursor;
|
|
73759
|
-
document.body.style.userSelect = previousSelect;
|
|
73760
|
-
};
|
|
73761
|
-
}, [dragging, vertical, side, updateSize]);
|
|
73762
|
-
const canResize = !collapsed && (config.resizable ?? side !== "left");
|
|
73763
|
-
const dimension = collapsed ? collapsedSize : size;
|
|
73764
|
-
return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(
|
|
73765
|
-
"section",
|
|
73766
|
-
{
|
|
73767
|
-
"aria-label": config.label,
|
|
73768
|
-
"data-page-region": side,
|
|
73769
|
-
"data-collapsed": collapsed,
|
|
73770
|
-
className: "relative min-h-0 min-w-0 shrink-0 overflow-hidden",
|
|
73771
|
-
style: vertical ? { height: dimension } : { width: dimension },
|
|
73772
|
-
children: [
|
|
73773
|
-
/* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
73774
|
-
config.showToggle !== false && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "flex shrink-0 justify-end px-2 py-1", children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
73775
|
-
IconButton_default,
|
|
73776
|
-
{
|
|
73777
|
-
size: "xs",
|
|
73778
|
-
variant: "ghost",
|
|
73779
|
-
color: "neutral",
|
|
73780
|
-
icon: vertical ? collapsed ? "ArrowChevronUp" : "ArrowChevronDown" : collapsed === (side === "left") ? "ArrowChevronRight" : "ArrowChevronLeft",
|
|
73781
|
-
"aria-label": `${collapsed ? "Expand" : "Collapse"} ${config.label}`,
|
|
73782
|
-
"aria-expanded": !collapsed,
|
|
73783
|
-
onClick: () => setCollapsed(!collapsed)
|
|
73784
|
-
}
|
|
73785
|
-
) }),
|
|
73786
|
-
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: (0, import_classnames141.default)("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: typeof config.content === "function" ? config.content({ collapsed, setCollapsed, size }) : /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "h-full", hidden: collapsed, inert: collapsed || void 0, children: config.content }) })
|
|
73787
|
-
] }),
|
|
73788
|
-
canResize && // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/no-noninteractive-tabindex -- focusable ARIA separator provides keyboard and pointer resizing
|
|
73789
|
-
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
73790
|
-
"div",
|
|
73791
|
-
{
|
|
73792
|
-
role: "separator",
|
|
73793
|
-
tabIndex: 0,
|
|
73794
|
-
"aria-label": `Resize ${config.label}`,
|
|
73795
|
-
"aria-orientation": vertical ? "horizontal" : "vertical",
|
|
73796
|
-
"aria-valuemin": min,
|
|
73797
|
-
"aria-valuemax": max,
|
|
73798
|
-
"aria-valuenow": size,
|
|
73799
|
-
className: (0, import_classnames141.default)("absolute z-20 touch-none bg-transparent hover:bg-blue-400/30 focus-visible:bg-blue-400/30 focus-visible:outline-none", vertical ? "inset-x-0 top-0 h-2 cursor-row-resize" : side === "right" ? "inset-y-0 left-0 w-2 cursor-col-resize" : "inset-y-0 right-0 w-2 cursor-col-resize"),
|
|
73800
|
-
onPointerDown: (event) => {
|
|
73801
|
-
if (event.button !== 0) return;
|
|
73802
|
-
event.preventDefault();
|
|
73803
|
-
drag.current = { position: vertical ? event.clientY : event.clientX, size };
|
|
73804
|
-
setDragging(true);
|
|
73805
|
-
},
|
|
73806
|
-
onKeyDown: (event) => {
|
|
73807
|
-
const grow = vertical ? "ArrowUp" : side === "right" ? "ArrowLeft" : "ArrowRight";
|
|
73808
|
-
const shrink = vertical ? "ArrowDown" : side === "right" ? "ArrowRight" : "ArrowLeft";
|
|
73809
|
-
if (![grow, shrink, "Home", "End"].includes(event.key)) return;
|
|
73810
|
-
event.preventDefault();
|
|
73811
|
-
updateSize(event.key === "Home" ? min : event.key === "End" ? max : size + (event.key === grow ? 20 : -20));
|
|
73812
|
-
},
|
|
73813
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { "aria-hidden": "true", className: (0, import_classnames141.default)(
|
|
73814
|
-
"pointer-events-none absolute rounded-full bg-neutral-300 dark:bg-neutral-600",
|
|
73815
|
-
vertical ? "left-1/2 top-0 h-1 w-10 -translate-x-1/2" : "left-0 top-1/2 h-10 w-1 -translate-y-1/2"
|
|
73816
|
-
) })
|
|
73817
|
-
}
|
|
73818
|
-
)
|
|
73819
|
-
]
|
|
73820
|
-
}
|
|
73821
|
-
);
|
|
73822
|
-
}
|
|
73823
|
-
function PageBodyLayout({ header, left, right, bottom, children, className, minCenterWidth = 240, minCenterHeight = 120, variant = "outlined", ...surface }) {
|
|
73824
|
-
return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(Panel_default, { ...surface, variant, padding: "none", scrollable: false, flexBody: true, className: (0, import_classnames141.default)("h-full min-h-0 min-w-0", className), children: [
|
|
73816
|
+
var PAGE_BODY_LAYOUT_VARIANTS = ["none", ...SURFACE_VARIANTS];
|
|
73817
|
+
function PageBodyLayout({ header, left, right, bottom, children, className, minCenterWidth = 240, minCenterHeight = 120, gap = 8, variant = "outlined", ...surface }) {
|
|
73818
|
+
const plain = variant === "none" || variant === "plain";
|
|
73819
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(import_jsx_runtime334.Fragment, { children: [
|
|
73825
73820
|
header && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "shrink-0", children: header }),
|
|
73826
|
-
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: (0, import_classnames141.default)("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex h-full min-h-0", style: { minWidth:
|
|
73827
|
-
left && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
73828
|
-
/* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex min-
|
|
73829
|
-
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "center", className: (0, import_classnames141.default)("min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), style: { minHeight: minCenterHeight
|
|
73830
|
-
bottom && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
73821
|
+
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: (0, import_classnames141.default)("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex h-full min-h-0", style: { minWidth: "fit-content", gap, ...plain ? { paddingTop: header ? gap : 0 } : { padding: gap } }, children: [
|
|
73822
|
+
hasZone(left) && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "left", className: "flex min-h-0 shrink-0", children: left }),
|
|
73823
|
+
/* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", style: { gap, minWidth: minCenterWidth }, children: [
|
|
73824
|
+
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "center", className: (0, import_classnames141.default)("min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), style: { minHeight: minCenterHeight }, children }),
|
|
73825
|
+
hasZone(bottom) && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "bottom", className: "flex min-w-0 shrink-0 flex-col", children: bottom })
|
|
73831
73826
|
] }),
|
|
73832
|
-
right && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
73827
|
+
hasZone(right) && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "right", className: "flex min-h-0 shrink-0", children: right })
|
|
73833
73828
|
] }) })
|
|
73834
73829
|
] });
|
|
73830
|
+
return plain ? /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-layout": "none", className: (0, import_classnames141.default)("flex h-full min-h-0 min-w-0 flex-col", className), children: body }) : /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(Panel_default, { ...surface, variant, padding: "none", scrollable: false, flexBody: true, className: (0, import_classnames141.default)("h-full min-h-0 min-w-0", className), children: body });
|
|
73831
|
+
}
|
|
73832
|
+
function hasZone(node) {
|
|
73833
|
+
return node != null && node !== false;
|
|
73835
73834
|
}
|
|
73836
73835
|
|
|
73837
73836
|
// src/contexts/BottomSheetContext.tsx
|
|
73838
|
-
var
|
|
73837
|
+
var import_react310 = require("react");
|
|
73839
73838
|
var import_react_dom19 = require("react-dom");
|
|
73840
73839
|
var import_classnames142 = __toESM(require("classnames"), 1);
|
|
73841
73840
|
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
73842
|
-
var BottomSheetContext = (0,
|
|
73841
|
+
var BottomSheetContext = (0, import_react310.createContext)(null);
|
|
73843
73842
|
var TRANSITION_MS2 = 260;
|
|
73844
73843
|
var renderSlot = (slot, controls) => {
|
|
73845
73844
|
if (!slot) {
|
|
@@ -73850,13 +73849,13 @@ var renderSlot = (slot, controls) => {
|
|
|
73850
73849
|
var BottomSheetProvider = ({
|
|
73851
73850
|
children
|
|
73852
73851
|
}) => {
|
|
73853
|
-
const [sheet, setSheet] = (0,
|
|
73854
|
-
const [isVisible, setIsVisible] = (0,
|
|
73855
|
-
const pendingCloseRef = (0,
|
|
73856
|
-
const dismissSheet = (0,
|
|
73852
|
+
const [sheet, setSheet] = (0, import_react310.useState)(null);
|
|
73853
|
+
const [isVisible, setIsVisible] = (0, import_react310.useState)(false);
|
|
73854
|
+
const pendingCloseRef = (0, import_react310.useRef)(null);
|
|
73855
|
+
const dismissSheet = (0, import_react310.useCallback)(() => {
|
|
73857
73856
|
setIsVisible(false);
|
|
73858
73857
|
}, []);
|
|
73859
|
-
const presentSheet = (0,
|
|
73858
|
+
const presentSheet = (0, import_react310.useCallback)((options) => {
|
|
73860
73859
|
if (pendingCloseRef.current) {
|
|
73861
73860
|
clearTimeout(pendingCloseRef.current);
|
|
73862
73861
|
pendingCloseRef.current = null;
|
|
@@ -73869,7 +73868,7 @@ var BottomSheetProvider = ({
|
|
|
73869
73868
|
setTimeout(animateIn, 0);
|
|
73870
73869
|
}
|
|
73871
73870
|
}, []);
|
|
73872
|
-
(0,
|
|
73871
|
+
(0, import_react310.useEffect)(() => {
|
|
73873
73872
|
if (!isVisible && sheet) {
|
|
73874
73873
|
pendingCloseRef.current = setTimeout(() => {
|
|
73875
73874
|
sheet.onClose?.();
|
|
@@ -73884,7 +73883,7 @@ var BottomSheetProvider = ({
|
|
|
73884
73883
|
}
|
|
73885
73884
|
return void 0;
|
|
73886
73885
|
}, [isVisible, sheet]);
|
|
73887
|
-
(0,
|
|
73886
|
+
(0, import_react310.useEffect)(
|
|
73888
73887
|
() => () => {
|
|
73889
73888
|
if (pendingCloseRef.current) {
|
|
73890
73889
|
clearTimeout(pendingCloseRef.current);
|
|
@@ -73892,13 +73891,13 @@ var BottomSheetProvider = ({
|
|
|
73892
73891
|
},
|
|
73893
73892
|
[]
|
|
73894
73893
|
);
|
|
73895
|
-
const controls = (0,
|
|
73894
|
+
const controls = (0, import_react310.useMemo)(
|
|
73896
73895
|
() => ({
|
|
73897
73896
|
dismiss: dismissSheet
|
|
73898
73897
|
}),
|
|
73899
73898
|
[dismissSheet]
|
|
73900
73899
|
);
|
|
73901
|
-
const contextValue = (0,
|
|
73900
|
+
const contextValue = (0, import_react310.useMemo)(
|
|
73902
73901
|
() => ({
|
|
73903
73902
|
presentSheet,
|
|
73904
73903
|
dismissSheet,
|
|
@@ -73965,7 +73964,7 @@ var BottomSheetProvider = ({
|
|
|
73965
73964
|
] });
|
|
73966
73965
|
};
|
|
73967
73966
|
var useBottomSheet = () => {
|
|
73968
|
-
const context = (0,
|
|
73967
|
+
const context = (0, import_react310.useContext)(BottomSheetContext);
|
|
73969
73968
|
if (!context) {
|
|
73970
73969
|
throw new Error("useBottomSheet must be used within a BottomSheetProvider");
|
|
73971
73970
|
}
|
|
@@ -74626,7 +74625,7 @@ var MetricBar = ({
|
|
|
74626
74625
|
MetricBar.displayName = "MetricBar";
|
|
74627
74626
|
|
|
74628
74627
|
// src/components/NetworkGraph/NetworkGraph.tsx
|
|
74629
|
-
var
|
|
74628
|
+
var import_react312 = require("react");
|
|
74630
74629
|
|
|
74631
74630
|
// src/components/NetworkGraph/model.ts
|
|
74632
74631
|
var CELL = 64;
|
|
@@ -74770,17 +74769,17 @@ function findNetworkPath(edges, source, target) {
|
|
|
74770
74769
|
}
|
|
74771
74770
|
|
|
74772
74771
|
// src/components/NetworkGraph/useNetworkCanvas.ts
|
|
74773
|
-
var
|
|
74772
|
+
var import_react311 = require("react");
|
|
74774
74773
|
function useNetworkCanvas(options) {
|
|
74775
|
-
const canvasRef = (0,
|
|
74776
|
-
const view = (0,
|
|
74777
|
-
const size = (0,
|
|
74778
|
-
const latest = (0,
|
|
74779
|
-
const frame = (0,
|
|
74780
|
-
const [zoom, setZoom] = (0,
|
|
74781
|
-
const colors3 = (0,
|
|
74782
|
-
const textColor = (0,
|
|
74783
|
-
const draw = (0,
|
|
74774
|
+
const canvasRef = (0, import_react311.useRef)(null);
|
|
74775
|
+
const view = (0, import_react311.useRef)({ x: 0, y: 0, zoom: 1 });
|
|
74776
|
+
const size = (0, import_react311.useRef)({ width: 1, height: 1 });
|
|
74777
|
+
const latest = (0, import_react311.useRef)(options);
|
|
74778
|
+
const frame = (0, import_react311.useRef)(null);
|
|
74779
|
+
const [zoom, setZoom] = (0, import_react311.useState)(1);
|
|
74780
|
+
const colors3 = (0, import_react311.useRef)(/* @__PURE__ */ new Map());
|
|
74781
|
+
const textColor = (0, import_react311.useRef)("#737373");
|
|
74782
|
+
const draw = (0, import_react311.useCallback)(() => {
|
|
74784
74783
|
const canvas = canvasRef.current;
|
|
74785
74784
|
const ctx = canvas?.getContext("2d");
|
|
74786
74785
|
if (!canvas || !ctx) return;
|
|
@@ -74880,14 +74879,14 @@ function useNetworkCanvas(options) {
|
|
|
74880
74879
|
}
|
|
74881
74880
|
ctx.globalAlpha = 1;
|
|
74882
74881
|
}, []);
|
|
74883
|
-
const requestDraw = (0,
|
|
74882
|
+
const requestDraw = (0, import_react311.useCallback)(() => {
|
|
74884
74883
|
if (frame.current !== null) return;
|
|
74885
74884
|
frame.current = requestAnimationFrame(() => {
|
|
74886
74885
|
frame.current = null;
|
|
74887
74886
|
draw();
|
|
74888
74887
|
});
|
|
74889
74888
|
}, [draw]);
|
|
74890
|
-
const update = (0,
|
|
74889
|
+
const update = (0, import_react311.useCallback)(
|
|
74891
74890
|
(next) => {
|
|
74892
74891
|
view.current = next;
|
|
74893
74892
|
setZoom(next.zoom);
|
|
@@ -74896,7 +74895,7 @@ function useNetworkCanvas(options) {
|
|
|
74896
74895
|
},
|
|
74897
74896
|
[requestDraw]
|
|
74898
74897
|
);
|
|
74899
|
-
const fit = (0,
|
|
74898
|
+
const fit = (0, import_react311.useCallback)(
|
|
74900
74899
|
() => update(
|
|
74901
74900
|
fitNetwork(
|
|
74902
74901
|
latest.current.nodes,
|
|
@@ -74906,11 +74905,11 @@ function useNetworkCanvas(options) {
|
|
|
74906
74905
|
),
|
|
74907
74906
|
[update]
|
|
74908
74907
|
);
|
|
74909
|
-
const zoomBy = (0,
|
|
74908
|
+
const zoomBy = (0, import_react311.useCallback)(
|
|
74910
74909
|
(factor, x = size.current.width / 2, y = size.current.height / 2) => update(zoomAt(view.current, factor, x, y)),
|
|
74911
74910
|
[update]
|
|
74912
74911
|
);
|
|
74913
|
-
const focusNode = (0,
|
|
74912
|
+
const focusNode = (0, import_react311.useCallback)(
|
|
74914
74913
|
(node) => {
|
|
74915
74914
|
update({
|
|
74916
74915
|
...view.current,
|
|
@@ -74920,14 +74919,14 @@ function useNetworkCanvas(options) {
|
|
|
74920
74919
|
},
|
|
74921
74920
|
[update]
|
|
74922
74921
|
);
|
|
74923
|
-
(0,
|
|
74922
|
+
(0, import_react311.useEffect)(() => {
|
|
74924
74923
|
latest.current = options;
|
|
74925
74924
|
requestDraw();
|
|
74926
74925
|
}, [options, requestDraw]);
|
|
74927
|
-
(0,
|
|
74926
|
+
(0, import_react311.useEffect)(() => {
|
|
74928
74927
|
fit();
|
|
74929
74928
|
}, [options.model, fit]);
|
|
74930
|
-
(0,
|
|
74929
|
+
(0, import_react311.useEffect)(() => {
|
|
74931
74930
|
const canvas = canvasRef.current;
|
|
74932
74931
|
if (!canvas) return;
|
|
74933
74932
|
const measure = () => {
|
|
@@ -75011,11 +75010,11 @@ function NetworkGraph({
|
|
|
75011
75010
|
...panelProps
|
|
75012
75011
|
}) {
|
|
75013
75012
|
const t = useKitT();
|
|
75014
|
-
const helpId = (0,
|
|
75015
|
-
const layoutRef = (0,
|
|
75016
|
-
const [hasLegendSpace, setHasLegendSpace] = (0,
|
|
75013
|
+
const helpId = (0, import_react312.useId)();
|
|
75014
|
+
const layoutRef = (0, import_react312.useRef)(null);
|
|
75015
|
+
const [hasLegendSpace, setHasLegendSpace] = (0, import_react312.useState)(true);
|
|
75017
75016
|
const legendOnRight = legendPosition === "right" || legendPosition === "auto" && hasLegendSpace;
|
|
75018
|
-
(0,
|
|
75017
|
+
(0, import_react312.useEffect)(() => {
|
|
75019
75018
|
const element = layoutRef.current;
|
|
75020
75019
|
if (!element || legendPosition !== "auto") return;
|
|
75021
75020
|
const measure = () => setHasLegendSpace(element.getBoundingClientRect().width >= 600);
|
|
@@ -75024,38 +75023,38 @@ function NetworkGraph({
|
|
|
75024
75023
|
observer.observe(element);
|
|
75025
75024
|
return () => observer.disconnect();
|
|
75026
75025
|
}, [legendPosition, loading]);
|
|
75027
|
-
const model = (0,
|
|
75026
|
+
const model = (0, import_react312.useMemo)(
|
|
75028
75027
|
() => buildNetwork(nodes, edges, communities),
|
|
75029
75028
|
[nodes, edges, communities]
|
|
75030
75029
|
);
|
|
75031
|
-
const [internalSelected, setInternalSelected] = (0,
|
|
75030
|
+
const [internalSelected, setInternalSelected] = (0, import_react312.useState)(
|
|
75032
75031
|
defaultSelectedNodeId
|
|
75033
75032
|
);
|
|
75034
|
-
const [hidden, setHidden] = (0,
|
|
75035
|
-
const [focused, setFocused] = (0,
|
|
75036
|
-
const [query, setQuery] = (0,
|
|
75037
|
-
const enabled = (0,
|
|
75033
|
+
const [hidden, setHidden] = (0, import_react312.useState)(() => /* @__PURE__ */ new Set());
|
|
75034
|
+
const [focused, setFocused] = (0, import_react312.useState)(null);
|
|
75035
|
+
const [query, setQuery] = (0, import_react312.useState)("");
|
|
75036
|
+
const enabled = (0, import_react312.useMemo)(
|
|
75038
75037
|
() => new Set(
|
|
75039
75038
|
visibleCommunityIds ?? model.groups.filter((g) => !hidden.has(g.id)).map((g) => g.id)
|
|
75040
75039
|
),
|
|
75041
75040
|
[visibleCommunityIds, model, hidden]
|
|
75042
75041
|
);
|
|
75043
|
-
const visibleNodes = (0,
|
|
75042
|
+
const visibleNodes = (0, import_react312.useMemo)(
|
|
75044
75043
|
() => model.nodes.filter((n) => !n.community || enabled.has(n.community)),
|
|
75045
75044
|
[model, enabled]
|
|
75046
75045
|
);
|
|
75047
|
-
const visible = (0,
|
|
75046
|
+
const visible = (0, import_react312.useMemo)(
|
|
75048
75047
|
() => new Set(visibleNodes.map((n) => n.id)),
|
|
75049
75048
|
[visibleNodes]
|
|
75050
75049
|
);
|
|
75051
75050
|
const selection = selectedNodeId === void 0 ? internalSelected : selectedNodeId;
|
|
75052
75051
|
const selected = selection !== null && visible.has(selection) ? selection : null;
|
|
75053
75052
|
const activeFocus = focused !== null && visible.has(focused) ? focused : null;
|
|
75054
|
-
const highlighted = (0,
|
|
75053
|
+
const highlighted = (0, import_react312.useMemo)(
|
|
75055
75054
|
() => new Set(highlightedEdgeIds),
|
|
75056
75055
|
[highlightedEdgeIds]
|
|
75057
75056
|
);
|
|
75058
|
-
const counts = (0,
|
|
75057
|
+
const counts = (0, import_react312.useMemo)(() => {
|
|
75059
75058
|
const result = /* @__PURE__ */ new Map();
|
|
75060
75059
|
for (const n of model.nodes)
|
|
75061
75060
|
if (n.community)
|
|
@@ -75075,7 +75074,7 @@ function NetworkGraph({
|
|
|
75075
75074
|
onViewportChange
|
|
75076
75075
|
});
|
|
75077
75076
|
const locked = disabled || loading;
|
|
75078
|
-
const drag = (0,
|
|
75077
|
+
const drag = (0, import_react312.useRef)(null);
|
|
75079
75078
|
const select = (id) => {
|
|
75080
75079
|
if (locked) return;
|
|
75081
75080
|
if (selectedNodeId === void 0) setInternalSelected(id);
|
|
@@ -75091,7 +75090,7 @@ function NetworkGraph({
|
|
|
75091
75090
|
);
|
|
75092
75091
|
onVisibleCommunitiesChange?.(ids);
|
|
75093
75092
|
};
|
|
75094
|
-
(0,
|
|
75093
|
+
(0, import_react312.useEffect)(() => {
|
|
75095
75094
|
const element = canvas.canvasRef.current;
|
|
75096
75095
|
if (!element || locked) return;
|
|
75097
75096
|
const wheel = (event) => {
|
|
@@ -75140,7 +75139,7 @@ function NetworkGraph({
|
|
|
75140
75139
|
}
|
|
75141
75140
|
};
|
|
75142
75141
|
const focusedNode = model.byId.get(activeFocus ?? selected ?? "");
|
|
75143
|
-
const matchingNodes = (0,
|
|
75142
|
+
const matchingNodes = (0, import_react312.useMemo)(() => {
|
|
75144
75143
|
const search = query.toLocaleLowerCase();
|
|
75145
75144
|
return visibleNodes.filter((n) => (n.label ?? n.id).toLocaleLowerCase().includes(search)).slice(0, 50).map((n) => ({ value: n.id, label: n.label ?? n.id }));
|
|
75146
75145
|
}, [visibleNodes, query]);
|
|
@@ -75650,9 +75649,12 @@ function NetworkGraph({
|
|
|
75650
75649
|
OTP_VARIANTS,
|
|
75651
75650
|
OrganizationChart,
|
|
75652
75651
|
PAGED_PANEL_LOADERS,
|
|
75652
|
+
PAGE_BODY_LAYOUT_VARIANTS,
|
|
75653
75653
|
PAGE_HEADER_VARIANTS,
|
|
75654
75654
|
PANEL_HERO_TITLE_ELEMENTS,
|
|
75655
75655
|
PANEL_HERO_VARIANTS,
|
|
75656
|
+
PANEL_SLIDE_DURATION_MS,
|
|
75657
|
+
PANEL_SLIDE_EASING,
|
|
75656
75658
|
PANEL_TONE_FOR_FIELD,
|
|
75657
75659
|
PANE_EMPTY_STATE_SIZE,
|
|
75658
75660
|
PILL_CORNERS,
|
|
@@ -76043,6 +76045,7 @@ function NetworkGraph({
|
|
|
76043
76045
|
normalizeString,
|
|
76044
76046
|
normalizeStringToUpper,
|
|
76045
76047
|
oklchToHex,
|
|
76048
|
+
panelSlideTransition,
|
|
76046
76049
|
parseImageSource,
|
|
76047
76050
|
parseMessage,
|
|
76048
76051
|
parseSmartVariable,
|