intable 0.0.7 → 0.0.9
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 +263 -16
- package/dist/__uno.css +1 -0
- package/dist/chevron-right.js +6 -0
- package/dist/components/Columns.d.ts +3 -0
- package/dist/components/Columns.js +71 -0
- package/dist/components/DocTree.d.ts +4 -0
- package/dist/components/DocTree.js +32 -0
- package/dist/components/Menu.d.ts +1 -0
- package/dist/components/Menu.js +107 -0
- package/dist/components/Popover.d.ts +14 -0
- package/dist/components/Popover.js +41 -0
- package/dist/components/RecycleList.d.ts +26 -0
- package/dist/components/RecycleList.js +39 -0
- package/dist/components/Render.d.ts +4 -0
- package/dist/components/Render.js +20 -0
- package/dist/components/Split.d.ts +15 -0
- package/dist/components/Split.js +76 -0
- package/dist/components/Tree.d.ts +37 -0
- package/dist/components/Tree.js +82 -0
- package/dist/components/utils.d.ts +3 -0
- package/dist/components/utils.js +8 -0
- package/dist/hooks/index.d.ts +40 -0
- package/dist/hooks/index.js +157 -0
- package/dist/hooks/useDir.d.ts +11 -0
- package/dist/hooks/useDir.js +42 -0
- package/dist/hooks/useSelector.d.ts +16 -0
- package/dist/hooks/useSelector.js +69 -0
- package/dist/hooks/useSort.d.ts +18 -0
- package/dist/hooks/useSort.js +83 -0
- package/dist/hooks/useVirtualizer.d.ts +30 -0
- package/dist/hooks/useVirtualizer.js +97 -0
- package/dist/index.d.ts +147 -0
- package/dist/index.js +386 -0
- package/dist/loading.js +6 -0
- package/dist/plugins/CellChangeHighlightPlugin.d.ts +2 -0
- package/dist/plugins/CellChangeHighlightPlugin.js +4 -0
- package/dist/plugins/CellMergePlugin.d.ts +45 -0
- package/dist/plugins/CellMergePlugin.js +78 -0
- package/dist/plugins/CellSelectionPlugin.d.ts +15 -0
- package/dist/plugins/CellSelectionPlugin.js +113 -0
- package/dist/plugins/CommandPlugin.d.ts +14 -0
- package/dist/plugins/CommandPlugin.js +31 -0
- package/dist/plugins/CopyPastePlugin.d.ts +14 -0
- package/dist/plugins/CopyPastePlugin.js +47 -0
- package/dist/plugins/DiffPlugin.d.ts +29 -0
- package/dist/plugins/DiffPlugin.js +66 -0
- package/dist/plugins/DragPlugin.d.ts +14 -0
- package/dist/plugins/DragPlugin.js +47 -0
- package/dist/plugins/EditablePlugin.d.ts +51 -0
- package/dist/plugins/EditablePlugin.js +177 -0
- package/dist/plugins/ExpandPlugin.d.ts +18 -0
- package/dist/plugins/ExpandPlugin.js +46 -0
- package/dist/plugins/HeaderGroup.d.ts +11 -0
- package/dist/plugins/HeaderGroup.js +171 -0
- package/dist/plugins/HistoryPlugin.d.ts +10 -0
- package/dist/plugins/HistoryPlugin.js +27 -0
- package/dist/plugins/MenuPlugin.d.ts +19 -0
- package/dist/plugins/MenuPlugin.js +132 -0
- package/dist/plugins/RenderPlugin/components.d.ts +5 -0
- package/dist/plugins/RenderPlugin/components.js +87 -0
- package/dist/plugins/RenderPlugin/index.d.ts +30 -0
- package/dist/plugins/RenderPlugin/index.js +49 -0
- package/dist/plugins/ResizePlugin.d.ts +27 -0
- package/dist/plugins/ResizePlugin.js +82 -0
- package/dist/plugins/RowGroupPlugin.d.ts +18 -0
- package/dist/plugins/RowGroupPlugin.js +88 -0
- package/dist/plugins/RowSelectionPlugin.d.ts +20 -0
- package/dist/plugins/RowSelectionPlugin.js +42 -0
- package/dist/plugins/TreePlugin.d.ts +24 -0
- package/dist/plugins/TreePlugin.js +110 -0
- package/dist/plugins/VirtualScrollPlugin.d.ts +15 -0
- package/dist/plugins/VirtualScrollPlugin.js +123 -0
- package/dist/plugins/ZodValidatorPlugin.d.ts +38 -0
- package/dist/plugins/ZodValidatorPlugin.js +12 -0
- package/dist/plus.js +6 -0
- package/dist/rolldown_runtime.js +9 -0
- package/dist/style.css +3 -0
- package/dist/theme/dark.scss +46 -0
- package/dist/theme/github.scss +80 -0
- package/dist/theme/material.scss +73 -0
- package/dist/theme/shadcn.scss +66 -0
- package/dist/theme/stripe.scss +57 -0
- package/dist/tree.d.ts +1 -0
- package/dist/tree.js +12 -0
- package/dist/types/auto-imports.d.js +0 -0
- package/dist/utils.d.ts +31 -0
- package/dist/utils.js +71 -0
- package/dist/wc.d.ts +1 -0
- package/dist/wc.js +21 -0
- package/dist/web-component.d.ts +1 -0
- package/dist/web-component.js +2 -0
- package/dist/x.js +6 -0
- package/package.json +38 -30
- package/docs/index-BaMALNy6.css +0 -1
- package/docs/index-CDN48t9E.js +0 -3
- package/docs/index-Cc4RNkLY.css +0 -1
- package/docs/index-MRnbkYmU.js +0 -3
- package/docs/index.html +0 -15
- package/docs/vite.svg +0 -1
- package/index.html +0 -14
- package/packages/intable/README.md +0 -379
- package/packages/intable/package.json +0 -51
- package/packages/intable/src/assets/ClearFormat.svg +0 -3
- package/packages/intable/src/assets/Forms.svg +0 -4
- package/packages/intable/src/assets/MergeCell.svg +0 -4
- package/packages/intable/src/assets/SplitCell.svg +0 -4
- package/packages/intable/src/assets/gap.svg +0 -3
- package/packages/intable/src/assets/loading.svg +0 -12
- package/packages/intable/src/assets/paint.svg +0 -9
- package/packages/intable/src/assets/solid.svg +0 -1
- package/packages/intable/src/components/Columns.tsx +0 -86
- package/packages/intable/src/components/DocTree.tsx +0 -36
- package/packages/intable/src/components/Menu.tsx +0 -109
- package/packages/intable/src/components/Popover.tsx +0 -55
- package/packages/intable/src/components/RecycleList.tsx +0 -99
- package/packages/intable/src/components/Render.tsx +0 -26
- package/packages/intable/src/components/Split.tsx +0 -56
- package/packages/intable/src/components/Tree.tsx +0 -115
- package/packages/intable/src/components/utils.tsx +0 -12
- package/packages/intable/src/hooks/index.ts +0 -200
- package/packages/intable/src/hooks/useDir.ts +0 -78
- package/packages/intable/src/hooks/useSelector.ts +0 -91
- package/packages/intable/src/hooks/useSort.tsx +0 -118
- package/packages/intable/src/hooks/useVirtualizer.ts +0 -180
- package/packages/intable/src/index.tsx +0 -481
- package/packages/intable/src/plugins/CellChangeHighlightPlugin.tsx +0 -5
- package/packages/intable/src/plugins/CellMergePlugin.tsx +0 -153
- package/packages/intable/src/plugins/CellSelectionPlugin.tsx +0 -175
- package/packages/intable/src/plugins/CommandPlugin.tsx +0 -74
- package/packages/intable/src/plugins/CopyPastePlugin.tsx +0 -63
- package/packages/intable/src/plugins/DiffPlugin.tsx +0 -107
- package/packages/intable/src/plugins/DragPlugin.tsx +0 -81
- package/packages/intable/src/plugins/EditablePlugin.tsx +0 -252
- package/packages/intable/src/plugins/ExpandPlugin.tsx +0 -80
- package/packages/intable/src/plugins/HeaderGroup.tsx +0 -289
- package/packages/intable/src/plugins/HistoryPlugin.tsx +0 -49
- package/packages/intable/src/plugins/MenuPlugin.tsx +0 -195
- package/packages/intable/src/plugins/RenderPlugin/components.tsx +0 -51
- package/packages/intable/src/plugins/RenderPlugin/index.tsx +0 -81
- package/packages/intable/src/plugins/ResizePlugin.tsx +0 -122
- package/packages/intable/src/plugins/RowGroupPlugin.tsx +0 -122
- package/packages/intable/src/plugins/RowSelectionPlugin.tsx +0 -65
- package/packages/intable/src/plugins/TreePlugin.tsx +0 -212
- package/packages/intable/src/plugins/VirtualScrollPlugin.tsx +0 -190
- package/packages/intable/src/plugins/ZodValidatorPlugin.tsx +0 -61
- package/packages/intable/src/style.scss +0 -244
- package/packages/intable/src/tree.ts +0 -13
- package/packages/intable/src/types/auto-imports.d.ts +0 -13
- package/packages/intable/src/utils.ts +0 -122
- package/packages/intable/src/wc.tsx +0 -35
- package/packages/intable/src/web-component.ts +0 -1
- package/packages/react/package.json +0 -31
- package/packages/react/src/index.ts +0 -44
- package/packages/react/src/plugins/antd.ts +0 -94
- package/packages/react/src/style.scss +0 -12
- package/packages/react/src/types/auto-imports.d.ts +0 -10
- package/packages/vue/package.json +0 -34
- package/packages/vue/src/index.ts +0 -63
- package/packages/vue/src/plugins/element-plus.ts +0 -69
- package/packages/vue/src/style.scss +0 -12
- package/packages/vue/src/types/auto-imports.d.ts +0 -10
- package/pnpm-workspace.yaml +0 -2
- package/public/vite.svg +0 -1
- package/scripts/build.js +0 -184
- package/scripts/publish.js +0 -95
- package/src/assets/ClearFormat.svg +0 -3
- package/src/assets/Forms.svg +0 -4
- package/src/assets/MergeCell.svg +0 -4
- package/src/assets/SplitCell.svg +0 -4
- package/src/assets/gap.svg +0 -3
- package/src/assets/loading.svg +0 -12
- package/src/assets/paint.svg +0 -9
- package/src/assets/solid.svg +0 -1
- package/src/demo-vue.ts +0 -54
- package/src/demo.tsx +0 -107
- package/src/index.scss +0 -105
- package/src/styles/index.scss +0 -172
- package/src/types/auto-imports.d.ts +0 -13
- package/stats.html +0 -4949
- package/tsconfig.app.json +0 -34
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -63
- /package/{packages/intable/src → dist}/theme/antd.scss +0 -0
- /package/{packages/intable/src → dist}/theme/element-plus.scss +0 -0
package/scripts/build.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { resolve, join, dirname, relative, extname } from 'path'
|
|
2
|
-
import { fileURLToPath } from 'url'
|
|
3
|
-
import { readFileSync, readdirSync, existsSync, rmSync, cpSync, writeFileSync } from 'fs'
|
|
4
|
-
import { build } from 'vite'
|
|
5
|
-
|
|
6
|
-
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
7
|
-
const rootDir = resolve(__dirname, '..')
|
|
8
|
-
const packagesDir = resolve(rootDir, 'packages')
|
|
9
|
-
|
|
10
|
-
// 获取所有包目录
|
|
11
|
-
function getPackages() {
|
|
12
|
-
const packages = []
|
|
13
|
-
const dirs = readdirSync(packagesDir)
|
|
14
|
-
|
|
15
|
-
for (const dir of dirs) {
|
|
16
|
-
const packagePath = join(packagesDir, dir)
|
|
17
|
-
const packageJsonPath = join(packagePath, 'package.json')
|
|
18
|
-
|
|
19
|
-
if (existsSync(packageJsonPath)) {
|
|
20
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'))
|
|
21
|
-
packages.push({
|
|
22
|
-
name: packageJson.name || dir,
|
|
23
|
-
path: packagePath,
|
|
24
|
-
packageJson,
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return packages
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// 构建单个包
|
|
33
|
-
async function buildPackage(pkg) {
|
|
34
|
-
console.log(`\n📦 Building ${pkg.name}...`)
|
|
35
|
-
|
|
36
|
-
const distPath = join(pkg.path, 'dist')
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
await build({
|
|
40
|
-
configFile: process.cwd() + '/vite.config.ts',
|
|
41
|
-
root: pkg.path,
|
|
42
|
-
build: {
|
|
43
|
-
outDir: 'dist',
|
|
44
|
-
lib: {
|
|
45
|
-
// preserve modules
|
|
46
|
-
entry: Object.fromEntries(readdirSync(join(pkg.path, 'src'), { withFileTypes: false, recursive: true }).filter(e => /\.[tj]sx?$/.test(e)).map(e => [
|
|
47
|
-
e.slice(0, e.length - extname(e).length),
|
|
48
|
-
join('src', e)
|
|
49
|
-
])),
|
|
50
|
-
formats: ['es'],
|
|
51
|
-
cssFileName: 'style',
|
|
52
|
-
},
|
|
53
|
-
rollupOptions: {
|
|
54
|
-
external: id => {
|
|
55
|
-
// 排除所有外部依赖
|
|
56
|
-
const externals = Object.keys({
|
|
57
|
-
...pkg.packageJson.dependencies,
|
|
58
|
-
...pkg.packageJson.devDependencies,
|
|
59
|
-
...pkg.packageJson.peerDependencies,
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
// 排除特定的外部依赖
|
|
63
|
-
return externals.some(ext => id === ext || id.startsWith(ext + '/'))
|
|
64
|
-
},
|
|
65
|
-
output: {
|
|
66
|
-
preserveModules: true,
|
|
67
|
-
// preserveModulesRoot: join(pkg.path, 'src'),
|
|
68
|
-
// entryFileNames: '[name].js',
|
|
69
|
-
// entryFileNames: m => m.moduleIds.some(e => e.includes('node_modules')) ? 'vendor.js' : m.name + '.js',
|
|
70
|
-
advancedChunks: {
|
|
71
|
-
groups: [
|
|
72
|
-
{ name: (id) => id.includes('node_modules') ? 'vendor' : null },
|
|
73
|
-
],
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
sourcemap: false,
|
|
78
|
-
minify: true,
|
|
79
|
-
emptyOutDir: true,
|
|
80
|
-
},
|
|
81
|
-
plugins: [
|
|
82
|
-
(await import('vite-plugin-lib-inject-css')).libInjectCss()
|
|
83
|
-
]
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
// // 复制 style.scss 文件
|
|
87
|
-
// const stylePath = join(pkg.path, 'src/style.scss')
|
|
88
|
-
// if (existsSync(stylePath)) {
|
|
89
|
-
// cpSync(stylePath, join(distPath, 'style.scss'))
|
|
90
|
-
// console.log(' ✓ Copied style.scss')
|
|
91
|
-
// }
|
|
92
|
-
|
|
93
|
-
if (existsSync(join(pkg.path, 'src/theme'))) {
|
|
94
|
-
cpSync(join(pkg.path, 'src/theme'), join(distPath, 'theme'), { recursive: true })
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// fix: unocss
|
|
98
|
-
if (existsSync(join(pkg.path, 'dist/__uno.css'))) {
|
|
99
|
-
const uno = readFileSync(join(pkg.path, 'dist/__uno.css'), { encoding: 'utf8' })
|
|
100
|
-
const rewrite = (path, fn) => writeFileSync(path, fn(readFileSync(path, { encoding: 'utf8' })))
|
|
101
|
-
rewrite(join(pkg.path, 'dist/style.css'), str => uno + '\n' + str)
|
|
102
|
-
rewrite(join(pkg.path, 'dist/index.js'), str => str.replace(`import './__uno.css'`, ''))
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
console.log(`✅ ${pkg.name} built successfully!`)
|
|
107
|
-
|
|
108
|
-
await genDts(pkg.path)
|
|
109
|
-
} catch (error) {
|
|
110
|
-
console.error(`❌ Failed to build ${pkg.name}:`, error)
|
|
111
|
-
throw error
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// 使用 tsc 生成类型定义(跳过错误)
|
|
116
|
-
async function genDts(cwd) {
|
|
117
|
-
console.log(' 📝 Generating TypeScript declarations...')
|
|
118
|
-
try {
|
|
119
|
-
const distPath = join(cwd, 'dist')
|
|
120
|
-
const { execSync } = await import('child_process')
|
|
121
|
-
const { writeFileSync } = await import('fs')
|
|
122
|
-
|
|
123
|
-
// 创建临时 tsconfig 用于生成类型定义
|
|
124
|
-
const tempTsConfig = {
|
|
125
|
-
extends: './tsconfig.app.json',
|
|
126
|
-
compilerOptions: {
|
|
127
|
-
declaration: true,
|
|
128
|
-
emitDeclarationOnly: true,
|
|
129
|
-
noEmit: false,
|
|
130
|
-
outDir: distPath,
|
|
131
|
-
skipLibCheck: true,
|
|
132
|
-
noUnusedLocals: false,
|
|
133
|
-
noUnusedParameters: false,
|
|
134
|
-
jsx: 'preserve',
|
|
135
|
-
jsxImportSource: 'solid-js',
|
|
136
|
-
},
|
|
137
|
-
include: ['src'],
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const tempConfigPath = join(cwd, 'tsconfig.dts.json')
|
|
141
|
-
writeFileSync(tempConfigPath, JSON.stringify(tempTsConfig, null, 2))
|
|
142
|
-
|
|
143
|
-
try {
|
|
144
|
-
execSync(`pnpm exec tsc --project tsconfig.dts.json --skipLibCheck --noCheck`, { cwd, stdio: 'pipe' })
|
|
145
|
-
} catch (tscExecError) {
|
|
146
|
-
// 即使有错误也尝试查找生成的文件
|
|
147
|
-
const dtsFiles = readdirSync(distPath, { recursive: true }).filter(f => f.endsWith('.d.ts'))
|
|
148
|
-
if (dtsFiles.length > 0) {
|
|
149
|
-
console.log(` ℹ Generated ${dtsFiles.length} declaration files (with some errors)`)
|
|
150
|
-
} else {
|
|
151
|
-
throw tscExecError
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// 删除临时配置文件
|
|
156
|
-
rmSync(tempConfigPath, { force: true })
|
|
157
|
-
|
|
158
|
-
console.log(' ✓ TypeScript declarations generated')
|
|
159
|
-
} catch (tscError) {
|
|
160
|
-
console.log(' ⚠ TypeScript declarations skipped')
|
|
161
|
-
// 不抛出错误,允许构建继续
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// 主函数
|
|
166
|
-
async function main() {
|
|
167
|
-
console.log('🚀 Starting package build process...\n')
|
|
168
|
-
|
|
169
|
-
const packages = getPackages()
|
|
170
|
-
console.log(`Found ${packages.length} package(s):`, packages.map(p => p.name).join(', '))
|
|
171
|
-
|
|
172
|
-
// 依次构建每个包
|
|
173
|
-
for (const pkg of packages) {
|
|
174
|
-
await buildPackage(pkg)
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
console.log('\n✨ All packages built successfully!')
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// 执行构建
|
|
181
|
-
main().catch(error => {
|
|
182
|
-
console.error('Build failed:', error)
|
|
183
|
-
process.exit(1)
|
|
184
|
-
})
|
package/scripts/publish.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { resolve, join, dirname } from 'path'
|
|
2
|
-
import { fileURLToPath } from 'url'
|
|
3
|
-
import { readFileSync, writeFileSync, readdirSync, existsSync } from 'fs'
|
|
4
|
-
import { execSync } from 'child_process'
|
|
5
|
-
|
|
6
|
-
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
7
|
-
const rootDir = resolve(__dirname, '..')
|
|
8
|
-
const packagesDir = resolve(rootDir, 'packages')
|
|
9
|
-
|
|
10
|
-
// 获取根目录的版本号
|
|
11
|
-
function getRootVersion() {
|
|
12
|
-
const rootPackageJsonPath = join(rootDir, 'package.json')
|
|
13
|
-
const rootPackageJson = JSON.parse(readFileSync(rootPackageJsonPath, 'utf-8'))
|
|
14
|
-
return rootPackageJson.version
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// 获取所有包目录
|
|
18
|
-
function getPackages() {
|
|
19
|
-
const packages = []
|
|
20
|
-
const dirs = readdirSync(packagesDir)
|
|
21
|
-
|
|
22
|
-
for (const dir of dirs) {
|
|
23
|
-
const packagePath = join(packagesDir, dir)
|
|
24
|
-
const packageJsonPath = join(packagePath, 'package.json')
|
|
25
|
-
|
|
26
|
-
if (existsSync(packageJsonPath)) {
|
|
27
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'))
|
|
28
|
-
packages.push({
|
|
29
|
-
name: packageJson.name || dir,
|
|
30
|
-
path: packagePath,
|
|
31
|
-
packageJson,
|
|
32
|
-
packageJsonPath
|
|
33
|
-
})
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return packages
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// 同步版本号到子包
|
|
41
|
-
function syncVersion(packages, version) {
|
|
42
|
-
console.log(`\n🔄 Syncing version ${version} to all packages...`)
|
|
43
|
-
|
|
44
|
-
for (const pkg of packages) {
|
|
45
|
-
if (pkg.packageJson.version !== version) {
|
|
46
|
-
pkg.packageJson.version = version
|
|
47
|
-
writeFileSync(pkg.packageJsonPath, JSON.stringify(pkg.packageJson, null, 2))
|
|
48
|
-
console.log(` ✅ Updated ${pkg.name} to version ${version}`)
|
|
49
|
-
} else {
|
|
50
|
-
console.log(` ℹ ${pkg.name} already at version ${version}`)
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// 发布子包
|
|
56
|
-
function publishPackage(pkg) {
|
|
57
|
-
console.log(`\n📤 Publishing ${pkg.name}...`)
|
|
58
|
-
|
|
59
|
-
try {
|
|
60
|
-
execSync(`pnpm publish --no-git-checks --filter ${pkg.name}`, { stdio: 'inherit' })
|
|
61
|
-
console.log(` ✅ ${pkg.name} published successfully!`)
|
|
62
|
-
} catch (error) {
|
|
63
|
-
console.error(` ❌ Failed to publish ${pkg.name}:`, error.message)
|
|
64
|
-
throw error
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// 主函数
|
|
69
|
-
async function main() {
|
|
70
|
-
console.log('🚀 Starting publish process...\n')
|
|
71
|
-
|
|
72
|
-
// 获取根目录版本号
|
|
73
|
-
const version = getRootVersion()
|
|
74
|
-
console.log(`Root version: ${version}`)
|
|
75
|
-
|
|
76
|
-
// 获取所有子包
|
|
77
|
-
const packages = getPackages()
|
|
78
|
-
console.log(`Found ${packages.length} package(s):`, packages.map(p => p.name).join(', '))
|
|
79
|
-
|
|
80
|
-
// 同步版本号
|
|
81
|
-
syncVersion(packages, version)
|
|
82
|
-
|
|
83
|
-
// 依次发布每个子包
|
|
84
|
-
for (const pkg of packages) {
|
|
85
|
-
await publishPackage(pkg)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
console.log('\n✨ All packages published successfully!')
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// 执行发布
|
|
92
|
-
main().catch(error => {
|
|
93
|
-
console.error('Publish failed:', error)
|
|
94
|
-
process.exit(1)
|
|
95
|
-
})
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
-
<path fill="currentColor" d="m14.031 1.888l9.657 9.657l-8.345 8.345l-.27.272H20v2H6.748L.253 15.667zm.322 16.164l6.507-6.507l-6.829-6.828l-6.828 6.828l6.828 6.828l.32-.323zM5.788 12.96l-2.707 2.707l4.495 4.495h4.68l.365-.37z" />
|
|
3
|
-
</svg>
|
package/src/assets/Forms.svg
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
-
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
3
|
-
d="M12 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3m7-14h7a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-7M5 7H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h1m12-5h.01M13 12h.01" />
|
|
4
|
-
</svg>
|
package/src/assets/MergeCell.svg
DELETED
package/src/assets/SplitCell.svg
DELETED
package/src/assets/gap.svg
DELETED
package/src/assets/loading.svg
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
-
<g>
|
|
3
|
-
<rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".14" />
|
|
4
|
-
<rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".29" transform="rotate(30 12 12)" />
|
|
5
|
-
<rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".43" transform="rotate(60 12 12)" />
|
|
6
|
-
<rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".57" transform="rotate(90 12 12)" />
|
|
7
|
-
<rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".71" transform="rotate(120 12 12)" />
|
|
8
|
-
<rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".86" transform="rotate(150 12 12)" />
|
|
9
|
-
<rect width="2" height="5" x="11" y="1" fill="currentColor" transform="rotate(180 12 12)" />
|
|
10
|
-
<animateTransform attributeName="transform" calcMode="discrete" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12" />
|
|
11
|
-
</g>
|
|
12
|
-
</svg>
|
package/src/assets/paint.svg
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
-
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
|
|
3
|
-
color="currentColor">
|
|
4
|
-
<path
|
|
5
|
-
d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12s4.477 10 10 10c.842 0 2 .116 2-1c0-.609-.317-1.079-.631-1.546c-.46-.683-.917-1.359-.369-2.454c.667-1.333 1.778-1.333 3.482-1.333c.851 0 1.851 0 3.018-.167c2.101-.3 2.5-1.592 2.5-3.5M7 15.002L7.009 15" />
|
|
6
|
-
<circle cx="9.5" cy="8.5" r="1.5" />
|
|
7
|
-
<circle cx="16.5" cy="9.5" r="1.5" />
|
|
8
|
-
</g>
|
|
9
|
-
</svg>
|
package/src/assets/solid.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 155.3"><path d="M163 35S110-4 69 5l-3 1c-6 2-11 5-14 9l-2 3-15 26 26 5c11 7 25 10 38 7l46 9 18-30z" fill="#76b3e1"/><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="27.5" y1="3" x2="152" y2="63.5"><stop offset=".1" stop-color="#76b3e1"/><stop offset=".3" stop-color="#dcf2fd"/><stop offset="1" stop-color="#76b3e1"/></linearGradient><path d="M163 35S110-4 69 5l-3 1c-6 2-11 5-14 9l-2 3-15 26 26 5c11 7 25 10 38 7l46 9 18-30z" opacity=".3" fill="url(#a)"/><path d="M52 35l-4 1c-17 5-22 21-13 35 10 13 31 20 48 15l62-21S92 26 52 35z" fill="#518ac8"/><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="95.8" y1="32.6" x2="74" y2="105.2"><stop offset="0" stop-color="#76b3e1"/><stop offset=".5" stop-color="#4377bb"/><stop offset="1" stop-color="#1f3b77"/></linearGradient><path d="M52 35l-4 1c-17 5-22 21-13 35 10 13 31 20 48 15l62-21S92 26 52 35z" opacity=".3" fill="url(#b)"/><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="18.4" y1="64.2" x2="144.3" y2="149.8"><stop offset="0" stop-color="#315aa9"/><stop offset=".5" stop-color="#518ac8"/><stop offset="1" stop-color="#315aa9"/></linearGradient><path d="M134 80a45 45 0 00-48-15L24 85 4 120l112 19 20-36c4-7 3-15-2-23z" fill="url(#c)"/><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="75.2" y1="74.5" x2="24.4" y2="260.8"><stop offset="0" stop-color="#4377bb"/><stop offset=".5" stop-color="#1a336b"/><stop offset="1" stop-color="#1a336b"/></linearGradient><path d="M114 115a45 45 0 00-48-15L4 120s53 40 94 30l3-1c17-5 23-21 13-34z" fill="url(#d)"/></svg>
|
package/src/demo-vue.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// import './index.scss'
|
|
2
|
-
import 'virtual:uno.css'
|
|
3
|
-
|
|
4
|
-
import { createApp, h, ref, shallowRef, toRaw, watchEffect } from 'vue'
|
|
5
|
-
// import Intable from '@intable/vue'
|
|
6
|
-
import Intable from '../packages/vue/src'
|
|
7
|
-
|
|
8
|
-
// import './theme/element-plus.scss'
|
|
9
|
-
import { log } from 'intable/utils'
|
|
10
|
-
import { createMutable } from 'solid-js/store'
|
|
11
|
-
import { effect } from 'solid-js/web'
|
|
12
|
-
import { batch, createComputed, createEffect, createMemo } from 'solid-js'
|
|
13
|
-
|
|
14
|
-
const container = document.createElement('div')
|
|
15
|
-
document.body.append(container)
|
|
16
|
-
|
|
17
|
-
const data = ref([{ id: '1', date: '2016-05-03' },{date: 'xxx'}])
|
|
18
|
-
setTimeout(() => {
|
|
19
|
-
// data.value = [
|
|
20
|
-
// { id: 1, date: '2016-05-03', name: 'Tom', address: 'No. 189, Grove St, Los Angeles' },
|
|
21
|
-
// { id: 2, date: '2016-05-03', name: 'Tom', address: 'No. 189, Grove St, Los Angeles' },
|
|
22
|
-
// { id: 3, date: '2016-05-03', name: 'Tom', address: 'No. 189, Grove St, Los Angeles' },
|
|
23
|
-
// ]
|
|
24
|
-
}, 1000);
|
|
25
|
-
|
|
26
|
-
const selected = ref([])
|
|
27
|
-
watchEffect(() => {
|
|
28
|
-
// console.log(selected.value)
|
|
29
|
-
// console.log(data.value)
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
createApp(() => [
|
|
33
|
-
h(Intable, {
|
|
34
|
-
style: 'width: 600px; margin: 64px',
|
|
35
|
-
class: 'w-100 m-4',
|
|
36
|
-
data: data.value,
|
|
37
|
-
'onUpdate:data': v => data.value = v,
|
|
38
|
-
onDataChange: v => data.value = v,
|
|
39
|
-
border: true,
|
|
40
|
-
index: true,
|
|
41
|
-
size: 'small',
|
|
42
|
-
columns: [
|
|
43
|
-
{ name: 'Date', id: 'date', editable: true, enum: { a: 1 }, editor: 'date' },
|
|
44
|
-
{ name: 'Name', id: 'name' },
|
|
45
|
-
{ name: 'Address', id: 'address', width: 250 },
|
|
46
|
-
// todo re render
|
|
47
|
-
{ name: '4', id: '4', render: o => h('div', { class: 'c-red' }, '111'), fixed: 'right' },
|
|
48
|
-
],
|
|
49
|
-
selected: selected.value,
|
|
50
|
-
'onUpdate:selected': v => selected.value = v,
|
|
51
|
-
rowSelection: { enable: true }
|
|
52
|
-
}),
|
|
53
|
-
])
|
|
54
|
-
.mount(container)
|
package/src/demo.tsx
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { batch, createComputed, createMemo } from 'solid-js'
|
|
2
|
-
import { render } from 'solid-js/web'
|
|
3
|
-
import { createMutable, createStore, produce, reconcile } from 'solid-js/store'
|
|
4
|
-
import { range } from 'es-toolkit'
|
|
5
|
-
|
|
6
|
-
// import Intable from 'intable'
|
|
7
|
-
// import { log } from 'intable/utils'
|
|
8
|
-
// import { VirtualScrollPlugin } from 'intable/plugins/VirtualScrollPlugin'
|
|
9
|
-
|
|
10
|
-
import { Intable } from '../packages/intable/src'
|
|
11
|
-
// import '../packages/intable/src/theme/element-plus.scss'
|
|
12
|
-
import { log } from '../packages/intable/src/utils'
|
|
13
|
-
import { VirtualScrollPlugin } from '../packages/intable/src/plugins/VirtualScrollPlugin'
|
|
14
|
-
import { HistoryPlugin } from '../packages/intable/src/plugins/HistoryPlugin'
|
|
15
|
-
import { DiffPlugin } from '../packages/intable/src/plugins/DiffPlugin'
|
|
16
|
-
// import 'intable/theme/element-plus.scss'
|
|
17
|
-
// import 'intable/dist/theme/element-plus.scss'
|
|
18
|
-
|
|
19
|
-
const root = document.body.appendChild(document.createElement('div'))
|
|
20
|
-
|
|
21
|
-
const state = createMutable({ bool: true })
|
|
22
|
-
|
|
23
|
-
const cols = createMutable([
|
|
24
|
-
{ name: '基本信息', children: [
|
|
25
|
-
{ id: 'col_0', name: 'col_0', width: 80, editable: true },
|
|
26
|
-
{ id: 'col_1', name: 'col_1', width: 80, editable: true },
|
|
27
|
-
{ name: '333', width: 80, editable: true },
|
|
28
|
-
]},
|
|
29
|
-
{ name: 'xxx' },
|
|
30
|
-
{ name: '详细数据', children: [
|
|
31
|
-
{ id: 'col_2', name: 'col_2', width: 80, editable: true },
|
|
32
|
-
{ id: 'col_3', name: 'col_3', width: 80, editable: true },
|
|
33
|
-
{ id: 'col_4', name: 'col_4', width: 80, editable: true },
|
|
34
|
-
]},
|
|
35
|
-
...range(20).map(e => ({ name: 'col_' + (e + 5), id: 'col_' + (e + 5), width: 80, editable: true })),
|
|
36
|
-
] as any[])
|
|
37
|
-
const leafColIds = range(20).map(e => 'col_' + e)
|
|
38
|
-
let data = createMutable(range(500).map((e, i) => Object.fromEntries(leafColIds.map(id => [id, id + '_' + i + 1]))))
|
|
39
|
-
|
|
40
|
-
// render(() => <input type='checkbox' checked={state.bool} onChange={(e) => state.bool = e.currentTarget.checked} />, root)
|
|
41
|
-
// render(() => <button onClick={() => data[0].col_1 = 'xxx'}>xxx</button>, root)
|
|
42
|
-
|
|
43
|
-
// const cols = [{name:'asd'},{}]
|
|
44
|
-
// const data = [{},{},{}]
|
|
45
|
-
// const data = [{},{},{}]
|
|
46
|
-
|
|
47
|
-
// cols[2].fixed = 'left'
|
|
48
|
-
// cols[0].editable = true
|
|
49
|
-
// cols[0].editor = 'select'
|
|
50
|
-
// cols[0].enum = { 1: 1, 2: 2, 3: 3 }
|
|
51
|
-
// cols[0].render = 'file'
|
|
52
|
-
// cols.forEach(e => (e.editable = true))
|
|
53
|
-
|
|
54
|
-
// cols.at(-3)!.width = undefined
|
|
55
|
-
// cols.at(-1)!.width = undefined
|
|
56
|
-
|
|
57
|
-
cols.unshift({ name: 'qwe' })
|
|
58
|
-
|
|
59
|
-
cols[0].fixed = 'left'
|
|
60
|
-
cols.at(-2)!.fixed = 'right'
|
|
61
|
-
cols.at(-1)!.fixed = 'right'
|
|
62
|
-
|
|
63
|
-
data.forEach(e => e.g = e.col_0 % 10)
|
|
64
|
-
data.forEach(e => e.n = e.col_0 % 3)
|
|
65
|
-
|
|
66
|
-
// render(() => (
|
|
67
|
-
// <Menu items={[
|
|
68
|
-
// { label: 'xx' }
|
|
69
|
-
// ]} />
|
|
70
|
-
// ), root)
|
|
71
|
-
|
|
72
|
-
render(() => <Intable
|
|
73
|
-
class='w-50vw! h-40vh m-10'
|
|
74
|
-
// class='m-10'
|
|
75
|
-
// style='width: 50vw; height: 40vh;'
|
|
76
|
-
rowDrag
|
|
77
|
-
colDrag
|
|
78
|
-
size='small'
|
|
79
|
-
index={state.bool}
|
|
80
|
-
stickyHeader={state.bool}
|
|
81
|
-
columns={cols}
|
|
82
|
-
onColumnsChange={v => batch(() => (cols.length = 0, cols.push(...v)))}
|
|
83
|
-
data={data}
|
|
84
|
-
onDataChange={v => batch(() => (data.length = 0, data.push(...v)))}
|
|
85
|
-
border
|
|
86
|
-
resizable={{ row: { enable: true } }}
|
|
87
|
-
plugins={[
|
|
88
|
-
VirtualScrollPlugin,
|
|
89
|
-
// HistoryPlugin,
|
|
90
|
-
// DiffPlugin,
|
|
91
|
-
]}
|
|
92
|
-
expand={{ enable: true, render: ({ data }) => <div class='p-2 c-red'>{JSON.stringify(data)}</div> }}
|
|
93
|
-
// rowGroup={{ fields: ['g', 'n'] }}
|
|
94
|
-
// rowGroup={{ fields: ['g'] }}
|
|
95
|
-
diff={{
|
|
96
|
-
onCommit: (...arg) => log(arg)
|
|
97
|
-
}}
|
|
98
|
-
virtual={{
|
|
99
|
-
// x: { enable: true, overscan: 0 },
|
|
100
|
-
// y: { enable: false },
|
|
101
|
-
}}
|
|
102
|
-
rowSelection={{
|
|
103
|
-
// enable: true,
|
|
104
|
-
// multiple: true,
|
|
105
|
-
// onChange: (selected, unselected) => log(selected, unselected)
|
|
106
|
-
}}
|
|
107
|
-
/>, root)
|
package/src/index.scss
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
color-scheme: light;
|
|
3
|
-
--bg: #fff;
|
|
4
|
-
--menu-bg: #fff;
|
|
5
|
-
--header-bg: #f6f6f7;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.dark {
|
|
9
|
-
color-scheme: dark;
|
|
10
|
-
--bg: #121212;
|
|
11
|
-
--menu-bg: #121212;
|
|
12
|
-
--header-bg: #161618;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
body {
|
|
16
|
-
@apply bg-[--bg] m-0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
button {
|
|
20
|
-
border-radius: 8px;
|
|
21
|
-
border: 1px solid transparent;
|
|
22
|
-
font-size: 1em;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
transition: border-color 0.25s;
|
|
25
|
-
}
|
|
26
|
-
button:hover {
|
|
27
|
-
border-color: #646cff;
|
|
28
|
-
}
|
|
29
|
-
button:focus,
|
|
30
|
-
button:focus-visible {
|
|
31
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
img, iframe {
|
|
35
|
-
// margin: 1rem 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
mark {
|
|
39
|
-
padding: .1rem .3rem;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.col-hand {
|
|
43
|
-
--w: 4px;
|
|
44
|
-
position: absolute;
|
|
45
|
-
top: 0;
|
|
46
|
-
left: 100%;
|
|
47
|
-
height: 100%;
|
|
48
|
-
// flex: 0 0 auto;
|
|
49
|
-
width: var(--gap);
|
|
50
|
-
cursor: w-resize;
|
|
51
|
-
display: flex;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
opacity: 0;
|
|
54
|
-
transition: opacity 100ms linear;
|
|
55
|
-
|
|
56
|
-
&:hover, &:active {
|
|
57
|
-
opacity: 1;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&::after {
|
|
61
|
-
content: '';
|
|
62
|
-
display: block;
|
|
63
|
-
flex-shrink: 0;
|
|
64
|
-
width: 4px;
|
|
65
|
-
height: 100%;
|
|
66
|
-
background: rgba(gray, .5);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
> .dot {
|
|
70
|
-
--w: 20px;
|
|
71
|
-
position: absolute;
|
|
72
|
-
top: 0;
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
transform: translateY(-50%);
|
|
77
|
-
width: calc(var(--w) * 1);
|
|
78
|
-
height: calc(var(--w) * 1);
|
|
79
|
-
|
|
80
|
-
&:hover {
|
|
81
|
-
&::after {
|
|
82
|
-
content: '+';
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
justify-content: center;
|
|
86
|
-
width: calc(var(--w) * 1);
|
|
87
|
-
height: calc(var(--w) * 1);
|
|
88
|
-
background-color: rgba(blue, .75);
|
|
89
|
-
box-shadow: 0 4px 6px rgba(#000, .2);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&::after {
|
|
94
|
-
content: '';
|
|
95
|
-
display: block;
|
|
96
|
-
width: 8px;
|
|
97
|
-
height: 8px;
|
|
98
|
-
color: #fff;
|
|
99
|
-
background-color: rgba(blue, .5);
|
|
100
|
-
border-radius: 50%;
|
|
101
|
-
transition: all 100ms;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|