@teambit/mdx 1.0.1083 → 1.0.1085

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 (28) hide show
  1. package/artifacts/env-template/public/{252.dd1776cd36b7143d34ea.js → 492.443e27f91434f7c6ef6e.js} +4 -4
  2. package/artifacts/env-template/public/{952.3083aa9cbfa446158f75.js → 622.cb79342afbea537f8c5a.js} +2 -2
  3. package/artifacts/env-template/public/{991.1f7ba62b2161970e8990.js → 761.85fc21305acc4b338568.js} +3 -3
  4. package/artifacts/env-template/public/assets-manifest.json +18 -18
  5. package/artifacts/env-template/public/compositions.ba020bc82a4f9f648d8b.js +2 -0
  6. package/artifacts/env-template/public/compositions.html +1 -1
  7. package/artifacts/env-template/public/overview.ee6a645f6c46fe511ced.js +2 -0
  8. package/artifacts/env-template/public/overview.html +1 -1
  9. package/artifacts/env-template/public/{preview-root.ed57c8a81f6290f17496.js → preview-root.33ee8ce7e66ee667e142.js} +1 -1
  10. package/artifacts/env-template/public/static/css/preview-root.5df7b9ad.css +1 -0
  11. package/{compositions-1785362864561.js → compositions-1785427575785.js} +2 -2
  12. package/dist/mdx.detector.js +2 -4
  13. package/dist/mdx.detector.js.map +1 -1
  14. package/dist/mdx.detector.spec.js +15 -75
  15. package/dist/mdx.detector.spec.js.map +1 -1
  16. package/dist/mdx.doc-reader.js +1 -2
  17. package/dist/mdx.doc-reader.js.map +1 -1
  18. package/dist/mdx.env.d.ts +11 -11
  19. package/dist/{preview-1785362864561.js → preview-1785427575785.js} +2 -2
  20. package/{overview-1785362864561.js → overview-1785427575785.js} +2 -2
  21. package/package.json +50 -28
  22. package/types/asset.d.ts +15 -3
  23. package/types/style.d.ts +4 -0
  24. package/artifacts/env-template/public/compositions.dccaa3bf48b79c7fbf6e.js +0 -2
  25. package/artifacts/env-template/public/overview.a9beaf67a910ee79b3e9.js +0 -2
  26. package/artifacts/env-template/public/static/css/preview-root.94d1297b.css +0 -1
  27. /package/artifacts/env-template/public/{peers.7608581af0e6655a7776.js → peers.9be2307a90335612cbde.js} +0 -0
  28. /package/artifacts/env-template/public/static/css/{252.61d2d806.css → 492.61d2d806.css} +0 -0
@@ -1,34 +1,34 @@
1
1
  {
2
- "252.dd1776cd36b7143d34ea.js": "252.dd1776cd36b7143d34ea.js",
3
- "952.3083aa9cbfa446158f75.js": "952.3083aa9cbfa446158f75.js",
4
- "991.1f7ba62b2161970e8990.js": "991.1f7ba62b2161970e8990.js",
2
+ "492.443e27f91434f7c6ef6e.js": "492.443e27f91434f7c6ef6e.js",
3
+ "622.cb79342afbea537f8c5a.js": "622.cb79342afbea537f8c5a.js",
4
+ "761.85fc21305acc4b338568.js": "761.85fc21305acc4b338568.js",
5
5
  "compositions.css": "static/css/compositions.b7ba1a09.css",
6
6
  "compositions.html": "compositions.html",
7
- "compositions.js": "compositions.dccaa3bf48b79c7fbf6e.js",
7
+ "compositions.js": "compositions.ba020bc82a4f9f648d8b.js",
8
8
  "entrypoints": {
9
9
  "peers": {
10
10
  "assets": {
11
11
  "js": [
12
- "peers.7608581af0e6655a7776.js"
12
+ "peers.9be2307a90335612cbde.js"
13
13
  ]
14
14
  }
15
15
  },
16
16
  "preview-root": {
17
17
  "assets": {
18
18
  "js": [
19
- "991.1f7ba62b2161970e8990.js",
20
- "preview-root.ed57c8a81f6290f17496.js"
19
+ "761.85fc21305acc4b338568.js",
20
+ "preview-root.33ee8ce7e66ee667e142.js"
21
21
  ],
22
22
  "css": [
23
- "static/css/preview-root.94d1297b.css"
23
+ "static/css/preview-root.5df7b9ad.css"
24
24
  ]
25
25
  }
26
26
  },
27
27
  "compositions": {
28
28
  "assets": {
29
29
  "js": [
30
- "952.3083aa9cbfa446158f75.js",
31
- "compositions.dccaa3bf48b79c7fbf6e.js"
30
+ "622.cb79342afbea537f8c5a.js",
31
+ "compositions.ba020bc82a4f9f648d8b.js"
32
32
  ],
33
33
  "css": [
34
34
  "static/css/compositions.b7ba1a09.css"
@@ -38,19 +38,19 @@
38
38
  "overview": {
39
39
  "assets": {
40
40
  "js": [
41
- "252.dd1776cd36b7143d34ea.js",
42
- "overview.a9beaf67a910ee79b3e9.js"
41
+ "492.443e27f91434f7c6ef6e.js",
42
+ "overview.ee6a645f6c46fe511ced.js"
43
43
  ],
44
44
  "css": [
45
- "static/css/252.61d2d806.css"
45
+ "static/css/492.61d2d806.css"
46
46
  ]
47
47
  }
48
48
  }
49
49
  },
50
50
  "overview.html": "overview.html",
51
- "overview.js": "overview.a9beaf67a910ee79b3e9.js",
52
- "peers.js": "peers.7608581af0e6655a7776.js",
53
- "preview-root.css": "static/css/preview-root.94d1297b.css",
54
- "preview-root.js": "preview-root.ed57c8a81f6290f17496.js",
55
- "static/css/252.61d2d806.css": "static/css/252.61d2d806.css"
51
+ "overview.js": "overview.ee6a645f6c46fe511ced.js",
52
+ "peers.js": "peers.9be2307a90335612cbde.js",
53
+ "preview-root.css": "static/css/preview-root.5df7b9ad.css",
54
+ "preview-root.js": "preview-root.33ee8ce7e66ee667e142.js",
55
+ "static/css/492.61d2d806.css": "static/css/492.61d2d806.css"
56
56
  }
@@ -0,0 +1,2 @@
1
+ "use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[866],{63040:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{var _home_circleci_bvm_versions_2_0_49_bit_2_0_49_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(11264),_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_68b147035e4e910b00e4b8a4a3ce04a0de2e2e59_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(32185);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_49_bit_2_0_49_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_68b147035e4e910b00e4b8a4a3ce04a0de2e2e59_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,[622,761,518],()=>__webpack_exec__(63040));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.7608581af0e6655a7776.js"></script><script defer="defer" src="991.1f7ba62b2161970e8990.js"></script><script defer="defer" src="preview-root.ed57c8a81f6290f17496.js"></script><script defer="defer" src="952.3083aa9cbfa446158f75.js"></script><script defer="defer" src="compositions.dccaa3bf48b79c7fbf6e.js"></script><link href="static/css/preview-root.94d1297b.css" rel="stylesheet"><link href="static/css/compositions.b7ba1a09.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="peers.9be2307a90335612cbde.js"></script><script defer="defer" src="761.85fc21305acc4b338568.js"></script><script defer="defer" src="preview-root.33ee8ce7e66ee667e142.js"></script><script defer="defer" src="622.cb79342afbea537f8c5a.js"></script><script defer="defer" src="compositions.ba020bc82a4f9f648d8b.js"></script><link href="static/css/preview-root.5df7b9ad.css" rel="stylesheet"><link href="static/css/compositions.b7ba1a09.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -0,0 +1,2 @@
1
+ (self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[542],{99376:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bvm_versions_2_0_49_bit_2_0_49_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(11264),_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_9b89befd045d1080499f8437aaaa95b3d5125fd8_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(95492);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_49_bit_2_0_49_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_9b89befd045d1080499f8437aaaa95b3d5125fd8_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,[492,761,518,622,866],()=>__webpack_exec__(99376));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.7608581af0e6655a7776.js"></script><script defer="defer" src="991.1f7ba62b2161970e8990.js"></script><script defer="defer" src="preview-root.ed57c8a81f6290f17496.js"></script><script defer="defer" src="952.3083aa9cbfa446158f75.js"></script><script defer="defer" src="compositions.dccaa3bf48b79c7fbf6e.js"></script><script defer="defer" src="252.dd1776cd36b7143d34ea.js"></script><script defer="defer" src="overview.a9beaf67a910ee79b3e9.js"></script><link href="static/css/preview-root.94d1297b.css" rel="stylesheet"><link href="static/css/compositions.b7ba1a09.css" rel="stylesheet"><link href="static/css/252.61d2d806.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="peers.9be2307a90335612cbde.js"></script><script defer="defer" src="761.85fc21305acc4b338568.js"></script><script defer="defer" src="preview-root.33ee8ce7e66ee667e142.js"></script><script defer="defer" src="622.cb79342afbea537f8c5a.js"></script><script defer="defer" src="compositions.ba020bc82a4f9f648d8b.js"></script><script defer="defer" src="492.443e27f91434f7c6ef6e.js"></script><script defer="defer" src="overview.ee6a645f6c46fe511ced.js"></script><link href="static/css/preview-root.5df7b9ad.css" rel="stylesheet"><link href="static/css/compositions.b7ba1a09.css" rel="stylesheet"><link href="static/css/492.61d2d806.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -1 +1 @@
1
- "use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[518],{},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[991],()=>__webpack_exec__(65991));var __webpack_exports__=__webpack_require__.O()}]);
1
+ "use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[518],{},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[761],()=>__webpack_exec__(98761));var __webpack_exports__=__webpack_require__.O()}]);
@@ -0,0 +1 @@
1
+ .frame\.module__overlayBorder--YmE2M{border:2px solid #eebcc9;border:2px solid var(--bit-highlighter-color,#eebcc9);border-radius:11px;box-sizing:border-box;padding:4px;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.frame\.module__hidden--YmE2M{display:none}.label\.module__othersContainer--ZDdjN>*{margin-bottom:8px}.label\.module__othersContainer--ZDdjN>:last-child{margin-bottom:0}.label\.module__othersTooltip--ZDdjN{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.label\.module__othersTooltip--ZDdjN:before{content:"▾";display:inline-block;transition:transform .3s}.label\.module__othersTooltip--ZDdjN.label\.module__active--ZDdjN:before{transform:rotate(-180deg)}.label\.module__hidden--ZDdjN{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;visibility:hidden}.component-strip\.module__componentStrip--YTg5Z{border-radius:.5em;box-shadow:var(--bit-highlighter-shadow);display:flex;white-space:nowrap;width:-moz-fit-content;width:fit-content}.component-strip\.module__componentStrip--YTg5Z>*{background:#eebcc9;background:var(--bit-highlighter-color,#eebcc9);line-height:1.5;margin-right:.125em;padding:0 .5em;transform:translateZ(0);transition:filter .3s,background-color .3s}.component-strip\.module__componentStrip--YTg5Z>:link,.component-strip\.module__componentStrip--YTg5Z>:visited{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.component-strip\.module__componentStrip--YTg5Z>:link:hover,.component-strip\.module__componentStrip--YTg5Z>:visited:hover{background:#f6dae2;background:var(--bit-highlighter-color-hover,#f6dae2)}.component-strip\.module__componentStrip--YTg5Z>:link:active,.component-strip\.module__componentStrip--YTg5Z>:visited:active{background:#e79db1;background:var(--bit-highlighter-color-active,#e79db1);color:inherit}.component-strip\.module__componentStrip--YTg5Z>:first-child{border-bottom-left-radius:.5em;border-top-left-radius:.5em}.component-strip\.module__componentStrip--YTg5Z>:last-child{border-bottom-right-radius:.5em;border-top-right-radius:.5em;margin-right:0}.component-strip\.module__nameBlock--YTg5Z{display:flex}.component-strip\.module__nameBlock--YTg5Z .component-strip\.module__version--YTg5Z{max-width:13ch;overflow:hidden;text-overflow:ellipsis;transition:max-width .48s;white-space:nowrap}.component-strip\.module__nameBlock--YTg5Z .component-strip\.module__version--YTg5Z:hover{max-width:61ch}.element-highlighter\.module__label--XzY0M{padding:8px}.element-highlighter\.module__frame--XzY0M,.element-highlighter\.module__label--XzY0M{z-index:15500}.highlighter-provider\.module__highlighter--XzBjO{border:solid #ededed;border:0 solid var(--bit-border-color-lightest,#ededed);box-sizing:border-box;height:100%;transition:border .3s}.highlighter-provider\.module__highlighter--XzBjO.highlighter-provider\.module__active--XzBjO{border-width:8px;overflow:auto}.highlighter-provider\.module__label--XzBjO{font-family:sans-serif;font-size:12px}
@@ -1,4 +1,4 @@
1
- import { linkModules } from '/home/circleci/.bvm/versions/2.0.46/bit-2.0.46/node_modules/@teambit/preview/dist/preview-modules.js';
1
+ import { linkModules } from '/home/circleci/.bvm/versions/2.0.49/bit-2.0.49/node_modules/@teambit/preview/dist/preview-modules.js';
2
2
 
3
3
  // strip leading/trailing slashes from any id we compare
4
4
  function __bitNormalizeId(id) {
@@ -43,7 +43,7 @@ function __bitSurfaceToOverlay(err, componentId) {
43
43
  }, 0);
44
44
  }
45
45
 
46
- import {defaultMainModule} from "/home/circleci/bit/bit/node_modules/@teambit/_local/preview-modules-aa880bdba40b9af1d8fe895dca476e207182accb.mjs";
46
+ import {defaultMainModule} from "/home/circleci/bit/bit/node_modules/@teambit/_local/preview-modules-68b147035e4e910b00e4b8a4a3ce04a0de2e2e59.mjs";
47
47
  async function initializeModules() {
48
48
 
49
49
  linkModules('compositions', {
@@ -68,19 +68,17 @@ class MDXDependencyDetector {
68
68
  detect(source) {
69
69
  const filename = this.currentFilename;
70
70
  try {
71
- var _output$data;
72
71
  const output = (0, _mdx().compileSync)(source, getDetectorMdxOptions());
73
- const imports = ((_output$data = output.data) === null || _output$data === void 0 ? void 0 : _output$data.imports) || [];
72
+ const imports = output.data?.imports || [];
74
73
  if (!imports.length) return [];
75
74
  return imports.map(importSpec => importSpec.fromModule);
76
75
  } catch (err) {
77
- var _this$logger;
78
76
  // MDX v3 may fail to compile files with legacy syntax (HTML comments, escaped
79
77
  // characters in prose, bare variable declarations, unclosed tags, etc.).
80
78
  // Fall back to regex-based import detection which is sufficient for dependency resolution.
81
79
  const fileRef = filename ? ` File: ${filename}` : '';
82
80
  const msg = `MDX compilation failed, falling back to regex-based import detection.${fileRef} Error: ${err.message}`;
83
- (_this$logger = this.logger) === null || _this$logger === void 0 || _this$logger.consoleWarning(msg);
81
+ this.logger?.consoleWarning(msg);
84
82
  return (0, _mdxDepsDetectors().detective)(source);
85
83
  }
86
84
  }
@@ -1 +1 @@
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}\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,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,kBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,iBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgG,SAAAI,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd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CAACI,OAAO,EAAE;MACnH,CAAAH,YAAA,OAAI,CAAClB,MAAM,cAAAkB,YAAA,eAAXA,YAAA,CAAaI,cAAc,CAACF,GAAG,CAAC;MAChC,OAAO,IAAAG,6BAAsB,EAACd,MAAM,CAAC;IACvC;EACF;AACF;AAACe,OAAA,CAAA3B,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","compileSync","imports","map","importSpec","fromModule","err","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}\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,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA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AAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAC;EACtC;EAEAC,WAAWA,CAACC,OAAoB,EAAW;IACzC;IACA;IACA,IAAI,CAACC,eAAe,GAAGD,OAAO,CAACE,QAAQ;IACvC,OAAO,IAAI,CAACP,mBAAmB,CAACQ,QAAQ,CAACH,OAAO,CAACI,GAAG,CAAC;EACvD;EAEAP,MAAMA,CAACQ,MAAc,EAAY;IAC/B,MAAMH,QAAQ,GAAG,IAAI,CAACD,eAAe;IACrC,IAAI;MACF,MAAMK,MAAM,GAAG,IAAAC,kBAAW,EAACF,MAAM,EAAEhB,qBAAqB,CAAC,CAAC,CAAC;MAC3D,MAAMmB,OAAO,GAAIF,MAAM,CAACvD,IAAI,EAAEyD,OAAO,IAA0B,EAAE;MACjE,IAAI,CAACA,OAAO,CAACtC,MAAM,EAAE,OAAO,EAAE;MAC9B,OAAOsC,OAAO,CAACC,GAAG,CAAEC,UAAU,IAAKA,UAAU,CAACC,UAAU,CAAC;IAC3D,CAAC,CAAC,OAAOC,GAAQ,EAAE;MACjB;MACA;MACA;MACA,MAAMC,OAAO,GAAGX,QAAQ,GAAG,UAAUA,QAAQ,EAAE,GAAG,EAAE;MACpD,MAAMY,GAAG,GAAG,wEAAwED,OAAO,WAAWD,GAAG,CAACG,OAAO,EAAE;MACnH,IAAI,CAACnB,MAAM,EAAEoB,cAAc,CAACF,GAAG,CAAC;MAChC,OAAO,IAAAG,6BAAsB,EAACZ,MAAM,CAAC;IACvC;EACF;AACF;AAACa,OAAA,CAAAzB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -8,89 +8,29 @@ function _chai() {
8
8
  return data;
9
9
  }
10
10
  function _mdx() {
11
- const data = require("@mdx-js/mdx");
12
- _mdx = function () {
13
- return data;
14
- };
15
- return data;
16
- }
17
- function _mdx2() {
18
11
  const data = require("./mdx.detector");
19
- _mdx2 = function () {
12
+ _mdx = function () {
20
13
  return data;
21
14
  };
22
15
  return data;
23
16
  }
24
- // Mock @mdx-js/mdx and @teambit/mdx.modules.mdx-v3-options to avoid loading ESM-only
25
- // modules (100+ packages in the unified/remark/rehype ecosystem) that Jest cannot
26
- // handle in CJS mode due to missing require export conditions and ESM syntax.
27
- jest.mock('@mdx-js/mdx', () => ({
28
- compileSync: jest.fn()
29
- }));
30
- jest.mock('@teambit/mdx.modules.mdx-v3-options', () => ({
31
- mdxOptions: {
32
- remarkPlugins: [],
33
- jsxImportSource: 'react'
34
- }
35
- }));
36
- const mockCompileSync = _mdx().compileSync;
37
17
  describe('MDXDependencyDetector', () => {
38
- beforeEach(() => {
39
- mockCompileSync.mockReset();
40
- });
41
18
  describe('detect - compileSync path', () => {
42
19
  it('should return modules from compileSync imports data', () => {
43
- mockCompileSync.mockReturnValue({
44
- data: {
45
- imports: [{
46
- fromModule: 'react'
47
- }, {
48
- fromModule: '@teambit/design.ui.button'
49
- }]
50
- }
51
- });
52
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
53
- (0, _chai().expect)(detector.detect('any source')).to.deep.equal(['react', '@teambit/design.ui.button']);
20
+ const src = `import React from 'react';
21
+ import { Button } from '@teambit/design.ui.button';
22
+
23
+ # Hello World
24
+ `;
25
+ const detector = new (_mdx().MDXDependencyDetector)(['mdx']);
26
+ (0, _chai().expect)(detector.detect(src)).to.deep.equal(['react', '@teambit/design.ui.button']);
54
27
  });
55
- it('should return empty array when compileSync returns no imports', () => {
56
- mockCompileSync.mockReturnValue({
57
- data: {
58
- imports: []
59
- }
60
- });
61
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
28
+ it('should return empty array when the source has no imports', () => {
29
+ const detector = new (_mdx().MDXDependencyDetector)(['mdx']);
62
30
  (0, _chai().expect)(detector.detect('# Just markdown')).to.deep.equal([]);
63
31
  });
64
- it('should return empty array when imports data is undefined', () => {
65
- mockCompileSync.mockReturnValue({
66
- data: {}
67
- });
68
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
69
- (0, _chai().expect)(detector.detect('# No imports')).to.deep.equal([]);
70
- });
71
- it('should pass source and options to compileSync', () => {
72
- mockCompileSync.mockReturnValue({
73
- data: {
74
- imports: []
75
- }
76
- });
77
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
78
- detector.detect('test source');
79
- (0, _chai().expect)(mockCompileSync.mock.calls.length).to.equal(1);
80
- (0, _chai().expect)(mockCompileSync.mock.calls[0][0]).to.equal('test source');
81
- });
82
32
  });
83
33
  describe('detect - regex fallback on compileSync failure', () => {
84
- beforeEach(() => {
85
- mockCompileSync.mockImplementation(() => {
86
- throw new Error('MDX compilation failed');
87
- });
88
- });
89
- it('should fallback to regex when compileSync throws', () => {
90
- const src = `import React from 'react';`;
91
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
92
- (0, _chai().expect)(detector.detect(src)).to.deep.equal(['react']);
93
- });
94
34
  it('should detect imports when MDX contains HTML comments', () => {
95
35
  const src = `
96
36
  import React from 'react';
@@ -99,7 +39,7 @@ import { Button } from '@teambit/base-ui.inputs.button';
99
39
  <!-- This is an HTML comment that breaks MDX v3 -->
100
40
  # Hello World
101
41
  `;
102
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
42
+ const detector = new (_mdx().MDXDependencyDetector)(['mdx']);
103
43
  (0, _chai().expect)(detector.detect(src)).to.deep.equal(['react', '@teambit/base-ui.inputs.button']);
104
44
  });
105
45
  it('should detect imports when MDX contains unclosed tags', () => {
@@ -109,7 +49,7 @@ import { Card } from '@teambit/design.ui.card';
109
49
  <div>
110
50
  # Content
111
51
  `;
112
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
52
+ const detector = new (_mdx().MDXDependencyDetector)(['mdx']);
113
53
  (0, _chai().expect)(detector.detect(src)).to.deep.equal(['@teambit/design.ui.card']);
114
54
  });
115
55
  it('should detect imports when MDX contains escaped characters', () => {
@@ -118,13 +58,13 @@ import Component from './component';
118
58
 
119
59
  Here's some text with \\escaped\\characters that MDX v3 doesn't like
120
60
  `;
121
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
61
+ const detector = new (_mdx().MDXDependencyDetector)(['mdx']);
122
62
  (0, _chai().expect)(detector.detect(src)).to.deep.equal(['./component']);
123
63
  });
124
64
  });
125
65
  describe('isSupported', () => {
126
66
  it('should return true for supported extensions', () => {
127
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx', 'md']);
67
+ const detector = new (_mdx().MDXDependencyDetector)(['mdx', 'md']);
128
68
  (0, _chai().expect)(detector.isSupported({
129
69
  ext: 'mdx',
130
70
  filename: 'test.mdx'
@@ -135,7 +75,7 @@ Here's some text with \\escaped\\characters that MDX v3 doesn't like
135
75
  })).to.be.true;
136
76
  });
137
77
  it('should return false for unsupported extensions', () => {
138
- const detector = new (_mdx2().MDXDependencyDetector)(['mdx']);
78
+ const detector = new (_mdx().MDXDependencyDetector)(['mdx']);
139
79
  (0, _chai().expect)(detector.isSupported({
140
80
  ext: 'ts',
141
81
  filename: 'test.ts'
@@ -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"],"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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WAAW,CAAC;QAAEC,GAAG,EAAE,IAAI;QAAEC,QAAQ,EAAE;MAAU,CAAQ,CAAC,CAAC,CAACV,EAAE,CAACW,EAAE,CAACC,IAAI;IACpF,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
+ {"version":3,"names":["_chai","data","require","_mdx","describe","it","src","detector","MDXDependencyDetector","expect","detect","to","deep","equal","isSupported","ext","filename","be","true","false"],"sources":["mdx.detector.spec.ts"],"sourcesContent":["import { expect } from 'chai';\n\nimport { MDXDependencyDetector } from './mdx.detector';\n\ndescribe('MDXDependencyDetector', () => {\n describe('detect - compileSync path', () => {\n it('should return modules from compileSync imports data', () => {\n const src = `import React from 'react';\nimport { Button } from '@teambit/design.ui.button';\n\n# Hello World\n`;\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect(src)).to.deep.equal(['react', '@teambit/design.ui.button']);\n });\n\n it('should return empty array when the source has no imports', () => {\n const detector = new MDXDependencyDetector(['mdx']);\n expect(detector.detect('# Just markdown')).to.deep.equal([]);\n });\n });\n\n describe('detect - regex fallback on compileSync failure', () => {\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;AAEA,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;EACtCA,QAAQ,CAAC,2BAA2B,EAAE,MAAM;IAC1CC,EAAE,CAAC,qDAAqD,EAAE,MAAM;MAC9D,MAAMC,GAAG,GAAG;AAClB;AACA;AACA;AACA,CAAC;MACK,MAAMC,QAAQ,GAAG,KAAIC,4BAAqB,EAAC,CAAC,KAAK,CAAC,CAAC;MACnD,IAAAC,cAAM,EAACF,QAAQ,CAACG,MAAM,CAACJ,GAAG,CAAC,CAAC,CAACK,EAAE,CAACC,IAAI,CAACC,KAAK,CAAC,CAAC,OAAO,E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ACJ,GAAG,CAAC,CAAC,CAACK,EAAE,CAACC,IAAI,CAACC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC;IAC7D,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFT,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC5BC,EAAE,CAAC,6CAA6C,EAAE,MAAM;MACtD,MAAME,QAAQ,GAAG,KAAIC,4BAAqB,EAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;MACzD,IAAAC,cAAM,EAACF,QAAQ,CAACO,WAAW,CAAC;QAAEC,GAAG,EAAE,KAAK;QAAEC,QAAQ,EAAE;MAAW,CAAQ,CAAC,CAAC,CAACL,EAAE,CAACM,EAAE,CAACC,IAAI;MACpF,IAAAT,cAAM,EAACF,QAAQ,CAACO,WAAW,CAAC;QAAEC,GAAG,EAAE,IAAI;QAAEC,QAAQ,EAAE;MAAU,CAAQ,CAAC,CAAC,CAACL,EAAE,CAACM,EAAE,CAACC,IAAI;IACpF,CAAC,CAAC;IAEFb,EAAE,CAAC,gDAAgD,EAAE,MAAM;MACzD,MAAME,QAAQ,GAAG,KAAIC,4BAAqB,EAAC,CAAC,KAAK,CAAC,CAAC;MACnD,IAAAC,cAAM,EAACF,QAAQ,CAACO,WAAW,CAAC;QAAEC,GAAG,EAAE,IAAI;QAAEC,QAAQ,EAAE;MAAU,CAAQ,CAAC,CAAC,CAACL,EAAE,CAACM,EAAE,CAACE,KAAK;IACrF,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -30,9 +30,8 @@ class MDXDocReader {
30
30
  this.extensions = extensions;
31
31
  }
32
32
  async read(path, contents) {
33
- var _output$data;
34
33
  const output = (0, _mdx().compileSync)(contents.toString('utf-8'), _mdxModules().mdxOptions);
35
- const metadata = ((_output$data = output.data) === null || _output$data === void 0 ? void 0 : _output$data.frontmatter) ?? {};
34
+ const metadata = output.data?.frontmatter ?? {};
36
35
  const doc = _docs().Doc.from(path, metadata);
37
36
  return doc;
38
37
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_docs","data","require","_mdx","_mdxModules","MDXDocReader","constructor","extensions","read","path","contents","_output$data","output","compileSync","toString","mdxOptions","metadata","frontmatter","doc","Doc","from","isFormatSupported","format","includes","exports"],"sources":["mdx.doc-reader.ts"],"sourcesContent":["import type { DocReader } from '@teambit/docs';\nimport { Doc } from '@teambit/docs';\nimport { compileSync } from '@mdx-js/mdx';\nimport { mdxOptions } from '@teambit/mdx.modules.mdx-v3-options';\n\nexport class MDXDocReader implements DocReader {\n constructor(private extensions: string[]) {}\n\n async read(path: string, contents: Buffer) {\n const output = compileSync(contents.toString('utf-8'), mdxOptions);\n const metadata: any = output.data?.frontmatter ?? {};\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":";;;;;;AACA,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,YAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMI,YAAY,CAAsB;EAC7CC,WAAWA,CAASC,UAAoB,EAAE;IAAA,KAAtBA,UAAoB,GAApBA,UAAoB;EAAG;EAE3C,MAAMC,IAAIA,CAACC,IAAY,EAAEC,QAAgB,EAAE;IAAA,IAAAC,YAAA;IACzC,MAAMC,MAAM,GAAG,IAAAC,kBAAW,EAACH,QAAQ,CAACI,QAAQ,CAAC,OAAO,CAAC,EAAEC,wBAAU,CAAC;IAClE,MAAMC,QAAa,GAAG,EAAAL,YAAA,GAAAC,MAAM,CAACX,IAAI,cAAAU,YAAA,uBAAXA,YAAA,CAAaM,WAAW,KAAI,CAAC,CAAC;IAEpD,MAAMC,GAAG,GAAGC,WAAG,CAACC,IAAI,CAACX,IAAI,EAAEO,QAAQ,CAAC;IACpC,OAAOE,GAAG;EACZ;EAEAG,iBAAiBA,CAACC,MAAc,EAAE;IAChC,OAAO,IAAI,CAACf,UAAU,CAACgB,QAAQ,CAACD,MAAM,CAAC;EACzC;AACF;AAACE,OAAA,CAAAnB,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["_docs","data","require","_mdx","_mdxModules","MDXDocReader","constructor","extensions","read","path","contents","output","compileSync","toString","mdxOptions","metadata","frontmatter","doc","Doc","from","isFormatSupported","format","includes","exports"],"sources":["mdx.doc-reader.ts"],"sourcesContent":["import type { DocReader } from '@teambit/docs';\nimport { Doc } from '@teambit/docs';\nimport { compileSync } from '@mdx-js/mdx';\nimport { mdxOptions } from '@teambit/mdx.modules.mdx-v3-options';\n\nexport class MDXDocReader implements DocReader {\n constructor(private extensions: string[]) {}\n\n async read(path: string, contents: Buffer) {\n const output = compileSync(contents.toString('utf-8'), mdxOptions);\n const metadata: any = output.data?.frontmatter ?? {};\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":";;;;;;AACA,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,YAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMI,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,IAAAC,kBAAW,EAACF,QAAQ,CAACG,QAAQ,CAAC,OAAO,CAAC,EAAEC,wBAAU,CAAC;IAClE,MAAMC,QAAa,GAAGJ,MAAM,CAACV,IAAI,EAAEe,WAAW,IAAI,CAAC,CAAC;IAEpD,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","ignoreList":[]}
package/dist/mdx.env.d.ts CHANGED
@@ -22,23 +22,23 @@ export declare class MdxEnv implements Environment {
22
22
  getDependencies(): Promise<{
23
23
  dependencies: {
24
24
  react: string;
25
- "react-dom": string;
26
- "core-js": string;
25
+ 'react-dom': string;
26
+ 'core-js': string;
27
27
  };
28
28
  devDependencies: {
29
29
  react: string;
30
- "react-dom": string;
31
- "@types/mocha": string;
32
- "@types/node": string;
33
- "@types/react": string;
34
- "@types/react-dom": string;
35
- "@types/jest": string;
36
- "@babel/runtime": string;
37
- "@types/testing-library__jest-dom": string;
30
+ 'react-dom': string;
31
+ '@types/mocha': string;
32
+ '@types/node': string;
33
+ '@types/react': string;
34
+ '@types/react-dom': string;
35
+ '@types/jest': string;
36
+ '@babel/runtime': string;
37
+ '@types/testing-library__jest-dom': string;
38
38
  };
39
39
  peerDependencies: {
40
40
  react: string;
41
- "react-dom": string;
41
+ 'react-dom': string;
42
42
  };
43
43
  } & {
44
44
  dependencies: {
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.1083/dist/mdx.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.1083/dist/mdx.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.1085/dist/mdx.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.1085/dist/mdx.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1,4 +1,4 @@
1
- import { linkModules } from '/home/circleci/.bvm/versions/2.0.46/bit-2.0.46/node_modules/@teambit/preview/dist/preview-modules.js';
1
+ import { linkModules } from '/home/circleci/.bvm/versions/2.0.49/bit-2.0.49/node_modules/@teambit/preview/dist/preview-modules.js';
2
2
 
3
3
  // strip leading/trailing slashes from any id we compare
4
4
  function __bitNormalizeId(id) {
@@ -43,7 +43,7 @@ function __bitSurfaceToOverlay(err, componentId) {
43
43
  }, 0);
44
44
  }
45
45
 
46
- import {defaultMainModule} from "/home/circleci/bit/bit/node_modules/@teambit/_local/preview-modules-0557d705b67dd1e1bccbac0bd34835a41036cf72.mjs";
46
+ import {defaultMainModule} from "/home/circleci/bit/bit/node_modules/@teambit/_local/preview-modules-9b89befd045d1080499f8437aaaa95b3d5125fd8.mjs";
47
47
  async function initializeModules() {
48
48
 
49
49
  linkModules('overview', {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/mdx",
3
- "version": "1.0.1083",
3
+ "version": "1.0.1085",
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.1083"
9
+ "version": "1.0.1085"
10
10
  },
11
11
  "dependencies": {
12
12
  "@mdx-js/mdx": "^3.1.1",
@@ -14,42 +14,64 @@
14
14
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
15
15
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
16
16
  "@babel/helper-plugin-test-runner": "7.16.7",
17
- "core-js": "^3.0.0",
18
- "@babel/runtime": "7.20.0",
19
17
  "@teambit/harmony": "0.4.12",
18
+ "@teambit/logger": "0.0.1452",
20
19
  "@teambit/mdx.deps-detectors.detective-mdx": "0.0.3",
21
20
  "@teambit/mdx.modules.mdx-v3-options": "0.0.3",
22
21
  "@teambit/mdx.compilers.mdx-multi-compiler": "2.0.46",
22
+ "@teambit/cli": "0.0.1359",
23
23
  "@teambit/component-id": "1.2.4",
24
+ "@teambit/worker": "0.0.1663",
24
25
  "@teambit/mdx.generator.mdx-templates": "1.0.14",
25
26
  "@teambit/design.ui.empty-box": "0.0.364",
26
- "@teambit/dependency-resolver": "1.0.1082",
27
- "@teambit/logger": "0.0.1452",
28
- "@teambit/docs": "1.0.1082",
29
- "@teambit/builder": "1.0.1082",
30
- "@teambit/compiler": "1.0.1082",
31
- "@teambit/envs": "1.0.1082",
32
- "@teambit/react": "1.0.1082",
33
- "@teambit/cli": "0.0.1359",
34
- "@teambit/generator": "1.0.1083",
35
- "@teambit/worker": "0.0.1663",
36
- "@teambit/compositions": "1.0.1082",
37
- "@teambit/tester": "1.0.1082",
38
- "@teambit/ui": "1.0.1082"
27
+ "@teambit/dependency-resolver": "1.0.1084",
28
+ "@teambit/docs": "1.0.1084",
29
+ "@teambit/builder": "1.0.1084",
30
+ "@teambit/compiler": "1.0.1084",
31
+ "@teambit/envs": "1.0.1084",
32
+ "@teambit/react": "1.0.1084",
33
+ "@teambit/generator": "1.0.1085",
34
+ "@teambit/compositions": "1.0.1084",
35
+ "@teambit/tester": "1.0.1084",
36
+ "@teambit/ui": "1.0.1084"
39
37
  },
40
38
  "devDependencies": {
41
- "@types/react": "^19.0.0",
42
- "@types/chai": "4.2.15",
43
- "chai": "4.3.0",
44
39
  "@types/lodash": "4.14.165",
45
- "@types/node": "12.20.4",
46
- "@types/react-dom": "^19.0.0",
47
- "@types/jest": "^26.0.0",
48
- "@types/testing-library__jest-dom": "5.9.5",
49
- "@teambit/mdx.aspect-docs.mdx": "0.0.181"
40
+ "@teambit/mdx.aspect-docs.mdx": "0.0.181",
41
+ "@teambit/harmony.envs.core-aspect-env": "2.0.4"
42
+ },
43
+ "peerDependencies": {
44
+ "chai": "5.2.1"
50
45
  },
51
- "peerDependencies": {},
52
- "license": "SEE LICENSE IN UNLICENSED",
46
+ "license": "Apache-2.0",
53
47
  "optionalDependencies": {},
54
- "peerDependenciesMeta": {}
48
+ "peerDependenciesMeta": {},
49
+ "exports": {
50
+ ".": {
51
+ "types": "./dist/index.d.ts",
52
+ "node": {
53
+ "require": "./dist/index.js",
54
+ "import": "./dist/esm.mjs"
55
+ },
56
+ "default": "./dist/index.js"
57
+ },
58
+ "./dist/*": "./dist/*",
59
+ "./artifacts/*": "./artifacts/*"
60
+ },
61
+ "private": false,
62
+ "engines": {
63
+ "node": ">=16.0.0"
64
+ },
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "https://github.com/teambit/bit"
68
+ },
69
+ "keywords": [
70
+ "bit",
71
+ "bit-aspect",
72
+ "bit-core-aspect",
73
+ "components",
74
+ "collaboration",
75
+ "web"
76
+ ]
55
77
  }