@fieldnotes/core 0.46.0 → 0.46.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.cjs CHANGED
@@ -698,8 +698,20 @@ var InputFilter = class _InputFilter {
698
698
 
699
699
  // src/elements/create-id.ts
700
700
  var counter = 0;
701
+ function randomClientComponent() {
702
+ if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function") {
703
+ const bytes = new Uint8Array(8);
704
+ crypto.getRandomValues(bytes);
705
+ return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
706
+ }
707
+ return Math.random().toString(36).slice(2, 14);
708
+ }
709
+ var CLIENT = randomClientComponent();
710
+ function formatId(prefix, time, counter2, client) {
711
+ return `${prefix}_${time}_${counter2}_${client}`;
712
+ }
701
713
  function createId(prefix) {
702
- return `${prefix}_${Date.now().toString(36)}_${(counter++).toString(36)}`;
714
+ return formatId(prefix, Date.now().toString(36), (counter++).toString(36), CLIENT);
703
715
  }
704
716
 
705
717
  // src/core/geometry.ts
@@ -10174,7 +10186,7 @@ var LaserTool = class {
10174
10186
  };
10175
10187
 
10176
10188
  // src/index.ts
10177
- var VERSION = "0.46.0";
10189
+ var VERSION = "0.46.1";
10178
10190
  // Annotate the CommonJS export names for ESM import in node:
10179
10191
  0 && (module.exports = {
10180
10192
  ArrowTool,