atom.io 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +69 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +66 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -3
- package/src/react-explorer/explorer-effects.ts +3 -3
- package/src/react-explorer/space-states.ts +3 -3
package/dist/index.js
CHANGED
|
@@ -215,8 +215,62 @@ var become = (nextVersionOfThing) => (originalThing) => nextVersionOfThing insta
|
|
|
215
215
|
) : nextVersionOfThing;
|
|
216
216
|
var pass = (...params) => (fn) => fn(...params);
|
|
217
217
|
|
|
218
|
-
//
|
|
219
|
-
|
|
218
|
+
// ../../node_modules/.pnpm/fp-ts@2.16.0/node_modules/fp-ts/es6/function.js
|
|
219
|
+
function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
|
|
220
|
+
switch (arguments.length) {
|
|
221
|
+
case 1:
|
|
222
|
+
return a;
|
|
223
|
+
case 2:
|
|
224
|
+
return ab(a);
|
|
225
|
+
case 3:
|
|
226
|
+
return bc(ab(a));
|
|
227
|
+
case 4:
|
|
228
|
+
return cd(bc(ab(a)));
|
|
229
|
+
case 5:
|
|
230
|
+
return de(cd(bc(ab(a))));
|
|
231
|
+
case 6:
|
|
232
|
+
return ef(de(cd(bc(ab(a)))));
|
|
233
|
+
case 7:
|
|
234
|
+
return fg(ef(de(cd(bc(ab(a))))));
|
|
235
|
+
case 8:
|
|
236
|
+
return gh(fg(ef(de(cd(bc(ab(a)))))));
|
|
237
|
+
case 9:
|
|
238
|
+
return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
|
|
239
|
+
default: {
|
|
240
|
+
var ret = arguments[0];
|
|
241
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
242
|
+
ret = arguments[i](ret);
|
|
243
|
+
}
|
|
244
|
+
return ret;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// ../../node_modules/.pnpm/fp-ts@2.16.0/node_modules/fp-ts/es6/string.js
|
|
250
|
+
var Eq = {
|
|
251
|
+
equals: function(first, second) {
|
|
252
|
+
return first === second;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
var Semigroup = {
|
|
256
|
+
concat: function(first, second) {
|
|
257
|
+
return first + second;
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
var empty = "";
|
|
261
|
+
var Monoid = {
|
|
262
|
+
concat: Semigroup.concat,
|
|
263
|
+
empty
|
|
264
|
+
};
|
|
265
|
+
var Ord = {
|
|
266
|
+
equals: Eq.equals,
|
|
267
|
+
compare: function(first, second) {
|
|
268
|
+
return first < second ? -1 : first > second ? 1 : 0;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
var isString = function(u) {
|
|
272
|
+
return typeof u === "string";
|
|
273
|
+
};
|
|
220
274
|
|
|
221
275
|
// ../anvl/src/array/venn.ts
|
|
222
276
|
var includesAll = (items) => (array) => {
|
|
@@ -237,9 +291,6 @@ var addTo = (a) => (x) => a.includes(x) ? a : [...a, x];
|
|
|
237
291
|
var isEmptyArray = (input) => Array.isArray(input) && input.length === 0;
|
|
238
292
|
var isOneOf = (...args) => (input) => args.includes(input);
|
|
239
293
|
|
|
240
|
-
// ../anvl/src/object/refinement.ts
|
|
241
|
-
var import_function2 = require("fp-ts/function");
|
|
242
|
-
|
|
243
294
|
// ../anvl/src/object/access.ts
|
|
244
295
|
var access = (k) => Object.assign((obj) => obj[k], {
|
|
245
296
|
in: (obj) => obj[k]
|
|
@@ -250,8 +301,7 @@ var recordToEntries = (obj) => Object.entries(obj);
|
|
|
250
301
|
var entriesToRecord = (entries) => Object.fromEntries(entries);
|
|
251
302
|
|
|
252
303
|
// ../anvl/src/object/mapObject.ts
|
|
253
|
-
var
|
|
254
|
-
var mapObject = (obj, fn) => (0, import_function.pipe)(
|
|
304
|
+
var mapObject = (obj, fn) => pipe(
|
|
255
305
|
obj,
|
|
256
306
|
recordToEntries,
|
|
257
307
|
map(([key, val]) => [key, fn(val, key)]),
|
|
@@ -273,14 +323,14 @@ var hasProperties = (isValue, options = { allowExtraProperties: false }) => {
|
|
|
273
323
|
isValue
|
|
274
324
|
).map(([k, v]) => String(k) + `:` + v.name).join(`,`)}}`;
|
|
275
325
|
const _ = {
|
|
276
|
-
[name]: (input) => isPlainObject(input) &&
|
|
326
|
+
[name]: (input) => isPlainObject(input) && pipe(
|
|
277
327
|
isValue,
|
|
278
328
|
Object.entries,
|
|
279
329
|
every(([key, val]) => key in input || val(void 0))
|
|
280
|
-
) &&
|
|
330
|
+
) && pipe(
|
|
281
331
|
input,
|
|
282
332
|
mob(
|
|
283
|
-
(val, key) =>
|
|
333
|
+
(val, key) => pipe(
|
|
284
334
|
isValue,
|
|
285
335
|
access(key),
|
|
286
336
|
ifNullish(() => options.allowExtraProperties),
|
|
@@ -360,8 +410,8 @@ var isRelationData = ({
|
|
|
360
410
|
isContent
|
|
361
411
|
} = {}) => (input) => {
|
|
362
412
|
return hasExactProperties({
|
|
363
|
-
contents: isContent ? isRecord(
|
|
364
|
-
relations: isRecord(
|
|
413
|
+
contents: isContent ? isRecord(isString, isContent) : hasExactProperties({}),
|
|
414
|
+
relations: isRecord(isString, isArray(isString)),
|
|
365
415
|
relationType: isRelationType,
|
|
366
416
|
a: isLiteral(a),
|
|
367
417
|
b: isLiteral(b)
|
|
@@ -398,9 +448,6 @@ var makeJsonInterface = (join, ...params) => {
|
|
|
398
448
|
};
|
|
399
449
|
};
|
|
400
450
|
|
|
401
|
-
// ../anvl/src/join/relation-contents.ts
|
|
402
|
-
var import_function6 = require("fp-ts/function");
|
|
403
|
-
|
|
404
451
|
// ../anvl/src/join/relation-record.ts
|
|
405
452
|
var getRelationEntries = (relationMap, idA) => getRelatedIds(relationMap, idA).map((idB) => [
|
|
406
453
|
idB,
|
|
@@ -408,12 +455,7 @@ var getRelationEntries = (relationMap, idA) => getRelatedIds(relationMap, idA).m
|
|
|
408
455
|
]);
|
|
409
456
|
var getRelationRecord = (relationMap, id) => Object.fromEntries(getRelationEntries(relationMap, id));
|
|
410
457
|
|
|
411
|
-
// ../anvl/src/join/remove-relation.ts
|
|
412
|
-
var import_function5 = require("fp-ts/function");
|
|
413
|
-
var import_string2 = require("fp-ts/string");
|
|
414
|
-
|
|
415
458
|
// ../anvl/src/object/index.ts
|
|
416
|
-
var import_function4 = require("fp-ts/function");
|
|
417
459
|
var treeShake = (shouldDiscard = isUndefined) => (obj) => {
|
|
418
460
|
const newObj = {};
|
|
419
461
|
const entries = Object.entries(obj);
|
|
@@ -430,7 +472,7 @@ var split = (separator) => (str) => str.split(separator);
|
|
|
430
472
|
var removeSpecific = (current, idA, idB) => {
|
|
431
473
|
const isIdForRemoval = isOneOf(idA, idB);
|
|
432
474
|
return __spreadProps(__spreadValues({}, current), {
|
|
433
|
-
relations:
|
|
475
|
+
relations: pipe(
|
|
434
476
|
current.relations,
|
|
435
477
|
recordToEntries,
|
|
436
478
|
map(([id, relations]) => [
|
|
@@ -440,17 +482,17 @@ var removeSpecific = (current, idA, idB) => {
|
|
|
440
482
|
entriesToRecord,
|
|
441
483
|
treeShake(isEmptyArray)
|
|
442
484
|
),
|
|
443
|
-
contents:
|
|
485
|
+
contents: pipe(
|
|
444
486
|
current.contents,
|
|
445
487
|
treeShake(
|
|
446
|
-
(_, key) =>
|
|
488
|
+
(_, key) => isString(key) && pipe(key, split(`/`), comprises([idA, idB]))
|
|
447
489
|
)
|
|
448
490
|
)
|
|
449
491
|
});
|
|
450
492
|
};
|
|
451
493
|
var removeAll = (current, idToRemove) => {
|
|
452
494
|
const next = __spreadProps(__spreadValues({}, current), {
|
|
453
|
-
relations:
|
|
495
|
+
relations: pipe(
|
|
454
496
|
current.relations,
|
|
455
497
|
recordToEntries,
|
|
456
498
|
map(([id, relations]) => [
|
|
@@ -460,10 +502,10 @@ var removeAll = (current, idToRemove) => {
|
|
|
460
502
|
entriesToRecord,
|
|
461
503
|
treeShake((val, key) => key === idToRemove || isEmptyArray(val))
|
|
462
504
|
),
|
|
463
|
-
contents:
|
|
505
|
+
contents: pipe(
|
|
464
506
|
current.contents,
|
|
465
507
|
treeShake(
|
|
466
|
-
(_, key) =>
|
|
508
|
+
(_, key) => isString(key) && key.split(`/`).includes(idToRemove)
|
|
467
509
|
)
|
|
468
510
|
)
|
|
469
511
|
});
|
|
@@ -545,7 +587,7 @@ var getRelations = (relationMap, id) => getRelationEntries(relationMap, id).map(
|
|
|
545
587
|
var setRelations = (current, subject, relations) => {
|
|
546
588
|
const idA = subject[current.a];
|
|
547
589
|
const idB = subject[current.b];
|
|
548
|
-
return
|
|
590
|
+
return pipe(
|
|
549
591
|
current,
|
|
550
592
|
(relationData) => {
|
|
551
593
|
const relatedIds = getRelatedIds(current, idA);
|
|
@@ -887,7 +929,6 @@ function atom__INTERNAL(options, family, store = IMPLICIT.STORE) {
|
|
|
887
929
|
}
|
|
888
930
|
|
|
889
931
|
// ../anvl/src/json/index.ts
|
|
890
|
-
var import_function8 = require("fp-ts/function");
|
|
891
932
|
var stringifyJson = (json) => JSON.stringify(json);
|
|
892
933
|
|
|
893
934
|
// src/internal/families-internal.ts
|