zudoku 0.3.0-dev.5 → 0.3.0-dev.6

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 (54) hide show
  1. package/dist/app/App.js +2 -1
  2. package/dist/app/App.js.map +1 -1
  3. package/dist/lib/authentication/hook.d.ts +1 -0
  4. package/dist/lib/authentication/hook.js +1 -0
  5. package/dist/lib/authentication/hook.js.map +1 -1
  6. package/dist/lib/authentication/providers/auth0.js +1 -0
  7. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  8. package/dist/lib/authentication/providers/clerk.js +2 -0
  9. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  10. package/dist/lib/authentication/providers/openid.js +2 -0
  11. package/dist/lib/authentication/providers/openid.js.map +1 -1
  12. package/dist/lib/authentication/state.d.ts +1 -0
  13. package/dist/lib/authentication/state.js +1 -0
  14. package/dist/lib/authentication/state.js.map +1 -1
  15. package/dist/lib/components/DevPortal.js +0 -1
  16. package/dist/lib/components/DevPortal.js.map +1 -1
  17. package/dist/lib/components/SyntaxHighlight.js +1 -1
  18. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  19. package/dist/lib/core/DevPortalContext.js +5 -4
  20. package/dist/lib/core/DevPortalContext.js.map +1 -1
  21. package/dist/lib/plugins/api-key/CreateApiKey.d.ts +2 -3
  22. package/dist/lib/plugins/api-key/CreateApiKey.js +1 -1
  23. package/dist/lib/plugins/api-key/CreateApiKey.js.map +1 -1
  24. package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +2 -3
  25. package/dist/lib/plugins/api-key/SettingsApiKeys.js +2 -1
  26. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +1 -1
  27. package/dist/lib/plugins/api-key/index.js +20 -5
  28. package/dist/lib/plugins/api-key/index.js.map +1 -1
  29. package/dist/vite/config.test.js +1 -1
  30. package/dist/vite/config.test.js.map +1 -1
  31. package/dist/vite/plugin-docs.test.js +1 -1
  32. package/dist/vite/plugin-docs.test.js.map +1 -1
  33. package/lib/{Spinner-DWHrSHMP.js → Spinner-BINYpvLB.js} +3 -2
  34. package/lib/{index-DNx3xWa2.js → index-PyGcnQFX.js} +13 -12
  35. package/lib/loglevel-CoH7VSwE.js +152 -0
  36. package/lib/{state-DfftBQ9X.js → state-2Hu1renZ.js} +6 -5
  37. package/lib/zudoku.auth-auth0.js +2 -1
  38. package/lib/zudoku.auth-clerk.js +9 -7
  39. package/lib/zudoku.auth-openid.js +442 -587
  40. package/lib/zudoku.components.js +7 -6
  41. package/lib/zudoku.plugins.js +2567 -2548
  42. package/package.json +2 -1
  43. package/src/app/App.tsx +2 -1
  44. package/src/lib/authentication/hook.ts +1 -0
  45. package/src/lib/authentication/providers/auth0.tsx +1 -0
  46. package/src/lib/authentication/providers/clerk.tsx +2 -0
  47. package/src/lib/authentication/providers/openid.tsx +2 -0
  48. package/src/lib/authentication/state.ts +2 -0
  49. package/src/lib/components/DevPortal.tsx +0 -1
  50. package/src/lib/components/SyntaxHighlight.tsx +1 -1
  51. package/src/lib/core/DevPortalContext.ts +5 -4
  52. package/src/lib/plugins/api-key/CreateApiKey.tsx +2 -8
  53. package/src/lib/plugins/api-key/SettingsApiKeys.tsx +3 -8
  54. package/src/lib/plugins/api-key/index.tsx +30 -5
@@ -0,0 +1,152 @@
1
+ import { a as N, g as _ } from "./state-2Hu1renZ.js";
2
+ var I = { exports: {} };
3
+ (function(w) {
4
+ (function(g, i) {
5
+ w.exports ? w.exports = i() : g.log = i();
6
+ })(N, function() {
7
+ var g = function() {
8
+ }, i = "undefined", C = typeof window !== i && typeof window.navigator !== i && /Trident\/|MSIE /.test(window.navigator.userAgent), p = [
9
+ "trace",
10
+ "debug",
11
+ "info",
12
+ "warn",
13
+ "error"
14
+ ], a = {}, l = null;
15
+ function h(o, t) {
16
+ var e = o[t];
17
+ if (typeof e.bind == "function")
18
+ return e.bind(o);
19
+ try {
20
+ return Function.prototype.bind.call(e, o);
21
+ } catch {
22
+ return function() {
23
+ return Function.prototype.apply.apply(e, [o, arguments]);
24
+ };
25
+ }
26
+ }
27
+ function T() {
28
+ console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
29
+ }
30
+ function x(o) {
31
+ return o === "debug" && (o = "log"), typeof console === i ? !1 : o === "trace" && C ? T : console[o] !== void 0 ? h(console, o) : console.log !== void 0 ? h(console, "log") : g;
32
+ }
33
+ function u() {
34
+ for (var o = this.getLevel(), t = 0; t < p.length; t++) {
35
+ var e = p[t];
36
+ this[e] = t < o ? g : this.methodFactory(e, o, this.name);
37
+ }
38
+ if (this.log = this.debug, typeof console === i && o < this.levels.SILENT)
39
+ return "No console available for logging";
40
+ }
41
+ function F(o) {
42
+ return function() {
43
+ typeof console !== i && (u.call(this), this[o].apply(this, arguments));
44
+ };
45
+ }
46
+ function R(o, t, e) {
47
+ return x(o) || F.apply(this, arguments);
48
+ }
49
+ function L(o, t) {
50
+ var e = this, v, y, f, s = "loglevel";
51
+ typeof o == "string" ? s += ":" + o : typeof o == "symbol" && (s = void 0);
52
+ function S(n) {
53
+ var r = (p[n] || "silent").toUpperCase();
54
+ if (!(typeof window === i || !s)) {
55
+ try {
56
+ window.localStorage[s] = r;
57
+ return;
58
+ } catch {
59
+ }
60
+ try {
61
+ window.document.cookie = encodeURIComponent(s) + "=" + r + ";";
62
+ } catch {
63
+ }
64
+ }
65
+ }
66
+ function b() {
67
+ var n;
68
+ if (!(typeof window === i || !s)) {
69
+ try {
70
+ n = window.localStorage[s];
71
+ } catch {
72
+ }
73
+ if (typeof n === i)
74
+ try {
75
+ var r = window.document.cookie, d = encodeURIComponent(s), m = r.indexOf(d + "=");
76
+ m !== -1 && (n = /^([^;]+)/.exec(
77
+ r.slice(m + d.length + 1)
78
+ )[1]);
79
+ } catch {
80
+ }
81
+ return e.levels[n] === void 0 && (n = void 0), n;
82
+ }
83
+ }
84
+ function U() {
85
+ if (!(typeof window === i || !s)) {
86
+ try {
87
+ window.localStorage.removeItem(s);
88
+ } catch {
89
+ }
90
+ try {
91
+ window.document.cookie = encodeURIComponent(s) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
92
+ } catch {
93
+ }
94
+ }
95
+ }
96
+ function c(n) {
97
+ var r = n;
98
+ if (typeof r == "string" && e.levels[r.toUpperCase()] !== void 0 && (r = e.levels[r.toUpperCase()]), typeof r == "number" && r >= 0 && r <= e.levels.SILENT)
99
+ return r;
100
+ throw new TypeError("log.setLevel() called with invalid level: " + n);
101
+ }
102
+ e.name = o, e.levels = {
103
+ TRACE: 0,
104
+ DEBUG: 1,
105
+ INFO: 2,
106
+ WARN: 3,
107
+ ERROR: 4,
108
+ SILENT: 5
109
+ }, e.methodFactory = t || R, e.getLevel = function() {
110
+ return f ?? y ?? v;
111
+ }, e.setLevel = function(n, r) {
112
+ return f = c(n), r !== !1 && S(f), u.call(e);
113
+ }, e.setDefaultLevel = function(n) {
114
+ y = c(n), b() || e.setLevel(n, !1);
115
+ }, e.resetLevel = function() {
116
+ f = null, U(), u.call(e);
117
+ }, e.enableAll = function(n) {
118
+ e.setLevel(e.levels.TRACE, n);
119
+ }, e.disableAll = function(n) {
120
+ e.setLevel(e.levels.SILENT, n);
121
+ }, e.rebuild = function() {
122
+ if (l !== e && (v = c(l.getLevel())), u.call(e), l === e)
123
+ for (var n in a)
124
+ a[n].rebuild();
125
+ }, v = c(
126
+ l ? l.getLevel() : "WARN"
127
+ );
128
+ var E = b();
129
+ E != null && (f = c(E)), u.call(e);
130
+ }
131
+ l = new L(), l.getLogger = function(t) {
132
+ if (typeof t != "symbol" && typeof t != "string" || t === "")
133
+ throw new TypeError("You must supply a name when creating a logger.");
134
+ var e = a[t];
135
+ return e || (e = a[t] = new L(
136
+ t,
137
+ l.methodFactory
138
+ )), e;
139
+ };
140
+ var A = typeof window !== i ? window.log : void 0;
141
+ return l.noConflict = function() {
142
+ return typeof window !== i && window.log === l && (window.log = A), l;
143
+ }, l.getLoggers = function() {
144
+ return a;
145
+ }, l.default = l, l;
146
+ });
147
+ })(I);
148
+ var D = I.exports;
149
+ const P = /* @__PURE__ */ _(D);
150
+ export {
151
+ P as l
152
+ };
@@ -164,9 +164,9 @@ function te() {
164
164
  B.useSyncExternalStore = R, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
165
165
  }()), B;
166
166
  }
167
- var q;
167
+ var P;
168
168
  function Y() {
169
- return q || (q = 1, process.env.NODE_ENV === "production" ? T.exports = ee() : T.exports = te()), T.exports;
169
+ return P || (P = 1, process.env.NODE_ENV === "production" ? T.exports = ee() : T.exports = te()), T.exports;
170
170
  }
171
171
  /**
172
172
  * @license React
@@ -177,10 +177,10 @@ function Y() {
177
177
  * This source code is licensed under the MIT license found in the
178
178
  * LICENSE file in the root directory of this source tree.
179
179
  */
180
- var P;
180
+ var q;
181
181
  function ne() {
182
- if (P) return M;
183
- P = 1;
182
+ if (q) return M;
183
+ q = 1;
184
184
  var e = A, i = Y();
185
185
  function a(E, u) {
186
186
  return E === u && (E !== 0 || 1 / E === 1 / u) || E !== E && u !== u;
@@ -301,6 +301,7 @@ const $ = (e) => {
301
301
  const i = typeof e == "function" ? Z(e) : e, a = (f, p) => ce(i, f, p);
302
302
  return Object.assign(a, i), a;
303
303
  }, fe = (e) => e ? $(e) : $, _e = fe(() => ({
304
+ isPending: !0,
304
305
  isAuthenticated: !1
305
306
  }));
306
307
  export {
@@ -1,9 +1,10 @@
1
- import { u as i } from "./state-DfftBQ9X.js";
1
+ import { u as i } from "./state-2Hu1renZ.js";
2
2
  import { OpenIDAuthenticationProvider as n } from "./zudoku.auth-openid.js";
3
3
  class r extends n {
4
4
  async logout() {
5
5
  i.setState({
6
6
  isAuthenticated: !1,
7
+ isPending: !1,
7
8
  profile: void 0
8
9
  });
9
10
  const t = await this.getAuthServer(), e = new URL(window.location.href);
@@ -1,12 +1,12 @@
1
- import { u as i } from "./state-DfftBQ9X.js";
1
+ import { u as t } from "./state-2Hu1renZ.js";
2
2
  const r = ({ clerkPubKey: a }) => {
3
3
  let e;
4
- const t = (async () => {
4
+ const i = (async () => {
5
5
  const { Clerk: s } = await import("./clerk-Wslx_mPo.js");
6
6
  e = new s(a), await e.load({});
7
7
  })();
8
- async function o() {
9
- if (await t, !e.session)
8
+ async function n() {
9
+ if (await i, !e.session)
10
10
  throw new Error("No session available");
11
11
  const s = await e.session.getToken();
12
12
  if (!s)
@@ -16,8 +16,9 @@ const r = ({ clerkPubKey: a }) => {
16
16
  return {
17
17
  initialize: async () => {
18
18
  var s;
19
- await t, e.session ? i.setState({
19
+ await i, e.session ? t.setState({
20
20
  isAuthenticated: !0,
21
+ isPending: !1,
21
22
  profile: {
22
23
  sub: e.session.user.id,
23
24
  name: e.session.user.fullName ?? void 0,
@@ -27,12 +28,13 @@ const r = ({ clerkPubKey: a }) => {
27
28
  // emailVerified: clerkApi.session.user.hasVerifiedEmailAddress,
28
29
  pictureUrl: e.session.user.imageUrl
29
30
  }
30
- }) : i.setState({
31
+ }) : t.setState({
31
32
  isAuthenticated: !1,
33
+ isPending: !1,
32
34
  profile: void 0
33
35
  });
34
36
  },
35
- getAccessToken: o,
37
+ getAccessToken: n,
36
38
  logout: async () => {
37
39
  await e.signOut();
38
40
  },