skuse-ui 0.1.0
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/LICENSE +21 -0
- package/README.md +63 -0
- package/dist/SkuseDocumentation.d.ts +10 -0
- package/dist/components/Skeletons/EndpointSkeleton.d.ts +2 -0
- package/dist/components/Skeletons/HomeSkeleton.d.ts +2 -0
- package/dist/components/Skeletons/LayoutSkeleton.d.ts +2 -0
- package/dist/components/Skeletons/SidebarSkeleton.d.ts +1 -0
- package/dist/components/layouts/MinimifiedInfo.d.ts +6 -0
- package/dist/components/layouts/Sidebar.d.ts +3 -0
- package/dist/components/openapi/Auth/AuthButton.d.ts +11 -0
- package/dist/components/openapi/Auth/AuthCard.d.ts +7 -0
- package/dist/components/openapi/Auth/AuthDialog.d.ts +8 -0
- package/dist/components/openapi/Auth/AuthMethods.d.ts +14 -0
- package/dist/components/openapi/Endpoint/CallbackViewer.d.ts +6 -0
- package/dist/components/openapi/Endpoint/CodeExamples.d.ts +16 -0
- package/dist/components/openapi/Endpoint/EndpointDetails.d.ts +3 -0
- package/dist/components/openapi/Endpoint/ExternalDocsLink.d.ts +6 -0
- package/dist/components/openapi/Endpoint/ParametersViewer.d.ts +7 -0
- package/dist/components/openapi/Endpoint/PlaygroundForm.d.ts +23 -0
- package/dist/components/openapi/Endpoint/PlaygroundResponse.d.ts +13 -0
- package/dist/components/openapi/Endpoint/RequestBodyViewer.d.ts +8 -0
- package/dist/components/openapi/Endpoint/ResponseViewer.d.ts +9 -0
- package/dist/components/openapi/Endpoint/SchemaBadges.d.ts +8 -0
- package/dist/components/openapi/Endpoint/SchemaExpandContext.d.ts +6 -0
- package/dist/components/openapi/Endpoint/SchemaProperty.d.ts +11 -0
- package/dist/components/openapi/Endpoint/SchemaViewer.d.ts +13 -0
- package/dist/components/openapi/FormattedMarkdown.d.ts +12 -0
- package/dist/components/openapi/Information.d.ts +3 -0
- package/dist/components/openapi/Models.d.ts +3 -0
- package/dist/components/openapi/Servers.d.ts +7 -0
- package/dist/components/openapi/TagsOverview.d.ts +3 -0
- package/dist/components/openapi/WebhookDetails.d.ts +3 -0
- package/dist/components/theme-provider.d.ts +13 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/carousel.d.ts +18 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/command.d.ts +80 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/popover.d.ts +6 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/sheet.d.ts +25 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/hooks/OpenAPIContext.d.ts +24 -0
- package/dist/hooks/usePlayground.d.ts +40 -0
- package/dist/hooks/useSpec.d.ts +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/main.d.ts +0 -0
- package/dist/router/routes.d.ts +2 -0
- package/dist/skuse-ui.cjs.js +459 -0
- package/dist/skuse-ui.es.js +61257 -0
- package/dist/style.css +1 -0
- package/dist/test-spec.json +779 -0
- package/dist/types/openapi.d.ts +2 -0
- package/dist/types/unified-openapi-types.d.ts +402 -0
- package/dist/utils/openapi.d.ts +18 -0
- package/dist/utils/pkce.d.ts +2 -0
- package/package.json +94 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
5
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const sheetVariants: (props?: ({
|
|
10
|
+
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
|
+
}
|
|
14
|
+
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const SheetHeader: {
|
|
16
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const SheetFooter: {
|
|
20
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
24
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
25
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Switch };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { UnifiedOpenAPI, AuthCredential } from '../types/unified-openapi-types';
|
|
3
|
+
interface OpenAPIContextType {
|
|
4
|
+
spec: UnifiedOpenAPI;
|
|
5
|
+
setSpec: (spec: UnifiedOpenAPI) => void;
|
|
6
|
+
computedUrl: string;
|
|
7
|
+
setComputedUrl: (url: string) => void;
|
|
8
|
+
serverVariables: Record<string, string>;
|
|
9
|
+
setServerVariables: (variables: Record<string, string>) => void;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
setLoading: (loading: boolean) => void;
|
|
12
|
+
error: Error | null;
|
|
13
|
+
setError: (error: Error | null) => void;
|
|
14
|
+
credentials: Record<string, AuthCredential>;
|
|
15
|
+
setCredential: (schemeName: string, credential: AuthCredential) => void;
|
|
16
|
+
clearCredential: (schemeName: string) => void;
|
|
17
|
+
preferredContentType: string | null;
|
|
18
|
+
setPreferredContentType: (ct: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const OpenAPIProvider: React.FC<{
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const useOpenAPIContext: () => OpenAPIContextType;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ParameterObject, RequestBodyObject } from '../types/unified-openapi-types';
|
|
2
|
+
export interface PlaygroundResult {
|
|
3
|
+
status: number;
|
|
4
|
+
statusText: string;
|
|
5
|
+
headers: Record<string, string>;
|
|
6
|
+
body: string;
|
|
7
|
+
duration: number;
|
|
8
|
+
url: string;
|
|
9
|
+
method: string;
|
|
10
|
+
}
|
|
11
|
+
interface UsePlaygroundOptions {
|
|
12
|
+
method: string;
|
|
13
|
+
path: string;
|
|
14
|
+
parameters: ParameterObject[];
|
|
15
|
+
security: Record<string, string[]>[];
|
|
16
|
+
requestBody?: RequestBodyObject;
|
|
17
|
+
}
|
|
18
|
+
export declare function usePlayground({ method, path, parameters, security, requestBody }: UsePlaygroundOptions): {
|
|
19
|
+
pathValues: Record<string, string>;
|
|
20
|
+
setPathValues: import('react').Dispatch<import('react').SetStateAction<Record<string, string>>>;
|
|
21
|
+
queryValues: Record<string, string>;
|
|
22
|
+
setQueryValues: import('react').Dispatch<import('react').SetStateAction<Record<string, string>>>;
|
|
23
|
+
headerValues: Record<string, string>;
|
|
24
|
+
setHeaderValues: import('react').Dispatch<import('react').SetStateAction<Record<string, string>>>;
|
|
25
|
+
body: string;
|
|
26
|
+
setBody: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
27
|
+
contentType: string;
|
|
28
|
+
setContentType: (ct: string) => void;
|
|
29
|
+
contentTypes: string[];
|
|
30
|
+
enabledParams: Record<string, boolean>;
|
|
31
|
+
setParamEnabled: (key: string, enabled: boolean) => void;
|
|
32
|
+
previewUrl: string;
|
|
33
|
+
curlCommand: string;
|
|
34
|
+
result: PlaygroundResult | null;
|
|
35
|
+
loading: boolean;
|
|
36
|
+
error: string | null;
|
|
37
|
+
validationErrors: string[];
|
|
38
|
+
send: () => Promise<void>;
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UnifiedOpenAPI } from '../types/unified-openapi-types';
|
|
2
|
+
export declare function useSpec({ openApiUrl, updateTitle }: {
|
|
3
|
+
openApiUrl: string;
|
|
4
|
+
updateTitle?: boolean;
|
|
5
|
+
}): {
|
|
6
|
+
spec: UnifiedOpenAPI;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
retry: () => void;
|
|
10
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/main.d.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Route, RootRoute, Router } from '@tanstack/react-router';
|
|
2
|
+
export declare function createAppRouter(openApiUrl: string): Router<RootRoute<undefined, {}, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, readonly [Route<RootRoute<undefined, {}, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, unknown, unknown>, "/", "/", string, "/", undefined, Record<never, string>, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, unknown>, Route<RootRoute<undefined, {}, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, unknown, unknown>, "/$tag/$operationId", "/$tag/$operationId", string, "/$tag/$operationId", undefined, Record<"tag" | "operationId", string>, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, unknown>, Route<RootRoute<undefined, {}, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, unknown, unknown>, "/models", "/models", string, "/models", undefined, Record<never, string>, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, unknown>, Route<RootRoute<undefined, {}, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, unknown, unknown>, "/webhooks/$webhookName/$operationId", "/webhooks/$webhookName/$operationId", string, "/webhooks/$webhookName/$operationId", undefined, Record<"webhookName" | "operationId", string>, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, import('@tanstack/react-router').AnyContext, {}, undefined, unknown>], unknown>, import('@tanstack/react-router').TrailingSlashOption, boolean, import('@tanstack/history').RouterHistory, Record<string, any>, Record<string, any>>;
|