atom.io 0.19.2 → 0.19.3
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/data/dist/index.js +1 -1
- package/data/package.json +1 -1
- package/dist/{chunk-U2IICNHQ.js → chunk-F2X4B4VY.js} +5 -1
- package/dist/index.js +1 -1
- package/eslint-plugin/dist/index.cjs +180 -0
- package/eslint-plugin/dist/index.js +171 -0
- package/eslint-plugin/package.json +16 -0
- package/eslint-plugin/src/index.ts +11 -0
- package/eslint-plugin/src/rules/index.ts +1 -0
- package/eslint-plugin/src/rules/synchronous-selector-dependencies.ts +190 -0
- package/internal/dist/index.js +1 -1
- package/internal/package.json +1 -1
- package/introspection/dist/index.js +1 -1
- package/introspection/package.json +1 -1
- package/json/dist/index.js +1 -1
- package/json/package.json +1 -1
- package/package.json +24 -9
- package/react/dist/index.js +1 -1
- package/react/package.json +1 -1
- package/react-devtools/dist/index.cjs +92 -105
- package/react-devtools/dist/index.js +70 -83
- package/react-devtools/package.json +1 -1
- package/react-devtools/src/Updates.tsx +10 -7
- package/realtime/dist/index.js +1 -1
- package/realtime/package.json +1 -1
- package/realtime-client/dist/index.js +1 -1
- package/realtime-client/package.json +1 -1
- package/realtime-react/dist/index.js +1 -1
- package/realtime-react/package.json +1 -1
- package/realtime-server/dist/index.js +1 -1
- package/realtime-server/package.json +1 -1
- package/realtime-testing/dist/index.js +1 -1
- package/realtime-testing/package.json +1 -1
- package/transceivers/set-rtx/dist/index.js +1 -1
- package/transceivers/set-rtx/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atom.io",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.3",
|
|
4
4
|
"description": "Composable and testable reactive data library.",
|
|
5
5
|
"homepage": "https://atom.io.fyi",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -48,17 +48,21 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@testing-library/react": "15.0.
|
|
51
|
+
"@testing-library/react": "15.0.2",
|
|
52
|
+
"@types/eslint": "8.56.9",
|
|
53
|
+
"@types/estree": "1.0.5",
|
|
52
54
|
"@types/http-proxy": "1.17.14",
|
|
53
55
|
"@types/npmlog": "7.0.0",
|
|
54
|
-
"@types/react": "18.2.
|
|
56
|
+
"@types/react": "18.2.78",
|
|
55
57
|
"@types/tmp": "0.2.6",
|
|
56
|
-
"@
|
|
57
|
-
"@vitest/
|
|
58
|
+
"@typescript-eslint/parser": "7.7.0",
|
|
59
|
+
"@vitest/coverage-v8": "1.5.0",
|
|
60
|
+
"@vitest/ui": "1.5.0",
|
|
58
61
|
"concurrently": "8.2.2",
|
|
59
62
|
"drizzle-kit": "0.20.14",
|
|
60
|
-
"drizzle-orm": "0.30.
|
|
61
|
-
"
|
|
63
|
+
"drizzle-orm": "0.30.8",
|
|
64
|
+
"eslint": "9.0.0",
|
|
65
|
+
"framer-motion": "11.0.28",
|
|
62
66
|
"happy-dom": "14.7.1",
|
|
63
67
|
"http-proxy": "1.18.1",
|
|
64
68
|
"npmlog": "7.0.1",
|
|
@@ -74,7 +78,7 @@
|
|
|
74
78
|
"typescript": "5.4.5",
|
|
75
79
|
"vite": "5.2.8",
|
|
76
80
|
"vite-tsconfig-paths": "4.3.2",
|
|
77
|
-
"vitest": "1.
|
|
81
|
+
"vitest": "1.5.0"
|
|
78
82
|
},
|
|
79
83
|
"main": "dist/index.js",
|
|
80
84
|
"types": "dist/index.d.ts",
|
|
@@ -85,6 +89,9 @@
|
|
|
85
89
|
"data/dist",
|
|
86
90
|
"data/package.json",
|
|
87
91
|
"data/src",
|
|
92
|
+
"eslint-plugin/dist",
|
|
93
|
+
"eslint-plugin/package.json",
|
|
94
|
+
"eslint-plugin/src",
|
|
88
95
|
"internal/dist",
|
|
89
96
|
"internal/package.json",
|
|
90
97
|
"internal/src",
|
|
@@ -134,6 +141,13 @@
|
|
|
134
141
|
"import": "./data/dist/index.js",
|
|
135
142
|
"require": "./data/dist/index.cjs"
|
|
136
143
|
},
|
|
144
|
+
"./eslint-plugin/package.json": "./eslint-plugin/package.json",
|
|
145
|
+
"./eslint-plugin": {
|
|
146
|
+
"types": "./eslint-plugin/dist/index.d.ts",
|
|
147
|
+
"browser": "./eslint-plugin/dist/index.js",
|
|
148
|
+
"import": "./eslint-plugin/dist/index.js",
|
|
149
|
+
"require": "./eslint-plugin/dist/index.cjs"
|
|
150
|
+
},
|
|
137
151
|
"./internal/package.json": "./internal/package.json",
|
|
138
152
|
"./internal": {
|
|
139
153
|
"types": "./internal/dist/index.d.ts",
|
|
@@ -231,7 +245,8 @@
|
|
|
231
245
|
"build:realtime-testing": "cd realtime-testing && tsup",
|
|
232
246
|
"build:transceivers:set-rtx": "cd transceivers/set-rtx && tsup",
|
|
233
247
|
"lint:biome": "biome check -- .",
|
|
234
|
-
"lint:eslint": "eslint .",
|
|
248
|
+
"lint:eslint": "eslint . --ignore-pattern={**/dist/**,**/coverage/**}",
|
|
249
|
+
"lint:eslint:build": "bun run build:main",
|
|
235
250
|
"lint:types": "tsc --noEmit",
|
|
236
251
|
"lint": "bun run lint:biome && bun run lint:eslint && bun run lint:types",
|
|
237
252
|
"test": "vitest",
|
package/react/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../dist/chunk-
|
|
1
|
+
import '../../dist/chunk-F2X4B4VY.js';
|
|
2
2
|
import { IMPLICIT, findInStore, setIntoStore, subscribeToState, getFromStore, getJsonToken, withdraw, subscribeToTimeline } from 'atom.io/internal';
|
|
3
3
|
import * as React5 from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
package/react/package.json
CHANGED
|
@@ -14,18 +14,18 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
|
14
14
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
15
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
16
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
-
var __spreadValues = (
|
|
18
|
-
for (var prop in
|
|
19
|
-
if (__hasOwnProp.call(
|
|
20
|
-
__defNormalProp(
|
|
17
|
+
var __spreadValues = (a, b) => {
|
|
18
|
+
for (var prop in b || (b = {}))
|
|
19
|
+
if (__hasOwnProp.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
21
|
if (__getOwnPropSymbols)
|
|
22
|
-
for (var prop of __getOwnPropSymbols(
|
|
23
|
-
if (__propIsEnum.call(
|
|
24
|
-
__defNormalProp(
|
|
22
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
+
if (__propIsEnum.call(b, prop))
|
|
24
|
+
__defNormalProp(a, prop, b[prop]);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return a;
|
|
27
27
|
};
|
|
28
|
-
var __spreadProps = (
|
|
28
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
29
29
|
var __restKey = (key) => typeof key === "symbol" ? key : key + "";
|
|
30
30
|
var __objRest = (source, exclude) => {
|
|
31
31
|
var target = {};
|
|
@@ -41,26 +41,26 @@ var __objRest = (source, exclude) => {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
// ../anvl/src/function/pipe.ts
|
|
44
|
-
function pipe(
|
|
44
|
+
function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
|
|
45
45
|
switch (arguments.length) {
|
|
46
46
|
case 1:
|
|
47
|
-
return
|
|
47
|
+
return a;
|
|
48
48
|
case 2:
|
|
49
|
-
return ab(
|
|
49
|
+
return ab(a);
|
|
50
50
|
case 3:
|
|
51
|
-
return bc(ab(
|
|
51
|
+
return bc(ab(a));
|
|
52
52
|
case 4:
|
|
53
|
-
return cd(bc(ab(
|
|
53
|
+
return cd(bc(ab(a)));
|
|
54
54
|
case 5:
|
|
55
|
-
return de(cd(bc(ab(
|
|
55
|
+
return de(cd(bc(ab(a))));
|
|
56
56
|
case 6:
|
|
57
|
-
return ef(de(cd(bc(ab(
|
|
57
|
+
return ef(de(cd(bc(ab(a)))));
|
|
58
58
|
case 7:
|
|
59
|
-
return fg(ef(de(cd(bc(ab(
|
|
59
|
+
return fg(ef(de(cd(bc(ab(a))))));
|
|
60
60
|
case 8:
|
|
61
|
-
return gh(fg(ef(de(cd(bc(ab(
|
|
61
|
+
return gh(fg(ef(de(cd(bc(ab(a)))))));
|
|
62
62
|
case 9:
|
|
63
|
-
return hi(gh(fg(ef(de(cd(bc(ab(
|
|
63
|
+
return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
|
|
64
64
|
default: {
|
|
65
65
|
let ret = arguments[0];
|
|
66
66
|
for (let i = 1; i < arguments.length; i++) {
|
|
@@ -90,8 +90,8 @@ var fallback = (fn, fallbackValue) => {
|
|
|
90
90
|
|
|
91
91
|
// ../anvl/src/array/index.ts
|
|
92
92
|
var isArray = (isType) => (input) => Array.isArray(input) && input.every((item) => isType(item));
|
|
93
|
-
var map = (f) => (
|
|
94
|
-
var every = (f = Boolean) => (
|
|
93
|
+
var map = (f) => (a) => a.map(f);
|
|
94
|
+
var every = (f = Boolean) => (a) => a.every(f);
|
|
95
95
|
var allTrue = every((x) => x === true);
|
|
96
96
|
|
|
97
97
|
// ../anvl/src/nullish/index.ts
|
|
@@ -152,7 +152,7 @@ var doesExtend = (isValue) => hasProperties(isValue, ALLOW_EXTENSION);
|
|
|
152
152
|
// ../anvl/src/object/sprawl.ts
|
|
153
153
|
var sprawl = (tree, inspector) => {
|
|
154
154
|
const walk = (path, node) => {
|
|
155
|
-
var
|
|
155
|
+
var _a;
|
|
156
156
|
const inspect = (p, n) => {
|
|
157
157
|
const result2 = inspector(p, n);
|
|
158
158
|
if (result2)
|
|
@@ -160,7 +160,7 @@ var sprawl = (tree, inspector) => {
|
|
|
160
160
|
return null;
|
|
161
161
|
};
|
|
162
162
|
const result = inspect(path, node);
|
|
163
|
-
if ((
|
|
163
|
+
if ((_a = result == null ? void 0 : result.jobComplete) != null ? _a : result == null ? void 0 : result.pathComplete) {
|
|
164
164
|
return result;
|
|
165
165
|
}
|
|
166
166
|
const childEntries = Array.isArray(node) ? node.map((v, i) => [i, v]) : isPlainObject(node) ? Object.entries(node) : [];
|
|
@@ -268,12 +268,12 @@ var refineJsonType = (data) => data === null ? { type: `null`, data: null } : is
|
|
|
268
268
|
data === void 0 ? `undefined passed to refineJsonType. This is not valid JSON.` : `${stringifyJson(data)} with prototype "${Object.getPrototypeOf(data).constructor.name}" passed to refineJsonType. This is not valid JSON.`
|
|
269
269
|
);
|
|
270
270
|
var isJson = (input) => {
|
|
271
|
-
var
|
|
271
|
+
var _a;
|
|
272
272
|
if (input === null)
|
|
273
273
|
return true;
|
|
274
274
|
if (input === void 0)
|
|
275
275
|
return false;
|
|
276
|
-
const prototype = (
|
|
276
|
+
const prototype = (_a = Object.getPrototypeOf(input)) == null ? void 0 : _a.constructor.name;
|
|
277
277
|
const refine = JSON_PROTOTYPES.includes(prototype);
|
|
278
278
|
return refine;
|
|
279
279
|
};
|
|
@@ -290,11 +290,11 @@ var mustSatisfyOneOfTheFollowing = (isTypeA, logging = false, refinements = [isT
|
|
|
290
290
|
const _ = {
|
|
291
291
|
[name]: (input) => refinements.some(
|
|
292
292
|
(refinement) => {
|
|
293
|
-
var
|
|
293
|
+
var _a;
|
|
294
294
|
return logging && console.log(
|
|
295
295
|
refinements.map((r) => r.name || `anon`).join(` | `),
|
|
296
296
|
`>`,
|
|
297
|
-
(
|
|
297
|
+
(_a = refinement.name) != null ? _a : `anon`,
|
|
298
298
|
`:`,
|
|
299
299
|
refinement(input)
|
|
300
300
|
), refinement(input);
|
|
@@ -337,32 +337,32 @@ var isLiteral = (value) => (input) => input === value;
|
|
|
337
337
|
var isWithin = (args) => (input) => args.includes(input);
|
|
338
338
|
|
|
339
339
|
// ../anvl/src/tree/differ.ts
|
|
340
|
-
function diffNumber(
|
|
341
|
-
const sign =
|
|
340
|
+
function diffNumber(a, b) {
|
|
341
|
+
const sign = a < b ? `+` : `-`;
|
|
342
342
|
return {
|
|
343
|
-
summary: `${sign}${Math.abs(
|
|
343
|
+
summary: `${sign}${Math.abs(a - b)} (${a} \u2192 ${b})`
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
function diffString(
|
|
347
|
-
const sign =
|
|
346
|
+
function diffString(a, b) {
|
|
347
|
+
const sign = a.length < b.length ? `+` : `-`;
|
|
348
348
|
return {
|
|
349
|
-
summary: `${sign}${Math.abs(
|
|
349
|
+
summary: `${sign}${Math.abs(a.length - b.length)} ("${a}" \u2192 "${b}")`
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
function diffBoolean(
|
|
352
|
+
function diffBoolean(a, b) {
|
|
353
353
|
return {
|
|
354
|
-
summary: `${
|
|
354
|
+
summary: `${a} \u2192 ${b}`
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function diffObject(
|
|
357
|
+
function diffObject(a, b, recurse) {
|
|
358
358
|
let summary = ``;
|
|
359
359
|
const added = [];
|
|
360
360
|
const removed = [];
|
|
361
361
|
const changed = [];
|
|
362
|
-
sprawl(
|
|
362
|
+
sprawl(a, (path, nodeA) => {
|
|
363
363
|
let key;
|
|
364
364
|
for (key of path) {
|
|
365
|
-
const nodeB =
|
|
365
|
+
const nodeB = b[key];
|
|
366
366
|
if (nodeB === void 0) {
|
|
367
367
|
removed.push([key, JSON.stringify(nodeA)]);
|
|
368
368
|
} else {
|
|
@@ -373,10 +373,10 @@ function diffObject(a2, b2, recurse) {
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
|
-
sprawl(
|
|
376
|
+
sprawl(b, (path, nodeB) => {
|
|
377
377
|
let key;
|
|
378
378
|
for (key of path) {
|
|
379
|
-
const nodeA =
|
|
379
|
+
const nodeA = a[key];
|
|
380
380
|
if (nodeA === void 0) {
|
|
381
381
|
added.push([key, JSON.stringify(nodeB)]);
|
|
382
382
|
}
|
|
@@ -390,8 +390,8 @@ function diffObject(a2, b2, recurse) {
|
|
|
390
390
|
changed
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
|
-
function diffArray(
|
|
394
|
-
return diffObject(
|
|
393
|
+
function diffArray(a, b, recurse) {
|
|
394
|
+
return diffObject(a, b, recurse);
|
|
395
395
|
}
|
|
396
396
|
var Differ = class {
|
|
397
397
|
constructor(leafRefinery, treeRefinery, diffFunctions) {
|
|
@@ -408,20 +408,20 @@ var Differ = class {
|
|
|
408
408
|
this.treeDiffers[key] = diffFunction;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
diff(
|
|
412
|
-
var
|
|
413
|
-
if (
|
|
411
|
+
diff(a, b) {
|
|
412
|
+
var _a, _b;
|
|
413
|
+
if (a === b) {
|
|
414
414
|
return { summary: `No Change` };
|
|
415
415
|
}
|
|
416
416
|
try {
|
|
417
|
-
if (JSON.stringify(
|
|
417
|
+
if (JSON.stringify(a) === JSON.stringify(b)) {
|
|
418
418
|
return { summary: `No Change` };
|
|
419
419
|
}
|
|
420
420
|
} catch (thrown) {
|
|
421
|
-
console.error(`Error stringifying`,
|
|
421
|
+
console.error(`Error stringifying`, a, b);
|
|
422
422
|
}
|
|
423
|
-
const aRefined = (
|
|
424
|
-
const bRefined = (_b = this.leafRefinery.refine(
|
|
423
|
+
const aRefined = (_a = this.leafRefinery.refine(a)) != null ? _a : this.treeRefinery.refine(a);
|
|
424
|
+
const bRefined = (_b = this.leafRefinery.refine(b)) != null ? _b : this.treeRefinery.refine(b);
|
|
425
425
|
if (aRefined !== null && bRefined !== null) {
|
|
426
426
|
if (aRefined.type === bRefined.type) {
|
|
427
427
|
if (aRefined.type in this.leafDiffers) {
|
|
@@ -441,8 +441,8 @@ var Differ = class {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
const typeA = discoverType(
|
|
445
|
-
const typeB = discoverType(
|
|
444
|
+
const typeA = discoverType(a);
|
|
445
|
+
const typeB = discoverType(b);
|
|
446
446
|
if (typeA === typeB) {
|
|
447
447
|
return {
|
|
448
448
|
summary: `${typeA} \u2192 ${typeB}`
|
|
@@ -487,7 +487,7 @@ var button = {
|
|
|
487
487
|
OpenClose
|
|
488
488
|
};
|
|
489
489
|
var ElasticInput = react.forwardRef(function ElasticInputFC(props, ref) {
|
|
490
|
-
var
|
|
490
|
+
var _a, _b, _c, _d, _e, _f;
|
|
491
491
|
const inputRef = react.useRef(null);
|
|
492
492
|
const spanRef = react.useRef(null);
|
|
493
493
|
const [inputWidth, setInputWidth] = react.useState(`auto`);
|
|
@@ -495,8 +495,8 @@ var ElasticInput = react.forwardRef(function ElasticInputFC(props, ref) {
|
|
|
495
495
|
ref,
|
|
496
496
|
() => ({
|
|
497
497
|
focus: () => {
|
|
498
|
-
var
|
|
499
|
-
(
|
|
498
|
+
var _a2;
|
|
499
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
500
500
|
}
|
|
501
501
|
})
|
|
502
502
|
);
|
|
@@ -513,7 +513,7 @@ var ElasticInput = react.forwardRef(function ElasticInputFC(props, ref) {
|
|
|
513
513
|
clearInterval(interval);
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
-
}, [(
|
|
516
|
+
}, [(_a = inputRef.current) == null ? void 0 : _a.value, props.value]);
|
|
517
517
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: `inline-block`, position: `relative` }, children: [
|
|
518
518
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
519
519
|
"input",
|
|
@@ -622,7 +622,7 @@ var NumberInput = ({
|
|
|
622
622
|
userHasMadeDeliberateChange.current = false;
|
|
623
623
|
};
|
|
624
624
|
const handleChange = (event) => {
|
|
625
|
-
var
|
|
625
|
+
var _a;
|
|
626
626
|
if (onChange)
|
|
627
627
|
onChange(event);
|
|
628
628
|
if (set === void 0)
|
|
@@ -631,7 +631,7 @@ var NumberInput = ({
|
|
|
631
631
|
const input = event.target.value;
|
|
632
632
|
if (isValidNonNumber(input) || isDecimalInProgress(input)) {
|
|
633
633
|
setTemporaryEntry(input);
|
|
634
|
-
const textInterpretation = isDecimalInProgress(input) ? input : (
|
|
634
|
+
const textInterpretation = isDecimalInProgress(input) ? input : (_a = min == null ? void 0 : min.toString()) != null ? _a : `0`;
|
|
635
635
|
const newValue = textToValue(textInterpretation, allowDecimal);
|
|
636
636
|
set(refine(newValue));
|
|
637
637
|
return;
|
|
@@ -825,19 +825,6 @@ var parseInteger = (input) => {
|
|
|
825
825
|
return input;
|
|
826
826
|
throw new IntegerParseError(input);
|
|
827
827
|
};
|
|
828
|
-
var _a;
|
|
829
|
-
var Fraction = class extends Number {
|
|
830
|
-
constructor(n, d) {
|
|
831
|
-
super(n / d);
|
|
832
|
-
this[_a] = () => this.numerator / this.denominator;
|
|
833
|
-
if (d === 0) {
|
|
834
|
-
throw new Error(`Denominator cannot be zero`);
|
|
835
|
-
}
|
|
836
|
-
this.numerator = parseInteger(n);
|
|
837
|
-
this.denominator = parseInteger(d);
|
|
838
|
-
}
|
|
839
|
-
};
|
|
840
|
-
_a = Symbol.toPrimitive;
|
|
841
828
|
var IntegerParseError = class extends Error {
|
|
842
829
|
constructor(value) {
|
|
843
830
|
super(`Could not parse integer from ${JSON.stringify(value)}`);
|
|
@@ -872,12 +859,6 @@ var Int = Object.assign((input) => parseInteger(input), {
|
|
|
872
859
|
};
|
|
873
860
|
}
|
|
874
861
|
});
|
|
875
|
-
function asNumber(input) {
|
|
876
|
-
return input;
|
|
877
|
-
}
|
|
878
|
-
asNumber(new Fraction(1, 2));
|
|
879
|
-
asNumber([new Fraction(1, 2)]);
|
|
880
|
-
asNumber({ a: new Fraction(1, 2) });
|
|
881
862
|
|
|
882
863
|
// ../anvl/src/json-schema/refs.ts
|
|
883
864
|
function isJsonSchemaRef(input) {
|
|
@@ -1147,8 +1128,8 @@ var stringToObject = (str) => {
|
|
|
1147
1128
|
var objectToString = (obj) => JSON.stringify(obj);
|
|
1148
1129
|
var objectToBoolean = (obj) => obj.true === true;
|
|
1149
1130
|
var objectToNumber = (obj) => {
|
|
1150
|
-
var
|
|
1151
|
-
return Number((_c = (_b = (
|
|
1131
|
+
var _a, _b, _c;
|
|
1132
|
+
return Number((_c = (_b = (_a = obj.number) != null ? _a : obj.size) != null ? _b : obj.count) != null ? _c : 0);
|
|
1152
1133
|
};
|
|
1153
1134
|
var objectToArray = (obj) => Object.entries(obj);
|
|
1154
1135
|
var booleanToString = (bool) => bool.toString();
|
|
@@ -1295,7 +1276,7 @@ var makePropertyRenamers = (data, set, stableKeyMapRef) => mapObject(
|
|
|
1295
1276
|
);
|
|
1296
1277
|
var makePropertyRemovers = (data, set) => mapObject(data, (_, key) => () => {
|
|
1297
1278
|
set(() => {
|
|
1298
|
-
const
|
|
1279
|
+
const _a = data, rest = __objRest(_a, [__restKey(key)]);
|
|
1299
1280
|
return rest;
|
|
1300
1281
|
});
|
|
1301
1282
|
});
|
|
@@ -1347,7 +1328,7 @@ var ObjectEditor = ({
|
|
|
1347
1328
|
set,
|
|
1348
1329
|
Components
|
|
1349
1330
|
}) => {
|
|
1350
|
-
var
|
|
1331
|
+
var _a;
|
|
1351
1332
|
const disabled = isReadonly(path);
|
|
1352
1333
|
const stableKeyMap = react.useRef(
|
|
1353
1334
|
Object.keys(data).reduce(
|
|
@@ -1365,7 +1346,7 @@ var ObjectEditor = ({
|
|
|
1365
1346
|
const sortProperties = makePropertySorter(data, set);
|
|
1366
1347
|
const makePropertyAdder = makePropertyCreationInterface(data, set);
|
|
1367
1348
|
const subSchema = isPlainObject(schema) ? findSubSchema(schema)(path) : true;
|
|
1368
|
-
const schemaKeys = isLiteral(true)(subSchema) ? true : isObjectSchema(subSchema) ? Object.keys((
|
|
1349
|
+
const schemaKeys = isLiteral(true)(subSchema) ? true : isObjectSchema(subSchema) ? Object.keys((_a = subSchema.properties) != null ? _a : {}) : [];
|
|
1369
1350
|
const dataKeys = Object.keys(data);
|
|
1370
1351
|
const [unofficialKeys, officialKeys] = dataKeys.reduce(
|
|
1371
1352
|
([unofficial, official], key) => {
|
|
@@ -1393,16 +1374,19 @@ var ObjectEditor = ({
|
|
|
1393
1374
|
const originalPath = [...path, originalKey];
|
|
1394
1375
|
const isOfficial = schemaKeys === true || schemaKeys.includes(key);
|
|
1395
1376
|
const isMissing = missingKeys.includes(key);
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1377
|
+
if (isMissing) {
|
|
1378
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1379
|
+
PropertyAdder,
|
|
1380
|
+
{
|
|
1381
|
+
propertyKey: key,
|
|
1382
|
+
addProperty: makePropertyAdder(key, `string`),
|
|
1383
|
+
disabled,
|
|
1384
|
+
Components
|
|
1385
|
+
},
|
|
1386
|
+
key + `IsMissing`
|
|
1387
|
+
);
|
|
1388
|
+
}
|
|
1389
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1406
1390
|
JsonEditor_INTERNAL,
|
|
1407
1391
|
{
|
|
1408
1392
|
schema,
|
|
@@ -1484,8 +1468,8 @@ var StringEditor = ({
|
|
|
1484
1468
|
) });
|
|
1485
1469
|
};
|
|
1486
1470
|
var DefaultFallback = ({ error, errorInfo }) => {
|
|
1487
|
-
var
|
|
1488
|
-
const component = (
|
|
1471
|
+
var _a, _b, _c;
|
|
1472
|
+
const component = (_a = errorInfo == null ? void 0 : errorInfo.componentStack) == null ? void 0 : _a.split(` `).filter(Boolean)[2];
|
|
1489
1473
|
const message = (_c = (_b = error == null ? void 0 : error.toString()) != null ? _b : errorInfo == null ? void 0 : errorInfo.componentStack) != null ? _c : `Unknown error`;
|
|
1490
1474
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1491
1475
|
"div",
|
|
@@ -1536,8 +1520,8 @@ var ErrorBoundary = class extends react.Component {
|
|
|
1536
1520
|
this.state = {};
|
|
1537
1521
|
}
|
|
1538
1522
|
componentDidCatch(error, errorInfo) {
|
|
1539
|
-
var
|
|
1540
|
-
(_b = (
|
|
1523
|
+
var _a, _b;
|
|
1524
|
+
(_b = (_a = this.props).onError) == null ? void 0 : _b.call(_a, error, errorInfo);
|
|
1541
1525
|
this.setState({
|
|
1542
1526
|
error,
|
|
1543
1527
|
errorInfo
|
|
@@ -1689,7 +1673,7 @@ var findStateTypeState = atom_io.selectorFamily({
|
|
|
1689
1673
|
}
|
|
1690
1674
|
});
|
|
1691
1675
|
var StateIndexLeafNode = ({ node, isOpenState, typeState }) => {
|
|
1692
|
-
var
|
|
1676
|
+
var _a, _b;
|
|
1693
1677
|
const setIsOpen = react$1.useI(isOpenState);
|
|
1694
1678
|
const isOpen = react$1.useO(isOpenState);
|
|
1695
1679
|
const state = react$1.useO(node);
|
|
@@ -1716,7 +1700,7 @@ var StateIndexLeafNode = ({ node, isOpenState, typeState }) => {
|
|
|
1716
1700
|
console.log(node, atom_io.getState(node));
|
|
1717
1701
|
},
|
|
1718
1702
|
children: [
|
|
1719
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { children: (_b = (
|
|
1703
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { children: (_b = (_a = node.family) == null ? void 0 : _a.subKey) != null ? _b : node.key }),
|
|
1720
1704
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "type detail", children: [
|
|
1721
1705
|
"(",
|
|
1722
1706
|
stateType,
|
|
@@ -1854,14 +1838,17 @@ var TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
|
|
|
1854
1838
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "transaction_impact", children: [
|
|
1855
1839
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "detail", children: "impact: " }),
|
|
1856
1840
|
transactionUpdate.updates.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((update, index) => {
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1841
|
+
if (`newValue` in update) {
|
|
1842
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1843
|
+
article.AtomUpdate,
|
|
1844
|
+
{
|
|
1845
|
+
serialNumber: index,
|
|
1846
|
+
atomUpdate: update
|
|
1847
|
+
},
|
|
1848
|
+
`${transactionUpdate.key}:${index}:${update.key}`
|
|
1849
|
+
);
|
|
1850
|
+
}
|
|
1851
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1865
1852
|
TransactionUpdateFC,
|
|
1866
1853
|
{
|
|
1867
1854
|
serialNumber: index,
|