@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,3 @@
1
+ import { ServiceNode } from './types';
2
+ export declare function transformOasToServiceNode(apiDescriptionDocument: unknown): ServiceNode | null;
3
+ export declare function isJson(value: string): boolean;
@@ -0,0 +1,2 @@
1
+ import { ISourceNodeMap } from './types';
2
+ export declare const oas2SourceMap: ISourceNodeMap[];
@@ -0,0 +1,2 @@
1
+ import { ISourceNodeMap } from './types';
2
+ export declare const oas3SourceMap: ISourceNodeMap[];
@@ -0,0 +1,33 @@
1
+ import { IHttpOperation, IHttpService, IHttpWebhookOperation, NodeType } from '@stoplight/types';
2
+ import { JSONSchema7 } from 'json-schema';
3
+ export declare enum NodeTypes {
4
+ Paths = "paths",
5
+ Path = "path",
6
+ Operation = "operation",
7
+ Webhooks = "webhooks",
8
+ Webhook = "webhook",
9
+ Components = "components",
10
+ Models = "models",
11
+ Model = "model"
12
+ }
13
+ export interface ISourceNodeMap {
14
+ type: string;
15
+ match?: string;
16
+ notMatch?: string;
17
+ children?: ISourceNodeMap[];
18
+ }
19
+ declare type Node<T, D> = {
20
+ type: T;
21
+ uri: string;
22
+ name: string;
23
+ data: D;
24
+ tags: string[];
25
+ };
26
+ export declare type ServiceNode = Node<NodeType.HttpService, IHttpService> & {
27
+ children: ServiceChildNode[];
28
+ };
29
+ export declare type ServiceChildNode = OperationNode | WebhookNode | SchemaNode;
30
+ export declare type OperationNode = Node<NodeType.HttpOperation, IHttpOperation>;
31
+ export declare type WebhookNode = Node<NodeType.HttpWebhook, IHttpWebhookOperation>;
32
+ export declare type SchemaNode = Node<NodeType.Model, JSONSchema7>;
33
+ export {};
@@ -0,0 +1 @@
1
+ export declare const ApiElement: new () => HTMLElement;
@@ -0,0 +1 @@
1
+ export {};