zudoku 0.3.0-dev.131 → 0.3.0-dev.133

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.
Files changed (53) hide show
  1. package/dist/app/zudoku-manifest.d.ts +1 -0
  2. package/dist/app/zudoku-manifest.js +20 -0
  3. package/dist/app/zudoku-manifest.js.map +1 -0
  4. package/dist/lib/authentication/Callback.d.ts +3 -0
  5. package/dist/lib/authentication/Callback.js +34 -0
  6. package/dist/lib/authentication/Callback.js.map +1 -0
  7. package/dist/lib/components/Input.d.ts +5 -0
  8. package/dist/lib/components/Input.js +9 -0
  9. package/dist/lib/components/Input.js.map +1 -0
  10. package/dist/lib/components/context/DevPortalProvider.d.ts +9 -0
  11. package/dist/lib/components/context/DevPortalProvider.js +39 -0
  12. package/dist/lib/components/context/DevPortalProvider.js.map +1 -0
  13. package/dist/lib/components/navigation/SideNavigation.d.ts +1 -0
  14. package/dist/lib/components/navigation/SideNavigation.js +11 -0
  15. package/dist/lib/components/navigation/SideNavigation.js.map +1 -0
  16. package/dist/lib/components/navigation/SideNavigationCategory.d.ts +4 -0
  17. package/dist/lib/components/navigation/SideNavigationCategory.js +26 -0
  18. package/dist/lib/components/navigation/SideNavigationCategory.js.map +1 -0
  19. package/dist/lib/components/navigation/SideNavigationItem.d.ts +13 -0
  20. package/dist/lib/components/navigation/SideNavigationItem.js +44 -0
  21. package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -0
  22. package/dist/lib/components/navigation/SideNavigationWrapper.d.ts +6 -0
  23. package/dist/lib/components/navigation/SideNavigationWrapper.js +7 -0
  24. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +1 -0
  25. package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +6 -0
  26. package/dist/lib/components/navigation/useNavigationCollapsibleState.js +16 -0
  27. package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +1 -0
  28. package/dist/lib/components/navigation/util.d.ts +8 -0
  29. package/dist/lib/components/navigation/util.js +15 -0
  30. package/dist/lib/components/navigation/util.js.map +1 -0
  31. package/dist/lib/plugins/openapi/MethodBadge.d.ts +13 -0
  32. package/dist/lib/plugins/openapi/MethodBadge.js +26 -0
  33. package/dist/lib/plugins/openapi/MethodBadge.js.map +1 -0
  34. package/dist/lib/plugins/openapi/SchemaListView.d.ts +7 -0
  35. package/dist/lib/plugins/openapi/SchemaListView.js +27 -0
  36. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -0
  37. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +8 -0
  38. package/dist/lib/plugins/openapi/SchemaListViewItem.js +25 -0
  39. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  40. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  41. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  42. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  43. package/dist/lib/ui/button-variants.d.ts +4 -0
  44. package/dist/lib/ui/button-variants.js +24 -0
  45. package/dist/lib/ui/button-variants.js.map +1 -0
  46. package/dist/lib/util/traverseNavigation.d.ts +6 -0
  47. package/dist/lib/util/traverseNavigation.js +30 -0
  48. package/dist/lib/util/traverseNavigation.js.map +1 -0
  49. package/dist/vite/plugin-html.d.ts +3 -0
  50. package/dist/vite/plugin-html.js +39 -0
  51. package/dist/vite/plugin-html.js.map +1 -0
  52. package/package.json +99 -79
  53. package/LICENSE.md +0 -21
@@ -0,0 +1 @@
1
+ export declare const paths: string[];
@@ -0,0 +1,20 @@
1
+ import config from "virtual:zudoku-config";
2
+ import { getRoutesByConfig } from "./main.js";
3
+ const routes = getRoutesByConfig(config);
4
+ const flattenPaths = (routes, basePath = "") => {
5
+ return routes.reduce((acc, route) => {
6
+ if (route.path) {
7
+ const fullPath = `${basePath}/${route.path}`.replace(/\/+/g, "/");
8
+ route.path !== "/" && acc.push(fullPath);
9
+ if (route.children) {
10
+ acc = acc.concat(flattenPaths(route.children, fullPath));
11
+ }
12
+ }
13
+ else if (route.children) {
14
+ acc = acc.concat(flattenPaths(route.children, basePath));
15
+ }
16
+ return acc;
17
+ }, []);
18
+ };
19
+ export const paths = flattenPaths(routes);
20
+ //# sourceMappingURL=zudoku-manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zudoku-manifest.js","sourceRoot":"","sources":["../../src/app/zudoku-manifest.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAEzC,MAAM,YAAY,GAAG,CAAC,MAAqB,EAAE,QAAQ,GAAG,EAAE,EAAE,EAAE;IAC5D,OAAO,MAAM,CAAC,MAAM,CAAW,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QAC5C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YACf,MAAM,QAAQ,GAAG,GAAG,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAClE,KAAK,CAAC,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;gBACnB,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;aAAM,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC1B,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function Callback({ handleCallback, }: {
2
+ handleCallback: () => Promise<void>;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { useNavigate } from "react-router-dom";
4
+ import { OAuthAuthorizationError } from "./errors.js";
5
+ export function Callback({ handleCallback, }) {
6
+ const didInitialize = useRef(false);
7
+ const [error, setError] = useState(undefined);
8
+ const navigate = useNavigate();
9
+ // This should not use react query, etc. It is important that it
10
+ // only ever runs once. The didInitialize ref keeps it from double
11
+ // initializing in dev mode with ReactStrict enabled.
12
+ useEffect(() => {
13
+ if (didInitialize.current) {
14
+ return;
15
+ }
16
+ didInitialize.current = true;
17
+ handleCallback()
18
+ .then(() => {
19
+ // TODO: Handle return url, state, etc
20
+ navigate("/");
21
+ })
22
+ .catch((err) => {
23
+ setError(err);
24
+ });
25
+ }, []);
26
+ if (error) {
27
+ if (error instanceof OAuthAuthorizationError) {
28
+ return (_jsxs("div", { children: [_jsx("h2", { children: "Error" }), _jsxs("pre", { children: [error.error.error, error.error.error_description, error.error.error_uri] })] }));
29
+ }
30
+ return (_jsxs("div", { children: [_jsx("h2", { children: "Error" }), _jsxs("pre", { children: [error.message, error.stack] })] }));
31
+ }
32
+ return _jsx("div", { children: "Loading..." });
33
+ }
34
+ //# sourceMappingURL=Callback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Callback.js","sourceRoot":"","sources":["../../../src/lib/authentication/Callback.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,UAAU,QAAQ,CAAC,EACvB,cAAc,GAGf;IACC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAoB,SAAS,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,gEAAgE;IAChE,kEAAkE;IAClE,qDAAqD;IACrD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;YAC1B,OAAO;QACT,CAAC;QACD,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC;QAC7B,cAAc,EAAE;aACb,IAAI,CAAC,GAAG,EAAE;YACT,sCAAsC;YACtC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,QAAQ,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,KAAK,YAAY,uBAAuB,EAAE,CAAC;YAC7C,OAAO,CACL,0BACE,iCAAc,EACd,0BACG,KAAK,CAAC,KAAK,CAAC,KAAK,EAEjB,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAE7B,KAAK,CAAC,KAAK,CAAC,SAAS,IAClB,IACF,CACP,CAAC;QACJ,CAAC;QACD,OAAO,CACL,0BACE,iCAAc,EACd,0BACG,KAAK,CAAC,OAAO,EAEb,KAAK,CAAC,KAAK,IACR,IACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,uCAAqB,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ }
4
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { Input };
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../util/cn.js";
4
+ const Input = React.forwardRef(({ className, type, ...props }, ref) => {
5
+ return (_jsx("input", { type: type, className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props }));
6
+ });
7
+ Input.displayName = "Input";
8
+ export { Input };
9
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/lib/components/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAKnC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrC,OAAO,CACL,gBACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,uUAAuU,EACvU,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { DevPortalContext } from "../../core/DevPortalContext.js";
2
+ export declare const DevPortalProvider: import("react").Provider<DevPortalContext | undefined>;
3
+ export declare const useDevPortal: () => DevPortalContext;
4
+ export declare const useApiIdentities: () => import("@tanstack/react-query").UseQueryResult<import("../../core/DevPortalContext.js").ApiIdentity[], Error>;
5
+ export declare const useTopNavigationItem: () => import("../../core/DevPortalContext.js").NavigationItem | undefined;
6
+ export declare const useNavigation: () => import("@tanstack/react-query").UseSuspenseQueryResult<{
7
+ items: import("../../core/DevPortalContext.js").NavigationCategory[];
8
+ currentTopNavItem: import("../../core/DevPortalContext.js").NavigationItem | undefined;
9
+ }, Error>;
@@ -0,0 +1,39 @@
1
+ import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
2
+ import { createContext, useContext } from "react";
3
+ import { matchPath, useLocation } from "react-router-dom";
4
+ const DevPortalReactContext = createContext(undefined);
5
+ export const DevPortalProvider = DevPortalReactContext.Provider;
6
+ export const useDevPortal = () => {
7
+ const context = useContext(DevPortalReactContext);
8
+ if (!context) {
9
+ throw new Error("useDevPortal must be used within a DevPortalProvider.");
10
+ }
11
+ return context;
12
+ };
13
+ export const useApiIdentities = () => {
14
+ const { getApiIdentities } = useDevPortal();
15
+ return useQuery({
16
+ queryFn: getApiIdentities,
17
+ queryKey: ["api-identities"],
18
+ });
19
+ };
20
+ export const useTopNavigationItem = () => {
21
+ const { navigation } = useDevPortal();
22
+ const location = useLocation();
23
+ return navigation.find((item) => matchPath({ path: item.path, end: false }, location.pathname));
24
+ };
25
+ export const useNavigation = () => {
26
+ const { getNavigation } = useDevPortal();
27
+ const navItem = useTopNavigationItem();
28
+ const path = navItem?.path ?? "";
29
+ return useSuspenseQuery({
30
+ queryFn: async () => {
31
+ return {
32
+ items: [...(navItem?.categories ?? []), ...(await getNavigation(path))],
33
+ currentTopNavItem: navItem,
34
+ };
35
+ },
36
+ queryKey: ["navigation", path],
37
+ });
38
+ };
39
+ //# sourceMappingURL=DevPortalProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevPortalProvider.js","sourceRoot":"","sources":["../../../../src/lib/components/context/DevPortalProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAA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AAO,gBAAgB,CAAC;QACtB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,OAAO;gBACL,KAAK,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;gBACvE,iBAAiB,EAAE,OAAO;aAC3B,CAAC;QACJ,CAAC;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;KAC/B,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const SideNavigation: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef } from "react";
3
+ import { useNavigation } from "../context/DevPortalProvider.js";
4
+ import { SideNavigationCategory } from "./SideNavigationCategory.js";
5
+ import { SideNavigationWrapper } from "./SideNavigationWrapper.js";
6
+ export const SideNavigation = () => {
7
+ const navRef = useRef(null);
8
+ const navigation = useNavigation();
9
+ return (_jsx(SideNavigationWrapper, { ref: navRef, pushMainContent: navigation.data.items.length > 0, children: navigation.data.items.map((category) => (_jsx(SideNavigationCategory, { category: category }, category.label))) }));
10
+ };
11
+ //# sourceMappingURL=SideNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavigation.js","sourceRoot":"","sources":["../../../../src/lib/components/navigation/SideNavigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,MAAM,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,OAAO,CACL,KAAC,qBAAqB,IACpB,GAAG,EAAE,MAAM,EACX,eAAe,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,YAEhD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CACvC,KAAC,sBAAsB,IAAsB,QAAQ,EAAE,QAAQ,IAAlC,QAAQ,CAAC,KAAK,CAAwB,CACpE,CAAC,GACoB,CACzB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { NavigationCategory } from "../../core/DevPortalContext.js";
2
+ export declare const SideNavigationCategory: ({ category, }: {
3
+ category: NavigationCategory;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as Collapsible from "@radix-ui/react-collapsible";
3
+ import { ChevronRightIcon } from "lucide-react";
4
+ import { useLocation } from "react-router-dom";
5
+ import { cn } from "../../util/cn.js";
6
+ import { joinPath } from "../../util/joinPath.js";
7
+ import { useTopNavigationItem } from "../context/DevPortalProvider.js";
8
+ import { useViewportAnchor } from "../context/ViewportAnchorContext.js";
9
+ import { SideNavigationItem } from "./SideNavigationItem.js";
10
+ import { useNavigationCollapsibleState } from "./useNavigationCollapsibleState.js";
11
+ import { checkHasActiveItem, isPathItem } from "./util.js";
12
+ export const SideNavigationCategory = ({ category, }) => {
13
+ const { activeAnchor } = useViewportAnchor();
14
+ const navItem = useTopNavigationItem();
15
+ const location = useLocation();
16
+ const isCollapsible = category.collapsible ?? true;
17
+ const [isOpen, setIsOpen] = useNavigationCollapsibleState({
18
+ item: category,
19
+ path: navItem?.path ?? "",
20
+ defaultOpen: () => !isCollapsible ||
21
+ category.expanded ||
22
+ checkHasActiveItem(category, location.pathname, navItem?.path ?? ""),
23
+ });
24
+ return (_jsxs(Collapsible.Root, { open: isOpen, onOpenChange: () => setIsOpen((prev) => !prev), children: [category.label.length > 0 ? (_jsx(Collapsible.Trigger, { asChild: isCollapsible, disabled: !isCollapsible, children: _jsxs("h5", { className: cn("flex group items-center justify-between cursor-pointer font-semibold text-foreground/90 px-[--padding-nav-item] py-1.5 rounded-lg transition-colors duration-300 -mx-[--padding-nav-item]", isCollapsible ? "hover:bg-accent" : "cursor-auto"), children: [category.label, isCollapsible && (_jsx(ChevronRightIcon, { className: "group-data-[state=open]:rotate-90 transition", size: 16 }))] }) })) : ("Endpoints"), _jsx(Collapsible.Content, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: _jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: category.children.map((item) => (_jsx(SideNavigationItem, { category: category, item: item, activeAnchor: activeAnchor, currentTopNavItem: navItem, basePath: joinPath(navItem?.path, category.path) }, isPathItem(item) ? item.path + item.label : item.href))) }) })] }, category.label));
25
+ };
26
+ //# sourceMappingURL=SideNavigationCategory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavigationCategory.js","sourceRoot":"","sources":["../../../../src/lib/components/navigation/SideNavigationCategory.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,kBAAk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F,WAAW,CACZ,EACD,KAAC,WAAW,CAAC,OAAO,IAAC,SAAS,EAAC,6CAA6C,YAE1E,aAAI,SAAS,EAAC,8BAA8B,YACzC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC/B,KAAC,kBAAkB,IAEjB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,OAAO,EAC1B,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAL3C,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAM1D,CACH,CAAC,GACC,GACe,KAtCjB,QAAQ,CAAC,KAAK,CAuCF,CACpB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { NavigationCategory, NavigationCategoryItem, NavigationItem } from "../../core/DevPortalContext.js";
2
+ export declare const navigationListItem: (props?: ({
3
+ isActive?: boolean | null | undefined;
4
+ isMuted?: boolean | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export declare const DATA_ANCHOR_ATTR = "data-anchor";
7
+ export declare const SideNavigationItem: ({ category, item, activeAnchor, currentTopNavItem, basePath, }: {
8
+ category: NavigationCategory;
9
+ item: NavigationCategoryItem;
10
+ activeAnchor?: string;
11
+ currentTopNavItem?: NavigationItem;
12
+ basePath?: string;
13
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as Collapsible from "@radix-ui/react-collapsible";
3
+ import { cva } from "class-variance-authority";
4
+ import { ChevronRightIcon, ExternalLinkIcon } from "lucide-react";
5
+ import { NavLink, useLocation } from "react-router-dom";
6
+ import { cn } from "../../util/cn.js";
7
+ import { joinPath } from "../../util/joinPath.js";
8
+ import { AnchorLink } from "../AnchorLink.js";
9
+ import { useNavigationCollapsibleState } from "./useNavigationCollapsibleState.js";
10
+ import { checkHasActiveItem, isLinkItem, isPathItem } from "./util.js";
11
+ export const navigationListItem = cva("flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300", {
12
+ variants: {
13
+ isActive: {
14
+ true: "text-primary font-medium",
15
+ false: "text-foreground/80",
16
+ },
17
+ isMuted: {
18
+ true: "text-foreground/30",
19
+ false: "",
20
+ },
21
+ },
22
+ });
23
+ export const DATA_ANCHOR_ATTR = "data-anchor";
24
+ export const SideNavigationItem = ({ category, item, activeAnchor, currentTopNavItem, basePath = "", }) => {
25
+ const currentPath = isPathItem(item) ? joinPath(basePath, item.path) : "";
26
+ const location = useLocation();
27
+ const [isOpen, setIsOpen] = useNavigationCollapsibleState({
28
+ item,
29
+ path: currentPath,
30
+ defaultOpen: () => checkHasActiveItem(item, location.pathname, currentPath),
31
+ });
32
+ if (isLinkItem(item)) {
33
+ const classes = cn("flex items-center gap-2", navigationListItem({
34
+ isActive: item.href === location.pathname,
35
+ }));
36
+ return item.href.startsWith("http") ? (_jsxs("a", { className: classes, href: item.href, target: "_blank", rel: "noopener noreferrer", children: [item.label, _jsx(ExternalLinkIcon, { size: 14 })] })) : (_jsx(NavLink, { className: classes, to: item.href, children: item.label }));
37
+ }
38
+ const linkContent = (_jsxs("div", { className: "flex justify-between w-full", children: [_jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [item.icon, typeof item.label !== "string" ? (item.label) : (_jsx("span", { className: "truncate", children: item.label }))] }), item.children && (_jsx(ChevronRightIcon, { size: 16, className: "transition shrink-0 group-data-[state=open]:rotate-90" }))] }));
39
+ return (_jsx("li", { title: typeof item.label === "string" ? item.label : item.title, children: item.children ? (_jsxs(Collapsible.Root, { open: isOpen, onOpenChange: () => setIsOpen((prev) => !prev), className: "flex flex-col", children: [_jsx(Collapsible.Trigger, { className: cn("group text-start", navigationListItem({ isActive: false })), children: linkContent }), _jsx(Collapsible.Content, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: _jsx("ul", { className: "mt-1 border-border border-l ps-1.5", children: item.children.map((child) => (_jsx(SideNavigationItem, { category: category, item: child, activeAnchor: activeAnchor, currentTopNavItem: currentTopNavItem, basePath: currentPath }, isPathItem(child) ? child.path : child.href))) }) })] })) : item.path.startsWith("#") ? (_jsx(AnchorLink, { to: item.path, [DATA_ANCHOR_ATTR]: item.path, className: navigationListItem({
40
+ isActive: item.path.slice(1) === activeAnchor,
41
+ isMuted: item.muted,
42
+ }), children: linkContent })) : (_jsx(NavLink, { className: ({ isActive }) => navigationListItem({ isActive }), to: currentPath, children: linkContent })) }));
43
+ };
44
+ //# sourceMappingURL=SideNavigationItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavigationItem.js","sourceRoot":"","sources":["../../../../src/lib/components/navigation/SideNavigationItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAOxD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,+FAA+F,EAC/F;IACE,QA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AAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,kBAAkB,IAEjB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,KAAK,EACX,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,WAAW,IALhB,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAMhD,CACH,CAAC,GACC,GACe,IACL,CACpB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAC9B,KAAC,UAAU,IACT,EAAE,EAAE,IAAI,CAAC,IAAI,EACP,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,IAAI,EACnC,SAAS,EAAE,kBAAkB,CAAC;gBAC5B,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,YAAY;gBAC7C,OAAO,EAAE,IAAI,CAAC,KAAK;aACpB,CAAC,YAED,WAAW,GACD,CACd,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,IACN,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,EAC7D,EAAE,EAAE,WAAW,YAEd,WAAW,GACJ,CACX,GACE,CACN,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const SideNavigationWrapper: import("react").ForwardRefExoticComponent<{
2
+ pushMainContent?: boolean;
3
+ className?: string;
4
+ } & {
5
+ children?: import("react").ReactNode | undefined;
6
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cn } from "../../util/cn.js";
4
+ export const SideNavigationWrapper = forwardRef(function SideNavigation({ children, className, pushMainContent }, ref) {
5
+ return (_jsx("nav", { "data-navigation": String(pushMainContent), className: cn("peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 p-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 pt-[--padding-content-top] w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2", className), ref: ref, children: children }));
6
+ });
7
+ //# sourceMappingURL=SideNavigationWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavigationWrapper.js","sourceRoot":"","sources":["../../../../src/lib/components/navigation/SideNavigationWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAG7C,SAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,GAAG;IACrE,OAAO,CACL,iCAKmB,MAAM,CAAC,eAAe,CAAC,EACxC,SAAS,EAAE,EAAE,CACX,iOAAiO,EACjO,SAAS,CACV,EACD,GAAG,EAAE,GAAG,YAEP,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { NavigationNode } from "../../util/traverseNavigation.js";
2
+ export declare const useNavigationCollapsibleState: ({ item, defaultOpen, path, }: {
3
+ item: NavigationNode;
4
+ defaultOpen: () => boolean;
5
+ path: string;
6
+ }) => readonly [boolean, import("react").Dispatch<import("react").SetStateAction<boolean>>];
@@ -0,0 +1,16 @@
1
+ import { useEffect, useRef, useState } from "react";
2
+ import { useLocation } from "react-router-dom";
3
+ import { checkHasActiveItem } from "./util.js";
4
+ export const useNavigationCollapsibleState = ({ item, defaultOpen, path, }) => {
5
+ const [isOpen, setIsOpen] = useState(defaultOpen);
6
+ const location = useLocation();
7
+ const previousLocationPath = useRef(location.pathname);
8
+ useEffect(() => {
9
+ if (!isOpen && previousLocationPath.current !== location.pathname) {
10
+ setIsOpen(checkHasActiveItem(item, location.pathname, path));
11
+ }
12
+ previousLocationPath.current = location.pathname;
13
+ }, [isOpen, item, path, location.pathname]);
14
+ return [isOpen, setIsOpen];
15
+ };
16
+ //# sourceMappingURL=useNavigationCollapsibleState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationCollapsibleState.js","sourceRoot":"","sources":["../../../../src/lib/components/navigation/useNavigationCollapsibleState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,IAAI,EACJ,WAAW,EACX,IAAI,GAKL,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,oBAAoB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,IAAI,oBAAoB,CAAC,OAAO,KAAK,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAClE,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;QAC/D,CAAC;QACD,oBAAoB,CAAC,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC;IACnD,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE5C,OAAO,CAAC,MAAM,EAAE,SAAS,CAAU,CAAC;AACtC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { HrefNavigationCategoryItem, PathNavigationCategoryItem } from "../../core/DevPortalContext.js";
2
+ import { type NavigationNode } from "../../util/traverseNavigation.js";
3
+ export declare const isPathItem: (item: NavigationNode) => item is PathNavigationCategoryItem;
4
+ export declare const isLinkItem: (item: NavigationNode) => item is HrefNavigationCategoryItem;
5
+ /**
6
+ * Recursively checks if the current item or any of its children are active.
7
+ */
8
+ export declare const checkHasActiveItem: (item: NavigationNode, locationPath: string, basePath: string) => boolean;
@@ -0,0 +1,15 @@
1
+ import { matchPath } from "react-router-dom";
2
+ import { traverseNavigationNode, } from "../../util/traverseNavigation.js";
3
+ export const isPathItem = (item) => "path" in item;
4
+ export const isLinkItem = (item) => "href" in item;
5
+ /**
6
+ * Recursively checks if the current item or any of its children are active.
7
+ */
8
+ export const checkHasActiveItem = (item, locationPath, basePath) => {
9
+ return Boolean(traverseNavigationNode(item, (node, fullPath) => {
10
+ if (isPathItem(node) && matchPath(fullPath, locationPath)) {
11
+ return true;
12
+ }
13
+ }, basePath));
14
+ };
15
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../src/lib/components/navigation/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,OAAO,EACL,sBAAsB,GAEvB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,IAAoB,EACgB,EAAE,CAAC,MAAM,IAAI,IAAI,CAAC;AAExD,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,IAAoB,EACgB,EAAE,CAAC,MAAM,IAAI,IAAI,CAAC;AAExD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,IAAoB,EACpB,YAAoB,EACpB,QAAgB,EAChB,EAAE;IACF,OAAO,OAAO,CACZ,sBAAsB,CACpB,IAAI,EACJ,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE;QACjB,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,CAAC;YAC1D,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC,EACD,QAAQ,CACT,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const MethodTextColorMap: {
2
+ get: string;
3
+ post: string;
4
+ put: string;
5
+ delete: string;
6
+ patch: string;
7
+ options: string;
8
+ head: string;
9
+ trace: string;
10
+ };
11
+ export declare const MethodBadge: ({ method }: {
12
+ method: string;
13
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../util/cn.js";
3
+ export const MethodTextColorMap = {
4
+ get: "text-green-600",
5
+ post: "text-sky-600",
6
+ put: "text-yellow-600",
7
+ delete: "text-red-600",
8
+ patch: "text-purple-600",
9
+ options: "text-indigo-600",
10
+ head: "text-gray-600",
11
+ trace: "text-gray-600",
12
+ };
13
+ const MethodColorMap = {
14
+ get: "bg-green-400 dark:bg-green-800",
15
+ post: "bg-sky-400 dark:bg-sky-800",
16
+ put: "bg-yellow-400 dark:bg-yellow-800",
17
+ delete: "bg-red-400 dark:bg-red-800",
18
+ patch: "bg-purple-400 dark:bg-purple-600",
19
+ options: "bg-indigo-400 dark:bg-indigo-600",
20
+ head: "bg-gray-400 dark:bg-gray-600",
21
+ trace: "bg-gray-400 dark:bg-gray-600",
22
+ };
23
+ export const MethodBadge = ({ method }) => {
24
+ return (_jsx("span", { className: cn("mt-0.5 flex items-center duration-200 transition-opacity text-center uppercase font-mono text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-4 px-1", MethodColorMap[method]), children: method }));
25
+ };
26
+ //# sourceMappingURL=MethodBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MethodBadge.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/MethodBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,EAAE,gBAAgB;IACrB,IAAI,EAAE,cAAc;IACpB,GAAG,EAAE,iBAAiB;IACtB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,eAAe;CACvB,CAAC;AAEF,MAAM,cAAc,GAAG;IACrB,GAAG,EAAE,gCAAgC;IACrC,IAAI,EAAE,4BAA4B;IAClC,GAAG,EAAE,kCAAkC;IACvC,MAAM,EAAE,4BAA4B;IACpC,KAAK,EAAE,kCAAkC;IACzC,OAAO,EAAE,kCAAkC;IAC3C,IAAI,EAAE,8BAA8B;IACpC,KAAK,EAAE,8BAA8B;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,MAAM,EAAsB,EAAE,EAAE;IAC5D,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,sKAAsK,EACtK,cAAc,CAAC,MAAqC,CAAC,CACtD,YAEA,MAAM,GACF,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { SchemaObject } from "../../oas/parser/index.js";
2
+ export declare const SchemaListView: ({ name, schema, level, defaultOpen, }: {
3
+ level?: number;
4
+ defaultOpen?: boolean;
5
+ name?: string;
6
+ schema: SchemaObject;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Markdown } from "../../components/Markdown.js";
3
+ import { Card } from "../../ui/Card.js";
4
+ import { groupBy } from "../../util/groupBy.js";
5
+ import { objectEntries } from "../../util/objectEntries.js";
6
+ import { SchemaListViewItem } from "./SchemaListViewItem.js";
7
+ import { SchemaListViewItemGroup } from "./SchemaListViewItemGroup.js";
8
+ import { SchemaProseClasses } from "./util/prose.js";
9
+ export const SchemaListView = ({ name, schema, level = 0, defaultOpen = false, }) => {
10
+ const properties = Object.entries(schema.properties ?? {});
11
+ const additionalProperties = typeof schema.additionalProperties === "object"
12
+ ? Object.entries(schema.additionalProperties)
13
+ : [];
14
+ const combinedProperties = properties.concat(Array.isArray(additionalProperties) ? additionalProperties : []);
15
+ const groups = groupBy(combinedProperties, ([propertyName, property]) => {
16
+ return property.deprecated
17
+ ? "deprecated"
18
+ : schema.required?.includes(propertyName)
19
+ ? "required"
20
+ : "optional";
21
+ });
22
+ if (schema.type === "array") {
23
+ return (_jsx(Card, { className: "overflow-hidden", children: _jsx(SchemaListViewItem, { propertyName: schema.title ?? name, isRequired: true, property: schema, defaultOpen: level === 0, nestingLevel: level }) }));
24
+ }
25
+ return (_jsxs("div", { className: "flex flex-col gap-2.5", children: [(schema.title ?? name) && (_jsx("div", { className: "ml-2 my-1 font-bold", children: schema.title ?? name })), level === 0 && schema.description && (_jsx(Markdown, { className: SchemaProseClasses, content: schema.description })), _jsx(Card, { className: "overflow-hidden", children: objectEntries(groups).map(([group, properties]) => (_jsx(SchemaListViewItemGroup, { defaultOpen: defaultOpen, group: group, nestingLevel: level, properties: properties ?? [], required: schema.required ?? [] }, group))) })] }));
26
+ };
27
+ //# sourceMappingURL=SchemaListView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaListView.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/SchemaListView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,M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AAC,EACxB,YAAY,EAAE,KAAK,GACnB,GACG,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACnC,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CACzB,cAAK,SAAS,EAAC,qBAAqB,YAAE,MAAM,CAAC,KAAK,IAAI,IAAI,GAAO,CAClE,EACA,KAAK,KAAK,CAAC,IAAI,MAAM,CAAC,WAAW,IAAI,CACpC,KAAC,QAAQ,IAAC,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,CAAC,WAAW,GAAI,CACzE,EACD,KAAC,IAAI,IAAC,SAAS,EAAC,iBAAiB,YAC9B,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,CAClD,KAAC,uBAAuB,IAEtB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,KAAK,EACnB,UAAU,EAAE,UAAU,IAAI,EAAE,EAC5B,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE,IAL1B,KAAK,CAMV,CACH,CAAC,GACG,IACH,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { SchemaObject } from "../../oas/parser/index.js";
2
+ export declare const SchemaListViewItem: ({ propertyName, property, nestingLevel, isRequired, defaultOpen, }: {
3
+ propertyName?: string;
4
+ isRequired: boolean;
5
+ property: SchemaObject;
6
+ nestingLevel: number;
7
+ defaultOpen?: boolean;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as Collapsible from "@radix-ui/react-collapsible";
3
+ import { ListPlusIcon } from "lucide-react";
4
+ import { Markdown } from "../../components/Markdown.js";
5
+ import { Button } from "../../ui/Button.js";
6
+ import { cn } from "../../util/cn.js";
7
+ import { SchemaListView } from "./SchemaListView.js";
8
+ export const SchemaListViewItem = ({ propertyName, property, nestingLevel, isRequired, defaultOpen = false, }) => {
9
+ if (!property) {
10
+ return _jsx("div", { children: "no property" });
11
+ }
12
+ const title = propertyName || property.title
13
+ ? [propertyName, property.title].filter(Boolean).join(" ")
14
+ : null;
15
+ return (_jsxs("div", { className: cn("p-4 bg-border/20 hover:bg-border/30 flex gap-1 flex-col text-sm", property.deprecated && "opacity-50"), children: [_jsxs("div", { className: "flex items-center gap-2 relative", children: [title && _jsx("code", { children: title }), property.type && (_jsx("span", { className: "text-muted-foreground", children: property.type })), property.deprecated && (_jsx("span", { className: "text-muted-foreground", children: "Deprecated" })), !isRequired && (_jsxs("span", { className: "py-px px-1.5 font-medium border rounded-lg", children: ["optional ", property.required] }))] }), property.description && (_jsx(Markdown, { content: property.description, className: "text-sm leading-normal line-clamp-4 " })), property.enum && (_jsxs("span", { className: "text-sm text-muted-foreground flex gap-1 flex-wrap items-center", children: [_jsx("span", { children: "Possible values" }), [...new Set(property.enum.filter((value) => value))]
16
+ .map((value) => (_jsx("span", { className: "font-mono text-xs border bg-muted rounded px-1", children: value }, value)))
17
+ .slice(0, 4), property.enum.length > 4 && (_jsx("span", { className: "font-mono text-xs border bg-muted rounded px-1", children: "..." }))] })), (property.type === "object" &&
18
+ (property.properties?.length ??
19
+ Object.entries(property.additionalProperties ?? {}).length > 0)) ||
20
+ (property.type === "array" &&
21
+ // this check is needed because the `items` can be undefined despite the type being defined
22
+ typeof property.items !== "undefined" &&
23
+ property.items.type === "object") ? (_jsxs(Collapsible.Root, { className: "CollapsibleRoot", defaultOpen: defaultOpen, children: [_jsx(Collapsible.Trigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "sm", className: cn(defaultOpen && "hidden"), children: ["Show nested fields", _jsx(ListPlusIcon, { size: 18, className: "ml-1.5" })] }) }), _jsxs(Collapsible.Content, { children: [property.type === "object" && (_jsx("div", { className: "mt-2.5", children: _jsx(SchemaListView, { schema: property, level: nestingLevel + 1, defaultOpen: true }) })), property.type === "array" && property.items.type === "object" && (_jsx("div", { className: "mt-2.5", children: _jsx(SchemaListView, { schema: property.items, defaultOpen: true, level: nestingLevel + 1 }) }))] })] })) : null] }));
24
+ };
25
+ //# sourceMappingURL=SchemaListViewItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaListViewItem.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/SchemaListViewItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,WAAW,GAAG,KAAK,GAOpB,EAAE,EAAE;IACH,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,wCAAsB,CAAC;IAChC,CAAC;IAED,MAAM,KAAK,GACT,YAAY,IAAI,QAAQ,CAAC,KAAK;QAC5B,CAAC,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC1D,CAAC,CAAC,IAAI,CAAC;IAEX,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,iEAAiE,EACjE,QAAQ,CAAC,UAAU,IAAI,YAAY,CACpC,aAED,eAAK,SAAS,EAAC,kCAAkC,aAC9C,KAAK,IAAI,yBAAO,KAAK,GAAQ,EAE7B,QAAQ,CAAC,IAAI,IAAI,CAChB,e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ACpC,MAAC,WAAW,CAAC,IAAI,IAAC,SAAS,EAAC,iBAAiB,EAAC,WAAW,EAAE,WAAW,aACpE,KAAC,WAAW,CAAC,OAAO,IAAC,OAAO,kBAC1B,MAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,IAAI,EACT,SAAS,EAAE,EAAE,CAAC,WAAW,IAAI,QAAQ,CAAC,mCAGtC,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,QAAQ,GAAG,IACtC,GACW,EAEtB,MAAC,WAAW,CAAC,OAAO,eACjB,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,CAC7B,cAAK,SAAS,EAAC,QAAQ,YACrB,KAAC,cAAc,IACb,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,YAAY,GAAG,CAAC,EACvB,WAAW,SACX,GACE,CACP,EACA,QAAQ,CAAC,IAAI,KAAK,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,CAChE,cAAK,SAAS,EAAC,QAAQ,YACrB,KAAC,cAAc,IACb,MAAM,EAAE,QAAQ,CAAC,KAAK,EACtB,WAAW,QACX,KAAK,EAAE,YAAY,GAAG,CAAC,GACvB,GACE,CACP,IACmB,IACL,CACpB,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { SchemaObject } from "../../oas/parser/index.js";
2
+ export declare const SchemaListViewItemGroup: ({ group, properties, nestingLevel, required, defaultOpen, }: {
3
+ group: "optional" | "required" | "deprecated";
4
+ defaultOpen?: boolean;
5
+ properties: [string, SchemaObject][];
6
+ nestingLevel: number;
7
+ required: string[];
8
+ }) => import("react/jsx-runtime").JSX.Element | undefined;
@@ -0,0 +1,17 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import * as Collapsible from "@radix-ui/react-collapsible";
3
+ import { useState } from "react";
4
+ import { cn } from "../../util/cn.js";
5
+ import { SchemaListViewItem } from "./SchemaListViewItem.js";
6
+ export const SchemaListViewItemGroup = ({ group, properties, nestingLevel, required, defaultOpen = false, }) => {
7
+ const notCollapsible = defaultOpen ||
8
+ group === "required" ||
9
+ properties.length === 1 ||
10
+ nestingLevel === 0;
11
+ const [open, setOpen] = useState(notCollapsible);
12
+ if (properties.length === 0) {
13
+ return;
14
+ }
15
+ return (_jsxs(Collapsible.Root, { className: "CollapsibleRoot", open: open, onOpenChange: setOpen, children: [!open && (_jsxs(Collapsible.Trigger, { className: cn("py-2 hover:bg-muted w-full", group === "optional" && "font-semibold", group === "deprecated" && "text-muted-foreground"), children: [properties.length, " ", group, " fields"] })), _jsx(Collapsible.Content, { className: "divide-y divide-border", children: properties.map(([propertyName, property]) => (_jsx(SchemaListViewItem, { property: property, propertyName: propertyName, nestingLevel: nestingLevel, isRequired: required.includes(propertyName) }, propertyName))) })] }));
16
+ };
17
+ //# sourceMappingURL=SchemaListViewItemGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaListViewItemGroup.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/SchemaListViewItemGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,KAAK,EACL,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,WAAW,GAAG,KAAK,GAOpB,EAAE,EAAE;IACH,MAAM,cAAc,GAClB,WAAW;QACX,KAAK,KAAK,UAAU;QACpB,UAAU,CAAC,MAAM,KAAK,CAAC;QACvB,YAAY,KAAK,CAAC,CAAC;IAErB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;IAEjD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;IACT,CAAC;IAED,OAAO,CACL,MAAC,WAAW,CAAC,IAAI,IACf,SAAS,EAAC,iBAAiB,EAC3B,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,OAAO,aAEpB,CAAC,IAAI,IAAI,CACR,MAAC,WAAW,CAAC,OAAO,IAClB,SAAS,EAAE,EAAE,CACX,4BAA4B,EAC5B,KAAK,KAAK,UAAU,IAAI,eAAe,EACvC,KAAK,KAAK,YAAY,IAAI,uBAAuB,CAClD,aAEA,UAAU,CAAC,MAAM,OAAG,KAAK,eACN,CACvB,EAED,KAAC,WAAW,CAAC,OAAO,IAAC,SAAS,EAAC,wBAAwB,YACpD,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAC5C,KAAC,kBAAkB,IAEjB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,IAJtC,YAAY,CAKjB,CACH,CAAC,GACkB,IACL,CACpB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const buttonVariants: (props?: ({
2
+ variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
3
+ size?: "default" | "icon" | "sm" | "lg" | null | undefined;
4
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -0,0 +1,24 @@
1
+ import { cva } from "class-variance-authority";
2
+ export const buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", {
3
+ variants: {
4
+ variant: {
5
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
6
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
7
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
8
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
9
+ ghost: "hover:bg-accent hover:text-accent-foreground",
10
+ link: "text-primary underline-offset-4 hover:underline",
11
+ },
12
+ size: {
13
+ default: "h-9 px-4 py-2",
14
+ sm: "h-8 rounded-md px-3 text-xs",
15
+ lg: "h-10 rounded-md px-8",
16
+ icon: "h-9 w-9",
17
+ },
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ size: "default",
22
+ },
23
+ });
24
+ //# sourceMappingURL=button-variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-variants.js","sourceRoot":"","sources":["../../../src/lib/ui/button-variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAC/B,qOAAqO,EACrO;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,+DAA+D;YACjE,WAAW,EACT,8EAA8E;YAChF,OAAO,EACL,0FAA0F;YAC5F,SAAS,EACP,wEAAwE;YAC1E,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,eAAe;YACxB,EAAE,EAAE,6BAA6B;YACjC,EAAE,EAAE,sBAAsB;YAC1B,IAAI,EAAE,SAAS;SAChB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { NavigationCategory, NavigationCategoryItem, NavigationItem } from "../core/DevPortalContext.js";
2
+ export type NavigationNode = NavigationCategoryItem | NavigationCategory;
3
+ type Callback<T> = (node: NavigationNode, fullPath: string, parentNodes: NavigationNode[]) => T | undefined;
4
+ export declare const traverseNavigationNode: <T>(node: NavigationNode, callback: Callback<T>, parentPath: string, parentNodes?: NavigationNode[]) => T | undefined;
5
+ export declare const traverseNavigation: <T>(navItem: NavigationItem, callback: Callback<T>) => T | undefined;
6
+ export {};
@@ -0,0 +1,30 @@
1
+ import { isPathItem } from "../components/navigation/util.js";
2
+ import { joinPath } from "./joinPath.js";
3
+ export const traverseNavigationNode = (node, callback, parentPath, parentNodes = []) => {
4
+ const newPath = isPathItem(node)
5
+ ? joinPath(parentPath, node.path)
6
+ : parentPath;
7
+ const result = callback(node, newPath, parentNodes);
8
+ if (result !== undefined)
9
+ return result;
10
+ if ("children" in node && node.children) {
11
+ const newParentNodes = [...parentNodes, node];
12
+ for (const child of node.children) {
13
+ const childResult = traverseNavigationNode(child, callback, newPath, newParentNodes);
14
+ if (childResult !== undefined)
15
+ return childResult;
16
+ }
17
+ }
18
+ return undefined;
19
+ };
20
+ export const traverseNavigation = (navItem, callback) => {
21
+ if (navItem.categories) {
22
+ for (const category of navItem.categories) {
23
+ const result = traverseNavigationNode(category, callback, navItem.path);
24
+ if (result !== undefined)
25
+ return result;
26
+ }
27
+ }
28
+ return undefined;
29
+ };
30
+ //# sourceMappingURL=traverseNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traverseNavigation.js","sourceRoot":"","sources":["../../../src/lib/util/traverseNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAM9D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AASzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,IAAoB,EACpB,QAAqB,EACrB,UAAkB,EAClB,cAAgC,EAAE,EACnB,EAAE;IACjB,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC;QACjC,CAAC,CAAC,UAAU,CAAC;IACf,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAEpD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IAExC,IAAI,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QACxC,MAAM,cAAc,GAAG,CAAC,GAAG,WAAW,EAAE,IAAI,CAAC,CAAC;QAC9C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,MAAM,WAAW,GAAG,sBAAsB,CACxC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,cAAc,CACf,CAAC;YACF,IAAI,WAAW,KAAK,SAAS;gBAAE,OAAO,WAAW,CAAC;QACpD,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAAuB,EACvB,QAAqB,EACN,EAAE;IACjB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACvB,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YAC1C,MAAM,MAAM,GAAG,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YACxE,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,MAAM,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Plugin } from "vite";
2
+ declare const viteHtmlPlugin: () => Plugin;
3
+ export default viteHtmlPlugin;
@@ -0,0 +1,39 @@
1
+ const themeScript = `
2
+ if (
3
+ localStorage.getItem("theme") === "dark" ||
4
+ (!("theme" in localStorage) &&
5
+ window.matchMedia("(prefers-color-scheme: dark)").matches)
6
+ ) {
7
+ document.documentElement.classList.add("dark");
8
+ } else {
9
+ document.documentElement.classList.remove("dark");
10
+ }
11
+ `.trim();
12
+ const viteHtmlPlugin = () => {
13
+ return {
14
+ name: "vite-zudoku-core-plugin",
15
+ transformIndexHtml: (html) => {
16
+ return {
17
+ html,
18
+ tags: [
19
+ {
20
+ tag: "script",
21
+ attrs: { type: "module" },
22
+ children: themeScript,
23
+ injectTo: "head",
24
+ },
25
+ {
26
+ tag: "link",
27
+ attrs: {
28
+ rel: "preconnect",
29
+ href: "https://cdn.zudoku.dev/",
30
+ },
31
+ injectTo: "head",
32
+ },
33
+ ],
34
+ };
35
+ },
36
+ };
37
+ };
38
+ export default viteHtmlPlugin;
39
+ //# sourceMappingURL=plugin-html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-html.js","sourceRoot":"","sources":["../../src/vite/plugin-html.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG;;;;;;;;;;CAUnB,CAAC,IAAI,EAAE,CAAC;AAET,MAAM,cAAc,GAAG,GAAW,EAAE;IAClC,OAAO;QACL,IAAI,EAAE,yBAAyB;QAC/B,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE;YAC3B,OAAO;gBACL,IAAI;gBACJ,IAAI,EAAE;oBACJ;wBACE,GAAG,EAAE,QAAQ;wBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACzB,QAAQ,EAAE,WAAW;wBACrB,QAAQ,EAAE,MAAM;qBACjB;oBACD;wBACE,GAAG,EAAE,MAAM;wBACX,KAAK,EAAE;4BACL,GAAG,EAAE,YAAY;4BACjB,IAAI,EAAE,yBAAyB;yBAChC;wBACD,QAAQ,EAAE,MAAM;qBACjB;iBACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.3.0-dev.131",
3
+ "version": "0.3.0-dev.133",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -13,73 +13,104 @@
13
13
  "zudoku": "./cli.js"
14
14
  },
15
15
  "exports": {
16
- ".": {
17
- "import": "./dist/index.js",
18
- "types": "./dist/index.d.ts"
19
- },
20
- "./internal": {
21
- "import": "./dist/internal.js"
22
- },
23
- "./auth/clerk": {
24
- "import": "./lib/zudoku.auth-clerk.js",
25
- "types": "./dist/lib/authentication/providers/clerk.d.ts"
26
- },
27
- "./auth/auth0": {
28
- "import": "./lib/zudoku.auth-auth0.js",
29
- "types": "./dist/lib/authentication/providers/auth0.d.ts"
30
- },
31
- "./auth/openid": {
32
- "import": "./lib/zudoku.auth-openid.js",
33
- "types": "./dist/lib/authentication/providers/openid.d.ts"
34
- },
35
- "./plugins/api-keys": {
36
- "import": "./lib/zudoku.plugin-api-keys.js",
37
- "types": "./dist/lib/plugins/api-keys/index.d.ts"
38
- },
39
- "./plugins/markdown": {
40
- "import": "./lib/zudoku.plugin-markdown.js",
41
- "types": "./dist/lib/plugins/markdown/index.d.ts"
42
- },
43
- "./plugins/openapi": {
44
- "import": "./lib/zudoku.plugin-openapi.js",
45
- "types": "./dist/lib/plugins/openapi/index.d.ts"
46
- },
47
- "./plugins/redirect": {
48
- "import": "./lib/zudoku.plugin-redirect.js",
49
- "types": "./dist/lib/plugins/redirect/index.d.ts"
50
- },
51
- "./plugins/custom-page": {
52
- "import": "./lib/zudoku.plugin-custom-page.js",
53
- "types": "./dist/lib/plugins/custom-page/index.d.ts"
54
- },
55
- "./plugins/search-inkeep": {
56
- "import": "./lib/zudoku.plugin-search-inkeep.js",
57
- "types": "./dist/lib/plugins/search-inkeep/index.d.ts"
58
- },
59
- "./openapi-worker": {
60
- "import": "./lib/zudoku.openapi-worker.js",
61
- "types": "./dist/lib/plugins/openapi-worker.d.ts"
62
- },
63
- "./components": {
64
- "import": "./lib/zudoku.components.js",
65
- "types": "./dist/lib/components/index.d.ts"
66
- },
67
- "./vite": {
68
- "require": "./dist/vite/plugin.js",
69
- "import": "./dist/vite/plugin.js"
70
- },
71
- "./tailwind": {
72
- "require": "./dist/app/tailwind.js",
73
- "import": "./dist/app/tailwind.js"
74
- },
75
- "./main.css": {
76
- "require": "./src/app/main.css",
77
- "import": "./src/app/main.css"
78
- },
79
- "./app/*": {
80
- "import": "./src/app/*"
16
+ ".": "./src/index.ts",
17
+ "./internal": "./src/internal.ts",
18
+ "./auth/clerk": "./src/lib/authentication/providers/clerk.ts",
19
+ "./auth/auth0": "./src/lib/authentication/providers/auth0.ts",
20
+ "./auth/openid": "./src/lib/authentication/providers/openid.ts",
21
+ "./plugins/api-keys": "./src/lib/plugins/api-keys/index.ts",
22
+ "./plugins/markdown": "./src/lib/plugins/markdown/index.ts",
23
+ "./plugins/openapi": "./src/lib/plugins/openapi/index.ts",
24
+ "./plugins/redirect": "./src/lib/plugins/redirect/index.ts",
25
+ "./plugins/custom-page": "./src/lib/plugins/custom-page/index.ts",
26
+ "./plugins/search-inkeep": "./src/lib/plugins/search-inkeep/index.ts",
27
+ "./openapi-worker": "./src/lib/plugins/openapi-worker.ts",
28
+ "./components": "./src/lib/components/index.ts",
29
+ "./vite": "./src/vite/plugin.ts",
30
+ "./tailwind": "./src/app/tailwind.ts",
31
+ "./app/*": "./src/app/*"
32
+ },
33
+ "publishConfig": {
34
+ "module": "./dist/index.js",
35
+ "types": "./dist/index.d.ts",
36
+ "exports": {
37
+ ".": {
38
+ "import": "./dist/index.js",
39
+ "types": "./dist/index.d.ts"
40
+ },
41
+ "./internal": {
42
+ "import": "./dist/internal.js"
43
+ },
44
+ "./auth/clerk": {
45
+ "import": "./lib/zudoku.auth-clerk.js",
46
+ "types": "./dist/lib/authentication/providers/clerk.d.ts"
47
+ },
48
+ "./auth/auth0": {
49
+ "import": "./lib/zudoku.auth-auth0.js",
50
+ "types": "./dist/lib/authentication/providers/auth0.d.ts"
51
+ },
52
+ "./auth/openid": {
53
+ "import": "./lib/zudoku.auth-openid.js",
54
+ "types": "./dist/lib/authentication/providers/openid.d.ts"
55
+ },
56
+ "./plugins/api-keys": {
57
+ "import": "./lib/zudoku.plugin-api-keys.js",
58
+ "types": "./dist/lib/plugins/api-keys/index.d.ts"
59
+ },
60
+ "./plugins/markdown": {
61
+ "import": "./lib/zudoku.plugin-markdown.js",
62
+ "types": "./dist/lib/plugins/markdown/index.d.ts"
63
+ },
64
+ "./plugins/openapi": {
65
+ "import": "./lib/zudoku.plugin-openapi.js",
66
+ "types": "./dist/lib/plugins/openapi/index.d.ts"
67
+ },
68
+ "./plugins/redirect": {
69
+ "import": "./lib/zudoku.plugin-redirect.js",
70
+ "types": "./dist/lib/plugins/redirect/index.d.ts"
71
+ },
72
+ "./plugins/custom-page": {
73
+ "import": "./lib/zudoku.plugin-custom-page.js",
74
+ "types": "./dist/lib/plugins/custom-page/index.d.ts"
75
+ },
76
+ "./plugins/search-inkeep": {
77
+ "import": "./lib/zudoku.plugin-search-inkeep.js",
78
+ "types": "./dist/lib/plugins/search-inkeep/index.d.ts"
79
+ },
80
+ "./openapi-worker": {
81
+ "import": "./lib/zudoku.openapi-worker.js",
82
+ "types": "./dist/lib/plugins/openapi-worker.d.ts"
83
+ },
84
+ "./components": {
85
+ "import": "./lib/zudoku.components.js",
86
+ "types": "./dist/lib/components/index.d.ts"
87
+ },
88
+ "./vite": {
89
+ "require": "./dist/vite/plugin.js",
90
+ "import": "./dist/vite/plugin.js"
91
+ },
92
+ "./tailwind": {
93
+ "require": "./dist/app/tailwind.js",
94
+ "import": "./dist/app/tailwind.js"
95
+ },
96
+ "./main.css": {
97
+ "require": "./src/app/main.css",
98
+ "import": "./src/app/main.css"
99
+ },
100
+ "./app/*": {
101
+ "import": "./src/app/*"
102
+ }
81
103
  }
82
104
  },
105
+ "scripts": {
106
+ "build": "tsc --project tsconfig.json",
107
+ "build:vite": "vite build && pnpm run hack:fix-worker-paths lib",
108
+ "build:standalone:vite": "vite build --mode standalone --config vite.standalone.config.ts",
109
+ "build:standalone:html": "cp ./src/app/standalone.html ./standalone/standalone.html && cp ./src/app/demo.html ./standalone/demo.html && cp ./src/app/demo-cdn.html ./standalone/index.html",
110
+ "hack:fix-worker-paths": "node ./scripts/hack-worker.mjs",
111
+ "clean": "tsc --build --clean",
112
+ "test": "node --test --enable-source-maps"
113
+ },
83
114
  "dependencies": {
84
115
  "@envelop/core": "5.0.1",
85
116
  "@graphql-typed-document-node/core": "3.2.0",
@@ -185,16 +216,5 @@
185
216
  "optionalDependencies": {
186
217
  "@clerk/clerk-js": "5.11.0",
187
218
  "@inkeep/widgets": "^0.2.289"
188
- },
189
- "scripts": {
190
- "build": "tsc --project tsconfig.json",
191
- "build:vite": "vite build && pnpm run hack:fix-worker-paths lib",
192
- "build:standalone:vite": "vite build --mode standalone --config vite.standalone.config.ts",
193
- "build:standalone:html": "cp ./src/app/standalone.html ./standalone/standalone.html && cp ./src/app/demo.html ./standalone/demo.html && cp ./src/app/demo-cdn.html ./standalone/index.html",
194
- "hack:fix-worker-paths": "node ./scripts/hack-worker.mjs",
195
- "clean": "tsc --build --clean",
196
- "test": "node --test --enable-source-maps"
197
- },
198
- "module": "./dist/index.js",
199
- "types": "./dist/index.d.ts"
200
- }
219
+ }
220
+ }
package/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2024 Zuplo, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.