@regle/core 0.0.10 → 0.0.12
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 +9 -2
- package/dist/index.js +9 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -432,9 +432,16 @@ var import_vue8 = require("vue");
|
|
|
432
432
|
var import_vue7 = require("vue");
|
|
433
433
|
|
|
434
434
|
// src/utils/randomId.ts
|
|
435
|
+
function uniqueIDNuxt() {
|
|
436
|
+
return Math.floor(Math.random() * Date.now()).toString();
|
|
437
|
+
}
|
|
435
438
|
function randomId() {
|
|
436
|
-
|
|
437
|
-
|
|
439
|
+
if (typeof window === "undefined") {
|
|
440
|
+
return uniqueIDNuxt();
|
|
441
|
+
} else {
|
|
442
|
+
const uint32 = window.crypto.getRandomValues(new Uint32Array(1))[0];
|
|
443
|
+
return uint32.toString(8);
|
|
444
|
+
}
|
|
438
445
|
}
|
|
439
446
|
|
|
440
447
|
// src/core/useRegle/useStateProperties/createReactiveFieldStatus.ts
|
package/dist/index.js
CHANGED
|
@@ -401,9 +401,16 @@ import { computed as computed4, effectScope as effectScope4, reactive as reactiv
|
|
|
401
401
|
import { nextTick, reactive as reactive3, ref as ref3, toRef as toRef3, toRefs, watch as watch3 } from "vue";
|
|
402
402
|
|
|
403
403
|
// src/utils/randomId.ts
|
|
404
|
+
function uniqueIDNuxt() {
|
|
405
|
+
return Math.floor(Math.random() * Date.now()).toString();
|
|
406
|
+
}
|
|
404
407
|
function randomId() {
|
|
405
|
-
|
|
406
|
-
|
|
408
|
+
if (typeof window === "undefined") {
|
|
409
|
+
return uniqueIDNuxt();
|
|
410
|
+
} else {
|
|
411
|
+
const uint32 = window.crypto.getRandomValues(new Uint32Array(1))[0];
|
|
412
|
+
return uint32.toString(8);
|
|
413
|
+
}
|
|
407
414
|
}
|
|
408
415
|
|
|
409
416
|
// src/core/useRegle/useStateProperties/createReactiveFieldStatus.ts
|
package/package.json
CHANGED