@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.js
CHANGED
|
@@ -3,7 +3,6 @@ import * as React from 'react';
|
|
|
3
3
|
import React__default, { useLayoutEffect, useEffect, useRef, useMemo, useCallback, useState, createContext, memo, useReducer, useContext, forwardRef, cloneElement, createElement } from 'react';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
5
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from 'react-dom';
|
|
6
|
-
import { webcrypto } from 'node:crypto';
|
|
7
6
|
|
|
8
7
|
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
|
9
8
|
const canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
@@ -9272,30 +9271,17 @@ const createImpl = (createState) => {
|
|
|
9272
9271
|
};
|
|
9273
9272
|
const create = ((createState) => createState ? createImpl(createState) : createImpl);
|
|
9274
9273
|
|
|
9275
|
-
|
|
9274
|
+
/* @ts-self-types="./index.d.ts" */
|
|
9275
|
+
let urlAlphabet =
|
|
9276
9276
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
9277
|
-
|
|
9278
|
-
const POOL_SIZE_MULTIPLIER = 128;
|
|
9279
|
-
let pool, poolOffset;
|
|
9280
|
-
function fillPool(bytes) {
|
|
9281
|
-
if (!pool || pool.length < bytes) {
|
|
9282
|
-
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
9283
|
-
webcrypto.getRandomValues(pool);
|
|
9284
|
-
poolOffset = 0;
|
|
9285
|
-
} else if (poolOffset + bytes > pool.length) {
|
|
9286
|
-
webcrypto.getRandomValues(pool);
|
|
9287
|
-
poolOffset = 0;
|
|
9288
|
-
}
|
|
9289
|
-
poolOffset += bytes;
|
|
9290
|
-
}
|
|
9291
|
-
function nanoid(size = 21) {
|
|
9292
|
-
fillPool((size |= 0));
|
|
9277
|
+
let nanoid = (size = 21) => {
|
|
9293
9278
|
let id = '';
|
|
9294
|
-
|
|
9295
|
-
|
|
9279
|
+
let i = size | 0;
|
|
9280
|
+
while (i--) {
|
|
9281
|
+
id += urlAlphabet[(Math.random() * 64) | 0];
|
|
9296
9282
|
}
|
|
9297
9283
|
return id
|
|
9298
|
-
}
|
|
9284
|
+
};
|
|
9299
9285
|
|
|
9300
9286
|
const createEmptyColumn = (width = 12) => ({
|
|
9301
9287
|
id: nanoid(),
|