@storybook/cli 6.5.9 → 7.0.0-alpha.2

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 (356) hide show
  1. package/dist/cjs/automigrate/fixes/angular12.js +3 -6
  2. package/dist/cjs/automigrate/fixes/cra5.js +13 -8
  3. package/dist/cjs/automigrate/fixes/index.js +3 -1
  4. package/dist/{modern/automigrate/fixes/cra5.js → cjs/automigrate/fixes/vue3.js} +14 -14
  5. package/dist/cjs/automigrate/fixes/webpack5.js +5 -8
  6. package/dist/cjs/automigrate/index.js +9 -3
  7. package/dist/cjs/babel-config.js +5 -6
  8. package/dist/cjs/build.js +38 -0
  9. package/dist/cjs/detect.js +4 -22
  10. package/dist/cjs/dev.js +70 -0
  11. package/dist/cjs/extract.js +0 -1
  12. package/dist/cjs/frameworks/angular/Button.stories.ts +5 -3
  13. package/dist/cjs/generate.js +72 -16
  14. package/dist/cjs/generators/ANGULAR/index.js +24 -1
  15. package/dist/cjs/generators/REACT_NATIVE/index.js +1 -1
  16. package/dist/cjs/generators/REACT_SCRIPTS/index.js +3 -2
  17. package/dist/cjs/generators/baseGenerator.js +94 -43
  18. package/dist/cjs/generators/configure.js +16 -18
  19. package/dist/{modern/automigrate → cjs/generators}/types.js +0 -0
  20. package/dist/cjs/helpers.js +10 -12
  21. package/dist/cjs/initiate.js +3 -13
  22. package/dist/cjs/js-package-manager/JsPackageManager.js +7 -5
  23. package/dist/cjs/project_types.js +5 -16
  24. package/dist/cjs/repro-generators/configs.js +55 -50
  25. package/dist/cjs/repro-generators/scripts.js +82 -8
  26. package/dist/cjs/repro.js +20 -18
  27. package/dist/cjs/utils.js +22 -0
  28. package/dist/cjs/versions.js +73 -57
  29. package/dist/esm/automigrate/fixes/angular12.js +3 -6
  30. package/dist/esm/automigrate/fixes/cra5.js +13 -8
  31. package/dist/esm/automigrate/fixes/index.js +3 -1
  32. package/dist/{modern/automigrate/fixes/angular12.js → esm/automigrate/fixes/vue3.js} +14 -14
  33. package/dist/esm/automigrate/fixes/webpack5.js +5 -8
  34. package/dist/esm/automigrate/index.js +9 -3
  35. package/dist/esm/babel-config.js +5 -6
  36. package/dist/esm/build.js +38 -0
  37. package/dist/esm/detect.js +4 -22
  38. package/dist/esm/dev.js +70 -0
  39. package/dist/esm/extract.js +0 -1
  40. package/dist/esm/frameworks/angular/Button.stories.ts +5 -3
  41. package/dist/esm/generate.js +72 -16
  42. package/dist/esm/generators/ANGULAR/index.js +24 -1
  43. package/dist/esm/generators/REACT_NATIVE/index.js +1 -1
  44. package/dist/esm/generators/REACT_SCRIPTS/index.js +3 -2
  45. package/dist/esm/generators/baseGenerator.js +94 -43
  46. package/dist/esm/generators/configure.js +16 -18
  47. package/dist/{modern/js-package-manager/PackageJson.js → esm/generators/types.js} +0 -0
  48. package/dist/esm/helpers.js +10 -12
  49. package/dist/esm/initiate.js +3 -13
  50. package/dist/esm/js-package-manager/JsPackageManager.js +7 -5
  51. package/dist/esm/project_types.js +5 -16
  52. package/dist/esm/repro-generators/configs.js +55 -50
  53. package/dist/esm/repro-generators/scripts.js +82 -8
  54. package/dist/esm/repro.js +20 -18
  55. package/dist/esm/utils.js +22 -0
  56. package/dist/esm/versions.js +73 -57
  57. package/dist/{ts3.9 → types}/NpmOptions.d.ts +0 -0
  58. package/dist/{ts3.9 → types}/add.d.ts +0 -0
  59. package/dist/{ts3.9 → types}/automigrate/fixes/angular12.d.ts +0 -0
  60. package/dist/{ts3.9 → types}/automigrate/fixes/builder-vite.d.ts +0 -0
  61. package/dist/{ts3.9 → types}/automigrate/fixes/cra5.d.ts +0 -0
  62. package/dist/{ts3.9 → types}/automigrate/fixes/eslint-plugin.d.ts +0 -0
  63. package/dist/{ts3.9 → types}/automigrate/fixes/index.d.ts +0 -0
  64. package/dist/{ts3.9 → types}/automigrate/fixes/mainjsFramework.d.ts +0 -0
  65. package/dist/{ts3.4/automigrate/fixes/cra5.d.ts → types/automigrate/fixes/vue3.d.ts} +15 -15
  66. package/dist/{ts3.9 → types}/automigrate/fixes/webpack5.d.ts +0 -0
  67. package/dist/{ts3.9 → types}/automigrate/helpers/getEslintInfo.d.ts +0 -0
  68. package/dist/{ts3.9 → types}/automigrate/index.d.ts +0 -0
  69. package/dist/{ts3.9 → types}/automigrate/types.d.ts +0 -0
  70. package/dist/{ts3.9 → types}/babel-config.d.ts +0 -0
  71. package/dist/types/build.d.ts +1 -0
  72. package/dist/{ts3.9 → types}/detect-nextjs.d.ts +0 -0
  73. package/dist/{ts3.9 → types}/detect-webpack.d.ts +0 -0
  74. package/dist/{ts3.9 → types}/detect.d.ts +4 -4
  75. package/dist/types/dev.d.ts +1 -0
  76. package/dist/{ts3.9 → types}/extract.d.ts +0 -0
  77. package/dist/{ts3.9 → types}/generate.d.ts +0 -0
  78. package/dist/{ts3.9 → types}/generators/ANGULAR/angular-helpers.d.ts +0 -0
  79. package/dist/{ts3.9 → types}/generators/ANGULAR/index.d.ts +1 -1
  80. package/dist/{ts3.9 → types}/generators/AURELIA/index.d.ts +1 -1
  81. package/dist/{ts3.9 → types}/generators/EMBER/index.d.ts +1 -1
  82. package/dist/{ts3.9 → types}/generators/HTML/index.d.ts +1 -1
  83. package/dist/types/generators/MARIONETTE/index.d.ts +3 -0
  84. package/dist/types/generators/MARKO/index.d.ts +3 -0
  85. package/dist/types/generators/MITHRIL/index.d.ts +3 -0
  86. package/dist/types/generators/PREACT/index.d.ts +3 -0
  87. package/dist/types/generators/RAX/index.d.ts +3 -0
  88. package/dist/types/generators/REACT/index.d.ts +3 -0
  89. package/dist/{ts3.9 → types}/generators/REACT_NATIVE/index.d.ts +0 -0
  90. package/dist/types/generators/REACT_SCRIPTS/index.d.ts +3 -0
  91. package/dist/types/generators/RIOT/index.d.ts +3 -0
  92. package/dist/types/generators/SERVER/index.d.ts +3 -0
  93. package/dist/types/generators/SFC_VUE/index.d.ts +3 -0
  94. package/dist/types/generators/SVELTE/index.d.ts +3 -0
  95. package/dist/types/generators/VUE/index.d.ts +3 -0
  96. package/dist/types/generators/VUE3/index.d.ts +3 -0
  97. package/dist/types/generators/WEB-COMPONENTS/index.d.ts +3 -0
  98. package/dist/types/generators/WEBPACK_REACT/index.d.ts +3 -0
  99. package/dist/types/generators/baseGenerator.d.ts +5 -0
  100. package/dist/{ts3.4 → types}/generators/configure.d.ts +19 -18
  101. package/dist/types/generators/types.d.ts +36 -0
  102. package/dist/{ts3.9 → types}/helpers.d.ts +2 -2
  103. package/dist/types/initiate.d.ts +3 -0
  104. package/dist/{ts3.9 → types}/js-package-manager/JsPackageManager.d.ts +1 -1
  105. package/dist/{ts3.9 → types}/js-package-manager/JsPackageManagerFactory.d.ts +0 -0
  106. package/dist/{ts3.9 → types}/js-package-manager/NPMProxy.d.ts +0 -0
  107. package/dist/{ts3.9 → types}/js-package-manager/PackageJson.d.ts +1 -0
  108. package/dist/{ts3.9 → types}/js-package-manager/PackageJsonHelper.d.ts +0 -0
  109. package/dist/{ts3.9 → types}/js-package-manager/Yarn1Proxy.d.ts +0 -0
  110. package/dist/{ts3.9 → types}/js-package-manager/Yarn2Proxy.d.ts +0 -0
  111. package/dist/{ts3.9 → types}/js-package-manager/index.d.ts +0 -0
  112. package/dist/{ts3.9 → types}/link.d.ts +0 -0
  113. package/dist/{ts3.9 → types}/migrate.d.ts +0 -0
  114. package/dist/{ts3.9 → types}/project_types.d.ts +2 -5
  115. package/dist/{ts3.9 → types}/repro-generators/configs.d.ts +7 -6
  116. package/dist/{ts3.4 → types}/repro-generators/scripts.d.ts +42 -36
  117. package/dist/{ts3.4 → types}/repro.d.ts +13 -12
  118. package/dist/{ts3.9 → types}/upgrade.d.ts +2 -2
  119. package/dist/types/utils.d.ts +2 -0
  120. package/dist/{ts3.4 → types}/versions.d.ts +76 -60
  121. package/dist/{ts3.9 → types}/warn.d.ts +0 -0
  122. package/package.json +10 -8
  123. package/dist/cjs/generators/METEOR/index.js +0 -45
  124. package/dist/cjs/generators/UPDATE_PACKAGE_ORGANIZATIONS/index.js +0 -78
  125. package/dist/esm/generators/METEOR/index.js +0 -45
  126. package/dist/esm/generators/UPDATE_PACKAGE_ORGANIZATIONS/index.js +0 -78
  127. package/dist/modern/NpmOptions.js +0 -1
  128. package/dist/modern/add.js +0 -151
  129. package/dist/modern/automigrate/fixes/builder-vite.js +0 -122
  130. package/dist/modern/automigrate/fixes/eslint-plugin.js +0 -129
  131. package/dist/modern/automigrate/fixes/index.js +0 -37
  132. package/dist/modern/automigrate/fixes/mainjsFramework.js +0 -95
  133. package/dist/modern/automigrate/fixes/webpack5.js +0 -156
  134. package/dist/modern/automigrate/helpers/getEslintInfo.js +0 -28
  135. package/dist/modern/automigrate/index.js +0 -94
  136. package/dist/modern/babel-config.js +0 -68
  137. package/dist/modern/detect-nextjs.js +0 -33
  138. package/dist/modern/detect-webpack.js +0 -39
  139. package/dist/modern/detect.js +0 -213
  140. package/dist/modern/extract.js +0 -96
  141. package/dist/modern/frameworks/common/Introduction.stories.mdx +0 -211
  142. package/dist/modern/frameworks/common/assets/code-brackets.svg +0 -1
  143. package/dist/modern/frameworks/common/assets/colors.svg +0 -1
  144. package/dist/modern/frameworks/common/assets/comments.svg +0 -1
  145. package/dist/modern/frameworks/common/assets/direction.svg +0 -1
  146. package/dist/modern/frameworks/common/assets/flow.svg +0 -1
  147. package/dist/modern/frameworks/common/assets/plugin.svg +0 -1
  148. package/dist/modern/frameworks/common/assets/repo.svg +0 -1
  149. package/dist/modern/frameworks/common/assets/stackalt.svg +0 -1
  150. package/dist/modern/frameworks/common/button.css +0 -30
  151. package/dist/modern/frameworks/common/header.css +0 -32
  152. package/dist/modern/frameworks/common/page.css +0 -69
  153. package/dist/modern/frameworks/ember/1-Button.stories.js +0 -57
  154. package/dist/modern/frameworks/html/js/Button.js +0 -21
  155. package/dist/modern/frameworks/html/js/Button.stories.js +0 -48
  156. package/dist/modern/frameworks/html/js/Header.js +0 -47
  157. package/dist/modern/frameworks/html/js/Header.stories.js +0 -27
  158. package/dist/modern/frameworks/html/js/Page.js +0 -94
  159. package/dist/modern/frameworks/html/js/Page.stories.js +0 -23
  160. package/dist/modern/frameworks/marionette/index.stories.js +0 -20
  161. package/dist/modern/frameworks/marko/1-Button.stories.js +0 -24
  162. package/dist/modern/frameworks/marko/Button.marko +0 -13
  163. package/dist/modern/frameworks/mithril/Button.js +0 -22
  164. package/dist/modern/frameworks/mithril/Button.stories.js +0 -43
  165. package/dist/modern/frameworks/mithril/Header.js +0 -51
  166. package/dist/modern/frameworks/mithril/Header.stories.js +0 -20
  167. package/dist/modern/frameworks/mithril/Page.js +0 -70
  168. package/dist/modern/frameworks/mithril/Page.stories.js +0 -24
  169. package/dist/modern/frameworks/preact/Button.jsx +0 -51
  170. package/dist/modern/frameworks/preact/Button.stories.jsx +0 -41
  171. package/dist/modern/frameworks/preact/Header.jsx +0 -58
  172. package/dist/modern/frameworks/preact/Header.stories.jsx +0 -29
  173. package/dist/modern/frameworks/preact/Page.jsx +0 -71
  174. package/dist/modern/frameworks/preact/Page.stories.jsx +0 -26
  175. package/dist/modern/frameworks/rax/Button.js +0 -26
  176. package/dist/modern/frameworks/rax/Button.stories.js +0 -40
  177. package/dist/modern/frameworks/rax/Header.js +0 -44
  178. package/dist/modern/frameworks/rax/Header.stories.js +0 -17
  179. package/dist/modern/frameworks/rax/Page.js +0 -64
  180. package/dist/modern/frameworks/rax/Page.stories.js +0 -21
  181. package/dist/modern/frameworks/react/js/Button.jsx +0 -50
  182. package/dist/modern/frameworks/react/js/Button.stories.jsx +0 -40
  183. package/dist/modern/frameworks/react/js/Header.jsx +0 -57
  184. package/dist/modern/frameworks/react/js/Header.stories.jsx +0 -24
  185. package/dist/modern/frameworks/react/js/Page.jsx +0 -69
  186. package/dist/modern/frameworks/react/js/Page.stories.jsx +0 -25
  187. package/dist/modern/frameworks/riot/1-Button.stories.js +0 -52
  188. package/dist/modern/frameworks/riot/MyButton.tag +0 -24
  189. package/dist/modern/frameworks/server/button.stories.json +0 -32
  190. package/dist/modern/frameworks/server/header.stories.json +0 -15
  191. package/dist/modern/frameworks/server/page.stories.json +0 -15
  192. package/dist/modern/frameworks/svelte/Button.stories.js +0 -51
  193. package/dist/modern/frameworks/svelte/Button.svelte +0 -42
  194. package/dist/modern/frameworks/svelte/Header.stories.js +0 -35
  195. package/dist/modern/frameworks/svelte/Header.svelte +0 -51
  196. package/dist/modern/frameworks/svelte/Page.stories.js +0 -27
  197. package/dist/modern/frameworks/svelte/Page.svelte +0 -63
  198. package/dist/modern/frameworks/vue/Button.stories.js +0 -46
  199. package/dist/modern/frameworks/vue/Button.vue +0 -54
  200. package/dist/modern/frameworks/vue/Header.stories.js +0 -27
  201. package/dist/modern/frameworks/vue/Header.vue +0 -60
  202. package/dist/modern/frameworks/vue/Page.stories.js +0 -27
  203. package/dist/modern/frameworks/vue/Page.vue +0 -88
  204. package/dist/modern/frameworks/vue3/Button.stories.js +0 -52
  205. package/dist/modern/frameworks/vue3/Button.vue +0 -52
  206. package/dist/modern/frameworks/vue3/Header.stories.js +0 -34
  207. package/dist/modern/frameworks/vue3/Header.vue +0 -50
  208. package/dist/modern/frameworks/vue3/Page.stories.js +0 -29
  209. package/dist/modern/frameworks/vue3/Page.vue +0 -88
  210. package/dist/modern/frameworks/web-components/js/Button.js +0 -21
  211. package/dist/modern/frameworks/web-components/js/Button.stories.js +0 -42
  212. package/dist/modern/frameworks/web-components/js/Header.js +0 -45
  213. package/dist/modern/frameworks/web-components/js/Header.stories.js +0 -15
  214. package/dist/modern/frameworks/web-components/js/Page.js +0 -61
  215. package/dist/modern/frameworks/web-components/js/Page.stories.js +0 -19
  216. package/dist/modern/generate.js +0 -145
  217. package/dist/modern/generators/ANGULAR/angular-helpers.js +0 -108
  218. package/dist/modern/generators/ANGULAR/index.js +0 -74
  219. package/dist/modern/generators/ANGULAR/template-csf/.storybook/tsconfig.json +0 -21
  220. package/dist/modern/generators/ANGULAR/template-csf/.storybook/typings.d.ts +0 -4
  221. package/dist/modern/generators/AURELIA/index.js +0 -43
  222. package/dist/modern/generators/AURELIA/template-csf/.storybook/tsconfig.json +0 -20
  223. package/dist/modern/generators/AURELIA/template-csf/.storybook/typings.d.ts +0 -4
  224. package/dist/modern/generators/EMBER/index.js +0 -22
  225. package/dist/modern/generators/HTML/index.js +0 -17
  226. package/dist/modern/generators/MARIONETTE/index.js +0 -17
  227. package/dist/modern/generators/MARKO/index.js +0 -17
  228. package/dist/modern/generators/METEOR/index.js +0 -45
  229. package/dist/modern/generators/MITHRIL/index.js +0 -17
  230. package/dist/modern/generators/PREACT/index.js +0 -19
  231. package/dist/modern/generators/RAX/index.js +0 -32
  232. package/dist/modern/generators/REACT/index.js +0 -17
  233. package/dist/modern/generators/REACT_NATIVE/index.js +0 -57
  234. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/addons.js +0 -3
  235. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/index.js +0 -25
  236. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/rn-addons.js +0 -2
  237. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/stories/Button/Button.stories.js +0 -20
  238. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/stories/Button/index.js +0 -17
  239. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/stories/CenterView/index.js +0 -16
  240. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/stories/CenterView/style.js +0 -8
  241. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/stories/Welcome/Welcome.stories.js +0 -6
  242. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/stories/Welcome/index.js +0 -57
  243. package/dist/modern/generators/REACT_NATIVE/template-csf/storybook/stories/index.js +0 -2
  244. package/dist/modern/generators/REACT_SCRIPTS/index.js +0 -69
  245. package/dist/modern/generators/RIOT/index.js +0 -19
  246. package/dist/modern/generators/SERVER/index.js +0 -22
  247. package/dist/modern/generators/SERVER/template-csf/.storybook/preview.js +0 -5
  248. package/dist/modern/generators/SFC_VUE/index.js +0 -17
  249. package/dist/modern/generators/SVELTE/index.js +0 -63
  250. package/dist/modern/generators/UPDATE_PACKAGE_ORGANIZATIONS/index.js +0 -78
  251. package/dist/modern/generators/VUE/index.js +0 -19
  252. package/dist/modern/generators/VUE3/index.js +0 -19
  253. package/dist/modern/generators/WEB-COMPONENTS/index.js +0 -19
  254. package/dist/modern/generators/WEBPACK_REACT/index.js +0 -17
  255. package/dist/modern/generators/baseGenerator.js +0 -153
  256. package/dist/modern/generators/configure.js +0 -87
  257. package/dist/modern/helpers.js +0 -239
  258. package/dist/modern/initiate.js +0 -302
  259. package/dist/modern/js-package-manager/JsPackageManager.js +0 -273
  260. package/dist/modern/js-package-manager/JsPackageManagerFactory.js +0 -57
  261. package/dist/modern/js-package-manager/NPMProxy.js +0 -76
  262. package/dist/modern/js-package-manager/PackageJsonHelper.js +0 -33
  263. package/dist/modern/js-package-manager/Yarn1Proxy.js +0 -61
  264. package/dist/modern/js-package-manager/Yarn2Proxy.js +0 -57
  265. package/dist/modern/js-package-manager/index.js +0 -57
  266. package/dist/modern/link.js +0 -98
  267. package/dist/modern/migrate.js +0 -35
  268. package/dist/modern/project_types.js +0 -274
  269. package/dist/modern/repro-generators/configs.js +0 -196
  270. package/dist/modern/repro-generators/scripts.js +0 -243
  271. package/dist/modern/repro.js +0 -194
  272. package/dist/modern/typings.d.ts +0 -3
  273. package/dist/modern/upgrade.js +0 -174
  274. package/dist/modern/versions.js +0 -67
  275. package/dist/modern/warn.js +0 -32
  276. package/dist/modern/window.d.js +0 -5
  277. package/dist/ts3.4/NpmOptions.d.ts +0 -4
  278. package/dist/ts3.4/add.d.ts +0 -10
  279. package/dist/ts3.4/automigrate/fixes/angular12.d.ts +0 -15
  280. package/dist/ts3.4/automigrate/fixes/builder-vite.d.ts +0 -19
  281. package/dist/ts3.4/automigrate/fixes/eslint-plugin.d.ts +0 -15
  282. package/dist/ts3.4/automigrate/fixes/index.d.ts +0 -3
  283. package/dist/ts3.4/automigrate/fixes/mainjsFramework.d.ts +0 -8
  284. package/dist/ts3.4/automigrate/fixes/webpack5.d.ts +0 -26
  285. package/dist/ts3.4/automigrate/helpers/getEslintInfo.d.ts +0 -2
  286. package/dist/ts3.4/automigrate/index.d.ts +0 -7
  287. package/dist/ts3.4/automigrate/types.d.ts +0 -15
  288. package/dist/ts3.4/babel-config.d.ts +0 -4
  289. package/dist/ts3.4/detect-nextjs.d.ts +0 -2
  290. package/dist/ts3.4/detect-webpack.d.ts +0 -2
  291. package/dist/ts3.4/detect.d.ts +0 -16
  292. package/dist/ts3.4/extract.d.ts +0 -1
  293. package/dist/ts3.4/generate.d.ts +0 -1
  294. package/dist/ts3.4/generators/ANGULAR/angular-helpers.d.ts +0 -6
  295. package/dist/ts3.4/generators/ANGULAR/index.d.ts +0 -3
  296. package/dist/ts3.4/generators/AURELIA/index.d.ts +0 -3
  297. package/dist/ts3.4/generators/EMBER/index.d.ts +0 -3
  298. package/dist/ts3.4/generators/HTML/index.d.ts +0 -3
  299. package/dist/ts3.4/generators/MARIONETTE/index.d.ts +0 -3
  300. package/dist/ts3.4/generators/MARKO/index.d.ts +0 -3
  301. package/dist/ts3.4/generators/METEOR/index.d.ts +0 -3
  302. package/dist/ts3.4/generators/MITHRIL/index.d.ts +0 -3
  303. package/dist/ts3.4/generators/PREACT/index.d.ts +0 -3
  304. package/dist/ts3.4/generators/RAX/index.d.ts +0 -3
  305. package/dist/ts3.4/generators/REACT/index.d.ts +0 -3
  306. package/dist/ts3.4/generators/REACT_NATIVE/index.d.ts +0 -4
  307. package/dist/ts3.4/generators/REACT_SCRIPTS/index.d.ts +0 -3
  308. package/dist/ts3.4/generators/RIOT/index.d.ts +0 -3
  309. package/dist/ts3.4/generators/SERVER/index.d.ts +0 -3
  310. package/dist/ts3.4/generators/SFC_VUE/index.d.ts +0 -3
  311. package/dist/ts3.4/generators/SVELTE/index.d.ts +0 -3
  312. package/dist/ts3.4/generators/UPDATE_PACKAGE_ORGANIZATIONS/index.d.ts +0 -4
  313. package/dist/ts3.4/generators/VUE/index.d.ts +0 -3
  314. package/dist/ts3.4/generators/VUE3/index.d.ts +0 -3
  315. package/dist/ts3.4/generators/WEB-COMPONENTS/index.d.ts +0 -3
  316. package/dist/ts3.4/generators/WEBPACK_REACT/index.d.ts +0 -3
  317. package/dist/ts3.4/generators/baseGenerator.d.ts +0 -22
  318. package/dist/ts3.4/helpers.d.ts +0 -25
  319. package/dist/ts3.4/initiate.d.ts +0 -17
  320. package/dist/ts3.4/js-package-manager/JsPackageManager.d.ts +0 -92
  321. package/dist/ts3.4/js-package-manager/JsPackageManagerFactory.d.ts +0 -4
  322. package/dist/ts3.4/js-package-manager/NPMProxy.d.ts +0 -12
  323. package/dist/ts3.4/js-package-manager/PackageJson.d.ts +0 -3
  324. package/dist/ts3.4/js-package-manager/PackageJsonHelper.d.ts +0 -3
  325. package/dist/ts3.4/js-package-manager/Yarn1Proxy.d.ts +0 -10
  326. package/dist/ts3.4/js-package-manager/Yarn2Proxy.d.ts +0 -10
  327. package/dist/ts3.4/js-package-manager/index.d.ts +0 -4
  328. package/dist/ts3.4/link.d.ts +0 -6
  329. package/dist/ts3.4/migrate.d.ts +0 -1
  330. package/dist/ts3.4/project_types.d.ts +0 -67
  331. package/dist/ts3.4/repro-generators/configs.d.ts +0 -43
  332. package/dist/ts3.4/upgrade.d.ts +0 -19
  333. package/dist/ts3.4/warn.d.ts +0 -5
  334. package/dist/ts3.9/generators/MARIONETTE/index.d.ts +0 -3
  335. package/dist/ts3.9/generators/MARKO/index.d.ts +0 -3
  336. package/dist/ts3.9/generators/METEOR/index.d.ts +0 -3
  337. package/dist/ts3.9/generators/MITHRIL/index.d.ts +0 -3
  338. package/dist/ts3.9/generators/PREACT/index.d.ts +0 -3
  339. package/dist/ts3.9/generators/RAX/index.d.ts +0 -3
  340. package/dist/ts3.9/generators/REACT/index.d.ts +0 -3
  341. package/dist/ts3.9/generators/REACT_SCRIPTS/index.d.ts +0 -3
  342. package/dist/ts3.9/generators/RIOT/index.d.ts +0 -3
  343. package/dist/ts3.9/generators/SERVER/index.d.ts +0 -3
  344. package/dist/ts3.9/generators/SFC_VUE/index.d.ts +0 -3
  345. package/dist/ts3.9/generators/SVELTE/index.d.ts +0 -3
  346. package/dist/ts3.9/generators/UPDATE_PACKAGE_ORGANIZATIONS/index.d.ts +0 -4
  347. package/dist/ts3.9/generators/VUE/index.d.ts +0 -3
  348. package/dist/ts3.9/generators/VUE3/index.d.ts +0 -3
  349. package/dist/ts3.9/generators/WEB-COMPONENTS/index.d.ts +0 -3
  350. package/dist/ts3.9/generators/WEBPACK_REACT/index.d.ts +0 -3
  351. package/dist/ts3.9/generators/baseGenerator.d.ts +0 -22
  352. package/dist/ts3.9/generators/configure.d.ts +0 -18
  353. package/dist/ts3.9/initiate.d.ts +0 -17
  354. package/dist/ts3.9/repro-generators/scripts.d.ts +0 -36
  355. package/dist/ts3.9/repro.d.ts +0 -12
  356. package/dist/ts3.9/versions.d.ts +0 -60
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/direction</title><g id="illustration/direction" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#FFD476" d="M23.4917015,33.6030641 L2.93840258,31.4321033 C2.38917316,31.3740904 1.99096346,30.8818233 2.04897631,30.3325939 C2.0747515,30.0885705 2.18934861,29.8625419 2.37095722,29.6975265 L34.2609105,0.721285325 C34.6696614,0.349881049 35.3021022,0.38015648 35.6735064,0.788907393 C35.9232621,1.06377731 36.0001133,1.45442096 35.8730901,1.80341447 L24.5364357,32.9506164 C24.3793473,33.3822133 23.9484565,33.6513092 23.4917015,33.6030641 L23.4917015,33.6030641 Z"/><path id="Combined-Shape-Copy" fill="#FFC445" d="M24.3163597,33.2881029 C24.0306575,33.0138462 23.9337246,32.5968232 24.069176,32.2246735 L35.091923,1.9399251 C35.2266075,1.56988243 35.5659249,1.31333613 35.9586669,1.28460955 C36.5094802,1.24432106 36.9886628,1.65818318 37.0289513,2.20899647 L40.2437557,46.1609256 C40.2644355,46.4436546 40.1641446,46.7218752 39.9678293,46.9263833 C39.5853672,47.3248067 38.9523344,47.3377458 38.5539111,46.9552837 L24.3163597,33.2881029 L24.3163597,33.2881029 Z"/></g></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/flow</title><g id="illustration/flow" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#79C9FC" fill-rule="nonzero" d="M30,29 C32.7614237,29 35,26.7614237 35,24 C35,14.6111593 27.3888407,7 18,7 C8.61115925,7 1,14.6111593 1,24 C1,33.3888407 8.61115925,41 18,41 C19.3333404,41 20.6447683,40.8466238 21.9154603,40.5471706 C19.5096374,39.3319645 17.5510566,37.8612875 16.0456579,36.1314815 C14.1063138,33.9030427 12.769443,31.0725999 12.0293806,27.6556449 C11.360469,26.565281 11,25.3082308 11,24 C11,20.1340068 14.1340068,17 18,17 C21.8659932,17 25,20.1340068 25,24 C25,26.125 27.7040312,29 30,29 Z"/><path id="Combined-Shape-Copy" fill="#FFC445" fill-rule="nonzero" d="M42,29 C44.7614237,29 47,26.7614237 47,24 C47,14.6111593 39.3888407,7 30,7 C20.6111593,7 13,14.6111593 13,24 C13,33.3888407 20.6111593,41 30,41 C31.3333404,41 32.6447683,40.8466238 33.9154603,40.5471706 C31.5096374,39.3319645 29.4051056,37.9781963 28.0456579,36.1314815 C26.0625,33.4375 23,27.1875 23,24 C23,20.1340068 26.1340068,17 30,17 C33.8659932,17 37,20.1340068 37,24 C37.02301,26.3435241 39.7040312,29 42,29 Z" transform="translate(30.000000, 24.000000) scale(-1, -1) translate(-30.000000, -24.000000)"/></g></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/plugin</title><g id="illustration/plugin" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#79C9FC" d="M26,15.3994248 C26,15.4091303 26,15.4188459 26,15.4285714 L26,21.4694881 C25.8463595,21.4969567 25.6941676,21.51275 25.5873784,21.51275 C25.4974117,21.51275 25.4230979,21.4768034 25.377756,21.4206259 L25.2660784,21.2822603 L25.1317423,21.1657666 C24.2436317,20.3956144 23.100098,19.9633214 21.895551,19.9633214 C19.2039137,19.9633214 17,22.1075558 17,24.7804643 C17,27.4533728 19.2039137,29.5976071 21.895551,29.5976071 C23.1972122,29.5976071 24.3149423,29.2878193 25.1231445,28.3613697 C25.4542273,27.9818463 25.568273,27.9073214 25.5873784,27.9073214 C25.681532,27.9073214 25.8352452,27.9239643 26,27.9524591 L26,32.5714286 C26,32.5811541 26,32.5908697 26,32.6005752 L26,33 C26,35.209139 24.209139,37 22,37 L4,37 C1.790861,37 0,35.209139 0,33 L0,15 C0,12.790861 1.790861,11 4,11 L22,11 C24.209139,11 26,12.790861 26,15 L26,15.3994248 Z"/><path id="Path" fill="#87E6E5" d="M27.9998779,32.5714286 C27.9998779,33.3604068 28.6572726,34 29.4682101,34 L46.5315458,34 C47.3424832,34 47.9998779,33.3604068 47.9998779,32.5714286 L47.9998779,15.4285714 C47.9998779,14.6395932 47.3424832,14 46.5315458,14 L29.4682101,14 C28.6572726,14 27.9998779,14.6395932 27.9998779,15.4285714 L27.9998779,21.8355216 C27.9334367,22.2650514 27.8567585,22.6454496 27.746391,22.8084643 C27.4245309,23.2838571 26.2402709,23.51275 25.5873784,23.51275 C24.8705773,23.51275 24.2322714,23.1857725 23.8214379,22.6767605 C23.3096996,22.2329909 22.6349941,21.9633214 21.895551,21.9633214 C20.2963823,21.9633214 19,23.2245992 19,24.7804643 C19,26.3363293 20.2963823,27.5976071 21.895551,27.5976071 C22.5398535,27.5976071 23.2399343,27.477727 23.6160247,27.0466112 C24.1396029,26.4464286 24.7367044,25.9073214 25.5873784,25.9073214 C26.2402709,25.9073214 27.5912951,26.1766031 27.8226692,26.6116071 C27.8819199,26.7230038 27.9403239,26.921677 27.9998779,27.1556219 L27.9998779,32.5714286 Z"/></g></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/repo</title><g id="illustration/repo" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Rectangle-62-Copy" fill="#B7F0EF" d="M27.2217723,9.04506931 L41.2217723,6.2682098 C43.3886973,5.83840648 45.4937616,7.2466219 45.9235649,9.41354696 C45.9743993,9.66983721 46,9.93049166 46,10.1917747 L46,32.581381 C46,34.4904961 44.650862,36.1335143 42.7782277,36.5049459 L28.7782277,39.2818054 C26.6113027,39.7116087 24.5062384,38.3033933 24.0764351,36.1364682 C24.0256007,35.880178 24,35.6195235 24,35.3582405 L24,12.9686342 C24,11.0595191 25.349138,9.4165009 27.2217723,9.04506931 Z" opacity=".7"/><path id="Combined-Shape" fill="#87E6E5" d="M6.77822775,6.2682098 L20.7782277,9.04506931 C22.650862,9.4165009 24,11.0595191 24,12.9686342 L24,35.3582405 C24,37.5673795 22.209139,39.3582405 20,39.3582405 C19.738717,39.3582405 19.4780625,39.3326398 19.2217723,39.2818054 L5.22177225,36.5049459 C3.34913798,36.1335143 2,34.4904961 2,32.581381 L2,10.1917747 C2,7.98263571 3.790861,6.19177471 6,6.19177471 C6.26128305,6.19177471 6.5219375,6.21737537 6.77822775,6.2682098 Z"/><path id="Rectangle-63-Copy-2" fill="#61C1FD" d="M22,10 C23.1666667,10.2291667 24.0179036,10.625 24.5537109,11.1875 C25.0895182,11.75 25.5716146,12.875 26,14.5625 C26,29.3020833 26,37.5208333 26,39.21875 C26,40.9166667 26.4241536,42.9583333 27.2724609,45.34375 L24.5537109,41.875 L22.9824219,45.34375 C22.327474,43.1979167 22,41.2291667 22,39.4375 C22,37.6458333 22,27.8333333 22,10 Z"/></g></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/stackalt</title><g id="illustration/stackalt" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#FFAE00" d="M23.8628277,0 L23.8628277,48 L3.32291648,36.2491883 L3.32155653,11.9499781 L23.8628277,0 Z M23.8670509,0 L44.408322,11.9499781 L44.4069621,36.2491883 L23.8670509,48 L23.8670509,0 Z" opacity=".196"/><path id="Rectangle-46-Copy-3" fill="#66BF3C" d="M15.8232279,19.1155258 L24.7368455,21.4714881 C29.6053842,22.7582937 33.4077423,26.5606518 34.694548,31.4291905 L37.0505103,40.3428082 C37.6150232,42.4786032 36.3412474,44.6676353 34.2054524,45.2321482 C33.5569474,45.4035549 32.87575,45.4091235 32.2245294,45.2483418 L23.3459013,43.0562718 C18.2976962,41.809906 14.3561301,37.8683399 13.1097642,32.8201348 L10.9176943,23.9415066 C10.3881737,21.7967682 11.6975664,19.6288529 13.8423049,19.0993322 C14.4935255,18.9385505 15.1747229,18.9441191 15.8232279,19.1155258 Z" opacity=".5" transform="translate(23.999997, 32.166058) rotate(-45.000000) translate(-23.999997, -32.166058)"/><path id="Rectangle-46-Copy-2" fill="#FFAE00" d="M15.8232279,11.2216893 L24.7368455,13.5776516 C29.6053842,14.8644572 33.4077423,18.6668153 34.694548,23.5353541 L37.0505103,32.4489717 C37.6150232,34.5847667 36.3412474,36.7737988 34.2054524,37.3383117 C33.5569474,37.5097184 32.87575,37.515287 32.2245294,37.3545053 L23.3459013,35.1624353 C18.2976962,33.9160695 14.3561301,29.9745034 13.1097642,24.9262983 L10.9176943,16.0476701 C10.3881737,13.9029317 11.6975664,11.7350164 13.8423049,11.2054957 C14.4935255,11.044714 15.1747229,11.0502826 15.8232279,11.2216893 Z" opacity=".5" transform="translate(23.999997, 24.272222) rotate(-45.000000) translate(-23.999997, -24.272222)"/><path id="Rectangle-46-Copy" fill="#FC521F" d="M15.8232279,3.32785281 L24.7368455,5.68381509 C29.6053842,6.97062075 33.4077423,10.7729788 34.694548,15.6415176 L37.0505103,24.5551352 C37.6150232,26.6909302 36.3412474,28.8799623 34.2054524,29.4444752 C33.5569474,29.6158819 32.87575,29.6214505 32.2245294,29.4606688 L23.3459013,27.2685988 C18.2976962,26.022233 14.3561301,22.0806669 13.1097642,17.0324618 L10.9176943,8.15383364 C10.3881737,6.00909519 11.6975664,3.84117987 13.8423049,3.31165925 C14.4935255,3.15087753 15.1747229,3.15644615 15.8232279,3.32785281 Z" opacity=".5" transform="translate(23.999997, 16.378385) rotate(-45.000000) translate(-23.999997, -16.378385)"/></g></svg>
@@ -1,30 +0,0 @@
1
- .storybook-button {
2
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
- font-weight: 700;
4
- border: 0;
5
- border-radius: 3em;
6
- cursor: pointer;
7
- display: inline-block;
8
- line-height: 1;
9
- }
10
- .storybook-button--primary {
11
- color: white;
12
- background-color: #1ea7fd;
13
- }
14
- .storybook-button--secondary {
15
- color: #333;
16
- background-color: transparent;
17
- box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
18
- }
19
- .storybook-button--small {
20
- font-size: 12px;
21
- padding: 10px 16px;
22
- }
23
- .storybook-button--medium {
24
- font-size: 14px;
25
- padding: 11px 20px;
26
- }
27
- .storybook-button--large {
28
- font-size: 16px;
29
- padding: 12px 24px;
30
- }
@@ -1,32 +0,0 @@
1
- .wrapper {
2
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
4
- padding: 15px 20px;
5
- display: flex;
6
- align-items: center;
7
- justify-content: space-between;
8
- }
9
-
10
- svg {
11
- display: inline-block;
12
- vertical-align: top;
13
- }
14
-
15
- h1 {
16
- font-weight: 900;
17
- font-size: 20px;
18
- line-height: 1;
19
- margin: 6px 0 6px 10px;
20
- display: inline-block;
21
- vertical-align: top;
22
- }
23
-
24
- button + button {
25
- margin-left: 10px;
26
- }
27
-
28
- .welcome {
29
- color: #333;
30
- font-size: 14px;
31
- margin-right: 10px;
32
- }
@@ -1,69 +0,0 @@
1
- section {
2
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
- font-size: 14px;
4
- line-height: 24px;
5
- padding: 48px 20px;
6
- margin: 0 auto;
7
- max-width: 600px;
8
- color: #333;
9
- }
10
-
11
- section h2 {
12
- font-weight: 900;
13
- font-size: 32px;
14
- line-height: 1;
15
- margin: 0 0 4px;
16
- display: inline-block;
17
- vertical-align: top;
18
- }
19
-
20
- section p {
21
- margin: 1em 0;
22
- }
23
-
24
- section a {
25
- text-decoration: none;
26
- color: #1ea7fd;
27
- }
28
-
29
- section ul {
30
- padding-left: 30px;
31
- margin: 1em 0;
32
- }
33
-
34
- section li {
35
- margin-bottom: 8px;
36
- }
37
-
38
- section .tip {
39
- display: inline-block;
40
- border-radius: 1em;
41
- font-size: 11px;
42
- line-height: 12px;
43
- font-weight: 700;
44
- background: #e7fdd8;
45
- color: #66bf3c;
46
- padding: 4px 12px;
47
- margin-right: 10px;
48
- vertical-align: top;
49
- }
50
-
51
- section .tip-wrapper {
52
- font-size: 13px;
53
- line-height: 20px;
54
- margin-top: 40px;
55
- margin-bottom: 40px;
56
- }
57
-
58
- section .tip-wrapper svg {
59
- display: inline-block;
60
- height: 12px;
61
- width: 12px;
62
- margin-right: 4px;
63
- vertical-align: top;
64
- margin-top: 3px;
65
- }
66
-
67
- section .tip-wrapper svg path {
68
- fill: #1ea7fd;
69
- }
@@ -1,57 +0,0 @@
1
- import { hbs } from 'ember-cli-htmlbars';
2
- import { action } from '@storybook/addon-actions';
3
- import { linkTo } from '@storybook/addon-links';
4
-
5
- // More on default export: https://storybook.js.org/docs/ember/writing-stories/introduction#default-export
6
- export default {
7
- title: 'Button',
8
- // More on argTypes: https://storybook.js.org/docs/ember/api/argtypes
9
- argTypes: {
10
- children: { control: 'text' },
11
- },
12
- };
13
-
14
- // More on component templates: https://storybook.js.org/docs/ember/writing-stories/introduction#using-args
15
- const Template = (args) => ({
16
- template: hbs`<button {{action onClick}}>{{children}}</button>`,
17
- context: args,
18
- });
19
-
20
- export const Text = Template.bind({});
21
- // More on args: https://storybook.js.org/docs/ember/writing-stories/args
22
- Text.args = {
23
- children: 'Button',
24
- onClick: action('onClick'),
25
- };
26
-
27
- export const Emoji = Template.bind({});
28
- Emoji.args = {
29
- children: '😀 😎 👍 💯',
30
- };
31
-
32
- export const TextWithAction = () => ({
33
- template: hbs`
34
- <button {{action onClick}}>
35
- Trigger Action
36
- </button>
37
- `,
38
- context: {
39
- onClick: () => action('This was clicked')(),
40
- },
41
- });
42
-
43
- TextWithAction.storyName = 'With an action';
44
- TextWithAction.parameters = { notes: 'My notes on a button with emojis' };
45
-
46
- export const ButtonWithLinkToAnotherStory = () => ({
47
- template: hbs`
48
- <button {{action onClick}}>
49
- Go to Welcome Story
50
- </button>
51
- `,
52
- context: {
53
- onClick: linkTo('example-introduction--page'),
54
- },
55
- });
56
-
57
- ButtonWithLinkToAnotherStory.storyName = 'button with link to another story';
@@ -1,21 +0,0 @@
1
- import './button.css';
2
-
3
- export const createButton = ({
4
- primary = false,
5
- size = 'medium',
6
- backgroundColor,
7
- label,
8
- onClick,
9
- }) => {
10
- const btn = document.createElement('button');
11
- btn.type = 'button';
12
- btn.innerText = label;
13
- btn.addEventListener('click', onClick);
14
-
15
- const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
16
- btn.className = ['storybook-button', `storybook-button--${size}`, mode].join(' ');
17
-
18
- btn.style.backgroundColor = backgroundColor;
19
-
20
- return btn;
21
- };
@@ -1,48 +0,0 @@
1
- import { createButton } from './Button';
2
-
3
- // More on default export: https://storybook.js.org/docs/html/writing-stories/introduction#default-export
4
- export default {
5
- title: 'Example/Button',
6
- // More on argTypes: https://storybook.js.org/docs/html/api/argtypes
7
- argTypes: {
8
- backgroundColor: { control: 'color' },
9
- label: { control: 'text' },
10
- onClick: { action: 'onClick' },
11
- primary: { control: 'boolean' },
12
- size: {
13
- control: { type: 'select' },
14
- options: ['small', 'medium', 'large'],
15
- },
16
- },
17
- };
18
-
19
- // More on component templates: https://storybook.js.org/docs/html/writing-stories/introduction#using-args
20
- const Template = ({ label, ...args }) => {
21
- // You can either use a function to create DOM elements or use a plain html string!
22
- // return `<div>${label}</div>`;
23
- return createButton({ label, ...args });
24
- };
25
-
26
- export const Primary = Template.bind({});
27
- // More on args: https://storybook.js.org/docs/html/writing-stories/args
28
- Primary.args = {
29
- primary: true,
30
- label: 'Button',
31
- };
32
-
33
- export const Secondary = Template.bind({});
34
- Secondary.args = {
35
- label: 'Button',
36
- };
37
-
38
- export const Large = Template.bind({});
39
- Large.args = {
40
- size: 'large',
41
- label: 'Button',
42
- };
43
-
44
- export const Small = Template.bind({});
45
- Small.args = {
46
- size: 'small',
47
- label: 'Button',
48
- };
@@ -1,47 +0,0 @@
1
- import './header.css';
2
- import { createButton } from './Button';
3
-
4
- export const createHeader = ({ user, onLogout, onLogin, onCreateAccount }) => {
5
- const header = document.createElement('header');
6
-
7
- const wrapper = document.createElement('div');
8
- wrapper.className = 'wrapper';
9
-
10
- const logo = `<div>
11
- <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
12
- <g fill="none" fillRule="evenodd">
13
- <path
14
- d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
15
- fill="#FFF" />
16
- <path
17
- d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
18
- fill="#555AB9" />
19
- <path d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z" fill="#91BAF8" />
20
- </g>
21
- </svg>
22
- <h1>Acme</h1>
23
- </div>`;
24
-
25
- wrapper.insertAdjacentHTML('afterbegin', logo);
26
-
27
- const account = document.createElement('div');
28
- if (user) {
29
- const welcomeMessage = `<span class="welcome">Welcome, <b>${user.name}</b>!</span>`;
30
- account.innerHTML = welcomeMessage;
31
- account.appendChild(createButton({ size: 'small', label: 'Log out', onClick: onLogout }));
32
- } else {
33
- account.appendChild(createButton({ size: 'small', label: 'Log in', onClick: onLogin }));
34
- account.appendChild(
35
- createButton({
36
- size: 'small',
37
- label: 'Sign up',
38
- onClick: onCreateAccount,
39
- primary: true,
40
- })
41
- );
42
- }
43
- wrapper.appendChild(account);
44
- header.appendChild(wrapper);
45
-
46
- return header;
47
- };
@@ -1,27 +0,0 @@
1
- import { createHeader } from './Header';
2
-
3
- export default {
4
- title: 'Example/Header',
5
- parameters: {
6
- // More on Story layout: https://storybook.js.org/docs/html/configure/story-layout
7
- layout: 'fullscreen',
8
- },
9
- // More on argTypes: https://storybook.js.org/docs/html/api/argtypes
10
- argTypes: {
11
- onLogin: { action: 'onLogin' },
12
- onLogout: { action: 'onLogout' },
13
- onCreateAccount: { action: 'onCreateAccount' },
14
- },
15
- };
16
-
17
- const Template = (args) => createHeader(args);
18
-
19
- export const LoggedIn = Template.bind({});
20
- LoggedIn.args = {
21
- user: {
22
- name: 'Jane Doe',
23
- },
24
- };
25
-
26
- export const LoggedOut = Template.bind({});
27
- LoggedOut.args = {};
@@ -1,94 +0,0 @@
1
- import './page.css';
2
- import { createHeader } from './Header';
3
-
4
- export const createPage = () => {
5
- const article = document.createElement('article');
6
- let user = null;
7
- let header = null;
8
-
9
- const rerenderHeader = () => {
10
- const wrapper = document.getElementsByTagName('article')[0];
11
- wrapper.replaceChild(createHeaderElement(), wrapper.firstChild);
12
- };
13
-
14
- const onLogin = () => {
15
- user = { name: 'Jane Doe' };
16
- rerenderHeader();
17
- };
18
-
19
- const onLogout = () => {
20
- user = null;
21
- rerenderHeader();
22
- };
23
-
24
- const onCreateAccount = () => {
25
- user = { name: 'Jane Doe' };
26
- rerenderHeader();
27
- };
28
-
29
- const createHeaderElement = () => {
30
- return createHeader({ onLogin, onLogout, onCreateAccount, user });
31
- };
32
-
33
- header = createHeaderElement();
34
- article.appendChild(header);
35
-
36
- const section = `
37
- <section>
38
- <h2>Pages in Storybook</h2>
39
- <p>
40
- We recommend building UIs with a
41
- <a
42
- href="https://blog.hichroma.com/component-driven-development-ce1109d56c8e"
43
- target="_blank"
44
- rel="noopener noreferrer">
45
- <strong>component-driven</strong>
46
- </a>
47
- process starting with atomic components and ending with pages.
48
- </p>
49
- <p>
50
- Render pages with mock data. This makes it easy to build and review page states without
51
- needing to navigate to them in your app. Here are some handy patterns for managing page data
52
- in Storybook:
53
- </p>
54
- <ul>
55
- <li>
56
- Use a higher-level connected component. Storybook helps you compose such data from the
57
- "args" of child component stories
58
- </li>
59
- <li>
60
- Assemble data in the page component from your services. You can mock these services out
61
- using Storybook.
62
- </li>
63
- </ul>
64
- <p>
65
- Get a guided tutorial on component-driven development at
66
- <a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer">
67
- Storybook tutorials
68
- </a>
69
- . Read more in the
70
- <a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">docs</a>
71
- .
72
- </p>
73
- <div class="tip-wrapper">
74
- <span class="tip">Tip</span>
75
- Adjust the width of the canvas with the
76
- <svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
77
- <g fill="none" fillRule="evenodd">
78
- <path
79
- d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0
80
- 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0
81
- 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
82
- id="a"
83
- fill="#999" />
84
- </g>
85
- </svg>
86
- Viewports addon in the toolbar
87
- </div>
88
- </section>
89
- `;
90
-
91
- article.insertAdjacentHTML('beforeend', section);
92
-
93
- return article;
94
- };
@@ -1,23 +0,0 @@
1
- import { within, userEvent } from '@storybook/testing-library';
2
- import { createPage } from './Page';
3
-
4
- export default {
5
- title: 'Example/Page',
6
- parameters: {
7
- // More on Story layout: https://storybook.js.org/docs/html/configure/story-layout
8
- layout: 'fullscreen',
9
- },
10
- };
11
-
12
- const Template = () => createPage();
13
-
14
- export const LoggedOut = Template.bind({});
15
-
16
- export const LoggedIn = Template.bind({});
17
-
18
- // More on interaction testing: https://storybook.js.org/docs/html/writing-tests/interaction-testing
19
- LoggedIn.play = async ({ canvasElement }) => {
20
- const canvas = within(canvasElement);
21
- const loginButton = await canvas.getByRole('button', { name: /Log in/i });
22
- await userEvent.click(loginButton);
23
- };
@@ -1,20 +0,0 @@
1
- import { View } from 'backbone.marionette';
2
-
3
- import { storiesOf } from '@storybook/marionette';
4
-
5
- storiesOf('Demo', module).add(
6
- 'button',
7
- () =>
8
- new View({
9
- template: () => '<button id="my_button">some button</button>',
10
- ui: {
11
- button: '#my_button',
12
- },
13
- triggers: {
14
- 'click @ui.button': 'click',
15
- },
16
- onClick() {
17
- console.log('button clicked');
18
- },
19
- })
20
- );
@@ -1,24 +0,0 @@
1
- import { action } from '@storybook/addon-actions';
2
- import Button from './Button.marko';
3
-
4
- // More on default export: https://storybook.js.org/docs/marko/writing-stories/introduction#default-export
5
- export default {
6
- title: 'Button',
7
- // More on argTypes: https://storybook.js.org/docs/marko/api/argtypes
8
- argTypes: {
9
- children: { control: 'text' },
10
- },
11
- };
12
-
13
- // More on component templates: https://storybook.js.org/docs/marko/writing-stories/introduction#using-args
14
- const Template = (args) => ({
15
- component: Button,
16
- input: args,
17
- });
18
-
19
- export const Text = Template.bind({});
20
- // More on args: https://storybook.js.org/docs/marko/writing-stories/args
21
- Text.args = {
22
- children: 'Button',
23
- onClick: action('onClick'),
24
- };
@@ -1,13 +0,0 @@
1
- class {
2
- onCreate(input) {
3
- this.onClick = input.onClick;
4
- }
5
-
6
- handleClick() {
7
- this.input.onClick();
8
- }
9
- }
10
-
11
- <div>
12
- <button type="button" on-click("handleClick")>${input.children}</button>
13
- </div>
@@ -1,22 +0,0 @@
1
- /** @jsx m */
2
-
3
- import m from 'mithril';
4
- import './button.css';
5
-
6
- export const Button = {
7
- view: ({ children, attrs }) => {
8
- const mode = attrs.primary ? 'storybook-button--primary' : 'storybook-button--secondary';
9
- const size = attrs.size || 'medium';
10
-
11
- return (
12
- <button
13
- type="button"
14
- class={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
15
- style={attrs.backgroundColor && { backgroundColor: attrs.backgroundColor }}
16
- onclick={attrs.onClick}
17
- >
18
- {children}
19
- </button>
20
- );
21
- },
22
- };
@@ -1,43 +0,0 @@
1
- import m from 'mithril';
2
-
3
- import { Button } from './Button';
4
-
5
- // More on default export: https://storybook.js.org/docs/mithril/writing-stories/introduction#default-export
6
- export default {
7
- title: 'Example/Button',
8
- component: Button,
9
- // More on argTypes: https://storybook.js.org/docs/mithril/api/argtypes
10
- argTypes: {
11
- backgroundColor: { control: 'color' },
12
- onClick: { action: 'onClick' },
13
- },
14
- };
15
-
16
- // More on component templates: https://storybook.js.org/docs/mithril/writing-stories/introduction#using-args
17
- const Template = ({ children, ...args }) => ({
18
- view: () => m(Button, args, children),
19
- });
20
-
21
- export const Primary = Template.bind({});
22
- // More on args: https://storybook.js.org/docs/mithril/writing-stories/args
23
- Primary.args = {
24
- primary: true,
25
- children: 'Button',
26
- };
27
-
28
- export const Secondary = Template.bind({});
29
- Secondary.args = {
30
- children: 'Button',
31
- };
32
-
33
- export const Large = Template.bind({});
34
- Large.args = {
35
- size: 'large',
36
- children: 'Button',
37
- };
38
-
39
- export const Small = Template.bind({});
40
- Small.args = {
41
- size: 'small',
42
- children: 'Button',
43
- };
@@ -1,51 +0,0 @@
1
- /** @jsx m */
2
-
3
- import m from 'mithril';
4
-
5
- import { Button } from './Button';
6
- import './header.css';
7
-
8
- export const Header = {
9
- view: ({ attrs }) => (
10
- <header>
11
- <div class="wrapper">
12
- <div>
13
- <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
14
- <g fill="none" fillRule="evenodd">
15
- <path
16
- d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
17
- fill="#FFF"
18
- />
19
- <path
20
- d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
21
- fill="#555AB9"
22
- />
23
- <path
24
- d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
25
- fill="#91BAF8"
26
- />
27
- </g>
28
- </svg>
29
- <h1>Acme</h1>
30
- </div>
31
- {m(
32
- 'div',
33
- ...(attrs.user
34
- ? [m(Button, { size: 'small', onClick: attrs.onLogout }, 'Log out')]
35
- : [
36
- m(Button, { size: 'small', onClick: attrs.onLogin }, 'Log in'),
37
- m(
38
- Button,
39
- {
40
- primary: true,
41
- size: 'small',
42
- onClick: attrs.onCreateAccount,
43
- },
44
- 'Sign up'
45
- ),
46
- ])
47
- )}
48
- </div>
49
- </header>
50
- ),
51
- };