soonjs 0.0.29 → 0.0.31

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.
Files changed (36) hide show
  1. package/dist/deps/acorn-MFuat2YCgG-e4p88nn1g.js +2895 -0
  2. package/dist/deps/angular-Nz7Izt9RB4-h18jjmowy.js +1448 -0
  3. package/dist/deps/babel-JaNXSJC73c-9yodyvvph.js +6844 -0
  4. package/dist/deps/estree-lrVsLbm9_D-frgb7tfnu.js +4265 -0
  5. package/dist/deps/flow-MAZ63dnw8p-m2rrmabt3.js +26221 -0
  6. package/dist/deps/glimmer-SKEURx3bl3-9q9t7pwdx.js +2756 -0
  7. package/dist/deps/graphql--N7MQg-wpp-ikfx3vyg2.js +1212 -0
  8. package/dist/deps/html-WW7XljTSl6-u2zm0618g.js +2623 -0
  9. package/dist/deps/markdown-i-DCK3AslU-27ooihdjf.js +3058 -0
  10. package/dist/deps/meriyah-0-URq6zZ8n-mvot02tnl.js +2320 -0
  11. package/dist/deps/postcss-urUw1vxeu1-ltys6ubta.js +4664 -0
  12. package/dist/deps/soon-id-t25L9qRGGZ-mseuvoose.js +30 -0
  13. package/dist/deps/typescript-5-LBeuVeDB-kqvbhavbi.js +12794 -0
  14. package/dist/deps/yaml-zChCAOpgM7-osfcioi5d.js +4088 -0
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/vite-plugin-soon-client.cjs +2 -2
  19. package/dist/vite-plugin-soon-client.js +14 -14
  20. package/dist/vite-plugin-soon-server.cjs +1 -1
  21. package/dist/vite-plugin-soon-server.js +1 -1
  22. package/package.json +1 -1
  23. /package/dist/deps/{acorn-Ff8MVRmodX.js → acorn-MFuat2YCgG-3o370z873.js} +0 -0
  24. /package/dist/deps/{angular-LqdjJ4Yaq2.js → angular-Nz7Izt9RB4-tpn6vrzzy.js} +0 -0
  25. /package/dist/deps/{babel-32vqD9oEys.js → babel-JaNXSJC73c-ynxn8i808.js} +0 -0
  26. /package/dist/deps/{estree-IMJs86TDC0.js → estree-lrVsLbm9_D-emih400u1.js} +0 -0
  27. /package/dist/deps/{flow-zRn8VfVm5J.js → flow-MAZ63dnw8p-wi0v0aena.js} +0 -0
  28. /package/dist/deps/{glimmer-_ODPKtzJ7S.js → glimmer-SKEURx3bl3-l70hzjhe4.js} +0 -0
  29. /package/dist/deps/{graphql-q8vjor01qx.js → graphql--N7MQg-wpp-v49tdgcr9.js} +0 -0
  30. /package/dist/deps/{html-TSaii5iYiA.js → html-WW7XljTSl6-nxudy7vqp.js} +0 -0
  31. /package/dist/deps/{markdown-M6N0BeoGFG.js → markdown-i-DCK3AslU-wd4hbzpj4.js} +0 -0
  32. /package/dist/deps/{meriyah-XGfSapNsj5.js → meriyah-0-URq6zZ8n-8hx0wdln8.js} +0 -0
  33. /package/dist/deps/{postcss-Urbkvv7NC7.js → postcss-urUw1vxeu1-xxgu2fu5o.js} +0 -0
  34. /package/dist/deps/{soon-id-LxpwEdKJEZ.js → soon-id-t25L9qRGGZ-l8lkjbbxl.js} +0 -0
  35. /package/dist/deps/{typescript-rVkPWM4hUZ.js → typescript-5-LBeuVeDB-7w9kseqyq.js} +0 -0
  36. /package/dist/deps/{yaml-ySEu0nw36-.js → yaml-zChCAOpgM7-h7aopdk65.js} +0 -0
@@ -0,0 +1,30 @@
1
+ import { randomInt as f } from "crypto";
2
+ var k = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
+ function I(t) {
4
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
5
+ }
6
+ function p({ workerId: t = 0, timeLen: r, workerLen: o, randomLen: a }) {
7
+ return {
8
+ timestampStr: Date.now().toString(36).padStart(r, "0"),
9
+ workerIdStr: t.toString(36).padStart(o, "0"),
10
+ randomStr: f(36 ** a - 1).toString(36).padStart(a, "0")
11
+ };
12
+ }
13
+ function y({ workerId: t, isFixedLength: r = !1, prefix: o = "" } = {}) {
14
+ const c = t ?? f(46655), l = 36 ** 4 - 1;
15
+ let i = 0, s = "", u = "", S = "", d = "", e = 0;
16
+ function m() {
17
+ const n = p({ workerId: c, timeLen: 9, workerLen: 3, randomLen: 4 });
18
+ i = n.timestampStr === s ? Math.min(36 ** 1 - 1, i + 1) : 0, s = n.timestampStr, u = n.workerIdStr, S = n.randomStr, d = `${o}${s}${u}${S}${i.toString(36).padStart(1, "0")}`, e = 0;
19
+ }
20
+ return m(), r ? function() {
21
+ return e > l && m(), d + (e++).toString(36).padStart(4, "0");
22
+ } : function() {
23
+ return e > l && m(), d + (e++).toString(36);
24
+ };
25
+ }
26
+ export {
27
+ k as c,
28
+ I as g,
29
+ y as u
30
+ };