@valbuild/react 0.148.2 → 0.148.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/analytics/dist/valbuild-react-analytics.browser.esm.js +950 -0
  3. package/analytics/dist/valbuild-react-analytics.cjs.d.ts +2 -0
  4. package/analytics/dist/valbuild-react-analytics.cjs.dev.js +962 -0
  5. package/analytics/dist/valbuild-react-analytics.cjs.js +7 -0
  6. package/analytics/dist/valbuild-react-analytics.cjs.prod.js +962 -0
  7. package/analytics/dist/valbuild-react-analytics.esm.js +953 -0
  8. package/analytics/dist/valbuild-react-analytics.worker.esm.js +232 -0
  9. package/analytics/package.json +7 -0
  10. package/dist/createForOfIteratorHelper-69c4a419.esm.js +52 -0
  11. package/dist/createForOfIteratorHelper-6f9dc6fa.cjs.prod.js +54 -0
  12. package/dist/createForOfIteratorHelper-73fe9a1a.worker.esm.js +52 -0
  13. package/dist/createForOfIteratorHelper-8a871dc3.cjs.dev.js +54 -0
  14. package/dist/createForOfIteratorHelper-c0be3691.browser.esm.js +52 -0
  15. package/dist/declarations/src/analytics/beacon.d.ts +80 -0
  16. package/dist/declarations/src/analytics/index.d.ts +3 -0
  17. package/dist/declarations/src/analytics/splitValPaths.d.ts +12 -0
  18. package/dist/declarations/src/analytics/tracker.d.ts +64 -0
  19. package/dist/{raw-eda286dd.cjs.dev.js → raw-c2b82a01.cjs.dev.js} +23 -71
  20. package/dist/{raw-7aae8bf6.esm.js → raw-cd78aea7.browser.esm.js} +4 -51
  21. package/dist/{raw-00151a05.worker.esm.js → raw-d156d004.worker.esm.js} +4 -51
  22. package/dist/{raw-9bb55a5f.browser.esm.js → raw-d43ba7b8.esm.js} +4 -51
  23. package/dist/{raw-f3f7e399.cjs.prod.js → raw-de29c973.cjs.prod.js} +23 -71
  24. package/dist/{slicedToArray-e9e8e991.cjs.dev.js → slicedToArray-387314c6.cjs.dev.js} +0 -11
  25. package/dist/{slicedToArray-0c0a3b4a.esm.js → slicedToArray-3d4c6640.esm.js} +1 -11
  26. package/dist/{slicedToArray-86004d59.cjs.prod.js → slicedToArray-64c83d56.cjs.prod.js} +0 -11
  27. package/dist/{slicedToArray-7d0170b6.worker.esm.js → slicedToArray-8b1a55e5.worker.esm.js} +1 -11
  28. package/dist/{slicedToArray-9cce0d9f.browser.esm.js → slicedToArray-8f9b0d84.browser.esm.js} +1 -11
  29. package/dist/toConsumableArray-203e636a.cjs.prod.js +21 -0
  30. package/dist/toConsumableArray-5335b4b0.worker.esm.js +19 -0
  31. package/dist/toConsumableArray-991f680f.browser.esm.js +19 -0
  32. package/dist/toConsumableArray-c950e394.esm.js +19 -0
  33. package/dist/toConsumableArray-d7cf1601.cjs.dev.js +21 -0
  34. package/dist/typeof-16428c61.cjs.prod.js +13 -0
  35. package/dist/typeof-9915e135.browser.esm.js +11 -0
  36. package/dist/typeof-a1531d8f.esm.js +11 -0
  37. package/dist/typeof-b568f48f.cjs.dev.js +13 -0
  38. package/dist/typeof-e0c837cc.worker.esm.js +11 -0
  39. package/internal/dist/valbuild-react-internal.browser.esm.js +5 -18
  40. package/internal/dist/valbuild-react-internal.cjs.dev.js +6 -19
  41. package/internal/dist/valbuild-react-internal.cjs.prod.js +6 -19
  42. package/internal/dist/valbuild-react-internal.esm.js +5 -18
  43. package/internal/dist/valbuild-react-internal.worker.esm.js +5 -18
  44. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.browser.esm.js +2 -1
  45. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.dev.js +3 -2
  46. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.prod.js +3 -2
  47. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.esm.js +2 -1
  48. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.worker.esm.js +2 -1
  49. package/jsx-runtime/dist/valbuild-react-jsx-runtime.browser.esm.js +2 -1
  50. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.dev.js +3 -2
  51. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.prod.js +3 -2
  52. package/jsx-runtime/dist/valbuild-react-jsx-runtime.esm.js +2 -1
  53. package/jsx-runtime/dist/valbuild-react-jsx-runtime.worker.esm.js +2 -1
  54. package/package.json +15 -5
  55. package/stega/dist/valbuild-react-stega.browser.esm.js +5 -3
  56. package/stega/dist/valbuild-react-stega.cjs.dev.js +8 -6
  57. package/stega/dist/valbuild-react-stega.cjs.prod.js +8 -6
  58. package/stega/dist/valbuild-react-stega.esm.js +5 -3
  59. package/stega/dist/valbuild-react-stega.worker.esm.js +5 -3
@@ -1,70 +1,23 @@
1
1
  'use strict';
2
2
 
3
- var slicedToArray = require('./slicedToArray-e9e8e991.cjs.dev.js');
3
+ var _typeof = require('./typeof-b568f48f.cjs.dev.js');
4
+ var createForOfIteratorHelper = require('./createForOfIteratorHelper-8a871dc3.cjs.dev.js');
4
5
  var core = require('@valbuild/core');
5
6
  var stega = require('@vercel/stega');
6
-
7
- function _createForOfIteratorHelper(r, e) {
8
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
9
- if (!t) {
10
- if (Array.isArray(r) || (t = slicedToArray._unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
11
- t && (r = t);
12
- var n = 0,
13
- F = function () {};
14
- return {
15
- s: F,
16
- n: function () {
17
- return n >= r.length ? {
18
- done: !0
19
- } : {
20
- done: !1,
21
- value: r[n++]
22
- };
23
- },
24
- e: function (r) {
25
- throw r;
26
- },
27
- f: F
28
- };
29
- }
30
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
31
- }
32
- var o,
33
- a = !0,
34
- u = !1;
35
- return {
36
- s: function () {
37
- t = t.call(r);
38
- },
39
- n: function () {
40
- var r = t.next();
41
- return a = r.done, r;
42
- },
43
- e: function (r) {
44
- u = !0, o = r;
45
- },
46
- f: function () {
47
- try {
48
- a || null == t.return || t.return();
49
- } finally {
50
- if (u) throw o;
51
- }
52
- }
53
- };
54
- }
7
+ var slicedToArray = require('./slicedToArray-387314c6.cjs.dev.js');
55
8
 
56
9
  function stegaDecodeStrings(encodedString) {
57
10
  if (!encodedString || typeof encodedString !== "string") return;
58
11
  var encodedBits = stega.vercelStegaDecodeAll(encodedString);
59
12
  var paths = [];
60
13
  if (!encodedBits) return;
61
- var _iterator = _createForOfIteratorHelper(encodedBits),
14
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(encodedBits),
62
15
  _step;
63
16
  try {
64
17
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
65
18
  var encodedBit = _step.value;
66
- if (encodedBit && slicedToArray._typeof(encodedBit) === "object") {
67
- if ("origin" in encodedBit && "data" in encodedBit && slicedToArray._typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
19
+ if (encodedBit && _typeof._typeof(encodedBit) === "object") {
20
+ if ("origin" in encodedBit && "data" in encodedBit && _typeof._typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
68
21
  paths.push(encodedBit.data.valPath);
69
22
  }
70
23
  }
@@ -205,7 +158,7 @@ function _objectSpread2(e) {
205
158
  */
206
159
  function resolveDiscriminatedUnionVariant(source, schema) {
207
160
  var schemaKey = schema.key;
208
- if (!source || slicedToArray._typeof(source) !== "object" || Array.isArray(source)) {
161
+ if (!source || _typeof._typeof(source) !== "object" || Array.isArray(source)) {
209
162
  return null;
210
163
  }
211
164
  var key = source[schemaKey];
@@ -276,7 +229,7 @@ function handleRichTextSchema(sourceOrSelector, recOpts, rec) {
276
229
  });
277
230
  });
278
231
  return arraySelector;
279
- } else if (slicedToArray._typeof(sourceOrSelector) === "object") {
232
+ } else if (_typeof._typeof(sourceOrSelector) === "object") {
280
233
  if (!sourceOrSelector) {
281
234
  return null;
282
235
  }
@@ -404,7 +357,7 @@ function stegaEncode(input, opts) {
404
357
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isRichTextSchema(recOpts.schema)) {
405
358
  return handleRichTextSchema(sourceOrSelector, recOpts, rec);
406
359
  }
407
- if (recOpts && isVideoSchema(recOpts.schema) && sourceOrSelector && slicedToArray._typeof(sourceOrSelector) === "object") {
360
+ if (recOpts && isVideoSchema(recOpts.schema) && sourceOrSelector && _typeof._typeof(sourceOrSelector) === "object") {
408
361
  // A set-backed video gets its mimeType, size and length from the set
409
362
  // first — `Video` promises a `mimeType`, and the field has none — and
410
363
  // every choice it did not make itself: the set's poster, times,
@@ -414,7 +367,7 @@ function stegaEncode(input, opts) {
414
367
  return rec(core.Internal.mediaUrl(video), recOpts);
415
368
  });
416
369
  }
417
- if (recOpts && (isImageSchema(recOpts.schema) || isFileSchema(recOpts.schema)) && sourceOrSelector && slicedToArray._typeof(sourceOrSelector) === "object") {
370
+ if (recOpts && (isImageSchema(recOpts.schema) || isFileSchema(recOpts.schema)) && sourceOrSelector && _typeof._typeof(sourceOrSelector) === "object") {
418
371
  var _src = core.Internal.media.fillFromGallery(sourceOrSelector, recOpts.schema, getGallery);
419
372
  // `url` carries the edit tag, so a click on an image reaches its field.
420
373
  // `path` must stay raw: it is what the URL was derived from.
@@ -422,7 +375,7 @@ function stegaEncode(input, opts) {
422
375
  url: rec(core.Internal.mediaUrl(_src), recOpts)
423
376
  });
424
377
  }
425
- if (slicedToArray._typeof(sourceOrSelector) === "object") {
378
+ if (_typeof._typeof(sourceOrSelector) === "object") {
426
379
  if (!sourceOrSelector) {
427
380
  return null;
428
381
  }
@@ -434,7 +387,7 @@ function stegaEncode(input, opts) {
434
387
  // the serialized schema, which carries a path and not a module. Merged
435
388
  // rather than replaced: a handle resolved by `useVal` re-enters here as
436
389
  // its own module, and its parent's views must stay resolvable.
437
- var _iterator = _createForOfIteratorHelper(core.Internal.viewModulesOf(newSchema)),
390
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(core.Internal.viewModulesOf(newSchema)),
438
391
  _step;
439
392
  try {
440
393
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -448,7 +401,7 @@ function stegaEncode(input, opts) {
448
401
  } finally {
449
402
  _iterator.f();
450
403
  }
451
- var _iterator2 = _createForOfIteratorHelper(core.Internal.media.galleriesOf(newSchema)),
404
+ var _iterator2 = createForOfIteratorHelper._createForOfIteratorHelper(core.Internal.media.galleriesOf(newSchema)),
452
405
  _step2;
453
406
  try {
454
407
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -489,7 +442,7 @@ function stegaEncode(input, opts) {
489
442
  }
490
443
  return res;
491
444
  }
492
- core.Internal.log.error("Could not transform source selector: ".concat(slicedToArray._typeof(sourceOrSelector), " (array: ").concat(Array.isArray(sourceOrSelector), ")"), sourceOrSelector);
445
+ core.Internal.log.error("Could not transform source selector: ".concat(_typeof._typeof(sourceOrSelector), " (array: ").concat(Array.isArray(sourceOrSelector), ")"), sourceOrSelector);
493
446
  return sourceOrSelector;
494
447
  }
495
448
  if (typeof sourceOrSelector === "string") {
@@ -515,7 +468,7 @@ function stegaEncode(input, opts) {
515
468
  if (typeof sourceOrSelector === "number" || typeof sourceOrSelector === "boolean") {
516
469
  return sourceOrSelector;
517
470
  }
518
- core.Internal.log.error("Unexpected type of source selector: ".concat(slicedToArray._typeof(sourceOrSelector)));
471
+ core.Internal.log.error("Unexpected type of source selector: ".concat(_typeof._typeof(sourceOrSelector)));
519
472
  return sourceOrSelector;
520
473
  }
521
474
  return rec(input, opts.root);
@@ -582,7 +535,7 @@ function collectReferencedModulesFromSchema(schema, acc) {
582
535
  } else if (schema.type === "array" || schema.type === "record") {
583
536
  collectReferencedModulesFromSchema(schema.item, acc);
584
537
  } else if (schema.type === "discriminated-union") {
585
- var _iterator3 = _createForOfIteratorHelper(schema.items),
538
+ var _iterator3 = createForOfIteratorHelper._createForOfIteratorHelper(schema.items),
586
539
  _step3;
587
540
  try {
588
541
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -633,7 +586,7 @@ function getModuleIds(input) {
633
586
  if (resolved !== undefined) {
634
587
  return getModuleIds(resolved);
635
588
  }
636
- var cacheable = slicedToArray._typeof(input) === "object" && input !== null;
589
+ var cacheable = _typeof._typeof(input) === "object" && input !== null;
637
590
  if (cacheable) {
638
591
  var cached = moduleIdsCache.get(input);
639
592
  if (cached) {
@@ -643,7 +596,7 @@ function getModuleIds(input) {
643
596
  }
644
597
  var modules = new Set();
645
598
  function rec(sourceOrSelector) {
646
- if (slicedToArray._typeof(sourceOrSelector) === "object") {
599
+ if (_typeof._typeof(sourceOrSelector) === "object") {
647
600
  if (!sourceOrSelector) {
648
601
  return;
649
602
  }
@@ -671,7 +624,7 @@ function getModuleIds(input) {
671
624
  }
672
625
  return;
673
626
  }
674
- core.Internal.log.error("Could not transform source selector: ".concat(slicedToArray._typeof(sourceOrSelector), " (array: ").concat(Array.isArray(sourceOrSelector), ")"), sourceOrSelector);
627
+ core.Internal.log.error("Could not transform source selector: ".concat(_typeof._typeof(sourceOrSelector), " (array: ").concat(Array.isArray(sourceOrSelector), ")"), sourceOrSelector);
675
628
  return;
676
629
  }
677
630
  if (typeof sourceOrSelector === "string") {
@@ -680,7 +633,7 @@ function getModuleIds(input) {
680
633
  if (typeof sourceOrSelector === "number" || typeof sourceOrSelector === "boolean") {
681
634
  return;
682
635
  }
683
- core.Internal.log.error("Unexpected type of source selector: ".concat(slicedToArray._typeof(sourceOrSelector)));
636
+ core.Internal.log.error("Unexpected type of source selector: ".concat(_typeof._typeof(sourceOrSelector)));
684
637
  return;
685
638
  }
686
639
  rec(input);
@@ -700,7 +653,7 @@ function attrs(target) {
700
653
  if (typeof target === "string") {
701
654
  var paths = stegaDecodeStrings(target);
702
655
  if (paths) {
703
- var _iterator = _createForOfIteratorHelper(paths),
656
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(paths),
704
657
  _step;
705
658
  try {
706
659
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -714,7 +667,7 @@ function attrs(target) {
714
667
  }
715
668
  }
716
669
  }
717
- if (slicedToArray._typeof(target) === "object" && target !== null) {
670
+ if (_typeof._typeof(target) === "object" && target !== null) {
718
671
  var _path = core.Internal.getValPath(target);
719
672
  if (_path) {
720
673
  allPaths.add(_path);
@@ -740,7 +693,7 @@ function raw(val) {
740
693
  return raw(item);
741
694
  });
742
695
  }
743
- if (slicedToArray._typeof(val) === "object" && val !== null) {
696
+ if (_typeof._typeof(val) === "object" && val !== null) {
744
697
  var result = {};
745
698
  for (var _key in val) {
746
699
  if (Object.prototype.hasOwnProperty.call(val, _key)) {
@@ -752,7 +705,6 @@ function raw(val) {
752
705
  return val;
753
706
  }
754
707
 
755
- exports._createForOfIteratorHelper = _createForOfIteratorHelper;
756
708
  exports._objectSpread2 = _objectSpread2;
757
709
  exports.attrs = attrs;
758
710
  exports.getModuleIds = getModuleIds;
@@ -1,55 +1,8 @@
1
- import { b as _unsupportedIterableToArray, a as _typeof, _ as _slicedToArray } from './slicedToArray-0c0a3b4a.esm.js';
1
+ import { _ as _typeof } from './typeof-9915e135.browser.esm.js';
2
+ import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-c0be3691.browser.esm.js';
2
3
  import { Internal, isValViewSource } from '@valbuild/core';
3
4
  import { vercelStegaDecodeAll, vercelStegaSplit, vercelStegaCombine } from '@vercel/stega';
4
-
5
- function _createForOfIteratorHelper(r, e) {
6
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
7
- if (!t) {
8
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
9
- t && (r = t);
10
- var n = 0,
11
- F = function () {};
12
- return {
13
- s: F,
14
- n: function () {
15
- return n >= r.length ? {
16
- done: !0
17
- } : {
18
- done: !1,
19
- value: r[n++]
20
- };
21
- },
22
- e: function (r) {
23
- throw r;
24
- },
25
- f: F
26
- };
27
- }
28
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
29
- }
30
- var o,
31
- a = !0,
32
- u = !1;
33
- return {
34
- s: function () {
35
- t = t.call(r);
36
- },
37
- n: function () {
38
- var r = t.next();
39
- return a = r.done, r;
40
- },
41
- e: function (r) {
42
- u = !0, o = r;
43
- },
44
- f: function () {
45
- try {
46
- a || null == t.return || t.return();
47
- } finally {
48
- if (u) throw o;
49
- }
50
- }
51
- };
52
- }
5
+ import { _ as _slicedToArray } from './slicedToArray-8f9b0d84.browser.esm.js';
53
6
 
54
7
  function stegaDecodeStrings(encodedString) {
55
8
  if (!encodedString || typeof encodedString !== "string") return;
@@ -750,4 +703,4 @@ function raw(val) {
750
703
  return val;
751
704
  }
752
705
 
753
- export { _createForOfIteratorHelper as _, stegaEncode as a, stegaClean as b, attrs as c, _objectSpread2 as d, getModuleIds as g, raw as r, stegaDecodeStrings as s };
706
+ export { _objectSpread2 as _, stegaEncode as a, stegaClean as b, attrs as c, getModuleIds as g, raw as r, stegaDecodeStrings as s };
@@ -1,55 +1,8 @@
1
- import { b as _unsupportedIterableToArray, a as _typeof, _ as _slicedToArray } from './slicedToArray-7d0170b6.worker.esm.js';
1
+ import { _ as _typeof } from './typeof-e0c837cc.worker.esm.js';
2
+ import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-73fe9a1a.worker.esm.js';
2
3
  import { Internal, isValViewSource } from '@valbuild/core';
3
4
  import { vercelStegaDecodeAll, vercelStegaSplit, vercelStegaCombine } from '@vercel/stega';
4
-
5
- function _createForOfIteratorHelper(r, e) {
6
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
7
- if (!t) {
8
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
9
- t && (r = t);
10
- var n = 0,
11
- F = function () {};
12
- return {
13
- s: F,
14
- n: function () {
15
- return n >= r.length ? {
16
- done: !0
17
- } : {
18
- done: !1,
19
- value: r[n++]
20
- };
21
- },
22
- e: function (r) {
23
- throw r;
24
- },
25
- f: F
26
- };
27
- }
28
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
29
- }
30
- var o,
31
- a = !0,
32
- u = !1;
33
- return {
34
- s: function () {
35
- t = t.call(r);
36
- },
37
- n: function () {
38
- var r = t.next();
39
- return a = r.done, r;
40
- },
41
- e: function (r) {
42
- u = !0, o = r;
43
- },
44
- f: function () {
45
- try {
46
- a || null == t.return || t.return();
47
- } finally {
48
- if (u) throw o;
49
- }
50
- }
51
- };
52
- }
5
+ import { _ as _slicedToArray } from './slicedToArray-8b1a55e5.worker.esm.js';
53
6
 
54
7
  function stegaDecodeStrings(encodedString) {
55
8
  if (!encodedString || typeof encodedString !== "string") return;
@@ -750,4 +703,4 @@ function raw(val) {
750
703
  return val;
751
704
  }
752
705
 
753
- export { _createForOfIteratorHelper as _, stegaEncode as a, stegaClean as b, attrs as c, _objectSpread2 as d, getModuleIds as g, raw as r, stegaDecodeStrings as s };
706
+ export { _objectSpread2 as _, stegaEncode as a, stegaClean as b, attrs as c, getModuleIds as g, raw as r, stegaDecodeStrings as s };
@@ -1,55 +1,8 @@
1
- import { b as _unsupportedIterableToArray, a as _typeof, _ as _slicedToArray } from './slicedToArray-9cce0d9f.browser.esm.js';
1
+ import { _ as _typeof } from './typeof-a1531d8f.esm.js';
2
+ import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-69c4a419.esm.js';
2
3
  import { Internal, isValViewSource } from '@valbuild/core';
3
4
  import { vercelStegaDecodeAll, vercelStegaSplit, vercelStegaCombine } from '@vercel/stega';
4
-
5
- function _createForOfIteratorHelper(r, e) {
6
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
7
- if (!t) {
8
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
9
- t && (r = t);
10
- var n = 0,
11
- F = function () {};
12
- return {
13
- s: F,
14
- n: function () {
15
- return n >= r.length ? {
16
- done: !0
17
- } : {
18
- done: !1,
19
- value: r[n++]
20
- };
21
- },
22
- e: function (r) {
23
- throw r;
24
- },
25
- f: F
26
- };
27
- }
28
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
29
- }
30
- var o,
31
- a = !0,
32
- u = !1;
33
- return {
34
- s: function () {
35
- t = t.call(r);
36
- },
37
- n: function () {
38
- var r = t.next();
39
- return a = r.done, r;
40
- },
41
- e: function (r) {
42
- u = !0, o = r;
43
- },
44
- f: function () {
45
- try {
46
- a || null == t.return || t.return();
47
- } finally {
48
- if (u) throw o;
49
- }
50
- }
51
- };
52
- }
5
+ import { _ as _slicedToArray } from './slicedToArray-3d4c6640.esm.js';
53
6
 
54
7
  function stegaDecodeStrings(encodedString) {
55
8
  if (!encodedString || typeof encodedString !== "string") return;
@@ -750,4 +703,4 @@ function raw(val) {
750
703
  return val;
751
704
  }
752
705
 
753
- export { _createForOfIteratorHelper as _, stegaEncode as a, stegaClean as b, attrs as c, _objectSpread2 as d, getModuleIds as g, raw as r, stegaDecodeStrings as s };
706
+ export { _objectSpread2 as _, stegaEncode as a, stegaClean as b, attrs as c, getModuleIds as g, raw as r, stegaDecodeStrings as s };
@@ -1,70 +1,23 @@
1
1
  'use strict';
2
2
 
3
- var slicedToArray = require('./slicedToArray-86004d59.cjs.prod.js');
3
+ var _typeof = require('./typeof-16428c61.cjs.prod.js');
4
+ var createForOfIteratorHelper = require('./createForOfIteratorHelper-6f9dc6fa.cjs.prod.js');
4
5
  var core = require('@valbuild/core');
5
6
  var stega = require('@vercel/stega');
6
-
7
- function _createForOfIteratorHelper(r, e) {
8
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
9
- if (!t) {
10
- if (Array.isArray(r) || (t = slicedToArray._unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
11
- t && (r = t);
12
- var n = 0,
13
- F = function () {};
14
- return {
15
- s: F,
16
- n: function () {
17
- return n >= r.length ? {
18
- done: !0
19
- } : {
20
- done: !1,
21
- value: r[n++]
22
- };
23
- },
24
- e: function (r) {
25
- throw r;
26
- },
27
- f: F
28
- };
29
- }
30
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
31
- }
32
- var o,
33
- a = !0,
34
- u = !1;
35
- return {
36
- s: function () {
37
- t = t.call(r);
38
- },
39
- n: function () {
40
- var r = t.next();
41
- return a = r.done, r;
42
- },
43
- e: function (r) {
44
- u = !0, o = r;
45
- },
46
- f: function () {
47
- try {
48
- a || null == t.return || t.return();
49
- } finally {
50
- if (u) throw o;
51
- }
52
- }
53
- };
54
- }
7
+ var slicedToArray = require('./slicedToArray-64c83d56.cjs.prod.js');
55
8
 
56
9
  function stegaDecodeStrings(encodedString) {
57
10
  if (!encodedString || typeof encodedString !== "string") return;
58
11
  var encodedBits = stega.vercelStegaDecodeAll(encodedString);
59
12
  var paths = [];
60
13
  if (!encodedBits) return;
61
- var _iterator = _createForOfIteratorHelper(encodedBits),
14
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(encodedBits),
62
15
  _step;
63
16
  try {
64
17
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
65
18
  var encodedBit = _step.value;
66
- if (encodedBit && slicedToArray._typeof(encodedBit) === "object") {
67
- if ("origin" in encodedBit && "data" in encodedBit && slicedToArray._typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
19
+ if (encodedBit && _typeof._typeof(encodedBit) === "object") {
20
+ if ("origin" in encodedBit && "data" in encodedBit && _typeof._typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
68
21
  paths.push(encodedBit.data.valPath);
69
22
  }
70
23
  }
@@ -205,7 +158,7 @@ function _objectSpread2(e) {
205
158
  */
206
159
  function resolveDiscriminatedUnionVariant(source, schema) {
207
160
  var schemaKey = schema.key;
208
- if (!source || slicedToArray._typeof(source) !== "object" || Array.isArray(source)) {
161
+ if (!source || _typeof._typeof(source) !== "object" || Array.isArray(source)) {
209
162
  return null;
210
163
  }
211
164
  var key = source[schemaKey];
@@ -276,7 +229,7 @@ function handleRichTextSchema(sourceOrSelector, recOpts, rec) {
276
229
  });
277
230
  });
278
231
  return arraySelector;
279
- } else if (slicedToArray._typeof(sourceOrSelector) === "object") {
232
+ } else if (_typeof._typeof(sourceOrSelector) === "object") {
280
233
  if (!sourceOrSelector) {
281
234
  return null;
282
235
  }
@@ -404,7 +357,7 @@ function stegaEncode(input, opts) {
404
357
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isRichTextSchema(recOpts.schema)) {
405
358
  return handleRichTextSchema(sourceOrSelector, recOpts, rec);
406
359
  }
407
- if (recOpts && isVideoSchema(recOpts.schema) && sourceOrSelector && slicedToArray._typeof(sourceOrSelector) === "object") {
360
+ if (recOpts && isVideoSchema(recOpts.schema) && sourceOrSelector && _typeof._typeof(sourceOrSelector) === "object") {
408
361
  // A set-backed video gets its mimeType, size and length from the set
409
362
  // first — `Video` promises a `mimeType`, and the field has none — and
410
363
  // every choice it did not make itself: the set's poster, times,
@@ -414,7 +367,7 @@ function stegaEncode(input, opts) {
414
367
  return rec(core.Internal.mediaUrl(video), recOpts);
415
368
  });
416
369
  }
417
- if (recOpts && (isImageSchema(recOpts.schema) || isFileSchema(recOpts.schema)) && sourceOrSelector && slicedToArray._typeof(sourceOrSelector) === "object") {
370
+ if (recOpts && (isImageSchema(recOpts.schema) || isFileSchema(recOpts.schema)) && sourceOrSelector && _typeof._typeof(sourceOrSelector) === "object") {
418
371
  var _src = core.Internal.media.fillFromGallery(sourceOrSelector, recOpts.schema, getGallery);
419
372
  // `url` carries the edit tag, so a click on an image reaches its field.
420
373
  // `path` must stay raw: it is what the URL was derived from.
@@ -422,7 +375,7 @@ function stegaEncode(input, opts) {
422
375
  url: rec(core.Internal.mediaUrl(_src), recOpts)
423
376
  });
424
377
  }
425
- if (slicedToArray._typeof(sourceOrSelector) === "object") {
378
+ if (_typeof._typeof(sourceOrSelector) === "object") {
426
379
  if (!sourceOrSelector) {
427
380
  return null;
428
381
  }
@@ -434,7 +387,7 @@ function stegaEncode(input, opts) {
434
387
  // the serialized schema, which carries a path and not a module. Merged
435
388
  // rather than replaced: a handle resolved by `useVal` re-enters here as
436
389
  // its own module, and its parent's views must stay resolvable.
437
- var _iterator = _createForOfIteratorHelper(core.Internal.viewModulesOf(newSchema)),
390
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(core.Internal.viewModulesOf(newSchema)),
438
391
  _step;
439
392
  try {
440
393
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -448,7 +401,7 @@ function stegaEncode(input, opts) {
448
401
  } finally {
449
402
  _iterator.f();
450
403
  }
451
- var _iterator2 = _createForOfIteratorHelper(core.Internal.media.galleriesOf(newSchema)),
404
+ var _iterator2 = createForOfIteratorHelper._createForOfIteratorHelper(core.Internal.media.galleriesOf(newSchema)),
452
405
  _step2;
453
406
  try {
454
407
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -489,7 +442,7 @@ function stegaEncode(input, opts) {
489
442
  }
490
443
  return res;
491
444
  }
492
- core.Internal.log.error("Could not transform source selector: ".concat(slicedToArray._typeof(sourceOrSelector), " (array: ").concat(Array.isArray(sourceOrSelector), ")"), sourceOrSelector);
445
+ core.Internal.log.error("Could not transform source selector: ".concat(_typeof._typeof(sourceOrSelector), " (array: ").concat(Array.isArray(sourceOrSelector), ")"), sourceOrSelector);
493
446
  return sourceOrSelector;
494
447
  }
495
448
  if (typeof sourceOrSelector === "string") {
@@ -515,7 +468,7 @@ function stegaEncode(input, opts) {
515
468
  if (typeof sourceOrSelector === "number" || typeof sourceOrSelector === "boolean") {
516
469
  return sourceOrSelector;
517
470
  }
518
- core.Internal.log.error("Unexpected type of source selector: ".concat(slicedToArray._typeof(sourceOrSelector)));
471
+ core.Internal.log.error("Unexpected type of source selector: ".concat(_typeof._typeof(sourceOrSelector)));
519
472
  return sourceOrSelector;
520
473
  }
521
474
  return rec(input, opts.root);
@@ -582,7 +535,7 @@ function collectReferencedModulesFromSchema(schema, acc) {
582
535
  } else if (schema.type === "array" || schema.type === "record") {
583
536
  collectReferencedModulesFromSchema(schema.item, acc);
584
537
  } else if (schema.type === "discriminated-union") {
585
- var _iterator3 = _createForOfIteratorHelper(schema.items),
538
+ var _iterator3 = createForOfIteratorHelper._createForOfIteratorHelper(schema.items),
586
539
  _step3;
587
540
  try {
588
541
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -633,7 +586,7 @@ function getModuleIds(input) {
633
586
  if (resolved !== undefined) {
634
587
  return getModuleIds(resolved);
635
588
  }
636
- var cacheable = slicedToArray._typeof(input) === "object" && input !== null;
589
+ var cacheable = _typeof._typeof(input) === "object" && input !== null;
637
590
  if (cacheable) {
638
591
  var cached = moduleIdsCache.get(input);
639
592
  if (cached) {
@@ -643,7 +596,7 @@ function getModuleIds(input) {
643
596
  }
644
597
  var modules = new Set();
645
598
  function rec(sourceOrSelector) {
646
- if (slicedToArray._typeof(sourceOrSelector) === "object") {
599
+ if (_typeof._typeof(sourceOrSelector) === "object") {
647
600
  if (!sourceOrSelector) {
648
601
  return;
649
602
  }
@@ -671,7 +624,7 @@ function getModuleIds(input) {
671
624
  }
672
625
  return;
673
626
  }
674
- core.Internal.log.error("Could not transform source selector: ".concat(slicedToArray._typeof(sourceOrSelector), " (array: ").concat(Array.isArray(sourceOrSelector), ")"), sourceOrSelector);
627
+ core.Internal.log.error("Could not transform source selector: ".concat(_typeof._typeof(sourceOrSelector), " (array: ").concat(Array.isArray(sourceOrSelector), ")"), sourceOrSelector);
675
628
  return;
676
629
  }
677
630
  if (typeof sourceOrSelector === "string") {
@@ -680,7 +633,7 @@ function getModuleIds(input) {
680
633
  if (typeof sourceOrSelector === "number" || typeof sourceOrSelector === "boolean") {
681
634
  return;
682
635
  }
683
- core.Internal.log.error("Unexpected type of source selector: ".concat(slicedToArray._typeof(sourceOrSelector)));
636
+ core.Internal.log.error("Unexpected type of source selector: ".concat(_typeof._typeof(sourceOrSelector)));
684
637
  return;
685
638
  }
686
639
  rec(input);
@@ -700,7 +653,7 @@ function attrs(target) {
700
653
  if (typeof target === "string") {
701
654
  var paths = stegaDecodeStrings(target);
702
655
  if (paths) {
703
- var _iterator = _createForOfIteratorHelper(paths),
656
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(paths),
704
657
  _step;
705
658
  try {
706
659
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -714,7 +667,7 @@ function attrs(target) {
714
667
  }
715
668
  }
716
669
  }
717
- if (slicedToArray._typeof(target) === "object" && target !== null) {
670
+ if (_typeof._typeof(target) === "object" && target !== null) {
718
671
  var _path = core.Internal.getValPath(target);
719
672
  if (_path) {
720
673
  allPaths.add(_path);
@@ -740,7 +693,7 @@ function raw(val) {
740
693
  return raw(item);
741
694
  });
742
695
  }
743
- if (slicedToArray._typeof(val) === "object" && val !== null) {
696
+ if (_typeof._typeof(val) === "object" && val !== null) {
744
697
  var result = {};
745
698
  for (var _key in val) {
746
699
  if (Object.prototype.hasOwnProperty.call(val, _key)) {
@@ -752,7 +705,6 @@ function raw(val) {
752
705
  return val;
753
706
  }
754
707
 
755
- exports._createForOfIteratorHelper = _createForOfIteratorHelper;
756
708
  exports._objectSpread2 = _objectSpread2;
757
709
  exports.attrs = attrs;
758
710
  exports.getModuleIds = getModuleIds;
@@ -1,15 +1,5 @@
1
1
  'use strict';
2
2
 
3
- function _typeof(o) {
4
- "@babel/helpers - typeof";
5
-
6
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
- return typeof o;
8
- } : function (o) {
9
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
- }, _typeof(o);
11
- }
12
-
13
3
  function _arrayWithHoles(r) {
14
4
  if (Array.isArray(r)) return r;
15
5
  }
@@ -66,5 +56,4 @@ function _slicedToArray(r, e) {
66
56
 
67
57
  exports._arrayLikeToArray = _arrayLikeToArray;
68
58
  exports._slicedToArray = _slicedToArray;
69
- exports._typeof = _typeof;
70
59
  exports._unsupportedIterableToArray = _unsupportedIterableToArray;