@ktjs/mui 0.34.1 → 0.35.0

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 +19 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -17,10 +17,12 @@
17
17
 
18
18
  ## Recent Updates
19
19
 
20
- 1. `ref.value` remains the standard read API, and it can also replace the whole outer value with `ref.value = nextValue`.
21
- 2. `ref.draft` is the deep-mutation entry for literally any objects. Just use `someRef.draft.a = someValue`, and kt.js will add it to microqueue and redraw it on the next tick. Works for `Map`, `Set`, `Array`, `Date` and your custom objects.
20
+ 1. 0.35.x - `reactive.get('a','b')` is a shortcut for `reactive.map((v) => v.a.b)`. By default it has 5 levels of type annotations and it's convienient for common use cases.
21
+ 2. 0.34.x - `ref.notify()` no-longer has an optional argument.
22
+ 3. 0.33.x - `ref.value` remains the standard read API, and it can also replace the whole outer value with `ref.value = nextValue`.
23
+ 4. 0.33.x - `ref.draft` is the deep-mutation entry for literally any objects. Just use `someRef.draft.a = someValue`, and kt.js will add it to microqueue and redraw it on the next tick. Works for `Map`, `Set`, `Array`, `Date` and your custom objects.
22
24
  1. `ref.draft` itself is **not assignable**.
23
- 3. `addOnChange((newValue, oldValue) => ...)` keeps `oldValue` as the previous reference, not a deep snapshot.
25
+ 5. `addOnChange((newValue, oldValue) => ...)` keeps `oldValue` as the previous reference, not a deep snapshot.
24
26
 
25
27
  ## Community
26
28
 
@@ -41,3 +43,17 @@ cd my-app
41
43
  pnpm install
42
44
  pnpm dev
43
45
  ```
46
+
47
+ ## Security model
48
+
49
+ kt.js intentionally trusts application code and keeps DOM operations explicit.
50
+
51
+ - Text children are inserted as text nodes by default.
52
+ - `k-html` is a raw HTML escape hatch that writes to `innerHTML` without sanitization.
53
+ - Prefer `on:*` event bindings. Do not pass raw `onclick` / `onerror` style strings.
54
+ - Attributes such as `href`, `src`, `srcdoc`, `action`, and SVG URL attributes are forwarded as-is.
55
+ - If you bind untrusted input, sanitization and validation must be handled by your application.
56
+
57
+ ## License
58
+
59
+ MIT License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/mui",
3
- "version": "0.34.1",
3
+ "version": "0.35.0",
4
4
  "description": "Material-UI inspired components for kt.js - pre-styled UI components",
5
5
  "description_zh": "面向 kt.js 的类 Material-UI 预设组件库。",
6
6
  "type": "module",