soonjs 0.0.22 → 0.0.24

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 (40) hide show
  1. package/dist/deps/acorn-4bbswh3l6.js +2895 -0
  2. package/dist/deps/{acorn-tklbyr11e.js → acorn-vpnsvv0vl.js} +10 -10
  3. package/dist/deps/angular-83zjjtd76.js +1448 -0
  4. package/dist/deps/angular-rxw0rdr8c.js +1 -0
  5. package/dist/deps/{babel-48ei1aig4.js → babel-bp403m6zg.js} +10 -10
  6. package/dist/deps/babel-fw6tfzzbf.js +6844 -0
  7. package/dist/deps/{estree-4o5bj9gvd.js → estree-8kj0he6rx.js} +23 -23
  8. package/dist/deps/estree-gg8m4wsex.js +4265 -0
  9. package/dist/deps/flow-6i0s1nbzq.js +26221 -0
  10. package/dist/deps/{flow-xlruu7boa.js → flow-g4yga74xo.js} +15 -15
  11. package/dist/deps/{glimmer-kyfivr6g7.js → glimmer-41uyapmgd.js} +18 -18
  12. package/dist/deps/glimmer-kwpa0i2hl.js +2756 -0
  13. package/dist/deps/graphql-147kg788t.js +1212 -0
  14. package/dist/deps/{graphql-xojtytb2p.js → graphql-k4vvtoaxx.js} +12 -12
  15. package/dist/deps/html-5plv0l5rz.js +2623 -0
  16. package/dist/deps/{html-jal5w2b1p.js → html-qgw95yt0p.js} +17 -17
  17. package/dist/deps/markdown-36u2qw6ev.js +3058 -0
  18. package/dist/deps/{markdown-qhqqns7vp.js → markdown-ctg3s4wvp.js} +40 -40
  19. package/dist/deps/meriyah-ejbnz31wa.js +4 -0
  20. package/dist/deps/meriyah-icy3boh6d.js +2320 -0
  21. package/dist/deps/postcss-d1ptsms6d.js +4664 -0
  22. package/dist/deps/{postcss-vq400h6ym.js → postcss-u5nb3hsle.js} +21 -21
  23. package/dist/deps/soon-id-96lbx7g47.js +30 -0
  24. package/dist/deps/soon-id-j90jf02bq.js +1 -0
  25. package/dist/deps/{typescript-jihynpl9y.js → typescript-jp50r3t1c.js} +11 -11
  26. package/dist/deps/typescript-ss2fqxu8g.js +12794 -0
  27. package/dist/deps/yaml-16o42r2fx.js +4088 -0
  28. package/dist/deps/{yaml-auqgv4vnk.js → yaml-dcz0vkx91.js} +26 -26
  29. package/dist/index.cjs +15 -0
  30. package/dist/index.d.ts +3 -0
  31. package/dist/index.js +2224 -9
  32. package/dist/vite-plugin-soon-client.cjs +249 -0
  33. package/dist/vite-plugin-soon-client.js +48725 -152
  34. package/dist/vite-plugin-soon-server.cjs +272 -0
  35. package/dist/vite-plugin-soon-server.d.ts +1 -0
  36. package/dist/vite-plugin-soon-server.js +3276 -19
  37. package/package.json +18 -1
  38. package/dist/deps/angular-m17t0gdsi.js +0 -1
  39. package/dist/deps/meriyah-sl495y757.js +0 -4
  40. package/dist/deps/soon-id-gmzr57ufv.js +0 -1
@@ -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
+ };
@@ -0,0 +1 @@
1
+ "use strict";const f=require("crypto");var p=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function w(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function g({workerId:t=0,timeLen:r,workerLen:o,randomLen:a}){return{timestampStr:Date.now().toString(36).padStart(r,"0"),workerIdStr:t.toString(36).padStart(o,"0"),randomStr:f.randomInt(36**a-1).toString(36).padStart(a,"0")}}function L({workerId:t,isFixedLength:r=!1,prefix:o=""}={}){const c=t??f.randomInt(46655),m=36**4-1;let s=0,i="",u="",S="",d="",e=0;function l(){const n=g({workerId:c,timeLen:9,workerLen:3,randomLen:4});s=n.timestampStr===i?Math.min(36**1-1,s+1):0,i=n.timestampStr,u=n.workerIdStr,S=n.randomStr,d=`${o}${i}${u}${S}${s.toString(36).padStart(1,"0")}`,e=0}return l(),r?function(){return e>m&&l(),d+(e++).toString(36).padStart(4,"0")}:function(){return e>m&&l(),d+(e++).toString(36)}}exports.commonjsGlobal=p;exports.getDefaultExportFromCjs=w;exports.useSoonIdGen=L;