zudoku 0.3.0-dev.57 → 0.3.0-dev.59
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/app/entry.client.js +1 -1
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +2 -0
- package/dist/app/entry.server.js +1 -0
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +8 -2
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/validate.d.ts +121 -102
- package/dist/config/validators/validate.js +4 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +16 -0
- package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
- package/dist/lib/authentication/authentication.d.ts +3 -4
- package/dist/lib/authentication/components/Login.d.ts +1 -0
- package/dist/lib/authentication/components/Login.js +10 -0
- package/dist/lib/authentication/components/Login.js.map +1 -0
- package/dist/lib/authentication/components/Logout.d.ts +1 -0
- package/dist/lib/authentication/components/Logout.js +10 -0
- package/dist/lib/authentication/components/Logout.js.map +1 -0
- package/dist/lib/authentication/providers/clerk.js +43 -27
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +11 -3
- package/dist/lib/authentication/providers/openid.js +22 -11
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/routes.d.ts +5 -0
- package/dist/lib/authentication/routes.js +12 -0
- package/dist/lib/authentication/routes.js.map +1 -0
- package/dist/lib/components/Bootstrap.d.ts +2 -1
- package/dist/lib/components/Bootstrap.js +4 -1
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/DevPortal.js +14 -2
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Header.js +16 -2
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/InlineCode.js +1 -1
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +1 -1
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/DevPortalProvider.js +18 -1
- package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +5 -1
- package/dist/lib/components/index.js +4 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SideNavigationItem.js +1 -1
- package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +1 -1
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +10 -1
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +2 -2
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +2 -2
- package/dist/lib/plugins/api-keys/index.js +6 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-page/index.d.ts +8 -0
- package/dist/lib/plugins/custom-page/index.js +12 -0
- package/dist/lib/plugins/custom-page/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +3 -3
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/StaggeredRender.d.ts +3 -0
- package/dist/lib/plugins/openapi/StaggeredRender.js +10 -5
- package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Card.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.d.ts +27 -0
- package/dist/lib/ui/DropdownMenu.js +36 -0
- package/dist/lib/ui/DropdownMenu.js.map +1 -0
- package/dist/lib/ui/button-variants.d.ts +2 -2
- package/dist/lib/ui/button-variants.js +1 -0
- package/dist/lib/ui/button-variants.js.map +1 -1
- package/dist/lib/util/MdxComponents.js +1 -1
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/joinPath.js +2 -1
- package/dist/lib/util/joinPath.js.map +1 -1
- package/dist/vite/build.js +5 -2
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +8 -1
- package/dist/vite/config.js +13 -6
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-component.js +1 -0
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/prerender.d.ts +1 -1
- package/dist/vite/prerender.js +23 -3
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{AnchorLink-GNsUeGSX.js → AnchorLink-Bj1hwDuD.js} +3 -3
- package/lib/{AnchorLink-GNsUeGSX.js.map → AnchorLink-Bj1hwDuD.js.map} +1 -1
- package/lib/AuthenticationPlugin-CG6Bw32B.js +46 -0
- package/lib/AuthenticationPlugin-CG6Bw32B.js.map +1 -0
- package/lib/CategoryHeading-DMkTmmBh.js +10 -0
- package/lib/CategoryHeading-DMkTmmBh.js.map +1 -0
- package/lib/Combination-lAFQBd6U.js +2774 -0
- package/lib/Combination-lAFQBd6U.js.map +1 -0
- package/lib/DevPortalProvider-BBhQ8kgI.js +1125 -0
- package/lib/DevPortalProvider-BBhQ8kgI.js.map +1 -0
- package/lib/{Markdown-DtLFdxD1.js → Markdown-BjRJKl_E.js} +1376 -1379
- package/lib/Markdown-BjRJKl_E.js.map +1 -0
- package/lib/{MdxPage-CbwYRKf5.js → MdxPage-DJTFOCbZ.js} +17 -17
- package/lib/{MdxPage-CbwYRKf5.js.map → MdxPage-DJTFOCbZ.js.map} +1 -1
- package/lib/OperationList-DDTtK3I7.js +5403 -0
- package/lib/OperationList-DDTtK3I7.js.map +1 -0
- package/lib/{Route-C1LyvITr.js → Route-Bsrd0acQ.js} +2 -2
- package/lib/{Route-C1LyvITr.js.map → Route-Bsrd0acQ.js.map} +1 -1
- package/lib/Select-CEnkyfyn.js +2223 -0
- package/lib/Select-CEnkyfyn.js.map +1 -0
- package/lib/Spinner-Ciq_pWU7.js +359 -0
- package/lib/Spinner-Ciq_pWU7.js.map +1 -0
- package/lib/{hook-Biq3zYel.js → hook-Q_gAL2NZ.js} +20 -19
- package/lib/{hook-Biq3zYel.js.map → hook-Q_gAL2NZ.js.map} +1 -1
- package/lib/{index-Bg82-bqR.js → index-BE2a6gGC.js} +24 -23
- package/lib/{index-Bg82-bqR.js.map → index-BE2a6gGC.js.map} +1 -1
- package/lib/{jsx-runtime-CJZJivg2.js → jsx-runtime-BIr0WBt_.js} +119 -119
- package/lib/jsx-runtime-BIr0WBt_.js.map +1 -0
- package/lib/{router-CBw2vqJE.js → router-BiRCp01d.js} +671 -673
- package/lib/router-BiRCp01d.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +47 -32
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +170 -159
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1514 -598
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +30 -24
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +13 -0
- package/lib/zudoku.plugin-custom-page.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +19 -20
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +4 -4
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/package.json +29 -14
- package/src/app/entry.client.tsx +1 -1
- package/src/app/entry.server.tsx +2 -0
- package/src/app/main.css +6 -0
- package/src/app/main.tsx +8 -2
- package/src/lib/authentication/AuthenticationPlugin.tsx +36 -0
- package/src/lib/authentication/authentication.ts +3 -4
- package/src/lib/authentication/components/Login.tsx +11 -0
- package/src/lib/authentication/components/Logout.tsx +11 -0
- package/src/lib/authentication/providers/clerk.tsx +43 -27
- package/src/lib/authentication/providers/openid.tsx +25 -13
- package/src/lib/authentication/routes.tsx +10 -0
- package/src/lib/components/Bootstrap.tsx +14 -7
- package/src/lib/components/DevPortal.tsx +29 -9
- package/src/lib/components/Header.tsx +80 -30
- package/src/lib/components/InlineCode.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +1 -1
- package/src/lib/components/context/DevPortalProvider.ts +22 -2
- package/src/lib/components/index.ts +4 -0
- package/src/lib/components/navigation/SideNavigationItem.tsx +1 -1
- package/src/lib/core/DevPortalContext.ts +1 -1
- package/src/lib/core/plugins.ts +16 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +4 -4
- package/src/lib/plugins/api-keys/index.tsx +8 -1
- package/src/lib/plugins/custom-page/index.tsx +22 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
- package/src/lib/plugins/openapi/OperationListItem.tsx +1 -4
- package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +3 -3
- package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/StaggeredRender.tsx +19 -5
- package/src/lib/plugins/openapi/playground/Playground.tsx +2 -2
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/DropdownMenu.tsx +199 -0
- package/src/lib/ui/button-variants.ts +1 -0
- package/src/lib/util/MdxComponents.tsx +1 -1
- package/src/lib/util/joinPath.tsx +2 -1
- package/dist/app/zudoku-manifest.d.ts +0 -1
- package/dist/app/zudoku-manifest.js +0 -20
- package/dist/app/zudoku-manifest.js.map +0 -1
- package/lib/Button-DpHMZvVs.js +0 -4571
- package/lib/Button-DpHMZvVs.js.map +0 -1
- package/lib/DevPortalProvider-Do9oJqme.js +0 -1081
- package/lib/DevPortalProvider-Do9oJqme.js.map +0 -1
- package/lib/Markdown-DtLFdxD1.js.map +0 -1
- package/lib/OperationList-DypxLtSC.js +0 -5578
- package/lib/OperationList-DypxLtSC.js.map +0 -1
- package/lib/Spinner-Bhbs5aPI.js +0 -182
- package/lib/Spinner-Bhbs5aPI.js.map +0 -1
- package/lib/index-gsAuUwQh.js +0 -418
- package/lib/index-gsAuUwQh.js.map +0 -1
- package/lib/jsx-runtime-CJZJivg2.js.map +0 -1
- package/lib/router-CBw2vqJE.js.map +0 -1
- package/lib/util-_jwUlTBU.js +0 -41
- package/lib/util-_jwUlTBU.js.map +0 -1
- package/src/app/zudoku-manifest.ts +0 -22
package/lib/zudoku.auth-clerk.js
CHANGED
|
@@ -1,51 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (!s)
|
|
14
|
-
throw new Error("Could not get access token from Clerk");
|
|
15
|
-
return s;
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
initialize: async () => {
|
|
19
|
-
var s;
|
|
20
|
-
await i, e.session ? t.setState({
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var l = (t, e, s) => e in t ? a(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var r = (t, e, s) => l(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
+
import { A as c } from "./AuthenticationPlugin-CG6Bw32B.js";
|
|
5
|
+
import { u as o } from "./state-DKdaQzvh.js";
|
|
6
|
+
class u extends c {
|
|
7
|
+
constructor(s) {
|
|
8
|
+
super();
|
|
9
|
+
r(this, "initialize", async () => {
|
|
10
|
+
var i;
|
|
11
|
+
const s = await this.clerk;
|
|
12
|
+
s && (s.session ? o.setState({
|
|
21
13
|
isAuthenticated: !0,
|
|
22
14
|
isPending: !1,
|
|
23
15
|
profile: {
|
|
24
|
-
sub:
|
|
25
|
-
name:
|
|
26
|
-
email: (
|
|
16
|
+
sub: s.session.user.id,
|
|
17
|
+
name: s.session.user.fullName ?? void 0,
|
|
18
|
+
email: (i = s.session.user.emailAddresses[0]) == null ? void 0 : i.emailAddress,
|
|
27
19
|
emailVerified: !1,
|
|
28
20
|
// TODO: Check this
|
|
29
|
-
|
|
30
|
-
pictureUrl: e.session.user.imageUrl
|
|
21
|
+
pictureUrl: s.session.user.imageUrl
|
|
31
22
|
}
|
|
32
|
-
}) :
|
|
23
|
+
}) : o.setState({
|
|
33
24
|
isAuthenticated: !1,
|
|
34
25
|
isPending: !1,
|
|
35
26
|
profile: void 0
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
27
|
+
}));
|
|
28
|
+
});
|
|
29
|
+
this.clerk = s;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const h = ({ clerkPubKey: t }) => {
|
|
33
|
+
let e;
|
|
34
|
+
const s = (async () => {
|
|
35
|
+
if (typeof window > "u") return;
|
|
36
|
+
const { Clerk: n } = await import("@clerk/clerk-js");
|
|
37
|
+
return e = new n(t), await e.load(), e;
|
|
38
|
+
})();
|
|
39
|
+
async function i() {
|
|
40
|
+
if (await s, !e.session)
|
|
41
|
+
throw new Error("No session available");
|
|
42
|
+
const n = await e.session.getToken();
|
|
43
|
+
if (!n)
|
|
44
|
+
throw new Error("Could not get access token from Clerk");
|
|
45
|
+
return n;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
getAccessToken: i,
|
|
39
49
|
logout: async () => {
|
|
40
50
|
await e.signOut();
|
|
41
51
|
},
|
|
42
52
|
login: async () => {
|
|
43
|
-
await e.redirectToSignIn(
|
|
53
|
+
await e.redirectToSignIn({
|
|
54
|
+
signInForceRedirectUrl: "http://localhost:9000/",
|
|
55
|
+
signUpForceRedirectUrl: "http://localhost:9000/"
|
|
56
|
+
});
|
|
44
57
|
},
|
|
45
|
-
|
|
58
|
+
getAuthenticationPlugin() {
|
|
59
|
+
return new u(s);
|
|
60
|
+
}
|
|
46
61
|
};
|
|
47
62
|
};
|
|
48
63
|
export {
|
|
49
|
-
|
|
64
|
+
h as default
|
|
50
65
|
};
|
|
51
66
|
//# sourceMappingURL=zudoku.auth-clerk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.auth-clerk.js","sources":["../src/lib/authentication/providers/clerk.tsx"],"sourcesContent":["import type { Clerk } from \"@clerk/clerk-js\";\nimport { ClerkAuthenticationConfig } from \"../../../config/config.js\";\nimport { AuthenticationProviderInitializer } from \"../authentication.js\";\nimport { useAuthState } from \"../state.js\";\n\nconst clerkAuth: AuthenticationProviderInitializer<\n ClerkAuthenticationConfig\n> = ({ clerkPubKey }) => {\n let clerkApi: Clerk;\n\n const ensureLoaded = (async () => {\n if (typeof window === \"undefined\") return;\n const { Clerk } = await import(\"@clerk/clerk-js\");\n clerkApi = new Clerk(clerkPubKey);\n\n await clerkApi.load(
|
|
1
|
+
{"version":3,"file":"zudoku.auth-clerk.js","sources":["../src/lib/authentication/providers/clerk.tsx"],"sourcesContent":["import type { Clerk } from \"@clerk/clerk-js\";\nimport { ClerkAuthenticationConfig } from \"../../../config/config.js\";\nimport { AuthenticationProviderInitializer } from \"../authentication.js\";\nimport { AuthenticationPlugin } from \"../AuthenticationPlugin.js\";\nimport { useAuthState } from \"../state.js\";\n\nclass ClerkAuthPlugin extends AuthenticationPlugin {\n constructor(private clerk: Promise<Clerk | undefined>) {\n super();\n }\n initialize = async () => {\n const clerk = await this.clerk;\n\n if (!clerk) {\n return;\n }\n\n if (clerk.session) {\n useAuthState.setState({\n isAuthenticated: true,\n isPending: false,\n profile: {\n sub: clerk.session.user.id,\n name: clerk.session.user.fullName ?? undefined,\n email: clerk.session.user.emailAddresses[0]?.emailAddress,\n emailVerified: false, // TODO: Check this\n pictureUrl: clerk.session.user.imageUrl,\n },\n });\n } else {\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n });\n }\n };\n}\n\nconst clerkAuth: AuthenticationProviderInitializer<\n ClerkAuthenticationConfig\n> = ({ clerkPubKey }) => {\n let clerkApi: Clerk;\n\n const ensureLoaded = (async () => {\n if (typeof window === \"undefined\") return;\n const { Clerk } = await import(\"@clerk/clerk-js\");\n clerkApi = new Clerk(clerkPubKey);\n\n await clerkApi.load();\n return clerkApi;\n })();\n\n async function getAccessToken() {\n await ensureLoaded;\n if (!clerkApi.session) {\n throw new Error(\"No session available\");\n }\n const response = await clerkApi.session.getToken();\n if (!response) {\n throw new Error(\"Could not get access token from Clerk\");\n }\n return response;\n }\n\n return {\n getAccessToken,\n logout: async () => {\n await clerkApi.signOut();\n },\n login: async () => {\n await clerkApi.redirectToSignIn({\n signInForceRedirectUrl: \"http://localhost:9000/\",\n signUpForceRedirectUrl: \"http://localhost:9000/\",\n });\n },\n getAuthenticationPlugin() {\n return new ClerkAuthPlugin(ensureLoaded);\n },\n };\n};\n\nexport default clerkAuth;\n"],"names":["ClerkAuthPlugin","AuthenticationPlugin","clerk","__publicField","useAuthState","_a","clerkAuth","clerkPubKey","clerkApi","ensureLoaded","Clerk","getAccessToken","response"],"mappings":";;;;;AAMA,MAAMA,UAAwBC,EAAqB;AAAA,EACjD,YAAoBC,GAAmC;AAC/C;AAER,IAAAC,EAAA,oBAAa,YAAY;;AACjB,YAAAD,IAAQ,MAAM,KAAK;AAEzB,MAAKA,MAIDA,EAAM,UACRE,EAAa,SAAS;AAAA,QACpB,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,SAAS;AAAA,UACP,KAAKF,EAAM,QAAQ,KAAK;AAAA,UACxB,MAAMA,EAAM,QAAQ,KAAK,YAAY;AAAA,UACrC,QAAOG,IAAAH,EAAM,QAAQ,KAAK,eAAe,CAAC,MAAnC,gBAAAG,EAAsC;AAAA,UAC7C,eAAe;AAAA;AAAA,UACf,YAAYH,EAAM,QAAQ,KAAK;AAAA,QACjC;AAAA,MAAA,CACD,IAEDE,EAAa,SAAS;AAAA,QACpB,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,SAAS;AAAA,MAAA,CACV;AAAA,IACH;AA5BkB,SAAA,QAAAF;AAAA,EAEpB;AA4BF;AAEA,MAAMI,IAEF,CAAC,EAAE,aAAAC,QAAkB;AACnB,MAAAC;AAEJ,QAAMC,KAAgB,YAAY;AAC5B,QAAA,OAAO,SAAW,IAAa;AACnC,UAAM,EAAE,OAAAC,EAAA,IAAU,MAAM,OAAO,iBAAiB;AACrC,WAAAF,IAAA,IAAIE,EAAMH,CAAW,GAEhC,MAAMC,EAAS,QACRA;AAAA,EAAA;AAGT,iBAAeG,IAAiB;AAE1B,QADE,MAAAF,GACF,CAACD,EAAS;AACN,YAAA,IAAI,MAAM,sBAAsB;AAExC,UAAMI,IAAW,MAAMJ,EAAS,QAAQ,SAAS;AACjD,QAAI,CAACI;AACG,YAAA,IAAI,MAAM,uCAAuC;AAElD,WAAAA;AAAA,EACT;AAEO,SAAA;AAAA,IACL,gBAAAD;AAAA,IACA,QAAQ,YAAY;AAClB,YAAMH,EAAS;IACjB;AAAA,IACA,OAAO,YAAY;AACjB,YAAMA,EAAS,iBAAiB;AAAA,QAC9B,wBAAwB;AAAA,QACxB,wBAAwB;AAAA,MAAA,CACzB;AAAA,IACH;AAAA,IACA,0BAA0B;AACjB,aAAA,IAAIR,EAAgBS,CAAY;AAAA,IACzC;AAAA,EAAA;AAEJ;"}
|