@teambit/docs 0.0.880 → 0.0.882

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 (48) hide show
  1. package/dist/default-doc-reader.js +2 -21
  2. package/dist/default-doc-reader.js.map +1 -1
  3. package/dist/doc-module.js +1 -6
  4. package/dist/doc-module.js.map +1 -1
  5. package/dist/docs-store.js +1 -9
  6. package/dist/docs-store.js.map +1 -1
  7. package/dist/docs.aspect.js +0 -5
  8. package/dist/docs.aspect.js.map +1 -1
  9. package/dist/docs.compare.section.js +0 -13
  10. package/dist/docs.compare.section.js.map +1 -1
  11. package/dist/docs.composition.js +0 -6
  12. package/dist/docs.composition.js.map +1 -1
  13. package/dist/docs.data.js.map +1 -1
  14. package/dist/docs.graphql.js +0 -5
  15. package/dist/docs.graphql.js.map +1 -1
  16. package/dist/docs.js.map +1 -1
  17. package/dist/docs.main.runtime.js +3 -85
  18. package/dist/docs.main.runtime.js.map +1 -1
  19. package/dist/docs.preview-definition.js +2 -13
  20. package/dist/docs.preview-definition.js.map +1 -1
  21. package/dist/docs.preview.runtime.js +3 -25
  22. package/dist/docs.preview.runtime.js.map +1 -1
  23. package/dist/docs.service.js +0 -9
  24. package/dist/docs.service.js.map +1 -1
  25. package/dist/docs.ui.runtime.js +2 -39
  26. package/dist/docs.ui.runtime.js.map +1 -1
  27. package/dist/events/click-inside-an-iframe.js +1 -12
  28. package/dist/events/click-inside-an-iframe.js.map +1 -1
  29. package/dist/events/index.js +0 -2
  30. package/dist/events/index.js.map +1 -1
  31. package/dist/exceptions/doc-read-error.js +0 -3
  32. package/dist/exceptions/doc-read-error.js.map +1 -1
  33. package/dist/exceptions/file-extension-not-supported.js +0 -3
  34. package/dist/exceptions/file-extension-not-supported.js.map +1 -1
  35. package/dist/exceptions/index.js +0 -6
  36. package/dist/exceptions/index.js.map +1 -1
  37. package/dist/index.js +0 -14
  38. package/dist/index.js.map +1 -1
  39. package/dist/overview/index.js +0 -3
  40. package/dist/overview/index.js.map +1 -1
  41. package/dist/overview/overview.js +0 -33
  42. package/dist/overview/overview.js.map +1 -1
  43. package/dist/overview.section.js +0 -13
  44. package/dist/overview.section.js.map +1 -1
  45. package/package-tar/teambit-docs-0.0.882.tgz +0 -0
  46. package/package.json +18 -18
  47. package/{preview-1666312873430.js → preview-1666496165706.js} +2 -2
  48. package/package-tar/teambit-docs-0.0.880.tgz +0 -0
@@ -1,46 +1,33 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  require("core-js/modules/es.symbol.description.js");
6
-
7
5
  require("core-js/modules/es.promise.js");
8
-
9
6
  Object.defineProperty(exports, "__esModule", {
10
7
  value: true
11
8
  });
12
9
  exports.DefaultDocReader = void 0;
13
-
14
10
  function _defineProperty2() {
15
11
  const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
-
17
12
  _defineProperty2 = function () {
18
13
  return data;
19
14
  };
20
-
21
15
  return data;
22
16
  }
23
-
24
17
  function _path() {
25
18
  const data = require("path");
26
-
27
19
  _path = function () {
28
20
  return data;
29
21
  };
30
-
31
22
  return data;
32
23
  }
33
-
34
24
  function _docsEntities() {
35
25
  const data = require("@teambit/docs.entities.doc");
36
-
37
26
  _docsEntities = function () {
38
27
  return data;
39
28
  };
40
-
41
29
  return data;
42
30
  }
43
-
44
31
  class DefaultDocReader {
45
32
  constructor(pkg, compiler, workspace) {
46
33
  this.pkg = pkg;
@@ -48,28 +35,22 @@ class DefaultDocReader {
48
35
  this.workspace = workspace;
49
36
  (0, _defineProperty2().default)(this, "supportedExtensions", ['.ts', '.js', '.jsx', '.tsx']);
50
37
  }
51
-
52
38
  async read(path, contents, component) {
53
39
  var _docsModule$default, _docsModule$default2, _docsModule$default3;
54
-
55
40
  const packageName = this.pkg.getPackageName(component);
56
- const distPath = this.compiler.getDistPathBySrcPath(component, path); // eslint-disable-next-line
57
-
41
+ const distPath = this.compiler.getDistPathBySrcPath(component, path);
42
+ // eslint-disable-next-line
58
43
  const docsModule = require((0, _path().resolve)(`${this.workspace.path}/node_modules/${packageName}/${distPath}`));
59
-
60
44
  return _docsEntities().Doc.from(path, {
61
45
  labels: docsModule.labels || ((_docsModule$default = docsModule.default) === null || _docsModule$default === void 0 ? void 0 : _docsModule$default.labels),
62
46
  description: docsModule.abstract || ((_docsModule$default2 = docsModule.default) === null || _docsModule$default2 === void 0 ? void 0 : _docsModule$default2.abstract) || docsModule.description,
63
47
  displayName: docsModule.displayName || ((_docsModule$default3 = docsModule.default) === null || _docsModule$default3 === void 0 ? void 0 : _docsModule$default3.componentDisplayName)
64
48
  });
65
49
  }
66
-
67
50
  isFormatSupported(format) {
68
51
  return this.supportedExtensions.includes(format);
69
52
  }
70
-
71
53
  }
72
-
73
54
  exports.DefaultDocReader = DefaultDocReader;
74
55
 
75
56
  //# sourceMappingURL=default-doc-reader.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DefaultDocReader","constructor","pkg","compiler","workspace","read","path","contents","component","packageName","getPackageName","distPath","getDistPathBySrcPath","docsModule","require","resolve","Doc","from","labels","default","description","abstract","displayName","componentDisplayName","isFormatSupported","format","supportedExtensions","includes"],"sources":["default-doc-reader.ts"],"sourcesContent":["import { resolve } from 'path';\nimport type { PkgMain } from '@teambit/pkg';\nimport type { Component } from '@teambit/component';\nimport type { CompilerMain } from '@teambit/compiler';\nimport type { Workspace } from '@teambit/workspace';\nimport { Doc } from '@teambit/docs.entities.doc';\nimport { DocReader } from './doc-reader';\n\nexport class DefaultDocReader implements DocReader {\n constructor(private pkg: PkgMain, private compiler: CompilerMain, private workspace: Workspace) {}\n\n async read(path: string, contents: Buffer, component: Component) {\n const packageName = this.pkg.getPackageName(component);\n const distPath = this.compiler.getDistPathBySrcPath(component, path);\n // eslint-disable-next-line\n const docsModule = require(resolve(`${this.workspace.path}/node_modules/${packageName}/${distPath}`));\n return Doc.from(path, {\n labels: docsModule.labels || docsModule.default?.labels,\n description: docsModule.abstract || docsModule.default?.abstract || docsModule.description,\n displayName: docsModule.displayName || docsModule.default?.componentDisplayName,\n });\n }\n\n readonly supportedExtensions = ['.ts', '.js', '.jsx', '.tsx'];\n\n isFormatSupported(format: string) {\n return this.supportedExtensions.includes(format);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAKA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,gBAAN,CAA4C;EACjDC,WAAW,CAASC,GAAT,EAA+BC,QAA/B,EAA+DC,SAA/D,EAAqF;IAAA,KAA5EF,GAA4E,GAA5EA,GAA4E;IAAA,KAAtDC,QAAsD,GAAtDA,QAAsD;IAAA,KAAtBC,SAAsB,GAAtBA,SAAsB;IAAA,6DAcjE,CAAC,KAAD,EAAQ,KAAR,EAAe,MAAf,EAAuB,MAAvB,CAdiE;EAAE;;EAExF,MAAJC,IAAI,CAACC,IAAD,EAAeC,QAAf,EAAiCC,SAAjC,EAAuD;IAAA;;IAC/D,MAAMC,WAAW,GAAG,KAAKP,GAAL,CAASQ,cAAT,CAAwBF,SAAxB,CAApB;IACA,MAAMG,QAAQ,GAAG,KAAKR,QAAL,CAAcS,oBAAd,CAAmCJ,SAAnC,EAA8CF,IAA9C,CAAjB,CAF+D,CAG/D;;IACA,MAAMO,UAAU,GAAGC,OAAO,CAAC,IAAAC,eAAA,EAAS,GAAE,KAAKX,SAAL,CAAeE,IAAK,iBAAgBG,WAAY,IAAGE,QAAS,EAAvE,CAAD,CAA1B;;IACA,OAAOK,mBAAA,CAAIC,IAAJ,CAASX,IAAT,EAAe;MACpBY,MAAM,EAAEL,UAAU,CAACK,MAAX,4BAAqBL,UAAU,CAACM,OAAhC,wDAAqB,oBAAoBD,MAAzC,CADY;MAEpBE,WAAW,EAAEP,UAAU,CAACQ,QAAX,6BAAuBR,UAAU,CAACM,OAAlC,yDAAuB,qBAAoBE,QAA3C,KAAuDR,UAAU,CAACO,WAF3D;MAGpBE,WAAW,EAAET,UAAU,CAACS,WAAX,6BAA0BT,UAAU,CAACM,OAArC,yDAA0B,qBAAoBI,oBAA9C;IAHO,CAAf,CAAP;EAKD;;EAIDC,iBAAiB,CAACC,MAAD,EAAiB;IAChC,OAAO,KAAKC,mBAAL,CAAyBC,QAAzB,CAAkCF,MAAlC,CAAP;EACD;;AAnBgD"}
1
+ {"version":3,"names":["DefaultDocReader","constructor","pkg","compiler","workspace","read","path","contents","component","packageName","getPackageName","distPath","getDistPathBySrcPath","docsModule","require","resolve","Doc","from","labels","default","description","abstract","displayName","componentDisplayName","isFormatSupported","format","supportedExtensions","includes"],"sources":["default-doc-reader.ts"],"sourcesContent":["import { resolve } from 'path';\nimport type { PkgMain } from '@teambit/pkg';\nimport type { Component } from '@teambit/component';\nimport type { CompilerMain } from '@teambit/compiler';\nimport type { Workspace } from '@teambit/workspace';\nimport { Doc } from '@teambit/docs.entities.doc';\nimport { DocReader } from './doc-reader';\n\nexport class DefaultDocReader implements DocReader {\n constructor(private pkg: PkgMain, private compiler: CompilerMain, private workspace: Workspace) {}\n\n async read(path: string, contents: Buffer, component: Component) {\n const packageName = this.pkg.getPackageName(component);\n const distPath = this.compiler.getDistPathBySrcPath(component, path);\n // eslint-disable-next-line\n const docsModule = require(resolve(`${this.workspace.path}/node_modules/${packageName}/${distPath}`));\n return Doc.from(path, {\n labels: docsModule.labels || docsModule.default?.labels,\n description: docsModule.abstract || docsModule.default?.abstract || docsModule.description,\n displayName: docsModule.displayName || docsModule.default?.componentDisplayName,\n });\n }\n\n readonly supportedExtensions = ['.ts', '.js', '.jsx', '.tsx'];\n\n isFormatSupported(format: string) {\n return this.supportedExtensions.includes(format);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,gBAAgB,CAAsB;EACjDC,WAAW,CAASC,GAAY,EAAUC,QAAsB,EAAUC,SAAoB,EAAE;IAAA,KAA5EF,GAAY,GAAZA,GAAY;IAAA,KAAUC,QAAsB,GAAtBA,QAAsB;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,6DAc/D,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;EAdoC;EAEjG,MAAMC,IAAI,CAACC,IAAY,EAAEC,QAAgB,EAAEC,SAAoB,EAAE;IAAA;IAC/D,MAAMC,WAAW,GAAG,IAAI,CAACP,GAAG,CAACQ,cAAc,CAACF,SAAS,CAAC;IACtD,MAAMG,QAAQ,GAAG,IAAI,CAACR,QAAQ,CAACS,oBAAoB,CAACJ,SAAS,EAAEF,IAAI,CAAC;IACpE;IACA,MAAMO,UAAU,GAAGC,OAAO,CAAC,IAAAC,eAAO,EAAE,GAAE,IAAI,CAACX,SAAS,CAACE,IAAK,iBAAgBG,WAAY,IAAGE,QAAS,EAAC,CAAC,CAAC;IACrG,OAAOK,mBAAG,CAACC,IAAI,CAACX,IAAI,EAAE;MACpBY,MAAM,EAAEL,UAAU,CAACK,MAAM,4BAAIL,UAAU,CAACM,OAAO,wDAAlB,oBAAoBD,MAAM;MACvDE,WAAW,EAAEP,UAAU,CAACQ,QAAQ,6BAAIR,UAAU,CAACM,OAAO,yDAAlB,qBAAoBE,QAAQ,KAAIR,UAAU,CAACO,WAAW;MAC1FE,WAAW,EAAET,UAAU,CAACS,WAAW,6BAAIT,UAAU,CAACM,OAAO,yDAAlB,qBAAoBI,oBAAoB;IACjF,CAAC,CAAC;EACJ;EAIAC,iBAAiB,CAACC,MAAc,EAAE;IAChC,OAAO,IAAI,CAACC,mBAAmB,CAACC,QAAQ,CAACF,MAAM,CAAC;EAClD;AACF;AAAC"}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DocModule = void 0;
7
-
8
7
  class DocModule {
9
8
  constructor(path,
10
9
  /**
@@ -14,19 +13,15 @@ class DocModule {
14
13
  this.path = path;
15
14
  this.module = module;
16
15
  }
16
+
17
17
  /**
18
18
  * get the abstract.
19
19
  */
20
-
21
-
22
20
  get abstract() {
23
21
  var _this$module$default;
24
-
25
22
  return this.module.abstract || ((_this$module$default = this.module.default) === null || _this$module$default === void 0 ? void 0 : _this$module$default.abstract);
26
23
  }
27
-
28
24
  }
29
-
30
25
  exports.DocModule = DocModule;
31
26
 
32
27
  //# sourceMappingURL=doc-module.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DocModule","constructor","path","module","abstract","default"],"sources":["doc-module.ts"],"sourcesContent":["export class DocModule {\n constructor(\n readonly path: string,\n\n /**\n * original doc module.\n */\n readonly module: any\n ) {}\n\n /**\n * get the abstract.\n */\n get abstract() {\n return this.module.abstract || this.module.default?.abstract;\n }\n}\n"],"mappings":";;;;;;;AAAO,MAAMA,SAAN,CAAgB;EACrBC,WAAW,CACAC,IADA;EAGT;AACJ;AACA;EACaC,MANA,EAOT;IAAA,KANSD,IAMT,GANSA,IAMT;IAAA,KADSC,MACT,GADSA,MACT;EAAE;EAEJ;AACF;AACA;;;EACc,IAARC,QAAQ,GAAG;IAAA;;IACb,OAAO,KAAKD,MAAL,CAAYC,QAAZ,6BAAwB,KAAKD,MAAL,CAAYE,OAApC,yDAAwB,qBAAqBD,QAA7C,CAAP;EACD;;AAfoB"}
1
+ {"version":3,"names":["DocModule","constructor","path","module","abstract","default"],"sources":["doc-module.ts"],"sourcesContent":["export class DocModule {\n constructor(\n readonly path: string,\n\n /**\n * original doc module.\n */\n readonly module: any\n ) {}\n\n /**\n * get the abstract.\n */\n get abstract() {\n return this.module.abstract || this.module.default?.abstract;\n }\n}\n"],"mappings":";;;;;;AAAO,MAAMA,SAAS,CAAC;EACrBC,WAAW,CACAC,IAAY;EAErB;AACJ;AACA;EACaC,MAAW,EACpB;IAAA,KANSD,IAAY,GAAZA,IAAY;IAAA,KAKZC,MAAW,GAAXA,MAAW;EACnB;;EAEH;AACF;AACA;EACE,IAAIC,QAAQ,GAAG;IAAA;IACb,OAAO,IAAI,CAACD,MAAM,CAACC,QAAQ,6BAAI,IAAI,CAACD,MAAM,CAACE,OAAO,yDAAnB,qBAAqBD,QAAQ;EAC9D;AACF;AAAC"}
@@ -1,36 +1,28 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.addDocs = addDocs;
9
-
10
8
  function _react() {
11
9
  const data = _interopRequireDefault(require("react"));
12
-
13
10
  _react = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  function _reactDom() {
21
16
  const data = _interopRequireDefault(require("react-dom"));
22
-
23
17
  _reactDom = function () {
24
18
  return data;
25
19
  };
26
-
27
20
  return data;
28
21
  }
29
-
30
22
  // let docs = [];
23
+
31
24
  function addDocs(docs) {
32
25
  const Doc = docs[0];
33
-
34
26
  _reactDom().default.render( /*#__PURE__*/_react().default.createElement(Doc, null), document.getElementById('root'));
35
27
  }
36
28
 
@@ -1 +1 @@
1
- {"version":3,"names":["addDocs","docs","Doc","ReactDOM","render","document","getElementById"],"sources":["docs-store.tsx"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\n\n// let docs = [];\n\nexport function addDocs(docs: any[]) {\n const Doc = docs[0];\n ReactDOM.render(<Doc />, document.getElementById('root'));\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;AAEO,SAASA,OAAT,CAAiBC,IAAjB,EAA8B;EACnC,MAAMC,GAAG,GAAGD,IAAI,CAAC,CAAD,CAAhB;;EACAE,mBAAA,CAASC,MAAT,eAAgB,+BAAC,GAAD,OAAhB,EAAyBC,QAAQ,CAACC,cAAT,CAAwB,MAAxB,CAAzB;AACD"}
1
+ {"version":3,"names":["addDocs","docs","Doc","ReactDOM","render","document","getElementById"],"sources":["docs-store.tsx"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\n\n// let docs = [];\n\nexport function addDocs(docs: any[]) {\n const Doc = docs[0];\n ReactDOM.render(<Doc />, document.getElementById('root'));\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;;AAEO,SAASA,OAAO,CAACC,IAAW,EAAE;EACnC,MAAMC,GAAG,GAAGD,IAAI,CAAC,CAAC,CAAC;EACnBE,mBAAQ,CAACC,MAAM,eAAC,+BAAC,GAAG,OAAG,EAAEC,QAAQ,CAACC,cAAc,CAAC,MAAM,CAAC,CAAC;AAC3D"}
@@ -4,23 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = exports.DocsAspect = void 0;
7
-
8
7
  function _harmony() {
9
8
  const data = require("@teambit/harmony");
10
-
11
9
  _harmony = function () {
12
10
  return data;
13
11
  };
14
-
15
12
  return data;
16
13
  }
17
-
18
14
  const DocsAspect = _harmony().Aspect.create({
19
15
  id: 'teambit.docs/docs',
20
16
  dependencies: [],
21
17
  defaultConfig: {}
22
18
  });
23
-
24
19
  exports.DocsAspect = DocsAspect;
25
20
  var _default = DocsAspect;
26
21
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"names":["DocsAspect","Aspect","create","id","dependencies","defaultConfig"],"sources":["docs.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const DocsAspect = Aspect.create({\n id: 'teambit.docs/docs',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default DocsAspect;\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,UAAU,GAAGC,iBAAA,CAAOC,MAAP,CAAc;EACtCC,EAAE,EAAE,mBADkC;EAEtCC,YAAY,EAAE,EAFwB;EAGtCC,aAAa,EAAE;AAHuB,CAAd,CAAnB;;;eAMQL,U"}
1
+ {"version":3,"names":["DocsAspect","Aspect","create","id","dependencies","defaultConfig"],"sources":["docs.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const DocsAspect = Aspect.create({\n id: 'teambit.docs/docs',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default DocsAspect;\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,UAAU,GAAGC,iBAAM,CAACC,MAAM,CAAC;EACtCC,EAAE,EAAE,mBAAmB;EACvBC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC;AAAA,eAEYL,UAAU;AAAA"}
@@ -1,42 +1,31 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.OverviewCompareSection = void 0;
9
-
10
8
  function _defineProperty2() {
11
9
  const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
-
13
10
  _defineProperty2 = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  function _react() {
21
16
  const data = _interopRequireDefault(require("react"));
22
-
23
17
  _react = function () {
24
18
  return data;
25
19
  };
26
-
27
20
  return data;
28
21
  }
29
-
30
22
  function _docsUi() {
31
23
  const data = require("@teambit/docs.ui.overview-compare");
32
-
33
24
  _docsUi = function () {
34
25
  return data;
35
26
  };
36
-
37
27
  return data;
38
28
  }
39
-
40
29
  class OverviewCompareSection {
41
30
  constructor(titleBadgeSlot) {
42
31
  this.titleBadgeSlot = titleBadgeSlot;
@@ -53,9 +42,7 @@ class OverviewCompareSection {
53
42
  })
54
43
  });
55
44
  }
56
-
57
45
  }
58
-
59
46
  exports.OverviewCompareSection = OverviewCompareSection;
60
47
 
61
48
  //# sourceMappingURL=docs.compare.section.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["OverviewCompareSection","constructor","titleBadgeSlot","href","children","exact","order","path","element"],"sources":["docs.compare.section.tsx"],"sourcesContent":["import React from 'react';\nimport { Section } from '@teambit/component';\nimport { OverviewCompare } from '@teambit/docs.ui.overview-compare';\nimport { TitleBadgeSlot } from './overview';\n\nexport class OverviewCompareSection implements Section {\n constructor(private titleBadgeSlot: TitleBadgeSlot) {}\n\n navigationLink = {\n href: '.',\n children: 'Overview',\n exact: true,\n order: 0,\n };\n\n route = {\n path: '*',\n element: <OverviewCompare titleBadges={this.titleBadgeSlot} />,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,sBAAN,CAAgD;EACrDC,WAAW,CAASC,cAAT,EAAyC;IAAA,KAAhCA,cAAgC,GAAhCA,cAAgC;IAAA,wDAEnC;MACfC,IAAI,EAAE,GADS;MAEfC,QAAQ,EAAE,UAFK;MAGfC,KAAK,EAAE,IAHQ;MAIfC,KAAK,EAAE;IAJQ,CAFmC;IAAA,+CAS5C;MACNC,IAAI,EAAE,GADA;MAENC,OAAO,eAAE,+BAAC,yBAAD;QAAiB,WAAW,EAAE,KAAKN;MAAnC;IAFH,CAT4C;EAAE;;AADD"}
1
+ {"version":3,"names":["OverviewCompareSection","constructor","titleBadgeSlot","href","children","exact","order","path","element"],"sources":["docs.compare.section.tsx"],"sourcesContent":["import React from 'react';\nimport { Section } from '@teambit/component';\nimport { OverviewCompare } from '@teambit/docs.ui.overview-compare';\nimport { TitleBadgeSlot } from './overview';\n\nexport class OverviewCompareSection implements Section {\n constructor(private titleBadgeSlot: TitleBadgeSlot) {}\n\n navigationLink = {\n href: '.',\n children: 'Overview',\n exact: true,\n order: 0,\n };\n\n route = {\n path: '*',\n element: <OverviewCompare titleBadges={this.titleBadgeSlot} />,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,sBAAsB,CAAoB;EACrDC,WAAW,CAASC,cAA8B,EAAE;IAAA,KAAhCA,cAA8B,GAA9BA,cAA8B;IAAA,wDAEjC;MACfC,IAAI,EAAE,GAAG;MACTC,QAAQ,EAAE,UAAU;MACpBC,KAAK,EAAE,IAAI;MACXC,KAAK,EAAE;IACT,CAAC;IAAA,+CAEO;MACNC,IAAI,EAAE,GAAG;MACTC,OAAO,eAAE,+BAAC,yBAAe;QAAC,WAAW,EAAE,IAAI,CAACN;MAAe;IAC7D,CAAC;EAZoD;AAavD;AAAC"}
@@ -1,22 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.Logo = void 0;
9
-
10
8
  function _react() {
11
9
  const data = _interopRequireDefault(require("react"));
12
-
13
10
  _react = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
21
16
  style: {
22
17
  height: '100%',
@@ -29,7 +24,6 @@ const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
29
24
  },
30
25
  src: "https://static.bit.dev/extensions-icons/docs.svg"
31
26
  }));
32
-
33
27
  exports.Logo = Logo;
34
28
 
35
29
  //# sourceMappingURL=docs.composition.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["docs.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/docs.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAV;IAAkBC,OAAO,EAAE,MAA3B;IAAmCC,cAAc,EAAE;EAAnD;AAAZ,gBACE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAT,CAAZ;EAA2B,GAAG,EAAC;AAA/B,EADF,CADK"}
1
+ {"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["docs.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/docs.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAG,CAAE;EAAC,GAAG,EAAC;AAAkD,EAAG,CAEvF;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["docsMock","title","subTitle","labels","installMethods","content"],"sources":["docs.data.tsx"],"sourcesContent":["export const docsMock = {\n title: 'Radio',\n subTitle:\n 'Radio Buttons are graphical interface elements that allow user to choose only one of a predefined set of mutually exclusive options.',\n labels: ['chart', 'graph', 'ui-components', 'react'],\n installMethods: [\n { title: 'install package', content: '@google.material-ui/radio' },\n {\n title: 'Import from CDN',\n content: 'https://esm.bit.dev/@google/material-ui/radio/',\n },\n ],\n};\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAG;EACtBC,KAAK,EAAE,OADe;EAEtBC,QAAQ,EACN,sIAHoB;EAItBC,MAAM,EAAE,CAAC,OAAD,EAAU,OAAV,EAAmB,eAAnB,EAAoC,OAApC,CAJc;EAKtBC,cAAc,EAAE,CACd;IAAEH,KAAK,EAAE,iBAAT;IAA4BI,OAAO,EAAE;EAArC,CADc,EAEd;IACEJ,KAAK,EAAE,iBADT;IAEEI,OAAO,EAAE;EAFX,CAFc;AALM,CAAjB"}
1
+ {"version":3,"names":["docsMock","title","subTitle","labels","installMethods","content"],"sources":["docs.data.tsx"],"sourcesContent":["export const docsMock = {\n title: 'Radio',\n subTitle:\n 'Radio Buttons are graphical interface elements that allow user to choose only one of a predefined set of mutually exclusive options.',\n labels: ['chart', 'graph', 'ui-components', 'react'],\n installMethods: [\n { title: 'install package', content: '@google.material-ui/radio' },\n {\n title: 'Import from CDN',\n content: 'https://esm.bit.dev/@google/material-ui/radio/',\n },\n ],\n};\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAG;EACtBC,KAAK,EAAE,OAAO;EACdC,QAAQ,EACN,sIAAsI;EACxIC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC;EACpDC,cAAc,EAAE,CACd;IAAEH,KAAK,EAAE,iBAAiB;IAAEI,OAAO,EAAE;EAA4B,CAAC,EAClE;IACEJ,KAAK,EAAE,iBAAiB;IACxBI,OAAO,EAAE;EACX,CAAC;AAEL,CAAC;AAAC"}
@@ -1,22 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.docsSchema = docsSchema;
9
-
10
8
  function _graphqlTag() {
11
9
  const data = _interopRequireDefault(require("graphql-tag"));
12
-
13
10
  _graphqlTag = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  function docsSchema(docs) {
21
16
  return {
22
17
  typeDefs: (0, _graphqlTag().default)`
@@ -1 +1 @@
1
- {"version":3,"names":["docsSchema","docs","typeDefs","gql","resolvers","Component","description","component","getDescription","labels","doc","getDoc"],"sources":["docs.graphql.ts"],"sourcesContent":["import gql from 'graphql-tag';\nimport { Component } from '@teambit/component';\nimport { DocsMain } from './docs.main.runtime';\n\nexport function docsSchema(docs: DocsMain) {\n return {\n typeDefs: gql`\n extend type Component {\n description: String\n labels: [String]\n }\n `,\n resolvers: {\n Component: {\n description: (component: Component) => {\n return docs.getDescription(component);\n },\n\n labels: (component: Component) => {\n const doc = docs.getDoc(component);\n return doc?.labels || [];\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIO,SAASA,UAAT,CAAoBC,IAApB,EAAoC;EACzC,OAAO;IACLC,QAAQ,EAAE,IAAAC,qBAAA,CAAI;AAClB;AACA;AACA;AACA;AACA,KANS;IAOLC,SAAS,EAAE;MACTC,SAAS,EAAE;QACTC,WAAW,EAAGC,SAAD,IAA0B;UACrC,OAAON,IAAI,CAACO,cAAL,CAAoBD,SAApB,CAAP;QACD,CAHQ;QAKTE,MAAM,EAAGF,SAAD,IAA0B;UAChC,MAAMG,GAAG,GAAGT,IAAI,CAACU,MAAL,CAAYJ,SAAZ,CAAZ;UACA,OAAO,CAAAG,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAED,MAAL,KAAe,EAAtB;QACD;MARQ;IADF;EAPN,CAAP;AAoBD"}
1
+ {"version":3,"names":["docsSchema","docs","typeDefs","gql","resolvers","Component","description","component","getDescription","labels","doc","getDoc"],"sources":["docs.graphql.ts"],"sourcesContent":["import gql from 'graphql-tag';\nimport { Component } from '@teambit/component';\nimport { DocsMain } from './docs.main.runtime';\n\nexport function docsSchema(docs: DocsMain) {\n return {\n typeDefs: gql`\n extend type Component {\n description: String\n labels: [String]\n }\n `,\n resolvers: {\n Component: {\n description: (component: Component) => {\n return docs.getDescription(component);\n },\n\n labels: (component: Component) => {\n const doc = docs.getDoc(component);\n return doc?.labels || [];\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIO,SAASA,UAAU,CAACC,IAAc,EAAE;EACzC,OAAO;IACLC,QAAQ,EAAE,IAAAC,qBAAG,CAAC;AAClB;AACA;AACA;AACA;AACA,KAAK;IACDC,SAAS,EAAE;MACTC,SAAS,EAAE;QACTC,WAAW,EAAGC,SAAoB,IAAK;UACrC,OAAON,IAAI,CAACO,cAAc,CAACD,SAAS,CAAC;QACvC,CAAC;QAEDE,MAAM,EAAGF,SAAoB,IAAK;UAChC,MAAMG,GAAG,GAAGT,IAAI,CAACU,MAAM,CAACJ,SAAS,CAAC;UAClC,OAAO,CAAAG,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAED,MAAM,KAAI,EAAE;QAC1B;MACF;IACF;EACF,CAAC;AACH"}
package/dist/docs.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["defaultDocs","default","labels","abstract","examples"],"sources":["docs.ts"],"sourcesContent":["import React, { ReactElement } from 'react';\n\nexport type Example = {\n title?: string;\n description?: ReactElement;\n scope?: { [key: string]: any };\n jsx?: JSX.Element;\n code: string;\n};\n\nexport type Docs = {\n /**\n * default is the docs content.\n */\n default: React.ComponentType;\n\n /**\n * component abstract.\n */\n abstract: string;\n\n /**\n * array of labels.\n */\n labels: string[];\n\n /**\n * @deprecated\n */\n examples: Example[];\n};\n\nexport const defaultDocs: Docs = {\n default: () => null,\n labels: [],\n abstract: '',\n examples: [],\n};\n"],"mappings":";;;;;;AAgCO,MAAMA,WAAiB,GAAG;EAC/BC,OAAO,EAAE,MAAM,IADgB;EAE/BC,MAAM,EAAE,EAFuB;EAG/BC,QAAQ,EAAE,EAHqB;EAI/BC,QAAQ,EAAE;AAJqB,CAA1B"}
1
+ {"version":3,"names":["defaultDocs","default","labels","abstract","examples"],"sources":["docs.ts"],"sourcesContent":["import React, { ReactElement } from 'react';\n\nexport type Example = {\n title?: string;\n description?: ReactElement;\n scope?: { [key: string]: any };\n jsx?: JSX.Element;\n code: string;\n};\n\nexport type Docs = {\n /**\n * default is the docs content.\n */\n default: React.ComponentType;\n\n /**\n * component abstract.\n */\n abstract: string;\n\n /**\n * array of labels.\n */\n labels: string[];\n\n /**\n * @deprecated\n */\n examples: Example[];\n};\n\nexport const defaultDocs: Docs = {\n default: () => null,\n labels: [],\n abstract: '',\n examples: [],\n};\n"],"mappings":";;;;;;AAgCO,MAAMA,WAAiB,GAAG;EAC/BC,OAAO,EAAE,MAAM,IAAI;EACnBC,MAAM,EAAE,EAAE;EACVC,QAAQ,EAAE,EAAE;EACZC,QAAQ,EAAE;AACZ,CAAC;AAAC"}