veslx 0.0.21 → 0.0.23

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 (82) hide show
  1. package/README.md +128 -1
  2. package/bin/lib/build.ts +6 -1
  3. package/bin/lib/serve.ts +6 -34
  4. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  5. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  6. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  7. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  8. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  9. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  10. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  11. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  12. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  13. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  14. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  15. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  16. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  17. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  18. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  19. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  20. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  21. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  22. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  23. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  24. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  25. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  26. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  27. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  28. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  29. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  30. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  31. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  32. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  33. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  34. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  35. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  36. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  37. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  38. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  39. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  40. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  41. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  42. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  43. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  44. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  45. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  46. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  47. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  48. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  49. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  50. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  51. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  52. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  53. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  54. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  55. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  56. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  57. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  58. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  59. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  60. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  61. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  62. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  63. package/dist/assets/index-C75KddSa.css +1 -0
  64. package/dist/assets/index-DsHb4M_F.js +542 -0
  65. package/{index.html → dist/index.html} +2 -1
  66. package/dist/logo_dark.png +0 -0
  67. package/dist/logo_light.png +0 -0
  68. package/package.json +9 -1
  69. package/plugin/src/plugin.ts +9 -6
  70. package/vite.config.ts +0 -3
  71. package/components.json +0 -20
  72. package/eslint.config.js +0 -23
  73. package/postcss.config.js +0 -5
  74. package/tailwind.config.js +0 -136
  75. package/test-content/.veslx.json +0 -49
  76. package/test-content/README.md +0 -33
  77. package/test-content/test-post/README.mdx +0 -7
  78. package/test-content/test-slides/SLIDES.mdx +0 -8
  79. package/tsconfig.app.json +0 -32
  80. package/tsconfig.json +0 -15
  81. package/tsconfig.node.json +0 -25
  82. package/veslx.config.ts +0 -4
@@ -9,9 +9,10 @@
9
9
  <link rel="preconnect" href="https://fonts.googleapis.com">
10
10
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
11
  <link href="https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap" rel="stylesheet">
12
+ <script type="module" crossorigin src="/assets/index-DsHb4M_F.js"></script>
13
+ <link rel="stylesheet" crossorigin href="/assets/index-C75KddSa.css">
12
14
  </head>
13
15
  <body>
14
16
  <div id="root"></div>
15
- <script type="module" src="/src/main.tsx"></script>
16
17
  </body>
17
18
  </html>
Binary file
Binary file
package/package.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
2
  "name": "veslx",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "veslx": "bin/veslx.ts"
7
7
  },
8
+ "files": [
9
+ "bin",
10
+ "dist",
11
+ "plugin",
12
+ "src",
13
+ "public",
14
+ "vite.config.ts"
15
+ ],
8
16
  "scripts": {
9
17
  "dev": "vite",
10
18
  "build": "vite build",
@@ -2,7 +2,7 @@ import { type Plugin, type Connect } from 'vite'
2
2
  import path from 'path'
3
3
  import fs from 'fs'
4
4
  import { buildAll } from './lib'
5
- import chokidar from 'chokidar'
5
+ import chokidar, { type FSWatcher } from 'chokidar'
6
6
  import type { IncomingMessage, ServerResponse } from 'http'
7
7
 
8
8
  /**
@@ -24,18 +24,21 @@ function copyDirSync(src: string, dest: string) {
24
24
  }
25
25
  }
26
26
 
27
- export default function contentPlugin(inputDir: string): Plugin {
27
+ export default function contentPlugin(contentDir: string): Plugin {
28
28
 
29
- if (!inputDir) {
29
+ if (!contentDir) {
30
30
  throw new Error('Content directory must be specified.')
31
31
  }
32
32
 
33
- // Resolve dir to absolute path from user's cwd
34
- const dir = path.isAbsolute(inputDir) ? inputDir : path.resolve(process.cwd(), inputDir)
33
+ if (!path.isAbsolute(contentDir)) {
34
+ throw new Error(`Content directory must be an absolute path, got: ${contentDir}`)
35
+ }
36
+
37
+ const dir = contentDir
35
38
 
36
39
  const buildFn = () => buildAll([dir])
37
40
 
38
- let watchers: chokidar.FSWatcher[] = []
41
+ let watchers: FSWatcher[] = []
39
42
 
40
43
  // Server middleware for serving content files
41
44
  const urlToDir = new Map<string, string>()
package/vite.config.ts CHANGED
@@ -53,9 +53,6 @@ export default defineConfig({
53
53
  host: '0.0.0.0',
54
54
  port: process.env.PORT ? parseInt(process.env.PORT, 10) : 3000,
55
55
  strictPort: true,
56
- fs: {
57
- allow: ['..', '../..'],
58
- },
59
56
  allowedHosts: true,
60
57
  },
61
58
  build: {
package/components.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "default",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "tailwind.config.js",
8
- "css": "src/index.css",
9
- "baseColor": "slate",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "aliases": {
14
- "components": "src/components",
15
- "utils": "src/lib/utils",
16
- "ui": "src/components/ui",
17
- "lib": "src/lib",
18
- "hooks": "src/hooks"
19
- }
20
- }
package/eslint.config.js DELETED
@@ -1,23 +0,0 @@
1
- import js from '@eslint/js'
2
- import globals from 'globals'
3
- import reactHooks from 'eslint-plugin-react-hooks'
4
- import reactRefresh from 'eslint-plugin-react-refresh'
5
- import tseslint from 'typescript-eslint'
6
- import { defineConfig, globalIgnores } from 'eslint/config'
7
-
8
- export default defineConfig([
9
- globalIgnores(['dist']),
10
- {
11
- files: ['**/*.{ts,tsx}'],
12
- extends: [
13
- js.configs.recommended,
14
- tseslint.configs.recommended,
15
- reactHooks.configs.flat.recommended,
16
- reactRefresh.configs.vite,
17
- ],
18
- languageOptions: {
19
- ecmaVersion: 2020,
20
- globals: globals.browser,
21
- },
22
- },
23
- ])
package/postcss.config.js DELETED
@@ -1,5 +0,0 @@
1
- export default {
2
- plugins: {
3
- '@tailwindcss/postcss': {},
4
- },
5
- }
@@ -1,136 +0,0 @@
1
- import path from "path";
2
- import { fileURLToPath } from "url";
3
-
4
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
-
6
- /** @type {import('tailwindcss').Config} */
7
- export default {
8
- darkMode: ["class"],
9
- content: [
10
- "./index.html",
11
- "./src/**/*.{js,ts,jsx,tsx}",
12
- path.join(__dirname, "../biblio/**/*.mdx"),
13
- path.join(__dirname, "../biblio/**/*.md"),
14
- ],
15
- theme: {
16
- extend: {
17
- fontFamily: {
18
- // Clean sans-serif for everything
19
- sans: ['Inter', 'system-ui', 'sans-serif'],
20
- // Monospace for code, data, technical elements
21
- mono: ['JetBrains Mono', 'ui-monospace', 'monospace'],
22
- },
23
- fontSize: {
24
- // Refined type scale
25
- 'xs': ['0.75rem', { lineHeight: '1.5' }],
26
- 'sm': ['0.875rem', { lineHeight: '1.6' }],
27
- 'base': ['1rem', { lineHeight: '1.75' }],
28
- 'lg': ['1.125rem', { lineHeight: '1.7' }],
29
- 'xl': ['1.25rem', { lineHeight: '1.5' }],
30
- '2xl': ['1.5rem', { lineHeight: '1.35' }],
31
- '3xl': ['1.875rem', { lineHeight: '1.25' }],
32
- '4xl': ['2.25rem', { lineHeight: '1.2' }],
33
- '5xl': ['3rem', { lineHeight: '1.15' }],
34
- '6xl': ['3.75rem', { lineHeight: '1.1' }],
35
- },
36
- letterSpacing: {
37
- 'tightest': '-0.04em',
38
- 'tighter': '-0.02em',
39
- 'tight': '-0.01em',
40
- 'normal': '0',
41
- 'wide': '0.01em',
42
- 'wider': '0.02em',
43
- 'widest': '0.05em',
44
- },
45
- borderRadius: {
46
- lg: 'var(--radius)',
47
- md: 'calc(var(--radius) - 2px)',
48
- sm: 'calc(var(--radius) - 4px)'
49
- },
50
- colors: {
51
- // Ministry of Unsanctioned Computation
52
- ministry: {
53
- parchment: '#F5F0E6',
54
- cream: '#FAF7F0',
55
- crimson: '#8B1538',
56
- gold: '#B8860B',
57
- brown: '#5C4033',
58
- ink: '#2C1810',
59
- },
60
- background: 'hsl(var(--background))',
61
- foreground: 'hsl(var(--foreground))',
62
- card: {
63
- DEFAULT: 'hsl(var(--card))',
64
- foreground: 'hsl(var(--card-foreground))'
65
- },
66
- popover: {
67
- DEFAULT: 'hsl(var(--popover))',
68
- foreground: 'hsl(var(--popover-foreground))'
69
- },
70
- primary: {
71
- DEFAULT: 'hsl(var(--primary))',
72
- foreground: 'hsl(var(--primary-foreground))'
73
- },
74
- secondary: {
75
- DEFAULT: 'hsl(var(--secondary))',
76
- foreground: 'hsl(var(--secondary-foreground))'
77
- },
78
- muted: {
79
- DEFAULT: 'hsl(var(--muted))',
80
- foreground: 'hsl(var(--muted-foreground))'
81
- },
82
- accent: {
83
- DEFAULT: 'hsl(var(--accent))',
84
- foreground: 'hsl(var(--accent-foreground))'
85
- },
86
- destructive: {
87
- DEFAULT: 'hsl(var(--destructive))',
88
- foreground: 'hsl(var(--destructive-foreground))'
89
- },
90
- border: 'hsl(var(--border))',
91
- input: 'hsl(var(--input))',
92
- ring: 'hsl(var(--ring))',
93
- chart: {
94
- '1': 'hsl(var(--chart-1))',
95
- '2': 'hsl(var(--chart-2))',
96
- '3': 'hsl(var(--chart-3))',
97
- '4': 'hsl(var(--chart-4))',
98
- '5': 'hsl(var(--chart-5))'
99
- },
100
- sidebar: {
101
- DEFAULT: 'hsl(var(--sidebar-background))',
102
- foreground: 'hsl(var(--sidebar-foreground))',
103
- primary: 'hsl(var(--sidebar-primary))',
104
- 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
105
- accent: 'hsl(var(--sidebar-accent))',
106
- 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
107
- border: 'hsl(var(--sidebar-border))',
108
- ring: 'hsl(var(--sidebar-ring))'
109
- }
110
- },
111
- animation: {
112
- 'fade-in': 'fade-in 0.4s ease-out forwards',
113
- 'fade-in-slow': 'fade-in-slow 0.6s ease-out forwards',
114
- 'slide-up': 'slide-up 0.5s ease-out forwards',
115
- },
116
- keyframes: {
117
- 'fade-in': {
118
- from: { opacity: '0', transform: 'translateY(8px)' },
119
- to: { opacity: '1', transform: 'translateY(0)' },
120
- },
121
- 'fade-in-slow': {
122
- from: { opacity: '0' },
123
- to: { opacity: '1' },
124
- },
125
- 'slide-up': {
126
- from: { opacity: '0', transform: 'translateY(20px)' },
127
- to: { opacity: '1', transform: 'translateY(0)' },
128
- },
129
- },
130
- transitionTimingFunction: {
131
- 'out-expo': 'cubic-bezier(0.19, 1, 0.22, 1)',
132
- },
133
- }
134
- },
135
- plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")],
136
- }
@@ -1,49 +0,0 @@
1
- {
2
- "type": "directory",
3
- "name": "test-content",
4
- "path": ".",
5
- "children": [
6
- {
7
- "type": "file",
8
- "name": "README.md",
9
- "path": "README.md",
10
- "size": 472
11
- },
12
- {
13
- "type": "directory",
14
- "name": "test-slides",
15
- "path": "test-slides",
16
- "children": [
17
- {
18
- "type": "file",
19
- "name": "SLIDES.mdx",
20
- "path": "test-slides/SLIDES.mdx",
21
- "size": 122,
22
- "frontmatter": {
23
- "title": "Test Slides",
24
- "description": "These are test slides for testing purposes.",
25
- "date": "2024-06-15"
26
- }
27
- }
28
- ]
29
- },
30
- {
31
- "type": "directory",
32
- "name": "test-post",
33
- "path": "test-post",
34
- "children": [
35
- {
36
- "type": "file",
37
- "name": "README.mdx",
38
- "path": "test-post/README.mdx",
39
- "size": 115,
40
- "frontmatter": {
41
- "title": "Test Post",
42
- "description": "This is a test post for testing purposes.",
43
- "date": "2024-06-15"
44
- }
45
- }
46
- ]
47
- }
48
- ]
49
- }
@@ -1,33 +0,0 @@
1
-
2
- ## Getting Started
3
-
4
- ### Installation
5
-
6
- First install [Task](https://taskfile.dev/docs/installation), then:
7
-
8
- ```bash
9
- git clone https://github.com/eoinmurray/pinglab
10
- task install
11
- ```
12
-
13
- ### Simulate
14
-
15
- Then you can run experiments like:
16
-
17
- ```bash
18
- task execute -- content/dynamical-regimes/experiment.py
19
- # or
20
- task execute:all
21
- ```
22
-
23
- which will generate data in the appropriate folder.
24
-
25
- ### Present
26
-
27
- Start the UI server with
28
-
29
- ```bash
30
- task dev
31
- # or
32
- task bg # starts in background
33
- ```
@@ -1,7 +0,0 @@
1
- ---
2
- title: "Test Post"
3
- description: "This is a test post for testing purposes."
4
- date: "2024-06-15"
5
- ---
6
-
7
- # Test Post
@@ -1,8 +0,0 @@
1
- ---
2
- title: "Test Slides"
3
- description: "These are test slides for testing purposes."
4
- date: "2024-06-15"
5
- ---
6
-
7
-
8
- # Test Slides
package/tsconfig.app.json DELETED
@@ -1,32 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
- "target": "ES2022",
5
- "useDefineForClassFields": true,
6
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
- "module": "ESNext",
8
- "types": ["vite/client", "node"],
9
- "skipLibCheck": true,
10
-
11
- /* Bundler mode */
12
- "moduleResolution": "bundler",
13
- "allowImportingTsExtensions": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
- "jsx": "react-jsx",
17
-
18
- "baseUrl": ".",
19
- "paths": {
20
- "@/*": ["./src/*"],
21
- },
22
-
23
- /* Linting */
24
- "strict": true,
25
- "noUnusedLocals": true,
26
- "noUnusedParameters": true,
27
- "erasableSyntaxOnly": true,
28
- "noFallthroughCasesInSwitch": true,
29
- "noUncheckedSideEffectImports": true
30
- },
31
- "include": ["src", "../biblio/**/*.tsx"]
32
- }
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ],
7
- "compilerOptions": {
8
- "baseUrl": ".",
9
- "paths": {
10
- "@/*": [
11
- "./src/*"
12
- ]
13
- }
14
- }
15
- }
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "ES2023",
5
- "lib": ["ES2023"],
6
- "module": "ESNext",
7
- "types": ["node"],
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "moduleDetection": "force",
14
- "noEmit": true,
15
-
16
- /* Linting */
17
- "strict": true,
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "erasableSyntaxOnly": true,
21
- "noFallthroughCasesInSwitch": true,
22
- "noUncheckedSideEffectImports": true
23
- },
24
- "include": ["vite.config.ts", "plugin/src/plugin.ts"]
25
- }
package/veslx.config.ts DELETED
@@ -1,4 +0,0 @@
1
-
2
- export default {
3
- dir: 'test-content',
4
- }