@teambit/mdx 1.0.666 → 1.0.668
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/{118.882e2378b0e5623249d2.js → 15.c2a7fdb06f4c5b893f85.js} +2 -2
- package/artifacts/env-template/public/{252.5a48d08a4efe6ac7073d.js → 624.0063cd20896778773908.js} +2 -2
- package/artifacts/env-template/public/assets-manifest.json +12 -12
- package/artifacts/env-template/public/{compositions.23c226591f5ac31de89f.js → compositions.865857a470a7a10c49ec.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.973126a66b827fb2e194.js → overview.6ec23debb63951a08712.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{peers.b347805ad34868e3fc0d.js → peers.2bbd1ea908f969e0022a.js} +1 -1
- package/{compositions-1753803956605.js → compositions-1753833698619.js} +1 -1
- package/dist/mdx.compiler.d.ts +2 -2
- package/dist/mdx.compiler.js.map +1 -1
- package/dist/mdx.detector.d.ts +1 -1
- package/dist/mdx.detector.js.map +1 -1
- package/dist/mdx.doc-reader.d.ts +2 -1
- package/dist/mdx.doc-reader.js.map +1 -1
- package/dist/mdx.env.d.ts +8 -7
- package/dist/mdx.env.js.map +1 -1
- package/dist/mdx.main.runtime.d.ts +11 -11
- package/dist/mdx.main.runtime.js.map +1 -1
- package/dist/mdx.templates.d.ts +2 -2
- package/dist/mdx.templates.js.map +1 -1
- package/dist/mdx.ui.runtime.d.ts +2 -2
- package/dist/mdx.ui.runtime.js.map +1 -1
- package/dist/{preview-1753803956605.js → preview-1753833698619.js} +2 -2
- package/mdx.ui.runtime.tsx +4 -2
- package/{overview-1753803956605.js → overview-1753833698619.js} +1 -1
- package/package.json +18 -18
- /package/artifacts/env-template/public/static/css/{252.cb193a47.css → 624.cb193a47.css} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"252.5a48d08a4efe6ac7073d.js": "252.5a48d08a4efe6ac7073d.js",
|
|
2
|
+
"15.c2a7fdb06f4c5b893f85.js": "15.c2a7fdb06f4c5b893f85.js",
|
|
4
3
|
"320.762ef2b410b3d3456b80.js": "320.762ef2b410b3d3456b80.js",
|
|
4
|
+
"624.0063cd20896778773908.js": "624.0063cd20896778773908.js",
|
|
5
5
|
"977.2dc9f009f95933831eec.js": "977.2dc9f009f95933831eec.js",
|
|
6
6
|
"compositions.css": "static/css/compositions.a801ccd3.css",
|
|
7
7
|
"compositions.html": "compositions.html",
|
|
8
|
-
"compositions.js": "compositions.
|
|
8
|
+
"compositions.js": "compositions.865857a470a7a10c49ec.js",
|
|
9
9
|
"entrypoints": {
|
|
10
10
|
"peers": {
|
|
11
11
|
"assets": {
|
|
12
12
|
"js": [
|
|
13
13
|
"320.762ef2b410b3d3456b80.js",
|
|
14
|
-
"peers.
|
|
14
|
+
"peers.2bbd1ea908f969e0022a.js"
|
|
15
15
|
]
|
|
16
16
|
}
|
|
17
17
|
},
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"compositions": {
|
|
30
30
|
"assets": {
|
|
31
31
|
"js": [
|
|
32
|
-
"
|
|
33
|
-
"compositions.
|
|
32
|
+
"15.c2a7fdb06f4c5b893f85.js",
|
|
33
|
+
"compositions.865857a470a7a10c49ec.js"
|
|
34
34
|
],
|
|
35
35
|
"css": [
|
|
36
36
|
"static/css/compositions.a801ccd3.css"
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"overview": {
|
|
41
41
|
"assets": {
|
|
42
42
|
"js": [
|
|
43
|
-
"
|
|
44
|
-
"overview.
|
|
43
|
+
"624.0063cd20896778773908.js",
|
|
44
|
+
"overview.6ec23debb63951a08712.js"
|
|
45
45
|
],
|
|
46
46
|
"css": [
|
|
47
|
-
"static/css/
|
|
47
|
+
"static/css/624.cb193a47.css"
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"overview.html": "overview.html",
|
|
53
|
-
"overview.js": "overview.
|
|
54
|
-
"peers.js": "peers.
|
|
53
|
+
"overview.js": "overview.6ec23debb63951a08712.js",
|
|
54
|
+
"peers.js": "peers.2bbd1ea908f969e0022a.js",
|
|
55
55
|
"preview-root.css": "static/css/preview-root.cd64aba9.css",
|
|
56
56
|
"preview-root.js": "preview-root.05f90bb5fbdee8df22bf.js",
|
|
57
|
-
"static/css/
|
|
57
|
+
"static/css/624.cb193a47.css": "static/css/624.cb193a47.css"
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[866],{
|
|
1
|
+
"use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[866],{35883:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{var _home_circleci_bvm_versions_1_12_17_bit_1_12_17_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(27296),_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_fcb75543ae174d7107386380d75d5f3935f0d5b9_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(95860);(0,_home_circleci_bvm_versions_1_12_17_bit_1_12_17_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_fcb75543ae174d7107386380d75d5f3935f0d5b9_mjs__WEBPACK_IMPORTED_MODULE_1__.x},isSplitComponentBundle:!0,componentMap:{}})}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[15,320,977,518],()=>__webpack_exec__(35883));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="320.762ef2b410b3d3456b80.js"></script><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="320.762ef2b410b3d3456b80.js"></script><script defer="defer" src="peers.2bbd1ea908f969e0022a.js"></script><script defer="defer" src="977.2dc9f009f95933831eec.js"></script><script defer="defer" src="preview-root.05f90bb5fbdee8df22bf.js"></script><script defer="defer" src="15.c2a7fdb06f4c5b893f85.js"></script><script defer="defer" src="compositions.865857a470a7a10c49ec.js"></script><link href="static/css/preview-root.cd64aba9.css" rel="stylesheet"><link href="static/css/compositions.a801ccd3.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[542],{
|
|
1
|
+
(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[542],{42503:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bvm_versions_1_12_17_bit_1_12_17_node_modules_teambit_preview_dist_preview_modules_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(27296),_home_circleci_bit_bit_node_modules_teambit_local_preview_modules_cf72038aae23437751eb71da99348a78344bd209_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(61624);(0,_home_circleci_bvm_versions_1_12_17_bit_1_12_17_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_cf72038aae23437751eb71da99348a78344bd209_mjs__WEBPACK_IMPORTED_MODULE_1__.x},isSplitComponentBundle:!0,componentMap:{}})},94891:()=>{},91044:()=>{},38954:()=>{},71220:()=>{},38854:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[624,320,977,518,15,866],()=>__webpack_exec__(42503));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="320.762ef2b410b3d3456b80.js"></script><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="320.762ef2b410b3d3456b80.js"></script><script defer="defer" src="peers.2bbd1ea908f969e0022a.js"></script><script defer="defer" src="977.2dc9f009f95933831eec.js"></script><script defer="defer" src="preview-root.05f90bb5fbdee8df22bf.js"></script><script defer="defer" src="15.c2a7fdb06f4c5b893f85.js"></script><script defer="defer" src="compositions.865857a470a7a10c49ec.js"></script><script defer="defer" src="624.0063cd20896778773908.js"></script><script defer="defer" src="overview.6ec23debb63951a08712.js"></script><link href="static/css/preview-root.cd64aba9.css" rel="stylesheet"><link href="static/css/compositions.a801ccd3.css" rel="stylesheet"><link href="static/css/624.cb193a47.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var __webpack_modules__={
|
|
1
|
+
(()=>{"use strict";var __webpack_modules__={71502:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__2)=>{var react__WEBPACK_IMPORTED_MODULE_2___namespace_cache,react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache,_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(47717),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(58860),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(37953),react_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(88705),globalObj=window;guard("TeambitMdxUiMdxScopeContext",_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__),guard("MdxJsReact",_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),guard("React",react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2))),guard("ReactDom",react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2))),globalObj.TeambitMdxUiMdxScopeContext=_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__,globalObj.MdxJsReact=_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__,globalObj.React=react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2)),globalObj.ReactDom=react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2));function guard(property,expected){var existing=globalObj[property];if(existing===expected&&expected!==void 0)console.warn('[expose-peers] "'+property+'" already exists in global scope, but with correct value');else if(existing!==void 0)throw new Error('[expose-peers] "'+property+'" already exists in the global scope, cannot overwrite')}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(priority&!1||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();r!==void 0&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,leafPrototypes;__webpack_require__.t=function(value,mode){if(mode&1&&(value=this(value)),mode&8||typeof value=="object"&&value&&(mode&4&&value.__esModule||mode&16&&typeof value.then=="function"))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=mode&2&&value;typeof current=="object"&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),(()=>{var installedChunks={626:0};__webpack_require__.O.j=chunkId=>installedChunks[chunkId]===0;var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var[chunkIds,moreModules,runtime]=data,moduleId,chunkId,i=0;if(chunkIds.some(id=>installedChunks[id]!==0)){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})();var __webpack_exports__=__webpack_require__.O(void 0,[320],()=>__webpack_require__(71502));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { linkModules } from '/home/circleci/.bvm/versions/1.12.17/bit-1.12.17/node_modules/@teambit/preview/dist/preview-modules.js';
|
|
3
3
|
|
|
4
|
-
import {defaultMainModule} from "/home/circleci/bit/bit/node_modules/@teambit/_local/preview-modules-
|
|
4
|
+
import {defaultMainModule} from "/home/circleci/bit/bit/node_modules/@teambit/_local/preview-modules-fcb75543ae174d7107386380d75d5f3935f0d5b9.mjs";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
package/dist/mdx.compiler.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Compiler, TranspileFileOutput, TranspileFileParams } from '@teambit/compiler';
|
|
2
|
-
import { BuiltTaskResult, BuildContext } from '@teambit/builder';
|
|
1
|
+
import type { Compiler, TranspileFileOutput, TranspileFileParams } from '@teambit/compiler';
|
|
2
|
+
import type { BuiltTaskResult, BuildContext } from '@teambit/builder';
|
|
3
3
|
import type { TransformOptions } from '@babel/core';
|
|
4
4
|
export type MDXCompilerOpts = {
|
|
5
5
|
ignoredExtensions?: string[];
|
package/dist/mdx.compiler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_path","data","require","_fsExtra","_mdxCompilers","_minimatch","_interopRequireDefault","_compilationModules","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MDXCompiler","constructor","id","config","displayConfig","JSON","stringify","getDistDir","distDir","transpileFile","fileContent","options","afterMdxCompile","mdxCompileSync","filepath","filePath","bitFlavour","filePathAfterMdxCompile","replaceFileExtToJs","afterBabelCompile","babelTranspileFileContent","contents","rootDir","componentDir","babelTransformOptions","build","context","capsules","capsuleNetwork","seedersCapsules","componentsResults","map","capsule","srcFiles","component","filesystem","files","filter","file","isFileSupported","relative","errors","srcFile","transpiled","toString","path","undefined","outputFileSync","join","getDistPathBySrcPath","outputPath","outputText","length","err","artifacts","name","globPatterns","srcPath","fileWithNewExt","replace","ignoredExtensions","ignoredExt","find","ext","endsWith","ignoredPatterns","ignoredPattern","pattern","minimatch","version","exports"],"sources":["mdx.compiler.ts"],"sourcesContent":["import { join } from 'path';\nimport { outputFileSync } from 'fs-extra';\nimport { Compiler, TranspileFileOutput, TranspileFileParams } from '@teambit/compiler';\nimport { BuiltTaskResult, BuildContext } from '@teambit/builder';\nimport { compileSync as mdxCompileSync } from '@teambit/mdx.compilers.mdx-transpiler';\nimport minimatch from 'minimatch';\nimport { transpileFileContent as babelTranspileFileContent } from '@teambit/compilation.modules.babel-compiler';\nimport type { TransformOptions } from '@babel/core';\n\nexport type MDXCompilerOpts = {\n ignoredExtensions?: string[];\n ignoredPatterns?: string[];\n babelTransformOptions?: TransformOptions;\n};\nexport class MDXCompiler implements Compiler {\n displayName = 'MDX';\n\n shouldCopyNonSupportedFiles = true;\n\n distDir = 'dist';\n\n constructor(\n readonly id: string,\n readonly config: MDXCompilerOpts\n ) {}\n\n displayConfig() {\n return JSON.stringify(this.config, null, 2);\n }\n\n getDistDir() {\n return this.distDir;\n }\n\n transpileFile(fileContent: string, options: TranspileFileParams): TranspileFileOutput {\n const afterMdxCompile = mdxCompileSync(fileContent, {\n filepath: options.filePath,\n // this compiler is not indented to compile according to the bit flavour.\n bitFlavour: false,\n });\n const filePathAfterMdxCompile = this.replaceFileExtToJs(options.filePath);\n const afterBabelCompile = babelTranspileFileContent(\n afterMdxCompile.contents,\n {\n rootDir: options.componentDir,\n filePath: filePathAfterMdxCompile,\n },\n this.config.babelTransformOptions || {}\n );\n\n return afterBabelCompile;\n }\n\n /**\n * compile components inside isolated capsules. this being used during tag for the release.\n * meaning, the final package of the component has the dists generated by this method.\n */\n async build(context: BuildContext): Promise<BuiltTaskResult> {\n const capsules = context.capsuleNetwork.seedersCapsules;\n const componentsResults = capsules.map((capsule) => {\n const srcFiles = capsule.component.filesystem.files.filter((file) => {\n return this.isFileSupported(file.relative);\n });\n\n const errors = srcFiles.map((srcFile) => {\n try {\n const transpiled = this.transpileFile(srcFile.contents.toString('utf-8'), {\n filePath: this.replaceFileExtToJs(srcFile.relative),\n componentDir: capsule.path,\n });\n\n if (!transpiled) {\n return undefined;\n }\n\n outputFileSync(\n join(capsule.path, this.getDistPathBySrcPath(transpiled[0].outputPath)),\n transpiled[0].outputText\n );\n if (transpiled.length > 1) {\n outputFileSync(join(capsule.path, this.distDir, transpiled[1].outputPath), transpiled[1].outputText);\n }\n return undefined;\n } catch (err: any) {\n return err;\n }\n });\n\n return {\n errors: errors.filter((err) => !!err),\n component: capsule.component,\n };\n });\n\n return {\n componentsResults,\n artifacts: [\n {\n name: 'dist',\n globPatterns: [`${this.distDir}/**`],\n },\n ],\n };\n }\n\n /**\n * given a source file, return its parallel in the dists. e.g. \"index.ts\" => \"dist/index.js\"\n * both, the return path and the given path are relative paths.\n */\n getDistPathBySrcPath(srcPath: string): string {\n const fileWithNewExt = this.replaceFileExtToJs(srcPath);\n return join(this.distDir, fileWithNewExt);\n }\n\n private replaceFileExtToJs(srcPath: string): string {\n let fileWithNewExt = srcPath;\n if (this.isFileSupported(srcPath)) {\n fileWithNewExt = srcPath.replace('.mdx', '.mdx.js');\n }\n return fileWithNewExt;\n }\n\n /**\n * only supported files matching get compiled. others, are copied to the dist dir.\n */\n isFileSupported(filePath: string): boolean {\n const ignoredExtensions = this.config.ignoredExtensions ?? [];\n const ignoredExt = ignoredExtensions.find((ext) => filePath.endsWith(ext));\n const ignoredPatterns = this.config.ignoredPatterns ?? [];\n const ignoredPattern = ignoredPatterns.find((pattern) => minimatch(filePath, pattern));\n return !ignoredExt && !ignoredPattern && (filePath.endsWith('.mdx') || filePath.endsWith('.md'));\n }\n\n /**\n * returns the version of the current compiler instance (e.g. '4.0.1').\n */\n version(): string {\n return '';\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAA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atch","_interopRequireDefault","_compilationModules","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MDXCompiler","constructor","id","config","displayConfig","JSON","stringify","getDistDir","distDir","transpileFile","fileContent","options","afterMdxCompile","mdxCompileSync","filepath","filePath","bitFlavour","filePathAfterMdxCompile","replaceFileExtToJs","afterBabelCompile","babelTranspileFileContent","contents","rootDir","componentDir","babelTransformOptions","build","context","capsules","capsuleNetwork","seedersCapsules","componentsResults","map","capsule","srcFiles","component","filesystem","files","filter","file","isFileSupported","relative","errors","srcFile","transpiled","toString","path","undefined","outputFileSync","join","getDistPathBySrcPath","outputPath","outputText","length","err","artifacts","name","globPatterns","srcPath","fileWithNewExt","replace","ignoredExtensions","ignoredExt","find","ext","endsWith","ignoredPatterns","ignoredPattern","pattern","minimatch","version","exports"],"sources":["mdx.compiler.ts"],"sourcesContent":["import { join } from 'path';\nimport { outputFileSync } from 'fs-extra';\nimport type { Compiler, TranspileFileOutput, TranspileFileParams } from '@teambit/compiler';\nimport type { BuiltTaskResult, BuildContext } from '@teambit/builder';\nimport { compileSync as mdxCompileSync } from '@teambit/mdx.compilers.mdx-transpiler';\nimport minimatch from 'minimatch';\nimport { transpileFileContent as babelTranspileFileContent } from '@teambit/compilation.modules.babel-compiler';\nimport type { TransformOptions } from '@babel/core';\n\nexport type MDXCompilerOpts = {\n ignoredExtensions?: string[];\n ignoredPatterns?: string[];\n babelTransformOptions?: TransformOptions;\n};\nexport class MDXCompiler implements Compiler {\n displayName = 'MDX';\n\n shouldCopyNonSupportedFiles = true;\n\n distDir = 'dist';\n\n constructor(\n readonly id: string,\n readonly config: MDXCompilerOpts\n ) {}\n\n displayConfig() {\n return JSON.stringify(this.config, null, 2);\n }\n\n getDistDir() {\n return this.distDir;\n }\n\n transpileFile(fileContent: string, options: TranspileFileParams): TranspileFileOutput {\n const afterMdxCompile = mdxCompileSync(fileContent, {\n filepath: options.filePath,\n // this compiler is not indented to compile according to the bit flavour.\n bitFlavour: false,\n });\n const filePathAfterMdxCompile = this.replaceFileExtToJs(options.filePath);\n const afterBabelCompile = babelTranspileFileContent(\n afterMdxCompile.contents,\n {\n rootDir: options.componentDir,\n filePath: filePathAfterMdxCompile,\n },\n this.config.babelTransformOptions || {}\n );\n\n return afterBabelCompile;\n }\n\n /**\n * compile components inside isolated capsules. this being used during tag for the release.\n * meaning, the final package of the component has the dists generated by this method.\n */\n async build(context: BuildContext): Promise<BuiltTaskResult> {\n const capsules = context.capsuleNetwork.seedersCapsules;\n const componentsResults = capsules.map((capsule) => {\n const srcFiles = capsule.component.filesystem.files.filter((file) => {\n return this.isFileSupported(file.relative);\n });\n\n const errors = srcFiles.map((srcFile) => {\n try {\n const transpiled = this.transpileFile(srcFile.contents.toString('utf-8'), {\n filePath: this.replaceFileExtToJs(srcFile.relative),\n componentDir: capsule.path,\n });\n\n if (!transpiled) {\n return undefined;\n }\n\n outputFileSync(\n join(capsule.path, this.getDistPathBySrcPath(transpiled[0].outputPath)),\n transpiled[0].outputText\n );\n if (transpiled.length > 1) {\n outputFileSync(join(capsule.path, this.distDir, transpiled[1].outputPath), transpiled[1].outputText);\n }\n return undefined;\n } catch (err: any) {\n return err;\n }\n });\n\n return {\n errors: errors.filter((err) => !!err),\n component: capsule.component,\n };\n });\n\n return {\n componentsResults,\n artifacts: [\n {\n name: 'dist',\n globPatterns: [`${this.distDir}/**`],\n },\n ],\n };\n }\n\n /**\n * given a source file, return its parallel in the dists. e.g. \"index.ts\" => \"dist/index.js\"\n * both, the return path and the given path are relative paths.\n */\n getDistPathBySrcPath(srcPath: string): string {\n const fileWithNewExt = this.replaceFileExtToJs(srcPath);\n return join(this.distDir, fileWithNewExt);\n }\n\n private replaceFileExtToJs(srcPath: string): string {\n let fileWithNewExt = srcPath;\n if (this.isFileSupported(srcPath)) {\n fileWithNewExt = srcPath.replace('.mdx', '.mdx.js');\n }\n return fileWithNewExt;\n }\n\n /**\n * only supported files matching get compiled. others, are copied to the dist dir.\n */\n isFileSupported(filePath: string): boolean {\n const ignoredExtensions = this.config.ignoredExtensions ?? [];\n const ignoredExt = ignoredExtensions.find((ext) => filePath.endsWith(ext));\n const ignoredPatterns = this.config.ignoredPatterns ?? [];\n const ignoredPattern = ignoredPatterns.find((pattern) => minimatch(filePath, pattern));\n return !ignoredExt && !ignoredPattern && (filePath.endsWith('.mdx') || filePath.endsWith('.md'));\n }\n\n /**\n * returns the version of the current compiler instance (e.g. '4.0.1').\n */\n version(): string {\n return '';\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,oBAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,mBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgH,SAAAK,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAA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UAAU,GAAGD,iBAAiB,CAACE,IAAI,CAAEC,GAAG,IAAKhD,QAAQ,CAACiD,QAAQ,CAACD,GAAG,CAAC,CAAC;IAC1E,MAAME,eAAe,GAAG,IAAI,CAAC9D,MAAM,CAAC8D,eAAe,IAAI,EAAE;IACzD,MAAMC,cAAc,GAAGD,eAAe,CAACH,IAAI,CAAEK,OAAO,IAAK,IAAAC,oBAAS,EAACrD,QAAQ,EAAEoD,OAAO,CAAC,CAAC;IACtF,OAAO,CAACN,UAAU,IAAI,CAACK,cAAc,KAAKnD,QAAQ,CAACiD,QAAQ,CAAC,MAAM,CAAC,IAAIjD,QAAQ,CAACiD,QAAQ,CAAC,KAAK,CAAC,CAAC;EAClG;;EAEA;AACF;AACA;EACEK,OAAOA,CAAA,EAAW;IAChB,OAAO,EAAE;EACX;AACF;AAACC,OAAA,CAAAtE,WAAA,GAAAA,WAAA","ignoreList":[]}
|
package/dist/mdx.detector.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DependencyDetector, FileContext } from '@teambit/dependency-resolver';
|
|
1
|
+
import type { DependencyDetector, FileContext } from '@teambit/dependency-resolver';
|
|
2
2
|
export declare class MDXDependencyDetector implements DependencyDetector {
|
|
3
3
|
private supportedExtensions;
|
|
4
4
|
constructor(supportedExtensions: string[]);
|
package/dist/mdx.detector.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mdxCompilers","data","require","MDXDependencyDetector","constructor","supportedExtensions","isSupported","context","includes","ext","detect","source","output","compileSync","imports","getImportSpecifiers","files","map","importSpec","fromModule","exports"],"sources":["mdx.detector.ts"],"sourcesContent":["import { DependencyDetector, FileContext } from '@teambit/dependency-resolver';\nimport { compileSync } from '@teambit/mdx.compilers.mdx-transpiler';\n\nexport class MDXDependencyDetector implements DependencyDetector {\n constructor(private supportedExtensions: string[]) {}\n\n isSupported(context: FileContext): boolean {\n return this.supportedExtensions.includes(context.ext);\n }\n\n detect(source: string): string[] {\n const output = compileSync(source);\n const imports = output.getImportSpecifiers();\n if (!imports) return [];\n const files: string[] = imports.map((importSpec) => {\n return importSpec.fromModule;\n });\n\n return files;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,qBAAqB,CAA+B;EAC/DC,WAAWA,CAASC,mBAA6B,EAAE;IAAA,KAA/BA,mBAA6B,GAA7BA,mBAA6B;EAAG;EAEpDC,WAAWA,CAACC,OAAoB,EAAW;IACzC,OAAO,IAAI,CAACF,mBAAmB,CAACG,QAAQ,CAACD,OAAO,CAACE,GAAG,CAAC;EACvD;EAEAC,MAAMA,CAACC,MAAc,EAAY;IAC/B,MAAMC,MAAM,GAAG,IAAAC,2BAAW,EAACF,MAAM,CAAC;IAClC,MAAMG,OAAO,GAAGF,MAAM,CAACG,mBAAmB,CAAC,CAAC;IAC5C,IAAI,CAACD,OAAO,EAAE,OAAO,EAAE;IACvB,MAAME,KAAe,GAAGF,OAAO,CAACG,GAAG,CAAEC,UAAU,IAAK;MAClD,OAAOA,UAAU,CAACC,UAAU;IAC9B,CAAC,CAAC;IAEF,OAAOH,KAAK;EACd;AACF;AAACI,OAAA,CAAAjB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_mdxCompilers","data","require","MDXDependencyDetector","constructor","supportedExtensions","isSupported","context","includes","ext","detect","source","output","compileSync","imports","getImportSpecifiers","files","map","importSpec","fromModule","exports"],"sources":["mdx.detector.ts"],"sourcesContent":["import type { DependencyDetector, FileContext } from '@teambit/dependency-resolver';\nimport { compileSync } from '@teambit/mdx.compilers.mdx-transpiler';\n\nexport class MDXDependencyDetector implements DependencyDetector {\n constructor(private supportedExtensions: string[]) {}\n\n isSupported(context: FileContext): boolean {\n return this.supportedExtensions.includes(context.ext);\n }\n\n detect(source: string): string[] {\n const output = compileSync(source);\n const imports = output.getImportSpecifiers();\n if (!imports) return [];\n const files: string[] = imports.map((importSpec) => {\n return importSpec.fromModule;\n });\n\n return files;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,qBAAqB,CAA+B;EAC/DC,WAAWA,CAASC,mBAA6B,EAAE;IAAA,KAA/BA,mBAA6B,GAA7BA,mBAA6B;EAAG;EAEpDC,WAAWA,CAACC,OAAoB,EAAW;IACzC,OAAO,IAAI,CAACF,mBAAmB,CAACG,QAAQ,CAACD,OAAO,CAACE,GAAG,CAAC;EACvD;EAEAC,MAAMA,CAACC,MAAc,EAAY;IAC/B,MAAMC,MAAM,GAAG,IAAAC,2BAAW,EAACF,MAAM,CAAC;IAClC,MAAMG,OAAO,GAAGF,MAAM,CAACG,mBAAmB,CAAC,CAAC;IAC5C,IAAI,CAACD,OAAO,EAAE,OAAO,EAAE;IACvB,MAAME,KAAe,GAAGF,OAAO,CAACG,GAAG,CAAEC,UAAU,IAAK;MAClD,OAAOA,UAAU,CAACC,UAAU;IAC9B,CAAC,CAAC;IAEF,OAAOH,KAAK;EACd;AACF;AAACI,OAAA,CAAAjB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
package/dist/mdx.doc-reader.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_docs","data","require","_mdxCompilers","MDXDocReader","constructor","extensions","read","path","contents","output","compile","toString","filepath","metadata","getMetadata","doc","Doc","from","isFormatSupported","format","includes","exports"],"sources":["mdx.doc-reader.ts"],"sourcesContent":["import { DocReader
|
|
1
|
+
{"version":3,"names":["_docs","data","require","_mdxCompilers","MDXDocReader","constructor","extensions","read","path","contents","output","compile","toString","filepath","metadata","getMetadata","doc","Doc","from","isFormatSupported","format","includes","exports"],"sources":["mdx.doc-reader.ts"],"sourcesContent":["import type { DocReader } from '@teambit/docs';\nimport { Doc } from '@teambit/docs';\nimport { compile } from '@teambit/mdx.compilers.mdx-transpiler';\n\nexport class MDXDocReader implements DocReader {\n constructor(private extensions: string[]) {}\n\n async read(path: string, contents: Buffer) {\n const output = await compile(contents.toString('utf-8'), { filepath: path });\n const metadata = output.getMetadata();\n\n const doc = Doc.from(path, metadata);\n return doc;\n }\n\n isFormatSupported(format: string) {\n return this.extensions.includes(format);\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,cAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,YAAY,CAAsB;EAC7CC,WAAWA,CAASC,UAAoB,EAAE;IAAA,KAAtBA,UAAoB,GAApBA,UAAoB;EAAG;EAE3C,MAAMC,IAAIA,CAACC,IAAY,EAAEC,QAAgB,EAAE;IACzC,MAAMC,MAAM,GAAG,MAAM,IAAAC,uBAAO,EAACF,QAAQ,CAACG,QAAQ,CAAC,OAAO,CAAC,EAAE;MAAEC,QAAQ,EAAEL;IAAK,CAAC,CAAC;IAC5E,MAAMM,QAAQ,GAAGJ,MAAM,CAACK,WAAW,CAAC,CAAC;IAErC,MAAMC,GAAG,GAAGC,WAAG,CAACC,IAAI,CAACV,IAAI,EAAEM,QAAQ,CAAC;IACpC,OAAOE,GAAG;EACZ;EAEAG,iBAAiBA,CAACC,MAAc,EAAE;IAChC,OAAO,IAAI,CAACd,UAAU,CAACe,QAAQ,CAACD,MAAM,CAAC;EACzC;AACF;AAACE,OAAA,CAAAlB,YAAA,GAAAA,YAAA","ignoreList":[]}
|
package/dist/mdx.env.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Environment } from '@teambit/envs';
|
|
2
|
-
import { ReactMain } from '@teambit/react';
|
|
3
|
-
import { Logger } from '@teambit/logger';
|
|
4
|
-
import { MultiCompilerMain } from '@teambit/multi-compiler';
|
|
5
|
-
import { CompilerMain } from '@teambit/compiler';
|
|
6
|
-
import { DocsMain } from '@teambit/docs';
|
|
7
|
-
import {
|
|
1
|
+
import type { Environment } from '@teambit/envs';
|
|
2
|
+
import type { ReactMain } from '@teambit/react';
|
|
3
|
+
import type { Logger } from '@teambit/logger';
|
|
4
|
+
import type { MultiCompilerMain } from '@teambit/multi-compiler';
|
|
5
|
+
import type { CompilerMain } from '@teambit/compiler';
|
|
6
|
+
import type { DocsMain } from '@teambit/docs';
|
|
7
|
+
import type { MDXCompilerOpts } from './mdx.compiler';
|
|
8
|
+
import { MDXCompiler } from './mdx.compiler';
|
|
8
9
|
export declare const MdxEnvType = "mdx";
|
|
9
10
|
export declare class MdxEnv implements Environment {
|
|
10
11
|
private react;
|
package/dist/mdx.env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_lodash","data","require","_compilation","_babel","_mdx","_mdx2","MdxEnvType","exports","MdxEnv","constructor","react","logger","multiCompiler","compiler","docs","getCompiler","tsTransformer","tsconfig","setCompileJs","setCompileJsx","setShouldCopyNonSupportedFiles","tsCompiler","env","babelCompiler","BabelCompiler","create","babelTransformOptions","babelConfig","shouldCopyNonSupportedFiles","createCompiler","createMdxCompiler","ignoredPatterns","getPatterns","getBuildPipe","mdxCompiler","createTask","reactEnv","createBuildPipeWithoutCompiler","getDependencies","mdxDeps","dependencies","merge","opts","MDXCompiler","MDXAspect","id","__getDescriptor","type"],"sources":["mdx.env.ts"],"sourcesContent":["import { Environment } from '@teambit/envs';\nimport { merge } from 'lodash';\nimport { ReactMain } from '@teambit/react';\nimport { BabelCompiler } from '@teambit/compilation.babel-compiler';\nimport { TypescriptConfigMutator } from '@teambit/typescript.modules.ts-config-mutator';\nimport { TsConfigTransformer } from '@teambit/typescript';\nimport { babelConfig } from './babel/babel.config';\nimport { Logger } from '@teambit/logger';\nimport { MultiCompilerMain } from '@teambit/multi-compiler';\nimport { CompilerMain } from '@teambit/compiler';\nimport { DocsMain } from '@teambit/docs';\nimport { MDXAspect } from './mdx.aspect';\nimport {
|
|
1
|
+
{"version":3,"names":["_lodash","data","require","_compilation","_babel","_mdx","_mdx2","MdxEnvType","exports","MdxEnv","constructor","react","logger","multiCompiler","compiler","docs","getCompiler","tsTransformer","tsconfig","setCompileJs","setCompileJsx","setShouldCopyNonSupportedFiles","tsCompiler","env","babelCompiler","BabelCompiler","create","babelTransformOptions","babelConfig","shouldCopyNonSupportedFiles","createCompiler","createMdxCompiler","ignoredPatterns","getPatterns","getBuildPipe","mdxCompiler","createTask","reactEnv","createBuildPipeWithoutCompiler","getDependencies","mdxDeps","dependencies","merge","opts","MDXCompiler","MDXAspect","id","__getDescriptor","type"],"sources":["mdx.env.ts"],"sourcesContent":["import type { Environment } from '@teambit/envs';\nimport { merge } from 'lodash';\nimport type { ReactMain } from '@teambit/react';\nimport { BabelCompiler } from '@teambit/compilation.babel-compiler';\nimport type { TypescriptConfigMutator } from '@teambit/typescript.modules.ts-config-mutator';\nimport type { TsConfigTransformer } from '@teambit/typescript';\nimport { babelConfig } from './babel/babel.config';\nimport type { Logger } from '@teambit/logger';\nimport type { MultiCompilerMain } from '@teambit/multi-compiler';\nimport type { CompilerMain } from '@teambit/compiler';\nimport type { DocsMain } from '@teambit/docs';\nimport { MDXAspect } from './mdx.aspect';\nimport type { MDXCompilerOpts } from './mdx.compiler';\nimport { MDXCompiler } from './mdx.compiler';\n\nexport const MdxEnvType = 'mdx';\n\nexport class MdxEnv implements Environment {\n constructor(\n private react: ReactMain,\n private logger: Logger,\n private multiCompiler: MultiCompilerMain,\n private compiler: CompilerMain,\n private docs: DocsMain\n ) {}\n getCompiler() {\n const tsTransformer: TsConfigTransformer = (tsconfig: TypescriptConfigMutator) => {\n // set the shouldCopyNonSupportedFiles to false since we don't want ts to copy the .mdx file to the dist folder (it will conflict with the .mdx.js file created by the mdx compiler)\n tsconfig.setCompileJs(false).setCompileJsx(false).setShouldCopyNonSupportedFiles(false);\n return tsconfig;\n };\n const tsCompiler = this.react.env.getCompiler([tsTransformer]);\n\n const babelCompiler = BabelCompiler.create(\n {\n babelTransformOptions: babelConfig,\n // set the shouldCopyNonSupportedFiles to false since we don't want babel to copy the .mdx file to the dist\n // folder (it will conflict with the .mdx.js file created by the mdx compiler)\n shouldCopyNonSupportedFiles: false,\n },\n { logger: this.logger }\n );\n\n return this.multiCompiler.createCompiler(\n [\n babelCompiler,\n this.createMdxCompiler({ ignoredPatterns: this.docs.getPatterns(), babelTransformOptions: babelConfig }),\n tsCompiler,\n ],\n {}\n );\n }\n\n getBuildPipe() {\n const mdxCompiler = this.getCompiler();\n return [\n this.compiler.createTask('MDXCompiler', mdxCompiler),\n ...this.react.reactEnv.createBuildPipeWithoutCompiler(),\n ];\n }\n\n async getDependencies() {\n const mdxDeps = {\n dependencies: {\n '@teambit/mdx.ui.mdx-scope-context': '1.0.0',\n '@mdx-js/react': '1.6.22',\n },\n };\n return merge(this.react.reactEnv.getDependencies(), mdxDeps);\n }\n\n /**\n * create an instance of the MDX compiler.\n */\n createMdxCompiler(opts: MDXCompilerOpts = {}) {\n const mdxCompiler = new MDXCompiler(MDXAspect.id, opts);\n return mdxCompiler;\n }\n\n async __getDescriptor() {\n return {\n type: 'mdx',\n };\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;A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AO,IAAI,CAACC,aAAa,CAACiB,cAAc,CACtC,CACEN,aAAa,EACb,IAAI,CAACO,iBAAiB,CAAC;MAAEC,eAAe,EAAE,IAAI,CAACjB,IAAI,CAACkB,WAAW,CAAC,CAAC;MAAEN,qBAAqB,EAAEC;IAAY,CAAC,CAAC,EACxGN,UAAU,CACX,EACD,CAAC,CACH,CAAC;EACH;EAEAY,YAAYA,CAAA,EAAG;IACb,MAAMC,WAAW,GAAG,IAAI,CAACnB,WAAW,CAAC,CAAC;IACtC,OAAO,CACL,IAAI,CAACF,QAAQ,CAACsB,UAAU,CAAC,aAAa,EAAED,WAAW,CAAC,EACpD,GAAG,IAAI,CAACxB,KAAK,CAAC0B,QAAQ,CAACC,8BAA8B,CAAC,CAAC,CACxD;EACH;EAEA,MAAMC,eAAeA,CAAA,EAAG;IACtB,MAAMC,OAAO,GAAG;MACdC,YAAY,EAAE;QACZ,mCAAmC,EAAE,OAAO;QAC5C,eAAe,EAAE;MACnB;IACF,CAAC;IACD,OAAO,IAAAC,eAAK,EAAC,IAAI,CAAC/B,KAAK,CAAC0B,QAAQ,CAACE,eAAe,CAAC,CAAC,EAAEC,OAAO,CAAC;EAC9D;;EAEA;AACF;AACA;EACET,iBAAiBA,CAACY,IAAqB,GAAG,CAAC,CAAC,EAAE;IAC5C,MAAMR,WAAW,GAAG,KAAIS,mBAAW,EAACC,gBAAS,CAACC,EAAE,EAAEH,IAAI,CAAC;IACvD,OAAOR,WAAW;EACpB;EAEA,MAAMY,eAAeA,CAAA,EAAG;IACtB,OAAO;MACLC,IAAI,EAAE;IACR,CAAC;EACH;AACF;AAACxC,OAAA,CAAAC,MAAA,GAAAA,MAAA","ignoreList":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Harmony } from '@teambit/harmony';
|
|
2
|
-
import { CompilerMain } from '@teambit/compiler';
|
|
3
|
-
import { DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
4
|
-
import { DocsMain } from '@teambit/docs';
|
|
5
|
-
import { LoggerMain } from '@teambit/logger';
|
|
6
|
-
import { WorkerMain } from '@teambit/worker';
|
|
7
|
-
import { EnvsMain } from '@teambit/envs';
|
|
8
|
-
import { MultiCompilerMain } from '@teambit/multi-compiler';
|
|
9
|
-
import { ReactMain } from '@teambit/react';
|
|
10
|
-
import { GeneratorMain } from '@teambit/generator';
|
|
11
|
-
import { MDXCompilerOpts } from './mdx.compiler';
|
|
1
|
+
import type { Harmony } from '@teambit/harmony';
|
|
2
|
+
import type { CompilerMain } from '@teambit/compiler';
|
|
3
|
+
import type { DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
4
|
+
import type { DocsMain } from '@teambit/docs';
|
|
5
|
+
import type { LoggerMain } from '@teambit/logger';
|
|
6
|
+
import type { WorkerMain } from '@teambit/worker';
|
|
7
|
+
import type { EnvsMain } from '@teambit/envs';
|
|
8
|
+
import type { MultiCompilerMain } from '@teambit/multi-compiler';
|
|
9
|
+
import type { ReactMain } from '@teambit/react';
|
|
10
|
+
import type { GeneratorMain } from '@teambit/generator';
|
|
11
|
+
import type { MDXCompilerOpts } from './mdx.compiler';
|
|
12
12
|
import { MdxEnv } from './mdx.env';
|
|
13
13
|
export type MDXConfig = {
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_compiler","_dependencyResolver","_docs","_componentId","_logger","_worker","_envs","_multiCompiler","_react","_generator","_mdx","_mdx2","_mdx3","_mdx4","_mdx5","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MDXMain","constructor","icon","createCompiler","opts","mdxEnv","createMdxCompiler","_mdxEnv","provider","docs","depResolver","react","envs","multiCompiler","compiler","generator","loggerAspect","workerMain","config","slots","harmony","mdx","logger","createLogger","MDXAspect","id","merge","MdxEnv","reactEnv","registerEnv","registerDetector","MDXDependencyDetector","extensions","registerDocReader","MDXDocReader","envContext","EnvContext","ComponentID","fromString","ReactAspect","registerComponentTemplate","getTemplates","exports","MainRuntime","DocsAspect","DependencyResolverAspect","EnvsAspect","MultiCompilerAspect","CompilerAspect","GeneratorAspect","LoggerAspect","WorkerAspect","addRuntime"],"sources":["mdx.main.runtime.ts"],"sourcesContent":["import { Harmony } from '@teambit/harmony';\nimport { MainRuntime } from '@teambit/cli';\nimport {
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_compiler","_dependencyResolver","_docs","_componentId","_logger","_worker","_envs","_multiCompiler","_react","_generator","_mdx","_mdx2","_mdx3","_mdx4","_mdx5","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MDXMain","constructor","icon","createCompiler","opts","mdxEnv","createMdxCompiler","_mdxEnv","provider","docs","depResolver","react","envs","multiCompiler","compiler","generator","loggerAspect","workerMain","config","slots","harmony","mdx","logger","createLogger","MDXAspect","id","merge","MdxEnv","reactEnv","registerEnv","registerDetector","MDXDependencyDetector","extensions","registerDocReader","MDXDocReader","envContext","EnvContext","ComponentID","fromString","ReactAspect","registerComponentTemplate","getTemplates","exports","MainRuntime","DocsAspect","DependencyResolverAspect","EnvsAspect","MultiCompilerAspect","CompilerAspect","GeneratorAspect","LoggerAspect","WorkerAspect","addRuntime"],"sources":["mdx.main.runtime.ts"],"sourcesContent":["import type { Harmony } from '@teambit/harmony';\nimport { MainRuntime } from '@teambit/cli';\nimport type { CompilerMain } from '@teambit/compiler';\nimport { CompilerAspect } from '@teambit/compiler';\nimport type { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { DependencyResolverAspect } from '@teambit/dependency-resolver';\nimport type { DocsMain } from '@teambit/docs';\nimport { DocsAspect } from '@teambit/docs';\nimport { ComponentID } from '@teambit/component-id';\nimport type { LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { WorkerMain } from '@teambit/worker';\nimport { WorkerAspect } from '@teambit/worker';\nimport type { EnvsMain } from '@teambit/envs';\nimport { EnvContext, EnvsAspect } from '@teambit/envs';\nimport type { MultiCompilerMain } from '@teambit/multi-compiler';\nimport { MultiCompilerAspect } from '@teambit/multi-compiler';\nimport type { ReactEnv, ReactMain } from '@teambit/react';\nimport { ReactAspect } from '@teambit/react';\nimport type { GeneratorMain } from '@teambit/generator';\nimport { GeneratorAspect } from '@teambit/generator';\nimport { MDXAspect } from './mdx.aspect';\nimport type { MDXCompilerOpts } from './mdx.compiler';\nimport { MDXDependencyDetector } from './mdx.detector';\nimport { MDXDocReader } from './mdx.doc-reader';\nimport { getTemplates } from './mdx.templates';\nimport { MdxEnv } from './mdx.env';\n\nexport type MDXConfig = {\n /**\n * list of file extensions to consider as MDX files.\n */\n extensions: string[];\n};\n\nexport class MDXMain {\n icon() {\n return 'https://static.bit.dev/extensions-icons/mdx-icon-small.svg';\n }\n\n /**\n * create an instance of the MDX compiler.\n */\n createCompiler(opts: MDXCompilerOpts = {}) {\n return this.mdxEnv.createMdxCompiler(opts);\n }\n\n _mdxEnv: MdxEnv;\n get mdxEnv() {\n return this._mdxEnv;\n }\n private set mdxEnv(value: MdxEnv) {\n this._mdxEnv = value;\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [\n DocsAspect,\n DependencyResolverAspect,\n ReactAspect,\n EnvsAspect,\n MultiCompilerAspect,\n CompilerAspect,\n GeneratorAspect,\n LoggerAspect,\n WorkerAspect,\n ];\n\n static defaultConfig = {\n extensions: ['.md', '.mdx'],\n };\n\n static async provider(\n [docs, depResolver, react, envs, multiCompiler, compiler, generator, loggerAspect, workerMain]: [\n DocsMain,\n DependencyResolverMain,\n ReactMain,\n EnvsMain,\n MultiCompilerMain,\n CompilerMain,\n GeneratorMain,\n LoggerMain,\n WorkerMain,\n ],\n config: MDXConfig,\n slots,\n harmony: Harmony\n ) {\n const mdx = new MDXMain();\n const logger = loggerAspect.createLogger(MDXAspect.id);\n\n const mdxEnv = envs.merge<MdxEnv, ReactEnv>(\n new MdxEnv(react, logger, multiCompiler, compiler, docs),\n react.reactEnv\n );\n\n envs.registerEnv(mdxEnv);\n depResolver.registerDetector(new MDXDependencyDetector(config.extensions));\n docs.registerDocReader(new MDXDocReader(config.extensions));\n if (generator) {\n const envContext = new EnvContext(ComponentID.fromString(ReactAspect.id), loggerAspect, workerMain, harmony);\n generator.registerComponentTemplate(() => getTemplates(envContext));\n }\n\n mdx.mdxEnv = mdxEnv;\n return mdx;\n }\n}\n\nMDXAspect.addRuntime(MDXMain);\n"],"mappings":";;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,oBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,mBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAA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4B,UAAU,CAACpD,OAAO,CAAC","ignoreList":[]}
|
package/dist/mdx.templates.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EnvContext } from '@teambit/envs';
|
|
2
|
-
import { ComponentTemplate } from '@teambit/generator';
|
|
1
|
+
import type { EnvContext } from '@teambit/envs';
|
|
2
|
+
import type { ComponentTemplate } from '@teambit/generator';
|
|
3
3
|
export declare function getTemplates(envContext: EnvContext): ComponentTemplate[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mdxGenerator","data","require","_generator","templateListHandler","TemplateList","from","MdxComponentTemplate","env","MdxEnvTemplate","getTemplates","envContext","templateList","compute"],"sources":["mdx.templates.ts"],"sourcesContent":["import { MdxComponentTemplate, MdxEnvTemplate } from '@teambit/mdx.generator.mdx-templates';\nimport { EnvContext } from '@teambit/envs';\nimport { ComponentTemplate
|
|
1
|
+
{"version":3,"names":["_mdxGenerator","data","require","_generator","templateListHandler","TemplateList","from","MdxComponentTemplate","env","MdxEnvTemplate","getTemplates","envContext","templateList","compute"],"sources":["mdx.templates.ts"],"sourcesContent":["import { MdxComponentTemplate, MdxEnvTemplate } from '@teambit/mdx.generator.mdx-templates';\nimport type { EnvContext } from '@teambit/envs';\nimport type { ComponentTemplate } from '@teambit/generator';\nimport { TemplateList } from '@teambit/generator';\n\nconst templateListHandler = TemplateList.from([\n MdxComponentTemplate.from({ env: 'teambit.mdx/mdx-env' }),\n MdxEnvTemplate.from({}),\n]);\n\nexport function getTemplates(envContext: EnvContext): ComponentTemplate[] {\n const templateList = templateListHandler(envContext);\n return templateList.compute();\n}\n"],"mappings":";;;;;;AAAA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAMG,mBAAmB,GAAGC,yBAAY,CAACC,IAAI,CAAC,CAC5CC,oCAAoB,CAACD,IAAI,CAAC;EAAEE,GAAG,EAAE;AAAsB,CAAC,CAAC,EACzDC,8BAAc,CAACH,IAAI,CAAC,CAAC,CAAC,CAAC,CACxB,CAAC;AAEK,SAASI,YAAYA,CAACC,UAAsB,EAAuB;EACxE,MAAMC,YAAY,GAAGR,mBAAmB,CAACO,UAAU,CAAC;EACpD,OAAOC,YAAY,CAACC,OAAO,CAAC,CAAC;AAC/B","ignoreList":[]}
|
package/dist/mdx.ui.runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CompositionsUI } from '@teambit/compositions';
|
|
2
|
-
import { TesterUI } from '@teambit/tester';
|
|
1
|
+
import type { CompositionsUI } from '@teambit/compositions';
|
|
2
|
+
import type { TesterUI } from '@teambit/tester';
|
|
3
3
|
export declare class MDXEnvUI {
|
|
4
4
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
5
5
|
static slots: never[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","_compositions","_ui","_tester","_designUi","_mdx","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MDXEnvUI","provider","compositionsUI","testerUi","mdxEnvUI","registerEmptyState","createElement","EmptyBox","title","linkText","link","exports","UIRuntime","CompositionsAspect","TesterAspect","MDXAspect","addRuntime","_default"],"sources":["mdx.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","_compositions","_ui","_tester","_designUi","_mdx","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MDXEnvUI","provider","compositionsUI","testerUi","mdxEnvUI","registerEmptyState","createElement","EmptyBox","title","linkText","link","exports","UIRuntime","CompositionsAspect","TesterAspect","MDXAspect","addRuntime","_default"],"sources":["mdx.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport type { CompositionsUI } from '@teambit/compositions';\nimport { CompositionsAspect } from '@teambit/compositions';\nimport { UIRuntime } from '@teambit/ui';\nimport type { TesterUI } from '@teambit/tester';\nimport { TesterAspect } from '@teambit/tester';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { MDXAspect } from './mdx.aspect';\n\nexport class MDXEnvUI {\n static runtime = UIRuntime;\n static slots = [];\n static dependencies = [CompositionsAspect, TesterAspect];\n\n static async provider([compositionsUI, testerUi]: [CompositionsUI, TesterUI]) {\n const mdxEnvUI = new MDXEnvUI();\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n testerUi.registerEmptyState(() => {\n return (\n <EmptyBox\n title=\"This component doesn’t have any tests.\"\n linkText=\"Learn how to add tests to your MDX components\"\n link={`https://bit.dev/docs/dev-services-overview/tester/tester-overview`}\n />\n );\n });\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n compositionsUI.registerEmptyState(() => {\n return (\n <EmptyBox\n title=\"This component doesn’t have any compositions.\"\n linkText=\"Learn how to add compositions to your MDX components\"\n link={`https://bit.dev/docs/dev-services-overview/compositions/compositions-overview`}\n />\n );\n });\n\n return mdxEnvUI;\n }\n}\n\nMDXAspect.addRuntime(MDXEnvUI);\n\nexport default MDXEnvUI;\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EA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 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.668/dist/mdx.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mdx_mdx@1.0.668/dist/mdx.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/mdx.ui.runtime.tsx
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { CompositionsUI } from '@teambit/compositions';
|
|
3
|
+
import { CompositionsAspect } from '@teambit/compositions';
|
|
3
4
|
import { UIRuntime } from '@teambit/ui';
|
|
4
|
-
import {
|
|
5
|
+
import type { TesterUI } from '@teambit/tester';
|
|
6
|
+
import { TesterAspect } from '@teambit/tester';
|
|
5
7
|
import { EmptyBox } from '@teambit/design.ui.empty-box';
|
|
6
8
|
import { MDXAspect } from './mdx.aspect';
|
|
7
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { linkModules } from '/home/circleci/.bvm/versions/1.12.17/bit-1.12.17/node_modules/@teambit/preview/dist/preview-modules.js';
|
|
3
3
|
|
|
4
|
-
import {defaultMainModule} from "/home/circleci/bit/bit/node_modules/@teambit/_local/preview-modules-
|
|
4
|
+
import {defaultMainModule} from "/home/circleci/bit/bit/node_modules/@teambit/_local/preview-modules-cf72038aae23437751eb71da99348a78344bd209.mjs";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/mdx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.668",
|
|
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.668"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/core": "7.19.6",
|
|
@@ -26,25 +26,25 @@
|
|
|
26
26
|
"@teambit/compilation.modules.babel-compiler": "0.0.141",
|
|
27
27
|
"@teambit/mdx.compilers.mdx-transpiler": "1.0.9",
|
|
28
28
|
"@teambit/compilation.babel-compiler": "1.1.13",
|
|
29
|
-
"@teambit/typescript.modules.ts-config-mutator": "0.0.85",
|
|
30
29
|
"@teambit/component-id": "1.2.4",
|
|
31
30
|
"@teambit/mdx.generator.mdx-templates": "1.0.12",
|
|
32
31
|
"@teambit/design.ui.empty-box": "0.0.363",
|
|
33
|
-
"@teambit/builder": "1.0.
|
|
34
|
-
"@teambit/compiler": "1.0.
|
|
35
|
-
"@teambit/dependency-resolver": "1.0.
|
|
36
|
-
"@teambit/docs": "1.0.
|
|
37
|
-
"@teambit/envs": "1.0.
|
|
38
|
-
"@teambit/logger": "0.0.
|
|
39
|
-
"@teambit/multi-compiler": "1.0.
|
|
40
|
-
"@teambit/react": "1.0.
|
|
41
|
-
"@teambit/typescript": "
|
|
42
|
-
"@teambit/
|
|
43
|
-
"@teambit/
|
|
44
|
-
"@teambit/
|
|
45
|
-
"@teambit/
|
|
46
|
-
"@teambit/
|
|
47
|
-
"@teambit/
|
|
32
|
+
"@teambit/builder": "1.0.668",
|
|
33
|
+
"@teambit/compiler": "1.0.668",
|
|
34
|
+
"@teambit/dependency-resolver": "1.0.668",
|
|
35
|
+
"@teambit/docs": "1.0.668",
|
|
36
|
+
"@teambit/envs": "1.0.668",
|
|
37
|
+
"@teambit/logger": "0.0.1338",
|
|
38
|
+
"@teambit/multi-compiler": "1.0.668",
|
|
39
|
+
"@teambit/react": "1.0.668",
|
|
40
|
+
"@teambit/typescript.modules.ts-config-mutator": "0.0.86",
|
|
41
|
+
"@teambit/typescript": "1.0.668",
|
|
42
|
+
"@teambit/cli": "0.0.1245",
|
|
43
|
+
"@teambit/generator": "1.0.669",
|
|
44
|
+
"@teambit/worker": "0.0.1549",
|
|
45
|
+
"@teambit/compositions": "1.0.668",
|
|
46
|
+
"@teambit/tester": "1.0.668",
|
|
47
|
+
"@teambit/ui": "1.0.668"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/fs-extra": "9.0.7",
|
|
File without changes
|