zudoku 0.1.1-dev.10 → 0.1.1-dev.12
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/DevPortal.js +2 -15
- package/dist/app/DevPortal.js.map +1 -1
- package/dist/app/Router.d.ts +4 -0
- package/dist/app/Router.js +20 -0
- package/dist/app/Router.js.map +1 -0
- package/dist/vite/config.d.ts +2 -2
- package/dist/vite/config.js +13 -8
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-api.js +1 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +1 -1
- package/dist/vite/plugin-docs.js +1 -1
- package/dist/vite/plugin-docs.js.map +1 -1
- package/package.json +2 -2
- package/src/app/App.tsx +0 -30
- package/src/app/DevPortal.tsx +0 -115
- package/src/app/Heading.tsx +0 -60
- package/src/app/authentication/authentication.ts +0 -18
- package/src/app/authentication/clerk.ts +0 -47
- package/src/app/authentication/openid.ts +0 -192
- package/src/app/components/AnchorLink.tsx +0 -19
- package/src/app/components/CategoryHeading.tsx +0 -16
- package/src/app/components/Dialog.tsx +0 -119
- package/src/app/components/DynamicIcon.tsx +0 -60
- package/src/app/components/Header.tsx +0 -69
- package/src/app/components/Input.tsx +0 -24
- package/src/app/components/Layout.tsx +0 -56
- package/src/app/components/Markdown.tsx +0 -37
- package/src/app/components/SyntaxHighlight.tsx +0 -94
- package/src/app/components/TopNavigation.tsx +0 -32
- package/src/app/components/context/ComponentsContext.tsx +0 -24
- package/src/app/components/context/DevPortalProvider.ts +0 -54
- package/src/app/components/context/PluginSystem.ts +0 -0
- package/src/app/components/context/ThemeContext.tsx +0 -46
- package/src/app/components/context/ViewportAnchorContext.tsx +0 -139
- package/src/app/components/navigation/SideNavigation.tsx +0 -18
- package/src/app/components/navigation/SideNavigationCategory.tsx +0 -74
- package/src/app/components/navigation/SideNavigationItem.tsx +0 -143
- package/src/app/components/navigation/SideNavigationWrapper.tsx +0 -15
- package/src/app/components/navigation/useNavigationCollapsibleState.ts +0 -27
- package/src/app/components/navigation/util.ts +0 -38
- package/src/app/core/DevPortalContext.ts +0 -164
- package/src/app/core/helmet.ts +0 -5
- package/src/app/core/icons.tsx +0 -1
- package/src/app/core/plugins.ts +0 -43
- package/src/app/core/router.tsx +0 -1
- package/src/app/core/types/combine.ts +0 -16
- package/src/app/main.css +0 -137
- package/src/app/main.tsx +0 -9
- package/src/app/oas/graphql/index.ts +0 -422
- package/src/app/oas/graphql/server.ts +0 -10
- package/src/app/oas/parser/dereference/index.ts +0 -59
- package/src/app/oas/parser/dereference/resolveRef.ts +0 -32
- package/src/app/oas/parser/index.ts +0 -94
- package/src/app/oas/parser/schemas/v3.0.json +0 -1489
- package/src/app/oas/parser/schemas/v3.1.json +0 -1298
- package/src/app/oas/parser/upgrade/index.ts +0 -108
- package/src/app/plugins/api-key/SettingsApiKeys.tsx +0 -22
- package/src/app/plugins/api-key/index.tsx +0 -123
- package/src/app/plugins/markdown/MdxPage.tsx +0 -128
- package/src/app/plugins/markdown/Toc.tsx +0 -122
- package/src/app/plugins/markdown/generateRoutes.tsx +0 -72
- package/src/app/plugins/markdown/index.tsx +0 -31
- package/src/app/plugins/openapi/ColorizedParam.tsx +0 -82
- package/src/app/plugins/openapi/MakeRequest.tsx +0 -49
- package/src/app/plugins/openapi/MethodBadge.tsx +0 -36
- package/src/app/plugins/openapi/OperationList.tsx +0 -117
- package/src/app/plugins/openapi/OperationListItem.tsx +0 -55
- package/src/app/plugins/openapi/ParameterList.tsx +0 -32
- package/src/app/plugins/openapi/ParameterListItem.tsx +0 -60
- package/src/app/plugins/openapi/RequestBodySidecarBox.tsx +0 -51
- package/src/app/plugins/openapi/ResponsesSidecarBox.tsx +0 -60
- package/src/app/plugins/openapi/Select.tsx +0 -35
- package/src/app/plugins/openapi/Sidecar.tsx +0 -160
- package/src/app/plugins/openapi/SidecarBox.tsx +0 -36
- package/src/app/plugins/openapi/graphql/fragment-masking.ts +0 -111
- package/src/app/plugins/openapi/graphql/gql.ts +0 -70
- package/src/app/plugins/openapi/graphql/graphql.ts +0 -795
- package/src/app/plugins/openapi/graphql/index.ts +0 -2
- package/src/app/plugins/openapi/index.tsx +0 -142
- package/src/app/plugins/openapi/playground/Playground.tsx +0 -309
- package/src/app/plugins/openapi/queries.graphql +0 -6
- package/src/app/plugins/openapi/util/generateSchemaExample.ts +0 -59
- package/src/app/plugins/openapi/util/urql.ts +0 -8
- package/src/app/plugins/openapi/worker/createSharedWorkerClient.ts +0 -60
- package/src/app/plugins/openapi/worker/worker.ts +0 -30
- package/src/app/plugins/redirect/index.tsx +0 -20
- package/src/app/tailwind.ts +0 -72
- package/src/app/ui/Button.tsx +0 -56
- package/src/app/ui/Callout.tsx +0 -87
- package/src/app/ui/Card.tsx +0 -82
- package/src/app/ui/Note.tsx +0 -58
- package/src/app/ui/Tabs.tsx +0 -52
- package/src/app/util/MdxComponents.tsx +0 -70
- package/src/app/util/cn.ts +0 -6
- package/src/app/util/createVariantComponent.tsx +0 -30
- package/src/app/util/createWaitForNotify.ts +0 -18
- package/src/app/util/groupBy.ts +0 -24
- package/src/app/util/joinPath.tsx +0 -10
- package/src/app/util/pastellize.ts +0 -25
- package/src/app/util/slugify.ts +0 -3
- package/src/app/util/traverseNavigation.ts +0 -55
- package/src/app/util/useScrollToAnchor.ts +0 -38
- package/src/app/util/useScrollToTop.ts +0 -13
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
import { useLocation } from "react-router-dom";
|
|
3
|
-
import { useViewportAnchor } from "../components/context/ViewportAnchorContext.js";
|
|
4
|
-
|
|
5
|
-
export const useScrollToAnchor = () => {
|
|
6
|
-
const location = useLocation();
|
|
7
|
-
const { setActiveAnchor } = useViewportAnchor();
|
|
8
|
-
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
if (!location.hash) return;
|
|
11
|
-
|
|
12
|
-
const hash = location.hash.split("/")[0].slice(1);
|
|
13
|
-
|
|
14
|
-
const element = document.getElementById(decodeURIComponent(hash));
|
|
15
|
-
if (element) {
|
|
16
|
-
// on page navigation element might be in DOM but not yet scrollable, so wait for a frame
|
|
17
|
-
requestAnimationFrame(() => {
|
|
18
|
-
element.scrollIntoView();
|
|
19
|
-
requestIdleCallback(() => setActiveAnchor(hash));
|
|
20
|
-
});
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// on page load, the element might not be available yet
|
|
25
|
-
const observer = new MutationObserver((_mutations, obs) => {
|
|
26
|
-
const element = document.getElementById(decodeURIComponent(hash));
|
|
27
|
-
if (!element) return;
|
|
28
|
-
|
|
29
|
-
element.scrollIntoView();
|
|
30
|
-
requestIdleCallback(() => setActiveAnchor(hash));
|
|
31
|
-
obs.disconnect();
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
observer.observe(document.body, { childList: true, subtree: true });
|
|
35
|
-
|
|
36
|
-
return () => observer.disconnect();
|
|
37
|
-
}, [location.hash, setActiveAnchor]);
|
|
38
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
2
|
-
import { useLocation } from "react-router-dom";
|
|
3
|
-
|
|
4
|
-
export const useScrollToTop = () => {
|
|
5
|
-
const location = useLocation();
|
|
6
|
-
const previousPath = useRef(location.pathname);
|
|
7
|
-
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
if (previousPath.current === location.pathname) return;
|
|
10
|
-
window.scrollTo(0, 0);
|
|
11
|
-
previousPath.current = location.pathname;
|
|
12
|
-
}, [location.pathname]);
|
|
13
|
-
};
|