@storybook/angular 6.5.6 → 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
@@ -11,5 +11,5 @@ export declare type StorybookBuilderOptions = JsonObject & {
11
11
  stylePreprocessorOptions?: StylePreprocessorOptions;
12
12
  } & Pick<CLIOptions, 'outputDir' | 'configDir' | 'loglevel' | 'quiet' | 'docs' | 'webpackStatsJson'>;
13
13
  export declare type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
14
- declare const _default: import("@angular-devkit/architect/src/internal").Builder<StorybookBuilderOptions>;
14
+ declare const _default: import("@angular-devkit/architect/src/internal").Builder<any>;
15
15
  export default _default;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const architect_1 = require("@angular-devkit/architect");
7
+ const rxjs_1 = require("rxjs");
8
+ const operators_1 = require("rxjs/operators");
9
+ const find_up_1 = require("find-up");
10
+ // eslint-disable-next-line import/no-extraneous-dependencies
11
+ const standalone_1 = __importDefault(require("@storybook/angular/standalone"));
12
+ const run_compodoc_1 = require("../utils/run-compodoc");
13
+ const build_standalone_errors_handler_1 = require("../utils/build-standalone-errors-handler");
14
+ exports.default = (0, architect_1.createBuilder)(commandBuilder);
15
+ function commandBuilder(options, context) {
16
+ return (0, rxjs_1.from)(setup(options, context)).pipe((0, operators_1.switchMap)(({ tsConfig }) => {
17
+ const runCompodoc$ = options.compodoc
18
+ ? (0, run_compodoc_1.runCompodoc)({ compodocArgs: options.compodocArgs, tsconfig: tsConfig }, context).pipe((0, operators_1.mapTo)({ tsConfig }))
19
+ : (0, rxjs_1.of)({});
20
+ return runCompodoc$.pipe((0, operators_1.mapTo)({ tsConfig }));
21
+ }), (0, operators_1.map)(({ tsConfig }) => {
22
+ const { browserTarget, stylePreprocessorOptions, styles, configDir, docs, loglevel, outputDir, quiet, webpackStatsJson, } = options;
23
+ const standaloneOptions = {
24
+ configDir,
25
+ docs,
26
+ loglevel,
27
+ outputDir,
28
+ quiet,
29
+ angularBrowserTarget: browserTarget,
30
+ angularBuilderContext: context,
31
+ angularBuilderOptions: {
32
+ ...(stylePreprocessorOptions ? { stylePreprocessorOptions } : {}),
33
+ ...(styles ? { styles } : {}),
34
+ },
35
+ tsConfig,
36
+ webpackStatsJson,
37
+ };
38
+ return standaloneOptions;
39
+ }), (0, operators_1.switchMap)((standaloneOptions) => runInstance({ ...standaloneOptions, mode: 'static' })), (0, operators_1.map)(() => {
40
+ return { success: true };
41
+ }));
42
+ }
43
+ async function setup(options, context) {
44
+ let browserOptions;
45
+ let browserTarget;
46
+ if (options.browserTarget) {
47
+ browserTarget = (0, architect_1.targetFromTargetString)(options.browserTarget);
48
+ browserOptions = await context.validateOptions(await context.getTargetOptions(browserTarget), await context.getBuilderNameForTarget(browserTarget));
49
+ }
50
+ return {
51
+ tsConfig: options.tsConfig ??
52
+ (0, find_up_1.sync)('tsconfig.json', { cwd: options.configDir }) ??
53
+ browserOptions.tsConfig,
54
+ };
55
+ }
56
+ function runInstance(options) {
57
+ return (0, rxjs_1.from)((0, standalone_1.default)(options)).pipe((0, operators_1.catchError)((error) => (0, rxjs_1.throwError)((0, build_standalone_errors_handler_1.buildStandaloneErrorHandler)(error))));
58
+ }
File without changes
@@ -11,5 +11,5 @@ export declare type StorybookBuilderOptions = JsonObject & {
11
11
  stylePreprocessorOptions?: StylePreprocessorOptions;
12
12
  } & Pick<CLIOptions, 'port' | 'host' | 'configDir' | 'https' | 'sslCa' | 'sslCert' | 'sslKey' | 'smokeTest' | 'ci' | 'quiet' | 'docs'>;
13
13
  export declare type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
14
- declare const _default: import("@angular-devkit/architect/src/internal").Builder<StorybookBuilderOptions>;
14
+ declare const _default: import("@angular-devkit/architect/src/internal").Builder<any>;
15
15
  export default _default;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const architect_1 = require("@angular-devkit/architect");
7
+ const rxjs_1 = require("rxjs");
8
+ const operators_1 = require("rxjs/operators");
9
+ const find_up_1 = require("find-up");
10
+ // eslint-disable-next-line import/no-extraneous-dependencies
11
+ const standalone_1 = __importDefault(require("@storybook/angular/standalone"));
12
+ const run_compodoc_1 = require("../utils/run-compodoc");
13
+ const build_standalone_errors_handler_1 = require("../utils/build-standalone-errors-handler");
14
+ exports.default = (0, architect_1.createBuilder)(commandBuilder);
15
+ function commandBuilder(options, context) {
16
+ return (0, rxjs_1.from)(setup(options, context)).pipe((0, operators_1.switchMap)(({ tsConfig }) => {
17
+ const runCompodoc$ = options.compodoc
18
+ ? (0, run_compodoc_1.runCompodoc)({ compodocArgs: options.compodocArgs, tsconfig: tsConfig }, context).pipe((0, operators_1.mapTo)({ tsConfig }))
19
+ : (0, rxjs_1.of)({});
20
+ return runCompodoc$.pipe((0, operators_1.mapTo)({ tsConfig }));
21
+ }), (0, operators_1.map)(({ tsConfig }) => {
22
+ const { browserTarget, stylePreprocessorOptions, styles, ci, configDir, docs, host, https, port, quiet, smokeTest, sslCa, sslCert, sslKey, } = options;
23
+ const standaloneOptions = {
24
+ ci,
25
+ configDir,
26
+ docs,
27
+ host,
28
+ https,
29
+ port,
30
+ quiet,
31
+ smokeTest,
32
+ sslCa,
33
+ sslCert,
34
+ sslKey,
35
+ angularBrowserTarget: browserTarget,
36
+ angularBuilderContext: context,
37
+ angularBuilderOptions: {
38
+ ...(stylePreprocessorOptions ? { stylePreprocessorOptions } : {}),
39
+ ...(styles ? { styles } : {}),
40
+ },
41
+ tsConfig,
42
+ };
43
+ return standaloneOptions;
44
+ }), (0, operators_1.switchMap)((standaloneOptions) => runInstance(standaloneOptions)), (0, operators_1.map)(() => {
45
+ return { success: true };
46
+ }));
47
+ }
48
+ async function setup(options, context) {
49
+ let browserOptions;
50
+ let browserTarget;
51
+ if (options.browserTarget) {
52
+ browserTarget = (0, architect_1.targetFromTargetString)(options.browserTarget);
53
+ browserOptions = await context.validateOptions(await context.getTargetOptions(browserTarget), await context.getBuilderNameForTarget(browserTarget));
54
+ }
55
+ return {
56
+ tsConfig: options.tsConfig ??
57
+ (0, find_up_1.sync)('tsconfig.json', { cwd: options.configDir }) ??
58
+ browserOptions.tsConfig,
59
+ };
60
+ }
61
+ function runInstance(options) {
62
+ return new rxjs_1.Observable((observer) => {
63
+ // This Observable intentionally never complete, leaving the process running ;)
64
+ (0, standalone_1.default)(options).then(() => observer.next(), (error) => observer.error((0, build_standalone_errors_handler_1.buildStandaloneErrorHandler)(error)));
65
+ });
66
+ }
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.buildStandaloneErrorHandler = void 0;
7
7
  const node_logger_1 = require("@storybook/node-logger");
8
8
  const ts_dedent_1 = __importDefault(require("ts-dedent"));
9
- exports.buildStandaloneErrorHandler = (error) => {
10
- var _a;
9
+ const buildStandaloneErrorHandler = (error) => {
11
10
  // Duplicate code for Standalone error handling
12
11
  // Source: https://github.com/storybookjs/storybook/blob/39c7ba09ad84fbd466f9c25d5b92791a5450b9f6/lib/core-server/src/build-dev.ts#L136
13
12
  node_logger_1.instance.heading = '';
@@ -22,17 +21,18 @@ exports.buildStandaloneErrorHandler = (error) => {
22
21
  node_logger_1.logger.error(error);
23
22
  }
24
23
  }
25
- else if ((_a = error.compilation) === null || _a === void 0 ? void 0 : _a.errors) {
24
+ else if (error.compilation?.errors) {
26
25
  error.compilation.errors.forEach((e) => node_logger_1.logger.plain(e));
27
26
  }
28
27
  node_logger_1.logger.line();
29
28
  return error.close
30
- ? ts_dedent_1.default `
29
+ ? (0, ts_dedent_1.default) `
31
30
  FATAL broken build!, will close the process,
32
31
  Fix the error below and restart storybook.
33
32
  `
34
- : ts_dedent_1.default `
33
+ : (0, ts_dedent_1.default) `
35
34
  Broken build, fix the error above.
36
35
  You may need to refresh the browser.
37
36
  `;
38
37
  };
38
+ exports.buildStandaloneErrorHandler = buildStandaloneErrorHandler;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
14
18
  var __importStar = (this && this.__importStar) || function (mod) {
15
19
  if (mod && mod.__esModule) return mod;
16
20
  var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
22
  __setModuleDefault(result, mod);
19
23
  return result;
20
24
  };
@@ -29,7 +33,7 @@ const hasTsConfigArg = (args) => args.indexOf('-p') !== -1;
29
33
  const toRelativePath = (pathToTsConfig) => {
30
34
  return path.isAbsolute(pathToTsConfig) ? path.relative('.', pathToTsConfig) : pathToTsConfig;
31
35
  };
32
- exports.runCompodoc = ({ compodocArgs, tsconfig }, context) => {
36
+ const runCompodoc = ({ compodocArgs, tsconfig }, context) => {
33
37
  return new rxjs_1.Observable((observer) => {
34
38
  const tsConfigPath = toRelativePath(tsconfig);
35
39
  const finalCompodocArgs = [
@@ -42,7 +46,7 @@ exports.runCompodoc = ({ compodocArgs, tsconfig }, context) => {
42
46
  ];
43
47
  try {
44
48
  context.logger.info(finalCompodocArgs.join(' '));
45
- const child = child_process_1.spawn('npx', finalCompodocArgs, {
49
+ const child = (0, child_process_1.spawn)('npx', finalCompodocArgs, {
46
50
  cwd: context.workspaceRoot,
47
51
  env: process.env,
48
52
  shell: true,
@@ -68,3 +72,4 @@ exports.runCompodoc = ({ compodocArgs, tsconfig }, context) => {
68
72
  }
69
73
  });
70
74
  };
75
+ exports.runCompodoc = runCompodoc;
File without changes
@@ -4,25 +4,30 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.extractComponentDescription = exports.extractArgTypes = exports.extractArgTypesFromData = exports.extractType = exports.findComponentByName = exports.checkValidCompodocJson = exports.checkValidComponentOrDirective = exports.getCompodocJson = exports.setCompodocJson = exports.isMethod = void 0;
6
6
  const client_logger_1 = require("@storybook/client-logger");
7
- exports.isMethod = (methodOrProp) => {
7
+ const isMethod = (methodOrProp) => {
8
8
  return methodOrProp.args !== undefined;
9
9
  };
10
- exports.setCompodocJson = (compodocJson) => {
10
+ exports.isMethod = isMethod;
11
+ const setCompodocJson = (compodocJson) => {
11
12
  // @ts-ignore
12
13
  window.__STORYBOOK_COMPODOC_JSON__ = compodocJson;
13
14
  };
15
+ exports.setCompodocJson = setCompodocJson;
14
16
  // @ts-ignore
15
- exports.getCompodocJson = () => window.__STORYBOOK_COMPODOC_JSON__;
16
- exports.checkValidComponentOrDirective = (component) => {
17
+ const getCompodocJson = () => window.__STORYBOOK_COMPODOC_JSON__;
18
+ exports.getCompodocJson = getCompodocJson;
19
+ const checkValidComponentOrDirective = (component) => {
17
20
  if (!component.name) {
18
21
  throw new Error(`Invalid component ${JSON.stringify(component)}`);
19
22
  }
20
23
  };
21
- exports.checkValidCompodocJson = (compodocJson) => {
24
+ exports.checkValidComponentOrDirective = checkValidComponentOrDirective;
25
+ const checkValidCompodocJson = (compodocJson) => {
22
26
  if (!compodocJson || !compodocJson.components) {
23
27
  throw new Error('Invalid compodoc JSON');
24
28
  }
25
29
  };
30
+ exports.checkValidCompodocJson = checkValidCompodocJson;
26
31
  const hasDecorator = (item, decoratorName) => item.decorators && item.decorators.find((x) => x.name === decoratorName);
27
32
  const mapPropertyToSection = (item) => {
28
33
  if (hasDecorator(item, 'ViewChild')) {
@@ -50,7 +55,7 @@ const mapItemToSection = (key, item) => {
50
55
  return 'outputs';
51
56
  case 'properties':
52
57
  case 'propertiesClass':
53
- if (exports.isMethod(item)) {
58
+ if ((0, exports.isMethod)(item)) {
54
59
  throw new Error("Cannot be of type Method if key === 'propertiesClass'");
55
60
  }
56
61
  return mapPropertyToSection(item);
@@ -58,23 +63,24 @@ const mapItemToSection = (key, item) => {
58
63
  throw new Error(`Unknown key: ${key}`);
59
64
  }
60
65
  };
61
- exports.findComponentByName = (name, compodocJson) => compodocJson.components.find((c) => c.name === name) ||
66
+ const findComponentByName = (name, compodocJson) => compodocJson.components.find((c) => c.name === name) ||
62
67
  compodocJson.directives.find((c) => c.name === name) ||
63
68
  compodocJson.pipes.find((c) => c.name === name) ||
64
69
  compodocJson.injectables.find((c) => c.name === name) ||
65
70
  compodocJson.classes.find((c) => c.name === name);
71
+ exports.findComponentByName = findComponentByName;
66
72
  const getComponentData = (component) => {
67
73
  if (!component) {
68
74
  return null;
69
75
  }
70
- exports.checkValidComponentOrDirective(component);
71
- const compodocJson = exports.getCompodocJson();
76
+ (0, exports.checkValidComponentOrDirective)(component);
77
+ const compodocJson = (0, exports.getCompodocJson)();
72
78
  if (!compodocJson) {
73
79
  return null;
74
80
  }
75
- exports.checkValidCompodocJson(compodocJson);
81
+ (0, exports.checkValidCompodocJson)(compodocJson);
76
82
  const { name } = component;
77
- const metadata = exports.findComponentByName(name, compodocJson);
83
+ const metadata = (0, exports.findComponentByName)(name, compodocJson);
78
84
  if (!metadata) {
79
85
  client_logger_1.logger.warn(`Component not found in compodoc JSON: '${name}'`);
80
86
  }
@@ -91,10 +97,9 @@ const extractTypeFromValue = (defaultValue) => {
91
97
  : null;
92
98
  };
93
99
  const extractEnumValues = (compodocType) => {
94
- var _a, _b;
95
- const compodocJson = exports.getCompodocJson();
96
- const enumType = (_b = (_a = compodocJson === null || compodocJson === void 0 ? void 0 : compodocJson.miscellaneous) === null || _a === void 0 ? void 0 : _a.enumerations) === null || _b === void 0 ? void 0 : _b.find((x) => x.name === compodocType);
97
- if (enumType === null || enumType === void 0 ? void 0 : enumType.childs.every((x) => x.value)) {
100
+ const compodocJson = (0, exports.getCompodocJson)();
101
+ const enumType = compodocJson?.miscellaneous?.enumerations?.find((x) => x.name === compodocType);
102
+ if (enumType?.childs.every((x) => x.value)) {
98
103
  return enumType.childs.map((x) => x.value);
99
104
  }
100
105
  if (typeof compodocType !== 'string' || compodocType.indexOf('|') === -1) {
@@ -107,7 +112,7 @@ const extractEnumValues = (compodocType) => {
107
112
  return null;
108
113
  }
109
114
  };
110
- exports.extractType = (property, defaultValue) => {
115
+ const extractType = (property, defaultValue) => {
111
116
  const compodocType = property.type || extractTypeFromValue(defaultValue);
112
117
  switch (compodocType) {
113
118
  case 'string':
@@ -124,6 +129,7 @@ exports.extractType = (property, defaultValue) => {
124
129
  }
125
130
  }
126
131
  };
132
+ exports.extractType = extractType;
127
133
  const castDefaultValue = (property, defaultValue) => {
128
134
  const compodocType = property.type;
129
135
  // All these checks are necessary as compodoc does not always set the type ie. @HostBinding have empty types.
@@ -167,11 +173,10 @@ const extractDefaultValueFromComments = (property, value) => {
167
173
  return commentValue;
168
174
  };
169
175
  const extractDefaultValue = (property) => {
170
- var _a, _b;
171
176
  try {
172
- let value = (_a = property.defaultValue) === null || _a === void 0 ? void 0 : _a.replace(/^'(.*)'$/, '$1');
177
+ let value = property.defaultValue?.replace(/^'(.*)'$/, '$1');
173
178
  value = castDefaultValue(property, value);
174
- if (value == null && ((_b = property.jsdoctags) === null || _b === void 0 ? void 0 : _b.length) > 0) {
179
+ if (value == null && property.jsdoctags?.length > 0) {
175
180
  value = extractDefaultValueFromComments(property, value);
176
181
  }
177
182
  return value;
@@ -182,12 +187,11 @@ const extractDefaultValue = (property) => {
182
187
  }
183
188
  };
184
189
  const resolveTypealias = (compodocType) => {
185
- var _a, _b;
186
- const compodocJson = exports.getCompodocJson();
187
- const typeAlias = (_b = (_a = compodocJson === null || compodocJson === void 0 ? void 0 : compodocJson.miscellaneous) === null || _a === void 0 ? void 0 : _a.typealiases) === null || _b === void 0 ? void 0 : _b.find((x) => x.name === compodocType);
190
+ const compodocJson = (0, exports.getCompodocJson)();
191
+ const typeAlias = compodocJson?.miscellaneous?.typealiases?.find((x) => x.name === compodocType);
188
192
  return typeAlias ? resolveTypealias(typeAlias.rawtype) : compodocType;
189
193
  };
190
- exports.extractArgTypesFromData = (componentData) => {
194
+ const extractArgTypesFromData = (componentData) => {
191
195
  const sectionToItems = {};
192
196
  const compodocClasses = ['component', 'directive'].includes(componentData.type)
193
197
  ? ['propertiesClass', 'methodsClass', 'inputsClass', 'outputsClass']
@@ -196,20 +200,26 @@ exports.extractArgTypesFromData = (componentData) => {
196
200
  const data = componentData[key] || [];
197
201
  data.forEach((item) => {
198
202
  const section = mapItemToSection(key, item);
199
- const defaultValue = exports.isMethod(item) ? undefined : extractDefaultValue(item);
200
- const type = exports.isMethod(item) || (section !== 'inputs' && section !== 'properties')
203
+ const defaultValue = (0, exports.isMethod)(item) ? undefined : extractDefaultValue(item);
204
+ const type = (0, exports.isMethod)(item) || (section !== 'inputs' && section !== 'properties')
201
205
  ? { name: 'void' }
202
- : exports.extractType(item, defaultValue);
206
+ : (0, exports.extractType)(item, defaultValue);
203
207
  const action = section === 'outputs' ? { action: item.name } : {};
204
- const argType = Object.assign(Object.assign({ name: item.name, description: item.rawdescription || item.description, defaultValue,
205
- type }, action), { table: {
208
+ const argType = {
209
+ name: item.name,
210
+ description: item.rawdescription || item.description,
211
+ defaultValue,
212
+ type,
213
+ ...action,
214
+ table: {
206
215
  category: section,
207
216
  type: {
208
- summary: exports.isMethod(item) ? displaySignature(item) : item.type,
209
- required: exports.isMethod(item) ? false : !item.optional,
217
+ summary: (0, exports.isMethod)(item) ? displaySignature(item) : item.type,
218
+ required: (0, exports.isMethod)(item) ? false : !item.optional,
210
219
  },
211
220
  defaultValue: { summary: defaultValue },
212
- } });
221
+ },
222
+ };
213
223
  if (!sectionToItems[section]) {
214
224
  sectionToItems[section] = [];
215
225
  }
@@ -237,11 +247,14 @@ exports.extractArgTypesFromData = (componentData) => {
237
247
  });
238
248
  return argTypes;
239
249
  };
240
- exports.extractArgTypes = (component) => {
250
+ exports.extractArgTypesFromData = extractArgTypesFromData;
251
+ const extractArgTypes = (component) => {
241
252
  const componentData = getComponentData(component);
242
- return componentData && exports.extractArgTypesFromData(componentData);
253
+ return componentData && (0, exports.extractArgTypesFromData)(componentData);
243
254
  };
244
- exports.extractComponentDescription = (component) => {
255
+ exports.extractArgTypes = extractArgTypes;
256
+ const extractComponentDescription = (component) => {
245
257
  const componentData = getComponentData(component);
246
258
  return componentData && (componentData.rawdescription || componentData.description);
247
259
  };
260
+ exports.extractComponentDescription = extractComponentDescription;
@@ -3,7 +3,7 @@ export declare const parameters: {
3
3
  docs: {
4
4
  inlineStories: boolean;
5
5
  prepareForInline: (storyFn: import("@storybook/csf").PartialStoryFn<import("..").AngularFramework, import("@storybook/csf").Args>, { id, parameters, component }: import("..").StoryContext) => import("react").DetailedReactHTMLElement<import("react").HTMLAttributes<undefined>, undefined>;
6
- extractArgTypes: (component: import("./types").Directive) => import("@storybook/api").ArgTypes;
6
+ extractArgTypes: (component: import("./types").Directive) => import("lib/api/dist/types").ArgTypes;
7
7
  extractComponentDescription: (component: import("./types").Directive) => string;
8
8
  source: {
9
9
  type: SourceType;
@@ -12,4 +12,4 @@ export declare const parameters: {
12
12
  };
13
13
  };
14
14
  export declare const decorators: ((storyFn: import("@storybook/csf").PartialStoryFn<import("..").AngularFramework, import("@storybook/csf").Args>, context: import("..").StoryContext) => import("..").IStory)[];
15
- export declare const argTypesEnhancers: (<TFramework extends import("@storybook/csf").AnyFramework>(context: import("@storybook/csf").StoryContextForEnhancers<TFramework, import("@storybook/csf").Args>) => import("@storybook/csf").StrictArgTypes<import("@storybook/csf").Args> | import("@storybook/addons").Parameters)[];
15
+ export declare const argTypesEnhancers: (<TFramework extends import("@storybook/csf").AnyFramework>(context: import("@storybook/csf").StoryContextForEnhancers<TFramework, import("@storybook/csf").Args>) => import("@storybook/csf").StrictArgTypes<import("@storybook/csf").Args> | import("lib/addons/dist/types").Parameters)[];
File without changes
File without changes
@@ -1,13 +1,17 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
8
12
  }));
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./compodoc"), exports);
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.prepareForInline = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const p_limit_1 = __importDefault(require("p-limit"));
9
+ const nanoid_1 = require("nanoid");
10
+ const renderer_1 = require("../../renderer");
11
+ const limit = (0, p_limit_1.default)(1);
12
+ /**
13
+ * Uses the angular renderer to generate a story. Uses p-limit to run synchronously
14
+ */
15
+ const prepareForInline = (storyFn, { id, parameters, component }) => {
16
+ const el = react_1.default.useRef();
17
+ react_1.default.useEffect(() => {
18
+ (async () => {
19
+ limit(async () => {
20
+ const renderer = await renderer_1.rendererFactory.getRendererInstance(`${id}-${(0, nanoid_1.nanoid)(10)}`.toLowerCase(), el.current);
21
+ if (renderer) {
22
+ await renderer.render({
23
+ forced: false,
24
+ component,
25
+ parameters,
26
+ storyFnAngular: storyFn(),
27
+ targetDOMNode: el.current,
28
+ });
29
+ }
30
+ });
31
+ })();
32
+ });
33
+ return react_1.default.createElement('div', {
34
+ ref: el,
35
+ });
36
+ };
37
+ exports.prepareForInline = prepareForInline;
@@ -4,38 +4,38 @@ exports.sourceDecorator = exports.skipSourceRender = void 0;
4
4
  const addons_1 = require("@storybook/addons");
5
5
  const docs_tools_1 = require("@storybook/docs-tools");
6
6
  const renderer_1 = require("../../renderer");
7
- exports.skipSourceRender = (context) => {
8
- var _a;
9
- const sourceParams = (_a = context === null || context === void 0 ? void 0 : context.parameters.docs) === null || _a === void 0 ? void 0 : _a.source;
7
+ const skipSourceRender = (context) => {
8
+ const sourceParams = context?.parameters.docs?.source;
10
9
  // always render if the user forces it
11
- if ((sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.type) === docs_tools_1.SourceType.DYNAMIC) {
10
+ if (sourceParams?.type === docs_tools_1.SourceType.DYNAMIC) {
12
11
  return false;
13
12
  }
14
13
  // never render if the user is forcing the block to render code, or
15
14
  // if the user provides code
16
- return (sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.code) || (sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.type) === docs_tools_1.SourceType.CODE;
15
+ return sourceParams?.code || sourceParams?.type === docs_tools_1.SourceType.CODE;
17
16
  };
17
+ exports.skipSourceRender = skipSourceRender;
18
18
  /**
19
19
  * Angular source decorator.
20
20
  * @param storyFn Fn
21
21
  * @param context StoryContext
22
22
  */
23
- exports.sourceDecorator = (storyFn, context) => {
23
+ const sourceDecorator = (storyFn, context) => {
24
24
  const story = storyFn();
25
- if (exports.skipSourceRender(context)) {
25
+ if ((0, exports.skipSourceRender)(context)) {
26
26
  return story;
27
27
  }
28
28
  const channel = addons_1.addons.getChannel();
29
29
  const { props, template, userDefinedTemplate } = story;
30
30
  const { component, argTypes } = context;
31
31
  let toEmit;
32
- addons_1.useEffect(() => {
32
+ (0, addons_1.useEffect)(() => {
33
33
  if (toEmit) {
34
34
  channel.emit(docs_tools_1.SNIPPET_RENDERED, context.id, toEmit, 'angular');
35
35
  }
36
36
  });
37
37
  if (component && !userDefinedTemplate) {
38
- const source = renderer_1.computesTemplateSourceFromComponent(component, props, argTypes);
38
+ const source = (0, renderer_1.computesTemplateSourceFromComponent)(component, props, argTypes);
39
39
  // We might have a story with a Directive or Service defined as the component
40
40
  // In these cases there might exist a template, even if we aren't able to create source from component
41
41
  if (source || template) {
@@ -47,3 +47,4 @@ exports.sourceDecorator = (storyFn, context) => {
47
47
  }
48
48
  return story;
49
49
  };
50
+ exports.sourceDecorator = sourceDecorator;
File without changes
File without changes
File without changes
@@ -1,15 +1,20 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
8
12
  }));
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.componentWrapperDecorator = exports.moduleMetadata = exports.raw = exports.forceReRender = exports.getStorybook = exports.configure = exports.addParameters = exports.addDecorator = exports.setAddon = exports.storiesOf = void 0;
13
18
  var preview_1 = require("./preview");
14
19
  Object.defineProperty(exports, "storiesOf", { enumerable: true, get: function () { return preview_1.storiesOf; } });
15
20
  Object.defineProperty(exports, "setAddon", { enumerable: true, get: function () { return preview_1.setAddon; } });
@@ -23,6 +28,5 @@ __exportStar(require("./preview/types-6-0"), exports);
23
28
  var decorators_1 = require("./preview/decorators");
24
29
  Object.defineProperty(exports, "moduleMetadata", { enumerable: true, get: function () { return decorators_1.moduleMetadata; } });
25
30
  Object.defineProperty(exports, "componentWrapperDecorator", { enumerable: true, get: function () { return decorators_1.componentWrapperDecorator; } });
26
- if (module && module.hot && module.hot.decline) {
27
- module.hot.decline();
28
- }
31
+ // optimization: stop HMR propagation in webpack
32
+ module?.hot?.decline();
@@ -31,7 +31,7 @@ let AppComponent = class AppComponent {
31
31
  this.propSubscriptions = new Map();
32
32
  }
33
33
  ngOnInit() {
34
- this.data.pipe(operators_1.first()).subscribe((data) => {
34
+ this.data.pipe((0, operators_1.first)()).subscribe((data) => {
35
35
  this.target.clear();
36
36
  const compFactory = this.cfr.resolveComponentFactory(data.component);
37
37
  const componentRef = this.target.createComponent(compFactory);
@@ -126,15 +126,15 @@ let AppComponent = class AppComponent {
126
126
  }
127
127
  };
128
128
  __decorate([
129
- core_1.ViewChild('target', { read: core_1.ViewContainerRef, static: true }),
129
+ (0, core_1.ViewChild)('target', { read: core_1.ViewContainerRef, static: true }),
130
130
  __metadata("design:type", core_1.ViewContainerRef)
131
131
  ], AppComponent.prototype, "target", void 0);
132
132
  AppComponent = __decorate([
133
- core_1.Component({
133
+ (0, core_1.Component)({
134
134
  selector: 'storybook-dynamic-app-root',
135
135
  template: '<ng-template #target></ng-template>',
136
136
  }),
137
- __param(2, core_1.Inject(app_token_1.STORY)),
137
+ __param(2, (0, core_1.Inject)(app_token_1.STORY)),
138
138
  __metadata("design:paramtypes", [core_1.ComponentFactoryResolver,
139
139
  core_1.ChangeDetectorRef,
140
140
  rxjs_1.Observable])