@cplieger/reactive 1.2.1 → 1.2.3

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
@@ -92,7 +92,7 @@ isComputed(doubled); // true
92
92
 
93
93
  `createStore` and `SignalMap` are thin facades over the one signal engine — there is no second reactivity implementation. `createStore` lazily backs each key with a signal; `SignalMap` is a registry of signals keyed by a runtime string id.
94
94
 
95
- - `createStore<M>(): Store<M>` — typed, fixed-key reactive store with `get`, `set`, `subscribe`, `effect`, `computed`, and `batch`. `subscribe` notifies on change only (not immediately on subscribe). A `computed` key whose fn reads its own output throws `Error("Cycle detected")` rather than looping.
95
+ - `createStore<M>(): Store<M>` — typed, fixed-key reactive store with `get`, `set`, `subscribe`, `effect`, `computed`, and `batch`. `subscribe` notifies on change only (not immediately on subscribe). A `computed` key whose fn reads its own output does not loop unbounded: a self-read that keeps yielding new values trips the engine's batch-iteration guard and surfaces `Error("Cycle detected")` through the effect error handler (effects isolate errors, so it is not rethrown to the caller), while a stable self-read settles via `Object.is` dedup.
96
96
  - `SignalMap<V>` — dynamic per-id signal registry: `get(id)`, `ensure(id, initial)`, `clear(id)`, `clearAll()`. For reactive state whose key set isn't known at the type level (per-message streaming text, per-row state, …); complements `createStore`'s fixed key set.
97
97
 
98
98
  ### Collections
@@ -131,7 +131,7 @@ The following features are intentionally NOT implemented:
131
131
 
132
132
  | Feature | Reason |
133
133
  | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
134
- | **Effect ownership tree / `createRoot`** | Consumers manage disposal explicitly. Adding ownership adds ~150 LOC of complexity and changes the mental model. |
134
+ | **Effect ownership tree / `createRoot`** | Consumers manage disposal explicitly. Adding ownership changes the mental model. |
135
135
  | **Nested effect auto-disposal** | Each effect is independent and returns its own dispose function. Compose with arrays or helper functions. |
136
136
  | **Lazy activation / `onMount` lifecycle** | Signals are always active. Resource management is the consumer's responsibility. |
137
137
  | **`Signal.subtle.Watcher` / notify-on-dirty** | This library IS the framework layer. The Watcher pattern is for frameworks that sit on top of a signals primitive. |
@@ -142,6 +142,12 @@ The following features are intentionally NOT implemented:
142
142
  | **Transactions** | Framework-level concern. Not a signals primitive. |
143
143
  | **Custom scheduler / `setScheduler()`** | Batch is synchronous. No scheduler needed. |
144
144
 
145
+ ## Disclaimer
146
+
147
+ This project is built with care and follows security best practices, but it is intended for personal / self-hosted use. No guarantees of fitness for production environments. Use at your own risk.
148
+
149
+ This project was built with AI-assisted tooling using [Claude Opus](https://www.anthropic.com/claude) and [Kiro](https://kiro.dev). The human maintainer defines architecture, supervises implementation, and makes all final decisions.
150
+
145
151
  ## License
146
152
 
147
153
  GPL-3.0 — see [LICENSE](LICENSE).
package/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplieger/reactive",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "exports": {
5
5
  ".": "./src/index.ts"
6
6
  },
package/package.json CHANGED
@@ -1,26 +1,27 @@
1
1
  {
2
2
  "name": "@cplieger/reactive",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
7
7
  ".": "./src/index.ts"
8
8
  },
9
9
  "scripts": {
10
- "typecheck": "tsgo -p tsconfig.json",
11
- "typecheck:tests": "tsgo -p tsconfig.tests.json",
10
+ "typecheck": "tsc -p tsconfig.json",
11
+ "typecheck:tests": "tsc -p tsconfig.tests.json",
12
12
  "test": "vitest --run"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@eslint/js": "10.0.1",
16
- "@vitest/coverage-v8": "4.1.9",
17
- "eslint": "10.5.0",
16
+ "@typescript/native": "npm:typescript@7.0.2",
17
+ "@vitest/coverage-v8": "4.1.10",
18
+ "eslint": "10.6.0",
18
19
  "fast-check": "4.8.0",
19
20
  "happy-dom": "20.10.6",
20
- "prettier": "3.8.4",
21
- "typescript": "6.0.3",
22
- "typescript-eslint": "8.62.0",
23
- "vitest": "4.1.9"
21
+ "prettier": "3.9.4",
22
+ "typescript": "npm:@typescript/typescript6@6.0.2",
23
+ "typescript-eslint": "8.63.0",
24
+ "vitest": "4.1.10"
24
25
  },
25
26
  "description": "Signals + DOM-reconciliation reactive core for TypeScript (zero dependencies)",
26
27
  "license": "GPL-3.0-or-later",
package/src/el.ts CHANGED
@@ -8,12 +8,7 @@ import { trackHandler } from "./reconcile-tree.js";
8
8
  /** A value for an element attribute/property/handler. Functions are treated as
9
9
  * event handlers when the key starts with `on`. */
10
10
  export type AttrValue =
11
- | string
12
- | number
13
- | boolean
14
- | null
15
- | undefined
16
- | ((...args: never[]) => unknown);
11
+ string | number | boolean | null | undefined | ((...args: never[]) => unknown);
17
12
 
18
13
  // Keys set as DOM *properties* (not attributes) because the attribute form
19
14
  // either doesn't reflect (value/checked) or is awkward (boolean presence).