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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom.io",
3
- "version": "0.4.0",
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.0",
67
+ "preact": "10.15.1",
68
68
  "react": "18.2.0",
69
69
  "react-dom": "18.2.0",
70
- "react-router-dom": "6.11.2",
70
+ "react-router-dom": "6.12.0",
71
71
  "tsup": "6.7.0",
72
72
  "vite-tsconfig-paths": "4.2.0",
73
- "vitest": "0.31.1"
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 import_atom = require("atom.io");
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.jsxs)("div", { className: "node", children: [
1460
- key,
1461
- ":",
1462
- `type` in token ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StoreEditor, { storeHooks, token }) : recordToEntries(token.familyMembers).map(([key2, token2]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "node", children: [
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 } = import_atom.__INTERNAL__.META.attachMetaState();
1488
- var devtoolsAreOpenState = (0, import_atom.atom)({
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`)]