@teambit/react 1.0.41 → 1.0.43

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 (208) hide show
  1. package/artifacts/env-template/public/{29.aabccd461805a58cd99a.js → 29.4f04dfbd91dbb8c799d1.js} +20 -20
  2. package/artifacts/env-template/public/{238.64be32cc6d4bc396b35e.js → 293.4bce474b96c9eb955917.js} +4 -4
  3. package/artifacts/env-template/public/assets-manifest.json +14 -14
  4. package/artifacts/env-template/public/{compositions.b6446d022ddef607b2fb.js → compositions.41e4853de81dfc859051.js} +1 -1
  5. package/artifacts/env-template/public/compositions.html +1 -1
  6. package/artifacts/env-template/public/{overview.536d77e3d6f68d0ddf21.js → overview.94f37bd549c676ac5677.js} +1 -1
  7. package/artifacts/env-template/public/overview.html +1 -1
  8. package/artifacts/env-template/public/{peers.777d86ba769cf02b788f.js → peers.24438ad67cb125c83d75.js} +1 -1
  9. package/artifacts/env-template/public/{preview-root.983463c786334e1fbaf1.js → preview-root.3b62d04b3a7f234bd8ca.js} +1 -1
  10. package/artifacts/env-template/public/static/css/{29.1c2448c7.css → 29.a178b2ff.css} +1 -1
  11. package/dist/apps/web/ssr/ssr-express.js +2 -2
  12. package/dist/apps/web/ssr/ssr-express.js.map +1 -1
  13. package/dist/apps/web/webpack/webpack.app.ssr.config.js +2 -4
  14. package/dist/apps/web/webpack/webpack.app.ssr.config.js.map +1 -1
  15. package/dist/{preview-1698981534427.js → preview-1699369416537.js} +2 -2
  16. package/dist/react.aspect.js +2 -4
  17. package/dist/react.aspect.js.map +1 -1
  18. package/dist/react.env.js +2 -3
  19. package/dist/react.env.js.map +1 -1
  20. package/dist/react.main.runtime.d.ts +5 -2
  21. package/dist/react.main.runtime.js +18 -3
  22. package/dist/react.main.runtime.js.map +1 -1
  23. package/dist/react.preview.runtime.js +3 -4
  24. package/dist/react.preview.runtime.js.map +1 -1
  25. package/dist/react.templates.d.ts +2 -1
  26. package/dist/react.templates.js +21 -36
  27. package/dist/react.templates.js.map +1 -1
  28. package/dist/react.ui.runtime.js +1 -2
  29. package/dist/react.ui.runtime.js.map +1 -1
  30. package/dist/webpack/postcss.config.js +1 -2
  31. package/dist/webpack/postcss.config.js.map +1 -1
  32. package/dist/webpack/webpack.config.base.js +2 -2
  33. package/dist/webpack/webpack.config.base.js.map +1 -1
  34. package/package.json +46 -44
  35. package/dist/templates/react-app/files/app-plugin.d.ts +0 -2
  36. package/dist/templates/react-app/files/app-plugin.js +0 -17
  37. package/dist/templates/react-app/files/app-plugin.js.map +0 -1
  38. package/dist/templates/react-app/files/app-root.d.ts +0 -2
  39. package/dist/templates/react-app/files/app-root.js +0 -24
  40. package/dist/templates/react-app/files/app-root.js.map +0 -1
  41. package/dist/templates/react-app/files/app.d.ts +0 -2
  42. package/dist/templates/react-app/files/app.js +0 -34
  43. package/dist/templates/react-app/files/app.js.map +0 -1
  44. package/dist/templates/react-app/files/compositions.d.ts +0 -2
  45. package/dist/templates/react-app/files/compositions.js +0 -24
  46. package/dist/templates/react-app/files/compositions.js.map +0 -1
  47. package/dist/templates/react-app/files/doc.d.ts +0 -2
  48. package/dist/templates/react-app/files/doc.js +0 -33
  49. package/dist/templates/react-app/files/doc.js.map +0 -1
  50. package/dist/templates/react-app/files/index.d.ts +0 -2
  51. package/dist/templates/react-app/files/index.js +0 -13
  52. package/dist/templates/react-app/files/index.js.map +0 -1
  53. package/dist/templates/react-app/index.d.ts +0 -2
  54. package/dist/templates/react-app/index.js +0 -84
  55. package/dist/templates/react-app/index.js.map +0 -1
  56. package/dist/templates/react-component/files/component.d.ts +0 -5
  57. package/dist/templates/react-component/files/component.js +0 -35
  58. package/dist/templates/react-component/files/component.js.map +0 -1
  59. package/dist/templates/react-component/files/composition.d.ts +0 -5
  60. package/dist/templates/react-component/files/composition.js +0 -27
  61. package/dist/templates/react-component/files/composition.js.map +0 -1
  62. package/dist/templates/react-component/files/docs.d.ts +0 -5
  63. package/dist/templates/react-component/files/docs.js +0 -37
  64. package/dist/templates/react-component/files/docs.js.map +0 -1
  65. package/dist/templates/react-component/files/index-file.d.ts +0 -5
  66. package/dist/templates/react-component/files/index-file.js +0 -21
  67. package/dist/templates/react-component/files/index-file.js.map +0 -1
  68. package/dist/templates/react-component/files/test.d.ts +0 -5
  69. package/dist/templates/react-component/files/test.js +0 -28
  70. package/dist/templates/react-component/files/test.js.map +0 -1
  71. package/dist/templates/react-component/index.d.ts +0 -3
  72. package/dist/templates/react-component/index.js +0 -68
  73. package/dist/templates/react-component/index.js.map +0 -1
  74. package/dist/templates/react-component-js/files/component.d.ts +0 -5
  75. package/dist/templates/react-component-js/files/component.js +0 -28
  76. package/dist/templates/react-component-js/files/component.js.map +0 -1
  77. package/dist/templates/react-component-js/files/composition.d.ts +0 -5
  78. package/dist/templates/react-component-js/files/composition.js +0 -25
  79. package/dist/templates/react-component-js/files/composition.js.map +0 -1
  80. package/dist/templates/react-component-js/files/docs.d.ts +0 -5
  81. package/dist/templates/react-component-js/files/docs.js +0 -41
  82. package/dist/templates/react-component-js/files/docs.js.map +0 -1
  83. package/dist/templates/react-component-js/files/test.d.ts +0 -5
  84. package/dist/templates/react-component-js/files/test.js +0 -30
  85. package/dist/templates/react-component-js/files/test.js.map +0 -1
  86. package/dist/templates/react-component-js/index.d.ts +0 -3
  87. package/dist/templates/react-component-js/index.js +0 -70
  88. package/dist/templates/react-component-js/index.js.map +0 -1
  89. package/dist/templates/react-context/files/composition.d.ts +0 -5
  90. package/dist/templates/react-context/files/composition.js +0 -36
  91. package/dist/templates/react-context/files/composition.js.map +0 -1
  92. package/dist/templates/react-context/files/context-provider.d.ts +0 -5
  93. package/dist/templates/react-context/files/context-provider.js +0 -37
  94. package/dist/templates/react-context/files/context-provider.js.map +0 -1
  95. package/dist/templates/react-context/files/context.d.ts +0 -5
  96. package/dist/templates/react-context/files/context.js +0 -31
  97. package/dist/templates/react-context/files/context.js.map +0 -1
  98. package/dist/templates/react-context/files/docs.d.ts +0 -5
  99. package/dist/templates/react-context/files/docs.js +0 -60
  100. package/dist/templates/react-context/files/docs.js.map +0 -1
  101. package/dist/templates/react-context/files/index-file.d.ts +0 -5
  102. package/dist/templates/react-context/files/index-file.js +0 -23
  103. package/dist/templates/react-context/files/index-file.js.map +0 -1
  104. package/dist/templates/react-context/files/test.d.ts +0 -5
  105. package/dist/templates/react-context/files/test.js +0 -26
  106. package/dist/templates/react-context/files/test.js.map +0 -1
  107. package/dist/templates/react-context/index.d.ts +0 -2
  108. package/dist/templates/react-context/index.js +0 -65
  109. package/dist/templates/react-context/index.js.map +0 -1
  110. package/dist/templates/react-env/files/aspect.d.ts +0 -2
  111. package/dist/templates/react-env/files/aspect.js +0 -19
  112. package/dist/templates/react-env/files/aspect.js.map +0 -1
  113. package/dist/templates/react-env/files/doc.d.ts +0 -2
  114. package/dist/templates/react-env/files/doc.js +0 -186
  115. package/dist/templates/react-env/files/doc.js.map +0 -1
  116. package/dist/templates/react-env/files/index.d.ts +0 -2
  117. package/dist/templates/react-env/files/index.js +0 -19
  118. package/dist/templates/react-env/files/index.js.map +0 -1
  119. package/dist/templates/react-env/files/jest.config.d.ts +0 -1
  120. package/dist/templates/react-env/files/jest.config.js +0 -29
  121. package/dist/templates/react-env/files/jest.config.js.map +0 -1
  122. package/dist/templates/react-env/files/main.runtime.d.ts +0 -2
  123. package/dist/templates/react-env/files/main.runtime.js +0 -103
  124. package/dist/templates/react-env/files/main.runtime.js.map +0 -1
  125. package/dist/templates/react-env/files/preview.runtime.d.ts +0 -2
  126. package/dist/templates/react-env/files/preview.runtime.js +0 -37
  127. package/dist/templates/react-env/files/preview.runtime.js.map +0 -1
  128. package/dist/templates/react-env/files/typescript/styles.d.ts +0 -1
  129. package/dist/templates/react-env/files/typescript/styles.js +0 -15
  130. package/dist/templates/react-env/files/typescript/styles.js.map +0 -1
  131. package/dist/templates/react-env/files/typescript/ts-transformer.d.ts +0 -1
  132. package/dist/templates/react-env/files/typescript/ts-transformer.js +0 -58
  133. package/dist/templates/react-env/files/typescript/ts-transformer.js.map +0 -1
  134. package/dist/templates/react-env/files/typescript/typescript.config.d.ts +0 -1
  135. package/dist/templates/react-env/files/typescript/typescript.config.js +0 -29
  136. package/dist/templates/react-env/files/typescript/typescript.config.js.map +0 -1
  137. package/dist/templates/react-env/files/webpack.config.d.ts +0 -1
  138. package/dist/templates/react-env/files/webpack.config.js +0 -56
  139. package/dist/templates/react-env/files/webpack.config.js.map +0 -1
  140. package/dist/templates/react-env/index.d.ts +0 -2
  141. package/dist/templates/react-env/index.js +0 -124
  142. package/dist/templates/react-env/index.js.map +0 -1
  143. package/dist/templates/react-hook/files/component.d.ts +0 -5
  144. package/dist/templates/react-hook/files/component.js +0 -26
  145. package/dist/templates/react-hook/files/component.js.map +0 -1
  146. package/dist/templates/react-hook/files/composition.d.ts +0 -5
  147. package/dist/templates/react-hook/files/composition.js +0 -32
  148. package/dist/templates/react-hook/files/composition.js.map +0 -1
  149. package/dist/templates/react-hook/files/docs.d.ts +0 -5
  150. package/dist/templates/react-hook/files/docs.js +0 -42
  151. package/dist/templates/react-hook/files/docs.js.map +0 -1
  152. package/dist/templates/react-hook/files/index-file.d.ts +0 -5
  153. package/dist/templates/react-hook/files/index-file.js +0 -20
  154. package/dist/templates/react-hook/files/index-file.js.map +0 -1
  155. package/dist/templates/react-hook/files/index-file.spec.d.ts +0 -1
  156. package/dist/templates/react-hook/files/index-file.spec.js +0 -36
  157. package/dist/templates/react-hook/files/index-file.spec.js.map +0 -1
  158. package/dist/templates/react-hook/files/test.d.ts +0 -5
  159. package/dist/templates/react-hook/files/test.js +0 -29
  160. package/dist/templates/react-hook/files/test.js.map +0 -1
  161. package/dist/templates/react-hook/index.d.ts +0 -2
  162. package/dist/templates/react-hook/index.js +0 -58
  163. package/dist/templates/react-hook/index.js.map +0 -1
  164. package/templates/react-app/files/app-plugin.ts +0 -9
  165. package/templates/react-app/files/app-root.ts +0 -16
  166. package/templates/react-app/files/app.ts +0 -26
  167. package/templates/react-app/files/compositions.ts +0 -16
  168. package/templates/react-app/files/doc.ts +0 -23
  169. package/templates/react-app/files/index.ts +0 -5
  170. package/templates/react-app/index.ts +0 -48
  171. package/templates/react-component/files/component.ts +0 -25
  172. package/templates/react-component/files/composition.ts +0 -18
  173. package/templates/react-component/files/docs.ts +0 -28
  174. package/templates/react-component/files/index-file.ts +0 -12
  175. package/templates/react-component/files/test.ts +0 -19
  176. package/templates/react-component/index.ts +0 -27
  177. package/templates/react-component-js/files/component.ts +0 -18
  178. package/templates/react-component-js/files/composition.ts +0 -16
  179. package/templates/react-component-js/files/docs.ts +0 -32
  180. package/templates/react-component-js/files/test.ts +0 -21
  181. package/templates/react-component-js/index.ts +0 -32
  182. package/templates/react-context/files/composition.ts +0 -27
  183. package/templates/react-context/files/context-provider.ts +0 -27
  184. package/templates/react-context/files/context.ts +0 -21
  185. package/templates/react-context/files/docs.ts +0 -51
  186. package/templates/react-context/files/index-file.ts +0 -14
  187. package/templates/react-context/files/test.ts +0 -18
  188. package/templates/react-context/index.ts +0 -29
  189. package/templates/react-env/files/aspect.ts +0 -10
  190. package/templates/react-env/files/doc.ts +0 -177
  191. package/templates/react-env/files/index.ts +0 -10
  192. package/templates/react-env/files/jest.config.ts +0 -21
  193. package/templates/react-env/files/main.runtime.ts +0 -94
  194. package/templates/react-env/files/preview.runtime.ts +0 -27
  195. package/templates/react-env/files/typescript/styles.ts +0 -7
  196. package/templates/react-env/files/typescript/ts-transformer.ts +0 -50
  197. package/templates/react-env/files/typescript/typescript.config.ts +0 -21
  198. package/templates/react-env/files/webpack.config.ts +0 -48
  199. package/templates/react-env/index.ts +0 -68
  200. package/templates/react-hook/files/component.ts +0 -16
  201. package/templates/react-hook/files/composition.ts +0 -23
  202. package/templates/react-hook/files/docs.ts +0 -33
  203. package/templates/react-hook/files/index-file.spec.ts +0 -24
  204. package/templates/react-hook/files/index-file.ts +0 -11
  205. package/templates/react-hook/files/test.ts +0 -20
  206. package/templates/react-hook/index.ts +0 -21
  207. /package/{compositions-1698981534427.js → compositions-1699369416537.js} +0 -0
  208. /package/{overview-1698981534427.js → overview-1699369416537.js} +0 -0
@@ -1,70 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.reactComponentJS = exports.deprecatedReactComponentJS = void 0;
7
- function _component() {
8
- const data = require("./files/component");
9
- _component = function () {
10
- return data;
11
- };
12
- return data;
13
- }
14
- function _composition() {
15
- const data = require("./files/composition");
16
- _composition = function () {
17
- return data;
18
- };
19
- return data;
20
- }
21
- function _docs() {
22
- const data = require("./files/docs");
23
- _docs = function () {
24
- return data;
25
- };
26
- return data;
27
- }
28
- function _test() {
29
- const data = require("./files/test");
30
- _test = function () {
31
- return data;
32
- };
33
- return data;
34
- }
35
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
36
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
37
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
38
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
39
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
40
- const reactComponentJS = {
41
- name: 'react-js',
42
- description: 'a basic react component in js',
43
- hidden: true,
44
- generateFiles: context => {
45
- const {
46
- name,
47
- namePascalCase: Name
48
- } = context;
49
- const indexFile = {
50
- relativePath: 'index.js',
51
- content: `export { ${Name} } from './${name}';
52
- `
53
- };
54
- return [indexFile, (0, _component().componentFile)(context), (0, _composition().compositionFile)(context), (0, _docs().docsFile)(context), (0, _test().testFile)(context)];
55
- },
56
- config: {
57
- 'teambit.react/react': {},
58
- 'teambit.envs/envs': {
59
- env: 'teambit.react/react'
60
- }
61
- }
62
- };
63
- exports.reactComponentJS = reactComponentJS;
64
- const deprecatedReactComponentJS = _objectSpread(_objectSpread({}, reactComponentJS), {}, {
65
- name: 'react-component-js',
66
- hidden: true
67
- });
68
- exports.deprecatedReactComponentJS = deprecatedReactComponentJS;
69
-
70
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_component","data","require","_composition","_docs","_test","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","reactComponentJS","name","description","hidden","generateFiles","context","namePascalCase","Name","indexFile","relativePath","content","componentFile","compositionFile","docsFile","testFile","config","env","exports","deprecatedReactComponentJS"],"sources":["index.ts"],"sourcesContent":["import { ComponentTemplate, ComponentContext } from '@teambit/generator';\nimport { componentFile } from './files/component';\nimport { compositionFile } from './files/composition';\nimport { docsFile } from './files/docs';\nimport { testFile } from './files/test';\n\nexport const reactComponentJS: ComponentTemplate = {\n name: 'react-js',\n description: 'a basic react component in js',\n hidden: true,\n generateFiles: (context: ComponentContext) => {\n const { name, namePascalCase: Name } = context;\n const indexFile = {\n relativePath: 'index.js',\n content: `export { ${Name} } from './${name}';\n`,\n };\n return [indexFile, componentFile(context), compositionFile(context), docsFile(context), testFile(context)];\n },\n config: {\n 'teambit.react/react': {},\n 'teambit.envs/envs': {\n env: 'teambit.react/react',\n },\n },\n};\n\nexport const deprecatedReactComponentJS: ComponentTemplate = {\n ...reactComponentJS,\n name: 'react-component-js',\n hidden: true,\n};\n"],"mappings":"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"}
@@ -1,5 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare const compositionFile: (context: ComponentContext) => {
3
- relativePath: string;
4
- content: string;
5
- };
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.compositionFile = void 0;
7
- const compositionFile = context => {
8
- const {
9
- name,
10
- namePascalCase: Name
11
- } = context;
12
- return {
13
- relativePath: `${name}-context.composition.tsx`,
14
- content: `import React, { useContext } from 'react';
15
- import { ${Name}Provider } from './${name}-context-provider';
16
- import { ${Name}Context } from './${name}-context';
17
-
18
- export function MockComponent() {
19
- const theme = useContext(${Name}Context);
20
-
21
- return <div style={{ color: theme.color }}>this should be {theme.color}</div>;
22
- }
23
-
24
- export const BasicThemeUsage = () => {
25
- return (
26
- <${Name}Provider color="blue">
27
- <MockComponent />
28
- </${Name}Provider>
29
- );
30
- };
31
- `
32
- };
33
- };
34
- exports.compositionFile = compositionFile;
35
-
36
- //# sourceMappingURL=composition.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["compositionFile","context","name","namePascalCase","Name","relativePath","content","exports"],"sources":["composition.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const compositionFile = (context: ComponentContext) => {\n const { name, namePascalCase: Name } = context;\n\n return {\n relativePath: `${name}-context.composition.tsx`,\n content: `import React, { useContext } from 'react';\nimport { ${Name}Provider } from './${name}-context-provider';\nimport { ${Name}Context } from './${name}-context';\n\nexport function MockComponent() {\n const theme = useContext(${Name}Context);\n\n return <div style={{ color: theme.color }}>this should be {theme.color}</div>;\n}\n\nexport const BasicThemeUsage = () => {\n return (\n <${Name}Provider color=\"blue\">\n <MockComponent />\n </${Name}Provider>\n );\n};\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,eAAe,GAAIC,OAAyB,IAAK;EAC5D,MAAM;IAAEC,IAAI;IAAEC,cAAc,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE9C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,0BAAyB;IAC/CI,OAAO,EAAG;AACd,WAAWF,IAAK,sBAAqBF,IAAK;AAC1C,WAAWE,IAAK,qBAAoBF,IAAK;AACzC;AACA;AACA,6BAA6BE,IAAK;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,IAAK;AACZ;AACA,QAAQA,IAAK;AACb;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,eAAA,GAAAA,eAAA"}
@@ -1,5 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare const contextProviderFile: (context: ComponentContext) => {
3
- relativePath: string;
4
- content: string;
5
- };
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.contextProviderFile = void 0;
7
- const contextProviderFile = context => {
8
- const {
9
- name,
10
- namePascalCase: Name
11
- } = context;
12
- return {
13
- relativePath: `${name}-context-provider.tsx`,
14
- content: `import React, { ReactNode } from 'react';
15
- import { ${Name}Context } from './${name}-context';
16
-
17
- export type ${Name}ProviderProps = {
18
- /**
19
- * primary color of theme.
20
- */
21
- color?: string,
22
-
23
- /**
24
- * children to be rendered within this theme.
25
- */
26
- children: ReactNode
27
- };
28
-
29
- export function ${Name}Provider({ color, children }: ${Name}ProviderProps) {
30
- return <${Name}Context.Provider value={{ color }}>{children}</${Name}Context.Provider>
31
- }
32
- `
33
- };
34
- };
35
- exports.contextProviderFile = contextProviderFile;
36
-
37
- //# sourceMappingURL=context-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["contextProviderFile","context","name","namePascalCase","Name","relativePath","content","exports"],"sources":["context-provider.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const contextProviderFile = (context: ComponentContext) => {\n const { name, namePascalCase: Name } = context;\n return {\n relativePath: `${name}-context-provider.tsx`,\n content: `import React, { ReactNode } from 'react';\nimport { ${Name}Context } from './${name}-context';\n\nexport type ${Name}ProviderProps = {\n /**\n * primary color of theme.\n */\n color?: string,\n\n /**\n * children to be rendered within this theme.\n */\n children: ReactNode\n};\n\nexport function ${Name}Provider({ color, children }: ${Name}ProviderProps) {\n return <${Name}Context.Provider value={{ color }}>{children}</${Name}Context.Provider>\n}\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,mBAAmB,GAAIC,OAAyB,IAAK;EAChE,MAAM;IAAEC,IAAI;IAAEC,cAAc,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAC9C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,uBAAsB;IAC5CI,OAAO,EAAG;AACd,WAAWF,IAAK,qBAAoBF,IAAK;AACzC;AACA,cAAcE,IAAK;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkBA,IAAK,iCAAgCA,IAAK;AAC5D,YAAYA,IAAK,kDAAiDA,IAAK;AACvE;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,mBAAA,GAAAA,mBAAA"}
@@ -1,5 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare const contextFile: (context: ComponentContext) => {
3
- relativePath: string;
4
- content: string;
5
- };
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.contextFile = void 0;
7
- const contextFile = context => {
8
- const {
9
- name,
10
- namePascalCase: Name
11
- } = context;
12
- return {
13
- relativePath: `${name}-context.tsx`,
14
- content: `import { createContext } from 'react';
15
-
16
- export type ${Name}ContextType = {
17
- /**
18
- * primary color of theme.
19
- */
20
- color?: string;
21
- };
22
-
23
- export const ${Name}Context = createContext<${Name}ContextType>({
24
- color: 'aqua'
25
- });
26
- `
27
- };
28
- };
29
- exports.contextFile = contextFile;
30
-
31
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["contextFile","context","name","namePascalCase","Name","relativePath","content","exports"],"sources":["context.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const contextFile = (context: ComponentContext) => {\n const { name, namePascalCase: Name } = context;\n return {\n relativePath: `${name}-context.tsx`,\n content: `import { createContext } from 'react';\n\nexport type ${Name}ContextType = {\n /**\n * primary color of theme.\n */\n color?: string;\n};\n\nexport const ${Name}Context = createContext<${Name}ContextType>({\n color: 'aqua'\n});\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,WAAW,GAAIC,OAAyB,IAAK;EACxD,MAAM;IAAEC,IAAI;IAAEC,cAAc,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAC9C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,cAAa;IACnCI,OAAO,EAAG;AACd;AACA,cAAcF,IAAK;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,eAAeA,IAAK,2BAA0BA,IAAK;AACnD;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,WAAA,GAAAA,WAAA"}
@@ -1,5 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare const docsFile: (context: ComponentContext) => {
3
- relativePath: string;
4
- content: string;
5
- };
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.docsFile = void 0;
7
- const docsFile = context => {
8
- const {
9
- name,
10
- namePascalCase: Name
11
- } = context;
12
- return {
13
- relativePath: `${name}-context.docs.mdx`,
14
- content: `---
15
- description: ${Name} context.
16
- labels: ['context']
17
- ---
18
-
19
- import { ${Name}Context } from './${name}-context';
20
- import { ${Name}Provider } from './${name}-context-provider';
21
- import { MockComponent } from './${name}-context.composition';
22
-
23
- ## React Theme Context
24
-
25
- This is a simple [React Context](https://reactjs.org/docs/context.html) shared as a Bit component.
26
- Use this component to apply a theme as a context to set on it's children.
27
-
28
- ### Component usage
29
-
30
- \`\`\`tsx
31
- () => {
32
- import React, { useContext } from 'react';
33
- import { ThemeProvider } from './theme-context-provider';
34
- import { ThemeContext } from './theme-context';
35
-
36
- <${Name}Provider color="blue">
37
- // My lovely children now get a theme!
38
- <MockComponent />
39
- </${Name}Provider>;
40
- \`\`\`
41
-
42
- ### Using props to customize the theme
43
-
44
- Change the color to see the text change:
45
-
46
- \`\`\`tsx live
47
- () => {
48
- return (
49
- <${Name}Provider color="red">
50
- <MockComponent />
51
- </${Name}Provider>
52
- );
53
- };
54
- \`\`\`
55
- `
56
- };
57
- };
58
- exports.docsFile = docsFile;
59
-
60
- //# sourceMappingURL=docs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["docsFile","context","name","namePascalCase","Name","relativePath","content","exports"],"sources":["docs.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const docsFile = (context: ComponentContext) => {\n const { name, namePascalCase: Name } = context;\n\n return {\n relativePath: `${name}-context.docs.mdx`,\n content: `---\ndescription: ${Name} context.\nlabels: ['context']\n---\n\nimport { ${Name}Context } from './${name}-context';\nimport { ${Name}Provider } from './${name}-context-provider';\nimport { MockComponent } from './${name}-context.composition';\n\n## React Theme Context\n\nThis is a simple [React Context](https://reactjs.org/docs/context.html) shared as a Bit component.\nUse this component to apply a theme as a context to set on it's children.\n\n### Component usage\n\n\\`\\`\\`tsx\n() => {\nimport React, { useContext } from 'react';\nimport { ThemeProvider } from './theme-context-provider';\nimport { ThemeContext } from './theme-context';\n\n<${Name}Provider color=\"blue\">\n // My lovely children now get a theme!\n <MockComponent />\n</${Name}Provider>;\n\\`\\`\\`\n\n### Using props to customize the theme\n\nChange the color to see the text change:\n\n\\`\\`\\`tsx live\n() => {\n return (\n <${Name}Provider color=\"red\">\n <MockComponent />\n </${Name}Provider>\n );\n};\n\\`\\`\\`\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,QAAQ,GAAIC,OAAyB,IAAK;EACrD,MAAM;IAAEC,IAAI;IAAEC,cAAc,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE9C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,mBAAkB;IACxCI,OAAO,EAAG;AACd,eAAeF,IAAK;AACpB;AACA;AACA;AACA,WAAWA,IAAK,qBAAoBF,IAAK;AACzC,WAAWE,IAAK,sBAAqBF,IAAK;AAC1C,mCAAmCA,IAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAGE,IAAK;AACR;AACA;AACA,IAAIA,IAAK;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,IAAK;AACZ;AACA,QAAQA,IAAK;AACb;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,QAAA,GAAAA,QAAA"}
@@ -1,5 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare const indexFile: (context: ComponentContext) => {
3
- relativePath: string;
4
- content: string;
5
- };
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.indexFile = void 0;
7
- const indexFile = context => {
8
- const {
9
- name,
10
- namePascalCase: Name
11
- } = context;
12
- return {
13
- relativePath: 'index.ts',
14
- content: `export { ${Name}Context } from './${name}-context';
15
- export type { ${Name}ContextType } from './${name}-context';
16
- export { ${Name}Provider } from './${name}-context-provider';
17
- export type { ${Name}ProviderProps } from './${name}-context-provider';
18
- `
19
- };
20
- };
21
- exports.indexFile = indexFile;
22
-
23
- //# sourceMappingURL=index-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["indexFile","context","name","namePascalCase","Name","relativePath","content","exports"],"sources":["index-file.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const indexFile = (context: ComponentContext) => {\n const { name, namePascalCase: Name } = context;\n\n return {\n relativePath: 'index.ts',\n content: `export { ${Name}Context } from './${name}-context';\nexport type { ${Name}ContextType } from './${name}-context';\nexport { ${Name}Provider } from './${name}-context-provider';\nexport type { ${Name}ProviderProps } from './${name}-context-provider';\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,SAAS,GAAIC,OAAyB,IAAK;EACtD,MAAM;IAAEC,IAAI;IAAEC,cAAc,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE9C,OAAO;IACLI,YAAY,EAAE,UAAU;IACxBC,OAAO,EAAG,YAAWF,IAAK,qBAAoBF,IAAK;AACvD,gBAAgBE,IAAK,yBAAwBF,IAAK;AAClD,WAAWE,IAAK,sBAAqBF,IAAK;AAC1C,gBAAgBE,IAAK,2BAA0BF,IAAK;AACpD;EACE,CAAC;AACH,CAAC;AAACK,OAAA,CAAAP,SAAA,GAAAA,SAAA"}
@@ -1,5 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare const testFile: (context: ComponentContext) => {
3
- relativePath: string;
4
- content: string;
5
- };
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.testFile = void 0;
7
- const testFile = context => {
8
- const {
9
- name
10
- } = context;
11
- return {
12
- relativePath: `${name}-context.spec.tsx`,
13
- content: `import { BasicThemeUsage } from './${name}-context.composition';
14
- import { render } from '@testing-library/react';
15
-
16
- it('should render the button in the color blue', () => {
17
- const { getByText } = render(<BasicThemeUsage />);
18
- const rendered = getByText('this should be blue');
19
- expect(rendered).toBeTruthy();
20
- });
21
- `
22
- };
23
- };
24
- exports.testFile = testFile;
25
-
26
- //# sourceMappingURL=test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["testFile","context","name","relativePath","content","exports"],"sources":["test.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const testFile = (context: ComponentContext) => {\n const { name } = context;\n\n return {\n relativePath: `${name}-context.spec.tsx`,\n content: `import { BasicThemeUsage } from './${name}-context.composition';\nimport { render } from '@testing-library/react';\n\nit('should render the button in the color blue', () => {\n const { getByText } = render(<BasicThemeUsage />);\n const rendered = getByText('this should be blue');\n expect(rendered).toBeTruthy();\n});\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,QAAQ,GAAIC,OAAyB,IAAK;EACrD,MAAM;IAAEC;EAAK,CAAC,GAAGD,OAAO;EAExB,OAAO;IACLE,YAAY,EAAG,GAAED,IAAK,mBAAkB;IACxCE,OAAO,EAAG,sCAAqCF,IAAK;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAL,QAAA,GAAAA,QAAA"}
@@ -1,2 +0,0 @@
1
- import { ComponentTemplate } from '@teambit/generator';
2
- export declare const reactContext: ComponentTemplate;
@@ -1,65 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.reactContext = void 0;
7
- function _context() {
8
- const data = require("./files/context");
9
- _context = function () {
10
- return data;
11
- };
12
- return data;
13
- }
14
- function _contextProvider() {
15
- const data = require("./files/context-provider");
16
- _contextProvider = function () {
17
- return data;
18
- };
19
- return data;
20
- }
21
- function _composition() {
22
- const data = require("./files/composition");
23
- _composition = function () {
24
- return data;
25
- };
26
- return data;
27
- }
28
- function _docs() {
29
- const data = require("./files/docs");
30
- _docs = function () {
31
- return data;
32
- };
33
- return data;
34
- }
35
- function _test() {
36
- const data = require("./files/test");
37
- _test = function () {
38
- return data;
39
- };
40
- return data;
41
- }
42
- function _indexFile() {
43
- const data = require("./files/index-file");
44
- _indexFile = function () {
45
- return data;
46
- };
47
- return data;
48
- }
49
- const reactContext = {
50
- name: 'react-context',
51
- description: 'a react context component',
52
- hidden: true,
53
- generateFiles: context => {
54
- return [(0, _indexFile().indexFile)(context), (0, _context().contextFile)(context), (0, _contextProvider().contextProviderFile)(context), (0, _composition().compositionFile)(context), (0, _docs().docsFile)(context), (0, _test().testFile)(context)];
55
- },
56
- config: {
57
- 'teambit.react/react': {},
58
- 'teambit.envs/envs': {
59
- env: 'teambit.react/react'
60
- }
61
- }
62
- };
63
- exports.reactContext = reactContext;
64
-
65
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_context","data","require","_contextProvider","_composition","_docs","_test","_indexFile","reactContext","name","description","hidden","generateFiles","context","indexFile","contextFile","contextProviderFile","compositionFile","docsFile","testFile","config","env","exports"],"sources":["index.ts"],"sourcesContent":["import { ComponentTemplate, ComponentContext } from '@teambit/generator';\nimport { contextFile } from './files/context';\nimport { contextProviderFile } from './files/context-provider';\nimport { compositionFile } from './files/composition';\nimport { docsFile } from './files/docs';\nimport { testFile } from './files/test';\nimport { indexFile } from './files/index-file';\n\nexport const reactContext: ComponentTemplate = {\n name: 'react-context',\n description: 'a react context component',\n hidden: true,\n generateFiles: (context: ComponentContext) => {\n return [\n indexFile(context),\n contextFile(context),\n contextProviderFile(context),\n compositionFile(context),\n docsFile(context),\n testFile(context),\n ];\n },\n config: {\n 'teambit.react/react': {},\n 'teambit.envs/envs': {\n env: 'teambit.react/react',\n },\n },\n};\n"],"mappings":";;;;;;AACA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,iBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,gBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,aAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,MAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMO,YAA+B,GAAG;EAC7CC,IAAI,EAAE,eAAe;EACrBC,WAAW,EAAE,2BAA2B;EACxCC,MAAM,EAAE,IAAI;EACZC,aAAa,EAAGC,OAAyB,IAAK;IAC5C,OAAO,CACL,IAAAC,sBAAS,EAACD,OAAO,CAAC,EAClB,IAAAE,sBAAW,EAACF,OAAO,CAAC,EACpB,IAAAG,sCAAmB,EAACH,OAAO,CAAC,EAC5B,IAAAI,8BAAe,EAACJ,OAAO,CAAC,EACxB,IAAAK,gBAAQ,EAACL,OAAO,CAAC,EACjB,IAAAM,gBAAQ,EAACN,OAAO,CAAC,CAClB;EACH,CAAC;EACDO,MAAM,EAAE;IACN,qBAAqB,EAAE,CAAC,CAAC;IACzB,mBAAmB,EAAE;MACnBC,GAAG,EAAE;IACP;EACF;AACF,CAAC;AAACC,OAAA,CAAAd,YAAA,GAAAA,YAAA"}
@@ -1,2 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare function aspectFile({ namePascalCase: Name, componentId }: ComponentContext): string;
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.aspectFile = aspectFile;
7
- function aspectFile({
8
- namePascalCase: Name,
9
- componentId
10
- }) {
11
- return `import { Aspect } from '@teambit/harmony';
12
-
13
- export const ${Name}Aspect = Aspect.create({
14
- id: '${componentId}',
15
- });
16
- `;
17
- }
18
-
19
- //# sourceMappingURL=aspect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["aspectFile","namePascalCase","Name","componentId"],"sources":["aspect.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function aspectFile({ namePascalCase: Name, componentId }: ComponentContext) {\n return `import { Aspect } from '@teambit/harmony';\n\nexport const ${Name}Aspect = Aspect.create({\n id: '${componentId}',\n});\n`;\n}\n"],"mappings":";;;;;;AAEO,SAASA,UAAUA,CAAC;EAAEC,cAAc,EAAEC,IAAI;EAAEC;AAA8B,CAAC,EAAE;EAClF,OAAQ;AACV;AACA,eAAeD,IAAK;AACpB,SAASC,WAAY;AACrB;AACA,CAAC;AACD"}
@@ -1,2 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare function docFile({ name, componentId }: ComponentContext): string;