zudoku 0.53.2 → 0.53.3
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 +3 -9
- package/dist/app/main.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/StatusPage.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +1 -1
- package/dist/vite/build.js +7 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/plugin-mdx.js +2 -3
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/lib/{Alert-CT_ViLrJ.js → Alert-FYKbqjIt.js} +2 -2
- package/lib/Alert-FYKbqjIt.js.map +1 -0
- package/lib/{MdxPage-8UuEK446.js → MdxPage-DyRuoE_F.js} +16 -16
- package/lib/{MdxPage-8UuEK446.js.map → MdxPage-DyRuoE_F.js.map} +1 -1
- package/lib/{OasProvider-BsWpguVO.js → OasProvider-CUA-DFGE.js} +2 -2
- package/lib/{OasProvider-BsWpguVO.js.map → OasProvider-CUA-DFGE.js.map} +1 -1
- package/lib/{OperationList-PnZbf3b2.js → OperationList-CRMvWoTv.js} +7 -7
- package/lib/{OperationList-PnZbf3b2.js.map → OperationList-CRMvWoTv.js.map} +1 -1
- package/lib/{Pagination-DY7gCrm4.js → Pagination-HZKe5ncg.js} +9 -8
- package/lib/Pagination-HZKe5ncg.js.map +1 -0
- package/lib/{SchemaList-D6k4DKWH.js → SchemaList-B792ORza.js} +6 -6
- package/lib/{SchemaList-D6k4DKWH.js.map → SchemaList-B792ORza.js.map} +1 -1
- package/lib/{SchemaView-BhgJ9WB8.js → SchemaView-Bo53TeMb.js} +4 -4
- package/lib/{SchemaView-BhgJ9WB8.js.map → SchemaView-Bo53TeMb.js.map} +1 -1
- package/lib/{SignUp-CpUD6DUM.js → SignUp-DfVvOCYB.js} +2 -2
- package/lib/{SignUp-CpUD6DUM.js.map → SignUp-DfVvOCYB.js.map} +1 -1
- package/lib/{Slot-DwZlQ-vX.js → Slot-BpO_AGKJ.js} +13 -5
- package/lib/Slot-BpO_AGKJ.js.map +1 -0
- package/lib/{SyntaxHighlight-CrjhGEwT.js → SyntaxHighlight-CZgjJ7-f.js} +753 -753
- package/lib/SyntaxHighlight-CZgjJ7-f.js.map +1 -0
- package/lib/{Toc-WCmwFkX-.js → Toc-DYMzDvOa.js} +2 -2
- package/lib/{Toc-WCmwFkX-.js.map → Toc-DYMzDvOa.js.map} +1 -1
- package/lib/{circular-BUMjK3JF.js → circular-CLdQ0oUd.js} +2 -2
- package/lib/{circular-BUMjK3JF.js.map → circular-CLdQ0oUd.js.map} +1 -1
- package/lib/{createServer-BPz8ZCrd.js → createServer-Co4BBP-i.js} +4 -4
- package/lib/{createServer-BPz8ZCrd.js.map → createServer-Co4BBP-i.js.map} +1 -1
- package/lib/{errors-DY-qOx9n.js → errors-DE1gK7ms.js} +3 -3
- package/lib/{errors-DY-qOx9n.js.map → errors-DE1gK7ms.js.map} +1 -1
- package/lib/{index-C_xVKbf9.js → index-DLshv89l.js} +581 -566
- package/lib/{index-C_xVKbf9.js.map → index-DLshv89l.js.map} +1 -1
- package/lib/{index-CcV90rin.js → index-DLzZDv8_.js} +2 -2
- package/lib/{index-CcV90rin.js.map → index-DLzZDv8_.js.map} +1 -1
- package/lib/{index-dVBKCNMa.js → index-DYP-V0jG.js} +10 -10
- package/lib/{index-dVBKCNMa.js.map → index-DYP-V0jG.js.map} +1 -1
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +1553 -1556
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +1 -1
- package/lib/zudoku.components.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +54 -57
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +106 -102
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +8 -7
- package/src/app/main.tsx +6 -14
- package/src/lib/components/Banner.tsx +0 -1
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/Header.tsx +4 -1
- package/src/lib/components/Pagination.tsx +1 -0
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/navigation/NavigationWrapper.tsx +4 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
- package/src/lib/ui/Alert.tsx +1 -1
- package/lib/Alert-CT_ViLrJ.js.map +0 -1
- package/lib/Pagination-DY7gCrm4.js.map +0 -1
- package/lib/Slot-DwZlQ-vX.js.map +0 -1
- package/lib/SyntaxHighlight-CrjhGEwT.js.map +0 -1
package/lib/zudoku.auth-clerk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as l } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { LogOutIcon as g } from "lucide-react";
|
|
3
|
-
import { S as f, a as w, b as p } from "./SignUp-
|
|
3
|
+
import { S as f, a as w, b as p } from "./SignUp-DfVvOCYB.js";
|
|
4
4
|
import { u as n } from "./hook-Bd0yS8M0.js";
|
|
5
5
|
const y = ({
|
|
6
6
|
clerkPubKey: d,
|
|
@@ -2,7 +2,7 @@ import { j as ne } from "./jsx-runtime-C5mzlN2N.js";
|
|
|
2
2
|
import { g as Le } from "./invariant-DAFpPywt.js";
|
|
3
3
|
import { C as Ue } from "./ClientOnly-E7hGysn1.js";
|
|
4
4
|
import { j as xe, u as S } from "./hook-Bd0yS8M0.js";
|
|
5
|
-
import { C as Ce, O as re, A as R, a as Ie } from "./errors-
|
|
5
|
+
import { C as Ce, O as re, A as R, a as Ie } from "./errors-DE1gK7ms.js";
|
|
6
6
|
var O = { exports: {} }, je = O.exports, oe;
|
|
7
7
|
function De() {
|
|
8
8
|
return oe || (oe = 1, function(t) {
|
package/lib/zudoku.components.js
CHANGED
|
@@ -2,8 +2,8 @@ import "./RouteGuard-CbKd7_9h.js";
|
|
|
2
2
|
import "./index-ClhS5TxS.js";
|
|
3
3
|
import "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
4
4
|
import "./hook-Bd0yS8M0.js";
|
|
5
|
-
import "./Slot-
|
|
6
|
-
import { e as C, f as d, j as h, B as k, m as l, C as S, i as B, H as c, c as y, L as E, M as g, g as H, R as L, d as M, S as R, h as T, T as Z, Z as f, b as A, l as b, k as j, n as v, u as w } from "./index-
|
|
5
|
+
import "./Slot-BpO_AGKJ.js";
|
|
6
|
+
import { e as C, f as d, j as h, B as k, m as l, C as S, i as B, H as c, c as y, L as E, M as g, g as H, R as L, d as M, S as R, h as T, T as Z, Z as f, b as A, l as b, k as j, n as v, u as w } from "./index-DLshv89l.js";
|
|
7
7
|
import "./ui/Button.js";
|
|
8
8
|
import "./ui/Callout.js";
|
|
9
9
|
import "./ClientOnly-E7hGysn1.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { s as f } from "./index-
|
|
2
|
+
import { s as f } from "./index-DLzZDv8_.js";
|
|
3
3
|
import { d as b, m as j } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
4
4
|
import { u as x, c as v, j as d } from "./hook-Bd0yS8M0.js";
|
|
5
5
|
import { H as y } from "./RouteGuard-CbKd7_9h.js";
|
|
6
|
-
import { L as N } from "./index-
|
|
7
|
-
import { H as k, M as S } from "./Slot-
|
|
6
|
+
import { L as N } from "./index-DLshv89l.js";
|
|
7
|
+
import { H as k, M as S } from "./Slot-BpO_AGKJ.js";
|
|
8
8
|
const w = ({
|
|
9
9
|
items: n,
|
|
10
10
|
filterCatalogItems: o = (r) => r,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { CircleSlashIcon as M, CheckIcon as W, XIcon as ae, PencilLineIcon as oe, RefreshCwIcon as le, EyeOffIcon as ce, EyeIcon as de, CopyIcon as ue, TrashIcon as he, KeyRoundIcon as fe } from "lucide-react";
|
|
3
|
-
import { D as pe, a as B, R as me } from "./Slot-
|
|
3
|
+
import { D as pe, a as B, R as me } from "./Slot-BpO_AGKJ.js";
|
|
4
4
|
import { i as D } from "./invariant-DAFpPywt.js";
|
|
5
5
|
import { O as xe, L as J } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
6
6
|
import { e as ye, d as ge, g as je, c as Ce } from "./hook-Bd0yS8M0.js";
|
|
7
7
|
import { Button as j } from "./ui/Button.js";
|
|
8
|
-
import { u as S, A as q, a as L } from "./Alert-
|
|
8
|
+
import { u as S, A as q, a as L } from "./Alert-FYKbqjIt.js";
|
|
9
9
|
import * as F from "react";
|
|
10
10
|
import we, { createContext as O, useRef as N, useLayoutEffect as ve, useEffect as X, useId as Q, useContext as H, useInsertionEffect as ke, useMemo as $, useCallback as be, Children as Ee, isValidElement as Ne, useState as P } from "react";
|
|
11
11
|
import { C as Pe, a as De } from "./Card-DPhGbYUM.js";
|
|
@@ -4,7 +4,7 @@ const m = (t) => ({
|
|
|
4
4
|
([e, n]) => ({
|
|
5
5
|
path: e,
|
|
6
6
|
lazy: async () => {
|
|
7
|
-
const { MdxPage: o } = await import("./MdxPage-
|
|
7
|
+
const { MdxPage: o } = await import("./MdxPage-DyRuoE_F.js"), { default: a, ...r } = await n();
|
|
8
8
|
return {
|
|
9
9
|
element: /* @__PURE__ */ s.jsx(
|
|
10
10
|
o,
|
|
@@ -3,7 +3,7 @@ import "lucide-react";
|
|
|
3
3
|
import "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
4
4
|
import "./hook-Bd0yS8M0.js";
|
|
5
5
|
import "./ui/Button.js";
|
|
6
|
-
import { E as e, U as n, F as s } from "./index-
|
|
6
|
+
import { E as e, U as n, F as s } from "./index-DYP-V0jG.js";
|
|
7
7
|
export {
|
|
8
8
|
e as GetNavigationOperationsQuery,
|
|
9
9
|
n as UNTAGGED_PATH,
|
|
@@ -1,75 +1,72 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import { C as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
defaultProps: {
|
|
15
|
-
size: "expand",
|
|
16
|
-
variant: "subtle"
|
|
17
|
-
// Choose from 'emphasized' or 'subtle'
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}, k = {}, I = ({
|
|
23
|
-
prefilledQuery: t,
|
|
24
|
-
isOpen: e,
|
|
1
|
+
import { j as o } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { useMemo as l, useState as h, useEffect as c } from "react";
|
|
3
|
+
import { C as p } from "./ClientOnly-E7hGysn1.js";
|
|
4
|
+
const u = {
|
|
5
|
+
primaryBrandColor: "#26D6FF"
|
|
6
|
+
}, m = {
|
|
7
|
+
shortcutKey: "k"
|
|
8
|
+
}, S = {
|
|
9
|
+
placeholder: "Search..."
|
|
10
|
+
}, f = {
|
|
11
|
+
aiAssistantName: "Assistant"
|
|
12
|
+
}, k = ({
|
|
13
|
+
isOpen: n,
|
|
25
14
|
onClose: r,
|
|
26
|
-
settings:
|
|
15
|
+
settings: a
|
|
27
16
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
typeof Inkeep < "u"
|
|
30
|
-
), s = m(
|
|
17
|
+
const s = l(
|
|
31
18
|
() => ({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
19
|
+
baseSettings: {
|
|
20
|
+
...u,
|
|
21
|
+
...a,
|
|
22
|
+
colorMode: {
|
|
23
|
+
sync: {
|
|
24
|
+
target: "html",
|
|
25
|
+
attributes: ["class"],
|
|
26
|
+
isDarkMode: (e) => e.class?.includes("dark") ?? !1
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
modalSettings: {
|
|
31
|
+
...m,
|
|
32
|
+
onOpenChange: (e) => {
|
|
33
|
+
e || r();
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
searchSettings: S,
|
|
37
|
+
aiChatSettings: f
|
|
44
38
|
}),
|
|
45
|
-
[
|
|
39
|
+
[r, a]
|
|
40
|
+
), [t, i] = h(
|
|
41
|
+
typeof window < "u" && window.Inkeep?.ModalSearchAndChat ? window.Inkeep.ModalSearchAndChat(s) : void 0
|
|
46
42
|
);
|
|
47
43
|
return c(() => {
|
|
48
|
-
if (
|
|
49
|
-
const
|
|
50
|
-
typeof
|
|
44
|
+
if (t) return;
|
|
45
|
+
const e = setInterval(() => {
|
|
46
|
+
if (typeof window < "u" && window.Inkeep?.ModalSearchAndChat) {
|
|
47
|
+
const d = window.Inkeep.ModalSearchAndChat(s);
|
|
48
|
+
i(d), clearInterval(e);
|
|
49
|
+
}
|
|
51
50
|
}, 100);
|
|
52
|
-
return () => clearInterval(
|
|
53
|
-
}, [
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, x = (t) => ({
|
|
59
|
-
getHead: () => /* @__PURE__ */ a.jsx(
|
|
51
|
+
return () => clearInterval(e);
|
|
52
|
+
}, [s, t]), c(() => {
|
|
53
|
+
t && t.update({ modalSettings: { isOpen: n } });
|
|
54
|
+
}, [n, t]), null;
|
|
55
|
+
}, C = (n) => ({
|
|
56
|
+
getHead: () => /* @__PURE__ */ o.jsx(
|
|
60
57
|
"script",
|
|
61
58
|
{
|
|
62
59
|
type: "module",
|
|
63
|
-
src: "https://
|
|
60
|
+
src: "https://cdn.jsdelivr.net/npm/@inkeep/cxkit-js@0.5.90/+esm",
|
|
64
61
|
defer: !0
|
|
65
62
|
}
|
|
66
63
|
),
|
|
67
64
|
renderSearch: ({
|
|
68
|
-
isOpen:
|
|
69
|
-
onClose:
|
|
70
|
-
}) => /* @__PURE__ */
|
|
65
|
+
isOpen: r,
|
|
66
|
+
onClose: a
|
|
67
|
+
}) => /* @__PURE__ */ o.jsx(p, { children: /* @__PURE__ */ o.jsx(k, { isOpen: r, onClose: a, settings: n }) })
|
|
71
68
|
});
|
|
72
69
|
export {
|
|
73
|
-
|
|
70
|
+
C as inkeepSearchPlugin
|
|
74
71
|
};
|
|
75
72
|
//# sourceMappingURL=zudoku.plugin-search-inkeep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.plugin-search-inkeep.js","sources":["../src/lib/plugins/search-inkeep/inkeep.ts","../src/lib/plugins/search-inkeep/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"zudoku.plugin-search-inkeep.js","sources":["../src/lib/plugins/search-inkeep/inkeep.ts","../src/lib/plugins/search-inkeep/index.tsx"],"sourcesContent":["import type {\n InkeepAIChatSettings,\n InkeepBaseSettings,\n InkeepModalSettings,\n InkeepSearchSettings,\n} from \"@inkeep/cxkit-types\";\n\nconst baseSettings: InkeepBaseSettings = {\n primaryBrandColor: \"#26D6FF\",\n};\n\nconst modalSettings: InkeepModalSettings = {\n shortcutKey: \"k\",\n};\n\nconst searchSettings: InkeepSearchSettings = {\n placeholder: \"Search...\",\n};\n\nconst aiChatSettings: InkeepAIChatSettings = {\n aiAssistantName: \"Assistant\",\n};\n\nexport { aiChatSettings, baseSettings, modalSettings, searchSettings };\n","import type {\n InkeepBaseSettings,\n InkeepComponentInstance,\n InkeepJS,\n InkeepSettings,\n} from \"@inkeep/cxkit-types\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { ClientOnly } from \"../../components/ClientOnly.js\";\nimport type { ZudokuPlugin } from \"../../core/plugins.js\";\nimport {\n aiChatSettings,\n baseSettings,\n modalSettings,\n searchSettings,\n} from \"./inkeep.js\";\n\ndeclare global {\n interface Window {\n Inkeep: InkeepJS | undefined;\n }\n}\n\nconst InkeepSearch = ({\n isOpen,\n onClose,\n settings,\n}: {\n isOpen: boolean;\n onClose: () => void;\n settings: InkeepBaseSettings;\n}) => {\n const config = useMemo<InkeepSettings>(\n () => ({\n baseSettings: {\n ...baseSettings,\n ...settings,\n colorMode: {\n sync: {\n target: \"html\",\n attributes: [\"class\"],\n isDarkMode: (attrs) => attrs[\"class\"]?.includes(\"dark\") ?? false,\n },\n },\n },\n modalSettings: {\n ...modalSettings,\n onOpenChange: (newOpen: boolean) => {\n if (!newOpen) onClose();\n },\n },\n searchSettings,\n aiChatSettings,\n }),\n [onClose, settings],\n );\n const [searchInstance, setSearchInstance] = useState<\n InkeepComponentInstance | undefined\n >(\n typeof window !== \"undefined\" && window.Inkeep?.ModalSearchAndChat\n ? window.Inkeep.ModalSearchAndChat(config)!\n : undefined,\n );\n\n useEffect(() => {\n if (searchInstance) return;\n\n const checkInkeep = setInterval(() => {\n if (typeof window !== \"undefined\" && window.Inkeep?.ModalSearchAndChat) {\n const inkeep = window.Inkeep.ModalSearchAndChat(config)!;\n setSearchInstance(inkeep);\n clearInterval(checkInkeep);\n }\n }, 100);\n\n return () => clearInterval(checkInkeep);\n }, [config, searchInstance]);\n\n useEffect(() => {\n if (!searchInstance) return;\n\n searchInstance.update({ modalSettings: { isOpen } });\n }, [isOpen, searchInstance]);\n\n return null;\n};\n\nexport const inkeepSearchPlugin = (\n settings: InkeepBaseSettings,\n): ZudokuPlugin => {\n return {\n getHead: () => {\n return (\n <script\n type=\"module\"\n src=\"https://cdn.jsdelivr.net/npm/@inkeep/cxkit-js@0.5.90/+esm\"\n defer\n />\n );\n },\n renderSearch: ({\n isOpen,\n onClose,\n }: {\n isOpen: boolean;\n onClose: () => void;\n }) => {\n return (\n <ClientOnly>\n <InkeepSearch isOpen={isOpen} onClose={onClose} settings={settings} />\n </ClientOnly>\n );\n },\n };\n};\n"],"names":["baseSettings","modalSettings","searchSettings","aiChatSettings","InkeepSearch","isOpen","onClose","settings","config","useMemo","attrs","newOpen","searchInstance","setSearchInstance","useState","useEffect","checkInkeep","inkeep","inkeepSearchPlugin","jsx","ClientOnly"],"mappings":";;;AAOA,MAAMA,IAAmC;AAAA,EACvC,mBAAmB;AACrB,GAEMC,IAAqC;AAAA,EACzC,aAAa;AACf,GAEMC,IAAuC;AAAA,EAC3C,aAAa;AACf,GAEMC,IAAuC;AAAA,EAC3C,iBAAiB;AACnB,GCCMC,IAAe,CAAC;AAAA,EACpB,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AACF,MAIM;AACJ,QAAMC,IAASC;AAAA,IACb,OAAO;AAAA,MACL,cAAc;AAAA,QACZ,GAAGT;AAAA,QACH,GAAGO;AAAA,QACH,WAAW;AAAA,UACT,MAAM;AAAA,YACJ,QAAQ;AAAA,YACR,YAAY,CAAC,OAAO;AAAA,YACpB,YAAY,CAACG,MAAUA,EAAM,OAAU,SAAS,MAAM,KAAK;AAAA,UAAA;AAAA,QAC7D;AAAA,MAEJ;AAAA,MACA,eAAe;AAAA,QACb,GAAGT;AAAA,QACH,cAAc,CAACU,MAAqB;AAC9B,UAACA,KAAiBL,EAAA;AAAA,QAAA;AAAA,MAE1B;AAAA,MACA,gBAAAJ;AAAA,MACA,gBAAAC;AAAA,IAAA;AAAA,IAEF,CAACG,GAASC,CAAQ;AAAA,EACpB,GACM,CAACK,GAAgBC,CAAiB,IAAIC;AAAA,IAG1C,OAAO,SAAW,OAAe,OAAO,QAAQ,qBAC5C,OAAO,OAAO,mBAAmBN,CAAM,IACvC;AAAA,EACN;AAEA,SAAAO,EAAU,MAAM;AACd,QAAIH,EAAgB;AAEd,UAAAI,IAAc,YAAY,MAAM;AACpC,UAAI,OAAO,SAAW,OAAe,OAAO,QAAQ,oBAAoB;AACtE,cAAMC,IAAS,OAAO,OAAO,mBAAmBT,CAAM;AACtD,QAAAK,EAAkBI,CAAM,GACxB,cAAcD,CAAW;AAAA,MAAA;AAAA,OAE1B,GAAG;AAEC,WAAA,MAAM,cAAcA,CAAW;AAAA,EAAA,GACrC,CAACR,GAAQI,CAAc,CAAC,GAE3BG,EAAU,MAAM;AACd,IAAKH,KAELA,EAAe,OAAO,EAAE,eAAe,EAAE,QAAAP,KAAU;AAAA,EAAA,GAClD,CAACA,GAAQO,CAAc,CAAC,GAEpB;AACT,GAEaM,IAAqB,CAChCX,OAEO;AAAA,EACL,SAAS,MAELY,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,KAAI;AAAA,MACJ,OAAK;AAAA,IAAA;AAAA,EACP;AAAA,EAGJ,cAAc,CAAC;AAAA,IACb,QAAAd;AAAA,IACA,SAAAC;AAAA,EAAA,4BAMGc,GACC,EAAA,UAAAD,gBAAAA,EAAA,IAACf,KAAa,QAAAC,GAAgB,SAAAC,GAAkB,UAAAC,GAAoB,EACtE,CAAA;AAGN;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { C as
|
|
3
|
-
import { VisuallyHidden as
|
|
4
|
-
import {
|
|
5
|
-
import { useRef as
|
|
2
|
+
import { C as v } from "./ClientOnly-E7hGysn1.js";
|
|
3
|
+
import { VisuallyHidden as I } from "@radix-ui/react-visually-hidden";
|
|
4
|
+
import { j as k, u as N, d as j, l as C, m as L } from "./hook-Bd0yS8M0.js";
|
|
5
|
+
import { useRef as S, useLayoutEffect as T, useState as E } from "react";
|
|
6
6
|
import { B as R } from "./Button-BE9IVkWV.js";
|
|
7
7
|
import { ShieldAlertIcon as F, AlertTriangleIcon as q, InfoIcon as b, LightbulbIcon as z, BracketsIcon as A, FileTextIcon as P } from "lucide-react";
|
|
8
8
|
import { c as u } from "./cn-wvCW-ho6.js";
|
|
9
|
-
import { C as $, a as f, b as h, c as D, d as
|
|
9
|
+
import { C as $, a as f, b as h, c as D, d as B, e as O } from "./Command-xsbs2uhf.js";
|
|
10
10
|
import { b as U } from "./Dialog-CiIdyz6a.js";
|
|
11
11
|
import { S as G } from "./RouteGuard-CbKd7_9h.js";
|
|
12
12
|
import { a as H, L as p } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
@@ -52,45 +52,45 @@ const K = {
|
|
|
52
52
|
Icon: F
|
|
53
53
|
}
|
|
54
54
|
}, M = ({
|
|
55
|
-
type:
|
|
55
|
+
type: o,
|
|
56
56
|
children: n,
|
|
57
|
-
title:
|
|
58
|
-
className:
|
|
57
|
+
title: t,
|
|
58
|
+
className: s,
|
|
59
59
|
icon: a = !0
|
|
60
60
|
}) => {
|
|
61
|
-
const { border:
|
|
61
|
+
const { border: l, bg: i, iconColor: d, titleColor: r, textColor: c, Icon: m } = K[o];
|
|
62
62
|
return /* @__PURE__ */ e.jsxs(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
65
|
className: u(
|
|
66
66
|
"not-prose rounded-md border p-4 text-md my-2",
|
|
67
67
|
a && "grid grid-cols-[min-content_1fr] items-baseline grid-rows-[fit-content_1fr] gap-x-4 gap-y-2",
|
|
68
|
-
!a &&
|
|
68
|
+
!a && t && "flex flex-col gap-2",
|
|
69
69
|
"[&_a]:underline [&_a]:decoration-current [&_a]:decoration-from-font [&_a]:underline-offset-4 hover:[&_a]:decoration-1",
|
|
70
70
|
"[&_.code-block-wrapper]:border",
|
|
71
71
|
"[&_ul]:list-disc [&_ol]:list-decimal [&_ul]:ps-4 [&_ul>li]:ps-1 [&_ul>li]:my-1",
|
|
72
|
-
a &&
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
a && t && "items-center",
|
|
73
|
+
l,
|
|
74
|
+
i,
|
|
75
|
+
s
|
|
76
76
|
),
|
|
77
77
|
children: [
|
|
78
78
|
a && /* @__PURE__ */ e.jsx(
|
|
79
79
|
m,
|
|
80
80
|
{
|
|
81
|
-
className: u(
|
|
81
|
+
className: u(t ? "align-middle" : "translate-y-1", d),
|
|
82
82
|
size: 20,
|
|
83
83
|
"aria-hidden": "true"
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
|
-
|
|
86
|
+
t && /* @__PURE__ */ e.jsx("h3", { className: u("font-medium", r), children: t }),
|
|
87
87
|
/* @__PURE__ */ e.jsx(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
90
|
className: u(
|
|
91
91
|
a && "col-start-2",
|
|
92
|
-
!
|
|
93
|
-
|
|
92
|
+
!t && a && "row-start-1",
|
|
93
|
+
c,
|
|
94
94
|
"overflow-x-auto"
|
|
95
95
|
),
|
|
96
96
|
children: n
|
|
@@ -100,70 +100,73 @@ const K = {
|
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
102
|
}, V = async ({
|
|
103
|
-
search:
|
|
103
|
+
search: o,
|
|
104
104
|
options: n,
|
|
105
|
-
auth:
|
|
106
|
-
context:
|
|
105
|
+
auth: t,
|
|
106
|
+
context: s
|
|
107
107
|
}) => {
|
|
108
|
-
const a = n.maxResults ?? 10,
|
|
109
|
-
search:
|
|
110
|
-
transformFn:
|
|
111
|
-
auth:
|
|
112
|
-
context:
|
|
108
|
+
const a = n.maxResults ?? 10, l = n.transformResults ?? (() => !0), i = [], d = Y({
|
|
109
|
+
search: o,
|
|
110
|
+
transformFn: l,
|
|
111
|
+
auth: t,
|
|
112
|
+
context: s
|
|
113
113
|
});
|
|
114
|
-
for await (const
|
|
115
|
-
if (
|
|
116
|
-
return
|
|
114
|
+
for await (const r of d)
|
|
115
|
+
if (i.push(r), i.length >= a) break;
|
|
116
|
+
return i;
|
|
117
117
|
};
|
|
118
118
|
async function* Y({
|
|
119
|
-
search:
|
|
119
|
+
search: o,
|
|
120
120
|
transformFn: n,
|
|
121
|
-
auth:
|
|
122
|
-
context:
|
|
121
|
+
auth: t,
|
|
122
|
+
context: s
|
|
123
123
|
}) {
|
|
124
|
-
let
|
|
125
|
-
for (;
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
let l = 0;
|
|
125
|
+
for (; l < o.results.length; ) {
|
|
126
|
+
const i = o.results.slice(
|
|
127
|
+
l,
|
|
128
|
+
l + 5
|
|
129
129
|
);
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
for (const
|
|
133
|
-
const
|
|
134
|
-
|
|
130
|
+
l += i.length;
|
|
131
|
+
const d = await Promise.all(i.map((r) => r.data()));
|
|
132
|
+
for (const r of d) {
|
|
133
|
+
const c = n({ result: r, auth: t, context: s });
|
|
134
|
+
c !== !1 && (c === !0 || c == null ? yield r : yield c);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
const Q = (
|
|
139
|
-
const
|
|
140
|
-
(a,
|
|
138
|
+
const Q = (o, n) => {
|
|
139
|
+
const t = o.weighted_locations.reduce(
|
|
140
|
+
(a, l) => a + l.balanced_score,
|
|
141
141
|
0
|
|
142
142
|
);
|
|
143
143
|
return n.weighted_locations.reduce(
|
|
144
|
-
(a,
|
|
144
|
+
(a, l) => a + l.balanced_score,
|
|
145
145
|
0
|
|
146
|
-
) -
|
|
147
|
-
}, y = "cursor-pointer border border-transparent data-[selected=true]:border-border",
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
) - t;
|
|
147
|
+
}, y = "cursor-pointer border border-transparent data-[selected=true]:border-border", W = ({
|
|
148
|
+
basePath: o,
|
|
149
|
+
searchResults: n,
|
|
150
|
+
searchTerm: t,
|
|
151
|
+
onClose: s,
|
|
152
|
+
maxSubResults: a = 4
|
|
152
153
|
}) => {
|
|
153
|
-
const
|
|
154
|
-
|
|
154
|
+
const l = H(), i = S(null);
|
|
155
|
+
T(() => {
|
|
155
156
|
requestIdleCallback(() => {
|
|
156
|
-
|
|
157
|
+
i.current?.scrollTo({ top: 0 });
|
|
157
158
|
});
|
|
158
|
-
}, [
|
|
159
|
-
|
|
159
|
+
}, [t]);
|
|
160
|
+
const d = (r) => o && r.startsWith(o) ? k(r.slice(o.length)) : r;
|
|
161
|
+
return /* @__PURE__ */ e.jsxs($, { className: "max-h-[450px]", ref: i, children: [
|
|
162
|
+
t && n.length > 0 && /* @__PURE__ */ e.jsx(
|
|
160
163
|
f,
|
|
161
164
|
{
|
|
162
165
|
className: "text-sm text-muted-foreground",
|
|
163
|
-
heading: `${
|
|
166
|
+
heading: `${n.length} results for "${t}"`
|
|
164
167
|
}
|
|
165
168
|
),
|
|
166
|
-
|
|
169
|
+
t && n.map((r) => /* @__PURE__ */ e.jsxs(
|
|
167
170
|
f,
|
|
168
171
|
{
|
|
169
172
|
children: [
|
|
@@ -174,35 +177,35 @@ const Q = (t, n) => {
|
|
|
174
177
|
value: `${r.meta.title}-${r.url}`,
|
|
175
178
|
className: y,
|
|
176
179
|
onSelect: () => {
|
|
177
|
-
|
|
180
|
+
l(d(r.url)), s();
|
|
178
181
|
},
|
|
179
|
-
children: /* @__PURE__ */ e.jsxs(p, { to: r.url, children: [
|
|
182
|
+
children: /* @__PURE__ */ e.jsxs(p, { to: d(r.url), children: [
|
|
180
183
|
r.meta.section === "openapi" ? /* @__PURE__ */ e.jsx(A, {}) : /* @__PURE__ */ e.jsx(P, {}),
|
|
181
184
|
r.meta.title
|
|
182
185
|
] })
|
|
183
186
|
}
|
|
184
187
|
),
|
|
185
|
-
r.sub_results.sort(Q).slice(0,
|
|
188
|
+
r.sub_results.sort(Q).slice(0, a).map((c) => /* @__PURE__ */ e.jsx(
|
|
186
189
|
h,
|
|
187
190
|
{
|
|
188
191
|
asChild: !0,
|
|
189
|
-
value: `sub-${r.meta.title}-${
|
|
192
|
+
value: `sub-${r.meta.title}-${c.url}`,
|
|
190
193
|
className: y,
|
|
191
194
|
onSelect: () => {
|
|
192
|
-
|
|
195
|
+
l(d(c.url)), s();
|
|
193
196
|
},
|
|
194
|
-
children: /* @__PURE__ */ e.jsx(p, { to:
|
|
195
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-bold", children:
|
|
197
|
+
children: /* @__PURE__ */ e.jsx(p, { to: d(c.url), onClick: s, children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-start gap-2 ms-2.5 ps-5 border-l border-muted-foreground/50", children: [
|
|
198
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-bold", children: c.title }),
|
|
196
199
|
/* @__PURE__ */ e.jsx(
|
|
197
200
|
"span",
|
|
198
201
|
{
|
|
199
202
|
className: "text-[13px] [&_mark]:bg-primary [&_mark]:text-primary-foreground",
|
|
200
|
-
dangerouslySetInnerHTML: { __html:
|
|
203
|
+
dangerouslySetInnerHTML: { __html: c.excerpt }
|
|
201
204
|
}
|
|
202
205
|
)
|
|
203
206
|
] }) })
|
|
204
207
|
},
|
|
205
|
-
`sub-${r.meta.title}-${
|
|
208
|
+
`sub-${r.meta.title}-${c.url}`
|
|
206
209
|
))
|
|
207
210
|
]
|
|
208
211
|
},
|
|
@@ -218,76 +221,76 @@ const Q = (t, n) => {
|
|
|
218
221
|
termSimilarity: 1.2,
|
|
219
222
|
// Slightly lower than default because API docs might have legitimate repetition of terms
|
|
220
223
|
termSaturation: 1.2
|
|
221
|
-
},
|
|
224
|
+
}, Z = (o) => import(
|
|
222
225
|
/* @vite-ignore */
|
|
223
|
-
|
|
224
|
-
),
|
|
226
|
+
k(o, "/pagefind/pagefind.js")
|
|
227
|
+
), J = (o) => {
|
|
225
228
|
const {
|
|
226
229
|
options: { basePath: n }
|
|
227
|
-
} =
|
|
228
|
-
queryKey: ["pagefind",
|
|
230
|
+
} = j(), { data: t, ...s } = C({
|
|
231
|
+
queryKey: ["pagefind", o.ranking],
|
|
229
232
|
retry: !1,
|
|
230
233
|
queryFn: async () => {
|
|
231
|
-
const a = await
|
|
234
|
+
const a = await Z(n);
|
|
232
235
|
return await a.init(), await a.options({
|
|
233
236
|
ranking: {
|
|
234
|
-
termFrequency:
|
|
235
|
-
pageLength:
|
|
236
|
-
termSimilarity:
|
|
237
|
-
termSaturation:
|
|
237
|
+
termFrequency: o.ranking?.termFrequency ?? x.termFrequency,
|
|
238
|
+
pageLength: o.ranking?.pageLength ?? x.pageLength,
|
|
239
|
+
termSimilarity: o.ranking?.termSimilarity ?? x.termSimilarity,
|
|
240
|
+
termSaturation: o.ranking?.termSaturation ?? x.termSaturation
|
|
238
241
|
}
|
|
239
242
|
}), a;
|
|
240
243
|
},
|
|
241
244
|
enabled: typeof window < "u"
|
|
242
245
|
});
|
|
243
|
-
return
|
|
246
|
+
return s.isError && s.error.message !== "NOT_BUILT_YET" && console.error(s.error), { ...s, pagefind: t };
|
|
244
247
|
}, X = ({
|
|
245
|
-
isOpen:
|
|
248
|
+
isOpen: o,
|
|
246
249
|
onClose: n,
|
|
247
|
-
options:
|
|
250
|
+
options: t
|
|
248
251
|
}) => {
|
|
249
|
-
const { pagefind:
|
|
250
|
-
queryKey: ["pagefind-search",
|
|
252
|
+
const { pagefind: s, error: a, isError: l } = J(t), [i, d] = E(""), r = N(), c = j(), m = S(null), { data: _ } = C({
|
|
253
|
+
queryKey: ["pagefind-search", i, r.isAuthenticated],
|
|
251
254
|
queryFn: async () => {
|
|
252
|
-
const
|
|
253
|
-
return g ? V({ search: g, options:
|
|
255
|
+
const w = r.isAuthenticated ? void 0 : { not: { section: G } }, g = await s?.search(i, { filters: w });
|
|
256
|
+
return g ? V({ search: g, options: t, auth: r, context: c }) : [];
|
|
254
257
|
},
|
|
255
|
-
placeholderData:
|
|
256
|
-
enabled: !!
|
|
258
|
+
placeholderData: L,
|
|
259
|
+
enabled: !!s && !!i
|
|
257
260
|
});
|
|
258
261
|
return /* @__PURE__ */ e.jsxs(
|
|
259
262
|
D,
|
|
260
263
|
{
|
|
261
264
|
command: { shouldFilter: !1 },
|
|
262
265
|
content: { className: "max-w-[750px]" },
|
|
263
|
-
open:
|
|
266
|
+
open: o,
|
|
264
267
|
onOpenChange: n,
|
|
265
268
|
children: [
|
|
266
|
-
/* @__PURE__ */ e.jsx(
|
|
269
|
+
/* @__PURE__ */ e.jsx(I, { children: /* @__PURE__ */ e.jsx(U, { children: "Search" }) }),
|
|
267
270
|
/* @__PURE__ */ e.jsx(
|
|
268
|
-
|
|
271
|
+
B,
|
|
269
272
|
{
|
|
270
273
|
ref: m,
|
|
271
274
|
placeholder: "Search...",
|
|
272
|
-
value:
|
|
273
|
-
onValueChange:
|
|
274
|
-
disabled:
|
|
275
|
+
value: i,
|
|
276
|
+
onValueChange: d,
|
|
277
|
+
disabled: l
|
|
275
278
|
}
|
|
276
279
|
),
|
|
277
|
-
/* @__PURE__ */ e.jsx(
|
|
280
|
+
/* @__PURE__ */ e.jsx(O, { children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
278
281
|
"No results found.",
|
|
279
282
|
/* @__PURE__ */ e.jsx(
|
|
280
283
|
R,
|
|
281
284
|
{
|
|
282
285
|
variant: "link",
|
|
283
286
|
onClick: () => {
|
|
284
|
-
|
|
287
|
+
d(""), m.current?.focus();
|
|
285
288
|
},
|
|
286
289
|
children: "Clear search"
|
|
287
290
|
}
|
|
288
291
|
)
|
|
289
292
|
] }) : "Start typing to search" }),
|
|
290
|
-
|
|
293
|
+
l ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-sm", children: a.message === "NOT_BUILT_YET" ? /* @__PURE__ */ e.jsxs(M, { type: "info", children: [
|
|
291
294
|
"Search is currently not available in development mode by default.",
|
|
292
295
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
293
296
|
"To still use search in development, run ",
|
|
@@ -300,19 +303,20 @@ const Q = (t, n) => {
|
|
|
300
303
|
/* @__PURE__ */ e.jsx("code", { children: "public" }),
|
|
301
304
|
" directory."
|
|
302
305
|
] }) : "An error occurred while loading search." }) : /* @__PURE__ */ e.jsx(
|
|
303
|
-
|
|
306
|
+
W,
|
|
304
307
|
{
|
|
305
|
-
|
|
306
|
-
|
|
308
|
+
basePath: c.options.basePath,
|
|
309
|
+
searchResults: _ ?? [],
|
|
310
|
+
searchTerm: i,
|
|
307
311
|
onClose: n,
|
|
308
|
-
maxSubResults:
|
|
312
|
+
maxSubResults: t.maxSubResults
|
|
309
313
|
}
|
|
310
314
|
)
|
|
311
315
|
]
|
|
312
316
|
}
|
|
313
317
|
);
|
|
314
|
-
}, ue = (
|
|
315
|
-
renderSearch: ({ isOpen: n, onClose:
|
|
318
|
+
}, ue = (o) => ({
|
|
319
|
+
renderSearch: ({ isOpen: n, onClose: t }) => /* @__PURE__ */ e.jsx(v, { children: /* @__PURE__ */ e.jsx(X, { isOpen: n, onClose: t, options: o }) })
|
|
316
320
|
});
|
|
317
321
|
export {
|
|
318
322
|
ue as pagefindSearchPlugin
|