veslx 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{README-DVMP1xaW.js → README-NSyLDlyP.js} +1 -1
- package/dist/assets/{SLIDES-DjNLQtEU.js → SLIDES-C12TOqNU.js} +1 -1
- package/dist/assets/_virtual_content-modules-DK3Yb9K2.js +2 -0
- package/dist/assets/{index-CBkKcH4y.js → index-BUMwRZ7d.js} +76 -77
- package/dist/assets/{index-UZKwazVi.js → index-C8sJQuOZ.js} +1 -1
- package/dist/client/App.js +17 -0
- package/dist/client/App.js.map +1 -0
- package/dist/client/components/front-matter.js +33 -0
- package/dist/client/components/front-matter.js.map +1 -0
- package/dist/client/components/gallery/components/figure-caption.js +14 -0
- package/dist/client/components/gallery/components/figure-caption.js.map +1 -0
- package/dist/client/components/gallery/components/figure-header.js +13 -0
- package/dist/client/components/gallery/components/figure-header.js.map +1 -0
- package/dist/client/components/gallery/components/lightbox.js +96 -0
- package/dist/client/components/gallery/components/lightbox.js.map +1 -0
- package/dist/client/components/gallery/components/loading-image.js +46 -0
- package/dist/client/components/gallery/components/loading-image.js.map +1 -0
- package/dist/client/components/gallery/hooks/use-gallery-images.js +84 -0
- package/dist/client/components/gallery/hooks/use-gallery-images.js.map +1 -0
- package/dist/client/components/gallery/hooks/use-lightbox.js +37 -0
- package/dist/client/components/gallery/hooks/use-lightbox.js.map +1 -0
- package/dist/client/components/gallery/index.js +96 -0
- package/dist/client/components/gallery/index.js.map +1 -0
- package/dist/client/components/gallery/lib/render-math-in-text.js +42 -0
- package/dist/client/components/gallery/lib/render-math-in-text.js.map +1 -0
- package/dist/client/components/header.js +60 -0
- package/dist/client/components/header.js.map +1 -0
- package/dist/client/components/loading.js +15 -0
- package/dist/client/components/loading.js.map +1 -0
- package/dist/client/components/mdx-components.js +134 -0
- package/dist/client/components/mdx-components.js.map +1 -0
- package/dist/client/components/mode-toggle.js +39 -0
- package/dist/client/components/mode-toggle.js.map +1 -0
- package/dist/client/components/page-error.js +39 -0
- package/dist/client/components/page-error.js.map +1 -0
- package/dist/client/components/parameter-badge.js +48 -0
- package/dist/client/components/parameter-badge.js.map +1 -0
- package/dist/client/components/parameter-table.js +301 -0
- package/dist/client/components/parameter-table.js.map +1 -0
- package/dist/client/components/post-list.js +119 -0
- package/dist/client/components/post-list.js.map +1 -0
- package/dist/client/components/running-bar.js +15 -0
- package/dist/client/components/running-bar.js.map +1 -0
- package/dist/client/components/slides-renderer.js +75 -0
- package/dist/client/components/slides-renderer.js.map +1 -0
- package/dist/client/components/theme-provider.js +9 -0
- package/dist/client/components/theme-provider.js.map +1 -0
- package/dist/client/components/ui/button.js +49 -0
- package/dist/client/components/ui/button.js.map +1 -0
- package/dist/client/components/ui/carousel.js +195 -0
- package/dist/client/components/ui/carousel.js.map +1 -0
- package/dist/client/components/ui/dropdown-menu.js +132 -0
- package/dist/client/components/ui/dropdown-menu.js.map +1 -0
- package/dist/client/hooks/use-key-bindings.js +40 -0
- package/dist/client/hooks/use-key-bindings.js.map +1 -0
- package/dist/client/hooks/use-mdx-content.js +78 -0
- package/dist/client/hooks/use-mdx-content.js.map +1 -0
- package/dist/client/lib/constants.js +5 -0
- package/dist/client/lib/constants.js.map +1 -0
- package/dist/client/lib/format-date.js +8 -0
- package/dist/client/lib/format-date.js.map +1 -0
- package/dist/client/lib/parameter-utils.js +110 -0
- package/dist/client/lib/parameter-utils.js.map +1 -0
- package/dist/client/lib/utils.js +9 -0
- package/dist/client/lib/utils.js.map +1 -0
- package/dist/client/logo_dark.png +0 -0
- package/dist/client/logo_light.png +0 -0
- package/dist/client/main.js +9 -0
- package/dist/client/main.js.map +1 -0
- package/dist/client/pages/home.js +30 -0
- package/dist/client/pages/home.js.map +1 -0
- package/dist/client/pages/post.js +53 -0
- package/dist/client/pages/post.js.map +1 -0
- package/dist/client/pages/slides.js +137 -0
- package/dist/client/pages/slides.js.map +1 -0
- package/dist/client/plugin/src/client.js +185 -0
- package/dist/client/plugin/src/client.js.map +1 -0
- package/dist/index.html +1 -1
- package/package.json +8 -4
- package/src/main.tsx +1 -1
- package/vite.config.ts +28 -4
- package/vite.lib.config.ts +47 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veslx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"veslx": "bin/veslx.ts"
|
|
@@ -12,11 +12,14 @@
|
|
|
12
12
|
"src",
|
|
13
13
|
"public",
|
|
14
14
|
"index.html",
|
|
15
|
-
"vite.config.ts"
|
|
15
|
+
"vite.config.ts",
|
|
16
|
+
"vite.lib.config.ts"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
18
19
|
"dev": "bun bin/veslx.ts serve",
|
|
19
|
-
"build": "bun bin/veslx.ts build"
|
|
20
|
+
"build": "bun bin/veslx.ts build",
|
|
21
|
+
"build:lib": "vite build --config vite.lib.config.ts",
|
|
22
|
+
"prepublishOnly": "npm run build:lib"
|
|
20
23
|
},
|
|
21
24
|
"dependencies": {
|
|
22
25
|
"acorn": "^8.15.0",
|
|
@@ -82,7 +85,8 @@
|
|
|
82
85
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
83
86
|
"globals": "^16.5.0",
|
|
84
87
|
"typescript": "~5.9.3",
|
|
85
|
-
"typescript-eslint": "^8.46.3"
|
|
88
|
+
"typescript-eslint": "^8.46.3",
|
|
89
|
+
"vite-plugin-dts": "^4.5.4"
|
|
86
90
|
},
|
|
87
91
|
"overrides": {}
|
|
88
92
|
}
|
package/src/main.tsx
CHANGED
package/vite.config.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import { defineConfig } from 'vite'
|
|
3
2
|
import react from '@vitejs/plugin-react'
|
|
4
3
|
import tailwindcss from '@tailwindcss/vite'
|
|
@@ -10,10 +9,21 @@ import remarkGfm from 'remark-gfm'
|
|
|
10
9
|
import remarkMdxFrontmatter from 'remark-mdx-frontmatter'
|
|
11
10
|
import { fileURLToPath } from 'url'
|
|
12
11
|
import path from 'path'
|
|
12
|
+
import fs from 'fs'
|
|
13
13
|
|
|
14
14
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const distClientPath = path.join(__dirname, 'dist/client')
|
|
17
|
+
const srcPath = path.join(__dirname, 'src')
|
|
18
|
+
const hasPrebuilt = fs.existsSync(path.join(distClientPath, 'main.js'))
|
|
19
|
+
|
|
20
|
+
export default defineConfig(({ command }) => {
|
|
21
|
+
// Only use pre-built files for dev server, not production build
|
|
22
|
+
// Pre-built files have externalized React which breaks production bundles
|
|
23
|
+
const usePrebuilt = command === 'serve' && hasPrebuilt
|
|
24
|
+
const clientPath = usePrebuilt ? distClientPath : srcPath
|
|
25
|
+
|
|
26
|
+
return {
|
|
17
27
|
clearScreen: false,
|
|
18
28
|
cacheDir: path.join(__dirname, 'node_modules/.vite'),
|
|
19
29
|
publicDir: path.join(__dirname, 'public'),
|
|
@@ -37,7 +47,7 @@ export default defineConfig({
|
|
|
37
47
|
],
|
|
38
48
|
resolve: {
|
|
39
49
|
alias: {
|
|
40
|
-
'@':
|
|
50
|
+
'@': clientPath,
|
|
41
51
|
},
|
|
42
52
|
},
|
|
43
53
|
server: {
|
|
@@ -60,7 +70,7 @@ export default defineConfig({
|
|
|
60
70
|
reportCompressedSize: false,
|
|
61
71
|
},
|
|
62
72
|
optimizeDeps: {
|
|
63
|
-
entries: [path.join(
|
|
73
|
+
entries: [path.join(clientPath, usePrebuilt ? 'main.js' : 'main.tsx')],
|
|
64
74
|
include: [
|
|
65
75
|
'react',
|
|
66
76
|
'react-dom',
|
|
@@ -69,6 +79,20 @@ export default defineConfig({
|
|
|
69
79
|
'react/jsx-dev-runtime',
|
|
70
80
|
'@mdx-js/react',
|
|
71
81
|
'react-router-dom',
|
|
82
|
+
// Pre-bundle heavy UI deps
|
|
83
|
+
'@radix-ui/react-collapsible',
|
|
84
|
+
'@radix-ui/react-dialog',
|
|
85
|
+
'@radix-ui/react-dropdown-menu',
|
|
86
|
+
'@radix-ui/react-scroll-area',
|
|
87
|
+
'@radix-ui/react-select',
|
|
88
|
+
'@radix-ui/react-tooltip',
|
|
89
|
+
'lucide-react',
|
|
90
|
+
'embla-carousel-react',
|
|
91
|
+
'next-themes',
|
|
92
|
+
'clsx',
|
|
93
|
+
'tailwind-merge',
|
|
94
|
+
'class-variance-authority',
|
|
72
95
|
],
|
|
73
96
|
},
|
|
97
|
+
}
|
|
74
98
|
})
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
import { resolve } from 'path'
|
|
4
|
+
|
|
5
|
+
// Library build config - pre-compiles src/ components for distribution
|
|
6
|
+
// CSS is left to runtime processing (Tailwind needs to scan for classes)
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [
|
|
9
|
+
react(),
|
|
10
|
+
],
|
|
11
|
+
build: {
|
|
12
|
+
lib: {
|
|
13
|
+
entry: resolve(__dirname, 'src/main.tsx'),
|
|
14
|
+
formats: ['es'],
|
|
15
|
+
fileName: 'main'
|
|
16
|
+
},
|
|
17
|
+
rollupOptions: {
|
|
18
|
+
// Externalize all deps - they're resolved at runtime
|
|
19
|
+
external: (id) => {
|
|
20
|
+
// Virtual modules
|
|
21
|
+
if (id === 'virtual:content-modules') return true
|
|
22
|
+
// CSS files (processed at runtime by Tailwind)
|
|
23
|
+
if (id.endsWith('.css')) return true
|
|
24
|
+
// All node_modules
|
|
25
|
+
if (id.includes('node_modules')) return true
|
|
26
|
+
// Bare imports (dependencies)
|
|
27
|
+
if (!id.startsWith('.') && !id.startsWith('/') && !id.startsWith('@/')) return true
|
|
28
|
+
return false
|
|
29
|
+
},
|
|
30
|
+
output: {
|
|
31
|
+
preserveModules: true,
|
|
32
|
+
preserveModulesRoot: 'src',
|
|
33
|
+
entryFileNames: '[name].js',
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
outDir: 'dist/client',
|
|
37
|
+
emptyOutDir: true,
|
|
38
|
+
// Don't minify for better debugging
|
|
39
|
+
minify: false,
|
|
40
|
+
sourcemap: true,
|
|
41
|
+
},
|
|
42
|
+
resolve: {
|
|
43
|
+
alias: {
|
|
44
|
+
'@': resolve(__dirname, 'src'),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
})
|