Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blocz/mdx-live

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocz/mdx-live - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

lib/mdx-live.js

@@ -1,2 +0,2 @@

import*as e from"react";import*as r from"react/jsx-runtime.js";import{compile as n}from"@mdx-js/mdx";import{selectAll as t}from"unist-util-select";function o(){return o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},o.apply(this,arguments)}function u(e,r){return u=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},u(e,r)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function c(e,r,n){return c=i()?Reflect.construct:function(e,r,n){var t=[null];t.push.apply(t,r);var o=new(Function.bind.apply(e,t));return n&&u(o,n.prototype),o},c.apply(null,arguments)}function a(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function f(e,r,n){if(!e.s){if(n instanceof s){if(!n.s)return void(n.o=f.bind(null,e,r));1&r&&(r=n.s),n=n.v}if(n&&n.then)return void n.then(f.bind(null,e,r),f.bind(null,e,2));e.s=r,e.v=n;var t=e.o;t&&t(e)}}var l=function(){return Promise.resolve()};const s=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(r,n){const t=new e,o=this.s;if(o){const e=1&o?r:n;if(e){try{f(t,1,e(this.v))}catch(e){f(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?f(t,1,r?r(o):o):n?f(t,1,n(o)):f(t,2,o)}catch(e){f(t,2,e)}},t},e}();var v="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function p(e){return e instanceof s&&1&e.s}function m(e,r,n){if("function"==typeof e[v]){var t,o,u,i=e[v]();if(function e(c){try{for(;!((t=i.next()).done||n&&n());)if((c=r(t.value))&&c.then){if(!p(c))return void c.then(e,u||(u=f.bind(null,o=new s,2)));c=c.v}o?f(o,1,c):o=c}catch(e){f(o||(o=new s),2,e)}}(),i.return){var c=function(e){try{t.done||i.return()}catch(e){}return e};if(o&&o.then)return o.then(c,function(e){throw c(e)});c()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var a=[],l=0;l<e.length;l++)a.push(e[l]);return function(e,r,n){var t,o,u=-1;return function i(c){try{for(;++u<e.length&&(!n||!n());)if((c=r(u))&&c.then){if(!p(c))return void c.then(i,o||(o=f.bind(null,t=new s,2)));c=c.v}t?f(t,1,c):t=c}catch(e){f(t||(t=new s),2,e)}}(),t}(a,function(e){return r(a[e])},n)}var h=function(r){var o=r.code,u=r.resolveImport,i=void 0===u?l:u,c=r.recmaPlugins,v=r.rehypePlugins,p=r.remarkPlugins,h=r.providerImportSource,d=e.useState(void 0),y=d[0],b=d[1],g=e.useRef(null),P=e.useRef(!1);e.useEffect(function(){return function(){P.current=!0}},[]);var S=e.useCallback(function(){if(g.current){var e,r,o=g.current;(e=o,r=[],n(e.code,{outputFormat:"function-body",providerImportSource:e.providerImportSource,recmaPlugins:e.recmaPlugins,rehypePlugins:e.rehypePlugins,remarkPlugins:[].concat(e.remarkPlugins||[],[function(){return function(e){try{for(var n,o=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return a(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,r):void 0}}(e))){n&&(e=n);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t("mdxjsEsm",e));!(n=o()).done;)for(var u=n.value,i=u.data.estree.body,c=i.length-1;c>=0;c--){var f=i[c];"ImportDeclaration"===f.type&&(i.splice(c,1),u.value=u.value.substring(0,f.range[0]-1)+u.value.substring(f.range[1]-1),r.push(f))}return Promise.resolve()}catch(e){return Promise.reject(e)}}}])}).then(function(e){return[e,r]})).then(function(e){P.current||b(e)}).catch(function(e){console.error(e)}).then(function(){g.current===o&&(g.current=null),P.current||S()})}},[]);e.useMemo(function(){var e=null===g.current;g.current={code:o,recmaPlugins:c,rehypePlugins:v,remarkPlugins:p,providerImportSource:h},e&&S()},[o,c,v,p]);var k=e.useRef();k.current||(k.current=new WeakSet);var I=e.useState({}),w=I[0],j=I[1];return e.useEffect(function(){if(y){var e=!1;return function(){try{var r=function(){e||(k.current.add(y),j(n))},n={},t=m(y[1],function(e){return m(e.specifiers,function(r){var t=function(e,r){var n,t=-1;e:{for(var o=0;o<r.length;o++){var u=r[o][0];if(u){var i=u();if(i&&i.then)break e;if(i===e){t=o;break}}else t=o}if(-1!==t){do{for(var c=r[t][1];!c;)t++,c=r[t][1];var a=c();if(a&&a.then){n=!0;break e}var l=r[t][2];t++}while(l&&!l());return a}}var v=new s,p=f.bind(null,v,2);return(n?a.then(m):i.then(function n(i){for(;;){if(i===e){t=o;break}if(++o===r.length){if(-1!==t)break;return void f(v,1,a)}if(u=r[o][0]){if((i=u())&&i.then)return void i.then(n).then(void 0,p)}else t=o}do{for(var c=r[t][1];!c;)t++,c=r[t][1];var a=c();if(a&&a.then)return void a.then(m).then(void 0,p);var l=r[t][2];t++}while(l&&!l());f(v,1,a)})).then(void 0,p),v;function m(e){for(;;){var n=r[t][2];if(!n||n())break;t++;for(var o=r[t][1];!o;)t++,o=r[t][1];if((e=o())&&e.then)return void e.then(m).then(void 0,p)}f(v,1,e)}}(r.type,[[function(){return"ImportNamespaceSpecifier"},function(){return Promise.resolve(i({kind:"namespace",path:e.source.value})).then(function(e){n[r.local.name]=e})}],[function(){return"ImportDefaultSpecifier"},function(){return Promise.resolve(i({kind:"default",path:e.source.value})).then(function(e){n[r.local.name]=e})}],[function(){return"ImportSpecifier"},function(){return Promise.resolve(i({kind:"named",path:e.source.value,variable:r.imported.name})).then(function(e){n[r.local.name]=e})}]]);if(t&&t.then)return t.then(function(){})})});Promise.resolve(t&&t.then?t.then(r):r())}catch(e){return Promise.reject(e)}}(),function(){e=!0}}},[i,y]),y?{resolvedImports:w,text:y[0].toString(),isReady:k.current.has(y)}:{resolvedImports:{},text:"",isReady:!1}},d=["default"],y=function(r){return e.createElement(e.Fragment,null,r.children)},b=function(n){var t=n.Provider,u=void 0===t?y:t,i=n.defaultScope,a=n.useMDXComponents,f=h({code:n.code,resolveImport:n.resolveImport,providerImportSource:a?"something different than empty string":void 0,recmaPlugins:n.recmaPlugins,rehypePlugins:n.rehypePlugins,remarkPlugins:n.remarkPlugins}),l=f.resolvedImports,s=f.text,v=f.isReady,p=e.useMemo(function(){return o({},i,l)},[i,l]),m=e.useMemo(function(){return s?c(Function,["__first_argument__"].concat(Object.keys(p),[s])).apply(void 0,[o({},r,{useMDXComponents:a})].concat(Object.values(p))):function(){return null}},[s,p]);if(!v)return null;var b=m.default,g=function(e,r){if(null==e)return{};var n,t,o={},u=Object.keys(e);for(t=0;t<u.length;t++)r.indexOf(n=u[t])>=0||(o[n]=e[n]);return o}(m,d);return e.createElement(u,{value:{scope:o({},p,g),text:s,isReady:v}},e.createElement(b,{components:p}))};export{b as MDX,h as useMDX};
import*as e from"react";import*as r from"react/jsx-runtime";import{compile as n}from"@mdx-js/mdx";import{selectAll as t}from"unist-util-select";function o(){return o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},o.apply(this,arguments)}function u(e,r){return u=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},u(e,r)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function c(e,r,n){return c=i()?Reflect.construct:function(e,r,n){var t=[null];t.push.apply(t,r);var o=new(Function.bind.apply(e,t));return n&&u(o,n.prototype),o},c.apply(null,arguments)}function a(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function f(e,r,n){if(!e.s){if(n instanceof s){if(!n.s)return void(n.o=f.bind(null,e,r));1&r&&(r=n.s),n=n.v}if(n&&n.then)return void n.then(f.bind(null,e,r),f.bind(null,e,2));e.s=r,e.v=n;var t=e.o;t&&t(e)}}var l=function(){return Promise.resolve()};const s=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(r,n){const t=new e,o=this.s;if(o){const e=1&o?r:n;if(e){try{f(t,1,e(this.v))}catch(e){f(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?f(t,1,r?r(o):o):n?f(t,1,n(o)):f(t,2,o)}catch(e){f(t,2,e)}},t},e}();var v="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function p(e){return e instanceof s&&1&e.s}function m(e,r,n){if("function"==typeof e[v]){var t,o,u,i=e[v]();if(function e(c){try{for(;!((t=i.next()).done||n&&n());)if((c=r(t.value))&&c.then){if(!p(c))return void c.then(e,u||(u=f.bind(null,o=new s,2)));c=c.v}o?f(o,1,c):o=c}catch(e){f(o||(o=new s),2,e)}}(),i.return){var c=function(e){try{t.done||i.return()}catch(e){}return e};if(o&&o.then)return o.then(c,function(e){throw c(e)});c()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var a=[],l=0;l<e.length;l++)a.push(e[l]);return function(e,r,n){var t,o,u=-1;return function i(c){try{for(;++u<e.length&&(!n||!n());)if((c=r(u))&&c.then){if(!p(c))return void c.then(i,o||(o=f.bind(null,t=new s,2)));c=c.v}t?f(t,1,c):t=c}catch(e){f(t||(t=new s),2,e)}}(),t}(a,function(e){return r(a[e])},n)}var h=function(r){var o=r.code,u=r.resolveImport,i=void 0===u?l:u,c=r.recmaPlugins,v=r.rehypePlugins,p=r.remarkPlugins,h=r.providerImportSource,d=e.useState(void 0),y=d[0],b=d[1],g=e.useRef(null),P=e.useRef(!1);e.useEffect(function(){return function(){P.current=!0}},[]);var S=e.useCallback(function(){if(g.current){var e,r,o=g.current;(e=o,r=[],n(e.code,{outputFormat:"function-body",providerImportSource:e.providerImportSource,recmaPlugins:e.recmaPlugins,rehypePlugins:e.rehypePlugins,remarkPlugins:[].concat(e.remarkPlugins||[],[function(){return function(e){try{for(var n,o=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return a(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,r):void 0}}(e))){n&&(e=n);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t("mdxjsEsm",e));!(n=o()).done;)for(var u=n.value,i=u.data.estree.body,c=i.length-1;c>=0;c--){var f=i[c];"ImportDeclaration"===f.type&&(i.splice(c,1),u.value=u.value.substring(0,f.range[0]-1)+u.value.substring(f.range[1]-1),r.push(f))}return Promise.resolve()}catch(e){return Promise.reject(e)}}}])}).then(function(e){return[e,r]})).then(function(e){P.current||b(e)}).catch(function(e){console.error(e)}).then(function(){g.current===o&&(g.current=null),P.current||S()})}},[]);e.useMemo(function(){var e=null===g.current;g.current={code:o,recmaPlugins:c,rehypePlugins:v,remarkPlugins:p,providerImportSource:h},e&&S()},[o,c,v,p]);var k=e.useRef();k.current||(k.current=new WeakSet);var I=e.useState({}),w=I[0],j=I[1];return e.useEffect(function(){if(y){var e=!1;return function(){try{var r=function(){e||(k.current.add(y),j(n))},n={},t=m(y[1],function(e){return m(e.specifiers,function(r){var t=function(e,r){var n,t=-1;e:{for(var o=0;o<r.length;o++){var u=r[o][0];if(u){var i=u();if(i&&i.then)break e;if(i===e){t=o;break}}else t=o}if(-1!==t){do{for(var c=r[t][1];!c;)t++,c=r[t][1];var a=c();if(a&&a.then){n=!0;break e}var l=r[t][2];t++}while(l&&!l());return a}}var v=new s,p=f.bind(null,v,2);return(n?a.then(m):i.then(function n(i){for(;;){if(i===e){t=o;break}if(++o===r.length){if(-1!==t)break;return void f(v,1,a)}if(u=r[o][0]){if((i=u())&&i.then)return void i.then(n).then(void 0,p)}else t=o}do{for(var c=r[t][1];!c;)t++,c=r[t][1];var a=c();if(a&&a.then)return void a.then(m).then(void 0,p);var l=r[t][2];t++}while(l&&!l());f(v,1,a)})).then(void 0,p),v;function m(e){for(;;){var n=r[t][2];if(!n||n())break;t++;for(var o=r[t][1];!o;)t++,o=r[t][1];if((e=o())&&e.then)return void e.then(m).then(void 0,p)}f(v,1,e)}}(r.type,[[function(){return"ImportNamespaceSpecifier"},function(){return Promise.resolve(i({kind:"namespace",path:e.source.value})).then(function(e){n[r.local.name]=e})}],[function(){return"ImportDefaultSpecifier"},function(){return Promise.resolve(i({kind:"default",path:e.source.value})).then(function(e){n[r.local.name]=e})}],[function(){return"ImportSpecifier"},function(){return Promise.resolve(i({kind:"named",path:e.source.value,variable:r.imported.name})).then(function(e){n[r.local.name]=e})}]]);if(t&&t.then)return t.then(function(){})})});Promise.resolve(t&&t.then?t.then(r):r())}catch(e){return Promise.reject(e)}}(),function(){e=!0}}},[i,y]),y?{resolvedImports:w,text:y[0].toString(),isReady:k.current.has(y)}:{resolvedImports:{},text:"",isReady:!1}},d=["default"],y=function(r){return e.createElement(e.Fragment,null,r.children)},b=function(n){var t=n.Provider,u=void 0===t?y:t,i=n.defaultScope,a=n.useMDXComponents,f=h({code:n.code,resolveImport:n.resolveImport,providerImportSource:a?"something different than empty string":void 0,recmaPlugins:n.recmaPlugins,rehypePlugins:n.rehypePlugins,remarkPlugins:n.remarkPlugins}),l=f.resolvedImports,s=f.text,v=f.isReady,p=e.useMemo(function(){return o({},i,l)},[i,l]),m=e.useMemo(function(){return s?c(Function,["__first_argument__"].concat(Object.keys(p),[s])).apply(void 0,[o({},r,{useMDXComponents:a})].concat(Object.values(p))):function(){return null}},[s,p]);if(!v)return null;var b=m.default,g=function(e,r){if(null==e)return{};var n,t,o={},u=Object.keys(e);for(t=0;t<u.length;t++)r.indexOf(n=u[t])>=0||(o[n]=e[n]);return o}(m,d);return e.createElement(u,{value:{scope:o({},p,g),text:s,isReady:v}},e.createElement(b,{components:p}))};export{b as MDX,h as useMDX};
//# sourceMappingURL=mdx-live.js.map

@@ -1,2 +0,2 @@

import*as e from"react";import*as r from"react/jsx-runtime.js";import{compile as t}from"@mdx-js/mdx";import{selectAll as n}from"unist-util-select";function o(){return o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(this,arguments)}const s=async()=>{},u=({code:r,resolveImport:o=s,recmaPlugins:u,rehypePlugins:c,remarkPlugins:a,providerImportSource:i})=>{const[l,m]=e.useState(void 0),p=e.useRef(null),f=e.useRef(!1);e.useEffect(()=>()=>{f.current=!0},[]);const d=e.useCallback(()=>{if(!p.current)return;const e=p.current;(function({code:e,recmaPlugins:r,rehypePlugins:o,remarkPlugins:s,providerImportSource:u}){const c=[];return t(e,{outputFormat:"function-body",providerImportSource:u,recmaPlugins:r,rehypePlugins:o,remarkPlugins:[...s||[],()=>async e=>{const r=n("mdxjsEsm",e);for(const e of r){const r=e.data.estree.body;for(let t=r.length-1;t>=0;t--){const n=r[t];"ImportDeclaration"===n.type&&(r.splice(t,1),e.value=e.value.substring(0,n.range[0]-1)+e.value.substring(n.range[1]-1),c.push(n))}}}]}).then(e=>[e,c])})(e).then(e=>{f.current||m(e)}).catch(e=>{console.error(e)}).then(()=>{p.current===e&&(p.current=null),f.current||d()})},[]);e.useMemo(()=>{const e=null===p.current;p.current={code:r,recmaPlugins:u,rehypePlugins:c,remarkPlugins:a,providerImportSource:i},e&&d()},[r,u,c,a]);const g=e.useRef();g.current||(g.current=new WeakSet);const[v,h]=e.useState({});return e.useEffect(()=>{if(!l)return;let e=!1;return(async()=>{const r={};for(const e of l[1])for(const t of e.specifiers)switch(t.type){case"ImportNamespaceSpecifier":r[t.local.name]=await o({kind:"namespace",path:e.source.value});break;case"ImportDefaultSpecifier":r[t.local.name]=await o({kind:"default",path:e.source.value});break;case"ImportSpecifier":r[t.local.name]=await o({kind:"named",path:e.source.value,variable:t.imported.name})}e||(g.current.add(l),h(r))})(),()=>{e=!0}},[o,l]),l?{resolvedImports:v,text:l[0].toString(),isReady:g.current.has(l)}:{resolvedImports:{},text:"",isReady:!1}},c=["default"],a=({children:r})=>e.createElement(e.Fragment,null,r),i=({Provider:t=a,code:n,defaultScope:s,useMDXComponents:i,resolveImport:l,recmaPlugins:m,rehypePlugins:p,remarkPlugins:f})=>{const{resolvedImports:d,text:g,isReady:v}=u({code:n,resolveImport:l,providerImportSource:i?"something different than empty string":void 0,recmaPlugins:m,rehypePlugins:p,remarkPlugins:f}),h=e.useMemo(()=>o({},s,d),[s,d]),y=e.useMemo(()=>g?new Function("__first_argument__",...Object.keys(h),g)(o({},r,{useMDXComponents:i}),...Object.values(h)):()=>null,[g,h]);if(!v)return null;const{default:P}=y,k=function(e,r){if(null==e)return{};var t,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r.indexOf(t=s[n])>=0||(o[t]=e[t]);return o}(y,c);return e.createElement(t,{value:{scope:o({},h,k),text:g,isReady:v}},e.createElement(P,{components:h}))};export{i as MDX,u as useMDX};
import*as e from"react";import*as r from"react/jsx-runtime";import{compile as t}from"@mdx-js/mdx";import{selectAll as n}from"unist-util-select";function o(){return o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(this,arguments)}const s=async()=>{},u=({code:r,resolveImport:o=s,recmaPlugins:u,rehypePlugins:c,remarkPlugins:a,providerImportSource:i})=>{const[l,m]=e.useState(void 0),p=e.useRef(null),f=e.useRef(!1);e.useEffect(()=>()=>{f.current=!0},[]);const d=e.useCallback(()=>{if(!p.current)return;const e=p.current;(function({code:e,recmaPlugins:r,rehypePlugins:o,remarkPlugins:s,providerImportSource:u}){const c=[];return t(e,{outputFormat:"function-body",providerImportSource:u,recmaPlugins:r,rehypePlugins:o,remarkPlugins:[...s||[],()=>async e=>{const r=n("mdxjsEsm",e);for(const e of r){const r=e.data.estree.body;for(let t=r.length-1;t>=0;t--){const n=r[t];"ImportDeclaration"===n.type&&(r.splice(t,1),e.value=e.value.substring(0,n.range[0]-1)+e.value.substring(n.range[1]-1),c.push(n))}}}]}).then(e=>[e,c])})(e).then(e=>{f.current||m(e)}).catch(e=>{console.error(e)}).then(()=>{p.current===e&&(p.current=null),f.current||d()})},[]);e.useMemo(()=>{const e=null===p.current;p.current={code:r,recmaPlugins:u,rehypePlugins:c,remarkPlugins:a,providerImportSource:i},e&&d()},[r,u,c,a]);const g=e.useRef();g.current||(g.current=new WeakSet);const[v,h]=e.useState({});return e.useEffect(()=>{if(!l)return;let e=!1;return(async()=>{const r={};for(const e of l[1])for(const t of e.specifiers)switch(t.type){case"ImportNamespaceSpecifier":r[t.local.name]=await o({kind:"namespace",path:e.source.value});break;case"ImportDefaultSpecifier":r[t.local.name]=await o({kind:"default",path:e.source.value});break;case"ImportSpecifier":r[t.local.name]=await o({kind:"named",path:e.source.value,variable:t.imported.name})}e||(g.current.add(l),h(r))})(),()=>{e=!0}},[o,l]),l?{resolvedImports:v,text:l[0].toString(),isReady:g.current.has(l)}:{resolvedImports:{},text:"",isReady:!1}},c=["default"],a=({children:r})=>e.createElement(e.Fragment,null,r),i=({Provider:t=a,code:n,defaultScope:s,useMDXComponents:i,resolveImport:l,recmaPlugins:m,rehypePlugins:p,remarkPlugins:f})=>{const{resolvedImports:d,text:g,isReady:v}=u({code:n,resolveImport:l,providerImportSource:i?"something different than empty string":void 0,recmaPlugins:m,rehypePlugins:p,remarkPlugins:f}),h=e.useMemo(()=>o({},s,d),[s,d]),y=e.useMemo(()=>g?new Function("__first_argument__",...Object.keys(h),g)(o({},r,{useMDXComponents:i}),...Object.values(h)):()=>null,[g,h]);if(!v)return null;const{default:P}=y,k=function(e,r){if(null==e)return{};var t,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r.indexOf(t=s[n])>=0||(o[t]=e[t]);return o}(y,c);return e.createElement(t,{value:{scope:o({},h,k),text:g,isReady:v}},e.createElement(P,{components:h}))};export{i as MDX,u as useMDX};
//# sourceMappingURL=mdx-live.modern.js.map
{
"name": "@blocz/mdx-live",
"version": "0.2.0",
"version": "0.2.1",
"type": "module",

@@ -5,0 +5,0 @@ "source": "src/index.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc