@flowview/runtime 0.2.0 → 0.2.1

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 (2) hide show
  1. package/README.md +28 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @flowview/runtime
2
+
3
+ The runtime contains the small HTML escaping and value helpers used by
4
+ FlowView-generated render functions. It does not parse templates, compile code,
5
+ or provide a sanitizer.
6
+
7
+ ```ts
8
+ import {
9
+ renderValue,
10
+ renderAttributeValue,
11
+ renderRawValue,
12
+ } from "@flowview/runtime";
13
+
14
+ renderValue("<script>"); // &lt;script&gt;
15
+ renderRawValue("<b>trusted</b>"); // <b>trusted</b>
16
+ ```
17
+
18
+ FlowView templates are trusted source. Ordinary interpolation (`{{ value }}`)
19
+ escapes HTML by default. Raw interpolation (`{{{ value }}}`) is explicit and
20
+ must receive an already trusted or sanitized string. Passing untrusted markup
21
+ to it can cause cross-site scripting. `@flowview/runtime` is not a sanitizer.
22
+
23
+ Mixed static text plus interpolation in one attribute value is unsupported by
24
+ the compiler. The optional `track` expression is accepted but has no rendering
25
+ effect; the compiler reports warning `FV0015`.
26
+
27
+ See the root [FlowView guide](../../README.md) and
28
+ [security model](../../SECURITY.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowview/runtime",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Tiny runtime for flowview-generated render functions.",
5
5
  "license": "MIT",
6
6
  "type": "module",