@tilia/react 1.1.1 → 1.1.2-canary.20241227T173254
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 +1 -0
- package/dist/index.cjs.js +37 -1
- package/dist/index.cjs.js.map +2 -2
- package/dist/index.esm.js +17 -1
- package/dist/index.esm.js.map +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -103,6 +103,7 @@ Please check the documentation for [@tilia/core](../core/README.md) for technica
|
|
|
103
103
|
|
|
104
104
|
### Changelog (for @tilia/core)
|
|
105
105
|
|
|
106
|
+
- 2024-12-27 **1.2.4** Add support for ready after clear.
|
|
106
107
|
- 2024-12-24 **1.2.3** Rewrite tracking to fix notify and clear before ready.
|
|
107
108
|
- 2024-12-18 **1.2.2** Fix readonly tracking: should not proxy.
|
|
108
109
|
- 2024-12-18 **1.2.1** Fix bug to not track prototype methods.
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,38 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/index.js
|
|
20
|
+
var src_exports = {};
|
|
21
|
+
__export(src_exports, {
|
|
22
|
+
observe: () => import_core.observe,
|
|
23
|
+
tilia: () => import_core.tilia,
|
|
24
|
+
useTilia: () => useTilia
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_core = require("@tilia/core");
|
|
29
|
+
function useTilia(p) {
|
|
30
|
+
const [, setCount] = (0, import_react.useState)(0);
|
|
31
|
+
const o = (0, import_core._connect)(p, () => setCount((i) => i + 1));
|
|
32
|
+
(0, import_react.useEffect)(function() {
|
|
33
|
+
(0, import_core._ready)(o);
|
|
34
|
+
return () => (0, import_core._clear)(o);
|
|
35
|
+
});
|
|
36
|
+
return p;
|
|
37
|
+
}
|
|
2
38
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.js"],
|
|
4
4
|
"sourcesContent": ["import { useState, useEffect } from \"react\";\nimport { _connect, _ready, _clear, tilia, observe } from \"@tilia/core\";\n\nexport function useTilia(p) {\n const [, setCount] = useState(0);\n const o = _connect(p, () => setCount((i) => i + 1));\n useEffect(function () {\n _ready(o);\n return () => _clear(o);\n });\n return p;\n}\n\nexport { tilia, observe };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AACpC,kBAAyD;AAElD,SAAS,SAAS,GAAG;AAC1B,QAAM,CAAC,EAAE,QAAQ,QAAI,uBAAS,CAAC;AAC/B,QAAM,QAAI,sBAAS,GAAG,MAAM,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;AAClD,8BAAU,WAAY;AACpB,4BAAO,CAAC;AACR,WAAO,UAAM,oBAAO,CAAC;AAAA,EACvB,CAAC;AACD,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
// src/index.js
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { _connect, _ready, _clear, tilia, observe } from "@tilia/core";
|
|
4
|
+
function useTilia(p) {
|
|
5
|
+
const [, setCount] = useState(0);
|
|
6
|
+
const o = _connect(p, () => setCount((i) => i + 1));
|
|
7
|
+
useEffect(function() {
|
|
8
|
+
_ready(o);
|
|
9
|
+
return () => _clear(o);
|
|
10
|
+
});
|
|
11
|
+
return p;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
observe,
|
|
15
|
+
tilia,
|
|
16
|
+
useTilia
|
|
17
|
+
};
|
|
2
18
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.js"],
|
|
4
4
|
"sourcesContent": ["import { useState, useEffect } from \"react\";\nimport { _connect, _ready, _clear, tilia, observe } from \"@tilia/core\";\n\nexport function useTilia(p) {\n const [, setCount] = useState(0);\n const o = _connect(p, () => setCount((i) => i + 1));\n useEffect(function () {\n _ready(o);\n return () => _clear(o);\n });\n return p;\n}\n\nexport { tilia, observe };\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,SAAS,UAAU,iBAAiB;AACpC,SAAS,UAAU,QAAQ,QAAQ,OAAO,eAAe;AAElD,SAAS,SAAS,GAAG;AAC1B,QAAM,CAAC,EAAE,QAAQ,IAAI,SAAS,CAAC;AAC/B,QAAM,IAAI,SAAS,GAAG,MAAM,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;AAClD,YAAU,WAAY;AACpB,WAAO,CAAC;AACR,WAAO,MAAM,OAAO,CAAC;AAAA,EACvB,CAAC;AACD,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tilia/react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2-canary.20241227T173254",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
5
|
"module": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
"react": "*"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@tilia/core": "
|
|
27
|
+
"@tilia/core": "1.2.4-canary.20241227T173254"
|
|
28
28
|
}
|
|
29
29
|
}
|