@maxhealth.tech/prefab 0.1.2 → 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/CHANGELOG.md CHANGED
@@ -1,51 +1,51 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## [0.1.0] — 2026-04-20
6
-
7
- Initial release.
8
-
9
- ### Component Library
10
- - Core classes: `Component`, `ContainerComponent`, `StatefulComponent`
11
- - `PrefabApp` wrapper with `$prefab` v0.2 wire format and `toHTML()` self-contained page export
12
- - `rx()` reactive expression builder (pipes, comparisons, ternary, built-in vars)
13
- - 80+ components across layout, typography, card, data, form, chart, control, interactive, media, alert
14
- - Table components: `Table`, `TableHead`, `TableBody`, `TableFooter`, `TableRow`, `TableHeader`, `TableCell`, `TableCaption`, `ExpandableRow`
15
- - Form extensions: `Radio`, `RadioGroup`, `Combobox`, `ComboboxOption`, `Calendar`, `DatePicker`, `Field`, `ChoiceCard`, and more
16
- - Chart extensions: `RadialChart`, `Histogram` (in addition to Bar, Line, Area, Pie, Radar, Scatter, Sparkline)
17
- - Composition: `Define`, `Use`, `Slot` for template reuse
18
- - Client actions: `SetState`, `ToggleState`, `AppendState`, `PopState`, `ShowToast`, `CloseOverlay`, `OpenLink`, `SetInterval`, `Fetch`, `OpenFilePicker`, `CallHandler`
19
- - MCP actions: `CallTool`, `SendMessage`, `UpdateContext`, `RequestDisplayMode`
20
-
21
- ### MCP Display Helpers
22
- - `display()`, `display_form()`, `display_update()`, `display_error()`
23
-
24
- ### Auto-Renderers
25
- - `autoDetail`, `autoTable`, `autoChart`, `autoForm`, `autoComparison`, `autoMetrics`, `autoTimeline`, `autoProgress`
26
-
27
- ### Browser Renderer
28
- - Vanilla DOM renderer — 55+ components, zero framework dependencies
29
- - Reactive `Store` with get/set/merge/toggle/append
30
- - Rx expression engine: ternary, logical, arithmetic, 15+ pipes, dot access, scoped variables
31
- - Action dispatcher — 15 action types
32
- - MCP transport — HTTP POST to `/mcp/tools/call`
33
- - Theme engine — CSS custom properties from `theme` field (light/dark)
34
- - Chart renderer — built-in SVG for Bar, Line, Area, Pie
35
- - Mermaid integration — delegates to global `mermaid` if available
36
- - IIFE bundle: `renderer.min.js` (54KB) for `<script>` tag usage, `window.prefab` global
37
-
38
- ### ext-apps Bridge
39
- - `app()` one-call factory with PostMessage transport, host theme mapping, lifecycle hooks
40
- - Capability negotiation, display mode requests, tool input/result/cancelled/partial events
41
- - Auto-detect environment: iframe → PostMessage, standalone → HTTP transport
42
-
43
- ### Validation & Accessibility
44
- - `validateWireFormat()` + `isValidWireFormat()` with detailed error reporting
45
- - Stylesheet injection — renderer applies `stylesheets` field as `<style>` tags
46
- - ARIA roles/attributes and keyboard navigation on all interactive components
47
-
48
- ### Infra
49
- - GitHub Actions CI (test + build on push) and publish (npm on tag)
50
- - 253 tests passing across 11 files (570 assertions)
51
- - MIT license
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.1.0] — 2026-04-20
6
+
7
+ Initial release.
8
+
9
+ ### Component Library
10
+ - Core classes: `Component`, `ContainerComponent`, `StatefulComponent`
11
+ - `PrefabApp` wrapper with `$prefab` v0.2 wire format and `toHTML()` self-contained page export
12
+ - `rx()` reactive expression builder (pipes, comparisons, ternary, built-in vars)
13
+ - 80+ components across layout, typography, card, data, form, chart, control, interactive, media, alert
14
+ - Table components: `Table`, `TableHead`, `TableBody`, `TableFooter`, `TableRow`, `TableHeader`, `TableCell`, `TableCaption`, `ExpandableRow`
15
+ - Form extensions: `Radio`, `RadioGroup`, `Combobox`, `ComboboxOption`, `Calendar`, `DatePicker`, `Field`, `ChoiceCard`, and more
16
+ - Chart extensions: `RadialChart`, `Histogram` (in addition to Bar, Line, Area, Pie, Radar, Scatter, Sparkline)
17
+ - Composition: `Define`, `Use`, `Slot` for template reuse
18
+ - Client actions: `SetState`, `ToggleState`, `AppendState`, `PopState`, `ShowToast`, `CloseOverlay`, `OpenLink`, `SetInterval`, `Fetch`, `OpenFilePicker`, `CallHandler`
19
+ - MCP actions: `CallTool`, `SendMessage`, `UpdateContext`, `RequestDisplayMode`
20
+
21
+ ### MCP Display Helpers
22
+ - `display()`, `display_form()`, `display_update()`, `display_error()`
23
+
24
+ ### Auto-Renderers
25
+ - `autoDetail`, `autoTable`, `autoChart`, `autoForm`, `autoComparison`, `autoMetrics`, `autoTimeline`, `autoProgress`
26
+
27
+ ### Browser Renderer
28
+ - Vanilla DOM renderer — 55+ components, zero framework dependencies
29
+ - Reactive `Store` with get/set/merge/toggle/append
30
+ - Rx expression engine: ternary, logical, arithmetic, 15+ pipes, dot access, scoped variables
31
+ - Action dispatcher — 15 action types
32
+ - MCP transport — HTTP POST to `/mcp/tools/call`
33
+ - Theme engine — CSS custom properties from `theme` field (light/dark)
34
+ - Chart renderer — built-in SVG for Bar, Line, Area, Pie
35
+ - Mermaid integration — delegates to global `mermaid` if available
36
+ - IIFE bundle: `renderer.min.js` (54KB) for `<script>` tag usage, `window.prefab` global
37
+
38
+ ### ext-apps Bridge
39
+ - `app()` one-call factory with PostMessage transport, host theme mapping, lifecycle hooks
40
+ - Capability negotiation, display mode requests, tool input/result/cancelled/partial events
41
+ - Auto-detect environment: iframe → PostMessage, standalone → HTTP transport
42
+
43
+ ### Validation & Accessibility
44
+ - `validateWireFormat()` + `isValidWireFormat()` with detailed error reporting
45
+ - Stylesheet injection — renderer applies `stylesheets` field as `<style>` tags
46
+ - ARIA roles/attributes and keyboard navigation on all interactive components
47
+
48
+ ### Infra
49
+ - GitHub Actions CI (test + build on push) and publish (npm on tag)
50
+ - 253 tests passing across 11 files (570 assertions)
51
+ - MIT license
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Max Health Inc
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Max Health Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.