atom.io 0.4.0 → 0.4.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.
- package/dist/index.d.ts +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/react-devtools/dist/index.js +12 -9
- package/react-devtools/dist/index.js.map +1 -1
- package/react-devtools/dist/index.mjs +9 -6
- package/react-devtools/dist/index.mjs.map +1 -1
- package/src/react-devtools/TokenList.tsx +13 -5
- package/src/transaction.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atom.io",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Reactive state graph for React, Preact, and vanilla",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"@testing-library/react": "14.0.0",
|
|
65
65
|
"@types/mock-fs": "4.13.1",
|
|
66
66
|
"mock-fs": "5.2.0",
|
|
67
|
-
"preact": "10.15.
|
|
67
|
+
"preact": "10.15.1",
|
|
68
68
|
"react": "18.2.0",
|
|
69
69
|
"react-dom": "18.2.0",
|
|
70
|
-
"react-router-dom": "6.
|
|
70
|
+
"react-router-dom": "6.12.0",
|
|
71
71
|
"tsup": "6.7.0",
|
|
72
72
|
"vite-tsconfig-paths": "4.2.0",
|
|
73
|
-
"vitest": "0.
|
|
73
|
+
"vitest": "0.32.0"
|
|
74
74
|
},
|
|
75
75
|
"repository": {
|
|
76
76
|
"type": "git",
|
|
@@ -66,12 +66,13 @@ module.exports = __toCommonJS(react_devtools_exports);
|
|
|
66
66
|
|
|
67
67
|
// ../src/react-devtools/AtomIODevtools.tsx
|
|
68
68
|
var import_react7 = require("react");
|
|
69
|
-
var
|
|
69
|
+
var import_atom2 = require("atom.io");
|
|
70
70
|
var import_react8 = require("atom.io/react");
|
|
71
71
|
var import_framer_motion = require("framer-motion");
|
|
72
72
|
|
|
73
73
|
// ../src/react-devtools/TokenList.tsx
|
|
74
74
|
var import_react6 = require("react");
|
|
75
|
+
var import_atom = require("atom.io");
|
|
75
76
|
|
|
76
77
|
// ../../anvl/src/object/index.ts
|
|
77
78
|
var import_function4 = require("fp-ts/function");
|
|
@@ -1456,15 +1457,17 @@ var StoreEditor = ({ storeHooks, token }) => {
|
|
|
1456
1457
|
var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
|
|
1457
1458
|
var TokenList = ({ storeHooks, tokenIndex }) => {
|
|
1458
1459
|
const tokenIds = storeHooks.useO(tokenIndex);
|
|
1459
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: Object.entries(tokenIds).map(([key, token]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.Fragment, { children: key.startsWith(`\u{1F441}\u200D\u{1F5E8}_`) ? null : /* @__PURE__ */ (0, import_jsx_runtime13.
|
|
1460
|
-
key,
|
|
1461
|
-
|
|
1462
|
-
|
|
1460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: Object.entries(tokenIds).map(([key, token]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.Fragment, { children: key.startsWith(`\u{1F441}\u200D\u{1F5E8}_`) ? null : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "node", children: `type` in token ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1461
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { onClick: () => console.log(token, (0, import_atom.getState)(token)), children: key }),
|
|
1462
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StoreEditor, { storeHooks, token })
|
|
1463
|
+
] }) : recordToEntries(token.familyMembers).map(([key2, token2]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1464
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { children: key2 }),
|
|
1465
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "node", children: [
|
|
1463
1466
|
key2,
|
|
1464
1467
|
":",
|
|
1465
1468
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StoreEditor, { storeHooks, token: token2 })
|
|
1466
|
-
] }, key2)
|
|
1467
|
-
] }) }, key)) });
|
|
1469
|
+
] }, key2)
|
|
1470
|
+
] })) }) }, key)) });
|
|
1468
1471
|
};
|
|
1469
1472
|
|
|
1470
1473
|
// ../src/web-effects/storage.ts
|
|
@@ -1484,8 +1487,8 @@ var lazyLocalStorageEffect = persistAtom(localStorage)(JSON);
|
|
|
1484
1487
|
|
|
1485
1488
|
// ../src/react-devtools/AtomIODevtools.tsx
|
|
1486
1489
|
var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
|
|
1487
|
-
var { atomTokenIndexState, selectorTokenIndexState } =
|
|
1488
|
-
var devtoolsAreOpenState = (0,
|
|
1490
|
+
var { atomTokenIndexState, selectorTokenIndexState } = import_atom2.__INTERNAL__.META.attachMetaState();
|
|
1491
|
+
var devtoolsAreOpenState = (0, import_atom2.atom)({
|
|
1489
1492
|
key: `\u{1F441}\u200D\u{1F5E8}_devtools_are_open`,
|
|
1490
1493
|
default: true,
|
|
1491
1494
|
effects: [lazyLocalStorageEffect(`\u{1F441}\u200D\u{1F5E8}_devtools_are_open`)]
|