@supos-grid-table/core 0.1.0-alpha.1 → 0.1.0-alpha.2
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/README.md +12 -1
- package/SHADCN.json +117 -0
- package/dist/{grid-DqJTLeBs.mjs → grid-DeVIC26t.mjs} +109 -124
- package/dist/grid-DeVIC26t.mjs.map +1 -0
- package/dist/grid.d.mts +2 -2
- package/dist/grid.mjs +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.mjs +424 -211
- package/dist/react.mjs.map +1 -1
- package/dist/style.css +2 -1
- package/dist/ui-esOhDo-4.mjs +946 -0
- package/dist/ui-esOhDo-4.mjs.map +1 -0
- package/dist/ui.d.mts +183 -0
- package/dist/ui.mjs +2 -0
- package/licenses/@base-ui_react-LICENSE +21 -0
- package/licenses/DEPENDENCIES.json +49 -9
- package/licenses/Shadcn-MIT.txt +21 -0
- package/licenses/class-variance-authority-LICENSE +190 -0
- package/licenses/cmdk-LICENSE.md +21 -0
- package/licenses/cn-LICENSE +21 -0
- package/licenses/lucide-react-LICENSE +7 -3
- package/licenses/tw-animate-css-LICENSE +21 -0
- package/package.json +53 -18
- package/dist/grid-DqJTLeBs.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -11,7 +11,18 @@ import '@supos-grid-table/core/style.css';
|
|
|
11
11
|
<MultiTableApp endpoint="/api/multitable" />;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
前端要求 React
|
|
14
|
+
前端要求 React 19,当前验证版本为最新稳定版 React 19.3.1;服务端/构建要求 Node 22.19+ 或 Bun。子路径 `./grid` 提供独立 Canvas Grid,`./server` 不引入浏览器代码,根入口只导出模型、公式、查询与校验。应用可以直接组合 Grid、字段编辑器、业务页面及自己的前端路由;不要求使用完整默认页面。
|
|
15
|
+
|
|
16
|
+
## UI 组件
|
|
17
|
+
|
|
18
|
+
基础控件使用官方 shadcn/ui `base-nova` registry:CLI 4.23.0、Base UI 1.9.0、Tailwind CSS 4.3.5、React 19.3.1(接入时核对的最新稳定版本)。源码来自官方 CLI,清单与 SHA256 见 `SHADCN.json`,MIT 许可证见 `licenses/Shadcn-MIT.txt`。shadcn 以源码分发,CLI 版本不是独立 UI 运行包版本。
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Button, Input, Dialog, DialogContent, Combobox, Tabs } from '@supos-grid-table/core/ui';
|
|
22
|
+
import '@supos-grid-table/core/style.css';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
基础按钮、输入、复选、原生选择、可搜索多选、弹窗、确认、提示、命令列表、页签和卡片使用官方组件。只保留多表配置、关联填报、数据统计等业务组合,以及 Canvas Grid 需要的薄适配层。Grid 的十六进制颜色适配与 Tailwind 4 的 oklch 颜色分离;业务主题通过标准 CSS token 配置。依赖均固定,后续升级后重新生成来源清单并运行浏览器验收。
|
|
15
26
|
|
|
16
27
|
```ts
|
|
17
28
|
import { TableRuntime, UnsAdapter } from '@supos-grid-table/core/server';
|
package/SHADCN.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova",
|
|
3
|
+
"cli": {
|
|
4
|
+
"package": "shadcn",
|
|
5
|
+
"version": "4.23.0"
|
|
6
|
+
},
|
|
7
|
+
"style": "base-nova",
|
|
8
|
+
"foundation": {
|
|
9
|
+
"package": "@base-ui/react",
|
|
10
|
+
"version": "1.9.0"
|
|
11
|
+
},
|
|
12
|
+
"react": "19.3.1",
|
|
13
|
+
"tailwind": "4.3.5",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"notice": "licenses/Shadcn-MIT.txt",
|
|
16
|
+
"files": [
|
|
17
|
+
{
|
|
18
|
+
"path": "src/components/ui/alert-dialog.tsx",
|
|
19
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/alert-dialog.json",
|
|
20
|
+
"sha256": "d1811546e2248fe9b04e7cefcd4f0ed3acc4e87cb26a083eb17b3c836707d4d0"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "src/components/ui/alert.tsx",
|
|
24
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/alert.json",
|
|
25
|
+
"sha256": "f253568242c1c69b343f12474002fdbe229f603158171c59e21c491ab79f2e6e"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "src/components/ui/badge.tsx",
|
|
29
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/badge.json",
|
|
30
|
+
"sha256": "d9fb280e266119c4b62a4c518e63152de27b094c68d3e5f8929d05bfb0c1bc6c"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "src/components/ui/button.tsx",
|
|
34
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/button.json",
|
|
35
|
+
"sha256": "313353436d0fcc8e44ab470adb614b9fd013d28626f624328ea0d66d41a6c81b"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "src/components/ui/card.tsx",
|
|
39
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/card.json",
|
|
40
|
+
"sha256": "7620e0f122bb5aa0a422254909bd11d5b088bb368eb60e6ba28010c332163cc0"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "src/components/ui/checkbox.tsx",
|
|
44
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/checkbox.json",
|
|
45
|
+
"sha256": "51b82e5ca459ea7792d8f24ac924f13aeaa2b2cd338560d2b4291e38b648c12e"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "src/components/ui/collapsible.tsx",
|
|
49
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/collapsible.json",
|
|
50
|
+
"sha256": "3de60b605e64c835588cecc189fbcf907eb602b0158f970d614b067e868b491e"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"path": "src/components/ui/combobox.tsx",
|
|
54
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/combobox.json",
|
|
55
|
+
"sha256": "7079bebc10f95b265af1d676bd2af201944374eff547ab84a86966be1dee6e0e"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "src/components/ui/command.tsx",
|
|
59
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/command.json",
|
|
60
|
+
"sha256": "eaccda4b82a74406fc744a6ec084f56951a0a613e9c2a4f762b54fa548b376e9"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "src/components/ui/dialog.tsx",
|
|
64
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/dialog.json",
|
|
65
|
+
"sha256": "715536e56196579e1203204d6a6fa7ceb31b3c37d60431da7bcd3bf0243175b1"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"path": "src/components/ui/input-group.tsx",
|
|
69
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/input-group.json",
|
|
70
|
+
"sha256": "7e768d41f247b1a4a3b0d214453dbeb1c2150aba500f5c0037b0285dfbe6a899"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"path": "src/components/ui/input.tsx",
|
|
74
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/input.json",
|
|
75
|
+
"sha256": "dab990dfefa0ba78854ab6602ad074270dba9d7d1262184d9bfbb62bd990903b"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "src/components/ui/label.tsx",
|
|
79
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/label.json",
|
|
80
|
+
"sha256": "86232709f634da7f357a8aaec0e815f3f562604bb67202c88997fae97659b450"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"path": "src/components/ui/native-select.tsx",
|
|
84
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/native-select.json",
|
|
85
|
+
"sha256": "93262e9e6c108df664725a0043f0c06ef844e173088b18c0f807e753e2f86d22"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"path": "src/components/ui/popover.tsx",
|
|
89
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/popover.json",
|
|
90
|
+
"sha256": "5fecff622f4eecc06e8be32bface11c59d529be5c0a1484c78c9e40530b2b7d0"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "src/components/ui/select.tsx",
|
|
94
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/select.json",
|
|
95
|
+
"sha256": "4ba225fb838887a2493a8908774f1294ffbc2030af1e372425c6de76f598f0eb"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"path": "src/components/ui/tabs.tsx",
|
|
99
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/tabs.json",
|
|
100
|
+
"sha256": "958b817b256cffae986d046168b70dd0153d542b4c521ee8bbdda349010011ef"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"path": "src/components/ui/textarea.tsx",
|
|
104
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/textarea.json",
|
|
105
|
+
"sha256": "82601c91ffc6c727d924162c78d7cb853114bcced4e2eb922a68ca12d4239c0f"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"path": "src/components/ui/tooltip.tsx",
|
|
109
|
+
"registry": "https://ui.shadcn.com/r/styles/base-nova/tooltip.json",
|
|
110
|
+
"sha256": "f83d5f511812573f4ac98b866d397a46fda0f27eeb0af0ea89af01969eefbc5a"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"notes": [
|
|
114
|
+
"Generated with the official shadcn CLI; aliases resolved by the CLI.",
|
|
115
|
+
"Business layout/theme and the Teable compatibility import surface are maintained separately."
|
|
116
|
+
]
|
|
117
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { Ht as Button, Vt as Input, at as CommandItem, dt as TooltipProvider, et as Command, ft as TooltipTrigger, it as CommandInput, lt as Tooltip, nt as CommandEmpty, ot as CommandList, rt as CommandGroup, ut as TooltipContent } from "./ui-esOhDo-4.mjs";
|
|
1
2
|
import { clamp, cloneDeep, groupBy, inRange, isEqual, noop, throttle, uniqueId } from "lodash";
|
|
2
|
-
import {
|
|
3
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { cn as cn$1 } from "cn";
|
|
3
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import
|
|
6
|
+
import { Check as Check$1, ChevronDown as ChevronDown$1, ChevronRight, CircleAlert as AlertCircle, EyeOff, GripVertical as DraggableHandle, Info, Lock, Maximize2, Plus as Plus$1, RefreshCcw, Sparkles as MagicAi, Square, X as X$1 } from "lucide-react";
|
|
7
|
+
import { useDirection as useUiDirection } from "@base-ui/react/direction-provider";
|
|
5
8
|
import { Key } from "ts-keycode-enum";
|
|
6
9
|
import { useMouse, useUpdateEffect } from "react-use";
|
|
7
|
-
import { Check as Check$1, ChevronDown as ChevronDown$1, ChevronRight, CircleAlert as AlertCircle, EyeOff, GripVertical as DraggableHandle, Info, Lock, Maximize2, Plus as Plus$1, RefreshCcw, Sparkles as MagicAi, Square, X as X$1 } from "lucide-react";
|
|
8
10
|
import { renderToString } from "react-dom/server";
|
|
9
11
|
import { isHotkeyPressed, useHotkeys } from "react-hotkeys-hook";
|
|
10
12
|
import AutoSizeTextarea from "react-textarea-autosize";
|
|
@@ -28,81 +30,6 @@ function getSelectColorPairs(color, _theme) {
|
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
32
|
//#endregion
|
|
31
|
-
//#region src/grid-adapter/ui.tsx
|
|
32
|
-
const cn = (...values) => values.filter(Boolean).join(" ");
|
|
33
|
-
const useUiDirection = () => "ltr";
|
|
34
|
-
const Input = forwardRef((props, ref) => /* @__PURE__ */ jsx("input", {
|
|
35
|
-
...props,
|
|
36
|
-
ref
|
|
37
|
-
}));
|
|
38
|
-
const Button = ({ size: _size, variant: _variant, ...props }) => /* @__PURE__ */ jsx("button", {
|
|
39
|
-
type: "button",
|
|
40
|
-
...props
|
|
41
|
-
});
|
|
42
|
-
const Search$1 = createContext({
|
|
43
|
-
query: "",
|
|
44
|
-
setQuery: (_value) => {}
|
|
45
|
-
});
|
|
46
|
-
function Command(props) {
|
|
47
|
-
const [query, setQuery] = useState("");
|
|
48
|
-
return /* @__PURE__ */ jsx(Search$1.Provider, {
|
|
49
|
-
value: {
|
|
50
|
-
query,
|
|
51
|
-
setQuery
|
|
52
|
-
},
|
|
53
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
54
|
-
...props,
|
|
55
|
-
role: "group"
|
|
56
|
-
})
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
const CommandInput = forwardRef((props, ref) => {
|
|
60
|
-
const search = useContext(Search$1);
|
|
61
|
-
return /* @__PURE__ */ jsx("input", {
|
|
62
|
-
...props,
|
|
63
|
-
ref,
|
|
64
|
-
value: search.query,
|
|
65
|
-
onChange: (e) => search.setQuery(e.target.value),
|
|
66
|
-
"aria-label": "搜索选项"
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
const CommandList = (props) => /* @__PURE__ */ jsx("div", {
|
|
70
|
-
...props,
|
|
71
|
-
style: {
|
|
72
|
-
maxHeight: 260,
|
|
73
|
-
overflow: "auto"
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const CommandGroup = (props) => /* @__PURE__ */ jsx("div", { ...props });
|
|
77
|
-
const CommandEmpty = (_props) => null;
|
|
78
|
-
function CommandItem({ value, onSelect, ...props }) {
|
|
79
|
-
const { query } = useContext(Search$1);
|
|
80
|
-
return value.toLocaleLowerCase().includes(query.toLocaleLowerCase()) ? /* @__PURE__ */ jsx("button", {
|
|
81
|
-
...props,
|
|
82
|
-
type: "button",
|
|
83
|
-
onClick: onSelect,
|
|
84
|
-
style: {
|
|
85
|
-
display: "flex",
|
|
86
|
-
width: "100%",
|
|
87
|
-
padding: "6px 8px"
|
|
88
|
-
}
|
|
89
|
-
}) : null;
|
|
90
|
-
}
|
|
91
|
-
const TooltipProvider = ({ children }) => children;
|
|
92
|
-
const Tooltip = ({ children }) => /* @__PURE__ */ jsx("span", {
|
|
93
|
-
className: "sg-tooltip",
|
|
94
|
-
children
|
|
95
|
-
});
|
|
96
|
-
const TooltipTrigger = ({ children }) => /* @__PURE__ */ jsx("span", {
|
|
97
|
-
tabIndex: 0,
|
|
98
|
-
children
|
|
99
|
-
});
|
|
100
|
-
const TooltipContent = ({ children, className }) => /* @__PURE__ */ jsx("span", {
|
|
101
|
-
role: "tooltip",
|
|
102
|
-
className: cn("sg-tooltip-content", className),
|
|
103
|
-
children
|
|
104
|
-
});
|
|
105
|
-
//#endregion
|
|
106
33
|
//#region src/vendor/grid/renderers/cell-renderer/interface.ts
|
|
107
34
|
let CellType = /* @__PURE__ */ function(CellType) {
|
|
108
35
|
CellType["Text"] = "Text";
|
|
@@ -298,6 +225,67 @@ const ROW_RELATED_REGIONS = /* @__PURE__ */ new Set([
|
|
|
298
225
|
"RowHeaderExpandHandler"
|
|
299
226
|
]);
|
|
300
227
|
//#endregion
|
|
228
|
+
//#region src/grid-adapter/palette.ts
|
|
229
|
+
var palette_default = {
|
|
230
|
+
transparent: "transparent",
|
|
231
|
+
yellow: { "400": "#facc15" },
|
|
232
|
+
violet: { "500": "#8b5cf6" },
|
|
233
|
+
black: "#000",
|
|
234
|
+
white: "#fff",
|
|
235
|
+
zinc: {
|
|
236
|
+
"50": "#fafafa",
|
|
237
|
+
"100": "#f4f4f5",
|
|
238
|
+
"200": "#e4e4e7",
|
|
239
|
+
"300": "#d4d4d8",
|
|
240
|
+
"400": "#a1a1aa",
|
|
241
|
+
"500": "#71717a",
|
|
242
|
+
"600": "#52525b",
|
|
243
|
+
"700": "#3f3f46",
|
|
244
|
+
"800": "#27272a",
|
|
245
|
+
"900": "#18181b",
|
|
246
|
+
"950": "#09090b"
|
|
247
|
+
},
|
|
248
|
+
gray: {
|
|
249
|
+
"50": "#f9fafb",
|
|
250
|
+
"100": "#f3f4f6",
|
|
251
|
+
"200": "#e5e7eb",
|
|
252
|
+
"300": "#d1d5db",
|
|
253
|
+
"400": "#9ca3af",
|
|
254
|
+
"500": "#6b7280",
|
|
255
|
+
"600": "#4b5563",
|
|
256
|
+
"700": "#374151",
|
|
257
|
+
"800": "#1f2937",
|
|
258
|
+
"900": "#111827",
|
|
259
|
+
"950": "#030712"
|
|
260
|
+
},
|
|
261
|
+
blue: {
|
|
262
|
+
"50": "#eff6ff",
|
|
263
|
+
"100": "#dbeafe",
|
|
264
|
+
"200": "#bfdbfe",
|
|
265
|
+
"300": "#93c5fd",
|
|
266
|
+
"400": "#60a5fa",
|
|
267
|
+
"500": "#3b82f6",
|
|
268
|
+
"600": "#2563eb",
|
|
269
|
+
"700": "#1d4ed8",
|
|
270
|
+
"800": "#1e40af",
|
|
271
|
+
"900": "#1e3a8a",
|
|
272
|
+
"950": "#172554"
|
|
273
|
+
},
|
|
274
|
+
orange: {
|
|
275
|
+
"50": "#fff7ed",
|
|
276
|
+
"100": "#ffedd5",
|
|
277
|
+
"200": "#fed7aa",
|
|
278
|
+
"300": "#fdba74",
|
|
279
|
+
"400": "#fb923c",
|
|
280
|
+
"500": "#f97316",
|
|
281
|
+
"600": "#ea580c",
|
|
282
|
+
"700": "#c2410c",
|
|
283
|
+
"800": "#9a3412",
|
|
284
|
+
"900": "#7c2d12",
|
|
285
|
+
"950": "#431407"
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
//#endregion
|
|
301
289
|
//#region src/vendor/grid/utils/utils.ts
|
|
302
290
|
const cancelTimeout = (timeoutID) => {
|
|
303
291
|
cancelAnimationFrame(timeoutID.id);
|
|
@@ -910,12 +898,12 @@ const shouldForwardPasteToGrid = ({ isEditing, eventTarget, hiddenFocusEl }) =>
|
|
|
910
898
|
const gridTheme = {
|
|
911
899
|
staticWhite: "#FFFFFF",
|
|
912
900
|
staticBlack: "#000000",
|
|
913
|
-
iconFgCommon:
|
|
914
|
-
iconBgCommon:
|
|
915
|
-
iconFgHighlight:
|
|
916
|
-
iconBgHighlight:
|
|
917
|
-
iconFgSelected:
|
|
918
|
-
iconBgSelected:
|
|
901
|
+
iconFgCommon: palette_default.gray[500],
|
|
902
|
+
iconBgCommon: palette_default.transparent,
|
|
903
|
+
iconFgHighlight: palette_default.yellow[400],
|
|
904
|
+
iconBgHighlight: palette_default.yellow[400],
|
|
905
|
+
iconFgSelected: palette_default.blue[50],
|
|
906
|
+
iconBgSelected: palette_default.black,
|
|
919
907
|
iconSizeXS: 16,
|
|
920
908
|
iconSizeSM: 20,
|
|
921
909
|
iconSizeMD: 24,
|
|
@@ -926,46 +914,46 @@ const gridTheme = {
|
|
|
926
914
|
fontSizeMD: 14,
|
|
927
915
|
fontSizeLG: 16,
|
|
928
916
|
fontFamily: "Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",
|
|
929
|
-
cellBg:
|
|
917
|
+
cellBg: palette_default.white,
|
|
930
918
|
cellBgHovered: "#F7F7F7",
|
|
931
919
|
cellBgSelected: "#F0F0F0",
|
|
932
|
-
cellBgLoading: hexToRGBA(
|
|
933
|
-
cellLineColor:
|
|
934
|
-
cellLineColorActived:
|
|
935
|
-
cellTextColor:
|
|
936
|
-
cellTextColorHighlight:
|
|
937
|
-
cellOptionBg:
|
|
938
|
-
cellOptionBgHighlight:
|
|
939
|
-
cellOptionTextColor:
|
|
920
|
+
cellBgLoading: hexToRGBA(palette_default.black, .04),
|
|
921
|
+
cellLineColor: palette_default.zinc[200],
|
|
922
|
+
cellLineColorActived: palette_default.black,
|
|
923
|
+
cellTextColor: palette_default.zinc[900],
|
|
924
|
+
cellTextColorHighlight: palette_default.violet[500],
|
|
925
|
+
cellOptionBg: palette_default.gray[300],
|
|
926
|
+
cellOptionBgHighlight: palette_default.zinc[200],
|
|
927
|
+
cellOptionTextColor: palette_default.black,
|
|
940
928
|
groupHeaderBgPrimary: "#FAFAFA",
|
|
941
929
|
groupHeaderBgSecondary: "#F4F4F5",
|
|
942
930
|
groupHeaderBgTertiary: "#EAEAEB",
|
|
943
931
|
columnStatisticBgHoveredPrimary: "#F2F2F2",
|
|
944
932
|
columnStatisticBgHoveredSecondary: "#EDECEC",
|
|
945
933
|
columnStatisticBgHoveredTertiary: "#E3E2E2",
|
|
946
|
-
columnHeaderBg:
|
|
947
|
-
columnHeaderBgHovered:
|
|
948
|
-
columnHeaderBgSelected:
|
|
949
|
-
columnHeaderNameColor:
|
|
950
|
-
columnResizeHandlerBg:
|
|
951
|
-
columnDraggingPlaceholderBg: hexToRGBA(
|
|
952
|
-
rowHeaderTextColor:
|
|
953
|
-
appendRowBg:
|
|
954
|
-
appendRowBgHovered:
|
|
955
|
-
avatarBg:
|
|
956
|
-
avatarTextColor:
|
|
934
|
+
columnHeaderBg: palette_default.zinc[50],
|
|
935
|
+
columnHeaderBgHovered: palette_default.zinc[100],
|
|
936
|
+
columnHeaderBgSelected: palette_default.zinc[200],
|
|
937
|
+
columnHeaderNameColor: palette_default.zinc[900],
|
|
938
|
+
columnResizeHandlerBg: palette_default.blue[500],
|
|
939
|
+
columnDraggingPlaceholderBg: hexToRGBA(palette_default.black, .2),
|
|
940
|
+
rowHeaderTextColor: palette_default.zinc[500],
|
|
941
|
+
appendRowBg: palette_default.zinc[50],
|
|
942
|
+
appendRowBgHovered: palette_default.zinc[100],
|
|
943
|
+
avatarBg: palette_default.gray[100],
|
|
944
|
+
avatarTextColor: palette_default.gray[950],
|
|
957
945
|
avatarSizeXS: 16,
|
|
958
946
|
avatarSizeSM: 20,
|
|
959
947
|
avatarSizeMD: 24,
|
|
960
948
|
themeKey: "light",
|
|
961
|
-
scrollBarBg:
|
|
962
|
-
interactionLineColorCommon:
|
|
963
|
-
interactionLineColorHighlight:
|
|
964
|
-
searchCursorBg:
|
|
965
|
-
searchTargetIndexBg:
|
|
966
|
-
searchTargetIndexSelectedBg:
|
|
967
|
-
commentCountBg:
|
|
968
|
-
commentCountTextColor:
|
|
949
|
+
scrollBarBg: palette_default.gray[400],
|
|
950
|
+
interactionLineColorCommon: palette_default.zinc[300],
|
|
951
|
+
interactionLineColorHighlight: palette_default.blue[500],
|
|
952
|
+
searchCursorBg: palette_default.blue[300],
|
|
953
|
+
searchTargetIndexBg: palette_default.blue[100],
|
|
954
|
+
searchTargetIndexSelectedBg: palette_default.blue[200],
|
|
955
|
+
commentCountBg: palette_default.orange[400],
|
|
956
|
+
commentCountTextColor: palette_default.white
|
|
969
957
|
};
|
|
970
958
|
//#endregion
|
|
971
959
|
//#region src/vendor/grid/hooks/useDrag.ts
|
|
@@ -6237,7 +6225,7 @@ const ErrorIndicator = (props) => {
|
|
|
6237
6225
|
const { scrollLeft, scrollTop } = scrollState;
|
|
6238
6226
|
const { rowInitSize, freezeColumnCount, freezeRegionWidth, containerWidth, containerHeight } = coordInstance;
|
|
6239
6227
|
return /* @__PURE__ */ jsx(TooltipProvider, {
|
|
6240
|
-
|
|
6228
|
+
delay: 100,
|
|
6241
6229
|
children: /* @__PURE__ */ jsx("div", {
|
|
6242
6230
|
className: "pointer-events-none absolute start-0 top-0",
|
|
6243
6231
|
children: cellErrors.map(({ cellItem, errorMsg, onRetry, onDismiss }) => {
|
|
@@ -6263,14 +6251,11 @@ const ErrorIndicator = (props) => {
|
|
|
6263
6251
|
height: rowHeight
|
|
6264
6252
|
},
|
|
6265
6253
|
children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
6266
|
-
|
|
6267
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
6268
|
-
className: "
|
|
6269
|
-
children: /* @__PURE__ */ jsx("
|
|
6270
|
-
|
|
6271
|
-
children: /* @__PURE__ */ jsx(AlertCircle, { className: "size-4 text-red-500" })
|
|
6272
|
-
})
|
|
6273
|
-
})
|
|
6254
|
+
className: "pointer-events-auto absolute end-1 top-1 cursor-pointer",
|
|
6255
|
+
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", {
|
|
6256
|
+
className: "relative flex size-6 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30",
|
|
6257
|
+
children: /* @__PURE__ */ jsx(AlertCircle, { className: "size-4 text-red-500" })
|
|
6258
|
+
}) })
|
|
6274
6259
|
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
6275
6260
|
side: "bottom",
|
|
6276
6261
|
align: "end",
|
|
@@ -6550,7 +6535,7 @@ const InfiniteScrollerBase = (props, ref) => {
|
|
|
6550
6535
|
useEventListener("touchcancel", onThumbTouchEnd, gridRoot, false, true);
|
|
6551
6536
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
6552
6537
|
ref: horizontalScrollRef,
|
|
6553
|
-
className: cn("scrollbar scrollbar-thumb-foreground/35 hover:scrollbar-thumb-foreground/50 scrollbar-thumb-rounded-md scrollbar-h-2 [&::-webkit-scrollbar-track]:mx-1 absolute bottom-[2px] start-0 h-4 cursor-pointer overflow-y-hidden overflow-x-scroll will-change-transform", !scrollBarVisible && "opacity-0 pointer-events-none"),
|
|
6538
|
+
className: cn$1("scrollbar scrollbar-thumb-foreground/35 hover:scrollbar-thumb-foreground/50 scrollbar-thumb-rounded-md scrollbar-h-2 [&::-webkit-scrollbar-track]:mx-1 absolute bottom-[2px] start-0 h-4 cursor-pointer overflow-y-hidden overflow-x-scroll will-change-transform", !scrollBarVisible && "opacity-0 pointer-events-none"),
|
|
6554
6539
|
style: {
|
|
6555
6540
|
left,
|
|
6556
6541
|
width: containerWidth - left
|
|
@@ -6565,7 +6550,7 @@ const InfiniteScrollerBase = (props, ref) => {
|
|
|
6565
6550
|
})
|
|
6566
6551
|
}), /* @__PURE__ */ jsx("div", {
|
|
6567
6552
|
ref: verticalScrollRef,
|
|
6568
|
-
className: cn("scrollbar scrollbar-thumb-foreground/35 hover:scrollbar-thumb-foreground/50 scrollbar-thumb-rounded-md scrollbar-w-2 scrollbar-min-thumb [&::-webkit-scrollbar-track]:my-1 absolute end-[2px] w-4 cursor-pointer overflow-x-hidden overflow-y-scroll will-change-transform", !scrollBarVisible && "opacity-0 pointer-events-none"),
|
|
6553
|
+
className: cn$1("scrollbar scrollbar-thumb-foreground/35 hover:scrollbar-thumb-foreground/50 scrollbar-thumb-rounded-md scrollbar-w-2 scrollbar-min-thumb [&::-webkit-scrollbar-track]:my-1 absolute end-[2px] w-4 cursor-pointer overflow-x-hidden overflow-y-scroll will-change-transform", !scrollBarVisible && "opacity-0 pointer-events-none"),
|
|
6569
6554
|
style: {
|
|
6570
6555
|
top,
|
|
6571
6556
|
height: containerHeight - top
|
|
@@ -8121,4 +8106,4 @@ const Grid = forwardRef(GridBase);
|
|
|
8121
8106
|
//#endregion
|
|
8122
8107
|
export { LinearRowType as $, getRowControlExtraWidth as A, inRange$1 as B, isNumberKey as C, getRegionData as D, getColumnStatisticData as E, getInfoByGroupIndexCollections as F, cancelTimeout as G, isRangeWithinRanges as H, calculateMaxRange as I, parseToRGB as J, getWheelDelta as K, checkIfRowOrCellActive as L, getRowControlOffsetX as M, binarySearchIndexPoint as N, getCommentCountOffsetX as O, createGroupIndexCollections as P, GridCustomIcon as Q, checkIfRowOrCellSelected as R, measuredCanvas as S, BLANK_REGION_DATA as T, mixRanges as U, isPointInsideRectangle as V, serializedRanges as W, DragRegionType as X, requestTimeout as Y, DraggableType as Z, MIN_FREEZE_SCROLLABLE_WIDTH as _, EditorContainerBase as a, CellRegionType as at, isAncestorOfActiveElement as b, ItemType as c, EditorType as ct, SpriteManager as d, MouseButtonType as et, GridInnerIcon as f, shouldForwardPasteToGrid as g, ImageManager as h, EditorContainer as i, SelectionRegionType as it, getRowControlLayoutWidth as j, getRowControlCheckboxOffsetX as k, CombinedSelection as l, NumberDisplayType as lt, sprites as m, ErrorIndicator as n, RowControlType as nt, performanceTracker as o, CellType as ot, eyeOff as p, hexToRGBA as q, LoadingIndicator as r, SelectableType as rt, CoordinateManager as s, ChartType as st, Grid as t, RegionType as tt, emptySelection as u, canFreezeColumnCount as v, isPrintableKey as w, MeasuredCanvas as x, getMaxFreezeColumnCount as y, flatRanges as z };
|
|
8123
8108
|
|
|
8124
|
-
//# sourceMappingURL=grid-
|
|
8109
|
+
//# sourceMappingURL=grid-DeVIC26t.mjs.map
|