mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-28 07:09:50 +00:00
Restore full @zenlm/ui package source recovered from git history (924614b46).
Key changes from restored version:
- ZenEnso uses SVG <circle> element (r=172, cx/cy=256) — mathematically perfect
- stroke-dasharray=1081 (2π×172) for exact circumference animation
- rotate(-90 256 256) starts draw from 12 o'clock
- Default color: white (was #A855F7)
- tsup onSuccess hook injects 'use client' into all dist files post-build
- Published as @zenlm/[email protected] on npm
23 lines
696 B
TypeScript
23 lines
696 B
TypeScript
import { defineConfig } from 'tsup'
|
|
import { glob } from 'glob'
|
|
|
|
export default defineConfig({
|
|
entry: { 'index': 'src/index.ts' },
|
|
format: ['esm', 'cjs'],
|
|
dts: true,
|
|
clean: true,
|
|
treeshake: true,
|
|
sourcemap: true,
|
|
external: ['react', 'react-dom', 'lucide-react', '@zenlm/models'],
|
|
onSuccess: async () => {
|
|
const fs = (await import('fs')).default
|
|
const files = glob.sync('dist/**/*.{js,cjs}', { ignore: ['**/*.d.*'] })
|
|
for (const file of files) {
|
|
const content = fs.readFileSync(file, 'utf-8')
|
|
if (!content.startsWith('"use client"') && !content.startsWith("'use client'")) {
|
|
fs.writeFileSync(file, '"use client";\n' + content)
|
|
}
|
|
}
|
|
},
|
|
})
|