@valbuild/react 0.150.5 → 0.150.6

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 (23) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/analytics/dist/valbuild-react-analytics.browser.esm.js +1 -1
  3. package/analytics/dist/valbuild-react-analytics.esm.js +1 -1
  4. package/analytics/dist/valbuild-react-analytics.worker.esm.js +1 -1
  5. package/dist/{createForOfIteratorHelper-36020cf7.browser.esm.js → createForOfIteratorHelper-3316a633.browser.esm.js} +1 -1
  6. package/dist/{createForOfIteratorHelper-02fbe55e.worker.esm.js → createForOfIteratorHelper-548f1578.worker.esm.js} +1 -1
  7. package/dist/{createForOfIteratorHelper-8a8caaf6.esm.js → createForOfIteratorHelper-595d57b7.esm.js} +1 -1
  8. package/dist/{raw-c9cc9df6.esm.js → raw-1b40484b.esm.js} +25 -25
  9. package/dist/{raw-4d8c9599.worker.esm.js → raw-43f9221a.worker.esm.js} +25 -25
  10. package/dist/{raw-d34abe21.browser.esm.js → raw-be4b57fa.browser.esm.js} +25 -25
  11. package/internal/dist/valbuild-react-internal.browser.esm.js +2 -2
  12. package/internal/dist/valbuild-react-internal.cjs.dev.js +1 -1
  13. package/internal/dist/valbuild-react-internal.cjs.prod.js +1 -1
  14. package/internal/dist/valbuild-react-internal.esm.js +2 -2
  15. package/internal/dist/valbuild-react-internal.worker.esm.js +2 -2
  16. package/package.json +3 -3
  17. package/stega/dist/valbuild-react-stega.browser.esm.js +57 -5
  18. package/stega/dist/valbuild-react-stega.cjs.dev.js +55 -3
  19. package/stega/dist/valbuild-react-stega.cjs.prod.js +55 -3
  20. package/stega/dist/valbuild-react-stega.esm.js +57 -5
  21. package/stega/dist/valbuild-react-stega.worker.esm.js +57 -5
  22. package/dist/{raw-1617ec66.cjs.prod.js → raw-b3745603.cjs.prod.js} +24 -24
  23. package/dist/{raw-a62618f3.cjs.dev.js → raw-ff060f24.cjs.dev.js} +24 -24
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @valbuild/react
2
2
 
3
+ ## 0.150.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#962](https://github.com/valbuild/val/pull/962) [`f84222b`](https://github.com/valbuild/val/commit/f84222b2c902d8725b1da96f79481060fb8b9842) Thanks [@freekh](https://github.com/freekh)! - Text rendered through `React.createElement` no longer keeps Val's invisible edit tag. TanStack Router's `<Link>` renders its link that way, so with content analytics on, the text of a link built from content carried the tag on every visitor's page.
8
+
9
+ New: `import "@valbuild/tanstack/autotag"` as the first import of `src/router.tsx`. Under `vite dev`, components whose modules ran before `@valbuild/tanstack` was imported were not click-to-edit, and the leak warning named their text as leaked. A production build was not affected.
10
+
3
11
  ## 0.150.5
4
12
 
5
13
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  import { _ as _slicedToArray } from '../../dist/slicedToArray-b66ff800.browser.esm.js';
2
- import { a as _toConsumableArray, _ as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-36020cf7.browser.esm.js';
2
+ import { _ as _toConsumableArray, a as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-3316a633.browser.esm.js';
3
3
 
4
4
  /**
5
5
  * The analytics wire format, version 1: what the browser sends to
@@ -1,5 +1,5 @@
1
1
  import { _ as _slicedToArray } from '../../dist/slicedToArray-70ecb9da.esm.js';
2
- import { a as _toConsumableArray, _ as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-8a8caaf6.esm.js';
2
+ import { _ as _toConsumableArray, a as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-595d57b7.esm.js';
3
3
 
4
4
  /**
5
5
  * The analytics wire format, version 1: what the browser sends to
@@ -1,4 +1,4 @@
1
- import { a as _toConsumableArray, _ as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-02fbe55e.worker.esm.js';
1
+ import { _ as _toConsumableArray, a as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-548f1578.worker.esm.js';
2
2
  import { _ as _slicedToArray } from '../../dist/slicedToArray-106ca5f3.worker.esm.js';
3
3
 
4
4
  /**
@@ -65,4 +65,4 @@ function _createForOfIteratorHelper(r, e) {
65
65
  };
66
66
  }
67
67
 
68
- export { _createForOfIteratorHelper as _, _toConsumableArray as a };
68
+ export { _toConsumableArray as _, _createForOfIteratorHelper as a };
@@ -65,4 +65,4 @@ function _createForOfIteratorHelper(r, e) {
65
65
  };
66
66
  }
67
67
 
68
- export { _createForOfIteratorHelper as _, _toConsumableArray as a };
68
+ export { _toConsumableArray as _, _createForOfIteratorHelper as a };
@@ -65,4 +65,4 @@ function _createForOfIteratorHelper(r, e) {
65
65
  };
66
66
  }
67
67
 
68
- export { _createForOfIteratorHelper as _, _toConsumableArray as a };
68
+ export { _toConsumableArray as _, _createForOfIteratorHelper as a };
@@ -1,33 +1,9 @@
1
- import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-8a8caaf6.esm.js';
1
+ import { a as _createForOfIteratorHelper } from './createForOfIteratorHelper-595d57b7.esm.js';
2
2
  import { _ as _typeof } from './typeof-a1531d8f.esm.js';
3
3
  import { Internal, isValViewSource } from '@valbuild/core';
4
4
  import { vercelStegaDecodeAll, vercelStegaSplit, vercelStegaCombine } from '@vercel/stega';
5
5
  import { _ as _slicedToArray } from './slicedToArray-70ecb9da.esm.js';
6
6
 
7
- function stegaDecodeStrings(encodedString) {
8
- if (!encodedString || typeof encodedString !== "string") return;
9
- var encodedBits = vercelStegaDecodeAll(encodedString);
10
- var paths = [];
11
- if (!encodedBits) return;
12
- var _iterator = _createForOfIteratorHelper(encodedBits),
13
- _step;
14
- try {
15
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
16
- var encodedBit = _step.value;
17
- if (encodedBit && _typeof(encodedBit) === "object") {
18
- if ("origin" in encodedBit && "data" in encodedBit && _typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
19
- paths.push(encodedBit.data.valPath);
20
- }
21
- }
22
- }
23
- } catch (err) {
24
- _iterator.e(err);
25
- } finally {
26
- _iterator.f();
27
- }
28
- return paths.length > 0 ? paths : undefined;
29
- }
30
-
31
7
  function _toPrimitive(t, r) {
32
8
  if ("object" != typeof t || !t) return t;
33
9
  var e = t[Symbol.toPrimitive];
@@ -75,6 +51,30 @@ function _objectSpread2(e) {
75
51
  return e;
76
52
  }
77
53
 
54
+ function stegaDecodeStrings(encodedString) {
55
+ if (!encodedString || typeof encodedString !== "string") return;
56
+ var encodedBits = vercelStegaDecodeAll(encodedString);
57
+ var paths = [];
58
+ if (!encodedBits) return;
59
+ var _iterator = _createForOfIteratorHelper(encodedBits),
60
+ _step;
61
+ try {
62
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
63
+ var encodedBit = _step.value;
64
+ if (encodedBit && _typeof(encodedBit) === "object") {
65
+ if ("origin" in encodedBit && "data" in encodedBit && _typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
66
+ paths.push(encodedBit.data.valPath);
67
+ }
68
+ }
69
+ }
70
+ } catch (err) {
71
+ _iterator.e(err);
72
+ } finally {
73
+ _iterator.f();
74
+ }
75
+ return paths.length > 0 ? paths : undefined;
76
+ }
77
+
78
78
  /**
79
79
  * ValEncodedString is a string that is encoded using steganography.
80
80
  *
@@ -1,33 +1,9 @@
1
- import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-02fbe55e.worker.esm.js';
1
+ import { a as _createForOfIteratorHelper } from './createForOfIteratorHelper-548f1578.worker.esm.js';
2
2
  import { _ as _typeof } from './typeof-e0c837cc.worker.esm.js';
3
3
  import { Internal, isValViewSource } from '@valbuild/core';
4
4
  import { vercelStegaDecodeAll, vercelStegaSplit, vercelStegaCombine } from '@vercel/stega';
5
5
  import { _ as _slicedToArray } from './slicedToArray-106ca5f3.worker.esm.js';
6
6
 
7
- function stegaDecodeStrings(encodedString) {
8
- if (!encodedString || typeof encodedString !== "string") return;
9
- var encodedBits = vercelStegaDecodeAll(encodedString);
10
- var paths = [];
11
- if (!encodedBits) return;
12
- var _iterator = _createForOfIteratorHelper(encodedBits),
13
- _step;
14
- try {
15
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
16
- var encodedBit = _step.value;
17
- if (encodedBit && _typeof(encodedBit) === "object") {
18
- if ("origin" in encodedBit && "data" in encodedBit && _typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
19
- paths.push(encodedBit.data.valPath);
20
- }
21
- }
22
- }
23
- } catch (err) {
24
- _iterator.e(err);
25
- } finally {
26
- _iterator.f();
27
- }
28
- return paths.length > 0 ? paths : undefined;
29
- }
30
-
31
7
  function _toPrimitive(t, r) {
32
8
  if ("object" != typeof t || !t) return t;
33
9
  var e = t[Symbol.toPrimitive];
@@ -75,6 +51,30 @@ function _objectSpread2(e) {
75
51
  return e;
76
52
  }
77
53
 
54
+ function stegaDecodeStrings(encodedString) {
55
+ if (!encodedString || typeof encodedString !== "string") return;
56
+ var encodedBits = vercelStegaDecodeAll(encodedString);
57
+ var paths = [];
58
+ if (!encodedBits) return;
59
+ var _iterator = _createForOfIteratorHelper(encodedBits),
60
+ _step;
61
+ try {
62
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
63
+ var encodedBit = _step.value;
64
+ if (encodedBit && _typeof(encodedBit) === "object") {
65
+ if ("origin" in encodedBit && "data" in encodedBit && _typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
66
+ paths.push(encodedBit.data.valPath);
67
+ }
68
+ }
69
+ }
70
+ } catch (err) {
71
+ _iterator.e(err);
72
+ } finally {
73
+ _iterator.f();
74
+ }
75
+ return paths.length > 0 ? paths : undefined;
76
+ }
77
+
78
78
  /**
79
79
  * ValEncodedString is a string that is encoded using steganography.
80
80
  *
@@ -1,33 +1,9 @@
1
- import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-36020cf7.browser.esm.js';
1
+ import { a as _createForOfIteratorHelper } from './createForOfIteratorHelper-3316a633.browser.esm.js';
2
2
  import { _ as _typeof } from './typeof-9915e135.browser.esm.js';
3
3
  import { Internal, isValViewSource } from '@valbuild/core';
4
4
  import { vercelStegaDecodeAll, vercelStegaSplit, vercelStegaCombine } from '@vercel/stega';
5
5
  import { _ as _slicedToArray } from './slicedToArray-b66ff800.browser.esm.js';
6
6
 
7
- function stegaDecodeStrings(encodedString) {
8
- if (!encodedString || typeof encodedString !== "string") return;
9
- var encodedBits = vercelStegaDecodeAll(encodedString);
10
- var paths = [];
11
- if (!encodedBits) return;
12
- var _iterator = _createForOfIteratorHelper(encodedBits),
13
- _step;
14
- try {
15
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
16
- var encodedBit = _step.value;
17
- if (encodedBit && _typeof(encodedBit) === "object") {
18
- if ("origin" in encodedBit && "data" in encodedBit && _typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
19
- paths.push(encodedBit.data.valPath);
20
- }
21
- }
22
- }
23
- } catch (err) {
24
- _iterator.e(err);
25
- } finally {
26
- _iterator.f();
27
- }
28
- return paths.length > 0 ? paths : undefined;
29
- }
30
-
31
7
  function _toPrimitive(t, r) {
32
8
  if ("object" != typeof t || !t) return t;
33
9
  var e = t[Symbol.toPrimitive];
@@ -75,6 +51,30 @@ function _objectSpread2(e) {
75
51
  return e;
76
52
  }
77
53
 
54
+ function stegaDecodeStrings(encodedString) {
55
+ if (!encodedString || typeof encodedString !== "string") return;
56
+ var encodedBits = vercelStegaDecodeAll(encodedString);
57
+ var paths = [];
58
+ if (!encodedBits) return;
59
+ var _iterator = _createForOfIteratorHelper(encodedBits),
60
+ _step;
61
+ try {
62
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
63
+ var encodedBit = _step.value;
64
+ if (encodedBit && _typeof(encodedBit) === "object") {
65
+ if ("origin" in encodedBit && "data" in encodedBit && _typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
66
+ paths.push(encodedBit.data.valPath);
67
+ }
68
+ }
69
+ }
70
+ } catch (err) {
71
+ _iterator.e(err);
72
+ } finally {
73
+ _iterator.f();
74
+ }
75
+ return paths.length > 0 ? paths : undefined;
76
+ }
77
+
78
78
  /**
79
79
  * ValEncodedString is a string that is encoded using steganography.
80
80
  *
@@ -1,5 +1,5 @@
1
- import { a as _toConsumableArray } from '../../dist/createForOfIteratorHelper-36020cf7.browser.esm.js';
2
- import { _ as _objectSpread2, r as raw, c as attrs } from '../../dist/raw-d34abe21.browser.esm.js';
1
+ import { _ as _toConsumableArray } from '../../dist/createForOfIteratorHelper-3316a633.browser.esm.js';
2
+ import { _ as _objectSpread2, r as raw, c as attrs } from '../../dist/raw-be4b57fa.browser.esm.js';
3
3
  import React from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
  import '../../dist/slicedToArray-b66ff800.browser.esm.js';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var createForOfIteratorHelper = require('../../dist/createForOfIteratorHelper-522d616d.cjs.dev.js');
6
- var raw = require('../../dist/raw-a62618f3.cjs.dev.js');
6
+ var raw = require('../../dist/raw-ff060f24.cjs.dev.js');
7
7
  var React = require('react');
8
8
  var ReactJSXRuntime = require('react/jsx-runtime');
9
9
  require('../../dist/slicedToArray-387314c6.cjs.dev.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var createForOfIteratorHelper = require('../../dist/createForOfIteratorHelper-598a2f85.cjs.prod.js');
6
- var raw = require('../../dist/raw-1617ec66.cjs.prod.js');
6
+ var raw = require('../../dist/raw-b3745603.cjs.prod.js');
7
7
  var React = require('react');
8
8
  var ReactJSXRuntime = require('react/jsx-runtime');
9
9
  require('../../dist/slicedToArray-64c83d56.cjs.prod.js');
@@ -1,5 +1,5 @@
1
- import { a as _toConsumableArray } from '../../dist/createForOfIteratorHelper-8a8caaf6.esm.js';
2
- import { _ as _objectSpread2, r as raw, c as attrs } from '../../dist/raw-c9cc9df6.esm.js';
1
+ import { _ as _toConsumableArray } from '../../dist/createForOfIteratorHelper-595d57b7.esm.js';
2
+ import { _ as _objectSpread2, r as raw, c as attrs } from '../../dist/raw-1b40484b.esm.js';
3
3
  import React from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
  import '../../dist/slicedToArray-70ecb9da.esm.js';
@@ -1,5 +1,5 @@
1
- import { a as _toConsumableArray } from '../../dist/createForOfIteratorHelper-02fbe55e.worker.esm.js';
2
- import { _ as _objectSpread2, r as raw, c as attrs } from '../../dist/raw-4d8c9599.worker.esm.js';
1
+ import { _ as _toConsumableArray } from '../../dist/createForOfIteratorHelper-548f1578.worker.esm.js';
2
+ import { _ as _objectSpread2, r as raw, c as attrs } from '../../dist/raw-43f9221a.worker.esm.js';
3
3
  import React from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
  import '../../dist/slicedToArray-106ca5f3.worker.esm.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/react",
3
- "version": "0.150.5",
3
+ "version": "0.150.6",
4
4
  "private": false,
5
5
  "description": "Val - React internal helpers",
6
6
  "repository": {
@@ -12,8 +12,8 @@
12
12
  "@vercel/stega": "^1.1.0",
13
13
  "base64-arraybuffer": "^1.0.2",
14
14
  "@valbuild/shared": "0.150.3",
15
- "@valbuild/core": "0.150.3",
16
- "@valbuild/ui": "0.150.5"
15
+ "@valbuild/ui": "0.150.5",
16
+ "@valbuild/core": "0.150.3"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@testing-library/react": "^16.3.3",
@@ -1,13 +1,13 @@
1
+ import { _ as _objectSpread2, s as stegaDecodeStrings } from '../../dist/raw-be4b57fa.browser.esm.js';
2
+ export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-be4b57fa.browser.esm.js';
1
3
  import { _ as _slicedToArray } from '../../dist/slicedToArray-b66ff800.browser.esm.js';
2
- import { _ as _createForOfIteratorHelper, a as _toConsumableArray } from '../../dist/createForOfIteratorHelper-36020cf7.browser.esm.js';
4
+ import { _ as _toConsumableArray, a as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-3316a633.browser.esm.js';
3
5
  import { _ as _typeof } from '../../dist/typeof-9915e135.browser.esm.js';
4
6
  import { Internal } from '@valbuild/core';
5
7
  import ReactJSXRuntime__default from 'react/jsx-runtime';
6
8
  import jsxRuntimeDev__default from 'react/jsx-dev-runtime';
7
9
  import React from 'react';
8
10
  import { VERCEL_STEGA_REGEX, vercelStegaSplit } from '@vercel/stega';
9
- import { s as stegaDecodeStrings } from '../../dist/raw-d34abe21.browser.esm.js';
10
- export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-d34abe21.browser.esm.js';
11
11
 
12
12
  var isIntrinsicElement = function isIntrinsicElement(type) {
13
13
  // TODO: think this is not correct, but good enough for now?
@@ -217,18 +217,70 @@ function WrapJsx(jsx) {
217
217
  return element;
218
218
  };
219
219
  }
220
+
221
+ /**
222
+ * `React.createElement(type, props, ...children)` takes its children as
223
+ * arguments, not in `props`, so the wrapper `jsx` gets never sees them: a
224
+ * library that renders content with it -- TanStack Router's `<Link>` does --
225
+ * put the text on the page with its edit tag still in it. Its string
226
+ * children are cleaned here, and an intrinsic element carries their paths.
227
+ */
228
+ function WrapCreateElement(createElement) {
229
+ if (typeof createElement !== "function") return createElement;
230
+ return function (type, props) {
231
+ for (var _len2 = arguments.length, children = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
232
+ children[_key2 - 2] = arguments[_key2];
233
+ }
234
+ if (!IS_AUTO_TAG_JSX_ENABLED() || children.length === 0) {
235
+ addValPathIfFound(type, props);
236
+ return createElement.call.apply(createElement, [createElement, type, props].concat(children));
237
+ }
238
+ var paths = [];
239
+ var clean = function clean(child) {
240
+ if (typeof child === "string" && child.match(VERCEL_STEGA_REGEX)) {
241
+ var found = stegaDecodeStrings(child);
242
+ if (found) {
243
+ paths.push.apply(paths, _toConsumableArray(found));
244
+ return vercelStegaSplit(child).cleaned;
245
+ }
246
+ }
247
+ return child;
248
+ };
249
+ var cleaned = isIntrinsicElement(type) ? children.map(function (child) {
250
+ return Array.isArray(child) ? child.map(clean) : clean(child);
251
+ }) : children;
252
+ var ownProps = props;
253
+ if (isIntrinsicElement(type)) {
254
+ paths.push.apply(paths, _toConsumableArray(pathsOfFragmentChildren(cleaned)));
255
+ if (paths.length > 0) {
256
+ ownProps = _objectSpread2({}, props !== null && props !== void 0 ? props : {});
257
+ if (!ownProps["data-val-path"]) {
258
+ ownProps["data-val-path"] = Array.from(new Set(paths)).join(",");
259
+ }
260
+ }
261
+ }
262
+ addValPathIfFound(type, ownProps);
263
+ return createElement.call.apply(createElement, [createElement, type, ownProps].concat(_toConsumableArray(cleaned)));
264
+ };
265
+ }
266
+ /** Whether the runtimes are wrapped already: wrapping twice cleans twice. */
267
+ var installed = false;
220
268
  function autoTagJSX() {
269
+ if (installed) {
270
+ return;
271
+ }
272
+ installed = true;
221
273
  var JsxPro = ReactJSXRuntime__default;
222
274
  var JsxDev = jsxRuntimeDev__default;
223
275
 
224
276
  /**
225
277
  * createElement _may_ be called by jsx runtime as a fallback in certain cases,
226
- * so we need to wrap it regardless.
278
+ * and libraries call it directly, so we need to wrap it regardless.
227
279
  *
228
280
  * The jsx exports depend on the `NODE_ENV` var to ensure the users' bundler doesn't
229
281
  * include both, so one of them will be set with `undefined` values.
230
282
  */
231
- React.createElement = WrapJsx(React.createElement);
283
+ React.createElement = WrapCreateElement(React.createElement);
232
284
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
233
285
  JsxDev.jsx && (/* */JsxDev.jsx = WrapJsx(JsxDev.jsx));
234
286
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var raw = require('../../dist/raw-ff060f24.cjs.dev.js');
5
6
  var slicedToArray = require('../../dist/slicedToArray-387314c6.cjs.dev.js');
6
7
  var createForOfIteratorHelper = require('../../dist/createForOfIteratorHelper-522d616d.cjs.dev.js');
7
8
  var _typeof = require('../../dist/typeof-b568f48f.cjs.dev.js');
@@ -10,7 +11,6 @@ var ReactJSXRuntime = require('react/jsx-runtime');
10
11
  var jsxRuntimeDev = require('react/jsx-dev-runtime');
11
12
  var React = require('react');
12
13
  var stega = require('@vercel/stega');
13
- var raw = require('../../dist/raw-a62618f3.cjs.dev.js');
14
14
 
15
15
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
16
16
 
@@ -226,18 +226,70 @@ function WrapJsx(jsx) {
226
226
  return element;
227
227
  };
228
228
  }
229
+
230
+ /**
231
+ * `React.createElement(type, props, ...children)` takes its children as
232
+ * arguments, not in `props`, so the wrapper `jsx` gets never sees them: a
233
+ * library that renders content with it -- TanStack Router's `<Link>` does --
234
+ * put the text on the page with its edit tag still in it. Its string
235
+ * children are cleaned here, and an intrinsic element carries their paths.
236
+ */
237
+ function WrapCreateElement(createElement) {
238
+ if (typeof createElement !== "function") return createElement;
239
+ return function (type, props) {
240
+ for (var _len2 = arguments.length, children = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
241
+ children[_key2 - 2] = arguments[_key2];
242
+ }
243
+ if (!IS_AUTO_TAG_JSX_ENABLED() || children.length === 0) {
244
+ addValPathIfFound(type, props);
245
+ return createElement.call.apply(createElement, [createElement, type, props].concat(children));
246
+ }
247
+ var paths = [];
248
+ var clean = function clean(child) {
249
+ if (typeof child === "string" && child.match(stega.VERCEL_STEGA_REGEX)) {
250
+ var found = raw.stegaDecodeStrings(child);
251
+ if (found) {
252
+ paths.push.apply(paths, createForOfIteratorHelper._toConsumableArray(found));
253
+ return stega.vercelStegaSplit(child).cleaned;
254
+ }
255
+ }
256
+ return child;
257
+ };
258
+ var cleaned = isIntrinsicElement(type) ? children.map(function (child) {
259
+ return Array.isArray(child) ? child.map(clean) : clean(child);
260
+ }) : children;
261
+ var ownProps = props;
262
+ if (isIntrinsicElement(type)) {
263
+ paths.push.apply(paths, createForOfIteratorHelper._toConsumableArray(pathsOfFragmentChildren(cleaned)));
264
+ if (paths.length > 0) {
265
+ ownProps = raw._objectSpread2({}, props !== null && props !== void 0 ? props : {});
266
+ if (!ownProps["data-val-path"]) {
267
+ ownProps["data-val-path"] = Array.from(new Set(paths)).join(",");
268
+ }
269
+ }
270
+ }
271
+ addValPathIfFound(type, ownProps);
272
+ return createElement.call.apply(createElement, [createElement, type, ownProps].concat(createForOfIteratorHelper._toConsumableArray(cleaned)));
273
+ };
274
+ }
275
+ /** Whether the runtimes are wrapped already: wrapping twice cleans twice. */
276
+ var installed = false;
229
277
  function autoTagJSX() {
278
+ if (installed) {
279
+ return;
280
+ }
281
+ installed = true;
230
282
  var JsxPro = ReactJSXRuntime__default["default"];
231
283
  var JsxDev = jsxRuntimeDev__default["default"];
232
284
 
233
285
  /**
234
286
  * createElement _may_ be called by jsx runtime as a fallback in certain cases,
235
- * so we need to wrap it regardless.
287
+ * and libraries call it directly, so we need to wrap it regardless.
236
288
  *
237
289
  * The jsx exports depend on the `NODE_ENV` var to ensure the users' bundler doesn't
238
290
  * include both, so one of them will be set with `undefined` values.
239
291
  */
240
- React__default["default"].createElement = WrapJsx(React__default["default"].createElement);
292
+ React__default["default"].createElement = WrapCreateElement(React__default["default"].createElement);
241
293
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
242
294
  JsxDev.jsx && (/* */JsxDev.jsx = WrapJsx(JsxDev.jsx));
243
295
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var raw = require('../../dist/raw-b3745603.cjs.prod.js');
5
6
  var slicedToArray = require('../../dist/slicedToArray-64c83d56.cjs.prod.js');
6
7
  var createForOfIteratorHelper = require('../../dist/createForOfIteratorHelper-598a2f85.cjs.prod.js');
7
8
  var _typeof = require('../../dist/typeof-16428c61.cjs.prod.js');
@@ -10,7 +11,6 @@ var ReactJSXRuntime = require('react/jsx-runtime');
10
11
  var jsxRuntimeDev = require('react/jsx-dev-runtime');
11
12
  var React = require('react');
12
13
  var stega = require('@vercel/stega');
13
- var raw = require('../../dist/raw-1617ec66.cjs.prod.js');
14
14
 
15
15
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
16
16
 
@@ -226,18 +226,70 @@ function WrapJsx(jsx) {
226
226
  return element;
227
227
  };
228
228
  }
229
+
230
+ /**
231
+ * `React.createElement(type, props, ...children)` takes its children as
232
+ * arguments, not in `props`, so the wrapper `jsx` gets never sees them: a
233
+ * library that renders content with it -- TanStack Router's `<Link>` does --
234
+ * put the text on the page with its edit tag still in it. Its string
235
+ * children are cleaned here, and an intrinsic element carries their paths.
236
+ */
237
+ function WrapCreateElement(createElement) {
238
+ if (typeof createElement !== "function") return createElement;
239
+ return function (type, props) {
240
+ for (var _len2 = arguments.length, children = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
241
+ children[_key2 - 2] = arguments[_key2];
242
+ }
243
+ if (!IS_AUTO_TAG_JSX_ENABLED() || children.length === 0) {
244
+ addValPathIfFound(type, props);
245
+ return createElement.call.apply(createElement, [createElement, type, props].concat(children));
246
+ }
247
+ var paths = [];
248
+ var clean = function clean(child) {
249
+ if (typeof child === "string" && child.match(stega.VERCEL_STEGA_REGEX)) {
250
+ var found = raw.stegaDecodeStrings(child);
251
+ if (found) {
252
+ paths.push.apply(paths, createForOfIteratorHelper._toConsumableArray(found));
253
+ return stega.vercelStegaSplit(child).cleaned;
254
+ }
255
+ }
256
+ return child;
257
+ };
258
+ var cleaned = isIntrinsicElement(type) ? children.map(function (child) {
259
+ return Array.isArray(child) ? child.map(clean) : clean(child);
260
+ }) : children;
261
+ var ownProps = props;
262
+ if (isIntrinsicElement(type)) {
263
+ paths.push.apply(paths, createForOfIteratorHelper._toConsumableArray(pathsOfFragmentChildren(cleaned)));
264
+ if (paths.length > 0) {
265
+ ownProps = raw._objectSpread2({}, props !== null && props !== void 0 ? props : {});
266
+ if (!ownProps["data-val-path"]) {
267
+ ownProps["data-val-path"] = Array.from(new Set(paths)).join(",");
268
+ }
269
+ }
270
+ }
271
+ addValPathIfFound(type, ownProps);
272
+ return createElement.call.apply(createElement, [createElement, type, ownProps].concat(createForOfIteratorHelper._toConsumableArray(cleaned)));
273
+ };
274
+ }
275
+ /** Whether the runtimes are wrapped already: wrapping twice cleans twice. */
276
+ var installed = false;
229
277
  function autoTagJSX() {
278
+ if (installed) {
279
+ return;
280
+ }
281
+ installed = true;
230
282
  var JsxPro = ReactJSXRuntime__default["default"];
231
283
  var JsxDev = jsxRuntimeDev__default["default"];
232
284
 
233
285
  /**
234
286
  * createElement _may_ be called by jsx runtime as a fallback in certain cases,
235
- * so we need to wrap it regardless.
287
+ * and libraries call it directly, so we need to wrap it regardless.
236
288
  *
237
289
  * The jsx exports depend on the `NODE_ENV` var to ensure the users' bundler doesn't
238
290
  * include both, so one of them will be set with `undefined` values.
239
291
  */
240
- React__default["default"].createElement = WrapJsx(React__default["default"].createElement);
292
+ React__default["default"].createElement = WrapCreateElement(React__default["default"].createElement);
241
293
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
242
294
  JsxDev.jsx && (/* */JsxDev.jsx = WrapJsx(JsxDev.jsx));
243
295
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
@@ -1,13 +1,13 @@
1
+ import { _ as _objectSpread2, s as stegaDecodeStrings } from '../../dist/raw-1b40484b.esm.js';
2
+ export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-1b40484b.esm.js';
1
3
  import { _ as _slicedToArray } from '../../dist/slicedToArray-70ecb9da.esm.js';
2
- import { _ as _createForOfIteratorHelper, a as _toConsumableArray } from '../../dist/createForOfIteratorHelper-8a8caaf6.esm.js';
4
+ import { _ as _toConsumableArray, a as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-595d57b7.esm.js';
3
5
  import { _ as _typeof } from '../../dist/typeof-a1531d8f.esm.js';
4
6
  import { Internal } from '@valbuild/core';
5
7
  import ReactJSXRuntime__default from 'react/jsx-runtime';
6
8
  import jsxRuntimeDev__default from 'react/jsx-dev-runtime';
7
9
  import React from 'react';
8
10
  import { VERCEL_STEGA_REGEX, vercelStegaSplit } from '@vercel/stega';
9
- import { s as stegaDecodeStrings } from '../../dist/raw-c9cc9df6.esm.js';
10
- export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-c9cc9df6.esm.js';
11
11
 
12
12
  var isIntrinsicElement = function isIntrinsicElement(type) {
13
13
  // TODO: think this is not correct, but good enough for now?
@@ -217,18 +217,70 @@ function WrapJsx(jsx) {
217
217
  return element;
218
218
  };
219
219
  }
220
+
221
+ /**
222
+ * `React.createElement(type, props, ...children)` takes its children as
223
+ * arguments, not in `props`, so the wrapper `jsx` gets never sees them: a
224
+ * library that renders content with it -- TanStack Router's `<Link>` does --
225
+ * put the text on the page with its edit tag still in it. Its string
226
+ * children are cleaned here, and an intrinsic element carries their paths.
227
+ */
228
+ function WrapCreateElement(createElement) {
229
+ if (typeof createElement !== "function") return createElement;
230
+ return function (type, props) {
231
+ for (var _len2 = arguments.length, children = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
232
+ children[_key2 - 2] = arguments[_key2];
233
+ }
234
+ if (!IS_AUTO_TAG_JSX_ENABLED() || children.length === 0) {
235
+ addValPathIfFound(type, props);
236
+ return createElement.call.apply(createElement, [createElement, type, props].concat(children));
237
+ }
238
+ var paths = [];
239
+ var clean = function clean(child) {
240
+ if (typeof child === "string" && child.match(VERCEL_STEGA_REGEX)) {
241
+ var found = stegaDecodeStrings(child);
242
+ if (found) {
243
+ paths.push.apply(paths, _toConsumableArray(found));
244
+ return vercelStegaSplit(child).cleaned;
245
+ }
246
+ }
247
+ return child;
248
+ };
249
+ var cleaned = isIntrinsicElement(type) ? children.map(function (child) {
250
+ return Array.isArray(child) ? child.map(clean) : clean(child);
251
+ }) : children;
252
+ var ownProps = props;
253
+ if (isIntrinsicElement(type)) {
254
+ paths.push.apply(paths, _toConsumableArray(pathsOfFragmentChildren(cleaned)));
255
+ if (paths.length > 0) {
256
+ ownProps = _objectSpread2({}, props !== null && props !== void 0 ? props : {});
257
+ if (!ownProps["data-val-path"]) {
258
+ ownProps["data-val-path"] = Array.from(new Set(paths)).join(",");
259
+ }
260
+ }
261
+ }
262
+ addValPathIfFound(type, ownProps);
263
+ return createElement.call.apply(createElement, [createElement, type, ownProps].concat(_toConsumableArray(cleaned)));
264
+ };
265
+ }
266
+ /** Whether the runtimes are wrapped already: wrapping twice cleans twice. */
267
+ var installed = false;
220
268
  function autoTagJSX() {
269
+ if (installed) {
270
+ return;
271
+ }
272
+ installed = true;
221
273
  var JsxPro = ReactJSXRuntime__default;
222
274
  var JsxDev = jsxRuntimeDev__default;
223
275
 
224
276
  /**
225
277
  * createElement _may_ be called by jsx runtime as a fallback in certain cases,
226
- * so we need to wrap it regardless.
278
+ * and libraries call it directly, so we need to wrap it regardless.
227
279
  *
228
280
  * The jsx exports depend on the `NODE_ENV` var to ensure the users' bundler doesn't
229
281
  * include both, so one of them will be set with `undefined` values.
230
282
  */
231
- React.createElement = WrapJsx(React.createElement);
283
+ React.createElement = WrapCreateElement(React.createElement);
232
284
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
233
285
  JsxDev.jsx && (/* */JsxDev.jsx = WrapJsx(JsxDev.jsx));
234
286
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
@@ -1,13 +1,13 @@
1
+ import { _ as _objectSpread2, s as stegaDecodeStrings } from '../../dist/raw-43f9221a.worker.esm.js';
2
+ export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-43f9221a.worker.esm.js';
1
3
  import { _ as _slicedToArray } from '../../dist/slicedToArray-106ca5f3.worker.esm.js';
2
- import { _ as _createForOfIteratorHelper, a as _toConsumableArray } from '../../dist/createForOfIteratorHelper-02fbe55e.worker.esm.js';
4
+ import { _ as _toConsumableArray, a as _createForOfIteratorHelper } from '../../dist/createForOfIteratorHelper-548f1578.worker.esm.js';
3
5
  import { _ as _typeof } from '../../dist/typeof-e0c837cc.worker.esm.js';
4
6
  import { Internal } from '@valbuild/core';
5
7
  import ReactJSXRuntime__default from 'react/jsx-runtime';
6
8
  import jsxRuntimeDev__default from 'react/jsx-dev-runtime';
7
9
  import React from 'react';
8
10
  import { VERCEL_STEGA_REGEX, vercelStegaSplit } from '@vercel/stega';
9
- import { s as stegaDecodeStrings } from '../../dist/raw-4d8c9599.worker.esm.js';
10
- export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-4d8c9599.worker.esm.js';
11
11
 
12
12
  var isIntrinsicElement = function isIntrinsicElement(type) {
13
13
  // TODO: think this is not correct, but good enough for now?
@@ -217,18 +217,70 @@ function WrapJsx(jsx) {
217
217
  return element;
218
218
  };
219
219
  }
220
+
221
+ /**
222
+ * `React.createElement(type, props, ...children)` takes its children as
223
+ * arguments, not in `props`, so the wrapper `jsx` gets never sees them: a
224
+ * library that renders content with it -- TanStack Router's `<Link>` does --
225
+ * put the text on the page with its edit tag still in it. Its string
226
+ * children are cleaned here, and an intrinsic element carries their paths.
227
+ */
228
+ function WrapCreateElement(createElement) {
229
+ if (typeof createElement !== "function") return createElement;
230
+ return function (type, props) {
231
+ for (var _len2 = arguments.length, children = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
232
+ children[_key2 - 2] = arguments[_key2];
233
+ }
234
+ if (!IS_AUTO_TAG_JSX_ENABLED() || children.length === 0) {
235
+ addValPathIfFound(type, props);
236
+ return createElement.call.apply(createElement, [createElement, type, props].concat(children));
237
+ }
238
+ var paths = [];
239
+ var clean = function clean(child) {
240
+ if (typeof child === "string" && child.match(VERCEL_STEGA_REGEX)) {
241
+ var found = stegaDecodeStrings(child);
242
+ if (found) {
243
+ paths.push.apply(paths, _toConsumableArray(found));
244
+ return vercelStegaSplit(child).cleaned;
245
+ }
246
+ }
247
+ return child;
248
+ };
249
+ var cleaned = isIntrinsicElement(type) ? children.map(function (child) {
250
+ return Array.isArray(child) ? child.map(clean) : clean(child);
251
+ }) : children;
252
+ var ownProps = props;
253
+ if (isIntrinsicElement(type)) {
254
+ paths.push.apply(paths, _toConsumableArray(pathsOfFragmentChildren(cleaned)));
255
+ if (paths.length > 0) {
256
+ ownProps = _objectSpread2({}, props !== null && props !== void 0 ? props : {});
257
+ if (!ownProps["data-val-path"]) {
258
+ ownProps["data-val-path"] = Array.from(new Set(paths)).join(",");
259
+ }
260
+ }
261
+ }
262
+ addValPathIfFound(type, ownProps);
263
+ return createElement.call.apply(createElement, [createElement, type, ownProps].concat(_toConsumableArray(cleaned)));
264
+ };
265
+ }
266
+ /** Whether the runtimes are wrapped already: wrapping twice cleans twice. */
267
+ var installed = false;
220
268
  function autoTagJSX() {
269
+ if (installed) {
270
+ return;
271
+ }
272
+ installed = true;
221
273
  var JsxPro = ReactJSXRuntime__default;
222
274
  var JsxDev = jsxRuntimeDev__default;
223
275
 
224
276
  /**
225
277
  * createElement _may_ be called by jsx runtime as a fallback in certain cases,
226
- * so we need to wrap it regardless.
278
+ * and libraries call it directly, so we need to wrap it regardless.
227
279
  *
228
280
  * The jsx exports depend on the `NODE_ENV` var to ensure the users' bundler doesn't
229
281
  * include both, so one of them will be set with `undefined` values.
230
282
  */
231
- React.createElement = WrapJsx(React.createElement);
283
+ React.createElement = WrapCreateElement(React.createElement);
232
284
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
233
285
  JsxDev.jsx && (/* */JsxDev.jsx = WrapJsx(JsxDev.jsx));
234
286
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
@@ -6,30 +6,6 @@ var core = require('@valbuild/core');
6
6
  var stega = require('@vercel/stega');
7
7
  var slicedToArray = require('./slicedToArray-64c83d56.cjs.prod.js');
8
8
 
9
- function stegaDecodeStrings(encodedString) {
10
- if (!encodedString || typeof encodedString !== "string") return;
11
- var encodedBits = stega.vercelStegaDecodeAll(encodedString);
12
- var paths = [];
13
- if (!encodedBits) return;
14
- var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(encodedBits),
15
- _step;
16
- try {
17
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
18
- var encodedBit = _step.value;
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") {
21
- paths.push(encodedBit.data.valPath);
22
- }
23
- }
24
- }
25
- } catch (err) {
26
- _iterator.e(err);
27
- } finally {
28
- _iterator.f();
29
- }
30
- return paths.length > 0 ? paths : undefined;
31
- }
32
-
33
9
  function _toPrimitive(t, r) {
34
10
  if ("object" != typeof t || !t) return t;
35
11
  var e = t[Symbol.toPrimitive];
@@ -77,6 +53,30 @@ function _objectSpread2(e) {
77
53
  return e;
78
54
  }
79
55
 
56
+ function stegaDecodeStrings(encodedString) {
57
+ if (!encodedString || typeof encodedString !== "string") return;
58
+ var encodedBits = stega.vercelStegaDecodeAll(encodedString);
59
+ var paths = [];
60
+ if (!encodedBits) return;
61
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(encodedBits),
62
+ _step;
63
+ try {
64
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
65
+ var encodedBit = _step.value;
66
+ if (encodedBit && _typeof._typeof(encodedBit) === "object") {
67
+ if ("origin" in encodedBit && "data" in encodedBit && _typeof._typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
68
+ paths.push(encodedBit.data.valPath);
69
+ }
70
+ }
71
+ }
72
+ } catch (err) {
73
+ _iterator.e(err);
74
+ } finally {
75
+ _iterator.f();
76
+ }
77
+ return paths.length > 0 ? paths : undefined;
78
+ }
79
+
80
80
  /**
81
81
  * ValEncodedString is a string that is encoded using steganography.
82
82
  *
@@ -6,30 +6,6 @@ var core = require('@valbuild/core');
6
6
  var stega = require('@vercel/stega');
7
7
  var slicedToArray = require('./slicedToArray-387314c6.cjs.dev.js');
8
8
 
9
- function stegaDecodeStrings(encodedString) {
10
- if (!encodedString || typeof encodedString !== "string") return;
11
- var encodedBits = stega.vercelStegaDecodeAll(encodedString);
12
- var paths = [];
13
- if (!encodedBits) return;
14
- var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(encodedBits),
15
- _step;
16
- try {
17
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
18
- var encodedBit = _step.value;
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") {
21
- paths.push(encodedBit.data.valPath);
22
- }
23
- }
24
- }
25
- } catch (err) {
26
- _iterator.e(err);
27
- } finally {
28
- _iterator.f();
29
- }
30
- return paths.length > 0 ? paths : undefined;
31
- }
32
-
33
9
  function _toPrimitive(t, r) {
34
10
  if ("object" != typeof t || !t) return t;
35
11
  var e = t[Symbol.toPrimitive];
@@ -77,6 +53,30 @@ function _objectSpread2(e) {
77
53
  return e;
78
54
  }
79
55
 
56
+ function stegaDecodeStrings(encodedString) {
57
+ if (!encodedString || typeof encodedString !== "string") return;
58
+ var encodedBits = stega.vercelStegaDecodeAll(encodedString);
59
+ var paths = [];
60
+ if (!encodedBits) return;
61
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(encodedBits),
62
+ _step;
63
+ try {
64
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
65
+ var encodedBit = _step.value;
66
+ if (encodedBit && _typeof._typeof(encodedBit) === "object") {
67
+ if ("origin" in encodedBit && "data" in encodedBit && _typeof._typeof(encodedBit.data) === "object" && encodedBit.data && "valPath" in encodedBit.data && typeof encodedBit.data.valPath === "string") {
68
+ paths.push(encodedBit.data.valPath);
69
+ }
70
+ }
71
+ }
72
+ } catch (err) {
73
+ _iterator.e(err);
74
+ } finally {
75
+ _iterator.f();
76
+ }
77
+ return paths.length > 0 ? paths : undefined;
78
+ }
79
+
80
80
  /**
81
81
  * ValEncodedString is a string that is encoded using steganography.
82
82
  *