You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,15 @@
2
2
3
3
A modern, ESM-first implementation of the PIE (Platform Independent Elements) specification. This is a **new project** (not a refactor) that provides a clean foundation for future PIE development while maintaining backwards compatibility through the legacy pie-elements project.
4
4
5
+
**Current Status**: Early development (v0.1.0) - 28 React-based elements synced from upstream, core infrastructure in place.
6
+
5
7
## Why a New Project?
6
8
7
9
The PIE team's work on upstream library modernization (React 18, MUI 7, Tiptap editor) now enables full ESM adoption and modern tooling. This new project takes advantage of those improvements while keeping the legacy pie-elements available for existing consumers.
8
10
9
11
## Key Improvements Over Legacy pie-elements
10
12
11
-
1.**Framework-agnostic architecture** - Supports multiple frameworks (React, Svelte, future Vue/Angular) via web components, not just React
13
+
1.**Framework-agnostic architecture** - Architecture designed to support multiple frameworks (React, Svelte, future Vue/Angular) via web components. Currently: React implementations synced from upstream.
Copy file name to clipboardExpand all lines: docs/ARCHITECTURE.md
+34-16Lines changed: 34 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,13 @@
2
2
3
3
## Overview
4
4
5
-
This is a modern implementation of the PIE (Platform Independent Elements) specification, built with TypeScript, ESM, and contemporary tooling. The project currently syncs React-based elements from the upstream [pie-elements](https://github.com/PieLabs/pie-elements) repository while providing modern ESM packaging, Vite builds, and improved developer experience. Future plans include native Svelte 5 implementations for smaller bundle sizes and better performance.
5
+
This is a modern implementation of the PIE (Platform Independent Elements) specification, built with TypeScript, ESM, and contemporary tooling. The project currently syncs React-based elements from the upstream [pie-elements](https://github.com/PieLabs/pie-elements) repository while providing modern ESM packaging, Vite builds, and improved developer experience.
6
+
7
+
**Current Status**: Early development (v0.1.0)
8
+
- 28 React elements synced from upstream
9
+
- Core infrastructure and build tooling established
10
+
- Elements are private packages (not yet published to npm)
11
+
- Future plans include native Svelte 5 implementations and public npm releases
6
12
7
13
## Core Philosophy
8
14
@@ -43,9 +49,9 @@ This project differs fundamentally from the legacy pie-elements in eight key way
43
49
-**Controllers** are pure TypeScript business logic (completely framework-independent)
44
50
-**UI implementations** can use any framework (React, Svelte, Vue, Angular) as long as they produce web components
45
51
-**Element Player** loads elements via custom element registry, regardless of underlying framework
46
-
-**Coexistence**: React and Svelte elements work side-by-side in the same application
52
+
-**Current State**: All 28 elements use React; architecture supports future multi-framework implementations
47
53
48
-
This flexibility allows choosing the right framework for each use case (e.g., Svelte for smaller bundles, React for ecosystem compatibility).
54
+
This architectural flexibility will allow choosing the right framework for each use case (e.g., Svelte for smaller bundles, React for ecosystem compatibility).
49
55
50
56
### 2. ESM-First Build System
51
57
@@ -428,16 +434,20 @@ $ git push
428
434
429
435
**Publishing strategy:**
430
436
431
-
Not all packages in the monorepo are published to npm:
437
+
**Current Status**: All packages are currently marked as `"private": true` and are not published to npm. This is an early development phase decision.
438
+
439
+
**Future Publishing Plan**:
432
440
433
-
-**Element packages** (`@pie-element/*`) - Published for external consumption
434
-
-**Library packages** (`@pie-lib/*`) - **NOT published independently**
441
+
Once the project reaches a stable release (v1.0.0+):
442
+
443
+
-**Element packages** (`@pie-element/*`) - Will be published for external consumption
444
+
-**Library packages** (`@pie-lib/*`) - Will **NOT** be published independently
435
445
- These are internal implementation details of the elements
436
446
- Bundled into element packages during build
437
-
- External consumers never import `@pie-lib` packages directly
447
+
- External consumers will never import `@pie-lib` packages directly
438
448
- Simplifies the public API surface
439
449
440
-
This differs from the legacy approach where `@pie-lib` packages were independently published and consumed. In pie-elements-ng, `@pie-lib` packages exist purely for internal code organization within the monorepo.
450
+
This will differ from the legacy approach where `@pie-lib` packages were independently published and consumed. In pie-elements-ng, `@pie-lib` packages exist purely for internal code organization within the monorepo.
441
451
442
452
**Trade-offs:**
443
453
@@ -489,7 +499,7 @@ This project maintains compatibility with the existing PIE ecosystem by syncing
@@ -499,7 +509,7 @@ This project maintains compatibility with the existing PIE ecosystem by syncing
499
509
500
510
### Why Sync?
501
511
502
-
1.**Leverage existing work** - Reuse 50+ production-tested elements
512
+
1.**Leverage existing work** - Reuse production-tested elements from upstream
503
513
2.**Maintain compatibility** - Ensure consistency with existing PIE consumers
504
514
3.**Modernize existing code** - Transform to ESM, TypeScript, and modern tooling
505
515
4.**Stable baseline** - Synced React elements provide production-ready implementations
@@ -1160,19 +1170,25 @@ Note: `'unsafe-inline'` for styles is required for Svelte scoped styles.
1160
1170
1161
1171
### NPM Publishing
1162
1172
1163
-
Packages are published to npm via GitHub Actions:
1173
+
**Current Status**: Packages are not yet published to npm (all marked as `"private": true`).
1174
+
1175
+
**Future Publishing Strategy**: Once ready for public release, packages will be published via GitHub Actions:
1164
1176
1165
1177
1. Developer creates changeset: `bun run changeset`
1166
1178
2. PR merged to main
1167
1179
3. GitHub Action creates "Version Packages" PR
1168
1180
4. Maintainer merges Version PR
1169
1181
5. Packages automatically published to npm
1170
1182
1171
-
See [PUBLISHING.md](./PUBLISHING.md) for details.
1183
+
See [PUBLISHING.md](./PUBLISHING.md) for details (when available).
1172
1184
1173
1185
### Versioning
1174
1186
1175
-
This project uses **workspace-wide versioning** where all packages share the same version number. This is a deliberate architectural decision that differs from the upstream pie-elements/pie-lib projects. See [section 8 above](#8-workspace-wide-versioning) for a detailed explanation of why this approach was chosen and the problems it solves.
1187
+
This project is designed to use **workspace-wide versioning** where all packages share the same version number. This is a deliberate architectural decision that differs from the upstream pie-elements/pie-lib projects.
1188
+
1189
+
**Current Status**: All packages are at version `0.1.0` and marked as `"private": true` (not published). Workspace-wide versioning will be enforced when packages are published publicly.
1190
+
1191
+
See [section 8 above](#8-workspace-wide-versioning) for a detailed explanation of why this approach was chosen and the problems it solves.
1176
1192
1177
1193
**Semantic Versioning (SemVer)**:
1178
1194
@@ -1190,7 +1206,7 @@ All packages follow semantic versioning as a coordinated unit:
1190
1206
4. All element packages are released together with the same new version
1191
1207
5. Internal dependencies automatically updated to the new version
1192
1208
1193
-
**Example release:**
1209
+
**Example release (future, when published):**
1194
1210
1195
1211
```bash
1196
1212
# Before: All element packages at 1.4.0
@@ -1199,14 +1215,16 @@ $ bun run changeset
1199
1215
# PR merged
1200
1216
1201
1217
# After: All element packages bumped to 1.5.0
1202
-
@pie-element/multiple-choice: 1.5.0 #Published to npm
1203
-
@pie-element/drag-in-the-blank: 1.5.0 #Published to npm (even though unchanged)
1218
+
@pie-element/multiple-choice: 1.5.0 #Will be published to npm
1219
+
@pie-element/drag-in-the-blank: 1.5.0 #Will be published to npm (even though unchanged)
1204
1220
1205
1221
# Internal packages are versioned but NOT published:
1206
1222
@pie-lib/render-ui: 1.5.0 # Internal only (bundled into elements)
1207
1223
@pie-lib/math-rendering: 1.5.0 # Internal only (bundled into elements)
1208
1224
```
1209
1225
1226
+
**Current Reality**: All packages are at `0.1.0` and private (not published).
1227
+
1210
1228
This ensures all packages are always compatible and tested together. External consumers only interact with `@pie-element/*` packages, which bundle all necessary dependencies.
React elements use the upstream **`@pie-lib/editable-html-tip-tap`** package for authoring interfaces. This package includes:
242
222
243
-
const renderer =createKatexRenderer();
244
-
awaitrenderer(element);
245
-
```
223
+
-**Custom TipTap math extension** with MathQuill integration
224
+
-**Interactive math editing** (not just static rendering)
225
+
-**MathQuill** for authoring/editing (visual WYSIWYG math editor)
226
+
-**MathJax** for final output rendering
227
+
228
+
This is already synced from upstream and works correctly with React elements.
229
+
230
+
### Svelte Elements (Future)
231
+
232
+
When Svelte-based PIE elements are created, the math editing approach will be determined at that time. Options include:
233
+
- Porting the custom TipTap math extension to Svelte
234
+
- Using the React component via interop
235
+
- Creating a Svelte-native math editing solution
246
236
247
-
**Use when:**
248
-
- Preview/authoring interfaces (internal tools)
249
-
- Bundle size is critical
250
-
- Content is LaTeX-only (no MathML)
251
-
- Basic accessibility is sufficient
237
+
### Demo Applications
252
238
253
-
**Limitations:**
254
-
- MathML via conversion (may lose fidelity)
255
-
- No Speech Rule Engine
256
-
- Limited screen reader support
239
+
The demo app's RichTextEditor is primarily for displaying/editing JSON source code and doesn't require math support. Math rendering in the demo happens via the element player using MathJax.
0 commit comments