@unlayer/react-elements 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2304,9 +2304,11 @@ function idsSeen() {
2304
2304
  renderToStaticMarkup(/* @__PURE__ */ jsx(Probe, {}), { identifierPrefix: COLLECTING_ID });
2305
2305
  return seen;
2306
2306
  }
2307
+ var RENDERS = Symbol.for("@unlayer/react-elements/renders");
2307
2308
  function nonce() {
2308
- const random = globalThis.crypto?.getRandomValues?.(new Uint32Array(2));
2309
- return random ? Array.from(random, (n) => n.toString(36)).join("") : `${Math.random().toString(36).slice(2)}${Math.random().toString(36).slice(2)}`;
2309
+ const shared = globalThis;
2310
+ const clock = globalThis.performance;
2311
+ return [shared[RENDERS] = (shared[RENDERS] ?? 0) + 1, (clock?.timeOrigin ?? 0) * 1e3, (clock?.now() ?? 0) * 1e6].map((n) => Math.floor(n).toString(36)).join("_");
2310
2312
  }
2311
2313
  var collect = (children) => children !== null && typeof children === "object" ? scopeCache(children, () => collected(children)) : collected(children);
2312
2314
  function childrenHtml2(children, place) {