zudoku 0.3.0-dev.33 → 0.3.0-dev.35
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 +3 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.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/{index.esm-CPEExBJE.js → AnchorLink-DCzimaMt.js} +166 -156
- package/lib/AnchorLink-DCzimaMt.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-CL8KPvJN.js → Markdown-kde-UTpz.js} +3 -3
- package/lib/{Markdown-CL8KPvJN.js.map → Markdown-kde-UTpz.js.map} +1 -1
- package/lib/{MdxComponents-Ev_hBHb2.js → MdxComponents-BZ-Y_6jI.js} +8 -8
- package/lib/{MdxComponents-Ev_hBHb2.js.map → MdxComponents-BZ-Y_6jI.js.map} +1 -1
- package/lib/{MdxPage-Z3HKNTrj.js → MdxPage-CGTgSCJL.js} +82 -88
- package/lib/MdxPage-CGTgSCJL.js.map +1 -0
- package/lib/{OperationList-DfkWNe8Y.js → OperationList-BDAtLdf9.js} +1693 -1862
- package/lib/OperationList-BDAtLdf9.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-DIOQWPp3.js +4571 -0
- package/lib/Select-DIOQWPp3.js.map +1 -0
- package/lib/Spinner-B9MAj2Pw.js +182 -0
- package/lib/Spinner-B9MAj2Pw.js.map +1 -0
- package/lib/{hook-CTmJ6CWq.js → hook-D1DiFbcT.js} +3 -3
- package/lib/{hook-CTmJ6CWq.js.map → hook-D1DiFbcT.js.map} +1 -1
- package/lib/index-BB2EBBgh.js +412 -0
- package/lib/index-BB2EBBgh.js.map +1 -0
- package/lib/{index-BjSy8IQO.js → index-CdZQPXUQ.js} +6 -6
- package/lib/{index-BjSy8IQO.js.map → index-CdZQPXUQ.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 +548 -280
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +99 -111
- 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 +1 -1
- package/src/app/main.tsx +1 -2
- package/src/lib/components/index.ts +2 -0
- package/lib/DevPortalProvider-BlxLX6GG.js.map +0 -1
- package/lib/MdxPage-Z3HKNTrj.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/index-BdWBDosx.js +0 -74
- package/lib/index-BdWBDosx.js.map +0 -1
- package/lib/index.esm-CPEExBJE.js.map +0 -1
- package/lib/mutation-91kw0lHb.js +0 -208
- package/lib/mutation-91kw0lHb.js.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { m as u } from "./router-CcYTwKjf.js";
|
|
2
|
+
const l = (...t) => {
|
|
3
|
+
const i = t.filter((r) => !!r).map((r) => r.replace(/(^\/+|\/+$)/g, "")).join("/");
|
|
4
|
+
return i ? `/${i}` : "";
|
|
5
|
+
}, s = (t, i, r, o = []) => {
|
|
6
|
+
const e = a(t) ? l(r, t.path) : r, n = i(t, e, o);
|
|
7
|
+
if (n !== void 0) return n;
|
|
8
|
+
if ("children" in t && t.children) {
|
|
9
|
+
const h = [...o, t];
|
|
10
|
+
for (const f of t.children) {
|
|
11
|
+
const c = s(
|
|
12
|
+
f,
|
|
13
|
+
i,
|
|
14
|
+
e,
|
|
15
|
+
h
|
|
16
|
+
);
|
|
17
|
+
if (c !== void 0) return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}, g = (t, i) => {
|
|
21
|
+
if (t.categories)
|
|
22
|
+
for (const r of t.categories) {
|
|
23
|
+
const o = s(r, i, t.path);
|
|
24
|
+
if (o !== void 0) return o;
|
|
25
|
+
}
|
|
26
|
+
}, a = (t) => "path" in t, m = (t) => "href" in t, d = (t, i, r) => !!s(
|
|
27
|
+
t,
|
|
28
|
+
(o, e) => {
|
|
29
|
+
if (a(o) && u(e, i))
|
|
30
|
+
return !0;
|
|
31
|
+
},
|
|
32
|
+
r
|
|
33
|
+
);
|
|
34
|
+
export {
|
|
35
|
+
m as a,
|
|
36
|
+
d as c,
|
|
37
|
+
a as i,
|
|
38
|
+
l as j,
|
|
39
|
+
g as t
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=util-CYBrkBUo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util-CYBrkBUo.js","sources":["../src/lib/util/joinPath.tsx","../src/lib/util/traverseNavigation.ts","../src/lib/components/navigation/util.ts"],"sourcesContent":["export const joinPath = (\n ...parts: Array<string | null | undefined | boolean>\n) => {\n const cleanPath = parts\n .filter((part): part is string => Boolean(part))\n .map((part) => part.replace(/(^\\/+|\\/+$)/g, \"\")) // Strip leading and trailing slashes\n .join(\"/\");\n\n return cleanPath ? `/${cleanPath}` : \"\";\n};\n","import { isPathItem } from \"../components/navigation/util.js\";\nimport type {\n NavigationCategory,\n NavigationCategoryItem,\n NavigationItem,\n} from \"../core/DevPortalContext.js\";\nimport { joinPath } from \"./joinPath.js\";\n\nexport type NavigationNode = NavigationCategoryItem | NavigationCategory;\ntype Callback<T> = (\n node: NavigationNode,\n fullPath: string,\n parentNodes: NavigationNode[],\n) => T | undefined;\n\nexport const traverseNavigationNode = <T>(\n node: NavigationNode,\n callback: Callback<T>,\n parentPath: string,\n parentNodes: NavigationNode[] = [],\n): T | undefined => {\n const newPath = isPathItem(node)\n ? joinPath(parentPath, node.path)\n : parentPath;\n const result = callback(node, newPath, parentNodes);\n\n if (result !== undefined) return result;\n\n if (\"children\" in node && node.children) {\n const newParentNodes = [...parentNodes, node];\n for (const child of node.children) {\n const childResult = traverseNavigationNode(\n child,\n callback,\n newPath,\n newParentNodes,\n );\n if (childResult !== undefined) return childResult;\n }\n }\n return undefined;\n};\n\nexport const traverseNavigation = <T>(\n navItem: NavigationItem,\n callback: Callback<T>,\n): T | undefined => {\n if (navItem.categories) {\n for (const category of navItem.categories) {\n const result = traverseNavigationNode(category, callback, navItem.path);\n if (result !== undefined) return result;\n }\n }\n return undefined;\n};\n","import { matchPath } from \"react-router-dom\";\nimport type {\n HrefNavigationCategoryItem,\n PathNavigationCategoryItem,\n} from \"../../core/DevPortalContext.js\";\nimport {\n traverseNavigationNode,\n type NavigationNode,\n} from \"../../util/traverseNavigation.js\";\n\nexport const isPathItem = (\n item: NavigationNode,\n): item is PathNavigationCategoryItem => \"path\" in item;\n\nexport const isLinkItem = (\n item: NavigationNode,\n): item is HrefNavigationCategoryItem => \"href\" in item;\n\n/**\n * Recursively checks if the current item or any of its children are active.\n */\nexport const checkHasActiveItem = (\n item: NavigationNode,\n locationPath: string,\n basePath: string,\n) => {\n return Boolean(\n traverseNavigationNode(\n item,\n (node, fullPath) => {\n if (isPathItem(node) && matchPath(fullPath, locationPath)) {\n return true;\n }\n },\n basePath,\n ),\n );\n};\n"],"names":["joinPath","parts","cleanPath","part","traverseNavigationNode","node","callback","parentPath","parentNodes","newPath","isPathItem","result","newParentNodes","child","childResult","traverseNavigation","navItem","category","item","isLinkItem","checkHasActiveItem","locationPath","basePath","fullPath","matchPath"],"mappings":";AAAa,MAAAA,IAAW,IACnBC,MACA;AACH,QAAMC,IAAYD,EACf,OAAO,CAACE,MAAyB,EAAQA,CAAK,EAC9C,IAAI,CAACA,MAASA,EAAK,QAAQ,gBAAgB,EAAE,CAAC,EAC9C,KAAK,GAAG;AAEJ,SAAAD,IAAY,IAAIA,CAAS,KAAK;AACvC,GCMaE,IAAyB,CACpCC,GACAC,GACAC,GACAC,IAAgC,CAAA,MACd;AACZ,QAAAC,IAAUC,EAAWL,CAAI,IAC3BL,EAASO,GAAYF,EAAK,IAAI,IAC9BE,GACEI,IAASL,EAASD,GAAMI,GAASD,CAAW;AAE9C,MAAAG,MAAW,OAAkB,QAAAA;AAE7B,MAAA,cAAcN,KAAQA,EAAK,UAAU;AACvC,UAAMO,IAAiB,CAAC,GAAGJ,GAAaH,CAAI;AACjC,eAAAQ,KAASR,EAAK,UAAU;AACjC,YAAMS,IAAcV;AAAA,QAClBS;AAAA,QACAP;AAAA,QACAG;AAAA,QACAG;AAAA,MAAA;AAEE,UAAAE,MAAgB,OAAkB,QAAAA;AAAA,IACxC;AAAA,EACF;AAEF,GAEaC,IAAqB,CAChCC,GACAV,MACkB;AAClB,MAAIU,EAAQ;AACC,eAAAC,KAAYD,EAAQ,YAAY;AACzC,YAAML,IAASP,EAAuBa,GAAUX,GAAUU,EAAQ,IAAI;AAClE,UAAAL,MAAW,OAAkB,QAAAA;AAAA,IACnC;AAGJ,GC5CaD,IAAa,CACxBQ,MACuC,UAAUA,GAEtCC,IAAa,CACxBD,MACuC,UAAUA,GAKtCE,IAAqB,CAChCF,GACAG,GACAC,MAEO,EACLlB;AAAA,EACEc;AAAA,EACA,CAACb,GAAMkB,MAAa;AAClB,QAAIb,EAAWL,CAAI,KAAKmB,EAAUD,GAAUF,CAAY;AAC/C,aAAA;AAAA,EAEX;AAAA,EACAC;AACF;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Re = Object.defineProperty;
|
|
2
2
|
var xe = (e, t, n) => t in e ? Re(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var S = (e, t, n) => xe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import {
|
|
4
|
+
import { a as Pe, j as T } from "./jsx-runtime-Bt86M5tA.js";
|
|
5
5
|
import { c as Le, g as Ue } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
6
6
|
import { useRef as Ce, useState as je, useEffect as ze } from "react";
|
|
7
7
|
import { u as re } from "./state-Ds_OxRHP.js";
|