@stoplight/elements 9.0.15 → 9.0.16-beta-0.3

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 (67) hide show
  1. package/.storybook/main.js +6 -0
  2. package/.storybook/manager.js +1 -0
  3. package/.storybook/preview.jsx +3 -0
  4. package/dist/LICENSE +190 -0
  5. package/dist/README.md +19 -0
  6. package/dist/package.json +52 -0
  7. package/{web-components.min.js → dist/web-components.min.js} +1 -1
  8. package/jest.config.js +7 -0
  9. package/package.json +77 -17
  10. package/src/__fixtures__/api-descriptions/Instagram.ts +1859 -0
  11. package/src/__fixtures__/api-descriptions/badgesForSchema.ts +36 -0
  12. package/src/__fixtures__/api-descriptions/simpleApiWithInternalOperations.ts +253 -0
  13. package/src/__fixtures__/api-descriptions/simpleApiWithoutDescription.ts +243 -0
  14. package/src/__fixtures__/api-descriptions/todosApiBundled.ts +430 -0
  15. package/src/__fixtures__/api-descriptions/zoomApiYaml.ts +6083 -0
  16. package/src/components/API/APIWithResponsiveSidebarLayout.tsx +125 -0
  17. package/src/components/API/APIWithSidebarLayout.tsx +158 -0
  18. package/src/components/API/APIWithStackedLayout.tsx +286 -0
  19. package/src/components/API/__tests__/utils.test.ts +1326 -0
  20. package/src/components/API/utils.ts +207 -0
  21. package/src/containers/API.spec.tsx +122 -0
  22. package/src/containers/API.stories.tsx +117 -0
  23. package/src/containers/API.tsx +277 -0
  24. package/src/containers/story-helper.tsx +53 -0
  25. package/src/hooks/useExportDocumentProps.spec.tsx +68 -0
  26. package/src/hooks/useExportDocumentProps.tsx +48 -0
  27. package/src/index.ts +6 -0
  28. package/src/styles.css +1 -0
  29. package/src/utils/oas/__tests__/oas.spec.ts +411 -0
  30. package/src/utils/oas/index.ts +192 -0
  31. package/src/utils/oas/oas2.ts +31 -0
  32. package/src/utils/oas/oas3.ts +54 -0
  33. package/src/utils/oas/types.ts +34 -0
  34. package/src/web-components/__stories__/Api.stories.tsx +63 -0
  35. package/src/web-components/components.ts +26 -0
  36. package/src/web-components/index.ts +3 -0
  37. package/tsconfig.build.json +18 -0
  38. package/tsconfig.json +7 -0
  39. package/web-components.config.js +1 -0
  40. /package/{__fixtures__ → dist/__fixtures__}/api-descriptions/Instagram.d.ts +0 -0
  41. /package/{__fixtures__ → dist/__fixtures__}/api-descriptions/badgesForSchema.d.ts +0 -0
  42. /package/{__fixtures__ → dist/__fixtures__}/api-descriptions/simpleApiWithInternalOperations.d.ts +0 -0
  43. /package/{__fixtures__ → dist/__fixtures__}/api-descriptions/simpleApiWithoutDescription.d.ts +0 -0
  44. /package/{__fixtures__ → dist/__fixtures__}/api-descriptions/todosApiBundled.d.ts +0 -0
  45. /package/{__fixtures__ → dist/__fixtures__}/api-descriptions/zoomApiYaml.d.ts +0 -0
  46. /package/{components → dist/components}/API/APIWithResponsiveSidebarLayout.d.ts +0 -0
  47. /package/{components → dist/components}/API/APIWithSidebarLayout.d.ts +0 -0
  48. /package/{components → dist/components}/API/APIWithStackedLayout.d.ts +0 -0
  49. /package/{components → dist/components}/API/utils.d.ts +0 -0
  50. /package/{containers → dist/containers}/API.d.ts +0 -0
  51. /package/{containers → dist/containers}/API.spec.d.ts +0 -0
  52. /package/{containers → dist/containers}/API.stories.d.ts +0 -0
  53. /package/{containers → dist/containers}/story-helper.d.ts +0 -0
  54. /package/{hooks → dist/hooks}/useExportDocumentProps.d.ts +0 -0
  55. /package/{hooks → dist/hooks}/useExportDocumentProps.spec.d.ts +0 -0
  56. /package/{index.d.ts → dist/index.d.ts} +0 -0
  57. /package/{index.esm.js → dist/index.esm.js} +0 -0
  58. /package/{index.js → dist/index.js} +0 -0
  59. /package/{index.mjs → dist/index.mjs} +0 -0
  60. /package/{styles.min.css → dist/styles.min.css} +0 -0
  61. /package/{utils → dist/utils}/oas/index.d.ts +0 -0
  62. /package/{utils → dist/utils}/oas/oas2.d.ts +0 -0
  63. /package/{utils → dist/utils}/oas/oas3.d.ts +0 -0
  64. /package/{utils → dist/utils}/oas/types.d.ts +0 -0
  65. /package/{web-components → dist/web-components}/components.d.ts +0 -0
  66. /package/{web-components → dist/web-components}/index.d.ts +0 -0
  67. /package/{web-components.min.js.LICENSE.txt → dist/web-components.min.js.LICENSE.txt} +0 -0
package/jest.config.js ADDED
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ ...require('../../jest.config'),
3
+ reporters: [
4
+ 'default',
5
+ ['jest-junit', { suiteName: 'elements', outputFile: '<rootDir>/../../test-results/elements/results.xml' }],
6
+ ],
7
+ };
package/package.json CHANGED
@@ -1,32 +1,69 @@
1
1
  {
2
2
  "name": "@stoplight/elements",
3
- "version": "9.0.15",
3
+ "version": "9.0.16-beta-0.3",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
- "main": "./index.js",
7
6
  "sideEffects": [
8
7
  "web-components.min.js",
9
8
  "src/web-components/**",
10
9
  "**/*.css"
11
10
  ],
12
- "files": [
13
- "**/*"
14
- ],
11
+ "homepage": "https://github.com/stoplightio/elements",
12
+ "bugs": "https://github.com/stoplightio/elements/issues",
15
13
  "author": "Stoplight <support@stoplight.io>",
16
14
  "repository": {
17
15
  "type": "git",
18
16
  "url": "https://github.com/stoplightio/elements"
19
17
  },
20
18
  "license": "Apache-2.0",
19
+ "type": "commonjs",
20
+ "main": "./dist/index.js",
21
+ "module": "./dist/index.esm.js",
22
+ "exports": {
23
+ "./styles.min.css": "./styles.min.css",
24
+ "./web-components.min.js": "./web-components.min.js",
25
+ ".": {
26
+ "types": "./index.d.ts",
27
+ "require": "./dist/index.js",
28
+ "import": "./dist/index.mjs"
29
+ }
30
+ },
31
+ "files": [
32
+ "**/*"
33
+ ],
21
34
  "engines": {
22
35
  "node": ">=16"
23
36
  },
37
+ "scripts": {
38
+ "build": "yarn build.react && yarn build.webcomponents",
39
+ "postbuild": "yarn build.styles",
40
+ "build.react": "sl-scripts bundle",
41
+ "build.styles": "postcss src/styles.css -o dist/styles.min.css",
42
+ "build.webcomponents": "node --max-old-space-size=4096 ./../../node_modules/webpack/bin/webpack.js -c ./web-components.config.js",
43
+ "build.docs": "storybook build -c .storybook -o dist-storybook",
44
+ "commit": "git-cz",
45
+ "release": "sl-scripts release",
46
+ "release.docs": "sl-scripts release:docs",
47
+ "release.dryRun": "sl-scripts release --dry-run --debug",
48
+ "storybook": "storybook dev -p 9001",
49
+ "test": "jest",
50
+ "test.prod": "yarn test --coverage --maxWorkers=2",
51
+ "test.update": "yarn test --updateSnapshot",
52
+ "test.watch": "yarn test --watch",
53
+ "test.packaging": "node --input-type=commonjs -e \"require('./dist/index.js')\" && node --input-type=module -e \"import './dist/index.mjs'\"",
54
+ "type-check": "tsc --noEmit"
55
+ },
24
56
  "peerDependencies": {
25
57
  "react": ">=16.8",
26
58
  "react-dom": ">=16.8"
27
59
  },
60
+ "rollup": {
61
+ "bundleDeps": [
62
+ "@fortawesome/free-solid-svg-icons"
63
+ ]
64
+ },
28
65
  "dependencies": {
29
- "@stoplight/elements-core": "~9.0.15",
66
+ "@stoplight/elements-core": "9.0.16-beta-0.3",
30
67
  "@stoplight/http-spec": "^7.1.0",
31
68
  "@stoplight/json": "^3.18.1",
32
69
  "@stoplight/mosaic": "^1.53.5",
@@ -38,15 +75,38 @@
38
75
  "react-query": "^3.34.19",
39
76
  "react-router-dom": "^6.28.0"
40
77
  },
41
- "type": "commonjs",
42
- "exports": {
43
- "./styles.min.css": "./styles.min.css",
44
- "./web-components.min.js": "./web-components.min.js",
45
- ".": {
46
- "require": "./index.js",
47
- "import": "./index.mjs"
48
- }
78
+ "devDependencies": {
79
+ "@fortawesome/free-solid-svg-icons": "^6.1.1",
80
+ "@stoplight/scripts": "10.0.0",
81
+ "@testing-library/dom": "^7.26.5",
82
+ "@testing-library/jest-dom": "^5.16.4",
83
+ "@testing-library/react": "^11.1.1",
84
+ "@testing-library/react-hooks": "^8.0.1",
85
+ "@testing-library/user-event": "^12.2.0",
86
+ "@types/enzyme": "3.x.x",
87
+ "@types/enzyme-adapter-react-16": "1.x.x",
88
+ "@types/file-saver": "^2.0.5",
89
+ "@types/json-schema": "^7.0.11",
90
+ "@types/lodash": "^4.14.181",
91
+ "@types/react": "16.9.56",
92
+ "@types/react-dom": "16.9.12",
93
+ "@types/react-router-dom": "^5.3.3",
94
+ "enzyme": "3.x.x",
95
+ "enzyme-adapter-react-16": "1.x.x",
96
+ "enzyme-to-json": "3.x.x",
97
+ "jest-fetch-mock": "^3.0.3",
98
+ "react": "16.14.0",
99
+ "react-dom": "16.14.0",
100
+ "react-test-renderer": "^16.8.0",
101
+ "resolve-url-loader": "^5.0.0",
102
+ "storybook": "next",
103
+ "style-loader": "^3.3.3",
104
+ "ts-loader": "^9.2.8"
105
+ },
106
+ "publishConfig": {
107
+ "directory": "dist"
49
108
  },
50
- "typings": "index.d.ts",
51
- "module": "./index.esm.js"
52
- }
109
+ "release": {
110
+ "extends": "@stoplight/scripts/release"
111
+ }
112
+ }