ui-ingredients 0.9.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
export declare
|
1
|
+
export declare function createUniqueId(): string;
|
package/dist/create-unique-id.js
CHANGED
@@ -1,2 +1,15 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
let prefix = 0;
|
2
|
+
let counter = 0;
|
3
|
+
export function createUniqueId() {
|
4
|
+
if (prefix >= Number.MAX_SAFE_INTEGER) {
|
5
|
+
prefix = 0;
|
6
|
+
}
|
7
|
+
if (counter >= Number.MAX_SAFE_INTEGER) {
|
8
|
+
prefix += 1;
|
9
|
+
counter = 0;
|
10
|
+
}
|
11
|
+
else {
|
12
|
+
counter += 1;
|
13
|
+
}
|
14
|
+
return `${prefix}${counter}`.padStart(8, '0');
|
15
|
+
}
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "ui-ingredients",
|
3
3
|
"type": "module",
|
4
4
|
"license": "MIT",
|
5
|
-
"version": "0.
|
5
|
+
"version": "0.11.0",
|
6
6
|
"packageManager": "pnpm@9.12.2",
|
7
7
|
"svelte": "./dist/index.js",
|
8
8
|
"types": "./dist/index.d.ts",
|
@@ -344,8 +344,7 @@
|
|
344
344
|
"@zag-js/tooltip": "^0.76.0",
|
345
345
|
"@zag-js/tour": "^0.76.0",
|
346
346
|
"@zag-js/tree-view": "^0.76.0",
|
347
|
-
"@zag-js/utils": "^0.76.0"
|
348
|
-
"uid": "^2.0.2"
|
347
|
+
"@zag-js/utils": "^0.76.0"
|
349
348
|
},
|
350
349
|
"peerDependencies": {
|
351
350
|
"svelte": ">=5.0.0"
|