zudoku 0.3.0-dev.79 → 0.3.0-dev.80
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/dist/lib/plugins/openapi/Sidecar.d.ts +4 -0
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +25 -5
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/lib/{AuthenticationPlugin-CngUn5DP.js → AuthenticationPlugin-XS0DoAhE.js} +2 -2
- package/lib/{AuthenticationPlugin-CngUn5DP.js.map → AuthenticationPlugin-XS0DoAhE.js.map} +1 -1
- package/lib/{Combination-CS4rK8IJ.js → Combination-C442XfGG.js} +368 -347
- package/lib/Combination-C442XfGG.js.map +1 -0
- package/lib/{DevPortalProvider-BTFqdAEL.js → DevPortalProvider-BWeAysxF.js} +6 -5
- package/lib/{DevPortalProvider-BTFqdAEL.js.map → DevPortalProvider-BWeAysxF.js.map} +1 -1
- package/lib/{Input-GFpPXs5b.js → Input-3IEt27jb.js} +3 -3
- package/lib/{Input-GFpPXs5b.js.map → Input-3IEt27jb.js.map} +1 -1
- package/lib/{MdxPage-V4FCB0C_.js → MdxPage-CA1WmW14.js} +2 -2
- package/lib/{MdxPage-V4FCB0C_.js.map → MdxPage-CA1WmW14.js.map} +1 -1
- package/lib/OperationList-rv6Z3wD3.js +431 -0
- package/lib/OperationList-rv6Z3wD3.js.map +1 -0
- package/lib/{Route-CogU1ofM.js → Route-Clw81GSR.js} +2 -2
- package/lib/{Route-CogU1ofM.js.map → Route-Clw81GSR.js.map} +1 -1
- package/lib/{SlotletProvider-D_Vz-7c_.js → SlotletProvider-B71hNEUL.js} +24 -45
- package/lib/SlotletProvider-B71hNEUL.js.map +1 -0
- package/lib/{Spinner-oNQQyp-I.js → Spinner-Coi7ORUV.js} +2 -2
- package/lib/{Spinner-oNQQyp-I.js.map → Spinner-Coi7ORUV.js.map} +1 -1
- package/lib/{index-D4bOMg7f.js → index-BH-Ub36F.js} +5 -5
- package/lib/{index-D4bOMg7f.js.map → index-BH-Ub36F.js.map} +1 -1
- package/lib/index-CLkuJSxj.js +5950 -0
- package/lib/index-CLkuJSxj.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +1 -1
- package/lib/zudoku.components.js +25 -25
- package/lib/zudoku.plugin-api-keys.js +12 -12
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-openapi.js +4 -3
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/index.tsx +52 -16
- package/lib/Combination-CS4rK8IJ.js.map +0 -1
- package/lib/OperationList-C-M33Hxu.js +0 -4368
- package/lib/OperationList-C-M33Hxu.js.map +0 -1
- package/lib/SlotletProvider-D_Vz-7c_.js.map +0 -1
- package/lib/context-_fYfJFgk.js +0 -14
- package/lib/context-_fYfJFgk.js.map +0 -1
- package/lib/index-Uqja2h2M.js +0 -1960
- package/lib/index-Uqja2h2M.js.map +0 -1
package/lib/zudoku.auth-clerk.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var u = Object.defineProperty;
|
|
2
2
|
var d = (n, i, e) => i in n ? u(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
|
|
3
3
|
var a = (n, i, e) => d(n, typeof i != "symbol" ? i + "" : i, e);
|
|
4
|
-
import { A as w } from "./AuthenticationPlugin-
|
|
4
|
+
import { A as w } from "./AuthenticationPlugin-XS0DoAhE.js";
|
|
5
5
|
import { u as l } from "./state-DsXXkBLH.js";
|
|
6
6
|
class g extends w {
|
|
7
7
|
constructor(e) {
|
|
@@ -3,7 +3,7 @@ var Re = (t, e, n) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var g = (t, e, n) => Re(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { j as Pe } from "./jsx-runtime-CJBdjYYx.js";
|
|
5
5
|
import { c as Ue, a as xe } from "./_commonjsHelpers-BVfed4GL.js";
|
|
6
|
-
import { A as Le } from "./AuthenticationPlugin-
|
|
6
|
+
import { A as Le } from "./AuthenticationPlugin-XS0DoAhE.js";
|
|
7
7
|
import { u as ne } from "./state-DsXXkBLH.js";
|
|
8
8
|
var de = { exports: {} };
|
|
9
9
|
(function(t) {
|
package/lib/zudoku.components.js
CHANGED
|
@@ -15,17 +15,17 @@ var Ce = (t, e, n, r) => ({
|
|
|
15
15
|
});
|
|
16
16
|
import { H as _t, a as Ge, M as ur, A as lr, u as dr } from "./AnchorLink-BZcpTwOs.js";
|
|
17
17
|
import { d as hr, R as pr, N as $e, L as Ee } from "./index-Dt-pU7Vu.js";
|
|
18
|
-
import { E as Et,
|
|
19
|
-
import { j as o, d as
|
|
20
|
-
import { M as
|
|
18
|
+
import { E as Et, S as fr, a as Se, R as mr } from "./SlotletProvider-B71hNEUL.js";
|
|
19
|
+
import { j as o, d as gr, u as J, a as vr, b as xr, O as St } from "./jsx-runtime-CJBdjYYx.js";
|
|
20
|
+
import { M as yr, c as wr, a as jt, b as Nt, A as Mr, u as fe, h as br, d as y, e as Cr, F as Pr, D as Rr, C as _r, P as ie, f as qe, g as Er, i as Dt, R as Sr, S as jr, j as Nr, k as Dr, l as It, m as Ir, n as je, o as At, p as Ar, B as Be } from "./Combination-C442XfGG.js";
|
|
21
21
|
import { c as me, a as P, C as Or, b as Tr, u as kr, M as Fr, T as Lr, V as Kr, d as He, e as $r, f as Br } from "./Markdown-QsZ-PHET.js";
|
|
22
22
|
import * as u from "react";
|
|
23
23
|
import Qr, { StrictMode as Ot, createContext as Tt, Component as Ur, createElement as pt, isValidElement as Gr, memo as kt, useMemo as Le, useState as le, useContext as qr, useRef as ge, useEffect as W, Fragment as Hr, forwardRef as zr, Suspense as Vr } from "react";
|
|
24
24
|
import { g as ze } from "./_commonjsHelpers-BVfed4GL.js";
|
|
25
25
|
import { r as Yr } from "./router-BiRCp01d.js";
|
|
26
|
-
import { S as Qe, R as Ft, T as Lt, C as Kt } from "./index-
|
|
27
|
-
import { S as $t, h as Bt, Q as Xr, n as j, m as ft, a as mt, b as Q, e as Wr, c as Jr, d as Zr, f as ea, o as gt, r as vt, g as ta, i as xt, p as yt, s as na, u as Ve, j as ra, D as aa, k as Ye, l as wt, q as Qt, t as oa, v as sa, w as ia } from "./DevPortalProvider-
|
|
28
|
-
import { c as Ut, P as Ie, R as ca, I as ua, S as la } from "./Spinner-
|
|
26
|
+
import { S as Qe, R as Ft, T as Lt, C as Kt } from "./index-BH-Ub36F.js";
|
|
27
|
+
import { S as $t, h as Bt, Q as Xr, n as j, m as ft, a as mt, b as Q, e as Wr, c as Jr, d as Zr, f as ea, o as gt, r as vt, g as ta, i as xt, p as yt, s as na, u as Ve, j as ra, D as aa, k as Ye, l as wt, q as Qt, t as oa, v as sa, w as ia } from "./DevPortalProvider-BWeAysxF.js";
|
|
28
|
+
import { c as Ut, P as Ie, R as ca, I as ua, S as la } from "./Spinner-Coi7ORUV.js";
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v0.378.0 - ISC
|
|
31
31
|
*
|
|
@@ -87,7 +87,7 @@ function ma({ error: t }) {
|
|
|
87
87
|
return /* @__PURE__ */ o.jsx(Et, { error: t });
|
|
88
88
|
}
|
|
89
89
|
var ve = {};
|
|
90
|
-
const ga = /* @__PURE__ */ ze(Yr), va = /* @__PURE__ */ ze(
|
|
90
|
+
const ga = /* @__PURE__ */ ze(Yr), va = /* @__PURE__ */ ze(gr), xa = /* @__PURE__ */ ze(hr);
|
|
91
91
|
Object.defineProperty(ve, "__esModule", { value: !0 });
|
|
92
92
|
var ya = Qr, K = ga, We = va, U = xa;
|
|
93
93
|
function wa(t) {
|
|
@@ -443,7 +443,7 @@ var L, Ct, Oa = (Ct = class extends $t {
|
|
|
443
443
|
this.config = e, b(this, S, /* @__PURE__ */ new Map()), b(this, pe, Date.now());
|
|
444
444
|
}
|
|
445
445
|
build(e, n, r) {
|
|
446
|
-
const a = new
|
|
446
|
+
const a = new yr({
|
|
447
447
|
mutationCache: this,
|
|
448
448
|
mutationId: ++Ce(this, pe)._,
|
|
449
449
|
options: e.defaultMutationOptions(n),
|
|
@@ -940,12 +940,12 @@ var Ue = ["Enter", " "], Xa = ["ArrowDown", "PageUp", "Home"], Vt = ["ArrowUp",
|
|
|
940
940
|
}, Za = {
|
|
941
941
|
ltr: ["ArrowLeft"],
|
|
942
942
|
rtl: ["ArrowRight"]
|
|
943
|
-
}, xe = "Menu", [de, eo, to] =
|
|
943
|
+
}, xe = "Menu", [de, eo, to] = wr(xe), [Z, Yt] = jt(xe, [
|
|
944
944
|
to,
|
|
945
945
|
Nt,
|
|
946
946
|
Ut
|
|
947
947
|
]), ye = Nt(), Xt = Ut(), [Wt, V] = Z(xe), [no, we] = Z(xe), Jt = (t) => {
|
|
948
|
-
const { __scopeMenu: e, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = t, c = ye(e), [l, p] = u.useState(null), f = u.useRef(!1), d = qe(s), g =
|
|
948
|
+
const { __scopeMenu: e, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = t, c = ye(e), [l, p] = u.useState(null), f = u.useRef(!1), d = qe(s), g = Dr(a);
|
|
949
949
|
return u.useEffect(() => {
|
|
950
950
|
const v = () => {
|
|
951
951
|
f.current = !0, document.addEventListener("pointerdown", x, { capture: !0, once: !0 }), document.addEventListener("pointermove", x, { capture: !0, once: !0 });
|
|
@@ -979,7 +979,7 @@ Jt.displayName = xe;
|
|
|
979
979
|
var ro = "MenuAnchor", Je = u.forwardRef(
|
|
980
980
|
(t, e) => {
|
|
981
981
|
const { __scopeMenu: n, ...r } = t, a = ye(n);
|
|
982
|
-
return /* @__PURE__ */ o.jsx(
|
|
982
|
+
return /* @__PURE__ */ o.jsx(Mr, { ...a, ...r, ref: e });
|
|
983
983
|
}
|
|
984
984
|
);
|
|
985
985
|
Je.displayName = ro;
|
|
@@ -987,7 +987,7 @@ var Ze = "MenuPortal", [ao, Zt] = Z(Ze, {
|
|
|
987
987
|
forceMount: void 0
|
|
988
988
|
}), en = (t) => {
|
|
989
989
|
const { __scopeMenu: e, forceMount: n, children: r, container: a } = t, s = V(Ze, e);
|
|
990
|
-
return /* @__PURE__ */ o.jsx(ao, { scope: e, forceMount: n, children: /* @__PURE__ */ o.jsx(Ie, { present: n || s.open, children: /* @__PURE__ */ o.jsx(
|
|
990
|
+
return /* @__PURE__ */ o.jsx(ao, { scope: e, forceMount: n, children: /* @__PURE__ */ o.jsx(Ie, { present: n || s.open, children: /* @__PURE__ */ o.jsx(Ir, { asChild: !0, container: a, children: r }) }) });
|
|
991
991
|
};
|
|
992
992
|
en.displayName = Ze;
|
|
993
993
|
var T = "MenuContent", [oo, et] = Z(T), tn = u.forwardRef(
|
|
@@ -1000,7 +1000,7 @@ var T = "MenuContent", [oo, et] = Z(T), tn = u.forwardRef(
|
|
|
1000
1000
|
const n = V(T, t.__scopeMenu), r = u.useRef(null), a = fe(e, r);
|
|
1001
1001
|
return u.useEffect(() => {
|
|
1002
1002
|
const s = r.current;
|
|
1003
|
-
if (s) return
|
|
1003
|
+
if (s) return br(s);
|
|
1004
1004
|
}, []), /* @__PURE__ */ o.jsx(
|
|
1005
1005
|
tt,
|
|
1006
1006
|
{
|
|
@@ -1048,14 +1048,14 @@ var T = "MenuContent", [oo, et] = Z(T), tn = u.forwardRef(
|
|
|
1048
1048
|
onDismiss: v,
|
|
1049
1049
|
disableOutsideScroll: x,
|
|
1050
1050
|
...R
|
|
1051
|
-
} = t, N = V(T, n), _ = we(T, n), D = ye(n), w = Xt(n), E = eo(n), [$, Y] = u.useState(null), ee = u.useRef(null), Me = fe(e, ee, N.onContentChange), X = u.useRef(0), be = u.useRef(""), rr = u.useRef(0), Oe = u.useRef(null), it = u.useRef("right"), Te = u.useRef(0), ar = x ?
|
|
1051
|
+
} = t, N = V(T, n), _ = we(T, n), D = ye(n), w = Xt(n), E = eo(n), [$, Y] = u.useState(null), ee = u.useRef(null), Me = fe(e, ee, N.onContentChange), X = u.useRef(0), be = u.useRef(""), rr = u.useRef(0), Oe = u.useRef(null), it = u.useRef("right"), Te = u.useRef(0), ar = x ? Sr : u.Fragment, or = x ? { as: jr, allowPinchZoom: !0 } : void 0, sr = (m) => {
|
|
1052
1052
|
var ne, ut;
|
|
1053
1053
|
const I = be.current + m, k = E().filter((B) => !B.disabled), G = document.activeElement, ke = (ne = k.find((B) => B.ref.current === G)) == null ? void 0 : ne.textValue, Fe = k.map((B) => B.textValue), ct = wo(Fe, I, ke), ce = (ut = k.find((B) => B.textValue === ct)) == null ? void 0 : ut.ref.current;
|
|
1054
1054
|
(function B(lt) {
|
|
1055
1055
|
be.current = lt, window.clearTimeout(X.current), lt !== "" && (X.current = window.setTimeout(() => B(""), 1e3));
|
|
1056
1056
|
})(I), ce && setTimeout(() => ce.focus());
|
|
1057
1057
|
};
|
|
1058
|
-
u.useEffect(() => () => window.clearTimeout(X.current), []),
|
|
1058
|
+
u.useEffect(() => () => window.clearTimeout(X.current), []), Cr();
|
|
1059
1059
|
const te = u.useCallback((m) => {
|
|
1060
1060
|
var k, G;
|
|
1061
1061
|
return it.current === ((k = Oe.current) == null ? void 0 : k.side) && bo(m, (G = Oe.current) == null ? void 0 : G.area);
|
|
@@ -1089,7 +1089,7 @@ var T = "MenuContent", [oo, et] = Z(T), tn = u.forwardRef(
|
|
|
1089
1089
|
Oe.current = m;
|
|
1090
1090
|
}, []),
|
|
1091
1091
|
children: /* @__PURE__ */ o.jsx(ar, { ...or, children: /* @__PURE__ */ o.jsx(
|
|
1092
|
-
|
|
1092
|
+
Pr,
|
|
1093
1093
|
{
|
|
1094
1094
|
asChild: !0,
|
|
1095
1095
|
trapped: a,
|
|
@@ -1099,7 +1099,7 @@ var T = "MenuContent", [oo, et] = Z(T), tn = u.forwardRef(
|
|
|
1099
1099
|
}),
|
|
1100
1100
|
onUnmountAutoFocus: i,
|
|
1101
1101
|
children: /* @__PURE__ */ o.jsx(
|
|
1102
|
-
|
|
1102
|
+
Rr,
|
|
1103
1103
|
{
|
|
1104
1104
|
asChild: !0,
|
|
1105
1105
|
disableOutsidePointerEvents: c,
|
|
@@ -1123,7 +1123,7 @@ var T = "MenuContent", [oo, et] = Z(T), tn = u.forwardRef(
|
|
|
1123
1123
|
}),
|
|
1124
1124
|
preventScrollOnEntryFocus: !0,
|
|
1125
1125
|
children: /* @__PURE__ */ o.jsx(
|
|
1126
|
-
|
|
1126
|
+
_r,
|
|
1127
1127
|
{
|
|
1128
1128
|
role: "menu",
|
|
1129
1129
|
"aria-orientation": "vertical",
|
|
@@ -1189,7 +1189,7 @@ var Ne = "MenuItem", bt = "menu.itemSelect", Ae = u.forwardRef(
|
|
|
1189
1189
|
const d = s.current;
|
|
1190
1190
|
if (!n && d) {
|
|
1191
1191
|
const g = new CustomEvent(bt, { bubbles: !0, cancelable: !0 });
|
|
1192
|
-
d.addEventListener(bt, (v) => r == null ? void 0 : r(v), { once: !0 }),
|
|
1192
|
+
d.addEventListener(bt, (v) => r == null ? void 0 : r(v), { once: !0 }), Nr(d, g), g.defaultPrevented ? p.current = !1 : i.onClose();
|
|
1193
1193
|
}
|
|
1194
1194
|
};
|
|
1195
1195
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -1351,7 +1351,7 @@ hn.displayName = mo;
|
|
|
1351
1351
|
var go = "MenuArrow", pn = u.forwardRef(
|
|
1352
1352
|
(t, e) => {
|
|
1353
1353
|
const { __scopeMenu: n, ...r } = t, a = ye(n);
|
|
1354
|
-
return /* @__PURE__ */ o.jsx(
|
|
1354
|
+
return /* @__PURE__ */ o.jsx(Er, { ...a, ...r, ref: e });
|
|
1355
1355
|
}
|
|
1356
1356
|
);
|
|
1357
1357
|
pn.displayName = go;
|
|
@@ -1844,7 +1844,7 @@ const hs = () => {
|
|
|
1844
1844
|
/* @__PURE__ */ o.jsx(Wn, { item: e }, n)
|
|
1845
1845
|
)) }) })
|
|
1846
1846
|
] }, t.label) : /* @__PURE__ */ o.jsx(Ee, { to: t.path ?? "", children: /* @__PURE__ */ o.jsx(Vn, { children: t.label }, t.label) }), Jn = kt(function() {
|
|
1847
|
-
const [e, n] = kr(), { isAuthenticated: r, profile: a, isAuthEnabled: s } =
|
|
1847
|
+
const [e, n] = kr(), { isAuthenticated: r, profile: a, isAuthEnabled: s } = Ar(), { pathname: i } = J(), c = Ve(), { page: l, plugins: p } = c, f = e ? pa : fa;
|
|
1848
1848
|
return /* @__PURE__ */ o.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
1849
1849
|
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-12 h-[--top-header-height]", children: [
|
|
1850
1850
|
/* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(Ee, { to: "/", children: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
@@ -1926,10 +1926,10 @@ const hs = () => {
|
|
|
1926
1926
|
...Fr,
|
|
1927
1927
|
...(D = e.mdx) == null ? void 0 : D.components
|
|
1928
1928
|
};
|
|
1929
|
-
}, [(R = e.mdx) == null ? void 0 : R.components, e.plugins]), [a, s] = le(!1), { stagger: i } = qr(Qe), [c, l] = le(!1), p =
|
|
1929
|
+
}, [(R = e.mdx) == null ? void 0 : R.components, e.plugins]), [a, s] = le(!1), { stagger: i } = qr(Qe), [c, l] = le(!1), p = vr(), f = ge("idle"), d = Le(
|
|
1930
1930
|
() => c ? { stagger: !0 } : { stagger: i },
|
|
1931
1931
|
[i, c]
|
|
1932
|
-
), g =
|
|
1932
|
+
), g = xr();
|
|
1933
1933
|
W(() => {
|
|
1934
1934
|
c || l(!0);
|
|
1935
1935
|
}, [c, g.location]);
|
|
@@ -1945,7 +1945,7 @@ const hs = () => {
|
|
|
1945
1945
|
});
|
|
1946
1946
|
return a ? /* @__PURE__ */ o.jsxs(ra, { client: zt, children: [
|
|
1947
1947
|
/* @__PURE__ */ o.jsx(Ge, { children: x }),
|
|
1948
|
-
/* @__PURE__ */ o.jsx(Qe.Provider, { value: d, children: /* @__PURE__ */ o.jsx(aa, { value: v, children: /* @__PURE__ */ o.jsx(ur, { components: r, children: /* @__PURE__ */ o.jsx(Lr, { children: /* @__PURE__ */ o.jsx(fs, { value: n, children: /* @__PURE__ */ o.jsx(
|
|
1948
|
+
/* @__PURE__ */ o.jsx(Qe.Provider, { value: d, children: /* @__PURE__ */ o.jsx(aa, { value: v, children: /* @__PURE__ */ o.jsx(ur, { components: r, children: /* @__PURE__ */ o.jsx(Lr, { children: /* @__PURE__ */ o.jsx(fs, { value: n, children: /* @__PURE__ */ o.jsx(fr, { slotlets: e.slotlets, children: /* @__PURE__ */ o.jsx(Kr, { children: t ?? /* @__PURE__ */ o.jsx(St, {}) }) }) }) }) }) }) })
|
|
1949
1949
|
] }) : null;
|
|
1950
1950
|
}, gs = kt(ms), er = (t) => /* @__PURE__ */ o.jsx($a, { FallbackComponent: Ya, children: /* @__PURE__ */ o.jsx(gs, { ...t }) });
|
|
1951
1951
|
er.displayName = "DevPortal";
|
|
@@ -2196,7 +2196,7 @@ const vs = () => {
|
|
|
2196
2196
|
}
|
|
2197
2197
|
) })
|
|
2198
2198
|
] });
|
|
2199
|
-
}, Ls = dr, Ks = Br, $s = er, Bs = Cs, Qs = Ee, Us =
|
|
2199
|
+
}, Ls = dr, Ks = Br, $s = er, Bs = Cs, Qs = Ee, Us = mr, Gs = ma, qs = Ia, Hs = Aa, zs = Be, Vs = Ge;
|
|
2200
2200
|
export {
|
|
2201
2201
|
qs as Bootstrap,
|
|
2202
2202
|
Hs as BootstrapStatic,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as f, j as e, O as j } from "./jsx-runtime-CJBdjYYx.js";
|
|
2
|
-
import {
|
|
3
|
-
import { u as
|
|
2
|
+
import { a as x, R as g } from "./SlotletProvider-B71hNEUL.js";
|
|
3
|
+
import { u as v, a as h, I as w, S as k, b, c as K, d as N, e as A, f as p } from "./Input-3IEt27jb.js";
|
|
4
4
|
import { L as u } from "./index-Dt-pU7Vu.js";
|
|
5
|
-
import { u as m, x as
|
|
6
|
-
import { B as o } from "./Combination-
|
|
5
|
+
import { u as m, x as E, y as S } from "./DevPortalProvider-BWeAysxF.js";
|
|
6
|
+
import { B as o, p as I } from "./Combination-C442XfGG.js";
|
|
7
7
|
import { D as P } from "./DeveloperHint-DQVwIery.js";
|
|
8
8
|
import { useState as C } from "react";
|
|
9
9
|
import { c as l, a as D } from "./Markdown-QsZ-PHET.js";
|
|
@@ -71,7 +71,7 @@ class M extends Error {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
const L = ({ service: t }) => {
|
|
74
|
-
const n = m(), r = f(), a =
|
|
74
|
+
const n = m(), r = f(), a = v({
|
|
75
75
|
defaultValues: {
|
|
76
76
|
expiresOn: "30"
|
|
77
77
|
}
|
|
@@ -95,16 +95,16 @@ const L = ({ service: t }) => {
|
|
|
95
95
|
onSubmit: a.handleSubmit((s) => i.mutate(s)),
|
|
96
96
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col", children: [
|
|
97
97
|
"Note",
|
|
98
|
-
/* @__PURE__ */ e.jsx(
|
|
98
|
+
/* @__PURE__ */ e.jsx(w, { ...a.register("description") }),
|
|
99
99
|
"Expiration",
|
|
100
100
|
/* @__PURE__ */ e.jsxs(
|
|
101
|
-
|
|
101
|
+
k,
|
|
102
102
|
{
|
|
103
103
|
onValueChange: (s) => a.setValue("expiresOn", s),
|
|
104
104
|
defaultValue: a.getValues("expiresOn"),
|
|
105
105
|
children: [
|
|
106
|
-
/* @__PURE__ */ e.jsx(
|
|
107
|
-
/* @__PURE__ */ e.jsx(
|
|
106
|
+
/* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(K, {}) }),
|
|
107
|
+
/* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs(A, { children: [
|
|
108
108
|
[7, 30, 60, 90].map((s) => /* @__PURE__ */ e.jsxs(p, { value: String(s), children: [
|
|
109
109
|
s,
|
|
110
110
|
" days"
|
|
@@ -126,7 +126,7 @@ const L = ({ service: t }) => {
|
|
|
126
126
|
const n = /* @__PURE__ */ new Date();
|
|
127
127
|
return n.setDate(n.getDate() + t), n.toISOString();
|
|
128
128
|
}, F = () => {
|
|
129
|
-
const t =
|
|
129
|
+
const t = I();
|
|
130
130
|
return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(j, {}) : t.isAuthEnabled ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
|
|
131
131
|
"Please login first to view this page",
|
|
132
132
|
/* @__PURE__ */ e.jsx(o, { onClick: () => t.login(), children: "Login" })
|
|
@@ -136,7 +136,7 @@ const L = ({ service: t }) => {
|
|
|
136
136
|
"."
|
|
137
137
|
] }) });
|
|
138
138
|
}, V = ({ service: t }) => {
|
|
139
|
-
const n = m(), r =
|
|
139
|
+
const n = m(), r = E(), { data: a } = S({
|
|
140
140
|
queryFn: () => t.getKeys(n),
|
|
141
141
|
queryKey: ["api-keys"],
|
|
142
142
|
retry: !1
|
|
@@ -282,7 +282,7 @@ const L = ({ service: t }) => {
|
|
|
282
282
|
getRoutes: () => [
|
|
283
283
|
{
|
|
284
284
|
element: /* @__PURE__ */ e.jsx(F, {}),
|
|
285
|
-
errorElement: /* @__PURE__ */ e.jsx(
|
|
285
|
+
errorElement: /* @__PURE__ */ e.jsx(g, {}),
|
|
286
286
|
children: [
|
|
287
287
|
{
|
|
288
288
|
path: "/settings/api-keys",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as o, N as x } from "./jsx-runtime-CJBdjYYx.js";
|
|
2
|
-
import { v as d, z as g, l as h } from "./DevPortalProvider-
|
|
2
|
+
import { v as d, z as g, l as h } from "./DevPortalProvider-BWeAysxF.js";
|
|
3
3
|
const f = (t, e) => {
|
|
4
4
|
const a = Object.entries(t).flatMap(
|
|
5
5
|
([n, m]) => {
|
|
@@ -9,7 +9,7 @@ const f = (t, e) => {
|
|
|
9
9
|
return {
|
|
10
10
|
path: i.at(-1) === "index" ? i.slice(0, -1).join("/") : s,
|
|
11
11
|
lazy: async () => {
|
|
12
|
-
const { MdxPage: u } = await import("./MdxPage-
|
|
12
|
+
const { MdxPage: u } = await import("./MdxPage-CA1WmW14.js"), { default: c, ...l } = await m();
|
|
13
13
|
return {
|
|
14
14
|
element: /* @__PURE__ */ o.jsx(
|
|
15
15
|
u,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "./jsx-runtime-CJBdjYYx.js";
|
|
2
|
-
import { o as
|
|
2
|
+
import { o as f } from "./index-CLkuJSxj.js";
|
|
3
3
|
import "./urql-DrBfkb92.js";
|
|
4
|
+
import "./DevPortalProvider-BWeAysxF.js";
|
|
4
5
|
import "zudoku/openapi-worker";
|
|
6
|
+
import "./Combination-C442XfGG.js";
|
|
5
7
|
import "./Markdown-QsZ-PHET.js";
|
|
6
|
-
import "./Combination-CS4rK8IJ.js";
|
|
7
8
|
import "./router-BiRCp01d.js";
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
f as openApiPlugin
|
|
10
11
|
};
|
|
11
12
|
//# sourceMappingURL=zudoku.plugin-openapi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.plugin-openapi.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zudoku.plugin-openapi.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -61,7 +61,7 @@ const getConverted = (snippet: HTTPSnippet, option: string) => {
|
|
|
61
61
|
return converted ? converted[0] : "";
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
const GetServerQuery = graphql(/* GraphQL */ `
|
|
64
|
+
export const GetServerQuery = graphql(/* GraphQL */ `
|
|
65
65
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
66
66
|
schema(input: $input, type: $type) {
|
|
67
67
|
url
|
|
@@ -3,24 +3,25 @@ import {
|
|
|
3
3
|
type DevPortalPlugin,
|
|
4
4
|
type PluginNavigationCategory,
|
|
5
5
|
} from "../../core/plugins.js";
|
|
6
|
-
import { MethodBadge } from "./MethodBadge.js";
|
|
7
6
|
import { graphql } from "./graphql/index.js";
|
|
7
|
+
import { MethodBadge } from "./MethodBadge.js";
|
|
8
8
|
import {
|
|
9
9
|
Client as UrqlClient,
|
|
10
10
|
cacheExchange,
|
|
11
11
|
fetchExchange,
|
|
12
12
|
} from "./util/urql.js";
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { useQuery } from "@tanstack/react-query";
|
|
15
|
+
import { CirclePlayIcon, LogInIcon } from "lucide-react";
|
|
15
16
|
import { createClient } from "zudoku/openapi-worker";
|
|
17
|
+
import { useAuth } from "../../authentication/hook.js";
|
|
16
18
|
import { ErrorPage } from "../../components/ErrorPage.js";
|
|
17
19
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
18
20
|
import { Button } from "../../ui/Button.js";
|
|
19
21
|
import { OasPluginConfig } from "./interfaces.js";
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} from "./playground/PlaygroundDialog.js";
|
|
22
|
+
import type { PlaygroundContentProps } from "./playground/Playground.js";
|
|
23
|
+
import { PlaygroundDialog } from "./playground/PlaygroundDialog.js";
|
|
24
|
+
import { GetServerQuery } from "./Sidecar.js";
|
|
24
25
|
|
|
25
26
|
const GetCategoriesQuery = graphql(`
|
|
26
27
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
@@ -88,19 +89,54 @@ export const openApiPlugin = (
|
|
|
88
89
|
}
|
|
89
90
|
},
|
|
90
91
|
getMdxComponents: () => ({
|
|
91
|
-
OpenPlaygroundButton: (
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
OpenPlaygroundButton: ({
|
|
93
|
+
requireAuth,
|
|
94
|
+
server,
|
|
95
|
+
method,
|
|
96
|
+
url,
|
|
97
|
+
...props
|
|
98
|
+
}: Partial<PlaygroundContentProps> & { requireAuth: boolean }) => {
|
|
99
|
+
const auth = useAuth();
|
|
100
|
+
const serverQuery = useQuery({
|
|
101
|
+
queryFn: async () => {
|
|
102
|
+
const result = await client.query(GetServerQuery, {
|
|
103
|
+
type: config.type,
|
|
104
|
+
input: config.input,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return result.data;
|
|
108
|
+
},
|
|
109
|
+
enabled: !server,
|
|
110
|
+
queryKey: ["playground-server"],
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
if (requireAuth && !auth.isAuthenticated) {
|
|
114
|
+
return (
|
|
115
|
+
<Button
|
|
116
|
+
className="gap-2 items-center"
|
|
117
|
+
variant="outline"
|
|
118
|
+
onClick={auth.login}
|
|
119
|
+
>
|
|
120
|
+
Login to open in Playground <LogInIcon size={16} />
|
|
121
|
+
</Button>
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<PlaygroundDialog
|
|
127
|
+
url={url ?? "/"}
|
|
128
|
+
method={method ?? "get"}
|
|
129
|
+
server={
|
|
130
|
+
server ?? serverQuery.data?.schema.url ?? "https://example.com"
|
|
131
|
+
}
|
|
132
|
+
{...props}
|
|
133
|
+
>
|
|
94
134
|
<Button className="gap-2 items-center" variant="outline">
|
|
95
|
-
{
|
|
96
|
-
<>
|
|
97
|
-
Open in Playground <CirclePlayIcon size={16} />
|
|
98
|
-
</>
|
|
99
|
-
)}
|
|
135
|
+
Open in Playground <CirclePlayIcon size={16} />
|
|
100
136
|
</Button>
|
|
101
137
|
</PlaygroundDialog>
|
|
102
|
-
|
|
103
|
-
|
|
138
|
+
);
|
|
139
|
+
},
|
|
104
140
|
}),
|
|
105
141
|
getNavigation: async (path: string) => {
|
|
106
142
|
if (!matchPath({ path: basePath, end: false }, path)) {
|