@warkypublic/svelix 0.1.22 → 0.1.24
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 +51 -2
- package/dist/components/Types/index.d.ts +1 -0
- package/dist/components/Types/index.js +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/llm/ARCHITECTURE.md +197 -0
- package/llm/COMPONENT_GUIDE.md +628 -0
- package/llm/ESLINT_GUIDE.md +492 -0
- package/llm/IMPLEMENTATION_PLAN.md +89 -0
- package/llm/README.md +28 -0
- package/llm/ROADMAP.md +78 -0
- package/llm/SETUP.md +209 -0
- package/llm/plans/canvasgrid.md +378 -0
- package/llm/tools/SVAR.md +997 -0
- package/llm/tools/resolvespec-js.md +263 -0
- package/package.json +31 -28
package/README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Svelix
|
|
2
2
|
|
|
3
|
-
Svelix
|
|
3
|
+
Svelix is a Svelte 5 component library focused on workflow-heavy UI, data-rich views, and content tooling.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @warkypublic/svelix
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What ships
|
|
12
|
+
|
|
13
|
+
- Svelte 5 components and helpers from the package root
|
|
14
|
+
- published CSS assets under `@warkypublic/svelix/css/...`
|
|
15
|
+
- LLM-oriented documentation under `@warkypublic/svelix/llm/...`
|
|
16
|
+
|
|
17
|
+
## LLM Documentation
|
|
18
|
+
|
|
19
|
+
The repository includes an `llm/` folder with project context and implementation docs.
|
|
20
|
+
|
|
21
|
+
### In this repository
|
|
22
|
+
|
|
23
|
+
- [llm/README.md](./llm/README.md)
|
|
24
|
+
- [llm/ARCHITECTURE.md](./llm/ARCHITECTURE.md)
|
|
25
|
+
- [llm/SETUP.md](./llm/SETUP.md)
|
|
26
|
+
- [llm/COMPONENT_GUIDE.md](./llm/COMPONENT_GUIDE.md)
|
|
27
|
+
- [llm/IMPLEMENTATION_PLAN.md](./llm/IMPLEMENTATION_PLAN.md)
|
|
28
|
+
- [llm/ROADMAP.md](./llm/ROADMAP.md)
|
|
29
|
+
- [llm/ESLINT_GUIDE.md](./llm/ESLINT_GUIDE.md)
|
|
30
|
+
- [llm/tools/SVAR.md](./llm/tools/SVAR.md)
|
|
31
|
+
- [llm/tools/resolvespec-js.md](./llm/tools/resolvespec-js.md)
|
|
32
|
+
|
|
33
|
+
### After install
|
|
34
|
+
|
|
35
|
+
The `llm/` docs are published with the package and can be accessed in either of these ways:
|
|
36
|
+
|
|
37
|
+
- filesystem path: `node_modules/@warkypublic/svelix/llm/`
|
|
38
|
+
- package subpath: `@warkypublic/svelix/llm/...`
|
|
39
|
+
|
|
40
|
+
Examples:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
node_modules/@warkypublic/svelix/llm/README.md
|
|
44
|
+
node_modules/@warkypublic/svelix/llm/ARCHITECTURE.md
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
@warkypublic/svelix/llm/README.md
|
|
49
|
+
@warkypublic/svelix/llm/ARCHITECTURE.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This makes the docs available to external tools and local LLM workflows that inspect installed package contents.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./generic_grid";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,8 +8,8 @@ export * from "./Gridler/index";
|
|
|
8
8
|
export * from "./SvarkGrid/index";
|
|
9
9
|
export * from "./Portal/index";
|
|
10
10
|
export * from "./OverlayStack/index";
|
|
11
|
-
export * from "./Svark/index";
|
|
12
11
|
export * from "./GlobalStateStore/index";
|
|
13
12
|
export * from "./Screenshot/index";
|
|
14
13
|
export * from "./VTree/index";
|
|
15
14
|
export * from "./ContentEditor/index";
|
|
15
|
+
export type * from "./Types/index";
|
package/dist/components/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export * from "./Gridler/index";
|
|
|
8
8
|
export * from "./SvarkGrid/index";
|
|
9
9
|
export * from "./Portal/index";
|
|
10
10
|
export * from "./OverlayStack/index";
|
|
11
|
-
export * from "./Svark/index";
|
|
11
|
+
//export * from "./Svark/index";
|
|
12
12
|
export * from "./GlobalStateStore/index";
|
|
13
13
|
export * from "./Screenshot/index";
|
|
14
14
|
export * from "./VTree/index";
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Architecture Documentation
|
|
2
|
+
|
|
3
|
+
## Technology Stack
|
|
4
|
+
|
|
5
|
+
### Core Framework
|
|
6
|
+
- **Svelte 5** (`^5.53.2`) with runes-based components
|
|
7
|
+
- **SvelteKit 2** (`^2.53.0`) for library packaging and the demo app
|
|
8
|
+
- **TypeScript 5** (`^5.9.3`) for typed component, adapter, and utility APIs
|
|
9
|
+
|
|
10
|
+
### Styling
|
|
11
|
+
- **Tailwind CSS v4** (`^4.2.0`) via `@tailwindcss/vite`
|
|
12
|
+
- **Skeleton UI v4.12.0**
|
|
13
|
+
- `@skeletonlabs/skeleton`
|
|
14
|
+
- `@skeletonlabs/skeleton-svelte`
|
|
15
|
+
- Published CSS entry points:
|
|
16
|
+
- `./css/tailwind-source.css`
|
|
17
|
+
- `./css/*.css`
|
|
18
|
+
- `./css/svelix_orange.css`
|
|
19
|
+
|
|
20
|
+
### Development Tooling
|
|
21
|
+
- **Storybook 10.2** for component docs and interactive examples
|
|
22
|
+
- **Vitest 4** for unit tests plus Storybook-integrated browser tests
|
|
23
|
+
- **Playwright 1.58** as the browser provider for Storybook/Vitest and for E2E coverage
|
|
24
|
+
- **ESLint 10** with flat config and `eslint-plugin-svelte`
|
|
25
|
+
- **publint** for package validation
|
|
26
|
+
|
|
27
|
+
### Runtime Integrations
|
|
28
|
+
- **`@svar-ui/svelte-grid`** for the SVAR-backed grid layer used by `SvarkGrid`
|
|
29
|
+
- **`@warkypublic/resolvespec-js`** for ResolveSpec and RestHeaderSpec adapters
|
|
30
|
+
- **Carta / Tipex / KaTeX / Monaco Editor** for `ContentEditor`
|
|
31
|
+
- **`@js-temporal/polyfill`** for date-time handling
|
|
32
|
+
|
|
33
|
+
## Project Structure
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
svelix/
|
|
37
|
+
├── .storybook/ # Storybook config and Vitest browser setup
|
|
38
|
+
├── llm/ # AI-readable project docs
|
|
39
|
+
├── src/
|
|
40
|
+
│ ├── lib/
|
|
41
|
+
│ │ ├── actions/ # Public action exports
|
|
42
|
+
│ │ ├── components/ # Packaged components, adapters, stores, helpers
|
|
43
|
+
│ │ ├── css/ # Published CSS assets
|
|
44
|
+
│ │ ├── stores/ # Public store exports
|
|
45
|
+
│ │ ├── utils/ # Shared utility exports
|
|
46
|
+
│ │ └── index.ts # Main package entry
|
|
47
|
+
│ ├── routes/ # Demo app
|
|
48
|
+
│ └── app.html
|
|
49
|
+
├── dist/ # Package output from `pnpm package`
|
|
50
|
+
├── package.json
|
|
51
|
+
├── svelte.config.js
|
|
52
|
+
└── vite.config.ts
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Public Package Surface
|
|
56
|
+
|
|
57
|
+
### Top-level exports
|
|
58
|
+
The main package entry currently re-exports:
|
|
59
|
+
|
|
60
|
+
- `Button`
|
|
61
|
+
- `ErrorBoundary`
|
|
62
|
+
- `BetterMenu`
|
|
63
|
+
- `Former`
|
|
64
|
+
- `FormerControllers`
|
|
65
|
+
- `Boxer`
|
|
66
|
+
- `Gridler`
|
|
67
|
+
- `SvarkGrid`
|
|
68
|
+
- `Portal`
|
|
69
|
+
- `OverlayStack`
|
|
70
|
+
- `GlobalStateStore`
|
|
71
|
+
- `Screenshot`
|
|
72
|
+
- `VTree`
|
|
73
|
+
- `ContentEditor`
|
|
74
|
+
- shared generic grid types
|
|
75
|
+
|
|
76
|
+
### Notable module families
|
|
77
|
+
|
|
78
|
+
- **Form workflow**
|
|
79
|
+
- `Former`, `FormerModal`, `FormerDrawer`, `FormerButtonArea`
|
|
80
|
+
- `createFormerState`
|
|
81
|
+
- ResolveSpec / RestHeaderSpec form APIs
|
|
82
|
+
- controller components such as `TextInputCtrl`, `NumberInputCtrl`, `NativeSelectCtrl`, `PasswordInputCtrl`, `SwitchCtrl`, `TextAreaCtrl`, `DateTimeCtrl`, and action/button wrappers
|
|
83
|
+
|
|
84
|
+
- **Data-heavy components**
|
|
85
|
+
- `Gridler` and `GridlerFull`
|
|
86
|
+
- Grid adapters, renderer helpers, scrolling/selection/cell cache utilities
|
|
87
|
+
- `SvarkGrid` with filtering, pagination, context-menu, and ResolveSpec-backed loading
|
|
88
|
+
- `VTree` with local or adapter-backed tree loading and search
|
|
89
|
+
|
|
90
|
+
- **Application shell/state helpers**
|
|
91
|
+
- `GlobalStateStoreProvider`
|
|
92
|
+
- global state, i18n, and session helpers
|
|
93
|
+
- `overlayStack`, `registerOverlay`, `resolveOverlayLayer`
|
|
94
|
+
|
|
95
|
+
- **Document/content workflows**
|
|
96
|
+
- `ContentEditor` for text, markdown, media, PDF, Monaco, and office-document flows
|
|
97
|
+
- `CaptureScreenshotComponent` and `CaptureScreen`
|
|
98
|
+
|
|
99
|
+
### Internal or not yet top-level exported
|
|
100
|
+
- `src/lib/components/Svark/` still exists with stories and adapters, but the package top-level export is currently commented out in [src/lib/components/index.ts](/home/hein/hein/dev/svelix/src/lib/components/index.ts#L1).
|
|
101
|
+
- Consumers should treat `SvarkGrid` as the supported exported grid integration for now.
|
|
102
|
+
|
|
103
|
+
## Build and Packaging Flow
|
|
104
|
+
|
|
105
|
+
### Main scripts
|
|
106
|
+
- `pnpm dev` runs the demo app
|
|
107
|
+
- `pnpm storybook` runs Storybook on port `6006`
|
|
108
|
+
- `pnpm build` builds the demo app and then packages the library
|
|
109
|
+
- `pnpm package` runs:
|
|
110
|
+
1. `svelte-kit sync`
|
|
111
|
+
2. `svelte-package`
|
|
112
|
+
3. copies `src/lib/css/tailwind-source.css` into `dist/css/`
|
|
113
|
+
4. `publint`
|
|
114
|
+
|
|
115
|
+
### Published output
|
|
116
|
+
`package.json` publishes `dist/` and excludes tests, specs, and stories. The package exports both the main library entry and CSS entry points.
|
|
117
|
+
|
|
118
|
+
## Testing Architecture
|
|
119
|
+
|
|
120
|
+
### Vitest projects
|
|
121
|
+
`vite.config.ts` defines two Vitest projects:
|
|
122
|
+
|
|
123
|
+
- `unit`: runs `src/**/*.test.ts` in a Node environment
|
|
124
|
+
- `storybook`: runs Storybook stories in a browser environment using Playwright
|
|
125
|
+
|
|
126
|
+
### Additional test commands
|
|
127
|
+
- `pnpm test`
|
|
128
|
+
- `pnpm test:unit`
|
|
129
|
+
- `pnpm test:watch`
|
|
130
|
+
- `pnpm test:e2e`
|
|
131
|
+
- `pnpm test:e2e:ui`
|
|
132
|
+
|
|
133
|
+
## Styling Architecture
|
|
134
|
+
|
|
135
|
+
### CSS import order
|
|
136
|
+
Skeleton and Tailwind styles depend on import order:
|
|
137
|
+
|
|
138
|
+
```css
|
|
139
|
+
@import 'tailwindcss';
|
|
140
|
+
@import '@skeletonlabs/skeleton';
|
|
141
|
+
@import '@skeletonlabs/skeleton-svelte';
|
|
142
|
+
@import '@skeletonlabs/skeleton/themes/cerberus';
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
This order is used in the app and Storybook preview styles.
|
|
146
|
+
|
|
147
|
+
### Theme model
|
|
148
|
+
- The default theme is **Cerberus**
|
|
149
|
+
- Theme activation happens via `data-theme="cerberus"`
|
|
150
|
+
- Component styling blends Skeleton primitives with custom utility/class composition
|
|
151
|
+
|
|
152
|
+
## Architectural Patterns
|
|
153
|
+
|
|
154
|
+
### Svelte 5 runes
|
|
155
|
+
Most modern components use:
|
|
156
|
+
- `$props()` for typed inputs
|
|
157
|
+
- `$state()` for local mutable state
|
|
158
|
+
- `$derived()` for computed values
|
|
159
|
+
- `$effect()` for side effects
|
|
160
|
+
- `Snippet` for render callbacks / slot-like composition
|
|
161
|
+
|
|
162
|
+
### Adapter-first data access
|
|
163
|
+
The data-heavy modules avoid hard-coding transport logic:
|
|
164
|
+
- ResolveSpec and RestHeaderSpec adapters live alongside the components that consume them
|
|
165
|
+
- component props accept adapter config and callback hooks
|
|
166
|
+
- shared generic grid types are exported from `src/lib/components/Types/`
|
|
167
|
+
|
|
168
|
+
### Overlay coordination
|
|
169
|
+
Overlay-aware components use a shared stack model:
|
|
170
|
+
- registration returns a stable `id`
|
|
171
|
+
- z-index layers are derived from open order
|
|
172
|
+
- portal or inline mount strategies are both supported
|
|
173
|
+
|
|
174
|
+
### Rich editor extensibility
|
|
175
|
+
`ContentEditor` is intentionally polymorphic:
|
|
176
|
+
- detects content/editor mode from file metadata
|
|
177
|
+
- supports Markdown and text editing
|
|
178
|
+
- supports Monaco for code/text editing
|
|
179
|
+
- supports Collabora and Office 365 WOPI flows for office files
|
|
180
|
+
- exposes `insertText` and `insertHtml` callbacks for external integrations
|
|
181
|
+
|
|
182
|
+
## Dependency Strategy
|
|
183
|
+
|
|
184
|
+
### Peer dependencies
|
|
185
|
+
- `svelte` is the only peer dependency today
|
|
186
|
+
|
|
187
|
+
### Bundled/runtime dependencies
|
|
188
|
+
Unlike the initial project setup, Svelix now has real runtime dependencies in `dependencies` for editor, markdown, math, and grid features. Consumers do not need to install those separately unless they are integrating at a lower level.
|
|
189
|
+
|
|
190
|
+
### Dev-only dependencies
|
|
191
|
+
Tooling such as Storybook, ESLint, Playwright, Vitest, and packaging utilities remain in `devDependencies`.
|
|
192
|
+
|
|
193
|
+
## Current Focus Areas
|
|
194
|
+
|
|
195
|
+
- keep the exported API aligned with the richer component set already present in `src/lib/components/`
|
|
196
|
+
- continue hardening `SvarkGrid`, `Gridler`, `VTree`, and `ContentEditor`
|
|
197
|
+
- decide whether legacy `Svark` should return as a top-level export or remain internal
|