@teambit/mdx 0.0.1094 → 0.0.1095

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 (32) hide show
  1. package/artifacts/env-template/public/{689.1f2bceba4ef53ed2e1aa.js → 349.2404e965b18964d496a7.js} +4 -4
  2. package/artifacts/env-template/public/{924.9c1e2303fe15b44bce8f.js → 924.13c4250a176562362657.js} +21 -21
  3. package/artifacts/env-template/public/assets-manifest.json +12 -12
  4. package/artifacts/env-template/public/{compositions.6973b8703c94f7178c7a.js → compositions.c2fa2fff8b091ff01d2b.js} +3 -3
  5. package/artifacts/env-template/public/compositions.html +1 -1
  6. package/artifacts/env-template/public/{overview.a381dd6382cc0ace3b2c.js → overview.5c7c2ab68e1d05935e57.js} +1 -1
  7. package/artifacts/env-template/public/overview.html +1 -1
  8. package/artifacts/env-template/public/{peers.9ddeb1698f2125447695.js → peers.1011d1b88abba1e6054e.js} +1 -1
  9. package/artifacts/env-template/public/{preview-root.0b477923e8a179bbb851.js → preview-root.20dfd924a7125f002bef.js} +1 -1
  10. package/dist/babel/babel.config.js.map +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/mdx.aspect.js.map +1 -1
  13. package/dist/mdx.compiler.js.map +1 -1
  14. package/dist/mdx.composition.js.map +1 -1
  15. package/dist/mdx.detector.js.map +1 -1
  16. package/dist/mdx.detector.spec.js.map +1 -1
  17. package/dist/mdx.doc-reader.js.map +1 -1
  18. package/dist/mdx.env.js.map +1 -1
  19. package/dist/mdx.main.runtime.js.map +1 -1
  20. package/dist/mdx.templates.js.map +1 -1
  21. package/dist/mdx.ui.runtime.js.map +1 -1
  22. package/dist/{preview-1690168610397.js → preview-1690254961496.js} +2 -2
  23. package/dist/templates/mdx-component/files/component.js.map +1 -1
  24. package/dist/templates/mdx-component/files/composition.js.map +1 -1
  25. package/dist/templates/mdx-component/files/docs.js.map +1 -1
  26. package/dist/templates/mdx-component/files/test.js.map +1 -1
  27. package/dist/templates/mdx-component/index.js.map +1 -1
  28. package/package-tar/teambit-mdx-0.0.1095.tgz +0 -0
  29. package/package.json +16 -16
  30. package/package-tar/teambit-mdx-0.0.1094.tgz +0 -0
  31. /package/{compositions-1690168610397.js → compositions-1690254961496.js} +0 -0
  32. /package/{overview-1690168610397.js → overview-1690254961496.js} +0 -0
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "244.23981efc3a92f81df93b.js": "244.23981efc3a92f81df93b.js",
3
- "689.1f2bceba4ef53ed2e1aa.js": "689.1f2bceba4ef53ed2e1aa.js",
4
- "924.9c1e2303fe15b44bce8f.js": "924.9c1e2303fe15b44bce8f.js",
3
+ "349.2404e965b18964d496a7.js": "349.2404e965b18964d496a7.js",
4
+ "924.13c4250a176562362657.js": "924.13c4250a176562362657.js",
5
5
  "compositions.css": "static/css/compositions.e163efe5.css",
6
6
  "compositions.html": "compositions.html",
7
- "compositions.js": "compositions.6973b8703c94f7178c7a.js",
7
+ "compositions.js": "compositions.c2fa2fff8b091ff01d2b.js",
8
8
  "entrypoints": {
9
9
  "peers": {
10
10
  "assets": {
11
11
  "js": [
12
12
  "244.23981efc3a92f81df93b.js",
13
- "peers.9ddeb1698f2125447695.js"
13
+ "peers.1011d1b88abba1e6054e.js"
14
14
  ]
15
15
  }
16
16
  },
17
17
  "preview-root": {
18
18
  "assets": {
19
19
  "js": [
20
- "689.1f2bceba4ef53ed2e1aa.js",
21
- "preview-root.0b477923e8a179bbb851.js"
20
+ "349.2404e965b18964d496a7.js",
21
+ "preview-root.20dfd924a7125f002bef.js"
22
22
  ],
23
23
  "css": [
24
24
  "static/css/preview-root.120a1d04.css"
@@ -28,7 +28,7 @@
28
28
  "compositions": {
29
29
  "assets": {
30
30
  "js": [
31
- "compositions.6973b8703c94f7178c7a.js"
31
+ "compositions.c2fa2fff8b091ff01d2b.js"
32
32
  ],
33
33
  "css": [
34
34
  "static/css/compositions.e163efe5.css"
@@ -38,8 +38,8 @@
38
38
  "overview": {
39
39
  "assets": {
40
40
  "js": [
41
- "924.9c1e2303fe15b44bce8f.js",
42
- "overview.a381dd6382cc0ace3b2c.js"
41
+ "924.13c4250a176562362657.js",
42
+ "overview.5c7c2ab68e1d05935e57.js"
43
43
  ],
44
44
  "css": [
45
45
  "static/css/924.b8931f51.css"
@@ -48,9 +48,9 @@
48
48
  }
49
49
  },
50
50
  "overview.html": "overview.html",
51
- "overview.js": "overview.a381dd6382cc0ace3b2c.js",
52
- "peers.js": "peers.9ddeb1698f2125447695.js",
51
+ "overview.js": "overview.5c7c2ab68e1d05935e57.js",
52
+ "peers.js": "peers.1011d1b88abba1e6054e.js",
53
53
  "preview-root.css": "static/css/preview-root.120a1d04.css",
54
- "preview-root.js": "preview-root.0b477923e8a179bbb851.js",
54
+ "preview-root.js": "preview-root.20dfd924a7125f002bef.js",
55
55
  "static/css/924.b8931f51.css": "static/css/924.b8931f51.css"
56
56
  }
@@ -1,8 +1,8 @@
1
- (self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[384],{22576:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NavigationProvider=exports.useNavigation=exports.useNavigate=exports.useLocation=exports.Link=void 0;var link_1=__webpack_require__(6884);Object.defineProperty(exports,"Link",{enumerable:!0,get:function(){return link_1.Link}});var use_location_1=__webpack_require__(48088);Object.defineProperty(exports,"useLocation",{enumerable:!0,get:function(){return use_location_1.useLocation}});var use_navigate_1=__webpack_require__(17374);Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return use_navigate_1.useNavigate}});var navigation_provider_1=__webpack_require__(62066);Object.defineProperty(exports,"useNavigation",{enumerable:!0,get:function(){return navigation_provider_1.useNavigation}}),Object.defineProperty(exports,"NavigationProvider",{enumerable:!0,get:function(){return navigation_provider_1.NavigationProvider}})},6884:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Link=void 0;const react_1=__importStar(__webpack_require__(67294)),navigation_provider_1=__webpack_require__(62066),native_link_1=__webpack_require__(1205);exports.Link=(0,react_1.forwardRef)(function(props,ref){const ActualLink=(0,navigation_provider_1.useNavigation)().Link||native_link_1.NativeLink;return props.native||props.external?react_1.default.createElement(native_link_1.NativeLink,Object.assign({},props,{ref})):react_1.default.createElement(ActualLink,Object.assign({},props,{ref}))})},1205:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NativeLink=void 0;const react_1=__importStar(__webpack_require__(67294)),classnames_1=__importDefault(__webpack_require__(14496)),base_ui_routing_compare_url_1=__webpack_require__(61900),use_location_1=__webpack_require__(48088),externalLinkAttributes={rel:"noopener",target:"_blank"};exports.NativeLink=(0,react_1.forwardRef)(function(_a,ref){var{className,style,activeClassName,activeStyle,active,strict,exact,href,external,native,state}=_a,rest=__rest(_a,["className","style","activeClassName","activeStyle","active","strict","exact","href","external","native","state"]);const location=(0,use_location_1.useLocation)(),shouldCalcActive=!!activeClassName||!!activeStyle,isActive=(0,react_1.useMemo)(()=>shouldCalcActive?typeof active=="boolean"?active:!location||!href?!1:(0,base_ui_routing_compare_url_1.compareUrl)(location.pathname,href,{exact,strict}):!1,[active,href,location,shouldCalcActive]),externalProps=external?externalLinkAttributes:{},combinedStyles=(0,react_1.useMemo)(()=>isActive&&activeStyle?Object.assign(Object.assign({},style),activeStyle):style,[isActive,style]);return react_1.default.createElement("a",Object.assign({},externalProps,rest,{ref,href,className:(0,classnames_1.default)(className,isActive&&activeClassName),style:combinedStyles}))})},62066:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NavigationProvider=exports.useNavigation=exports.NavigationContext=void 0;const react_1=__importStar(__webpack_require__(67294));exports.NavigationContext=react_1.default.createContext({});function useNavigation(){return(0,react_1.useContext)(exports.NavigationContext)}exports.useNavigation=useNavigation;function NavigationProvider({children,implementation}){return react_1.default.createElement(exports.NavigationContext.Provider,{value:implementation},children)}exports.NavigationProvider=NavigationProvider},48088:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLocation=void 0;const navigation_provider_1=__webpack_require__(62066);function useLocation(){return((0,navigation_provider_1.useNavigation)().useLocation||NativeUseLocation)()}exports.useLocation=useLocation;function NativeUseLocation(){if(!(typeof window>"u"))return window.location}},17374:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useNavigate=void 0;const navigation_provider_1=__webpack_require__(62066);function useNavigate(){var _a;const nav=(0,navigation_provider_1.useNavigation)();return((_a=nav.useNavigate)===null||_a===void 0?void 0:_a.call(nav))||nativeNavigator}exports.useNavigate=useNavigate;function nativeNavigator(target,{replace}={}){if(typeof window>"u")throw new Error("base-react.navigation.use-location - cannot use native navigator outside of browser. Inject a custom useNavigate, or use navigation after mount");const{location,history}=window;typeof target=="number"?history.go(target):replace?location.replace(target):location.assign(target)}},8433:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareUrl=void 0;const url_parse_1=__importDefault(__webpack_require__(93802));function compareUrl(baseUrl,toMatchUrl,{exact,strict}={}){if(baseUrl===toMatchUrl)return!0;strict||(baseUrl=baseUrl.replace(/\/(?=[?#]|$)/,""),toMatchUrl=toMatchUrl.replace(/\/(?=[?#]|$)/,""));const base=url_parse_1.default(baseUrl),match=url_parse_1.default(toMatchUrl),subUrl=isSubUrl(base,match),exactMatch=!exact||isExactMatch(base,match),strictMatch=!strict||isStrictMatch(base,match);return subUrl&&exactMatch&&strictMatch}exports.compareUrl=compareUrl;function isSubUrl(base,match){return(!match.protocol||match.protocol===base.protocol)&&(!match.hostname||match.hostname===base.hostname)&&(!match.port||match.port===base.port)&&(!match.pathname||base.pathname.startsWith(match.pathname))&&(!match.query||isSubObject(match.query,base.query))&&(!match.hash||match.hash===base.hash)&&(!match.password||match.password===base.password)&&(!match.username||match.username===base.username)}function isExactMatch(base,match){return(!match.pathname||base.pathname===match.pathname)&&(!match.query||isSubObject(base.query,match.query))}function isStrictMatch(base,match){return!match.pathname||base.pathname.endsWith("/")===match.pathname.endsWith("/")}function isSubObject(source,target){return Object.keys(source).every(key=>source[key]===target[key])}},61900:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareUrl=void 0;var compare_url_1=__webpack_require__(8433);Object.defineProperty(exports,"compareUrl",{enumerable:!0,get:function(){return compare_url_1.compareUrl}})},14496:(module,exports)=>{var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;/*!
1
+ (self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[384],{22576:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NavigationProvider=exports.useNavigation=exports.useNavigate=exports.useLocation=exports.Link=void 0;var link_1=__webpack_require__(6884);Object.defineProperty(exports,"Link",{enumerable:!0,get:function(){return link_1.Link}});var use_location_1=__webpack_require__(48088);Object.defineProperty(exports,"useLocation",{enumerable:!0,get:function(){return use_location_1.useLocation}});var use_navigate_1=__webpack_require__(17374);Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return use_navigate_1.useNavigate}});var navigation_provider_1=__webpack_require__(62066);Object.defineProperty(exports,"useNavigation",{enumerable:!0,get:function(){return navigation_provider_1.useNavigation}}),Object.defineProperty(exports,"NavigationProvider",{enumerable:!0,get:function(){return navigation_provider_1.NavigationProvider}})},6884:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Link=void 0;const react_1=__importStar(__webpack_require__(67294)),navigation_provider_1=__webpack_require__(62066),native_link_1=__webpack_require__(1205);exports.Link=(0,react_1.forwardRef)(function(props,ref){const ActualLink=(0,navigation_provider_1.useNavigation)().Link||native_link_1.NativeLink;return props.native||props.external?react_1.default.createElement(native_link_1.NativeLink,Object.assign({},props,{ref})):react_1.default.createElement(ActualLink,Object.assign({},props,{ref}))})},1205:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NativeLink=void 0;const react_1=__importStar(__webpack_require__(67294)),classnames_1=__importDefault(__webpack_require__(14496)),base_ui_routing_compare_url_1=__webpack_require__(76783),use_location_1=__webpack_require__(48088),externalLinkAttributes={rel:"noopener",target:"_blank"};exports.NativeLink=(0,react_1.forwardRef)(function(_a,ref){var{className,style,activeClassName,activeStyle,active,strict,exact,href,external,native,state}=_a,rest=__rest(_a,["className","style","activeClassName","activeStyle","active","strict","exact","href","external","native","state"]);const location=(0,use_location_1.useLocation)(),shouldCalcActive=!!activeClassName||!!activeStyle,isActive=(0,react_1.useMemo)(()=>shouldCalcActive?typeof active=="boolean"?active:!location||!href?!1:(0,base_ui_routing_compare_url_1.compareUrl)(location.pathname,href,{exact,strict}):!1,[active,href,location,shouldCalcActive]),externalProps=external?externalLinkAttributes:{},combinedStyles=(0,react_1.useMemo)(()=>isActive&&activeStyle?Object.assign(Object.assign({},style),activeStyle):style,[isActive,style]);return react_1.default.createElement("a",Object.assign({},externalProps,rest,{ref,href,className:(0,classnames_1.default)(className,isActive&&activeClassName),style:combinedStyles}))})},62066:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NavigationProvider=exports.useNavigation=exports.NavigationContext=void 0;const react_1=__importStar(__webpack_require__(67294));exports.NavigationContext=react_1.default.createContext({});function useNavigation(){return(0,react_1.useContext)(exports.NavigationContext)}exports.useNavigation=useNavigation;function NavigationProvider({children,implementation}){return react_1.default.createElement(exports.NavigationContext.Provider,{value:implementation},children)}exports.NavigationProvider=NavigationProvider},48088:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLocation=void 0;const navigation_provider_1=__webpack_require__(62066);function useLocation(){return((0,navigation_provider_1.useNavigation)().useLocation||NativeUseLocation)()}exports.useLocation=useLocation;function NativeUseLocation(){if(!(typeof window>"u"))return window.location}},17374:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useNavigate=void 0;const navigation_provider_1=__webpack_require__(62066);function useNavigate(){var _a;const nav=(0,navigation_provider_1.useNavigation)();return((_a=nav.useNavigate)===null||_a===void 0?void 0:_a.call(nav))||nativeNavigator}exports.useNavigate=useNavigate;function nativeNavigator(target,{replace}={}){if(typeof window>"u")throw new Error("base-react.navigation.use-location - cannot use native navigator outside of browser. Inject a custom useNavigate, or use navigation after mount");const{location,history}=window;typeof target=="number"?history.go(target):replace?location.replace(target):location.assign(target)}},14496:(module,exports)=>{var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */(function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){for(var classes=[],i=0;i<arguments.length;i++){var arg=arguments[i];if(!!arg){var argType=typeof arg;if(argType==="string"||argType==="number")classes.push(arg);else if(Array.isArray(arg)){if(arg.length){var inner=classNames.apply(null,arg);inner&&classes.push(inner)}}else if(argType==="object")if(arg.toString===Object.prototype.toString)for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&classes.push(key);else classes.push(arg.toString())}}return classes.join(" ")}module.exports?(classNames.default=classNames,module.exports=classNames):(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return classNames}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))})()},93802:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var required=__webpack_require__(47418),qs=__webpack_require__(57129),slashes=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,protocolre=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,whitespace="[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]",left=new RegExp("^"+whitespace+"+");function trimLeft(str){return(str||"").toString().replace(left,"")}var rules=[["#","hash"],["?","query"],function(address){return address.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(loc){var globalVar;typeof window<"u"?globalVar=window:typeof __webpack_require__.g<"u"?globalVar=__webpack_require__.g:typeof self<"u"?globalVar=self:globalVar={};var location=globalVar.location||{};loc=loc||location;var finaldestination={},type=typeof loc,key;if(loc.protocol==="blob:")finaldestination=new Url(unescape(loc.pathname),{});else if(type==="string"){finaldestination=new Url(loc,{});for(key in ignore)delete finaldestination[key]}else if(type==="object"){for(key in loc)key in ignore||(finaldestination[key]=loc[key]);finaldestination.slashes===void 0&&(finaldestination.slashes=slashes.test(loc.href))}return finaldestination}function extractProtocol(address){address=trimLeft(address);var match=protocolre.exec(address),protocol=match[1]?match[1].toLowerCase():"",slashes2=!!(match[2]&&match[2].length>=2),rest=match[2]&&match[2].length===1?"/"+match[3]:match[3];return{protocol,slashes:slashes2,rest}}function resolve(relative,base){if(relative==="")return base;for(var path=(base||"/").split("/").slice(0,-1).concat(relative.split("/")),i=path.length,last=path[i-1],unshift=!1,up=0;i--;)path[i]==="."?path.splice(i,1):path[i]===".."?(path.splice(i,1),up++):up&&(i===0&&(unshift=!0),path.splice(i,1),up--);return unshift&&path.unshift(""),(last==="."||last==="..")&&path.push(""),path.join("/")}function Url(address,location,parser){if(address=trimLeft(address),!(this instanceof Url))return new Url(address,location,parser);var relative,extracted,parse,instruction,index,key,instructions=rules.slice(),type=typeof location,url=this,i=0;for(type!=="object"&&type!=="string"&&(parser=location,location=null),parser&&typeof parser!="function"&&(parser=qs.parse),location=lolcation(location),extracted=extractProtocol(address||""),relative=!extracted.protocol&&!extracted.slashes,url.slashes=extracted.slashes||relative&&location.slashes,url.protocol=extracted.protocol||location.protocol||"",address=extracted.rest,extracted.slashes||(instructions[3]=[/(.*)/,"pathname"]);i<instructions.length;i++){if(instruction=instructions[i],typeof instruction=="function"){address=instruction(address);continue}parse=instruction[0],key=instruction[1],parse!==parse?url[key]=address:typeof parse=="string"?~(index=address.indexOf(parse))&&(typeof instruction[2]=="number"?(url[key]=address.slice(0,index),address=address.slice(index+instruction[2])):(url[key]=address.slice(index),address=address.slice(0,index))):(index=parse.exec(address))&&(url[key]=index[1],address=address.slice(0,index.index)),url[key]=url[key]||relative&&instruction[3]&&location[key]||"",instruction[4]&&(url[key]=url[key].toLowerCase())}parser&&(url.query=parser(url.query)),relative&&location.slashes&&url.pathname.charAt(0)!=="/"&&(url.pathname!==""||location.pathname!=="")&&(url.pathname=resolve(url.pathname,location.pathname)),url.pathname.charAt(0)!=="/"&&url.hostname&&(url.pathname="/"+url.pathname),required(url.port,url.protocol)||(url.host=url.hostname,url.port=""),url.username=url.password="",url.auth&&(instruction=url.auth.split(":"),url.username=instruction[0]||"",url.password=instruction[1]||""),url.origin=url.protocol&&url.host&&url.protocol!=="file:"?url.protocol+"//"+url.host:"null",url.href=url.toString()}function set(part,value,fn){var url=this;switch(part){case"query":typeof value=="string"&&value.length&&(value=(fn||qs.parse)(value)),url[part]=value;break;case"port":url[part]=value,required(value,url.protocol)?value&&(url.host=url.hostname+":"+value):(url.host=url.hostname,url[part]="");break;case"hostname":url[part]=value,url.port&&(value+=":"+url.port),url.host=value;break;case"host":url[part]=value,/:\d+$/.test(value)?(value=value.split(":"),url.port=value.pop(),url.hostname=value.join(":")):(url.hostname=value,url.port="");break;case"protocol":url.protocol=value.toLowerCase(),url.slashes=!fn;break;case"pathname":case"hash":if(value){var char=part==="pathname"?"/":"#";url[part]=value.charAt(0)!==char?char+value:value}else url[part]=value;break;default:url[part]=value}for(var i=0;i<rules.length;i++){var ins=rules[i];ins[4]&&(url[ins[1]]=url[ins[1]].toLowerCase())}return url.origin=url.protocol&&url.host&&url.protocol!=="file:"?url.protocol+"//"+url.host:"null",url.href=url.toString(),url}function toString(stringify){(!stringify||typeof stringify!="function")&&(stringify=qs.stringify);var query,url=this,protocol=url.protocol;protocol&&protocol.charAt(protocol.length-1)!==":"&&(protocol+=":");var result=protocol+(url.slashes?"//":"");return url.username&&(result+=url.username,url.password&&(result+=":"+url.password),result+="@"),result+=url.host+url.pathname,query=typeof url.query=="object"?stringify(url.query):url.query,query&&(result+=query.charAt(0)!=="?"?"?"+query:query),url.hash&&(result+=url.hash),result}Url.prototype={set,toString},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=qs,module.exports=Url},99884:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LoaderRibbon=void 0;var loader_ribbon_1=__webpack_require__(24353);Object.defineProperty(exports,"LoaderRibbon",{enumerable:!0,get:function(){return loader_ribbon_1.LoaderRibbon}})},24353:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.LoaderRibbon=void 0;const classnames_1=__importDefault(__webpack_require__(94184)),react_1=__importDefault(__webpack_require__(67294)),loader_ribbon_module_scss_1=__importDefault(__webpack_require__(80719));function LoaderRibbon(_a){var{active,className}=_a,rest=__rest(_a,["active","className"]);return react_1.default.createElement("div",Object.assign({},rest,{className:classnames_1.default(className,loader_ribbon_module_scss_1.default.loader,active&&loader_ribbon_module_scss_1.default.loading)}),react_1.default.createElement("div",{className:loader_ribbon_module_scss_1.default.progress}))}exports.LoaderRibbon=LoaderRibbon},67494:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Composer=void 0;const react_1=__importDefault(__webpack_require__(67294));function Composer(props){const{components=[],children}=props,arrayified=components.map(tuple=>Array.isArray(tuple)?tuple:[tuple,void 0]);return react_1.default.createElement(react_1.default.Fragment,null,arrayified.reduceRight((acc,[Comp,forwardProps])=>react_1.default.createElement(Comp,Object.assign({},forwardProps),acc),children))}exports.Composer=Composer},57166:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Composer=void 0;var composer_1=__webpack_require__(67494);Object.defineProperty(exports,"Composer",{enumerable:!0,get:function(){return composer_1.Composer}})},14524:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.links=void 0;var links_1=__webpack_require__(3064);Object.defineProperty(exports,"links",{enumerable:!0,get:function(){return links_1.links}})},3064:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.links=void 0,exports.links={docs:"https://bit.dev/docs",github:"https://github.com/teambit/bit",slack:"https://join.slack.com/t/bit-dev-community/shared_invite/zt-1el4b4sb5-FpgRefqUiZbUH9lvnHgwRg",blog:"https://bit.cloud/blog",twitter:"https://twitter.com/bitdev_",linkedin:"https://www.linkedin.com/company/bit-dev",bitRegistry:"https://node.bit.cloud",youtube:"https://www.youtube.com/c/Bitdev/videos",careers:"https://bit.breezy.hr"}},38100:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContactIcons=void 0;const react_1=__importDefault(__webpack_require__(67294)),base_react_navigation_link_1=__webpack_require__(22576),community_constants_links_1=__webpack_require__(14524),styles={link:{textDecoration:"none",lineHeight:"inherit",color:"unset"},logo:{width:"24px",height:"24px",margin:"0 13px"}};function ContactIcons(props){return react_1.default.createElement("div",Object.assign({style:Object.assign(Object.assign({},styles.iconLine),props.style)},props),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.slack},react_1.default.createElement("img",{alt:"slack",style:styles.logo,src:"https://static.bit.dev/harmony/slack-round-icon.svg"})),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.github},react_1.default.createElement("img",{alt:"github",style:styles.logo,src:"https://static.bit.dev/harmony/github.svg"})),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.docs},react_1.default.createElement("img",{alt:"bit docs",style:styles.logo,src:"https://static.bit.dev/bit-logo.svg"})))}exports.ContactIcons=ContactIcons},13555:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ErrorPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),styles={errorPage:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"auto",padding:"24px",textAlign:"center"},title:{fontWeight:"bold",margin:"0 0 24px 0"},img:{maxWidth:"700px",marginBottom:"24px",width:"100%"}},inlineStyles=`
5
+ */(function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){for(var classes=[],i=0;i<arguments.length;i++){var arg=arguments[i];if(!!arg){var argType=typeof arg;if(argType==="string"||argType==="number")classes.push(arg);else if(Array.isArray(arg)){if(arg.length){var inner=classNames.apply(null,arg);inner&&classes.push(inner)}}else if(argType==="object")if(arg.toString===Object.prototype.toString)for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&classes.push(key);else classes.push(arg.toString())}}return classes.join(" ")}module.exports?(classNames.default=classNames,module.exports=classNames):(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return classNames}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))})()},99884:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LoaderRibbon=void 0;var loader_ribbon_1=__webpack_require__(24353);Object.defineProperty(exports,"LoaderRibbon",{enumerable:!0,get:function(){return loader_ribbon_1.LoaderRibbon}})},24353:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.LoaderRibbon=void 0;const classnames_1=__importDefault(__webpack_require__(94184)),react_1=__importDefault(__webpack_require__(67294)),loader_ribbon_module_scss_1=__importDefault(__webpack_require__(80719));function LoaderRibbon(_a){var{active,className}=_a,rest=__rest(_a,["active","className"]);return react_1.default.createElement("div",Object.assign({},rest,{className:classnames_1.default(className,loader_ribbon_module_scss_1.default.loader,active&&loader_ribbon_module_scss_1.default.loading)}),react_1.default.createElement("div",{className:loader_ribbon_module_scss_1.default.progress}))}exports.LoaderRibbon=LoaderRibbon},29094:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareUrl=void 0;const url_parse_1=__importDefault(__webpack_require__(92614));function compareUrl(baseUrl,toMatchUrl,{exact,strict}={}){if(baseUrl===toMatchUrl)return!0;strict||(baseUrl=baseUrl.replace(/\/(?=[?#]|$)/,""),toMatchUrl=toMatchUrl.replace(/\/(?=[?#]|$)/,""));const base=url_parse_1.default(baseUrl),match=url_parse_1.default(toMatchUrl),subUrl=isSubUrl(base,match),exactMatch=!exact||isExactMatch(base,match),strictMatch=!strict||isStrictMatch(base,match);return subUrl&&exactMatch&&strictMatch}exports.compareUrl=compareUrl;function isSubUrl(base,match){return(!match.protocol||match.protocol===base.protocol)&&(!match.hostname||match.hostname===base.hostname)&&(!match.port||match.port===base.port)&&(!match.pathname||base.pathname.startsWith(match.pathname))&&(!match.query||isSubObject(match.query,base.query))&&(!match.hash||match.hash===base.hash)&&(!match.password||match.password===base.password)&&(!match.username||match.username===base.username)}function isExactMatch(base,match){return(!match.pathname||base.pathname===match.pathname)&&(!match.query||isSubObject(base.query,match.query))}function isStrictMatch(base,match){return!match.pathname||base.pathname.endsWith("/")===match.pathname.endsWith("/")}function isSubObject(source,target){return Object.keys(source).every(key=>source[key]===target[key])}},76783:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareUrl=void 0;var compare_url_1=__webpack_require__(29094);Object.defineProperty(exports,"compareUrl",{enumerable:!0,get:function(){return compare_url_1.compareUrl}})},92614:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var required=__webpack_require__(47418),qs=__webpack_require__(57129),slashes=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,protocolre=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,whitespace="[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]",left=new RegExp("^"+whitespace+"+");function trimLeft(str){return(str||"").toString().replace(left,"")}var rules=[["#","hash"],["?","query"],function(address){return address.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(loc){var globalVar;typeof window<"u"?globalVar=window:typeof __webpack_require__.g<"u"?globalVar=__webpack_require__.g:typeof self<"u"?globalVar=self:globalVar={};var location=globalVar.location||{};loc=loc||location;var finaldestination={},type=typeof loc,key;if(loc.protocol==="blob:")finaldestination=new Url(unescape(loc.pathname),{});else if(type==="string"){finaldestination=new Url(loc,{});for(key in ignore)delete finaldestination[key]}else if(type==="object"){for(key in loc)key in ignore||(finaldestination[key]=loc[key]);finaldestination.slashes===void 0&&(finaldestination.slashes=slashes.test(loc.href))}return finaldestination}function extractProtocol(address){address=trimLeft(address);var match=protocolre.exec(address),protocol=match[1]?match[1].toLowerCase():"",slashes2=!!(match[2]&&match[2].length>=2),rest=match[2]&&match[2].length===1?"/"+match[3]:match[3];return{protocol,slashes:slashes2,rest}}function resolve(relative,base){if(relative==="")return base;for(var path=(base||"/").split("/").slice(0,-1).concat(relative.split("/")),i=path.length,last=path[i-1],unshift=!1,up=0;i--;)path[i]==="."?path.splice(i,1):path[i]===".."?(path.splice(i,1),up++):up&&(i===0&&(unshift=!0),path.splice(i,1),up--);return unshift&&path.unshift(""),(last==="."||last==="..")&&path.push(""),path.join("/")}function Url(address,location,parser){if(address=trimLeft(address),!(this instanceof Url))return new Url(address,location,parser);var relative,extracted,parse,instruction,index,key,instructions=rules.slice(),type=typeof location,url=this,i=0;for(type!=="object"&&type!=="string"&&(parser=location,location=null),parser&&typeof parser!="function"&&(parser=qs.parse),location=lolcation(location),extracted=extractProtocol(address||""),relative=!extracted.protocol&&!extracted.slashes,url.slashes=extracted.slashes||relative&&location.slashes,url.protocol=extracted.protocol||location.protocol||"",address=extracted.rest,extracted.slashes||(instructions[3]=[/(.*)/,"pathname"]);i<instructions.length;i++){if(instruction=instructions[i],typeof instruction=="function"){address=instruction(address);continue}parse=instruction[0],key=instruction[1],parse!==parse?url[key]=address:typeof parse=="string"?~(index=address.indexOf(parse))&&(typeof instruction[2]=="number"?(url[key]=address.slice(0,index),address=address.slice(index+instruction[2])):(url[key]=address.slice(index),address=address.slice(0,index))):(index=parse.exec(address))&&(url[key]=index[1],address=address.slice(0,index.index)),url[key]=url[key]||relative&&instruction[3]&&location[key]||"",instruction[4]&&(url[key]=url[key].toLowerCase())}parser&&(url.query=parser(url.query)),relative&&location.slashes&&url.pathname.charAt(0)!=="/"&&(url.pathname!==""||location.pathname!=="")&&(url.pathname=resolve(url.pathname,location.pathname)),url.pathname.charAt(0)!=="/"&&url.hostname&&(url.pathname="/"+url.pathname),required(url.port,url.protocol)||(url.host=url.hostname,url.port=""),url.username=url.password="",url.auth&&(instruction=url.auth.split(":"),url.username=instruction[0]||"",url.password=instruction[1]||""),url.origin=url.protocol&&url.host&&url.protocol!=="file:"?url.protocol+"//"+url.host:"null",url.href=url.toString()}function set(part,value,fn){var url=this;switch(part){case"query":typeof value=="string"&&value.length&&(value=(fn||qs.parse)(value)),url[part]=value;break;case"port":url[part]=value,required(value,url.protocol)?value&&(url.host=url.hostname+":"+value):(url.host=url.hostname,url[part]="");break;case"hostname":url[part]=value,url.port&&(value+=":"+url.port),url.host=value;break;case"host":url[part]=value,/:\d+$/.test(value)?(value=value.split(":"),url.port=value.pop(),url.hostname=value.join(":")):(url.hostname=value,url.port="");break;case"protocol":url.protocol=value.toLowerCase(),url.slashes=!fn;break;case"pathname":case"hash":if(value){var char=part==="pathname"?"/":"#";url[part]=value.charAt(0)!==char?char+value:value}else url[part]=value;break;default:url[part]=value}for(var i=0;i<rules.length;i++){var ins=rules[i];ins[4]&&(url[ins[1]]=url[ins[1]].toLowerCase())}return url.origin=url.protocol&&url.host&&url.protocol!=="file:"?url.protocol+"//"+url.host:"null",url.href=url.toString(),url}function toString(stringify){(!stringify||typeof stringify!="function")&&(stringify=qs.stringify);var query,url=this,protocol=url.protocol;protocol&&protocol.charAt(protocol.length-1)!==":"&&(protocol+=":");var result=protocol+(url.slashes?"//":"");return url.username&&(result+=url.username,url.password&&(result+=":"+url.password),result+="@"),result+=url.host+url.pathname,query=typeof url.query=="object"?stringify(url.query):url.query,query&&(result+=query.charAt(0)!=="?"?"?"+query:query),url.hash&&(result+=url.hash),result}Url.prototype={set,toString},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=qs,module.exports=Url},67494:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Composer=void 0;const react_1=__importDefault(__webpack_require__(67294));function Composer(props){const{components=[],children}=props,arrayified=components.map(tuple=>Array.isArray(tuple)?tuple:[tuple,void 0]);return react_1.default.createElement(react_1.default.Fragment,null,arrayified.reduceRight((acc,[Comp,forwardProps])=>react_1.default.createElement(Comp,Object.assign({},forwardProps),acc),children))}exports.Composer=Composer},57166:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Composer=void 0;var composer_1=__webpack_require__(67494);Object.defineProperty(exports,"Composer",{enumerable:!0,get:function(){return composer_1.Composer}})},14524:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.links=void 0;var links_1=__webpack_require__(3064);Object.defineProperty(exports,"links",{enumerable:!0,get:function(){return links_1.links}})},3064:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.links=void 0,exports.links={docs:"https://bit.dev/docs",github:"https://github.com/teambit/bit",slack:"https://join.slack.com/t/bit-dev-community/shared_invite/zt-1el4b4sb5-FpgRefqUiZbUH9lvnHgwRg",blog:"https://bit.cloud/blog",twitter:"https://twitter.com/bitdev_",linkedin:"https://www.linkedin.com/company/bit-dev",bitRegistry:"https://node.bit.cloud",youtube:"https://www.youtube.com/c/Bitdev/videos",careers:"https://bit.breezy.hr"}},38100:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContactIcons=void 0;const react_1=__importDefault(__webpack_require__(67294)),base_react_navigation_link_1=__webpack_require__(22576),community_constants_links_1=__webpack_require__(14524),styles={link:{textDecoration:"none",lineHeight:"inherit",color:"unset"},logo:{width:"24px",height:"24px",margin:"0 13px"}};function ContactIcons(props){return react_1.default.createElement("div",Object.assign({style:Object.assign(Object.assign({},styles.iconLine),props.style)},props),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.slack},react_1.default.createElement("img",{alt:"slack",style:styles.logo,src:"https://static.bit.dev/harmony/slack-round-icon.svg"})),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.github},react_1.default.createElement("img",{alt:"github",style:styles.logo,src:"https://static.bit.dev/harmony/github.svg"})),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.docs},react_1.default.createElement("img",{alt:"bit docs",style:styles.logo,src:"https://static.bit.dev/bit-logo.svg"})))}exports.ContactIcons=ContactIcons},13555:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ErrorPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),styles={errorPage:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"auto",padding:"24px",textAlign:"center"},title:{fontWeight:"bold",margin:"0 0 24px 0"},img:{maxWidth:"700px",marginBottom:"24px",width:"100%"}},inlineStyles=`
6
6
  .bit-error-page-title { font-size: 36px; }
7
7
  @media screen and (max-width: 480px) { .bit-error-page-title { font-size: 24px; } }
8
- `;function ErrorPage(_a){var{code,title,style,children}=_a,rest=__rest(_a,["code","title","style","children"]);return react_1.default.createElement("div",Object.assign({},rest,{style:Object.assign(Object.assign({},styles.errorPage),style)}),react_1.default.createElement("style",null,inlineStyles),react_1.default.createElement("h1",{style:styles.title,className:"bit-error-page-title"},title),react_1.default.createElement("img",{alt:"error-image",style:styles.img,src:`https://static.bit.dev/harmony/${code}.svg`}),children)}exports.ErrorPage=ErrorPage},31948:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContactIcons=void 0,__exportStar(__webpack_require__(13555),exports);var contact_footer_1=__webpack_require__(38100);Object.defineProperty(exports,"ContactIcons",{enumerable:!0,get:function(){return contact_footer_1.ContactIcons}})},13794:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotFoundPage=void 0;var not_found_page_1=__webpack_require__(29917);Object.defineProperty(exports,"NotFoundPage",{enumerable:!0,get:function(){return not_found_page_1.NotFoundPage}})},29917:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotFoundPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),design_ui_error_page_1=__webpack_require__(31948);function NotFoundPage(_a){var rest=__rest(_a,[]);return react_1.default.createElement(design_ui_error_page_1.ErrorPage,Object.assign({},rest,{code:404,title:"Page not found"}),react_1.default.createElement(design_ui_error_page_1.ContactIcons,null))}exports.NotFoundPage=NotFoundPage},31047:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(94891),exports)},94891:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandaloneNotFoundPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),design_ui_pages_not_found_1=__webpack_require__(13794);function StandaloneNotFoundPage(){return react_1.default.createElement(design_ui_pages_not_found_1.NotFoundPage,{style:{fontFamily:'"Helvetica Neue",Helvetica, sans-serif'}})}exports.StandaloneNotFoundPage=StandaloneNotFoundPage},51166:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionsApp=void 0;const react_1=__importDefault(__webpack_require__(67294)),base_ui_utils_composer_1=__webpack_require__(57166),design_ui_pages_standalone_not_found_page_1=__webpack_require__(31047),react_ui_loader_fallback_1=__webpack_require__(4603),hideScrollbars="body::-webkit-scrollbar {display: none;}";function CompositionsApp({Composition,previewContext}){const{providers=[]}=previewContext?.get("teambit.react/react")||{},safeComposition=(0,react_ui_loader_fallback_1.useFallback)(Composition&&react_1.default.createElement(Composition,null),react_1.default.createElement(design_ui_pages_standalone_not_found_page_1.StandaloneNotFoundPage,null));return react_1.default.createElement(base_ui_utils_composer_1.Composer,{components:providers},react_1.default.createElement("style",null,hideScrollbars),safeComposition)}exports.CompositionsApp=CompositionsApp},40105:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importDefault(__webpack_require__(67294)),react_dom_1=__importDefault(__webpack_require__(73935)),compositions_app_1=__webpack_require__(51166);exports.default=(Composition,previewContext)=>{react_dom_1.default.render(react_1.default.createElement(compositions_app_1.CompositionsApp,{Composition,previewContext}),document.getElementById("root"))}},5659:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CompositionsApp=void 0;var compositions_app_1=__webpack_require__(51166);Object.defineProperty(exports,"CompositionsApp",{enumerable:!0,get:function(){return compositions_app_1.CompositionsApp}});var compositions_app_root_1=__webpack_require__(40105);Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return __importDefault(compositions_app_root_1).default}})},4603:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFallback=exports.LoaderFallback=void 0;var loader_fallback_1=__webpack_require__(48767);Object.defineProperty(exports,"LoaderFallback",{enumerable:!0,get:function(){return loader_fallback_1.LoaderFallback}}),Object.defineProperty(exports,"useFallback",{enumerable:!0,get:function(){return loader_fallback_1.useFallback}})},48767:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFallback=exports.LoaderFallback=void 0;const react_1=__importStar(__webpack_require__(67294)),base_ui_loaders_loader_ribbon_1=__webpack_require__(99884);function LoaderFallback({Target,Loader=LoaderComponent,DefaultComponent,timeout=15e3}){return useFallback(Target&&react_1.default.createElement(Target,null),react_1.default.createElement(DefaultComponent,null),{timeout,loader:react_1.default.createElement(Loader,null)})}exports.LoaderFallback=LoaderFallback;function useFallback(target,fallback,{timeout=15e3,loader=react_1.default.createElement(LoaderComponent,null)}={}){const[working,setWorking]=(0,react_1.useState)(!!target),hasTarget=!!target;return(0,react_1.useEffect)(()=>{if(timeout<=0)return()=>{};if(hasTarget)return setWorking(!0),()=>{};const tmId=setTimeout(()=>setWorking(!1),timeout);return()=>clearTimeout(tmId)},[hasTarget,timeout]),target||(working&&timeout>0?loader:fallback)}exports.useFallback=useFallback;function LoaderComponent(){return react_1.default.createElement(base_ui_loaders_loader_ribbon_1.LoaderRibbon,{active:!0,style:{position:"fixed",top:0,left:0,right:0}})}},8979:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(5659),_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("compositions",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__},isSplitComponentBundle:!0,componentMap:{}})},80719:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={loader:"loader-ribbon_loader__2GCaR",loading:"loader-ribbon_loading__3uSHa",progress:"loader-ribbon_progress__12zF8",completed:"loader-ribbon_completed__33Bjc"}},57129:(__unused_webpack_module,exports)=>{"use strict";var has=Object.prototype.hasOwnProperty,undef;function decode(input){try{return decodeURIComponent(input.replace(/\+/g," "))}catch{return null}}function encode(input){try{return encodeURIComponent(input)}catch{return null}}function querystring(query){for(var parser=/([^=?#&]+)=?([^&]*)/g,result={},part;part=parser.exec(query);){var key=decode(part[1]),value=decode(part[2]);key===null||value===null||key in result||(result[key]=value)}return result}function querystringify(obj,prefix){prefix=prefix||"";var pairs=[],value,key;typeof prefix!="string"&&(prefix="?");for(key in obj)if(has.call(obj,key)){if(value=obj[key],!value&&(value===null||value===undef||isNaN(value))&&(value=""),key=encode(key),value=encode(value),key===null||value===null)continue;pairs.push(key+"="+value)}return pairs.length?prefix+pairs.join("&"):""}exports.stringify=querystringify,exports.parse=querystring},47418:module=>{"use strict";module.exports=function(port,protocol){if(protocol=protocol.split(":")[0],port=+port,!port)return!1;switch(protocol){case"http":case"ws":return port!==80;case"https":case"wss":return port!==443;case"ftp":return port!==21;case"gopher":return port!==70;case"file":return!1}return port!==0}}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[244,689,629],()=>__webpack_exec__(8979));var __webpack_exports__=__webpack_require__.O()}]);
8
+ `;function ErrorPage(_a){var{code,title,style,children}=_a,rest=__rest(_a,["code","title","style","children"]);return react_1.default.createElement("div",Object.assign({},rest,{style:Object.assign(Object.assign({},styles.errorPage),style)}),react_1.default.createElement("style",null,inlineStyles),react_1.default.createElement("h1",{style:styles.title,className:"bit-error-page-title"},title),react_1.default.createElement("img",{alt:"error-image",style:styles.img,src:`https://static.bit.dev/harmony/${code}.svg`}),children)}exports.ErrorPage=ErrorPage},31948:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContactIcons=void 0,__exportStar(__webpack_require__(13555),exports);var contact_footer_1=__webpack_require__(38100);Object.defineProperty(exports,"ContactIcons",{enumerable:!0,get:function(){return contact_footer_1.ContactIcons}})},13794:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotFoundPage=void 0;var not_found_page_1=__webpack_require__(29917);Object.defineProperty(exports,"NotFoundPage",{enumerable:!0,get:function(){return not_found_page_1.NotFoundPage}})},29917:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotFoundPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),design_ui_error_page_1=__webpack_require__(31948);function NotFoundPage(_a){var rest=__rest(_a,[]);return react_1.default.createElement(design_ui_error_page_1.ErrorPage,Object.assign({},rest,{code:404,title:"Page not found"}),react_1.default.createElement(design_ui_error_page_1.ContactIcons,null))}exports.NotFoundPage=NotFoundPage},31047:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(94891),exports)},94891:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandaloneNotFoundPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),design_ui_pages_not_found_1=__webpack_require__(13794);function StandaloneNotFoundPage(){return react_1.default.createElement(design_ui_pages_not_found_1.NotFoundPage,{style:{fontFamily:'"Helvetica Neue",Helvetica, sans-serif'}})}exports.StandaloneNotFoundPage=StandaloneNotFoundPage},51166:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionsApp=void 0;const react_1=__importDefault(__webpack_require__(67294)),base_ui_utils_composer_1=__webpack_require__(57166),design_ui_pages_standalone_not_found_page_1=__webpack_require__(31047),react_ui_loader_fallback_1=__webpack_require__(4603),hideScrollbars="body::-webkit-scrollbar {display: none;}";function CompositionsApp({Composition,previewContext}){const{providers=[]}=previewContext?.get("teambit.react/react")||{},safeComposition=(0,react_ui_loader_fallback_1.useFallback)(Composition&&react_1.default.createElement(Composition,null),react_1.default.createElement(design_ui_pages_standalone_not_found_page_1.StandaloneNotFoundPage,null));return react_1.default.createElement(base_ui_utils_composer_1.Composer,{components:providers},react_1.default.createElement("style",null,hideScrollbars),safeComposition)}exports.CompositionsApp=CompositionsApp},40105:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importDefault(__webpack_require__(67294)),react_dom_1=__importDefault(__webpack_require__(73935)),compositions_app_1=__webpack_require__(51166);exports.default=(Composition,previewContext)=>{react_dom_1.default.render(react_1.default.createElement(compositions_app_1.CompositionsApp,{Composition,previewContext}),document.getElementById("root"))}},5659:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CompositionsApp=void 0;var compositions_app_1=__webpack_require__(51166);Object.defineProperty(exports,"CompositionsApp",{enumerable:!0,get:function(){return compositions_app_1.CompositionsApp}});var compositions_app_root_1=__webpack_require__(40105);Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return __importDefault(compositions_app_root_1).default}})},4603:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFallback=exports.LoaderFallback=void 0;var loader_fallback_1=__webpack_require__(48767);Object.defineProperty(exports,"LoaderFallback",{enumerable:!0,get:function(){return loader_fallback_1.LoaderFallback}}),Object.defineProperty(exports,"useFallback",{enumerable:!0,get:function(){return loader_fallback_1.useFallback}})},48767:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFallback=exports.LoaderFallback=void 0;const react_1=__importStar(__webpack_require__(67294)),base_ui_loaders_loader_ribbon_1=__webpack_require__(99884);function LoaderFallback({Target,Loader=LoaderComponent,DefaultComponent,timeout=15e3}){return useFallback(Target&&react_1.default.createElement(Target,null),react_1.default.createElement(DefaultComponent,null),{timeout,loader:react_1.default.createElement(Loader,null)})}exports.LoaderFallback=LoaderFallback;function useFallback(target,fallback,{timeout=15e3,loader=react_1.default.createElement(LoaderComponent,null)}={}){const[working,setWorking]=(0,react_1.useState)(!!target),hasTarget=!!target;return(0,react_1.useEffect)(()=>{if(timeout<=0)return()=>{};if(hasTarget)return setWorking(!0),()=>{};const tmId=setTimeout(()=>setWorking(!1),timeout);return()=>clearTimeout(tmId)},[hasTarget,timeout]),target||(working&&timeout>0?loader:fallback)}exports.useFallback=useFallback;function LoaderComponent(){return react_1.default.createElement(base_ui_loaders_loader_ribbon_1.LoaderRibbon,{active:!0,style:{position:"fixed",top:0,left:0,right:0}})}},91099:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(5659),_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("compositions",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__},isSplitComponentBundle:!0,componentMap:{}})},80719:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={loader:"loader-ribbon_loader__2GCaR",loading:"loader-ribbon_loading__3uSHa",progress:"loader-ribbon_progress__12zF8",completed:"loader-ribbon_completed__33Bjc"}},57129:(__unused_webpack_module,exports)=>{"use strict";var has=Object.prototype.hasOwnProperty,undef;function decode(input){try{return decodeURIComponent(input.replace(/\+/g," "))}catch{return null}}function encode(input){try{return encodeURIComponent(input)}catch{return null}}function querystring(query){for(var parser=/([^=?#&]+)=?([^&]*)/g,result={},part;part=parser.exec(query);){var key=decode(part[1]),value=decode(part[2]);key===null||value===null||key in result||(result[key]=value)}return result}function querystringify(obj,prefix){prefix=prefix||"";var pairs=[],value,key;typeof prefix!="string"&&(prefix="?");for(key in obj)if(has.call(obj,key)){if(value=obj[key],!value&&(value===null||value===undef||isNaN(value))&&(value=""),key=encode(key),value=encode(value),key===null||value===null)continue;pairs.push(key+"="+value)}return pairs.length?prefix+pairs.join("&"):""}exports.stringify=querystringify,exports.parse=querystring},47418:module=>{"use strict";module.exports=function(port,protocol){if(protocol=protocol.split(":")[0],port=+port,!port)return!1;switch(protocol){case"http":case"ws":return port!==80;case"https":case"wss":return port!==443;case"ftp":return port!==21;case"gopher":return port!==70;case"file":return!1}return port!==0}}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[244,349,629],()=>__webpack_exec__(91099));var __webpack_exports__=__webpack_require__.O()}]);
@@ -1,2 +1,2 @@
1
1
  <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Preview</title><script>// Allow to use react dev-tools inside the examples
2
- try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="244.23981efc3a92f81df93b.js"></script><script defer="defer" src="peers.9ddeb1698f2125447695.js"></script><script defer="defer" src="689.1f2bceba4ef53ed2e1aa.js"></script><script defer="defer" src="preview-root.0b477923e8a179bbb851.js"></script><script defer="defer" src="compositions.6973b8703c94f7178c7a.js"></script><link href="static/css/preview-root.120a1d04.css" rel="stylesheet"><link href="static/css/compositions.e163efe5.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
2
+ try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="244.23981efc3a92f81df93b.js"></script><script defer="defer" src="peers.1011d1b88abba1e6054e.js"></script><script defer="defer" src="349.2404e965b18964d496a7.js"></script><script defer="defer" src="preview-root.20dfd924a7125f002bef.js"></script><script defer="defer" src="compositions.c2fa2fff8b091ff01d2b.js"></script><link href="static/css/preview-root.120a1d04.css" rel="stylesheet"><link href="static/css/compositions.e163efe5.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -2,4 +2,4 @@
2
2
  `:`
3
3
  `,newline=/\r\n|\r|\n/g;function converts(text,to){if(Buffer.isBuffer(text)){if((0,_isbinaryfile().isBinaryFileSync)(text))return text;const str=text.toString(),strReplaced=str.replace(newline,to);return str!==strReplaced?Buffer.from(strReplaced):text}return text.toString().replace(newline,to)}function lf(text){return converts(text,`
4
4
  `)}function auto(text){return converts(text,lineBreak)}function cr(text){return converts(text,"\r")}function crlf(text){return converts(text,`\r
5
- `)}},30755:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLatestVersion=getLatestVersion,exports.getValidVersionOrReleaseType=getValidVersionOrReleaseType,exports.isReleaseTypeSupported=isReleaseTypeSupported,exports.isStrReleaseType=isStrReleaseType,exports.throwForUnsupportedReleaseType=throwForUnsupportedReleaseType,exports.validateVersion=validateVersion;function _semver(){const data=__webpack_require__(81249);return _semver=function(){return data},data}function _componentVersion(){const data=__webpack_require__(8886);return _componentVersion=function(){return data},data}function isStrReleaseType(str){return["major","premajor","minor","preminor","patch","prepatch","prerelease"].includes(str)}function isReleaseTypeSupported(str){return["patch","minor","major","prerelease"].includes(str)}function throwForUnsupportedReleaseType(str){if(!isReleaseTypeSupported(str))throw new Error(`the release-type "${str}" is not supported`)}function validateVersion(version){if(version){const validVersion=(0,_semver().valid)(version);if(!validVersion)throw new(_componentVersion()).InvalidVersion(version);return validVersion}}function getValidVersionOrReleaseType(str){if(isStrReleaseType(str)){const releaseType=str;return throwForUnsupportedReleaseType(releaseType),{releaseType}}return{exactVersion:validateVersion(str)}}function getLatestVersion(versions){const max=(0,_semver().maxSatisfying)(versions,"*",{includePrerelease:!0});if(!max)throw new Error(`unable to find the latest version from ${versions.join(", ")}`);return max}},11821:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(79022),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("overview",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__},isSplitComponentBundle:!0,componentMap:{}})},591:()=>{},74112:()=>{},52361:()=>{},94616:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[924,244,689,629,384],()=>__webpack_exec__(11821));var __webpack_exports__=__webpack_require__.O()}]);
5
+ `)}},30755:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLatestVersion=getLatestVersion,exports.getValidVersionOrReleaseType=getValidVersionOrReleaseType,exports.isReleaseTypeSupported=isReleaseTypeSupported,exports.isStrReleaseType=isStrReleaseType,exports.throwForUnsupportedReleaseType=throwForUnsupportedReleaseType,exports.validateVersion=validateVersion;function _semver(){const data=__webpack_require__(81249);return _semver=function(){return data},data}function _componentVersion(){const data=__webpack_require__(8886);return _componentVersion=function(){return data},data}function isStrReleaseType(str){return["major","premajor","minor","preminor","patch","prepatch","prerelease"].includes(str)}function isReleaseTypeSupported(str){return["patch","minor","major","prerelease"].includes(str)}function throwForUnsupportedReleaseType(str){if(!isReleaseTypeSupported(str))throw new Error(`the release-type "${str}" is not supported`)}function validateVersion(version){if(version){const validVersion=(0,_semver().valid)(version);if(!validVersion)throw new(_componentVersion()).InvalidVersion(version);return validVersion}}function getValidVersionOrReleaseType(str){if(isStrReleaseType(str)){const releaseType=str;return throwForUnsupportedReleaseType(releaseType),{releaseType}}return{exactVersion:validateVersion(str)}}function getLatestVersion(versions){const max=(0,_semver().maxSatisfying)(versions,"*",{includePrerelease:!0});if(!max)throw new Error(`unable to find the latest version from ${versions.join(", ")}`);return max}},25245:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(79022),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("overview",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__},isSplitComponentBundle:!0,componentMap:{}})},591:()=>{},74112:()=>{},52361:()=>{},94616:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[924,244,349,629,384],()=>__webpack_exec__(25245));var __webpack_exports__=__webpack_require__.O()}]);
@@ -1,2 +1,2 @@
1
1
  <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Preview</title><script>// Allow to use react dev-tools inside the examples
2
- try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="244.23981efc3a92f81df93b.js"></script><script defer="defer" src="peers.9ddeb1698f2125447695.js"></script><script defer="defer" src="689.1f2bceba4ef53ed2e1aa.js"></script><script defer="defer" src="preview-root.0b477923e8a179bbb851.js"></script><script defer="defer" src="compositions.6973b8703c94f7178c7a.js"></script><script defer="defer" src="924.9c1e2303fe15b44bce8f.js"></script><script defer="defer" src="overview.a381dd6382cc0ace3b2c.js"></script><link href="static/css/preview-root.120a1d04.css" rel="stylesheet"><link href="static/css/compositions.e163efe5.css" rel="stylesheet"><link href="static/css/924.b8931f51.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
2
+ try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="244.23981efc3a92f81df93b.js"></script><script defer="defer" src="peers.1011d1b88abba1e6054e.js"></script><script defer="defer" src="349.2404e965b18964d496a7.js"></script><script defer="defer" src="preview-root.20dfd924a7125f002bef.js"></script><script defer="defer" src="compositions.c2fa2fff8b091ff01d2b.js"></script><script defer="defer" src="924.13c4250a176562362657.js"></script><script defer="defer" src="overview.5c7c2ab68e1d05935e57.js"></script><link href="static/css/preview-root.120a1d04.css" rel="stylesheet"><link href="static/css/compositions.e163efe5.css" rel="stylesheet"><link href="static/css/924.b8931f51.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -1 +1 @@
1
- (()=>{"use strict";var __webpack_modules__={31822:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__2)=>{var react__WEBPACK_IMPORTED_MODULE_2___namespace_cache,react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache,_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(38168),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(3905),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(67294),react_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(73935);const globalObj=window;guard("TeambitMdxUiMdxScopeContext",_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__),guard("MdxJsReact",_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),guard("React",react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2))),guard("ReactDom",react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2))),globalObj.TeambitMdxUiMdxScopeContext=_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__,globalObj.MdxJsReact=_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__,globalObj.React=react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2)),globalObj.ReactDom=react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2));function guard(property,expected){var existing=globalObj[property];if(existing===expected&&expected!==void 0)console.warn('[expose-peers] "'+property+'" already exists in global scope, but with correct value');else if(existing!==void 0)throw new Error('[expose-peers] "'+property+'" already exists in the global scope, cannot overwrite')}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(priority&!1||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();r!==void 0&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,leafPrototypes;__webpack_require__.t=function(value,mode){if(mode&1&&(value=this(value)),mode&8||typeof value=="object"&&value&&(mode&4&&value.__esModule||mode&16&&typeof value.then=="function"))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=mode&2&&value;typeof current=="object"&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),(()=>{var installedChunks={703:0};__webpack_require__.O.j=chunkId=>installedChunks[chunkId]===0;var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var[chunkIds,moreModules,runtime]=data,moduleId,chunkId,i=0;if(chunkIds.some(id=>installedChunks[id]!==0)){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})();var __webpack_exports__=__webpack_require__.O(void 0,[244],()=>__webpack_require__(31822));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();
1
+ (()=>{"use strict";var __webpack_modules__={36559:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__2)=>{var react__WEBPACK_IMPORTED_MODULE_2___namespace_cache,react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache,_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(38168),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(3905),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(67294),react_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(73935);const globalObj=window;guard("TeambitMdxUiMdxScopeContext",_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__),guard("MdxJsReact",_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),guard("React",react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2))),guard("ReactDom",react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2))),globalObj.TeambitMdxUiMdxScopeContext=_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__,globalObj.MdxJsReact=_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__,globalObj.React=react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2)),globalObj.ReactDom=react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2));function guard(property,expected){var existing=globalObj[property];if(existing===expected&&expected!==void 0)console.warn('[expose-peers] "'+property+'" already exists in global scope, but with correct value');else if(existing!==void 0)throw new Error('[expose-peers] "'+property+'" already exists in the global scope, cannot overwrite')}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(priority&!1||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();r!==void 0&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,leafPrototypes;__webpack_require__.t=function(value,mode){if(mode&1&&(value=this(value)),mode&8||typeof value=="object"&&value&&(mode&4&&value.__esModule||mode&16&&typeof value.then=="function"))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=mode&2&&value;typeof current=="object"&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),(()=>{var installedChunks={703:0};__webpack_require__.O.j=chunkId=>installedChunks[chunkId]===0;var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var[chunkIds,moreModules,runtime]=data,moduleId,chunkId,i=0;if(chunkIds.some(id=>installedChunks[id]!==0)){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})();var __webpack_exports__=__webpack_require__.O(void 0,[244],()=>__webpack_require__(36559));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();
@@ -1 +1 @@
1
- "use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[629],{},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[689,244],()=>__webpack_exec__(58689));var __webpack_exports__=__webpack_require__.O()}]);
1
+ "use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[629],{},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[349,244],()=>__webpack_exec__(72349));var __webpack_exports__=__webpack_require__.O()}]);
@@ -1 +1 @@
1
- {"version":3,"names":["presets","require","resolve","plugins","babelConfig","sourceMaps"],"sources":["babel.config.ts"],"sourcesContent":["const presets = [\n require.resolve('@babel/preset-env'),\n require.resolve('@babel/preset-react'),\n require.resolve('@babel/preset-typescript'),\n];\nconst plugins = [require.resolve('@babel/plugin-proposal-class-properties')];\n\nexport const babelConfig = {\n presets,\n plugins,\n sourceMaps: true,\n};\n"],"mappings":";;;;;;AAAA,MAAMA,OAAO,GAAG,CACdC,OAAO,CAACC,OAAO,CAAC,mBAAmB,CAAC,EACpCD,OAAO,CAACC,OAAO,CAAC,qBAAqB,CAAC,EACtCD,OAAO,CAACC,OAAO,CAAC,0BAA0B,CAAC,CAC5C;AACD,MAAMC,OAAO,GAAG,CAACF,OAAO,CAACC,OAAO,CAAC,yCAAyC,CAAC,CAAC;AAErE,MAAME,WAAW,GAAG;EACzBJ,OAAO;EACPG,OAAO;EACPE,UAAU,EAAE;AACd,CAAC;AAAC"}
1
+ {"version":3,"names":["presets","require","resolve","plugins","babelConfig","sourceMaps","exports"],"sources":["babel.config.ts"],"sourcesContent":["const presets = [\n require.resolve('@babel/preset-env'),\n require.resolve('@babel/preset-react'),\n require.resolve('@babel/preset-typescript'),\n];\nconst plugins = [require.resolve('@babel/plugin-proposal-class-properties')];\n\nexport const babelConfig = {\n presets,\n plugins,\n sourceMaps: true,\n};\n"],"mappings":";;;;;;AAAA,MAAMA,OAAO,GAAG,CACdC,OAAO,CAACC,OAAO,CAAC,mBAAmB,CAAC,EACpCD,OAAO,CAACC,OAAO,CAAC,qBAAqB,CAAC,EACtCD,OAAO,CAACC,OAAO,CAAC,0BAA0B,CAAC,CAC5C;AACD,MAAMC,OAAO,GAAG,CAACF,OAAO,CAACC,OAAO,CAAC,yCAAyC,CAAC,CAAC;AAErE,MAAME,WAAW,GAAG;EACzBJ,OAAO;EACPG,OAAO;EACPE,UAAU,EAAE;AACd,CAAC;AAACC,OAAA,CAAAF,WAAA,GAAAA,WAAA"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["MDXAspect"],"sources":["index.ts"],"sourcesContent":["import { MDXAspect } from './mdx.aspect';\n\nexport default MDXAspect;\nexport type { MDXMain } from './mdx.main.runtime';\nexport type { MDXCompilerOpts } from './mdx.compiler';\nexport { MdxEnv } from './mdx.env';\n\nexport { MDXAspect };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAmC,eAHpBA,gBAAS;AAAA"}
1
+ {"version":3,"names":["_mdx","data","require","_mdx2","_default","MDXAspect","exports","default"],"sources":["index.ts"],"sourcesContent":["import { MDXAspect } from './mdx.aspect';\n\nexport default MDXAspect;\nexport type { MDXMain } from './mdx.main.runtime';\nexport type { MDXCompilerOpts } from './mdx.compiler';\nexport { MdxEnv } from './mdx.env';\n\nexport { MDXAspect };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmC,IAAAG,QAAA,GAHpBC,gBAAS;AAAAC,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["MDXAspect","Aspect","create","id"],"sources":["mdx.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const MDXAspect = Aspect.create({\n id: 'teambit.mdx/mdx',\n});\n\nexport default MDXAspect;\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,SAAS,GAAGC,iBAAM,CAACC,MAAM,CAAC;EACrCC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC;AAAA,eAEYH,SAAS;AAAA"}
1
+ {"version":3,"names":["_harmony","data","require","MDXAspect","Aspect","create","id","exports","_default","default"],"sources":["mdx.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const MDXAspect = Aspect.create({\n id: 'teambit.mdx/mdx',\n});\n\nexport default MDXAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,SAAS,GAAGC,iBAAM,CAACC,MAAM,CAAC;EACrCC,EAAE,EAAE;AACN,CAAC,CAAC;AAACC,OAAA,CAAAJ,SAAA,GAAAA,SAAA;AAAA,IAAAK,QAAA,GAEYL,SAAS;AAAAI,OAAA,CAAAE,OAAA,GAAAD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["MDXCompiler","constructor","id","config","displayConfig","JSON","stringify","getDistDir","distDir","transpileFile","fileContent","options","afterMdxCompile","mdxCompileSync","filepath","filePath","bitFlavour","filePathAfterMdxCompile","replaceFileExtToJs","afterBabelCompile","babelTranspileFileContent","contents","rootDir","componentDir","babelTransformOptions","build","context","capsules","capsuleNetwork","seedersCapsules","componentsResults","map","capsule","srcFiles","component","filesystem","files","filter","file","isFileSupported","relative","errors","srcFile","transpiled","toString","path","undefined","outputFileSync","join","getDistPathBySrcPath","outputPath","outputText","length","err","artifacts","name","globPatterns","srcPath","fileWithNewExt","replace","ignoredExtensions","ignoredExt","find","ext","endsWith","ignoredPatterns","ignoredPattern","pattern","minimatch","version"],"sources":["mdx.compiler.ts"],"sourcesContent":["import { join } from 'path';\nimport { outputFileSync } from 'fs-extra';\nimport { Compiler, TranspileFileOutput, TranspileFileParams } from '@teambit/compiler';\nimport { BuiltTaskResult, BuildContext } from '@teambit/builder';\nimport { compileSync as mdxCompileSync } from '@teambit/mdx.modules.mdx-compiler';\nimport minimatch from 'minimatch';\nimport { transpileFileContent as babelTranspileFileContent } from '@teambit/compilation.modules.babel-compiler';\nimport type { TransformOptions } from '@babel/core';\n\nexport type MDXCompilerOpts = {\n ignoredExtensions?: string[];\n ignoredPatterns?: string[];\n babelTransformOptions?: TransformOptions;\n};\nexport class MDXCompiler implements Compiler {\n displayName = 'MDX';\n\n shouldCopyNonSupportedFiles = true;\n\n distDir = 'dist';\n\n constructor(readonly id: string, readonly config: MDXCompilerOpts) {}\n\n displayConfig() {\n return JSON.stringify(this.config, null, 2);\n }\n\n getDistDir() {\n return this.distDir;\n }\n\n transpileFile(fileContent: string, options: TranspileFileParams): TranspileFileOutput {\n const afterMdxCompile = mdxCompileSync(fileContent, {\n filepath: options.filePath,\n // this compiler is not indented to compile according to the bit flavour.\n bitFlavour: false,\n });\n const filePathAfterMdxCompile = this.replaceFileExtToJs(options.filePath);\n const afterBabelCompile = babelTranspileFileContent(\n afterMdxCompile.contents,\n {\n rootDir: options.componentDir,\n filePath: filePathAfterMdxCompile,\n },\n this.config.babelTransformOptions || {}\n );\n\n return afterBabelCompile;\n }\n\n /**\n * compile components inside isolated capsules. this being used during tag for the release.\n * meaning, the final package of the component has the dists generated by this method.\n */\n async build(context: BuildContext): Promise<BuiltTaskResult> {\n const capsules = context.capsuleNetwork.seedersCapsules;\n const componentsResults = capsules.map((capsule) => {\n const srcFiles = capsule.component.filesystem.files.filter((file) => {\n return this.isFileSupported(file.relative);\n });\n\n const errors = srcFiles.map((srcFile) => {\n try {\n const transpiled = this.transpileFile(srcFile.contents.toString('utf-8'), {\n filePath: this.replaceFileExtToJs(srcFile.relative),\n componentDir: capsule.path,\n });\n\n if (!transpiled) {\n return undefined;\n }\n\n outputFileSync(\n join(capsule.path, this.getDistPathBySrcPath(transpiled[0].outputPath)),\n transpiled[0].outputText\n );\n if (transpiled.length > 1) {\n outputFileSync(join(capsule.path, this.distDir, transpiled[1].outputPath), transpiled[1].outputText);\n }\n return undefined;\n } catch (err: any) {\n return err;\n }\n });\n\n return {\n errors: errors.filter((err) => !!err),\n component: capsule.component,\n };\n });\n\n return {\n componentsResults,\n artifacts: [\n {\n name: 'dist',\n globPatterns: [`${this.distDir}/**`],\n },\n ],\n };\n }\n\n /**\n * given a source file, return its parallel in the dists. e.g. \"index.ts\" => \"dist/index.js\"\n * both, the return path and the given path are relative paths.\n */\n getDistPathBySrcPath(srcPath: string): string {\n const fileWithNewExt = this.replaceFileExtToJs(srcPath);\n return join(this.distDir, fileWithNewExt);\n }\n\n private replaceFileExtToJs(srcPath: string): string {\n let fileWithNewExt = srcPath;\n if (this.isFileSupported(srcPath)) {\n fileWithNewExt = srcPath.replace('.mdx', '.mdx.js');\n }\n return fileWithNewExt;\n }\n\n /**\n * only supported files matching get compiled. others, are copied to the dist dir.\n */\n isFileSupported(filePath: string): boolean {\n const ignoredExtensions = this.config.ignoredExtensions ?? [];\n const ignoredExt = ignoredExtensions.find((ext) => filePath.endsWith(ext));\n const ignoredPatterns = this.config.ignoredPatterns ?? [];\n const ignoredPattern = ignoredPatterns.find((pattern) => minimatch(filePath, pattern));\n return !ignoredExt && !ignoredPattern && (filePath.endsWith('.mdx') || filePath.endsWith('.md'));\n }\n\n /**\n * returns the version of the current compiler instance (e.g. '4.0.1').\n */\n version(): string {\n return '';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQO,MAAMA,WAAW,CA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F;AACA;AACA;EACEyC,oBAAoB,CAACQ,OAAe,EAAU;IAC5C,MAAMC,cAAc,GAAG,IAAI,CAACxC,kBAAkB,CAACuC,OAAO,CAAC;IACvD,OAAO,IAAAT,YAAI,EAAC,IAAI,CAACxC,OAAO,EAAEkD,cAAc,CAAC;EAC3C;EAEQxC,kBAAkB,CAACuC,OAAe,EAAU;IAClD,IAAIC,cAAc,GAAGD,OAAO;IAC5B,IAAI,IAAI,CAAClB,eAAe,CAACkB,OAAO,CAAC,EAAE;MACjCC,cAAc,GAAGD,OAAO,CAACE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC;IACrD;IACA,OAAOD,cAAc;EACvB;;EAEA;AACF;AACA;EACEnB,eAAe,CAACxB,QAAgB,EAAW;IAAA;IACzC,MAAM6C,iBAAiB,4BAAG,IAAI,CAACzD,MAAM,CAACyD,iBAAiB,yEAAI,EAAE;IAC7D,MAAMC,UAAU,GAAGD,iBAAiB,CAACE,IAAI,CAAEC,GAAG,IAAKhD,QAAQ,CAACiD,QAAQ,CAACD,GAAG,CAAC,CAAC;IAC1E,MAAME,eAAe,4BAAG,IAAI,CAAC9D,MAAM,CAAC8D,eAAe,yEAAI,EAAE;IACzD,MAAMC,cAAc,GAAGD,eAAe,CAACH,IAAI,CAAEK,OAAO,IAAK,IAAAC,oBAAS,EAACrD,QAAQ,EAAEoD,OAAO,CAAC,CAAC;IACtF,OAAO,CAACN,UAAU,IAAI,CAACK,cAAc,KAAKnD,QAAQ,CAACiD,QAAQ,CAAC,MAAM,CAAC,IAAIjD,QAAQ,CAACiD,QAAQ,CAAC,KAAK,CAAC,CAAC;EAClG;;EAEA;AACF;AACA;EACEK,OAAO,GAAW;IAChB,OAAO,EAAE;EACX;AACF;AAAC"}
1
+ {"version":3,"names":["_path","data","require","_fsExtra","_mdxModules","_minimatch","_interopRequireDefault","_compilationModules","MDXCompiler","constructor","id","config","_defineProperty2","default","displayConfig","JSON","stringify","getDistDir","distDir","transpileFile","fileContent","options","afterMdxCompile","mdxCompileSync","filepath","filePath","bitFlavour","filePathAfterMdxCompile","replaceFileExtToJs","afterBabelCompile","babelTranspileFileContent","contents","rootDir","componentDir","babelTransformOptions","build","context","capsules","capsuleNetwork","seedersCapsules","componentsResults","map","capsule","srcFiles","component","filesystem","files","filter","file","isFileSupported","relative","errors","srcFile","transpiled","toString","path","undefined","outputFileSync","join","getDistPathBySrcPath","outputPath","outputText","length","err","artifacts","name","globPatterns","srcPath","fileWithNewExt","replace","_this$config$ignoredE","_this$config$ignoredP","ignoredExtensions","ignoredExt","find","ext","endsWith","ignoredPatterns","ignoredPattern","pattern","minimatch","version","exports"],"sources":["mdx.compiler.ts"],"sourcesContent":["import { join } from 'path';\nimport { outputFileSync } from 'fs-extra';\nimport { Compiler, TranspileFileOutput, TranspileFileParams } from '@teambit/compiler';\nimport { BuiltTaskResult, BuildContext } from '@teambit/builder';\nimport { compileSync as mdxCompileSync } from '@teambit/mdx.modules.mdx-compiler';\nimport minimatch from 'minimatch';\nimport { transpileFileContent as babelTranspileFileContent } from '@teambit/compilation.modules.babel-compiler';\nimport type { TransformOptions } from '@babel/core';\n\nexport type MDXCompilerOpts = {\n ignoredExtensions?: string[];\n ignoredPatterns?: string[];\n babelTransformOptions?: TransformOptions;\n};\nexport class MDXCompiler implements Compiler {\n displayName = 'MDX';\n\n shouldCopyNonSupportedFiles = true;\n\n distDir = 'dist';\n\n constructor(readonly id: string, readonly config: MDXCompilerOpts) {}\n\n displayConfig() {\n return JSON.stringify(this.config, null, 2);\n }\n\n getDistDir() {\n return this.distDir;\n }\n\n transpileFile(fileContent: string, options: TranspileFileParams): TranspileFileOutput {\n const afterMdxCompile = mdxCompileSync(fileContent, {\n filepath: options.filePath,\n // this compiler is not indented to compile according to the bit flavour.\n bitFlavour: false,\n });\n const filePathAfterMdxCompile = this.replaceFileExtToJs(options.filePath);\n const afterBabelCompile = babelTranspileFileContent(\n afterMdxCompile.contents,\n {\n rootDir: options.componentDir,\n filePath: filePathAfterMdxCompile,\n },\n this.config.babelTransformOptions || {}\n );\n\n return afterBabelCompile;\n }\n\n /**\n * compile components inside isolated capsules. this being used during tag for the release.\n * meaning, the final package of the component has the dists generated by this method.\n */\n async build(context: BuildContext): Promise<BuiltTaskResult> {\n const capsules = context.capsuleNetwork.seedersCapsules;\n const componentsResults = capsules.map((capsule) => {\n const srcFiles = capsule.component.filesystem.files.filter((file) => {\n return this.isFileSupported(file.relative);\n });\n\n const errors = srcFiles.map((srcFile) => {\n try {\n const transpiled = this.transpileFile(srcFile.contents.toString('utf-8'), {\n filePath: this.replaceFileExtToJs(srcFile.relative),\n componentDir: capsule.path,\n });\n\n if (!transpiled) {\n return undefined;\n }\n\n outputFileSync(\n join(capsule.path, this.getDistPathBySrcPath(transpiled[0].outputPath)),\n transpiled[0].outputText\n );\n if (transpiled.length > 1) {\n outputFileSync(join(capsule.path, this.distDir, transpiled[1].outputPath), transpiled[1].outputText);\n }\n return undefined;\n } catch (err: any) {\n return err;\n }\n });\n\n return {\n errors: errors.filter((err) => !!err),\n component: capsule.component,\n };\n });\n\n return {\n componentsResults,\n artifacts: [\n {\n name: 'dist',\n globPatterns: [`${this.distDir}/**`],\n },\n ],\n };\n }\n\n /**\n * given a source file, return its parallel in the dists. e.g. \"index.ts\" => \"dist/index.js\"\n * both, the return path and the given path are relative paths.\n */\n getDistPathBySrcPath(srcPath: string): string {\n const fileWithNewExt = this.replaceFileExtToJs(srcPath);\n return join(this.distDir, fileWithNewExt);\n }\n\n private replaceFileExtToJs(srcPath: string): string {\n let fileWithNewExt = srcPath;\n if (this.isFileSupported(srcPath)) {\n fileWithNewExt = srcPath.replace('.mdx', '.mdx.js');\n }\n return fileWithNewExt;\n }\n\n /**\n * only supported files matching get compiled. others, are copied to the dist dir.\n */\n isFileSupported(filePath: string): boolean {\n const ignoredExtensions = this.config.ignoredExtensions ?? [];\n const ignoredExt = ignoredExtensions.find((ext) => filePath.endsWith(ext));\n const ignoredPatterns = this.config.ignoredPatterns ?? [];\n const ignoredPattern = ignoredPatterns.find((pattern) => minimatch(filePath, pattern));\n return !ignoredExt && !ignoredPattern && (filePath.endsWith('.mdx') || filePath.endsWith('.md'));\n }\n\n /**\n * returns the version of the current compiler instance (e.g. '4.0.1').\n */\n version(): string {\n return '';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,oBAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,mBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQO,MAAMO,WAAW,CAAqB;EAO3CC,WAAWA,CAAUC,EAAU,EAAWC,MAAuB,EAAE;IAAA,KAA9CD,EAAU,GAAVA,EAAU;IAAA,KAAWC,MAAuB,GAAvBA,MAAuB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,uBANnD,KAAK;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uCAEW,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBAExB,MAAM;EAEoD;EAEpEC,aAAaA,CAAA,EAAG;IACd,OAAOC,IAAI,CAACC,SAAS,CAAC,IAAI,CAACL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cAAc,GAAGD,OAAO;IAC5B,IAAI,IAAI,CAAClB,eAAe,CAACkB,OAAO,CAAC,EAAE;MACjCC,cAAc,GAAGD,OAAO,CAACE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC;IACrD;IACA,OAAOD,cAAc;EACvB;;EAEA;AACF;AACA;EACEnB,eAAeA,CAACxB,QAAgB,EAAW;IAAA,IAAA6C,qBAAA,EAAAC,qBAAA;IACzC,MAAMC,iBAAiB,IAAAF,qBAAA,GAAG,IAAI,CAAC3D,MAAM,CAAC6D,iBAAiB,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,EAAE;IAC7D,MAAMG,UAAU,GAAGD,iBAAiB,CAACE,IAAI,CAAEC,GAAG,IAAKlD,QAAQ,CAACmD,QAAQ,CAACD,GAAG,CAAC,CAAC;IAC1E,MAAME,eAAe,IAAAN,qBAAA,GAAG,IAAI,CAAC5D,MAAM,CAACkE,eAAe,cAAAN,qBAAA,cAAAA,qBAAA,GAAI,EAAE;IACzD,MAAMO,cAAc,GAAGD,eAAe,CAACH,IAAI,CAAEK,OAAO,IAAK,IAAAC,oBAAS,EAACvD,QAAQ,EAAEsD,OAAO,CAAC,CAAC;IACtF,OAAO,CAACN,UAAU,IAAI,CAACK,cAAc,KAAKrD,QAAQ,CAACmD,QAAQ,CAAC,MAAM,CAAC,IAAInD,QAAQ,CAACmD,QAAQ,CAAC,KAAK,CAAC,CAAC;EAClG;;EAEA;AACF;AACA;EACEK,OAAOA,CAAA,EAAW;IAChB,OAAO,EAAE;EACX;AACF;AAACC,OAAA,CAAA1E,WAAA,GAAAA,WAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["mdx.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/brands/logo-mdx.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;AAA4C,EAAG,CAEjF;AAAC"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","Logo","default","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["mdx.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/brands/logo-mdx.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,IAAI,GAAGA,CAAA,kBAClBJ,MAAA,GAAAK,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEV,MAAA,GAAAK,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAA4C,CAAE,CAC1E,CACN;AAACC,OAAA,CAAAT,IAAA,GAAAA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["MDXDependencyDetector","constructor","supportedExtensions","isSupported","context","includes","ext","detect","source","output","compileSync","imports","getImportSpecifiers","files","map","importSpec","fromModule"],"sources":["mdx.detector.ts"],"sourcesContent":["import { DependencyDetector, FileContext } from '@teambit/dependency-resolver';\nimport { compileSync } from '@teambit/mdx.modules.mdx-compiler';\n\nexport class MDXDependencyDetector implements DependencyDetector {\n constructor(private supportedExtensions: string[]) {}\n\n isSupported(context: FileContext): boolean {\n return this.supportedExtensions.includes(context.ext);\n }\n\n detect(source: string): string[] {\n const output = compileSync(source);\n const imports = output.getImportSpecifiers();\n if (!imports) return [];\n const files: string[] = imports.map((importSpec) => {\n return importSpec.fromModule;\n });\n\n return files;\n }\n}\n"],"mappings":";;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,qBAAqB,CAA+B;EAC/DC,WAAW,CAASC,mBAA6B,EAAE;IAAA,KAA/BA,mBAA6B,GAA7BA,mBAA6B;EAAG;EAEpDC,WAAW,CAACC,OAAoB,EAAW;IACzC,OAAO,IAAI,CAACF,mBAAmB,CAACG,QAAQ,CAACD,OAAO,CAACE,GAAG,CAAC;EACvD;EAEAC,MAAM,CAACC,MAAc,EAAY;IAC/B,MAAMC,MAAM,GAAG,IAAAC,yBAAW,EAACF,MAAM,CAAC;IAClC,MAAMG,OAAO,GAAGF,MAAM,CAACG,mBAAmB,EAAE;IAC5C,IAAI,CAACD,OAAO,EAAE,OAAO,EAAE;IACvB,MAAME,KAAe,GAAGF,OAAO,CAACG,GAAG,CAAEC,UAAU,IAAK;MAClD,OAAOA,UAAU,CAACC,UAAU;IAC9B,CAAC,CAAC;IAEF,OAAOH,KAAK;EACd;AACF;AAAC"}
1
+ {"version":3,"names":["_mdxModules","data","require","MDXDependencyDetector","constructor","supportedExtensions","isSupported","context","includes","ext","detect","source","output","compileSync","imports","getImportSpecifiers","files","map","importSpec","fromModule","exports"],"sources":["mdx.detector.ts"],"sourcesContent":["import { DependencyDetector, FileContext } from '@teambit/dependency-resolver';\nimport { compileSync } from '@teambit/mdx.modules.mdx-compiler';\n\nexport class MDXDependencyDetector implements DependencyDetector {\n constructor(private supportedExtensions: string[]) {}\n\n isSupported(context: FileContext): boolean {\n return this.supportedExtensions.includes(context.ext);\n }\n\n detect(source: string): string[] {\n const output = compileSync(source);\n const imports = output.getImportSpecifiers();\n if (!imports) return [];\n const files: string[] = imports.map((importSpec) => {\n return importSpec.fromModule;\n });\n\n return files;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,qBAAqB,CAA+B;EAC/DC,WAAWA,CAASC,mBAA6B,EAAE;IAAA,KAA/BA,mBAA6B,GAA7BA,mBAA6B;EAAG;EAEpDC,WAAWA,CAACC,OAAoB,EAAW;IACzC,OAAO,IAAI,CAACF,mBAAmB,CAACG,QAAQ,CAACD,OAAO,CAACE,GAAG,CAAC;EACvD;EAEAC,MAAMA,CAACC,MAAc,EAAY;IAC/B,MAAMC,MAAM,GAAG,IAAAC,yBAAW,EAACF,MAAM,CAAC;IAClC,MAAMG,OAAO,GAAGF,MAAM,CAACG,mBAAmB,CAAC,CAAC;IAC5C,IAAI,CAACD,OAAO,EAAE,OAAO,EAAE;IACvB,MAAME,KAAe,GAAGF,OAAO,CAACG,GAAG,CAAEC,UAAU,IAAK;MAClD,OAAOA,UAAU,CAACC,UAAU;IAC9B,CAAC,CAAC;IAEF,OAAOH,KAAK;EACd;AACF;AAACI,OAAA,CAAAjB,qBAAA,GAAAA,qBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["describe","expectDependencies","src","expectedDeps","expect","MDXDependencyDetector","detect","to","deep","equal","it"],"sources":["mdx.detector.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport { MDXDependencyDetector } from './mdx.detector';\n\ndescribe('MDXDependencyDetector', () => {\n function expectDependencies(src: string, expectedDeps: string[]) {\n expect(new MDXDependencyDetector(['mdx']).detect(src)).to.deep.equal(expectedDeps);\n }\n describe('detect', () => {\n it('should correctly detect default import', () => {\n const src = 'import x from \"y\";';\n expectDependencies(src, ['y']);\n });\n it('should correctly detect star import', () => {\n const src = 'import * as y from \"y\";';\n expectDependencies(src, ['y']);\n });\n it('should correctly detect named import', () => {\n const src = 'import { x } from \"y\";';\n expectDependencies(src, ['y']);\n });\n it('should correctly detect import with no identifier', () => {\n const src = 'import \"y\";';\n expectDependencies(src, ['y']);\n });\n });\n});\n"],"mappings":";;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEAA,QAAQ,CAAC,uBAAuB,EAAE,MAAM;EACtC,SAASC,kBAAkB,CAACC,GAAW,EAAEC,YAAsB,EAAE;IAC/D,IAAAC,cAAM,EAAC,KAAIC,4BAAqB,EAAC,CAAC,KAAK,CAAC,CAAC,CAACC,MAAM,CAACJ,GAAG,CAAC,CAAC,CAACK,EAAE,CAACC,IAAI,CAACC,KAAK,CAACN,YAAY,CAAC;EACpF;EACAH,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACvBU,EAAE,CAAC,wCAAwC,EAAE,MAAM;MACjD,MAAMR,GAAG,GAAG,oBAAoB;MAChCD,kBAAkB,CAACC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;IACFQ,EAAE,CAAC,qCAAqC,EAAE,MAAM;MAC9C,MAAMR,GAAG,GAAG,yBAAyB;MACrCD,kBAAkB,CAACC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;IACFQ,EAAE,CAAC,sCAAsC,EAAE,MAAM;MAC/C,MAAMR,GAAG,GAAG,wBAAwB;MACpCD,kBAAkB,CAACC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;IACFQ,EAAE,CAAC,mDAAmD,EAAE,MAAM;MAC5D,MAAMR,GAAG,GAAG,aAAa;MACzBD,kBAAkB,CAACC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["_chai","data","require","_mdx","describe","expectDependencies","src","expectedDeps","expect","MDXDependencyDetector","detect","to","deep","equal","it"],"sources":["mdx.detector.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport { MDXDependencyDetector } from './mdx.detector';\n\ndescribe('MDXDependencyDetector', () => {\n function expectDependencies(src: string, expectedDeps: string[]) {\n expect(new MDXDependencyDetector(['mdx']).detect(src)).to.deep.equal(expectedDeps);\n }\n describe('detect', () => {\n it('should correctly detect default import', () => {\n const src = 'import x from \"y\";';\n expectDependencies(src, ['y']);\n });\n it('should correctly detect star import', () => {\n const src = 'import * as y from \"y\";';\n expectDependencies(src, ['y']);\n });\n it('should correctly detect named import', () => {\n const src = 'import { x } from \"y\";';\n expectDependencies(src, ['y']);\n });\n it('should correctly detect import with no identifier', () => {\n const src = 'import \"y\";';\n expectDependencies(src, ['y']);\n });\n });\n});\n"],"mappings":";;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEAG,QAAQ,CAAC,uBAAuB,EAAE,MAAM;EACtC,SAASC,kBAAkBA,CAACC,GAAW,EAAEC,YAAsB,EAAE;IAC/D,IAAAC,cAAM,EAAC,KAAIC,4BAAqB,EAAC,CAAC,KAAK,CAAC,CAAC,CAACC,MAAM,CAACJ,GAAG,CAAC,CAAC,CAACK,EAAE,CAACC,IAAI,CAACC,KAAK,CAACN,YAAY,CAAC;EACpF;EACAH,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACvBU,EAAE,CAAC,wCAAwC,EAAE,MAAM;MACjD,MAAMR,GAAG,GAAG,oBAAoB;MAChCD,kBAAkB,CAACC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;IACFQ,EAAE,CAAC,qCAAqC,EAAE,MAAM;MAC9C,MAAMR,GAAG,GAAG,yBAAyB;MACrCD,kBAAkB,CAACC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;IACFQ,EAAE,CAAC,sCAAsC,EAAE,MAAM;MAC/C,MAAMR,GAAG,GAAG,wBAAwB;MACpCD,kBAAkB,CAACC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;IACFQ,EAAE,CAAC,mDAAmD,EAAE,MAAM;MAC5D,MAAMR,GAAG,GAAG,aAAa;MACzBD,kBAAkB,CAACC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["MDXDocReader","constructor","extensions","read","path","contents","output","compile","toString","filepath","metadata","getMetadata","doc","Doc","from","isFormatSupported","format","includes"],"sources":["mdx.doc-reader.ts"],"sourcesContent":["import { DocReader, Doc } from '@teambit/docs';\nimport { compile } from '@teambit/mdx.modules.mdx-compiler';\n\nexport class MDXDocReader implements DocReader {\n constructor(private extensions: string[]) {}\n\n async read(path: string, contents: Buffer) {\n const output = await compile(contents.toString('utf-8'), { filepath: path });\n const metadata = output.getMetadata();\n\n const doc = Doc.from(path, metadata);\n return doc;\n }\n\n isFormatSupported(format: string) {\n return this.extensions.includes(format);\n }\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,YAAY,CAAsB;EAC7CC,WAAW,CAASC,UAAoB,EAAE;IAAA,KAAtBA,UAAoB,GAApBA,UAAoB;EAAG;EAE3C,MAAMC,IAAI,CAACC,IAAY,EAAEC,QAAgB,EAAE;IACzC,MAAMC,MAAM,GAAG,MAAM,IAAAC,qBAAO,EAACF,QAAQ,CAACG,QAAQ,CAAC,OAAO,CAAC,EAAE;MAAEC,QAAQ,EAAEL;IAAK,CAAC,CAAC;IAC5E,MAAMM,QAAQ,GAAGJ,MAAM,CAACK,WAAW,EAAE;IAErC,MAAMC,GAAG,GAAGC,WAAG,CAACC,IAAI,CAACV,IAAI,EAAEM,QAAQ,CAAC;IACpC,OAAOE,GAAG;EACZ;EAEAG,iBAAiB,CAACC,MAAc,EAAE;IAChC,OAAO,IAAI,CAACd,UAAU,CAACe,QAAQ,CAACD,MAAM,CAAC;EACzC;AACF;AAAC"}
1
+ {"version":3,"names":["_docs","data","require","_mdxModules","MDXDocReader","constructor","extensions","read","path","contents","output","compile","toString","filepath","metadata","getMetadata","doc","Doc","from","isFormatSupported","format","includes","exports"],"sources":["mdx.doc-reader.ts"],"sourcesContent":["import { DocReader, Doc } from '@teambit/docs';\nimport { compile } from '@teambit/mdx.modules.mdx-compiler';\n\nexport class MDXDocReader implements DocReader {\n constructor(private extensions: string[]) {}\n\n async read(path: string, contents: Buffer) {\n const output = await compile(contents.toString('utf-8'), { filepath: path });\n const metadata = output.getMetadata();\n\n const doc = Doc.from(path, metadata);\n return doc;\n }\n\n isFormatSupported(format: string) {\n return this.extensions.includes(format);\n }\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,YAAY,CAAsB;EAC7CC,WAAWA,CAASC,UAAoB,EAAE;IAAA,KAAtBA,UAAoB,GAApBA,UAAoB;EAAG;EAE3C,MAAMC,IAAIA,CAACC,IAAY,EAAEC,QAAgB,EAAE;IACzC,MAAMC,MAAM,GAAG,MAAM,IAAAC,qBAAO,EAACF,QAAQ,CAACG,QAAQ,CAAC,OAAO,CAAC,EAAE;MAAEC,QAAQ,EAAEL;IAAK,CAAC,CAAC;IAC5E,MAAMM,QAAQ,GAAGJ,MAAM,CAACK,WAAW,CAAC,CAAC;IAErC,MAAMC,GAAG,GAAGC,WAAG,CAACC,IAAI,CAACV,IAAI,EAAEM,QAAQ,CAAC;IACpC,OAAOE,GAAG;EACZ;EAEAG,iBAAiBA,CAACC,MAAc,EAAE;IAChC,OAAO,IAAI,CAACd,UAAU,CAACe,QAAQ,CAACD,MAAM,CAAC;EACzC;AACF;AAACE,OAAA,CAAAlB,YAAA,GAAAA,YAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["MdxEnvType","MdxEnv"],"sources":["mdx.env.ts"],"sourcesContent":["import { Environment } from '@teambit/envs';\n\nexport const MdxEnvType = 'mdx';\n\nexport class MdxEnv implements Environment {\n // TODO: add the env here properly.\n}\n"],"mappings":";;;;;;AAEO,MAAMA,UAAU,GAAG,KAAK;AAAC;AAEzB,MAAMC,MAAM,CAAwB;EACzC;AAAA;AACD"}
1
+ {"version":3,"names":["MdxEnvType","exports","MdxEnv"],"sources":["mdx.env.ts"],"sourcesContent":["import { Environment } from '@teambit/envs';\n\nexport const MdxEnvType = 'mdx';\n\nexport class MdxEnv implements Environment {\n // TODO: add the env here properly.\n}\n"],"mappings":";;;;;;AAEO,MAAMA,UAAU,GAAG,KAAK;AAACC,OAAA,CAAAD,UAAA,GAAAA,UAAA;AAEzB,MAAME,MAAM,CAAwB;EACzC;AAAA;AACDD,OAAA,CAAAC,MAAA,GAAAA,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["MDXMain","icon","createCompiler","opts","mdxCompiler","MDXCompiler","MDXAspect","id","mdxEnv","_mdxEnv","value","provider","docs","depResolver","react","envs","multiCompiler","babel","compiler","generator","config","mdx","tsTransformer","tsconfig","setCompileJs","setCompileJsx","setShouldCopyNonSupportedFiles","tsCompiler","env","getCompiler","babelTransformOptions","babelConfig","shouldCopyNonSupportedFiles","ignoredPatterns","getPatterns","compose","reactEnv","overrideCompiler","overrideDependencies","dependencies","overrideCompilerTasks","createTask","override","__getDescriptor","type","registerEnv","registerDetector","MDXDependencyDetector","extensions","registerDocReader","MDXDocReader","registerComponentTemplate","componentTemplates","MainRuntime","DocsAspect","DependencyResolverAspect","ReactAspect","EnvsAspect","MultiCompilerAspect","BabelAspect","CompilerAspect","GeneratorAspect","addRuntime"],"sources":["mdx.main.runtime.ts"],"sourcesContent":["import { TypescriptConfigMutator } from '@teambit/typescript.modules.ts-config-mutator';\nimport { TsConfigTransformer } from '@teambit/typescript';\nimport { BabelAspect, BabelMain } from '@teambit/babel';\nimport { MainRuntime } from '@teambit/cli';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport DocsAspect, { DocsMain } from '@teambit/docs';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport MultiCompilerAspect, { MultiCompilerMain } from '@teambit/multi-compiler';\nimport ReactAspect, { ReactEnv, ReactMain } from '@teambit/react';\nimport { GeneratorAspect, GeneratorMain } from '@teambit/generator';\nimport { MDXAspect } from './mdx.aspect';\nimport { MDXCompiler, MDXCompilerOpts } from './mdx.compiler';\nimport { MDXDependencyDetector } from './mdx.detector';\nimport { MDXDocReader } from './mdx.doc-reader';\nimport { componentTemplates } from './mdx.templates';\nimport { babelConfig } from './babel/babel.config';\n\nexport type MDXConfig = {\n /**\n * list of file extensions to consider as MDX files.\n */\n extensions: string[];\n};\n\nexport class MDXMain {\n icon() {\n return 'https://static.bit.dev/extensions-icons/mdx-icon-small.svg';\n }\n\n /**\n * create an instance of the MDX compiler.\n */\n createCompiler(opts: MDXCompilerOpts = {}) {\n const mdxCompiler = new MDXCompiler(MDXAspect.id, opts);\n return mdxCompiler;\n }\n\n _mdxEnv: ReactEnv;\n get mdxEnv() {\n return this._mdxEnv;\n }\n private set mdxEnv(value: ReactEnv) {\n this._mdxEnv = value;\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [\n DocsAspect,\n DependencyResolverAspect,\n ReactAspect,\n EnvsAspect,\n MultiCompilerAspect,\n BabelAspect,\n CompilerAspect,\n GeneratorAspect,\n ];\n\n static defaultConfig = {\n extensions: ['.md', '.mdx'],\n };\n\n static async provider(\n [docs, depResolver, react, envs, multiCompiler, babel, compiler, generator]: [\n DocsMain,\n DependencyResolverMain,\n ReactMain,\n EnvsMain,\n MultiCompilerMain,\n BabelMain,\n CompilerMain,\n GeneratorMain\n ],\n config: MDXConfig\n ) {\n const mdx = new MDXMain();\n const tsTransformer: TsConfigTransformer = (tsconfig: TypescriptConfigMutator) => {\n // set the shouldCopyNonSupportedFiles to false since we don't want ts to copy the .mdx file to the dist folder (it will conflict with the .mdx.js file created by the mdx compiler)\n tsconfig.setCompileJs(false).setCompileJsx(false).setShouldCopyNonSupportedFiles(false);\n return tsconfig;\n };\n const tsCompiler = react.env.getCompiler([tsTransformer]);\n\n const mdxCompiler = multiCompiler.createCompiler(\n [\n // set the shouldCopyNonSupportedFiles to false since we don't want babel to copy the .mdx file to the dist folder (it will conflict with the .mdx.js file created by the mdx compiler)\n babel.createCompiler({ babelTransformOptions: babelConfig, shouldCopyNonSupportedFiles: false }),\n mdx.createCompiler({ ignoredPatterns: docs.getPatterns(), babelTransformOptions: babelConfig }),\n tsCompiler,\n ],\n {}\n );\n const mdxEnv = envs.compose(react.reactEnv, [\n react.overrideCompiler(mdxCompiler),\n react.overrideDependencies({\n dependencies: {\n '@teambit/mdx.ui.mdx-scope-context': '0.0.498',\n '@mdx-js/react': '1.6.22',\n },\n }),\n react.overrideCompilerTasks([compiler.createTask('MDXCompiler', mdxCompiler)]),\n envs.override({\n __getDescriptor: async () => {\n return {\n type: 'mdx',\n };\n },\n }),\n ]);\n envs.registerEnv(mdxEnv);\n depResolver.registerDetector(new MDXDependencyDetector(config.extensions));\n docs.registerDocReader(new MDXDocReader(config.extensions));\n if (generator) generator.registerComponentTemplate(componentTemplates);\n\n mdx.mdxEnv = mdxEnv as ReactEnv;\n return mdx;\n }\n}\n\nMDXAspect.addRuntime(MDXMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AASO,MAAMA,OAAO,CAAC;EAAA;IAAA;EAAA;EACnBC,IAAI,GAAG;IACL,OAAO,4DAA4D;EACrE;;EAEA;AACF;AACA;EACEC,cAAc,CAACC,IAAqB,GAAG,CAAC,CAAC,EAAE;IACzC,MAAMC,WAAW,GAAG,KAAIC,mBAAW,EAACC,gBAAS,CAACC,EAAE,EAAEJ,IAAI,CAAC;IACvD,OAAOC,WAAW;EACpB;EAGA,IAAII,MAAM,GAAG;IACX,OAAO,IAAI,CAACC,OAAO;EACrB;EACA,IAAYD,MAAM,CAACE,KAAe,EAAE;IAClC,IAAI,CAACD,OAAO,GAAGC,KAAK;EACtB;EAmBA,aAAaC,QAAQ,CACnB,CAACC,IAAI,EAAEC,WAAW,EAAEC,KAAK,EA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IAAI,CAAC8B,WAAW,CAACrC,MAAM,CAAC;IACxBK,WAAW,CAACiC,gBAAgB,CAAC,KAAIC,6BAAqB,EAAC3B,MAAM,CAAC4B,UAAU,CAAC,CAAC;IAC1EpC,IAAI,CAACqC,iBAAiB,CAAC,KAAIC,oBAAY,EAAC9B,MAAM,CAAC4B,UAAU,CAAC,CAAC;IAC3D,IAAI7B,SAAS,EAAEA,SAAS,CAACgC,yBAAyB,CAACC,0BAAkB,CAAC;IAEtE/B,GAAG,CAACb,MAAM,GAAGA,MAAkB;IAC/B,OAAOa,GAAG;EACZ;AACF;AAAC;AAAA,gCA7FYrB,OAAO,aAqBDqD,kBAAW;AAAA,gCArBjBrD,OAAO,kBAuBI,CACpBsD,eAAU,EACVC,8CAAwB,EACxBC,gBAAW,EACXC,kBAAU,EACVC,wBAAmB,EACnBC,oBAAW,EACXC,0BAAc,EACdC,4BAAe,CAChB;AAAA,gCAhCU7D,OAAO,mBAkCK;EACrBgD,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM;AAC5B,CAAC;AA2DH1C,gBAAS,CAACwD,UAAU,CAAC9D,OAAO,CAAC"}
1
+ {"version":3,"names":["_babel","data","require","_cli","_compiler","_dependencyResolver","_docs","_interopRequireDefault","_envs","_multiCompiler","_react","_generator","_mdx","_mdx2","_mdx3","_mdx4","_mdx5","_babel2","MDXMain","constructor","_defineProperty2","default","icon","createCompiler","opts","mdxCompiler","MDXCompiler","MDXAspect","id","mdxEnv","_mdxEnv","value","provider","docs","depResolver","react","envs","multiCompiler","babel","compiler","generator","config","mdx","tsTransformer","tsconfig","setCompileJs","setCompileJsx","setShouldCopyNonSupportedFiles","tsCompiler","env","getCompiler","babelTransformOptions","babelConfig","shouldCopyNonSupportedFiles","ignoredPatterns","getPatterns","compose","reactEnv","overrideCompiler","overrideDependencies","dependencies","overrideCompilerTasks","createTask","override","__getDescriptor","type","registerEnv","registerDetector","MDXDependencyDetector","extensions","registerDocReader","MDXDocReader","registerComponentTemplate","componentTemplates","exports","MainRuntime","DocsAspect","DependencyResolverAspect","ReactAspect","EnvsAspect","MultiCompilerAspect","BabelAspect","CompilerAspect","GeneratorAspect","addRuntime"],"sources":["mdx.main.runtime.ts"],"sourcesContent":["import { TypescriptConfigMutator } from '@teambit/typescript.modules.ts-config-mutator';\nimport { TsConfigTransformer } from '@teambit/typescript';\nimport { BabelAspect, BabelMain } from '@teambit/babel';\nimport { MainRuntime } from '@teambit/cli';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport DocsAspect, { DocsMain } from '@teambit/docs';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport MultiCompilerAspect, { MultiCompilerMain } from '@teambit/multi-compiler';\nimport ReactAspect, { ReactEnv, ReactMain } from '@teambit/react';\nimport { GeneratorAspect, GeneratorMain } from '@teambit/generator';\nimport { MDXAspect } from './mdx.aspect';\nimport { MDXCompiler, MDXCompilerOpts } from './mdx.compiler';\nimport { MDXDependencyDetector } from './mdx.detector';\nimport { MDXDocReader } from './mdx.doc-reader';\nimport { componentTemplates } from './mdx.templates';\nimport { babelConfig } from './babel/babel.config';\n\nexport type MDXConfig = {\n /**\n * list of file extensions to consider as MDX files.\n */\n extensions: string[];\n};\n\nexport class MDXMain {\n icon() {\n return 'https://static.bit.dev/extensions-icons/mdx-icon-small.svg';\n }\n\n /**\n * create an instance of the MDX compiler.\n */\n createCompiler(opts: MDXCompilerOpts = {}) {\n const mdxCompiler = new MDXCompiler(MDXAspect.id, opts);\n return mdxCompiler;\n }\n\n _mdxEnv: ReactEnv;\n get mdxEnv() {\n return this._mdxEnv;\n }\n private set mdxEnv(value: ReactEnv) {\n this._mdxEnv = value;\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [\n DocsAspect,\n DependencyResolverAspect,\n ReactAspect,\n EnvsAspect,\n MultiCompilerAspect,\n BabelAspect,\n CompilerAspect,\n GeneratorAspect,\n ];\n\n static defaultConfig = {\n extensions: ['.md', '.mdx'],\n };\n\n static async provider(\n [docs, depResolver, react, envs, multiCompiler, babel, compiler, generator]: [\n DocsMain,\n DependencyResolverMain,\n ReactMain,\n EnvsMain,\n MultiCompilerMain,\n BabelMain,\n CompilerMain,\n GeneratorMain\n ],\n config: MDXConfig\n ) {\n const mdx = new MDXMain();\n const tsTransformer: TsConfigTransformer = (tsconfig: TypescriptConfigMutator) => {\n // set the shouldCopyNonSupportedFiles to false since we don't want ts to copy the .mdx file to the dist folder (it will conflict with the .mdx.js file created by the mdx compiler)\n tsconfig.setCompileJs(false).setCompileJsx(false).setShouldCopyNonSupportedFiles(false);\n return tsconfig;\n };\n const tsCompiler = react.env.getCompiler([tsTransformer]);\n\n const mdxCompiler = multiCompiler.createCompiler(\n [\n // set the shouldCopyNonSupportedFiles to false since we don't want babel to copy the .mdx file to the dist folder (it will conflict with the .mdx.js file created by the mdx compiler)\n babel.createCompiler({ babelTransformOptions: babelConfig, shouldCopyNonSupportedFiles: false }),\n mdx.createCompiler({ ignoredPatterns: docs.getPatterns(), babelTransformOptions: babelConfig }),\n tsCompiler,\n ],\n {}\n );\n const mdxEnv = envs.compose(react.reactEnv, [\n react.overrideCompiler(mdxCompiler),\n react.overrideDependencies({\n dependencies: {\n '@teambit/mdx.ui.mdx-scope-context': '0.0.498',\n '@mdx-js/react': '1.6.22',\n },\n }),\n react.overrideCompilerTasks([compiler.createTask('MDXCompiler', mdxCompiler)]),\n envs.override({\n __getDescriptor: async () => {\n return {\n type: 'mdx',\n };\n },\n }),\n ]);\n envs.registerEnv(mdxEnv);\n depResolver.registerDetector(new MDXDependencyDetector(config.extensions));\n docs.registerDocReader(new MDXDocReader(config.extensions));\n if (generator) generator.registerComponentTemplate(componentTemplates);\n\n mdx.mdxEnv = mdxEnv as ReactEnv;\n return mdx;\n }\n}\n\nMDXAspect.addRuntime(MDXMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,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ACH,CAAC;IACF7B,IAAI,CAAC8B,WAAW,CAACrC,MAAM,CAAC;IACxBK,WAAW,CAACiC,gBAAgB,CAAC,KAAIC,6BAAqB,EAAC3B,MAAM,CAAC4B,UAAU,CAAC,CAAC;IAC1EpC,IAAI,CAACqC,iBAAiB,CAAC,KAAIC,oBAAY,EAAC9B,MAAM,CAAC4B,UAAU,CAAC,CAAC;IAC3D,IAAI7B,SAAS,EAAEA,SAAS,CAACgC,yBAAyB,CAACC,0BAAkB,CAAC;IAEtE/B,GAAG,CAACb,MAAM,GAAGA,MAAkB;IAC/B,OAAOa,GAAG;EACZ;AACF;AAACgC,OAAA,CAAAxD,OAAA,GAAAA,OAAA;AAAA,IAAAE,gBAAA,GAAAC,OAAA,EA7FYH,OAAO,aAqBDyD,kBAAW;AAAA,IAAAvD,gBAAA,GAAAC,OAAA,EArBjBH,OAAO,kBAuBI,CACpB0D,eAAU,EACVC,8CAAwB,EACxBC,gBAAW,EACXC,kBAAU,EACVC,wBAAmB,EACnBC,oBAAW,EACXC,0BAAc,EACdC,4BAAe,CAChB;AAAA,IAAA/D,gBAAA,GAAAC,OAAA,EAhCUH,OAAO,mBAkCK;EACrBmD,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM;AAC5B,CAAC;AA2DH1C,gBAAS,CAACyD,UAAU,CAAClE,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["componentTemplates","MDXComponent","deprecatedMDXComponent"],"sources":["mdx.templates.ts"],"sourcesContent":["import { ComponentTemplate } from '@teambit/generator';\nimport { MDXComponent, deprecatedMDXComponent } from './templates/mdx-component';\n\nexport const componentTemplates: ComponentTemplate[] = [MDXComponent, deprecatedMDXComponent];\n"],"mappings":";;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,kBAAuC,GAAG,CAACC,4BAAY,EAAEC,sCAAsB,CAAC;AAAC"}
1
+ {"version":3,"names":["_mdxComponent","data","require","componentTemplates","MDXComponent","deprecatedMDXComponent","exports"],"sources":["mdx.templates.ts"],"sourcesContent":["import { ComponentTemplate } from '@teambit/generator';\nimport { MDXComponent, deprecatedMDXComponent } from './templates/mdx-component';\n\nexport const componentTemplates: ComponentTemplate[] = [MDXComponent, deprecatedMDXComponent];\n"],"mappings":";;;;;;AACA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,kBAAuC,GAAG,CAACC,4BAAY,EAAEC,sCAAsB,CAAC;AAACC,OAAA,CAAAH,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["MDXEnvUI","provider","compositionsUI","testerUi","mdxEnvUI","registerEmptyState","UIRuntime","CompositionsAspect","TesterAspect","MDXAspect","addRuntime"],"sources":["mdx.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { CompositionsAspect, CompositionsUI } from '@teambit/compositions';\nimport { UIRuntime } from '@teambit/ui';\nimport { TesterAspect, TesterUI } from '@teambit/tester';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { MDXAspect } from './mdx.aspect';\n\nexport class MDXEnvUI {\n static runtime = UIRuntime;\n static slots = [];\n static dependencies = [CompositionsAspect, TesterAspect];\n\n static async provider([compositionsUI, testerUi]: [CompositionsUI, TesterUI]) {\n const mdxEnvUI = new MDXEnvUI();\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n testerUi.registerEmptyState(() => {\n return (\n <EmptyBox\n title=\"This component doesn’t have any tests.\"\n linkText=\"Learn how to add tests to your MDX components\"\n link={`https://bit.dev/docs/dev-services-overview/tester/tester-overview`}\n />\n );\n });\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n compositionsUI.registerEmptyState(() => {\n return (\n <EmptyBox\n title=\"This component doesn’t have any compositions.\"\n linkText=\"Learn how to add compositions to your MDX components\"\n link={`https://bit.dev/docs/dev-services-overview/compositions/compositions-overview`}\n />\n );\n });\n\n return mdxEnvUI;\n }\n}\n\nMDXAspect.addRuntime(MDXEnvUI);\n\nexport default MDXEnvUI;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,QAAQ,CAAC;EAKpB,aAAaC,QAAQ,CAAC,CAACC,cAAc,EAAEC,QAAQ,CAA6B,EAAE;IAC5E,MAAMC,QAAQ,GAAG,IAAIJ,QAAQ,EAAE;;IAE/B;IACAG,QAAQ,CAACE,kBAAkB,CAAC,MAAM;MAChC,oBACE,+BAAC,oBAAQ;QACP,KAAK,EAAC,6CAAwC;QAC9C,QAAQ,EAAC,+CAA+C;QACxD,IAAI,EAAG;MAAmE,EAC1E;IAEN,CAAC,CAAC;;IAEF;IACAH,cAAc,CAACG,kBAAkB,CAAC,MAAM;MACtC,oBACE,+BAAC,oBAAQ;QACP,KAAK,EAAC,oDAA+C;QACrD,QAAQ,EAAC,sDAAsD;QAC/D,IAAI,EAAG;MAA+E,EACtF;IAEN,CAAC,CAAC;IAEF,OAAOD,QAAQ;EACjB;AACF;AAAC;AAAA,gCAhCYJ,QAAQ,aACFM,eAAS;AAAA,gCADfN,QAAQ,WAEJ,EAAE;AAAA,gCAFNA,QAAQ,kBAGG,CAACO,kCAAkB,EAAEC,sBAAY,CAAC;AA+B1DC,gBAAS,CAACC,UAAU,CAACV,QAAQ,CAAC;AAAC,eAEhBA,QAAQ;AAAA"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_compositions","_ui","_tester","_designUi","_mdx","MDXEnvUI","provider","compositionsUI","testerUi","mdxEnvUI","registerEmptyState","default","createElement","EmptyBox","title","linkText","link","exports","_defineProperty2","UIRuntime","CompositionsAspect","TesterAspect","MDXAspect","addRuntime","_default"],"sources":["mdx.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { CompositionsAspect, CompositionsUI } from '@teambit/compositions';\nimport { UIRuntime } from '@teambit/ui';\nimport { TesterAspect, TesterUI } from '@teambit/tester';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { MDXAspect } from './mdx.aspect';\n\nexport class MDXEnvUI {\n static runtime = UIRuntime;\n static slots = [];\n static dependencies = [CompositionsAspect, TesterAspect];\n\n static async provider([compositionsUI, testerUi]: [CompositionsUI, TesterUI]) {\n const mdxEnvUI = new MDXEnvUI();\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n testerUi.registerEmptyState(() => {\n return (\n <EmptyBox\n title=\"This component doesn’t have any tests.\"\n linkText=\"Learn how to add tests to your MDX components\"\n link={`https://bit.dev/docs/dev-services-overview/tester/tester-overview`}\n />\n );\n });\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n compositionsUI.registerEmptyState(() => {\n return (\n <EmptyBox\n title=\"This component doesn’t have any compositions.\"\n linkText=\"Learn how to add compositions to your MDX components\"\n link={`https://bit.dev/docs/dev-services-overview/compositions/compositions-overview`}\n />\n );\n });\n\n return mdxEnvUI;\n }\n}\n\nMDXAspect.addRuntime(MDXEnvUI);\n\nexport default MDXEnvUI;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAA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gBAAA,GAAAP,OAAA,EADfN,QAAQ,WAEJ,EAAE;AAAA,IAAAa,gBAAA,GAAAP,OAAA,EAFNN,QAAQ,kBAGG,CAACe,kCAAkB,EAAEC,sBAAY,CAAC;AA+B1DC,gBAAS,CAACC,UAAU,CAAClB,QAAQ,CAAC;AAAC,IAAAmB,QAAA,GAEhBnB,QAAQ;AAAAY,OAAA,CAAAN,OAAA,GAAAa,QAAA"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.mdx_mdx@0.0.1094/dist/mdx.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.mdx_mdx@0.0.1094/dist/mdx.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.mdx_mdx@0.0.1095/dist/mdx.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.mdx_mdx@0.0.1095/dist/mdx.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1 +1 @@
1
- {"version":3,"names":["regex","componentFile","context","name","namePascalCase","Name","relativePath","content","replace"],"sources":["component.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nconst regex = /([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g;\n\nexport const componentFile = (context: ComponentContext) => {\n const { name, namePascalCase: Name } = context;\n return {\n relativePath: `${name}.mdx`,\n content: `# ${Name.replace(regex, '$1$4 $2$3$5')}\n\nThis is markdown.\n\n<p>This is HTML</p>\n\n# Import a React Component or use HTML\n\n<button>Button 👋 </button>\n`,\n };\n};\n"],"mappings":";;;;;;;;AAEA,MAAMA,KAAK,GAAG,uCAAuC;AAE9C,MAAMC,aAAa,GAAIC,OAAyB,IAAK;EAC1D,MAAM;IAAEC,IAAI;IAAEC,cAAc,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAC9C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,MAAK;IAC3BI,OAAO,EAAG,KAAIF,IAAI,CAACG,OAAO,CAACR,KAAK,EAAE,aAAa,CAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"names":["regex","componentFile","context","name","namePascalCase","Name","relativePath","content","replace","exports"],"sources":["component.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nconst regex = /([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g;\n\nexport const componentFile = (context: ComponentContext) => {\n const { name, namePascalCase: Name } = context;\n return {\n relativePath: `${name}.mdx`,\n content: `# ${Name.replace(regex, '$1$4 $2$3$5')}\n\nThis is markdown.\n\n<p>This is HTML</p>\n\n# Import a React Component or use HTML\n\n<button>Button 👋 </button>\n`,\n };\n};\n"],"mappings":";;;;;;;;AAEA,MAAMA,KAAK,GAAG,uCAAuC;AAE9C,MAAMC,aAAa,GAAIC,OAAyB,IAAK;EAC1D,MAAM;IAAEC,IAAI;IAAEC,cAAc,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAC9C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,MAAK;IAC3BI,OAAO,EAAG,KAAIF,IAAI,CAACG,OAAO,CAACR,KAAK,EAAE,aAAa,CAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACS,OAAA,CAAAR,aAAA,GAAAA,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["compositionFile","context","name","namePascalCase","Name","relativePath","content"],"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}.composition.tsx`,\n content: `import React from 'react';\nimport { ${Name} } from './index';\n\nexport const Basic${Name} = () => (\n <${Name} />\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,kBAAiB;IACvCI,OAAO,EAAG;AACd,WAAWF,IAAK;AAChB;AACA,oBAAoBA,IAAK;AACzB,KAAKA,IAAK;AACV;AACA;EACE,CAAC;AACH,CAAC;AAAC"}
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}.composition.tsx`,\n content: `import React from 'react';\nimport { ${Name} } from './index';\n\nexport const Basic${Name} = () => (\n <${Name} />\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,kBAAiB;IACvCI,OAAO,EAAG;AACd,WAAWF,IAAK;AAChB;AACA,oBAAoBA,IAAK;AACzB,KAAKA,IAAK;AACV;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["docsFile","context","name","namePascalCase","Name","relativePath","content"],"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}.docs.mdx`,\n content: `---\ndescription: 'An MDX component.'\nlabels: ['content', 'mdx']\n---\n\nimport { ${Name} } from './index';\n\n### Component usage\n\\`\\`\\`js\n<${Name} />\n\\`\\`\\`\n\n### Render with theme and MDX providers\n\n\\`\\`\\`js\nimport { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions'\nimport { MDXLayout } from '@teambit/mdx.ui.mdx-layout'\nimport { ${Name} } from './index'\n\n<ThemeCompositions>\n <MDXLayout>\n <${Name} />\n </MDXLayout>\n</ThemeCompositions>\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,WAAU;IAChCI,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA,WAAWF,IAAK;AAChB;AACA;AACA;AACA,GAAGA,IAAK;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAWA,IAAK;AAChB;AACA;AACA;AACA,OAAOA,IAAK;AACZ;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAAC"}
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}.docs.mdx`,\n content: `---\ndescription: 'An MDX component.'\nlabels: ['content', 'mdx']\n---\n\nimport { ${Name} } from './index';\n\n### Component usage\n\\`\\`\\`js\n<${Name} />\n\\`\\`\\`\n\n### Render with theme and MDX providers\n\n\\`\\`\\`js\nimport { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions'\nimport { MDXLayout } from '@teambit/mdx.ui.mdx-layout'\nimport { ${Name} } from './index'\n\n<ThemeCompositions>\n <MDXLayout>\n <${Name} />\n </MDXLayout>\n</ThemeCompositions>\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,WAAU;IAChCI,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA,WAAWF,IAAK;AAChB;AACA;AACA;AACA,GAAGA,IAAK;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAWA,IAAK;AAChB;AACA;AACA;AACA,OAAOA,IAAK;AACZ;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,QAAA,GAAAA,QAAA"}