@storybook/angular 6.5.7 → 7.0.0-alpha.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.
Files changed (269) hide show
  1. package/dist/{ts3.9 → types}/builders/build-storybook/index.d.ts +1 -1
  2. package/dist/types/builders/build-storybook/index.js +58 -0
  3. package/dist/{ts3.9 → types}/builders/build-storybook/schema.json +0 -0
  4. package/dist/{ts3.9 → types}/builders/builders.json +0 -0
  5. package/dist/{ts3.9 → types}/builders/start-storybook/index.d.ts +1 -1
  6. package/dist/types/builders/start-storybook/index.js +66 -0
  7. package/dist/{ts3.9 → types}/builders/start-storybook/schema.json +0 -0
  8. package/dist/{ts3.9 → types}/builders/utils/build-standalone-errors-handler.d.ts +0 -0
  9. package/dist/{ts3.9 → types}/builders/utils/build-standalone-errors-handler.js +5 -5
  10. package/dist/{ts3.9 → types}/builders/utils/run-compodoc.d.ts +0 -0
  11. package/dist/{ts3.9 → types}/builders/utils/run-compodoc.js +9 -4
  12. package/dist/{ts3.9 → types}/client/docs/compodoc.d.ts +0 -0
  13. package/dist/{ts3.9 → types}/client/docs/compodoc.js +47 -34
  14. package/dist/{ts3.9 → types}/client/docs/config.d.ts +2 -2
  15. package/dist/{ts3.9 → types}/client/docs/config.js +0 -0
  16. package/dist/{ts3.9 → types}/client/docs/index.d.ts +0 -0
  17. package/dist/{ts3.9 → types}/client/docs/index.js +6 -2
  18. package/dist/{ts3.9 → types}/client/docs/prepareForInline.d.ts +0 -0
  19. package/dist/types/client/docs/prepareForInline.js +37 -0
  20. package/dist/{ts3.9 → types}/client/docs/sourceDecorator.d.ts +0 -0
  21. package/dist/{ts3.9 → types}/client/docs/sourceDecorator.js +10 -9
  22. package/dist/{ts3.9 → types}/client/docs/types.d.ts +0 -0
  23. package/dist/{ts3.9 → types}/client/docs/types.js +0 -0
  24. package/dist/{ts3.9 → types}/client/index.d.ts +0 -0
  25. package/dist/{ts3.9 → types}/client/index.js +9 -5
  26. package/dist/{ts3.9 → types}/client/preview/angular/app.token.d.ts +0 -0
  27. package/dist/{ts3.9 → types}/client/preview/angular/app.token.js +0 -0
  28. package/dist/{ts3.9 → types}/client/preview/angular/components/app.component.d.ts +0 -0
  29. package/dist/{ts3.9 → types}/client/preview/angular/components/app.component.js +4 -4
  30. package/dist/{ts3.9 → types}/client/preview/angular/helpers.d.ts +0 -0
  31. package/dist/{ts3.9 → types}/client/preview/angular/helpers.js +6 -6
  32. package/dist/{ts3.9 → types}/client/preview/angular-beta/AbstractRenderer.d.ts +0 -0
  33. package/dist/{ts3.9 → types}/client/preview/angular-beta/AbstractRenderer.js +40 -48
  34. package/dist/{ts3.9 → types}/client/preview/angular-beta/CanvasRenderer.d.ts +0 -0
  35. package/dist/types/client/preview/angular-beta/CanvasRenderer.js +16 -0
  36. package/dist/{ts3.9 → types}/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +0 -0
  37. package/dist/{ts3.9 → types}/client/preview/angular-beta/ComputesTemplateFromComponent.js +10 -8
  38. package/dist/{ts3.9 → types}/client/preview/angular-beta/DocsRenderer.d.ts +0 -0
  39. package/dist/types/client/preview/angular-beta/DocsRenderer.js +41 -0
  40. package/dist/{ts3.9 → types}/client/preview/angular-beta/RendererFactory.d.ts +0 -0
  41. package/dist/types/client/preview/angular-beta/RendererFactory.js +55 -0
  42. package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookModule.d.ts +0 -0
  43. package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookModule.js +16 -15
  44. package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookProvider.d.ts +0 -0
  45. package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookProvider.js +2 -1
  46. package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookWrapperComponent.d.ts +0 -0
  47. package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookWrapperComponent.js +11 -10
  48. package/dist/{ts3.9 → types}/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -0
  49. package/dist/{ts3.9 → types}/client/preview/angular-beta/utils/NgComponentAnalyzer.js +22 -12
  50. package/dist/{ts3.9 → types}/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -0
  51. package/dist/{ts3.9 → types}/client/preview/angular-beta/utils/NgModulesAnalyzer.js +3 -2
  52. package/dist/{ts3.9 → types}/client/preview/angular-polyfills.d.ts +0 -0
  53. package/dist/{ts3.9 → types}/client/preview/angular-polyfills.js +0 -0
  54. package/dist/{ts3.9 → types}/client/preview/config.d.ts +0 -0
  55. package/dist/{ts3.9 → types}/client/preview/config.js +1 -1
  56. package/dist/{ts3.9 → types}/client/preview/decorateStory.d.ts +0 -0
  57. package/dist/{ts3.9 → types}/client/preview/decorateStory.js +11 -6
  58. package/dist/{ts3.9 → types}/client/preview/decorators.d.ts +0 -0
  59. package/dist/{ts3.9 → types}/client/preview/decorators.js +23 -11
  60. package/dist/{ts3.9 → types}/client/preview/globals.d.ts +0 -0
  61. package/dist/{ts3.9 → types}/client/preview/globals.js +0 -0
  62. package/dist/{ts3.9 → types}/client/preview/index.d.ts +0 -0
  63. package/dist/{ts3.9 → types}/client/preview/index.js +6 -4
  64. package/dist/{ts3.9 → types}/client/preview/render.d.ts +0 -0
  65. package/dist/types/client/preview/render.js +24 -0
  66. package/dist/{ts3.9 → types}/client/preview/types-6-0.d.ts +0 -0
  67. package/dist/{ts3.9 → types}/client/preview/types-6-0.js +0 -0
  68. package/dist/{ts3.9 → types}/client/preview/types-7-0.d.ts +0 -0
  69. package/dist/{ts3.9 → types}/client/preview/types-7-0.js +0 -0
  70. package/dist/{ts3.9 → types}/client/preview/types.d.ts +0 -0
  71. package/dist/{ts3.9 → types}/client/preview/types.js +0 -0
  72. package/dist/{ts3.4/public_api.d.ts → types/index.d.ts} +2 -1
  73. package/dist/{ts3.9/public_api.js → types/index.js} +7 -2
  74. package/dist/types/preset.d.ts +12 -0
  75. package/dist/types/preset.js +21 -0
  76. package/dist/{ts3.9 → types}/renderer.d.ts +0 -0
  77. package/dist/{ts3.9 → types}/renderer.js +1 -0
  78. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -0
  79. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/angular.json +0 -0
  80. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -0
  81. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/main.js +0 -0
  82. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -0
  83. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +0 -0
  84. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/angular.json +0 -0
  85. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -0
  86. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/main.js +0 -0
  87. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -0
  88. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/tsconfig.json +0 -0
  89. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -0
  90. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -0
  91. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -0
  92. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -0
  93. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +0 -0
  94. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/angular.json +0 -0
  95. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -0
  96. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -0
  97. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +0 -0
  98. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/tsconfig.json +0 -0
  99. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/angular.json +0 -0
  100. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/nx.json +0 -0
  101. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -0
  102. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/main.js +0 -0
  103. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -0
  104. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -0
  105. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -0
  106. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -0
  107. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -0
  108. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -0
  109. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -0
  110. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -0
  111. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/angular.json +0 -0
  112. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -0
  113. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -0
  114. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -0
  115. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -0
  116. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build/angular.json +0 -0
  117. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -0
  118. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -0
  119. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -0
  120. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -0
  121. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -0
  122. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +0 -0
  123. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -0
  124. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -0
  125. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -0
  126. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -0
  127. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -0
  128. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -0
  129. package/dist/{ts3.9 → types}/server/angular-cli-webpack-12.2.x.d.ts +0 -0
  130. package/dist/types/server/angular-cli-webpack-12.2.x.js +66 -0
  131. package/dist/{ts3.9 → types}/server/angular-cli-webpack-13.x.x.d.ts +0 -0
  132. package/dist/types/server/angular-cli-webpack-13.x.x.js +70 -0
  133. package/dist/types/server/angular-cli-webpack-older.d.ts +6 -0
  134. package/dist/types/server/angular-cli-webpack-older.js +111 -0
  135. package/dist/{ts3.9 → types}/server/angular-devkit-build-webpack.d.ts +6 -6
  136. package/dist/{ts3.9 → types}/server/angular-devkit-build-webpack.js +66 -54
  137. package/dist/{ts3.9 → types}/server/angular-read-workspace.d.ts +0 -0
  138. package/dist/{ts3.9 → types}/server/angular-read-workspace.js +8 -14
  139. package/dist/{ts3.9 → types}/server/create-fork-ts-checker-plugin.d.ts +0 -0
  140. package/dist/{ts3.9 → types}/server/create-fork-ts-checker-plugin.js +1 -1
  141. package/dist/{ts3.9 → types}/server/framework-preset-angular-cli.d.ts +1 -1
  142. package/dist/types/server/framework-preset-angular-cli.js +175 -0
  143. package/dist/{ts3.9 → types}/server/framework-preset-angular-docs.d.ts +0 -0
  144. package/dist/{ts3.9 → types}/server/framework-preset-angular-docs.js +4 -3
  145. package/dist/{ts3.9 → types}/server/framework-preset-angular-ivy.d.ts +1 -1
  146. package/dist/{ts3.9 → types}/server/framework-preset-angular-ivy.js +26 -22
  147. package/dist/{ts3.9 → types}/server/framework-preset-angular.d.ts +0 -0
  148. package/dist/types/server/framework-preset-angular.js +103 -0
  149. package/dist/{ts3.9 → types}/server/ngx-template-loader/index.d.ts +0 -0
  150. package/dist/{ts3.9 → types}/server/ngx-template-loader/index.js +0 -0
  151. package/dist/{ts3.9/server/options.d.ts → types/server/preset-options.d.ts} +1 -3
  152. package/dist/{ts3.9/types/index.js → types/server/preset-options.js} +0 -0
  153. package/dist/{ts3.9 → types}/server/ts_config.d.ts +0 -0
  154. package/dist/{ts3.9 → types}/server/ts_config.js +0 -0
  155. package/dist/{ts3.9 → types}/server/utils/filter-out-styling-rules.d.ts +0 -0
  156. package/dist/{ts3.9 → types}/server/utils/filter-out-styling-rules.js +2 -1
  157. package/dist/{ts3.9 → types}/server/utils/module-is-available.d.ts +0 -0
  158. package/dist/{ts3.9 → types}/server/utils/module-is-available.js +2 -1
  159. package/dist/{ts3.4 → types}/server/utils/normalize-asset-patterns.d.ts +7 -6
  160. package/dist/{ts3.9 → types}/server/utils/normalize-asset-patterns.js +9 -9
  161. package/dist/{ts3.9 → types}/server/utils/normalize-optimization.d.ts +1 -1
  162. package/dist/{ts3.9 → types}/server/utils/normalize-optimization.js +3 -2
  163. package/dist/types/types.d.ts +13 -0
  164. package/dist/types/types.js +2 -0
  165. package/jest.config.js +1 -0
  166. package/package.json +47 -56
  167. package/preset.js +1 -1
  168. package/renderer.d.ts +1 -1
  169. package/renderer.js +1 -1
  170. package/standalone.js +2 -3
  171. package/types-6-0.d.ts +1 -1
  172. package/types-7-0.d.ts +1 -1
  173. package/bin/build.js +0 -4
  174. package/bin/index.js +0 -3
  175. package/demo.d.ts +0 -4
  176. package/demo.js +0 -5
  177. package/dist/ts3.4/builders/build-storybook/index.d.ts +0 -15
  178. package/dist/ts3.4/builders/start-storybook/index.d.ts +0 -15
  179. package/dist/ts3.4/builders/utils/build-standalone-errors-handler.d.ts +0 -1
  180. package/dist/ts3.4/builders/utils/run-compodoc.d.ts +0 -6
  181. package/dist/ts3.4/client/docs/compodoc.d.ts +0 -18
  182. package/dist/ts3.4/client/docs/config.d.ts +0 -15
  183. package/dist/ts3.4/client/docs/index.d.ts +0 -1
  184. package/dist/ts3.4/client/docs/prepareForInline.d.ts +0 -7
  185. package/dist/ts3.4/client/docs/sourceDecorator.d.ts +0 -9
  186. package/dist/ts3.4/client/docs/types.d.ts +0 -102
  187. package/dist/ts3.4/client/index.d.ts +0 -4
  188. package/dist/ts3.4/client/preview/angular/app.token.d.ts +0 -3
  189. package/dist/ts3.4/client/preview/angular/components/app.component.d.ts +0 -38
  190. package/dist/ts3.4/client/preview/angular/helpers.d.ts +0 -8
  191. package/dist/ts3.4/client/preview/angular-beta/AbstractRenderer.d.ts +0 -57
  192. package/dist/ts3.4/client/preview/angular-beta/CanvasRenderer.d.ts +0 -14
  193. package/dist/ts3.4/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +0 -17
  194. package/dist/ts3.4/client/preview/angular-beta/DocsRenderer.d.ts +0 -14
  195. package/dist/ts3.4/client/preview/angular-beta/RendererFactory.d.ts +0 -11
  196. package/dist/ts3.4/client/preview/angular-beta/StorybookModule.d.ts +0 -9
  197. package/dist/ts3.4/client/preview/angular-beta/StorybookProvider.d.ts +0 -5
  198. package/dist/ts3.4/client/preview/angular-beta/StorybookWrapperComponent.d.ts +0 -9
  199. package/dist/ts3.4/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -28
  200. package/dist/ts3.4/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
  201. package/dist/ts3.4/client/preview/angular-polyfills.d.ts +0 -41
  202. package/dist/ts3.4/client/preview/config.d.ts +0 -6
  203. package/dist/ts3.4/client/preview/decorateStory.d.ts +0 -4
  204. package/dist/ts3.4/client/preview/decorators.d.ts +0 -6
  205. package/dist/ts3.4/client/preview/globals.d.ts +0 -1
  206. package/dist/ts3.4/client/preview/index.d.ts +0 -25
  207. package/dist/ts3.4/client/preview/render.d.ts +0 -7
  208. package/dist/ts3.4/client/preview/types-6-0.d.ts +0 -42
  209. package/dist/ts3.4/client/preview/types-7-0.d.ts +0 -9
  210. package/dist/ts3.4/client/preview/types.d.ts +0 -29
  211. package/dist/ts3.4/demo/button.component.d.ts +0 -5
  212. package/dist/ts3.4/demo/welcome.component.d.ts +0 -4
  213. package/dist/ts3.4/renderer.d.ts +0 -4
  214. package/dist/ts3.4/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
  215. package/dist/ts3.4/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
  216. package/dist/ts3.4/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
  217. package/dist/ts3.4/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
  218. package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
  219. package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
  220. package/dist/ts3.4/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
  221. package/dist/ts3.4/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
  222. package/dist/ts3.4/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
  223. package/dist/ts3.4/server/angular-cli-webpack-12.2.x.d.ts +0 -1
  224. package/dist/ts3.4/server/angular-cli-webpack-13.x.x.d.ts +0 -1
  225. package/dist/ts3.4/server/angular-cli-webpack-older.d.ts +0 -73
  226. package/dist/ts3.4/server/angular-devkit-build-webpack.d.ts +0 -30
  227. package/dist/ts3.4/server/angular-read-workspace.d.ts +0 -13
  228. package/dist/ts3.4/server/build.d.ts +0 -1
  229. package/dist/ts3.4/server/create-fork-ts-checker-plugin.d.ts +0 -3
  230. package/dist/ts3.4/server/framework-preset-angular-cli.d.ts +0 -3
  231. package/dist/ts3.4/server/framework-preset-angular-docs.d.ts +0 -2
  232. package/dist/ts3.4/server/framework-preset-angular-ivy.d.ts +0 -10
  233. package/dist/ts3.4/server/framework-preset-angular.d.ts +0 -5
  234. package/dist/ts3.4/server/index.d.ts +0 -1
  235. package/dist/ts3.4/server/ngx-template-loader/index.d.ts +0 -1
  236. package/dist/ts3.4/server/options.d.ts +0 -14
  237. package/dist/ts3.4/server/preset.d.ts +0 -3
  238. package/dist/ts3.4/server/ts_config.d.ts +0 -2
  239. package/dist/ts3.4/server/utils/filter-out-styling-rules.d.ts +0 -2
  240. package/dist/ts3.4/server/utils/module-is-available.d.ts +0 -1
  241. package/dist/ts3.4/server/utils/normalize-optimization.d.ts +0 -3
  242. package/dist/ts3.4/types/index.d.ts +0 -6
  243. package/dist/ts3.9/builders/build-storybook/index.js +0 -65
  244. package/dist/ts3.9/builders/start-storybook/index.js +0 -73
  245. package/dist/ts3.9/client/docs/prepareForInline.js +0 -45
  246. package/dist/ts3.9/client/preview/angular-beta/CanvasRenderer.js +0 -34
  247. package/dist/ts3.9/client/preview/angular-beta/DocsRenderer.js +0 -59
  248. package/dist/ts3.9/client/preview/angular-beta/RendererFactory.js +0 -65
  249. package/dist/ts3.9/client/preview/render.js +0 -34
  250. package/dist/ts3.9/demo/button.component.d.ts +0 -5
  251. package/dist/ts3.9/demo/button.component.js +0 -46
  252. package/dist/ts3.9/demo/welcome.component.d.ts +0 -4
  253. package/dist/ts3.9/demo/welcome.component.js +0 -99
  254. package/dist/ts3.9/public_api.d.ts +0 -1
  255. package/dist/ts3.9/server/angular-cli-webpack-12.2.x.js +0 -56
  256. package/dist/ts3.9/server/angular-cli-webpack-13.x.x.js +0 -60
  257. package/dist/ts3.9/server/angular-cli-webpack-older.d.ts +0 -73
  258. package/dist/ts3.9/server/angular-cli-webpack-older.js +0 -110
  259. package/dist/ts3.9/server/build.d.ts +0 -1
  260. package/dist/ts3.9/server/build.js +0 -28
  261. package/dist/ts3.9/server/framework-preset-angular-cli.js +0 -177
  262. package/dist/ts3.9/server/framework-preset-angular.js +0 -100
  263. package/dist/ts3.9/server/index.d.ts +0 -1
  264. package/dist/ts3.9/server/index.js +0 -8
  265. package/dist/ts3.9/server/options.js +0 -8
  266. package/dist/ts3.9/server/preset.d.ts +0 -3
  267. package/dist/ts3.9/server/preset.js +0 -13
  268. package/dist/ts3.9/server/utils/normalize-asset-patterns.d.ts +0 -6
  269. package/dist/ts3.9/types/index.d.ts +0 -6
@@ -1,46 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const core_1 = require("@angular/core");
13
- let ButtonComponent = class ButtonComponent {
14
- constructor() {
15
- this.text = '';
16
- this.onClick = new core_1.EventEmitter();
17
- }
18
- };
19
- __decorate([
20
- core_1.Input(),
21
- __metadata("design:type", Object)
22
- ], ButtonComponent.prototype, "text", void 0);
23
- __decorate([
24
- core_1.Output(),
25
- __metadata("design:type", Object)
26
- ], ButtonComponent.prototype, "onClick", void 0);
27
- ButtonComponent = __decorate([
28
- core_1.Component({
29
- selector: 'storybook-button-component',
30
- template: ` <button (click)="onClick.emit($event)">{{ text }}</button> `,
31
- styles: [
32
- `
33
- button {
34
- border: 1px solid #eee;
35
- border-radius: 3px;
36
- background-color: #ffffff;
37
- cursor: pointer;
38
- font-size: 15px;
39
- padding: 3px 10px;
40
- margin: 10px;
41
- }
42
- `,
43
- ],
44
- })
45
- ], ButtonComponent);
46
- exports.default = ButtonComponent;
@@ -1,4 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- export default class WelcomeComponent {
3
- showApp: EventEmitter<any>;
4
- }
@@ -1,99 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const core_1 = require("@angular/core");
13
- let WelcomeComponent = class WelcomeComponent {
14
- constructor() {
15
- this.showApp = new core_1.EventEmitter();
16
- }
17
- };
18
- __decorate([
19
- core_1.Output(),
20
- __metadata("design:type", Object)
21
- ], WelcomeComponent.prototype, "showApp", void 0);
22
- WelcomeComponent = __decorate([
23
- core_1.Component({
24
- selector: 'storybook-welcome-component',
25
- template: `
26
- <main>
27
- <h1>Welcome to storybook</h1>
28
- <p>This is a UI component dev environment for your app.</p>
29
- <p>
30
- We've added some basic stories inside the
31
- <span class="inline-code">src/stories</span> directory. <br />
32
- A story is a single state of one or more UI components. You can have as many stories as you
33
- want. <br />
34
- (Basically a story is like a visual test case.)
35
- </p>
36
- <p>
37
- See these sample
38
- <a (click)="showApp.emit($event)" role="button" tabIndex="0">stories</a> for a component
39
- called <span class="inline-code">Button</span> .
40
- </p>
41
- <p>
42
- Just like that, you can add your own components as stories. <br />
43
- You can also edit those components and see changes right away. <br />
44
- (Try editing the <span class="inline-code">Button</span> stories located at
45
- <span class="inline-code">src/stories/index.js</span>.)
46
- </p>
47
- <p>
48
- Usually we create stories with smaller UI components in the app.<br />
49
- Have a look at the
50
- <a
51
- href="https://storybook.js.org/basics/writing-stories"
52
- target="_blank"
53
- rel="noopener noreferrer"
54
- >
55
- Writing Stories
56
- </a>
57
- section in our documentation.
58
- </p>
59
- <p class="note">
60
- <b>NOTE:</b> <br />
61
- Have a look at the <span class="inline-code">.storybook/webpack.config.js</span> to add
62
- webpack loaders and plugins you are using in this project.
63
- </p>
64
- </main>
65
- `,
66
- styles: [
67
- `
68
- main {
69
- padding: 15px;
70
- line-height: 1.4;
71
- font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif;
72
- background-color: #ffffff;
73
- }
74
-
75
- .note {
76
- opacity: 0.5;
77
- }
78
-
79
- .inline-code {
80
- font-size: 15px;
81
- font-weight: 600;
82
- padding: 2px 5px;
83
- border: 1px solid #eae9e9;
84
- border-radius: 4px;
85
- background-color: #f3f2f2;
86
- color: #3a3a3a;
87
- }
88
-
89
- a {
90
- color: #1474f3;
91
- text-decoration: none;
92
- border-bottom: 1px solid #1474f3;
93
- padding-bottom: 2px;
94
- }
95
- `,
96
- ],
97
- })
98
- ], WelcomeComponent);
99
- exports.default = WelcomeComponent;
@@ -1 +0,0 @@
1
- export * from './client';
@@ -1,56 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- // Private angular devkit stuff
11
- const { generateI18nBrowserWebpackConfigFromContext, } = require('@angular-devkit/build-angular/src/utils/webpack-browser-config');
12
- const { getCommonConfig, getStylesConfig, getTypeScriptConfig, } = require('@angular-devkit/build-angular/src/webpack/configs');
13
- const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
14
- const { filterOutStylingRules } = require('./utils/filter-out-styling-rules');
15
- /**
16
- * Extract webpack config from angular-cli 12.2.x
17
- * ⚠️ This file is in JavaScript to not use TypeScript. Because current storybook TypeScript version is not compatible with Angular CLI.
18
- * FIXME: Try another way with TypeScript on future storybook version (7 maybe 🤞)
19
- *
20
- * @param {*} baseConfig Previous webpack config from storybook
21
- * @param {*} options { builderOptions, builderContext }
22
- */
23
- exports.getWebpackConfig = (baseConfig, { builderOptions, builderContext }) => __awaiter(void 0, void 0, void 0, function* () {
24
- var _a, _b, _c;
25
- /**
26
- * Get angular-cli Webpack config
27
- */
28
- const { config: cliConfig } = yield generateI18nBrowserWebpackConfigFromContext(Object.assign(Object.assign({
29
- // Default options
30
- index: 'noop-index', main: 'noop-main', outputPath: 'noop-out' }, builderOptions), {
31
- // Fixed options
32
- optimization: false, namedChunks: false, progress: false, buildOptimizer: false, aot: false }), builderContext, (wco) => [getCommonConfig(wco), getStylesConfig(wco), getTypeScriptConfig(wco)]);
33
- /**
34
- * Merge baseConfig Webpack with angular-cli Webpack
35
- */
36
- const entry = [
37
- ...baseConfig.entry,
38
- ...((_a = cliConfig.entry.styles) !== null && _a !== void 0 ? _a : []),
39
- ...((_b = cliConfig.entry.polyfills) !== null && _b !== void 0 ? _b : []),
40
- ];
41
- // Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
42
- // because @angular-devkit/build-angular created rules have include/exclude for global style files.
43
- const rulesExcludingStyles = filterOutStylingRules(baseConfig);
44
- const module = Object.assign(Object.assign({}, baseConfig.module), { rules: [...cliConfig.module.rules, ...rulesExcludingStyles] });
45
- const plugins = [...((_c = cliConfig.plugins) !== null && _c !== void 0 ? _c : []), ...baseConfig.plugins];
46
- const resolve = Object.assign(Object.assign({}, baseConfig.resolve), { modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliConfig.resolve.modules])), plugins: [
47
- new TsconfigPathsPlugin({
48
- configFile: builderOptions.tsConfig,
49
- mainFields: ['browser', 'module', 'main'],
50
- }),
51
- ] });
52
- return Object.assign(Object.assign({}, baseConfig), { entry,
53
- module,
54
- plugins,
55
- resolve, resolveLoader: cliConfig.resolveLoader });
56
- });
@@ -1,60 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- // Private angular devkit stuff
11
- const { generateI18nBrowserWebpackConfigFromContext, } = require('@angular-devkit/build-angular/src/utils/webpack-browser-config');
12
- const { getCommonConfig, getStylesConfig, getDevServerConfig, getTypeScriptConfig, } = require('@angular-devkit/build-angular/src/webpack/configs');
13
- const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
14
- const { filterOutStylingRules } = require('./utils/filter-out-styling-rules');
15
- /**
16
- * Extract webpack config from angular-cli 13.x.x
17
- * ⚠️ This file is in JavaScript to not use TypeScript. Because current storybook TypeScript version is not compatible with Angular CLI.
18
- * FIXME: Try another way with TypeScript on future storybook version (7 maybe 🤞)
19
- *
20
- * @param {*} baseConfig Previous webpack config from storybook
21
- * @param {*} options { builderOptions, builderContext }
22
- */
23
- exports.getWebpackConfig = (baseConfig, { builderOptions, builderContext }) => __awaiter(void 0, void 0, void 0, function* () {
24
- var _a, _b, _c;
25
- /**
26
- * Get angular-cli Webpack config
27
- */
28
- const { config: cliConfig } = yield generateI18nBrowserWebpackConfigFromContext(Object.assign(Object.assign({
29
- // Default options
30
- index: 'noop-index', main: 'noop-main', outputPath: 'noop-out' }, builderOptions), {
31
- // Fixed options
32
- optimization: false, namedChunks: false, progress: false, buildOptimizer: false, aot: false }), builderContext, (wco) => [
33
- getCommonConfig(wco),
34
- getStylesConfig(wco),
35
- getTypeScriptConfig ? getTypeScriptConfig(wco) : getDevServerConfig(wco),
36
- ]);
37
- /**
38
- * Merge baseConfig Webpack with angular-cli Webpack
39
- */
40
- const entry = [
41
- ...baseConfig.entry,
42
- ...((_a = cliConfig.entry.styles) !== null && _a !== void 0 ? _a : []),
43
- ...((_b = cliConfig.entry.polyfills) !== null && _b !== void 0 ? _b : []),
44
- ];
45
- // Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
46
- // because @angular-devkit/build-angular created rules have include/exclude for global style files.
47
- const rulesExcludingStyles = filterOutStylingRules(baseConfig);
48
- const module = Object.assign(Object.assign({}, baseConfig.module), { rules: [...cliConfig.module.rules, ...rulesExcludingStyles] });
49
- const plugins = [...((_c = cliConfig.plugins) !== null && _c !== void 0 ? _c : []), ...baseConfig.plugins];
50
- const resolve = Object.assign(Object.assign({}, baseConfig.resolve), { modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliConfig.resolve.modules])), plugins: [
51
- new TsconfigPathsPlugin({
52
- configFile: builderOptions.tsConfig,
53
- mainFields: ['browser', 'module', 'main'],
54
- }),
55
- ] });
56
- return Object.assign(Object.assign({}, baseConfig), { entry,
57
- module,
58
- plugins,
59
- resolve, resolveLoader: cliConfig.resolveLoader });
60
- });
@@ -1,73 +0,0 @@
1
- import webpack from 'webpack';
2
- import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
3
- import { PresetOptions } from './options';
4
- /**
5
- * Old way currently support version lower than 12.2.x
6
- */
7
- export declare function getWebpackConfig(baseConfig: webpack.Configuration, options: PresetOptions): Promise<webpack.Configuration | {
8
- entry: any[];
9
- module: {
10
- rules: webpack.RuleSetRule[];
11
- noParse?: RegExp | RegExp[] | ((content: string) => boolean);
12
- unknownContextRequest?: string;
13
- unknownContextRecursive?: boolean;
14
- unknownContextRegExp?: RegExp;
15
- unknownContextCritical?: boolean;
16
- exprContextRequest?: string;
17
- exprContextRegExp?: RegExp;
18
- exprContextRecursive?: boolean;
19
- exprContextCritical?: boolean;
20
- wrappedContextRegExp?: RegExp;
21
- wrappedContextRecursive?: boolean;
22
- wrappedContextCritical?: boolean;
23
- strictExportPresence?: boolean;
24
- };
25
- plugins: webpack.Plugin[];
26
- resolve: {
27
- modules: string[];
28
- plugins: TsconfigPathsPlugin[];
29
- descriptionFiles?: string[];
30
- mainFields?: string[] | string[][];
31
- aliasFields?: string[] | string[][];
32
- mainFiles?: string[];
33
- extensions?: string[];
34
- enforceExtension?: boolean;
35
- alias?: {
36
- [key: string]: string;
37
- };
38
- unsafeCache?: boolean | {};
39
- cachePredicate?(data: {
40
- path: string;
41
- request: string;
42
- }): boolean;
43
- symlinks?: boolean;
44
- cacheWithContext?: boolean;
45
- roots?: string[];
46
- };
47
- resolveLoader: webpack.ResolveLoader;
48
- mode?: "development" | "production" | "none";
49
- name?: string;
50
- context?: string;
51
- devtool?: string | boolean;
52
- output?: webpack.Output;
53
- externals?: string | RegExp | webpack.ExternalsObjectElement | webpack.ExternalsFunctionElement | webpack.ExternalsElement[];
54
- target?: "node" | "web" | "webworker" | "async-node" | "node-webkit" | "atom" | "electron" | "electron-renderer" | "electron-preload" | "electron-main" | ((compiler?: any) => void);
55
- bail?: boolean;
56
- profile?: boolean;
57
- cache?: boolean | object;
58
- watch?: boolean;
59
- watchOptions?: webpack.ICompiler.WatchOptions;
60
- node?: false | webpack.Node;
61
- amd?: {
62
- [moduleName: string]: boolean;
63
- };
64
- recordsPath?: string;
65
- recordsInputPath?: string;
66
- recordsOutputPath?: string;
67
- stats?: webpack.Stats.ToStringOptions;
68
- performance?: false | webpack.Options.Performance;
69
- parallelism?: number;
70
- optimization?: webpack.Options.Optimization;
71
- infrastructureLogging?: webpack.Options.InfrastructureLogging;
72
- devServer?: import("webpack-dev-server").Configuration;
73
- }>;
@@ -1,110 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.getWebpackConfig = void 0;
16
- const node_logger_1 = require("@storybook/node-logger");
17
- const tsconfig_paths_webpack_plugin_1 = __importDefault(require("tsconfig-paths-webpack-plugin"));
18
- const architect_1 = require("@angular-devkit/architect");
19
- const angular_read_workspace_1 = require("./angular-read-workspace");
20
- const angular_devkit_build_webpack_1 = require("./angular-devkit-build-webpack");
21
- const filter_out_styling_rules_1 = require("./utils/filter-out-styling-rules");
22
- /**
23
- * Old way currently support version lower than 12.2.x
24
- */
25
- function getWebpackConfig(baseConfig, options) {
26
- return __awaiter(this, void 0, void 0, function* () {
27
- const dirToSearch = process.cwd();
28
- // Read angular workspace
29
- let workspaceConfig;
30
- try {
31
- workspaceConfig = yield angular_read_workspace_1.readAngularWorkspaceConfig(dirToSearch);
32
- }
33
- catch (error) {
34
- node_logger_1.logger.error(`=> Could not find angular workspace config (angular.json) on this path "${dirToSearch}"`);
35
- node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
36
- return baseConfig;
37
- }
38
- // Find angular project target
39
- let project;
40
- let target;
41
- let confName;
42
- try {
43
- // Default behavior when `angularBrowserTarget` are not explicitly defined to null
44
- if (options.angularBrowserTarget !== null) {
45
- const browserTarget = options.angularBrowserTarget
46
- ? architect_1.targetFromTargetString(options.angularBrowserTarget)
47
- : {
48
- configuration: undefined,
49
- project: angular_read_workspace_1.getDefaultProjectName(workspaceConfig),
50
- target: 'build',
51
- };
52
- const fondProject = angular_read_workspace_1.findAngularProjectTarget(workspaceConfig, browserTarget.project, browserTarget.target);
53
- project = fondProject.project;
54
- target = fondProject.target;
55
- confName = browserTarget.configuration;
56
- node_logger_1.logger.info(`=> Using angular project "${browserTarget.project}:${browserTarget.target}${confName ? `:${confName}` : ''}" for configuring Storybook`);
57
- }
58
- // Start storybook when only tsConfig is provided.
59
- if (options.angularBrowserTarget === null && options.tsConfig) {
60
- node_logger_1.logger.info(`=> Using default angular project with "tsConfig:${options.tsConfig}"`);
61
- project = { root: '', extensions: {}, targets: undefined };
62
- target = { builder: '', options: { tsConfig: options.tsConfig } };
63
- }
64
- }
65
- catch (error) {
66
- node_logger_1.logger.error(`=> Could not find angular project: ${error.message}`);
67
- node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
68
- return baseConfig;
69
- }
70
- // Use angular-cli to get some webpack config
71
- let angularCliWebpackConfig;
72
- try {
73
- angularCliWebpackConfig = yield angular_devkit_build_webpack_1.extractAngularCliWebpackConfig(dirToSearch, project, target, confName);
74
- node_logger_1.logger.info(`=> Using angular-cli webpack config`);
75
- }
76
- catch (error) {
77
- node_logger_1.logger.error(`=> Could not get angular cli webpack config`);
78
- throw error;
79
- }
80
- return mergeAngularCliWebpackConfig(angularCliWebpackConfig, baseConfig);
81
- });
82
- }
83
- exports.getWebpackConfig = getWebpackConfig;
84
- function mergeAngularCliWebpackConfig({ cliCommonWebpackConfig, cliStyleWebpackConfig, tsConfigPath }, baseConfig) {
85
- // Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
86
- // because @angular-devkit/build-angular created rules have include/exclude for global style files.
87
- const rulesExcludingStyles = filter_out_styling_rules_1.filterOutStylingRules(baseConfig);
88
- // styleWebpackConfig.entry adds global style files to the webpack context
89
- const entry = [
90
- ...baseConfig.entry,
91
- ...Object.values(cliStyleWebpackConfig.entry).reduce((acc, item) => acc.concat(item), []),
92
- ];
93
- const module = Object.assign(Object.assign({}, baseConfig.module), { rules: [...cliStyleWebpackConfig.module.rules, ...rulesExcludingStyles] });
94
- // We use cliCommonConfig plugins to serve static assets files.
95
- const plugins = [
96
- ...cliStyleWebpackConfig.plugins,
97
- ...cliCommonWebpackConfig.plugins,
98
- ...baseConfig.plugins,
99
- ];
100
- const resolve = Object.assign(Object.assign({}, baseConfig.resolve), { modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliCommonWebpackConfig.resolve.modules])), plugins: [
101
- new tsconfig_paths_webpack_plugin_1.default({
102
- configFile: tsConfigPath,
103
- mainFields: ['browser', 'module', 'main'],
104
- }),
105
- ] });
106
- return Object.assign(Object.assign({}, baseConfig), { entry,
107
- module,
108
- plugins,
109
- resolve, resolveLoader: cliCommonWebpackConfig.resolveLoader });
110
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const server_1 = require("@storybook/core/server");
16
- const node_logger_1 = require("@storybook/node-logger");
17
- const options_1 = __importDefault(require("./options"));
18
- function build() {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- try {
21
- yield server_1.buildStatic(options_1.default);
22
- }
23
- catch (error) {
24
- node_logger_1.logger.error(error);
25
- }
26
- });
27
- }
28
- build();
@@ -1,177 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
- return new (P || (P = Promise))(function (resolve, reject) {
24
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28
- });
29
- };
30
- var __importDefault = (this && this.__importDefault) || function (mod) {
31
- return (mod && mod.__esModule) ? mod : { "default": mod };
32
- };
33
- Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.webpackFinal = void 0;
35
- const node_logger_1 = require("@storybook/node-logger");
36
- const architect_1 = require("@angular-devkit/architect");
37
- const find_up_1 = require("find-up");
38
- const semver_1 = __importDefault(require("@storybook/semver"));
39
- const ts_dedent_1 = __importDefault(require("ts-dedent"));
40
- const core_1 = require("@angular-devkit/core");
41
- const module_is_available_1 = require("./utils/module-is-available");
42
- const angular_cli_webpack_12_2_x_1 = require("./angular-cli-webpack-12.2.x");
43
- const angular_cli_webpack_13_x_x_1 = require("./angular-cli-webpack-13.x.x");
44
- const angular_cli_webpack_older_1 = require("./angular-cli-webpack-older");
45
- const angular_read_workspace_1 = require("./angular-read-workspace");
46
- function webpackFinal(baseConfig, options) {
47
- return __awaiter(this, void 0, void 0, function* () {
48
- if (!module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular')) {
49
- node_logger_1.logger.info('=> Using base config because "@angular-devkit/build-angular" is not installed');
50
- return baseConfig;
51
- }
52
- const angularCliVersion = yield Promise.resolve().then(() => __importStar(require('@angular/cli'))).then((m) => semver_1.default.coerce(m.VERSION.full));
53
- /**
54
- * Ordered array to use the specific getWebpackConfig according to some condition like angular-cli version
55
- */
56
- const webpackGetterByVersions = [
57
- {
58
- info: '=> Loading angular-cli config for angular >= 13.0.0',
59
- condition: semver_1.default.satisfies(angularCliVersion, '>=13.0.0'),
60
- getWebpackConfig: (_baseConfig, _options) => __awaiter(this, void 0, void 0, function* () {
61
- const builderContext = getBuilderContext(_options);
62
- const builderOptions = yield getBuilderOptions(_options, builderContext);
63
- const legacyDefaultOptions = yield getLegacyDefaultBuildOptions(_options);
64
- return angular_cli_webpack_13_x_x_1.getWebpackConfig(_baseConfig, {
65
- builderOptions: Object.assign(Object.assign({ watch: options.configType === 'DEVELOPMENT' }, legacyDefaultOptions), builderOptions),
66
- builderContext,
67
- });
68
- }),
69
- },
70
- {
71
- info: '=> Loading angular-cli config for angular 12.2.x',
72
- condition: semver_1.default.satisfies(angularCliVersion, '12.2.x') && options.angularBuilderContext,
73
- getWebpackConfig: (_baseConfig, _options) => __awaiter(this, void 0, void 0, function* () {
74
- const builderContext = getBuilderContext(_options);
75
- const builderOptions = yield getBuilderOptions(_options, builderContext);
76
- return angular_cli_webpack_12_2_x_1.getWebpackConfig(_baseConfig, {
77
- builderOptions,
78
- builderContext,
79
- });
80
- }),
81
- },
82
- {
83
- info: '=> Loading angular-cli config for angular lower than 12.2.0',
84
- condition: true,
85
- getWebpackConfig: angular_cli_webpack_older_1.getWebpackConfig,
86
- },
87
- ];
88
- const webpackGetter = webpackGetterByVersions.find((wg) => wg.condition);
89
- node_logger_1.logger.info(webpackGetter.info);
90
- return Promise.resolve(webpackGetter.getWebpackConfig(baseConfig, options));
91
- });
92
- }
93
- exports.webpackFinal = webpackFinal;
94
- /**
95
- * Get Builder Context
96
- * If storybook is not start by angular builder create dumb BuilderContext
97
- */
98
- function getBuilderContext(options) {
99
- var _a;
100
- return ((_a = options.angularBuilderContext) !== null && _a !== void 0 ? _a : {
101
- target: { project: 'noop-project', builder: '', options: {} },
102
- workspaceRoot: process.cwd(),
103
- getProjectMetadata: () => ({}),
104
- getTargetOptions: () => ({}),
105
- logger: new core_1.logging.Logger('Storybook'),
106
- });
107
- }
108
- /**
109
- * Get builder options
110
- * Merge target options from browser target and from storybook options
111
- */
112
- function getBuilderOptions(options, builderContext) {
113
- var _a, _b;
114
- return __awaiter(this, void 0, void 0, function* () {
115
- /**
116
- * Get Browser Target options
117
- */
118
- let browserTargetOptions = {};
119
- if (options.angularBrowserTarget) {
120
- const browserTarget = architect_1.targetFromTargetString(options.angularBrowserTarget);
121
- node_logger_1.logger.info(`=> Using angular browser target options from "${browserTarget.project}:${browserTarget.target}${browserTarget.configuration ? `:${browserTarget.configuration}` : ''}"`);
122
- browserTargetOptions = yield builderContext.getTargetOptions(browserTarget);
123
- }
124
- /**
125
- * Merge target options from browser target options and from storybook options
126
- */
127
- const builderOptions = Object.assign(Object.assign(Object.assign({}, browserTargetOptions), options.angularBuilderOptions), { tsConfig: (_b = (_a = options.tsConfig) !== null && _a !== void 0 ? _a : find_up_1.sync('tsconfig.json', { cwd: options.configDir })) !== null && _b !== void 0 ? _b : browserTargetOptions.tsConfig });
128
- node_logger_1.logger.info(`=> Using angular project with "tsConfig:${builderOptions.tsConfig}"`);
129
- return builderOptions;
130
- });
131
- }
132
- /**
133
- * Get options from legacy way
134
- * /!\ This is only for backward compatibility and would be removed on Storybook 7.0
135
- * only work for angular.json with [defaultProject].build or "storybook.build" config
136
- */
137
- function getLegacyDefaultBuildOptions(options) {
138
- return __awaiter(this, void 0, void 0, function* () {
139
- if (options.angularBrowserTarget !== undefined) {
140
- // Not use legacy way with builder (`angularBrowserTarget` is defined or null with builder and undefined without)
141
- return {};
142
- }
143
- node_logger_1.logger.warn(ts_dedent_1.default `Your Storybook startup uses a solution that will not be supported in version 7.0.
144
- You must use angular builder to have an explicit configuration on the project used in angular.json
145
- Read more at:
146
- - https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sb-angular-builder)
147
- - https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular13)
148
- `);
149
- const dirToSearch = process.cwd();
150
- // Read angular workspace
151
- let workspaceConfig;
152
- try {
153
- workspaceConfig = yield angular_read_workspace_1.readAngularWorkspaceConfig(dirToSearch);
154
- }
155
- catch (error) {
156
- node_logger_1.logger.error(`=> Could not find angular workspace config (angular.json) on this path "${dirToSearch}"`);
157
- node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
158
- return {};
159
- }
160
- // Find angular project target
161
- try {
162
- const browserTarget = {
163
- configuration: undefined,
164
- project: angular_read_workspace_1.getDefaultProjectName(workspaceConfig),
165
- target: 'build',
166
- };
167
- const { target, project } = angular_read_workspace_1.findAngularProjectTarget(workspaceConfig, browserTarget.project, browserTarget.target);
168
- node_logger_1.logger.info(`=> Using angular project "${browserTarget.project}:${browserTarget.target}" for configuring Storybook`);
169
- return Object.assign({}, target.options);
170
- }
171
- catch (error) {
172
- node_logger_1.logger.error(`=> Could not find angular project: ${error.message}`);
173
- node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
174
- return {};
175
- }
176
- });
177
- }