atom.io 0.36.3 → 0.37.0
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/data/index.d.ts.map +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/eslint-plugin/index.js +1 -2
- package/dist/eslint-plugin/index.js.map +1 -1
- package/dist/internal/index.d.ts +66 -98
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +543 -504
- package/dist/internal/index.js.map +1 -1
- package/dist/introspection/index.d.ts +2 -2
- package/dist/introspection/index.d.ts.map +1 -1
- package/dist/introspection/index.js +1 -1
- package/dist/introspection/index.js.map +1 -1
- package/dist/json/index.d.ts +2 -1
- package/dist/json/index.d.ts.map +1 -1
- package/dist/json/index.js.map +1 -1
- package/dist/main/index.d.ts +154 -139
- package/dist/main/index.d.ts.map +1 -1
- package/dist/main/index.js.map +1 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react-devtools/index.d.ts.map +1 -1
- package/dist/react-devtools/index.js +54 -56
- package/dist/react-devtools/index.js.map +1 -1
- package/dist/realtime/index.d.ts.map +1 -1
- package/dist/realtime/index.js.map +1 -1
- package/dist/realtime-client/index.d.ts +3 -3
- package/dist/realtime-client/index.d.ts.map +1 -1
- package/dist/realtime-client/index.js +6 -6
- package/dist/realtime-client/index.js.map +1 -1
- package/dist/realtime-react/index.d.ts.map +1 -1
- package/dist/realtime-react/index.js.map +1 -1
- package/dist/realtime-server/index.d.ts +5 -5
- package/dist/realtime-server/index.d.ts.map +1 -1
- package/dist/realtime-server/index.js +10 -12
- package/dist/realtime-server/index.js.map +1 -1
- package/dist/realtime-testing/index.d.ts.map +1 -1
- package/dist/realtime-testing/index.js.map +1 -1
- package/dist/transceivers/set-rtx/index.d.ts +1 -1
- package/dist/transceivers/set-rtx/index.d.ts.map +1 -1
- package/dist/transceivers/set-rtx/index.js +1 -3
- package/dist/transceivers/set-rtx/index.js.map +1 -1
- package/dist/use-o-DXPncKmZ.js.map +1 -1
- package/dist/web/index.d.ts +2 -2
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js.map +1 -1
- package/package.json +5 -5
- package/src/internal/atom/dispose-atom.ts +5 -4
- package/src/internal/caching.ts +1 -1
- package/src/internal/families/create-readonly-held-selector-family.ts +3 -5
- package/src/internal/families/create-readonly-pure-selector-family.ts +3 -5
- package/src/internal/families/create-regular-atom-family.ts +3 -6
- package/src/internal/families/create-writable-held-selector-family.ts +3 -5
- package/src/internal/families/create-writable-pure-selector-family.ts +3 -5
- package/src/internal/families/find-in-store.ts +17 -34
- package/src/internal/families/init-family-member.ts +5 -87
- package/src/internal/families/mint-in-store.ts +74 -0
- package/src/internal/get-state/read-or-compute-value.ts +4 -2
- package/src/internal/index.ts +19 -18
- package/src/internal/ingest-updates/ingest-atom-update.ts +7 -7
- package/src/internal/ingest-updates/ingest-creation-disposal.ts +11 -11
- package/src/internal/ingest-updates/ingest-selector-update.ts +8 -4
- package/src/internal/ingest-updates/ingest-transaction-update.ts +5 -6
- package/src/internal/install-into-store.ts +2 -2
- package/src/internal/join/join-internal.ts +1 -1
- package/src/internal/molecule.ts +12 -9
- package/src/internal/mutable/create-mutable-atom-family.ts +3 -6
- package/src/internal/mutable/tracker.ts +2 -2
- package/src/internal/mutable/transceiver.ts +6 -4
- package/src/internal/operation.ts +17 -14
- package/src/internal/selector/create-readonly-held-selector.ts +9 -7
- package/src/internal/selector/create-readonly-pure-selector.ts +8 -5
- package/src/internal/selector/create-writable-held-selector.ts +12 -21
- package/src/internal/selector/create-writable-pure-selector.ts +15 -28
- package/src/internal/selector/dispose-selector.ts +6 -1
- package/src/internal/selector/get-selector-dependency-keys.ts +2 -6
- package/src/internal/selector/register-selector.ts +64 -74
- package/src/internal/selector/trace-selector-atoms.ts +2 -2
- package/src/internal/selector/update-selector-atoms.ts +2 -2
- package/src/internal/set-state/dispatch-state-update.ts +101 -0
- package/src/internal/set-state/operate-on-store.ts +126 -0
- package/src/internal/set-state/reset-atom-or-selector.ts +24 -15
- package/src/internal/set-state/set-atom-or-selector.ts +9 -4
- package/src/internal/set-state/set-atom.ts +4 -49
- package/src/internal/set-state/set-into-store.ts +11 -77
- package/src/internal/set-state/set-selector.ts +35 -0
- package/src/internal/store/store.ts +4 -4
- package/src/internal/subscribe/subscribe-in-store.ts +3 -3
- package/src/internal/subscribe/subscribe-to-timeline.ts +2 -2
- package/src/internal/timeline/create-timeline.ts +57 -101
- package/src/internal/timeline/time-travel.ts +1 -1
- package/src/internal/transaction/abort-transaction.ts +1 -1
- package/src/internal/transaction/apply-transaction.ts +7 -7
- package/src/internal/transaction/build-transaction.ts +10 -9
- package/src/internal/transaction/create-transaction.ts +4 -3
- package/src/internal/transaction/index.ts +6 -2
- package/src/introspection/attach-introspection-states.ts +2 -2
- package/src/introspection/attach-transaction-logs.ts +13 -6
- package/src/json/index.ts +3 -1
- package/src/main/atom.ts +2 -1
- package/src/main/events.ts +109 -0
- package/src/main/get-state.ts +1 -1
- package/src/main/index.ts +3 -0
- package/src/main/subscribe.ts +9 -19
- package/src/main/timeline.ts +3 -21
- package/src/main/transaction.ts +0 -65
- package/src/main/validators.ts +8 -2
- package/src/react-devtools/TimelineIndex.tsx +1 -1
- package/src/react-devtools/TransactionIndex.tsx +5 -3
- package/src/react-devtools/Updates.tsx +54 -46
- package/src/realtime-client/continuity/register-and-attempt-confirmed-update.ts +20 -10
- package/src/realtime-client/realtime-client-stores/client-sync-store.ts +4 -4
- package/src/realtime-client/sync-continuity.ts +1 -1
- package/src/realtime-server/continuity/prepare-to-serve-transaction-request.ts +14 -8
- package/src/realtime-server/continuity/prepare-to-track-client-acknowledgement.ts +5 -2
- package/src/realtime-server/continuity/subscribe-to-continuity-actions.ts +1 -1
- package/src/realtime-server/realtime-action-receiver.ts +6 -3
- package/src/realtime-server/realtime-server-stores/server-sync-store.ts +13 -16
- package/src/transceivers/set-rtx/set-rtx.ts +1 -3
- package/src/web/persist-sync.ts +2 -2
- package/src/internal/set-state/emit-update.ts +0 -40
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useI, useO } from "../use-o-DXPncKmZ.js";
|
|
1
|
+
import { useI as useI$1, useO as useO$1 } from "../use-o-DXPncKmZ.js";
|
|
2
2
|
import { actUponStore, arbitrary, become, createRegularAtom, createRegularAtomFamily, createTransaction, disposeFromStore, findInStore, getFromStore } from "atom.io/internal";
|
|
3
3
|
import { JSON_DEFAULTS, fromEntries, isJson, stringifyJson, toEntries } from "atom.io/json";
|
|
4
4
|
import { redo, undo } from "atom.io";
|
|
5
5
|
import { Component, Fragment, createContext, forwardRef, useContext, useId, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { StoreContext, useI
|
|
7
|
+
import { StoreContext, useI, useO } from "atom.io/react";
|
|
8
8
|
import { LayoutGroup, motion } from "motion/react";
|
|
9
9
|
import { attachIntrospectionStates, discoverType, isPlainObject, jsonRefinery, prettyJson, primitiveRefinery } from "atom.io/introspection";
|
|
10
10
|
import { persistSync } from "atom.io/web";
|
|
@@ -819,8 +819,8 @@ const makePropertySorter = (data, set, sortFn) => () => {
|
|
|
819
819
|
//#region src/react-devtools/json-editor/editors-by-type/array-editor.tsx
|
|
820
820
|
const ArrayElement = ({ path, isReadonly, isHidden, data, set, remove, recast, Components, testid, viewIsOpenAtom }) => {
|
|
821
821
|
const index = path[path.length - 1];
|
|
822
|
-
const viewIsOpen = useO
|
|
823
|
-
const setViewIsOpen = useI
|
|
822
|
+
const viewIsOpen = useO(viewIsOpenAtom);
|
|
823
|
+
const setViewIsOpen = useI(viewIsOpenAtom);
|
|
824
824
|
return /* @__PURE__ */ jsx(JsonEditor_INTERNAL, {
|
|
825
825
|
path,
|
|
826
826
|
name: `${index}`,
|
|
@@ -879,8 +879,8 @@ const ArrayEditor = ({ path = [], isReadonly = () => false, isHidden = () => fal
|
|
|
879
879
|
//#region src/react-devtools/json-editor/editors-by-type/object-editor.tsx
|
|
880
880
|
const ObjectProperty = ({ path, isReadonly, isHidden, data, set, rename, remove, recast, Components, testid, viewIsOpenAtom }) => {
|
|
881
881
|
const key = path[path.length - 1];
|
|
882
|
-
const viewIsOpen = useO(viewIsOpenAtom);
|
|
883
|
-
const setViewIsOpen = useI(viewIsOpenAtom);
|
|
882
|
+
const viewIsOpen = useO$1(viewIsOpenAtom);
|
|
883
|
+
const setViewIsOpen = useI$1(viewIsOpenAtom);
|
|
884
884
|
return /* @__PURE__ */ jsx(JsonEditor_INTERNAL, {
|
|
885
885
|
path,
|
|
886
886
|
name: `${key}`,
|
|
@@ -1016,8 +1016,8 @@ const JsonEditor = ({ data, set, name, rename, remove, path = [], isReadonly = (
|
|
|
1016
1016
|
//#endregion
|
|
1017
1017
|
//#region src/react-devtools/StateEditor.tsx
|
|
1018
1018
|
const StateEditor = ({ token }) => {
|
|
1019
|
-
const set = useI
|
|
1020
|
-
const data = useO
|
|
1019
|
+
const set = useI(token);
|
|
1020
|
+
const data = useO(token);
|
|
1021
1021
|
const metaPath = token.family ? [token.family.key, token.family.subKey] : [token.key];
|
|
1022
1022
|
return /* @__PURE__ */ jsx(JsonEditor, {
|
|
1023
1023
|
testid: `${token.key}-state-editor`,
|
|
@@ -1027,7 +1027,7 @@ const StateEditor = ({ token }) => {
|
|
|
1027
1027
|
});
|
|
1028
1028
|
};
|
|
1029
1029
|
const ReadonlySelectorViewer = ({ token }) => {
|
|
1030
|
-
const data = useO
|
|
1030
|
+
const data = useO(token);
|
|
1031
1031
|
const metaPath = token.family ? [token.family.key, token.family.subKey] : [token.key];
|
|
1032
1032
|
return /* @__PURE__ */ jsx(JsonEditor, {
|
|
1033
1033
|
testid: `${token.key}-state-editor`,
|
|
@@ -1052,10 +1052,10 @@ const StoreEditor = ({ token }) => {
|
|
|
1052
1052
|
//#region src/react-devtools/StateIndex.tsx
|
|
1053
1053
|
const StateIndexLeafNode = ({ node, isOpenState, typeState, dispose }) => {
|
|
1054
1054
|
const { openCloseAllTX, store } = useContext(DevtoolsContext);
|
|
1055
|
-
const setIsOpen = useI
|
|
1056
|
-
const isOpen = useO
|
|
1057
|
-
const state = useO
|
|
1058
|
-
const stateTypeLoadable = useO
|
|
1055
|
+
const setIsOpen = useI(isOpenState);
|
|
1056
|
+
const isOpen = useO(isOpenState);
|
|
1057
|
+
const state = useO(node);
|
|
1058
|
+
const stateTypeLoadable = useO(typeState);
|
|
1059
1059
|
const stateType = stateTypeLoadable instanceof Promise ? `Promise` : stateTypeLoadable;
|
|
1060
1060
|
const isPrimitive = Boolean(primitiveRefinery.refine(state));
|
|
1061
1061
|
const path = node.family ? [node.family.key, node.family.subKey] : [node.key];
|
|
@@ -1099,8 +1099,8 @@ const StateIndexLeafNode = ({ node, isOpenState, typeState, dispose }) => {
|
|
|
1099
1099
|
}) : null] })] }), isOpen && !isPrimitive ? /* @__PURE__ */ jsx("main", { children: /* @__PURE__ */ jsx(StoreEditor, { token: node }) }) : null] });
|
|
1100
1100
|
};
|
|
1101
1101
|
const StateIndexTreeNode = ({ node, isOpenState }) => {
|
|
1102
|
-
const setIsOpen = useI
|
|
1103
|
-
const isOpen = useO
|
|
1102
|
+
const setIsOpen = useI(isOpenState);
|
|
1103
|
+
const isOpen = useO(isOpenState);
|
|
1104
1104
|
const { typeSelectors, viewIsOpenAtoms, openCloseAllTX, store } = useContext(DevtoolsContext);
|
|
1105
1105
|
for (const [key, childNode] of node.familyMembers) {
|
|
1106
1106
|
findInStore(store, viewIsOpenAtoms, [key]);
|
|
@@ -1146,7 +1146,7 @@ const StateIndexNode = ({ node, isOpenState, typeState, dispose }) => {
|
|
|
1146
1146
|
});
|
|
1147
1147
|
};
|
|
1148
1148
|
const StateIndex = ({ tokenIndex }) => {
|
|
1149
|
-
const tokenIds = useO
|
|
1149
|
+
const tokenIds = useO(tokenIndex);
|
|
1150
1150
|
const { typeSelectors, viewIsOpenAtoms, store } = useContext(DevtoolsContext);
|
|
1151
1151
|
const statesName = tokenIndex.key.includes(`Atom`) ? `atoms` : `selectors`;
|
|
1152
1152
|
return /* @__PURE__ */ jsx("article", {
|
|
@@ -1182,17 +1182,17 @@ const AtomUpdateFC = ({ atomUpdate }) => {
|
|
|
1182
1182
|
},
|
|
1183
1183
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
1184
1184
|
className: "detail",
|
|
1185
|
-
children: [atomUpdate.key, ": "]
|
|
1185
|
+
children: [atomUpdate.token.key, ": "]
|
|
1186
1186
|
}), /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx("span", {
|
|
1187
1187
|
className: "summary",
|
|
1188
|
-
children: prettyJson.diff(atomUpdate.oldValue, atomUpdate.newValue).summary
|
|
1188
|
+
children: prettyJson.diff(atomUpdate.update.oldValue, atomUpdate.update.newValue).summary
|
|
1189
1189
|
}) })]
|
|
1190
|
-
}, atomUpdate.key);
|
|
1190
|
+
}, atomUpdate.token.key);
|
|
1191
1191
|
};
|
|
1192
1192
|
const TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
|
|
1193
1193
|
return /* @__PURE__ */ jsxs("article", {
|
|
1194
1194
|
className: "node transaction_update",
|
|
1195
|
-
"data-testid": `transaction-update-${transactionUpdate.key}-${serialNumber}`,
|
|
1195
|
+
"data-testid": `transaction-update-${transactionUpdate.token.key}-${serialNumber}`,
|
|
1196
1196
|
children: [/* @__PURE__ */ jsx("header", { children: /* @__PURE__ */ jsx("h4", { children: serialNumber }) }), /* @__PURE__ */ jsxs("main", { children: [
|
|
1197
1197
|
/* @__PURE__ */ jsxs("section", {
|
|
1198
1198
|
className: "transaction_params",
|
|
@@ -1240,17 +1240,16 @@ const TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
|
|
|
1240
1240
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1241
1241
|
className: "detail",
|
|
1242
1242
|
children: "impact: "
|
|
1243
|
-
}), transactionUpdate.
|
|
1243
|
+
}), transactionUpdate.subEvents.filter((txSubEvent) => txSubEvent.type !== `molecule_creation` && txSubEvent.type !== `molecule_disposal` && txSubEvent.type !== `molecule_transfer` && txSubEvent.type !== `state_creation` && txSubEvent.type !== `state_disposal` && !txSubEvent.token.key.startsWith(`👁🗨`)).map((update, index) => {
|
|
1244
1244
|
switch (update.type) {
|
|
1245
|
-
case `atom_update`:
|
|
1246
|
-
case `selector_update`: return /* @__PURE__ */ jsx(article.AtomUpdate, {
|
|
1245
|
+
case `atom_update`: return /* @__PURE__ */ jsx(article.AtomUpdate, {
|
|
1247
1246
|
serialNumber: index,
|
|
1248
1247
|
atomUpdate: update
|
|
1249
|
-
}, `${transactionUpdate.key}:${index}:${update.key}`);
|
|
1250
|
-
case `
|
|
1248
|
+
}, `${transactionUpdate.token.key}:${index}:${update.token.key}`);
|
|
1249
|
+
case `transaction_outcome`: return /* @__PURE__ */ jsx(TransactionUpdateFC, {
|
|
1251
1250
|
serialNumber: index,
|
|
1252
1251
|
transactionUpdate: update
|
|
1253
|
-
}, `${transactionUpdate.key}:${index}:${update.key}`);
|
|
1252
|
+
}, `${transactionUpdate.token.key}:${index}:${update.token.key}`);
|
|
1254
1253
|
case `molecule_creation`:
|
|
1255
1254
|
case `molecule_disposal`:
|
|
1256
1255
|
case `molecule_transfer`:
|
|
@@ -1263,38 +1262,37 @@ const TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
|
|
|
1263
1262
|
});
|
|
1264
1263
|
};
|
|
1265
1264
|
const TimelineUpdateFC = ({ timelineUpdate, serialNumber }) => {
|
|
1266
|
-
return `
|
|
1265
|
+
return timelineUpdate.type === `atom_update` || timelineUpdate.type === `selector_update` || timelineUpdate.type === `transaction_outcome` ? /* @__PURE__ */ jsxs("article", {
|
|
1267
1266
|
className: "node timeline_update",
|
|
1268
|
-
"data-testid": `timeline-update-${typeof timelineUpdate.key === `string` ? timelineUpdate.key : stringifyJson(timelineUpdate.key)}-${serialNumber}`,
|
|
1267
|
+
"data-testid": `timeline-update-${typeof timelineUpdate.token.key === `string` ? timelineUpdate.token.key : stringifyJson(timelineUpdate.token.key)}-${serialNumber}`,
|
|
1269
1268
|
children: [/* @__PURE__ */ jsx("header", { children: /* @__PURE__ */ jsxs("h4", { children: [
|
|
1270
1269
|
timelineUpdate.timestamp,
|
|
1271
1270
|
": ",
|
|
1272
1271
|
timelineUpdate.type,
|
|
1273
1272
|
" (",
|
|
1274
|
-
timelineUpdate.key,
|
|
1273
|
+
timelineUpdate.token.key,
|
|
1275
1274
|
")"
|
|
1276
|
-
] }) }), /* @__PURE__ */ jsx("main", { children: timelineUpdate.type === `
|
|
1277
|
-
switch (
|
|
1278
|
-
case `atom_update`:
|
|
1279
|
-
case `selector_update`: return /* @__PURE__ */ jsx(article.AtomUpdate, {
|
|
1275
|
+
] }) }), /* @__PURE__ */ jsx("main", { children: timelineUpdate.type === `transaction_outcome` ? timelineUpdate.subEvents.filter((subEvent) => subEvent.type !== `molecule_creation` && subEvent.type !== `molecule_disposal` && subEvent.type !== `molecule_transfer` && subEvent.type !== `state_creation` && subEvent.type !== `state_disposal` && !subEvent.token.key.startsWith(`👁🗨`)).map((subEvent, index) => {
|
|
1276
|
+
switch (subEvent.type) {
|
|
1277
|
+
case `atom_update`: return /* @__PURE__ */ jsx(article.AtomUpdate, {
|
|
1280
1278
|
serialNumber: index,
|
|
1281
|
-
atomUpdate:
|
|
1282
|
-
}, `${timelineUpdate.key}:${index}:${
|
|
1283
|
-
case `
|
|
1279
|
+
atomUpdate: subEvent
|
|
1280
|
+
}, `${timelineUpdate.token.key}:${index}:${subEvent.token.key}`);
|
|
1281
|
+
case `transaction_outcome`: return /* @__PURE__ */ jsx(TransactionUpdateFC, {
|
|
1284
1282
|
serialNumber: index,
|
|
1285
|
-
transactionUpdate:
|
|
1286
|
-
}, `${timelineUpdate.key}:${index}:${
|
|
1283
|
+
transactionUpdate: subEvent
|
|
1284
|
+
}, `${timelineUpdate.token.key}:${index}:${subEvent.token.key}`);
|
|
1287
1285
|
case `molecule_creation`:
|
|
1288
1286
|
case `molecule_disposal`:
|
|
1289
1287
|
case `molecule_transfer`:
|
|
1290
1288
|
case `state_creation`:
|
|
1291
1289
|
case `state_disposal`: return null;
|
|
1292
1290
|
}
|
|
1293
|
-
}) : timelineUpdate.type === `selector_update` ? timelineUpdate.atomUpdates.filter((
|
|
1291
|
+
}) : timelineUpdate.type === `selector_update` ? timelineUpdate.atomUpdates.filter((atomUpdateEvent) => !atomUpdateEvent.token.key.startsWith(`👁🗨`)).map((atomUpdate, index) => {
|
|
1294
1292
|
return /* @__PURE__ */ jsx(article.AtomUpdate, {
|
|
1295
1293
|
serialNumber: index,
|
|
1296
1294
|
atomUpdate
|
|
1297
|
-
}, `${timelineUpdate.key}:${index}:${atomUpdate.key}`);
|
|
1295
|
+
}, `${timelineUpdate.token.key}:${index}:${atomUpdate.token.key}`);
|
|
1298
1296
|
}) : timelineUpdate.type === `atom_update` ? /* @__PURE__ */ jsx(article.AtomUpdate, {
|
|
1299
1297
|
serialNumber: timelineUpdate.timestamp,
|
|
1300
1298
|
atomUpdate: timelineUpdate
|
|
@@ -1316,9 +1314,9 @@ const YouAreHere = () => {
|
|
|
1316
1314
|
});
|
|
1317
1315
|
};
|
|
1318
1316
|
const TimelineLog = ({ token, isOpenState, timelineState }) => {
|
|
1319
|
-
const timeline = useO
|
|
1320
|
-
const isOpen = useO
|
|
1321
|
-
const setIsOpen = useI
|
|
1317
|
+
const timeline = useO(timelineState);
|
|
1318
|
+
const isOpen = useO(isOpenState);
|
|
1319
|
+
const setIsOpen = useI(isOpenState);
|
|
1322
1320
|
return /* @__PURE__ */ jsxs("section", {
|
|
1323
1321
|
className: "node timeline_log",
|
|
1324
1322
|
"data-testid": `timeline-${token.key}`,
|
|
@@ -1361,12 +1359,12 @@ const TimelineLog = ({ token, isOpenState, timelineState }) => {
|
|
|
1361
1359
|
serialNumber: index
|
|
1362
1360
|
}),
|
|
1363
1361
|
index === timeline.history.length - 1 && timeline.at === timeline.history.length ? /* @__PURE__ */ jsx(YouAreHere, {}) : null
|
|
1364
|
-
] }, update.key + index + timeline.at) : null) }) : null]
|
|
1362
|
+
] }, update.token.key + index + timeline.at) : null) }) : null]
|
|
1365
1363
|
});
|
|
1366
1364
|
};
|
|
1367
1365
|
const TimelineIndex = () => {
|
|
1368
1366
|
const { timelineIndex, timelineSelectors, viewIsOpenAtoms, store } = useContext(DevtoolsContext);
|
|
1369
|
-
const tokenIds = useO
|
|
1367
|
+
const tokenIds = useO(timelineIndex);
|
|
1370
1368
|
return /* @__PURE__ */ jsx("article", {
|
|
1371
1369
|
className: "index timeline_index",
|
|
1372
1370
|
"data-testid": "timeline-index",
|
|
@@ -1386,9 +1384,9 @@ const TimelineIndex = () => {
|
|
|
1386
1384
|
//#endregion
|
|
1387
1385
|
//#region src/react-devtools/TransactionIndex.tsx
|
|
1388
1386
|
const TransactionLog = ({ token, isOpenState, logState }) => {
|
|
1389
|
-
const log = useO
|
|
1390
|
-
const isOpen = useO
|
|
1391
|
-
const setIsOpen = useI
|
|
1387
|
+
const log = useO(logState);
|
|
1388
|
+
const isOpen = useO(isOpenState);
|
|
1389
|
+
const setIsOpen = useI(isOpenState);
|
|
1392
1390
|
return /* @__PURE__ */ jsxs("section", {
|
|
1393
1391
|
className: "node transaction_log",
|
|
1394
1392
|
"data-testid": `transaction-${token.key}`,
|
|
@@ -1406,12 +1404,12 @@ const TransactionLog = ({ token, isOpenState, logState }) => {
|
|
|
1406
1404
|
})] }), isOpen ? /* @__PURE__ */ jsx("main", { children: log.map((update, index) => /* @__PURE__ */ jsx(article.TransactionUpdate, {
|
|
1407
1405
|
serialNumber: index,
|
|
1408
1406
|
transactionUpdate: update
|
|
1409
|
-
}, update.key + index)) }) : null]
|
|
1407
|
+
}, update.token.key + index)) }) : null]
|
|
1410
1408
|
});
|
|
1411
1409
|
};
|
|
1412
1410
|
const TransactionIndex = () => {
|
|
1413
1411
|
const { transactionIndex, transactionLogSelectors, viewIsOpenAtoms, store } = useContext(DevtoolsContext);
|
|
1414
|
-
const tokenIds = useO
|
|
1412
|
+
const tokenIds = useO(transactionIndex);
|
|
1415
1413
|
return /* @__PURE__ */ jsx("article", {
|
|
1416
1414
|
className: "index transaction_index",
|
|
1417
1415
|
"data-testid": "transaction-index",
|
|
@@ -1440,12 +1438,12 @@ const AtomIODevtools = ({ hideByDefault = false }) => {
|
|
|
1440
1438
|
const AtomIODevtoolsInternal = () => {
|
|
1441
1439
|
const constraintsRef = useRef(null);
|
|
1442
1440
|
const { atomIndex, selectorIndex, devtoolsAreHiddenAtom, devtoolsAreOpenAtom, devtoolsViewSelectionAtom, devtoolsViewOptionsAtom } = useContext(DevtoolsContext);
|
|
1443
|
-
const devtoolsAreHidden = useO
|
|
1444
|
-
const setDevtoolsAreOpen = useI
|
|
1445
|
-
const devtoolsAreOpen = useO
|
|
1446
|
-
const setDevtoolsView = useI
|
|
1447
|
-
const devtoolsView = useO
|
|
1448
|
-
const devtoolsViewOptions = useO
|
|
1441
|
+
const devtoolsAreHidden = useO(devtoolsAreHiddenAtom);
|
|
1442
|
+
const setDevtoolsAreOpen = useI(devtoolsAreOpenAtom);
|
|
1443
|
+
const devtoolsAreOpen = useO(devtoolsAreOpenAtom);
|
|
1444
|
+
const setDevtoolsView = useI(devtoolsViewSelectionAtom);
|
|
1445
|
+
const devtoolsView = useO(devtoolsViewSelectionAtom);
|
|
1446
|
+
const devtoolsViewOptions = useO(devtoolsViewOptionsAtom);
|
|
1449
1447
|
const mouseHasMoved = useRef(false);
|
|
1450
1448
|
return /* @__PURE__ */ jsxs("span", {
|
|
1451
1449
|
style: {
|