@getforma/core 0.8.1 → 0.8.2

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 CHANGED
@@ -162,14 +162,39 @@ mount(() => <Counter />, '#app');
162
162
 
163
163
  ## CDN Usage
164
164
 
165
- Both long and short filenames are provided. They are identical files use whichever you prefer:
166
-
167
- | Build | URL |
168
- |-------|-----|
169
- | **Standard** (recommended) | `unpkg.com/@getforma/core/dist/formajs-runtime.global.js` |
170
- | Standard (short alias) | `unpkg.com/@getforma/core/dist/forma-runtime.js` |
171
- | **CSP-safe** (no `new Function`) | `unpkg.com/@getforma/core/dist/formajs-runtime-hardened.global.js` |
172
- | CSP-safe (short alias) | `unpkg.com/@getforma/core/dist/forma-runtime-csp.js` |
165
+ ### Script tag (IIFEauto-initializes)
166
+
167
+ ```html
168
+ <!-- unpkg -->
169
+ <script src="https://unpkg.com/@getforma/core@0.8.1/dist/formajs-runtime.global.js"></script>
170
+
171
+ <!-- jsDelivr (faster globally) -->
172
+ <script src="https://cdn.jsdelivr.net/npm/@getforma/core@0.8.1/dist/formajs-runtime.global.js"></script>
173
+ ```
174
+
175
+ ### ESM import (no bundler, modern browsers)
176
+
177
+ ```html
178
+ <script type="module">
179
+ import { createSignal, h, mount } from 'https://cdn.jsdelivr.net/npm/@getforma/core@0.8.1/dist/index.js';
180
+
181
+ const [count, setCount] = createSignal(0);
182
+ mount(() => h('button', { onClick: () => setCount(count() + 1) }, () => `${count()}`), '#app');
183
+ </script>
184
+ ```
185
+
186
+ ### All CDN builds
187
+
188
+ | Build | Filename |
189
+ |-------|----------|
190
+ | **Standard** (recommended) | `formajs-runtime.global.js` |
191
+ | **CSP-safe** (no `new Function`) | `formajs-runtime-hardened.global.js` |
192
+ | Standard (short alias) | `forma-runtime.js` |
193
+ | CSP-safe (short alias) | `forma-runtime-csp.js` |
194
+
195
+ Available from both `unpkg.com/@getforma/core@VERSION/dist/` and `cdn.jsdelivr.net/npm/@getforma/core@VERSION/dist/`.
196
+
197
+ For production, always pin the version (e.g., `@0.8.1`). Unversioned URLs resolve to latest.
173
198
 
174
199
  > The CSP build uses a hand-written expression parser and never calls `new Function`.
175
200
  > It supports most common patterns. See [examples/csp](./examples/csp) for a working demo.