@inf-monkeys-tech/monkeys-design 1.0.42 → 1.0.43
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/OverlayNodeHost-14bb9b0f18f4.d.mts +1 -1
- package/dist/OverlayNodeHost-3c763888b689.d.ts +1 -1
- package/dist/components/agent-workbench/index.js +4 -1
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +4 -1
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/base/index.d.mts +2 -2
- package/dist/components/base/index.d.ts +2 -2
- package/dist/components/base/index.js +212 -58
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +212 -59
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.js +4 -1
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +4 -1
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/layout/index.d.mts +1 -1
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/layout/index.js +4 -1
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +4 -1
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/runtime/index.d.mts +1 -1
- package/dist/components/runtime/index.d.ts +1 -1
- package/dist/components/runtime/index.js +4 -1
- package/dist/components/runtime/index.js.map +1 -1
- package/dist/components/runtime/index.mjs +4 -1
- package/dist/components/runtime/index.mjs.map +1 -1
- package/dist/components/toast/index.d.mts +1 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +4 -1
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toast/index.mjs +4 -1
- package/dist/components/toast/index.mjs.map +1 -1
- package/dist/components/toolbar/index.js +4 -1
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/toolbar/index.mjs +4 -1
- package/dist/components/toolbar/index.mjs.map +1 -1
- package/dist/components/workbench/index.d.mts +9 -1
- package/dist/components/workbench/index.d.ts +9 -1
- package/dist/components/workbench/index.js +244 -78
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +244 -78
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +262 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +261 -75
- package/dist/index.mjs.map +1 -1
- package/dist/locale/index.d.mts +8 -2
- package/dist/locale/index.d.ts +8 -2
- package/dist/locale/index.js +8 -2
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/index.mjs +8 -2
- package/dist/locale/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +25 -5
- package/dist/provider/index.d.ts +25 -5
- package/dist/provider/index.js +24 -3
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +24 -4
- package/dist/provider/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{theme-61b15c3b7960.d.ts → theme-17bde32ca128.d.ts} +3 -2
- package/dist/{theme-7bf5602208e8.d.mts → theme-39d2fdc145c2.d.mts} +3 -2
- package/dist/{types-453d18eab188.d.mts → types-22bd2ecb535c.d.mts} +3 -0
- package/dist/{types-453d18eab188.d.ts → types-22bd2ecb535c.d.ts} +3 -0
- package/dist/{types-3c51850d34c1.d.mts → types-29dff278cb84.d.mts} +15 -1
- package/dist/{types-3c51850d34c1.d.ts → types-29dff278cb84.d.ts} +15 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3044,7 +3044,10 @@ var enUS = {
|
|
|
3044
3044
|
loadError: "Unable to load items",
|
|
3045
3045
|
refreshError: "Unable to refresh items",
|
|
3046
3046
|
retry: "Retry",
|
|
3047
|
-
loadingMore: "Loading more items"
|
|
3047
|
+
loadingMore: "Loading more items",
|
|
3048
|
+
permission: "You do not have permission to view this content",
|
|
3049
|
+
offline: "You appear to be offline",
|
|
3050
|
+
requestAccess: "Request access"
|
|
3048
3051
|
},
|
|
3049
3052
|
interactiveTable: {
|
|
3050
3053
|
columnActions: "Column actions",
|
|
@@ -3324,7 +3327,10 @@ var zhCN = {
|
|
|
3324
3327
|
loadError: "\u65E0\u6CD5\u52A0\u8F7D\u5185\u5BB9",
|
|
3325
3328
|
refreshError: "\u65E0\u6CD5\u5237\u65B0\u5185\u5BB9",
|
|
3326
3329
|
retry: "\u91CD\u8BD5",
|
|
3327
|
-
loadingMore: "\u6B63\u5728\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9"
|
|
3330
|
+
loadingMore: "\u6B63\u5728\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9",
|
|
3331
|
+
permission: "\u4F60\u6CA1\u6709\u6743\u9650\u67E5\u770B\u6B64\u5185\u5BB9",
|
|
3332
|
+
offline: "\u7F51\u7EDC\u8FDE\u63A5\u5DF2\u65AD\u5F00",
|
|
3333
|
+
requestAccess: "\u7533\u8BF7\u6743\u9650"
|
|
3328
3334
|
},
|
|
3329
3335
|
interactiveTable: {
|
|
3330
3336
|
columnActions: "\u5217\u64CD\u4F5C",
|
|
@@ -3821,6 +3827,9 @@ function useMonkeysDataExplorerAppearance(explicit) {
|
|
|
3821
3827
|
[explicit, inherited]
|
|
3822
3828
|
);
|
|
3823
3829
|
}
|
|
3830
|
+
function useMonkeysStatusStates() {
|
|
3831
|
+
return useContext(MonkeysThemeContext).statusStates ?? {};
|
|
3832
|
+
}
|
|
3824
3833
|
function useMonkeysDirection() {
|
|
3825
3834
|
return useContext(MonkeysDirectionContext).direction;
|
|
3826
3835
|
}
|
|
@@ -3906,7 +3915,8 @@ function MonkeysProvider({
|
|
|
3906
3915
|
density,
|
|
3907
3916
|
appearance,
|
|
3908
3917
|
environment,
|
|
3909
|
-
portal
|
|
3918
|
+
portal,
|
|
3919
|
+
statusStates
|
|
3910
3920
|
}) {
|
|
3911
3921
|
const parentLocale = useContext(MonkeysLocaleContext);
|
|
3912
3922
|
const parentTheme = useContext(MonkeysThemeContext);
|
|
@@ -3962,6 +3972,14 @@ function MonkeysProvider({
|
|
|
3962
3972
|
...parentTheme.dataExplorerAppearance?.styles,
|
|
3963
3973
|
...appearance?.dataExplorer?.styles
|
|
3964
3974
|
}
|
|
3975
|
+
},
|
|
3976
|
+
statusStates: {
|
|
3977
|
+
...parentTheme.statusStates,
|
|
3978
|
+
...statusStates,
|
|
3979
|
+
loading: { ...parentTheme.statusStates?.loading, ...statusStates?.loading },
|
|
3980
|
+
empty: { ...parentTheme.statusStates?.empty, ...statusStates?.empty },
|
|
3981
|
+
error: { ...parentTheme.statusStates?.error, ...statusStates?.error },
|
|
3982
|
+
permission: { ...parentTheme.statusStates?.permission, ...statusStates?.permission }
|
|
3965
3983
|
}
|
|
3966
3984
|
}),
|
|
3967
3985
|
[
|
|
@@ -3970,8 +3988,10 @@ function MonkeysProvider({
|
|
|
3970
3988
|
density,
|
|
3971
3989
|
parentTheme.baseAppearance,
|
|
3972
3990
|
parentTheme.dataExplorerAppearance,
|
|
3991
|
+
parentTheme.statusStates,
|
|
3973
3992
|
parentTheme.themeId,
|
|
3974
3993
|
resolvedTheme,
|
|
3994
|
+
statusStates,
|
|
3975
3995
|
themeId
|
|
3976
3996
|
]
|
|
3977
3997
|
);
|
|
@@ -8546,6 +8566,7 @@ var BaseEmptyState = forwardRef(
|
|
|
8546
8566
|
title,
|
|
8547
8567
|
description,
|
|
8548
8568
|
actions,
|
|
8569
|
+
variant,
|
|
8549
8570
|
appearance,
|
|
8550
8571
|
className,
|
|
8551
8572
|
classNames,
|
|
@@ -8554,6 +8575,9 @@ var BaseEmptyState = forwardRef(
|
|
|
8554
8575
|
}, ref) {
|
|
8555
8576
|
const resolvedAppearance = useMonkeysBaseAppearance(appearance);
|
|
8556
8577
|
const componentAttributes = useMonkeysComponentAttributes();
|
|
8578
|
+
const statusStates = useMonkeysStatusStates();
|
|
8579
|
+
const resolvedVariant = variant ?? statusStates.empty?.variant ?? "default";
|
|
8580
|
+
const densityClassName = statusStates.density === "compact" ? "min-h-0 px-3 py-3" : statusStates.density === "comfortable" ? "min-h-56 px-8 py-12" : void 0;
|
|
8557
8581
|
const theme = resolveBaseAppearance(resolvedAppearance);
|
|
8558
8582
|
return /* @__PURE__ */ jsxs(
|
|
8559
8583
|
"div",
|
|
@@ -8564,7 +8588,15 @@ var BaseEmptyState = forwardRef(
|
|
|
8564
8588
|
"data-monkeys-component": "empty-state",
|
|
8565
8589
|
"data-slot": "root",
|
|
8566
8590
|
"data-state": "empty",
|
|
8567
|
-
|
|
8591
|
+
"data-variant": resolvedVariant,
|
|
8592
|
+
"data-density": statusStates.density,
|
|
8593
|
+
className: cn(
|
|
8594
|
+
theme.slots.stateRoot,
|
|
8595
|
+
densityClassName,
|
|
8596
|
+
resolvedVariant === "compact" && "min-h-0 gap-1 py-3",
|
|
8597
|
+
classNames?.root,
|
|
8598
|
+
className
|
|
8599
|
+
),
|
|
8568
8600
|
style: {
|
|
8569
8601
|
...theme.styles.stateRoot,
|
|
8570
8602
|
...style
|
|
@@ -9941,6 +9973,59 @@ var BaseLayoutSplit = forwardRef(
|
|
|
9941
9973
|
);
|
|
9942
9974
|
}
|
|
9943
9975
|
);
|
|
9976
|
+
var variantClassNames = {
|
|
9977
|
+
line: "h-4 w-full",
|
|
9978
|
+
block: "h-24 w-full",
|
|
9979
|
+
circle: "aspect-square h-10 rounded-full"
|
|
9980
|
+
};
|
|
9981
|
+
var BaseSkeleton = forwardRef(
|
|
9982
|
+
function BaseSkeleton2({
|
|
9983
|
+
variant = "line",
|
|
9984
|
+
animated = true,
|
|
9985
|
+
appearance,
|
|
9986
|
+
className,
|
|
9987
|
+
classNames,
|
|
9988
|
+
style,
|
|
9989
|
+
...skeletonProps
|
|
9990
|
+
}, ref) {
|
|
9991
|
+
if (variant !== "line" && variant !== "block" && variant !== "circle") {
|
|
9992
|
+
throw new TypeError(
|
|
9993
|
+
'BaseSkeleton variant must be "line", "block", or "circle".'
|
|
9994
|
+
);
|
|
9995
|
+
}
|
|
9996
|
+
if (typeof animated !== "boolean") {
|
|
9997
|
+
throw new TypeError("BaseSkeleton animated must be a boolean.");
|
|
9998
|
+
}
|
|
9999
|
+
const resolvedAppearance = useMonkeysBaseAppearance(appearance);
|
|
10000
|
+
const componentAttributes = useMonkeysComponentAttributes();
|
|
10001
|
+
const theme = resolveBaseAppearance(resolvedAppearance);
|
|
10002
|
+
return /* @__PURE__ */ jsx(
|
|
10003
|
+
"div",
|
|
10004
|
+
{
|
|
10005
|
+
...componentAttributes,
|
|
10006
|
+
...skeletonProps,
|
|
10007
|
+
ref,
|
|
10008
|
+
"aria-hidden": "true",
|
|
10009
|
+
"data-monkeys-component": "skeleton",
|
|
10010
|
+
"data-slot": "root",
|
|
10011
|
+
"data-variant": variant,
|
|
10012
|
+
"data-animated": animated,
|
|
10013
|
+
"data-state": animated ? "animated" : "static",
|
|
10014
|
+
className: cn(
|
|
10015
|
+
theme.slots.skeletonRoot,
|
|
10016
|
+
variantClassNames[variant],
|
|
10017
|
+
animated && "motion-safe:animate-pulse motion-reduce:animate-none",
|
|
10018
|
+
classNames?.root,
|
|
10019
|
+
className
|
|
10020
|
+
),
|
|
10021
|
+
style: {
|
|
10022
|
+
...theme.styles.skeleton,
|
|
10023
|
+
...style
|
|
10024
|
+
}
|
|
10025
|
+
}
|
|
10026
|
+
);
|
|
10027
|
+
}
|
|
10028
|
+
);
|
|
9944
10029
|
function DefaultLoadingIcon({ className }) {
|
|
9945
10030
|
return /* @__PURE__ */ jsxs(
|
|
9946
10031
|
"svg",
|
|
@@ -9978,6 +10063,7 @@ var BaseLoadingState = forwardRef(function BaseLoadingState2({
|
|
|
9978
10063
|
title,
|
|
9979
10064
|
description,
|
|
9980
10065
|
actions,
|
|
10066
|
+
variant,
|
|
9981
10067
|
appearance,
|
|
9982
10068
|
className,
|
|
9983
10069
|
classNames,
|
|
@@ -9992,8 +10078,11 @@ var BaseLoadingState = forwardRef(function BaseLoadingState2({
|
|
|
9992
10078
|
const resolvedAppearance = useMonkeysBaseAppearance(appearance);
|
|
9993
10079
|
const componentAttributes = useMonkeysComponentAttributes();
|
|
9994
10080
|
const loadingMessages = useMonkeysLocaleMessages().loading;
|
|
10081
|
+
const statusStates = useMonkeysStatusStates();
|
|
10082
|
+
const resolvedVariant = variant ?? statusStates.loading?.variant ?? "spinner";
|
|
10083
|
+
const densityClassName = statusStates.density === "compact" ? "min-h-0 px-3 py-3" : statusStates.density === "comfortable" ? "min-h-56 px-8 py-12" : void 0;
|
|
9995
10084
|
const theme = resolveBaseAppearance(resolvedAppearance);
|
|
9996
|
-
const resolvedIcon = icon === void 0 ? /* @__PURE__ */ jsx(DefaultLoadingIcon, { className: theme.slots.loadingSpinner }) : icon;
|
|
10085
|
+
const resolvedIcon = resolvedVariant === "skeleton" && icon === void 0 ? void 0 : icon === void 0 ? /* @__PURE__ */ jsx(DefaultLoadingIcon, { className: theme.slots.loadingSpinner }) : icon;
|
|
9997
10086
|
const resolvedAriaLabel = nativeAriaLabel ?? (nativeAriaLabelledBy === void 0 ? loadingMessages.spinner : void 0);
|
|
9998
10087
|
return /* @__PURE__ */ jsxs(
|
|
9999
10088
|
"div",
|
|
@@ -10009,13 +10098,19 @@ var BaseLoadingState = forwardRef(function BaseLoadingState2({
|
|
|
10009
10098
|
"data-monkeys-component": "loading-state",
|
|
10010
10099
|
"data-slot": "root",
|
|
10011
10100
|
"data-state": "loading",
|
|
10012
|
-
|
|
10101
|
+
"data-variant": resolvedVariant,
|
|
10102
|
+
"data-density": statusStates.density,
|
|
10103
|
+
className: cn(theme.slots.stateRoot, densityClassName, classNames?.root, className),
|
|
10013
10104
|
style: {
|
|
10014
10105
|
...theme.styles.stateRoot,
|
|
10015
10106
|
...style
|
|
10016
10107
|
},
|
|
10017
10108
|
children: [
|
|
10018
|
-
|
|
10109
|
+
resolvedVariant === "skeleton" ? /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-sm flex-col gap-3", "data-slot": "skeleton", children: [
|
|
10110
|
+
/* @__PURE__ */ jsx(BaseSkeleton, { variant: "block", className: "h-20" }),
|
|
10111
|
+
/* @__PURE__ */ jsx(BaseSkeleton, { variant: "line", className: "w-4/5" }),
|
|
10112
|
+
/* @__PURE__ */ jsx(BaseSkeleton, { variant: "line", className: "w-3/5" })
|
|
10113
|
+
] }) : hasRenderableNode(resolvedIcon) ? /* @__PURE__ */ jsx(
|
|
10019
10114
|
"div",
|
|
10020
10115
|
{
|
|
10021
10116
|
"data-slot": "icon",
|
|
@@ -12912,59 +13007,6 @@ function BaseSegmentedControl({
|
|
|
12912
13007
|
}
|
|
12913
13008
|
);
|
|
12914
13009
|
}
|
|
12915
|
-
var variantClassNames = {
|
|
12916
|
-
line: "h-4 w-full",
|
|
12917
|
-
block: "h-24 w-full",
|
|
12918
|
-
circle: "aspect-square h-10 rounded-full"
|
|
12919
|
-
};
|
|
12920
|
-
var BaseSkeleton = forwardRef(
|
|
12921
|
-
function BaseSkeleton2({
|
|
12922
|
-
variant = "line",
|
|
12923
|
-
animated = true,
|
|
12924
|
-
appearance,
|
|
12925
|
-
className,
|
|
12926
|
-
classNames,
|
|
12927
|
-
style,
|
|
12928
|
-
...skeletonProps
|
|
12929
|
-
}, ref) {
|
|
12930
|
-
if (variant !== "line" && variant !== "block" && variant !== "circle") {
|
|
12931
|
-
throw new TypeError(
|
|
12932
|
-
'BaseSkeleton variant must be "line", "block", or "circle".'
|
|
12933
|
-
);
|
|
12934
|
-
}
|
|
12935
|
-
if (typeof animated !== "boolean") {
|
|
12936
|
-
throw new TypeError("BaseSkeleton animated must be a boolean.");
|
|
12937
|
-
}
|
|
12938
|
-
const resolvedAppearance = useMonkeysBaseAppearance(appearance);
|
|
12939
|
-
const componentAttributes = useMonkeysComponentAttributes();
|
|
12940
|
-
const theme = resolveBaseAppearance(resolvedAppearance);
|
|
12941
|
-
return /* @__PURE__ */ jsx(
|
|
12942
|
-
"div",
|
|
12943
|
-
{
|
|
12944
|
-
...componentAttributes,
|
|
12945
|
-
...skeletonProps,
|
|
12946
|
-
ref,
|
|
12947
|
-
"aria-hidden": "true",
|
|
12948
|
-
"data-monkeys-component": "skeleton",
|
|
12949
|
-
"data-slot": "root",
|
|
12950
|
-
"data-variant": variant,
|
|
12951
|
-
"data-animated": animated,
|
|
12952
|
-
"data-state": animated ? "animated" : "static",
|
|
12953
|
-
className: cn(
|
|
12954
|
-
theme.slots.skeletonRoot,
|
|
12955
|
-
variantClassNames[variant],
|
|
12956
|
-
animated && "motion-safe:animate-pulse motion-reduce:animate-none",
|
|
12957
|
-
classNames?.root,
|
|
12958
|
-
className
|
|
12959
|
-
),
|
|
12960
|
-
style: {
|
|
12961
|
-
...theme.styles.skeleton,
|
|
12962
|
-
...style
|
|
12963
|
-
}
|
|
12964
|
-
}
|
|
12965
|
-
);
|
|
12966
|
-
}
|
|
12967
|
-
);
|
|
12968
13010
|
var BaseSpinner = forwardRef(
|
|
12969
13011
|
function BaseSpinner2({
|
|
12970
13012
|
decorative = false,
|
|
@@ -13575,6 +13617,131 @@ var BaseSwitch = forwardRef(
|
|
|
13575
13617
|
);
|
|
13576
13618
|
}
|
|
13577
13619
|
);
|
|
13620
|
+
function SystemStateIcon({ kind }) {
|
|
13621
|
+
const path = {
|
|
13622
|
+
error: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13623
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
13624
|
+
/* @__PURE__ */ jsx("path", { d: "M12 7v6" }),
|
|
13625
|
+
/* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
|
|
13626
|
+
] }),
|
|
13627
|
+
permission: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13628
|
+
/* @__PURE__ */ jsx("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
|
|
13629
|
+
/* @__PURE__ */ jsx("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
|
|
13630
|
+
] }),
|
|
13631
|
+
offline: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13632
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12.5a10 10 0 0 1 14 0" }),
|
|
13633
|
+
/* @__PURE__ */ jsx("path", { d: "M8.5 16a5 5 0 0 1 7 0" }),
|
|
13634
|
+
/* @__PURE__ */ jsx("path", { d: "M12 20h.01" }),
|
|
13635
|
+
/* @__PURE__ */ jsx("path", { d: "m4 4 16 16" })
|
|
13636
|
+
] }),
|
|
13637
|
+
fallback: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13638
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
13639
|
+
/* @__PURE__ */ jsx("path", { d: "M9.5 9a2.5 2.5 0 1 1 4.2 1.8c-1 .8-1.7 1.2-1.7 2.7" }),
|
|
13640
|
+
/* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
|
|
13641
|
+
] })
|
|
13642
|
+
};
|
|
13643
|
+
return /* @__PURE__ */ jsx(
|
|
13644
|
+
"svg",
|
|
13645
|
+
{
|
|
13646
|
+
"aria-hidden": "true",
|
|
13647
|
+
viewBox: "0 0 24 24",
|
|
13648
|
+
className: "h-7 w-7",
|
|
13649
|
+
fill: "none",
|
|
13650
|
+
stroke: "currentColor",
|
|
13651
|
+
strokeLinecap: "round",
|
|
13652
|
+
strokeLinejoin: "round",
|
|
13653
|
+
strokeWidth: "1.8",
|
|
13654
|
+
children: path[kind]
|
|
13655
|
+
}
|
|
13656
|
+
);
|
|
13657
|
+
}
|
|
13658
|
+
var BaseSystemState = forwardRef(
|
|
13659
|
+
function BaseSystemState2({
|
|
13660
|
+
kind = "fallback",
|
|
13661
|
+
icon,
|
|
13662
|
+
title,
|
|
13663
|
+
description,
|
|
13664
|
+
actions,
|
|
13665
|
+
appearance,
|
|
13666
|
+
className,
|
|
13667
|
+
classNames,
|
|
13668
|
+
style,
|
|
13669
|
+
role,
|
|
13670
|
+
"aria-live": ariaLive,
|
|
13671
|
+
...stateProps
|
|
13672
|
+
}, ref) {
|
|
13673
|
+
const resolvedAppearance = useMonkeysBaseAppearance(appearance);
|
|
13674
|
+
const componentAttributes = useMonkeysComponentAttributes();
|
|
13675
|
+
const statusStates = useMonkeysStatusStates();
|
|
13676
|
+
const densityClassName = statusStates.density === "compact" ? "min-h-0 px-3 py-3" : statusStates.density === "comfortable" ? "min-h-56 px-8 py-12" : void 0;
|
|
13677
|
+
const theme = resolveBaseAppearance(resolvedAppearance);
|
|
13678
|
+
const resolvedIcon = icon === void 0 ? /* @__PURE__ */ jsx(SystemStateIcon, { kind }) : icon;
|
|
13679
|
+
const resolvedRole = role ?? (kind === "error" || kind === "offline" ? "alert" : "status");
|
|
13680
|
+
return /* @__PURE__ */ jsxs(
|
|
13681
|
+
"div",
|
|
13682
|
+
{
|
|
13683
|
+
...componentAttributes,
|
|
13684
|
+
...stateProps,
|
|
13685
|
+
ref,
|
|
13686
|
+
role: resolvedRole,
|
|
13687
|
+
"aria-live": ariaLive ?? (resolvedRole === "alert" ? "assertive" : "polite"),
|
|
13688
|
+
"data-monkeys-component": "system-state",
|
|
13689
|
+
"data-slot": "root",
|
|
13690
|
+
"data-state": kind,
|
|
13691
|
+
"data-density": statusStates.density,
|
|
13692
|
+
className: cn(
|
|
13693
|
+
theme.slots.stateRoot,
|
|
13694
|
+
densityClassName,
|
|
13695
|
+
classNames?.root,
|
|
13696
|
+
className
|
|
13697
|
+
),
|
|
13698
|
+
style: { ...theme.styles.stateRoot, ...style },
|
|
13699
|
+
children: [
|
|
13700
|
+
hasRenderableNode(resolvedIcon) ? /* @__PURE__ */ jsx(
|
|
13701
|
+
"div",
|
|
13702
|
+
{
|
|
13703
|
+
"data-slot": "icon",
|
|
13704
|
+
"data-state": kind,
|
|
13705
|
+
className: cn(theme.slots.stateIcon, classNames?.icon),
|
|
13706
|
+
style: theme.styles.stateIcon,
|
|
13707
|
+
children: resolvedIcon
|
|
13708
|
+
}
|
|
13709
|
+
) : null,
|
|
13710
|
+
hasRenderableNode(title) ? /* @__PURE__ */ jsx(
|
|
13711
|
+
"div",
|
|
13712
|
+
{
|
|
13713
|
+
"data-slot": "title",
|
|
13714
|
+
"data-state": kind,
|
|
13715
|
+
className: cn(theme.slots.stateTitle, classNames?.title),
|
|
13716
|
+
children: title
|
|
13717
|
+
}
|
|
13718
|
+
) : null,
|
|
13719
|
+
hasRenderableNode(description) ? /* @__PURE__ */ jsx(
|
|
13720
|
+
"div",
|
|
13721
|
+
{
|
|
13722
|
+
"data-slot": "description",
|
|
13723
|
+
"data-state": kind,
|
|
13724
|
+
className: cn(
|
|
13725
|
+
theme.slots.stateDescription,
|
|
13726
|
+
classNames?.description
|
|
13727
|
+
),
|
|
13728
|
+
children: description
|
|
13729
|
+
}
|
|
13730
|
+
) : null,
|
|
13731
|
+
hasRenderableNode(actions) ? /* @__PURE__ */ jsx(
|
|
13732
|
+
"div",
|
|
13733
|
+
{
|
|
13734
|
+
"data-slot": "actions",
|
|
13735
|
+
"data-state": kind,
|
|
13736
|
+
className: cn(theme.slots.stateActions, classNames?.actions),
|
|
13737
|
+
children: actions
|
|
13738
|
+
}
|
|
13739
|
+
) : null
|
|
13740
|
+
]
|
|
13741
|
+
}
|
|
13742
|
+
);
|
|
13743
|
+
}
|
|
13744
|
+
);
|
|
13578
13745
|
var DATA_TRANSFER_COLUMN_TYPE = "application/x-monkeys-base-table-column";
|
|
13579
13746
|
var COLUMN_RESIZE_KEYBOARD_STEP = 8;
|
|
13580
13747
|
function assignRef2(ref, value) {
|
|
@@ -22563,6 +22730,7 @@ function WorkbenchCollection({
|
|
|
22563
22730
|
}) {
|
|
22564
22731
|
const componentAttributes = useMonkeysComponentAttributes();
|
|
22565
22732
|
const localeMessages = useMonkeysLocaleMessages().workbench.collection;
|
|
22733
|
+
const statusStates = useMonkeysStatusStates();
|
|
22566
22734
|
const componentId = useId().replace(/:/g, "");
|
|
22567
22735
|
const rootRef = useRef(null);
|
|
22568
22736
|
const itemsRef = useRef(null);
|
|
@@ -22653,7 +22821,10 @@ function WorkbenchCollection({
|
|
|
22653
22821
|
loadError: config.labels?.loadError ?? localeMessages.loadError,
|
|
22654
22822
|
refreshError: config.labels?.refreshError ?? localeMessages.refreshError,
|
|
22655
22823
|
retry: config.labels?.retry ?? localeMessages.retry,
|
|
22656
|
-
loadingMore: config.labels?.loadingMore ?? localeMessages.loadingMore
|
|
22824
|
+
loadingMore: config.labels?.loadingMore ?? localeMessages.loadingMore,
|
|
22825
|
+
permission: config.labels?.permission ?? localeMessages.permission,
|
|
22826
|
+
offline: config.labels?.offline ?? localeMessages.offline,
|
|
22827
|
+
requestAccess: config.labels?.requestAccess ?? localeMessages.requestAccess
|
|
22657
22828
|
}), [config.labels, localeMessages]);
|
|
22658
22829
|
const virtualizationError = useMemo(() => {
|
|
22659
22830
|
const virtualization = config.virtualization;
|
|
@@ -23101,11 +23272,15 @@ function WorkbenchCollection({
|
|
|
23101
23272
|
const selectionToolbar = selectedKeys.size > 0 ? resolveRenderableSlot(slots?.selectionToolbar, slotContext) : null;
|
|
23102
23273
|
const beforeItems = resolveRenderableSlot(slots?.beforeItems, slotContext);
|
|
23103
23274
|
const footer = resolveRenderableSlot(slots?.footer, slotContext);
|
|
23104
|
-
const
|
|
23105
|
-
const
|
|
23106
|
-
const
|
|
23275
|
+
const showPermission = state?.permission === true;
|
|
23276
|
+
const showOffline = state?.offline === true && !showPermission;
|
|
23277
|
+
const showInitialLoading = loading && items.length === 0 && !showPermission && !showOffline;
|
|
23278
|
+
const showInitialError = Boolean(effectiveError) && items.length === 0 && !showPermission && !showOffline && !showInitialLoading;
|
|
23279
|
+
const showEmpty = !showPermission && !showOffline && !showInitialLoading && !showInitialError && (state?.empty === true || items.length === 0);
|
|
23107
23280
|
const loadingSlot = resolveRenderableSlot(slots?.loading, slotContext);
|
|
23108
23281
|
const errorSlot = resolveRenderableSlot(slots?.error, slotContext);
|
|
23282
|
+
const permissionSlot = resolveRenderableSlot(slots?.permission, slotContext);
|
|
23283
|
+
const offlineSlot = resolveRenderableSlot(slots?.offline, slotContext);
|
|
23109
23284
|
const emptySlot = resolveRenderableSlot(slots?.empty, slotContext);
|
|
23110
23285
|
const loadMoreSlot = resolveRenderableSlot(slots?.loadMore, slotContext);
|
|
23111
23286
|
const selfScrollable = config.layout.scrollOwner === "self" || config.layout.scrollOwner === void 0 && (config.layout.fillHeight || config.layout.maxHeight);
|
|
@@ -23136,14 +23311,26 @@ function WorkbenchCollection({
|
|
|
23136
23311
|
hasRenderableNode(toolbar) ? /* @__PURE__ */ jsx("div", { className: classNames?.toolbar, children: toolbar }) : null,
|
|
23137
23312
|
hasRenderableNode(selectionToolbar) ? /* @__PURE__ */ jsx("div", { className: classNames?.selectionToolbar, children: selectionToolbar }) : null,
|
|
23138
23313
|
hasRenderableNode(beforeItems) ? /* @__PURE__ */ jsx("div", { className: classNames?.beforeItems, children: beforeItems }) : null,
|
|
23139
|
-
|
|
23140
|
-
|
|
23314
|
+
showPermission ? hasRenderableNode(permissionSlot) ? permissionSlot : /* @__PURE__ */ jsx(
|
|
23315
|
+
BaseSystemState,
|
|
23316
|
+
{
|
|
23317
|
+
kind: "permission",
|
|
23318
|
+
title: labels.permission,
|
|
23319
|
+
actions: statusStates.permission?.showRequestAccess !== false && callbacks?.onRequestAccess ? /* @__PURE__ */ jsx(BaseButton, { size: "sm", label: labels.requestAccess, onClick: callbacks.onRequestAccess }) : void 0
|
|
23320
|
+
}
|
|
23321
|
+
) : showOffline ? hasRenderableNode(offlineSlot) ? offlineSlot : /* @__PURE__ */ jsx(
|
|
23322
|
+
BaseSystemState,
|
|
23323
|
+
{
|
|
23324
|
+
kind: "offline",
|
|
23325
|
+
title: labels.offline,
|
|
23326
|
+
actions: statusStates.error?.showRetry !== false && callbacks?.onRetry ? /* @__PURE__ */ jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
|
|
23327
|
+
}
|
|
23328
|
+
) : showInitialLoading ? hasRenderableNode(loadingSlot) ? loadingSlot : /* @__PURE__ */ jsx(BaseLoadingState, { title: labels.loading }) : showInitialError ? hasRenderableNode(errorSlot) ? errorSlot : /* @__PURE__ */ jsx(
|
|
23329
|
+
BaseSystemState,
|
|
23141
23330
|
{
|
|
23142
|
-
|
|
23143
|
-
role: "alert",
|
|
23144
|
-
"aria-live": "assertive",
|
|
23331
|
+
kind: "error",
|
|
23145
23332
|
title: labels.loadError,
|
|
23146
|
-
actions: callbacks?.onRetry ? /* @__PURE__ */ jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
|
|
23333
|
+
actions: statusStates.error?.showRetry !== false && callbacks?.onRetry ? /* @__PURE__ */ jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
|
|
23147
23334
|
}
|
|
23148
23335
|
) : showEmpty ? hasRenderableNode(emptySlot) ? emptySlot : /* @__PURE__ */ jsx(BaseEmptyState, { title: labels.empty }) : /* @__PURE__ */ jsx(
|
|
23149
23336
|
"div",
|
|
@@ -23175,12 +23362,11 @@ function WorkbenchCollection({
|
|
|
23175
23362
|
}
|
|
23176
23363
|
),
|
|
23177
23364
|
items.length > 0 && effectiveError ? /* @__PURE__ */ jsx("div", { className: classNames?.status, children: hasRenderableNode(errorSlot) ? errorSlot : /* @__PURE__ */ jsx(
|
|
23178
|
-
|
|
23365
|
+
BaseSystemState,
|
|
23179
23366
|
{
|
|
23180
|
-
|
|
23181
|
-
role: "alert",
|
|
23367
|
+
kind: "error",
|
|
23182
23368
|
title: labels.refreshError,
|
|
23183
|
-
actions: callbacks?.onRetry ? /* @__PURE__ */ jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
|
|
23369
|
+
actions: statusStates.error?.showRetry !== false && callbacks?.onRetry ? /* @__PURE__ */ jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
|
|
23184
23370
|
}
|
|
23185
23371
|
) }) : null,
|
|
23186
23372
|
items.length > 0 && (hasMore || loadingMore) ? /* @__PURE__ */ jsx("div", { ref: loadMoreRef, className: classNames?.loadMore, "data-collection-load-more": "", children: hasRenderableNode(loadMoreSlot) ? loadMoreSlot : loadingMore ? /* @__PURE__ */ jsx(BaseLoadingState, { title: labels.loadingMore }) : null }) : null,
|
|
@@ -30520,6 +30706,6 @@ function useDarkMode() {
|
|
|
30520
30706
|
return { mode, setMode, resolvedMode };
|
|
30521
30707
|
}
|
|
30522
30708
|
|
|
30523
|
-
export { AgentWorkbenchActivity, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchTool, AppHeader, AppLayout, AppShellSidebar, AppSidebar, ApplicationHandoffLink, BaseAccordion, BaseAspectRatio, BaseAvatar, BaseBadge, BaseBreadcrumb, BaseButton, BaseCheckbox, BaseCode, BaseContainer, BaseContextMenu, BaseContextMenuCheckboxItem, BaseContextMenuContent, BaseContextMenuItem, BaseContextMenuLabel, BaseContextMenuRadioGroup, BaseContextMenuRadioItem, BaseContextMenuSeparator, BaseContextMenuSub, BaseContextMenuSubContent, BaseContextMenuSubTrigger, BaseContextMenuTrigger, BaseDescriptionList, BaseDialog, BaseDivider, BaseDropdownMenu, BaseEmptyState, BaseField, BaseFieldset, BaseGrid, BaseHeading, BaseInline, BaseInput, BaseInputGroup, BaseKbd, BaseLayout, BaseLayoutPane, BaseLayoutResizeHandle, BaseLayoutSplit, BaseLink, BaseList, BaseListItem, BaseLoadingState, BaseMultiSelect, BaseNotice, BaseNumberInput, BasePagination, BasePanel, BasePasswordInput, BasePortal, BaseProgress, BaseRadioGroup, BaseScrollArea, BaseSectionHeader, BaseSegmentedControl, BaseSelect, BaseSkeleton, BaseSpinner, BaseStack, BaseSteps, BaseSwitch, BaseTable, BaseTableBody, BaseTableCaption, BaseTableCell, BaseTableContainer, BaseTableEmpty, BaseTableFooter, BaseTableFooterBar, BaseTableHead, BaseTableHeader, BaseTableLoading, BaseTableRow, BaseTabs, BaseText, BaseTextarea, BaseToolbar, BaseTooltip, BaseVisuallyHidden, DarkModeSelector, DarkModeSubMenu, DataExplorerActionBar, DataExplorerButton, DataExplorerCheckbox, DataExplorerCollectionFooter, DataExplorerDetailField, DataExplorerDetailSection, DataExplorerDetailShell, DataExplorerDisplayActionMenu, DataExplorerDisplayCard, DataExplorerDisplayCollectionView, DataExplorerDisplayListItem, DataExplorerDisplayMedia, DataExplorerImagePreview, DataExplorerPage, DataExplorerRecordCard, DataExplorerSelect, DataExplorerToolbarActions, DataExplorerToolbarShell, DataExplorerTree, DataExplorerTreeShell, DataExplorerView, DataExplorerViewCollection, DataExplorerViewItem, DataExplorerViewItemShell, DataExplorerViewShell, DataExplorerViewTree, I18nSelector, InteractiveTable, InteractiveTableEditableTextCell, InteractiveTableReadonlyCell, InteractiveTableSelectCell, LoginPage, MonkeysProvider, MonkeysToastProvider, MonkeysToaster, NavButton, NavigationLayout, OverlayNodeHost, RenderNodeHost, MonkeysToastProvider as ToastProvider, MonkeysToaster as Toaster, UserAccountMenu, WorkbenchAssetGallery, WorkbenchCollection, WorkbenchContentPane, WorkbenchContentToolbar, WorkbenchDetailSidebar, WorkbenchEvidenceList, WorkbenchGalleryCard, WorkbenchGallerySettingsButton, WorkbenchGallerySettingsPanel, WorkbenchGalleryView, WorkbenchJourneyNavigation, WorkbenchLaneView, WorkbenchMasonryLayout, WorkbenchMetricGrid, WorkbenchRadarFilterChip, WorkbenchRadarInspectorSection, WorkbenchRadarMatrix, WorkbenchRadarNavigation, WorkbenchRadarWorkspace, WorkbenchRankedList, WorkbenchRelationshipGraph, WorkbenchResizableSidebar, WorkbenchScatterPlot, WorkbenchSelectionTray, WorkbenchTableView, applyThemeTokens, browserOverlayHistoryAdapter, buildOverlayUrl, calculateHue, calculateLightness, calculateSaturation, cn2 as cn, compileThemeTokens, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel, createSolidColorScale, defaultMonkeysLocale, enUS, extractToastMessage, genTailwindTheme, getBaseBadgeToneClassName, getBaseButtonToneClassName, getBaseMenuItemToneClassName, getBaseNoticeToneClassName, getDataExplorerActionToneClassName, getDataExplorerMenuItemToneClassName, getOverlayPresentationClassNames, getOverlayZIndex, getRenderNodeDataAttributes, getThemeTokenCssValue, isOverlayUrlActive, markDarkColor, mergeMonkeysLocaleMessages, resolveBaseAppearance, resolveDataExplorerAppearance, resolveMonkeysLocale, resolveRenderNodePolicyState, resolveToastVariantForMessage, sessionRenderNodeScrollRestoration, setTailwindTheme, toast, useDarkMode, useMonkeysBaseAppearance, useMonkeysComponentAttributes, useMonkeysDataExplorerAppearance, useMonkeysDirection, useMonkeysEnvironment, useMonkeysLocale, useMonkeysLocaleMessages, useMonkeysPortalOptions, useMonkeysResolvedTheme, useToastFeed, useToastOnValue, zhCN };
|
|
30709
|
+
export { AgentWorkbenchActivity, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchTool, AppHeader, AppLayout, AppShellSidebar, AppSidebar, ApplicationHandoffLink, BaseAccordion, BaseAspectRatio, BaseAvatar, BaseBadge, BaseBreadcrumb, BaseButton, BaseCheckbox, BaseCode, BaseContainer, BaseContextMenu, BaseContextMenuCheckboxItem, BaseContextMenuContent, BaseContextMenuItem, BaseContextMenuLabel, BaseContextMenuRadioGroup, BaseContextMenuRadioItem, BaseContextMenuSeparator, BaseContextMenuSub, BaseContextMenuSubContent, BaseContextMenuSubTrigger, BaseContextMenuTrigger, BaseDescriptionList, BaseDialog, BaseDivider, BaseDropdownMenu, BaseEmptyState, BaseField, BaseFieldset, BaseGrid, BaseHeading, BaseInline, BaseInput, BaseInputGroup, BaseKbd, BaseLayout, BaseLayoutPane, BaseLayoutResizeHandle, BaseLayoutSplit, BaseLink, BaseList, BaseListItem, BaseLoadingState, BaseMultiSelect, BaseNotice, BaseNumberInput, BasePagination, BasePanel, BasePasswordInput, BasePortal, BaseProgress, BaseRadioGroup, BaseScrollArea, BaseSectionHeader, BaseSegmentedControl, BaseSelect, BaseSkeleton, BaseSpinner, BaseStack, BaseSteps, BaseSwitch, BaseSystemState, BaseTable, BaseTableBody, BaseTableCaption, BaseTableCell, BaseTableContainer, BaseTableEmpty, BaseTableFooter, BaseTableFooterBar, BaseTableHead, BaseTableHeader, BaseTableLoading, BaseTableRow, BaseTabs, BaseText, BaseTextarea, BaseToolbar, BaseTooltip, BaseVisuallyHidden, DarkModeSelector, DarkModeSubMenu, DataExplorerActionBar, DataExplorerButton, DataExplorerCheckbox, DataExplorerCollectionFooter, DataExplorerDetailField, DataExplorerDetailSection, DataExplorerDetailShell, DataExplorerDisplayActionMenu, DataExplorerDisplayCard, DataExplorerDisplayCollectionView, DataExplorerDisplayListItem, DataExplorerDisplayMedia, DataExplorerImagePreview, DataExplorerPage, DataExplorerRecordCard, DataExplorerSelect, DataExplorerToolbarActions, DataExplorerToolbarShell, DataExplorerTree, DataExplorerTreeShell, DataExplorerView, DataExplorerViewCollection, DataExplorerViewItem, DataExplorerViewItemShell, DataExplorerViewShell, DataExplorerViewTree, I18nSelector, InteractiveTable, InteractiveTableEditableTextCell, InteractiveTableReadonlyCell, InteractiveTableSelectCell, LoginPage, MonkeysProvider, MonkeysToastProvider, MonkeysToaster, NavButton, NavigationLayout, OverlayNodeHost, RenderNodeHost, MonkeysToastProvider as ToastProvider, MonkeysToaster as Toaster, UserAccountMenu, WorkbenchAssetGallery, WorkbenchCollection, WorkbenchContentPane, WorkbenchContentToolbar, WorkbenchDetailSidebar, WorkbenchEvidenceList, WorkbenchGalleryCard, WorkbenchGallerySettingsButton, WorkbenchGallerySettingsPanel, WorkbenchGalleryView, WorkbenchJourneyNavigation, WorkbenchLaneView, WorkbenchMasonryLayout, WorkbenchMetricGrid, WorkbenchRadarFilterChip, WorkbenchRadarInspectorSection, WorkbenchRadarMatrix, WorkbenchRadarNavigation, WorkbenchRadarWorkspace, WorkbenchRankedList, WorkbenchRelationshipGraph, WorkbenchResizableSidebar, WorkbenchScatterPlot, WorkbenchSelectionTray, WorkbenchTableView, applyThemeTokens, browserOverlayHistoryAdapter, buildOverlayUrl, calculateHue, calculateLightness, calculateSaturation, cn2 as cn, compileThemeTokens, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel, createSolidColorScale, defaultMonkeysLocale, enUS, extractToastMessage, genTailwindTheme, getBaseBadgeToneClassName, getBaseButtonToneClassName, getBaseMenuItemToneClassName, getBaseNoticeToneClassName, getDataExplorerActionToneClassName, getDataExplorerMenuItemToneClassName, getOverlayPresentationClassNames, getOverlayZIndex, getRenderNodeDataAttributes, getThemeTokenCssValue, isOverlayUrlActive, markDarkColor, mergeMonkeysLocaleMessages, resolveBaseAppearance, resolveDataExplorerAppearance, resolveMonkeysLocale, resolveRenderNodePolicyState, resolveToastVariantForMessage, sessionRenderNodeScrollRestoration, setTailwindTheme, toast, useDarkMode, useMonkeysBaseAppearance, useMonkeysComponentAttributes, useMonkeysDataExplorerAppearance, useMonkeysDirection, useMonkeysEnvironment, useMonkeysLocale, useMonkeysLocaleMessages, useMonkeysPortalOptions, useMonkeysResolvedTheme, useMonkeysStatusStates, useToastFeed, useToastOnValue, zhCN };
|
|
30524
30710
|
//# sourceMappingURL=index.mjs.map
|
|
30525
30711
|
//# sourceMappingURL=index.mjs.map
|