@teambit/mdx 1.0.1072 → 1.0.1073
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.
- package/artifacts/env-template/public/assets-manifest.json +6 -6
- package/artifacts/env-template/public/{compositions.b2d3a1f1750d599529b2.js → compositions.4eb504e6d746a04c0809.js} +2 -2
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/overview.6be45cfd54b830952f60.js +2 -0
- package/artifacts/env-template/public/overview.html +1 -1
- package/dist/mdx.detector.d.ts +0 -8
- package/dist/mdx.detector.js +8 -58
- package/dist/mdx.detector.js.map +1 -1
- package/dist/mdx.detector.spec.js +0 -112
- package/dist/mdx.detector.spec.js.map +1 -1
- package/dist/{preview-1784819498990.js → preview-1784829406374.js} +2 -2
- package/package.json +13 -12
- package/artifacts/env-template/public/overview.d7b3bff63728393be888.js +0 -2
- /package/artifacts/env-template/public/{peers.02ad12c995f68fab5729.js → peers.93f3f914ac4cf19596fd.js} +0 -0
- /package/{compositions-1784819498990.js → compositions-1784829406374.js} +0 -0
- /package/{overview-1784819498990.js → overview-1784829406374.js} +0 -0
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"293.da3d813735dfb0eb19fd.js": "293.da3d813735dfb0eb19fd.js",
|
|
5
5
|
"compositions.css": "static/css/compositions.9d1b1166.css",
|
|
6
6
|
"compositions.html": "compositions.html",
|
|
7
|
-
"compositions.js": "compositions.
|
|
7
|
+
"compositions.js": "compositions.4eb504e6d746a04c0809.js",
|
|
8
8
|
"entrypoints": {
|
|
9
9
|
"peers": {
|
|
10
10
|
"assets": {
|
|
11
11
|
"js": [
|
|
12
|
-
"peers.
|
|
12
|
+
"peers.93f3f914ac4cf19596fd.js"
|
|
13
13
|
]
|
|
14
14
|
}
|
|
15
15
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"assets": {
|
|
29
29
|
"js": [
|
|
30
30
|
"293.da3d813735dfb0eb19fd.js",
|
|
31
|
-
"compositions.
|
|
31
|
+
"compositions.4eb504e6d746a04c0809.js"
|
|
32
32
|
],
|
|
33
33
|
"css": [
|
|
34
34
|
"static/css/compositions.9d1b1166.css"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"assets": {
|
|
40
40
|
"js": [
|
|
41
41
|
"109.a42f7d4992c0f39ccbb2.js",
|
|
42
|
-
"overview.
|
|
42
|
+
"overview.6be45cfd54b830952f60.js"
|
|
43
43
|
],
|
|
44
44
|
"css": [
|
|
45
45
|
"static/css/109.f6350688.css"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"overview.html": "overview.html",
|
|
51
|
-
"overview.js": "overview.
|
|
52
|
-
"peers.js": "peers.
|
|
51
|
+
"overview.js": "overview.6be45cfd54b830952f60.js",
|
|
52
|
+
"peers.js": "peers.93f3f914ac4cf19596fd.js",
|
|
53
53
|
"preview-root.css": "static/css/preview-root.94d1297b.css",
|
|
54
54
|
"preview-root.js": "preview-root.f3f3db9cdb2cd2181a15.js",
|
|
55
55
|
"static/css/109.f6350688.css": "static/css/109.f6350688.css"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[866],{
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(r,a){if(r){if(typeof r=="string")return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(a==null||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,l===0){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r2){o=!0,n=r2}finally{try{if(!f&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function __bitNormalizeId(id){return id?String(id).trim().replace(/^\/+|\/+$/g,""):""}function __bitActiveComponentId(){try{var hash=window.location.hash;if(!hash)return null;var _hash$slice$split=hash.slice(1).split("?"),_hash$slice$split2=_slicedToArray(_hash$slice$split,1),idPart=_hash$slice$split2[0],id=__bitNormalizeId(idPart),idWithoutVersion=id.split("@")[0];return idWithoutVersion||null}catch{return null}}var __bitActiveId=__bitActiveComponentId();function __bitShouldSurfaceFor(componentId){if(!__bitActiveId)return!1;var act=__bitNormalizeId(__bitActiveId),cmp=__bitNormalizeId(componentId);return!act||!cmp?!1:act===cmp}function __bitSurfaceToOverlay(err,componentId){return;var e,msg}function initializeModules(){return _initializeModules.apply(this,arguments)}function _initializeModules(){return _initializeModules=_asyncToGenerator(_regenerator().m(function _callee2(){return _regenerator().w(function(_context2){for(;;)switch(_context2.n){case 0:(0,_home_circleci_bvm_versions_2_0_35_bit_2_0_35_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__.uf)("compositions",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_139de64abf5d134f0b08ed2465dac768a4bea720_mjs__WEBPACK_IMPORTED_MODULE_1__.x},isSplitComponentBundle:!0,componentMap:{}});case 1:return _context2.a(2)}},_callee2)})),_initializeModules.apply(this,arguments)}(function(){var _initializeModulesOnLoad=_asyncToGenerator(_regenerator().m(function _callee(){return _regenerator().w(function(_context){for(;;)switch(_context.n){case 0:return _context.n=1,initializeModules();case 1:return _context.a(2)}},_callee)}));function initializeModulesOnLoad(){return _initializeModulesOnLoad.apply(this,arguments)}return initializeModulesOnLoad})()()}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[293,127,518],()=>__webpack_exec__(
|
|
1
|
+
"use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[866],{59331:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{var _home_circleci_bvm_versions_2_0_35_bit_2_0_35_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(35530),_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_139de64abf5d134f0b08ed2465dac768a4bea720_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(19900);function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r2,n2,o2,i2){var c2=n2&&n2.prototype instanceof Generator?n2:Generator,u2=Object.create(c2.prototype);return _regeneratorDefine2(u2,"_invoke",function(r3,n3,o3){var i3,c3,u3,f2=0,p=o3||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t2,r4){return i3=t2,c3=0,u3=e,G.n=r4,a}};function d(r4,n4){for(c3=r4,u3=n4,t=0;!y&&f2&&!o4&&t<p.length;t++){var o4,i4=p[t],d2=G.p,l=i4[2];r4>3?(o4=l===n4)&&(u3=i4[(c3=i4[4])?5:(c3=3,3)],i4[4]=i4[5]=e):i4[0]<=d2&&((o4=r4<2&&d2<i4[1])?(c3=0,G.v=n4,G.n=i4[1]):d2<l&&(o4=r4<3||i4[0]>n4||n4>l)&&(i4[4]=r4,i4[5]=n4,G.n=l,c3=0))}if(o4||r4>1)return a;throw y=!0,n4}return function(o4,p2,l){if(f2>1)throw TypeError("Generator is already running");for(y&&p2===1&&d(p2,l),c3=p2,u3=l;(t=c3<2?e:u3)||!y;){i3||(c3?c3<3?(c3>1&&(G.n=-1),d(c3,u3)):G.n=u3:G.v=u3);try{if(f2=2,i3){if(c3||(o4="next"),t=i3[o4]){if(!(t=t.call(i3,u3)))throw TypeError("iterator result is not an object");if(!t.done)return t;u3=t.value,c3<2&&(c3=0)}else c3===1&&(t=i3.return)&&t.call(i3),c3<2&&(u3=TypeError("The iterator does not provide a '"+o4+"' method"),c3=1);i3=e}else if((t=(y=G.n<0)?u3:r3.call(n3,G))!==a)break}catch(t2){i3=e,c3=1,u3=t2}finally{f2=1}}return{value:t,done:y}}}(r2,o2,i2),!0),u2}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e2){return Object.setPrototypeOf?Object.setPrototypeOf(e2,GeneratorFunctionPrototype):(e2.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e2,o,"GeneratorFunction")),e2.prototype=Object.create(u),e2}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}_regeneratorDefine2=function(e2,r2,n2,t2){function o(r3,n3){_regeneratorDefine2(e2,r3,function(e3){return this._invoke(r3,n3,e3)})}r2?i?i(e2,r2,{value:n2,enumerable:!t2,configurable:!t2,writable:!t2}):e2[r2]=n2:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n2){return void e(n2)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n2){asyncGeneratorStep(a,r,o,_next,_throw,"next",n2)}function _throw(n2){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n2)}_next(void 0)})}}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(r,a){if(r){if(typeof r=="string")return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(a==null||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,l===0){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r2){o=!0,n=r2}finally{try{if(!f&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function __bitNormalizeId(id){return id?String(id).trim().replace(/^\/+|\/+$/g,""):""}function __bitActiveComponentId(){try{var hash=window.location.hash;if(!hash)return null;var _hash$slice$split=hash.slice(1).split("?"),_hash$slice$split2=_slicedToArray(_hash$slice$split,1),idPart=_hash$slice$split2[0],id=__bitNormalizeId(idPart),idWithoutVersion=id.split("@")[0];return idWithoutVersion||null}catch{return null}}var __bitActiveId=__bitActiveComponentId();function __bitShouldSurfaceFor(componentId){if(!__bitActiveId)return!1;var act=__bitNormalizeId(__bitActiveId),cmp=__bitNormalizeId(componentId);return!act||!cmp?!1:act===cmp}function __bitSurfaceToOverlay(err,componentId){return;var e,msg}function initializeModules(){return _initializeModules.apply(this,arguments)}function _initializeModules(){return _initializeModules=_asyncToGenerator(_regenerator().m(function _callee2(){return _regenerator().w(function(_context2){for(;;)switch(_context2.n){case 0:(0,_home_circleci_bvm_versions_2_0_35_bit_2_0_35_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__.uf)("compositions",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_139de64abf5d134f0b08ed2465dac768a4bea720_mjs__WEBPACK_IMPORTED_MODULE_1__.x},isSplitComponentBundle:!0,componentMap:{}});case 1:return _context2.a(2)}},_callee2)})),_initializeModules.apply(this,arguments)}(function(){var _initializeModulesOnLoad=_asyncToGenerator(_regenerator().m(function _callee(){return _regenerator().w(function(_context){for(;;)switch(_context.n){case 0:return _context.n=1,initializeModules();case 1:return _context.a(2)}},_callee)}));function initializeModulesOnLoad(){return _initializeModulesOnLoad.apply(this,arguments)}return initializeModulesOnLoad})()()}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[293,127,518],()=>__webpack_exec__(59331));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="peers.
|
|
2
|
+
try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="peers.93f3f914ac4cf19596fd.js"></script><script defer="defer" src="127.692a204f79deab30ab4d.js"></script><script defer="defer" src="preview-root.f3f3db9cdb2cd2181a15.js"></script><script defer="defer" src="293.da3d813735dfb0eb19fd.js"></script><script defer="defer" src="compositions.4eb504e6d746a04c0809.js"></script><link href="static/css/preview-root.94d1297b.css" rel="stylesheet"><link href="static/css/compositions.9d1b1166.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[542],{62047:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bvm_versions_2_0_35_bit_2_0_35_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(35530),_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_98cf30a024475b337e2db75aec661313311da841_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(35109);function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r2,n2,o2,i2){var c2=n2&&n2.prototype instanceof Generator?n2:Generator,u2=Object.create(c2.prototype);return _regeneratorDefine2(u2,"_invoke",function(r3,n3,o3){var i3,c3,u3,f2=0,p=o3||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t2,r4){return i3=t2,c3=0,u3=e,G.n=r4,a}};function d(r4,n4){for(c3=r4,u3=n4,t=0;!y&&f2&&!o4&&t<p.length;t++){var o4,i4=p[t],d2=G.p,l=i4[2];r4>3?(o4=l===n4)&&(u3=i4[(c3=i4[4])?5:(c3=3,3)],i4[4]=i4[5]=e):i4[0]<=d2&&((o4=r4<2&&d2<i4[1])?(c3=0,G.v=n4,G.n=i4[1]):d2<l&&(o4=r4<3||i4[0]>n4||n4>l)&&(i4[4]=r4,i4[5]=n4,G.n=l,c3=0))}if(o4||r4>1)return a;throw y=!0,n4}return function(o4,p2,l){if(f2>1)throw TypeError("Generator is already running");for(y&&p2===1&&d(p2,l),c3=p2,u3=l;(t=c3<2?e:u3)||!y;){i3||(c3?c3<3?(c3>1&&(G.n=-1),d(c3,u3)):G.n=u3:G.v=u3);try{if(f2=2,i3){if(c3||(o4="next"),t=i3[o4]){if(!(t=t.call(i3,u3)))throw TypeError("iterator result is not an object");if(!t.done)return t;u3=t.value,c3<2&&(c3=0)}else c3===1&&(t=i3.return)&&t.call(i3),c3<2&&(u3=TypeError("The iterator does not provide a '"+o4+"' method"),c3=1);i3=e}else if((t=(y=G.n<0)?u3:r3.call(n3,G))!==a)break}catch(t2){i3=e,c3=1,u3=t2}finally{f2=1}}return{value:t,done:y}}}(r2,o2,i2),!0),u2}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e2){return Object.setPrototypeOf?Object.setPrototypeOf(e2,GeneratorFunctionPrototype):(e2.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e2,o,"GeneratorFunction")),e2.prototype=Object.create(u),e2}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}_regeneratorDefine2=function(e2,r2,n2,t2){function o(r3,n3){_regeneratorDefine2(e2,r3,function(e3){return this._invoke(r3,n3,e3)})}r2?i?i(e2,r2,{value:n2,enumerable:!t2,configurable:!t2,writable:!t2}):e2[r2]=n2:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n2){return void e(n2)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n2){asyncGeneratorStep(a,r,o,_next,_throw,"next",n2)}function _throw(n2){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n2)}_next(void 0)})}}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(r,a){if(r){if(typeof r=="string")return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(a==null||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,l===0){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r2){o=!0,n=r2}finally{try{if(!f&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function __bitNormalizeId(id){return id?String(id).trim().replace(/^\/+|\/+$/g,""):""}function __bitActiveComponentId(){try{var hash=window.location.hash;if(!hash)return null;var _hash$slice$split=hash.slice(1).split("?"),_hash$slice$split2=_slicedToArray(_hash$slice$split,1),idPart=_hash$slice$split2[0],id=__bitNormalizeId(idPart),idWithoutVersion=id.split("@")[0];return idWithoutVersion||null}catch{return null}}var __bitActiveId=__bitActiveComponentId();function __bitShouldSurfaceFor(componentId){if(!__bitActiveId)return!1;var act=__bitNormalizeId(__bitActiveId),cmp=__bitNormalizeId(componentId);return!act||!cmp?!1:act===cmp}function __bitSurfaceToOverlay(err,componentId){return;var e,msg}function initializeModules(){return _initializeModules.apply(this,arguments)}function _initializeModules(){return _initializeModules=_asyncToGenerator(_regenerator().m(function _callee2(){return _regenerator().w(function(_context2){for(;;)switch(_context2.n){case 0:(0,_home_circleci_bvm_versions_2_0_35_bit_2_0_35_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__.uf)("overview",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_98cf30a024475b337e2db75aec661313311da841_mjs__WEBPACK_IMPORTED_MODULE_1__.x},isSplitComponentBundle:!0,componentMap:{}});case 1:return _context2.a(2)}},_callee2)})),_initializeModules.apply(this,arguments)}(function(){var _initializeModulesOnLoad=_asyncToGenerator(_regenerator().m(function _callee(){return _regenerator().w(function(_context){for(;;)switch(_context.n){case 0:return _context.n=1,initializeModules();case 1:return _context.a(2)}},_callee)}));function initializeModulesOnLoad(){return _initializeModulesOnLoad.apply(this,arguments)}return initializeModulesOnLoad})()()},94891:()=>{},91044:()=>{},38954:()=>{},71220:()=>{},38854:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[109,127,518,293,866],()=>__webpack_exec__(62047));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="peers.
|
|
2
|
+
try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="peers.93f3f914ac4cf19596fd.js"></script><script defer="defer" src="127.692a204f79deab30ab4d.js"></script><script defer="defer" src="preview-root.f3f3db9cdb2cd2181a15.js"></script><script defer="defer" src="293.da3d813735dfb0eb19fd.js"></script><script defer="defer" src="compositions.4eb504e6d746a04c0809.js"></script><script defer="defer" src="109.a42f7d4992c0f39ccbb2.js"></script><script defer="defer" src="overview.6be45cfd54b830952f60.js"></script><link href="static/css/preview-root.94d1297b.css" rel="stylesheet"><link href="static/css/compositions.9d1b1166.css" rel="stylesheet"><link href="static/css/109.f6350688.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
package/dist/mdx.detector.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { DependencyDetector, FileContext } from '@teambit/dependency-resolver';
|
|
2
2
|
import type { Logger } from '@teambit/logger';
|
|
3
|
-
/**
|
|
4
|
-
* Regex-based fallback for extracting import sources from MDX files.
|
|
5
|
-
* Used when compileSync fails due to MDX v3 syntax incompatibilities in user content
|
|
6
|
-
* (e.g. HTML comments, escaped characters, bare variable declarations, unclosed tags).
|
|
7
|
-
*
|
|
8
|
-
* Matches both standard imports (import x from "y") and side-effect imports (import "y").
|
|
9
|
-
*/
|
|
10
|
-
export declare function detectImportsWithRegex(source: string): string[];
|
|
11
3
|
export declare class MDXDependencyDetector implements DependencyDetector {
|
|
12
4
|
private supportedExtensions;
|
|
13
5
|
private logger?;
|
package/dist/mdx.detector.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MDXDependencyDetector = void 0;
|
|
7
|
-
exports.detectImportsWithRegex = detectImportsWithRegex;
|
|
8
7
|
function _mdx() {
|
|
9
8
|
const data = require("@mdx-js/mdx");
|
|
10
9
|
_mdx = function () {
|
|
@@ -19,6 +18,13 @@ function _mdxModules() {
|
|
|
19
18
|
};
|
|
20
19
|
return data;
|
|
21
20
|
}
|
|
21
|
+
function _mdxDepsDetectors() {
|
|
22
|
+
const data = require("@teambit/mdx.deps-detectors.detective-mdx");
|
|
23
|
+
_mdxDepsDetectors = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
22
28
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
29
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
30
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -44,62 +50,6 @@ function getDetectorMdxOptions() {
|
|
|
44
50
|
}
|
|
45
51
|
return _detectorMdxOptions;
|
|
46
52
|
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Regex pattern for matching import statements in JavaScript/TypeScript.
|
|
50
|
-
*
|
|
51
|
-
* Structure: /import\s+(?:PATTERN_A|PATTERN_B)/g
|
|
52
|
-
* - The `import\s+` prefix is OUTSIDE the alternation, so both patterns require the import keyword
|
|
53
|
-
*
|
|
54
|
-
* This regex matches two import patterns in an alternation:
|
|
55
|
-
*
|
|
56
|
-
* PATTERN_A (captured in group 1): [type] <specifiers> from "module"
|
|
57
|
-
* - Optional "type" keyword for TypeScript type imports
|
|
58
|
-
* - Specifiers can be: default (x), named ({x}), namespace (* as x), or mixed (x, {y})
|
|
59
|
-
* - Followed by the `from` keyword and quoted module path
|
|
60
|
-
* - Module path is captured in group 1
|
|
61
|
-
*
|
|
62
|
-
* PATTERN_B (captured in group 2): "module"
|
|
63
|
-
* - Side-effect only imports with no specifiers, just quoted module path
|
|
64
|
-
* - The quotes directly follow `import` with only whitespace in between
|
|
65
|
-
* - Module path is captured in group 2
|
|
66
|
-
* - Note: This will NOT match random quoted strings in code (e.g., const x = "foo")
|
|
67
|
-
* because the `import\s+` prefix is required
|
|
68
|
-
*
|
|
69
|
-
* Example matches:
|
|
70
|
-
* import x from "y" -> group 1: "y"
|
|
71
|
-
* import { x } from "y" -> group 1: "y"
|
|
72
|
-
* import * as x from "y" -> group 1: "y"
|
|
73
|
-
* import x, { y } from "z" -> group 1: "z"
|
|
74
|
-
* import type { T } from "y" -> group 1: "y"
|
|
75
|
-
* import "y" -> group 2: "y"
|
|
76
|
-
*
|
|
77
|
-
* Limitations:
|
|
78
|
-
* - Will match imports in comments (e.g., // import "x")
|
|
79
|
-
* - Will match imports in code blocks/strings if they appear to be syntactically valid
|
|
80
|
-
* - These are acceptable trade-offs for the fallback mode
|
|
81
|
-
*/
|
|
82
|
-
const IMPORT_STATEMENT_REGEX = /import\s+(?:(?:type\s+)?(?:\{[^}]*\}|\*\s+as\s+\w+|\w+)(?:\s*,\s*\{[^}]*\}|\s*,\s*\w+)?\s+from\s+['"]([^'"]+)['"]|['"]([^'"]+)['"])/g;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Regex-based fallback for extracting import sources from MDX files.
|
|
86
|
-
* Used when compileSync fails due to MDX v3 syntax incompatibilities in user content
|
|
87
|
-
* (e.g. HTML comments, escaped characters, bare variable declarations, unclosed tags).
|
|
88
|
-
*
|
|
89
|
-
* Matches both standard imports (import x from "y") and side-effect imports (import "y").
|
|
90
|
-
*/
|
|
91
|
-
function detectImportsWithRegex(source) {
|
|
92
|
-
const modules = [];
|
|
93
|
-
let match;
|
|
94
|
-
// Reset regex state before use
|
|
95
|
-
IMPORT_STATEMENT_REGEX.lastIndex = 0;
|
|
96
|
-
while ((match = IMPORT_STATEMENT_REGEX.exec(source)) !== null) {
|
|
97
|
-
// Use whichever capture group matched (group 1 for "from" imports, group 2 for side-effect imports)
|
|
98
|
-
const moduleName = match[1] || match[2];
|
|
99
|
-
if (moduleName) modules.push(moduleName);
|
|
100
|
-
}
|
|
101
|
-
return modules;
|
|
102
|
-
}
|
|
103
53
|
class MDXDependencyDetector {
|
|
104
54
|
constructor(supportedExtensions, logger) {
|
|
105
55
|
this.supportedExtensions = supportedExtensions;
|
|
@@ -131,7 +81,7 @@ class MDXDependencyDetector {
|
|
|
131
81
|
const fileRef = filename ? ` File: ${filename}` : '';
|
|
132
82
|
const msg = `MDX compilation failed, falling back to regex-based import detection.${fileRef} Error: ${err.message}`;
|
|
133
83
|
(_this$logger = this.logger) === null || _this$logger === void 0 || _this$logger.consoleWarning(msg);
|
|
134
|
-
return
|
|
84
|
+
return (0, _mdxDepsDetectors().detective)(source);
|
|
135
85
|
}
|
|
136
86
|
}
|
|
137
87
|
}
|
package/dist/mdx.detector.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mdx","data","require","_mdxModules","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","_detectorMdxOptions","getDetectorMdxOptions","mdxOptions","remarkPlugins","jsxImportSource","IMPORT_STATEMENT_REGEX","detectImportsWithRegex","source","modules","match","lastIndex","exec","moduleName","MDXDependencyDetector","constructor","supportedExtensions","logger","detect","bind","isSupported","context","currentFilename","filename","includes","ext","_output$data","output","compileSync","imports","map","importSpec","fromModule","err","_this$logger","fileRef","msg","message","consoleWarning","exports"],"sources":["mdx.detector.ts"],"sourcesContent":["import type { DependencyDetector, FileContext } from '@teambit/dependency-resolver';\nimport { compileSync } from '@mdx-js/mdx';\nimport { mdxOptions } from '@teambit/mdx.modules.mdx-v3-options';\nimport type { Logger } from '@teambit/logger';\n\ntype ImportSpecifier = {\n /**\n * relative/absolute or module name. e.g. the `y` in the example of `import x from 'y';`\n */\n fromModule: string;\n\n /**\n * is default import (e.g. `import x from 'y';`)\n */\n isDefault?: boolean;\n\n /**\n * the name used to identify the module, e.g. the `x` in the example of `import x from 'y';`\n */\n identifier?: string;\n};\n\n/**\n * MDX options for dependency detection only.\n * Uses the remark plugins from mdxOptions (for frontmatter and import extraction)\n * but excludes rehype plugins like rehypeMdxCodeProps that fail on legacy\n * code fence meta syntax (e.g. `live=true`).\n *\n * Computed lazily to avoid triggering the mdx-v3-options dependency chain\n * (~180 files) during bootstrap for commands that don't need MDX processing.\n */\nlet _detectorMdxOptions: Record<string, any> | undefined;\nfunction getDetectorMdxOptions() {\n if (!_detectorMdxOptions) {\n _detectorMdxOptions = {\n ...(mdxOptions.remarkPlugins && { remarkPlugins: mdxOptions.remarkPlugins }),\n ...(mdxOptions.jsxImportSource && { jsxImportSource: mdxOptions.jsxImportSource }),\n };\n }\n return _detectorMdxOptions;\n}\n\n/**\n * Regex pattern for matching import statements in JavaScript/TypeScript.\n *\n * Structure: /import\\s+(?:PATTERN_A|PATTERN_B)/g\n * - The `import\\s+` prefix is OUTSIDE the alternation, so both patterns require the import keyword\n *\n * This regex matches two import patterns in an alternation:\n *\n * PATTERN_A (captured in group 1): [type] <specifiers> from \"module\"\n * - Optional \"type\" keyword for TypeScript type imports\n * - Specifiers can be: default (x), named ({x}), namespace (* as x), or mixed (x, {y})\n * - Followed by the `from` keyword and quoted module path\n * - Module path is captured in group 1\n *\n * PATTERN_B (captured in group 2): \"module\"\n * - Side-effect only imports with no specifiers, just quoted module path\n * - The quotes directly follow `import` with only whitespace in between\n * - Module path is captured in group 2\n * - Note: This will NOT match random quoted strings in code (e.g., const x = \"foo\")\n * because the `import\\s+` prefix is required\n *\n * Example matches:\n * import x from \"y\" -> group 1: \"y\"\n * import { x } from \"y\" -> group 1: \"y\"\n * import * as x from \"y\" -> group 1: \"y\"\n * import x, { y } from \"z\" -> group 1: \"z\"\n * import type { T } from \"y\" -> group 1: \"y\"\n * import \"y\" -> group 2: \"y\"\n *\n * Limitations:\n * - Will match imports in comments (e.g., // import \"x\")\n * - Will match imports in code blocks/strings if they appear to be syntactically valid\n * - These are acceptable trade-offs for the fallback mode\n */\nconst IMPORT_STATEMENT_REGEX =\n /import\\s+(?:(?:type\\s+)?(?:\\{[^}]*\\}|\\*\\s+as\\s+\\w+|\\w+)(?:\\s*,\\s*\\{[^}]*\\}|\\s*,\\s*\\w+)?\\s+from\\s+['\"]([^'\"]+)['\"]|['\"]([^'\"]+)['\"])/g;\n\n/**\n * Regex-based fallback for extracting import sources from MDX files.\n * Used when compileSync fails due to MDX v3 syntax incompatibilities in user content\n * (e.g. HTML comments, escaped characters, bare variable declarations, unclosed tags).\n *\n * Matches both standard imports (import x from \"y\") and side-effect imports (import \"y\").\n */\nexport function detectImportsWithRegex(source: string): string[] {\n const modules: string[] = [];\n let match: RegExpExecArray | null;\n // Reset regex state before use\n IMPORT_STATEMENT_REGEX.lastIndex = 0;\n while ((match = IMPORT_STATEMENT_REGEX.exec(source)) !== null) {\n // Use whichever capture group matched (group 1 for \"from\" imports, group 2 for side-effect imports)\n const moduleName = match[1] || match[2];\n if (moduleName) modules.push(moduleName);\n }\n return modules;\n}\n\nexport class MDXDependencyDetector implements DependencyDetector {\n private logger?: Logger;\n private currentFilename?: string;\n\n constructor(\n private supportedExtensions: string[],\n logger?: Logger\n ) {\n this.logger = logger;\n // Bind detect to preserve `this` context when passed as a detached function.\n this.detect = this.detect.bind(this);\n }\n\n isSupported(context: FileContext): boolean {\n // Capture filename for use in detect() warning messages.\n // isSupported is always called immediately before detect() for the same file.\n this.currentFilename = context.filename;\n return this.supportedExtensions.includes(context.ext);\n }\n\n detect(source: string): string[] {\n const filename = this.currentFilename;\n try {\n const output = compileSync(source, getDetectorMdxOptions());\n const imports = (output.data?.imports as ImportSpecifier[]) || [];\n if (!imports.length) return [];\n return imports.map((importSpec) => importSpec.fromModule);\n } catch (err: any) {\n // MDX v3 may fail to compile files with legacy syntax (HTML comments, escaped\n // characters in prose, bare variable declarations, unclosed tags, etc.).\n // Fall back to regex-based import detection which is sufficient for dependency resolution.\n const fileRef = filename ? ` File: ${filename}` : '';\n const msg = `MDX compilation failed, falling back to regex-based import detection.${fileRef} Error: ${err.message}`;\n this.logger?.consoleWarning(msg);\n return detectImportsWithRegex(source);\n }\n }\n}\n"],"mappings":";;;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OA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AAEC,UAAU,IAAKA,UAAU,CAACC,UAAU,CAAC;IAC3D,CAAC,CAAC,OAAOC,GAAQ,EAAE;MAAA,IAAAC,YAAA;MACjB;MACA;MACA;MACA,MAAMC,OAAO,GAAGZ,QAAQ,GAAG,UAAUA,QAAQ,EAAE,GAAG,EAAE;MACpD,MAAMa,GAAG,GAAG,wEAAwED,OAAO,WAAWF,GAAG,CAACI,OAAO,EAAE;MACnH,CAAAH,YAAA,OAAI,CAACjB,MAAM,cAAAiB,YAAA,eAAXA,YAAA,CAAaI,cAAc,CAACF,GAAG,CAAC;MAChC,OAAO7B,sBAAsB,CAACC,MAAM,CAAC;IACvC;EACF;AACF;AAAC+B,OAAA,CAAAzB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_mdx","data","require","_mdxModules","_mdxDepsDetectors","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","_detectorMdxOptions","getDetectorMdxOptions","mdxOptions","remarkPlugins","jsxImportSource","MDXDependencyDetector","constructor","supportedExtensions","logger","detect","bind","isSupported","context","currentFilename","filename","includes","ext","source","_output$data","output","compileSync","imports","map","importSpec","fromModule","err","_this$logger","fileRef","msg","message","consoleWarning","detectImportsWithRegex","exports"],"sources":["mdx.detector.ts"],"sourcesContent":["import type { DependencyDetector, FileContext } from '@teambit/dependency-resolver';\nimport { compileSync } from '@mdx-js/mdx';\nimport { mdxOptions } from '@teambit/mdx.modules.mdx-v3-options';\nimport { detective as detectImportsWithRegex } from '@teambit/mdx.deps-detectors.detective-mdx';\nimport type { Logger } from '@teambit/logger';\n\ntype ImportSpecifier = {\n /**\n * relative/absolute or module name. e.g. the `y` in the example of `import x from 'y';`\n */\n fromModule: string;\n\n /**\n * is default import (e.g. `import x from 'y';`)\n */\n isDefault?: boolean;\n\n /**\n * the name used to identify the module, e.g. the `x` in the example of `import x from 'y';`\n */\n identifier?: string;\n};\n\n/**\n * MDX options for dependency detection only.\n * Uses the remark plugins from mdxOptions (for frontmatter and import extraction)\n * but excludes rehype plugins like rehypeMdxCodeProps that fail on legacy\n * code fence meta syntax (e.g. `live=true`).\n *\n * Computed lazily to avoid triggering the mdx-v3-options dependency chain\n * (~180 files) during bootstrap for commands that don't need MDX processing.\n */\nlet _detectorMdxOptions: Record<string, any> | undefined;\nfunction getDetectorMdxOptions() {\n if (!_detectorMdxOptions) {\n _detectorMdxOptions = {\n ...(mdxOptions.remarkPlugins && { remarkPlugins: mdxOptions.remarkPlugins }),\n ...(mdxOptions.jsxImportSource && { jsxImportSource: mdxOptions.jsxImportSource }),\n };\n }\n return _detectorMdxOptions;\n}\n\nexport class MDXDependencyDetector implements DependencyDetector {\n private logger?: Logger;\n private currentFilename?: string;\n\n constructor(\n private supportedExtensions: string[],\n logger?: Logger\n ) {\n this.logger = logger;\n // Bind detect to preserve `this` context when passed as a detached function.\n this.detect = this.detect.bind(this);\n }\n\n isSupported(context: FileContext): boolean {\n // Capture filename for use in detect() warning messages.\n // isSupported is always called immediately before detect() for the same file.\n this.currentFilename = context.filename;\n return this.supportedExtensions.includes(context.ext);\n }\n\n detect(source: string): string[] {\n const filename = this.currentFilename;\n try {\n const output = compileSync(source, getDetectorMdxOptions());\n const imports = (output.data?.imports as ImportSpecifier[]) || [];\n if (!imports.length) return [];\n return imports.map((importSpec) => importSpec.fromModule);\n } catch (err: any) {\n // MDX v3 may fail to compile files with legacy syntax (HTML comments, escaped\n // characters in prose, bare variable declarations, unclosed tags, etc.).\n // Fall back to regex-based import detection which is sufficient for dependency resolution.\n const fileRef = filename ? ` File: ${filename}` : '';\n const msg = `MDX compilation failed, falling back to regex-based import detection.${fileRef} Error: ${err.message}`;\n this.logger?.consoleWarning(msg);\n return detectImportsWithRegex(source);\n }\n }\n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cAAc,CAACF,GAAG,CAAC;MAChC,OAAO,IAAAG,6BAAsB,EAACd,MAAM,CAAC;IACvC;EACF;AACF;AAACe,OAAA,CAAA3B,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -143,117 +143,5 @@ Here's some text with \\escaped\\characters that MDX v3 doesn't like
|
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
145
|
});
|
|
146
|
-
describe('detectImportsWithRegex', () => {
|
|
147
|
-
it('should detect default import', () => {
|
|
148
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)('import x from "y";')).to.deep.equal(['y']);
|
|
149
|
-
});
|
|
150
|
-
it('should detect star import', () => {
|
|
151
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)('import * as y from "y";')).to.deep.equal(['y']);
|
|
152
|
-
});
|
|
153
|
-
it('should detect named import', () => {
|
|
154
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)('import { x } from "y";')).to.deep.equal(['y']);
|
|
155
|
-
});
|
|
156
|
-
it('should detect side-effect import', () => {
|
|
157
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)('import "y";')).to.deep.equal(['y']);
|
|
158
|
-
});
|
|
159
|
-
it('should detect multiple imports', () => {
|
|
160
|
-
const src = `
|
|
161
|
-
import React from 'react';
|
|
162
|
-
import { Button } from '@teambit/design.ui.button';
|
|
163
|
-
import * as utils from './utils';
|
|
164
|
-
`;
|
|
165
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(src)).to.deep.equal(['react', '@teambit/design.ui.button', './utils']);
|
|
166
|
-
});
|
|
167
|
-
it('should detect imports with single quotes', () => {
|
|
168
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(`import x from 'single-quotes';`)).to.deep.equal(['single-quotes']);
|
|
169
|
-
});
|
|
170
|
-
it('should detect imports with double quotes', () => {
|
|
171
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(`import x from "double-quotes";`)).to.deep.equal(['double-quotes']);
|
|
172
|
-
});
|
|
173
|
-
it('should detect imports with mixed quote styles', () => {
|
|
174
|
-
const src = `
|
|
175
|
-
import a from 'single';
|
|
176
|
-
import b from "double";
|
|
177
|
-
`;
|
|
178
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(src)).to.deep.equal(['single', 'double']);
|
|
179
|
-
});
|
|
180
|
-
it('should detect TypeScript type imports', () => {
|
|
181
|
-
const src = `
|
|
182
|
-
import type { MyType } from 'my-types';
|
|
183
|
-
import { Component } from 'my-component';
|
|
184
|
-
`;
|
|
185
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(src)).to.deep.equal(['my-types', 'my-component']);
|
|
186
|
-
});
|
|
187
|
-
it('should detect default and named imports combined', () => {
|
|
188
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(`import React, { useState } from 'react';`)).to.deep.equal(['react']);
|
|
189
|
-
});
|
|
190
|
-
it('should detect imports with multiple named imports', () => {
|
|
191
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(`import { foo, bar, baz } from 'multi-named';`)).to.deep.equal(['multi-named']);
|
|
192
|
-
});
|
|
193
|
-
it('should detect side-effect only imports', () => {
|
|
194
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(`import 'side-effect';`)).to.deep.equal(['side-effect']);
|
|
195
|
-
});
|
|
196
|
-
it('should detect scoped package imports', () => {
|
|
197
|
-
const src = `
|
|
198
|
-
import { Button } from '@scope/package';
|
|
199
|
-
import Utils from '@company/utils';
|
|
200
|
-
`;
|
|
201
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(src)).to.deep.equal(['@scope/package', '@company/utils']);
|
|
202
|
-
});
|
|
203
|
-
it('should detect relative path imports', () => {
|
|
204
|
-
const src = `
|
|
205
|
-
import Local from './local';
|
|
206
|
-
import Parent from '../parent';
|
|
207
|
-
import Deep from '../../deep/path';
|
|
208
|
-
`;
|
|
209
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(src)).to.deep.equal(['./local', '../parent', '../../deep/path']);
|
|
210
|
-
});
|
|
211
|
-
it('should handle imports with extra whitespace', () => {
|
|
212
|
-
const src = `
|
|
213
|
-
import { foo , bar } from 'whitespace' ;
|
|
214
|
-
import * as util from 'util' ;
|
|
215
|
-
`;
|
|
216
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(src)).to.deep.equal(['whitespace', 'util']);
|
|
217
|
-
});
|
|
218
|
-
it('should detect imports mixed with complex MDX content', () => {
|
|
219
|
-
const src = `
|
|
220
|
-
import React from 'react';
|
|
221
|
-
import { Button } from '@teambit/design.ui.button';
|
|
222
|
-
|
|
223
|
-
<!-- HTML comment -->
|
|
224
|
-
# Title
|
|
225
|
-
|
|
226
|
-
Some text with \\escaped characters
|
|
227
|
-
|
|
228
|
-
<Button>Click me</Button>
|
|
229
|
-
`;
|
|
230
|
-
const detected = (0, _mdx2().detectImportsWithRegex)(src);
|
|
231
|
-
(0, _chai().expect)(detected).to.include('react');
|
|
232
|
-
(0, _chai().expect)(detected).to.include('@teambit/design.ui.button');
|
|
233
|
-
});
|
|
234
|
-
it('should match imports in code blocks (known limitation)', () => {
|
|
235
|
-
const src = `
|
|
236
|
-
import React from 'react';
|
|
237
|
-
|
|
238
|
-
\`\`\`jsx
|
|
239
|
-
import Example from 'example-in-code-block';
|
|
240
|
-
\`\`\`
|
|
241
|
-
`;
|
|
242
|
-
const detected = (0, _mdx2().detectImportsWithRegex)(src);
|
|
243
|
-
(0, _chai().expect)(detected).to.include('react');
|
|
244
|
-
(0, _chai().expect)(detected).to.include('example-in-code-block');
|
|
245
|
-
});
|
|
246
|
-
it('should return empty array for file with no imports', () => {
|
|
247
|
-
const src = `
|
|
248
|
-
# Just a title
|
|
249
|
-
|
|
250
|
-
Some content without any imports.
|
|
251
|
-
`;
|
|
252
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)(src)).to.deep.equal([]);
|
|
253
|
-
});
|
|
254
|
-
it('should return empty array for empty file', () => {
|
|
255
|
-
(0, _chai().expect)((0, _mdx2().detectImportsWithRegex)('')).to.deep.equal([]);
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
146
|
|
|
259
147
|
//# sourceMappingURL=mdx.detector.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chai","data","require","_mdx","_mdx2","jest","mock","compileSync","fn","mdxOptions","remarkPlugins","jsxImportSource","mockCompileSync","describe","beforeEach","mockReset","it","mockReturnValue","imports","fromModule","detector","MDXDependencyDetector","expect","detect","to","deep","equal","calls","length","mockImplementation","Error","src","isSupported","ext","filename","be","true","false","detectImportsWithRegex","detected","include"],"sources":["mdx.detector.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport { compileSync } from '@mdx-js/mdx';\n\n// Mock @mdx-js/mdx and @teambit/mdx.modules.mdx-v3-options to avoid loading ESM-only\n// modules (100+ packages in the unified/remark/rehype ecosystem) that Jest cannot\n// handle in CJS mode due to missing require export conditions and ESM syntax.\njest.mock('@mdx-js/mdx', () => ({\n compileSync: jest.fn(),\n}));\njest.mock('@teambit/mdx.modules.mdx-v3-options', () => ({\n mdxOptions: { remarkPlugins: [], jsxImportSource: 'react' },\n}));\n\nconst mockCompileSync = compileSync as jest.Mock;\n\nimport { MDXDependencyDetector, detectImportsWithRegex } from './mdx.detector';\n\ndescribe('MDXDependencyDetector', () => {\n beforeEach(() => {\n mockCompileSync.mockReset();\n });\n\n describe('detect - compileSync path', () => {\n it('should return modules from compileSync imports data', () => {\n mockCompileSync.mockReturnValue({\n data: { imports: [{ fromModule: 'react' }, { fromModule: '@teambit/design.ui.button' }] },\n });\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect('any source')).to.deep.equal(['react', '@teambit/design.ui.button']);\n });\n\n it('should return empty array when compileSync returns no imports', () => {\n mockCompileSync.mockReturnValue({ data: { imports: [] } });\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect('# Just markdown')).to.deep.equal([]);\n });\n\n it('should return empty array when imports data is undefined', () => {\n mockCompileSync.mockReturnValue({ data: {} });\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect('# No imports')).to.deep.equal([]);\n });\n\n it('should pass source and options to compileSync', () => {\n mockCompileSync.mockReturnValue({ data: { imports: [] } });\n const detector = new MDXDependencyDetector(['mdx']);\n detector.detect('test source');\n expect(mockCompileSync.mock.calls.length).to.equal(1);\n expect(mockCompileSync.mock.calls[0][0]).to.equal('test source');\n });\n });\n\n describe('detect - regex fallback on compileSync failure', () => {\n beforeEach(() => {\n mockCompileSync.mockImplementation(() => {\n throw new Error('MDX compilation failed');\n });\n });\n\n it('should fallback to regex when compileSync throws', () => {\n const src = `import React from 'react';`;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['react']);\n });\n\n it('should detect imports when MDX contains HTML comments', () => {\n const src = `\nimport React from 'react';\nimport { Button } from '@teambit/base-ui.inputs.button';\n\n<!-- This is an HTML comment that breaks MDX v3 -->\n# Hello World\n `;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['react', '@teambit/base-ui.inputs.button']);\n });\n\n it('should detect imports when MDX contains unclosed tags', () => {\n const src = `\nimport { Card } from '@teambit/design.ui.card';\n\n<div>\n# Content\n `;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['@teambit/design.ui.card']);\n });\n\n it('should detect imports when MDX contains escaped characters', () => {\n const src = `\nimport Component from './component';\n\nHere's some text with \\\\escaped\\\\characters that MDX v3 doesn't like\n `;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['./component']);\n });\n });\n\n describe('isSupported', () => {\n it('should return true for supported extensions', () => {\n const detector = new MDXDependencyDetector(['mdx', 'md']);\n expect(detector.isSupported({ ext: 'mdx', filename: 'test.mdx' } as any)).to.be.true;\n expect(detector.isSupported({ ext: 'md', filename: 'test.md' } as any)).to.be.true;\n });\n\n it('should return false for unsupported extensions', () => {\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.isSupported({ ext: 'ts', filename: 'test.ts' } as any)).to.be.false;\n });\n });\n});\n\ndescribe('detectImportsWithRegex', () => {\n it('should detect default import', () => {\n expect(detectImportsWithRegex('import x from \"y\";')).to.deep.equal(['y']);\n });\n\n it('should detect star import', () => {\n expect(detectImportsWithRegex('import * as y from \"y\";')).to.deep.equal(['y']);\n });\n\n it('should detect named import', () => {\n expect(detectImportsWithRegex('import { x } from \"y\";')).to.deep.equal(['y']);\n });\n\n it('should detect side-effect import', () => {\n expect(detectImportsWithRegex('import \"y\";')).to.deep.equal(['y']);\n });\n\n it('should detect multiple imports', () => {\n const src = `\nimport React from 'react';\nimport { Button } from '@teambit/design.ui.button';\nimport * as utils from './utils';\n `;\n expect(detectImportsWithRegex(src)).to.deep.equal(['react', '@teambit/design.ui.button', './utils']);\n });\n\n it('should detect imports with single quotes', () => {\n expect(detectImportsWithRegex(`import x from 'single-quotes';`)).to.deep.equal(['single-quotes']);\n });\n\n it('should detect imports with double quotes', () => {\n expect(detectImportsWithRegex(`import x from \"double-quotes\";`)).to.deep.equal(['double-quotes']);\n });\n\n it('should detect imports with mixed quote styles', () => {\n const src = `\nimport a from 'single';\nimport b from \"double\";\n `;\n expect(detectImportsWithRegex(src)).to.deep.equal(['single', 'double']);\n });\n\n it('should detect TypeScript type imports', () => {\n const src = `\nimport type { MyType } from 'my-types';\nimport { Component } from 'my-component';\n `;\n expect(detectImportsWithRegex(src)).to.deep.equal(['my-types', 'my-component']);\n });\n\n it('should detect default and named imports combined', () => {\n expect(detectImportsWithRegex(`import React, { useState } from 'react';`)).to.deep.equal(['react']);\n });\n\n it('should detect imports with multiple named imports', () => {\n expect(detectImportsWithRegex(`import { foo, bar, baz } from 'multi-named';`)).to.deep.equal(['multi-named']);\n });\n\n it('should detect side-effect only imports', () => {\n expect(detectImportsWithRegex(`import 'side-effect';`)).to.deep.equal(['side-effect']);\n });\n\n it('should detect scoped package imports', () => {\n const src = `\nimport { Button } from '@scope/package';\nimport Utils from '@company/utils';\n `;\n expect(detectImportsWithRegex(src)).to.deep.equal(['@scope/package', '@company/utils']);\n });\n\n it('should detect relative path imports', () => {\n const src = `\nimport Local from './local';\nimport Parent from '../parent';\nimport Deep from '../../deep/path';\n `;\n expect(detectImportsWithRegex(src)).to.deep.equal(['./local', '../parent', '../../deep/path']);\n });\n\n it('should handle imports with extra whitespace', () => {\n const src = `\nimport { foo , bar } from 'whitespace' ;\nimport * as util from 'util' ;\n `;\n expect(detectImportsWithRegex(src)).to.deep.equal(['whitespace', 'util']);\n });\n\n it('should detect imports mixed with complex MDX content', () => {\n const src = `\nimport React from 'react';\nimport { Button } from '@teambit/design.ui.button';\n\n<!-- HTML comment -->\n# Title\n\nSome text with \\\\escaped characters\n\n<Button>Click me</Button>\n `;\n const detected = detectImportsWithRegex(src);\n expect(detected).to.include('react');\n expect(detected).to.include('@teambit/design.ui.button');\n });\n\n it('should match imports in code blocks (known limitation)', () => {\n const src = `\nimport React from 'react';\n\n\\`\\`\\`jsx\nimport Example from 'example-in-code-block';\n\\`\\`\\`\n `;\n const detected = detectImportsWithRegex(src);\n expect(detected).to.include('react');\n expect(detected).to.include('example-in-code-block');\n });\n\n it('should return empty array for file with no imports', () => {\n const src = `\n# Just a title\n\nSome content without any imports.\n `;\n expect(detectImportsWithRegex(src)).to.deep.equal([]);\n });\n\n it('should return empty array for empty file', () => {\n expect(detectImportsWithRegex('')).to.deep.equal([]);\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;A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AC,uBAAuB,CAAC;EACtD,CAAC,CAAC;EAEFxB,EAAE,CAAC,oDAAoD,EAAE,MAAM;IAC7D,MAAMe,GAAG,GAAG;AAChB;AACA;AACA;AACA,KAAK;IACD,IAAAT,cAAM,EAAC,IAAAgB,8BAAsB,EAACP,GAAG,CAAC,CAAC,CAACP,EAAE,CAACC,IAAI,CAACC,KAAK,CAAC,EAAE,CAAC;EACvD,CAAC,CAAC;EAEFV,EAAE,CAAC,0CAA0C,EAAE,MAAM;IACnD,IAAAM,cAAM,EAAC,IAAAgB,8BAAsB,EAAC,EAAE,CAAC,CAAC,CAACd,EAAE,CAACC,IAAI,CAACC,KAAK,CAAC,EAAE,CAAC;EACtD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chai","data","require","_mdx","_mdx2","jest","mock","compileSync","fn","mdxOptions","remarkPlugins","jsxImportSource","mockCompileSync","describe","beforeEach","mockReset","it","mockReturnValue","imports","fromModule","detector","MDXDependencyDetector","expect","detect","to","deep","equal","calls","length","mockImplementation","Error","src","isSupported","ext","filename","be","true","false"],"sources":["mdx.detector.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport { compileSync } from '@mdx-js/mdx';\n\n// Mock @mdx-js/mdx and @teambit/mdx.modules.mdx-v3-options to avoid loading ESM-only\n// modules (100+ packages in the unified/remark/rehype ecosystem) that Jest cannot\n// handle in CJS mode due to missing require export conditions and ESM syntax.\njest.mock('@mdx-js/mdx', () => ({\n compileSync: jest.fn(),\n}));\njest.mock('@teambit/mdx.modules.mdx-v3-options', () => ({\n mdxOptions: { remarkPlugins: [], jsxImportSource: 'react' },\n}));\n\nconst mockCompileSync = compileSync as jest.Mock;\n\nimport { MDXDependencyDetector } from './mdx.detector';\n\ndescribe('MDXDependencyDetector', () => {\n beforeEach(() => {\n mockCompileSync.mockReset();\n });\n\n describe('detect - compileSync path', () => {\n it('should return modules from compileSync imports data', () => {\n mockCompileSync.mockReturnValue({\n data: { imports: [{ fromModule: 'react' }, { fromModule: '@teambit/design.ui.button' }] },\n });\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect('any source')).to.deep.equal(['react', '@teambit/design.ui.button']);\n });\n\n it('should return empty array when compileSync returns no imports', () => {\n mockCompileSync.mockReturnValue({ data: { imports: [] } });\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect('# Just markdown')).to.deep.equal([]);\n });\n\n it('should return empty array when imports data is undefined', () => {\n mockCompileSync.mockReturnValue({ data: {} });\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect('# No imports')).to.deep.equal([]);\n });\n\n it('should pass source and options to compileSync', () => {\n mockCompileSync.mockReturnValue({ data: { imports: [] } });\n const detector = new MDXDependencyDetector(['mdx']);\n detector.detect('test source');\n expect(mockCompileSync.mock.calls.length).to.equal(1);\n expect(mockCompileSync.mock.calls[0][0]).to.equal('test source');\n });\n });\n\n describe('detect - regex fallback on compileSync failure', () => {\n beforeEach(() => {\n mockCompileSync.mockImplementation(() => {\n throw new Error('MDX compilation failed');\n });\n });\n\n it('should fallback to regex when compileSync throws', () => {\n const src = `import React from 'react';`;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['react']);\n });\n\n it('should detect imports when MDX contains HTML comments', () => {\n const src = `\nimport React from 'react';\nimport { Button } from '@teambit/base-ui.inputs.button';\n\n<!-- This is an HTML comment that breaks MDX v3 -->\n# Hello World\n `;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['react', '@teambit/base-ui.inputs.button']);\n });\n\n it('should detect imports when MDX contains unclosed tags', () => {\n const src = `\nimport { Card } from '@teambit/design.ui.card';\n\n<div>\n# Content\n `;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['@teambit/design.ui.card']);\n });\n\n it('should detect imports when MDX contains escaped characters', () => {\n const src = `\nimport Component from './component';\n\nHere's some text with \\\\escaped\\\\characters that MDX v3 doesn't like\n `;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['./component']);\n });\n });\n\n describe('isSupported', () => {\n it('should return true for supported extensions', () => {\n const detector = new MDXDependencyDetector(['mdx', 'md']);\n expect(detector.isSupported({ ext: 'mdx', filename: 'test.mdx' } as any)).to.be.true;\n expect(detector.isSupported({ ext: 'md', filename: 'test.md' } as any)).to.be.true;\n });\n\n it('should return false for unsupported extensions', () => {\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.isSupported({ ext: 'ts', filename: 'test.ts' } as any)).to.be.false;\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;AAcA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAZA;AACA;AACA;AACAI,IAAI,CAACC,IAAI,CAAC,aAAa,EAAE,OAAO;EAC9BC,WAAW,EAAEF,IAAI,CAACG,EAAE,CAAC;AACvB,CAAC,CAAC,CAAC;AACHH,IAAI,CAACC,IAAI,CAAC,qCAAqC,EAAE,OAAO;EACtDG,UAAU,EAAE;IAAEC,aAAa,EAAE,EAAE;IAAEC,eAAe,EAAE;EAAQ;AAC5D,CAAC,CAAC,CAAC;AAEH,MAAMC,eAAe,GAAGL,kBAAwB;AAIhDM,QAAQ,CAAC,uBAAuB,EAAE,MAAM;EACtCC,UAAU,CAAC,MAAM;IACfF,eAAe,CAACG,SAAS,CAAC,CAAC;EAC7B,CAAC,CAAC;EAEFF,QAAQ,CA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CAAC,CAAC;IAEFpB,EAAE,CAAC,gDAAgD,EAAE,MAAM;MACzD,MAAMI,QAAQ,GAAG,KAAIC,6BAAqB,EAAC,CAAC,KAAK,CAAC,CAAC;MACnD,IAAAC,cAAM,EAACF,QAAQ,CAACY,WAAW,CAAC;QAAEC,GAAG,EAAE,IAAI;QAAEC,QAAQ,EAAE;MAAU,CAAQ,CAAC,CAAC,CAACV,EAAE,CAACW,EAAE,CAACE,KAAK;IACrF,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.1073/dist/mdx.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.1073/dist/mdx.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/mdx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1073",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/mdx/mdx",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.mdx",
|
|
8
8
|
"name": "mdx",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.1073"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@mdx-js/mdx": "^3.1.1",
|
|
@@ -25,16 +25,17 @@
|
|
|
25
25
|
"@teambit/worker": "0.0.1657",
|
|
26
26
|
"@teambit/mdx.generator.mdx-templates": "1.0.14",
|
|
27
27
|
"@teambit/design.ui.empty-box": "0.0.364",
|
|
28
|
-
"@teambit/dependency-resolver": "1.0.
|
|
29
|
-
"@teambit/
|
|
30
|
-
"@teambit/
|
|
31
|
-
"@teambit/
|
|
32
|
-
"@teambit/
|
|
33
|
-
"@teambit/
|
|
34
|
-
"@teambit/
|
|
35
|
-
"@teambit/
|
|
36
|
-
"@teambit/
|
|
37
|
-
"@teambit/
|
|
28
|
+
"@teambit/dependency-resolver": "1.0.1072",
|
|
29
|
+
"@teambit/mdx.deps-detectors.detective-mdx": "0.0.1",
|
|
30
|
+
"@teambit/docs": "1.0.1072",
|
|
31
|
+
"@teambit/builder": "1.0.1072",
|
|
32
|
+
"@teambit/compiler": "1.0.1072",
|
|
33
|
+
"@teambit/envs": "1.0.1072",
|
|
34
|
+
"@teambit/react": "1.0.1072",
|
|
35
|
+
"@teambit/generator": "1.0.1073",
|
|
36
|
+
"@teambit/compositions": "1.0.1072",
|
|
37
|
+
"@teambit/tester": "1.0.1072",
|
|
38
|
+
"@teambit/ui": "1.0.1072"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@types/react": "^19.0.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[542],{8564:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bvm_versions_2_0_35_bit_2_0_35_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(35530),_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_98cf30a024475b337e2db75aec661313311da841_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(35109);function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r2,n2,o2,i2){var c2=n2&&n2.prototype instanceof Generator?n2:Generator,u2=Object.create(c2.prototype);return _regeneratorDefine2(u2,"_invoke",function(r3,n3,o3){var i3,c3,u3,f2=0,p=o3||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t2,r4){return i3=t2,c3=0,u3=e,G.n=r4,a}};function d(r4,n4){for(c3=r4,u3=n4,t=0;!y&&f2&&!o4&&t<p.length;t++){var o4,i4=p[t],d2=G.p,l=i4[2];r4>3?(o4=l===n4)&&(u3=i4[(c3=i4[4])?5:(c3=3,3)],i4[4]=i4[5]=e):i4[0]<=d2&&((o4=r4<2&&d2<i4[1])?(c3=0,G.v=n4,G.n=i4[1]):d2<l&&(o4=r4<3||i4[0]>n4||n4>l)&&(i4[4]=r4,i4[5]=n4,G.n=l,c3=0))}if(o4||r4>1)return a;throw y=!0,n4}return function(o4,p2,l){if(f2>1)throw TypeError("Generator is already running");for(y&&p2===1&&d(p2,l),c3=p2,u3=l;(t=c3<2?e:u3)||!y;){i3||(c3?c3<3?(c3>1&&(G.n=-1),d(c3,u3)):G.n=u3:G.v=u3);try{if(f2=2,i3){if(c3||(o4="next"),t=i3[o4]){if(!(t=t.call(i3,u3)))throw TypeError("iterator result is not an object");if(!t.done)return t;u3=t.value,c3<2&&(c3=0)}else c3===1&&(t=i3.return)&&t.call(i3),c3<2&&(u3=TypeError("The iterator does not provide a '"+o4+"' method"),c3=1);i3=e}else if((t=(y=G.n<0)?u3:r3.call(n3,G))!==a)break}catch(t2){i3=e,c3=1,u3=t2}finally{f2=1}}return{value:t,done:y}}}(r2,o2,i2),!0),u2}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e2){return Object.setPrototypeOf?Object.setPrototypeOf(e2,GeneratorFunctionPrototype):(e2.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e2,o,"GeneratorFunction")),e2.prototype=Object.create(u),e2}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}_regeneratorDefine2=function(e2,r2,n2,t2){function o(r3,n3){_regeneratorDefine2(e2,r3,function(e3){return this._invoke(r3,n3,e3)})}r2?i?i(e2,r2,{value:n2,enumerable:!t2,configurable:!t2,writable:!t2}):e2[r2]=n2:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n2){return void e(n2)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n2){asyncGeneratorStep(a,r,o,_next,_throw,"next",n2)}function _throw(n2){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n2)}_next(void 0)})}}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(r,a){if(r){if(typeof r=="string")return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(a==null||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,l===0){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r2){o=!0,n=r2}finally{try{if(!f&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function __bitNormalizeId(id){return id?String(id).trim().replace(/^\/+|\/+$/g,""):""}function __bitActiveComponentId(){try{var hash=window.location.hash;if(!hash)return null;var _hash$slice$split=hash.slice(1).split("?"),_hash$slice$split2=_slicedToArray(_hash$slice$split,1),idPart=_hash$slice$split2[0],id=__bitNormalizeId(idPart),idWithoutVersion=id.split("@")[0];return idWithoutVersion||null}catch{return null}}var __bitActiveId=__bitActiveComponentId();function __bitShouldSurfaceFor(componentId){if(!__bitActiveId)return!1;var act=__bitNormalizeId(__bitActiveId),cmp=__bitNormalizeId(componentId);return!act||!cmp?!1:act===cmp}function __bitSurfaceToOverlay(err,componentId){return;var e,msg}function initializeModules(){return _initializeModules.apply(this,arguments)}function _initializeModules(){return _initializeModules=_asyncToGenerator(_regenerator().m(function _callee2(){return _regenerator().w(function(_context2){for(;;)switch(_context2.n){case 0:(0,_home_circleci_bvm_versions_2_0_35_bit_2_0_35_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__.uf)("overview",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_98cf30a024475b337e2db75aec661313311da841_mjs__WEBPACK_IMPORTED_MODULE_1__.x},isSplitComponentBundle:!0,componentMap:{}});case 1:return _context2.a(2)}},_callee2)})),_initializeModules.apply(this,arguments)}(function(){var _initializeModulesOnLoad=_asyncToGenerator(_regenerator().m(function _callee(){return _regenerator().w(function(_context){for(;;)switch(_context.n){case 0:return _context.n=1,initializeModules();case 1:return _context.a(2)}},_callee)}));function initializeModulesOnLoad(){return _initializeModulesOnLoad.apply(this,arguments)}return initializeModulesOnLoad})()()},94891:()=>{},91044:()=>{},38954:()=>{},71220:()=>{},38854:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[109,127,518,293,866],()=>__webpack_exec__(8564));var __webpack_exports__=__webpack_require__.O()}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|