zudoku 0.3.0-dev.34 → 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/entry.client.js +2 -1
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +10 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +1 -3
- package/dist/app/main.js.map +1 -1
- package/dist/lib/components/DevPortal.js +9 -3
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/index.d.ts +5 -0
- package/dist/lib/components/index.js +4 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/vite/config.js +1 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-component.js +1 -1
- package/dist/vite/plugin-component.js.map +1 -1
- package/lib/AnchorLink-Sx89bfCW.js +704 -0
- package/lib/AnchorLink-Sx89bfCW.js.map +1 -0
- package/lib/{DevPortalProvider-BlxLX6GG.js → DevPortalProvider-Demv4Ngx.js} +250 -230
- package/lib/DevPortalProvider-Demv4Ngx.js.map +1 -0
- package/lib/Markdown-DMEnjeMH.js +14499 -0
- package/lib/Markdown-DMEnjeMH.js.map +1 -0
- package/lib/{MdxPage-BRKQDcVW.js → MdxPage-s9RlKFtt.js} +102 -108
- package/lib/MdxPage-s9RlKFtt.js.map +1 -0
- package/lib/{OperationList-DfkWNe8Y.js → OperationList-9NIdTqS0.js} +1692 -1862
- package/lib/OperationList-9NIdTqS0.js.map +1 -0
- package/lib/{Route-Bf1_D_vC.js → Route-BqfQoDR2.js} +2 -2
- package/lib/{Route-Bf1_D_vC.js.map → Route-BqfQoDR2.js.map} +1 -1
- package/lib/Select-CJamK_wp.js +4571 -0
- package/lib/Select-CJamK_wp.js.map +1 -0
- package/lib/Spinner-3YT-WUu5.js +182 -0
- package/lib/Spinner-3YT-WUu5.js.map +1 -0
- package/lib/hook-Cq3Jb1lX.js +77 -0
- package/lib/hook-Cq3Jb1lX.js.map +1 -0
- package/lib/index-BB2EBBgh.js +412 -0
- package/lib/index-BB2EBBgh.js.map +1 -0
- package/lib/{index-BjSy8IQO.js → index-DhKGMJM2.js} +19 -20
- package/lib/{index-BjSy8IQO.js.map → index-DhKGMJM2.js.map} +1 -1
- package/lib/{jsx-runtime-CM0TzjGp.js → jsx-runtime-Bt86M5tA.js} +5 -5
- package/lib/{jsx-runtime-CM0TzjGp.js.map → jsx-runtime-Bt86M5tA.js.map} +1 -1
- package/lib/util-CYBrkBUo.js +41 -0
- package/lib/util-CYBrkBUo.js.map +1 -0
- package/lib/zudoku.auth-openid.js +1 -1
- package/lib/zudoku.components.js +564 -286
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +99 -153
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +46 -2
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/package.json +2 -1
- package/src/app/entry.client.tsx +4 -1
- package/src/app/entry.server.tsx +17 -2
- package/src/app/main.tsx +1 -3
- package/src/lib/components/DevPortal.tsx +15 -1
- package/src/lib/components/Layout.tsx +9 -0
- package/src/lib/components/index.ts +4 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +6 -0
- package/lib/DevPortalProvider-BlxLX6GG.js.map +0 -1
- package/lib/Markdown-CL8KPvJN.js +0 -8620
- package/lib/Markdown-CL8KPvJN.js.map +0 -1
- package/lib/MdxComponents-Ev_hBHb2.js +0 -5885
- package/lib/MdxComponents-Ev_hBHb2.js.map +0 -1
- package/lib/MdxPage-BRKQDcVW.js.map +0 -1
- package/lib/OperationList-DfkWNe8Y.js.map +0 -1
- package/lib/Select-DSa3bN4t.js +0 -4770
- package/lib/Select-DSa3bN4t.js.map +0 -1
- package/lib/hook-CTmJ6CWq.js +0 -35
- package/lib/hook-CTmJ6CWq.js.map +0 -1
- package/lib/index-Brq2ztwd.js +0 -74
- package/lib/index-Brq2ztwd.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/mutation-91kw0lHb.js +0 -208
- package/lib/mutation-91kw0lHb.js.map +0 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import { u as M, g as h, c as w, a as D, e as U, P as A, d as k } from "./index-BB2EBBgh.js";
|
|
3
|
+
import * as W from "react-dom";
|
|
4
|
+
import { j as N } from "./jsx-runtime-Bt86M5tA.js";
|
|
5
|
+
import { c as F } from "./Markdown-DMEnjeMH.js";
|
|
6
|
+
/**
|
|
7
|
+
* @license lucide-react v0.378.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
const B = F("LoaderCircle", [
|
|
13
|
+
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
14
|
+
]);
|
|
15
|
+
function G(e, n) {
|
|
16
|
+
return s.useReducer((r, t) => n[r][t] ?? r, e);
|
|
17
|
+
}
|
|
18
|
+
var S = (e) => {
|
|
19
|
+
const { present: n, children: r } = e, t = $(n), o = typeof r == "function" ? r({ present: t.isPresent }) : s.Children.only(r), c = M(t.ref, q(o));
|
|
20
|
+
return typeof r == "function" || t.isPresent ? s.cloneElement(o, { ref: c }) : null;
|
|
21
|
+
};
|
|
22
|
+
S.displayName = "Presence";
|
|
23
|
+
function $(e) {
|
|
24
|
+
const [n, r] = s.useState(), t = s.useRef({}), o = s.useRef(e), c = s.useRef("none"), l = e ? "mounted" : "unmounted", [f, i] = G(l, {
|
|
25
|
+
mounted: {
|
|
26
|
+
UNMOUNT: "unmounted",
|
|
27
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
28
|
+
},
|
|
29
|
+
unmountSuspended: {
|
|
30
|
+
MOUNT: "mounted",
|
|
31
|
+
ANIMATION_END: "unmounted"
|
|
32
|
+
},
|
|
33
|
+
unmounted: {
|
|
34
|
+
MOUNT: "mounted"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return s.useEffect(() => {
|
|
38
|
+
const a = v(t.current);
|
|
39
|
+
c.current = f === "mounted" ? a : "none";
|
|
40
|
+
}, [f]), h(() => {
|
|
41
|
+
const a = t.current, d = o.current;
|
|
42
|
+
if (d !== e) {
|
|
43
|
+
const g = c.current, m = v(a);
|
|
44
|
+
e ? i("MOUNT") : m === "none" || (a == null ? void 0 : a.display) === "none" ? i("UNMOUNT") : i(d && g !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
45
|
+
}
|
|
46
|
+
}, [e, i]), h(() => {
|
|
47
|
+
if (n) {
|
|
48
|
+
const a = (p) => {
|
|
49
|
+
const m = v(t.current).includes(p.animationName);
|
|
50
|
+
p.target === n && m && W.flushSync(() => i("ANIMATION_END"));
|
|
51
|
+
}, d = (p) => {
|
|
52
|
+
p.target === n && (c.current = v(t.current));
|
|
53
|
+
};
|
|
54
|
+
return n.addEventListener("animationstart", d), n.addEventListener("animationcancel", a), n.addEventListener("animationend", a), () => {
|
|
55
|
+
n.removeEventListener("animationstart", d), n.removeEventListener("animationcancel", a), n.removeEventListener("animationend", a);
|
|
56
|
+
};
|
|
57
|
+
} else
|
|
58
|
+
i("ANIMATION_END");
|
|
59
|
+
}, [n, i]), {
|
|
60
|
+
isPresent: ["mounted", "unmountSuspended"].includes(f),
|
|
61
|
+
ref: s.useCallback((a) => {
|
|
62
|
+
a && (t.current = getComputedStyle(a)), r(a);
|
|
63
|
+
}, [])
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function v(e) {
|
|
67
|
+
return (e == null ? void 0 : e.animationName) || "none";
|
|
68
|
+
}
|
|
69
|
+
function q(e) {
|
|
70
|
+
var t, o;
|
|
71
|
+
let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
72
|
+
return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
73
|
+
}
|
|
74
|
+
var O = "Collapsible", [z, X] = w(O), [H, P] = z(O), I = s.forwardRef(
|
|
75
|
+
(e, n) => {
|
|
76
|
+
const {
|
|
77
|
+
__scopeCollapsible: r,
|
|
78
|
+
open: t,
|
|
79
|
+
defaultOpen: o,
|
|
80
|
+
disabled: c,
|
|
81
|
+
onOpenChange: l,
|
|
82
|
+
...f
|
|
83
|
+
} = e, [i = !1, a] = D({
|
|
84
|
+
prop: t,
|
|
85
|
+
defaultProp: o,
|
|
86
|
+
onChange: l
|
|
87
|
+
});
|
|
88
|
+
return /* @__PURE__ */ N.jsx(
|
|
89
|
+
H,
|
|
90
|
+
{
|
|
91
|
+
scope: r,
|
|
92
|
+
disabled: c,
|
|
93
|
+
contentId: U(),
|
|
94
|
+
open: i,
|
|
95
|
+
onOpenToggle: s.useCallback(() => a((d) => !d), [a]),
|
|
96
|
+
children: /* @__PURE__ */ N.jsx(
|
|
97
|
+
A.div,
|
|
98
|
+
{
|
|
99
|
+
"data-state": E(i),
|
|
100
|
+
"data-disabled": c ? "" : void 0,
|
|
101
|
+
...f,
|
|
102
|
+
ref: n
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
I.displayName = O;
|
|
110
|
+
var _ = "CollapsibleTrigger", L = s.forwardRef(
|
|
111
|
+
(e, n) => {
|
|
112
|
+
const { __scopeCollapsible: r, ...t } = e, o = P(_, r);
|
|
113
|
+
return /* @__PURE__ */ N.jsx(
|
|
114
|
+
A.button,
|
|
115
|
+
{
|
|
116
|
+
type: "button",
|
|
117
|
+
"aria-controls": o.contentId,
|
|
118
|
+
"aria-expanded": o.open || !1,
|
|
119
|
+
"data-state": E(o.open),
|
|
120
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
121
|
+
disabled: o.disabled,
|
|
122
|
+
...t,
|
|
123
|
+
ref: n,
|
|
124
|
+
onClick: k(e.onClick, o.onOpenToggle)
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
L.displayName = _;
|
|
130
|
+
var x = "CollapsibleContent", j = s.forwardRef(
|
|
131
|
+
(e, n) => {
|
|
132
|
+
const { forceMount: r, ...t } = e, o = P(x, e.__scopeCollapsible);
|
|
133
|
+
return /* @__PURE__ */ N.jsx(S, { present: r || o.open, children: ({ present: c }) => /* @__PURE__ */ N.jsx(J, { ...t, ref: n, present: c }) });
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
j.displayName = x;
|
|
137
|
+
var J = s.forwardRef((e, n) => {
|
|
138
|
+
const { __scopeCollapsible: r, present: t, children: o, ...c } = e, l = P(x, r), [f, i] = s.useState(t), a = s.useRef(null), d = M(n, a), p = s.useRef(0), g = p.current, m = s.useRef(0), R = m.current, b = l.open || f, T = s.useRef(b), C = s.useRef();
|
|
139
|
+
return s.useEffect(() => {
|
|
140
|
+
const u = requestAnimationFrame(() => T.current = !1);
|
|
141
|
+
return () => cancelAnimationFrame(u);
|
|
142
|
+
}, []), h(() => {
|
|
143
|
+
const u = a.current;
|
|
144
|
+
if (u) {
|
|
145
|
+
C.current = C.current || {
|
|
146
|
+
transitionDuration: u.style.transitionDuration,
|
|
147
|
+
animationName: u.style.animationName
|
|
148
|
+
}, u.style.transitionDuration = "0s", u.style.animationName = "none";
|
|
149
|
+
const y = u.getBoundingClientRect();
|
|
150
|
+
p.current = y.height, m.current = y.width, T.current || (u.style.transitionDuration = C.current.transitionDuration, u.style.animationName = C.current.animationName), i(t);
|
|
151
|
+
}
|
|
152
|
+
}, [l.open, t]), /* @__PURE__ */ N.jsx(
|
|
153
|
+
A.div,
|
|
154
|
+
{
|
|
155
|
+
"data-state": E(l.open),
|
|
156
|
+
"data-disabled": l.disabled ? "" : void 0,
|
|
157
|
+
id: l.contentId,
|
|
158
|
+
hidden: !b,
|
|
159
|
+
...c,
|
|
160
|
+
ref: d,
|
|
161
|
+
style: {
|
|
162
|
+
"--radix-collapsible-content-height": g ? `${g}px` : void 0,
|
|
163
|
+
"--radix-collapsible-content-width": R ? `${R}px` : void 0,
|
|
164
|
+
...e.style
|
|
165
|
+
},
|
|
166
|
+
children: b && o
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
});
|
|
170
|
+
function E(e) {
|
|
171
|
+
return e ? "open" : "closed";
|
|
172
|
+
}
|
|
173
|
+
var Y = I, Z = L, ee = j;
|
|
174
|
+
const ne = ({ size: e = 16 }) => /* @__PURE__ */ N.jsx(B, { size: e, className: "animate-spin" });
|
|
175
|
+
export {
|
|
176
|
+
ee as C,
|
|
177
|
+
S as P,
|
|
178
|
+
Y as R,
|
|
179
|
+
ne as S,
|
|
180
|
+
Z as T
|
|
181
|
+
};
|
|
182
|
+
//# sourceMappingURL=Spinner-3YT-WUu5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner-3YT-WUu5.js","sources":["../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js","../../../node_modules/.pnpm/@radix-ui+react-presence@1.1.0_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-presence/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.0_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3._qjsk5diswkeszbepgt4ntypuku/node_modules/@radix-ui/react-collapsible/dist/index.mjs","../src/lib/components/Spinner.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst LoaderCircle = createLucideIcon(\"LoaderCircle\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]\n]);\n\nexport { LoaderCircle as default };\n//# sourceMappingURL=loader-circle.js.map\n","\"use client\";\n\n// packages/react/presence/src/Presence.tsx\nimport * as React2 from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// packages/react/presence/src/useStateMachine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/Presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef({});\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n ReactDOM.flushSync(() => send(\"ANIMATION_END\"));\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Presence\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/collapsible/src/Collapsible.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar COLLAPSIBLE_NAME = \"Collapsible\";\nvar [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\nvar [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);\nvar Collapsible = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n CollapsibleProvider,\n {\n scope: __scopeCollapsible,\n disabled,\n contentId: useId(),\n open,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(open),\n \"data-disabled\": disabled ? \"\" : void 0,\n ...collapsibleProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nCollapsible.displayName = COLLAPSIBLE_NAME;\nvar TRIGGER_NAME = \"CollapsibleTrigger\";\nvar CollapsibleTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-controls\": context.contentId,\n \"aria-expanded\": context.open || false,\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n disabled: context.disabled,\n ...triggerProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nCollapsibleTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"CollapsibleContent\";\nvar CollapsibleContent = React.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });\n }\n);\nCollapsibleContent.displayName = CONTENT_NAME;\nvar CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef(0);\n const height = heightRef.current;\n const widthRef = React.useRef(0);\n const width = widthRef.current;\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef();\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n };\n node.style.transitionDuration = \"0s\";\n node.style.animationName = \"none\";\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration;\n node.style.animationName = originalStylesRef.current.animationName;\n }\n setIsPresent(present);\n }\n }, [context.open, present]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n id: context.contentId,\n hidden: !isOpen,\n ...contentProps,\n ref: composedRefs,\n style: {\n [`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,\n [`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,\n ...props.style\n },\n children: isOpen && children\n }\n );\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root = Collapsible;\nvar Trigger = CollapsibleTrigger;\nvar Content = CollapsibleContent;\nexport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n Content,\n Root,\n Trigger,\n createCollapsibleScope\n};\n//# sourceMappingURL=index.mjs.map\n","import { LoaderCircle } from \"lucide-react\";\n\nexport const Spinner = ({ size = 16 }: { size?: number }) => (\n <LoaderCircle size={size} className=\"animate-spin\" />\n);\n"],"names":["LoaderCircle","createLucideIcon","useStateMachine","initialState","machine","React","state","event","Presence","props","present","children","presence","usePresence","child","React2","ref","useComposedRefs","getElementRef","node","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","handleAnimationEnd","isCurrentAnimation","ReactDOM","handleAnimationStart","node2","element","getter","_a","mayWarn","_b","COLLAPSIBLE_NAME","createCollapsibleContext","createCollapsibleScope","createContextScope","CollapsibleProvider","useCollapsibleContext","Collapsible","forwardedRef","__scopeCollapsible","openProp","defaultOpen","disabled","onOpenChange","collapsibleProps","open","setOpen","useControllableState","jsx","useId","prevOpen","Primitive","getState","TRIGGER_NAME","CollapsibleTrigger","triggerProps","context","composeEventHandlers","CONTENT_NAME","CollapsibleContent","forceMount","contentProps","CollapsibleContentImpl","isPresent","setIsPresent","composedRefs","heightRef","height","widthRef","width","isOpen","isMountAnimationPreventedRef","originalStylesRef","rAF","rect","Root","Trigger","Content","Spinner","size"],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAeC,EAAiB,gBAAgB;AAAA,EACpD,CAAC,QAAQ,EAAE,GAAG,+BAA+B,KAAK,SAAQ,CAAE;AAC9D,CAAC;ACDD,SAASC,EAAgBC,GAAcC,GAAS;AAC9C,SAAOC,EAAM,WAAW,CAACC,GAAOC,MACZH,EAAQE,CAAK,EAAEC,CAAK,KAClBD,GACnBH,CAAY;AACjB;AAGG,IAACK,IAAW,CAACC,MAAU;AACxB,QAAM,EAAE,SAAAC,GAAS,UAAAC,EAAU,IAAGF,GACxBG,IAAWC,EAAYH,CAAO,GAC9BI,IAAQ,OAAOH,KAAa,aAAaA,EAAS,EAAE,SAASC,EAAS,UAAS,CAAE,IAAIG,EAAO,SAAS,KAAKJ,CAAQ,GAClHK,IAAMC,EAAgBL,EAAS,KAAKM,EAAcJ,CAAK,CAAC;AAE9D,SADmB,OAAOH,KAAa,cAClBC,EAAS,YAAYG,EAAO,aAAaD,GAAO,EAAE,KAAAE,GAAK,IAAI;AAClF;AACAR,EAAS,cAAc;AACvB,SAASK,EAAYH,GAAS;AAC5B,QAAM,CAACS,GAAMC,CAAO,IAAIL,EAAO,SAAQ,GACjCM,IAAYN,EAAO,OAAO,CAAE,CAAA,GAC5BO,IAAiBP,EAAO,OAAOL,CAAO,GACtCa,IAAuBR,EAAO,OAAO,MAAM,GAC3CZ,IAAeO,IAAU,YAAY,aACrC,CAACJ,GAAOkB,CAAI,IAAItB,EAAgBC,GAAc;AAAA,IAClD,SAAS;AAAA,MACP,SAAS;AAAA,MACT,eAAe;AAAA,IAChB;AAAA,IACD,kBAAkB;AAAA,MAChB,OAAO;AAAA,MACP,eAAe;AAAA,IAChB;AAAA,IACD,WAAW;AAAA,MACT,OAAO;AAAA,IACR;AAAA,EAC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,EAAahE,CAAO;AAAA,IACrB;AAAA,EACF,GAAE,CAACwD,EAAQ,MAAMxD,CAAO,CAAC,GACHgD,gBAAAA,EAAG;AAAA,IACxBG,EAAU;AAAA,IACV;AAAA,MACE,cAAcC,EAASI,EAAQ,IAAI;AAAA,MACnC,iBAAiBA,EAAQ,WAAW,KAAK;AAAA,MACzC,IAAIA,EAAQ;AAAA,MACZ,QAAQ,CAACc;AAAA,MACT,GAAGT;AAAA,MACH,KAAKI;AAAA,MACL,OAAO;AAAA,QACJ,sCAAuCE,IAAS,GAAGA,CAAM,OAAO;AAAA,QAChE,qCAAsCE,IAAQ,GAAGA,CAAK,OAAO;AAAA,QAC9D,GAAGtE,EAAM;AAAA,MACV;AAAA,MACD,UAAUuE,KAAUrE;AAAA,IACrB;AAAA,EACL;AACA,CAAC;AACD,SAASmD,EAASP,GAAM;AACtB,SAAOA,IAAO,SAAS;AACzB;AACG,IAAC8B,IAAOtC,GACPuC,IAAUtB,GACVuB,KAAUlB;AC7ID,MAAAmB,KAAU,CAAC,EAAE,MAAAC,IAAO,SAC9B/B,gBAAAA,MAAA1D,GAAA,EAAa,MAAAyF,GAAY,WAAU,eAAe,CAAA;","x_google_ignoreList":[0,1,2]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { b as o, j as t, c as a } from "./jsx-runtime-Bt86M5tA.js";
|
|
2
|
+
import { c as i, P as r, f as l, H as c, L as u } from "./Markdown-DMEnjeMH.js";
|
|
3
|
+
import { i as x } from "./router-CcYTwKjf.js";
|
|
4
|
+
import { u as m } from "./DevPortalProvider-Demv4Ngx.js";
|
|
5
|
+
import { u as d } from "./state-Ds_OxRHP.js";
|
|
6
|
+
/**
|
|
7
|
+
* @license lucide-react v0.378.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
const h = i("Unlink", [
|
|
13
|
+
[
|
|
14
|
+
"path",
|
|
15
|
+
{
|
|
16
|
+
d: "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",
|
|
17
|
+
key: "yqzxt4"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"path",
|
|
22
|
+
{
|
|
23
|
+
d: "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",
|
|
24
|
+
key: "4qinb0"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
["line", { x1: "8", x2: "8", y1: "2", y2: "5", key: "1041cp" }],
|
|
28
|
+
["line", { x1: "2", x2: "5", y1: "8", y2: "8", key: "14m1p5" }],
|
|
29
|
+
["line", { x1: "16", x2: "16", y1: "19", y2: "22", key: "rzdirn" }],
|
|
30
|
+
["line", { x1: "19", x2: "22", y1: "16", y2: "16", key: "ox905f" }]
|
|
31
|
+
]), p = () => (o(), /* @__PURE__ */ t.jsxs("div", { className: r + " h-full pt-[--padding-content-top]", children: [
|
|
32
|
+
/* @__PURE__ */ t.jsx(l, { children: "404" }),
|
|
33
|
+
/* @__PURE__ */ t.jsxs(c, { level: 1, className: "flex gap-3.5 items-center", children: [
|
|
34
|
+
"Page not found",
|
|
35
|
+
/* @__PURE__ */ t.jsx(h, { size: 24 })
|
|
36
|
+
] }),
|
|
37
|
+
!1,
|
|
38
|
+
/* @__PURE__ */ t.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
|
|
39
|
+
/* @__PURE__ */ t.jsx(u, { to: "/", children: "Go back home" })
|
|
40
|
+
] }));
|
|
41
|
+
function f({ error: e }) {
|
|
42
|
+
const s = (e == null ? void 0 : e.message) ?? "Something went wrong", n = e == null ? void 0 : e.stack;
|
|
43
|
+
return /* @__PURE__ */ t.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__ */ t.jsxs("div", { className: "mx-auto max-w-[85%] sm:max-w-[50%]", children: [
|
|
44
|
+
/* @__PURE__ */ t.jsx("h1", { className: "text-4xl font-bold tracking-tight text-h1-text sm:text-5xl", children: "Something went wrong" }),
|
|
45
|
+
/* @__PURE__ */ t.jsx("p", { className: "mt-5 text-h1-text", children: s }),
|
|
46
|
+
n ? /* @__PURE__ */ t.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: n }) : null
|
|
47
|
+
] }) });
|
|
48
|
+
}
|
|
49
|
+
function b() {
|
|
50
|
+
const e = a();
|
|
51
|
+
return x(e) && e.status === 404 ? /* @__PURE__ */ t.jsx(p, {}) : /* @__PURE__ */ t.jsx(f, { error: e });
|
|
52
|
+
}
|
|
53
|
+
const v = () => {
|
|
54
|
+
const { authentication: e } = m(), s = d(), n = typeof e < "u";
|
|
55
|
+
return {
|
|
56
|
+
isAuthEnabled: n,
|
|
57
|
+
isPending: s.isPending,
|
|
58
|
+
profile: s.profile,
|
|
59
|
+
isAuthenticated: s.profile,
|
|
60
|
+
login: async () => {
|
|
61
|
+
if (!n)
|
|
62
|
+
throw new Error("Authentication is not enabled.");
|
|
63
|
+
await e.login();
|
|
64
|
+
},
|
|
65
|
+
logout: async () => {
|
|
66
|
+
if (!n)
|
|
67
|
+
throw new Error("Authentication is not enabled.");
|
|
68
|
+
await e.logout(), window.location.href = "/";
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
f as E,
|
|
74
|
+
b as R,
|
|
75
|
+
v as u
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=hook-Cq3Jb1lX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-Cq3Jb1lX.js","sources":["../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/unlink.js","../src/lib/components/NotFoundPage.tsx","../src/lib/errors/ErrorAlert.tsx","../src/lib/errors/RouterError.tsx","../src/lib/authentication/hook.ts"],"sourcesContent":["/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Unlink = createLucideIcon(\"Unlink\", [\n [\n \"path\",\n {\n d: \"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\",\n key: \"yqzxt4\"\n }\n ],\n [\n \"path\",\n {\n d: \"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\",\n key: \"4qinb0\"\n }\n ],\n [\"line\", { x1: \"8\", x2: \"8\", y1: \"2\", y2: \"5\", key: \"1041cp\" }],\n [\"line\", { x1: \"2\", x2: \"5\", y1: \"8\", y2: \"8\", key: \"14m1p5\" }],\n [\"line\", { x1: \"16\", x2: \"16\", y1: \"19\", y2: \"22\", key: \"rzdirn\" }],\n [\"line\", { x1: \"19\", x2: \"22\", y1: \"16\", y2: \"16\", key: \"ox905f\" }]\n]);\n\nexport { Unlink as default };\n//# sourceMappingURL=unlink.js.map\n","import { UnlinkIcon } from \"lucide-react\";\nimport { Link, useParams } from \"react-router-dom\";\nimport { Callout } from \"../ui/Callout.js\";\nimport { CategoryHeading } from \"./CategoryHeading.js\";\nimport { Heading } from \"./Heading.js\";\nimport { ProseClasses } from \"./Markdown.js\";\n\nexport const NotFoundPage = () => {\n const params = useParams();\n\n return (\n <div className={ProseClasses + \" h-full pt-[--padding-content-top]\"}>\n <CategoryHeading>404</CategoryHeading>\n <Heading level={1} className=\"flex gap-3.5 items-center\">\n Page not found\n <UnlinkIcon size={24} />\n </Heading>\n {import.meta.env.DEV && (\n <Callout type=\"caution\" title=\"Developer hint\">\n Start by adding a file at{\" \"}\n <code>\n {\"{PROJECT_ROOT}\"}/{params[\"*\"]}.mdx\n </code>{\" \"}\n and add some content to make this error go away.\n <br />\n <small className=\"italic\">\n Note: This hint is only shown in development mode.\n </small>\n </Callout>\n )}\n <p>\n It seems that the page you are looking for does not exist or may have\n been moved. Please check the URL for any typos or use the navigation\n menu to find the correct page.\n </p>\n <Link to=\"/\">Go back home</Link>\n </div>\n );\n};\n","// 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 { isRouteErrorResponse, useRouteError } from \"react-router-dom\";\nimport { NotFoundPage } from \"../components/NotFoundPage.js\";\nimport { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function RouterError() {\n const error = useRouteError();\n\n if (isRouteErrorResponse(error) && error.status === 404) {\n return <NotFoundPage />;\n }\n\n return <ErrorAlert error={error} />;\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":["Unlink","createLucideIcon","NotFoundPage","useParams","ProseClasses","jsx","CategoryHeading","Heading","UnlinkIcon","Link","ErrorAlert","error","message","stack","jsxs","RouterError","useRouteError","isRouteErrorResponse","useAuth","authentication","useDevPortal","authState","useAuthState","isAuthEnabled"],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAASC,EAAiB,UAAU;AAAA,EACxC;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACN;AAAA,EACF;AAAA,EACD;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACN;AAAA,EACF;AAAA,EACD,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC9D,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC9D,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAClE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AACpE,CAAC,GCrBYC,IAAe,OACXC,EAAU,0BAGtB,OAAA,EAAI,WAAWC,IAAe,sCAC7B,UAAA;AAAA,EAACC,gBAAAA,EAAAA,IAAAC,KAAgB,UAAG,OAAA;AAAA,yBACnBC,GAAA,EAAQ,OAAO,GAAG,WAAU,6BAA4B,UAAA;AAAA,IAAA;AAAA,IAEtDF,gBAAAA,EAAAA,IAAAG,G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