intable 0.0.6 → 0.0.8

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.
Files changed (197) hide show
  1. package/.github/copilot-instructions.md +102 -0
  2. package/README.md +16 -263
  3. package/docs/index-BaMALNy6.css +1 -0
  4. package/docs/index-CDN48t9E.js +3 -0
  5. package/docs/index-Cc4RNkLY.css +1 -0
  6. package/docs/index-MRnbkYmU.js +3 -0
  7. package/docs/index.html +15 -0
  8. package/docs/vite.svg +1 -0
  9. package/index.html +13 -0
  10. package/package.json +35 -38
  11. package/packages/intable/README.md +379 -0
  12. package/packages/intable/package.json +51 -0
  13. package/packages/intable/src/assets/ClearFormat.svg +3 -0
  14. package/packages/intable/src/assets/Forms.svg +4 -0
  15. package/packages/intable/src/assets/MergeCell.svg +4 -0
  16. package/packages/intable/src/assets/SplitCell.svg +4 -0
  17. package/packages/intable/src/assets/gap.svg +3 -0
  18. package/packages/intable/src/assets/loading.svg +12 -0
  19. package/packages/intable/src/assets/paint.svg +9 -0
  20. package/packages/intable/src/assets/solid.svg +1 -0
  21. package/packages/intable/src/components/Columns.tsx +86 -0
  22. package/packages/intable/src/components/DocTree.tsx +36 -0
  23. package/packages/intable/src/components/Menu.tsx +109 -0
  24. package/packages/intable/src/components/Popover.tsx +55 -0
  25. package/packages/intable/src/components/RecycleList.tsx +99 -0
  26. package/packages/intable/src/components/Render.tsx +26 -0
  27. package/packages/intable/src/components/Split.tsx +56 -0
  28. package/packages/intable/src/components/Tree.tsx +115 -0
  29. package/packages/intable/src/components/utils.tsx +12 -0
  30. package/packages/intable/src/hooks/index.ts +200 -0
  31. package/packages/intable/src/hooks/useDir.ts +78 -0
  32. package/packages/intable/src/hooks/useSelector.ts +91 -0
  33. package/packages/intable/src/hooks/useSort.tsx +118 -0
  34. package/packages/intable/src/hooks/useVirtualizer.ts +180 -0
  35. package/packages/intable/src/index.tsx +489 -0
  36. package/packages/intable/src/plugins/CellChangeHighlightPlugin.tsx +5 -0
  37. package/packages/intable/src/plugins/CellMergePlugin.tsx +153 -0
  38. package/packages/intable/src/plugins/CellSelectionPlugin.tsx +175 -0
  39. package/packages/intable/src/plugins/CommandPlugin.tsx +74 -0
  40. package/packages/intable/src/plugins/CopyPastePlugin.tsx +99 -0
  41. package/packages/intable/src/plugins/DiffPlugin.tsx +120 -0
  42. package/packages/intable/src/plugins/DragPlugin.tsx +81 -0
  43. package/packages/intable/src/plugins/EditablePlugin.tsx +252 -0
  44. package/packages/intable/src/plugins/ExpandPlugin.tsx +80 -0
  45. package/packages/intable/src/plugins/HeaderGroup.tsx +289 -0
  46. package/packages/intable/src/plugins/HistoryPlugin.tsx +49 -0
  47. package/packages/intable/src/plugins/MenuPlugin.tsx +195 -0
  48. package/packages/intable/src/plugins/RenderPlugin/components.tsx +51 -0
  49. package/packages/intable/src/plugins/RenderPlugin/index.tsx +81 -0
  50. package/packages/intable/src/plugins/ResizePlugin.tsx +122 -0
  51. package/packages/intable/src/plugins/RowGroupPlugin.tsx +122 -0
  52. package/packages/intable/src/plugins/RowSelectionPlugin.tsx +65 -0
  53. package/packages/intable/src/plugins/TreePlugin.tsx +212 -0
  54. package/packages/intable/src/plugins/VirtualScrollPlugin.tsx +190 -0
  55. package/packages/intable/src/plugins/ZodValidatorPlugin.tsx +61 -0
  56. package/packages/intable/src/style.scss +244 -0
  57. package/{dist → packages/intable/src}/theme/antd.scss +14 -5
  58. package/packages/intable/src/theme/dark.scss +46 -0
  59. package/{dist → packages/intable/src}/theme/element-plus.scss +6 -5
  60. package/packages/intable/src/theme/github.scss +80 -0
  61. package/packages/intable/src/theme/material.scss +73 -0
  62. package/packages/intable/src/theme/shadcn.scss +66 -0
  63. package/packages/intable/src/theme/stripe.scss +57 -0
  64. package/packages/intable/src/tree.ts +13 -0
  65. package/packages/intable/src/types/auto-imports.d.ts +13 -0
  66. package/packages/intable/src/utils.ts +122 -0
  67. package/packages/intable/src/wc.tsx +35 -0
  68. package/packages/intable/src/web-component.ts +1 -0
  69. package/packages/react/package.json +36 -0
  70. package/packages/react/src/index.ts +44 -0
  71. package/packages/react/src/plugins/antd.ts +94 -0
  72. package/packages/react/src/style.scss +12 -0
  73. package/packages/react/src/types/auto-imports.d.ts +10 -0
  74. package/packages/vue/package.json +34 -0
  75. package/packages/vue/src/index.ts +63 -0
  76. package/packages/vue/src/plugins/element-plus.ts +69 -0
  77. package/packages/vue/src/style.scss +12 -0
  78. package/packages/vue/src/types/auto-imports.d.ts +10 -0
  79. package/pnpm-workspace.yaml +2 -0
  80. package/public/vite.svg +1 -0
  81. package/scripts/build.js +184 -0
  82. package/scripts/publish.js +95 -0
  83. package/src/assets/ClearFormat.svg +3 -0
  84. package/src/assets/Forms.svg +4 -0
  85. package/src/assets/MergeCell.svg +4 -0
  86. package/src/assets/SplitCell.svg +4 -0
  87. package/src/assets/gap.svg +3 -0
  88. package/src/assets/loading.svg +12 -0
  89. package/src/assets/paint.svg +9 -0
  90. package/src/assets/solid.svg +1 -0
  91. package/src/demo-vue.ts +54 -0
  92. package/src/index.scss +105 -0
  93. package/src/index.tsx +20 -0
  94. package/src/pages/demo/BasicDemo.tsx +19 -0
  95. package/src/pages/demo/CellMergeDemo.tsx +41 -0
  96. package/src/pages/demo/CellSelectionDemo.tsx +24 -0
  97. package/src/pages/demo/CompositeDemo.tsx +60 -0
  98. package/src/pages/demo/CopyPasteDemo.tsx +26 -0
  99. package/src/pages/demo/DiffDemo.tsx +33 -0
  100. package/src/pages/demo/DragDemo.tsx +25 -0
  101. package/src/pages/demo/EditableDemo.tsx +58 -0
  102. package/src/pages/demo/ExpandDemo.tsx +32 -0
  103. package/src/pages/demo/HeaderGroupDemo.tsx +36 -0
  104. package/src/pages/demo/HistoryDemo.tsx +28 -0
  105. package/src/pages/demo/ReactDemo.tsx +59 -0
  106. package/src/pages/demo/ResizeDemo.tsx +24 -0
  107. package/src/pages/demo/RowGroupDemo.tsx +43 -0
  108. package/src/pages/demo/RowSelectionDemo.tsx +27 -0
  109. package/src/pages/demo/TreeDemo.tsx +45 -0
  110. package/src/pages/demo/VirtualScrollDemo.tsx +21 -0
  111. package/src/pages/demo/helpers.tsx +39 -0
  112. package/src/pages/demo/index.tsx +180 -0
  113. package/src/pages/index.tsx +2 -0
  114. package/src/pages/website.scss +37 -0
  115. package/src/pages/website.tsx +651 -0
  116. package/src/styles/index.scss +172 -0
  117. package/src/types/auto-imports.d.ts +13 -0
  118. package/stats.html +4949 -0
  119. package/tsconfig.app.json +34 -0
  120. package/tsconfig.json +7 -0
  121. package/tsconfig.node.json +26 -0
  122. package/vite.config.ts +70 -0
  123. package/dist/__uno.css +0 -1
  124. package/dist/chevron-right.js +0 -6
  125. package/dist/components/Columns.d.ts +0 -3
  126. package/dist/components/Columns.js +0 -71
  127. package/dist/components/DocTree.d.ts +0 -4
  128. package/dist/components/DocTree.js +0 -32
  129. package/dist/components/Menu.d.ts +0 -1
  130. package/dist/components/Menu.js +0 -107
  131. package/dist/components/Popover.d.ts +0 -14
  132. package/dist/components/Popover.js +0 -41
  133. package/dist/components/Render.d.ts +0 -4
  134. package/dist/components/Render.js +0 -20
  135. package/dist/components/Split.d.ts +0 -15
  136. package/dist/components/Split.js +0 -76
  137. package/dist/components/Tree.d.ts +0 -37
  138. package/dist/components/Tree.js +0 -82
  139. package/dist/components/utils.d.ts +0 -3
  140. package/dist/components/utils.js +0 -8
  141. package/dist/hooks/index.d.ts +0 -40
  142. package/dist/hooks/index.js +0 -157
  143. package/dist/hooks/useDir.d.ts +0 -11
  144. package/dist/hooks/useDir.js +0 -42
  145. package/dist/hooks/useSelector.d.ts +0 -16
  146. package/dist/hooks/useSelector.js +0 -35
  147. package/dist/hooks/useSort.d.ts +0 -18
  148. package/dist/hooks/useSort.js +0 -83
  149. package/dist/hooks/useVirtualizer.d.ts +0 -25
  150. package/dist/hooks/useVirtualizer.js +0 -67
  151. package/dist/index.d.ts +0 -130
  152. package/dist/index.js +0 -347
  153. package/dist/loading.js +0 -6
  154. package/dist/plugins/CellChangeHighlightPlugin.d.ts +0 -2
  155. package/dist/plugins/CellChangeHighlightPlugin.js +0 -4
  156. package/dist/plugins/CellMergePlugin.d.ts +0 -12
  157. package/dist/plugins/CellMergePlugin.js +0 -2
  158. package/dist/plugins/CellSelectionPlugin.d.ts +0 -15
  159. package/dist/plugins/CellSelectionPlugin.js +0 -115
  160. package/dist/plugins/CommandPlugin.d.ts +0 -14
  161. package/dist/plugins/CommandPlugin.js +0 -12
  162. package/dist/plugins/CopyPastePlugin.d.ts +0 -14
  163. package/dist/plugins/CopyPastePlugin.js +0 -42
  164. package/dist/plugins/DiffPlugin.d.ts +0 -23
  165. package/dist/plugins/DiffPlugin.js +0 -56
  166. package/dist/plugins/DragPlugin.d.ts +0 -14
  167. package/dist/plugins/DragPlugin.js +0 -47
  168. package/dist/plugins/EditablePlugin.d.ts +0 -48
  169. package/dist/plugins/EditablePlugin.js +0 -141
  170. package/dist/plugins/ExpandPlugin.d.ts +0 -18
  171. package/dist/plugins/ExpandPlugin.js +0 -50
  172. package/dist/plugins/HistoryPlugin.d.ts +0 -10
  173. package/dist/plugins/HistoryPlugin.js +0 -30
  174. package/dist/plugins/MenuPlugin.d.ts +0 -18
  175. package/dist/plugins/MenuPlugin.js +0 -107
  176. package/dist/plugins/RenderPlugin/components.d.ts +0 -5
  177. package/dist/plugins/RenderPlugin/components.js +0 -87
  178. package/dist/plugins/RenderPlugin/index.d.ts +0 -30
  179. package/dist/plugins/RenderPlugin/index.js +0 -49
  180. package/dist/plugins/ResizePlugin.d.ts +0 -27
  181. package/dist/plugins/ResizePlugin.js +0 -81
  182. package/dist/plugins/RowGroupPlugin.d.ts +0 -17
  183. package/dist/plugins/RowGroupPlugin.js +0 -83
  184. package/dist/plugins/RowSelectionPlugin.d.ts +0 -20
  185. package/dist/plugins/RowSelectionPlugin.js +0 -42
  186. package/dist/plugins/VirtualScrollPlugin.d.ts +0 -15
  187. package/dist/plugins/VirtualScrollPlugin.js +0 -96
  188. package/dist/plus.js +0 -6
  189. package/dist/style.css +0 -3
  190. package/dist/types/auto-imports.d.js +0 -0
  191. package/dist/utils.d.ts +0 -30
  192. package/dist/utils.js +0 -70
  193. package/dist/wc.d.ts +0 -1
  194. package/dist/wc.js +0 -21
  195. package/dist/web-component.d.ts +0 -1
  196. package/dist/web-component.js +0 -2
  197. package/dist/x.js +0 -6
@@ -0,0 +1,102 @@
1
+ # intable – Copilot Instructions
2
+
3
+ ## Overview
4
+ SolidJS-based Excel-like table component library with a **chain-of-responsibility plugin architecture**. Core lives in `packages/intable/src/`. Thin wrappers for React (`packages/react/`) and Vue (`packages/vue/`) delegate all logic to the core.
5
+
6
+ ## Dev Workflow
7
+ ```sh
8
+ pnpm dev # Vite dev server – loads src/demo.tsx (SolidJS)
9
+ pnpm build # Build demo/docs
10
+ pnpm build:lib # Build library packages via scripts/build.js
11
+ ```
12
+ Active sandbox is `src/demo.tsx`; Vue sandbox is `src/demo-vue.ts`. Both import directly from the workspace packages, not npm.
13
+
14
+ ## Plugin Architecture (the most important concept)
15
+
16
+ Every feature is a `Plugin` object with these optional fields:
17
+
18
+ | Field | Purpose |
19
+ |---|---|
20
+ | `store(store)` | Initialise reactive state on the shared `createMutable` store |
21
+ | `rewriteProps` | Chain-transform `TableProps` – each plugin receives the *previous* plugin's output |
22
+ | `commands(store, prev)` | Add to `store.commands` (aggregated by `CommandPlugin`) |
23
+ | `keybindings(store)` | Declare keyboard shortcuts (aggregated + registered by `CommandPlugin`) — use tinykeys syntax |
24
+ | `menus(store)` | Contribute context-menu items (collected by `MenuPlugin`) |
25
+ | `layers` | SolidJS components rendered as overlay layers |
26
+ | `onMount(store)` | Runs after mount inside a `createEffect` |
27
+ | `priority` | Higher = executes earlier in the chain; `Infinity` = first (BasePlugin, CommandPlugin, ScrollPlugin), `-Infinity` = last |
28
+
29
+ `Plugin$0 = Plugin | ((store: TableStore) => Plugin)` — a plugin can be a factory that receives `store`.
30
+
31
+ ### Props rewrite pipeline (`index.tsx` ~L160)
32
+ ```ts
33
+ // Each plugin's rewriteProps receives the previous plugin's merged props
34
+ const prev = createMemo(() => pluginsProps()[i() - 1]?.[0]() || rawProps)
35
+ const ret = mergeProps(prev, toReactive(mapValues(e.rewriteProps, v => useMemo(() => v(prev(), { store })))))
36
+ ```
37
+ All `rewriteProps` functions are **reactive** – return values are re-evaluated when dependencies change.
38
+
39
+ ### Module augmentation — always extend interfaces in the same file as the plugin
40
+ ```ts
41
+ declare module '../index' {
42
+ interface TableProps { myProp?: ... } // new prop (use store.props.myProp)
43
+ interface TableColumn { myColProp?: ... }
44
+ interface TableStore { myState: ... } // new store slice
45
+ interface Commands { myCommand: () => void }
46
+ interface Plugin { myPluginField?: ... } // if adding a cross-plugin field
47
+ }
48
+ ```
49
+
50
+ ## Key Files
51
+ - `packages/intable/src/index.tsx` — `Intable` component, `Plugin`/`TableProps`/`TableStore`/`TableColumn` interfaces, all built-in plugins (BasePlugin, IndexPlugin, ScrollPlugin, FitColWidthPlugin, etc.)
52
+ - `packages/intable/src/plugins/` — all optional plugins; each is self-contained
53
+ - `packages/intable/src/hooks/index.ts` — shared hooks: `useHistory`, `useMemoState`, `usePointerDrag`, `useTinykeys`
54
+ - `packages/intable/src/components/utils.tsx` — `solidComponent(fn)` / `renderComponent(comp, props, renderer)`
55
+
56
+ ## Conventions
57
+
58
+ ### Internal (system) columns
59
+ Mark a column with `[store.internal]: 1` so it is excluded from user-facing index arithmetic (e.g. "first user column"):
60
+ ```ts
61
+ store.myCol = { id: Symbol('my'), [store.internal]: 1, ... } as TableColumn
62
+ ```
63
+ Find the first user column with: `props.columns?.findIndex(e => !e[store.internal])`
64
+
65
+ ### O(1) reactive Set pattern
66
+ Used for expand/selection states instead of arrays:
67
+ ```ts
68
+ // In store init:
69
+ expandKeys: {} as Record<string, true | undefined>
70
+ // Read (reactive):
71
+ const isExpand = (key) => !!store.myState.expandKeys[String(key)]
72
+ // Write:
73
+ store.myState.expandKeys[key] = true // add
74
+ delete store.myState.expandKeys[key] // remove
75
+ ```
76
+
77
+ ### Keybindings (never add individual `useTinykeys` in plugins)
78
+ Declare on the plugin; `CommandPlugin` registers one shared listener:
79
+ ```ts
80
+ keybindings: (store) => ({
81
+ '$mod+Z': () => store.history.undo(),
82
+ '$mod+Shift+K': () => ...,
83
+ })
84
+ ```
85
+ User can override or disable per-key via `TableProps.keybindings`: `{ '$mod+Z': false }`.
86
+
87
+ ### Commands
88
+ ```ts
89
+ commands: (store, prevCommands) => ({
90
+ myAction() { ... }, // available as store.commands.myAction()
91
+ })
92
+ ```
93
+
94
+ ### Icons
95
+ Icons are auto-imported via `unplugin-icons`. Use PascalCase tag names:
96
+ `<ILucideChevronRight />`, `<ISolarTrashBinMinimalisticBold />`, `<IVscodeIconsFileTypeTs />`
97
+
98
+ ### Styling
99
+ UnoCSS utility classes inline (`class='flex items-center'`) + SCSS in `style.scss`. Theme overrides in `packages/intable/src/theme/`.
100
+
101
+ ## Multi-framework Support
102
+ `packages/react/` and `packages/vue/` each export an `Intable` component that mounts the core SolidJS component into a host-framework managed DOM node. Framework-specific editor plugins (`AntdPlugin`, `ElementPlusPlugin`) implement the `Plugin` interface — they only fill `store.editors.*` with adapters using the host framework's rendering API (`ReactDOM.createRoot`, `Vue.render`).
package/README.md CHANGED
@@ -1,8 +1,3 @@
1
- ---
2
- name: intable
3
- description: A high-performance, plugin-based Excel-like table component for SolidJS with virtual scroll, cell editing, validation, copy/paste, row grouping, tree data, column/row drag, merge cells, diff view, and multi-framework support (Vue, React).
4
- ---
5
-
6
1
  # intable
7
2
 
8
3
  ## 特征
@@ -10,12 +5,10 @@ description: A high-performance, plugin-based Excel-like table component for Sol
10
5
  - 类似 Excel 的表格组件
11
6
  - 单元格多选、复制、粘贴
12
7
  - 单元格编辑、数据校验
13
- - 列宽、行高可调整
14
- - 列、行可拖拽
8
+ - 列宽、行高可拖动
15
9
  - 虚拟滚动
16
10
  - 数据分组
17
11
  - 行展开
18
- - 树嵌套
19
12
  - 插件易扩展
20
13
  - 多框架支持(Vue、React)
21
14
  - 多 UI库支持(Antd、ElementPlus)
@@ -34,6 +27,7 @@ pnpm add intable
34
27
  **使用**
35
28
 
36
29
  ```jsx
30
+ import { render } from 'solid-js/web'
37
31
  import Intable from 'intable'
38
32
 
39
33
  const App = () => {
@@ -52,6 +46,8 @@ const App = () => {
52
46
 
53
47
  return <Intable data={data} columns={columns} />
54
48
  }
49
+
50
+ render(() => <App />)
55
51
  ```
56
52
  </details>
57
53
 
@@ -61,14 +57,14 @@ const App = () => {
61
57
  **安装**
62
58
 
63
59
  ```sh
64
- pnpm add @intable/vue
60
+ pnpm add @intable/react
65
61
  ```
66
62
 
67
63
  **使用**
68
64
 
69
65
  ```html
70
66
  <template>
71
- <Intable :data="data" :columns="columns" />
67
+ <Intable data={data} columns={columns} />
72
68
  </template>
73
69
 
74
70
  <script setup>
@@ -102,7 +98,7 @@ pnpm add @intable/react
102
98
  **使用**
103
99
 
104
100
  ```jsx
105
- import Intable from '@intable/react'
101
+ import Intable from 'intable'
106
102
 
107
103
  const App = () => {
108
104
  const columns = [
@@ -125,255 +121,12 @@ const App = () => {
125
121
 
126
122
  ## Props
127
123
 
128
- | 属性名 | 描述 | 类型 | 默认值 |
129
- | ------------ | ------------ | ------------------------------- | ------- |
130
- | data | 数据 | any[] | |
131
- | columns | 展示列 | Column[] | |
132
- | rowKey | 行唯一键字段 | string | `'id'` |
133
- | index | 显示序号 | boolean | false |
134
- | border | 显示纵向边框 | boolean | false |
135
- | stickyHeader | 表头吸顶 | boolean | false |
136
- | size | 尺寸 | `'large' \| 'default' \| 'small'` | |
137
- | plugins | 插件列表 | Plugin[] | `[]` |
138
-
139
- ## Column
140
-
141
- | 属性名 | 描述 | 类型 |
142
- | -------- | ---------------------- | ----------------------------- |
143
- | id | 字段名,对应数据 key | string \| symbol |
144
- | name | 表头显示名称 | string |
145
- | width | 列宽(px) | number |
146
- | fixed | 固定列 | `'left' \| 'right'` |
147
- | render | 自定义渲染器 | `string \| Render` |
148
- | enum | 枚举映射(用于渲染) | `Record<string,any> \| {label?,value}[]` |
149
- | editable | 是否可编辑 | boolean |
150
- | editor | 编辑器类型或自定义实现 | `string \| Editor` |
151
- | resizable| 是否允许调整列宽 | boolean |
152
-
153
- ## 插件
154
-
155
- 插件通过 `plugins` 属性传入,部分插件需从对应路径手动引入。
156
-
157
- ---
158
-
159
- ### VirtualScrollPlugin — 虚拟滚动
160
-
161
- 大数据量下只渲染可见行列,显著提升性能。
162
-
163
- ```jsx
164
- import { VirtualScrollPlugin } from 'intable/plugins/VirtualScrollPlugin'
165
-
166
- <Intable
167
- plugins={[VirtualScrollPlugin]}
168
- virtual={{
169
- y: { estimateSize: () => 40, overscan: 10 }, // 行虚拟化参数
170
- x: { overscan: 5 }, // 列虚拟化参数
171
- }}
172
- />
173
- ```
174
-
175
- ---
176
-
177
- ### EditablePlugin — 单元格编辑
178
-
179
- 在 Column 上设置 `editable: true` 开启单元格编辑,双击或输入字符进入编辑状态。
180
-
181
- ```jsx
182
- const columns = [
183
- { id: 'name', name: '姓名', editable: true },
184
- { id: 'age', name: '年龄', editable: true, editor: 'number' },
185
- { id: 'type', name: '类型', editable: true, editor: 'select', enum: { 1: 'A', 2: 'B' } },
186
- { id: 'date', name: '日期', editable: true, editor: 'date' },
187
- ]
188
-
189
- <Intable columns={columns} onDataChange={setData} />
190
- ```
191
-
192
- 内置编辑器类型:`text`(默认)、`number`、`select`、`date`、`time`、`datetime`、`switch`、`checkbox`、`rate`、`color`、`file`。
193
-
194
- 搭配 UI 库插件可直接使用对应组件:
195
- - **Antd**:`import { AntdPlugin } from '@intable/react/plugins/antd'`
196
- - **Element Plus**:`import { ElementPlusPlugin } from '@intable/vue/plugins/element-plus'`
197
-
198
- ---
199
-
200
- ### RowSelectionPlugin — 行选择
201
-
202
- ```jsx
203
- <Intable
204
- rowSelection={{
205
- enable: true,
206
- multiple: true, // 多选,默认 true
207
- value: selectedRows, // 受控选中值
208
- selectable: row => row.age > 18, // 可选条件
209
- onChange: rows => setSelected(rows),
210
- }}
211
- />
212
- ```
213
-
214
- ---
215
-
216
- ### ExpandPlugin — 行展开
217
-
218
- 点击行首箭头展开自定义内容区域。
219
-
220
- ```jsx
221
- <Intable
222
- expand={{
223
- enable: true,
224
- render: ({ data, y }) => <div>详情:{data.name}</div>,
225
- }}
226
- />
227
- ```
228
-
229
- ---
230
-
231
- ### RowGroupPlugin — 行分组
232
-
233
- 按指定字段对行进行分级树形分组,支持展开/折叠。
234
-
235
- ```jsx
236
- <Intable
237
- rowGroup={{ fields: ['type', 'subType'] }}
238
- />
239
- ```
240
-
241
- ---
242
-
243
- ### TreePlugin — 树形数据
244
-
245
- 渲染嵌套 `children` 字段的树状数据,支持展开/折叠,自动缩进。
246
-
247
- ```jsx
248
- const data = [
249
- { id: 1, name: '总部', children: [
250
- { id: 2, name: '研发部' },
251
- { id: 3, name: '产品部', children: [
252
- { id: 4, name: '设计组' },
253
- ]},
254
- ]},
255
- ]
256
-
257
- <Intable
258
- tree={{ children: 'children' }} // 子节点字段名,默认 'children'
259
- data={data}
260
- columns={[{ id: 'name', name: '名称' }]}
261
- />
262
- ```
263
-
264
- ---
265
-
266
- ### ResizePlugin — 调整列宽 / 行高
267
-
268
- 拖动表头右侧边框调整列宽,拖动行底部边框调整行高。
269
-
270
- ```jsx
271
- <Intable
272
- resizable={{
273
- col: { enable: true, min: 60, max: 600 },
274
- row: { enable: true, min: 28, max: 200 },
275
- }}
276
- onColumnsChange={cols => setColumns(cols)}
277
- />
278
- ```
279
-
280
- 也可在单列上单独控制:
281
-
282
- ```js
283
- { id: 'name', name: '姓名', resizable: false } // 禁止该列拖拽
284
- ```
285
-
286
- ---
287
-
288
- ### DragPlugin — 列 / 行拖拽排序
289
-
290
- 长按后拖拽列标题或行首单元格可重新排序。
291
-
292
- ```jsx
293
- <Intable
294
- colDrag={true} // 开启列拖拽
295
- rowDrag={true} // 开启行拖拽
296
- onColumnsChange={cols => setColumns(cols)}
297
- />
298
- ```
299
-
300
- ---
301
-
302
- ### HistoryPlugin — 撤销 / 重做
303
-
304
- 记录数据变更历史,支持 `Ctrl+Z` / `Ctrl+Y`。
305
-
306
- ```jsx
307
- import { HistoryPlugin } from 'intable/plugins/HistoryPlugin'
308
-
309
- <Intable plugins={[HistoryPlugin]} />
310
- ```
311
-
312
- 通过命令调用:
313
- ```js
314
- store.history.undo()
315
- store.history.redo()
316
- ```
317
-
318
- ---
319
-
320
- ### DiffPlugin — 数据差异对比
321
-
322
- 将当前数据与快照进行比较,高亮新增/删除/修改行,支持提交。
323
-
324
- ```jsx
325
- import { DiffPlugin } from 'intable/plugins/DiffPlugin'
326
-
327
- <Intable
328
- plugins={[DiffPlugin]}
329
- diff={{
330
- added: true, // 高亮新增行,默认 true
331
- removed: true, // 高亮删除行,默认 true
332
- changed: true, // 高亮修改行,默认 true
333
- onCommit: (data, { added, removed, changed }) => save(data),
334
- }}
335
- />
336
- ```
337
-
338
- `Ctrl+S` 触发提交,或通过命令:
339
- ```js
340
- store.commands.diffCommit()
341
- ```
342
-
343
- ---
344
-
345
- ### CellMergePlugin — 单元格合并
346
-
347
- 通过 `merge` 回调或 Column 的 `mergeRow` 快捷属性合并相邻单元格。
348
-
349
- ```jsx
350
- // 方式一:全局 merge 回调
351
- <Intable
352
- merge={(row, col, y, x) => {
353
- if (col.id === 'name') {
354
- let rowspan = 1
355
- while (data[y + rowspan]?.name === row.name) rowspan++
356
- return rowspan > 1 ? { rowspan } : null
357
- }
358
- }}
359
- />
360
-
361
- // 方式二:列级 mergeRow 快捷属性(自动合并相邻等值行)
362
- const columns = [
363
- { id: 'type', name: '类型', mergeRow: true },
364
- { id: 'name', name: '名称' },
365
- ]
366
- <Intable columns={columns} />
367
- ```
368
-
369
- ---
370
-
371
- ### CellSelectionPlugin — 单元格多选
372
-
373
- 鼠标拖拽或 `Shift+点击` 选择矩形区域,箭头键移动焦点。
374
-
375
- ---
376
-
377
- ### CopyPastePlugin — 复制粘贴
378
-
379
- `Ctrl+C` 复制选中区域为 TSV 格式,`Ctrl+V` 粘贴。
124
+ | 属性名 | 描述 | 类型 | 默认值 |
125
+ | ------------ | ------------ | ------------------------------- | ------ |
126
+ | data | 数据 | any[] | |
127
+ | columns | 展示列 | Column[] | |
128
+ | index | 显示序号 | bool | false |
129
+ | border | 显示纵向边框 | bool | false |
130
+ | stickyHeader | 表头吸顶 | bool | false |
131
+ | size | 尺寸 | 'large' \| 'default' \| 'small' | false |
132
+ | rowSelection | 启用行选择 | [@see]() | false |
@@ -0,0 +1 @@
1
+ @supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--un-bg-opacity:100%;--un-content:"";--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-text-opacity:100%;--un-border-opacity:100%;--un-space-y-reverse:initial;--un-space-x-reverse:initial;--un-outline-style:solid;--un-outline-opacity:100%;--un-leading:initial}}@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-leading{syntax:"*";inherits:false}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}:root,:host{--spacing:.25rem;--colors-gray-DEFAULT:#99a1af;--text-sm-fontSize:.875rem;--text-sm-lineHeight:1.25rem;--radius-sm:.25rem;--colors-red-DEFAULT:#ff6568;--font-sans:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-monoFont-family:var(--font-mono)}@supports (color:lab(0% 0 0)){:root,:host{--colors-gray-DEFAULT:lab(65.9269% -.832707 -8.17474);--colors-red-DEFAULT:lab(63.7053% 60.7449 31.3109)}}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-featureSettings,normal);font-variation-settings:var(--default-font-variationSettings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-monoFont-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-monoFont-featureSettings,normal);font-variation-settings:var(--default-monoFont-variationSettings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden~=until-found])){display:none!important}.aic{align-items:center}.text-3\.5{font-size:.875rem}.c-red{color:color-mix(in srgb,var(--colors-red-DEFAULT)var(--un-text-opacity),transparent)}.lh-\[1\]{--un-leading:1;line-height:1}.m-10{margin:40px}.m9{margin:36px}.mx-1{margin-inline:4px}.my-1{margin-block:4px}.ml-\.5{margin-left:2px}.ml-1{margin-left:4px}.mr--1{margin-right:-4px}.mr-1{margin-right:4px}.mr-2\.5{margin-right:10px}.p-1{padding:4px}.p-2{padding:8px}.px,.px-4{padding-inline:16px}.px-2{padding-inline:8px}.py-1{padding-block:4px}.py-2{padding-block:8px}.pl-1{padding-left:4px}.pr-4{padding-right:16px}.b,.border{border-width:1px}.rd-2{border-radius:.5rem}.rd-sm{border-radius:var(--radius-sm)}.bg-gray\/20{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)20%,transparent)}.op-75{opacity:.75}.op40{opacity:.4}.flex{display:flex}.flex-shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.gap-2{gap:8px}.size-4\!{width:16px!important;height:16px!important}.h-1\!{height:4px!important}.h-40vh{height:40vh}.h-full{height:100%}.max-h-100{max-height:400px}.w-10px\!{width:10px!important}.w-50vw\!{width:50vw!important}.after\:h-1:after{height:4px}.after\:w-1:after{width:4px}.inline{display:inline}.cursor-s-resize{cursor:s-resize}.cursor-w-resize{cursor:w-resize}.resize{resize:both}.select-none{-webkit-user-select:none;user-select:none}.translate-x-1\/2{--un-translate-x:50%;translate:var(--un-translate-x)var(--un-translate-y)}.transform{transform:var(--un-rotate-x)var(--un-rotate-y)var(--un-rotate-z)var(--un-skew-x)var(--un-skew-y)}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-end\!{justify-content:flex-end!important}.justify-center{justify-content:center}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.z-1{z-index:1}.overflow-auto{overflow:auto}.table{display:table}.table-cell{display:table-cell}@supports (color:color-mix(in lab, red, red)){.c-red{color:color-mix(in oklab,var(--colors-red-DEFAULT)var(--un-text-opacity),transparent)}.bg-gray\/20{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)20%,transparent)}}.data-table{--bg:#fff;--c-primary:#51a2ff;--menu-bg:#fff;--li-hover-bg:#99a1af33;--table-b:1px solid var(--table-b-c);--table-b-c:#ebeef5;--table-c:#606266;--table-bg:#fff;--table-header-c:#909399;--table-header-bg:var(--table-bg);--table-row-hover-bg:#f5f7fa;--select-area-bg:#5292f71a;color:color-mix(in oklab,var(--table-c)var(--un-text-opacity),transparent);border-color:color-mix(in oklab,var(--table-b-c)var(--un-border-opacity),transparent);font-size:14px;position:relative}@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}.data-table--table{color:color-mix(in oklab,var(--table-c)var(--un-text-opacity),transparent);outline-style:var(--un-outline-style);border-collapse:collapse;table-layout:fixed;border-collapse:separate;border-spacing:0;border-width:0;outline-width:0;width:max-content}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}.data-table thead{color:color-mix(in oklab,var(--table-header-c)var(--un-text-opacity),transparent)}.data-table tr:hover>td{background-color:color-mix(in oklab,var(--table-row-hover-bg)var(--un-bg-opacity),transparent)}.data-table th{background-color:color-mix(in oklab,var(--table-header-bg)var(--un-bg-opacity),transparent)}.data-table td{background-color:color-mix(in oklab,var(--table-bg)var(--un-bg-opacity),transparent)}.data-table td,.data-table th{vertical-align:middle;outline-style:var(--un-outline-style);border-width:0;border-color:color-mix(in oklab,var(--table-b-c)var(--un-border-opacity),transparent);--un-border-style:solid;box-sizing:border-box;text-align:inherit;background-image:linear-gradient(var(--table-b-c),var(--table-b-c));background-position:100% 100%,100% 0;background-repeat:no-repeat;background-size:100% 1px,1px 100%;border-style:solid;outline-width:0;padding-block:2px;padding-inline:8px}.data-table td:empty:after{content:"ㅤ"!important}.data-table--border{border-width:1px}.data-table--border th,.data-table--border td{background-image:linear-gradient(var(--table-b-c),var(--table-b-c)),linear-gradient(var(--table-b-c),var(--table-b-c))}.data-table--scroll-view{overflow:auto}.data-table__layers{pointer-events:none;z-index:1;position:absolute;top:0;left:0}.data-table__layers>*{position:absolute}.range-selected{position:relative}.range-selected>.area{border-width:0;border-color:color-mix(in oklab,var(--c-primary)var(--un-border-opacity),transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--select-area-bg)var(--un-bg-opacity),transparent);pointer-events:none;border-style:solid;position:absolute;inset:0}.range-selected-l>.area{border-left-width:1.5px}.range-selected-r>.area{border-right-width:1.5px}.range-selected-t>.area{border-top-width:1.5px}.range-selected-b>.area{border-bottom-width:1.5px}.row-range-highlight,.col-range-highlight{position:relative}.row-range-highlight>.area,.col-range-highlight>.area{border-width:0;border-color:color-mix(in oklab,var(--c-primary)var(--un-border-opacity),transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--c-primary)10%,transparent);pointer-events:none;border-style:solid;position:absolute;inset:0}.row-range-highlight.index>.area{border-right-width:1px}.col-range-highlight>.area{border-bottom-width:1px}.sticky-header{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent);z-index:9;position:sticky;top:0}.sticky-header:after{pointer-events:none;--un-content:"";content:var(--un-content);width:100%;height:10px;position:absolute;top:100%;box-shadow:inset 0 10px 10px -10px #00000026}@property --un-content{syntax:"*";inherits:false;initial-value:""}.fixed-left,.fixed-right{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent);z-index:1;position:sticky!important}.fixed-left:after,.fixed-right:after{pointer-events:none;--un-content:"";content:var(--un-content);width:10px;height:100%;position:absolute;top:0}.is-scroll-right .fixed-left:after,.is-scroll-mid .fixed-left:after{left:100%;box-shadow:inset 10px 0 10px -10px #00000026}.is-scroll-left .fixed-right:after,.is-scroll-mid .fixed-right:after{right:100%;box-shadow:inset -10px 0 10px -10px #00000026}.copied .range-selected:before{border-style:dashed}.data-table.virtual{width:fit-content;display:block;overflow:auto}.data-table.virtual thead{width:fit-content;display:block}.data-table.virtual thead>tr{display:flex}.data-table.virtual thead>tr>th{flex:none;display:block}.data-table.virtual tbody{width:fit-content;display:block}.data-table.virtual tbody>tr{display:flex}.data-table.virtual tbody>tr>td{flex:none;display:block}.row-selection{width:40px;position:relative}.row-selection>label{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}.icon-clickable{box-sizing:border-box;border-radius:.25rem;justify-content:center;align-items:center;width:20px;height:20px;padding:2px;display:flex}.icon-clickable:hover{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent)}@supports (color:color-mix(in lab, red, red)){.icon-clickable:hover{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}.icon-clickable>svg{width:100%;height:100%}input[type=checkbox].you-checkbox{color:color-mix(in oklab,#2196f3 var(--un-text-opacity),transparent);appearance:none;outline-offset:0px;--un-border-style:solid;border:2px solid;border-radius:.25rem;width:16px;height:16px;margin:4px;position:relative}input[type=checkbox].you-checkbox:focus{outline-style:var(--un-outline-style);--un-outline-style:solid;outline:4px solid oklab(65.8156% -.0610626 -.157539/.4)}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}input[type=checkbox].you-checkbox:checked{background-color:currentColor}input[type=checkbox].you-checkbox.checked:after{color:color-mix(in oklab,#fff var(--un-text-opacity),transparent);--un-content:"✓";content:var(--un-content);--un-translate-x:-50%;--un-translate-y:-50%;translate:var(--un-translate-x)var(--un-translate-y);z-index:1;font-size:.75rem;position:absolute;top:50%;left:50%}.in-cell-edit-wrapper{z-index:1;position:absolute;inset:0;box-shadow:0 0 10px -2px #00000050}.in-cell__resize-handle{width:100%;height:100%;position:absolute}.in-cell__resize-handle:hover:after{background-color:color-mix(in oklab,var(--c-primary)40%,transparent)}.in-cell__resize-handle:active:after{background-color:color-mix(in oklab,var(--c-primary)var(--un-bg-opacity),transparent)}.in-cell__resize-handle:after{--un-content:"";content:var(--un-content)}.li{cursor:pointer;position:relative}.li:hover,.li.hover{background-color:color-mix(in oklab,var(--li-hover-bg)var(--un-bg-opacity),transparent)}.li:active:before,.li.selected:before,.li.active:before{content:"";border-radius:inherit;background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)15%,transparent);position:absolute;inset:0}@supports (color:color-mix(in lab, red, red)){.li:active:before,.li.selected:before,.li.active:before{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)15%,transparent)}}.li.disabled,.li[disabled]{opacity:.4}.tt-menu{font-size:var(--text-sm-fontSize);line-height:var(--un-leading,var(--text-sm-lineHeight));border-width:1px;border-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--menu-bg)var(--un-bg-opacity),transparent);cursor:default;--un-shadow:0 10px 15px -3px var(--un-shadow-color,#0000001a),0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-style:solid;border-radius:.5rem;padding-block:4px}@supports (color:color-mix(in lab, red, red)){.tt-menu{border-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}@property --un-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-shadow-color{syntax:"*";inherits:false}@property --un-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-shadow-color{syntax:"*";inherits:false}@property --un-ring-color{syntax:"*";inherits:false}@property --un-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-ring-color{syntax:"*";inherits:false}@property --un-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-ring-inset{syntax:"*";inherits:false}@property --un-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --un-ring-offset-color{syntax:"*";inherits:false}@property --un-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}:where(.tt-menu>:not(:last-child)){--un-space-y-reverse:0;margin-block-start:calc(calc(4px*.5)*var(--un-space-y-reverse));margin-block-end:calc(calc(4px*.5)*calc(1 - var(--un-space-y-reverse)))}@property --un-space-y-reverse{syntax:"*";inherits:false;initial-value:0}.tt-menu-x{font-size:var(--text-sm-fontSize);line-height:var(--un-leading,var(--text-sm-lineHeight));border-width:1px;border-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--menu-bg)var(--un-bg-opacity),transparent);cursor:default;--un-shadow:0 10px 15px -3px var(--un-shadow-color,#0000001a),0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-style:solid;border-radius:.5rem;padding-inline:4px}@supports (color:color-mix(in lab, red, red)){.tt-menu-x{border-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}:where(.tt-menu-x>:not(:last-child)){--un-space-x-reverse:0;margin-inline-start:calc(calc(4px*.5)*var(--un-space-x-reverse));margin-inline-end:calc(calc(4px*.5)*calc(1 - var(--un-space-x-reverse)))}@property --un-space-x-reverse{syntax:"*";inherits:false;initial-value:0}.tt-menu-x>.hr{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);width:1px;margin-block:6px}@supports (color:color-mix(in lab, red, red)){.tt-menu-x>.hr{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}.col__guide-line,.row__guide-line{background-color:color-mix(in oklab,var(--c-primary)var(--un-bg-opacity),transparent);pointer-events:none;z-index:9;position:fixed;top:0;left:0}th[draggable=true],td[draggable=true]{cursor:move}