zudoku 0.3.0-dev.35 → 0.3.0-dev.36
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/main.js +1 -2
- package/dist/app/main.js.map +1 -1
- package/dist/lib/components/index.d.ts +2 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/lib/{AnchorLink-DCzimaMt.js → AnchorLink-Sx89bfCW.js} +2 -2
- package/lib/{AnchorLink-DCzimaMt.js.map → AnchorLink-Sx89bfCW.js.map} +1 -1
- package/lib/Markdown-DMEnjeMH.js +14499 -0
- package/lib/Markdown-DMEnjeMH.js.map +1 -0
- package/lib/{MdxPage-CGTgSCJL.js → MdxPage-s9RlKFtt.js} +25 -26
- package/lib/{MdxPage-CGTgSCJL.js.map → MdxPage-s9RlKFtt.js.map} +1 -1
- package/lib/{OperationList-BDAtLdf9.js → OperationList-9NIdTqS0.js} +15 -16
- package/lib/{OperationList-BDAtLdf9.js.map → OperationList-9NIdTqS0.js.map} +1 -1
- package/lib/{Select-DIOQWPp3.js → Select-CJamK_wp.js} +2 -2
- package/lib/{Select-DIOQWPp3.js.map → Select-CJamK_wp.js.map} +1 -1
- package/lib/{Spinner-B9MAj2Pw.js → Spinner-3YT-WUu5.js} +2 -2
- package/lib/{Spinner-B9MAj2Pw.js.map → Spinner-3YT-WUu5.js.map} +1 -1
- package/lib/hook-Cq3Jb1lX.js +77 -0
- package/lib/hook-Cq3Jb1lX.js.map +1 -0
- package/lib/{index-CdZQPXUQ.js → index-DhKGMJM2.js} +17 -18
- package/lib/{index-CdZQPXUQ.js.map → index-DhKGMJM2.js.map} +1 -1
- package/lib/zudoku.components.js +103 -102
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +50 -92
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/package.json +1 -1
- package/src/app/main.tsx +1 -2
- package/src/lib/components/index.ts +2 -0
- package/lib/Markdown-kde-UTpz.js +0 -8620
- package/lib/Markdown-kde-UTpz.js.map +0 -1
- package/lib/MdxComponents-BZ-Y_6jI.js +0 -5885
- package/lib/MdxComponents-BZ-Y_6jI.js.map +0 -1
- package/lib/hook-D1DiFbcT.js +0 -35
- package/lib/hook-D1DiFbcT.js.map +0 -1
package/lib/hook-D1DiFbcT.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-Bt86M5tA.js";
|
|
2
|
-
import { u as i } from "./DevPortalProvider-Demv4Ngx.js";
|
|
3
|
-
import { u as a } from "./state-Ds_OxRHP.js";
|
|
4
|
-
function r({ error: t }) {
|
|
5
|
-
const n = (t == null ? void 0 : t.message) ?? "Something went wrong", e = t == null ? void 0 : t.stack;
|
|
6
|
-
return /* @__PURE__ */ s.jsx("div", { className: "flex h-screen max-h-screen min-h-full items-center justify-center bg-primary-background px-4 py-16 lg:px-8", children: /* @__PURE__ */ s.jsxs("div", { className: "mx-auto max-w-[85%] sm:max-w-[50%]", children: [
|
|
7
|
-
/* @__PURE__ */ s.jsx("h1", { className: "text-4xl font-bold tracking-tight text-h1-text sm:text-5xl", children: "Something went wrong" }),
|
|
8
|
-
/* @__PURE__ */ s.jsx("p", { className: "mt-5 text-h1-text", children: n }),
|
|
9
|
-
e ? /* @__PURE__ */ s.jsx("pre", { className: "mt-5 max-h-[400px] w-full overflow-scroll rounded-md border border-input-border bg-input-background p-3 text-property-name-text text-red-700", children: e }) : null
|
|
10
|
-
] }) });
|
|
11
|
-
}
|
|
12
|
-
const u = () => {
|
|
13
|
-
const { authentication: t } = i(), n = a(), e = typeof t < "u";
|
|
14
|
-
return {
|
|
15
|
-
isAuthEnabled: e,
|
|
16
|
-
isPending: n.isPending,
|
|
17
|
-
profile: n.profile,
|
|
18
|
-
isAuthenticated: n.profile,
|
|
19
|
-
login: async () => {
|
|
20
|
-
if (!e)
|
|
21
|
-
throw new Error("Authentication is not enabled.");
|
|
22
|
-
await t.login();
|
|
23
|
-
},
|
|
24
|
-
logout: async () => {
|
|
25
|
-
if (!e)
|
|
26
|
-
throw new Error("Authentication is not enabled.");
|
|
27
|
-
await t.logout(), window.location.href = "/";
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
r as E,
|
|
33
|
-
u
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=hook-D1DiFbcT.js.map
|
package/lib/hook-D1DiFbcT.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hook-D1DiFbcT.js","sources":["../src/lib/errors/ErrorAlert.tsx","../src/lib/authentication/hook.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function ErrorAlert({ error }: { error: any }) {\n const message = error?.message ?? \"Something went wrong\";\n const stack = error?.stack;\n\n return (\n <div className=\"flex h-screen max-h-screen min-h-full items-center justify-center bg-primary-background px-4 py-16 lg:px-8\">\n <div className=\"mx-auto max-w-[85%] sm:max-w-[50%]\">\n <h1 className=\"text-4xl font-bold tracking-tight text-h1-text sm:text-5xl\">\n Something went wrong\n </h1>\n <p className=\"mt-5 text-h1-text\">{message}</p>\n {stack ? (\n <pre className=\"mt-5 max-h-[400px] w-full overflow-scroll rounded-md border border-input-border bg-input-background p-3 text-property-name-text text-red-700\">\n {stack}\n </pre>\n ) : null}\n </div>\n </div>\n );\n}\n","import { useDevPortal } from \"../components/context/DevPortalProvider.js\";\nimport { useAuthState } from \"./state.js\";\n\nexport const useAuth = () => {\n const { authentication } = useDevPortal();\n const authState = useAuthState();\n const isAuthEnabled = typeof authentication !== \"undefined\";\n\n return {\n isAuthEnabled,\n isPending: authState.isPending,\n profile: authState.profile,\n isAuthenticated: authState.profile,\n\n login: async () => {\n if (!isAuthEnabled) {\n throw new Error(\"Authentication is not enabled.\");\n }\n // TODO: Should handle errors/state\n await authentication.login();\n },\n\n logout: async () => {\n if (!isAuthEnabled) {\n throw new Error(\"Authentication is not enabled.\");\n }\n // TODO: Should handle errors/state\n await authentication.logout();\n\n // Redirect to home\n window.location.href = \"/\";\n },\n };\n};\n"],"names":["ErrorAlert","error","message","stack","jsxs","jsx","useAuth","authentication","useDevPortal","authState","useAuthState","isAuthEnabled"],"mappings":";;;AACgB,SAAAA,EAAW,EAAE,OAAAC,KAAyB;AAC9C,QAAAC,KAAUD,KAAA,gBAAAA,EAAO,YAAW,wBAC5BE,IAAQF,KAAA,gBAAAA,EAAO;AAErB,+BACG,OAAI,EAAA,WAAU,8GACb,UAACG,gBAAAA,EAAA,KAAA,OAAA,EAAI,WAAU,sCACb,UAAA;AAAA,IAACC,gBAAAA,EAAA,IAAA,MAAA,EAAG,WAAU,8DAA6D,UAE3E,wBAAA;AAAA,IACCA,gBAAAA,EAAA,IAAA,KAAA,EAAE,WAAU,qBAAqB,UAAQH,GAAA;AAAA,IACzCC,IACEE,gBAAAA,EAAAA,IAAA,OAAA,EAAI,WAAU,gJACZ,YACH,CAAA,IACE;AAAA,EAAA,EACN,CAAA,EACF,CAAA;AAEJ;ACjBO,MAAMC,IAAU,MAAM;AACrB,QAAA,EAAE,gBAAAC,MAAmBC,KACrBC,IAAYC,KACZC,IAAgB,OAAOJ,IAAmB;AAEzC,SAAA;AAAA,IACL,eAAAI;AAAA,IACA,WAAWF,EAAU;AAAA,IACrB,SAASA,EAAU;AAAA,IACnB,iBAAiBA,EAAU;AAAA,IAE3B,OAAO,YAAY;AACjB,UAAI,CAACE;AACG,cAAA,IAAI,MAAM,gCAAgC;AAGlD,YAAMJ,EAAe;IACvB;AAAA,IAEA,QAAQ,YAAY;AAClB,UAAI,CAACI;AACG,cAAA,IAAI,MAAM,gCAAgC;AAGlD,YAAMJ,EAAe,UAGrB,OAAO,SAAS,OAAO;AAAA,IACzB;AAAA,EAAA;AAEJ;"}
|