atom.io 0.11.0 → 0.12.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.
Files changed (174) hide show
  1. package/data/dist/index.cjs +614 -0
  2. package/data/dist/index.cjs.map +1 -0
  3. package/data/dist/index.d.cts +158 -0
  4. package/data/dist/index.d.ts +118 -1
  5. package/data/dist/index.js +551 -30
  6. package/data/dist/index.js.map +1 -1
  7. package/data/dist/metafile-cjs.json +1 -0
  8. package/data/dist/metafile-esm.json +1 -0
  9. package/data/package.json +4 -3
  10. package/data/src/index.ts +1 -0
  11. package/data/src/join.ts +450 -0
  12. package/data/src/struct-family.ts +34 -24
  13. package/data/src/struct.ts +6 -8
  14. package/dist/index.cjs +257 -0
  15. package/dist/index.cjs.map +1 -0
  16. package/dist/{index.d.mts → index.d.cts} +10 -11
  17. package/dist/index.d.ts +10 -11
  18. package/dist/index.js +63 -104
  19. package/dist/index.js.map +1 -1
  20. package/dist/metafile-cjs.json +1 -0
  21. package/dist/metafile-esm.json +1 -0
  22. package/internal/dist/{index.mjs → index.cjs} +716 -495
  23. package/internal/dist/index.cjs.map +1 -0
  24. package/internal/dist/{index.d.mts → index.d.cts} +124 -105
  25. package/internal/dist/index.d.ts +124 -105
  26. package/internal/dist/index.js +651 -555
  27. package/internal/dist/index.js.map +1 -1
  28. package/internal/dist/metafile-cjs.json +1 -0
  29. package/internal/dist/metafile-esm.json +1 -0
  30. package/internal/package.json +4 -3
  31. package/internal/src/atom/create-atom.ts +29 -16
  32. package/internal/src/atom/delete-atom.ts +25 -6
  33. package/internal/src/atom/is-default.ts +4 -17
  34. package/internal/src/caching.ts +28 -23
  35. package/internal/src/families/create-atom-family.ts +3 -2
  36. package/internal/src/families/create-readonly-selector-family.ts +1 -1
  37. package/internal/src/families/create-selector-family.ts +4 -4
  38. package/internal/src/index.ts +4 -2
  39. package/internal/src/lazy-map.ts +33 -0
  40. package/internal/src/mutable/create-mutable-atom-family.ts +2 -2
  41. package/internal/src/mutable/create-mutable-atom.ts +1 -2
  42. package/internal/src/mutable/get-json-family.ts +22 -0
  43. package/internal/src/mutable/get-json-token.ts +1 -0
  44. package/internal/src/mutable/index.ts +1 -0
  45. package/internal/src/mutable/tracker-family.ts +1 -2
  46. package/internal/src/mutable/tracker.ts +8 -6
  47. package/internal/src/mutable/transceiver.ts +2 -0
  48. package/internal/src/not-found-error.ts +27 -0
  49. package/internal/src/operation.ts +2 -3
  50. package/internal/src/{get-state-internal.ts → read-or-compute-value.ts} +13 -6
  51. package/internal/src/selector/create-selector.ts +6 -7
  52. package/internal/src/selector/delete-selector.ts +37 -0
  53. package/internal/src/selector/index.ts +2 -1
  54. package/internal/src/selector/register-selector.ts +7 -7
  55. package/internal/src/set-state/copy-mutable-in-transaction.ts +3 -2
  56. package/internal/src/set-state/emit-update.ts +1 -3
  57. package/internal/src/set-state/evict-downstream.ts +6 -8
  58. package/internal/src/set-state/index.ts +1 -1
  59. package/internal/src/set-state/{set-state-internal.ts → set-atom-or-selector.ts} +2 -3
  60. package/internal/src/set-state/set-atom.ts +5 -6
  61. package/internal/src/store/store.ts +1 -1
  62. package/internal/src/store/withdraw-new-family-member.ts +6 -6
  63. package/internal/src/subscribe/recall-state.ts +1 -2
  64. package/internal/src/subscribe/subscribe-to-root-atoms.ts +2 -2
  65. package/internal/src/timeline/add-atom-to-timeline.ts +5 -16
  66. package/internal/src/timeline/{timeline-internal.ts → create-timeline.ts} +4 -5
  67. package/internal/src/timeline/index.ts +2 -2
  68. package/internal/src/timeline/time-travel.ts +89 -0
  69. package/internal/src/transaction/build-transaction.ts +8 -7
  70. package/internal/src/transaction/{transaction-internal.ts → create-transaction.ts} +6 -5
  71. package/internal/src/transaction/index.ts +2 -3
  72. package/introspection/dist/{index.mjs → index.cjs} +54 -29
  73. package/introspection/dist/index.cjs.map +1 -0
  74. package/introspection/dist/{index.d.mts → index.d.cts} +2 -2
  75. package/introspection/dist/index.d.ts +2 -2
  76. package/introspection/dist/index.js +32 -49
  77. package/introspection/dist/index.js.map +1 -1
  78. package/introspection/dist/metafile-cjs.json +1 -0
  79. package/introspection/dist/metafile-esm.json +1 -0
  80. package/introspection/package.json +4 -3
  81. package/introspection/src/attach-introspection-states.ts +2 -2
  82. package/introspection/src/attach-selector-index.ts +8 -4
  83. package/json/dist/{index.mjs → index.cjs} +20 -7
  84. package/json/dist/{index.mjs.map → index.cjs.map} +1 -1
  85. package/json/dist/{index.d.mts → index.d.cts} +1 -1
  86. package/json/dist/index.d.ts +1 -1
  87. package/json/dist/index.js +6 -19
  88. package/json/dist/index.js.map +1 -1
  89. package/json/dist/metafile-cjs.json +1 -0
  90. package/json/dist/metafile-esm.json +1 -0
  91. package/json/package.json +4 -3
  92. package/package.json +48 -47
  93. package/react/dist/index.cjs +59 -0
  94. package/react/dist/index.cjs.map +1 -0
  95. package/react/dist/index.js +20 -42
  96. package/react/dist/index.js.map +1 -1
  97. package/react/dist/metafile-cjs.json +1 -0
  98. package/react/dist/metafile-esm.json +1 -0
  99. package/react/package.json +4 -3
  100. package/react/src/store-hooks.ts +8 -2
  101. package/react-devtools/dist/{index.mjs → index.cjs} +286 -240
  102. package/react-devtools/dist/index.cjs.map +1 -0
  103. package/react-devtools/dist/{index.d.mts → index.d.cts} +29 -17
  104. package/react-devtools/dist/index.d.ts +29 -17
  105. package/react-devtools/dist/index.js +251 -273
  106. package/react-devtools/dist/index.js.map +1 -1
  107. package/react-devtools/dist/metafile-cjs.json +1 -0
  108. package/react-devtools/dist/metafile-esm.json +1 -0
  109. package/react-devtools/package.json +4 -3
  110. package/react-devtools/src/StateEditor.tsx +8 -8
  111. package/realtime-client/dist/{index.mjs → index.cjs} +50 -21
  112. package/realtime-client/dist/index.js +20 -49
  113. package/realtime-client/dist/metafile-cjs.json +1 -0
  114. package/realtime-client/dist/metafile-esm.json +1 -0
  115. package/realtime-client/package.json +4 -3
  116. package/realtime-react/dist/index.cjs +99 -0
  117. package/realtime-react/dist/index.js +35 -66
  118. package/realtime-react/dist/metafile-cjs.json +1 -0
  119. package/realtime-react/dist/metafile-esm.json +1 -0
  120. package/realtime-react/package.json +4 -3
  121. package/realtime-server/dist/{index.mjs → index.cjs} +67 -40
  122. package/realtime-server/dist/index.js +39 -66
  123. package/realtime-server/dist/metafile-cjs.json +1 -0
  124. package/realtime-server/dist/metafile-esm.json +1 -0
  125. package/realtime-server/package.json +4 -3
  126. package/realtime-testing/dist/{index.mjs → index.cjs} +54 -23
  127. package/realtime-testing/dist/index.js +22 -53
  128. package/realtime-testing/dist/metafile-cjs.json +1 -0
  129. package/realtime-testing/dist/metafile-esm.json +1 -0
  130. package/realtime-testing/package.json +4 -3
  131. package/src/atom.ts +6 -8
  132. package/src/dispose.ts +18 -0
  133. package/src/get-state.ts +16 -0
  134. package/src/index.ts +3 -1
  135. package/src/logger.ts +1 -1
  136. package/src/selector.ts +3 -3
  137. package/src/set-state.ts +22 -0
  138. package/src/silo.ts +7 -8
  139. package/src/timeline.ts +6 -11
  140. package/src/transaction.ts +2 -2
  141. package/transceivers/set-rtx/dist/{index.mjs → index.cjs} +40 -36
  142. package/transceivers/set-rtx/dist/index.cjs.map +1 -0
  143. package/transceivers/set-rtx/dist/{index.d.mts → index.d.cts} +2 -1
  144. package/transceivers/set-rtx/dist/index.d.ts +2 -1
  145. package/transceivers/set-rtx/dist/index.js +37 -37
  146. package/transceivers/set-rtx/dist/index.js.map +1 -1
  147. package/transceivers/set-rtx/dist/metafile-cjs.json +1 -0
  148. package/transceivers/set-rtx/dist/metafile-esm.json +1 -0
  149. package/transceivers/set-rtx/package.json +4 -3
  150. package/transceivers/set-rtx/src/set-rtx.ts +29 -26
  151. package/data/dist/index.d.mts +0 -41
  152. package/data/dist/index.mjs +0 -82
  153. package/data/dist/index.mjs.map +0 -1
  154. package/dist/index.mjs +0 -215
  155. package/dist/index.mjs.map +0 -1
  156. package/internal/dist/index.mjs.map +0 -1
  157. package/internal/src/set-state/set-selector-state.ts +0 -8
  158. package/internal/src/timeline/time-travel-internal.ts +0 -109
  159. package/introspection/dist/index.mjs.map +0 -1
  160. package/react/dist/index.mjs +0 -29
  161. package/react/dist/index.mjs.map +0 -1
  162. package/react-devtools/dist/index.mjs.map +0 -1
  163. package/realtime-react/dist/index.mjs +0 -68
  164. package/src/get-set.ts +0 -48
  165. package/transceivers/set-rtx/dist/index.mjs.map +0 -1
  166. /package/react/dist/{index.d.mts → index.d.cts} +0 -0
  167. /package/realtime-client/dist/{index.mjs.map → index.cjs.map} +0 -0
  168. /package/realtime-client/dist/{index.d.mts → index.d.cts} +0 -0
  169. /package/realtime-react/dist/{index.mjs.map → index.cjs.map} +0 -0
  170. /package/realtime-react/dist/{index.d.mts → index.d.cts} +0 -0
  171. /package/realtime-server/dist/{index.mjs.map → index.cjs.map} +0 -0
  172. /package/realtime-server/dist/{index.d.mts → index.d.cts} +0 -0
  173. /package/realtime-testing/dist/{index.mjs.map → index.cjs.map} +0 -0
  174. /package/realtime-testing/dist/{index.d.mts → index.d.cts} +0 -0
@@ -1,11 +1,32 @@
1
- import { selectorFamily, atom, atomFamily, undo, redo, getState } from 'atom.io';
2
- import { attachIntrospectionStates } from 'atom.io/introspection';
3
- import { useI, useO } from 'atom.io/react';
4
- import { motion, spring, LayoutGroup } from 'framer-motion';
5
- import * as React from 'react';
6
- import { forwardRef, useRef, useState, useImperativeHandle, useLayoutEffect, Fragment as Fragment$1, Component, useId } from 'react';
7
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
8
- import { useFloating, useClick, useInteractions, FloatingPortal } from '@floating-ui/react';
1
+ 'use strict';
2
+
3
+ var atom_io = require('atom.io');
4
+ var introspection = require('atom.io/introspection');
5
+ var react = require('atom.io/react');
6
+ var framerMotion = require('framer-motion');
7
+ var React = require('react');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ var react$1 = require('@floating-ui/react');
10
+
11
+ function _interopNamespace(e) {
12
+ if (e && e.__esModule) return e;
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
9
30
 
10
31
  var __defProp = Object.defineProperty;
11
32
  var __defProps = Object.defineProperties;
@@ -448,7 +469,7 @@ var isJson = (input) => {
448
469
  return isJson2;
449
470
  };
450
471
  var OpenClose = ({ isOpen, setIsOpen, disabled }) => {
451
- return /* @__PURE__ */ jsx(
472
+ return /* @__PURE__ */ jsxRuntime.jsx(
452
473
  "button",
453
474
  {
454
475
  type: "button",
@@ -815,19 +836,22 @@ var Join = class _Join {
815
836
  );
816
837
  }
817
838
  };
818
- var ElasticInput = forwardRef(function ElasticInputFC(props, ref) {
839
+ var ElasticInput = React.forwardRef(function ElasticInputFC(props, ref) {
819
840
  var _a2, _b, _c, _d;
820
- const inputRef = useRef(null);
821
- const spanRef = useRef(null);
822
- const [inputWidth, setInputWidth] = useState(`auto`);
823
- useImperativeHandle(ref, () => ({
824
- focus: () => {
825
- var _a3;
826
- (_a3 = inputRef.current) == null ? void 0 : _a3.focus();
827
- }
828
- }));
841
+ const inputRef = React.useRef(null);
842
+ const spanRef = React.useRef(null);
843
+ const [inputWidth, setInputWidth] = React.useState(`auto`);
844
+ React.useImperativeHandle(
845
+ ref,
846
+ () => ({
847
+ focus: () => {
848
+ var _a3;
849
+ (_a3 = inputRef.current) == null ? void 0 : _a3.focus();
850
+ }
851
+ })
852
+ );
829
853
  const extraWidth = props.type === `number` ? 15 : 0;
830
- useLayoutEffect(() => {
854
+ React.useLayoutEffect(() => {
831
855
  if (spanRef.current) {
832
856
  setInputWidth(`${spanRef.current.offsetWidth + extraWidth}px`);
833
857
  const interval = setInterval(() => {
@@ -838,8 +862,8 @@ var ElasticInput = forwardRef(function ElasticInputFC(props, ref) {
838
862
  return () => clearInterval(interval);
839
863
  }
840
864
  }, [(_a2 = inputRef.current) == null ? void 0 : _a2.value, props.value]);
841
- return /* @__PURE__ */ jsxs("div", { style: { display: `inline-block`, position: `relative` }, children: [
842
- /* @__PURE__ */ jsx(
865
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: `inline-block`, position: `relative` }, children: [
866
+ /* @__PURE__ */ jsxRuntime.jsx(
843
867
  "input",
844
868
  __spreadProps(__spreadValues({}, props), {
845
869
  ref: inputRef,
@@ -853,7 +877,7 @@ var ElasticInput = forwardRef(function ElasticInputFC(props, ref) {
853
877
  }, props.style)
854
878
  })
855
879
  ),
856
- /* @__PURE__ */ jsx(
880
+ /* @__PURE__ */ jsxRuntime.jsx(
857
881
  "span",
858
882
  {
859
883
  ref: spanRef,
@@ -937,9 +961,9 @@ var NumberInput = ({
937
961
  testId,
938
962
  value = null
939
963
  }) => {
940
- const id = useId();
941
- const [temporaryEntry, setTemporaryEntry] = useState(null);
942
- const userHasMadeDeliberateChange = useRef(false);
964
+ const id = React.useId();
965
+ const [temporaryEntry, setTemporaryEntry] = React.useState(null);
966
+ const userHasMadeDeliberateChange = React.useRef(false);
943
967
  const refine = initRefinery({ max, min, decimalPlaces, nullable: true });
944
968
  const allowDecimal = decimalPlaces === void 0 || decimalPlaces > 0;
945
969
  const handleBlur = () => {
@@ -972,9 +996,9 @@ var NumberInput = ({
972
996
  }
973
997
  };
974
998
  const displayValue = temporaryEntry != null ? temporaryEntry : valueToText(value ? refine(value) : value);
975
- return /* @__PURE__ */ jsxs("span", { css: customCss, children: [
976
- label && /* @__PURE__ */ jsx("label", { htmlFor: id, children: label }),
977
- autoSize ? /* @__PURE__ */ jsx(
999
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { css: customCss, children: [
1000
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, children: label }),
1001
+ autoSize ? /* @__PURE__ */ jsxRuntime.jsx(
978
1002
  ElasticInput,
979
1003
  {
980
1004
  type: "text",
@@ -988,7 +1012,7 @@ var NumberInput = ({
988
1012
  onClick,
989
1013
  "data-testid": `number-input-${testId != null ? testId : id}`
990
1014
  }
991
- ) : /* @__PURE__ */ jsx(
1015
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
992
1016
  "input",
993
1017
  {
994
1018
  type: "text",
@@ -1013,9 +1037,9 @@ var TextInput = ({
1013
1037
  customCss,
1014
1038
  autoSize = false
1015
1039
  }) => {
1016
- return /* @__PURE__ */ jsxs("span", { css: customCss, children: [
1017
- /* @__PURE__ */ jsx("label", { children: label }),
1018
- autoSize ? /* @__PURE__ */ jsx(
1040
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { css: customCss, children: [
1041
+ /* @__PURE__ */ jsxRuntime.jsx("label", { children: label }),
1042
+ autoSize ? /* @__PURE__ */ jsxRuntime.jsx(
1019
1043
  ElasticInput,
1020
1044
  {
1021
1045
  type: "text",
@@ -1024,7 +1048,7 @@ var TextInput = ({
1024
1048
  disabled: set === void 0,
1025
1049
  placeholder
1026
1050
  }
1027
- ) : /* @__PURE__ */ jsx(
1051
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1028
1052
  "input",
1029
1053
  {
1030
1054
  type: "text",
@@ -1037,7 +1061,7 @@ var TextInput = ({
1037
1061
  ] });
1038
1062
  };
1039
1063
  var NonJsonEditor = ({ data }) => {
1040
- return data === void 0 ? /* @__PURE__ */ jsx(ElasticInput, { disabled: true, value: "undefined" }) : /* @__PURE__ */ jsx(
1064
+ return data === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(ElasticInput, { disabled: true, value: "undefined" }) : /* @__PURE__ */ jsxRuntime.jsx(
1041
1065
  ElasticInput,
1042
1066
  {
1043
1067
  disabled: true,
@@ -1065,17 +1089,17 @@ var JsonEditor_INTERNAL = ({
1065
1089
  const refined = dataIsJson ? refineJsonType(data) : { type: `non-json`, data };
1066
1090
  const SubEditor = dataIsJson ? SubEditors[refined.type] : NonJsonEditor;
1067
1091
  const disabled = isReadonly(path);
1068
- return isHidden(path) ? null : /* @__PURE__ */ jsx(Components.ErrorBoundary, { children: /* @__PURE__ */ jsxs(Components.EditorWrapper, { className, customCss, children: [
1069
- remove && /* @__PURE__ */ jsx(
1092
+ return isHidden(path) ? null : /* @__PURE__ */ jsxRuntime.jsx(Components.ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsxs(Components.EditorWrapper, { className, customCss, children: [
1093
+ remove && /* @__PURE__ */ jsxRuntime.jsx(
1070
1094
  Components.Button,
1071
1095
  {
1072
1096
  onClick: disabled ? doNothing : remove,
1073
1097
  disabled,
1074
- children: /* @__PURE__ */ jsx(Components.DeleteIcon, {})
1098
+ children: /* @__PURE__ */ jsxRuntime.jsx(Components.DeleteIcon, {})
1075
1099
  }
1076
1100
  ),
1077
- HeaderDisplay && /* @__PURE__ */ jsx(HeaderDisplay, { data, schema }),
1078
- rename && /* @__PURE__ */ jsx(Components.KeyWrapper, { children: /* @__PURE__ */ jsx(
1101
+ HeaderDisplay && /* @__PURE__ */ jsxRuntime.jsx(HeaderDisplay, { data, schema }),
1102
+ rename && /* @__PURE__ */ jsxRuntime.jsx(Components.KeyWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
1079
1103
  ElasticInput,
1080
1104
  {
1081
1105
  value: name,
@@ -1083,7 +1107,7 @@ var JsonEditor_INTERNAL = ({
1083
1107
  disabled
1084
1108
  }
1085
1109
  ) }),
1086
- /* @__PURE__ */ jsx(
1110
+ /* @__PURE__ */ jsxRuntime.jsx(
1087
1111
  SubEditor,
1088
1112
  {
1089
1113
  data: refined.data,
@@ -1097,13 +1121,13 @@ var JsonEditor_INTERNAL = ({
1097
1121
  Components
1098
1122
  }
1099
1123
  ),
1100
- recast && dataIsJson ? /* @__PURE__ */ jsx(
1124
+ recast && dataIsJson ? /* @__PURE__ */ jsxRuntime.jsx(
1101
1125
  "select",
1102
1126
  {
1103
1127
  onChange: disabled ? doNothing : (e) => recast(e.target.value),
1104
1128
  value: refined.type,
1105
1129
  disabled,
1106
- children: Object.keys(SubEditors).map((type) => /* @__PURE__ */ jsx("option", { value: type, children: type }, type))
1130
+ children: Object.keys(SubEditors).map((type) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: type, children: type }, type))
1107
1131
  }
1108
1132
  ) : null
1109
1133
  ] }) });
@@ -1126,9 +1150,9 @@ var ArrayEditor = ({
1126
1150
  Components
1127
1151
  }) => {
1128
1152
  const setElement = makeElementSetters(data, set);
1129
- return /* @__PURE__ */ jsx(Fragment, { children: data.map((element, index) => {
1153
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: data.map((element, index) => {
1130
1154
  const newPath = [...path, index];
1131
- return /* @__PURE__ */ jsx(
1155
+ return /* @__PURE__ */ jsxRuntime.jsx(
1132
1156
  JsonEditor_INTERNAL,
1133
1157
  {
1134
1158
  path: newPath,
@@ -1488,10 +1512,13 @@ var numberToArray = (num) => Array(num).fill(null);
1488
1512
  var arrayToString = (arr) => arr.join(`,`);
1489
1513
  var arrayToNumber = (arr) => arr.length;
1490
1514
  var arrayToBoolean = (arr) => typeof arr[0] === `boolean` ? arr[0] : arr.length > 0;
1491
- var arrayToObject = (arr) => arr.reduce((acc, cur, idx) => {
1492
- acc[`${idx}`] = cur;
1493
- return acc;
1494
- }, {});
1515
+ var arrayToObject = (arr) => arr.reduce(
1516
+ (acc, cur, idx) => {
1517
+ acc[`${idx}`] = cur;
1518
+ return acc;
1519
+ },
1520
+ {}
1521
+ );
1495
1522
  var nullToString = () => ``;
1496
1523
  var nullToNumber = () => 0;
1497
1524
  var nullToBoolean = () => false;
@@ -1633,11 +1660,11 @@ var PropertyAdder = ({
1633
1660
  disabled,
1634
1661
  propertyKey,
1635
1662
  Components
1636
- }) => /* @__PURE__ */ jsxs(Components.MissingPropertyWrapper, { children: [
1637
- /* @__PURE__ */ jsx(ElasticInput, { disabled: true, defaultValue: propertyKey }),
1663
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(Components.MissingPropertyWrapper, { children: [
1664
+ /* @__PURE__ */ jsxRuntime.jsx(ElasticInput, { disabled: true, defaultValue: propertyKey }),
1638
1665
  ` `,
1639
- /* @__PURE__ */ jsx(ElasticInput, { disabled: true, defaultValue: "is missing" }),
1640
- /* @__PURE__ */ jsx(Components.Button, { onClick: () => addProperty(), disabled, children: "+" })
1666
+ /* @__PURE__ */ jsxRuntime.jsx(ElasticInput, { disabled: true, defaultValue: "is missing" }),
1667
+ /* @__PURE__ */ jsxRuntime.jsx(Components.Button, { onClick: () => addProperty(), disabled, children: "+" })
1641
1668
  ] });
1642
1669
  var ObjectEditor = ({
1643
1670
  schema,
@@ -1650,11 +1677,14 @@ var ObjectEditor = ({
1650
1677
  }) => {
1651
1678
  var _a2;
1652
1679
  const disabled = isReadonly(path);
1653
- const stableKeyMap = useRef(
1654
- Object.keys(data).reduce((acc, key) => {
1655
- acc[key] = key;
1656
- return acc;
1657
- }, {})
1680
+ const stableKeyMap = React.useRef(
1681
+ Object.keys(data).reduce(
1682
+ (acc, key) => {
1683
+ acc[key] = key;
1684
+ return acc;
1685
+ },
1686
+ {}
1687
+ )
1658
1688
  );
1659
1689
  const setProperty = makePropertySetters(data, set);
1660
1690
  const renameProperty = makePropertyRenamers(data, set, stableKeyMap);
@@ -1673,16 +1703,16 @@ var ObjectEditor = ({
1673
1703
  [[], []]
1674
1704
  );
1675
1705
  const missingKeys = schemaKeys === true ? [] : schemaKeys.filter((key) => !dataKeys.includes(key));
1676
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1677
- /* @__PURE__ */ jsx(Components.Button, { onClick: () => sortProperties(), disabled, children: "Sort" }),
1678
- /* @__PURE__ */ jsxs(Components.ObjectWrapper, { children: [
1679
- /* @__PURE__ */ jsx("div", { className: "json_editor_properties", children: [...missingKeys, ...officialKeys, ...unofficialKeys].map((key) => {
1706
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1707
+ /* @__PURE__ */ jsxRuntime.jsx(Components.Button, { onClick: () => sortProperties(), disabled, children: "Sort" }),
1708
+ /* @__PURE__ */ jsxRuntime.jsxs(Components.ObjectWrapper, { children: [
1709
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "json_editor_properties", children: [...missingKeys, ...officialKeys, ...unofficialKeys].map((key) => {
1680
1710
  const originalKey = stableKeyMap.current[key];
1681
1711
  const newPath = [...path, key];
1682
1712
  const originalPath = [...path, originalKey];
1683
1713
  const isOfficial = schemaKeys === true || schemaKeys.includes(key);
1684
1714
  const isMissing = missingKeys.includes(key);
1685
- return isMissing ? /* @__PURE__ */ jsx(
1715
+ return isMissing ? /* @__PURE__ */ jsxRuntime.jsx(
1686
1716
  PropertyAdder,
1687
1717
  {
1688
1718
  propertyKey: key,
@@ -1691,7 +1721,7 @@ var ObjectEditor = ({
1691
1721
  Components
1692
1722
  },
1693
1723
  key + `IsMissing`
1694
- ) : /* @__PURE__ */ jsx(
1724
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1695
1725
  JsonEditor_INTERNAL,
1696
1726
  {
1697
1727
  schema,
@@ -1710,7 +1740,7 @@ var ObjectEditor = ({
1710
1740
  originalPath.join(`.`)
1711
1741
  );
1712
1742
  }) }),
1713
- /* @__PURE__ */ jsx(
1743
+ /* @__PURE__ */ jsxRuntime.jsx(
1714
1744
  Components.Button,
1715
1745
  {
1716
1746
  onClick: disabled ? doNothing : () => makePropertyAdder(`new_property`, `string`)(),
@@ -1725,7 +1755,7 @@ var BooleanEditor = ({
1725
1755
  data,
1726
1756
  set,
1727
1757
  Components
1728
- }) => /* @__PURE__ */ jsx(Components.BooleanWrapper, { children: /* @__PURE__ */ jsx(
1758
+ }) => /* @__PURE__ */ jsxRuntime.jsx(Components.BooleanWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
1729
1759
  "input",
1730
1760
  {
1731
1761
  type: "checkbox",
@@ -1735,14 +1765,14 @@ var BooleanEditor = ({
1735
1765
  ) });
1736
1766
  var NullEditor = ({
1737
1767
  Components
1738
- }) => /* @__PURE__ */ jsx(Components.NullWrapper, { children: '" "' });
1768
+ }) => /* @__PURE__ */ jsxRuntime.jsx(Components.NullWrapper, { children: '" "' });
1739
1769
  var NumberEditor = ({
1740
1770
  path = [],
1741
1771
  isReadonly = () => false,
1742
1772
  data,
1743
1773
  set,
1744
1774
  Components
1745
- }) => /* @__PURE__ */ jsx(Components.NumberWrapper, { children: /* @__PURE__ */ jsx(
1775
+ }) => /* @__PURE__ */ jsxRuntime.jsx(Components.NumberWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
1746
1776
  NumberInput,
1747
1777
  {
1748
1778
  value: data,
@@ -1757,7 +1787,7 @@ var StringEditor = ({
1757
1787
  set,
1758
1788
  Components
1759
1789
  }) => {
1760
- return /* @__PURE__ */ jsx(Components.StringWrapper, { children: /* @__PURE__ */ jsx(
1790
+ return /* @__PURE__ */ jsxRuntime.jsx(Components.StringWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
1761
1791
  TextInput,
1762
1792
  {
1763
1793
  value: data,
@@ -1770,7 +1800,7 @@ var DefaultFallback = ({ error, errorInfo }) => {
1770
1800
  var _a2, _b, _c;
1771
1801
  const component = (_a2 = errorInfo == null ? void 0 : errorInfo.componentStack) == null ? void 0 : _a2.split(` `).filter(Boolean)[2];
1772
1802
  const message = (_c = (_b = error == null ? void 0 : error.toString()) != null ? _b : errorInfo == null ? void 0 : errorInfo.componentStack) != null ? _c : `Unknown error`;
1773
- return /* @__PURE__ */ jsx(
1803
+ return /* @__PURE__ */ jsxRuntime.jsx(
1774
1804
  "div",
1775
1805
  {
1776
1806
  "data-testid": "error-boundary",
@@ -1782,7 +1812,7 @@ var DefaultFallback = ({ error, errorInfo }) => {
1782
1812
  // backgroundRepeat: `no-repeat`,
1783
1813
  backgroundSize: `overlay`
1784
1814
  },
1785
- children: /* @__PURE__ */ jsx(
1815
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1786
1816
  "div",
1787
1817
  {
1788
1818
  style: {
@@ -1791,7 +1821,7 @@ var DefaultFallback = ({ error, errorInfo }) => {
1791
1821
  padding: `50px`,
1792
1822
  border: `1px solid dashed`
1793
1823
  },
1794
- children: /* @__PURE__ */ jsxs(
1824
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1795
1825
  "span",
1796
1826
  {
1797
1827
  style: {
@@ -1802,7 +1832,7 @@ var DefaultFallback = ({ error, errorInfo }) => {
1802
1832
  },
1803
1833
  children: [
1804
1834
  `\u26A0\uFE0F `,
1805
- /* @__PURE__ */ jsx("span", { style: { color: `#fc0`, fontWeight: 700 }, children: component }),
1835
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: `#fc0`, fontWeight: 700 }, children: component }),
1806
1836
  ` \u26A0\uFE0F `,
1807
1837
  message
1808
1838
  ]
@@ -1813,7 +1843,7 @@ var DefaultFallback = ({ error, errorInfo }) => {
1813
1843
  }
1814
1844
  );
1815
1845
  };
1816
- var ErrorBoundary = class extends Component {
1846
+ var ErrorBoundary = class extends React.Component {
1817
1847
  constructor(props) {
1818
1848
  super(props);
1819
1849
  this.state = {};
@@ -1829,12 +1859,12 @@ var ErrorBoundary = class extends Component {
1829
1859
  render() {
1830
1860
  const { error, errorInfo } = this.state;
1831
1861
  const { children, Fallback = DefaultFallback } = this.props;
1832
- return errorInfo ? /* @__PURE__ */ jsx(Fallback, { error, errorInfo }) : children;
1862
+ return errorInfo ? /* @__PURE__ */ jsxRuntime.jsx(Fallback, { error, errorInfo }) : children;
1833
1863
  }
1834
1864
  };
1835
1865
  var DEFAULT_JSON_EDITOR_COMPONENTS = {
1836
- ErrorBoundary: ({ children }) => /* @__PURE__ */ jsx(ErrorBoundary, { children }),
1837
- Button: ({ onClick, children, disabled }) => /* @__PURE__ */ jsx(
1866
+ ErrorBoundary: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children }),
1867
+ Button: ({ onClick, children, disabled }) => /* @__PURE__ */ jsxRuntime.jsx(
1838
1868
  "button",
1839
1869
  {
1840
1870
  type: "button",
@@ -1844,7 +1874,7 @@ var DEFAULT_JSON_EDITOR_COMPONENTS = {
1844
1874
  children
1845
1875
  }
1846
1876
  ),
1847
- EditorWrapper: ({ children, customCss, className }) => /* @__PURE__ */ jsx("div", { className: `json_editor ` + className, css: customCss, children }),
1877
+ EditorWrapper: ({ children, customCss, className }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `json_editor ` + className, css: customCss, children }),
1848
1878
  EditorLayout: ({
1849
1879
  DeleteButton,
1850
1880
  Header,
@@ -1853,27 +1883,27 @@ var DEFAULT_JSON_EDITOR_COMPONENTS = {
1853
1883
  ValueEditor,
1854
1884
  Wrapper
1855
1885
  }) => {
1856
- return /* @__PURE__ */ jsxs(Wrapper, { children: [
1857
- DeleteButton && /* @__PURE__ */ jsx(DeleteButton, {}),
1858
- Header && /* @__PURE__ */ jsx(Header, {}),
1859
- KeyInput && /* @__PURE__ */ jsx(KeyInput, {}),
1860
- TypeSelect && /* @__PURE__ */ jsx(TypeSelect, {}),
1861
- /* @__PURE__ */ jsx(ValueEditor, {})
1886
+ return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper, { children: [
1887
+ DeleteButton && /* @__PURE__ */ jsxRuntime.jsx(DeleteButton, {}),
1888
+ Header && /* @__PURE__ */ jsxRuntime.jsx(Header, {}),
1889
+ KeyInput && /* @__PURE__ */ jsxRuntime.jsx(KeyInput, {}),
1890
+ TypeSelect && /* @__PURE__ */ jsxRuntime.jsx(TypeSelect, {}),
1891
+ /* @__PURE__ */ jsxRuntime.jsx(ValueEditor, {})
1862
1892
  ] });
1863
1893
  },
1864
- ArrayWrapper: ({ children }) => /* @__PURE__ */ jsx("div", { className: "json_editor_array", children }),
1865
- ObjectWrapper: ({ children }) => /* @__PURE__ */ jsx("div", { className: "json_editor_object", children }),
1866
- StringWrapper: ({ children }) => /* @__PURE__ */ jsx("span", { className: "json_editor_string", children }),
1867
- NumberWrapper: ({ children }) => /* @__PURE__ */ jsx("span", { className: "json_editor_number", children }),
1868
- BooleanWrapper: ({ children }) => /* @__PURE__ */ jsx("span", { className: "json_editor_boolean", children }),
1869
- NullWrapper: ({ children }) => /* @__PURE__ */ jsx("span", { className: "json_editor_null", children }),
1870
- MissingPropertyWrapper: ({ children }) => /* @__PURE__ */ jsx("div", { className: "json_editor_property json_editor_missing", children }),
1871
- MiscastPropertyWrapper: ({ children }) => /* @__PURE__ */ jsx("div", { className: "json_editor_property json_editor_miscast", children }),
1872
- IllegalPropertyWrapper: ({ children }) => /* @__PURE__ */ jsx("span", { className: "json_editor_property json_editor_illegal", children }),
1873
- OfficialPropertyWrapper: ({ children }) => /* @__PURE__ */ jsx("span", { className: "json_editor_property json_editor_official", children }),
1874
- UnofficialPropertyWrapper: ({ children }) => /* @__PURE__ */ jsx("span", { className: "json_editor_property json_editor_unofficial", children }),
1875
- DeleteIcon: () => /* @__PURE__ */ jsx("span", { className: "json_editor_icon json_editor_delete", children: "x" }),
1876
- KeyWrapper: ({ children }) => /* @__PURE__ */ jsx("span", { className: "json_editor_key", children })
1894
+ ArrayWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "json_editor_array", children }),
1895
+ ObjectWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "json_editor_object", children }),
1896
+ StringWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_string", children }),
1897
+ NumberWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_number", children }),
1898
+ BooleanWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_boolean", children }),
1899
+ NullWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_null", children }),
1900
+ MissingPropertyWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "json_editor_property json_editor_missing", children }),
1901
+ MiscastPropertyWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "json_editor_property json_editor_miscast", children }),
1902
+ IllegalPropertyWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_property json_editor_illegal", children }),
1903
+ OfficialPropertyWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_property json_editor_official", children }),
1904
+ UnofficialPropertyWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_property json_editor_unofficial", children }),
1905
+ DeleteIcon: () => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_icon json_editor_delete", children: "x" }),
1906
+ KeyWrapper: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "json_editor_key", children })
1877
1907
  };
1878
1908
  var JsonEditor = ({
1879
1909
  data,
@@ -1891,7 +1921,7 @@ var JsonEditor = ({
1891
1921
  Components: CustomComponents = {}
1892
1922
  }) => {
1893
1923
  const Components = __spreadValues(__spreadValues({}, DEFAULT_JSON_EDITOR_COMPONENTS), CustomComponents);
1894
- return /* @__PURE__ */ jsx(
1924
+ return /* @__PURE__ */ jsxRuntime.jsx(
1895
1925
  JsonEditor_INTERNAL,
1896
1926
  {
1897
1927
  data,
@@ -2240,24 +2270,27 @@ var WAYFORGE_CORE_COLOR_NAMES = [
2240
2270
  `Magenta`,
2241
2271
  `Pink`
2242
2272
  ];
2243
- WAYFORGE_CORE_COLOR_NAMES.reduce((acc, name, idx) => {
2244
- acc[name] = {
2245
- hue: idx * 30,
2246
- sat: 255,
2247
- lum: 0.5,
2248
- prefer: `sat`
2249
- };
2250
- return acc;
2251
- }, {});
2273
+ WAYFORGE_CORE_COLOR_NAMES.reduce(
2274
+ (acc, name, idx) => {
2275
+ acc[name] = {
2276
+ hue: idx * 30,
2277
+ sat: 255,
2278
+ lum: 0.5,
2279
+ prefer: `sat`
2280
+ };
2281
+ return acc;
2282
+ },
2283
+ {}
2284
+ );
2252
2285
  var Id = ({ id }) => {
2253
- const [isOpen, setIsOpen] = React.useState(false);
2254
- const { refs, floatingStyles, context } = useFloating({
2286
+ const [isOpen, setIsOpen] = React__namespace.useState(false);
2287
+ const { refs, floatingStyles, context } = react$1.useFloating({
2255
2288
  open: isOpen,
2256
2289
  onOpenChange: setIsOpen,
2257
2290
  placement: `bottom-start`
2258
2291
  });
2259
- const click = useClick(context);
2260
- const { getReferenceProps, getFloatingProps } = useInteractions([click]);
2292
+ const click = react$1.useClick(context);
2293
+ const { getReferenceProps, getFloatingProps } = react$1.useInteractions([click]);
2261
2294
  const bgColor = stringToColor(id);
2262
2295
  const contrastColor = pipe(bgColor, hexToSpec_default, contrastMax, specToHex_default);
2263
2296
  const offsetColor = pipe(bgColor, hexToSpec_default, offset(0.25), specToHex_default);
@@ -2267,8 +2300,8 @@ var Id = ({ id }) => {
2267
2300
  contrastMax,
2268
2301
  specToHex_default
2269
2302
  );
2270
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2271
- /* @__PURE__ */ jsx(
2303
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2304
+ /* @__PURE__ */ jsxRuntime.jsx(
2272
2305
  "span",
2273
2306
  __spreadProps(__spreadValues({
2274
2307
  role: "content",
@@ -2285,7 +2318,7 @@ var Id = ({ id }) => {
2285
2318
  children: id.substring(0, 3)
2286
2319
  })
2287
2320
  ),
2288
- isOpen && /* @__PURE__ */ jsx(FloatingPortal, { children: /* @__PURE__ */ jsx(
2321
+ isOpen && /* @__PURE__ */ jsxRuntime.jsx(react$1.FloatingPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(
2289
2322
  "span",
2290
2323
  __spreadProps(__spreadValues({
2291
2324
  role: "popup",
@@ -2316,16 +2349,16 @@ var RelationEditor = (props) => {
2316
2349
  }
2317
2350
  return true;
2318
2351
  });
2319
- return /* @__PURE__ */ jsx("article", { className: RelationEditor_module_default.class, children: data.map(([head, tail]) => /* @__PURE__ */ jsxs("section", { children: [
2320
- /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Id, { id: head }) }),
2352
+ return /* @__PURE__ */ jsxRuntime.jsx("article", { className: RelationEditor_module_default.class, children: data.map(([head, tail]) => /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
2353
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx(Id, { id: head }) }),
2321
2354
  ":",
2322
- /* @__PURE__ */ jsx("span", { children: tail.map((child) => /* @__PURE__ */ jsx(Id, { id: child })) })
2355
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: tail.map((child) => /* @__PURE__ */ jsxRuntime.jsx(Id, { id: child })) })
2323
2356
  ] })) });
2324
2357
  };
2325
2358
  var StateEditor = ({ token }) => {
2326
- const set = useI(token);
2327
- const data = useO(token);
2328
- return isJson(data) ? /* @__PURE__ */ jsx(JsonEditor, { data, set, schema: true }) : data instanceof Join ? /* @__PURE__ */ jsx(RelationEditor, { data, set }) : /* @__PURE__ */ jsx("div", { className: "json_editor", children: /* @__PURE__ */ jsx(
2359
+ const set = react.useI(token);
2360
+ const data = react.useO(token);
2361
+ return isJson(data) ? /* @__PURE__ */ jsxRuntime.jsx(JsonEditor, { data, set, schema: true }) : data instanceof Join ? /* @__PURE__ */ jsxRuntime.jsx(RelationEditor, { data, set }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "json_editor", children: /* @__PURE__ */ jsxRuntime.jsx(
2329
2362
  ElasticInput,
2330
2363
  {
2331
2364
  value: data instanceof Set ? `Set { ${JSON.stringify([...data]).slice(1, -1)} }` : data instanceof Map ? `Map ` + JSON.stringify([...data]) : Object.getPrototypeOf(data).constructor.name + ` ` + fallback(() => JSON.stringify(data), `?`),
@@ -2334,8 +2367,8 @@ var StateEditor = ({ token }) => {
2334
2367
  ) });
2335
2368
  };
2336
2369
  var ReadonlySelectorViewer = ({ token }) => {
2337
- const data = useO(token);
2338
- return isJson(data) ? /* @__PURE__ */ jsx(
2370
+ const data = react.useO(token);
2371
+ return isJson(data) ? /* @__PURE__ */ jsxRuntime.jsx(
2339
2372
  JsonEditor,
2340
2373
  {
2341
2374
  data,
@@ -2343,7 +2376,7 @@ var ReadonlySelectorViewer = ({ token }) => {
2343
2376
  schema: true,
2344
2377
  isReadonly: () => true
2345
2378
  }
2346
- ) : /* @__PURE__ */ jsx("div", { className: "json_editor", children: /* @__PURE__ */ jsx(
2379
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "json_editor", children: /* @__PURE__ */ jsxRuntime.jsx(
2347
2380
  ElasticInput,
2348
2381
  {
2349
2382
  value: data instanceof Set ? `Set ` + JSON.stringify([...data]) : data instanceof Map ? `Map ` + JSON.stringify([...data]) : Object.getPrototypeOf(data).constructor.name + ` ` + JSON.stringify(data),
@@ -2353,11 +2386,11 @@ var ReadonlySelectorViewer = ({ token }) => {
2353
2386
  };
2354
2387
  var StoreEditor = ({ token }) => {
2355
2388
  if (token.type === `readonly_selector`) {
2356
- return /* @__PURE__ */ jsx(ReadonlySelectorViewer, { token });
2389
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadonlySelectorViewer, { token });
2357
2390
  }
2358
- return /* @__PURE__ */ jsx(StateEditor, { token });
2391
+ return /* @__PURE__ */ jsxRuntime.jsx(StateEditor, { token });
2359
2392
  };
2360
- var findStateTypeState = selectorFamily({
2393
+ var findStateTypeState = atom_io.selectorFamily({
2361
2394
  key: `\u{1F441}\u200D\u{1F5E8} State Type`,
2362
2395
  get: (token) => ({ get }) => {
2363
2396
  let state;
@@ -2375,14 +2408,14 @@ var findStateTypeState = selectorFamily({
2375
2408
  });
2376
2409
  var StateIndexLeafNode = ({ node, isOpenState, typeState }) => {
2377
2410
  var _a2, _b;
2378
- const setIsOpen = useI(isOpenState);
2379
- const isOpen = useO(isOpenState);
2380
- const state = useO(node);
2381
- const stateType = useO(typeState);
2411
+ const setIsOpen = react.useI(isOpenState);
2412
+ const isOpen = react.useO(isOpenState);
2413
+ const state = react.useO(node);
2414
+ const stateType = react.useO(typeState);
2382
2415
  const isPrimitive = Boolean(primitiveRefinery.refine(state));
2383
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2384
- /* @__PURE__ */ jsxs("header", { children: [
2385
- /* @__PURE__ */ jsx(
2416
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2417
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { children: [
2418
+ /* @__PURE__ */ jsxRuntime.jsx(
2386
2419
  button.OpenClose,
2387
2420
  {
2388
2421
  isOpen: isOpen && !isPrimitive,
@@ -2390,14 +2423,14 @@ var StateIndexLeafNode = ({ node, isOpenState, typeState }) => {
2390
2423
  disabled: isPrimitive
2391
2424
  }
2392
2425
  ),
2393
- /* @__PURE__ */ jsxs(
2426
+ /* @__PURE__ */ jsxRuntime.jsxs(
2394
2427
  "label",
2395
2428
  {
2396
- onClick: () => console.log(node, getState(node)),
2397
- onKeyUp: () => console.log(node, getState(node)),
2429
+ onClick: () => console.log(node, atom_io.getState(node)),
2430
+ onKeyUp: () => console.log(node, atom_io.getState(node)),
2398
2431
  children: [
2399
- /* @__PURE__ */ jsx("h2", { children: (_b = (_a2 = node.family) == null ? void 0 : _a2.subKey) != null ? _b : node.key }),
2400
- /* @__PURE__ */ jsxs("span", { className: "type detail", children: [
2432
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { children: (_b = (_a2 = node.family) == null ? void 0 : _a2.subKey) != null ? _b : node.key }),
2433
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "type detail", children: [
2401
2434
  "(",
2402
2435
  stateType,
2403
2436
  ")"
@@ -2405,27 +2438,27 @@ var StateIndexLeafNode = ({ node, isOpenState, typeState }) => {
2405
2438
  ]
2406
2439
  }
2407
2440
  ),
2408
- isPrimitive ? /* @__PURE__ */ jsx(StoreEditor, { token: node }) : null
2441
+ isPrimitive ? /* @__PURE__ */ jsxRuntime.jsx(StoreEditor, { token: node }) : null
2409
2442
  ] }),
2410
- isOpen && !isPrimitive ? /* @__PURE__ */ jsx("main", { children: /* @__PURE__ */ jsx(StoreEditor, { token: node }) }) : null
2443
+ isOpen && !isPrimitive ? /* @__PURE__ */ jsxRuntime.jsx("main", { children: /* @__PURE__ */ jsxRuntime.jsx(StoreEditor, { token: node }) }) : null
2411
2444
  ] });
2412
2445
  };
2413
2446
  var StateIndexTreeNode = ({ node, isOpenState }) => {
2414
- const setIsOpen = useI(isOpenState);
2415
- const isOpen = useO(isOpenState);
2447
+ const setIsOpen = react.useI(isOpenState);
2448
+ const isOpen = react.useO(isOpenState);
2416
2449
  for (const [key, childNode] of recordToEntries(node.familyMembers)) {
2417
2450
  findViewIsOpenState(key);
2418
2451
  findStateTypeState(childNode);
2419
2452
  }
2420
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2421
- /* @__PURE__ */ jsxs("header", { children: [
2422
- /* @__PURE__ */ jsx(button.OpenClose, { isOpen, setIsOpen }),
2423
- /* @__PURE__ */ jsxs("label", { children: [
2424
- /* @__PURE__ */ jsx("h2", { children: node.key }),
2425
- /* @__PURE__ */ jsx("span", { className: "type detail", children: " (family)" })
2453
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2454
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { children: [
2455
+ /* @__PURE__ */ jsxRuntime.jsx(button.OpenClose, { isOpen, setIsOpen }),
2456
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
2457
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { children: node.key }),
2458
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "type detail", children: " (family)" })
2426
2459
  ] })
2427
2460
  ] }),
2428
- isOpen ? Object.entries(node.familyMembers).map(([key, childNode]) => /* @__PURE__ */ jsx(
2461
+ isOpen ? Object.entries(node.familyMembers).map(([key, childNode]) => /* @__PURE__ */ jsxRuntime.jsx(
2429
2462
  StateIndexNode,
2430
2463
  {
2431
2464
  node: childNode,
@@ -2440,19 +2473,19 @@ var StateIndexNode = ({ node, isOpenState, typeState }) => {
2440
2473
  if (node.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)) {
2441
2474
  return null;
2442
2475
  }
2443
- return /* @__PURE__ */ jsx("section", { className: "node state", children: `type` in node ? /* @__PURE__ */ jsx(
2476
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "node state", children: `type` in node ? /* @__PURE__ */ jsxRuntime.jsx(
2444
2477
  StateIndexLeafNode,
2445
2478
  {
2446
2479
  node,
2447
2480
  isOpenState,
2448
2481
  typeState
2449
2482
  }
2450
- ) : /* @__PURE__ */ jsx(StateIndexTreeNode, { node, isOpenState }) });
2483
+ ) : /* @__PURE__ */ jsxRuntime.jsx(StateIndexTreeNode, { node, isOpenState }) });
2451
2484
  };
2452
2485
  var StateIndex = ({ tokenIndex }) => {
2453
- const tokenIds = useO(tokenIndex);
2454
- return /* @__PURE__ */ jsx("article", { className: "index state_index", children: Object.entries(tokenIds).filter(([key]) => !key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).sort().map(([key, node]) => {
2455
- return /* @__PURE__ */ jsx(
2486
+ const tokenIds = react.useO(tokenIndex);
2487
+ return /* @__PURE__ */ jsxRuntime.jsx("article", { className: "index state_index", children: Object.entries(tokenIds).filter(([key]) => !key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).sort().map(([key, node]) => {
2488
+ return /* @__PURE__ */ jsxRuntime.jsx(
2456
2489
  StateIndexNode,
2457
2490
  {
2458
2491
  node,
@@ -2464,60 +2497,60 @@ var StateIndex = ({ tokenIndex }) => {
2464
2497
  }) });
2465
2498
  };
2466
2499
  var AtomUpdateFC = ({ atomUpdate }) => {
2467
- return /* @__PURE__ */ jsxs(
2500
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2468
2501
  "article",
2469
2502
  {
2470
2503
  className: "node atom_update",
2471
2504
  onClick: () => console.log(atomUpdate),
2472
2505
  onKeyUp: () => console.log(atomUpdate),
2473
2506
  children: [
2474
- /* @__PURE__ */ jsxs("span", { className: "detail", children: [
2507
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "detail", children: [
2475
2508
  atomUpdate.key,
2476
2509
  ": "
2477
2510
  ] }),
2478
- /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx("span", { className: "summary", children: prettyJson.diff(atomUpdate.oldValue, atomUpdate.newValue).summary }) })
2511
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "summary", children: prettyJson.diff(atomUpdate.oldValue, atomUpdate.newValue).summary }) })
2479
2512
  ]
2480
2513
  },
2481
2514
  atomUpdate.key
2482
2515
  );
2483
2516
  };
2484
2517
  var TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
2485
- return /* @__PURE__ */ jsxs("article", { className: "node transaction_update", children: [
2486
- /* @__PURE__ */ jsx("header", { children: /* @__PURE__ */ jsx("h4", { children: serialNumber }) }),
2487
- /* @__PURE__ */ jsxs("main", { children: [
2488
- /* @__PURE__ */ jsxs("section", { className: "transaction_params", children: [
2489
- /* @__PURE__ */ jsx("span", { className: "detail", children: "params: " }),
2518
+ return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "node transaction_update", children: [
2519
+ /* @__PURE__ */ jsxRuntime.jsx("header", { children: /* @__PURE__ */ jsxRuntime.jsx("h4", { children: serialNumber }) }),
2520
+ /* @__PURE__ */ jsxRuntime.jsxs("main", { children: [
2521
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "transaction_params", children: [
2522
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "detail", children: "params: " }),
2490
2523
  transactionUpdate.params.map((param, index) => {
2491
- return /* @__PURE__ */ jsxs(
2524
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2492
2525
  "article",
2493
2526
  {
2494
2527
  className: "node transaction_param",
2495
2528
  onClick: () => console.log(transactionUpdate),
2496
2529
  onKeyUp: () => console.log(transactionUpdate),
2497
2530
  children: [
2498
- /* @__PURE__ */ jsxs("span", { className: "detail", children: [
2531
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "detail", children: [
2499
2532
  discoverType(param),
2500
2533
  ": "
2501
2534
  ] }),
2502
- /* @__PURE__ */ jsx("span", { className: "summary", children: typeof param === `object` && param !== null && `type` in param && `target` in param ? /* @__PURE__ */ jsx(Fragment, { children: JSON.stringify(param.type) }) : /* @__PURE__ */ jsx(Fragment, { children: JSON.stringify(param) }) })
2535
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "summary", children: typeof param === `object` && param !== null && `type` in param && `target` in param ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: JSON.stringify(param.type) }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: JSON.stringify(param) }) })
2503
2536
  ]
2504
2537
  },
2505
2538
  `param` + index
2506
2539
  );
2507
2540
  })
2508
2541
  ] }),
2509
- /* @__PURE__ */ jsxs("section", { className: "node transaction_output", children: [
2510
- /* @__PURE__ */ jsx("span", { className: "detail", children: "output: " }),
2511
- /* @__PURE__ */ jsx("span", { className: "detail", children: discoverType(transactionUpdate.output) }),
2512
- transactionUpdate.output ? /* @__PURE__ */ jsxs("span", { className: "summary", children: [
2542
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "node transaction_output", children: [
2543
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "detail", children: "output: " }),
2544
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "detail", children: discoverType(transactionUpdate.output) }),
2545
+ transactionUpdate.output ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "summary", children: [
2513
2546
  ": ",
2514
2547
  JSON.stringify(transactionUpdate.output)
2515
2548
  ] }) : null
2516
2549
  ] }),
2517
- /* @__PURE__ */ jsxs("section", { className: "transaction_impact", children: [
2518
- /* @__PURE__ */ jsx("span", { className: "detail", children: "impact: " }),
2550
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "transaction_impact", children: [
2551
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "detail", children: "impact: " }),
2519
2552
  transactionUpdate.atomUpdates.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((atomUpdate, index) => {
2520
- return /* @__PURE__ */ jsx(
2553
+ return /* @__PURE__ */ jsxRuntime.jsx(
2521
2554
  article.AtomUpdate,
2522
2555
  {
2523
2556
  serialNumber: index,
@@ -2531,8 +2564,8 @@ var TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
2531
2564
  ] });
2532
2565
  };
2533
2566
  var TimelineUpdateFC = ({ timelineUpdate }) => {
2534
- return /* @__PURE__ */ jsxs("article", { className: "node timeline_update", children: [
2535
- /* @__PURE__ */ jsx("header", { children: /* @__PURE__ */ jsxs("h4", { children: [
2567
+ return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "node timeline_update", children: [
2568
+ /* @__PURE__ */ jsxRuntime.jsx("header", { children: /* @__PURE__ */ jsxRuntime.jsxs("h4", { children: [
2536
2569
  timelineUpdate.timestamp,
2537
2570
  ": ",
2538
2571
  timelineUpdate.type,
@@ -2540,8 +2573,8 @@ var TimelineUpdateFC = ({ timelineUpdate }) => {
2540
2573
  timelineUpdate.key,
2541
2574
  ")"
2542
2575
  ] }) }),
2543
- /* @__PURE__ */ jsx("main", { children: timelineUpdate.type === `transaction_update` ? timelineUpdate.atomUpdates.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((atomUpdate, index) => {
2544
- return /* @__PURE__ */ jsx(
2576
+ /* @__PURE__ */ jsxRuntime.jsx("main", { children: timelineUpdate.type === `transaction_update` ? timelineUpdate.atomUpdates.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((atomUpdate, index) => {
2577
+ return /* @__PURE__ */ jsxRuntime.jsx(
2545
2578
  article.AtomUpdate,
2546
2579
  {
2547
2580
  serialNumber: index,
@@ -2550,7 +2583,7 @@ var TimelineUpdateFC = ({ timelineUpdate }) => {
2550
2583
  `${timelineUpdate.key}:${index}:${atomUpdate.key}`
2551
2584
  );
2552
2585
  }) : timelineUpdate.type === `selector_update` ? timelineUpdate.atomUpdates.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((atomUpdate, index) => {
2553
- return /* @__PURE__ */ jsx(
2586
+ return /* @__PURE__ */ jsxRuntime.jsx(
2554
2587
  article.AtomUpdate,
2555
2588
  {
2556
2589
  serialNumber: index,
@@ -2558,7 +2591,7 @@ var TimelineUpdateFC = ({ timelineUpdate }) => {
2558
2591
  },
2559
2592
  `${timelineUpdate.key}:${index}:${atomUpdate.key}`
2560
2593
  );
2561
- }) : timelineUpdate.type === `atom_update` ? /* @__PURE__ */ jsx(
2594
+ }) : timelineUpdate.type === `atom_update` ? /* @__PURE__ */ jsxRuntime.jsx(
2562
2595
  article.AtomUpdate,
2563
2596
  {
2564
2597
  serialNumber: timelineUpdate.timestamp,
@@ -2573,40 +2606,40 @@ var article = {
2573
2606
  TimelineUpdate: TimelineUpdateFC
2574
2607
  };
2575
2608
  var YouAreHere = () => {
2576
- return /* @__PURE__ */ jsx("span", { className: "you_are_here", children: "you are here" });
2609
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "you_are_here", children: "you are here" });
2577
2610
  };
2578
2611
  var TimelineLog = ({ token, isOpenState, timelineState }) => {
2579
- const timeline = useO(timelineState);
2580
- const isOpen = useO(isOpenState);
2581
- const setIsOpen = useI(isOpenState);
2582
- return /* @__PURE__ */ jsxs("section", { className: "node timeline_log", children: [
2583
- /* @__PURE__ */ jsxs("header", { children: [
2584
- /* @__PURE__ */ jsx(button.OpenClose, { isOpen, setIsOpen }),
2585
- /* @__PURE__ */ jsxs("label", { children: [
2586
- /* @__PURE__ */ jsx("h2", { children: token.key }),
2587
- /* @__PURE__ */ jsxs("span", { className: "detail length", children: [
2612
+ const timeline = react.useO(timelineState);
2613
+ const isOpen = react.useO(isOpenState);
2614
+ const setIsOpen = react.useI(isOpenState);
2615
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "node timeline_log", children: [
2616
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { children: [
2617
+ /* @__PURE__ */ jsxRuntime.jsx(button.OpenClose, { isOpen, setIsOpen }),
2618
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
2619
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { children: token.key }),
2620
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "detail length", children: [
2588
2621
  "(",
2589
2622
  timeline.at,
2590
2623
  "/",
2591
2624
  timeline.history.length,
2592
2625
  ")"
2593
2626
  ] }),
2594
- /* @__PURE__ */ jsx("span", { className: "gap" }),
2595
- /* @__PURE__ */ jsxs("nav", { children: [
2596
- /* @__PURE__ */ jsx(
2627
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "gap" }),
2628
+ /* @__PURE__ */ jsxRuntime.jsxs("nav", { children: [
2629
+ /* @__PURE__ */ jsxRuntime.jsx(
2597
2630
  "button",
2598
2631
  {
2599
2632
  type: "button",
2600
- onClick: () => undo(token),
2633
+ onClick: () => atom_io.undo(token),
2601
2634
  disabled: timeline.at === 0,
2602
2635
  children: "undo"
2603
2636
  }
2604
2637
  ),
2605
- /* @__PURE__ */ jsx(
2638
+ /* @__PURE__ */ jsxRuntime.jsx(
2606
2639
  "button",
2607
2640
  {
2608
2641
  type: "button",
2609
- onClick: () => redo(token),
2642
+ onClick: () => atom_io.redo(token),
2610
2643
  disabled: timeline.at === timeline.history.length,
2611
2644
  children: "redo"
2612
2645
  }
@@ -2614,17 +2647,17 @@ var TimelineLog = ({ token, isOpenState, timelineState }) => {
2614
2647
  ] })
2615
2648
  ] })
2616
2649
  ] }),
2617
- isOpen ? /* @__PURE__ */ jsx("main", { children: timeline.history.map((update, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
2618
- index === timeline.at ? /* @__PURE__ */ jsx(YouAreHere, {}) : null,
2619
- /* @__PURE__ */ jsx(article.TimelineUpdate, { timelineUpdate: update }),
2620
- index === timeline.history.length - 1 && timeline.at === timeline.history.length ? /* @__PURE__ */ jsx(YouAreHere, {}) : null
2650
+ isOpen ? /* @__PURE__ */ jsxRuntime.jsx("main", { children: timeline.history.map((update, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
2651
+ index === timeline.at ? /* @__PURE__ */ jsxRuntime.jsx(YouAreHere, {}) : null,
2652
+ /* @__PURE__ */ jsxRuntime.jsx(article.TimelineUpdate, { timelineUpdate: update }),
2653
+ index === timeline.history.length - 1 && timeline.at === timeline.history.length ? /* @__PURE__ */ jsxRuntime.jsx(YouAreHere, {}) : null
2621
2654
  ] }, update.key + index + timeline.at)) }) : null
2622
2655
  ] });
2623
2656
  };
2624
2657
  var TimelineIndex = () => {
2625
- const tokenIds = useO(timelineIndex);
2626
- return /* @__PURE__ */ jsx("article", { className: "index timeline_index", children: tokenIds.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((token) => {
2627
- return /* @__PURE__ */ jsx(
2658
+ const tokenIds = react.useO(timelineIndex);
2659
+ return /* @__PURE__ */ jsxRuntime.jsx("article", { className: "index timeline_index", children: tokenIds.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((token) => {
2660
+ return /* @__PURE__ */ jsxRuntime.jsx(
2628
2661
  TimelineLog,
2629
2662
  {
2630
2663
  token,
@@ -2636,22 +2669,22 @@ var TimelineIndex = () => {
2636
2669
  }) });
2637
2670
  };
2638
2671
  var TransactionLog = ({ token, isOpenState, logState }) => {
2639
- const log = useO(logState);
2640
- const isOpen = useO(isOpenState);
2641
- const setIsOpen = useI(isOpenState);
2642
- return /* @__PURE__ */ jsxs("section", { className: "node transaction_log", children: [
2643
- /* @__PURE__ */ jsxs("header", { children: [
2644
- /* @__PURE__ */ jsx(button.OpenClose, { isOpen, setIsOpen }),
2645
- /* @__PURE__ */ jsxs("label", { children: [
2646
- /* @__PURE__ */ jsx("h2", { children: token.key }),
2647
- /* @__PURE__ */ jsxs("span", { className: "detail length", children: [
2672
+ const log = react.useO(logState);
2673
+ const isOpen = react.useO(isOpenState);
2674
+ const setIsOpen = react.useI(isOpenState);
2675
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "node transaction_log", children: [
2676
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { children: [
2677
+ /* @__PURE__ */ jsxRuntime.jsx(button.OpenClose, { isOpen, setIsOpen }),
2678
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
2679
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { children: token.key }),
2680
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "detail length", children: [
2648
2681
  "(",
2649
2682
  log.length,
2650
2683
  ")"
2651
2684
  ] })
2652
2685
  ] })
2653
2686
  ] }),
2654
- isOpen ? /* @__PURE__ */ jsx("main", { children: log.map((update, index) => /* @__PURE__ */ jsx(
2687
+ isOpen ? /* @__PURE__ */ jsxRuntime.jsx("main", { children: log.map((update, index) => /* @__PURE__ */ jsxRuntime.jsx(
2655
2688
  article.TransactionUpdate,
2656
2689
  {
2657
2690
  serialNumber: index,
@@ -2662,9 +2695,9 @@ var TransactionLog = ({ token, isOpenState, logState }) => {
2662
2695
  ] });
2663
2696
  };
2664
2697
  var TransactionIndex = () => {
2665
- const tokenIds = useO(transactionIndex);
2666
- return /* @__PURE__ */ jsx("article", { className: "index transaction_index", children: tokenIds.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((token) => {
2667
- return /* @__PURE__ */ jsx(
2698
+ const tokenIds = react.useO(transactionIndex);
2699
+ return /* @__PURE__ */ jsxRuntime.jsx("article", { className: "index transaction_index", children: tokenIds.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((token) => {
2700
+ return /* @__PURE__ */ jsxRuntime.jsx(
2668
2701
  TransactionLog,
2669
2702
  {
2670
2703
  token,
@@ -2676,16 +2709,16 @@ var TransactionIndex = () => {
2676
2709
  }) });
2677
2710
  };
2678
2711
  var AtomIODevtools = () => {
2679
- const constraintsRef = useRef(null);
2680
- const setDevtoolsAreOpen = useI(devtoolsAreOpenState);
2681
- const devtoolsAreOpen = useO(devtoolsAreOpenState);
2682
- const setDevtoolsView = useI(devtoolsViewSelectionState);
2683
- const devtoolsView = useO(devtoolsViewSelectionState);
2684
- const devtoolsViewOptions = useO(devtoolsViewOptionsState);
2685
- const mouseHasMoved = useRef(false);
2686
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2687
- /* @__PURE__ */ jsx(
2688
- motion.span,
2712
+ const constraintsRef = React.useRef(null);
2713
+ const setDevtoolsAreOpen = react.useI(devtoolsAreOpenState);
2714
+ const devtoolsAreOpen = react.useO(devtoolsAreOpenState);
2715
+ const setDevtoolsView = react.useI(devtoolsViewSelectionState);
2716
+ const devtoolsView = react.useO(devtoolsViewSelectionState);
2717
+ const devtoolsViewOptions = react.useO(devtoolsViewOptionsState);
2718
+ const mouseHasMoved = React.useRef(false);
2719
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2720
+ /* @__PURE__ */ jsxRuntime.jsx(
2721
+ framerMotion.motion.span,
2689
2722
  {
2690
2723
  ref: constraintsRef,
2691
2724
  className: "atom_io_devtools_zone",
@@ -2699,13 +2732,13 @@ var AtomIODevtools = () => {
2699
2732
  }
2700
2733
  }
2701
2734
  ),
2702
- /* @__PURE__ */ jsxs(
2703
- motion.main,
2735
+ /* @__PURE__ */ jsxRuntime.jsxs(
2736
+ framerMotion.motion.main,
2704
2737
  {
2705
2738
  drag: true,
2706
2739
  dragConstraints: constraintsRef,
2707
2740
  className: "atom_io_devtools",
2708
- transition: spring,
2741
+ transition: framerMotion.spring,
2709
2742
  style: devtoolsAreOpen ? {} : {
2710
2743
  backgroundColor: `#0000`,
2711
2744
  borderColor: `#0000`,
@@ -2713,10 +2746,10 @@ var AtomIODevtools = () => {
2713
2746
  maxWidth: 33
2714
2747
  },
2715
2748
  children: [
2716
- devtoolsAreOpen ? /* @__PURE__ */ jsxs(Fragment, { children: [
2717
- /* @__PURE__ */ jsxs(motion.header, { children: [
2718
- /* @__PURE__ */ jsx("h1", { children: "atom.io" }),
2719
- /* @__PURE__ */ jsx("nav", { children: devtoolsViewOptions.map((viewOption) => /* @__PURE__ */ jsx(
2749
+ devtoolsAreOpen ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2750
+ /* @__PURE__ */ jsxRuntime.jsxs(framerMotion.motion.header, { children: [
2751
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { children: "atom.io" }),
2752
+ /* @__PURE__ */ jsxRuntime.jsx("nav", { children: devtoolsViewOptions.map((viewOption) => /* @__PURE__ */ jsxRuntime.jsx(
2720
2753
  "button",
2721
2754
  {
2722
2755
  type: "button",
@@ -2728,9 +2761,9 @@ var AtomIODevtools = () => {
2728
2761
  viewOption
2729
2762
  )) })
2730
2763
  ] }),
2731
- /* @__PURE__ */ jsx(motion.main, { children: /* @__PURE__ */ jsx(LayoutGroup, { children: devtoolsView === `atoms` ? /* @__PURE__ */ jsx(StateIndex, { tokenIndex: atomIndex }) : devtoolsView === `selectors` ? /* @__PURE__ */ jsx(StateIndex, { tokenIndex: selectorIndex }) : devtoolsView === `transactions` ? /* @__PURE__ */ jsx(TransactionIndex, {}) : devtoolsView === `timelines` ? /* @__PURE__ */ jsx(TimelineIndex, {}) : null }) })
2764
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.main, { children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.LayoutGroup, { children: devtoolsView === `atoms` ? /* @__PURE__ */ jsxRuntime.jsx(StateIndex, { tokenIndex: atomIndex }) : devtoolsView === `selectors` ? /* @__PURE__ */ jsxRuntime.jsx(StateIndex, { tokenIndex: selectorIndex }) : devtoolsView === `transactions` ? /* @__PURE__ */ jsxRuntime.jsx(TransactionIndex, {}) : devtoolsView === `timelines` ? /* @__PURE__ */ jsxRuntime.jsx(TimelineIndex, {}) : null }) })
2732
2765
  ] }) : null,
2733
- /* @__PURE__ */ jsx("footer", { children: /* @__PURE__ */ jsx(
2766
+ /* @__PURE__ */ jsxRuntime.jsx("footer", { children: /* @__PURE__ */ jsxRuntime.jsx(
2734
2767
  "button",
2735
2768
  {
2736
2769
  type: "button",
@@ -2758,23 +2791,23 @@ var {
2758
2791
  findTransactionLogState,
2759
2792
  timelineIndex,
2760
2793
  findTimelineState
2761
- } = attachIntrospectionStates();
2762
- var devtoolsAreOpenState = atom({
2794
+ } = introspection.attachIntrospectionStates();
2795
+ var devtoolsAreOpenState = atom_io.atom({
2763
2796
  key: `\u{1F441}\u200D\u{1F5E8} Devtools Are Open`,
2764
2797
  default: true,
2765
2798
  effects: [lazyLocalStorageEffect(`\u{1F441}\u200D\u{1F5E8} Devtools Are Open`)]
2766
2799
  });
2767
- var devtoolsViewSelectionState = atom({
2800
+ var devtoolsViewSelectionState = atom_io.atom({
2768
2801
  key: `\u{1F441}\u200D\u{1F5E8} Devtools View Selection`,
2769
2802
  default: `atoms`,
2770
2803
  effects: [lazyLocalStorageEffect(`\u{1F441}\u200D\u{1F5E8} Devtools View`)]
2771
2804
  });
2772
- var devtoolsViewOptionsState = atom({
2805
+ var devtoolsViewOptionsState = atom_io.atom({
2773
2806
  key: `\u{1F441}\u200D\u{1F5E8} Devtools View Options`,
2774
2807
  default: [`atoms`, `selectors`, `transactions`, `timelines`],
2775
2808
  effects: [lazyLocalStorageEffect(`\u{1F441}\u200D\u{1F5E8} Devtools View Options`)]
2776
2809
  });
2777
- var findViewIsOpenState = atomFamily({
2810
+ var findViewIsOpenState = atom_io.atomFamily({
2778
2811
  key: `\u{1F441}\u200D\u{1F5E8} Devtools View Is Open`,
2779
2812
  default: false,
2780
2813
  effects: (key) => [lazyLocalStorageEffect(key + `:view-is-open`)]
@@ -2798,6 +2831,19 @@ var prettyJson = new Differ(primitiveRefinery, jsonTreeRefinery, {
2798
2831
  array: diffArray
2799
2832
  });
2800
2833
 
2801
- export { AtomIODevtools, atomIndex, devtoolsAreOpenState, devtoolsViewOptionsState, devtoolsViewSelectionState, findTimelineState, findTransactionLogState, findViewIsOpenState, jsonTreeRefinery, prettyJson, primitiveRefinery, selectorIndex, timelineIndex, transactionIndex };
2834
+ exports.AtomIODevtools = AtomIODevtools;
2835
+ exports.atomIndex = atomIndex;
2836
+ exports.devtoolsAreOpenState = devtoolsAreOpenState;
2837
+ exports.devtoolsViewOptionsState = devtoolsViewOptionsState;
2838
+ exports.devtoolsViewSelectionState = devtoolsViewSelectionState;
2839
+ exports.findTimelineState = findTimelineState;
2840
+ exports.findTransactionLogState = findTransactionLogState;
2841
+ exports.findViewIsOpenState = findViewIsOpenState;
2842
+ exports.jsonTreeRefinery = jsonTreeRefinery;
2843
+ exports.prettyJson = prettyJson;
2844
+ exports.primitiveRefinery = primitiveRefinery;
2845
+ exports.selectorIndex = selectorIndex;
2846
+ exports.timelineIndex = timelineIndex;
2847
+ exports.transactionIndex = transactionIndex;
2802
2848
  //# sourceMappingURL=out.js.map
2803
- //# sourceMappingURL=index.mjs.map
2849
+ //# sourceMappingURL=index.cjs.map