@mintjamsinc/ichigojs 0.1.72 → 0.1.73
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/dist/ichigo.cjs +43 -9
- package/dist/ichigo.cjs.map +1 -1
- package/dist/ichigo.esm.js +43 -9
- package/dist/ichigo.esm.js.map +1 -1
- package/dist/ichigo.esm.min.js +1 -1
- package/dist/ichigo.min.cjs +1 -1
- package/dist/ichigo.umd.js +43 -9
- package/dist/ichigo.umd.js.map +1 -1
- package/dist/ichigo.umd.min.js +1 -1
- package/dist/types/ichigo/util/ReactiveProxy.d.ts +27 -0
- package/package.json +1 -1
|
@@ -50,6 +50,33 @@ export declare class ReactiveProxy {
|
|
|
50
50
|
* This allows mapping variable names to their actual source paths for dependency tracking.
|
|
51
51
|
*/
|
|
52
52
|
private static pathAliases;
|
|
53
|
+
/**
|
|
54
|
+
* The `Object.prototype.toString` tags of the *only* value types we deeply
|
|
55
|
+
* proxy. Everything else is returned untouched (raw).
|
|
56
|
+
*
|
|
57
|
+
* Rationale: a Proxy can only safely intercept plain data containers. Built-in
|
|
58
|
+
* and host objects — `Date`, `RegExp`, `File`, `Blob`, `FileList`, `Promise`,
|
|
59
|
+
* `WeakMap`/`WeakSet`, typed arrays, DOM nodes, etc. — carry private internal
|
|
60
|
+
* slots, and invoking their native methods with a Proxy as the `this`/receiver
|
|
61
|
+
* throws "Illegal invocation". They must therefore never be wrapped. This is an
|
|
62
|
+
* allow-list rather than a deny-list so that *every* such exotic type is
|
|
63
|
+
* excluded by default, not just the handful we happened to enumerate.
|
|
64
|
+
*
|
|
65
|
+
* Plain user-defined class instances report `[object Object]` (unless they set
|
|
66
|
+
* `Symbol.toStringTag`) and so remain reactive, preserving prior behaviour.
|
|
67
|
+
* `Map`/`Set` stay reactive because the proxy specially wraps their mutation
|
|
68
|
+
* methods (see the `get` trap); `WeakMap`/`WeakSet` are intentionally excluded
|
|
69
|
+
* since they cannot be wrapped that way and would break the same as `File`.
|
|
70
|
+
*
|
|
71
|
+
* Callers that want a plain object kept non-reactive can still opt out
|
|
72
|
+
* explicitly via {@link markRaw}.
|
|
73
|
+
*/
|
|
74
|
+
private static readonly REACTIVE_TYPE_TAGS;
|
|
75
|
+
/**
|
|
76
|
+
* Whether the given non-null object value is one we deeply proxy.
|
|
77
|
+
* See {@link REACTIVE_TYPE_TAGS} for the reasoning.
|
|
78
|
+
*/
|
|
79
|
+
private static isReactivable;
|
|
53
80
|
/**
|
|
54
81
|
* Creates a reactive proxy for the given object.
|
|
55
82
|
* The proxy will call the onChange callback whenever a property is modified.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintjamsinc/ichigojs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
4
|
"description": "ichigo.js - Simple and intuitive reactive framework. Lightweight, fast, and user-friendly virtual DOM library",
|
|
5
5
|
"main": "./dist/ichigo.cjs",
|
|
6
6
|
"module": "./dist/ichigo.esm.js",
|