@stoplight/elements 9.0.12-beta-0.1 → 9.0.13

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 (63) hide show
  1. package/__fixtures__/api-descriptions/Instagram.d.ts +1547 -0
  2. package/__fixtures__/api-descriptions/badgesForSchema.d.ts +1 -0
  3. package/__fixtures__/api-descriptions/simpleApiWithInternalOperations.d.ts +224 -0
  4. package/__fixtures__/api-descriptions/simpleApiWithoutDescription.d.ts +212 -0
  5. package/__fixtures__/api-descriptions/todosApiBundled.d.ts +1 -0
  6. package/__fixtures__/api-descriptions/zoomApiYaml.d.ts +1 -0
  7. package/components/API/APIWithResponsiveSidebarLayout.d.ts +25 -0
  8. package/components/API/APIWithSidebarLayout.d.ts +32 -0
  9. package/components/API/APIWithStackedLayout.d.ts +29 -0
  10. package/components/API/utils.d.ts +20 -0
  11. package/containers/API.d.ts +30 -0
  12. package/containers/API.spec.d.ts +1 -0
  13. package/containers/API.stories.d.ts +58 -0
  14. package/containers/story-helper.d.ts +2 -0
  15. package/hooks/useExportDocumentProps.d.ts +11 -0
  16. package/hooks/useExportDocumentProps.spec.d.ts +1 -0
  17. package/index.esm.js +657 -0
  18. package/index.js +681 -0
  19. package/index.mjs +657 -0
  20. package/package.json +16 -76
  21. package/styles.min.css +1 -0
  22. package/utils/oas/index.d.ts +3 -0
  23. package/utils/oas/oas2.d.ts +2 -0
  24. package/utils/oas/oas3.d.ts +2 -0
  25. package/utils/oas/types.d.ts +33 -0
  26. package/web-components/components.d.ts +1 -0
  27. package/web-components/index.d.ts +1 -0
  28. package/web-components.min.js +2 -0
  29. package/web-components.min.js.LICENSE.txt +176 -0
  30. package/.storybook/main.js +0 -6
  31. package/.storybook/manager.js +0 -1
  32. package/.storybook/preview.jsx +0 -3
  33. package/jest.config.js +0 -7
  34. package/src/__fixtures__/api-descriptions/Instagram.ts +0 -1859
  35. package/src/__fixtures__/api-descriptions/badgesForSchema.ts +0 -36
  36. package/src/__fixtures__/api-descriptions/simpleApiWithInternalOperations.ts +0 -253
  37. package/src/__fixtures__/api-descriptions/simpleApiWithoutDescription.ts +0 -243
  38. package/src/__fixtures__/api-descriptions/todosApiBundled.ts +0 -430
  39. package/src/__fixtures__/api-descriptions/zoomApiYaml.ts +0 -6083
  40. package/src/components/API/APIWithResponsiveSidebarLayout.tsx +0 -125
  41. package/src/components/API/APIWithSidebarLayout.tsx +0 -158
  42. package/src/components/API/APIWithStackedLayout.tsx +0 -286
  43. package/src/components/API/__tests__/utils.test.ts +0 -1323
  44. package/src/components/API/utils.ts +0 -206
  45. package/src/containers/API.spec.tsx +0 -122
  46. package/src/containers/API.stories.tsx +0 -117
  47. package/src/containers/API.tsx +0 -277
  48. package/src/containers/story-helper.tsx +0 -53
  49. package/src/hooks/useExportDocumentProps.spec.tsx +0 -68
  50. package/src/hooks/useExportDocumentProps.tsx +0 -48
  51. package/src/styles.css +0 -1
  52. package/src/utils/oas/__tests__/oas.spec.ts +0 -411
  53. package/src/utils/oas/index.ts +0 -192
  54. package/src/utils/oas/oas2.ts +0 -31
  55. package/src/utils/oas/oas3.ts +0 -54
  56. package/src/utils/oas/types.ts +0 -34
  57. package/src/web-components/__stories__/Api.stories.tsx +0 -63
  58. package/src/web-components/components.ts +0 -26
  59. package/src/web-components/index.ts +0 -3
  60. package/tsconfig.build.json +0 -18
  61. package/tsconfig.json +0 -7
  62. package/web-components.config.js +0 -1
  63. /package/{src/index.ts → index.d.ts} +0 -0
@@ -0,0 +1,30 @@
1
+ import { RoutingProps } from '@stoplight/elements-core';
2
+ import { ExtensionAddonRenderer } from '@stoplight/elements-core/components/Docs';
3
+ import * as React from 'react';
4
+ export declare type APIProps = APIPropsWithDocument | APIPropsWithUrl;
5
+ export declare type APIPropsWithUrl = {
6
+ apiDescriptionUrl: string;
7
+ } & CommonAPIProps;
8
+ export declare type APIPropsWithDocument = {
9
+ apiDescriptionDocument: string | object;
10
+ apiDescriptionUrl?: string;
11
+ } & CommonAPIProps;
12
+ export interface CommonAPIProps extends RoutingProps {
13
+ layout?: 'sidebar' | 'stacked' | 'responsive';
14
+ logo?: string;
15
+ hideTryIt?: boolean;
16
+ hideSamples?: boolean;
17
+ hideTryItPanel?: boolean;
18
+ hideSecurityInfo?: boolean;
19
+ hideServerInfo?: boolean;
20
+ hideSchemas?: boolean;
21
+ hideInternal?: boolean;
22
+ hideExport?: boolean;
23
+ tryItCredentialsPolicy?: 'omit' | 'include' | 'same-origin';
24
+ tryItCorsProxy?: string;
25
+ maxRefDepth?: number;
26
+ renderExtensionAddon?: ExtensionAddonRenderer;
27
+ outerRouter?: boolean;
28
+ }
29
+ export declare const APIImpl: React.FC<APIProps>;
30
+ export declare const API: React.FC<APIProps>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,58 @@
1
+ import * as React from 'react';
2
+ import { APIProps } from './API';
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.FC<APIProps>;
6
+ argTypes: {
7
+ apiDescriptionDocument: {
8
+ control: string;
9
+ type: {
10
+ required: boolean;
11
+ };
12
+ table: {
13
+ category: string;
14
+ };
15
+ };
16
+ apiDescriptionUrl: {
17
+ control: string;
18
+ table: {
19
+ category: string;
20
+ };
21
+ };
22
+ layout: {
23
+ control: {
24
+ type: string;
25
+ };
26
+ table: {
27
+ category: string;
28
+ };
29
+ };
30
+ basePath: {
31
+ table: {
32
+ category: string;
33
+ };
34
+ };
35
+ router: {
36
+ table: {
37
+ category: string;
38
+ };
39
+ };
40
+ };
41
+ args: {
42
+ router: string;
43
+ };
44
+ };
45
+ export default _default;
46
+ export declare const APIWithYamlProvidedDirectly: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
47
+ export declare const APIWithJSONProvidedDirectly: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
48
+ export declare const APIWithoutDescription: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
49
+ export declare const APIWithInternalOperations: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
50
+ export declare const OpenApi3Schema: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
51
+ export declare const BadgesForSchema: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
52
+ export declare const StackedLayout: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
53
+ export declare const ResponsiveLayout: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
54
+ export declare const Box: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
55
+ export declare const DigitalOcean: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
56
+ export declare const Github: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
57
+ export declare const Instagram: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
58
+ export declare const WithExtensionRenderer: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
@@ -0,0 +1,2 @@
1
+ export declare const renderExtensionRenderer: (props: any) => JSX.Element | null;
2
+ export declare const wrapOptionsContext: (story: any) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ export declare function useExportDocumentProps({ originalDocument, bundledDocument, }: {
2
+ originalDocument: string | object;
3
+ bundledDocument: unknown;
4
+ }): {
5
+ original: {
6
+ onPress: () => void;
7
+ };
8
+ bundled: {
9
+ onPress: () => void;
10
+ };
11
+ };
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';