@enerjisaformlibrary/formbuilder-react 1.0.2 → 1.0.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.
- package/index.cjs +7 -21
- package/index.cjs.map +1 -1
- package/index.js +7 -21
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
|
-
var node_crypto = require('node:crypto');
|
|
7
6
|
|
|
8
7
|
function _interopNamespaceDefault(e) {
|
|
9
8
|
var n = Object.create(null);
|
|
@@ -9292,30 +9291,17 @@ const createImpl = (createState) => {
|
|
|
9292
9291
|
};
|
|
9293
9292
|
const create = ((createState) => createState ? createImpl(createState) : createImpl);
|
|
9294
9293
|
|
|
9295
|
-
|
|
9294
|
+
/* @ts-self-types="./index.d.ts" */
|
|
9295
|
+
let urlAlphabet =
|
|
9296
9296
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
9297
|
-
|
|
9298
|
-
const POOL_SIZE_MULTIPLIER = 128;
|
|
9299
|
-
let pool, poolOffset;
|
|
9300
|
-
function fillPool(bytes) {
|
|
9301
|
-
if (!pool || pool.length < bytes) {
|
|
9302
|
-
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
9303
|
-
node_crypto.webcrypto.getRandomValues(pool);
|
|
9304
|
-
poolOffset = 0;
|
|
9305
|
-
} else if (poolOffset + bytes > pool.length) {
|
|
9306
|
-
node_crypto.webcrypto.getRandomValues(pool);
|
|
9307
|
-
poolOffset = 0;
|
|
9308
|
-
}
|
|
9309
|
-
poolOffset += bytes;
|
|
9310
|
-
}
|
|
9311
|
-
function nanoid(size = 21) {
|
|
9312
|
-
fillPool((size |= 0));
|
|
9297
|
+
let nanoid = (size = 21) => {
|
|
9313
9298
|
let id = '';
|
|
9314
|
-
|
|
9315
|
-
|
|
9299
|
+
let i = size | 0;
|
|
9300
|
+
while (i--) {
|
|
9301
|
+
id += urlAlphabet[(Math.random() * 64) | 0];
|
|
9316
9302
|
}
|
|
9317
9303
|
return id
|
|
9318
|
-
}
|
|
9304
|
+
};
|
|
9319
9305
|
|
|
9320
9306
|
const createEmptyColumn = (width = 12) => ({
|
|
9321
9307
|
id: nanoid(),
|