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.
Files changed (104) hide show
  1. package/dist/app/DevPortal.js +2 -15
  2. package/dist/app/DevPortal.js.map +1 -1
  3. package/dist/app/Router.d.ts +4 -0
  4. package/dist/app/Router.js +20 -0
  5. package/dist/app/Router.js.map +1 -0
  6. package/dist/vite/config.d.ts +2 -2
  7. package/dist/vite/config.js +13 -8
  8. package/dist/vite/config.js.map +1 -1
  9. package/dist/vite/plugin-api.js +1 -1
  10. package/dist/vite/plugin-api.js.map +1 -1
  11. package/dist/vite/plugin-auth.js +1 -1
  12. package/dist/vite/plugin-docs.js +1 -1
  13. package/dist/vite/plugin-docs.js.map +1 -1
  14. package/package.json +2 -2
  15. package/src/app/App.tsx +0 -30
  16. package/src/app/DevPortal.tsx +0 -115
  17. package/src/app/Heading.tsx +0 -60
  18. package/src/app/authentication/authentication.ts +0 -18
  19. package/src/app/authentication/clerk.ts +0 -47
  20. package/src/app/authentication/openid.ts +0 -192
  21. package/src/app/components/AnchorLink.tsx +0 -19
  22. package/src/app/components/CategoryHeading.tsx +0 -16
  23. package/src/app/components/Dialog.tsx +0 -119
  24. package/src/app/components/DynamicIcon.tsx +0 -60
  25. package/src/app/components/Header.tsx +0 -69
  26. package/src/app/components/Input.tsx +0 -24
  27. package/src/app/components/Layout.tsx +0 -56
  28. package/src/app/components/Markdown.tsx +0 -37
  29. package/src/app/components/SyntaxHighlight.tsx +0 -94
  30. package/src/app/components/TopNavigation.tsx +0 -32
  31. package/src/app/components/context/ComponentsContext.tsx +0 -24
  32. package/src/app/components/context/DevPortalProvider.ts +0 -54
  33. package/src/app/components/context/PluginSystem.ts +0 -0
  34. package/src/app/components/context/ThemeContext.tsx +0 -46
  35. package/src/app/components/context/ViewportAnchorContext.tsx +0 -139
  36. package/src/app/components/navigation/SideNavigation.tsx +0 -18
  37. package/src/app/components/navigation/SideNavigationCategory.tsx +0 -74
  38. package/src/app/components/navigation/SideNavigationItem.tsx +0 -143
  39. package/src/app/components/navigation/SideNavigationWrapper.tsx +0 -15
  40. package/src/app/components/navigation/useNavigationCollapsibleState.ts +0 -27
  41. package/src/app/components/navigation/util.ts +0 -38
  42. package/src/app/core/DevPortalContext.ts +0 -164
  43. package/src/app/core/helmet.ts +0 -5
  44. package/src/app/core/icons.tsx +0 -1
  45. package/src/app/core/plugins.ts +0 -43
  46. package/src/app/core/router.tsx +0 -1
  47. package/src/app/core/types/combine.ts +0 -16
  48. package/src/app/main.css +0 -137
  49. package/src/app/main.tsx +0 -9
  50. package/src/app/oas/graphql/index.ts +0 -422
  51. package/src/app/oas/graphql/server.ts +0 -10
  52. package/src/app/oas/parser/dereference/index.ts +0 -59
  53. package/src/app/oas/parser/dereference/resolveRef.ts +0 -32
  54. package/src/app/oas/parser/index.ts +0 -94
  55. package/src/app/oas/parser/schemas/v3.0.json +0 -1489
  56. package/src/app/oas/parser/schemas/v3.1.json +0 -1298
  57. package/src/app/oas/parser/upgrade/index.ts +0 -108
  58. package/src/app/plugins/api-key/SettingsApiKeys.tsx +0 -22
  59. package/src/app/plugins/api-key/index.tsx +0 -123
  60. package/src/app/plugins/markdown/MdxPage.tsx +0 -128
  61. package/src/app/plugins/markdown/Toc.tsx +0 -122
  62. package/src/app/plugins/markdown/generateRoutes.tsx +0 -72
  63. package/src/app/plugins/markdown/index.tsx +0 -31
  64. package/src/app/plugins/openapi/ColorizedParam.tsx +0 -82
  65. package/src/app/plugins/openapi/MakeRequest.tsx +0 -49
  66. package/src/app/plugins/openapi/MethodBadge.tsx +0 -36
  67. package/src/app/plugins/openapi/OperationList.tsx +0 -117
  68. package/src/app/plugins/openapi/OperationListItem.tsx +0 -55
  69. package/src/app/plugins/openapi/ParameterList.tsx +0 -32
  70. package/src/app/plugins/openapi/ParameterListItem.tsx +0 -60
  71. package/src/app/plugins/openapi/RequestBodySidecarBox.tsx +0 -51
  72. package/src/app/plugins/openapi/ResponsesSidecarBox.tsx +0 -60
  73. package/src/app/plugins/openapi/Select.tsx +0 -35
  74. package/src/app/plugins/openapi/Sidecar.tsx +0 -160
  75. package/src/app/plugins/openapi/SidecarBox.tsx +0 -36
  76. package/src/app/plugins/openapi/graphql/fragment-masking.ts +0 -111
  77. package/src/app/plugins/openapi/graphql/gql.ts +0 -70
  78. package/src/app/plugins/openapi/graphql/graphql.ts +0 -795
  79. package/src/app/plugins/openapi/graphql/index.ts +0 -2
  80. package/src/app/plugins/openapi/index.tsx +0 -142
  81. package/src/app/plugins/openapi/playground/Playground.tsx +0 -309
  82. package/src/app/plugins/openapi/queries.graphql +0 -6
  83. package/src/app/plugins/openapi/util/generateSchemaExample.ts +0 -59
  84. package/src/app/plugins/openapi/util/urql.ts +0 -8
  85. package/src/app/plugins/openapi/worker/createSharedWorkerClient.ts +0 -60
  86. package/src/app/plugins/openapi/worker/worker.ts +0 -30
  87. package/src/app/plugins/redirect/index.tsx +0 -20
  88. package/src/app/tailwind.ts +0 -72
  89. package/src/app/ui/Button.tsx +0 -56
  90. package/src/app/ui/Callout.tsx +0 -87
  91. package/src/app/ui/Card.tsx +0 -82
  92. package/src/app/ui/Note.tsx +0 -58
  93. package/src/app/ui/Tabs.tsx +0 -52
  94. package/src/app/util/MdxComponents.tsx +0 -70
  95. package/src/app/util/cn.ts +0 -6
  96. package/src/app/util/createVariantComponent.tsx +0 -30
  97. package/src/app/util/createWaitForNotify.ts +0 -18
  98. package/src/app/util/groupBy.ts +0 -24
  99. package/src/app/util/joinPath.tsx +0 -10
  100. package/src/app/util/pastellize.ts +0 -25
  101. package/src/app/util/slugify.ts +0 -3
  102. package/src/app/util/traverseNavigation.ts +0 -55
  103. package/src/app/util/useScrollToAnchor.ts +0 -38
  104. package/src/app/util/useScrollToTop.ts +0 -13
@@ -1,36 +0,0 @@
1
- import type { PropsWithChildren } from "react";
2
- import { cn } from "../../util/cn.js";
3
-
4
- type BaseComponentProps<T = unknown> = PropsWithChildren<
5
- T & { className?: string }
6
- >;
7
-
8
- export const Root = ({ children, className }: BaseComponentProps) => (
9
- <div
10
- className={cn(
11
- "rounded-lg overflow-hidden border border-border dark:border-transparent",
12
- className,
13
- )}
14
- >
15
- {children}
16
- </div>
17
- );
18
-
19
- export const Head = ({ children, className }: BaseComponentProps) => (
20
- <div
21
- className={cn(
22
- "border-b border-b-border dark:border-b-zinc-600 bg-zinc-100 dark:bg-zinc-700 p-2",
23
- className,
24
- )}
25
- >
26
- {children}
27
- </div>
28
- );
29
-
30
- export const Body = ({ children, className }: BaseComponentProps) => (
31
- <div
32
- className={cn("bg-zinc-50 dark:bg-zinc-800 overflow-auto p-2", className)}
33
- >
34
- {children}
35
- </div>
36
- );
@@ -1,111 +0,0 @@
1
- /* eslint-disable */
2
- import type {
3
- ResultOf,
4
- DocumentTypeDecoration,
5
- TypedDocumentNode,
6
- } from "@graphql-typed-document-node/core";
7
- import type { FragmentDefinitionNode } from "graphql";
8
- import type { Incremental } from "./graphql.js";
9
-
10
- export type FragmentType<
11
- TDocumentType extends DocumentTypeDecoration<any, any>,
12
- > =
13
- TDocumentType extends DocumentTypeDecoration<infer TType, any>
14
- ? [TType] extends [{ " $fragmentName"?: infer TKey }]
15
- ? TKey extends string
16
- ? { " $fragmentRefs"?: { [key in TKey]: TType } }
17
- : never
18
- : never
19
- : never;
20
-
21
- // return non-nullable if `fragmentType` is non-nullable
22
- export function useFragment<TType>(
23
- _documentNode: DocumentTypeDecoration<TType, any>,
24
- fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>,
25
- ): TType;
26
- // return nullable if `fragmentType` is undefined
27
- export function useFragment<TType>(
28
- _documentNode: DocumentTypeDecoration<TType, any>,
29
- fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined,
30
- ): TType | undefined;
31
- // return nullable if `fragmentType` is nullable
32
- export function useFragment<TType>(
33
- _documentNode: DocumentTypeDecoration<TType, any>,
34
- fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null,
35
- ): TType | null;
36
- // return nullable if `fragmentType` is nullable or undefined
37
- export function useFragment<TType>(
38
- _documentNode: DocumentTypeDecoration<TType, any>,
39
- fragmentType:
40
- | FragmentType<DocumentTypeDecoration<TType, any>>
41
- | null
42
- | undefined,
43
- ): TType | null | undefined;
44
- // return array of non-nullable if `fragmentType` is array of non-nullable
45
- export function useFragment<TType>(
46
- _documentNode: DocumentTypeDecoration<TType, any>,
47
- fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>,
48
- ): Array<TType>;
49
- // return array of nullable if `fragmentType` is array of nullable
50
- export function useFragment<TType>(
51
- _documentNode: DocumentTypeDecoration<TType, any>,
52
- fragmentType:
53
- | Array<FragmentType<DocumentTypeDecoration<TType, any>>>
54
- | null
55
- | undefined,
56
- ): Array<TType> | null | undefined;
57
- // return readonly array of non-nullable if `fragmentType` is array of non-nullable
58
- export function useFragment<TType>(
59
- _documentNode: DocumentTypeDecoration<TType, any>,
60
- fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>,
61
- ): ReadonlyArray<TType>;
62
- // return readonly array of nullable if `fragmentType` is array of nullable
63
- export function useFragment<TType>(
64
- _documentNode: DocumentTypeDecoration<TType, any>,
65
- fragmentType:
66
- | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
67
- | null
68
- | undefined,
69
- ): ReadonlyArray<TType> | null | undefined;
70
- export function useFragment<TType>(
71
- _documentNode: DocumentTypeDecoration<TType, any>,
72
- fragmentType:
73
- | FragmentType<DocumentTypeDecoration<TType, any>>
74
- | Array<FragmentType<DocumentTypeDecoration<TType, any>>>
75
- | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
76
- | null
77
- | undefined,
78
- ): TType | Array<TType> | ReadonlyArray<TType> | null | undefined {
79
- return fragmentType as any;
80
- }
81
-
82
- export function makeFragmentData<
83
- F extends DocumentTypeDecoration<any, any>,
84
- FT extends ResultOf<F>,
85
- >(data: FT, _fragment: F): FragmentType<F> {
86
- return data as FragmentType<F>;
87
- }
88
- export function isFragmentReady<TQuery, TFrag>(
89
- queryNode: DocumentTypeDecoration<TQuery, any>,
90
- fragmentNode: TypedDocumentNode<TFrag>,
91
- data:
92
- | FragmentType<TypedDocumentNode<Incremental<TFrag>, any>>
93
- | null
94
- | undefined,
95
- ): data is FragmentType<typeof fragmentNode> {
96
- const deferredFields = (
97
- queryNode as {
98
- __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> };
99
- }
100
- ).__meta__?.deferredFields;
101
-
102
- if (!deferredFields) return true;
103
-
104
- const fragDef = fragmentNode.definitions[0] as
105
- | FragmentDefinitionNode
106
- | undefined;
107
- const fragName = fragDef?.name?.value;
108
-
109
- const fields = (fragName && deferredFields[fragName]) || [];
110
- return fields.length > 0 && fields.every((field) => data && field in data);
111
- }
@@ -1,70 +0,0 @@
1
- /* eslint-disable */
2
- import * as types from "./graphql.js";
3
- import type { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core";
4
-
5
- /**
6
- * Map of all GraphQL operations in the project.
7
- *
8
- * This map has several performance disadvantages:
9
- * 1. It is not tree-shakeable, so it will include all operations in the project.
10
- * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
11
- * 3. It does not support dead code elimination, so it will add unused operations.
12
- *
13
- * Therefore it is highly recommended to use the babel or swc plugin for production.
14
- */
15
- const documents = {
16
- "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n":
17
- types.GetServerQueryDocument,
18
- "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
19
- types.OperationsFragmentFragmentDoc,
20
- "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n":
21
- types.AllOperationsDocument,
22
- "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n method\n summary\n operationId\n path\n }\n }\n }\n }\n":
23
- types.GetCategoriesDocument,
24
- };
25
-
26
- /**
27
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
28
- *
29
- *
30
- * @example
31
- * ```ts
32
- * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
33
- * ```
34
- *
35
- * The query argument is unknown!
36
- * Please regenerate the types.
37
- */
38
- export function graphql(source: string): unknown;
39
-
40
- /**
41
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
42
- */
43
- export function graphql(
44
- source: "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n",
45
- ): (typeof documents)["\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n"];
46
- /**
47
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
48
- */
49
- export function graphql(
50
- source: "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n",
51
- ): (typeof documents)["\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n"];
52
- /**
53
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
54
- */
55
- export function graphql(
56
- source: "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n",
57
- ): (typeof documents)["\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n"];
58
- /**
59
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
60
- */
61
- export function graphql(
62
- source: "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n method\n summary\n operationId\n path\n }\n }\n }\n }\n",
63
- ): (typeof documents)["\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n method\n summary\n operationId\n path\n }\n }\n }\n }\n"];
64
-
65
- export function graphql(source: string) {
66
- return (documents as any)[source] ?? {};
67
- }
68
-
69
- export type DocumentType<TDocumentNode extends DocumentNode<any, any>> =
70
- TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;